February 5th, 2020

Hard Stare

FOSDEM 2020 write-up (warning: very long, mostly unedited -- sorry in advance)

Or "What I Did On My Holidays by Liam Proven aged 52¼."

The first mainline talk I got to on Saturday was the one before mine: “The Hidden Early History of Unix” by Warner Losh of the FreeBSD project. [https://fosdem.org/2020/schedule/event/early_unix/]

This was a good deep-dive into the very early, including pre-C-language versions, and how little remains of them. Accidental finds of some parts and a lot of OCR work and manual re-keying has one PDP-7 version running in an emulator; for most of the others, nothing is left but at best the kernel and init and maybe a shell. In other words, not enough to run or to study.

What’s quite notable is that it was tied very closely to the machine -- they can even ID the serial numbers of the units that it ran on, and only those individual machines’ precise hardware configurations were supported.

There was an extensive list of the early ports, who did them, what they ran on and some of the differences, and what if any code made it back into the mainline -- but it’s gleaned from letters, handwritten notebooks, and a few academic papers. Printed publications have survived; machine-readable tapes or disks and actual code: almost nothing.

It’s within my lifetime but it’s all lost. This is quite sobering. Digital records are ephemeral and die quicker than their authors; paper can last millennia.

Then I did my talk, [https://fosdem.org/2020/schedule/event/generation_gaps/]. There’s a brief interview with me here: [https://fosdem.org/2020/interviews/liam-proven/]

It seems to have been well-received. A LinkedIn message said:

«Hello Liam,
Just wanted to let you know that your talk was one of the best so far on
FOSDEM. Thank you for all the context on OS/HW history, as well as for
putting Intel Optane on my map. I did not understand the potential of
that technology, now I think I do.»

That was very gratifying to hear. There has also been some very positive feedback on Twitter, e.g.

Then I went to “Designing Hardware, Journey from Novice to Not Bad” [https://fosdem.org/2020/schedule/event/openelectronicslab/]

A small team built an open source EKG machine for use in the developing world where unreliable power supply destroys expensive Western machinery.

They taught themselves SMT soldering by hand, they did demos and test runs that included moving the mouse pointer by mind control! It’s not just an EKG machine. Kit they used included an OpenHardware ExG shield and OpenSCAD. They noted that the Arduino build environment is great even for total beginners -- for example they learned to do SMT soldering from Youtube. (Top tip: solder paste really helps.) Don’t necessarily use a soldering iron, use a heat gun or do it by hand but under a dissection microscope.

Don’t be afraid to make mistakes. Chip’s legs can be missoldered: just cut them, lift a leg, and attach a wire. Wrong way round? Desolder a component, turn it, reattach it. It doesn’t need to look good, it just needs to work.

But you do need to understand legal risk, as described in ISO 14971. Some risk is acceptable, some can be mitigated… add audible alarms for things going wrong. Remove functions, you don’t need. For example, remove internet access if you don’t need it -- it makes your device much harder to hack. Similarly, if power reliability is a problem, run the device off a battery not the mains. That also reduces the chances of shocks to the patient, but also isolate sensors from control logic; isolators are a cheap off-the-shelf part.

Then I humoured myself with a fun ZX Spectrum item: “An arcade game port to the ZX Spectrum: a reverse engineering exercise” [https://fosdem.org/2020/schedule/event/retro_arcade_game_port_zx/]

We were warned that this will be tough on those who didn’t do assembly language. I never did.

Doing reverse engineering for fun is an educational challenge, but there are now competitions for this. You must pick your origin and target carefully. It is not like developing a new game. Also, you can throw away all you know about programming modern hardware. Vintage hardware limits can be v weird, such as not being able to clear the screen because it takes to long, or is not a supported function.

You need to know your game amazingly closely. You need to play it obsessively -- it took months of effort to map everything. You need to know how does it feel, which means you must watch others play, and also, play with others - multiplay teaches a lot.

To find the essence of a game is surprisingly hard. E.g. Pacman… Sure you recognise it, but how *well* do you know it? Do you know the character names, or the ghosts’ different search patterns? Or Tetris. Do you know it completely? Is next-part selection random? Are you sure?

Rui picked a game similar to “Bubble Bobble”. Everyone knows that, but in the colopured bubbles, are there patterns? If so, do they change? Are they different for 1 or 2 players?

Or “R Type”. Do you know how to beat all the bosses? His point being that you often can’t exactly reproduce a game, especially on lower-spec hardware, so you have to reproduce how it feels to play, even if it’s not identical.

Rui picked “Magical Drop 2”, to re-implement on a ZX Spectrum. This is a Neo Geo MVS game -- the professional, arcade NeoGeo. Its specifications are much higher than a Spectrum -- such as using a 12MHz 68000 CPU!
Even its sound chip is a full Z80 that is faster than the Spectrum’s.

To work out what he could do, he methodically worked out the bandwidth required.

So, a full Spectrum screen (255*192 pixels, with 32*22 colours) needs 6912 bytes per frame. At 50 Hz. The Spectrum’s CPU has just 70,000 ticks per frame. (That’s operations, but not instructions: the fastest Z80
instruction is 4 T-states, and pop/push take 10.)

If you draw a frame, that cuts the size of screen updates a lot, and it looks better. If you only update small bits, it’s quicker too. Rui came up with a clever hack: pre-draw the bubbles, then just change the colours. Black-on-black is invisible. Set the colour and it appears. But there are only 8, in 2 levels of brightness, and you need to reserve some for animations, leaving at most 5 or 6.

His demo of the effects was amazing: a Spectrum normally can’t draw stuff that fast.

Reverse engineering is not the same as a port. If you do a port, that implies you have source code access. RE means you have none. There are other things to note. The in-game player instructions are very basic. Why? Because it’s a coin-op! They want you to spend money learning to play!

Using colours not pixels is 8x faster, which leaves time for the game logic. He uses an array for ball colours and a mark/sweep algorithm to look for 3+ matching balls. But even this needs special care: edge checking is very instruction-intensive, so rather than check for bounds, which is too slow, he puts a fence around the playing field -- an area that doesn’t count.

He then listed a lot of optimisations one could use, from tail call optimisation for functions, moving constants out of loops, unrolling loops, and more to the point unrolling them in binary multiples that are efficient for a slow CPU. He even used self-modifying code (surrounded by skulls in the listings!) But it all got too technical for me.

After 6 months, he is still not finished. Single- and dual-player works, but not against the computer.

I was aghast at the amount of work and effort.


On Sunday, I went to a talk by SUSE’s own Richard Brown, “Introducing libeconf” [https://fosdem.org/2020/schedule/event/ilbsclte/]

However, it was a bit impenetrable unless you code on MicroOS talking a lot to systemd.

Then I went to a talk on the new “NOVA Microhypervisor on ARMv8-A” [https://fosdem.org/2020/schedule/event/uk_nova/]

But this was very deep stuff. Also, the speaker constantly referred back to an earlier talk, so it was opaque unless you were at that. I sneaked out and went instead to:

“Regaining control of your smartphone with postmarketOS and Maemo Leste” [https://fosdem.org/2020/schedule/event/smartphones/]

This was a much more accessible overview of FOSS Linuxes for smartphones, including why you should use one. There were 2 speakers,  and one, Bart, spent so much time trying to be fair to other, rival distros that he left little reason to use his (postmarketOS). It’s a valiant effort to replace outdated Android with a far more standard mainline Linux OS, to keep old basic hardware working after vendors stop updating it.

The other speaker, Merlijn, was more persuasive about Maemo. This was Nokia’s Linux for the N900. It’s now abandoned by Nokia, and unfortunately was not all OSS. So some parts can’t be updated and must be thrown away and replaced. But all thw work since Nokia is FOSS. He talked a lot about its history, its broad app support, etc. The modernised version is built on Debian or Devuan. They have updated the FOSS bits, and replaced the proprietary bits. A single repo adds all the phone components to a standard ARM install. It is only Alpha quality for now. It runs on the original N900, the Motorola Droid 4 (one of the last smartphones with a physical QWERTY keyboard) & the new PinePhone.

The closing main item was “FOSSH - 2000 to 2020 and beyond!” by Jon “maddog” Hall. [https://fosdem.org/2020/schedule/event/fossh/]

maddog makes the point that he’s an old man now, at 69. He’s had 3 heart attacks, and as he puts it, is running on ½ a heart; the rest is dead. He’s been 50+ years in the industry.

He has a lot to teach. He started with how software used to be bundled with computer hardware, as a mix of source & binaries, until a historical Amdahl v IBM legal case. As a result, bundling became illegal for system vendors. Then software started to be sold as a product. This was so Amdahl plug-compatible mainframes could run IBM software, which enabled Amdahl to sell them.

He was using Hypervisors in 1968, and name-checked IBM VM (née CP-67) & on that, cms (née the Cambridge Monitor Systems, later renamed Conversational Monitor System).

He also pointed out that `chroot` has worked since 1979 - containers aren’t that new.

It’s often underestimated how the sales of video games in the ‘80s propelled software patents & copyright. Rip-off vendors could just clone the hardware and copy the ROM.

rms among others objected to this. While maddog “disagress with rms about a few things”, he credits him with the establishment of the community -- but points out that it’s a massive shame he didn’t call it The Freedom Software Foundation. That one extra syllable could have saved years of arguments.

And for all that rms hates copyright, and fought it with a different kind of licence agreement -- the GPL of course -- maddog points out that licenses don’t work without copyright…

Maddog had many years of non-free software experience before Linux -- CP/M, MS-DOS, Apple and more. But then came BSD… and we owe BSD a lot, because it’s much more than just a Unix. Many of the tools used on many
OSes, including Linux, come from BSD.

The commercial relevance is also important. Many “small” companies have come out of FOSS, including:

  • Ingres / Postgres

  • Cygnus

  • PrimeTime S/W

  • Walnut Creek

The invention of the CD-ROM was a big deal. Not just for size or speed, but for simple cost. A DEC TK50 tape was $100 new. But CD-ROMs were very nearly very bad for Unix. The ISO-9660 standard only used 8.3 names… because it was set by MS and DEC. It was enough for DOS and VMS. As it happened, at the time, maddog worked at DEC, so he traced the person who was the official standards setter and author, who worked a few cubicles away, and there not being much time, simply blackmailed him into including the Rock Ridge extensions for Unix-like filenames into the standard. This got a round of applause.

The original BSD Unix distro -- because distributions are not a new, Linux thing -- led to BSDi, which in turn led to the famous AT&T lawsuit.

But that also let to Unix System V. This caught on against a lot of opposition and led to the rise of Unix. For example, the very finely-tuned SunOS 4 was replaced with the still research-oriented System V. The Sun OS developers were horrified, but management forced them to adopt it. This is why it was called “Slowlaris” -- all the optimisations were lost. But it did lead to a more standardised Unix industry, and a lot more cross-compatibility, so it was good for everyone.

Keith Bostick led the effort to create BSD Lite and deserves a lot more credit for it than he got. He and his team purged all the code that even looked like AT&T code from BSD. This left just 17 questionable files, which they simply dropped. The result was criticised because it wasn’t a complete OS, but it was not so hard to replace those files, and the result, BSD Lite, led to Free BSD, Net BSD, Open BSD etc. It was very much worth it.

It nearly didn’t come in time. By ‘92 all the Unix vendors had ceded the desktop to M$ & Apple. (M$ is the term he used.) NT started to win everywhere… but then the Unix world realised MS wanted everything, the server too. A warning bell was when even O’Reilly started publishing NT books.

But then, just as it looked dark, came...

  • GNU (everything but a kernel)

  • Then the Linux kernel in 1991

  • Then Linux v1.0 in 1994.

Linux distros started, and maddog tried

  • SLS

  • Yggdrasil

  • Debian

  • RH

  • Slackware

  • And others.

There even came a time when he called Linus Torvalds in his office at Transmeta, and he answered the phone with “Lie-nus here”. He had gone so native, he even pronounced his own name the American way!

“Mind you, Linus said ‘I don’t care what you call the OS so long as you use it.’ So here’s your chance, BSD people! Call it BSD!”

But there were no apps. Instead, Linux was used in…

  • ISPs (to replace SPARC & Solaris)

  • shells

  • DNS

  • LAMP (thanks, timbl)

  • As a way to reuse old boxes

  • Firewall

  • file & print server (thanks, Samba)

Again underestimated, Beowulf clusters (1995) were important. All the old supercomputer vendors were going under. They would spend $millions on developing a new supercomputer, then sell 5. One “to a government agency we can’t name, but you all know who I mean”, and 4 to universities who couldn’t afford them. So, credit to Thomas Sterling & Don Becker. Beowulf changed this. There was no commercial supercomp software any more. Although apparently, Red Hat did a boxed supercomputer distro & sold it as a joke. But thousands of people bought it, so they could show it off on the shelf - never opened.

Then came a long run-through of the early stages of the commercial Linux industry.

From 1997-1999, Slashdot, Sourceforge and Thinkgeek. Linux International, the Linux Mark Institute and the LSB. Linux professional certification from Sair and the LPI. These bodies were supporters of early Linux marketing, for example trade shows like CeBIT and LinuxWorld, of user groups, and so on.

A good sign was when commercial databases announced they were supporting Linux. The first was Informix, on October 2nd 1998. Hearing about it, Oracle announced theirs 2 days before, but it didn’t ship until 9 months later. (Maddog is very evidently not a fan of Oracle.) Then Sun buys MySQL, then Oracle buys Sun.

The term “Open Source” -- it was not his fault. He was at the meeting, but he went to bathroom, and when he came back, it was too late. They’d named it.

The dot-com boom/bust was bad but not as bad as people thing. There were the RH and V.A. Linux IPOs. IBM invested $1Bn in Linux, & got it back many timers over. The OSDL (2000) was important, to. It helped CA, HP, and IBM with hardware. It even hired Torvalds, but went broke.

Although the following talk was meant to be about the history since 2000, maddog gave his favourites. His interesting events in or since 2000 were:

  • 2000

  • - Linux in Embedded systems

  • - Knoppix

  • - FreeBSD jails

  • 2001

  • - Steve Ballmer’s famous “cancer” quote

  • 2003 onwards

  • - SCO lawsuit -- and how it was the evil, post-Caldera SCO, not the original Michels family SCO, who were good guys. They even gave Linus an award. Doug Michels asked Linus “what can SCO do to help Linux?” Torvalds later told maddog of his embarrasment -- he could not think of a single thing to say.

  • 2004

  • - Ubuntu, of course. For better or worse, a huge step in popularising Linux.

  • 2008

  • - Android

  • - VMs: KVM, Xen, VBox, Bochs, UML

  • - The fog cloud. Yes, he calls it “the fog”.

  • 2011

  • - Rasberry Pi

  • - Containers

maddog’s favour illustration of Linux’s progress over time are 4 quotes from a leading industry analyst, Jonathan Eunice or Illuminata. They were

  1. “Linux is a toy.”

  2. “Linux is getting interesting”

  3. “I recommend Linux for non-critical apps.”

  4. “I recommend to at least look at Linux for *all* enterprise apps.”

On maddog’s last day at DEC, in 1999… his boss bought him a coffee and asked “whenm will this thing be ready? When can I get rid of all my Digital Unix engineers?” That’s when he knew it had won.

Why is free(dom) software important? As he put it, “I have a drawer full of old calculators & computers I can’t use, because their software wasn’t free.” Avoiding obsolescence is a significant issue that gave Linux an in-road into the mainstream, and it remains just as important.

The thing about freedom software is that both nobody & everybody owns it. Even companies making closed products with freedom software are still helping.

Today’s challenges & opportunities? Well, security & privacy -- it‘s worse than you think. Ease of use is still not good enough: “it’s gotta be easy enough for mom & pop.”

He doesn’t like the term AI -- it should be “inorganic intelligence”. It will be the same as our meat intelligence, in another substrate: maddog agrees with Alan Turing: at heart, all we need to do is duplicate the brain in silicon and we’re there. And he feels we can do that.

He feels that freedom software needs a lot more advertising. It needs to be on TV. It needs to be a household word, a brand.

Winding up, he says it’s all about love. Love is Love. Ballmer now *says* he loves FOSS, companies say it, but end-users should say they that they love freedom software. Or, as he put it, “world domination through cooperation”.

The final main item was “FOSDEM@20 - A Celebration” [https://fosdem.org/2020/schedule/event/fosdem_at_20/] by Steve Goodwin, @marquisdegeek

He felt it was very apt that FOSDEM happens in Brussels, as the Mundaneum in 1934 was the first attempt at an indexing system of everything.

Goodwin doesn’t take credit -- he says that the first, OSDEM, was organised by Raphaël Bauduin. He just claims to have inspired it, by sending out an email, which I noted had a misspelled subject line: “programers meeting” [sic]

FOSDEM 1 was in 2002. It even had its own dance, which Bauduin demonstrated. He also showed that he was wearing the same T-shirt as in the photo of him opening the first event, 20 years earlier.

FOSDEM was meant to be fun, because RB didn’t feel comfy at commercial FOSS conferences.

When it started, the IT world was very different. In 2001, there was no FaceBook, no Twitter, no Stack Overflow (to a chorus of boos), no Uber. Google was 3, Amazon was 7 and sold only books. Billie Eilish was born… in December, and Goodwin didn’t believe there’d be a single middle-aged geek who would have heard of her.

Mac OS X and XP were both new.

There are some photos on http://fosdem.3ti.be/ showing its intentional lack of professionalism or seriousness -- for instance, the Infodesk was subtitled “a bunch of wacko looneys at your service”. But they got a lot of big names. Miguel de Icaza was an early speaker, demoing Mono, GNOME, Xamarin. A heckler bizarrely shouted “this is Coca-cola!” i.e. demoing Mono controlling the proprietary Unity was wrong. Then there was a video speech from Eben Moglen introducing the Freedombox: https://freedombox.org/

And that’s a run-down of my FOSDEM. This is just my notes expanded to sentence length. Forgive the pretentious quote from Blaise Pascal: “Je n’ai fait celle-ci plus longue que parce que je n’ai pas eu le loisir de la faire plus courte.” (If I had more time, I would have written a shorter letter.)