6 ms·
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 L
by _xivi 2y ago
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/ 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.
- k__ 2y agoInteresting. I'd love to have type annotations in Lua. But this doesn't compile to Lua, right?
- gsck 2y agoUnfortunately 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
- k__ 2y agoThanks! I found Teal, which seems to Lua what TypeScript is to JavaScript
- hombre_fatal 2y agoI use Teal for Pico8 game development. It's great.
- boredtofears 2y agoThere's also a Typescript to Lua transpiler https://typescripttolua.github.io/ https://typescripttolua.github.io/ I've used it successfully with Love2d projects (albeit with some quirks)
- k__ 2y agoLol, that's great. What are the quirks?
- boredtofears 2y agoMostly 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 https://typescripttolua.github.io/docs/caveats
- oblio 2y agoInteresting, what do they do about missing type info? Is there some repo of types for popular libraries?
- k__ 2y agoNo idea, probably nothing.
- 0x6d 2y agoThere'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/types https://github.com/teal-language/teal-types/tree/master/type... 2: https://github.com/MikuAuahDark/love2d-tl https://github.com/MikuAuahDark/love2d-tl
- MenhirMike 2y agoNo, Luau is a new programming language that's based on Lua.
- TheRealPomax 2y agoSo 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"?
- samatman 2y agoPUC 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.
- CobrastanJorji 2y agoPUC's Lua is, however, open source (https://www.lua.org/license.html 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 https://www.lua.org/thanks.html).
- imachine1980_ 2y agoWhy 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.
- TheRealPomax 2y agoOf 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.
- jhatemyjob 2y ago-
- jakedub4d2 2y agoWouldn't this let you run a front end on the edge with Nginx??? Sounds fun!