programming musings
31 Oct 2020

two decades of gnu mdk

I've just published GNU MDK 1.3.0, its 28th release, which finally migrates MDK's graphical user interface to GTK+ 3, to keep up with the, ahem, not-so-modern times and see to it that MDK keeps alive for at least another decade or two.

mdk.png

Twenty years ago on this day, the first version of MDK 0.1 was released. Back then, it didn't have an Emacs or graphical interface1, support for internationalization or any integration with Guile, and the debugger was really bare bones (it still is, but not that much). It wasn't yet a GNU package. But all those things, and then more, came in rapid succession, as i used the project to discover the Free Software world, both at a technical and a human level.

As a physicist out of grad school, i wasn't young, but i was just starting in the world of software and everything was fresh and new and exciting. I remember the thrill of receiving emails from total strangers willing to help and offering insightful advice (hi there, Philip King, wherever you are these days), and of thinking that someone else, out there, was finding my little program fun and useful2. Or of exchanging messages with RMS, that guy i had read about in Hackers and admired so much; and then see in the process MDK entering the GNU umbrella. And of seeing it shortly afterwards on Knuth's own page on TAOCP, up there in the MIXware list.

MDK was my first project developed entirely in Emacs running on Debian (twenty years ago, that felt bolder than it sounds now), two constant companions up to ths day. Seeing it as a maintained Debian package was another big satisfaction and milestone for memory lane.

I also have vivid recollections of the mind-bending experience of discovering Scheme, because i learnt that Guile was the extension language of choice for GNU, and my baby steps on writing a lexer or an interpreter, and how humbled i felt when i took a proper compilers course a few years later and looked back at my clumsily rediscovered wheels3.

MDK was also my gateway to publishing a book for the first time, thanks to the nice guys of the GNU Press, with a polished version of its manual. Okay, it's more of a booklet, and out of press by now, but it was an enriching experience nonetheless; for instance i got a chance of seeing an editor in action.

mdk.jpg mdk-source.png

After two decades, having grown older and bitter, all those things look small and of little importance, but as a freshman i truly had the best of times. I think that maybe the most important thing i learned was to collaborate with other people, and i've since been always very fond of the kindness of strangers, and how much one can learn from them.

Anyway, here's to the next twenty years. Happy hacking!

Footnotes:

1

To be honest, i almost never use MDK's graphical interface, and prefer to comfortably use it within emacs, but a bit of eye candy is not bad every now and then.

2

Keep in mind that those were ancient times, more so on my side of th world: the cool new thing to learn and use for me was CVS, and there were rumors about something called subversion. And then SourceForge felt like the best thing ever.

3

Shortly after, SICP would be the eye-opener it's been for many and would make everything make sense (i talked a bit about that process in one of my very first blog posts). In retrospect, i think the journey that i then started is the main reason i never went on to complete an MMDK for MMIX, which was planned and going to be written in OCaml.

Tags: programming
19 Oct 2020

in no particular order xiv

Interesting bits elsewhere, emacs edition:

Tags: sundry emacs
07 Oct 2020

the simulacra

the-simulacra.jpg

Philip K. Dick is always deeply original, in a very curious kind of off-hand way. Every year i pick at random one or two of his short novels (he was really prolific), and i always find food for thought and, at the same time, uncomplicated fun. It's a peculiar combination, but one i unreservedly recommend (although of course if you haven't read yet masterpieces such as Ubik or The Man in the High Castle, i'd start there).

Tags: books
07 Oct 2020

in no particular order xiii

Interesting bits elsewhere:

Tags: sundry
31 Aug 2020

exhalation

exhalation.jpg

Ted Chiang is up there with Greg Egan as my favourite hard SF living author, and his Exhalation was just as good as his previous books. While the first story about time travel didn't look exceptional (even though it's easily one of the best in that micro subgenre i've read), it's immediately followed by a charming entropy metaphor, an insightful mini-essay on free will, and on and on he goes, in a deluge of originality and, often, insight.

In Science Fiction Doesn’t Have to Be Dystopian, Joyce Carol Oates writes a much better review, but just reading the book is your best option!

Tags: books
27 Aug 2020

in no particular order xii

Interesting bits elsewhere:

Tags: sundry
08 Aug 2020

xmobar: a battery trick

i've been maintaining xmobar for more than a decade now, and i still use it daily and tweak it almost as often. With almost a hundred contributors besides myself, and many bugs to solve, i am always learning new things. The latest one, that font awesome thing everyone seems so fond of.

i just decided to add a bit more icons to my configuration, and, in particular, to have a battery monitor that displays graphically an approximation of time left.

For that, you specify the new font as one of the additional fonts:

additionalFonts = ["xft:FontAwesome-9"]

Then, find a list of glyphs that represent a charging battery (the ones between 0xf240 and 0xf244 work well), and assign that to the -f flag (the foreground of horizontal bars) with -W (the display width) set to 0, and use it in your battery monitor template, which should include somewhere <leftbar>; for instance:

BatteryN ["BAT0"]
         ["-t", "<acstatus>"
         , "-S", "Off", "-d", "0", "-m", "3"
         , "-L", "10", "-H", "90", "-p", "3"
         , "-W", "0"
         , "-f", "\xf244\xf243\xf243\xf243\xf242\xf242\xf242\xf241\xf241\xf240"
         , "--"
         , "-P"
         , "-a", "notify-send -u critical 'Battery running out!!!!!!'"
         , "-A", "5"
         , "-i", "<fn=1>\xf1e6</fn>"
         , "-O", "<fn=1><leftbar>  \xf1e6</fn> <timeleft>"
         , "-o", "<fn=1><leftbar></fn1> <timeleft>"
         , "-H", "10", "-L", "7"
         ] 50 "batt0"

where 0xf1e6 displays a little plug. here's a peek at the corner of my desktop with a charging battery:

xmobar-battery.png

The only thing we needed to enable this little feature was to implement indexing on the foreground bar string when the special value 0 is passed, a really small change codewise. Moroever, the feature is generic and applies to any horizontal bar in any monitor, so one can play similar tricks in many places.

This feature will be available in the forthcoming xmobar 0.36 release, but you can of course just grab it from its master branch.

Tags: programming xmobar
06 Aug 2020

in no particular order xi

Interesting bits elsewhere:

Tags: sundry
23 Jul 2020

in no particular order x

Interesting bits elsewhere:

Tags: sundry
14 Jul 2020

in no particular order ix

Interesting bits elsewhere:

Tags: sundry
Other posts
Creative Commons License
jao.io by jao is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.