
Want to write a #GNOME app in #Lua? My new guide is the definitive tutorial for doing so.
https://www.vtrlx.ca/posts/2025/howto-complete-lua-gnome-app/
#Tag
Want to write a #GNOME app in #Lua? My new guide is the definitive tutorial for doing so.
https://www.vtrlx.ca/posts/2025/howto-complete-lua-gnome-app/
Want to write a #GNOME app in #Lua? My new guide is the definitive tutorial for doing so.
https://www.vtrlx.ca/posts/2025/howto-complete-lua-gnome-app/
Want to write a #GNOME app in #Lua? My new guide is the definitive tutorial for doing so.
https://www.vtrlx.ca/posts/2025/howto-complete-lua-gnome-app/
#Lua disappoints me. Like, what’s the use in metatables if I can’t even attach one to a number or a function? Asking because I want to implement my functional threading operator in Lua (by redefinition __shr/>> operator), and it just... doesn’t come together?
You can attach stuff to numbers and functions in #JavaScript, which is much better (my operator is not implementable in #JS, but that’s for a different reason.) You can attach metadata (including functions) to ANYTHING in #Clojure. But not in Lua, apparently. Sigh.
#Lua disappoints me. Like, what’s the use in metatables if I can’t even attach one to a number or a function? Asking because I want to implement my functional threading operator in Lua (by redefinition __shr/>> operator), and it just... doesn’t come together?
You can attach stuff to numbers and functions in #JavaScript, which is much better (my operator is not implementable in #JS, but that’s for a different reason.) You can attach metadata (including functions) to ANYTHING in #Clojure. But not in Lua, apparently. Sigh.
#Lua is what a C++ developer thinks is "easy enough for a level designer".
#BASIC has the virtues of being trivial to read, write, and only has two data types, plus arrays of those. No classes, no function pointers. If you add named labels or functions, it's "modern" enough.
Hi, people! ✌️
I've build "Cat a shooter 😼" for Android, and this is the last thing that I have to do for a while.
And now you can download this game for your Android device 📱 from Gamejolt: https://gamejolt.com/games/cat-a-shooter/1007868
or from itch.io: https://xolatgames.itch.io/cat-a-shooter
Also I've add instructions for building to it GitLab page 👉 https://gitlab.com/xolatgames/cat-a-shooter
So, I think that it's all, and see ya later.
Have a good day! 😉 😜 ✌️
#opensource #games #gamedev #android #arcade #spaceinvaders #lua #devlog #love2d
🦾 Why Lua Beats MicroPython for Serious Embedded Devs
「 Lua isn’t just compatible with embedded systems; the Lua ANSI C library was designed for them. Its architecture is clean, compact, and deterministic.
MicroPython, on the other hand, is a reimplementation of Python 3. It works well for many embedded use cases, but it inherits assumptions from a desktop-oriented language 」
https://www.embedded.com/why-lua-beats-micropython-for-serious-embedded-devs
I'm currently writing #Fennel examples, and this is delightful. I even managed to make the decide
function even more beautiful than it was!
(local ruleset [is-in-ai-robots-txt?
default])
(fn decide [request]
(accumulate [outcome nil
_ f (ipairs ruleset)
&until (not= outcome nil)]
(f request)))
This is perfection.
From nothing to running iocaine + Caddy with ai.robots.txt
's robots.json
and a few metrics as a starting point.
Contains #Roto, #Lua, and #Fennel - and a few tests too, for each.
I'm on a bit of a roll lately, and have released #iocaine version 2.4.0 just a few moments ago.
This does not bring that many significant changes as 2.3.0 did, but it does introduce #Lua and #Fennel as languages you can script its decision making with, on top of #Roto, which was introduced in 2.2.0.
While these languages run slower than Roto, they're still very fast, and are not going to be a bottleneck - they do provide a more familiar language to write the decision making in!
Oh, and metrics can now be persisted across restarts.
"What is acceptable?", you may ask.
Well, anything faster than ~40k req/sec in release mode will do. Why ~40k req/sec? Because that's my reverse proxy's bottleneck.
I also expect a very naive implementation of return false
to run at at least at 1k req/sec in release mode.
What's a naive implementation? Creating the runtime environment on every request, and compiling the trivial program on every request.
In other #iocaine news, I'm doing some final polishing on #Lua scripting support, to make it as convenient as #Roto.
Right now, there's a differenc between how Lua and Roto scripts are loaded: with Roto, one needs to give a path to a directory, and pkg.roto
will be loaded from there, and any import
s will be relative to that directory.
With Lua, one gives iocaine a file path, and - currently - needs to set up the package.path
search path manually.
So here's what I'll do: I'll make iocaine require a directory for Lua too, and it will add it to package.path
, and will require("main")
. The required module will also have to return a table with at least a decide
key, and an optional run_tests
key. This will simplify finding the functions to run, and will greatly reduce the number of special cases.
Today, I'm writing tests. Originally, I planned to write a bunch of tests in Rust to exercise the request handlers, but that felt like a huge pain in the backside, and would've involved a lot of repetition and boilerplate.
Then, I figured: I'll write the tests in #Roto and #Lua! Test the things from that side. Much less boilerplate, but still a lot of repetition.
Instead, I'll be writing a test suite to verify the decisions of a request handler. I'll run it for both engines, #Roto and #Lua. I will still have to write the scripts twice, but I will only write the verification once.
🖥️ My ultra-budget server powering http://websysctl.alfonsosiciliano.net has been running smoothly for the past 2 months. So far, so good!
📈 #Crawlers hit tens of thousands of sysctl parameter pages daily. That's fine, since robots.txt allows it. But why keep requesting non-existent pages as if the site were built with WordPress 😤 ? Fortunately, the stack (#FreeBSD + #OpenResty 🌐 + #Lapis ✏️ + a custom-built #database 📦 ) stays well within the limited resources of my $5/month cloud server.
The code might soon be #OpenSource stay tuned!
#UNIX #sysctl #WebDev #WebServer #ThePowerToServe #coding #Lua #kernel
Hey fedi friends, what are the differences in USES and config options listed at #freshports for a #FreeBSD #port? I am familiar with USE in #Gentoo #Linux, which seem to be the config options here? For #Gentoo it is very common to use different USE settings for a packages, but for #FreeBSD I read from porter's handbook there are not many USE items and they looked different from the term in #Gentoo. I am still trying to wrap my head around what is happening that whenever I try to build a port, like #vim or #git in tiny flavors, I constantly noticed #Perl #Bash #lua #Rust #Python and all other seemingly unrelated stuff get pulled in. #BSD #RunBSD #Unix #FOSS
Weekend goal: a #Lua chunk (script) to help sighted users review #Braille. It's a great way to understand how visually impaired users interact with a computer using a screen reader and a Braille display. The script is simple and easy to configure. Currently, it offers a learning mode; in the future, a challenge mode will be added, along with a blog post explaining how to set it up.
Link: https://gitlab.com/-/snippets/4858299
On #FreeBSD it should be executable via flua:
% flua learnbraille.lua
after installing liblouis:
# pkg install liblouis
[edit] % /usr/libexec/flua learnbraille.lua
「 Teal is a statically-typed dialect of Lua. It extends Lua with type annotations, allowing you to specify arrays, maps and records, as well as interfaces, union types and generics.
It aims to fill a niche similar to that of TypeScript in the JavaScript world 」
A space for Bonfire maintainers and contributors to communicate