sqlite-vec (Vector Search in SQLite) version 0.2.4-alpha released
I've just released version 0.2.4-alpha of my community fork of sqlite-vec. It now features a binding for the Lua programming language.
Full details from CHANGELOG.md:
## 0.2.4-alpha - 2026-01-03
### Added
- Lua binding with IEEE 754 compliant float serialization (#237)
-
- Lua 5.1+ compatible with lsqlite3
- IEEE 754 single-precision float encoding with round-half-to-even (banker's rounding)
- Proper handling of special values: NaN, Inf, -Inf, -0.0, subnormals
- Example noscript and runner in
https://redd.it/1q3kwik
@r_lua
I've just released version 0.2.4-alpha of my community fork of sqlite-vec. It now features a binding for the Lua programming language.
Full details from CHANGELOG.md:
## 0.2.4-alpha - 2026-01-03
### Added
- Lua binding with IEEE 754 compliant float serialization (#237)
-
bindings/lua/sqlite_vec.lua provides load(), serialize_f32(), and serialize_json() functions- Lua 5.1+ compatible with lsqlite3
- IEEE 754 single-precision float encoding with round-half-to-even (banker's rounding)
- Proper handling of special values: NaN, Inf, -Inf, -0.0, subnormals
- Example noscript and runner in
/examples/simple-lua/https://redd.it/1q3kwik
@r_lua
GitHub
GitHub - vlasky/sqlite-vec: A vector search SQLite extension that runs anywhere! Community fork adding distance constraints, pagination…
A vector search SQLite extension that runs anywhere! Community fork adding distance constraints, pagination and optimize command to reclaim unused space. - vlasky/sqlite-vec
Made this cool stylized Lua & Luau logo, thoughts?
Lua
https://preview.redd.it/awlvzyx1bdbg1.png?width=1024&format=png&auto=webp&s=4e228961310104cb1ac06f4728aa33112c1dee4d
Luau
https://preview.redd.it/oim42rdkbdbg1.png?width=1024&format=png&auto=webp&s=6c06ac5eaa92a10070f13f348b8e848045a1f16e
https://redd.it/1q3vyab
@r_lua
Lua
https://preview.redd.it/awlvzyx1bdbg1.png?width=1024&format=png&auto=webp&s=4e228961310104cb1ac06f4728aa33112c1dee4d
Luau
https://preview.redd.it/oim42rdkbdbg1.png?width=1024&format=png&auto=webp&s=6c06ac5eaa92a10070f13f348b8e848045a1f16e
https://redd.it/1q3vyab
@r_lua
The Hitchhiker's Guide to Making Lua's Indexing 0-Based Without Changing Its Source Code
To preface, I will state that I actually enjoy 1-based indexing. This is more of a thought experiment, and is very unlikely to be useful in production.
Also keep in mind that the code samples I provide are, likewise, going to be very far from the best implementation of doing such a thing.
The first and most obvious thing is that you will NEVER be able to make Lua 0-based (at least, internally) without changing the source. Now that that is out of the way, here is how you can pretend
It is possible to change indexing via metamethods, however, this post will not be about that technique.
ipairs = function(t)
local i = -1
local tMax = #t
return function()
i = i + 1
if i <= tMax then
return i,ti
end
end
end
Nearly every single function in
local oldTable = table
table.insert = function(list,...)
local args = {...}
if #args >= 2 then args1 = args1 - 1 end
oldTable.insert(list,args1,args2)
end
function size(t)
if type(t) ~= "table" then
return #t
end
local s = 0
while ts ~= nil do
s = s + 1
end
return s
end
These examples are not all that needs to be done, but these are the main things, to my knowledge.
https://redd.it/1q4eiis
@r_lua
To preface, I will state that I actually enjoy 1-based indexing. This is more of a thought experiment, and is very unlikely to be useful in production.
Also keep in mind that the code samples I provide are, likewise, going to be very far from the best implementation of doing such a thing.
The first and most obvious thing is that you will NEVER be able to make Lua 0-based (at least, internally) without changing the source. Now that that is out of the way, here is how you can pretend
It is possible to change indexing via metamethods, however, this post will not be about that technique.
ipairs \- The first thing that can be considered any sort of concern is ipairs. It, by its own definition, is 1-based, and thus to achieve this goal we will need to override it. Lua makes creating your own iterator function very easy, thankfully, and thus can be overridden by simply doing something akin to this:ipairs = function(t)
local i = -1
local tMax = #t
return function()
i = i + 1
if i <= tMax then
return i,ti
end
end
end
Nearly every single function in
table \- This part is potentially the most tedious. Every single one of these functions, of course, use 1-based indexing. There are two solutions to this (at least, that I can personally think of), with the easiest being to simply do the following, using table.insert as an example:local oldTable = table
table.insert = function(list,...)
local args = {...}
if #args >= 2 then args1 = args1 - 1 end
oldTable.insert(list,args1,args2)
end
# and general table creation - These ones are bummers. For table creation, Lua fills arrays starting with 1, and this cannot be stopped. Likewise, the # will always return the table's size assuming 1-based indexing. Metamethods could be used to solve # (though, this adds the new issue of needing to things slightly more manually), however, there is nothing that can be done about the way Lua fills arrays. Despite this, for #, one could still make a more automatic solution, and that's declaring a simple size function going by a different name.function size(t)
if type(t) ~= "table" then
return #t
end
local s = 0
while ts ~= nil do
s = s + 1
end
return s
end
These examples are not all that needs to be done, but these are the main things, to my knowledge.
https://redd.it/1q4eiis
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
Help deobfuscate/decrypt
Hello guys i know maybe this isnt allowed in the server but im new to lua code im using it in a game but someone gave me a noscript that i want to use but im not sure if it steal items from me so can someone help me in deobfuscating it so i can look into it?
https://hastebin.com/share/royositepu.swift
Thank you!!
https://redd.it/1q4nfq1
@r_lua
Hello guys i know maybe this isnt allowed in the server but im new to lua code im using it in a game but someone gave me a noscript that i want to use but im not sure if it steal items from me so can someone help me in deobfuscating it so i can look into it?
https://hastebin.com/share/royositepu.swift
Thank you!!
https://redd.it/1q4nfq1
@r_lua
Noob starting on tic 80
I’m a full blown noob when it comes to anything related to programming and writing code but I’ve always wanted to fiddle with making games here and there and wanted to know:
Are there any good tutorials for absolute zero experience beginners (everything I find expects a little bit of knowledge)
Any tips or basic things I need to know going into it (for example I learned that lines of code need to be inside a function or something like that to run, or that you can write code outside of your original tic() function)
I’ve been using some random pdf I found on itch.io and it helped me get going but really I haven’t learned how to make anything new I guess. Everything is a 1 to 1 guide not a “here’s the basics and what you can do with it now make your own stuff” sort of deal
Anyways I’ve fiddled for 30 mins or so and just need some starter motivation and pointers
https://redd.it/1q7sh2p
@r_lua
I’m a full blown noob when it comes to anything related to programming and writing code but I’ve always wanted to fiddle with making games here and there and wanted to know:
Are there any good tutorials for absolute zero experience beginners (everything I find expects a little bit of knowledge)
Any tips or basic things I need to know going into it (for example I learned that lines of code need to be inside a function or something like that to run, or that you can write code outside of your original tic() function)
I’ve been using some random pdf I found on itch.io and it helped me get going but really I haven’t learned how to make anything new I guess. Everything is a 1 to 1 guide not a “here’s the basics and what you can do with it now make your own stuff” sort of deal
Anyways I’ve fiddled for 30 mins or so and just need some starter motivation and pointers
https://redd.it/1q7sh2p
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
This is a question from someone who knows nothing about Lua. In your opinion, what's the most efficient and effective way of learning Lua?
https://redd.it/1q6tbs1
@r_lua
https://redd.it/1q6tbs1
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
Trying to use this code to mirror 2nd monitor in minecraft
So I found this video where a guy basically mirrored his second monitor irl to a monitor on minecraft. I figured out how to edit the part calling for what direction the monitor is in relation to the advanced computer. Now its attempting over and over but wont work. I think I need to set my monitor as a source but I dont know how to or what its called. Any advice?
https://github.com/TheArmagan/ccdesktopvideoserver
https://redd.it/1q63yve
@r_lua
So I found this video where a guy basically mirrored his second monitor irl to a monitor on minecraft. I figured out how to edit the part calling for what direction the monitor is in relation to the advanced computer. Now its attempting over and over but wont work. I think I need to set my monitor as a source but I dont know how to or what its called. Any advice?
https://github.com/TheArmagan/ccdesktopvideoserver
https://redd.it/1q63yve
@r_lua
GitHub
GitHub - TheArmagan/ccdesktopvideoserver: Your desktop screen and audio in Computer Craft screens and speakers :D
Your desktop screen and audio in Computer Craft screens and speakers :D - TheArmagan/ccdesktopvideoserver
I have fallen in love with luajit and is a shame that is so unrecognizable
Hi all, I've started this new job a year ago and our code base that work on is in lua. I never had any experience with it and I just thought it was a lesser version of python, now I think python is the lesser here.
What really made me fall in love was the moment I realized is all tables, packages? Tables, objects? Tables. Sugar syntaxes? Tables.
For me there is only a few languages that I care to like, if web then html,css,js; if performance or embedded then c/c++ and python for everything else. Now between I've seen how I was wrong, lua is better than python. Period. It merges the simplicity of code writing (no having to match vars type and returns, fixed memory, blabla) with the speed of C++ (because you can just import any fucking compiled library) like wtf lua should be way way way more used and advertised than python
https://redd.it/1q93ayy
@r_lua
Hi all, I've started this new job a year ago and our code base that work on is in lua. I never had any experience with it and I just thought it was a lesser version of python, now I think python is the lesser here.
What really made me fall in love was the moment I realized is all tables, packages? Tables, objects? Tables. Sugar syntaxes? Tables.
For me there is only a few languages that I care to like, if web then html,css,js; if performance or embedded then c/c++ and python for everything else. Now between I've seen how I was wrong, lua is better than python. Period. It merges the simplicity of code writing (no having to match vars type and returns, fixed memory, blabla) with the speed of C++ (because you can just import any fucking compiled library) like wtf lua should be way way way more used and advertised than python
https://redd.it/1q93ayy
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
I need a bit of help in my virtual studio code
i am trying to make it read 2 numbers from the input and then run the Pythagorean theorem on them but when i insert the 2 numbers it give me a random error cuz im a beginner
https://preview.redd.it/j28ffre11ocg1.png?width=609&format=png&auto=webp&s=1ae412a6b3c37ea35392981f1d7d43b4a9f67809
https://preview.redd.it/7av3v5841ocg1.png?width=414&format=png&auto=webp&s=9c6141f8f92a953f3d0c0827fee1fece98561f30
https://redd.it/1q9sbg0
@r_lua
i am trying to make it read 2 numbers from the input and then run the Pythagorean theorem on them but when i insert the 2 numbers it give me a random error cuz im a beginner
https://preview.redd.it/j28ffre11ocg1.png?width=609&format=png&auto=webp&s=1ae412a6b3c37ea35392981f1d7d43b4a9f67809
https://preview.redd.it/7av3v5841ocg1.png?width=414&format=png&auto=webp&s=9c6141f8f92a953f3d0c0827fee1fece98561f30
https://redd.it/1q9sbg0
@r_lua
Introducing civstack: the educational tech stack in the public domain, written in pure Lua!
https://civboot.github.io/index.html
I'm writing an educational tech stack in pure Lua and I've just reached a milestone: the build system is now itself implemented in pure lua, from which it bootstraps itself.
All of the main software is in an alpha/beta state: build system, version control, editor, documentation language (that's what renders the site), and find-replace tool.
I hope to be writing colored-text educational games by the summer. For folks who want to learn software engineering, getting involved in this project is a golden opportunity - help me develop a complete and learnable tech stack, and in the process help yourself learn to code!
https://redd.it/1qaaoip
@r_lua
https://civboot.github.io/index.html
I'm writing an educational tech stack in pure Lua and I've just reached a milestone: the build system is now itself implemented in pure lua, from which it bootstraps itself.
All of the main software is in an alpha/beta state: build system, version control, editor, documentation language (that's what renders the site), and find-replace tool.
I hope to be writing colored-text educational games by the summer. For folks who want to learn software engineering, getting involved in this project is a golden opportunity - help me develop a complete and learnable tech stack, and in the process help yourself learn to code!
https://redd.it/1qaaoip
@r_lua
Who else love to use Lua for Shell Scripting? Im planning to make a shell from scratch with Lua configuration.
https://redd.it/1qb6gyt
@r_lua
https://redd.it/1qb6gyt
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
Open sourcing lowkPRO
https://lowkpro.com/blog/open-sourcing-lowkpro.html
https://redd.it/1qbycax
@r_lua
https://lowkpro.com/blog/open-sourcing-lowkpro.html
https://redd.it/1qbycax
@r_lua
Squish 5.2+ I forked and updated the squish module for Lua 5.2+ compatibility
GitHub link
I was looking to use a minifier for my own module I've been working on and knew about squishy, but from what I could tell it was only compatible with 5.1 and lower. I checked out some existing forks but didn't find anything that suited what I needed, so I adopted that "sigma-coder mindset" and did it myself.
It's literally just squish but made to work with Lua 5.2+
The biggest "change" I made is updating the documentation to be more robust, mostly for myself but in case anyone else was confused as to how to build/use it since it took me forever to completely understand.
Some features like `gzip` and `debug` I haven't touched and are just as they were previously. I wasn't going to get into that since they were already experimental features for the existing versions. I'll look into it in the future cause it sounds interesting.
Hope this can be useful to someone other than me!
https://redd.it/1qd2hi7
@r_lua
GitHub link
I was looking to use a minifier for my own module I've been working on and knew about squishy, but from what I could tell it was only compatible with 5.1 and lower. I checked out some existing forks but didn't find anything that suited what I needed, so I adopted that "sigma-coder mindset" and did it myself.
It's literally just squish but made to work with Lua 5.2+
The biggest "change" I made is updating the documentation to be more robust, mostly for myself but in case anyone else was confused as to how to build/use it since it took me forever to completely understand.
Some features like `gzip` and `debug` I haven't touched and are just as they were previously. I wasn't going to get into that since they were already experimental features for the existing versions. I'll look into it in the future cause it sounds interesting.
Hope this can be useful to someone other than me!
https://redd.it/1qd2hi7
@r_lua
GitHub
GitHub - NathanTBeene/squish: [ 5.2+ ] Squish Lua libraries and apps into a single compact file.
[ 5.2+ ] Squish Lua libraries and apps into a single compact file. - NathanTBeene/squish
Using ipairs() – antipattern? It cuts half of the table upon field nil assignment.
> a = {1,2,3,4}
> for k,v in pairs(a) do print(v) end
1
2
3
4
> a2 = nil
> for k,v in ipairs(a) do print(v) end
1
> a = {1,nil,3,4}
> for k,v in ipairs(a) do print(v) end
1
>
Commentary: *I know* about pairs() and ipairs(). But I would be _really_ expecting 1,nil,2,3 and not loosing half of my table because I reasigned something to nil.
Is it intended that every assignment after a[2\] = nil must be transferred to the hash part? It is sooo confusing.
Am I arriving at the right conclusion that using ipairs() might be an antipattern and I should stick to pairs or numerical for loop? Unless I am _really reallyyy_ sure that I have a LIFO-like table..?
https://redd.it/1qdodl1
@r_lua
> a = {1,2,3,4}
> for k,v in pairs(a) do print(v) end
1
2
3
4
> a2 = nil
> for k,v in ipairs(a) do print(v) end
1
> a = {1,nil,3,4}
> for k,v in ipairs(a) do print(v) end
1
>
Commentary: *I know* about pairs() and ipairs(). But I would be _really_ expecting 1,nil,2,3 and not loosing half of my table because I reasigned something to nil.
Is it intended that every assignment after a[2\] = nil must be transferred to the hash part? It is sooo confusing.
Am I arriving at the right conclusion that using ipairs() might be an antipattern and I should stick to pairs or numerical for loop? Unless I am _really reallyyy_ sure that I have a LIFO-like table..?
https://redd.it/1qdodl1
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
lua lu
Can I get the readable text from a .lu file? I have the APK and everything is in the resource.car file, but the text inside is unreadable. I don't have a copy of the original code other than the APK, and I can't fix the errors right now because of that. Do you know of any way to do this?
https://redd.it/1qdnspz
@r_lua
Can I get the readable text from a .lu file? I have the APK and everything is in the resource.car file, but the text inside is unreadable. I don't have a copy of the original code other than the APK, and I can't fix the errors right now because of that. Do you know of any way to do this?
https://redd.it/1qdnspz
@r_lua
Lua Gotchas
Hi folks, I've been programming with Python for about 2 years now.
My coworker suggested that start embedding Lua into my projects to speed up the slower parts(I think he is getting annoyed by some of the slowness lol). Anyone know something that might bite me in the butt that is easy to overlook? From what I understand, I can install Lupa and get the runtime like that. He told me to use a bunch of tables. Is that correct for the most part?
https://redd.it/1qeuole
@r_lua
Hi folks, I've been programming with Python for about 2 years now.
My coworker suggested that start embedding Lua into my projects to speed up the slower parts(I think he is getting annoyed by some of the slowness lol). Anyone know something that might bite me in the butt that is easy to overlook? From what I understand, I can install Lupa and get the runtime like that. He told me to use a bunch of tables. Is that correct for the most part?
https://redd.it/1qeuole
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
It’s a shame what seems to be happening to luau
I was in discussions with someone on what noscripting language to use for their game. The discussion eventually fell to luau vs lua 5.4.8, and Lua won out in the end. Not because it was necessary better, but because luau is associated with Roblox. It really sucks to see people completely dismiss a language because of external factors that have nothing to do with the language itself, and I fear that luau’s external influences doomed it for the rest of its life
That’s all, sorry for the rant.
https://redd.it/1qjkk8p
@r_lua
I was in discussions with someone on what noscripting language to use for their game. The discussion eventually fell to luau vs lua 5.4.8, and Lua won out in the end. Not because it was necessary better, but because luau is associated with Roblox. It really sucks to see people completely dismiss a language because of external factors that have nothing to do with the language itself, and I fear that luau’s external influences doomed it for the rest of its life
That’s all, sorry for the rant.
https://redd.it/1qjkk8p
@r_lua
Reddit
From the lua community on Reddit
Explore this post and more from the lua community
I'm making a tool for making and distributing terminal apps that use Lua, what are your thoughts?
Hey guys! Right now I am making a tool for terminal apps distribution that heavily relies on Lua (since it's the language for coding these apps), will anyone need it? should I give up on it and do something else or should I continue working on it?
Basically, it's sandboxed Lua with some additional modules provided using C# (Lua CSharp), like those for using assets, calling other noscripts, permissions even (so that some sensitive functions like
For more info, check the documentation for the tool's API: https://github.com/Ict00/TtyPack/blob/master/docs/main.md
I really hope to get at least some feedback, because right now I'm kinda blind and don't know what exactly do I do. :D
https://redd.it/1qjab4s
@r_lua
Hey guys! Right now I am making a tool for terminal apps distribution that heavily relies on Lua (since it's the language for coding these apps), will anyone need it? should I give up on it and do something else or should I continue working on it?
Basically, it's sandboxed Lua with some additional modules provided using C# (Lua CSharp), like those for using assets, calling other noscripts, permissions even (so that some sensitive functions like
system.read_file_str require getting permission from user first (and yes, I removed io/os modules because sandboxing))For more info, check the documentation for the tool's API: https://github.com/Ict00/TtyPack/blob/master/docs/main.md
I really hope to get at least some feedback, because right now I'm kinda blind and don't know what exactly do I do. :D
https://redd.it/1qjab4s
@r_lua
GitHub
TtyPack/docs/main.md at master · Ict00/TtyPack
TtyPack: Single-file Lua TUI apps with built-in APIs and sandboxing - Ict00/TtyPack
[Hobby] Garry’s Mod WW2 Server in dev. Looking for GLua/Lua Devs & Model Artists
Hey everyone,
I’m working on a Garry’s Mod server that’s still in early development, and I’m looking for people who’d like to help out as a hobby / passion project.
Right now this is unpaid since the server isn’t live yet, but payment(Paypal) is possible in the future if everything works out and the server becomes sustainable.
What I’m looking for:
* **GLua / Lua devs**
* Gamemode noscripting
* Fixing or improving existing systems
* Helping build core server features
* **Model artists**
* Fixing or improving existing models
* Making better replacements
What you get:
* Credit for your work
* Long-term collaboration if things go well
* Freedom to share ideas and help shape the server
* Something you can use for your portfolio
If you’re interested, comment or DM me and I’ll share more details (concept, current progress, Discord, etc.).
Most of the progress is posted on discord.
**Discord DM:** .\_teixeira\_.
**Discord Server:** [Discord](https://discord.gg/CdycaHdt6B)
**Youtube Channel for Dev Showcases:** [Youtube](https://www.youtube.com/@AlphaRoleplayWaW?sub_confirmation=1)
https://redd.it/1qjhad4
@r_lua
Hey everyone,
I’m working on a Garry’s Mod server that’s still in early development, and I’m looking for people who’d like to help out as a hobby / passion project.
Right now this is unpaid since the server isn’t live yet, but payment(Paypal) is possible in the future if everything works out and the server becomes sustainable.
What I’m looking for:
* **GLua / Lua devs**
* Gamemode noscripting
* Fixing or improving existing systems
* Helping build core server features
* **Model artists**
* Fixing or improving existing models
* Making better replacements
What you get:
* Credit for your work
* Long-term collaboration if things go well
* Freedom to share ideas and help shape the server
* Something you can use for your portfolio
If you’re interested, comment or DM me and I’ll share more details (concept, current progress, Discord, etc.).
Most of the progress is posted on discord.
**Discord DM:** .\_teixeira\_.
**Discord Server:** [Discord](https://discord.gg/CdycaHdt6B)
**Youtube Channel for Dev Showcases:** [Youtube](https://www.youtube.com/@AlphaRoleplayWaW?sub_confirmation=1)
https://redd.it/1qjhad4
@r_lua
Discord
Join the Alpha Roleplay World At War Discord Server!
Take on the role of a soldier, officer, or civilian, and live through the struggles of wartime. Step into an immersive and dynamic roleplay experience set within Germany during World War II. | 210 mem