[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 is /g/'s opinion on Lua?

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: 14
Thread images: 1

File: images (1).png (5KB, 204x204px) Image search: [Google]
images (1).png
5KB, 204x204px
What is /g/'s opinion on Lua?
>>
>>55569112
>index starts with 1
>global scope is default scope, needs 'local' keyword the define something locally
brazilian shit tier
>>
1 2 3 4 5 6
>>
Well designed small emeddable language.
It's great at what it was designed to do, embedding it into a larger application to provide scritability.
Using it for, say, webdev stuff, is retarded.
And LuaJIT is hella fast.

But as this is /g/ all people will complain about 1 based indexing.

>>55569129
>global scope is default scope, needs 'local' keyword the define something locally embedded
That's shit for a big application. For rather small independent scripts controlling a bigger application, this is fine.
>>
It was my first language, but I’m not a huge fan.

But one based indexing is one thing it does right

Why one-based is better in languages without pointers:
>The first element of the array shouldn’t have a key of '0' for the same reason ‘first’ isn’t abbreviated 0st. Same for other ordinals, it’s only logical.
>Arrays should have their length be a valid key; i.e., arr[arr.length] being undefined is retarded
>Closed intervals are more intuitive.

Lua Warts:
>Verbose
>Minimal standard library and types (maybe good, definitely good for footprint)
>Arrays and hash tables are the same thing
>Obtuse operators like ~=
>Fractured ecosystem and smaller user base has lead to four ubiquitous versions (Lua 5.1, 5.2, 5.3, and LuaJIT) that are incompatible. Bitwise functions are done differently on each, for example, except 5.1 has no first party solution.
>
{(function() return 1, 2 end)(), (function() return 3, 4 end)()} == {1, 3, 4} 
except not really because table (array) contents can’t be compared without doing a manual element by element comparison, but they have the same contents
>>
>>55569112

Pretty neat langauge for scripting such things.
Don't know if it's any good for bigger projects.

>>55569451

>Arrays and hash tables are the same thing

I think this is pretty nice.


>Obtuse operators like ~=

I agree, it's not good that Lua uses "~=" for "not equal".

Especiall since many langauges use "=~" for RegEx searching, this is confusing.
>>
All I know about Lua is limited to making things in Roblox.

So I guess it's good, it's the only language I know, can't complain about it.
>>
>>55569240
>>55569451
>>55569693
/thread
>>
>>55569240
Why is using it for WebDav stupid?

What if u want to write an insanely fast web server as a frontend to ur redis cache
>>
>>55569112
It's insanely fast - makes it useful as a way of chaining machine learning pipelines running on gpu or cpu
>>
>>55569693
>>55569451
I was going to point out that "~" is a logical operator for "not", hence ~=, but then I noticed that wikipedia lists "!" for "not" as well. When did this become a thing?

https://en.wikipedia.org/wiki/List_of_logic_symbols
>>
>>55569112
Plus in the Lua you mean?
>>
>>55571026

I don't know, but most langauges use != or <> for "not equal".
>>
>Uses "then" for branching
It's weird.
Thread posts: 14
Thread images: 1


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