Conversation
Notices
-
Embed this notice
I have, in fact, written code in lua and used it for something other than factorio
- Pleroma-tan likes this.
-
Embed this notice
@Kerosene @Inginsub @pwm on the flipside, it IS a competent language in that it works and I've never seen it actually fuck up in a real world scenario. Survives contact with real computers and all that.
The developers of lua even say that it's not meant to be the backbone of a big program like python is. It's supposed to compete with things like custom file formats.
People don't use it like that because once you develop some infrastructure for it, it's way too easy to get sucked into the process and before you know it every other function has some hook into a .lua file and you're stuck with a slow unmaintainable mess until the end of time.
I would recommend just staying away unless there really isn't another option.
-
Embed this notice
@RustyCrab @Kerosene @Inginsub @pwm you know all those valid points? Fuck you. I'm just going to ignore them. In fact I'm actually just going to write my code in ti basic. Just to see you seethe
-
Embed this notice
@Kerosene @Inginsub @pwm there's a reason that it's a "hidden gem" and not a mainstream obvious choice
-
Embed this notice
@RustyCrab @Inginsub @pwm Interesting. I've seen so many people shill it as this hidden gem of scripting languages. I wonder if Minetest's devs think it was a good or a bad idea to use it for their game engine.
-
Embed this notice
@Kerosene @Inginsub @pwm two main problems:
The language has no notion of class or custom data types. You get primitives and tables and thats it. There's a huge cope called metatables that allow you to create class-like structures but they are still fully dynamic and it's very very hard to tell what literally anything is at runtime. This is on top of the fact that lua has basically no debuggers in existence. That is to say, they exist but none of them work correctly.
Performance in lua is a dark art. If you stick to using primitive types, the VM is very very fast. If you try to use classes (you're out of your mind if you don't), the VM is absolutely reckless with memory and the same code involving classes/tables will executive 30 TIMES SLOWER than without them. I have benchmarked this over and over and over again.
-
Embed this notice
@pwm @Inginsub it doesn't scale up to even modestly sized programs. No real libraries. The only thing it's good for is writing configuration scripts and loading them because it has a nothing-sized vm
-
Embed this notice
@RustyCrab @Inginsub @pwm I've never tried it beyond giving a quick look at mod making in Minetest. Is it really that slow?
-
Embed this notice
@Inginsub never again
-
Embed this notice
@RustyCrab @Inginsub what do you have against lua? I think it's pretty good