pleroma.debian.social

pleroma.debian.social

RE: https://oldbytes.space/@flexion/115752573933914452

The oldest Unix written in C was successfully recovered from tape this weekend -- and here it is running on IRIX.

The amazing bit is the contents of the big window in the middle, for children under 50, *not* the windows themselves.

RT: https://oldbytes.space/users/flexion/statuses/115752573933914452

@lproven Ew, I remember the fashion for translucent terminal windows. 😀

@lproven 27k for the kernel? Good Lord, C is so inefficient!

@RogerBW

The lag on those fake-translucent windows was the giveaway.

I remember @doop being significantly excited to discover that the translucent floating handwriting-input window on my Nokia 7710 was hardware alpha-composited over the screen background.

Wikipedia image of a Nokia 7710 Symbian all-touchscreen smartphone from 2004

@DrHyde I smiled, but I cried a little inside as well.

@lproven I am an adolescent under 60 (exactly 55 years old graybeard) and I am very familiar with the desktop in the screenshot. I was sys admin in the late 90s and we had SGI workstations running IRIX, with the "Toolchest" floating om the desktop, the near photorealistic CRT terminal icons (the designer must have been a lefty), the menu entry names in Italics ...

And in the much older first Unix in C there was no /home . Was it still root-only, not multi-user yet?

@till @lproven /usr/home maybe?

@till Oh yes, it was multi-user from the start.

The user directory is called `/usr`. That's what it means! The "Unix System Resources" thing is a silly backronym some joker coined later.

Dennis and Ken simply didn't have enough disk space on their original PDP machines. Each RK05 disk only held 1.5MB. So they kept inventing new folder names to add more disks to the system.

https://lists.busybox.net/pipermail/busybox/2010-December/074114.html

Here is the raw tape dump:

https://archive.org/details/utah_unix_v4_raw

Here's a Tar file of it:

http://squoze.net/UNIX/v4/

The `README` in there will tell you how to get it running in SimH.

When the 53-year-old tape was found, early last month, I wrote a story for the Register explaining its significance:

https://www.theregister.com/2025/11/07/unix_fourth_edition_tape_rediscovered/

@lproven

Some kind of predecessor of both the modern hard drives and floppy drives:

https://en.wikipedia.org/wiki/RK05

In our case whopping 1.5 MB of storage (more than a "modern" 3.5" floppy drive with 1.44 MB), interchangeable, like a floppy but heads floating on an air stream like in a hard drive ...

@till An early hard disk, but yes, with removable media.

Hard disks were originally called Winchester disks:

https://en.wiktionary.org/wiki/Winchester_disk

Not the first hard disk: huge very expensive HDD units were sold (or more to the point rented) for mainframes (huge very expensive computers) years earlier.

No, the name was from the model that made the tech affordable and took it mainstream, the IBM 3340.

https://www.computerhistory.org/storageengine/winchester-pioneers-key-hdd-technology/

It was nicknamed Winchester by IBM project lead Kenneth E. Haughton, and not because they came from IBM Winchester (a common urban myth). He named it because the storage was in a removable cartridge. It had two 30MB platters, and the comparison was with an early cartridge rifle known as the Winchester 30-30:

https://en.wikipedia.org/wiki/Winchester_Model_1894

It other words, strictly, it is named after the ammunition, not the weapon itself.

https://en.wikipedia.org/wiki/.30-30_Winchester

@till The point here being...

The Winchester cartridge-loading type of hard disk was affordable enough to be used with smaller inexpensive minicomputers, instead of mainframes, which were typically leased not sold.

When you own the computer, you can do experiments, like writing new OSes for it, that was not feasible on $multi-million big iron which costs multiple dollars a second to use.

@lproven that preemptive bit... damn, read my mind! -- my first reaction to the screenshot was "yes yes v4, oldest unix, amazing, sure. now how do I get that IRIX running?"

used it briefly on my first job, that too on an onyx workstation. loved it!

@RogerBW @lproven that could literally have been a screenshot of my desktop 25 years ago. Aterm, an elegant terminal from a more civilised age.

@lproven @RogerBW @doop that and they didn’t reflect any content besides the root window iirc
replies
1
announces
0
likes
0

@jmtd @RogerBW You ran IRIX? You were rich...

@jmtd @doop @lproven I met transparent terminals on Linux. Enlightenment, maybe?

@lproven This is a great reminder of how much modern tech is built on very old ideas that still work. That code survived decades and still runs, which is kind of wild. Same with AI content: when the foundation is solid, it keeps paying off, and that is why clients who test it once usually stick around.

@lproven not the same...had high hopes from back when it was called 4dwm, 5dwm and then maxx...binary only release for a long time...etc.

On IRIX I'm most interested in swinst. Even checked the leaked code from a few years ago but sadly didn't have it.

@lproven "oldest Unix written in C"? I'm slightly lost here--I thought that C was made because they'd tried to make Unix already in assembly, and failed to make enough progress (due, I'm only guessing, to lack of features such as structures which most assemblers don't do much for).

I got this from various interviews with Thompson, Ritchie and Kernighan and it made so much sense I didn't think about it much.

@RupertReynolds @lproven My understanding of the Unix lore is that the original 1969 Unix was first written in PDP-11 assembly to bootstrap it, and then C was created as a somewhat portable PDP-11 macro assembler, then Unix was (mostly) rewritten in C in 1973, and then both C and Unix were ported to VAX making Unix the first (non-trivial) OS to support multiple architectures.

@heptapodEnthusiast @RupertReynolds @lproven Roughly
The original code is in PDP 7 assembler, and has a B "compiler" that produces threadcode. The PDP 11 port is initially in assembler, and B is moved to the PDP11 very hackishly as B is typeless and word based and the 11 is a byte machine. NB then C then emerges from B with minimal types (no long, struct, union, void yet), and the kernel is converted.
The first real "port" was to the Interdata 7/32
https://ia801304.us.archive.org/18/items/the-first-unix-port/Image092317133411_text.pdf

@DrHyde @lproven Papers of the time reckoned C was about 33% larger. That's with the original K&R compiler which is fairly primitive but on the other hand was tuned to the task at hand.
The later compiler (Johnson pcc) was somewhat smarter and was designed to be portable unlike the original.

The 27K is a bit misleading - as there is also additional memory used for zeroed data and allocated at boot, but it's indeed tiny. V7 is where it started to get much bigger, and by Sys5 was about 200K

@RupertReynolds

> I thought that C was made because they'd tried to make Unix already in assembly, and failed to make enough progress

What? No, not at all!

The first Unix, Zeroth edition, was in assembly language for the 18-bit PDP-7 minicomputer.

https://gunkies.org/wiki/PDP-7_UNIX

UNIX v1 was ported to the 16-bit PDP-11, still in assembly.

https://gunkies.org/wiki/UNIX_First_Edition

UNIX v2 is mostly lost. Still (mostly?) assembly, still PDP-11.

https://gunkies.org/wiki/UNIX_Second_Edition

UNIX v3 was still (mostly?) assembly, still same
PDP-11, and only parts still exist.

https://gunkies.org/wiki/UNIX_Third_Edition

Now UNIX v4 has been recovered:

https://gunkies.org/wiki/UNIX_Fourth_Edition

Higher end PDP-11, partly rewritten in C.

@lproven 😆🙌 I used to work on this system a long time ago and was blown away by Unix and it's capabilities. I never understood and still am not able to reconcile that windows is still around while Unix is relegated to the labs 😏🤦🏾

@MementoMori As @fivetonsflax says, that is incorrect.

I wrote this a few years ago:

https://www.theregister.com/2023/01/17/unix_is_dead/

Unix is in use more widely than any other OS by far. Linux is a Unix (this upsets the purists but it is the case) and Android is a Linux. That alone means Unix in the form of Android outsells Windows 10x over every year, and has done for a decade or so.

@heptapodEnthusiast @RupertReynolds

Well, yes. But PDP-7 UNIX and the PDP-11 UNIX V1, V2, and V3 were all in hand-coded assembly language for the main part.

V4 -- this which was rediscovered last month -- was the first version partly rewritten in the brand new C language.

In other words your story skips over the first 4 major versions, and the first 3 16-bit versions!

@lproven while bringing the underlying desktop as the background for the window is both very clever and sexy I really don't like it. I remember using things like that back in the 90s. To me seeing the lower window through the higher one makes it look like something has crashed.

@richardcrawshaw I didn't like it much then either, when it was faked. I got used to it once it was hardware enabled, seamless and fast, and now I sometimes leave it enabled with low levels of translucency, but it's pure pointless chrome.

OTOH it's a complex effect and I can't see how it could be interpreted as a crash, TBH.

@jimfl Oh dear hypothetical deities. Why?

Anyone incapable of running an emulator is incapable of appreciating it anyway.

@heptapodEnthusiast @RupertReynolds The original UNIX ran on a 18-bit PDP-7 not on the 16-bit PDP-11. So, no, that is not correct.

The length of a word or what a byte meant had yet to be standardised when this was written.

@kaveman OK, fair enough.

I was never rich enough to own any SGI kit or get to know Irix. For a while the x86 "Visual Workstations" were cheap in the USA -- not where I live they weren't -- but I wish I could have got one then. I reviewed one once, and it was a lovely computer.

HPE owns Irix now. There is some relevant discussion on my post over on Reddit you might find useful, then.

https://old.reddit.com/r/unix/comments/1ps555r/unix_v4_the_1st_version_rewritten_in_c_was/

@lproven@vivaldi.net

The amazing bit is the contents of the big window in the middle, for children under 50, not the windows themselves.
acting like people younger than 50 can't find unix version 4 cool

@tauon

You misread me.

Several of the comments on the screenshot before I shared it were things like "wow I did not think Unix v4 would have transparent windows!" That is why I clarified it, snarkily.

I am a very snarky sort of person, and I work for a very snarky website.

I think it's necessary to drop faux respect when dealing with this industry. Most of it is run by chancers who got obscenely rich, and most of them are very unpleasant people. Some of the only genuinely good, or passionate, or insightful people I know in the industry are widely hated and reviled. Including to my face here on Mastodon.

Some find snarkiness amusing. Some don't. If my sense of humour does not match yours, it's not my problem. Feel free to ignore me or block me. I don't mind.

@SamatSattarov It is, yes, but the really sad thing is this:

The original UNIX, later renamed "Research UNIX", got to 10 editions, and then Ken & Dennis turned it into Plan 9. That's Unix v2.0.

The problem is that Research Unix 6 and 7 had already leaked to universities and the industry and it went on to become hugely successful.

It is barely an exaggeration to say that Linux and the BSDs and macOS are copies of an unfinished, work-in-progress codebase that escaped.

The real thing, the final version that worked properly, is now called 9front and the industry totally ignored it and still does.

@lproven ha ha AfterStep/NextStep... people just don't read. must be exhausting. Anyway, thank you for all the pieces you've written over the years. I pick up lots of good info from them. cheers!

@kaveman Why thank you! 🙂

Yes, the comments are often absolutely exhausting. I spend 4 or 5 hours trying to explain something interesting then get flamed by some fool who did not understand _the headline_.

But people seem to really appreciate that I engage with the comments, and sometimes, it's very rewarding.

Video!

https://exquisite.tube/w/qoHtHzpNXncHwrfqpx31tF

«
This is a mobile phone video of the reading of a UNIX V4 magnetic tape at the Computer History Museum. Video originally by Jon Duerig, the people primarily responsible for the tape restoration are Al Kossow and Len Shustek
»

@lproven @till My dad's business had an Altos multiuser Zenix system with a Winchester drive (8mb?). That's what I learned on. I had almost forgotten about that until this thread.

@morgan @SamatSattarov Yes, that. 😅

I have written about it at some length and presented a main programme talk about it at the FOSDEM conference in Brussels.

https://www.theregister.com/2024/02/21/successor_to_unix_plan_9/

@morgan @SamatSattarov I see. Well, I suppose that's a laudable goal, but maybe you should say what you are doing it why you are doing it, in that case?