Luau is a typed scripting language derived from Lua developed by some team at Roblox. This language is backwards compatible with Lua 5.1 and it does not implement Just-In-Time compilation but its own interpreter, which is often competitive with LuaJIT interpreter on a wide set of benchmarks.
Luau is now open source under the MIT license.
Info: https://luau-lang.org/ <-Really recommend you check this out.
Repo: https://github.com/Roblox/luau
Hopefully some of you can have fun with this!
It would be even cooler if you were able to make löve2d use luau or some version of lua 5.3.
Luau went open source
Re: Luau went open source
Maybe it is a noob question but what benefit Luau has over Lua and LuaJIT? Is it something really worth considering? Just curious.It would be even cooler if you were able to make löve2d use luau or some version of lua 5.3.
-
- Party member
- Posts: 559
- Joined: Wed Oct 05, 2016 11:53 am
Re: Luau went open source
At a glance, Luau seems like a good candidate if you're dealing with a distributed environment (like Roblox), where users are running a lot of user-written code. This is because they have taken great efforts to sandboxing the language better than standard Lua and LuaJIT, so that it's harder to access the underlying system running the code. As such, if you're developing something where security is a major concern Luau may be better suited for your embedded scripting needs.
Beyond that, it's basically another variant based on lua 5.1, with a seemingly decent runtime performance (according to them, would like to see some tests and graphs). Surprisingly, they claim that in their implementation pairs() and ipairs() have comparable performance, which seems neat. They also implemented an incremental garbage collector, which may be of use to some. It doesn't have a JIT compiler, however, but it's something they might think of doing in the future now that the language is open source.
For the average LÖVE developer, however, Luau doesn't do anything all that special.
Beyond that, it's basically another variant based on lua 5.1, with a seemingly decent runtime performance (according to them, would like to see some tests and graphs). Surprisingly, they claim that in their implementation pairs() and ipairs() have comparable performance, which seems neat. They also implemented an incremental garbage collector, which may be of use to some. It doesn't have a JIT compiler, however, but it's something they might think of doing in the future now that the language is open source.
For the average LÖVE developer, however, Luau doesn't do anything all that special.
Re: Luau went open source
Thank you for the explanation.
Actually I do like some of the syntactical features they added in Luau:
https://luau-lang.org/syntax
Type annotation and function types
If-Then-Else expression
Compound assignments
..etc
Actually I do like some of the syntactical features they added in Luau:
https://luau-lang.org/syntax
Type annotation and function types
Code: Select all
x:number
name:string
isJump:boolean
getPosition() -> number
Code: Select all
local maxValue = if a > b then a else b
Code: Select all
a += 1
b *= 2
Re: Luau went open source
Check out moonscript if you haven't yet.ddabrahim wrote: ↑Sun Nov 14, 2021 12:57 pm If-Then-Else expressionCompound assignmentsCode: Select all
local maxValue = if a > b then a else b
..etcCode: Select all
a += 1 b *= 2
Re: Luau went open source
Thank you for the recommendation, MoonScript looks very interesting, I like the syntax, what I dislike however is that it is require some 3rd party libs, I don't like to bloat my system with random staff. Prefer all-in-one packages so then I can also remove all-at-once if I no longer need it. But maybe one day I'll consider it. Thanks.
Who is online
Users browsing this forum: No registered users and 1 guest