💾 Archived View for kvothe.one › gemlog › 2020-09-12.gmi captured on 2020-09-24 at 00:47:42. Gemini links have been rewritten to link to archived content
-=-=-=-=-=-=-
Friday afternoon, I was putting in my timesheets for work, and a thought occurred to me: I've been using this program, `worklog`, for almost 15 years to keep track of my time.
http://www.truxton.com/~trux/software/
/library/software/worklog.tar.gz
It's a super simple ncurses-based C program that Truxton King Fulton II wrote to track time and graciously released to public domain. You define a list of projects by letter, then hit that letter to start a stopwatch for that project. When you're done, hit <Enter> and optionally type in a little bit to describe what you did.
What's amazing to me is that this program was last released in like 2001, and it compiles and runs on every operating system I've put it on, no questions asked. (Admittedly, on Windows via Cygwin, but I digress.) It dumps out text that can be parsed in whatever language you see fit. I've hacked together Perl scripts to push and pull this into whatever format matches my employer's needs and that's basically it.
Inasmuch as software has any sort of permanence, this software has a certain timeless elegance to it and I just want to sing its praises for doing exactly what I need and getting out of the way otherwise. I can think of plenty of other JavaScript-laden solutions for the same problem, but this entire kit, documentation, examples, and all, weighs in as a 7.4 KB tarball.
That got me to thinking about the software I tinker around with for fun. I've been banging on an Another World VM interpreter in C for Plan 9 for a little bit, and while it stylistically matches the simplicity of `worklog`, it doesn't really match the portability of it. Plan 9's C dialect definitely nails that whole elegance bit, but I just don't know if it gives me the warm fuzzies to write something usable only if you meet a list of prerequisites, including installing an unfamiliar operating system.
What good is software if it's enshrined in an ivory tower? I want the things I make to be USABLE and without levying hefty requirements on the user.
I used to be a huge fan of Perl for CPAN's sake. How easy it is to find a library that does what you need it to! There's a library to parse JSON, or generate images, or manipulate UI interfaces, or whatever! But I've come to believe that my favorite Perl code is the sort that is easily editable and requires no Perl libraries other than the `perl` interpreter itself.
Take `radio.pl`, for instance:
All it does is call `mplayer` and pass in some arguments to stream Internet radio. The code isn't bulletproof. It makes assumptions. But it does what's on the tin-- nothing more, nothing less. If you have `perl` and `mplayer` on your system, it's probably going to work.
Anyway, that's quite enough rambling on about some abstract sense of what software I like. There's certainly plenty of treatises back and forth all about the subject, and it would be a bit presumptuous to assume that my opinion amounts to more than a hill of beans on this wide Internet world of ours.
Something I did today, just to play around: I made a "hello world" C program that opens up a dark purple GUI window for 2 seconds using SDL:
It was kinda fun seeing if I could hack together something vaguely `worklog`-esque, but using SDL. That's a LOT of bang for the buck -- SDL gets you 2D/3D rendering, mouse/keyboard/gamepad input, and even audio!
https://en.wikipedia.org/wiki/Simple_DirectMedia_Layer
It may not match the elegance of all the builtins and documentation in the Plan 9 C dialect, but it's not too bad for something that brings such a large toolkit to so many operating systems.
Until next time, be well!
kvothe.