Is this still relevent?
Lua?
Yup. It's lean, clean, and nice to work with.
I prefer Lua over Python
...
So, yes?
I wish there was a scheme as small and easy to embed as lua. Protip there isn't don't even bother trying to prove me wrong
yes, people still make WoW addons
Yea man, there are 50 thousand people playing Garry's Mod right now
It's never been desu.
I heard it was good but lacks the tools needed for widespread use
Mruby
>implying ruby is a scheme
Java translates to Street
So something pajeets avoid, meaning it's probably worthwhile.
Lua is my go-to language for embedded scripting.
It's neat for scripting.
wiki/Category:Lua-scripted_video_games
Lua is absolutely relevant.
You are absolutely not.
pajeets avoid it because it's filled with deluded manbabies
seriously don't step foot in any lua forum, just use rust if you want to surround yourself with evangelists without getting brain cancer
Lua is fucking awesome. BRs did it right.
It has uses. But remember, it is an embedded scripting language. In this case, you don't have to reinvent the wheel, you can simply use the host application's wheel.
yes
never liked it ever, but it's fairly widespread
kind of wish all the things that used lua had python in them instead
but lua is just a better python
Not really.
Lua was never ever ever a good general scripting language, only an embedded one.
Most people are stuck on Lua 5.1 because of LuaJIT, which is a dead project struck in maintenance mode. Lua 5.2 broke working code for no reason with its environment change, and Lua 5.3 introduced 64-bit integers and native bitshifting operators and not much else worth upgrading for.
If you're going to embed a language in your software, use Javascript, even if you hate the language. You can start with a lightweight Lua-style implementation like Duktape or JerryScript, and then when you need speed V8, Spidermonkey and JSCore are there waiting for you with several companies worth of engineers working on all three that won't abandon it like LuaJIT.
This.
>1 indexed lists
>no real lists or arrays
Complaining about 1-indexing is useless bikeshedding, and something a sufficiently mature programmer can learn to deal with.
no interpreted language has real arrays anyway.
Tables are hybrid data structures. In all common implementations since 5.0, tables can have a hash map and array section.
I chuckled
>The programmer should adapt to shitty tools instead of using better tools
Python has real arrays
No, python has something that looks like arrays.
So does Lua. If you use a table like an array, it's just an array.
lua.org
And if you absolutely need an array you can use FFI types.
holy moly
What makes it so appealing to use in videogames?
>luajit
Isn't plain lua already faster than every other interpreted language?
Oh wow, that seems silly as fuck. The only reason I can see for jamming arrays and hashes into a hybrid data type is "being friendly to non-programmers".
Being "friendly to non-programmers" is how you end up with shitty languages like PHP.
>an object type which can compactly represent an array
Bravo.
LuaJIT can compare to like slower java/C stuff.
>>The programmer should adapt to shitty tools instead of using better tools
1-indexing in and of itself is a bikeshed feature that matters very little in the grand scheme of things. People complaining about such things can be safely ignored because they care too much about surface-level features and can't be trusted to have valid opinions about real problems a language might or might not have.
1 Indexes actually make perfect sense when you don't have real offsets anyway.
I'm guessing because it was easy enough to work with and understand, allowing even idiots to work with. Now it's just ubiquitous enough for every gamedev to use it as a scripting language.
>Being "friendly to non-programmers" is how you end up with shitty languages like PHP.
PHP at least has managed a major version upgrade without breaking huge swaths of peoples code for no gain.
>Defining 1 + 1 to equal 3 is a bikeshed feature that matters very little in the grand scheme of things.
There are mathematical reasons for using 0 indexing. 1 indexing also fucks up length calculations
PHP isn't friendly to anyone.
Only if you're actually accessing sequential memory, otherwise it's all arbitrary. 1 indices describe what array-lookalikes actually do, 0 indices do not.
Anything that can be expressed with a 0 index can also be expressed with a 1 index.
Have you not read Dijkstra?
An array with 1 entry does not have a length of 0. It doesn't involve intervals.
0 indexing is for mathematical reasons, not architectural reasons. It doesn't matter whether or not the lists are backed by a contingent block of memory, the math works out for 0 indexed arrays.
Fucking kids these days, probably haven't even studied calculus.
It's 100% for architectural reasons in languages that have sequential memory based arrays. The mathematical stuff came later.
Yes, I read that too. He is correct that 0-indexing makes certain types of expressions more convenient. But that's all it is, a convenience, and only in certain circumstances.
This isn't the only time I've had to deal with Dijkstra-derived stupidity peddled by novices, his diatribe against goto should have a gigantic fucking asterisk next to it as well.
>ROBLOX consistently topping over Gary's mod and almost everything else below the top 8 on Steam's stats
>That is ugly
This is Dijkstra's core argument.
Yes, I read that too. He is correct that 0-indexing makes certain types of expressions more convenient. But that's all it is, a convenience, and only in certain circumstances.
This isn't the only time I've had to deal with Dijkstra-derived stupidity peddled by novices, his diatribe against goto should have a gigantic fucking asterisk next to it as well. I swear I will shoot somebody the next time I have a pull request rejected asking me to justify the use of goto in a state machine or in cleanup code.
forgot this
>ROBLOX
JUST
thats weird, like the 4th spontaneous and unrelated not a pipe reference i've seen this month.
kek, it is a nice very modular thing. But I picked it out of random
there is literally nothing wrong with lua
>1 Indexes actually make perfect sense when you don't have real offsets anyway.
this
You don't need lists or arrays when you have tables.
lua best
For game development, yes.
wtf i love lua now
>%CURRENTYEAR%
>rococks
See You code the engine and performance critical code using c/c++ and then use lua to script the game.
Lua is relatively fast and easier to write scripts than c.
Python:
> slow
> bloated (500k loc)
> overcomplicated
> the C++ of scripting languages
Lua:
> fastest scripting language
> tiny (10k loc w/out stdlib)
> simple
> the C of scripting languages
>1-indexed
Thanks user. Next time I want a scripting language to go with my project, I'll use Javascript.
> len(arr)
So?
its cancer
pua in lua
>'scripting language'
>doesn't even have regular expressions
into the garbage
lua patterns are good enough for most uses. also there are regex libs and other powerful pattern matching libs.
S7 works well enough for embedding
C# API is also god-tier
doesn't it not have a proper library and is missing some features
no
It has Lpeg, a popular library for portable expression grammars. It includes regex too. PEG are superior for anything complicated and patterns are good enough for anything simple.
Lua is great. Shame there's three different versions in common use and they're all different and incompatible in various ways.
lol no, this isn't python. Lua 5.1 is standard til the next major version.
I'm still waiting for luajit to work properly when shit is allocated beyond 4gb of address space in a 64bit process.
>Lua 5.1 is standard til the next major version.
Unless you use LuaJIT, which includes 5.2 changes. Or you actually want to follow the real standard which is 5.3. Walking about with semantics and pretending that 5.1 is supported in any capacity is just embarrassing.
Is a pretty fucking good example.
LuaJIT mostly doesn't do 5.2, that's WHY 5.1 is standard. 5.1 is major release + immediate patches. Anything past that is pre-release lua6 stuff and should be learned but avoided in use.
Good for when I'm making my roblox game 10/10
I use Lua 5.3 without any problems
Good for you, kid.
Lua is meh but it's the most documented and fastest scripting language we have available for embedding.
There is wren which looks interesting but the docs are limited.