4 ms·
Possible to make this work on LuaJIT as well? If this is transpiled to Lua 5.1 it should be possible to make this work with LuaJIT runtime. Combined with Openre
by nafey 6y ago
Possible to make this work on LuaJIT as well? If this is transpiled to Lua 5.1 it should be possible to make this work with LuaJIT runtime. Combined with Openresty and gradual typing this could be a quite a good language for writing Backend services.
- minxomat 6y agoTake a look at teal, it does exactly that.
- nafey 6y agoAny links? Teal appears to be an assembly language from my google search.
- durub 6y agoHere it is: https://github.com/teal-language/tl https://github.com/teal-language/tl
- nonbirithm 6y agoIt's also made by the same person who created LuaRocks and htop. I'm personally hoping tl or something will take off as the de-facto TypeScript for Lua. I'm already convinced that types are better. I'd use types all the time if I could. It's just that not a whole lot of people seem to care about Lua, even with how fast LuaJIT is, so you have to compromise with projects adding types to Lua that are only in their infancy, assuming they'll still be around after a couple of years. TypeScript has proven that gradual typing can be done right and had a bunch of innovations I never would have thought of (the keyof operator for creating a type of "the set possible key names of T" for instance). Having that kind of power in Lua on top of one of the fastest JIT compilers on Earth is my dream.
- minxomat 6y agoTogether with Teal, LuaJIT can become a very safe platform. Vela (fork with many improvements to LuaJIT) has optional, native recursive immutability built into the JIT for Lua-land objects and also compiles next() to dig pairs out of the nyi hole. Also Moon+ (even more expression version of MoonScript) is considering implementing the teal checker natively: https://github.com/pigpigyyy/MoonPlus/issues/15 https://github.com/pigpigyyy/MoonPlus/issues/15
- Rochus 6y agoGood idea. But then why not use one of the already available statically/strictly typed languages which compile to Lua or LuaJIT bytecode? See https://github.com/hengestone/lua-languages https://github.com/hengestone/lua-languages