Plan 9, 9 Front and Inferno thread

Plan 9, 9 Front and Inferno thread.
I've compiled Inferno for GNU/Linux and I'm having a great time learning it, but I'm still having trouble to grasp all the concepts behind it. Basically, I don't know how to take advantage of everything is a file paradigm and the name spaces yet. I'm reading the papers and the only thing I quite don't get is how the Mount Table works.
From the paper "Plan 9 From Bell Labs" [1]:

The kernel representation of the name space is called the mount table, which stores a list of bindings between channels. Each entry in the mount table contains a pair of channels: a from channel and a to channel. Every time a walk succeeds in moving a channel to a new location in the name space, the mount table is consulted to see if a from channel matches the new name; if so the to channel is cloned and substituted for the original. Union directories are implemented by converting the channel into a list of channels: a successful walk to a union directory returns a to channel that forms the head of a list of channels, each representing a component directory of the union. If a walk fails to find a file in the first directory of the union, the list is followed, the next component cloned, and walk tried on that directory.

Also share your plumbing rules.

Why the fuck Charon can't into https?

[1]plan9.bell-labs.com/sys/doc/9.html

Other urls found in this thread:

code.9front.org/hg/plan9front/file/a51c22a95a75/sys/src/9/port/portdat.h#l160
code.9front.org/hg/plan9front/file/a51c22a95a75/sys/src/9/port/chan.c#l944
winworldpc.com/product/nextstep
freebsd.org/doc/en/books/handbook/)
myredditnudes.com/
twitter.com/SFWRedditVideos

Because https is complex.

9base got deleted from the gentoo repos last week because nobody cares :^)

you are better off compiling plan9port from source anyway.

Nobody uses these OSes anymore so nobodybhas plumbing rules to share. When learning c via k&r I always use Plan 9 in a VM for all my work, though

I'll try to explain a little:

9P2000 is very much like the vfs in linux, only not hypercomplex garbage that can't support networks.
In 9P, you operate on fids. Fids are like fds, only they're not fds. Fds are a construct for user space. You have a series of calls, notably here we're talking about the walk call. A walk call "walks" a fid through a file system. For example, you can walk a fid to a/b/c, and your fid will now reference c, rather than the file it was previously referencing. In this context, directories are also files. A walk can either walk an existing fid or create a new fid. If you opt to create a new fid and walk nowhere, it's typically called a clone operation, and you now have 2 fids referencing the same file. Similarly, if you walk and create a new fid in the process, it's called clone and walk.
In the Plan 9 kernel, they take your fd based syscalls and translate them to 9P messages based on internal data they have about the fd, such as the fid. In the kernel, they call the object that holds all the protocol data about a certain file in the file system a channel. So when they talk about moving channels, walking channels or cloning channels, they're talking about the data that backs your user space fd. The protocol is designed in such a way that it's pretty much just a 1:1 mapping of fd to fid.

code.9front.org/hg/plan9front/file/a51c22a95a75/sys/src/9/port/portdat.h#l160

The Plan 9 file system is just made up of lots of servers mounted in different places, so when you need to walk to /mnt/web, you're first walking through /mnt/web on one server, then / on another server, and to do that your fd will first be associated with a channel for the first server, and as you walk through the mount point the channel associated with your fd will be replaced with a clone of the / channel the kernel has stored from when you mounted webfs. It may be relevant to note here that in 9P, you always keep at least one reference to the root file, as this is how you can address the rest of the file system. The kernel is effectively just one big 9P multiplexer.

code.9front.org/hg/plan9front/file/a51c22a95a75/sys/src/9/port/chan.c#l944

Walking through a union mount is pretty much the same, except you're trying all the mount points sequentially until one succeeds or you've exhausted them all.
If this doesn't sound very atomic it's because it isn't and can't be because of the networked nature of all file systems.

The mount table is essentially just a list of what order to try walking in, but by necessity it also has the channels for the roots of all mounted file systems, so it can actually perform the walk.

Those systems may be better in some ways, but they're still for spergios who never went outside and don't know what a system has to do.

A Macintosh from 1984 does the exact same thing your shitbox does. Nothing has changed, because it was "good enough". Fuck it. Never improve.

An abacus does all the shit your shitbox does. No need to overcomplicate everything with electricity, kid.

Unix autism created Unix, you know

We did improve, plan9's and many other bad ideas of the UNIX world re I/O were abandoned. Streams was another large mistake that was left behind.

...

That was a good explanation, thanks.
Sometimes it's hard to remember that a directory like /mnt/someserver/someservice can be the / on some user space. Symbolic links also gave me some trouble to understand. Binds and namespaces are better, though, since they don't reside in the disk, but in the kernel and can be easily modified on the fly or in the OS config file.

find /usr/src/linux -name *.c -exec gedit \{} \;
HOLY FUCK I AM A MASTER HACKER NOW

Does anyone else really like acme? I like acme and wily, the knockoff for Linux.

Inferno's distributed model is interesting and reminds me of DragonFly BSD. I'd like to see it improved more.

Bump from page 14.
No one want to talk about Inferno or Plan 9?

what is there to talk about? It was good, it failed because AT&T didn't want to license it. The end.

I have a Plan 9 disc that I occasionally dick around with in a VM. It's hard for me to get used to though.

I've been looking for a decent NeXTSTEP disc. If anyone can point me in the right direction, it would be much appreciated.

As in physical cd rom? If so, why not just download an ISO? You could even burn your own CD if you absolutely have to have it physically.

winworldpc.com/product/nextstep

I've wanted to learn about Plan9 and see if it can fulfill the roles of a typical hobby FreeBSD server just for personal use. I'm not to sure where to read up about it though, some of the documentation seems to be fragmented but I think I'm just looking in the wrong places. Since that's been the case and I haven't devoted too much time to looking into it or using the system I don't really have much to say but I do lurk Plan9 threads when I can and when I see them.

I want to learn about setting up and maintaining a Plan9 machine and what that entails, I basically want a Plan9 edition of the FreeBSD handbook (freebsd.org/doc/en/books/handbook/)

I'm confused about the platforms in general, is Plan9 itself useful or necessary in any case when the userspace port exist, if so what can real Plan9 do that the port cannot. How does inferno relate to Plan9, it seems like a virtual platform that is compatible with standard Plan9 but I'm not actually sure, couldn't the same thing be achieved with the userspace port?
When would it make sense to use what and what are the intended uses of each platform?

I want to understand Plan9 and potentially use it, if only for hobby sake, right now I just run nginx, vsftp, and mumble for some friends, if I can get away with running www, ftp, and voip services on top of Plan9 it'd be worth at least playing around with setting them up and seeing how it compares.

Sorry that this post is more of my thoughts and less a talking point but maybe it will spark some kind of discussion. It's all I can really say on this topic.

Plan9 can do what you want and much more. The best resource are the man pages

Stop asking questions about how and why and just do

plan9 is a meme