r/lua • • 8h ago

Project Lua course constructive criticism

0 Upvotes

I have been making a course for lua 5.4 that is self-paced and concludes with an intermediate capstone project for a portfolio. Please let me know if it's good or not. Please tell me why and how I can make it better or submit a PR to the repository.


r/lua • • 21h ago

Project Update on my dev tool

Thumbnail github.com
2 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 • • 16h 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 • • 6h ago

Project wisp v3.1.0 – A Linux shell in C++17 with Lua 5.4 for scripting, config, and typed pipelines

1 Upvotes

I just released wisp v3.1.0, a fast POSIX-style Linux shell written in C++17 (2,864 LOC, 344 KB stripped binary, ~0.55 ms startup) that embeds Lua 5.4 as its scripting, configuration, and pipeline language instead of a bespoke shell DSL.

Repo: https://github.com/Hinikaa/wisp

How Lua integrates into wisp

  • Global Lua functions become shell commands: Any global function defined in ~/.config/wisp/init.lua can be called directly at the prompt (hello world) with no alias wrapper syntax.
  • In-process structured pipelines: Consecutive Lua-function or builtin stages pass Lua values (tables, strings, numbers, booleans) directly from one stage's return value to the next without forking or text parsing. Only when a pipeline crosses into an external binary (grep, wc, etc.) does wisp fork and serialize at that boundary.
  • Inline Lua & script modes: Prefix any prompt or -c line with : for inline Lua (:1 + 1, with >>> multi-line continuation), use -e for one-liners, or -f script.lua / #!/usr/bin/env wisp for standalone scripts.
  • Prompt customization & tab completion: Define function prompt() in init.lua, and get tab completion for files, ~/, builtins, and dotted Lua tables (e.g. :string.up<Tab>) via vendored linenoise.

In ~/.config/wisp/init.lua:

-- ~/.config/wisp/init.lua
function nums(input)
  return { {n = 3}, {n = 1}, {n = 2} }
end

function sorted(input)
  table.sort(input, function(a, b) return a.n < b.n end)
  return input
end

And at the prompt:

wisp> nums | sorted
n=1
n=2
n=3
wisp> nums | sorted | wc -l

What's new in v3.1.0

  • Fixed filename tab-completion prefix bugs, added ~/ expansion, empty-base hidden-file filtering, and dotted Lua table completion
  • Fixed wisp -c / -f CPU spin in non-foreground TTYs and SIGPIPE crashes on native-to-external pipes
  • Added 3-state quoting protection so "*.cpp" and \*.cpp suppress globbing while "$VAR" still expands
  • Replaced startup luaL_dostring with direct Lua C API package.path / package.cpath updates, plus a self-contained bootstrap.lua build/test script alongside Makefile

Feedback and bug reports are welcome!