Most active commenters
  • colechristensen(3)

←back to thread

Show HN: Go Plan9 Memo

(pehringer.info)
302 points pehringer | 15 comments | | HN request time: 1.431s | source | bottom

A quick dive into the Plan9 assembly I picked up while developing my SIMD package for Go, and how it led to a 450% performance boost in calculations.
1. rob74 ◴[] No.41880278[source]
In case it's not obvious, the "Plan 9" in the Go Assembler's name comes from https://en.wikipedia.org/wiki/Plan_9_from_Bell_Labs, and the reason for that is of course that two of the "Go founders" (Rob Pike and Ken Thompson) are Bell Labs alumni. Some more background on the Go assembler: https://go.dev/doc/asm
replies(3): >>41880349 #>>41880650 #>>41881656 #
2. colechristensen ◴[] No.41880349[source]
The same people used the same name for two computer related projects.

That's certainly an ... interesting choice.

replies(3): >>41880376 #>>41880498 #>>41883038 #
3. lagniappe ◴[] No.41880376[source]
Definitely don't look into Nix then
4. lloeki ◴[] No.41880498[source]
It is, essentially, the same project. Plan9 is the umbrella term for the whole operating system.

https://plan9.io/sys/doc/comp.html

IIRC before Go was self compiling, it was compiled using 9c, and its architecture inherits from 9c.

EDIT: some nearby threads got the details better!

replies(2): >>41880609 #>>41880619 #
5. floren ◴[] No.41880609{3}[source]
> IIRC before Go was self compiling, it was compiled using 9c, and its architecture inherits from 9c.

Back in those days I actually found that, with a few small tweaks, I could compile the Plan 9 operating system using Go's C suite. We didn't pursue it further but this was one of the options we looked into for cross-compiling Plan 9 from other operating systems.

replies(1): >>41881173 #
6. colechristensen ◴[] No.41880619{3}[source]
Interesting trivia about the connection to plan9 the operating system.

>Go uses its own internal assembly language called Plan9.

Plan9 is the name of the OS. You wouldn't name a programming language "Linux", even if Linus created it and it was super related or not at all related.

replies(1): >>41880972 #
7. p_l ◴[] No.41880650[source]
The reason for that is not just being alumni, but also that Go implementation started on top of Plan 9's compiler infrastructure that was later rewritten in pure Go
8. seryoiupfurds ◴[] No.41880972{4}[source]
It's not "plan9 assembly language" as in "the assembly language named plan9". Read it as "the otherwise unnamed custom assembly language used in the plan9 operating system".

The article simply misspoke by saying that the assembly language is "called plan9".

replies(1): >>41882052 #
9. stonogo ◴[] No.41881173{4}[source]
Since to Go C suite was ported Plan 9 compilers, I'm not sure why this would be a surprise. Since I'm obviously missing something would you share your thoughts on what challenges you expected?
replies(1): >>41881498 #
10. floren ◴[] No.41881498{5}[source]
It wasn't any surprise, nor did I intend to imply it was surprising, just relaying an anecdote. There were a few differences that required small tweaks to the source, but we got the Plan 9 kernel compiled with the Go C compilers in a day.
11. ◴[] No.41881656[source]
12. debugnik ◴[] No.41882052{5}[source]
No way, the article consistently refers to the assembler syntax as "Plan9" throughout the text and title and they talk about "x86 Plan9" and "arm Plan9".

Considering there is no introduction at all to this beyond "I discovered it's called Plan9", I'm assuming the author really thinks this is a language widely named "Plan9".

replies(1): >>41882147 #
13. KerrAvon ◴[] No.41882147{6}[source]
They seem to be badly mistaken
replies(1): >>41883226 #
14. colechristensen ◴[] No.41883038[source]
EDIT: it seems the author is just mistaken, the Go assembler is just referred to by everyone else as "Go Assembler" and nothing to do with plan9, other than the various connections to its origin.
15. sph ◴[] No.41883226{7}[source]
That seems to be the case: https://news.ycombinator.com/item?id=41880346