[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Is Lua any good?

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 29
Thread images: 4

File: lua.gif (5KB, 256x255px) Image search: [Google]
lua.gif
5KB, 256x255px
Is Lua any good?
>>
>>58749574
>Is X good?
If you have to ask...
>>
Yes.
>>
It's literally the best scripting language.

> Small
> Clean
> Fast
> LuaJIT is god-tier.
>>
>>58750139
>It's literally the best scripting language.
Now, now. That would be Python.

It takes more than a good JIT compiler to make a garbage language usable.
>>
>>58749574

Is the best side language to use for C interop
>>
>>58750139
>Clean

while the Lua syntax might be clean, the source code for the JIT compiler is like spaghetti that went through a blender
>>
I like it. The "everything is a table" design is neat.
>>
roblox virus tier shit
>>
>>58749574
yeah, lua is fun. there are some minor annoyances, like that fact that it's missing some keyword that basically every language has (forgot which one).
>>
File: 0EOfA50M.jpg (272KB, 900x600px) Image search: [Google]
0EOfA50M.jpg
272KB, 900x600px
>array index starts at 1
>>
>>58750630
switch?
>>
>>58750636
I'm conflicted on this. Indexing that starts at one feels more natural, but I've been conditioned to start at zero by practically every other language.
>>
>>58750636
The correct way.
I like the way Ada does it. Array indicies can start wherever the fuck you want. Whatever makes sense for your situation.
>>
>>58750439
>Python

Personally I prefer Ruby. But hey, to each their own. Wouldn't want to start an internet argument over something so small, haha.
>>
>>58750636
>>58750662
>0 indexed arrays that aren't null terminated
Fucking posers you are.
>>
>>58750662
that's because most programming languages treat the index as an offset from the first element. when Lua has the first index at 1 it feels like you're skipping the first one
>>
>>58749574
no
Just use C
It's the only language you will ever need
>>
>>58750675
What did you say, you little punk-ass little bitch? Don't you fucking dare compare Python to the fuckery that is Ruby ever again.
>>
I want to try Lua to STM32 and what to instal except geytoo to run board?
I dont get all those benches and frameworks.
>>
>>58750630
The major thing I miss is operators like += -=. I did some programming in Icon which completely spoiled me. Assignment in Icon is done with := and every single other infix operator can go before that like
a <:= b
which means
a := a < b
*.
That's an odd example but you get the idea. If I ever do manage to design a real language and not just some joke esoteric thing, it's going to take heavy cues from Icon.

*in icon
a < b
'produces' b if that expression is true and fails (not entirely unlike exceptions) if the expression is false so that assigns b to a if a < b and fails otherwise)

>>58750661
On the subject of switch statments, this is a good read https://eev . ee/blog/2016/09/18/the-curious-case-of-the-switch-statement/ (fucking spam filter, sorry)
I do not like switch statements personally. I think they are bad from a design perspective because they have a weird unique syntax that only works inside a special block. Languages should strive to have consistent rules throughout imo.
>>
how does lua manage memory?
>>
>>58749574
Not as good as Perl.
>>
>>58751418
xD
>>
>>58750496
You're just not on Mike's level. He's been doing this shit for a while (I guess he's in his early 40s, he programmed the fastest floppy drive reader of his time when he was 16).
>>
>>58751056
Primitive non-tables are kept on the stack (Lua's concept of a stack, not the C stack), and are freed when the function returns (unless there are upvalues). Tables and userdata are garbage collected, and you can write a function to trigger on the objects destruction.
>>
For making Roblox games.
>>
File: 1481555270137.jpg (221KB, 766x1024px) Image search: [Google]
1481555270137.jpg
221KB, 766x1024px
I dont know, its an interesting language but I always feel like im using it wrong. Its also used almost exclusively as a embedded language. Overall I would say its a good language that fills it niche well.
>>
>>58751506
Have you taken a look at the source? While I agree it's very efficient it seriously looks like it went through an obfuscator.
Thread posts: 29
Thread images: 4


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.