clickhouse-lua: A simple, lightweight HTTP-based ClickHouse client for Lua
https://github.com/EvandroLG/clickhouse-lua
https://redd.it/1m0rc9m
@r_lua
https://github.com/EvandroLG/clickhouse-lua
https://redd.it/1m0rc9m
@r_lua
GitHub
GitHub - EvandroLG/clickhouse-lua: A simple, lightweight HTTP-based ClickHouse client for Lua 🗄️
A simple, lightweight HTTP-based ClickHouse client for Lua 🗄️ - EvandroLG/clickhouse-lua
Lua functionalities
So i recently wrote code for a Lua Program that demands A pass code to let you use your computer on start up or else it shuts it down should you get the pass code wrong. Runs in the terminal/CMD and has no GUI to speak of. (Involves lots of os.executes and batch programming)
That worked and I set my sights on a Lua code for file reading.. I want to make a compiled book and was asking if Lua has built PDF file parsing or reading. I know i could just os.execute the thing to open an actual pdf reader and then just manipulate the pdf from in there but I wanted to manipulate via a GUI i will make in Lua.. Any one got a solution? I have used File:read/File:open and file:close() before to write stuff to a CSV and txt but not so sure about reading a PDF and not writing to it. Just reading it.. And scrolling through it from inside my Lua noscript
https://redd.it/1m0selu
@r_lua
So i recently wrote code for a Lua Program that demands A pass code to let you use your computer on start up or else it shuts it down should you get the pass code wrong. Runs in the terminal/CMD and has no GUI to speak of. (Involves lots of os.executes and batch programming)
That worked and I set my sights on a Lua code for file reading.. I want to make a compiled book and was asking if Lua has built PDF file parsing or reading. I know i could just os.execute the thing to open an actual pdf reader and then just manipulate the pdf from in there but I wanted to manipulate via a GUI i will make in Lua.. Any one got a solution? I have used File:read/File:open and file:close() before to write stuff to a CSV and txt but not so sure about reading a PDF and not writing to it. Just reading it.. And scrolling through it from inside my Lua noscript
https://redd.it/1m0selu
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
RT Builder GUI design
I was practicing how to make GUIs in Lua and because I still suck at the hardcoding I opted to use a GUI Builder. I use LuaRT Studio IDE and RT Builder. They allow me to compile noscripts to exe.
https://preview.redd.it/rrd15hxl76df1.png?width=1920&format=png&auto=webp&s=936e62119da31502294097687dbdeab899f325d1
I have this issue. The GUI loads fine but quickly goes off screen like when you run a batch noscript and dont put "pause" in the batch code. I also get the errors down there..
What am i doing wrong here..
https://redd.it/1m14bka
@r_lua
I was practicing how to make GUIs in Lua and because I still suck at the hardcoding I opted to use a GUI Builder. I use LuaRT Studio IDE and RT Builder. They allow me to compile noscripts to exe.
https://preview.redd.it/rrd15hxl76df1.png?width=1920&format=png&auto=webp&s=936e62119da31502294097687dbdeab899f325d1
I have this issue. The GUI loads fine but quickly goes off screen like when you run a batch noscript and dont put "pause" in the batch code. I also get the errors down there..
What am i doing wrong here..
https://redd.it/1m14bka
@r_lua
The shortest Lua C function (0 bytes)
Hi everyone. I just stumbled upon this neat trick and wanted to share it. There is a somewhat useful C function that takes 0 bytes to implement! What it does is return all its own parameters in order (via multiple return).
To register it:
lua_pushcfunction(L, lua_gettop);
lua_setglobal(L, "pass");
To use it:
print(pass("hi", 123, true, "bye"))
Hope this helps someone!
https://redd.it/1m2e9ry
@r_lua
Hi everyone. I just stumbled upon this neat trick and wanted to share it. There is a somewhat useful C function that takes 0 bytes to implement! What it does is return all its own parameters in order (via multiple return).
To register it:
lua_pushcfunction(L, lua_gettop);
lua_setglobal(L, "pass");
To use it:
print(pass("hi", 123, true, "bye"))
Hope this helps someone!
https://redd.it/1m2e9ry
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
Is it possible to create an anti-recoil noscript for Fortnite?
Is it possible to create an anti-recoil noscript for Fortnite?.
Well, that's my question. I've spent several hours researching, creating, and practicing various noscripts, and I think they're either not working or are just "placebo" in use. I honestly don't notice it.
My mouse and in-game sensitivity is:
DPI: 850
X-Axis Sensitivity: 9.8%
Y-Axis Sensitivity: 9.8%
Aiming Sensitivity 76% and Crosshair Sensitivity 76%.
These are the following noscripts that I have tried and I have changed some things and it seems that it does not work.
And here is noscript number 2:
Thanks for making it to the end of this post. Could someone help me fix my noscripts? Or give me some tips on how to make it work? Thank you so much, everyone!
https://redd.it/1m2mupt
@r_lua
Is it possible to create an anti-recoil noscript for Fortnite?.
Well, that's my question. I've spent several hours researching, creating, and practicing various noscripts, and I think they're either not working or are just "placebo" in use. I honestly don't notice it.
My mouse and in-game sensitivity is:
DPI: 850
X-Axis Sensitivity: 9.8%
Y-Axis Sensitivity: 9.8%
Aiming Sensitivity 76% and Crosshair Sensitivity 76%.
These are the following noscripts that I have tried and I have changed some things and it seems that it does not work.
EnablePrimaryMouseButtonEvents(true)-- Patrón de recoil ajustado (solo hacia abajo, más agresivo)local recoil_pattern = {{0, 10}, {0, 10}, {0, 9}, {0, 9}, {0, 8}, {0, 8},{0, 7}, {0, 6}, {0, 6}, {0, 5}, {0, 5}, {0, 4},{0, 3}, {0, 3}, {0, 2}, {0, 2}, {0, 1}}function OnEvent(event, arg)if event == "MOUSE_BUTTON_PRESSED" and arg == 1 thenif IsMouseButtonPressed(3) then -- solo se activa si apuntas (click derecho)for i = 1, #recoil_pattern doif not IsMouseButtonPressed(1) then break endMoveMouseRelative(recoil_pattern[i][1], recoil_pattern[i][2])Sleep(16) -- 60 disparos por segundo aprox.endendendendAnd here is noscript number 2:
EnablePrimaryMouseButtonEvents(true)-- Solo recoil vertical, sin movimientos lateraleslocal recoil_pattern = {{0, 10}, {0, 10}, {0, 9}, {0, 9}, {0, 8}, {0, 8},{0, 7}, {0, 7}, {0, 6}, {0, 6}, {0, 5}, {0, 5},{0, 4}, {0, 4}, {0, 3}, {0, 3}, {0, 2}}function OnEvent(event, arg)if event == "MOUSE_BUTTON_PRESSED" and arg == 1 thenif IsMouseButtonPressed(3) then -- Solo si apuntasfor i = 1, #recoil_pattern doif not IsMouseButtonPressed(1) then break endMoveMouseRelative(recoil_pattern[i][1], recoil_pattern[i][2])Sleep(16)endendendendThanks for making it to the end of this post. Could someone help me fix my noscripts? Or give me some tips on how to make it work? Thank you so much, everyone!
https://redd.it/1m2mupt
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
I want to learn lua, need help
I want to learn lua from scratch, but nothing is installed and I don’t know anything about this language. Can someone send me stuff for learning lua please? (Videos, programming environment, docs,…)
https://redd.it/1m3qnz2
@r_lua
I want to learn lua from scratch, but nothing is installed and I don’t know anything about this language. Can someone send me stuff for learning lua please? (Videos, programming environment, docs,…)
https://redd.it/1m3qnz2
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
Updates on Caelum
A week ago a made a post on this reddit in regards of a library that I am creating, Caelum, after that post i added more features that made me realize that this project is getting bigger and bigger, when in reality it was meant to be only a small library to help integrate lua in my engine.
At this point I am asking myself, is anyone really interested in a library such as Caelum-lua?
With this question in mind I wanted to make this new post in this reddit to understand more the lua vision and the lua-programmers as a programmar myself coming from a totally different type of programming "habitat".
Let me know your real opinion on the library, where you think it should go, maybe features that are too much or not really lua-centrinc that should be removed, features that you would like to see in a library like this, and if you like you can also bring your ideas directly to the github repo, as I said in the previous post, I would like to expand this library with a community driven vision and ideas.
Feel free to ask any question!
Thank you for your attention, and sorry if it is not really a topic on lua but more on the development path of a library
https://redd.it/1m3x9tr
@r_lua
A week ago a made a post on this reddit in regards of a library that I am creating, Caelum, after that post i added more features that made me realize that this project is getting bigger and bigger, when in reality it was meant to be only a small library to help integrate lua in my engine.
At this point I am asking myself, is anyone really interested in a library such as Caelum-lua?
With this question in mind I wanted to make this new post in this reddit to understand more the lua vision and the lua-programmers as a programmar myself coming from a totally different type of programming "habitat".
Let me know your real opinion on the library, where you think it should go, maybe features that are too much or not really lua-centrinc that should be removed, features that you would like to see in a library like this, and if you like you can also bring your ideas directly to the github repo, as I said in the previous post, I would like to expand this library with a community driven vision and ideas.
Feel free to ask any question!
Thank you for your attention, and sorry if it is not really a topic on lua but more on the development path of a library
https://redd.it/1m3x9tr
@r_lua
GitHub
GitHub - zLouis043/Caelum-lua: Caelum adds Classes, Structs, Enums, Complex-Data-Structures, validators, type-checking system,…
Caelum adds Classes, Structs, Enums, Complex-Data-Structures, validators, type-checking system, and a easy to use reflection system - zLouis043/Caelum-lua
Which tools do you use in your Lua projects?
I'm new to Lua and have found StyLua for formatting and selene for linting. Are these the best options? Are there any other tools I should be using?
https://redd.it/1m456yx
@r_lua
I'm new to Lua and have found StyLua for formatting and selene for linting. Are these the best options? Are there any other tools I should be using?
https://redd.it/1m456yx
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
is there an easy way to run a LUA mouse macro?
Previously used logitech though stopped working
https://redd.it/1m4m2am
@r_lua
Previously used logitech though stopped working
https://redd.it/1m4m2am
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
_G and _ENV
Hello. I am reading the chapter about environments from *Programming in Lua, 4th edition*, and also did online searching regarding `_G` and `_ENV`. Here are my observations and experimenting for record. Feel free to comment if you have something to add or correct.
* The `_ENV` is a local variable for the compiled chunk but can simulate a *global* environment by the compiler's mechanism of prepending all free names with `_ENV.` . Creating and accessing a global variable e.g. `a = 5 print(a)` is equivalent to `_ENV.a = 5 print(_ENV.a)`.
* The `_ENV` is initialized to be the same as `_G`, because `_G == _ENV -- true` (having the same memory address).
* `_ENV` contains a field of `_G`, and `_G` contains a field of `_G` as well.
* A global variable assignment such as `a = 5` puts a key of "a" and value of 5 in `_ENV` and `_G` simultaneously because they are still the same table. Evidenced as below:
​
print(_ENV) -- table: 0x6000017d8040
print(_G) -- table: 0x6000017d8040
a = 5
print(_ENV.a) -- 5
print(_G.a) -- 5
print(_ENV) -- table: 0x6000017d8040
print(_G) -- table: 0x6000017d8040
The result is the same if `a = 5` is replaced by `_ENV = 5` or `_G = 5`.
* However, if `_ENV` is assigned a new table, the memory addresses of `_G` and `_ENV` will be different, but the rule that the *global* environment is `_ENV` still applies.
* Example of overriding the \_ENV:
​
print(_ENV) -- table: 0x600001844200
print(_G) -- table: 0x600001844200
_ENV = {_G = _G, print = _ENV.print} -- can also be print = print or _G.print
print(_ENV) -- table: 0x600001840140 -- different from before
print(_G) -- table: 0x600001844200
a = 5
print(a) -- 5
print(_ENV.a) -- 5
print(_G.a) -- nil
In this case, `_G` will be prepended as `_ENV._G`, but since it was never added the field of "a", `_G.a` is `nil`.
https://redd.it/1m5766o
@r_lua
Hello. I am reading the chapter about environments from *Programming in Lua, 4th edition*, and also did online searching regarding `_G` and `_ENV`. Here are my observations and experimenting for record. Feel free to comment if you have something to add or correct.
* The `_ENV` is a local variable for the compiled chunk but can simulate a *global* environment by the compiler's mechanism of prepending all free names with `_ENV.` . Creating and accessing a global variable e.g. `a = 5 print(a)` is equivalent to `_ENV.a = 5 print(_ENV.a)`.
* The `_ENV` is initialized to be the same as `_G`, because `_G == _ENV -- true` (having the same memory address).
* `_ENV` contains a field of `_G`, and `_G` contains a field of `_G` as well.
* A global variable assignment such as `a = 5` puts a key of "a" and value of 5 in `_ENV` and `_G` simultaneously because they are still the same table. Evidenced as below:
​
print(_ENV) -- table: 0x6000017d8040
print(_G) -- table: 0x6000017d8040
a = 5
print(_ENV.a) -- 5
print(_G.a) -- 5
print(_ENV) -- table: 0x6000017d8040
print(_G) -- table: 0x6000017d8040
The result is the same if `a = 5` is replaced by `_ENV = 5` or `_G = 5`.
* However, if `_ENV` is assigned a new table, the memory addresses of `_G` and `_ENV` will be different, but the rule that the *global* environment is `_ENV` still applies.
* Example of overriding the \_ENV:
​
print(_ENV) -- table: 0x600001844200
print(_G) -- table: 0x600001844200
_ENV = {_G = _G, print = _ENV.print} -- can also be print = print or _G.print
print(_ENV) -- table: 0x600001840140 -- different from before
print(_G) -- table: 0x600001844200
a = 5
print(a) -- 5
print(_ENV.a) -- 5
print(_G.a) -- nil
In this case, `_G` will be prepended as `_ENV._G`, but since it was never added the field of "a", `_G.a` is `nil`.
https://redd.it/1m5766o
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
Need beta testers for HRAM (hand-rolled assembly machine)
Hi everyone. I'm making an app called HRAM (hand-rolled assembly machine), and I plan to release it this week. But I need some beta testers first. Please send me an email at admin@90s.dev if you're interested. Your feedback will be helpful enough that I'll give you a free license. The app is only for Windows (10 or 11).
The app is programmable via Lua and has an assembly library built in, so you can create and run assembly functions at runtime. It has a 320x180 pixel screen that you can manipulate to help you practice assembly. The point of the app is to help learn low level concepts, in the fun environment of making a retro style game. I'm also in the process of adding threading/mutexes/etc also, but that may have to wait post release.
Current manual is at https://hram.dev/docs.txt
https://redd.it/1m5jfw0
@r_lua
Hi everyone. I'm making an app called HRAM (hand-rolled assembly machine), and I plan to release it this week. But I need some beta testers first. Please send me an email at admin@90s.dev if you're interested. Your feedback will be helpful enough that I'll give you a free license. The app is only for Windows (10 or 11).
The app is programmable via Lua and has an assembly library built in, so you can create and run assembly functions at runtime. It has a 320x180 pixel screen that you can manipulate to help you practice assembly. The point of the app is to help learn low level concepts, in the fun environment of making a retro style game. I'm also in the process of adding threading/mutexes/etc also, but that may have to wait post release.
Current manual is at https://hram.dev/docs.txt
https://redd.it/1m5jfw0
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
Can someone make a code that makes my gun recoil in the opposite direction to where I'm pointing please?
Excuse me for asking this here, but I'm trying to make a Terraria weapon in Gmod, and as a secondary attack, it makes a noise like the Tau-Cannon and sends me far back. If someone can do it or give me instructions on how to do it, I would appreciate it. Thanks in advance.
I'm not uploading the code because it won't let me for some reason
https://redd.it/1m5qjo9
@r_lua
Excuse me for asking this here, but I'm trying to make a Terraria weapon in Gmod, and as a secondary attack, it makes a noise like the Tau-Cannon and sends me far back. If someone can do it or give me instructions on how to do it, I would appreciate it. Thanks in advance.
I'm not uploading the code because it won't let me for some reason
https://redd.it/1m5qjo9
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
FiveM Lua Dev
Hi there!
I'm currently looking to take on some Fiverr gigs at a very affordable rate. I have over 2 years of experience in Lua development and a year of experience as a full-stack developer.
Whether you need a simple noscript or a large-scale project, I can deliver clean, documented, reliable code for just a few bucks. I'm building up my Fiverr portfolio and would love to help bring your ideas to life!
Feel free to reach out - let’s work together!
https://redd.it/1m5ud8e
@r_lua
Hi there!
I'm currently looking to take on some Fiverr gigs at a very affordable rate. I have over 2 years of experience in Lua development and a year of experience as a full-stack developer.
Whether you need a simple noscript or a large-scale project, I can deliver clean, documented, reliable code for just a few bucks. I'm building up my Fiverr portfolio and would love to help bring your ideas to life!
Feel free to reach out - let’s work together!
https://redd.it/1m5ud8e
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
Beginner code question on nested tables
I am trying to construct and print a nested table In this simple example:
#!/usr/bin/env lua
company = {director="boss",
{address="home",
{zipcode ="12345"}
}
}
print(company.director) --> boss
print(company.director.address) --> nil - was expecting 'home'
print(company.director.address.zipcode)
print(company"director") --> boss
print(company"director""address") --> nil - was expecting 'home'
print(company"director""address""zipcode")
It prints nil where I was expecting it to print 'home'.
What am I doing wrong?
https://redd.it/1m61yq3
@r_lua
I am trying to construct and print a nested table In this simple example:
#!/usr/bin/env lua
company = {director="boss",
{address="home",
{zipcode ="12345"}
}
}
print(company.director) --> boss
print(company.director.address) --> nil - was expecting 'home'
print(company.director.address.zipcode)
print(company"director") --> boss
print(company"director""address") --> nil - was expecting 'home'
print(company"director""address""zipcode")
It prints nil where I was expecting it to print 'home'.
What am I doing wrong?
https://redd.it/1m61yq3
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
Sol2 and Modules
What are your thoughts on using cpp and sol2 library to create Modules to use in lua noscripts?
Do you prefer a Module written in c/cpp with the pure lua api, or Is It ok to use sol2?
https://redd.it/1m677cb
@r_lua
What are your thoughts on using cpp and sol2 library to create Modules to use in lua noscripts?
Do you prefer a Module written in c/cpp with the pure lua api, or Is It ok to use sol2?
https://redd.it/1m677cb
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
Luans - a Lua Learning App inspired by Koans (beta)
Hey everyone,
We’ve created a small web app to help people get started with Lua: [**play.tenum.app**](https://play.tenum.app)
It’s inspired by Kotlin Koans — we’re calling it **Luans**.
Each exercise is structured as a failing unit test, and your goal is to make it pass. The idea is to learn Lua through hands-on practice, one small step at a time.
Right now, the app is super basic and only contains a few lessons. We're testing right now and would love to hear from this community:
* Is this format helpful for learning Lua?
* What kinds of exercises or topics would you want to see?
* Are there other Lua learning platforms/tools you’ve used or recommend?
We’re considering investing more time into it, so your feedback would mean a lot.
Thanks in advance
https://redd.it/1m6bykq
@r_lua
Hey everyone,
We’ve created a small web app to help people get started with Lua: [**play.tenum.app**](https://play.tenum.app)
It’s inspired by Kotlin Koans — we’re calling it **Luans**.
Each exercise is structured as a failing unit test, and your goal is to make it pass. The idea is to learn Lua through hands-on practice, one small step at a time.
Right now, the app is super basic and only contains a few lessons. We're testing right now and would love to hear from this community:
* Is this format helpful for learning Lua?
* What kinds of exercises or topics would you want to see?
* Are there other Lua learning platforms/tools you’ve used or recommend?
We’re considering investing more time into it, so your feedback would mean a lot.
Thanks in advance
https://redd.it/1m6bykq
@r_lua
My awesome PWA app
Best PWA app in the world!
Working on a Wireshark parser, why does TreeItem:add_le() not reverse strings too?
My first instinct would be to post to r/wireshark, but last time I had a similar question I was directed here. Apologies if that’s incorrect.
[Link to line in docs](https://www.wireshark.org/docs/wsdg_html_chunked/lua_module_Tree.html)
Trying to fetch a little endian string, but it’s reversed because apparently the little endian add function only works on numbers? This feels really wrong, I can’t imagine why it works like this. Let me know if a more elegant way to display this is known.
https://redd.it/1m6m516
@r_lua
My first instinct would be to post to r/wireshark, but last time I had a similar question I was directed here. Apologies if that’s incorrect.
[Link to line in docs](https://www.wireshark.org/docs/wsdg_html_chunked/lua_module_Tree.html)
Trying to fetch a little endian string, but it’s reversed because apparently the little endian add function only works on numbers? This feels really wrong, I can’t imagine why it works like this. Let me know if a more elegant way to display this is known.
https://redd.it/1m6m516
@r_lua
I Make Steam Capsule Art That Pops! DM Me If You Want It For Your Lua Game
https://redd.it/1m6z3z9
@r_lua
https://redd.it/1m6z3z9
@r_lua
Reddit
From the lua community on Reddit: I Make Steam Capsule Art That Pops! DM Me If You Want It For Your Lua Game
Explore this post and more from the lua community