Too early for that I think - we have a few things missing for this to work. Most notably right now luau-analyze doesn’t understand Roblox type definitions. We plan to expose type definition files so that this works fine.
Congratulations! Making a new language is hard and the sign of a mature company! This could be a long-lasting contribution to computing, and is definitely a non-trivial thing to do. I thought for sure this day was a few years out, so this is a very welcome surprise.
I’m excited to see what rich tooling comes from this, and I look forward to Roblox’s custodianship of Luau.
I noticed a while ago that the github page is no longer just a description with a link and was a bit confused. This is amazing, can’t wait for people to implement online compilers.
If anything, open sourcing Luau will reduce the amount of exploits, as more eyes will be on the code meaning vulnerabilities will be spotted and corrected sooner than they otherwise would be!
Gosh darn it, I’m a C# developer, not a C++ one. Still, it’s very nice that you guys released it to the public, I’ve always wondered if, or when you guys were go going to release it!
Luau is designed to be faster, more robust, has type linting functionality, and has some extra functions built ontop. Lua is what Luau is based on. (this means that most Lua code can be run in Luau)
The Luau version is synonymous to the Roblox version except for the globals.
There are some other notable differences other than the Roblox version as well, but all typed annotations work as expected.
To test this, I’ve made two variants: one with good code, and another that should be warning and bug-prone.
Good Code Snippet
type LuauGreeting = string
local Greeting: LuauGreeting = "Hello from Luau %s!"
print(string.format(Greeting, _VERSION))
Bad Code Snippet
type TimeElapsed = number
type FakeType = FakeType
local GetTimeElapsed: TimeElapsed = ElapsedTime()
task.wait(3)
print(GetTimeElapsed - time())
and here are the given results based on both variants in the CLI and Roblox Studio:
Good Code Variant via CLI
-Code compiled in the CLI:
-Code analyzed in the CLI:
Good Code Variant via Roblox Studio
and lastly, the bad code variant:
Bad Code Variant via CLI
Bad Code Variant via Roblox
The biggest difference is that an error is thrown and will not compile for the bad code variant in the CLI, whereas in Roblox Studio it runs just fine.
If it’s somewhat identical to the version in roblox studio, then it’s going to become a slight issue in the future for Roblox.
I’ll explain why and how exploit developers can use it to their advantage:
Exploit developers have a great chance improving their software by reading Luau documentaion.
In my opinion, making Luau open sourced is somewhat an equal event in 2017, when Roblox’s source code got leaked by a group of exploiters.
Some people can detect the vulnerability in the source code, and abuse it for their own good; in example, Luau compiler.
Of course I know that the source code has been checked multiple times, but what if something’s actually wrong?
In example, 3dsboy. A person who made Synapse(exploit for roblox) *probably* knows about the leak, and using the open-sourced Luau, Synapse will get much more things in the future.
What I’m saying is, that I’m not sure about making Luau open sourced was a good decision.
If I am wrong, please correct me.