r/lua • • Feb 02 '25

What do you think of my desktop background?

Post image
73 Upvotes

r/lua • • May 09 '26

Library Tiny Lua Compiler: a complete educational Lua 5.1 compiler in a single Lua file

Thumbnail
github.com
72 Upvotes

r/lua • • Feb 26 '25

Discussion Anyone know of why Lua is so satisfying?

72 Upvotes

For context, I'm someone who has been self-taught since 8th grade (currently a senior) and learned only python until last year, when I started to branch out. I've looked into languages like C, C++, C#, and while I did enjoy C and C#, (I even wrote a crude but functional dynamic array in C, which was fun) but no other language feels the same way Lua does. While I do come from python, I actually do prefer types, I make sure to type annotate in python, so I don't think (at least in my case) it's because it's dynamically typed. While I'm still learning the below surface level stuff in Lua, I'm just finding Lua to be extremely enjoyable, anyone have any ideas why I and other people I know find Lua naturally enjoyable?


r/lua • • May 14 '26

Project I'm still working on my engine for PS1 games. More details in the comments.

70 Upvotes

r/lua • • Mar 18 '21

Project I made a Banner Designer (Or presentation card maker) in Lua for the terminal

Post image
70 Upvotes

r/lua • • Jul 18 '20

LuaJIT once again nearly as fast as the equivalent application in C++, lessons learned

70 Upvotes

After another ten evenings of optimization, I was able to speed up both the C++ and Lua versions of my Smalltalk-80 interpreter by a factor of more than twenty-five.

At first it looked as if the relative speed of the Lua version was getting worse compared to the C++ version, and as if the speed-up of LuaJIT was unreliable.

However, it turned out that with suitable settings of the JIT parameters a stable performance can be achieved, which is only a factor 1.1 slower than the C++ version. And this is not just some random micro benchmark, but a full Smalltalk-80 system running on LuaJIT.

The lesson for all those who complain about the unreliable performance of LuaJIT: check the JIT parameters!

For more information see https://github.com/rochus-keller/Smalltalk#a-smalltalk-80-interpreted-virtual-machine-on-luajit.


r/lua • • Apr 10 '17

LuaGB, a Gameboy emulator in pure Lua

Thumbnail
github.com
70 Upvotes

r/lua • • Oct 18 '25

Discussion I always come back to Lua

69 Upvotes

After strongly disliking other programming languages.
So, for a brief summary :
->Python is beautiful to read and write but suffers from poor performance. I know it also has JITs available but they are not very mature and mainstream. Great ecosystem and community but it would help to have a better and eventually officially supported JIT (I know one is in development but it's not a priority).
->Java hides primitives behind class walls. If you want to send an input word over sockets, you need a Scanner, an InputDataStream, an OutputDataStream, a Socket, a Buffer and whatever else objects do you need. And then keep passing primitives via object implementations and instantiate objects to retrieve primitives. Hurts my head too much...
->CSharp feels too locked in. Everyone says all you need is the .NET to build anything, truth is there are less libraries to choose from compared to Java. Also it's nicer to write than Java but it's very bloated. Too many things to consider, you can literally get the size of a string in three different ways. Too many ways of doing the same things leads to confusion IMO. Could be fine if I set my own conventions but jumping from codebase to codebase you have to deal with everyone's personal decisions on the code conventions.
->I didn't use Kotlin much but from what I've seen it doesn't feel like it's own programming language. It feels like a Java with less words. I find it weird when I import packages named "Java" in a Kotlin project. It's not necessarily about practicality but about feeling... feels weird. Feels like repainting your old fence and calling it a totally brand new fence.
->JavaScript is a language I personally hold responsible for ruining the web first and then ruining app development. If it wasn't for JavaScript I am pretty sure you'd still be able to rock 8GB RAM on a personal computer and still be able to do multitasking to some degree. Right now, 15 tabs of Mozzila consume me 20GB of RAM and most of them are static text (or should be treated as). A few years ago 4GB of RAM was enough to decently run GTA V but whatever.

So, after having to deal with Python's deploymenet and performance problems or getting burned down by Java's verbose and complex boilerplate nature, I always come back at Lua and be like "woah... this small runtime, this syntax any fool can grasp in a few hours and this small footprint". Literally, Lua is the only language I feel comfortable enough writing scalable code in and be sure that whenever I need I can optimize C/C++ backend code.

Sometimes I simply wish Lua was at least in 10 popular general purpose programming languages. Today, CSharp preacher will hate and trash on it even in game development (Microsoft fanatics I guess?). Also, dynamic typing isn't that hated of a features given the fact that var keywaord was introduced in Java and people started to use it like crazy even in production. Even JavaScript devs don't manually static type their variables and TypeScript is not as popular as it was. So, the excuse of static vs dynamic falls of IMO. We have MoonScript or even proper organized code and documented code can do the trick. But Lua is the warm place I always end up going back to whenever I get lost in other programming languages.


r/lua • • Mar 26 '25

I made mini Lua inside Lua in 10 minutes

68 Upvotes

This is just made in 10 minutes so don't expect it to be perfect.


r/lua • • Mar 12 '21

From r/prequelmemes

Post image
68 Upvotes

r/lua • • Feb 27 '26

luajit profiler that outputs a timeline with jit traces and a flamegraph view in static html

Post image
66 Upvotes

https://github.com/CapsAdmin/luajit-profiler

Single file with no dependencies except luajit. It does assume the modules jit.vmdef, jit.util and jit.p exist though.

local p = require('profiler').New() ... p:Stop()

This outputs a html page in the current directory. It's updated every 3 seconds, so if you hit refresh you should see more samples.


r/lua • • Jun 12 '22

Project Underwater scenery coded in Lua with the Harfang engine. All the particles and fishes are scripted as simple Lua functions, running on Lua 5.4. The scene is created using Harfang Studio editor. The rendering is using modern features such as SSR and SSGI. Feel free to ask if you have any question :)

66 Upvotes

r/lua • • Nov 29 '20

Discussion Lua vs Python

65 Upvotes

Hello all. I'm new to programming in general, I've been learning python for about a month now and my end goal is learning to automate my wife's busy work (she's a teacher), to make some applications, and a long time goal since I was a kid has been to develop games. I was looking at languages used for scripting in games when I discovered Lua. After some searching, I read some bold claims that Lua can pretty much do anything python can, but better, easier, and much much faster. Should I ditch python in favor of Lua? Any advice or just info in general would be much appreciated.


r/lua • • Dec 09 '16

LÖVR: Virtual reality for Lua inspired by LÖVE, initial 0.1.0 release

Thumbnail
bjornbyt.es
64 Upvotes

r/lua • • Dec 25 '25

Vectarine: A game framework for ultra fast prototyping

63 Upvotes

I really like Love2D for making games, but it is annoying to export on the web. I like participating in game jams on itch.io and having a web version for people to test is a must. Moreover, I need to restart my game when I make a change to see it which slows me down where coding. That's why I made https://github.com/vanyle/vectarine/ It is a hybrid between a framework and a game engine.

You write your game in Lua (or Luau) and as you save, you see changes instantly. Also, I've automated the export process to make is super simple + added a bunch of other helpful tools to simplify debugging

The engine's interface looks like this:

I'm open to feedback! There is a lot missing right now like Joystick support but I want to improve it over time.


r/lua • • Aug 02 '25

Learning lua

Post image
63 Upvotes

Trying to learn lua and take examples from models already made with scripts. Here the local "touched" kinda confuse me, was there a real need to make it this confusing? (also if someone can go over the vectors it would be great because why is it set to 0, 0, 0 if thats not the position of the block?).

Sorry I know this is a lot but im trying to understand and I started like 1 day ago


r/lua • • Jan 22 '25

Made a Tutorial to Learn Lua Quickly

Thumbnail
youtube.com
63 Upvotes

r/lua • • Oct 30 '22

I edited a great picture

Post image
63 Upvotes

r/lua • • Aug 12 '24

Lua = AWESOME * 1000 for Game Development.

62 Upvotes

I know you're saying Duh.......

I saw a video about the Playdate SDK and I thought that would be cool to make a game for my Son. Learned some basics of Lua, and then I see LÖVE 2D and I'm like get outta here with how easy it is to make a game with Lua.

Lua rocks man!!!!

Edit: I have to also give a shout out to https://www.youtube.com/@Challacade His tutorials on LÖVE 2D are so well done. His game Moonshire looks really cool too.


r/lua • • Jun 29 '26

LUA DS Algorithm Visualizer

61 Upvotes

The Online Lua Compiler & Algorithm Visualizer https://8gwifi.org/online-lua-compiler/

currently supporting
1D arrays (tables) — {1, 2, 3}, dense integer-keyed tables
2D arrays (nested tables) — {{1,2},{3,4}}
Maps / hash tables — tables with non-sequential or string keys
Linked lists & trees — node tables ({ val, next } / { val, left, right })
Console — print
Control flow — functions (incl. recursion)

Looking for feedback and Bug's appreciated


r/lua • • Dec 28 '23

Discussion Why does GIMP, Blender, OBS, and so many other popular open-source software today end up using Python as a scripting API language instead of Lua?

61 Upvotes

This has never made sense to me. Lua (and particularly LuaJIT) is designed to be an extremely lightweight and customizable scripting language for embedding into applications, and for this very reason it often is the choice for game engines. So then why does so much free software outside of the gaming industry end up using Python instead of Lua for its scripting API?


r/lua • • May 17 '21

I open sourced a game I just released that was written entirely in Lua

Thumbnail
github.com
61 Upvotes

r/lua • • Aug 31 '25

Discussion People who do lua for living, what is your job and what industry are you in?

60 Upvotes

I'm curious how you can earn money with lua besides modding/game dev :)


r/lua • • Oct 08 '22

You can make Lua compiled/statically typed using Teal... It's like TypeScript, but for Lua!

Thumbnail
youtu.be
60 Upvotes

r/lua • • Oct 28 '26

Is Lua a good first language for a total beginner with basic knowledge?

59 Upvotes

Hi everyone,

I'm pretty new to programming and I only know the absolute basics (variables, simple loops/functions).

I'm interested in picking up Lua because it seems lightweight and clean.

Since I don't have a massive programming background yet, I was wondering:

Is Lua a good language to really solidify those beginner programming concepts, or is it better suited as a secondary language?

I'd love to hear your experiences and any tips for starting out with Lua as a beginner!

Thanks in advance!