Microblog
It looks like this microblog is turning into a series of notifications for my released software. Maybe I should post other stuff here as well. Let’s see…
But while we’re on the topic of notifications… I wrote a new tool called todotxt-notification. It takes a todo.txt file and emits a notification for every task that is due. The threshold can be adjusted of course, so you can get a notification a few days before the due date is reached.
The program does not run as a daemon. Instead, it is intended to be run daily. You can run it when your Desktop environment starts. Of course, that only works if you shutdown your computer at the end of the day. Maybe using something like anacron works as well. I haven’t tested that. Anyway, I’m sure you’ll find a good solution for your use case.
I hope this tool helps a few other people as well. Have fun.
After this year’s “Festival Nacional de Robótica” in Portugal was over, I decided to do something easy for my head while I had a bit of free time until we had dinner. So I wrote a small command line utility that can send a few monitor commands to the RCSSServer3D, the simulation server used in the 3D Soccer Simulation League.
The program itself is dead simple. Don’t expect any magic. But if this sounds like something that you want to have, you can find the project here: https://sr.ht/~hannes/pasan
I added an -i
option to read more complex commands from stdin. This way, you
can use this utility as well to send more complex commands from the command
line. Incoming messages are also printed to stdout in case you need to extract
any information out of them.
I’ve built an OSC to OBS adapter. It’s very tiny regarding its functionality. Only setting the scene is supported as of now. I probably won’t add any more for now, as I don’t need that. You can check it out here: https://sr.ht/~hannes/elma
And yes, I know that the tokio library is an absolute overkill for this tiny tool. I’m not even doing anything asynchronously. But the OBS library depends on tokio and I don’t really care. I’ll probably use this tool once per year for a few hours. And if it bothers me too much, I can still implement this stuff in another way. It’s good enough for my use case.
A few weeks ago, I wrote the tool g203ctl. I reimplemented the functionality of the tool g203-led. Both let me change the LED effects on my mouse. However, the original script was written in Python. My version is written in Zig.
My version has a manpage and feels easier to use (at least for me).
Contrary to the Python version, mine never crashed so far. This is probably the
biggest reason that I reimplemented this tool. But maybe there was something wrong
with my setup when the Python implementation crashed, I can’t really tell.
Anyway, the final question remaining for me was: is it also faster?
To find out, I did a quick benchmark using Hyperfine: sudo hyperfine --warmup 3 'python3 g203-led.py lightsync breathe 0000ff 9000 42' 'g203ctl -l breathe 0000ff 9000 42'
.
I used the ReleaseSmall
optimization to build the g203ctl executable.
This is the result:
Benchmark 1: python3 g203-led.py lightsync breathe 0000ff 9000 42
Time (mean ± σ): 401.8 ms ± 2.2 ms [User: 96.5 ms, System: 101.1 ms]
Range (min … max): 398.2 ms … 405.8 ms 10 runs
Benchmark 2: g203ctl -l breathe 0000ff 9000 42
Time (mean ± σ): 384.4 ms ± 2.2 ms [User: 54.8 ms, System: 92.6 ms]
Range (min … max): 382.3 ms … 387.8 ms 10 runs
Summary
g203ctl -l breathe 0000ff 9000 42 ran
1.05 ± 0.01 times faster than python3 g203-led.py lightsync breathe 0000ff 9000 42
My Zig version is about 5% faster. Cool. Will I notice that? Definitely not. Most of the time is spent waiting for I/O stuff to complete. But it was/is a fun little project and I learned to write some Zig code.
Today, I published version 26.2 of airwindows-lv2. The following plugins are new:
- BassAmp
- BassDrive
- BassKit
- BigAmp
- Cabs
- FireAmp
- Flipity
- GrindAmp
- LeadAmp
- MidAmp
- ResEQ
- ResEQ2
- Sinew
Technically, these were part of version 26.0 which was also released today. But I managed to let a compiler error slip through and had to follow up with a bugfix release.
Have fun!
Last night, I published some man pages of my own software as HTML documents.
They are available here: https://hannesbraun.net/share/man/index.html
Maybe, the web versions are going to be useful for someone. I don’t know.
It’s actually a project that I started back in March this year. But I never
published something. If you are interested, the script I’m using to generate
them is also available: https://git.sr.ht/~hannes/webman
This repository is currently not listed publicly on my account. The scripts
aren’t very flexible right now. But I might polish this up in the future, if it
proves to be useful.
The script itself is making use of
scd2html and
pandoc. After running those tools, it just embeds their
output into a basic HTML template and generates an index for all the man pages
generated.
This project was originally inspired by the manual available on the
website of “Plan 9 from User Space”: https://9fans.github.io/plan9port/man/
I think those previous blog posts (which were pretty short) belong into a microblog rather than in my main blog. And services like Twitter or twtxt are usually a bit restrictive through their length of 140 characters. That might be desirable in some cases. But for my use case, it’s mostly too short. So let’s try this thing here…
Today, I published the code for my simple little status page titled “jvlu”. It is written in V and doesn’t have a lot of features. It allows to check the health of an HTTP server by comparing the response status to an expected status. You can also try to connect to a TCP socket and see if a connection succeeds.
The web page doesn’t contain any more information than necessary. Just the online status, response time and when a service was seen last.
Why not try it out?
Update (March 25, 2023): the application WAS written in V. With version 0.2.0, I rewrote it in Go. V was simply too hard to work with as I was always struggling to even get the compiler to run.
I’ve written a “new” tool called Nijika! It allows you to run a bunch of commands in series or in parallel. Nothing too fancy… but useful for certain things.
I released version 2.0.0 of the ELIZA Discord Bot. What’s new?
- No more TUI! As I started running ELIZA inside a Docker container, this wasn’t useful anymore. In the end, it just adds unnecessary complexity and dependencies to the project.
- Also, within a guild, ELIZA will only respond in channels with the word “eliza” in the name. The casing doesn’t matter. Instead of excluding ELIZA from all the channels where you don’t want her to respond to every message, you can now just create a dedicated channel for communicating with ELIZA. Simple and effective.
Visit the project on SourceHut: https://sr.ht/~hannes/eliza-discord/
Or download the source code for version 2.0.0 right away: https://git.sr.ht/~hannes/eliza-discord/archive/2.0.0.tar.gz
Yesterday, I released version 11.0 of my Airwindows LV2 port. Today, I’m following up with version 12.0.
These are the new plugins from both releases:
- BussColors4
- Distance2
- DrumSlam
- HighGlossDither
- Monitoring
- Verbity
- XBandpass
- XNotch
- XRegion
My ports of XLowpass and XHighpass are still causing issues. I’m not sure when those will be ready for release.
Download the new release here: https://github.com/hannesbraun/airwindows-lv2/releases/tag/v12.0
Katarina 5.0.2 has been released. Actually, it was released about 10 days ago.
It can now read its bot token through an environment variable. Why does it matter? Because this makes running Katarina in a Docker container a lot easier. Oh, I also included a Dockerfile in the repository that you can use to build a Docker image containing Katarina.
I feel like I need to fill this site with some content… a great possibility to advertise my new tool “rickroll-telnet” that I published a few days ago! It trolls (or better: it rickrolls) the people wanting to connect to your open Telnet port. This ain’t going to be what they were looking for :D
It’s really just a rewrite of the “Rickroll” implemented by David C. McNett. There’s a command line version available that you can use with something like inetd. The main benefit of my version is the standalone version though (apart from being written in Rust, of course…). Oh, and the standalone version also caches the output on startup.
Check it out here: https://sr.ht/~hannes/rickroll-telnet
Conclusion: security through trolling ;)