Nikita Popov's Capsule

ru

en

About Plan 9

Say a word

Posted 2024-10-28. Last updated 2024-11-05.

Introduction

Without a doubt, **Plan 9** is one of the most interesting operating systems I've encountered along my way.

The approaches that were used in its design are simple and universal.

The OS itself turned out to be the same.

No wonder, because it was designed by the same engineers as the original **UNIX** - Ken Thompson, Dennis Ritchie, Rob Pike, etc.

It also developed approaches such as "text as an interface" and "homogeneous operating environment" - the ideas of Niklaus Wirth and his **Oberon**[^1] environment.

- Do you want to create a file? Create a file.

- Do you want to create a TCP socket? ... Create a file!

- Do you want to raise the VPN? Well, let's skip it for a while...

Any device in machine is represented to us as a hierarchical file system.

Yes, this imposes some restrictions on driver developers, because they have to design this device file system.

But the achieved uniformity of the entire system saves us a lot of time during operation.

Network transparency, which was incorporated into the **9P**[^3] protocol from the very first stages of design, blurs the boundaries between machines.

Therefore, it does not matter where the file/device is located - locally or remotely - the interaction will follow the same protocol.

Access to mail? To the file storage? Chat? GPS data? Everything can be implemented using a single protocol.

Well, it's just some kind of engineering utopia.

Problems

But if **Plan 9** is so great, then why hasn't everyone switched to it yet?

I think it was influenced by several factors.

Status

It was used to test the latest concepts that were developed in the **Inferno**[^4] OS.

Initially there were almost no user programs in it.

Only the most necessary things for work.

And as a result ...

Lost time

The **Plan 9** source code was opened under the **GPL-2.0-only** license (and then under **MIT**) only in 2014.

The attention of the community was missed.

Think about all the community efforts that have been spent on the development of **GNU/Linux**.

Maybe with the same attention to **Plan 9** we would live in a completely different world.

But ...

Architecture

The specificity of **Plan 9** block easy migration of software written for **UNIX** to it.

It turns out that a huge layer of programs that everyone is used to are nailed to the **GNU/Linux** and **BSD** system calls.

A very limited number of people agree to sit and write the entire toolkit from scratch with the same zeal[^6].

Besides the fact that this is a laborious process, it is also slowed down by maintaining the ideological purity of the OS.

"The best code is no code at all."

This idea is close to me, but not so literally.

The ability to create almost any software in the form of shell scripts is interesting, but not all software can be implemented this way.

Graphics

(this is from me personally)

They removed from **Plan 9** exactly why I left **Windows** for the **UNIX** family - a convenient typewriter machine.

The standard **Rio** shell and the **Acme** editor/interface require you to have a 3-button mouse.

If you manage to work using only the keyboard, it will be very uncomfortable and will require you to make changes to the code of the basic utilities.

And you know, I tried to work in this paradigm.

But the longer I worked like this, the more I realized that although this is an interesting approach **[you can add your command to Acme by simply writing it in the panel!]**, it does not allow me to work as fast as with a keyboard-oriented interface.

Standard CUA[^7]? Forget it.

Syntax highlighting? Forget it.

What to do?

I have been hatching a plan for some time to return the typewriter to **Plan 9** in the form of a small set of programs:

- tiling window manager (at the stage of experiments with input/output);

- simple terminal emulator (not started yet);

- emacs-like text editor (at the stage of the first sketches).

But here's the dilemma.

Leave **Plan 9** as an ideologically pure artwork and not let it reveal itself to the fullest?

Get in with my dirty hands with software that destroys **[maybe]** the philosophy of the entire OS?

As you may have noticed, I'm leaning towards the second option.

Maybe a lot of people won't like what I'm going to do.

Even with proper planning and careful work, I'm afraid to complicate what I shouldn't.

On the other hand, no one forces them to use this software.

Well, I will not give up tips and commits.

But maybe I'm not as lonely as I think I am?

Maybe there are more people who could not "switch" from **UNIX** to **Plan 9** for similar reasons?

And what happens if they all get, though not identical, but similar to the usual tool on top of a beautiful architecture that you can work with, forgetting about the boundaries of the machine?

I will not rush into such formulations as "revolution" or "unprecedented progress", but this will definitely be an interesting dynamic.

Plans

With this article, I want to start a series of publications, lyrical and technical, dedicated to **9front**[^8] **[Plan 9 fork]**.

Some of the articles will be sketches for my educational work on OS **["be" won't mean often!]**.

Technical articles (installation, configuration) will be useful for people who are just starting their acquaintance with **Plan 9**.

As it turned out, there are not so many of them even in English, not to mention Russian.

This way, beginners and those interested will get a faster start than I had.

PS

Even if you read this article a year, two, five, ten years later and thought the same thing at the time - write to me in one of my resources **[preferably by mail or in nostr]**.

It will be very interesting to know your opinion on this matter.

[1] Oberon

[2] Berkeley sockets

[3] 9P

[4] Inferno

[5] "Plan 9 failed simply because it fell short of being a compelling enough improvement on Unix to displace its ancestor. Compared to Plan 9, Unix creaks and clanks and has obvious rust spots, but it gets the job done well enough to hold its position. There is a lesson here for ambitious system architects: the most dangerous enemy of a better solution is an existing codebase that is just good enough." Eric S. Raymond

[6] Plan 9 Foundation

[7] CUA

[8] 9front

"About Plan 9" via WWW

Other links

Codeberg

e-mail

Fediverse

GitHub

IRC

nostr

© 2024 POLYSERV BY MODERN HOME