What is the purpose of this language?

What is the purpose of this language?

Other urls found in this thread:

github.com/patrickriordan/imgui_lua_bindings
twitter.com/SFWRedditGifs

the white mans python

WoW addons.

To be used as an embedded scripting language within a compiled host language as a way of speeding up iteration time in projects with rapidly changing requirements, e.g. game development.

>Lua: Brazil
>Python: Netherlands
Quite the opposite.

Garry's Mod

>Made by Brazilian monkeys
>White man

Hello pajeet

>200kb dll
>sane and powerful, apart from the 1-indexed arrays
it's okay, would use/10

>meaningful whitespace
out

It's easy to bolt on to bigger things

Non bloated Embedded scripting and complex config files.
LuaJIT is unbeatable.

Of course whitespace is important. Any white man would know that.

Why don't you know that, poojeet?

It's fast and smol. It is pretty good all around. It also had a neat internal process model that wasn't posixy iirc

i = 1
for i=1,100 do
if i%15 == 0 then
print( "fizzbuzz" )
elseif i%5 == 0 then
print( "buzz" )
elseif i%3 == 0 then
print( "fizz" )
else
print( i )
end
end

r8 my fizzbuzz

>redundant `i'
>non-locally scoped `i'

>4 branches for 3 cases

Pretty gud. Apparently it's used for machine learning stuff since LuaJIT is fast or something. Also Love2D is great.

What?

Should I learn lua :)

it fine

It's not a tough lang to pick up the basics in.

You don't need to check if i is divisible by 15

I've never programmed before and may suffer a mental disability

Meant for

>i%15
is that even a legit way to fizzbuzz?

for i=1,100 do l="";l=(i%3==0 and"Fizz"or"")..(i%5==0 and"Buzz"or"");print(l==""and i or l)end


I minified it for you.

>he doesn't know divisibility rules

then lua or python are actually good places to begin

I love Lua. Shares a lot of commonalities with Python in accessibility but it's faster and extremely lightweight.

SOPA

Can't you do the same with python ?

What the avantage of lua on this, I'm wondering ?

Python is much larger than lua but it's also used as an embedded scripting language lots of times. May be a performance difference, I dunno.

Lua is faster and more lightweight than Python. It also has native coroutine support.

Lua was designed primarily to be used in embedded systems.

...

I'm pretty sure Python is the white mans Ruby.

DELICIA

I don't know, but I want to learn it to use Love2D. Seems like a comfy language desu

It's comfy as fuck, love2d is okay but most of the projects that extend it are dead. Not a big community there but still solid.

Guile is better than Lua.

>no 1 indexed arrays
>motherfucking macros
>motherfucking delimited continuations
>motherfucking pthreads support
>Implements an EMCAScript front-end so you don't have to deal with shit from webdevs
>will support Lua in the future so literally no excuse

Can use Lua instead of PHP for server side processing. Smaller and faster. Especially great for embedded systems.

Gmod scripts and addons
shit's versatile as fuck, easy to pick up as well

It's a great and simple language. Most of the times better to use than python.
lel

If it works then it's fine.

Love.

I like it just for this.

how exactly do i print the contents of a table and why cant i find a clear answer anywhere
like:
t={1,2,3}

want to print t
outputs
1,2,3

This

Programming lua in Roblox was fun ten years ago. Haven't messed with it since.

How about this?
for i=1,100 do
io.write('\n'..i..'\r')
if i%3==0 then io.write'Fizz' end
if i%5==0 then io.write'Buzz' end
end
[\code]
R8 me.

table.contact(t, ',')

The nonautistic python.

I get
attempt to call method 'contact' (a nil value)

It should be concat ducking auto correct

oh fuck thanks

I would like to learn lua but I'm getting a feeling it wouldn't be a good use of my time.

I just want to make a Harvest Moon type game. As long as the community (and documentation exists) is more alive and helpful than RPG Maker's then it's automatically better.

Do it. It's a very simple language that can be learned quickly. And it's much much faster than any other high level language you will find (if you use JIT anyway and there's no reason not to). It easily integrates with C and C++ programs and libraries if that's your thing. Also very common in the games industry.

How do I add/do math with two elements of a table together in Lua?
like
boy[2] + boy[3]

exactly like that.

i get : attempt to perform arithmetic on field '?' (a nil value)

heres what im doing exactly
i>=1

sum=baptist[i] + baptist[i-1]

dota

well i should be >=2 because lua doesn't have 0 based indexing.

What a comfy language

one of the few things Sup Forums can't hate, simple enough for tards and brazillians to use I guess.

You're a tard !

Can you do explicit threading and forking in lua

to create hax for cs go and tf2

I'm sure there are libraries for it but it's not their go to pattern.

also a GNU project

Still, fuck lisps. What would be the point of Guile with Lua if Lua exists?

SyQt is goat

This.

>lisp
Dropped.

I'd rather write a[1] than (aref a 0)

What the fuck is wrong with lisp-languages, literally the pinnacle of human achievement

roblox

MOMS

Go away evil dogger.

If I'm taking input and the user typed

2 2
How do I read that as two 2's and not as 22 or a string containing "2 2"
?

You match it with regex

for i=1,100 do io.write(i.."\r"..(i%3

If someone wrote that on the whiteboard during interview I'd fire them on the spot

perl -e 'says"Fizz"x!($_%3)."Buzz"x!($_%5)||$_ for 1..100
:^)

for i=1,100 do print(i.."\r"..(i%3

Tell me more

What libraries are those? I'm having trouble finding them

I know of coroutine but I don't think that's equivalent to Pthreads in C or something and I can't find a fork() equivalent

I told you more than enough

Do my homework

For botting in Tibia

lualanes

dota modding

who the fuck teaches Lua
also mpv

It's designed to be embedded into applications and games. So if your project needs a scripting language, your too lazy to write your own, and javascript, tcl, lisp, or whatever else sucks too much... you can just use lua instead.

Lua was written from the get-go as a language intended to be embedded and it's really simple to do so. Python was not and it's quite a bit trickier to deal with. With lua you can just throw the whole lua source code into your project and forget basically forget about it.

>the white mans python
Literally made by Sopa de Macacos.

Lua is like Monkey Soup.
Delicious (Uma delĂ­cia)

Lua is correct.

Only retards would use 0-based array indexing.

Setting up a scripting language for your project in a painless and quick way that doesn't have nonexistent documentation (V8) or a clusterfuck of boilerplate (Python).

to write your own addons with

get on my level and write a UI

>mfw using github.com/patrickriordan/imgui_lua_bindings to write my UI