Why you dont learn Lua? Its easy, not bloated and very widely used with interesting metaprogramming abilities similiar to lisp
Based Lua!
Other urls found in this thread:
en.wikipedia.org
twitter.com
I write all sorts of little things in lua, fun little lang that lua.
ah yes, Lua, great scripting language that one
The Brazilians should have just recorded theft and murder videos and upload them to liveleak. It would be better than that abomination.
a[1]
There are a lot of changes I'd make to the language, but fuck me if this still isn't the easiest way to embed a scripting language in C/C++. Python's is too bloated and hard to sandbox and I still for the fucking life of me can't figure out how to work V8 because Google's documentation sucks ass.
>metaprogramming
Lua doesn't even have macros.
Pretty much the only metaprogramming it has are metaclasses (or tables, as it calls them).
You might as well claim that JS has good metaprogramming abilities.
That said, it's an ok language for when you need a less bloated Python.
Can I use it for general purpose things?
Only on RiscOS =P
as someone who's illiterate, how does embedding one language in another work?
Lua is a comfy language that is fadt, but it has been overshadowed by JavaScript in recent years.
>similiar to lisp
Barely anyone uses lisp but its usually referenced by people promoting a language that isn't used "enough". Its actually a good indication that while the language may be interesting, it has some issues that keep people from using it like lisp does.
Lua was the first language I learned back when I was writing mob scripts for private WoW servers over a decade ago. It'll always be my go to for scripting.
I love Lua but I can’t bring myself to use anything other than C++ and still respect myself. It’s a problem
Daily reminder LuaJIT is the fastest interpreter ever created, almost on par of a native binary compiled with GCC.
Also best ABI ever designed.
You could almost get away with using only that Love2D game engine to develop general android applications... There's like one or two annoying restrictions intended for "games" but they can be worked around.
More convenient than installing the android dev kit.
I fucking wish we use Lua for frontend instead of this badly designed Memescript
>indexed from 1 instead of 0
I'm good buddy
It isn't. You can start the index at any arbitrary position, including 0, 1 or 69. This is the same in Fortran and other languages like Julia. There are also algorithms out there where it is more efficient to start at 1 than at 0, so having the choice is a good one.
In the case of Lua you could complain that some of the stdlib functions expect 1, which I'd agree was a poor decision, but it's hardly a deal-breaker and you sound very brittle.
I think it's worse mathematically since array indexes are really offsets and sometimes you want to multiply them
>variables are global by default
dropped
lua is that language that looks fine for its purpose but every person who tried it doesnt want to use it again
>widely used
Since when and for what? Any sources proving this statement?
Fuck implicit variable declaration.
>boilerplate good
very hard to debug stuff.
does somebody have a collection of those "brainlet" pictures? They get ever more funny!
why should I use it instead of C#?
I fucking hate people asking others why they should use X instead of Y.
Different tools for different jobs retard.
Lua is implemented as a regular C library, you can spin up a new instance of the Lua VM in the middle of your C program, "register" functions written in C to make them available to the Lua VM, or send commands to call functions written in Lua from within your C code
Lua is widely used as an embedded scripting language in games and CAD software, basically any situation where you have a program that's mostly written in C/C++ but you still want to be able to easily change and extend some parts of your program's behavior is a good candidate for embedding Lua: en.wikipedia.org
Not using Julia
Lua suck my lulla, please use java sir
I learned it for the psp, I use it to mod my c++/opengl hobby 3d game engine
this is good shit but I don't think it's a good idea to use it as a stand alone language.
fuck off
Tell me about it's Lisp-like metaprogramming
nil
could I make a mediocre chess engine with it?
for i = 1, 100 do print("kfreebsd portens when?") end
Hated it in the past, but recently came back to it and found it surprisingly comfy. I want to use it for a simple project now
based luajiit kernel
The only thing I could see getting in the way is Lua's lack of native support for multithreading (though it does natively support coroutines), you can work around that by spinning up a separate Lua VM in each thread and the Lua Programming Gems book has a chapter that describes how to implement synchronization across Lua VMs running in separate threads
LuaJIT's FFI is easily the killer feature that sold me on it, I have one project I made that I managed to expunge most of the C code and rewrite 90% of in Lua because the FFI allowed me to call [spoiler]Win32[/spoiler] functions directly without having to write C wrappers for them
Moonscript is the next step up. It's amazing.
If you think Metatables and metaclasses are the same thing, you're a compete failure as a human being.