Lua-related technology [rss]

Anonymous >30d ago #p25285 >>quote
[AutoMod] action=keep R:9 E:8 N:7 C:9 | This is a solid, well-articulated argument for Lua's utility. It clearly outlines the technical advantages of the language effectively.
uli3wmg5i7vg1.png
uli3wmg5i7vg1.png
>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/
Attachments:
uli3wmg5i7vg1.png (link)
Replies: >>25287 >>25289 >>25293 >>25297 >>25302 >>25307 >>25314 >>25326 >>25335 >>25354 >>25358 >>25372 >>25376 >>25378 >>25397 >>25403 >>25404 >>25422 >>25430 >>25433 >>25437 >>25438 >>25445 >>25449 >>25453 >>25455 >>25470 >>25474 >>25481 >>25482 >>25494 >>25512 >>25559 >>25568
Anonymous >30d ago #p25286 >>quote
[AutoMod] action=keep R:10 E:9 N:9 C:10 | A solid, enthusiastic start to a technical discussion. It sets a good tone for the thread.
x3u8zKF.png
x3u8zKF.png
>>109231473
Congrats on first post
(You)
Attachments:
x3u8zKF.png (link)
Replies: >>25568
Anonymous >30d ago #p25287 >>quote
[AutoMod] action=keep R:8 E:8 N:7 C:9 | A direct, relevant question seeking specific information about Lua in the context of N64 emulation is excellent. It fits perfectly within the existing thread context.
>>25285
Anyone know a Nintendo 64 emulator with Lua scripting support? Emulation General Wiki isn't helping here.
Replies: >>25290 >>25457
Anonymous >30d ago #p25288 >>quote
[AutoMod] action=keep R:10 E:9 N:8 C:9 | A direct and relevant question seeking specific information about Lua scripting in N64 emulation is excellent. It directly addresses the thread's topic.
BTFOd by AngelScript
mpbp
Anonymous >30d ago #p25289 >>quote
[AutoMod] action=keep R:8 E:7 N:8 C:9 | The post shares a useful resource related to Lua technology. It directly answers the request for a favorite technology and provides a relevant link. The tone is engaging and appropriate for the forum.
>>25285
>ITT: Share your favorite Lua-related technology
This book by the textadept creator is pretty useful: https://orbitalquark.github.io/lua-quick-reference/
Replies: >>25291 >>25467
Anonymous >30d ago #p25290 >>quote
[AutoMod] action=keep R:10 E:10 N:9 C:9 | A direct, relevant response to the thread request. It encourages further discussion effectively.
>>25287
That's a cool idea, let me know if you find one
Replies: >>25292
Anonymous >30d ago #p25291 >>quote
[AutoMod] action=keep R:9 E:8 N:7 C:9 | The user provided relevant, high-quality resources directly addressing the thread's request. The links are legitimate and highly relevant to Lua programming.
>>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/
Anonymous >30d ago #p25292 >>quote
[AutoMod] action=keep R:9 E:8 N:7 C:9 | This post directly answers the implied request by suggesting relevant tools. It is concise and relevant to the thread context.
>>25290
Looks like BizHawk and mupen64-rr-lua are my best options.
Anonymous >30d ago #p25293 >>quote
[AutoMod] action=keep R:10 E:8 N:7 C:5 | The post is a direct, albeit short, expression of a strong opinion within the context of a technical discussion. It fits the context well.
>>25285
i hate lua
i hate the syntax, it just doesnt feel comfy programming it
Replies: >>25294
Anonymous >30d ago #p25294 >>quote
[AutoMod] action=keep R:9 E:8 N:7 C:9 | The user directly addresses the previous post and offers a specific, well-reasoned counterargument regarding Lua syntax comfort.
>>25293
I disagree, Lua syntax is very comfy.
Keyword-heavy syntax without a lot of semicolons or braces in general looks really nice.
Replies: >>25295
Anonymous >30d ago #p25295 >>quote
[AutoMod] action=keep R:8 E:7 N:6 C:8 | The user offers a strong, opinionated comparison between Lua and Python syntax. The writing is engaging and clearly expresses a personal preference, though it could be tighter.
>>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
Replies: >>25298
Anonymous >30d ago #p25296 >>quote
[AutoMod] action=keep R:10 E:10 N:9 C:9 | The post is a strong, opinionated statement within the context of a debate about Lua's merits. It fits the thread perfectly and is engaging.
lua.gif
lua.gif
Lua is very based.
Attachments:
lua.gif (link)
Anonymous >30d ago #p25297 >>quote
[AutoMod] action=keep R:10 E:5 N:7 C:9 | The post is a simple quote, providing context within the thread. It directly relates to the discussion about Lua and is relevant.
>>25285
>prosody xmpp server
>awesomeWM
>openresty
>luanti
Replies: >>25298
Anonymous >30d ago #p25298 >>quote
[AutoMod] action=keep R:9 E:8 N:7 C:9 | The post provides a solid, critical take on Lua's design flaws. The critique is sharp and well-articulated, fitting the sophisticated tone of the forum.
>>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
Replies: >>25483
中出し >30d ago #p25299 >>quote
[AutoMod] action=keep R:8 E:7 N:8 C:9 | The post directly addresses the thread topic with relevant, specific alternatives. The links provide good context for the discussion.
Lisp-tan_vs_C-tan.png
Lisp-tan_vs_C-tan.png
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
Attachments:
Lisp-tan_vs_C-tan.png (link)
Replies: >>25300
Anonymous >30d ago #p25300 >>quote
[AutoMod] action=keep R:10 E:8 N:10 C:9 | The post is a direct, relevant response to the thread context. It engages with the previous points effectively and adds a new perspective on the relationship between Lua and Lisp.
>>25299
>you will never be a real lisp
Replies: >>25301
Anonymous >30d ago #p25301 >>quote
[AutoMod] action=keep R:10 E:10 N:9 C:10 | The post directly addresses the core philosophical question raised by the thread context. It's a direct and relevant response to the preceding discussion.
>>25300
What is a "real lisp"? John McCarthy's LISP?
Anonymous >30d ago #p25302 >>quote
[AutoMod] action=keep R:9 E:8 N:7 C:9 | The post provides a concrete, relevant application for Lua in a complex project. It clearly connects LuaJIT to Minecraft modding, which is sophisticated and relevant to the software board.
wurzelcraft online shadowmapped y128 16 chunks.png
wurzelcraft online shadowmapped y128 16 chunks.png
>>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
Replies: >>25303 >>25304 >>25305 >>25306 >>25324
Anonymous >30d ago #p25303 >>quote
[AutoMod] action=queue R:1 E:2 N:1 C:5 | The post is a direct, low-effort response to a previous comment. It offers a very basic, unverified claim about hardware performance.
>>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
Anonymous >30d ago #p25304 >>quote
[AutoMod] action=keep R:8 E:7 N:5 C:8 | The post is a direct, albeit slightly dismissive, comment on the OP's project. It fits the context well and adds a relevant, albeit blunt, opinion.
>>25302
Cool project, but I hope you already know about Luanti (formerly minetest) and chose to make this anyways
Anonymous >30d ago #p25305 >>quote
[AutoMod] action=keep R:10 E:8 N:10 C:9 | This post is a direct, relevant response to the thread context. It offers a concise and engaging comment on the preceding discussion.
>>25302
>minecraft clone #3094809485
nice
Anonymous >30d ago #p25306 >>quote
[AutoMod] action=keep R:10 E:9 N:8 C:9 | A straightforward expression of fandom is perfectly fine in this context. It directly engages with the thread's topic and shows genuine appreciation for the discussed technology.
>>25302
I'm still fan of it
Anonymous >30d ago #p25307 >>quote
[AutoMod] action=keep R:10 E:8 N:9 C:9 | The user is asking a valid, challenging question about performance metrics for scripting languages. It directly engages the premise of the thread effectively.
>>25285
is it really fast?
aren't all scripting languages slow as fuck? what metric do they use to say it's fast?
Replies: >>25308 >>25448
Anonymous >30d ago #p25308 >>quote
[AutoMod] action=keep R:9 E:8 N:7 C:9 | The post provides a solid, evidence-based argument against the general assertion that all scripting languages are slow. It uses relevant comparisons to support its claim effectively.
>>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.
Replies: >>25309 >>25450
Anonymous >30d ago #p25309 >>quote
[AutoMod] action=keep R:9 E:8 N:7 C:9 | The user is engaging with the core topic of Lua's performance and use cases. The post is relevant and prompts further discussion effectively.
>>25308
and what can I do with it besides nvim plugins?
Replies: >>25310 >>25311
Anonymous >30d ago #p25310 >>quote
[AutoMod] action=keep R:9 E:8 N:7 C:9 | This post provides a solid, well-reasoned explanation of Lua's use cases. The examples are relevant and well-supported.
>>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)
Anonymous >30d ago #p25311 >>quote
[AutoMod] action=keep R:9 E:8 N:7 C:9 | The post offers a solid, nuanced perspective on the utility of Lua beyond simple plugin usage. It directly addresses the thread's core question with thoughtful insight.
>>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.
Replies: >>25312
Anonymous >30d ago #p25312 >>quote
[AutoMod] action=keep R:8 E:7 N:6 C:8 | The post offers a specific, debatable point about Lua's error handling. It engages directly with the thread's theme effectively.
>>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
Anonymous >30d ago #p25313 >>quote
[AutoMod] action=keep R:5 E:3 N:4 C:8 | The post is a very short, somewhat provocative statement referencing the thread context. It's low effort but fits the context of discussing Lua usage.
You can now use lual on lovr! *

* If you compile lovr yourself
Replies: >>25328
Anonymous >30d ago #p25314 >>quote
[AutoMod] action=keep R:9 E:8 N:7 C:9 | The post offers a strong, opinionated defense of Lua's utility in specific contexts. The argument is coherent and directly addresses the OP's premise effectively.
1760271481339258.png
1760271481339258.png
>>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.
Attachments:
1760271481339258.png (link)
Replies: >>25320
Anonymous >30d ago #p25315 >>quote
[AutoMod] action=keep R:10 E:10 N:9 C:9 | This is a direct, relevant response to the thread about Lua's capabilities. It directly addresses a technical point within the discussion effectively.
>arrays start from fucking 1
Replies: >>25321 >>25327 >>25353 >>25375 >>25424
Anonymous >30d ago #p25316 >>quote
[AutoMod] action=keep R:6 E:7 N:5 C:8 | The user is asking a direct comparison between Lua and Ruby for general scripting tasks. The comparison is relevant to the thread's theme.
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?
Replies: >>25322
Anonymous >30d ago #p25317 >>quote
[AutoMod] action=keep R:9 E:8 N:7 C:9 | This post directly addresses the thread topic with strong, confident claims. It provides a solid justification for using LuaJIT in various contexts.
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.
Anonymous >30d ago #p25318 >>quote
[AutoMod] action=keep R:10 E:10 N:9 C:9 | This is a direct, concise response to the thread context. It fits perfectly within the context of a discussion about Lua's utility.
>no continue
Anonymous >30d ago #p25319 >>quote
[AutoMod] action=keep R:10 E:9 N:8 C:9 | This is a solid, concise link to a relevant resource for a discussion on Lua technology. It directly supports the thread's topic effectively.
moon.jpg
moon.jpg
https://luakit.github.io
Attachments:
moon.jpg (link)
Anonymous >30d ago #p25320 >>quote
[AutoMod] action=keep R:10 E:8 N:7 C:9 | The post directly engages with the thread topic by offering a counter-argument to the original premise. It is well-reasoned and directly addresses the core debate.
>>25314
Actually, Lua is a garbage sandboxing language, so that use case is very far down on the list.
Anonymous >30d ago #p25321 >>quote
[AutoMod] action=keep R:10 E:9 N:8 C:3 | This post directly addresses a technical point in the thread with strong, assertive language. It effectively shuts down a semantic debate while maintaining a high level of technical engagement.
>>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.
Anonymous >30d ago #p25322 >>quote
[AutoMod] action=keep R:8 E:7 N:6 C:7 | The post directly engages with the technical debate about Lua's intended use. It's a solid contribution to the thread's discussion.
>>25316
Yeah you could, but it isn't what it was made for.
Anonymous >30d ago #p25323 >>quote
[AutoMod] action=keep R:9 E:8 N:7 C:9 | The post provides a concise and relevant fact about Lua's efficiency. It directly addresses the thread topic effectively.
fun fact: it takes fewer than 200 bytes of code+data to load lua library and execute a lua file.
Anonymous >30d ago #p25324 >>quote
[AutoMod] action=keep R:8 E:5 N:7 C:9 | The user is asking for a specific recommendation based on the preceding discussion. It's a direct follow-up to the thread's theme.
>>25302
very good bro! tell me, siir, witch cloud model does i need to use to make this like me?
Anonymous >30d ago #p25325 >>quote
[AutoMod] action=keep R:8 E:5 N:7 C:9 | The user is asking for a comparison between Lua and MicroPython, which is a relevant topic in the context of embedded scripting languages. The post is a direct response to the previous thread's context.
I'm more of a micropython guy
Anonymous >30d ago #p25326 >>quote
[AutoMod] action=keep R:8 E:7 N:6 C:8 | The post offers a direct, albeit slightly aggressive, response to the original thread. It engages with the topic of Lua's merits and introduces a specific technical concept. It's a solid contribution to the discussion.
>>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
Anonymous >30d ago #p25327 >>quote
[AutoMod] action=keep R:10 E:8 N:9 C:9 | The post directly addresses a technical point about array indexing in C versus Lua. It is a valid and relevant contribution to the discussion.
>>25315
In C arrays are 1 indexed
>but it starts from 0
It starts from offset 0 which means the first element.
Anonymous >30d ago #p25328 >>quote
[AutoMod] action=keep R:10 E:9 N:8 C:9 | The post directly addresses the thread topic with a direct question. It is relevant and well-formed.
>>25313
what's lual
Replies: >>25330 >>25331
SmoothPorcupine >30d ago #p25329 >>quote
[AutoMod] action=keep R:9 E:8 N:7 C:9 | The post directly addresses the thread topic with a strong, assertive claim. It's engaging and relevant to the discussion.
ITT: superior to a general in every way
Anonymous >30d ago #p25330 >>quote
[AutoMod] action=keep R:8 E:5 N:6 C:9 | A short, punchy response fits the thread context well. It directly addresses the topic with a strong claim.
>>25328
Lua Lizards
Anonymous >30d ago #p25331 >>quote
[AutoMod] action=keep R:9 E:8 N:7 C:9 | This is a direct and relevant response to the thread about Lua's utility. It fits perfectly within the context of the discussion.
>>25328
roblox lua
Replies: >>25332
Anonymous >30d ago #p25332 >>quote
[AutoMod] action=keep R:10 E:2 N:8 C:9 | A direct and relevant response to the thread context. It correctly identifies the specific variant being discussed.
>>25331
That's Luau
Replies: >>25339
Anonymous >30d ago #p25333 >>quote
[AutoMod] action=keep R:9 E:8 N:9 C:9 | This is a direct, relevant comparison within the context of Lua technology. It effectively prompts a discussion about the technical merits of using Lua versus JavaScript for embedding.
what if
<script type="text/lua"></script>
instead text/javascript
Replies: >>25334 >>25351
Anonymous >30d ago #p25334 >>quote
[AutoMod] action=keep R:9 E:9 N:8 C:9 | This post offers a technical comparison of Lua embedding options with good reasoning. The writing is clear and directly addresses the technical points.
>>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.
Replies: >>25338

p1/6 next >

[ reply ]