Lua appreciation thread

come home, white man
>lets you use any native library thanks to luajit's ffi
>lets you do webdev thanks to openresty
>lets you handle huge databases thanks to tarantool
>lets you do machine learning thanks to torch
>lets you do 2d gamedev thanks to love2d
and all that WITHOUT trannies, not even a CoC
did I mention native-like performance and low memory footprint?

Attached: lua-logo-png-transparent.png (2400x2400, 199K)

Other urls found in this thread:

lua.org/pil/contents.html
lua.org/manual/5.1/manual.html
learnxinyminutes.com/docs/lua/
en.wikipedia.org/wiki/List_of_applications_using_Lua
github.com/alebcay/awesome-shell
mega.nz/#F!jKgHQIjR!IHGX8GQWe_FnY1L-GgMMJA
micro-editor.github.io
howl.io
fennel-lang.org/
urn-lang.com/
roblox.com/games/1334669864/Lua-Learning-WIP
twitter.com/NSFWRedditImage

Bump, I want to learn lua

it's great but it has a major flaw. no one uses it so no one will use it.

Where do I go to learn lua? No pajeet yt videos pls.

there's an older version of Programming in Lua available for free on their site:
lua.org/pil/contents.html

lua.org/pil/contents.html (kinda outdated, the newer editions are paid but sure enough you can find the ebook somewhere on the internet)
lua.org/manual/5.1/manual.html (good ol' docs)
learnxinyminutes.com/docs/lua/ (crash course)

Many relevant open source projects uses lua, so far the ones I like/know:
- vim/neovim
- vis
- ardour
- luakit
- mpv
- nmap
More:
en.wikipedia.org/wiki/List_of_applications_using_Lua

can it do anything that Java doesn't already do?

Yeah, it is embedded. But nobody uses it.

for starters, it's nowhere near as bloated as java
in fact, it's not bloated at all

My first lua experience was in roblox when i was 10 lol. i want to learn a scripting language for my Linux system for small automation

is this or python better for my needs?

python is probably better because you'll have to write less yourself

Are you rust programmer or smth?

Attached: brainlet.jpg (601x508, 60K)

No, I mainly write Lua at a game development studio. We have a hard time finding developers. Most of the ones we do hire come with JavaScript experience and they really write awful Lua.

wtf, I'd love a Lua job but can never find any offers whenever I take a look
and I'd consider myself highly experienced in Lua

I want to embed a language for scripting but I dislike lua. What should I use instead?

Use a Lisp that compiles to Lua or LuaJIT byte code. Every other JIT is too big. You're welcome.

>learn a scripting language for my Linux system for small automation
Just learn how to use the command line and the linux utilities you already have installed as on any linux system.
Shell scripting comes bundled with that.
You don't need lua or python for 90% of the task you want to automate.

pretty much this, shell scripts get the job done when it comes to Linux automation
Lua's not really a good fit for that, Python or Perl would work better if you insist

oh ok, i used some shell scripting but i thought it's way too basic

if you feel it's "basic" that's a non issue. The more complicated the solution is, the bigger the memory footprint

> did I mention native-like performance and low memory footprint?
I like lua but you need to stop bullshitting. Luajit gives lua a performance boost, but it's still not fast enough. However, it's still better than other scripting languages

Good shell scripting is a lost art form in the sea of "new programming language every month".
Here many examples of mastery:
github.com/alebcay/awesome-shell

mega.nz/#F!jKgHQIjR!IHGX8GQWe_FnY1L-GgMMJA

How do I find jobs like this?

Man, Lua tables resemble JS objects just enough for a JS developer to make a hideous fucking mess and not notice.

wait. tarantool. tarant? tarant! oh baby i'm comming home

After C comes C++, then comes Lua for all scripting and DB needs. All scripting languages are inferior to Lua, just like all programming languages are inferior to C.

define 'bloated'

>inb4 overhead for a 'hello world' program

Just one word, ROBLOX.

Attached: 1562095256485.jpg (499x500, 126K)

Why would you learn this for anything but making world of warcraft addons?

Can you guys give examples of non-idiomatic Lua that JS devs write?

>mfw only know a bit of lua cause of roblox

Attached: 76634477a0dc6061f6be1b20f9451b99.png (420x420, 34K)

>1 indexing
yeah nah

Don't forget,
>metatables which allow you to manipulate the language itself
Get ComputerCraft you fucking zoomer
>Imagine actually taking programming memes seriously to the point you would avoid a powerful language

>follow convention established in discrete mathematics and used by every other language i use is a programming meme
some of us don't write code wearing thigh high socks, m8 :^)

Arrays which start at 0 are the byproduct of low level languages which actually use the index value as an offset to a pointer. There is little reason for high level languages to follow the same convention.

Another word: Stalker.

Perl is built into almost every LInux distribution, even LFS. It's basically designed for this, as one user stated.
It's like a very high level C + awk + shell scripting + sed + grep + any-UNIX-command in one (un)tidy language.

java memory usage is through the roof
also fuck that bullshit where you have to decide how much memory to allocate to a program before you start it
that's quite frankly the most retarded thing ever conceived. also once the jvm gets a hold of some chunk of your ram, it will never release that memory back for other programs to use

Name the OS that uses perl as shell.

Attached: 1561776793199.jpg (436x365, 23K)

Built in as a dependency, not as a shell.

>think this user is underage because he mentions Roblox
>look up when Roblox first dropped
>2006

Wtf?

Attached: 1529358034076.jpg (743x729, 154K)

Fucking illiterate retard.
JVM releases memory but does so reluctantly because resizing heap is slow.
I bet you're one of those OCD autists who sprays __attribute__((packed)) all over your code because muh memory.
Yes, JVM uses too much memory, ever heard of moving garbage collectors? Compressed pointers?

i learned to program with lua, lua scripts for garry's mod, lua scripts for Cortex Command, and lua scripts for runescape bots

which is probably why i'm completely retarded at programing, because i get frustrated and expect it all to be as straightforward as lua. it's good shit though.

i should learn it, looking at it briefly it gives me JS vibes

what lua extensible editor is the best? micro-editor.github.io or howl.io ?

the white version of javascript

It's OK. I only learned it for mpv scripts.

>71780337
its like JS and C had a baby. real men use a raw text editor

Lua is like C but interpreted, pretty based tbqh

its nothing like C

syntax-wise, no it isn't
but with luajit you can quite literally define and use the same data structures as you can with C, you can execute any syscall as if running native code
you can hook into processes and execute procedures inside them if you can get hold of the right offsets

"it's exactly like c except for the part where you use it"

Attached: 1556636164751.png (475x543, 274K)

>array indices start at 1
dropped

WTF "scripting language" even means
Is it pseudocode like Python? Then why not use C++ or Lisp instead?

>and all that WITHOUT trannies, not even a CoC
Rust + Lua is a great combo.

>using "begin" and "end" instead of curly braces

I really like Lua, and it's go-to for plugin/mods. But I'm actually curious about embedding JS into software. JS is constantly improving and start to like it too, so I'm interested how different it would be to use it instead of Lua.

>ComputerCraft
Real chads use OpenComputers.

Attached: 1452210332982.jpg (573x892, 71K)

It will never become mainstream because it breaks computer science convention by counting from 1 instead of 0. I loved Lua and used it for months. I was writing a game where it would be scriptable with Lua but eventually my autism forced me to quit. I just couldn't take indexing tables at 1 instead of 0. Fucking sad bros.

>lua
>array

>made by the Brazilian motherland
sign me up

low iq post

a keyword is a keyword either way

this. based country, based language

i use LUA for programming robots in VREP. Its comfy and lets you export data to MATLAB, Simulink, ROS nodes, and whatever the fuck you want with a few simple commands.

the lua vm source code is clean.

ok zoomie js

it's Lua, not LUA.
it's not an acronym

Memes aside, lua is basically pic related right?

Attached: umdbq1luqfy11.jpg (334x506, 22K)

> memes aside
> literally asks if something is a meme

But seriously, what can I use it for? Is it a slow substitute for a real language?

>native-like performance
no

it's a meh language that's easy to embed into other products to expose a scripting interface to an end user

Is it a good beginner language if I want to get into programming and then move to something C-like?

I somehow prefer 'real' keywords to braces. I feel like braces are just garbage I need to filter out while "begin"/"end" are words I can read. I don't know if the primary reason is that they are indeed actual reasons, or maybe it's just because they are slightly bigger and don't seem like a piece of garbage that wound up in a wrong place, or maybe it's just because I spent a lot of time with languages low on braces.

perl would be better if you plan to move to C later

just start with C

That's the way programming languages should be, fuck C derivatives

My personal advice is, start with C, and make lots of simple 'toy' programs with it, nothing crazy, just get used to basic control flow, program structure, and the usage of pointers. After that, try other languages that do allocation and freeing for you, to plant these ideas in your mind, and then with that knowledge come back to C or C++ and try to implement these same things without Daddy JVM or whatnot handling all that icky memory stuff for you.

I wish i had an excuse to use lua so fucking bad.

No, it's this

Attached: 1552360277622.gif (356x400, 2M)

watch me reach peak comfy:
fennel-lang.org/
urn-lang.com/

You also forgot to mention no preemptive multithreading.

why would you have multithreading a scripting language

you must be over 18 to post on this board

I wanna nakadashi lua haha

Nigga, torch is dead.

I really enjoy lua. A few months ago I wrote a 3d rendering engine in lua. I did however have to use love2d for displaying the rendered pixels. If I remember correctly I only used 3 functions from it:
>love.graphics.line()
>love.graphics.setColor()
>love.graphics.points()
the rest was written in pure lua. It was just a wireframe render, but I planned to add texturing at some point. It was so optimized for lua that it even ran at 60fps on my phone with a large scene and moving objects.

an year ago I was really really interested in lua but I tried and tried but just couldn't install any rocks(lua modules/packages) on windows so I dropped it since all the cool libraries I weren't able to use, luarocks just wouldn't connect to the main repo for some reason.

>how dare you be intuitive?
Lua may be trash used only by Indians, but you picked the wrong reason.

Begin is not a keyword. Did you even try it? It looks weird at first and the lambda syntax is too long. But why would you care about aesthetic bullshit when it lets you avoid the { } block and { } object parsing problem.

That sounds similar.
I've once wrote 3d emulation on 2d accelerated screen in Lua in StarFall. It's not as complex as full3d renderer but still it was challenging to do it with the insane gmod limitations. Lua sure is fun.

her ass is weird

The niche userbase is why it isn't infested with trannies and faggots. When something gets popular its a valuable target for infiltration since you can take from the project without giving. If the project isn't popular you won't even be able to be part of the community since you can't contribute so people just laugh at you. See OpenBSD.

Roblox is more than 15 years old while computercraft is what? 4 years?

you are the zoomer here buddy

>pascal for babies
I'd rather have some embedded pascal.

Lua is more similar to Scheme than it is to Pascal. Don't let the syntax fool you.

This

Nice!

just remembered theres a game on roblox that teaches u lua lol lemme go see if its still up

roblox.com/games/1334669864/Lua-Learning-WIP

lol

Attached: bc0bca0723cb92ed15ac14c67f40d4b9.jpg (768x432, 96K)