It's lonely and scared

It's lonely and scared.

Say something nice about it.

Attached: Lua-logo-nolabel.svg.png (700x700, 40K)

Other urls found in this thread:

lua.org/pil/2.3.html
github.com/search?q=language:scheme
en.wikipedia.org/wiki/QML#Syntax,_semantics
stackoverflow.com/questions/23590885/why-does-luas-length-operator-return-unexpected-values
pastebin.com/dqt5MGwr
twitter.com/NSFWRedditVideo

Uh, you can script Civ 6 in it. That seems like a good thing.

it's fast for a scripting language
tables are cool

Lean and fast
Wrote a 796 line script that currently converts 55 plain PPMs into level files, going to make 45 more

can somebody explain this thing to me?
is it meant as a standalone language or just for allowing scripting from within c applications?

Attached: YQChpfK.png (268x237, 36K)

meant to be used from c, used both ways

Muh Python

Attached: python.png (601x203, 82K)

I rewrote my script from Python to Lua because Python has horrible startup time. The 55 conversions take 5 seconds on single CPU while Python takes almost a minute. That's 10x speed increase.

I know people who use it for building backend microservices. Opinions?

openresty is god tier, I built multiple saas with openresty+postgres combo

numbers are pretty cool

lua.org/pil/2.3.html

also 1 based indices are the right thing to do

>from c
>not using pypy or guile that actually are made to be used from c and aren't shit

>It's lonely and scared.
It really is the unpopular, younger and faster sister of python. When will code monkey senpai start to notice?

Attached: 1521999183252.jpg (1138x1137, 159K)

it's language for MTA and WOW

I like the whole meta with tables and how you can do anything with them, I had fun with it but making anything big and debugging it is a nightmare.
Still 10/10 would embed again

I used the shit out of it in computercraft/minecraft like 6 years ago

Löve 2D il a pretty good game engine based on it.

>roblox
>garry's mod
>minetest
lua helps kids (and adults) have fun in creative ways

Simple, quick to write and integrates well with C

Tables are really neat

Writing code takes much less time than debugging it later.

Pretty much this

>making big projects with a dynamically-typed language

What did you do with Lua in minecraf, I thought you could modify it natively?

Google computercraft

uhhhh you can mske WoW addons with it

Superior version of javascript

>saas
hi nigger

Scheme is better

It's the language GMOD is written in.
Cool I guess.

>lisp anything
>better
pick one
go to github.com/search?q=language:scheme
literally only scheme interpreters and scheme "utility" libraries, nothing useful by itself
what a useless language

Fucking awesome because of tables,.metatables, upvalues, setfenv and operator overloading

It's alright, I'm keeping it company.

Attached: file.png (1920x1080, 200K)

>VS

cu cu cu cu cuuck cuuuck

wtf i hate vs code now
you make a really compelling point there buddy

My pronoun is 'it'. You queer.

i need to learn it for ardour DAW

>guile
>aren't shit
Nice opinion there buddy

The syntax is nice. What are you using it for? Are those Qt bindings?

You can make Stalker mods with it.

No, but I'm writing QML-inspired GUI system with Love2D as rendering backend.

no need to, you either have self respect not to touch anything MS or there is really no point explaining how your choices make the world a shittier place

Thanks, that's based

> also 1 based indices are the right thing to do
It's not. It is an unnecesarry abstraction that isn't in sync with how pointers work.

I got it working for the most part, I already have a base widget with a lot of properties (like the Rect type in QML), as well as a way to create new components with inheritance and such. I also just finished horizontal and vertical layout types, and am currently working on anchors. Next will be specialized scripts for components and I guess that'll be it.

Needs more Metatables

there's a minecraft mod that lets you use it to trigger in-game events.

but tables are not pointers, they are hashmaps

It's the framework for the whole ui of the most popular MMO of all time?

Can you show it?

What exactly do you want to see? It's simply a system that replicates the functionality of QML.

Anything desu
Just curious

If you're asking for visuals then I cannot really show you much as I've not styled the components yet, mostly working on fleshing out the functionality first.
If you're not familiar with QML, it basically provides the following functionality (operating on the basic Rectangle construct): en.wikipedia.org/wiki/QML#Syntax,_semantics except using Lua tables instead and Lua functions for callbacks instead of JavaScript.

Only problem with it is that it indexes arrays starting with 1

Great language. Fast, portable, minimal, and well written.

It's not designed by PHP or Python language """""""designers."""""""

Not true. In the backend, tables are a hybrid. Both array AND hashmap. (There's a reason that Lua gave them a non standard name.) That way if you use it as an array it is efficient. Or if you have sparse numerical entries or other things as keys those go in a hashmap. Index of one DOES get mapped to zero in c if you start your array from one in Lua. Using hashmaps for everything would be fucking stupid, slow, and requires more memory. Brainlet.
Computercraft was sweet.
Welcome to webdev...
Based
Post when done plz
Pretty much this. But I deal with it. Better than Python cuck spacing. I also don't like the keywords so much. Braces is better. The long keywords distract from the code.

>tables are a hybrid
Then why # operator is log(n)? It uses binary stackoverflow.com/questions/23590885/why-does-luas-length-operator-return-unexpected-values

nvm actually read the shit i linked, you're right

>Civ 6
kys 4 is where the power is

The fuck are 'level files' in the context of shitty image formats?

Pic related translated into this
pastebin.com/dqt5MGwr

forgot pic

Attached: lvl.png (23x18, 385)

here's how it looks

Attached: output.webm (1366x768, 74K)

>shitty image formats
Plain PPMs are actually great for processing

This

Besides start up time, how's the actual runtime difference on some real world application like this?

Honestly, I could not judge that accurately.
I've read Lua Performance Tips and profiled the script to make it faster.
So you should have an experienced programmer rewrite that Python script to make an informed comparison.
But the beauty of such a small language like Lua is that it is extremely easy to become very proficient in, while Python is a huge learning domain.

Would you say it's worth to look into as side language?
Then again besides properly configuring my mpv scripts I can't really come up with any use case.. Mostly daily drivers are already done in python so it's easy just to take the APIs from there....

Use whatever you think does the job best.
If it's less than 1000 lines of code the language choice doesn't really matter - you can rewrite it in a day.
I simply find Lua fun to code it.

Lua was my first language. Started with minecraft, wanted more control and tried ComputerCraft. Those blissful times.

And from there I've been doing a whole lot of stuff.

first programming language I ever learned :')

back in the day I was a roblox scripting god

Attached: clockworks.jpg (503x505, 13K)

Some people like to write entire applications with lua, but yeah, the focus of the language is to allow scripting on other programs

no it isnt..

>roblox
My daughter plays that game

>only widely used language today that actually has proper support for coroutines
Lua's a cool dude I think

I think go has support too but I might be wrong.

>lisp
Lisp and Scheme aren't the same thing. They share a common history in the original older Lisps but they are in fact separate languages. Calling Scheme Lisp is like calling Java C because it was influenced by C.
Also judging a language by the github projects is stupid.

What's wrong with guile?

wow, someone else that actually knows what MTA is. Have you ever written a script for it?

It's nice for gmod add-ons

Lisp is a language family. Scheme is a dialect which actually predates Common Lisp the other major dialect.
Java and C are both languages in their own right.
Also, GitHub et al though not enough to judge, they are an indication of what a language is used for.

you can make them start anywhere you want

>making projects with a dynamically-typed language

ftfy

It is not even a trade off, there is literally no reason to handicap yourself

Lua is way better than python though

>tfw learning Lua by playing WoW
Up to this day i write my own addons

What are you using to learn LUA?

Lua is probably the easiest language to learn out of all of them. Search up the book "programming in Lua", the first edition is free online.

Also, first lesson: it's Lua, not LUA.

It's p good if not a bit verbose.
I'd like to see actual +=, -=, etc.
Also scoping should not have to be as explicit. Local should be default.
I like the "pass target table as first argument" : syntax. Metatables are good.
1 indexed arrays are ass.

>1 indexed arrays are ass.
Why?

I have to change the way I've been writing for loops and offset logic for literal decades.
Especially when doing simple graphics (like something tile based in Love2d) - it's unintuitive.

>it's bad because it's not what I'm used to

Yes. When evaluating a tool I take my personal useability into account, fag.

ign?

Attached: nice.jpg (370x370, 17K)

There's an interpreter for the psp which I used to make my first game since my computer was too old to successfully compile c code for the psp.

fuck off pedo

did dive into a Lua only addon without config, but wanted it on a different spot.
The Anchors are pretty self explanatory ("TOPLEFT", "RIGHT", etc), and soon descoverd the numbers after are basically a coordinate system. From there through WoW's API to functions, eidgets etc.
Not a method i'd suggest learning, but doable. Better do as sayid

it came from brazil ! YEY beaches bitches and fun.

I'm an adult and I don't know lua or programming.
How the fuck do I catch up?

Make something simple in love2d. The community forum there is very active, extremely friendly, and promotes learning.