Lua - Reddit – Telegram
Lua - Reddit
30 subscribers
278 photos
31 videos
4.23K links
News and discussion for the Lua programming language.

Subreddit: https://www.reddit.com/r/lua

Powered by : @r_channels & @reddit2telegram
Download Telegram
LuaJIT Compiler

Successfully managed to make a compiler for luaJIT (a lua 5.1 fork/thing optimized for performance) in python
Works by getting the source code of luajit, rewriting the main .c file to execute a specific noscript instead of whatever you have as the first argument, and using a portable minGW thingy to compile it to EXE. (Dosent actually turn it into assembly, im not that good)

This is compatible with most lua noscripts that work for lua 5.1 or less, and luajit noscripts
Should i make it open source?
(I know luastatic exists, but this is way damn simpler)

https://preview.redd.it/aomysk89817g1.png?width=747&format=png&auto=webp&s=0251c0ce550bcdd15e83b3779bc027b9a6d57b65



https://redd.it/1plvch2
@r_lua
Roblox coding for everyone !

Hi there ! If you see this you may be a person that need a code for his Roblox game!
I'm here to help!
I was a rookie noscripter back then and I know how hard it is to code and make a game so everyone who will send me a message or a comment and I will get you the code (noscript) for acctualy free
If it has the limit of 200 words if not you will need to pay 400 Robux for extra 1000
Good luck!

https://redd.it/1plu6vo
@r_lua
I need some help with lua-periphery

Okay, so I'm making a silly little desktop toy for myself, as a way to learn some more advanced Lua and Love2d, running on a Raspi 4.

Here's the code so far: https://hastebin.cc/decutuhomu.lua

So here's what happens - it launches a window (because Love2D), and in the terminal it just waits. I have a little 4x3 matrix keypad wired up to the GPIO pins, and I can correctly get the button pressed. That part's all sorted. What's currently happening is it lets me press any button, but only registers a different button from the last pressed. ie, I can press 1 2 3, no problem. If I press the same button twice, it doesn't register. (I know why). How can I set this up to 'release' the button pressed?

The library I'm using is lua-periphery, (https://github.com/vsergeev/lua-periphery) which seems to be well documented, but as I'm a relative noob to Lua, the lack of examples isn't really helping.

Basically, I want to be able to press a button repeatedly, with each separate press counting.

https://redd.it/1pmzo5u
@r_lua
Showcase We are building a Lua 5.4 implementation distributable via NPM. It runs standard test suites, but we need help breaking it!

Hi everyone,

We’ve been working hard on TENUM, specifically on our Lua implementation (`tlua`). Our goal is to make modern app development fast and accessible, and a huge part of that is a robust Lua implementation.

We recently reached a milestone where we can successfully run foreign noscripts and testing frameworks (like `u-test`) without issues.

The Demo

I put together a quick video showing how to install the runtime and run a standard unit testing framework in under 2 minutes without any complex build chains:

https://youtu.be/QYODYqnkzvQ

How to try it:

If you have Node installed, it's just a one-line install:

```bash

npm install -g u/tenumdev

tlua your\
noscript.lua

Why we are posting here: While we are aiming for full Lua 5.4.8 compatibility, we know that the last 5% is the hardest. We are heavily hunting for edge cases right now.

We would love for the r/Lua community to:

1. Install tlua.
2. Throw your weirdest, most complex noscripts at it.
3. Report what breaks.

If you find an assertion failure or a noscript that behaves differently than the standard Lua interpreter, please provide an issue with a minimum test case on our GitHub. We are happy to introduce that test case to our suite and fix it immediately.

Repo: https://github.com/TENUM-Dev/tenum/tree/dev

Let us know what you think!

https://redd.it/1pn5pha
@r_lua
Ai with Lua?

Is there any ai that can write Lua coding for me that is free (not just free tier like fully free no limits) if your just gonna say something about ai slop or trash just skip this post

https://redd.it/1po4123
@r_lua
I need help executing lua files on VScode

(Sorry for bad english)
I'm using PopOS
Already installed lua with "sudo apt install 5.4" and everything is fine.

When I try to execute a file in VScode terminal with "lua5.4 filename.lua " or "lua filename.lua"
It appears "lua5.4: command not found"

Can someone help me please? Im new on Linux and dont know if I need to do another command on terminal.


https://redd.it/1pp8se1
@r_lua
How to prevent Lua from aborting the entire program

im trying to embed Lua 5.3.6 into a game, but i dont want lua to abort my program when it encouters an error, and i cant find a way to make sure these two functions are called in protected mode, the first function is called from a lua_CFunction, second is a lua_CFunction, i dont want to have to call all my c functions using pcall in lua, but im fine with pcall in cpp

GameObjectType get_GameObjectType(lua_State L, const int idx) {
void ud = luaL_checkudata(L, idx, "core.GameObjectType");
luaL_argcheck(L, ud != nullptr, idx, "GameObject expected");
return static_cast<GameObjectType
>(ud);
}

static int coregetroot (luaState *L) {
auto *game
objecttype = createGameObjectType(L);
try {
gameobjecttype->object = core::getroot();
} catch (const std::exception& e) {
luaL
error(L,e.what());
}

return 1;
};

https://redd.it/1pql0w6
@r_lua
Winter Games Tournament
https://redd.it/1pqthco
@r_lua
is luadist safe to install lua?

if not,how can i install it for windows 10

thanks:)

https://redd.it/1pt7x7o
@r_lua
Vectarine: A game framework for ultra fast prototyping

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:

https://preview.redd.it/tbochxvdcf9g1.png?width=1824&format=png&auto=webp&s=8f3178b29eadae72982997de4ef4a8d3ed4111e5

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

https://redd.it/1pvo97d
@r_lua