r/lua • • Dec 22 '25

Lua 5.5 released

Thumbnail groups.google.com
183 Upvotes

r/lua • • Nov 17 '22

Lua in 100 seconds

Thumbnail youtu.be
223 Upvotes

r/lua • • 4h ago

Project Update on my dev tool

Thumbnail github.com
4 Upvotes

v1.0.0 is officially out on GitHub!

After 5 days of heavy polishing, it’s feeling smooth and stable enough to ship as a proper 1.0.0 release. In testing, it has sped up my workflow by at least 10x, and even if you don't adopt the whole thing, it comes with reusable templates for keybinds, gamepad binding, and a state manager you can drop into your own LÖVE projects.

Media & Docs

Thanks to feedback from the community, the repo now includes:

  • A full video demo showing the tool in action
  • Reference images walking through the features

What’s Next

  • Visuals & Styling: Custom styling options are next on the roadmap toward 2.0.0 (alongside a few nice-to-haves and must-haves, which are becoming more obvious because I've been testing it and have been using it a ton). I will come back around to this project likely around a week from now.
  • g3d Native Voxel Map Editor: I’m shifting focus this weekend to my public beta voxel map editor—feel free to try it out if you're tinkering with groverburger/g3d in LÖVE.

Contributions

Forks and PRs are very welcome—whether for bug fixes, new features, or quality-of-life tweaks. Thanks to everyone who gave feedback and checks it out; I hope it saves you some time!

Have a happy turkey day everyone! :)


r/lua • • 7m ago

Project Lua is the Best Language for AI Agents

0 Upvotes

I've spent the past month working on Tuse, an AI agent written in Rust. But the agent itself writes Lua to work with files, run commands, access the network, and so on. Lua is its only tool. Everything goes through it.

You might be surprised that I use Lua for more than just config (obviously, Lua is the best language for that). I have models write Lua for everything. But what about Python and JavaScript? Don't models know those better? Why Lua?

I chose Lua for three reasons:

- Models are good at working with CPython and Node.js, but once you expose your own global functions, the choice of language doesn't make much difference.

- Python and JavaScript have a lot of features, which makes for heavier runtimes. Tuse is designed to run 100 instances on a single machine.

- Lua is simple and flexible, and its AST is much easier to work with.

Those are just the most obvious reasons. I think Lua will become the go-to language for code mode. Today's models write Lua just as well as they write Python, JavaScript, or Go.

If you want to try Tuse: https://github.com/ethanhamilthon/tuse


r/lua • • 22h ago

GNU Coreutils but re-implemented in pure Lua

31 Upvotes

A little while back i came up with the idea of rewriting gnu coreutils in a different language since i've seen it being rewritten in rust for newer versions of ubuntu and the fact that it's coming to windows (uutils). It uses luaposix to access the C posix functions in lua from these commands, some commands are not yet finished and others still need some tweaking to do. This isn't a direct replacement to GNU coreutils or anything like that but rather a hobby project i made simply for fun :3

https://github.com/JxJo1/lua-coreutils

Everything is a bit messy atm, i have very limited time to update the repo due to school catching up and other personal stuff. Feedback is much appreciated!


r/lua • • 14h ago

Prosody IM 13.0.8 released

Thumbnail blog.prosody.im
5 Upvotes

r/lua • • 1d ago

(esotheric technichs) Good book/blog to learn them?

6 Upvotes

lua has tons of bizarre methods to do amazing things, but i am yet to find a good source on them. any help?


r/lua • • 2d ago

LuaJIT FrameWork 2.0 for Windows x64 — native GUI, Unicode file I/O, and IPC

3 Upvotes

Hi r/lua! I’ve published FrameWork 2.0, a library for LuaJIT 2.1 on Windows x64. It has 50 modules covering Unicode file paths and strings, native GUI controls, process management, named pipes, shared memory, HTTP, SQLite, and ZIP archives.

For example, here’s how to write and read a file with a Unicode name:

dofile("FrameWork\\setup_paths.lua")

local fs = require("fs")
assert(fs.FileWrite("café.txt", "Hello from LuaJIT!\n", "UTF-8"))
print(assert(fs.FileRead("café.txt", "UTF-8")))

The project is MIT-licensed and includes an English API reference, runnable examples, and 35 GUI tutorials. FrameWork 2.0 on GitHub

If you use LuaJIT on Windows, which Windows API calls do you keep rewriting in your own projects? I’d also welcome feedback on the API and examples.Hi r/lua! I’ve published FrameWork 2.0, a library for LuaJIT 2.1 on Windows x64. It has 50 modules covering Unicode file paths and strings, native GUI controls, process management, named pipes, shared memory, HTTP, SQLite, and ZIP archives.For example, here’s how to write and read a file with a Unicode name:dofile("FrameWork\\setup_paths.lua")

local fs = require("fs")
assert(fs.FileWrite("café.txt", "Hello from LuaJIT!\n", "UTF-8"))
print(assert(fs.FileRead("café.txt", "UTF-8")))The project is MIT-licensed and includes an English API reference, runnable examples, and 35 GUI tutorials. FrameWork 2.0 on GitHubIf you use LuaJIT on Windows, which Windows API calls do you keep rewriting in your own projects? I’d also welcome feedback on the API and examples.


r/lua • • 3d ago

Project chroma.nvim – a lightweight Lua theming engine for Neovim with 99 built-in themes

Thumbnail gallery
4 Upvotes

r/lua • • 3d ago

Project i made a backup utility in lua

Thumbnail github.com
2 Upvotes

leave some feature requests if ya want

okthxbye


r/lua • • 3d ago

Project Unafraid Engine: my solo 2D/3D game engine with Lua and visual scripting

0 Upvotes

Hi! I’m the developer of Unafraid Engine, a 2D/3D game engine I’m working on solo. Lua is one of its scripting options, alongside a visual scripting graph. Both can be used in the same project.

The development preview is available here, with downloads and tutorials: https://unafraidengine.com/

It includes scene editing, 2D pixel-art and tilemap tools, and 3D model import. The preview is free for personal and noncommercial use; commercial projects require the Professional licence.

I’d be interested in feedback from people who already use Lua, especially on the scripting workflow and how easy the examples are to follow. If you try it, what’s the first small thing you’d want to script?


r/lua • • 5d ago

Project I created a UI builder tool for LOVE2d devs that speeds up the entirety of UI/MENU/HUD workflow.

Thumbnail github.com
23 Upvotes

This is a starter template/boilerplate that I made for all of your LOVE2d UI and HUD needs (screenshots in the repo). This repo solves the biggest time-wasters developers hit at the start of every new LOVE2d project:

- creating the UI, HUD, Main Menu, and Loading Screens from a fresh, easy to edit template, in-engine (runtime)

- Saves you from having to code input remapping, speeds up prototyping, gives you a pre-built structure for layering on-screen HUD elements over gameplay without cluttering main.lua

- Handles game-state wiring out of the box, and fully eliminates many repetitive actions that devs waste hours working by giving you all the tools and widgets you need to create, export, and integrate UI/HUD/etc. elements into your LOVE2d project

- Works with any LOVE2d project and does not require any external libraries

Know that it is a work in progress and will continue to receive updates for the foreseeable future. I also have other LOVE2d helper repos on my github, and more tools I have made to be polished up and posted soon for the community to use in their own LOVE2d projects. Thanks for checking it out!

Shout out to u/serasoft_alex for inspiration in polishing and posting the tool. I took a lot of inspiration from his recent game demo, Vaporwave EX Demo. Very inspiring work from him, thanks, Alex.


r/lua • • 4d ago

Project Title: JITLua 1.0.0: a LuaJIT 2.1 fork with Lua 5.4.9 semantics (Linux arm64/x86_64 only)

0 Upvotes

Built by LLM coding agents under human direction; details below.

JITLua-5.4 1.0.0 is a fork of LuaJIT 2.1 that runs the Lua 5.4.9 language and C API on LuaJIT's JIT compiler. It is not an official LuaJIT release and Mike Pall does not support it. It is not a drop-in replacement for stock LuaJIT, and it is not binary-compatible with PUC Lua.

What works: 64-bit integers next to floats, // and the bitwise operators, 5.4 for loop rules, goto, <const>/<close>, coroutine.close, __gc on tables, and the 5.4 standard library. LuaJIT's FFI, jit.* and bit.* are kept. The C API is source-compatible with PUC 5.4, so C modules must be rebuilt against JITLua's headers. A module built against PUC's headers that calls luaL_checkversion is refused at load.

Platforms: Linux arm64 and Linux x86_64 (GC64) only. The other LuaJIT backends do not build with the 5.4 changes. Windows and macOS are untested.

Verification: It is compared against PUC Lua 5.4.9 with a differential harness, with identical results on both architectures. The PUC test suite plus an edge-case corpus gives 696 PASS / 0 FAIL / 14 XFAIL / 3 SKIP. Three suite files that need PUC's internal test library T do not run. The ASan/UBSan run is 619 PASS / 0 FAIL / 4 XFAIL. Fuzzing is not a 1.0.0 gate and continues afterwards.

Differences: docs/DIFFERENCES.md lists them, each with its reason. They include a private bytecode dump format, one incremental collector ("generational" is accepted, but there is no separate generational collector), different stack and table size limits, and the LuaJIT 3.0 -> and continue syntax. The Lua 5.1 leftovers (unpack, module and so on) are off by default and can be enabled with a compile flag. A program written for LuaJIT 2.1 gets Lua 5.4 rules for numbers and for loops.

Performance: On the classic benchmarks it is within 10% of stock LuaJIT on both architectures. The exceptions are two workloads of about 10 ms or less, where a repeat measurement did not confirm the gap. It is faster than PUC 5.4.9 on every classic workload except scimark on x86_64, where PUC is 2.6% faster. These are medians of 3 on one host per architecture, so treat small differences as noise.

How it was built: LLM coding agents (Claude, DeepSeek and Qwen models) did the implementation under human direction. A second model reviewed each batch of changes before it was pushed. The differential tests are the evidence, not the process.

If you find a program that behaves differently from PUC 5.4.9 and the difference is not in DIFFERENCES.md, please open an issue. Repo and release notes: https://github.com/marfrit/JITLua-5.4 (tag v1.0.0)


r/lua • • 6d ago

Project I made an open source map editing tool for LOVE2d+g3d games

19 Upvotes

https://github.com/666mayn/LOVE2d-g3d-map-editor

You can easily integrate this simple g3d map editor into your game project to make creating maps a breeze, as long as it has g3d repo library. The editor doesn't interfere with or require other libraries. I just thought I'd share for any solo devs making a g3d love2d game. It essentially expects you to have 'map_editor/' in your root folder with all of the files in the LOVE2d-g3d-native-map-editor repo inside, and then you just write in your calls to open it in your game + save your texture types to the appropriate files. I'm really trying to get this out for the very few projects there seem to be for LOVE2d+g3d, I know it can be of great use to these specific developers, and developers looking for swift options in solo game development, as LOVE2d has been such a cherished engine for such development. That said, after about a year of playing around with LOVE2d and g3d, I decided this is just about the best tool I've made for my own solo development, and that I'd share. So here it is. Updated, polished, and packaged for integration.


r/lua • • 7d ago

Discussion Has anyone ever used luajit before?

13 Upvotes

I'm a C++ dev interested in lua and found out about lua jit as I was researching a way to substitute for python and bash scripting while also being easily embeddable.

Mainly looking at ffi.cdef for interoperability with C code for low level stuff. Has anyone tried it out?


r/lua • • 7d ago

Project Made a calculator in lua (first serious project) what do you guys think?

26 Upvotes
print('What is your first number?')
io.flush()
nr1 = io.read()
print('Operator? (+,-,/,*)')
io.flush()
op = io.read()
print('What is your second number?')
io.flush()
nr2 = io.read()

print('calculating...')
require("socket").sleep(0.2)
if op == '+' then
print(nr1 + nr2)
elseif op == '-' then
print(nr1 - nr2)
elseif op == '*' then
print(nr1 * nr2)
elseif op == '/' then
print(nr1 / nr2)
else print('invalid operator')
end

r/lua • • 9d ago

Help Is Defold or LOVR better for 3D lua development?

20 Upvotes

Would like to know the advantages and disadvantages of either engine. Would also like to know if there are good tutorials or learning resources available, other than documentation and AI. I noticed LOVR has pretty good documentation but if there are other good learning resources I'd love to know.


r/lua • • 9d ago

Help is there a better, more condensed way than doing this?

Post image
97 Upvotes

i've always just been made to view elseif chains as a mortal enemy so i'm wondering if there's a cleaner way than this

this is for a black clover-themed discord bot that more-or-less makes you a random character, i intend to make it a full-fledged text-based rpg but my focus before i get into that has been optimization, condensation, and just making it more readable overall

not looking for someone to "make me the better way", just point me in the right direction so i can learn rather than have my hand held, if it's even possible at all anyways

also,

the function of this scope is it checks a rolled number from a math.random(1,101) remote, after some testing i learned that it does essentially make this 6 times more likely to roll a common as it is a lower number, so i'm going to tweak around and fix that, so don't focus on that part if you also noticed it since, you know, i'm working on it


r/lua • • 11d ago

Project I created a project in Lua

11 Upvotes

Good evening, everyone. I’ve started building projection software for churches using Lua, with wxLua for the interface. Is Lua a good choice for this? Do you have any tips for me?


r/lua • • 10d ago

Lua tools

0 Upvotes

Does .lua file differs from steam acc. to steam acc or we can use the same .lua file in other steam acc.


r/lua • • 11d ago

Lua Pro adds busted tests, LuaCov coverage and stronger native Lua support

4 Upvotes

Hi all, I've been working on providing better Lua support in JetBrains products for a while now, and I've just published another big update. Lua Pro, 2026.1.6, adds busted gutter actions, test results, rerun-failed and failure navigation, plus LuaCov coverage in the standard JetBrains coverage view, so that it integrates with the native JetBrains toolings.

Other additions include native LuaCATS documentation/completion/hints, function usage counts, more quick-fixes and statement suppression, mixed-runtime directories, five framework presets, and remote/embedded attach with source mappings. Inline Function now supports statement bodies, multiple returns and varargs.

you can find the plugin here https://plugins.jetbrains.com/plugin/35721-lua-pro , feedback always welcome. Cheers.


r/lua • • 12d ago

Accessing the additional table information in the for loop

6 Upvotes

Hello Everyone,

I have crated a table that compares the values and print the highest one. But when I print a value only the information of the highest value is printed (for example: 61). I understand that in the for function, in the code below, key stands for 1, 2 or 3, while value is 61, 42 or 55. However, the keys are associated with names, and I would like for the code to print not the value nor key. So far no matter what I tried it did either give a different result or I got an error.

Gear_Head = {"Bhikku Crown +3", "Hes. Crown +4", "Mpaca's cap"}
Gear_Head["Accuracy"] = {}
Gear_Head["Accuracy"][1] = 61
Gear_Head["Accuracy"][2] = 42
Gear_Head["Accuracy"][3] = 55

--print(Gear_Head[1])
--print(Gear_Head["Accuracy"])
--print(Gear_Head["Accuracy"][1])
--print(Gear_Head["Accuracy"][2])

local accuracy = -math.huge

for key, value in ipairs(Gear_Head["Accuracy"]) do
  --print(key, value)
  
  if value > accuracy then
    accuracy = value
  end
  
  best_gear = key
  print(beast_gear)
end

--
print(accuracy)

(This is a learning code to test tables and for loops)


r/lua • • 12d ago

I built LuaC — a standalone Lua-to-machine-code compiler (JIT & AOT) in C99 with a custom Vulkan Studio & Android port

0 Upvotes

Hey everyone! I've been working on LuaC, a standalone compiler that translates Lua-like `.lua` files into machine code via generated C — without using the original Lua VM or LuaJIT.

Highlights:

- JIT & AOT: Compiles to native shared libraries (`dlopen`) at runtime or standalone executables.

- Ownership + Cycle Collector: Deterministic cleanup via reference ownership cells + lightweight cycle collection for cyclic tables/upvalues (no stop-the-world GC threads).

- LuaC Studio (Vulkan GUI): Built with Nuklear + a custom Vulkan renderer, featuring a code editor and a 2D Engine mode (60 Hz fixed-step physics).

- Android Port: Includes an APK build with multi-file project support and Vulkan viewport.

- Batteries included: 197 native APIs (JSON, TCP/UDP, mbedTLS HTTPS/WSS, miniaudio DSP, stackful coroutines).

Currently in Alpha 0.5.0 with prebuilt binaries via GitHub Actions. Would love any code review, C99/Vulkan feedback, or suggestions!

GitHub: https://github.com/ehekufa/LuaC/releases/tag/Alpha-0-5-0


r/lua • • 14d ago

Project Python LuaJIT bytecode decompiler with multiprocessing

Thumbnail github.com
7 Upvotes

r/lua • • 15d ago

Help Is it possible for a Lua script to read another .lua file as if it were just text?

17 Upvotes