Live data from Hacker News

Gopher-OS: A Proof of Concept OS Written in Go

github.com

61–70 of 84 posts

Re: Gopher-OS: A Proof of Concept OS Written in Go

#61
post #31

Maybe I'm old, but I immediately assumed this was an OS built around the Gopher-protocol[1], whatever that would mean in practice. Gopher is already an established name, so the naming seems a bit unfortunate. [1] https://en.m.wikipedia.org/wiki/Gopher_(protocol)

The subsummation of the word 'Gopher' into the Go language eco-sphere irritates me also. I believe it has something to do with the Language having adopted the Gopher (animal) as their mascot? Just because something is no longer in common/widespread use, does not mean you can come along and use its meaning or name on your shiny new product. Gopher the protocol maybe niche these days, but it's not dead. The continued u…

There were many similar complaints when the Go language itself was announced, there already being a programming language named "Go!"

Re: Gopher-OS: A Proof of Concept OS Written in Go

#62

Maybe I'm old, but I immediately assumed this was an OS built around the Gopher-protocol[1], whatever that would mean in practice. Gopher is already an established name, so the naming seems a bit unfortunate. [1] https://en.m.wikipedia.org/wiki/Gopher_(protocol)

Bikeshedding, we can also start discussing why `println` doesn't print anything on the printer, apple doesn't sell any fruits and their ipad is not really targeted to women during period, microsoft has no double glazed windows offers, oracle without cloud based prophecy api and why ml lang and machine learning are stealing established, widely deployed in most kitchens millilitres measure - nobody gives a crap.

nit:

println does indeed print if you're using a teletype. The fact that you're probably not using a teletype is simply a matter of preference on your part.

Re: Gopher-OS: A Proof of Concept OS Written in Go

#63

Earlier quoted context omitted.

Having no confidence in the project is part of the path to success "I’m doing a (free) operating system (just a hobby, won’t be big and professional like gnu)"

Hey, good luck with it! I'm thinking maybe I'm just wired differently. If I have a side project or hobby I still want to feel maybe not success but a sense of completion. An OS project I suspect will always end when you no longer have time for it or are stuck somewhere. I'd be annoyed by that.

Your reply, while I'm sure it is genuine, couldn't be more on-point by being more wrong.

You really don't know, and cannot know, where the next Linux is going to come from. I don't know if this will be it, just by considering probabilities, it probably won't be, but it could.

Even at the worst case, the author of a project like this is going to learn A LOT from it, and the people who read through the source code are also going to learn a lot. Writing an OS in a higher-level language absolutely is beneficial to people who want to learn more about how hardware works and interacts with the OS, without needing to delve into something as complex as the Linux/BSD kernels.

At a minimum, I think projects like this directly create contributions to other "real" kernels by teaching developers how to do kernel/OS programming.

Re: Gopher-OS: A Proof of Concept OS Written in Go

#64
post #38

Earlier quoted context omitted.

There a tons of name conflicts for things that are more popular than the gopher protocol. If the creators wanted to avoid this they need to pick a unique name.

My pet peeve is Atom the protocol and Atom the text editor. They're obscuring a format and a protocol that's much more important for the web than another text editor is, and they're doing the world a disfavor as a result.

And I've been using Atom as my default username on local Linux installs since 2001. So now I invoke my user installed editor as

   /home/atom/opt/Atom/bin/atom
And to check it's running? NP! Just use `ps -eF|grep -i atom`

We need more letters

Re: Gopher-OS: A Proof of Concept OS Written in Go

#66

Hi, I am the author of gopher-os. It started as a fun research project to learn more about the Go runtime internals and I didn't really expect it making it to HN. If you take a look at the Go runtime sources you will notice that all the low-level arch/os-related bits have been split into separate files which usually invoke some syscalls (e.g. the memory allocator eventually calls mmap) The idea I am currently investi…

How much of your codebase is error-checking?

https://anvaka.github.io/common-words/#?lang=go

(the top 4 by far are err, if, return, nil!)

Re: Gopher-OS: A Proof of Concept OS Written in Go

#68
post #23
post #16

Earlier quoted context omitted.

Looks like it's a matter of not importing almost any libraries other than "unsafe".

Not only that, but you'd have to take care not to do anything that would trigger an allocation, since you don't have memory management.

On the lowest levels only. The rest of the OS can be GC'd. See Oberon, JX OS, and House in Haskell for instance. That Go has a low-latency GC makes it even better for that usage.

http://programatica.cs.pdx.edu/House/

Re: Gopher-OS: A Proof of Concept OS Written in Go

#69
post #29

Hi, I am the author of gopher-os. It started as a fun research project to learn more about the Go runtime internals and I didn't really expect it making it to HN. If you take a look at the Go runtime sources you will notice that all the low-level arch/os-related bits have been split into separate files which usually invoke some syscalls (e.g. the memory allocator eventually calls mmap) The idea I am currently investi…

I started writing a kernel in Go a while ago (and since abandoned it due to not having time.. I got as far as having a simple built in shell that let you do ls and cat on a FAT filesystem). The part about memory allocation and virtual memory wasn't much more difficult than it would be if you were implementing your kernel in C or some other low level language. The hard part is once you get memory and paging working, y…

Could you instead write your own syscalls but also your own $GOOS target for the compiler?

That's possibly more work but it's the approach I would have taken as it seems more fun than just replicating Linux (or whatever) syscalls.

Re: Gopher-OS: A Proof of Concept OS Written in Go

#70
post #54

Earlier quoted context omitted.

The Go assembly language is actually one of the things that make doing something like this difficult. Go uses the Plan9 assembly syntax but doesn't support GNU asm syntax. gccgo uses GNU asm syntax but doesn't support Plan9 assembly. The Go linker doesn't allow you to not link in the Go standard library runtime, which means you need to use gccgo to write a kernel. The end result is that you can't do something that's…

I take a slightly different approach for my implementation that allows me to use the standard go toolchain. I use nasm for the early ASM code and patch the go build tool's output (see: https://github.com/achilleasa/gopher-os/blob/master/Makefile... ) to bypass the link step and replace it with a manual call to ld that links the go object files with the output from nasm. I will be talking about this approach in more d…

> I will be talking about this approach in more detail in GolangUK '17.

Sounds great. Any chance for you to come to dotgo.eu?

Post reply on HN