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

Fuck you, I like it!

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: 48
Thread images: 3

File: 1920px-Lua-Logo.svg.png (125KB, 1920x1920px) Image search: [Google]
1920px-Lua-Logo.svg.png
125KB, 1920x1920px
Fuck you, I like it!
>>
>>58957850
It's okay I guess.
>>
>>58957850
Only ever used it cause of Gmod desu
>>
it does coroutines nicely. most people I see shit on it because they can't handle 1 indexed arrays.
>>
>>58959617
1 indexed arrays are retarded.
>>
>>58959852
Tell that to Knuth
>>
do the same with java/javascript/php to get a 300 replies thread
>>
>>58957850
message[1] = 'J';
message[2] = 'U';
message[3] = 'S';
message[4] = 'T';
>>
>>58959852
i agree
but lua is nice except for that if you ask me
at least it has its uses
>>
>>58960787
message = { "J",
"U",
"S",
"T"
}
>>
it's literally the best named language
>>
>>58961056
xplain
>>
>>58961215

it just sounds based as fuck. Plus it would be a good name for your qt3.14 waifu
>>
>>58957850
There are many worse choices for scripting languages
>>
>>58960787
strexplode ("JUST")
Can you not into writing functions?
>>
nigger its much comfier than python
>>
>>58957850
>manages to single-handedly tank Torch
>is this the power of Lua
>>
>>58957850
>Fuck you
Calm down. Lua is The Beatles of scripting languages. Many don't care for it but few really hate it.

Now Tcl, that's a divisive scripting language. Some really love it, some really hate it.
>>
>>58959532
Same
>>
Lua is wonderful for embedding in other software. Easier than Python to use securely -- sandboxing scripts is actually doable, just make another Lua state. And you can handle all data accesses if you choose.
>>
>>58962140
Can you sandbox Lua so that an infinite loop in the script doesn't cause your program to hang?
>>
>>58962195
Yes.
>>
>>58962195
i doubt it. You could create a timeout function in your host program?
>>
>metatables
>nil
luafags WILL defend this
>>
>>58962245
Elaborate.
>>58962247
That's what I do now with [language redacted], but I want something better like limit the number of total statements executed.
>>
>>58959617
people tend to shit on things for petty reasons. just look at all the people bashing python for whitespace. 0-indexed arrays makes sense in C because the array index represents the value's offset from the beginning of the array but a higher level language doesn't need that
>>
>>58962295
You can just not wait for it to return anything and use something like io.popen.
>>
>>58957850
Roblox Lua scripting at 13 gave me an intro to CS, the only good use for it is tutorials.
>>
>>58959532
Loved a bit of SWEP dev
>>
>>58961751
But that's not in the standard library...
>>
Lua is the best. Used it for CC and OC. Also scripting with it in HexChat.
>>
Tangentially on the subject of Lua, there's a LÖVE gamejam coming up in a couple days. https://itch.io/jam/love2d-jam
>>
>>58962278
I have written functions that return true on success and nothing on failure and then used said return value (or lack of it, nil) as a conditional. I love it.

I also love indexing tables with true and false, and handling large pieces of conditional logic as a single array. For example FizzBuzz might look like this:
result = {}; result[true] = {}; result[false] = {}
result[true][true] = function() return "FizzBuzz" end
result[true][false] = function() return "Fizz" end
result[false][true] = function() return "Buzz" end
result[false][false] = function(i) return i end

for i = 1, 100, 1 do
local cond1 = i % 3 == 0
local cond2 = i % 5 == 0
print(result[cond1][cond2](i))
end
>>
>>58962195
Sure. Depends on what you want to embed it in.
>>
>>58961279
>>58961880
>>58961972

this is not untrue
>>
File: 7.png (318KB, 672x462px) Image search: [Google]
7.png
318KB, 672x462px
>>58963271
>>
>>58963271
You give Lua a bad name
>>
>>58962694
Sorry pybaby. We can't compensate for your stupidity.
>>
>>58963271
As dumb as that kind of code is, I enjoy it. Nothing wrong with writing things in a silly way for the heck of it.
>>
File: 1484824364153.png (208KB, 5000x5000px) Image search: [Google]
1484824364153.png
208KB, 5000x5000px
Its easy on the surface but when you try to get metatables working and lua interfacing with c++ without glue libs it's easy to feel to dumb
>>
>>58964074
no not really
>>
>>58962195

Write it asynchronously then.
>>
>>58962195
Just verify beforehand if the Lua code you are about to execute will stop. Trivial, really
>>
>>58966597

>I have never written program beyond 'hello world' printer
>what is halting problem
>>
>>58966623
Oh shit, didn't think anyone here would actually be autistic enough to bite the bait. Thank you for the chuckle
>>
>>58966685
>merely pretending
>>
I'm gonna learn Lua for web dev.This will be my first language.
Is it a good idea?
>>
>>58967849
I didn't even know there were frameworks for it. Go for it I guess. Have fun!
Thread posts: 48
Thread images: 3


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