Developers’ Weblog

Sponsored by
HostEurope Logo

Developers’ Weblog

⚠ This page contains old, outdated, obsolete, … historic or WIP content! No warranties e.g. for correctness!

All 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38

I’ve updated a lot of things in MirBSD and for use with the Debian operating system. More to come, pax(1) has been converted to Mirtoconf (the successful system of mksh’s) but needs to be re-ported to a lot of systems (and some more bugs squished). My “WTF” APT repository also received a number of updates, such as to the ever-desired wtf(1), but it’s the time of that two-year cycle which invites general care for all of one’s packages.

On the other hand, MirBSD stops offering RSS feeds by tags. The world has become more insular, first by DSGVO, now by other cultural issues. I’ll be at FOSDEM, as usual, though, so rejoice!

You can now directly download, for all platforms and synthesisers, the soundfonts shipped in Debian for MuseScore (and others) I maintain. This service may cease at any time, without notice. Also, do mind the MIT licence.

On an unrelated note, happy new year in the western calendar!

Tags: archaeology debian news pcli tip

The “properly quote eMail messages and on Usenet” documentation is hosted on a server that appears to not get too much care at the moment. I’ve dug out workable versions:

The original link, with its redirection, which contained the links to the translations into Dutch and English, unfortunately no longer works.

I’m asking everyone to please honour these guidelines when posting in Usenet and responding to eMail messages, as not doing so is an insult to all the (multiple, in the case of Usenet and mailing lists) readers / recipients of your messages. Even if you have to spend a little time trimming the quote, it’s much less than the time spent by all readers trying to figure out a TOFU (reply over fullquote) message.

Ich bitte jeden darum, sich bitte beim Posten im Usenet und Verfassen von eMails sich an diese Richtilinien zu halten; dies nicht zu tun ist ein Affront wider alle (im Falle von Usenet und Mailinglisten viele) Leser bzw. Empfänger eurer Nachrichten. Selbst wenn man zum Kürzen des Zitats ein bißchen Zeit aufwenden muß ist das immer noch deutlich weniger als die Mühe, die jeder einzelne Leser aufwenden muß, herauszufinden, was mit einer als TOFU (Text oben, Vollzitat unten) geschriebenen eMail gemeint ist.

Mag ik iederéén verzoeken, postings in het Usenet en mailtjes volgens deze regels te schrijven? Als het niet te doen is vies tegen alle ontvanger’s en moeilijk om te lezen. Zelfs als je een beetje tijd nodig heb om het oorspronkelijke deel te korten is het nog steeds minder dan de moeite van alleman, om een TOFU (antwoord boven, fullquote beneden) boodschap proberen te begrepen.

Nik wishes you to know that the Movim packaging sprint (sponsored by the DPL, thank you!) is handled under the umbrella of the Debian Edu sprint (similarily sponsored) since this package is handled by the Teckids Debian Task Force, personnel from Teckids e.V.

After arriving, I’ve started collecting knowledge first. I reviewed upstream’s composer.json file and Wiki page about dependencies and, after it quickly became apparent that we need much more information (e.g. which versions are in sid, what the package names are, and, most importantly, recursive dependencies), a Wiki page of our own grew. Then I made a hunt for information about how to package stuff that uses PHP Composer upstream, and found the, ahem, wonderfully abundant, structured, plentiful and clear documentation from the Debian PHP/PEAR Packaging team. (Some time and reverse-engineering later I figured out that we just ignore composer and read its control file in pkg-php-tools converting dependency information to Debian package relationships. Much time later I also figured out it mangles package names in a specific way and had to rename one of the packages I created in the meantime… thankfully before having uploaded it.) Quickly, the Wiki page grew listing the package names we’re supposed to use. I created a package which I could use as template for all others later.

The upstream Movim developer arrived as well — we have quite an amount of upstream developers of various projects attending MiniDebConf, to the joy of the attendees actually directly involved in Debian, and this makes things much easier, as he immediately started removing dependencies (to make our job easier) and fixing bugs and helping us understand how some of those dependencies work. (I also contributed code upstream that replaces some Unicode codepoints or sequences thereof, such as 3⃣ or ‼ or 👱🏻‍♀️, with <img…/> tags pointing to the SVG images shipped with Movim, with a description (generated from their Unicode names) in the alt attribute.)

Now, Saturday, all dependencies are packaged so far, although we’re still waiting for maintainer feedback for those two we’d need to NMU (or have them upload or us take the packages over); most are in NEW of course, but that’s no problem. Now we can tackle packaging Movim itself — I guess we’ll see whether those other packages actually work then ☺

We also had a chance to fix bugs in other packages, like guacamole-client and musescore.

In the meantime we’ve also had the chance to socialise, discuss, meet, etc. other Debian Developers and associates and enjoy the wonderful food and superb coffee of the “Cantina” at the venue; let me hereby express heartfelt thanks to the MiniDebConf organisation for this good location pick!

Update, later this night: we took over the remaining two packages with permission from their previous team and uploader, and have already started with actually packaging Movim, discovering untold gruesome things in the upstream of the two webfonts it bundles.

mksh bugfix — thank you for the music

Tags: bug debian mksh pcli

I’m currently working on an mksh(1) and bc(1) script that takes a pitch standard (e.g. “A₄ = 440 Hz” or “C₄ = 256 Hz”) and a config file describing a temperament (e.g. the usual equal temperament, or Pythagorean untempered pure fifths (with the wolf), or “just” intonation, Werckmeister Ⅲ, Vallotti or Bach/Lehman 1722 (to name a few; these are all temperaments that handle enharmonics the same or, for Pythagorean in out case, ignore the fact they’re unplayable). Temperaments are rule-based, like in ttuner. Well, I’m not quite there yet, but I’m already able to display the value for MuseScore to adjust its pitch standard (it can only take A₄-based values), a frequency table, and a list and table of cent deltas (useful for using or comparing with other tuners). Of course, right now, the cent deltas are all 0 because, well, they are equal temperament against equal temperament (as baseline), but I can calculate that with arbitrary and very high precision!

For outputting, I wanted to make the tables align nicely; column(1), which I normally use, was out because it always left-aligns, so I used string padding in Korn Shell — except I’m also a Unicode BMP fan, so I had F♯ and B♭ in my table headings, which were for some reason correctly right-aligned (for when the table values were integers) but not padded right when aligning with the decimal dot. So I worked around it, but also investigated.

Turns out that the desired length was used as second snprintf(3) argument, instead of, as in the right-align case, the buffer size. This worked only until multibyte characters happened. A fun bug, which only took about three minutes to find, and is covered by a new check in the testsuite even. Thought I’d share.

Feedback on and improvements for the tuner, once it’ll be done, are, of course, also welcome. I plan to port the algorithm (once I’ve got it down in a programming language I know well) to QML for inclusion in the tuner MuseScore plugin, even. Check here, for now, for my work in progress… it’s quite big already despite doing basically nothing. Foundation laid (or so…).

I’m currently working on consolidating (as my former business is long defunct) and “The MirOS Project” (that as of 2018 is also back to being my own one-man show / hobby) into as my hobby / personal sorta homepage to not need any vhosts and simplify EU-DSGVO conformity. (I’ve also reduced logging.) Please excuse upheavals, as well as the continued presence of old, obsoleted or outdated content that may even be, as of now, completely wrong; I’ll fix it as time permits.

Happy Birthday, GPS Stash Hunt!

2018-05-03 by tg@
Tags: debian fun geocache personal

GPS Stash Hunt, also commercially known as “Geocaching”, “Terracaching”, or non-commercially (but also nōn-free) as “Opencaching”, is 18 years old today! Time for celebration or something!

mirabilos’ Waypoints

Excluding Munzees, I visited 2365 waypoints to date, ever since 2006 (I knew about GPS Stash Hunt in 2004 already but thought one’d need one of those expensive GPS receivers to play, which is untrue but I only got that when Pfeffer (from BOSng) took his GPS and me out for a bike tour in 2006, so, here we are…

(Some older on-platform logs have a number that still counts Munzees; the current format uses “number﹟”.)

FixedMisc [MirOS] 20180429 released

2018-04-29 by tg@
Tags: news pcli

Today I’ve released another new CVS snapshot of the FixedMisc [MirOS] font; as usual, the tarball contains the font in BDF form, with no conflict with the system Fixed [Misc] font; sources for use (compilation, editing) with bdfctool(1) are in CVS.

mksh on Jehanne, a guest post by Shamar

2018-04-15 by tg@
Tags: archaeology debian fun guest mksh pcli

Giacomo Tesio referenced mksh(1) in his annual Jehanne report and provided a guest post (dated 2018-01-09, sorry for posting it this late only) for us on his journey on porting mksh to Jehanne, his Plan 9 derivative operating system. Read on for his story!

MirBSD's Korn Shell on Plan9 Jehanne

Let start by saying that I'm not really a C programmer.
My last public contribution to a POSIX C program was a little improvement to the Snort's react module back in 2008.

So while I know the C language well enough, I do not know anything about the subtliness of the standard library and I have little experience with POSIX semantics.

This is not a big issue with Plan 9, since the C library and compiler are not standard anyway, but with Jehanne (a Plan 9 derivative of my own) I want to build a simple, loosely coupled, system that can actually run useful free software ported from UNIX.

So I ported RedHat's newlib to Jehanne on top of a new system library I wrote, LibPOSIX, that provides the necessary emulations. I wrote several test, checking they run the same on Linux and Jehanne, and then I begun looking for a real-world, battle tested, application to port first.

I approached MirBSD's Korn Shell for several reason:

  • it is simple, powerful and well written
  • it has been ported to several different operating systems
  • it has few dependencies
  • it's the default shell in Android, so it's really battle tested

I was very confident. I had read the POSIX standard after all! And I had a test suite!
I remember, I thought "Given newlib, how hard can it be?"

The porting begun on September 1, 2017. It was completed by tg on January 5, 2018. 125 nights later.

Turn out, my POSIX emulation was badly broken. Not just because of the usual bugs that any piece of C can have: I didn't understood most POSIX semantics at all!


First, Cinap had to patiently explain me on #cat-v that UNIX signals are reentrant.
It took him a while: I wasn't able to understand.
Even now, I keep asking: "Why?!? Why they did this! why..."


Fixed that, I saw that mksh was unable to execute ls: in Plan 9 common environment variables are lower case.
The $PATH variable is called $path, the $CDPATH variable is called $cdpath and so on.
Also, when appropriate, they are NULL separated char arrays, since they are exposed as files from the env device, and rc can get their size with a simple seek.

I reflected on the issue for a while, tried several solutions to preserve both conventions (some of which even worked).
But finally, I surrended to the simplest solution: I adopted the POSIX convention for Jehanne.

Aesthetics amuse, but simplicity helps.

However it was not enough: I needed to hook mksh startup to read the variables from the filesystem (just like rc does). How to do that cleanly? I asked on #!/bin/mksh and tg did not simply explained a poor noob how to do that. He did it himself!

I was enchanted by his kindness. So far Jehanne is just a toy. Still he spent his own time for me.


But the journey was still ongoing.

I realized that to run a command, mksh requires SIGCHLD support. I added it. The first implementation worked.


It was able to run exactly one command in mksh. The shell stopped reading input after the second one.

So I wrote it again from scratch. And it worked! Yuppy! :-)

Till I tried echo test | grep test

Grep didn't get EOF, as mksh for some strange reason was keeping the pipe open.
I extended devdup to ensure fcntl's emulation was working as expected. I rewrote fcntl emulation. Still broken.

Out of despair I turned to annoy tg again over IRC. Talking with him I realized that the problem was the signal dispatching. So I rewrote it again, introducing a new 9P2000 file server that handles signal IPC among POSIX processes, taking care of masks, ignored signals, waited ones.

Finally echo test | grep test worked.



mksh was blaming me with two annoying warnings:

mksh: No controlling tty: open /dev/tty: No such file or directory
mksh: warning: won't have full job control

I asked tg and he tried to explain me what /dev/tty is, providing links about /dev/tty, /dev/ttyN and /dev/console.

So I modified vt (and later hmi/pipeconsole) to provide /dev/tty as an alias to /dev/cons.

The first warning was gone... but only the first one!

It was not just a matter of warnings: I was unable to interrupt a script (what you do with Ctrl+C on unix).


Down the rabbit hole, again.

I had to study the complex semantics of tty job control (asking boring questions to tg, again).
I had to fix setsid, getsid, setpgid, getpgid, getpgrp and to add support for termios' tcgetpgrp and tcsetpgrp.
Worse: I had to mostly rewrite the file server I had just written. Sob!

It took a while.
In the process I realized that a sys/posixly instance actually represents a single terminal session..


... did I say it took a while?


Then, suddenly... I saw this, and it was like an epiphany:

mksh running in Jehanne with full job control


MirBSD's Korn Shell was working on Jehanne! What a happy new year! :-D

Groeten vanuit Brussels, tijdens FOSDEM

2018-02-03 by tg@
Tags: event personal

I’m in Bruxelles again, as every year since 2001, for FOSDEM. (I only missed OSDEM in 2000, mostly due to the curse of late birth.)

To revive a tradition, I’ve attempted (and successfully at that!) to find a place where we can eat Couscous Merguez, and we met up with bsiegert@ and had some nice conversation and, besides the overly LOUD!!! belly dance, delicious food. It was nice to catch up with each other again.

Other than that, see you over the next few days at ULB! Don’t miss the MuseScore booth and the two Teckids talks.

Colophon: complexity sucks.


2018-01-10 by tg@
Tags: event fun

I’ve been going to FOSDEM for about half of my lifetime, give or take a year I think. So, of course, I will be there again this year. Thanks to my employer for sponsoring travel and accommodation again.

It’s a bit annoying that the future of alternative OSes is a bit misty right now, depending on the hardware, but we’re continuing development, in subprojects (like mksh(1) and jupp(1), for example) and other projects (like Debian and MuseScore, whom I’ll meet at FOSDEM again) while researching possible fixes for the security theatre.

We had joy, we had fun… ♫ @ #34c3

2017-12-28 by tg@
Tags: event fun snapshot

MirBSD/sparc poster mod

MirBSD on the Sun


2017-08-16 by tg@
Tags: event fun pcli personal

I’ll not respond, much, until next Monday. We have FrOSCon.

All 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38

MirBSD Logo