This Space for Rent

All software sucks

Levee 4.0 on Windows 10

I’m in the throes of pushing levee up to version 4.0, and in the process of doing the windows port I’ve discovered that despite their best efforts Microsoft still doesn’t really get the whole idea of ttys. In particular trying to get levee to actually work over an ssh connection to windows is an exercise in screaming annoyance; to make it easy for people to use windows programs in a pipelines, they’ve wedged a console emulator into the drivers that are used to spit bits at remote connections and stuffed a ansi terminal emulator into it which you can turn on by setting a console mode bit, but they’ve not done a very good job at it; the spitting bits at remote connections doesn’t optimize the output, and the ansi emulator emulates buffer overruns and does mysterious unflushable buffering just to drive you nuts when debugging a text editor where you can see the escape sequences being sent to the console file descriptor, but then see a completely different set of escape sequences being sent to the terminal.

I know that Microsoft has ways of send bags of bits into and out of a system without doing any emulation or translation, but if you’re telnetted in? Weeeeelll, sucks to be you because you’re gonna get the effing screen buffers (and maybe even capturing ansi escapes?) whether you want to or not. (I’d not be at all surprised if there was an undocumented way to flip a console to bag-of-bits mode, because I can’t be the only person to want to telnet into a windows box and use vi (or emacs) but not-for-the-love-of-god-v*m, but the magic word is “undocumented”, so mere mortals are screwed.)

But on the bright side I’ve now got a hardware abstraction layer running, so levee proper just calls display functions that then call the os functions that come in whatever os shim module is included in the build, so when I’m messing around with the windows interface I’m not fucking with the editor proper (allegedly; I may have introduced a few bugs when stripping the pile of #ifdefs out, so there’s gonna be at least 3 months of my using it before I officially publish the release.)

If anyone wants to play with the development versions, they’re at top-of-heap on the public sccs mirror.