Live data from Hacker News

Porting Tailscale to Plan 9

tailscale.com

81–90 of 100 posts

Re: Porting Tailscale to Plan 9

#81

Earlier quoted context omitted.

they're routinely very short, and the only non-obvious syntax for someone familiar with a C-like language is the ~ command and redirecting to stderr. They're pretty much always easier to read (and write) than bash scripts in general because of how little weird/surprising syntax there is. Not being a derivative of ALGOL has its perks. Most scripts are write-once:read-never, especially if you actually implement -h/--he…

> Most scripts are write-once:read-never, especially if you actually implement -h/--help I guess the answer is always “it depends”, but that generally has never been my experience with most things. Are you over-engineering the shit out of every script to the degree the script itself is a Turing complete machine and with enough —-help flags anything is possible? Most 40+ year old Unix tools with a thousand flags have…

> Are you over-engineering the shit out of every script to the degree the script itself is a Turing complete machine and with enough —-help flags anything is possible?

No. They're 30 line scripts with 0-5 or so flags. They mostly exist to remove choices from other utilities. Put another way: create named (and namespaced) abstractions by making choices and slapping a name on it. They're functions.

> In my experience, eventually a business need will arise that require you to change a script. Are your coworkers comfortable changing these scripts or are you in the mind set of “that’s a simple enough change, I’ll do it”

They're small enough that they can be ignored if they don't do exactly what you want. I'm fine changing them, but it's most likely they'd just get rewritten or bitrot after I'm gone.

Re: Porting Tailscale to Plan 9

#82

Earlier quoted context omitted.

they're routinely very short, and the only non-obvious syntax for someone familiar with a C-like language is the ~ command and redirecting to stderr. They're pretty much always easier to read (and write) than bash scripts in general because of how little weird/surprising syntax there is. Not being a derivative of ALGOL has its perks. Most scripts are write-once:read-never, especially if you actually implement -h/--he…

> Most scripts are write-once:read-never, especially if you actually implement -h/--help I guess the answer is always “it depends”, but that generally has never been my experience with most things. Are you over-engineering the shit out of every script to the degree the script itself is a Turing complete machine and with enough —-help flags anything is possible? Most 40+ year old Unix tools with a thousand flags have…

Not work related, but here's some examples of what these scripts look like (this is how I mirror public repos locally using cron/timers): https://paste.sr.ht/~chiefnoah/3b8990fc0b8eb3f50e511d5d4051a...

Even if you aren't super familiar with rc, it's not that weird to look at. I find it way more readable than (ba)sh syntax.

Re: Porting Tailscale to Plan 9

#83
post #69

Earlier quoted context omitted.

There aren't really union filesystems per se, the plan 9 kernel provides unions through its namespace model. In my opinion part of the reason why the userspace tools can be as nice as they are, are due to the use of file system interfaces and the simplistic syscall API. Could you elaborate more on the issues you see with the use of these? In regards to using it for a "cloud native" stack, the issue is that people wan…

> There aren't really union filesystems per se, the plan 9 kernel provides unions through its namespace model. Yes, this is what I'm referring to. It's really many filesystems unioned into one namespace that is controllable per-process. > In my opinion part of the reason why the userspace tools can be as nice as they are, are due to the use of file system interfaces and the simplistic syscall API. Could you elaborate…

> Excluding graphical APIs, the basic stuff (file IO, networking, etc.) isn't all that hard to add to a language (it of course depends).

You could implement a modern graphical API on top of virtio-gpu, which would give you low-level access to accelerated graphics.

> The real trouble is things that have no equivalent in Plan 9, such as mmap and shm.

Some uses of mmap and shm actually seem to have a near-equivalent already in plan9's segattach. Other uses would require some implementation of distributed shared memory (i.e. implementing the usual CPU concurrency model over the network) to be made feasible while keeping to the usual networked-OS focus of plan9.

Re: Porting Tailscale to Plan 9

#84
post #22
post #4

Rob Pike is in shambles after this devastating betrayal

Not sure what the betrayal is? He contributed a quote for yesterday's post. https://tailscale.com/blog/tailscale-enterprise-plan-9-suppo...

from the above post:

  > April 1, 1999
  >
  > FOR IMMEDIATE RELEASE
Forward to the past?

Re: Porting Tailscale to Plan 9

#85

Earlier quoted context omitted.

Totally get it. Vmx on 9front with a Linux or BSD VM is the way to go if you want to try to go 100% 9. If you like you can experiment with this on a used laptop with supported hardware, thinkpad best. It's not lightning fast at the moment (patches welcome) but it works well enough.

> If you like you can experiment with this on a used laptop with supported hardware, thinkpad best. I would avoid laptops altogether, honestly. Not a great fit.

That is the opposite of good advice. http://fqa.9front.org/fqa3.html#3.1

Re: Porting Tailscale to Plan 9

#86

Earlier quoted context omitted.

> There aren't really union filesystems per se, the plan 9 kernel provides unions through its namespace model. Yes, this is what I'm referring to. It's really many filesystems unioned into one namespace that is controllable per-process. > In my opinion part of the reason why the userspace tools can be as nice as they are, are due to the use of file system interfaces and the simplistic syscall API. Could you elaborate…

> Excluding graphical APIs, the basic stuff (file IO, networking, etc.) isn't all that hard to add to a language (it of course depends). You could implement a modern graphical API on top of virtio-gpu, which would give you low-level access to accelerated graphics. > The real trouble is things that have no equivalent in Plan 9, such as mmap and shm. Some uses of mmap and shm actually seem to have a near-equivalent alr…

Right, you could do it... maybe. Some languages/libraries/runtimes could have specific expectations around the specifics of mmap that can't easily be papered over, but I suspect it would be a minority of cases

Re: Porting Tailscale to Plan 9

#87
post #36

Earlier quoted context omitted.

Someone needs to convince Russ that it would be hilarious to have a full featured web browser in Plan 9.

Yeah, convince Russ and some investors! :D I would laugh my ass off for years at this joke! Yeah, please do this next year's April Fools'!

> I would laugh my ass off for years at this joke!

I don't really get the 'joke'? Porting a full web browser to Plan 9 would seem like a cool project - where's the humor?

Re: Porting Tailscale to Plan 9

#88
post #84
post #22

Earlier quoted context omitted.

Not sure what the betrayal is? He contributed a quote for yesterday's post. https://tailscale.com/blog/tailscale-enterprise-plan-9-suppo...

from the above post: > April 1, 1999 > > FOR IMMEDIATE RELEASE Forward to the past?

This was explained in the post. 1999 was when Intel released the Pentium 3 with SSE instructions, which caused the first major issue that had to overcome.

Re: Porting Tailscale to Plan 9

#89
post #69

Earlier quoted context omitted.

There aren't really union filesystems per se, the plan 9 kernel provides unions through its namespace model. In my opinion part of the reason why the userspace tools can be as nice as they are, are due to the use of file system interfaces and the simplistic syscall API. Could you elaborate more on the issues you see with the use of these? In regards to using it for a "cloud native" stack, the issue is that people wan…

> Unless someone does a great deal of effort to port all of those environments that people want (nodejs, modern python, etc) you're going to be stuck using a VM and losing a lot of the benefit. It should not be a huge deal of effort since as you mention the plan9 syscall API is simpler than on Linux. The added plan9 support could then also serve as a kind of "toy" backend that could make the rest of the code more und…

The problem is porting the compilers! There is no C++ compiler on Plan 9.

Re: Porting Tailscale to Plan 9

#90

Earlier quoted context omitted.

> If you like you can experiment with this on a used laptop with supported hardware, thinkpad best. I would avoid laptops altogether, honestly. Not a great fit.

That is the opposite of good advice. http://fqa.9front.org/fqa3.html#3.1

I suppose it depends on what you want from 9front. If you want a terminal with decent power management you should just buy a mac.
Post reply on HN