Can't set up Lua
Hi. I am trying to practice Lua and i downloaded Lua 5.1 as it was the recommended version. Latest tutorials are a lot different and show only four files after extraction. Old version shows many files after extraction and I can't make it work.
I have mingw installed and it is on the path. It also shows up when I use gcc --version. But I have no idea how to add Lua's file as command is not working as given in the guide. Version is exactly 5.1 and I want some help.
Make clean, make mingw aren't working even after I use with different case (capital and small letter) so I thought of asking here. I used command in the Lua-5.1 sub directory which is inside Lua-5.1 directory under temp main directory.
I am thinking of setting up at the hardware level so I can manually compile it using terminal in VSCodium.
I am setting up this for practice and do you think Lua is good language to make programming foundation strong?
What other things will I need for Lua?
https://redd.it/1ksuox2
@r_lua
Hi. I am trying to practice Lua and i downloaded Lua 5.1 as it was the recommended version. Latest tutorials are a lot different and show only four files after extraction. Old version shows many files after extraction and I can't make it work.
I have mingw installed and it is on the path. It also shows up when I use gcc --version. But I have no idea how to add Lua's file as command is not working as given in the guide. Version is exactly 5.1 and I want some help.
Make clean, make mingw aren't working even after I use with different case (capital and small letter) so I thought of asking here. I used command in the Lua-5.1 sub directory which is inside Lua-5.1 directory under temp main directory.
I am thinking of setting up at the hardware level so I can manually compile it using terminal in VSCodium.
I am setting up this for practice and do you think Lua is good language to make programming foundation strong?
What other things will I need for Lua?
https://redd.it/1ksuox2
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
Lua deobfuscation
please, deobfuscate this lua. I need this https://files.catbox.moe/6gtypf.lua
https://redd.it/1kt3dgq
@r_lua
please, deobfuscate this lua. I need this https://files.catbox.moe/6gtypf.lua
https://redd.it/1kt3dgq
@r_lua
Any thoughts on why Fennel isn’t more widely used?
So many nice features added to the Lua runtime such as locally scoped variables, macros, closures, keywords/symbols etc.
Is it because it’s a lisp dialect?
https://redd.it/1kt88qe
@r_lua
So many nice features added to the Lua runtime such as locally scoped variables, macros, closures, keywords/symbols etc.
Is it because it’s a lisp dialect?
https://redd.it/1kt88qe
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
Best Lua tutorial playlist?
I'm brand new to everything code. I started following "steve's teacher" but was wondering if he is the way to go? Is there someone who is the gold standard of tutorials?
https://redd.it/1ktpj3m
@r_lua
I'm brand new to everything code. I started following "steve's teacher" but was wondering if he is the way to go? Is there someone who is the gold standard of tutorials?
https://redd.it/1ktpj3m
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
Would appreciate feedback on code/structure/best practices
Hello!
I'm somewhat new to Lua and Love2d. To get started, I thought I would make a matching style game as it would require me to try out the basics while having a clear goal I think is achievable.
This has gotten quite messy, with all kinds of 'classes' that are being passed all over the place, to and through each other. I'm planning on rewriting a lot of this with things I picked up from Olivine-Labs, but it doesn't really cover how classes/structures should be set up/contained/interact with others.
All constructive feedback is greatly appreciated.
GitHub Repository
https://redd.it/1ku2qvd
@r_lua
Hello!
I'm somewhat new to Lua and Love2d. To get started, I thought I would make a matching style game as it would require me to try out the basics while having a clear goal I think is achievable.
This has gotten quite messy, with all kinds of 'classes' that are being passed all over the place, to and through each other. I'm planning on rewriting a lot of this with things I picked up from Olivine-Labs, but it doesn't really cover how classes/structures should be set up/contained/interact with others.
All constructive feedback is greatly appreciated.
GitHub Repository
https://redd.it/1ku2qvd
@r_lua
GitHub
GitHub - Olivine-Labs/lua-style-guide: Olivine Labs Lua Style Guide
Olivine Labs Lua Style Guide. Contribute to Olivine-Labs/lua-style-guide development by creating an account on GitHub.
Coder for gmod
Im looking for coder / developer for my gmod server dayz server i need to fix some problmes in the files good price for the 1 who can do it
https://redd.it/1kuhi9j
@r_lua
Im looking for coder / developer for my gmod server dayz server i need to fix some problmes in the files good price for the 1 who can do it
https://redd.it/1kuhi9j
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
pipe operators in lua are weirdly satisfying
been playing with pluto, some superset of lua
local { http, json } = require "*"
local top_lua_repos = http.request("https://api.github.com/search/repositories?q=language:lua&sort=stars")
|> json.decode
|> |data| -> data.items
|> |items| -> items:filter(|r| -> r.stargazers_count > 1000)
for i = 1, math.min(5, #top_lua_repos) do
local repo = top_lua_repos[i]
print($"{repo.name} ({repo.stargazers_count} stars)")
end
reads like "fetch → decode → filter → print" instead of a bunch of nested calls. also has string interpolation which is nice.
https://redd.it/1kukuo0
@r_lua
been playing with pluto, some superset of lua
local { http, json } = require "*"
local top_lua_repos = http.request("https://api.github.com/search/repositories?q=language:lua&sort=stars")
|> json.decode
|> |data| -> data.items
|> |items| -> items:filter(|r| -> r.stargazers_count > 1000)
for i = 1, math.min(5, #top_lua_repos) do
local repo = top_lua_repos[i]
print($"{repo.name} ({repo.stargazers_count} stars)")
end
reads like "fetch → decode → filter → print" instead of a bunch of nested calls. also has string interpolation which is nice.
https://redd.it/1kukuo0
@r_lua
Any interest in a library for real arraylists?
local list = require('list')
for k, v in ipairs(list(2, 1, nil, "hello", 5)) do
print(k .. " : " .. tostring(v))
end
Prints:
1 : 2
2 : 1
3 : nil
4 : hello
5 : 5
for reference:
for k, v in ipairs({2, 1, nil, "hello", 5}) do
print(k .. " : " .. tostring(v))
end
prints
1 : 2
2 : 1
Im working on it as an experiment, trying to judge if people would actually want it with this post to see how far with it I should go. Should it have all the niceties tables have and a whole iterator library? Or is this just to be an experiment that I use personally for fun? Throw some comments this way to let me know (or upvotes I guess but I want to hear your thoughts)
https://redd.it/1kuohq3
@r_lua
local list = require('list')
for k, v in ipairs(list(2, 1, nil, "hello", 5)) do
print(k .. " : " .. tostring(v))
end
Prints:
1 : 2
2 : 1
3 : nil
4 : hello
5 : 5
for reference:
for k, v in ipairs({2, 1, nil, "hello", 5}) do
print(k .. " : " .. tostring(v))
end
prints
1 : 2
2 : 1
Im working on it as an experiment, trying to judge if people would actually want it with this post to see how far with it I should go. Should it have all the niceties tables have and a whole iterator library? Or is this just to be an experiment that I use personally for fun? Throw some comments this way to let me know (or upvotes I guess but I want to hear your thoughts)
https://redd.it/1kuohq3
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
I need help finishing this plugin I've developed for Lightroom Classic. I will pay anyone that can help get it working. It's LUA
https://redd.it/1kusswl
@r_lua
https://redd.it/1kusswl
@r_lua
Is there a way to push custom debug information from the Lua/C-API?
I'd like to provide Lua with additional debug info when interacting with it from C. I want to push
I'm mainly targeting LuaJIT, but something compatible with all versions (PUC Lua 5.1 to 5.4 as well as LuaJIT) would be best.
https://redd.it/1kv07vu
@r_lua
I'd like to provide Lua with additional debug info when interacting with it from C. I want to push
__func__, __FILE__ and __LINE__ as the debug.getinfo() table fileds name, source/short_src and currentline, respectively. Is there an intended way to do this, would it require touching private APIs, or is it not possible at all?I'm mainly targeting LuaJIT, but something compatible with all versions (PUC Lua 5.1 to 5.4 as well as LuaJIT) would be best.
https://redd.it/1kv07vu
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
YueScript - A MoonScript dialect with lots of new features. Transpiles into Lua.
https://yuenoscript.org/doc/
https://redd.it/1kuznhw
@r_lua
https://yuenoscript.org/doc/
https://redd.it/1kuznhw
@r_lua
yuenoscript.org
Documentation
Majordome v6.04 released : Lightweight declarative automation engine and data logger
https://github.com/destroyedlolo/Majordome/releases/tag/v6.04
https://redd.it/1kv3zno
@r_lua
https://github.com/destroyedlolo/Majordome/releases/tag/v6.04
https://redd.it/1kv3zno
@r_lua
GitHub
Release v6.04 : complete data feeding (PostgreSQL support) + automated diagram generation · destroyedlolo/Majordome
v6.04 Release 📯
📌 I'm pleased to announce the release of Majordome v6.04, a lightweight and powerful event driven automation tool and low code smart data logger.
What's new
complete Postgr...
📌 I'm pleased to announce the release of Majordome v6.04, a lightweight and powerful event driven automation tool and low code smart data logger.
What's new
complete Postgr...
Grid and table question
I'm creating a 3d utility and ran into a dead end.
In the image the yellow bars represent one grid on the terrain. There is no set amount as to how many there are or can be. I'm trying to make a table aaccessible by these unset number or grid bars.
I originally tried something like -
grid = {}
for t=1, AmtOfBars, do ; grid[t\] = {} end
But when i try to add to the table like this -
table.insert ( grid[1\][1\], {
somedata = blah,
somedata2 = blah
})
I get runtime errors.
Any advice on how to set up this needed table > Thanks.
https://preview.redd.it/biec5ppsly2f1.png?width=2932&format=png&auto=webp&s=965a03bf7cb6ce0926430fcf9031f2de1f0a5f7e
https://redd.it/1kv7eh7
@r_lua
I'm creating a 3d utility and ran into a dead end.
In the image the yellow bars represent one grid on the terrain. There is no set amount as to how many there are or can be. I'm trying to make a table aaccessible by these unset number or grid bars.
I originally tried something like -
grid = {}
for t=1, AmtOfBars, do ; grid[t\] = {} end
But when i try to add to the table like this -
table.insert ( grid[1\][1\], {
somedata = blah,
somedata2 = blah
})
I get runtime errors.
Any advice on how to set up this needed table > Thanks.
https://preview.redd.it/biec5ppsly2f1.png?width=2932&format=png&auto=webp&s=965a03bf7cb6ce0926430fcf9031f2de1f0a5f7e
https://redd.it/1kv7eh7
@r_lua
Lua's scoping behavior can be quite surprising. Bug or by design?!!
Please correct me! I haven't really used
But this is what I'm really confused about:
The above code prints 4.
However, if
I mean I try to get it, it's the lexical scoping and that the reference to a remains accessible inside f(). Still, from a safety standpoint, this feels error-prone.
Technically, if
But it reads it and doesn't mutate globally (I guess that's should've been the panic )
To me, the current behavior feels more like a quirk than an intentional design.
I am familiar with
Rust will reject this code at compile time because you're trying to borrow a as mutable while it's still being used in the expression a + f(&mut a).
And I assume
https://redd.it/1kvemjb
@r_lua
Please correct me! I haven't really used
lua for a full project but I have played with it here and there! Alongside my nvim configuration.But this is what I'm really confused about:
local a = 1
function f()
a = a + 1
return a
end
print(a + f())
The above code prints 4.
However, if
a is not declared as local, it prints 3 (hmm).I mean I try to get it, it's the lexical scoping and that the reference to a remains accessible inside f(). Still, from a safety standpoint, this feels error-prone.
Technically, if
a is declared as local, and it's not within the scope of f(), the function should not be able to access or mutate. it should panic.But it reads it and doesn't mutate globally (I guess that's should've been the panic )
To me, the current behavior feels more like a quirk than an intentional design.
I am familiar with
rust so this is how I translated it :
fn main() {
let mut a = 1;
//I Know this one is as bad as a rust block can get, but it proves my point!
fn f(a: &mut i32) -> i32 {
*a += 1;
*a
}
println!("{}", a + f(&mut a)); // compiler error here!
}
Rust will reject this code at compile time because you're trying to borrow a as mutable while it's still being used in the expression a + f(&mut a).
And I assume
gcc would throw a similar complier error!https://redd.it/1kvemjb
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
New to lua
I can read Lua noscripts just fine, but something doesn't click with me. I've watched 20+ tutorials on it, yet what I don't get is every function. When do I use periods, colons, semicolons, parenthesis? When do I skip a line or add a variable?
https://redd.it/1kvh891
@r_lua
I can read Lua noscripts just fine, but something doesn't click with me. I've watched 20+ tutorials on it, yet what I don't get is every function. When do I use periods, colons, semicolons, parenthesis? When do I skip a line or add a variable?
https://redd.it/1kvh891
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
C API: "bad argument #1 to '?' (FileServerConfig expected, got FileServerConfig)"
I'm having trouble using metatables. Either I comment out the line marked with `[1]` and I get userdata-type-issues (all `__index`\-operations call my FileServerConfig-index-handler) or I get the error-message in the noscript.
My project (Lua-configured webserver uing the Linux uring-interface) is in early development and you can have my gitlab-address via PM. I hope, an advanced Lua C API-coder can help me with that.
EDIT: The Lua-Line is `fs_conf = createFileServerConfig()`, where the mentioned function runs `create_config_lua(...)`.
Following code gives me the error-report mentioned in the noscript:
static int create_config_lua(lua_State *L)
{
luaL_getmetatable(L, COMPONENT_LUA_METANAME);
lua_pushvalue(L, -1);
lua_setfield(L, -2, "__index");
luaL_setmetatable(L, COMPONENT_LUA_METANAME); // [1]
luaL_setfuncs(L, lua_file_m, 0);
luaL_setmetatable(L, COMPONENT_LUA_METANAME);
lua_pushlightuserdata(L,(void *) create_config());
luaL_setmetatable(L, COMPONENT_LUA_METANAME);
return 1;
}
https://redd.it/1kvsofp
@r_lua
I'm having trouble using metatables. Either I comment out the line marked with `[1]` and I get userdata-type-issues (all `__index`\-operations call my FileServerConfig-index-handler) or I get the error-message in the noscript.
My project (Lua-configured webserver uing the Linux uring-interface) is in early development and you can have my gitlab-address via PM. I hope, an advanced Lua C API-coder can help me with that.
EDIT: The Lua-Line is `fs_conf = createFileServerConfig()`, where the mentioned function runs `create_config_lua(...)`.
Following code gives me the error-report mentioned in the noscript:
static int create_config_lua(lua_State *L)
{
luaL_getmetatable(L, COMPONENT_LUA_METANAME);
lua_pushvalue(L, -1);
lua_setfield(L, -2, "__index");
luaL_setmetatable(L, COMPONENT_LUA_METANAME); // [1]
luaL_setfuncs(L, lua_file_m, 0);
luaL_setmetatable(L, COMPONENT_LUA_METANAME);
lua_pushlightuserdata(L,(void *) create_config());
luaL_setmetatable(L, COMPONENT_LUA_METANAME);
return 1;
}
https://redd.it/1kvsofp
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
interactive ways to learn lua?
ive tried reading the lua website but i feel as though im not learning. does anyone know interactive ways to learn it?
https://redd.it/1kvw6fd
@r_lua
ive tried reading the lua website but i feel as though im not learning. does anyone know interactive ways to learn it?
https://redd.it/1kvw6fd
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
Big Updates to my Game Editor made on my iPad
https://www.youtube.com/watch?v=pb1mz01nk70
https://redd.it/1kw0c0q
@r_lua
https://www.youtube.com/watch?v=pb1mz01nk70
https://redd.it/1kw0c0q
@r_lua
YouTube
Made BIG Updates to my Game Editor on the iPads (Codea)
Made Updates for my game editor on my iPad. Going to use it to make games on Codea. In probably 2 month the first version of the editor will be release in the Codea Repo for you to use.
0:00 Introduction
0:27 Duplicate and Delete
1:10 Image Slice Editor…
0:00 Introduction
0:27 Duplicate and Delete
1:10 Image Slice Editor…
Ultra Engine 0.9.9 Released
Hi, I just wanted to let you know the new version of my Lua-compatible game engine has been released: https://www.leadwerks.com/community/blogs/entry/2872-ultra-engine-099-adds-a-built-in-code-editor-mesh-reduction-tools-and-thousands-of-free-game-assets/
https://preview.redd.it/02adopcqz53f1.jpg?width=1280&format=pjpg&auto=webp&s=3ce16cd9b6cd01351510a0da158ee756c67b5f77
Based on community feedback and usability testing, the interface has undergone some revision and the built-in code editor from Leadwerks has been brought back, with a dark theme. Although Visual Studio Code is an awesome IDE, we found that it includes a lot of features people don't really need, which creates a lot of visual clutter, and a streamlined interface is easier to take in.
https://preview.redd.it/iabye3tvz53f1.jpg?width=1960&format=pjpg&auto=webp&s=6631d4fc6ca17e138e1777819c3846fd6ab98454
A built-in downloads manager provides easy access to download thousands of free game assets from our website. Manually downloading and extracting a single zip file is easy, but when you want to quickly try out dozens of items it adds a lot of overhead to the workflow, so I found that the importance of this feature cannot be overstated.
https://preview.redd.it/16r8sm80063f1.png?width=1462&format=png&auto=webp&s=2ad738b688962f6401dcea5feb1eac4d45906d30
A mesh reduction tool provides a way to quickly create LODs or just turn a high-poly mesh into something usable. This is something I really discovered was needed while developing my own game, and it saves a huge amount of time not having to go between different modeling programs.
https://i.redd.it/zfv4v472063f1.gif
Let me know if you have any questions and I will try to answer them all. Thanks!
https://redd.it/1kw15ha
@r_lua
Hi, I just wanted to let you know the new version of my Lua-compatible game engine has been released: https://www.leadwerks.com/community/blogs/entry/2872-ultra-engine-099-adds-a-built-in-code-editor-mesh-reduction-tools-and-thousands-of-free-game-assets/
https://preview.redd.it/02adopcqz53f1.jpg?width=1280&format=pjpg&auto=webp&s=3ce16cd9b6cd01351510a0da158ee756c67b5f77
Based on community feedback and usability testing, the interface has undergone some revision and the built-in code editor from Leadwerks has been brought back, with a dark theme. Although Visual Studio Code is an awesome IDE, we found that it includes a lot of features people don't really need, which creates a lot of visual clutter, and a streamlined interface is easier to take in.
https://preview.redd.it/iabye3tvz53f1.jpg?width=1960&format=pjpg&auto=webp&s=6631d4fc6ca17e138e1777819c3846fd6ab98454
A built-in downloads manager provides easy access to download thousands of free game assets from our website. Manually downloading and extracting a single zip file is easy, but when you want to quickly try out dozens of items it adds a lot of overhead to the workflow, so I found that the importance of this feature cannot be overstated.
https://preview.redd.it/16r8sm80063f1.png?width=1462&format=png&auto=webp&s=2ad738b688962f6401dcea5feb1eac4d45906d30
A mesh reduction tool provides a way to quickly create LODs or just turn a high-poly mesh into something usable. This is something I really discovered was needed while developing my own game, and it saves a huge amount of time not having to go between different modeling programs.
https://i.redd.it/zfv4v472063f1.gif
Let me know if you have any questions and I will try to answer them all. Thanks!
https://redd.it/1kw15ha
@r_lua
Leadwerks Community
Ultra Engine 0.9.9 Adds a Built-in Code Editor, Mesh Reduction Tools, and Thousands of Free Game Assets
Ultra Engine 0.9.9 is here with new features, improved usability, and access to thousands of free 3D assets to use in your games. This new update is the most stable and user-friendly version of our engine and editor to date. Revised Interface We've made great…
Solving Lua exercise
I will pay $100 to help me solve these last two Lua problems .
https://redd.it/1kwqsy1
@r_lua
I will pay $100 to help me solve these last two Lua problems .
https://redd.it/1kwqsy1
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community