Some background for anyone interested: The project is a fork of `roblox/react-lua` to basically open it up for community engagement and it uses Luau
Roblox's Luau: https://luau-lang.org/
> Luau is a fast, small, safe, gradually typed embeddable scripting language derived from Lua.
> Around 2006, Roblox started using Lua 5.1 as a scripting language for games. Over the years the runtime had to be tweaked to provide a safe, secure sandboxed environment; we gradually started accumulating small library changes and tweaks.
Interesting.
I'd love to have type annotations in Lua.
But this doesn't compile to Lua, right?
Unfortunately not, it is the whole Compiler and VM. I'm not super familiar with embedding Luau only having messed around with it for a bit, but I highly doubt it'd be too difficult to drop in Luau over top an existing Lua implementation
Thanks!
I found Teal, which seems to Lua what TypeScript is to JavaScript
There's also a Typescript to Lua transpiler https://typescripttolua.github.io/
I've used it successfully with Love2d projects (albeit with some quirks)
Lol, that's great.
What are the quirks?
Mostly that Lua datatypes don’t always have great analogs in TS (particularly tables) and you have to be pretty cognizant of what’s going on under the hood.
All of these, too: https://typescripttolua.github.io/docs/caveats
I use Teal for Pico8 game development. It's great.
Interesting, what do they do about missing type info? Is there some repo of types for popular libraries?
There's the official teal-types[1] project that aims to fill that gap only for standard Lua. I've used the LÖVE types[2] in the past.
1: https://github.com/teal-language/teal-types/tree/master/type... 2: https://github.com/MikuAuahDark/love2d-tl
No idea, probably nothing.
No, Luau is a new programming language that's based on Lua.
So hang on. "We had to customize Lua, but didn't contribute all those changes back upstream"? Or "We tried to contribute those changes upstream but Lua didn't want to take them onboard"?
PUC Lua uses a closed development model. They have a small team, and that team both decides what goes into the language, and writes the implementation themselves.
There are a great many implementations of Lua at this point, I'm aware of at least six. But Roblox upstreaming their semantic changes was never an option.
Of course it was: there is nothing preventing a company from contacting the dev team and going "we've one quite a bit of work, are you interested in getting any of that upstreamed". Getting changes upstreamed is in no way the exclusive domain of fully open source projects, it just requires reaching out.
Just because there's a closed development model doesn't automatically imply the devs team lives and breathes "not-invented-here"-ism and are no interested in discussing improvements that make a difference to actual people using Lua in (extremely) large real world products.
It was not a general statement, but rather, a specific one.
> Lua is not "open developed". The development is done exclusively by the Lua team, at PUC-Rio. So, we do not need a SVN repository. Currently, we keep Lua with the good old RCS.
- Roberto Ierusalimschy
http://lua-users.org/lists/lua-l/2007-09/msg00476.html
Yes, I know, that was my point too: it's closed development and so you can talk to the dev team to get changes worked into Lua itself. You don't get to just open a PR and start thigns that way, you have to talk to people. And going "well we didn't contact them" when you're the size of Roblox would be incredible.
Any upstreaming was unlikely to ever be acceptable to the PUC-Rio folks.
PUC-Rio Lua uses C (with a tiny bit of C++ for stack unwinding on errors if folks don't want to use `longjmp()`,) Luau is strictly C++. Luau rewrites quite a lot of the core structures, and they aren't compatible. Further, Luau is a fork of PUC-Rio Lua _5.1_ (the current is 5.4 I think?) and intentionally picks and chooses features from later Lua versions. Even things like improvements to the core VM interpreter loop wouldn't be upstreamable, because Lua 5.2+ has a fundamentally different model to allow for yielding in metamethods. PUC-Rio would not accept changes other than fixes for critical bugs in Lua 5.1.
I like both PUC-Rio Lua and Luau, but a hard fork with no upstreaming was the only option here. The architectural differences of the VMs are so large now that it would amount to PUC-Rio adopting Luau. Supposing there is some tiny bit that PUC-Rio is interested in, they can cherry-pick it out of Luau, since they use the same license.
> The development is done exclusively by the Lua team, at PUC-Rio. So, we do not need a SVN repository.
If I had this as my message, and someone asked to ship changes, I would be more than mad.
just take the L dude.
What a ridiculous thing to say. If you ran, or were part of, an academically run project, "you'd get mad" if a huge industry player went "hey we did some stuff with your project, some of it might be interesting to you, want to chat about potential upstreaming?"
really, dude?
Yes, because that is more burden to ensure that it still fits my purpose, the intended goals, and that whoever it is, is doing it properly.
Which would be the whole reason I would put such a statement there, in the first place.
What are you even trying to argue with now? That I'm not allowed to get angry in the hypothetical that I made up? Do you see why it's fruitless to continue arguing?
Or are you going to pick out some prior wording and analyse it further, because you just can't comprehend that corporations don't have best interests at heart, and some people prefer to just put things up and not deal with other people's improvements
PUC's Lua is, however, open source (https://www.lua.org/license.html), even if they don't solicit contributions, and they do accept happily accept financial support. It doesn't look like they release new versions very frequently at all (the last release was in over a year ago). Still, it appears they do accept financial contributions, so it seems like Roblox, whose market cap is $22 billion and whose offerings are at present entirely dependent on Lua, should probably consider offering at least token support (https://www.lua.org/thanks.html).
Why does the market cap allow you to decide about other people's projects? Lua is used in many places, and its users aren't all employees of Roblox. Lua is popular because it works in a way that sometimes breaks backward compatibility, making the language as easy and lean as it is. If there's a disagreement on how it should be used, just fork it like Roblox did.
-
Wouldn't this let you run a front end on the edge with Nginx??? Sounds fun!