[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]

What are your thoughts on Lua? I find it really fun to program

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: 26
Thread images: 4

File: lua.gif (5KB, 256x255px) Image search: [Google]
lua.gif
5KB, 256x255px
What are your thoughts on Lua? I find it really fun to program in, and amazingly simple to organize things. I just wish the libraries and bindings were better maintained.
>>
>>55210969
All of my Lua experience is configuring awesome wm, at least for that is not bad.
>>
It is dead simple to embed in C, which is nice

There's a lot I dislike about the language, but those may just be quirks I'll get used to
>>
I love it. I mean, I haven't made that much with it because I've been working with Python lately but it's good shit.
>>
>>55210969
I find it kinda nice, really. But for an easily embeddable scripting language, I like Python better
>>
>>55211140
This desu.
>array indicies starting at 1
>then/end
>no switch statements
>no +=, etc
And more that I can't think of right now.

Those are mostly just minor complaints, but it can get a little annoying.
>>
>>55211236
>desu
I started freaking out wondering how the fuck I typed that, then I realized it was a filter
>>
>>55211112
>>55211236
>those may just be quirks I'll get used to
>but it can get a little annoying
same here, lots of quirks. it's an okay language in my book, but there's still some shit that trips me up now and again, and i had worked with it for ~2 years. haven't done much with it lately, but from what i can remember, its standard library is pretty sparse (or "lightweight"). i'm more used to python and missed a lot of the standard functions i was used to working with

not language related, but i wish its official reference manual was easier to navigate / nicer to look at
>>
File: no-country-for-old-men-4.jpg (51KB, 814x500px) Image search: [Google]
no-country-for-old-men-4.jpg
51KB, 814x500px
>>55211160
>indentation scoping
>>
>>55211952
Not this indention meme again
>>
>>55210969
Wrote support for Lua scripting for my C project. Didn't like the stack-based API that much. But once you get used to it and make your own convenience functions it's fine. Other that fucking mysteriously appearing entries and tables. What the fuck.
The tables are fucking nice though. I like how you can index them in any way you want. Also interfacing from Lua to your own C functions is nice. Also luajit is a monster.
>>
File: 1454634012630.png (415KB, 496x349px) Image search: [Google]
1454634012630.png
415KB, 496x349px
>>55211236
>array indices starting at 1
literal cancer
>>
>>55212087
You get used to it

Not really a big deal t b h
>>
>>55210969
It is being used in Civ 5 so I consider it a meme language
>>
>>55211236
>>55212087
That was normal before C and Lisp took over computing.
>>
>>55211983
Okay, fucking have it if you insist. But why then why the :?
>>
>>55212124
A fuckton of games use it for scripting
>>
>>55212235
the colon looks comfy, that's why
>>
the only reason Lua became popular was because it was the only scripting language fast enough and embeddable to use in scripting game engines. Since then there are plenty of embeddable scripting languages that are faster and have better syntax, including the V8 javascript interpeter
>>
Lua is a pretty cool guy. I've mostly used it with LÖVE which is fucking awesome, and it's a pleasant language to use, all things considered.

On the C/C++ embedding side of things, it's easier to embed than basically every other scripting language except Tcl, but Tcl is barely worth using, so it's no surprise that Lua gets tenderly wanked off by everybody and their dog.

The whole indices starting at 1 thing was probably the biggest stumbling block for me, because I would forget about it every ten minutes like clockwork. But like so many things, once you get used to it, it's relatively painless.
>>
>>55212250
It looks retarded and does nothing.
>>
>>55212268
What does Javascript do that Lua can't do better? It has lambdas, prototypal inheritance, tables very similar to JS's objects, and less fuckups.
>>
File: 1455404581279.png (99KB, 540x543px) Image search: [Google]
1455404581279.png
99KB, 540x543px
>>55212268
Embedding V8 is a fucking shit show on par with Ruby and Python, and the worst part of it is that in the end you're left with a fucking JS interpreter.
>>
>>55212268
Fast enough, tiny compared to V8, easy API and simple extension with FFI. Its largest users now are big internet & network companies like Mail.ru, Cloudflare and Cisco.

Is there any embedded language faster than LuaJIT other than the JavaScript engines? And even then last I checked it's about half-and-half.
>>
>>55212119
I'm sure you do, but it still bothers me a little
>>
>>55211112
did nobody notice these almost quints?
Thread posts: 26
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.