[ Index ] [ as / cr ] [ dev / lua ] [ meta ]

/lua/ - Lua programming

Metatables for president

[ ]

* required field

Please read the [Rules] and [FAQ] before posting.


get that creepy shit out of here spambots i am sick of deleting it all the time


[Catalog] [Archive] [Refresh]
File: Love-game-logo-256x256.png (12 KB, 256x256)
Let's get this party started! Please read the rules before posting, etc.
File: 1452802415531.png (127 KB, 497x448)
>>1
>Services you should use
Throw your code on hastebin.com or gist.github.com or nobody will help you
Use GitHub for things that need to last more than a short while. No bitching.

>Useful (free!) programs
Blender - blender.org
Krita - krita.org
Atom - atom.io

>Chat!
#love on irc.oftc.net. If you aren't there, we're already laughing at you behind your back and talking shit about your waifu.
According to some, Zerobrane is also a pretty great Lua IDE. Check it out too!
/love/ -> /lua/

enjoy your newfound freedoms

File: 2acbc2a839b032f6.png (274 KB, 1200x1600)
What brings you to Lua? Why do you like, dislike, or are somewhere in between on Lua?

I used to hate Lua when I was a kid. I thought it was confusing and meaningless because I never knew how to RTFM. After touching it again the past year, I have made a complete 180 and Lua may just be my favorite and most experienced language now.

I find that Lua's simplicity offers great freedom in the things you can do. The table structure allows so much depth and complexity with zero effort on the developer's part. It can be an array, a dictionary, an object, a pointer, a memory management system, all of those at once and even then a meaningful value in itself. It's C-like in its ubiquity yet safe as though it were specifically built to be all of those (which, for all I know, it may have been).
The use of truth value makes conditionals so clean and straightforward compared to (inferior) languages that demand explicit boolean conversion, not to mention the power of the logical operators with the power to condense a function into a single statement.
Lua's freedom with functions itself is wonderful. The Lua way of nullable/default arguments is straightforward yet nonrestrictive. Being able to override Lua functions so easily gives so much flexibility and power that other scripting languages would never dare to try. Having multiple return values handled so simply allows even more flexibility within a single function. Lua's closures then close this input-process-output masterpiece by providing a completely unlimited access to any above scope's variables, with so many uses, it'd be impossible to name them all.
And on top of all this, and more that I won't mention for the sake of brevity, Lua is fast. LuaJIT in particular is very fast, and many Lua-derived languages try to be faster while maintaining Lua's beauty (although, in my opinion, everything besides pure Lua is simply disfigurement).

So, in short, I guess this is a dumb löve letter to Lua. Let's all löve Lua.

And don't forget to post why you löve Lua, too.

File: Screen Shot 2022-09-02 at(...).png (221 KB, 1064x630)
Building a full stack app if anyone is interested to collaborate. I come from a python/javascript background and picked Lua a couple of weeks ago and absolutely love it.

Don't know what to build though but I finally have a good foundation with basic crud functionallity (todo). There is not a lot on how to make Lapis purely for API But I think I got it.

Also, what should the name of this stack be? Also dockerizing everything
>>373
join us on the lapis discord if you'd like to talk more about lapis!

https://discord.gg/nJ8vaHVd

lapis is very good at being a json restful api server
>>374
Ahhh I think I joined that the first time I was reading the docs on Lapis. Will introduce myself on Lapis channel
>>374
Discord is harmful!
https://stallman.org/discord.html

File: pepethink.png (52 KB, 860x563)
Has anyone here used constants from Lua 5.4 in a real project yet, or not b/c of compatibility with 5.3?
never even considered it, but it'd be off the table anyways since i use luajit.

usually i end up getting constants (as far as i'm concerned) anyways from haxe, but then that's not really about lua anymore
>>402
When I first saw them I was really happy but I have not used them yet as I would prefer my code to still run on 5.3.

File: extrasexy.png (20 KB, 600x450)
Ok so I hate javascript so lets all revolt against it please also dhar mann is my secret lover
that's the spirit
great, who wants to start?

File: Screen Shot 2023-01-01 at(...).png (114 KB, 262x282)
ok so javascript sucks we need to go march to mark Zuckerberg tell him to destroy react.js and then use Lua for everything and then take over the word :)
sir this is a wendys
what a dream, but we need to get rid of python first

File: 20210222_010941.jpg (16 KB, 559x423)
Like I look at the source code of this proj and oh wow I better start learning OOP so that my project isnt garbage. Ive heard metatables are hard. Is it true?
metatables aren't that hard really and you don't have to think about them for a pretty long time. most of the time even when you do need it you're just setting __call for a constructor and __index to another table though to give you a class prototype

oop is also kinda beside the point though (basic classes != oop) and not correlated with good code (it is correlated with over-engineered bullshit though)

most of the relevant stuff for organizing code is just basic lua syntax sugar, like being able to write function some_table:whatever() and it passes self automatically if you also call with :whatever()
>>193
This is a really wise explanation.

File: 1 (1394).jpg (176 KB, 800x845)
Is this imageboard really made with Lua? based if true.
There seems to be no captcha? that screams botted spam
yup, made with Lua! check the GitHub link in the footer!

Bot spam stuff will come Soon(tm)!
>>95
Me again, 4 months later, how is the development going?
>>165
I've been slowly reworking the code to be much cleaner and run off an api so i can support other clients in the future~

File: 1513228265601.png (307 KB, 480x454)
Should I?
probably yes
Sure! I just updated it to run in Docker so it shoudl be WAY easier to set up now. I knwo the code is pretty messy, I am hoping to sit down and clean it up now that I have a better understanding of Lapis.

Short term wants is to make the code cleaner and less buggy, long term I want lapchan to run on a RESTful API.
test

File: Screenshot from 2017-10-1(...).png (10 KB, 284x121)
and i had never heard of this until doing a bit of research.

honestly, this place is pretty comfy.
what happend to lunaboards, it seems down

[1] [2] [Catalog] [Archive]
[ Index ] [ as / cr ] [ dev / lua ] [ meta ]