Roblox actually did this a long time ago. It's mainly used to write ui code in their engine. Afaik they aren't actually using lua for their website? Also, fun fact, their fork of lua (called luau) has a type system and some other goodies such as compound assignment and continue statements in loops. It does this while still staying simple. Best part is that it's open source and you can use it freely (although their c API documentation is lacking). I haven't wanted to go back to vanilla lua since.
@BiffBish5 ай бұрын
Luau is great, I’ve written tools for Unreal Engine that help integrate gameplay elements into lua for easier user generated content, their type system is more then enough for 99% of use cases
@v0xl4 ай бұрын
the only reason I'm still not using luau in my stuff is that it lacks jit
@mxruben814 ай бұрын
@@v0xl it actually does have something like jit that they're calling native codegen. From my tests, its performance lands about in the middle between lua and luajit. It does especially good if there is a lot of math involved. The native codegen feature is still pretty new though and they've just started using type info for optimizations so I imagine it'll get a lot faster.
@Hyllested_4 ай бұрын
Additionally, Luau has backwards compatibility with Lua! So any program that the Lua interpreter can run, the Luau interpreter will also run.
@hedwig7s4 ай бұрын
@@Hyllested_ * Specifically Lua 5.1
@aarond3095 ай бұрын
Lua’s length operator is actually even *more special* than you think. #tbl returns the length of the table *only* when the table is a “sequence” (ie contains sequential keys only). If any keys are non-sequential (think nils or strings), the result of #tbl is undefined and up to implementations.
@marcusly34975 ай бұрын
Not undefined. It only counts things in the array portion. It uses a binary search, that is why it messes up at non sequential indices
@aarond3095 ай бұрын
@@marcusly3497 Apparently this has been better defined since older lua versions; but according to the lua 5.4 Reference Manual Section 3.4.7 (I'd put a link, but KZbin): "The length operator applied on a table returns a border in that table... a border is any positive integer index present in the table that is followed by an absent index, plus two limit cases: zero, when index 1 is absent; and the maximum value for an integer, when that index is present. Note that keys that are not positive integers do not interfere with borders... When t is not a sequence, #t can return any of its borders. (The exact one depends on details of the internal representation of the table, which in turn can depend on how the table was populated and the memory addresses of its non-numeric keys.)" So, while non-integer keys no longer produce undefined results, when your table has a hole, any one of the values followed by nil are legally allowed to be returned by the length operator. The "array section" and "hash section" are implementation details and are *not* present in the specification.
@isodoubIet5 ай бұрын
This has to be the worst single feature I've ever seen in any non-joke language
@RedstonekPL4 ай бұрын
man i thought i wrote this comment
@sas4084 ай бұрын
Yes, but still you can implement something like table.Count and also it got metatables to customize lua whatever you want. The goal of lua is to provide you some basement under few kilobytes of code
@RenderingUser5 ай бұрын
man, if only roblox didnt permaban linux as a platform
@realskyquest5 ай бұрын
I feel you bro, the current option is to use waydroid the gapps ofc to not suffer from binary types. But still pc specific games are blocked
@jaydeep-p5 ай бұрын
Who is playing roblox on Linux?
@realskyquest5 ай бұрын
@jaydeep-p not sure, there are some people on reddit talking about this. But I don't play on linux
@RenderingUser5 ай бұрын
@@jaydeep-p I used to play occasionally
@trustytrojan4 ай бұрын
used to play but once i stopped getting away from gaming entirely, i have no urge to boot windows to play roblox. i wont play it until someone gets the 2016 client source to compile on linux
@berkormanli4 ай бұрын
As a part-time fun based Lua developer, there is a beautiful thing in Lua called Metatable and Metamethods. Since Lua lacks classes, these two can mimic some of object oriented behavior. You can easily change a table's behavior by using those metamethods. If you want to create an Array class, you would change the _newindex metamethod (this will be called when there is an assignment, _index will be called when there is an access.) to count its length and also set it with rawset() method. You can also change the behavior of the length operator (#). Using Lua made me furious because it lacks so many things like data structures and some algorithms/functionality you would consider a standard but later on after spending some time trying to implement things, this made me actually realize how much someone can forget the basics because using a library is a lot easier. It is a crazy small and core language that can be a lot more by using what it provides.
@triducal4 ай бұрын
as a roblox dev react-lua is extremely useful for creating declaritive ui functionality and makes it alot easier to put together large projects.
@ARandomUserOfThisWorld4 ай бұрын
Not _necessary_ but very much appreciated + it’s a nice QOL + if you have a big project, it’s going to be so much easier
@griffitaj5 ай бұрын
You can learn Lua in less than a day. It has the bare minimal set of semantics needed for a language. One collection type, tables. Strings as atoms (think Erlang), so they are blazingly fast to compare.
@georgerogers11665 ай бұрын
Would be even better if they had both Strings and Symbols.
@amargasaurus53375 ай бұрын
do remember to remember what things are references and which are values and ints silently floatify if you're not careful those got my noob bottoms in trouble a few times, but it does pack a lot of power in little syntax!
@bullpup13375 ай бұрын
sorry, but after reading the lua book for 5.3, I have to say it will take me much longer to become proficient in lua. Its not quite as simple as it seems.
@griffitaj5 ай бұрын
@@bullpup1337 For proficiency with just using lua you only need Chapter 3 of the book + reference for any libraries you are using. I agree that if you want to write lua modules in c it does take some time as each version of the lua API has its own subtleties.
@bullpup13375 ай бұрын
@@griffitaj We might be talking about a different book, I mean programming in lua by the inventor (ierusalimschy). Just finished chapter 18 on generators and iterators, and I have not even gotten to coroutines yet. There is a lot more than I thought to the language.
@bharatsnair5 ай бұрын
Redis has embedded Lua, which lets you write Lua scripts that are atomic. Fun language to work with.
@harleyspeedthrust40135 ай бұрын
ive seen this in some of our production code at work but I've never had to work with it. lua really is a great embedded scripting language.
@fcktyshawn4 ай бұрын
i recommend everyone learn roblox lua. the best introduction to programming for kids. i started with roblox lua in 6th grade and now i'm a 22 computer technician and hobbyist programmer.
@honkhonk80094 ай бұрын
lol same here. I learnt C to fuck around with arduinos back in grade 5 but i thought lua was really similar just cus i would be using C as a glorified scripting language anyways. Highkey lua is underrated asf. Its so much nicer to use than python and javascript. Im surprised its not used more
@incription4 ай бұрын
ccrazy because i went from computer technition to roblox dev at 22
@itsyaboivoid4 ай бұрын
@@honkhonk8009It's not used as much because Lua is used more in game development
@omri93255 ай бұрын
You better hope the cricket won't DMCA this video, he seems determined.
@JanJozefo5 ай бұрын
Who?
@frost543115 ай бұрын
@@JanJozefo put headphones on, and you'll hear a cricket sound in the background
@JanJozefo5 ай бұрын
@@frost54311 lmao I hear it now. I always listen to these on my phone's speakers
@MatiasKiviniemi5 ай бұрын
Great thing about Lua is that there's zero time wasted on architectual formalities, you just start coding. And since there's really no bad ways of solving something, results are never too horrible. Good developers make great code (as always), average coders make ok code and even bad ones make better code than in more complex environments with more options to screw yourself. I've done multiple-inheritance OO in lua, had every game object contained a Components-table where you could inject any game feature. Game loop iterated through those and class methods just had object as first param.
@Nadi_Games5 ай бұрын
I've been using lua for almost 20 years: World of Warcraft addons , it's lua 😉 Iirc, it was the 1st time I used it. And Prime is right, lua is a fantastic language. Even the name is cool, and poetic. Lua is not an acronym, it just means moon in portuguese. 🌔
@johnathanrhoades77515 ай бұрын
I’m currently reading the “Programming in Lua” book. It’s interesting for sure. Looking at it for writing a neovim plugin.
@lolgreek1235 ай бұрын
It is used to make GUI for Roblox games
@jboss10735 ай бұрын
WHY NOT TCL? IT IS A THOUSAND BILLION TIMES EASIER!
@criptych5 ай бұрын
@@jboss1073 That was sarcasm, right? … Right?
@stefanalecu95325 ай бұрын
@@jboss1073 as much as I love Tcl and I use it for everything that requires quick GUIs and scripts... The team *really* has to get a better theme for Unix. And a lot of tooling to at least try and convince people to give it a shot. It is a great language buried in obscurity (unless you work in EDA or use Expect or Tkinter) Sidenote: it should be possible to straight up port Tk to the web (after all, we can use Emscripten and have the entire language run in the browser, which is lightweight enough to be viable)
@fueledbycoffee5835 ай бұрын
actually all game logic is written in lua. Both UI and and game logic
@mikec28454 ай бұрын
yeah the entire game is written in lua, not just ui
@justin49115 ай бұрын
The funny part about Prime's "don't use a DSL, use Lua" is that Roberto Ierusalimschy, the BDFL of Lua, teaches a MOOC focused on creating small languages using Lua.
@lwinklly4 ай бұрын
Wasn't the whole idea of Lua based on a DSL called Sol as well?
@inconnn4 ай бұрын
lua on roblox is how i got into programming in the first place, so i have a soft-spot in my heart for lua
@dareisaysneed5 ай бұрын
you should implement preemptive coroutines/goroutines in vanilla lua with the debug library
@EdmondDantèsDE5 ай бұрын
cursed title
@thingsiplay5 ай бұрын
i read that as cursed titties
@felipheallef5 ай бұрын
Brazil mentioned!
@Tony-dp1rl5 ай бұрын
There are some incredibly profitable services written entirely in LUA. I am not experienced with it, but I know some companies make a lot of money using it.
@iddiiddrisu59715 ай бұрын
OMG!!! My embedded systems just got a new frontend. React-lua!!! Let's go!!!
@Rugg-qk4pl5 ай бұрын
HTML/CSS based UI is so much better than the UI libraries most games engines have built in. So awesome
@XxZeldaxXXxLinkxX5 ай бұрын
It should be a universal standard at this point. Every other ui system just feels so clunky
@devcomptrickshots41365 ай бұрын
This is a bit misinformed. First off, Roblox uses luau (not lua), luau is a typed and much more performant lua alternative. The codebases were old, and before GitHub support luau syntax highlighting, and hence they're marked as lua. Secondly, Roblox's frontend is *not* written in luau, these libraries are equivalents to JS libraries for writing games on their platform. The only bit of frontend which uses this is their desktop app (LuaApp). EDIT: I noticed some people ask about typed arrays, and doc comments and a standard library; the luau community has made things for this. Typed arrays are built into luau types, doc comments are powered by moonwave (it's similar to rustdoc, it generates a doc site from comments for you) and lune is a runtime which implements a complete, lightweight, and fast standard library for it.
@lwinklly5 ай бұрын
holy crack, new dev comp wisdom just dropped
@devcomptrickshots41364 ай бұрын
@@lwinklly hi
@ardwetha5 ай бұрын
If you are annoyed by 1 base indexing just make a function which adds one.
@aaravsethi60704 ай бұрын
Roblox has a lot of compilers, they own a JS & TS compiler for porting existing libraries (Polyfill), one employee made a compiler for TS for making games. Btw Roblox used to have React which has existed for multiple years, their React-lua is only for employees coming from Meta that got used everywhere.
@brssnkl5 ай бұрын
You can expose native functions to js via JavaScript Interface on both iOS and Android. I think even react native is doing that after so many years. You can do updatable js in iOS/Android in a day as well.
@SamWhitlock5 ай бұрын
I've always used Lua as the "embedded scripting language" to coordinate the logic in most of my projects. I have an IRC server that basically does all of the logic in Lua (and it just wires up the message handler pipelines and then calls Lua from C++). I've also used it in a network controller to essentially do a corporate version of Tailscale. Extremely easy to embed (Sol3 is great in C++, though it's getting to be borderline abandonware).
@apexfossa5 ай бұрын
Lua is fun, can make cool scripts with it in roblox
@LiveErrors5 ай бұрын
Shout-out to EmmyLua btw If I'm not mistaken they are the ones who innovated the type checking lsp functionality that SumNeko uses Might be wrong
@palmberry55765 ай бұрын
They are the one that made the annotations, but I think the type system is being completely rewritten (and still probably will be too weak to document the cc tweaked api lol)
@ismichiАй бұрын
i chose lua to be my first language as i finally return to learning this stuff pretty much 'cause it's so simplistic lol
@henningerhenningstone6914 ай бұрын
Lua is so embeddable that it has risen to the proverbial Doom in "can it run Doom" of programming languages. If there is anything that I can reasonably embed Lua in, I will :D
@zoltannyikos70395 ай бұрын
You can also embed Ruby either the whole regular version or mruby which is a smaller, easier to use version specifically built for this embedding usecase.
@maxbd26184 ай бұрын
The length operator is changed in later versions, but all the cool kids use 5.1 ig
@DanktownBunny5 ай бұрын
To bypass the #a problem, Garry's Mod gLua has table.Count(a) that iterates over the table to get the correct amount. My favorite part of lua is the fact that all tables are basically dictionaries, you can shove any data you want into them. Even a function could be a key!
@hallo70535 ай бұрын
idk that is not really a bypass, you can just use a for loop instead, but in the end imo it does not really matter anyway. I don't think I have ever used mixed dictionary and array in lua
@palmberry55765 ай бұрын
@@hallo7053yeah, the most mixing I have ever done would maybe be string | table or false | something
@jonatasbaldan5 ай бұрын
Is Lua itself getting updates? The interpreter shows "1994~2012".
@GerardLementec5 ай бұрын
it is but in all honesty lua 5.1 or luajit are enough and is what is usually used in most projects
@arson53045 ай бұрын
roblox forked their own version of lua and is updating that, it's called luau
@_garicas5 ай бұрын
Lua 5.1 was (and still is) the most popular version due all its features and still being really simple, also when LuaJIT was developed, it was based on Lua 5.1 and still is. There's Lua 5.4.6 which release data was 2023-05-02 (in the official Lua website), but people use version 5.1 a lot also to not break compatibility in some cases
@boblol14655 ай бұрын
lua5.4 exists but lua5.1 and luajit are the most popular versions luajit is based off lua5.1 and includes minor improvements from versions in the future
@Shaar_5 ай бұрын
use luajit it's the better version for me
@Bloky.5 ай бұрын
QuickJS is just as easy to embed as Lua. Although when you start toying with async you will need an event loop
@hri75665 ай бұрын
i forced roblox-ts to write code for computercraft instead, it's fairly annoying to work with, but it's better than bare untyped lua
@askplays5 ай бұрын
thats really cool
@RT-.5 ай бұрын
You could write it with types with Luau and use darklua to remove those types
@Hellscaped4 ай бұрын
hello fellow switchcraft player
@bruhrain4 ай бұрын
I really love Lua, I normally work in C/C++ and use Luau or Lua 5.4 for my projects that require embedded languages like Lua to add extra functionality and provide my application with various custom api's which you can add in yourself by using the c api e.g. lua_pushcfunction - pushes a c function with the type int func(lua_State*, ...); Anyways, I really think that its cool that Roblox has done this but I'm pretty sure its not for use in the web however for more use in their Game engine for GUIs, correct me if im wrong though.
@LoFiAxolotl5 ай бұрын
it's hard to find any video game that doesn't have some cursed Lua in there... so good for Roblox for porting it... will be interesting to see in 10 years where all this Roblox stuff lead the then old enough programmers
@harleyspeedthrust40135 ай бұрын
roblox has always had some flavor of lua powering their games. roblox has also been around for at least ten years, maybe 15 (I couldn't be bothered to check). so i bet that many of the kids who cut their teeth writing games and scripts for roblox 10 years ago are working in software today
@dytra_io5 ай бұрын
I think all js developers should learn lua
@MichaelArinze-c4u4 ай бұрын
Lua can be literally embeded into any place its crazy. I literally wrote code on a minecraft robot in a mod
@honkhonk80094 ай бұрын
Yea seriously why isnt lua used more. I wish lua replaced python
@MichaelArinze-c4u4 ай бұрын
@@honkhonk8009 Lua has its range of problems I can't even lie It was my first language i learned and I barely use it anymore to this day
@RobertoRenovato5 ай бұрын
The best part of learning Lua is to make Pico-8 games. 😁
@SaveThyPlanet5 ай бұрын
I had pointed this problem how lua handles length in a PR to harpoon README fix.
@petrusboniatus5 ай бұрын
You can also embed scheme, with a similar size of Lua.
@MarcelRobitaille5 ай бұрын
micropython is definitely still a thing but I've only ever heard about it in the context of microcontrollers.
Both repos' github stars have doubled/tripled *already*, I don't know what arc this is starting but the part of my brain that has been interested in react-lua since 2021 couldn't be more hyped
@BenDol904 ай бұрын
That's why I love Nelua
@krumbergify5 ай бұрын
I hate that just like in QBasic any mispelled variables get a default value, nil. Instead of crashing and showing me the bug early the program continous and causes strange side effects :(. However I like Lua:s coroutines and how easy it is to embed it .
@St3amPunk5 ай бұрын
Yo dog, i heard you like Integrated development environments, so we downloaded an integrated development environment to program an integrated development environment so you can program an integrated development environment with my integrated development environment.
@palharez4 ай бұрын
Thanks for Brazil Mentioned in the end!
@ajnart_5 ай бұрын
Someone should make a course to teach programming in Roblox where you have to solve problems using code in the game. Would make an excellent class
@mikec28454 ай бұрын
there's a Roblox game that does this, called lua learner or something. made by top developers on the platform
@glockcodes4 ай бұрын
this is crazy work chat
@_Khrix5 ай бұрын
Lua mentioned let's go Vai Brasil
@ryan_the_dev5 ай бұрын
Typescript for lua incoming.
@jembulkezmaslem52145 ай бұрын
Well actually it already happened since roblox uses their own modified version of lua called luau. It has types. Can't escape typescript lol.
@zzhabib15 ай бұрын
Already exists, roblox-ts is a TypeScript to lua compiler
@RT-.5 ай бұрын
@@zzhabib1 Yep and it's used in production by some very big games
@hallo70535 ай бұрын
yeah but luau is different, they control the full stack unlike ts which is just a transpiler to javascript
@MagnumCarta5 ай бұрын
Thank God they didn't make Angular in Lua. If they did, that'd be a big "Oof"!
@corvoworldbuilding5 ай бұрын
LUA MENTIONED LET'S GOOOOOOOO!!!!!!
@thingsiplay5 ай бұрын
GO MENTIONED LET'S RUST
@randerins5 ай бұрын
@@thingsiplaywhat
@thingsiplay5 ай бұрын
@@randerins yes
@Kitsune_Dev4 ай бұрын
I can’t get a job with 8 years of Lua experience
@Sommyie5 ай бұрын
2:06 Well that don't make no sense, partner.
@KvapuJanjalia5 ай бұрын
You forgot to mention that Roblox created their own dialect of Lua, named "Luau".
@thingsiplay5 ай бұрын
6:50 How is Luas error handling different from Pythons Try..Catch?
@SilentFire085 ай бұрын
because you didnt have to use try catch :)
@tranquangthang88975 ай бұрын
pcall?
@isodoubIet5 ай бұрын
@@tranquangthang8897 trivial to implement
@isodoubIet5 ай бұрын
@@tranquangthang8897 trivial to implement that in py
@isodoubIet5 ай бұрын
very easy to implement pcall in py
@abliez23 күн бұрын
roblox's luau fixes the thing with nil in a table
@alminecrafteano4 ай бұрын
We LOVE lua
@KashTheKingYT4 ай бұрын
Roblox has had Roact for a long time actually
@sczoot62855 ай бұрын
It's not a "1 based indexing" difference it's indexing based off of an index rather than an offset
@isodoubIet5 ай бұрын
Stop repeating TJ's nonsense. An "index" doesn't start at 1. An index, in sane programming languages, starts at zero. The difference is not between "indexing" and "subscripting", because those are the exact same thing; the difference is between "indexing" and "counting". Tl;dr it _is_ 1-based indexing.
@joeljohansson60975 ай бұрын
nothing preventing you from making a my_better_table module/abstraction in lua... i made my own switch and class "keywords" to get rid of all metatable handling for example
@sczoot62855 ай бұрын
I had to write a PlayDate game in lua and had a great time towards the end
@LaughingOrange5 ай бұрын
Came to laugh at Roblox doing something stupid, ended up changing my mind on Lua as a language.
I haven't watched the video yet, but that's a banger of a title.
@Frostbytedigital5 ай бұрын
Shoulda picked solid
@dealloc5 ай бұрын
5:30 or you can embed a Lisp. But Lua is probably your best bet.
@mrchickenrocket14 ай бұрын
What do you think of luau?
@Gennys5 ай бұрын
Prime the first question you asked you just completely sidestep the answer and just started talking about Lua instead of the first question you asked which was how good is JS to Lua as a transliteration step.
@UNNIETKTJ4 ай бұрын
So thats why the script doc/api is soo slow to load in my brownser
@petermen99145 ай бұрын
What about C/C++ or Arduino for embedded systems? The are really popular. Just asking, probably I didn't get sth important here |^
@UnidimensionalPropheticCatgirl4 ай бұрын
Embedded scripting is what he is talking about, what you are talking about is embedded devices, those are like 99% done in C, occasionally some Ada or C++. Also arduino isn’t a language but a brand of MCUs, they use C with wiring HAL.
@Max-wk7cg5 ай бұрын
You also get to create World of Wacraft addons if you learn lua :)
@Vitis-n2v5 ай бұрын
So lua has quantum state it's both an array and a map
@dipereira01235 ай бұрын
BRAZIL MENTIONED!! LETS GO!!🇧🇷🇧🇷
@doriphorАй бұрын
Can we replace JS with Lua everywhere?
@eduardoADSL5 ай бұрын
Lua and "go horse", two Brazilian contemporary inventions.
@randerins5 ай бұрын
....CAVALO.
@sasuke29105 ай бұрын
A lot of justifying of Lua, but that's doesn't really strike me as the shocking thing about this. I guess Prime assumes that React on the Roblox frontend is a given.
@jake-gs2gd5 ай бұрын
It’s for the game engine and making game guis. Not for the site
@aDaily12225 ай бұрын
What does "embedded systems" really mean? lol every one has a diff answer, i would like to know @ThePrimeTime 's definition
@bennythetiger60525 ай бұрын
I think any system that is specific to a device that is not considered a general purpose computer could be called embedded
@mage36905 ай бұрын
@@bennythetiger6052I think prime's answer likely includes "device [or environment]" since he sometimes uses "embedded" to mean "embedded into a videogame". But yeah -- "specific to a device that is not considered a general purpose computer" is a pretty good definition, so long as you don't use "Turing machine" as your definition for "general purpose computer".
@aDaily12225 ай бұрын
@@bennythetiger6052 i like that one.
@bennythetiger60525 ай бұрын
@mage3690 I just mean a computer that wasn't made with a highly specific intention, like TVs for streaming videos, headphones for streaming audio, smart hubs for home or car controls, etc.
@crooda36814 ай бұрын
2:15 bro it's just table, what's important with that problem 🙏
@ninjalacoon5 ай бұрын
Lua computercraft
@pxkqd5 ай бұрын
What I don't like about Lua is the split with Luajit. It's like python2 and 3. At least in javascript we know newest is better.
@LtdJorge5 ай бұрын
You mean the post Lua 5.1 stuff?
@pxkqd5 ай бұрын
@@LtdJorge yeah, there's a 5.4 but both luajit and luau which I are pretty popular are stuck in 5.1 I know you can just use any version and it's not so super different, but it still makes Lua code less portable. I haven't checked but is this react-lua and the other Roblox stuff 5.1, or Luau syntax? Can it be used in Luajit? Or in official Lua? 🤷🏻♂️
@LtdJorge5 ай бұрын
@@pxkqd I'm pretty sure the React thing is in Luau, since it's for Roblox UI.
@mxruben815 ай бұрын
@@pxkqdluau does have features from newer versions of lua, they're just really picky about what they add.
@chavin-gx6ll4 ай бұрын
is it just me or is your voice a tad bit different, if you mentioned this in another video or stream im sry i don't know lol. Well if you are under the weather I hope you feel better!
@Cahnisama5 ай бұрын
They need roact-table
@Snipe_BLOX4 ай бұрын
Why did I quote Roblox game developing for python and now web development ☠️
@ncpeaksean42785 ай бұрын
Braaaaziillll 😂
@ReedoTV5 ай бұрын
Lua sounds cool. What country is it from?
@GabrielLima-gz8zg5 ай бұрын
Brazil!!! 🇧🇷
@rockpie.iso.tar.bz24 ай бұрын
next up: QEMU ported to Lua(u)
@HowManySmall5 ай бұрын
lmfao i was the one who first found this in the roblox open source server
@lwinklly5 ай бұрын
graah why are you here
@monad_tcp5 ай бұрын
Metatables !
@kodekata4 ай бұрын
U mean php in Lua (react is bringing phpisms to js)
@rich10514143 ай бұрын
In lua, it's not 'for x in iterator', it's 'for i,x in table'
@tfiatd3 ай бұрын
…aaand how do you read a table?
@rich10514143 ай бұрын
@@tfiatd My point was that for loops in lua are kinda weird compared to most other languages.
@ShadowKestrel5 ай бұрын
i wonder how feasible it would be to have lua running natively in the browser
@osmano8075 ай бұрын
There's a browser with Lua instead of JS named Bussin Web X
@ahdog85 ай бұрын
Not exactly "native", but a WASM Lua runtime could probably be made with relative ease. I searched and it seems like someone's already working on one