I've been saying it for years: Lua needs its Ruby on Rails moment
Yes, with Lapis[1]. [1] https://leafo.net/lapis/
The evolution of Lua, continued [pdf]
101–110 of 175 posts
Re: The evolution of Lua, continued [pdf]
#102I was thinking a while back, how nice it would be if lua was the scripting language in the browser instead of javascript. There are some projects to compile lua to wasm and have it run in the browser... https://pluto-lang.org/web/#env=lua%3A5.4.6&code=if%20_PVERS... But interoperability with the DOM is the missing key. Still, if lua was used instead of javascript, I could see myself saying... man, I wonder what brows…
Lua has improved substantially from version to version because it’s been able to break compatibility. That wouldn’t be possible in the browser, so today we’d still be stuck using (an augmented version of) the outdated Lua 2.x.
Re: The evolution of Lua, continued [pdf]
#103Earlier 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…
Re: The evolution of Lua, continued [pdf]
#104I was thinking a while back, how nice it would be if lua was the scripting language in the browser instead of javascript. There are some projects to compile lua to wasm and have it run in the browser... https://pluto-lang.org/web/#env=lua%3A5.4.6&code=if%20_PVERS... But interoperability with the DOM is the missing key. Still, if lua was used instead of javascript, I could see myself saying... man, I wonder what brows…
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…
Otoh, missing ++, +=, ..= operators really bothers me.
But that's just personal taste, not objective by any means.
Re: The evolution of Lua, continued [pdf]
#105I was thinking a while back, how nice it would be if lua was the scripting language in the browser instead of javascript. There are some projects to compile lua to wasm and have it run in the browser... https://pluto-lang.org/web/#env=lua%3A5.4.6&code=if%20_PVERS... But interoperability with the DOM is the missing key. Still, if lua was used instead of javascript, I could see myself saying... man, I wonder what brows…
There’s also a Javascript implementation of Lua which allows one to run Lua in a browser: https://github.com/fengari-lua/fengari-web I don’t know if this can access the DOM in Lua, but considering that Fengari is in Javascript, adding a _DOM global variable should not be too hard (if it hasn’t already been done).
Re: The evolution of Lua, continued [pdf]
#106Re: The evolution of Lua, continued [pdf]
#107Earlier 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…
I like lua better because its minimalist. Javascript feels like a kitchen sink language. Otoh, missing ++, +=, ..= operators really bothers me. But that's just personal taste, not objective by any means.
I love ++, but you know what? I was shocked when a co-worker pointed out that it is frowned upon to use ++ in javascript. It some big companies, their linter settings mark ++ as something that should be changed.
Re: The evolution of Lua, continued [pdf]
#108Earlier quoted context omitted.
Why do you write your years with a leading zero?
Some people think that writing years as 2025 is wrong because this will lead to problems in year 9999 (y10k bug? I'm not sure if they call it that way) so they decided to introduce leading zero as it would solve something and not just postpone the problem to 99999.
- this comment will still be around in 8000 years
- we will still be using the same calendar system in 8000 years
- people 8000 years in the future will leave off the leading 1 of years for some reason, and will use a leading 0 to disambiguate dates from the previous 10000 year period.
Re: The evolution of Lua, continued [pdf]
#109Earlier 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…
Re: The evolution of Lua, continued [pdf]
#110[flagged]
https://news.ycombinator.com/newsguidelines.html
https://hn.algolia.com/?sort=byDate&dateRange=all&type=comme...