💾 Archived View for kspatlas.xyz › gemlog › is-plan9-the-future-of-unix.gmi captured on 2022-03-01 at 16:17:14. Gemini links have been rewritten to link to archived content

View Raw

More Information

-=-=-=-=-=-=-

Is Plan9 really the future of Unix?

You may have heard of plan9, you may have not. In a nutshell, Plan9 is Bell Labs' (The people who made UNIX) successor to UNIX. It is almost like an uncanny valley - almost like Unix, but not quite. Here are some pros and cons (my opinion, may be different for you).

Pros

Cons

Of course, these are all my opinion, this may be different for you.

Now, plan9 code is very different than Unix/NT code. For example: Here is regular hello world (top) and plan9 hello world (bottom)

#include <stdio.h>

int main() {
	printf("Hello, World!\n");
	return 0;
}
#include <u.h>
#include <libc.h>

void
main()
{
	print("Hello, World!\n");
	exits(0);
}

An experienced C programmer may get confused by the plan9 one, for example "Why is main void?" or "Why are you manually including libc?". These changes are for a reason though. For example, instead of relying on an int for a return status, a plan9 program can return anything - even a string! Also, print instead of printf is a difference. For example, %u is a modifier instead of a format specifier, and UTF-8 (Rune, string of Runes) is supported via %C and %S.

Hopefully, this being the first article not about Gemini, ends up being interesting.

Back