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.
I'd love to have type annotations in Lua.
But this doesn't compile to Lua, right?
I found Teal, which seems to Lua what TypeScript is to JavaScript
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.
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.
The more options like this, the better. Especially for existing ecosystems.
More specifically, I know that Roblox uses lua(u) but I assumed this was all for scripting. React is a tool for building UI.
How do you use React inside Roblox? You can build UI? I'm trying to wrap my head around my clearly mistaken assumption that what was possible in Roblox was writing lua-ish scripts that handle events in Roblox and then alter the game flow. That's very different from a full UI element that manages state and presentation, which is why React was so exciting (ten years ago).
[1]: https://devforum.roblox.com/t/how-to-react-roblox/2964543
Roblox is a game engine, like unity or unreal or godot, that produces games which run within their proprietary platform. But you still have to code the games from an empty starting point.
React is a tool for writing 3D scenes that can handle state updates: https://github.com/pmndrs/react-three-fiber
React is a tool for writing music that can handle state updates: https://github.com/FormidableLabs/react-music
React is a tool for writing infrastructure-as-code templates that… um… could with some additional work handle state updates: https://www.linkedin.com/pulse/aws-terraform-generator-using...
The declarative part is that the UI is recomputed from the state sorta-ex-novo at each update
https://www.tiktok.com/@user2571420815968/video/720501112959...
But both the JavaScript and Lua versions of React are full of high fructose corn syrup, anyway.
https://www.youtube.com/watch?v=H_zsZMn5Efk
I'd prefer a low-calorie high-performance port of Svelte to Lua.
And that one supports writing pretty much actual React tsx but with Roblox primitives.
One of my clients asked me to make a Roblox plugin, it was my first time, and I was very pleasantly surprised with this workflow. There are also tools to enable really high iteration speed. It felt nicer than Unity at some moments. I didn't really need to write or know any Lua at all!
> When possible, upstream flowtype and definitely-typed types have been translated into Luau type annotations.
> This repository is a fork of roblox/react-lua with the intention of being the Roblox and global Lua community go-to for React in Lua. Roblox's repository is a read-only mirror of their internal project, and as such cannot be contributed to by the community.
https://en.m.wikipedia.org/wiki/Real_Programmers_Don't_Use_P...
Which is itself a reference to:
https://en.m.wikipedia.org/wiki/Real_Men_Don%27t_Eat_Quiche
It’s all tongue-in-cheek references to stereotypes around what would now be called toxic masculinity/gatekeeping.
Of the Fortran programmers (real, manly programmers in this story) it says:
> Besides, the determined Real Programmer can write FORTRAN programs in any language.
In this vein there’s also the story of Mel the Programmer, a “Real Programmer” who would never stoop so low as to use so abstract a programming language as FORTRAN. Funny how perspectives change over time.
The reason you experience it as terrible is because it's today's visual basic: it's so easy to start with that everyone does, without needing to understand programming or specifically how React works. You can just throw shit together and it'll work. It's empowered an entire generation of web and app makers, with the cost being "and they're not good at that, through no fault of their own, but they are just good enough to be dangerous".