What does Sup Forums think of lua?

What does Sup Forums think of lua?

Excellently designed language. Probably my favorite, and definitely my goto. Most of the complaints against it are unfounded, from ignorance, or just petty..

LuaJit is actually fucking fast.

it's like if python had no standard library and you had to do even the most trivial shit by hand

>ranked lower than fucking COBOL on TIOBE
enjoy unemployment

I like it, but 1-index arrays and strings are kinda annoying.

Gmod was written mostly in lua, thats enough for me to respect the language. C++ master race though.

I'm an engineer. You think I program for a living? Hahahahaha.

These are some of the trite critiques I hear all the time. 1-based indexing isn't an issue. Use it enough and you'll think that way. Strings are that way for a very important purpose.

p good desu

And because of that, create the need of external libraries to handle UTF8 characters. Most of the time I'd wish I could store them as an array of characters just to be able to iterate through them.

Why are strings arrays of bytes?

just a fucking toy, mostly useless. If it's useful than chances are other shit is useful as well.

C compat. UTF8 capability had to be a separate library anyways because of portability issues. If you don't have UTF8 support on your platform you can configure the language to not include the library. If it was integral, that would be an issue. Stop being a commie or 15, it won't be an issue. Also, UTF8 support is supposed to be a focus of the soon upcoming 5.4 release. Haven't been keeping up with the mailing list, so I'm not entirely sure about that status. They are also adding a dedicated sequence type that isn't the vararg list, so that's nice.

It has a very important niche, of which, it is the king. So, go spout memes elsewhere.

Its designed to be an embedded scripting language. No shit its mostly useless on its own.

>Excellently designed language
>Assigning to an undefined identifier creates a new global variable

hueheuehuiehuahuehue

Should it make a local variable? Python does that it's a horrible fucking mistake. And what's the point of declaring variables if you don't need to declare a type? Not to mention variables are really just fields in a tables, and keys in tables don't have to be declared, and accessing tables, like _G, defaults to nil, just like variables. It's all copacetic if you understand the language, you obviously don't.

It's great, but I wish it had more libs.

It's cute, but the lack of braces for block scopes, 1-based indexing and the local keyword just makes it a worse JavaScript (which is already fucked in its own right).

played with it trying to rice up a conky config... i have seen far worse

>luarocks install middleclass

>It sucks because it isn't like Javascript, just Javascript sucks yo
What.

A great barrier between your code and the pajeet.

I heard it is very lightweight, but I still wouldn't use it over ruby

I love the proper scoping by default and 1-based arrays (or tables rather).

>Array starts at 1

RUUUNNNNN

>arrays start at 1

I think (you) need a better argument to convince us 1-index array is that bad.

>Most of the complaints against it are unfounded, from ignorance, or just petty..

We've hired a new guy at my workplace, and one of the first things we got him to do is work on our relatively small and simple Lua codebase that underpins some of our messaging middleware.

He still hasn't stopped ranting about how tables start from 1 because reddit meeemz. It really makes me want to stab myself in the eyes.

tables not arrays, which is why they aren't zero-indexed.

you're mom is a non-zero-indexed array

Just make him use iterators and avoid indexing, it's more solid approach anyway.

Pretty decent scripting language.

I've used it quite a bit to script shit on some games.

wtf i hate lua now

What a baby. He'll shut up about it soon, or he won't last long.

Nobody is a "Lua developer", you fucking retard. The whole point of the language is to be small and embeddable.

>It's all copacetic if you understand
>if you understand
>not if you get it
So close to a good reference.

What ref is that?

I've been learning it this weekend
I like it, and I love tables

Bound for the Floor by Local H

oh no it has one small issue I don't like therefore it's TOTAL STEAMING SHIT

>Should it make a local variable? Python does that it's a horrible fucking mistake.
Ive never understood this, whats the point of having to explicitly declare variables as local? 98% of the variables most people use are going to be local so why is this bad?

>And what's the point of declaring variables if you don't need to declare a type?
how is this different from having to declare local variables in Lua?

I used to program WoW addons with it, hated that stupid piece of shit.

you can make Roblox games with it

>array starts at 1
Kek

it used to be the case that lua was peerless when it came to crazy-easy embeddable languages. Its c interface is just amazing and its jit is super fact.

now that's less the case. After the original author left the project there's been very little movement to improve it, and at this point if you're looking for a language and tool to do the same kind of easy embedding you probably want to look towards javascript. Something like duktape for similar levels of simplicity to embedding lua or even libspidermonkey if you're ok with something a little more heavyweight.

Variables default as local means you need global keyword to access global variables, which is fine, it's a mirror image. The issue comes in with lexical scoping and closures. If variables are local by default referencing a variable in an outside scope requires another keyword (nonlocal in python), otherwise a new local variable will be created that overshadows the outside variable. In Lua if you don't specify "local" it performs a search to more and more outside scopes looking for a variable with that name to bind to and form a closure, the global scope being the final case. Specifying "local" is really just declaring a new variable that overshadows either and more outward variable declaration or the base global case. This makes behavior and implementation simpler. So "local" => "var" from JS, but isn't shit (*hoisting*, pffffftttthahahaha, design your shitty language right, like goddamn).

>the first element has index of 1

KEK

bery good, but list_tards is broken it

its not lisp

it's literally just inferior javascript.

It seems to be popular in games for scripting

Fine if:
>you're using pure C and want to extend it with another language for easy scripting by you or others, especially if its a game
Otherwise its just a literally who scripting language. The only reason anyone knows about it is because muh games.

Using it with C++ is a meme. name mangling and OOP balloons the complexity to ridiculous levels.

1-indexed arrays are fine for scripting languages because the people doing the scripting are brainlets. Matlab does 1-index too.

Ew. That's the reason I ditched Julia.

It seems like something I would like, but I have no reason to learn it atm

>inside a scope
>bind something to a name
>name appears outside of the scope
I can't agree with this.