Develop WinUI3 applications in Lua (WIP - Preview Video)
Hi everyone,
Here is a preview video of a new LuaRT module I'm working on that brings WinUI 3 support to the LuaRT Windows programming framework : https://www.youtube.com/watch?v=ghx1MSfTA1w
This means you will be able to build modern Windows desktop apps using pure Lua, with full access to Fluent UI controls, thanks to LuaRT builtin object oriented programming capabilities and asynchronous Task object implementation.
✅ No need for C++, .NET, or heavy frameworks.
✅ Native WinUI 3 integration
✅ Clean, expressive Lua syntax
✅ Compatible with LuaRT static compilation and binary modules
✅ Example from the video with dependencies statically compiled as a standalone executable : only 600kb, no other dependencies (even Microsoft.WindowsAppRuntime.Bootstrap.dll is not needed)
This is a big step toward making professional-grade UIs accessible to Windows Lua developers. I hope to release a first version soon.
You can find more about LuaRT, the Windows programming framework for Lua at https://luart.org
https://redd.it/1nzltj8
@r_lua
Hi everyone,
Here is a preview video of a new LuaRT module I'm working on that brings WinUI 3 support to the LuaRT Windows programming framework : https://www.youtube.com/watch?v=ghx1MSfTA1w
This means you will be able to build modern Windows desktop apps using pure Lua, with full access to Fluent UI controls, thanks to LuaRT builtin object oriented programming capabilities and asynchronous Task object implementation.
✅ No need for C++, .NET, or heavy frameworks.
✅ Native WinUI 3 integration
✅ Clean, expressive Lua syntax
✅ Compatible with LuaRT static compilation and binary modules
✅ Example from the video with dependencies statically compiled as a standalone executable : only 600kb, no other dependencies (even Microsoft.WindowsAppRuntime.Bootstrap.dll is not needed)
This is a big step toward making professional-grade UIs accessible to Windows Lua developers. I hope to release a first version soon.
You can find more about LuaRT, the Windows programming framework for Lua at https://luart.org
https://redd.it/1nzltj8
@r_lua
YouTube
WinUI3 for Lua Preview
Discover the preview for winui module for LuaRT that will support WinUI3
Bringing the full power of modern Windows desktop interfaces to the simplicity of Lua noscripting.
This module bridges the gap between native Fluent UI design and lightweight, expressive…
Bringing the full power of modern Windows desktop interfaces to the simplicity of Lua noscripting.
This module bridges the gap between native Fluent UI design and lightweight, expressive…
How to detect memory leaks when working with LuaJIT FFI?
What the noscript says.
I'm trying to use LuaJIT FFI to make tiny-ish games for my Miyoo Mini with SDL. The issue is that I have no clue how one would check for memory leaks. It is relatively straightforward with
https://redd.it/1nzm3td
@r_lua
What the noscript says.
I'm trying to use LuaJIT FFI to make tiny-ish games for my Miyoo Mini with SDL. The issue is that I have no clue how one would check for memory leaks. It is relatively straightforward with
valgrind for compiled programs, but is there anything similar to use with LuaJIT?https://redd.it/1nzm3td
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
Lua noscript not working for turret in stormworks
Hello everyone who is here i need to help with this code scanAngle = 0
function onTick()
local tx = input.getNumber(1)
local ty = input.getNumber(2)
local tz = input.getNumber(3)
local hasPlayer = input.getBool(1)
local yaw, pitch
if hasPlayer then
yaw = math.atan2(tx, tz) / math.pi
pitch = -math.atan2(ty, math.sqrt(txtx + tztz)) / (math.pi/2)
output.setBool(3, true)
else
scanAngle = scanAngle + 0.02
if scanAngle > math.pi then scanAngle = -math.pi end
yaw = scanAngle / math.pi
pitch = 0
output.setBool(3, false)
end
output.setNumber(1, yaw)
output.setNumber(2, pitch)
end
This code is for turret in stormworks its need to find a seat and start shooting error is not working
https://redd.it/1o11yv4
@r_lua
Hello everyone who is here i need to help with this code scanAngle = 0
function onTick()
local tx = input.getNumber(1)
local ty = input.getNumber(2)
local tz = input.getNumber(3)
local hasPlayer = input.getBool(1)
local yaw, pitch
if hasPlayer then
yaw = math.atan2(tx, tz) / math.pi
pitch = -math.atan2(ty, math.sqrt(txtx + tztz)) / (math.pi/2)
output.setBool(3, true)
else
scanAngle = scanAngle + 0.02
if scanAngle > math.pi then scanAngle = -math.pi end
yaw = scanAngle / math.pi
pitch = 0
output.setBool(3, false)
end
output.setNumber(1, yaw)
output.setNumber(2, pitch)
end
This code is for turret in stormworks its need to find a seat and start shooting error is not working
https://redd.it/1o11yv4
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
Require modules are unknown
Hello,
I’m working with lua/love 2d because I’d like to learn game dev, but I have an issue concerning the require of modules. For whatever reason, it always cast my variable containing the module as « unkown » even tho the module in question contain types.
I use Zellij with lazyvim as a dev environment and I already have lsp setup.
In VSCode for example, I don’t have issues when importing modules that contain types.
Anyone had the same kind of problem when using neovim/lazyvim and lua types?
Thank you.
https://redd.it/1o3be8o
@r_lua
Hello,
I’m working with lua/love 2d because I’d like to learn game dev, but I have an issue concerning the require of modules. For whatever reason, it always cast my variable containing the module as « unkown » even tho the module in question contain types.
I use Zellij with lazyvim as a dev environment and I already have lsp setup.
In VSCode for example, I don’t have issues when importing modules that contain types.
Anyone had the same kind of problem when using neovim/lazyvim and lua types?
Thank you.
https://redd.it/1o3be8o
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
I'm building a platform that lets you create Roblox games without any code. What features would you want to see?
https://lobbies.dev
https://redd.it/1o3puea
@r_lua
https://lobbies.dev
https://redd.it/1o3puea
@r_lua
lobbies.dev
lobbies.dev | AI-Powered Multiplayer Game Creation on Roblox
Create entire multiplayer worlds on Roblox using only text prompts. Join the waitlist to be the first to build with AI.
Indexing table constructor: return {2,8}dice(2) ???
I know that you can make it work by putting parenthesis around the table, but why doesn't it work without the parenthesis?
-- works
return ({2,8})dice(2)
-- doesn't work
return {2,8}dice(2)
https://redd.it/1o51g7h
@r_lua
I know that you can make it work by putting parenthesis around the table, but why doesn't it work without the parenthesis?
-- works
return ({2,8})dice(2)
-- doesn't work
return {2,8}dice(2)
https://redd.it/1o51g7h
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
Push the Button: Using LuaJIT + FFI + CoreBluetooth with an async design to automate a trivial task
https://github.com/mogenson/switchbot.lua
https://redd.it/1o52xjr
@r_lua
https://github.com/mogenson/switchbot.lua
https://redd.it/1o52xjr
@r_lua
GitHub
GitHub - mogenson/switchbot.lua: Use LuaJIT + FFI + CoreBluetooth to push the button
Use LuaJIT + FFI + CoreBluetooth to push the button - mogenson/switchbot.lua
Need to Learn how to Lua Script For roblox basics
i need to know Lua noscripting to make some games pls give me relativley quick and easy ways to learn
https://redd.it/1o5574w
@r_lua
i need to know Lua noscripting to make some games pls give me relativley quick and easy ways to learn
https://redd.it/1o5574w
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
I made a noscript that automates “Please Donate” and earned 80k+ Robux in 2 weeks
Hey everyone,
I’ve been experimenting with automation inside Roblox’s “Please Donate” game and decided to build a small noscript to handle all the boring parts — keeping the booth active, refreshing messages, and thanking donors automatically.
After running it for a couple of weeks, I ended up earning over 80,000 Robux completely AFK. I honestly didn’t expect it to work that well.
I’ve cleaned it up, made it beginner-friendly, and documented how to set it up safely without breaking any Roblox terms. If you’re curious about the technical side or want to see a demo of how it works, feel free to DM me or ask questions here.
Not trying to spam or break any rules — just wanted to share what I built and see if others would find it useful.
https://redd.it/1o59u1d
@r_lua
Hey everyone,
I’ve been experimenting with automation inside Roblox’s “Please Donate” game and decided to build a small noscript to handle all the boring parts — keeping the booth active, refreshing messages, and thanking donors automatically.
After running it for a couple of weeks, I ended up earning over 80,000 Robux completely AFK. I honestly didn’t expect it to work that well.
I’ve cleaned it up, made it beginner-friendly, and documented how to set it up safely without breaking any Roblox terms. If you’re curious about the technical side or want to see a demo of how it works, feel free to DM me or ask questions here.
Not trying to spam or break any rules — just wanted to share what I built and see if others would find it useful.
https://redd.it/1o59u1d
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
SuperStrict the first "linter" written in pure Lua
Super Strict is a Lua library (compatible with Lua 5.1, 5.2, 5.3 and LuaJIT) that finds undeclared variables and other minor mistakes in your source code. Super Strict tests your Lua noscripts during loading using static analysis. Super Strict is very secure because it can be used without downloading, installing or running any pre-compiled binaries.
The source code is currently available on GitHub and the documentation is hosted on 2dengine.com
https://redd.it/1o5ig07
@r_lua
Super Strict is a Lua library (compatible with Lua 5.1, 5.2, 5.3 and LuaJIT) that finds undeclared variables and other minor mistakes in your source code. Super Strict tests your Lua noscripts during loading using static analysis. Super Strict is very secure because it can be used without downloading, installing or running any pre-compiled binaries.
The source code is currently available on GitHub and the documentation is hosted on 2dengine.com
https://redd.it/1o5ig07
@r_lua
GitHub
GitHub - 2dengine/sstrict.lua: Detect mistakes in your Lua source code
Detect mistakes in your Lua source code. Contribute to 2dengine/sstrict.lua development by creating an account on GitHub.
Dispel, Lua Runtime
The other day I created Dispel, a runtime for Lua that aims to be something like Bun does in JavaScript. This is a personal project to understand how a runtime it's implemented and I want to do my best but I want to know which things might be interesting to add, let me know here!
Also if you want to contribute in the future once I add more code to suggest features or help with fixes, I leave the repo here:
https://github.com/NotHurtGarci/dispel
https://redd.it/1o5lfej
@r_lua
The other day I created Dispel, a runtime for Lua that aims to be something like Bun does in JavaScript. This is a personal project to understand how a runtime it's implemented and I want to do my best but I want to know which things might be interesting to add, let me know here!
Also if you want to contribute in the future once I add more code to suggest features or help with fixes, I leave the repo here:
https://github.com/NotHurtGarci/dispel
https://redd.it/1o5lfej
@r_lua
GitHub
GitHub - NotHurtGarci/dispel: Dispel is a modern Lua runtime backend built on a C/LuaJIT core.
Dispel is a modern Lua runtime backend built on a C/LuaJIT core. - GitHub - NotHurtGarci/dispel: Dispel is a modern Lua runtime backend built on a C/LuaJIT core.
Should I use Lua 5.4 or 5.5?
Hi everyone. I'm close to releasing an app that uses Lua heavily. I've decided not to go with 5.1 or LuaJIT, because I want my app's users to have full access to the latest libraries on LuaRocks, and the widest compatibility with the general Lua ecosystem. But I'm on the fence about using 5.4 or 5.5. On one hand, clearly 5.5 is the future, and eventually I'll have to update to it anyway. On the other hand, 5.5 is still in beta, and I'm not sure how many LuaRocks modules would be incompatible with it. Any feedback would be helpful and appreciated.
https://redd.it/1o5q167
@r_lua
Hi everyone. I'm close to releasing an app that uses Lua heavily. I've decided not to go with 5.1 or LuaJIT, because I want my app's users to have full access to the latest libraries on LuaRocks, and the widest compatibility with the general Lua ecosystem. But I'm on the fence about using 5.4 or 5.5. On one hand, clearly 5.5 is the future, and eventually I'll have to update to it anyway. On the other hand, 5.5 is still in beta, and I'm not sure how many LuaRocks modules would be incompatible with it. Any feedback would be helpful and appreciated.
https://redd.it/1o5q167
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
What is the best way to learn Lua for someone with zero knowledge of programming and almost zero knowledge of math?
In the past 2 years I dipped my toe in several /r/mud games. Those are classic online, multiplayer, text-based games. MMORPGs emerged from MUDs.
Like most people I eventually had ideas of making my own MUD. But those games are far from trivial to make and maintain, especially for someone lacking any coding skills.
However, MUD clients allow for great customization. You can build entire interfaces that are both functional and aesthetically pleasing, making these games more approachable to many players. Especially beginners.
I noticed that the two major clients (Mushclient and Mudlet, which I prefer) can be fully noscripted in Lua.
I figured that is something I can do. It will still be fairly difficult for someone like me, but it's something I can do in one or two years. While making a full blown MUD can take five years to a decade for a beginner.
I'll choose a game and create omplete interface that is still text focused for it. Unlike other interfaces I woll give preference for keyboard input while making it more convenient. Ideally no one should be forced to take their hand away from the keyboard on a MUD. But that doesn't mean actually typing text from start to finish. That is my philosophy.
Perhaps by doing so I'll learn a thing or two about designing interfaces for MUDs, so I can generalize some principles and create interfaces for other games as well.
Anyway, I probably talked way more than I had to already ;)
I appreciate any suggestions.
https://redd.it/1o61xbl
@r_lua
In the past 2 years I dipped my toe in several /r/mud games. Those are classic online, multiplayer, text-based games. MMORPGs emerged from MUDs.
Like most people I eventually had ideas of making my own MUD. But those games are far from trivial to make and maintain, especially for someone lacking any coding skills.
However, MUD clients allow for great customization. You can build entire interfaces that are both functional and aesthetically pleasing, making these games more approachable to many players. Especially beginners.
I noticed that the two major clients (Mushclient and Mudlet, which I prefer) can be fully noscripted in Lua.
I figured that is something I can do. It will still be fairly difficult for someone like me, but it's something I can do in one or two years. While making a full blown MUD can take five years to a decade for a beginner.
I'll choose a game and create omplete interface that is still text focused for it. Unlike other interfaces I woll give preference for keyboard input while making it more convenient. Ideally no one should be forced to take their hand away from the keyboard on a MUD. But that doesn't mean actually typing text from start to finish. That is my philosophy.
Perhaps by doing so I'll learn a thing or two about designing interfaces for MUDs, so I can generalize some principles and create interfaces for other games as well.
Anyway, I probably talked way more than I had to already ;)
I appreciate any suggestions.
https://redd.it/1o61xbl
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
Official Lua Book
Hello, did anyone here bought and read Programming in Lua by R. Lerusalimschy, one of the few official books released by lua team??? How long it take you to learn lua with that book and what review would you give?
https://redd.it/1o6da0p
@r_lua
Hello, did anyone here bought and read Programming in Lua by R. Lerusalimschy, one of the few official books released by lua team??? How long it take you to learn lua with that book and what review would you give?
https://redd.it/1o6da0p
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
Having real trouble installing SciLua
Hi folks,
I use debian 12 and started learning lua with intent to use it in science. For this, I would like a library that could perform more advanced mathematical calculations. I found one that seems to be really fit for my intended use called SciLua, but no success in making it work. I already installed (or gave my best shot) at installing luajit and the other dependencies from scilua. Can someone help me out with the installation process? Is there another alternative for this library? Thanks
https://redd.it/1o7u37l
@r_lua
Hi folks,
I use debian 12 and started learning lua with intent to use it in science. For this, I would like a library that could perform more advanced mathematical calculations. I found one that seems to be really fit for my intended use called SciLua, but no success in making it work. I already installed (or gave my best shot) at installing luajit and the other dependencies from scilua. Can someone help me out with the installation process? Is there another alternative for this library? Thanks
https://redd.it/1o7u37l
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
How and where do i start learning lua for noscripting roblox games
I want to start noscripting in roblox but i don’t know where or how to learn lua so im just looking for advice please and thank you
https://redd.it/1o8keda
@r_lua
I want to start noscripting in roblox but i don’t know where or how to learn lua so im just looking for advice please and thank you
https://redd.it/1o8keda
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
I always come back to Lua
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.
https://redd.it/1o9wq20
@r_lua
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.
https://redd.it/1o9wq20
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community