THE CYBERIX NETWORK

The sophisticated man's creative playground

log off now or face the consequences

Lua-related technology

SHARE · Back to threads · Report thread

Anonymous · original post · 2026-07-09 02:05:37

>WHY SHOULD I USE LUA?
Lua is the greatest embeddable scripting language of all time! It's very fast and compatible because it's written in ANSI C, and it's small enough that it can be embedded anywhere. The language spec is very small, with just 1 of every type (1 number type, 1 data structure type, etc.) It has very advanced metaprogramming features. It can be used as a simple config language but is flexible enough to be an advanced programming language in its own right. Lua is ideal if you want to implement scripting bindings on top of a C application, or use C libraries though FFi.

ITT: Share your favorite Lua-related technology

>backend web development (production ready)
https://leafo.net/lapis/

>socket scripting (for writing a game server or a custom chat server or something)
https://lunarmodules.github.io/copas/

>game development
https://love2d.org/

Report · Quote

Anonymous · reply · 2026-07-09 02:10:58

>>109231473
Congrats on first post
(You)

Report · Quote

Anonymous · reply · 2026-07-09 02:11:52

>>25285
Anyone know a Nintendo 64 emulator with Lua scripting support? Emulation General Wiki isn't helping here.

Report · Quote

Anonymous · reply · 2026-07-09 02:12:23

BTFOd by AngelScript
mpbp

Report · Quote

Anonymous · reply · 2026-07-09 02:15:20

>>25285
>ITT: Share your favorite Lua-related technology
This book by the textadept creator is pretty useful: https://orbitalquark.github.io/lua-quick-reference/

Report · Quote

Anonymous · reply · 2026-07-09 02:18:20

>>25287
That's a cool idea, let me know if you find one

Report · Quote

Anonymous · reply · 2026-07-09 02:24:23

>>25289
I haven't heard of that, it looks useful
Although the official Lua book (PIL) is extremely good if you didn't know, there is pretty much no need for anything else: https://www.lua.org/pil/
And the reference manual which is a stripped down version of PIL: https://www.lua.org/manual/5.1/

Report · Quote

Anonymous · reply · 2026-07-09 02:34:57

>>25290
Looks like BizHawk and mupen64-rr-lua are my best options.

Report · Quote

Anonymous · reply · 2026-07-09 03:20:11

>>25285
i hate lua
i hate the syntax, it just doesnt feel comfy programming it

Report · Quote

Anonymous · reply · 2026-07-09 03:23:03

>>25293
I disagree, Lua syntax is very comfy.
Keyword-heavy syntax without a lot of semicolons or braces in general looks really nice.

Report · Quote

Anonymous · reply · 2026-07-09 03:34:58

>>25294
almost the complete opposite :c
unfortunately python is my favorite syntax
its also my comfiest language even though it can be quite shit
I dont know any other languages where you just do
myshit = "this"
or whatever without var, let, :=, local
Python code is really nice to look at since your variable names and function calls are the "focus" instead of keywords or weird syntax
Stuff like **kwargs looks ugly though, but type hints with myfoo:str is quite nice, though I'm not sure if I perfer it to char* myfoo
Lua also looks to "nested" but I cant remember if this is a code style thing or a language thing

Report · Quote

Anonymous · reply · 2026-07-09 03:56:38

Lua is very based.

Report · Quote

Anonymous · reply · 2026-07-09 04:00:19

>>25285
>prosody xmpp server
>awesomeWM
>openresty
>luanti

Report · Quote

Anonymous · reply · 2026-07-09 04:11:33

>>25295
>I dont know any other languages where you just do
>myshit = "this"
>or whatever without var, let, :=, local
Lua can, but you will probably say it's fake (global table index instead of stack variable assignment). To be fair this is probably one of the most garbage pieces of Lua design that they refuse to fix.
Lua 5.5 added a `global` keyword, but it's just a strictness filter that throws if you don't predeclare your globals, it doesn't make local default which is what 99% of people meant when they said Lua should have a global keyword. Oh well.
>>25297
Based, good additions

Report · Quote

中出し · reply · 2026-07-09 04:22:54

For me it's Lispy Lua.
>Fennel is a programming language that brings together the simplicity, speed, and reach of Lua with the flexibility of a lisp syntax and macro system.
https://fennel-lang.org
>Lua Common Lisp. An implementation of Common Lisp targeting Lua.
https://codeberg.org/gsou/LCL
>gLua is a Lua frontend on Guile platform. Guile is the GNU Ubiquitous Intelligent Language for Extensions, and the official extension language of the GNU project.
https://gitlab.com/NalaGinrut/guile-lua-rebirth

Report · Quote

Anonymous · reply · 2026-07-09 04:25:08

>>25299
>you will never be a real lisp

Report · Quote

Anonymous · reply · 2026-07-09 04:30:46

>>25300
What is a "real lisp"? John McCarthy's LISP?

Report · Quote

Anonymous · reply · 2026-07-09 04:33:21

>>25285
I am making a heavily moddable Minecraft remake in C, with the entire gameplay aspect being controlled by LuaJIT. Best of both worlds. It's more moddable than Garry's Mod internally.

<3 Lua

Report · Quote

Anonymous · reply · 2026-07-09 04:35:35

>>25302
>inb4 lol 47 fps
i have a dual core & integrated graphics and i have maxxed out all settings and it's opengl 2.0

Report · Quote

Anonymous · reply · 2026-07-09 04:36:36

>>25302
Cool project, but I hope you already know about Luanti (formerly minetest) and chose to make this anyways

Report · Quote

Anonymous · reply · 2026-07-09 04:40:05

>>25302
>minecraft clone #3094809485
nice

Report · Quote

Anonymous · reply · 2026-07-09 09:11:46

>>25302
I'm still fan of it

Report · Quote

Anonymous · reply · 2026-07-09 09:20:07

>>25285
is it really fast?
aren't all scripting languages slow as fuck? what metric do they use to say it's fast?

Report · Quote

Anonymous · reply · 2026-07-09 09:24:01

>>25307
>aren't all scripting languages slow as fuck?
This is mostly a misconception that began with older managed/VM language runtimes, and nowadays the big example of a slow scripting language is python.
For an example of an extremely fast scripting virtual machine that rivals native code speed, just look at modern JavaScript engines (but with JS the language is shit).
Lua is fast *and* the language is good.
>what metric do they use
It's not really something "they" claim, Lua has been around since 1993, find any benchmark in the world that includes Lua and you will see how fast it is.

Report · Quote

Anonymous · reply · 2026-07-09 09:32:33

>>25308
and what can I do with it besides nvim plugins?

Report · Quote

Anonymous · reply · 2026-07-09 09:37:03

>>25309
It's not really a standalone do-everything language because you're supposed to embed it into other programs and add features yourself (it's minimal by itself, you write a C program and include Lua as a library inside it, and then expose bindings to it)
So you can use it to create a scripting layer for your software. Other than that, you'd have to use other projects that embed Lua, neovim is just one exmaple, other examples include openresty (nginx fork) or love2d (game development)

Report · Quote

Anonymous · reply · 2026-07-09 10:50:20

>>25309
use it as a scripting language but realize you just want to make your own after you get obscure run-time errors that don't actually tell you anything about the problem.

Report · Quote

Anonymous · reply · 2026-07-09 11:18:37

>>25311
Lua has really simple error messages and stack traces, there's like 5 possible errors it can emit and I wouldn't call any of them obscure

Report · Quote

Anonymous · reply · 2026-07-09 14:41:48

You can now use lual on lovr! *

* If you compile lovr yourself

Report · Quote

Anonymous · reply · 2026-07-09 14:56:09

>>25285
Its only use is letting people write scripts for your program that you know will be sandboxed. This goes out the window the moment you keep FFI, which is the only way to make it not run like shit in real tasks, at least when the JIT feels like it.
There is no point in using this language besides that peace of mind. I'm not joking.

Report · Quote

Anonymous · reply · 2026-07-09 14:59:49

>arrays start from fucking 1

Report · Quote

Anonymous · reply · 2026-07-09 16:40:53

Can I use Lua as just like a regular script language?
I use Ruby for a bunch of little tasks on my computer. Many little ruby programs automating things for me. Like certain backups. Sending popups. Grabbing data from a sensor and writing it to a web page so anything can read it. Can you do that is Lua?

Report · Quote

Anonymous · reply · 2026-07-09 16:50:22

I use LuaJIT for everything except web browser scripting. standalone programs, extension of other programs, glue for library calling. it's fast, versatile and comfy.

Report · Quote

Anonymous · reply · 2026-07-09 18:55:46

>no continue

Report · Quote

Anonymous · reply · 2026-07-09 22:53:53

https://luakit.github.io

Report · Quote

Anonymous · reply · 2026-07-09 23:08:01

>>25314
Actually, Lua is a garbage sandboxing language, so that use case is very far down on the list.

Report · Quote

Anonymous · reply · 2026-07-09 23:09:52

>>25315
Lua tables aren't arrays.
>but they have an array-like compo-
Shut up
>internally, numeric keys are stored as-
Can it, FAG.
Lua tables are not arrays. Don't make me break out the full explanation.

Report · Quote

Anonymous · reply · 2026-07-09 23:10:53

>>25316
Yeah you could, but it isn't what it was made for.

Report · Quote

Anonymous · reply · 2026-07-10 05:52:13

fun fact: it takes fewer than 200 bytes of code+data to load lua library and execute a lua file.

Report · Quote

Anonymous · reply · 2026-07-10 08:13:54

>>25302
very good bro! tell me, siir, witch cloud model does i need to use to make this like me?

Report · Quote

Anonymous · reply · 2026-07-10 08:25:08

I'm more of a micropython guy

Report · Quote

Anonymous · reply · 2026-07-10 12:55:28

>>25285
the language is ass im sorry
the only saving grace is that its easily embeddable and fast, but thats why people put up with its weirdness. metatables are a good idea tho

Report · Quote

Anonymous · reply · 2026-07-10 13:47:09

>>25315
In C arrays are 1 indexed
>but it starts from 0
It starts from offset 0 which means the first element.

Report · Quote

Anonymous · reply · 2026-07-10 15:47:28

>>25313
what's lual

Report · Quote

SmoothPorcupine · reply · 2026-07-10 19:55:43

ITT: superior to a general in every way

Report · Quote

Anonymous · reply · 2026-07-10 22:25:25

>>25328
Lua Lizards

Report · Quote

Anonymous · reply · 2026-07-10 23:46:20

>>25328
roblox lua

Report · Quote

Anonymous · reply · 2026-07-10 23:51:50

>>25331
That's Luau

Report · Quote

Anonymous · reply · 2026-07-11 02:52:32

what if
<script type="text/lua">
instead text/javascript

Report · Quote

Anonymous · reply · 2026-07-11 02:56:58

>>25333
The world would be a better place if it was like this from the beginning.
Though... it's more likely than you think.
I've been working on a project that does this for the better part of a year. You load scripts exactly like that. It's a webassembly Lua-JS FFI but it needs work before it's stable.
For existing options, there's wasmoon, but it's not very serious (type marshaling is flaky and it doesn't do cross-runtime GC) and Fengari which isn't webassembly and isn't a real Lua VM. Fengari isn't bad though.

Report · Quote

Page 1 of 6 Older posts ›

Reply to this thread

Posting requires a durable account or a TripPass. Reading remains available.

Sign in or create or attach a TripPass to post. Browsing is open.