9 ms·
React Lua
- pull_my_finger 2y agoI'm reading the docs and it's very unclear if this project is for Lua or Luau (the Roblox derivative).
- nine_k 2y agoLuau and Roblox.. > 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.
- pull_my_finger 2y agoI read tfa. If we sit here and quote all lines that say "Lua" we'll be in for a long list as well.. including the project NAME no less.
- Log_out_ 2y ago[flagged]
- spencerflem 2y agoThis is actually written for lua with gradual types (luau) that roblox is already using
- k4rli 2y agoThought you were talking about React initially.
- devjab 2y agoI think that was sort of their point argument. You could say the same thing about Python too. The insinuation that you can’t be serious with those languages is silly though. I mean, Instagram runs on Python and a lot of really awesome applications still run on JavaScript. So while you can do terrible things with the freedom of dynamic languages, you aren’t forced to be a maniac by them either.
- kristopolous 2y agoIt's a hard comment to parse but I think the advocacy is to set a conceptual intellectual ceiling to keep it gentle and approachable to a wide younger audience kinda like Bill Kendrick's TuxPaint.
- hollowturtle 2y agoLua is a great language, I happen to be a lot productive with it, its simplicity reminds me that of C. You don’t fight the language, you actually implement things
- dmdndkd 2y ago> You don’t fight the language, you actually implement things roflcopter. While in general one could say that about basically any language, this is RICH for Lua. You implement things... Over. And over. And over. And over. And over. And over. And over. And over. And over. And over. And over. And over. And over. And over. And over. And over. And over. And over. And over. Because every person writing Lua thinks they’re gods gift to Lua. Only their bespoke implementation of THING is correct. Often due to some pedantic definition of “performance”. The ecosystem blows chunks; Luarocks is an unfunny joke. If NIH was condensed to a language, it’d be Lua
- hollowturtle 2y agoI’m not sure why a language born to be embedded should have such an ecosystem, the C environment you embed it in is the ecosystem. For example I use it mostly with love2d for games and tools development, love2d is my ecosystem, sure I can look for libraries on GitHub, but I feel like it’s pretty much the same I would do for C header only libraries for example. LuaRocks is ok, imo still better than the gigantic mess NPM is, that’s not an ecosystem that’s a landfill
- hfjjj 2y ago[flagged]
- 1GZ0 2y ago[flagged]
- bemmu 2y agoRoblox client does as much as possible in Lua(u). It's somewhat well known that Luau is the language Roblox games are scripted in, but even before you enter a game, for the sake of portability everything is written as much as possible in Luau. Avatar selection screens, groups, settings etc. all make for a huge number of different screens, so I'm assuming they want React to better coordinate making all that GUI between the huge number of internal devs they must have. Just my guess, I've personally never used React and am not 100% on whether the Roblox app uses React-lua internally or not.
- 1GZ0 2y agoI'm just lightly poking fun. React is not something I personally like working with.
- deleted 2y ago[deleted]
- hipadev23 2y ago[flagged]
- kadkads 2y ago[dead]
- literalAardvark 2y agoReactOS has nothing to do with the ineptly named ReactJS
- yreg 2y agoWhy do you think React is named ineptly?
- wfme 2y agoBecause it is cool to hate on React on hn. Write something in Rust and watch everyone swoon, but mention anything that uses React and the comments will be filled with people hating all over it. As is the way on hn.
- lolinder 2y agoYou're right about the disproportionate hate for React, but your information about Rust is out of date. These days it's 50-50 whether you'll get a lot of love or hate for a Rust project, and several of the top-upvoted Rust posts of the past year are disenchanted ones.
- idle_zealot 2y ago> ReactOS One of these things is not like the others.
- netdevnet 2y agoReactOs only shares the name with JS library called React
- bilekas 2y agoLooking at it's parity list its missing quite a lot, that's not the issue as this seems to be a for fun project (or masochism) but at what point is it considered react? It's unclear to me.
- _xivi 2y agoSome 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)
- oDot 2y agoI wrote Vleam[0], which is the equivalent to this, but for Vue and Gleam. The more options like this, the better. Especially for existing ecosystems. [0] https://github.com/vleam/vleam https://github.com/vleam/vleam
- chadrs 2y agoI think the equivalent would be if you ported Vue to the beam, but impressive work nonetheless!
- h1fra 2y agoAnother library/documentation that commits the sin of not showing any examples
- firtoz 2y agoYou could write react in Lua for a while, for example for Roblox. And, it's very cool. There's also another project that compiles typescript to Lua: https://roblox-ts.com https://roblox-ts.com 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!
- snshn 2y agoReact has terrible performance
- TheRealPomax 2y agoPoorly written React (which is a lot of it) has terrible performance. Properly written React (just like properly written anything) has great performance. 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".
- tracker1 2y agoIt isn't even that new, in terms of approach... a LOT of game and simulation would work with state driven rendering... each frame is rendered against the current state. Similar workflows to React+Redux were in pretty broad use, the tools just brought it to web development... from there, React as a model for UI abstraction became more popular for other applications outside web use. It makes a lot of sense.
- TheRealPomax 2y agoIf you already understand the idea behind state driven updates, you're already writing better React than the majority of folks using it. React made it easy enough to write working UIs without having a clue what's actually happening, when, and why. (which is also why there's a never-ending stream of stackoverflow questions about why obvious state mutations don't immediately kick in)
- Akronymus 2y agoIn fact, afair react was made to make the page faster. (as dom manipulation was WAY slower back then)
- ajkjk 2y ago
- classified 2y agoAncient quiche eater wisdom has it that you can write Fortran in any language. In that vein, React in Lua is not too much of a surprise.
- IggleSniggle 2y agoI'm curious about what "quiche eater" means in this context. I have not run into that before.
- bee_rider 2y agoIt’s a reference to: https://en.m.wikipedia.org/wiki/Real_Programmers_Don't_Use_Pascal 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 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.
- romanhn 2y agoFascinating. Haven't heard of these despite coding for 30 years. Probably because I started with Pascal.
- bee_rider 2y agoWhen I started to learn to code, we were supposed to be dismissive of the Java wimps, but now I think it is Python that is too convenient to be cool. It’s all very silly and anyone that takes it seriously should be regarded with suspicion I think.
- 2y ago
- xrd 2y agoAs others here have mentioned, why React? 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).
- debacle 2y agoReact is a tool for managing state. The UI component is somewhat secondary.
- throwadobe 2y agoReact is one tool for managing state. Still doesn't answer why
- shadowgovt 2y agoIt's a good tool for managing state, especially state that, well, reacts to messages about changes in shared state.
- recursive 2y agoIn react's model, all state is owned by a particular component instance. Most react devs opt for a 3rd party tool for shared state. I would not say that react is good at this.
- bluefirebrand 2y agoThis hasn't really been true for a while, most React projects that I encounter nowadays don't opt for things like Redux or MobX, they just use React Contexts. Which isn't a third party thing anymore
- reactworld 2y agoReact is eating the world
- throwadobe 2y ago...like lung cancer and we keep smoking
- oopsallmagic 2y ago[dead]
- probablyfiction 2y agoI don't even like writing React in Javascript
- hk-hater420 2y agoThis is unholy and cursed
- DonHopkins 2y agoI bet they exploited child labor to develop it. https://www.youtube.com/watch?v=n6PYj93SGxc https://www.youtube.com/watch?v=n6PYj93SGxc