(λ (x) (create x) '(knowledge))

Advent of Ure

Consistent progress headed into 2023 ยท January 1st, 2023

It's the end of the year, but we've been busy leading up to it. This year I participated in a little Advent challenge, not the usual Advent of Code that everyone loves so much though. No this year I did the Advent of Ure, or adventure for short with the group over at the Small and Nearly Silent esolang pubnix. The challenge was simple, but incredibly enjoyable.

For the month of December, do something each day.

Dead simple right? The point of it all is to really just enjoy yourself, do something each day to advance a goal of your choice, and keep a log of what you're doing to share with others. Being an esolang based tilde, we all sort of gravitated to little programming projects, but really anything could count here. Don't get caught up in corporate style data crunching, just learn and do! For me this little challenge manifested in the creation of a few different tools, all of which are still works in progress, but go me out of my comfort zone and were vehicles for learning.

So what did I do exactly? Quite a bit! These are in no particular order, but the full adventure log is further down if you're curious.

Phew! That sure seems like a lot in such a short period of time! Most of it is utterly incomplete, but in every case I made solid progress just bouncing between topics/ideas as the whim came upon me. I spent a massive amount of time tinkering with Nim lang, which is increasingly becoming a favorite tool of mine. But outside of that I didn't really have a theme, I let my mind wander to things that I had left stagnant or just didn't make time for, like the i3 status utilities and droid4 hardware tool. I had good enough working versions of these things in bash and python respectively, they just weren't performant. Rewriting them in Nim gave me the opportunity to improve something I use daily while learning a little more about making tight performant Nim programs.

I Think of everything I did I'm most proud of OSA, the little TUI for our adventure logs. It's super simple, and somewhat of a hacky thrown together mess of Nim, but I actually made a terminal UI that worked and doesn't look horrid.

OSA showing the current day's entries. And yesterdays entries as well.

And these droid utilities while small have a huge impact on my day to day workflow. It's so nice to have fresh tools to make my i3 setup feel cozier while additionally being more functional. It's easy to miss in the screenshot below, but that tiny blue music indicator is amazing since I have a mocp mode in my i3 config to handle playback and song changes. Now I don't need to load mocp to do anything more than change albums/playlists!

Droid4 rockin those new utilities

The point that's worth driving home here though is that consistency begets results. I did something each day, no matter how small it was, even when I didn't feel like doing it. And I really like the results! When I needed a break, I took it, and the gaps in my log attest to it. Life always comes first, but it's really important to make time to do something to move forward and reach your goals. I'm going to try and keep that mentality going into 2023.


Here's the adventure log I maintained during the challenge, you don't really have to read it, I've just included it here at the end if you happened to be curious what it looked like.

01 DEC: Created a little TUI to view adventure logs on pubnix instances! gitlab.com/durrendal/osuhn_shokhaath.git
02 DEC: Fixed up osa's ability to truncate strings, and properly display multiple entries from multiple people
03 DEC: Wrote a wifi strength utility in nim for my Droid4, and changed my battery utility to use Nord colors. 
03 DEC: Began the uphill battery to rewrite the Droid's init services in nim! This may end up being the rest of the challenge for me.
04 DEC: Added LED and Display manipulation functions to the droid4 utility. gitlab.com/durrendal/Droid4-Alpine-Bootstrap.git
04 DEC: Wrote a quick fetch utility to pull external adventure_log files onto sans (testing on eli's & my own log)
05 DEC: Extended the droid led function to manipulate triggers, so now my shift key blinks on disk access! Tiny blikenlights
05 DEC: Migrated xrandr script to nim, super lazy shell exec calls internally, but it consolidates the functionality
05 DEC: Started work on a tui dashboard for the droid utility. (thanks for the great idea Mio!)
06 DEC: Break osa out of a monolith so I can use the data functions in other utilities.
06 DEC: Used said data functions to add a twtxt export functionality to osa, you can grab that at smallandnearlysilent.com/advent_of_ure.txt
07 DEC: Added word wrap to osa. But guess what, I still haven't figured out entry scrolling, so brace yourself for broken views on small screens! (thanks for the suggestion Marcus)
07 DEC: Add specific user view to osa, it's janky and only shows my logs, but now we shouldn't have bottom buffer overflows!
07 DEC: Wrote a little mocp music player info i3 block status tool thing for my droid, so I can have pretty colored music on my bar
08 DEC: Minor tweaks to music player so that it could be used in tmux as well.
09 DEC: Started yet another project, because I cannot ever just work on one thing. This time we're making a TUI podcatcher, gitlab.com/durrendal/ricevilo
10 DEC: Planned the design for ricevilo, aiming for a mocp style daemonized media player which can support a TUI and CLI interface.
10 DEC: Configuration/arg parsing for ricevilo
11 DEC: Added database schemas and creation for ricevilo
12 DEC: Started work on RSS parsing for ricevilo, also had this great idea to extend my i3block music indicator to be a generalized control mechanism for mocp and ricevilo once finished.
13 DEC: Not a software night, my droid's display died, so I completely rebuilt it from spare parts I had on hand. We almost had a show stopper, but my stubbornness prevails!
14 DEC: Got rss parsing working, with solid database injection as well
14 DEC: Attempted to add atom parsing as well, it looks right, but segfaults on me. Not supporting atom for podcasts isn't an issue.. right?
14 DEC: Went down the rabbit hole that is audio handling in Nim.. open to suggestions if anyone has any
15 DEC: Figured out how to get libmpv working via nimterop, and I actually played an audio file with it! SO close to having a new noise making toy
16 DEC: Continued work with libmpv, mostly determining how settings work to control playback in nim
17 DEC: Started configuring my new RB5009, basic firewall and security settings, vlan planning, etc
18 DEC: I still haven't gotten back to ricevilo, instead I finished up a DnD5e bestiary rec file. In essence my DM setup is a series of these rec files and a Justfile to kick off quick queries for monsters/NPC/campaign references. Nice and simple, editable everywhere. Really just love recfiles honestly.
19 DEC: Added state handling to ricevilo, this way the media server can update the current position and playback info
20 DEC: Hooked up the server and database functions to ricevilo's cli scaffolding, only to find out that while daemonization does work, it doesn't really provide a clean way to interact with the media server. So now it's looking like the server component will get a socket server, db functions will get consolidated there, and cli/tui clients will be built on top of the socket interface.
21 DEC: Just a little bit more work on my DnD setup, mostly fleshing out the bestiary and figuring out how to make my Justfile more flexible so I can do just monster Imp to pull information on a specific monster.
22 DEC: More work on the DnD setup, and we gave it a full test run playing through the start of a new campaign! Things worked well, but I need to flesh out my recfiles.
26 DEC: Dropped off the wagon over the Christmas break, but started working on a control server mechanism for Ricevilo, might have something usable there before the end of the year!
27 DEC: Ricevilo has a somewhat functional socket server, it needs tweaking so it reuses existing connections, and wraps the mpv context better, but it works!
28 DEC: Still grinding away at that socket server, additionally though I took some time to figure out how to use AWS system session manager in terraform, it's a nifty little tool that lets you ssh into your EC2 instances without exposing an SSH port to the WAN, or even attaching a public IP to the instance.
29 DEC: Worked on some setup scripts for Step-CA and Vaultwarden for the homelab, nothing fancy, but the end result should have solid returns security wise.
30 DEC: Wrote a little lua script for weechat to blink the leds on my droid when I get highlighted or privmsg'd, simple but honestly fun to write
31 DEC: Rounding out the year with some light udev rule additions for my droid, so that led control doesn't require sudo. This challenge has been a blast! Hopefully I'll have a blog post on it done up shortly.


(defparameter *Will_Sinatra* '((Age . 31) (Occupation . DevOps Engineer) (FOSS-Dev . true) (Locale . Maine) (Languages . ("Lisp" "Fennel" "Lua" "Go" "Nim")) (Certs . ("LFCS"))))

"Very little indeed is needed to live a happy life." - Aurelius