[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
Why would you not use lua for general userland applications?
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: 40
Thread images: 8
File: images.png (5 KB, 256x255) Image search: [Google]
images.png
5 KB, 256x255
Why would you not use lua for general userland applications?
Integrantes well with C, luajit is rock solid and fast, llvm-lua is nice.
Luarocks, tables are awesome, easy to learn, and much more.
If more complex things are needed you can also use things like moon script that makes life easier.
>>
Same reason I dont always bang ur mom when I need to bust a nut.

Its the easiest solution, but not always the best
>>
>>54590522
dayum
>>
File: gopherswim.jpg (155 KB, 1143x1152) Image search: [Google]
gopherswim.jpg
155 KB, 1143x1152
Why would you not use golang for general userland applications?
Integrates well with C, go build is rock solid and fast, llgo is nice.
Go rocks, goroutines are awesome, easy to learn, and much more.
>>
>>54590522
Well, it is fast and flexible, it's better than c++ IMHO
>>
>>54590570
Lua is more practical, in overall the performance + ease of use is better.
Go is like C, types in lua makes userland just easier.
>>
>>54590675
I just tried to build a simple ls clone in both, so I could measure their execution time.

Turns out, plain Lua doesn't even have a function to get a directory listing.

For those wondering, the Go implementation takes about the same time as the GNU ls (~0.003s), but is 1.5MB.
>>
>>54590522
Fucking rekt.
>>
File: 1463200840508.jpg (27 KB, 508x524) Image search: [Google]
1463200840508.jpg
27 KB, 508x524
>>54590501
Fuck you OP for baiting me into learning yet another language

I must know about 20 languages by now without a single noteworthy project done in any of them
>>
File: 1461734091047.png (176 KB, 393x445) Image search: [Google]
1461734091047.png
176 KB, 393x445
>>54590609
>better than C++ IMHO
Nobody gives a fuck about your "IMHO".
In what objective and quantifiable way is it better than C++?
Got nothing? THEN SHUT YOUR FUCKING MOUTH.

Nobody gives a FUCK about your subjective opinions. If you don't have something of value to others then shut the fuck up. Saying "IMHO" is wasting everyone's time you pussy little shit. If you're going to stand for something then own it like a man instead of hiding behind your bullshit notion that your subjective opinion should be heard-- it shouldn't!
>>
>>54591152
Jesus. Just pick one and do something.
>>
>>54590501
You know, it's really sexy, but I don't see why you don't just use JavaScript instead.
>>
>>54590501
Is there any reason to use vanilla Lua over LuaJIT?
>>
>>54591198
pretty good post IMHO
>>
Dynamic typing is probably the worst idea anybody has ever had.
>>
>>54590501
>integrantes
whoops, spic detected
>>
File: cplusplus-logo-285x300.jpg (12 KB, 285x300) Image search: [Google]
cplusplus-logo-285x300.jpg
12 KB, 285x300
Why would you not use C++ for general userland applications?
Integrantes well with C, classes are rock solid and fast, GCC and Clang are nice.
C++ rocks, templates are awesome, easy to learn, and much more.
If more complex things are needed you can also use things like Boost that makes life easier.
>>
Why would you not use Lisp for general userland applications?
Integrantes well with C, many compilers which are rock solid and fast.
Macros are awesome, easy to learn, and much more.
If more complex things are needed you can also add more macros that makes life easier.
>>
>>54590501
Because it was designed to be embedded for small scripts, with a nearly non-existing std lib.
Just like JS, but slightly less shitty.

Most statically typed, compiled to binary languages beat LuaJIT and V8 to crap and still manage to have a better std lib.

TL;DR: >>54590522
>>
>>54591198
>In what objective and quantifiable way is it better than C++?

Source code size & development time of software with equivalent functionality. Lua code is 2-4x more concise than C++.

If you don't value your time you are a codemonkey.
>>
>>54590923
Ha, I wrote ls in node and put it in a dockerised container on the cloud
>>
>>54591198
>In what objective and quantifiable way is it better than C++?
It doesn't try to be "C" plus plus.

I'd take C/LUA over C++ any day.
>>
>>54590501
Tcl is so much better than Lua
>>
>>54590501
> dynamic typing
It's like you want to make slow bug ridden disasters.

LuaJIT is also basically abandoned since Mike Pall stopped working on it and the mainline implementation isn't actually that much faster than every other shitty dynamically typed scripting language.
>>
>>54593545
Nobody is really working on LuaJIT anymore and it already doesn't support some feature of Lua 5.3.
>>
>>54593734
Loose/weak typing is the worst idea anyone ever had. Dynamic typing is second to that.
>>
>>54591198
Cool your autism dude. You don't provide any info on why c++ is better. You're just as bad.
>>
Because Python, that's why.
>>
>>54593545
Aside from what the other dudes mentioned, there aren't really legitimate reasons for JITted embedded scripting languages.

>inb4 JS
That isn't legit.
Only thing I can think of is a scripted shooter bot and even that is borderline, since a bot has to be trusted code and therefore can be a native plugin anyway.

As a rule of thumb, if you need your scripts JIT compiled, your architecure is shitty. Like in a browser or Unity.

Also, JIT compilers can't be used on some devices.
>>
File: 1296581638760.png (33 KB, 566x557) Image search: [Google]
1296581638760.png
33 KB, 566x557
>>54590522
>>
>>54593640
sides are gone
>>
>>54596980
>It's like you want to make slow bug ridden disasters.
meme

>and the mainline implementation isn't actually that much faster than every other shitty dynamically typed scripting language.

It is easily 10-20x faster than python or perl. Luajit's performance is second only to V8.
>>
>>54597159
>Aside from what the other dudes mentioned, there aren't really legitimate reasons for JITted embedded scripting languages.

That's why nobody in AAA game industry uses LUAjit... oh wait!

Stop memeing, anon.
>>
>>54597503
A very few do this and they do it literally wrong.
And often enough, they pay for it.

Most however use the PUC-RIO implementation.

Stop memeing, anon.
>>
File: 20160517_002053.jpg (59 KB, 313x286) Image search: [Google]
20160517_002053.jpg
59 KB, 313x286
>>54590522
>>
>>54597408
>It is easily 10-20x faster than python or perl. Luajit's performance is second only to V8.
LuaJIT is not the primary (mainline) implementation and the primary implementation is not 10-20x faster than either Python or Perl for any significant workload. LuaJIT is an alternative implementation which is 10x-20x faster, but it's also not under active development and is basically abandonware since Mike Pall has no interest in working on it anymore.

>>54597503
Most game companies aren't using LuaJIT they're using the primary implementation.
>>
>>54591152
PLEASE help this project: https://sites.google.com/site/dorfl68/
>>
>>54590923
You're absolutely right, Lua's standard library is pretty sparse. The advantage is that its source tree and memory footprint are booth tiny, which may or may not matter to you depending on the application.

At any rate, an ls clone won't tell you anything about language performance, since the limiting factor there is filesystem performance. Any extra time you'd measure would just be the overhead of starting up the Lua VM and compiling the program to bytecode.
>>
File: 1299440982255.gif (2 MB, 450x258) Image search: [Google]
1299440982255.gif
2 MB, 450x258
After checking out numerous other scripting languages I found Lua pretty much came out top in terms of both speed, extendability, community, and the API. And that's not even factoring in luajit.

I just wish it didn't index arrays from 1.
>>
>>54590501
>No fuckin switch
>No increment/decrement
>Global everything
Fuck this shit.
Thread replies: 40
Thread images: 8

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.