[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
What are your thoughts on Lua? I find it really fun to program
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 26
Thread images: 4
File: lua.gif (5 KB, 256x255) Image search: [Google]
lua.gif
5 KB, 256x255
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 (51 KB, 814x500) Image search: [Google]
no-country-for-old-men-4.jpg
51 KB, 814x500
>>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 (415 KB, 496x349) Image search: [Google]
1454634012630.png
415 KB, 496x349
>>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 (99 KB, 540x543) Image search: [Google]
1455404581279.png
99 KB, 540x543
>>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 replies: 26
Thread images: 4

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

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.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.