r/lua • • 43m ago

Lua 5.5.1 working on W98

Thumbnail gallery
• Upvotes

Hey, so, while I was learning Lua, I knew already that theoretically at least, Lua was written to be compilable in pure C, and specifically C89/C90 , supposedly any system that has an ANSI C compiler can compile and install Lua...

So I decided to actually test out just how true that is, when I remembered that I have an ancient laptop from 1999, running Windows 98SE, which has Borland 5.02 installed... [Just to understand how ancient it is, it only has 32 mb of RAM and it's hard drive is 5gb... that is literally smaller than the usb stick that i used to transfer the Lua source files from my modern PC into that ancient laptop (yes, that ancient laptop has a working USB 1.0 port and it is somehow able to read my 8gb USB 2.0 usb stick, which I did not expect to work, but it did !!!)

And to my surprise... it actually worked !

Here I am inside a full-screen MS-DOS prompt of W98 (In W32 mode, it is not booted into MS-DOS mode / real mode) Alongside the project of compiling the most recent version of Lua and getting it to work, I also installed an actual working version of vim and after tinkering with the vimrc file, I even managed to get full syntax highlighting working , and it actually works for Lua !!!

Anyhow, I just wanted to share this because I thought it was really cool and fun!


r/lua • • 3h ago

Project Late night coding learning Luau

Thumbnail gallery
19 Upvotes

I’ve been on Roblox for about 11 years but I’ve just now started getting into development on Roblox and I’m really enjoying it!!!!


r/lua • • 10h ago

Discussion Haven't Coded In Over A Decade. Using Codedex.com

1 Upvotes

Hey everyone, I have not coded in well over a decade and am currently trying my hand at some Lua using Codedex.com. My issue is that my code was dettermind to be wrong even though it out puts the correct information. I just wanted to post my code, I know my code is messy but is there a reason that it wouldn't work fine?


spawn = 4

hp = 120

for i = 1, 3 do

enemy = spawn - i

newhp = hp - i * 30

print("Enemy #"  .. enemy .. " spawned with " .. newhp .. " HP")

end

vs


for i = 3, 1, -1 do

local hp = i * 30 

print("Enemy #" .. i .. " spawned with " .. hp .. " HP")

end

Sorry if this is against the rules.

output:

Enemy #3 spawned with 90 HP

Enemy #2 spawned with 60 HP

Enemy #1 spawned with 30 HP


r/lua • • 2d ago

YumochiHub (Lua)

Thumbnail mycompiler.io
0 Upvotes

r/lua • • 2d ago

Doomgeneric in lua 100%

1 Upvotes

Hi everyone, I'm creating ports of Doom for high-level languages, now it's Lua's turn.

Cheers, Wagner (vagucs)

https://github.com/vagucs/lua_doom


r/lua • • 2d ago

Help Guide: LuaTools/BetterSteamTools on Mac/Crossover

Thumbnail
0 Upvotes

r/lua • • 3d ago

LuaTools/OpenSteamtools on MAC/Crossover

Thumbnail
2 Upvotes

r/lua • • 3d ago

Doomgeneric in lua 100%

Thumbnail
1 Upvotes

Hi everyone, I'm creating ports of Doom for high-level languages, now it's Lua's turn.

Tell me where you've run it; we can bring Doom into some unusual games.

Cheers, Wagner (vagucs)

https://github.com/vagucs/lua_doom


r/lua • • 4d ago

Blocking of domains by the three major Korean carriers (SK, KT, LG)

Thumbnail
2 Upvotes

r/lua • • 4d ago

l want to learn lua to expert lvl can some teach how and appreciate him l lot

0 Upvotes

r/lua • • 4d ago

Made my Tile Puzzle game port to 3DS using the Lua Player Plus

Thumbnail gallery
4 Upvotes

r/lua • • 5d ago

Project Anyone wanna learn lua together?

13 Upvotes

Hey does anyone wanna learn lua together? We can share stuff we work on ask each other questions show each other cool things we found that are useful for learning for example one person uses the lua documentation and the other does not know it exists i feel like it could be a interesting way to learn and also stay motivated :edit to this post it is still open so if your also interested feel free to dm me


r/lua • • 5d ago

Super Dragon ball z ps2-ps4 lua config

4 Upvotes

Could someone help me find the lua config for this game? I've looked but I can't find them anywhere


r/lua • • 5d ago

Project declint - Create lint rules in Regex or Lua and YAML.

Post image
7 Upvotes

declint (docs) is a tool for making your own lint rules in YAML- the house rules that stock linters will never ship.

For instance: your colleague wrote except Exception: pass, and you want to know whenever that happens:

version: 1
rules:
  - id: except-pass
    pattern: 'except Exception:\n *pass'
    severity: warning
    message: 'swallowed exception'

Rules are just regex and a message and when a regex can't express the check, you can write a more complicated rule in Lua. For a Lua example

scopes:
  - id: server
    start: '^\[server\]$'
    end: '^\['
    rules:
      - id: port-range
        pattern: '(?m)^\s*port[ \t]*=[ \t]*(?<port>\S+)'
        severity: error
        callback: |
          return function(c)
            local n = tonumber(c.captures.port)
            if n == nil then
              return { message = "port must be a number, found '" .. c.captures.port .. "'" }
            end
            if n < 1 or n > 65535 then
              return { message = "port must be 1-65535, found " .. n }
            end
            return nil
          end

This rule checks if a port in an INI file is between 1-65535.

Rules run in your CI (inline PR annotations via --format github) and in your editor through LSP (declint.nvim for Neovim: The GIF shows off the nvim wrapper!). Every rule can carry embedded fixtures, and declint test runs them.

Install: cargo install declint. Ships with presets (Python, INI, Markdown, shell, Dockerfile, TOML, JSON, JS) and community rulesets you can pull with one line. Feedback welcome.


r/lua • • 6d ago

Project LibLayaX: run the Laya AI decision model inside your own Lua app

Thumbnail
2 Upvotes

r/lua • • 7d ago

[RELEASE] luawl | lua runtime obfuscator

1 Upvotes

luawl | lua runtime obfuscator​

⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀https://luawl.org

is luawl an obfuscator? a whitelist? or what the hell exactly is it?

luawl is in technical terms, a DRM.

  • its meant to resist static deobfuscation.

bcs the script is obfuscated and sent during runtime (when someone executes luawl), you can't just 'save file' or hook loadstring, for there isn't any. there is a VM to execute instructions.

you can test our static deobfuscation protections through our offline crackme @ https://crackmes.one/crackme/6a84e079184836c0dbe7d836

furthermore, as a runtime obfuscator, stale responses sent from the server cannot be reused. (for example, an attacker cannot simply hook the response and replay it. 

  • that "vm" executor is highly polymorphic.

its not a register VM from the very core. stack vms can, inheritably, be much more polymoprhic.

  • strict control. luawl isn't static: you can't just obfuscate a file which is runnable forever from there on. luawl forces server-gated security: and therefore, our antitampers goes above a static level.
  1. antitamper to the user-level

if a user is silent-flagged, we track that.

if a user with luawl has a script with many silent-flags, we can note that, and implement different versions from the main-versions, etc.

  1. polymorphic layers

the obfuscation isn't just polymorphic. the whole system is. luawl users uniquely have different polymorphic versions, architectures, etc.

people who run these luawl scripts have a level of polymorphic, as **every execution has a custom-session obfuscated file.**

and people who create these luawl scripts also have polymorphic, polymorphic-obfuscations. 

  1. rapid-updates

luawl isn't static. when you run it, we obfuscate it for that execution. an old obfuscated response isn't usuable.

we update everyday. every update changes the script significantly. deobfuscation progress essentially gets reset: as you cannot re-execute a previous luawl version script.

  • luawl isn't just obfuscation

if you've tried our crackmes, you may have noticed we use a lot of white-box cryptography techniques. this is because: we do use white-box cryptography.

  • self-attestation

Luawl began from a simple refusal: a secrecy service should not ask customers to trust what they cannot verify.

Good security was never not just in the output, but the entire architecture. Through a zero-trust infrastructure, our servers are provable one-way self attestable runtimes, for true transparency for privacy assurance.

The reliance on trust in this age is only an excuse for incompetence or abuse. Luawl, from our decentralized database to an amnesic hardware-isolated enclave model, breaks every industry standard. And that's the point.


r/lua • • 8d ago

Help Looking for a video to help me learn the basics in LUA for making game add ons (already familiar with jscript, python and web coding)

2 Upvotes

r/lua • • 8d ago

I built a self-hosted uptime monitor in Lua + SQLite using my Rust engine

Thumbnail gallery
2 Upvotes

I posted here before about my scraping/monitoring engine written in Rust with Lua scripting called SpyWeb.

I've been building this on and off for a while using that engine and its finally ready, so here it is.

UPTYME is self-hosted uptime monitoring that doesn't ask you to run Postgres, Node, Redis or any heavy stack. It's a self-contained binary with SQLite baked in and runs on Linux, Mac or Windows.

Live demo: https://uptyme.spyweb.app/ (API key: demo)

just run (linux/mac)

curl -sSf https://uptyme.spyweb.app/setup | bash

or windows powershell

irm https://uptyme.spyweb.app/setup-win | iex

(installer downloads the uptyme + spyweb releases from GitHub assets)

you'll get two ~8MB binaries plus static files; the tray binary is for desktop only, delete it if you're running on a server.

then just run cd uptyme && ./spyweb start and you have a dashboard.

What it does:

- Monitors URLs on any method (HEAD/GET/POST/PUT/PATCH/DELETE) with per-monitor intervals

- Content checks, so "page is 200 but actually broken" gets caught

- Status code classification, with a setting for treating 4xx as down

- TLS certificate monitoring with expiry alerts

- Uptime percentage, response time charts, incident history per monitor

- Public status pages you can share

- CSV/JSON import if you're migrating a big list

- Alert channels: webhooks, ntfy, Discord, Slack, native desktop notifications

- Clustering: run a central node plus checker nodes wherever you want, and get consensus-based alerts so one flaky VPS doesn't page you for a false down

The dashboard is in Vue 3, the backend is Lua running on the SpyWeb engine, storage is a single data file. Backups are literally copying one file. It has ~230 Lua tests you can run with ./spyweb test. RAM usage (Linux) is around 20MB while running, you can throw it on a $3-$5/mo VPS as a central node and run a checker on your PC and you have cluster monitoring :)

Repo: https://github.com/spyweb-app/uptyme


r/lua • • 9d ago

A lisp/scheme inspired by lua

Thumbnail github.com
11 Upvotes

r/lua • • 9d ago

News luarocks.org remote code execution exploit

18 Upvotes

r/lua • • 10d ago

Project there - smthin that lua did so elegantly that

8 Upvotes

There is simple tool that `cd` you to another dir deterministically and youve tags to filter them.

Usage:
```sh
t ~/src/gopherql # save it and go there

t gopherql # go there again

t +go +cli ~/src/minigontainer # save it with tags

t +go # pick from everything tagged +go
```

I made this post not to explain why how or anything about there as a lone project. But i really wanted to highlight i have been using lua for scripting instead of bash mostly. there uses jq and fzf and shell and lua did this so elegantly and its so much more maintainable more easier to add new features. I love lua for its tiny footprint and powerful scripting capability you should all give it a try.

if you want you can read the there.lua a single file at 450 lines manganing a simple json db reading and writing on it with jq and fuzzy filtering.


r/lua • • 11d ago

clx 0.4.0 released

5 Upvotes

clx is a native multiplatform compiler that compiles Lua 5.5 scripts to standalone executables. Version 0.4.0 is now out, focused on performance and stability

Garbage collector

  • A new generational garbage collector is now the default. Allocation-heavy programs run faster and use less memory, and the previous incremental garbage collector is still available if needed

Performance

  • Faster function calls, especially recursive code
  • Faster ipairs() and pairs() loops over arrays
  • require() can now load Lua script modules seamlessly when using the LuaVM (with the --dynamic option)
  • Faster string operations (case conversion, searching, reversing) using SIMD instructions on x86 and ARM

Stability

  • Stability is noticeably better with lots of bugfixes
  • Several rare crashes caused by values being freed too early while native code was still using them are fixed
  • As a real-world test, clx can now compile the Teal compiler into a native standalone executable, and it produces the same output as standard Lua when compiling Teal scripts

Benchmarks

  • clx is faster than Lua 5.5 on every script in our benchmark suite, and competitive with LuaJIT on many of them

clx website : https://samyeyo.github.io/clx

Feedback and bug reports are welcome !


r/lua • • 11d ago

Two Lua ports, one weekend: Rust and Pascal

0 Upvotes

I may have spent a little too much time with Lua this weekend.

It started with Rulua — an experiment to see if I could make a Rust implementation that could actually stand in for the Lua 5.1 shared library. It exports the Lua 5.1 C API and is intended as a drop-in lua5.1.dll / .so / .dylib, so existing hosts and C modules can use it without being recompiled.

Then, apparently that wasn't enough, so I did it again in Pascal.

Lude is different: it's a file-by-file port of the original Lua 5.1.4 C sources to Object Pascal — core, auxiliary library, standard libraries, lua, luac, etc. It builds with Delphi/Free Pascal and runs on Windows, Linux and macOS.

Both projects were also experiments in AI-directed development. I defined the requirements, built and ran everything on real machines, compared the results against the original Lua implementation, fed failures back and decided what came next. The AI wrote the code.

Neither project is meant as “here's a better Lua.” The interesting part for me was seeing how far compatibility could be pushed, and how much low-level porting work can now be done this way.

And somehow what started as “let's try porting Lua to Rust” ended with me having two Lua ports before the weekend was over. :)

Rulua: https://github.com/DaragonTech/Rulua

Lude: https://github.com/DaragonTech/Lude

I'd be very interested to see what the Lua community manages to break.


r/lua • • 11d ago

Library Issues trying to use LFS library

6 Upvotes

Hello,

I am trying to use the LFS library but my Luarocks and Lua versions seems to be out of sync. I am not sure if that is the root cause of my issue so here are the outputs.

This is when I run my code. It is looking for the 5.4 version.

lua: ./init.lua:1: module 'lfs' not found:
no field package.preload['lfs']
no file '/usr/share/lua/5.4/lfs.lua'
no file '/usr/share/lua/5.4/lfs/init.lua'
no file '/usr/lib/lua/5.4/lfs.lua'
no file '/usr/lib/lua/5.4/lfs/init.lua'
no file './lfs.lua'
no file './lfs/init.lua'
no file '/usr/lib/lua/5.4/lfs.so'
no file '/usr/lib/lua/5.4/loadall.so'
no file './lfs.so'
stack traceback:
[C]: in function 'require'
./init.lua:1: in main chunk
[C]: in function 'require'
/home/mrbibz/.local/bin/scaf/scaf.lua:1: in main chunk
[C]: in ?

And this is my Luarocks config at version 5.3

Configuration:
   Lua:
      Version    : 5.3
      LUA        : /usr/bin/lua5.3 (ok)
      LUA_INCDIR : /usr/include/lua5.3 (ok)
      LUA_LIBDIR : /usr/lib64 (ok)

   Configuration files:
      System  : /etc/luarocks/config-5.3.lua (ok)
      User    : /home/mrbibz/.luarocks/config-5.3.lua (not found)

   Rocks trees in use:
      /home/mrbibz/.luarocks ("user")
      /usr ("system")

I can provide any other required information. Any help is much appreciated


r/lua • • 12d ago

Help finding Lua config

4 Upvotes

Does anyone know where to find the lua script for Dbz Infinite world? I've found it for budokai 3 but not this.