Live data from Hacker News

The evolution of Lua, continued [pdf]

lua.org

171–175 of 175 posts

Re: The evolution of Lua, continued [pdf]

#171
post #75

I've been saying it for years: Lua needs its Ruby on Rails moment

For many, Lua is primarily known as the Roblox language. Pretty impressive that it's the language of use in a game (/set of games) with 380 million monthly active players - currently the most popular in the world.

Before then it was the World of Warcraft UI mod language. Spawned a pretty sizable ecosystem around it, though I imagine Roblox puts it to shame.

Re: The evolution of Lua, continued [pdf]

#172
post #94

Earlier quoted context omitted.

What specifically do you think would be better? Lua shares many of JS's quirks (like the relationship between arrays and non-array objects, the behavior of undefined for non-existent object properties, metatables are somewhat similar to JS prototypes, etc.) and adds a bunch more (lack of continue statement, 1-indexing, cannot have nil values in tables). I can see people liking or disliking Lua and JS both , depending…

Lua has tail call optimization and js doesn't. For me, this is a dealbreaker for js. Lua also has operational advantages compared to javascript. You can build it from source in at most a few seconds and run it anywhere that has a c compiler. The startup time is negligible even compared to a compiled c program so you can run entire scripts that do very useful things faster than most js engines can print hello world. T…

You're conflating a few things here. V8 and Spidermonkey aren't the only interpreters out there. There are a number of them explicitly designed to be small, easy to compile and to embed, such MuJS, Fabrice Bellard's QuickJS, and more still. I can't speak to their FFI interfaces, but you can't judge JS's ability to call C functions based off that of Node/V8. I'm not sure how FFI runs against its execution model given JS is generally used as an embedded language, necessitating foreign function calls.

Re: The evolution of Lua, continued [pdf]

#173
post #94

Earlier quoted context omitted.

Lua has tail call optimization and js doesn't. For me, this is a dealbreaker for js. Lua also has operational advantages compared to javascript. You can build it from source in at most a few seconds and run it anywhere that has a c compiler. The startup time is negligible even compared to a compiled c program so you can run entire scripts that do very useful things faster than most js engines can print hello world. T…

> Lua also essentially got lexical scoping of local variables correct from the beginning while js blessed us with the nightmare of var. That was not my experience when I was working with lua. Did anything change since? Asked google. Answered : > In Lua, if a variable is assigned a value inside a function without being explicitly declared with the local keyword, it will automatically become a global variable. This is…

Yeah, this puzzled me too. I'm assuming they're referring to the semantics of "var" in JS vs "local" in Lua, with the latter resembling "let" in JS, which doesn't have broken scoping.

Re: The evolution of Lua, continued [pdf]

#174

Earlier quoted context omitted.

So you can instantly recognize at a glance that it's Kragen's post! ;) It's a Long Now Foundation thing: slower, deeper, longer. Y10K compliance. https://longnow.org/ideas/long-now-years-five-digit-dates-an... "The present moment used to be the unimaginable future." -Steward Brand "How can we invest in a future we know is structurally incapable of keeping faith with its past? The digital industries must shift from be…

[flagged]

No personal attacks, please.

https://news.ycombinator.com/newsguidelines.html

Post reply on HN