>What is Lua? Lua is a lightweight, flexible language designed primarily to script compiled applications. It's fast and is commonly used in game engines.
After tinkering with it for a couple of years now ricing my awesome desktop I've come to really like it. It could use a built in async library though
Nathaniel Stewart
This reminds me to Textadept. Is a nice pet project and is very well documented but honestly GTK doesn't cut for a good multiplatform experience. Either Notepad++ or Gedit are faster for their respective platforms and neovim just werks on every OS i care about.
>>help wanted: more/better resources! i'll shill sol2 then. It's an embedding lib for C++, it can handle classes, inheritance, function and method overloading, and according to the benchmark is generally the fastest thing in it's category. It can do pretty much anything.
Easton Powell
>It could use a built in async library though Async file io? Some host applications provide an API for that, and there are a few binary modules that provide it. I recall one being implemented with rust/tokio.
Speaking of async, I recently read the rust futures crate, learned a lot about how their async API works, and started implementing something similar in Teal. The exercise was very enlightening.
Honestly I am not sure, I don't think so. I use it in a homebrew game project where I can pass stuff back and forth between C++ and Lua and write my logic in Lua referencing C++ functions. For that it can pretty much to everything I could think of when trying out features.
Justin Miller
What are you referring to? The REPL in in the 1 hour video?
Alexander Hernandez
>indexing begins at 1 For what reason? Not trolling just a noob.
Ethan Martinez
The whole text editor. I used it for a month as replacement for Gedit + Notepad++. Isn't bad but isn't good enough IMO. It has a lot of neat features but is slower (on Wind*ws at least) and less intuitive.
Christian Cook
My guess is that it eliminates the need to write array.length - 1 (#table - 1) when iterating over an array. There are no use cases for arrays starting with 0 in Lua anyway and when you need it you can always work around it since table[0] is a valid construct in Lua
Tyler Parker
It might have been to make it easier to understand for non programmers. Ordinals[1] vs offset[0]. Here is their discussion on it: lua-users.org/wiki/CountingFromOne
Xavier Murphy
Teal meets you half way and makes you declare globals with the global keyword. You still need to declare locals with local, but you can no longer accidentally declare globals when you forget the local keyword. It would be a compiler error / red squiggly.
Jordan Brown
Lua is very flexible.
Here is an example of an Option type constructor. This design affords you data privacy and fine grained access control. No metatables or class libraries necessary, and methods are called with the dot operator.
It's just an old-fashioned convention that you see in old languages like Fortran and ADA. Lua is from 1993 so the decision was likely influenced by that fact.
Ethan Anderson
iirc the guy who made lua was a researcher at some br uni he was probably using matlab where indexes start at 1 too
Lincoln Anderson
Is this a good beginner language? I heard even 10 year olds can learn it