Live data from Hacker News

Gokrazy: A pure-Go userland for Raspberry Pi 3 appliances

gokrazy.org

11–20 of 90 posts

Re: Gokrazy: A pure-Go userland for Raspberry Pi 3 appliances

#12
post #9
post #3

Earlier quoted context omitted.

They say it right in the header: "For a long time, we were unhappy with having to care about security issues and Linux distribution maintenance on our various Raspberry Pis."

So it’s like it’s own OS almost? What’s a userland?

Yes, it's pretty much the OS except for the kernel.

Re: Gokrazy: A pure-Go userland for Raspberry Pi 3 appliances

#15
post #9
post #3

Earlier quoted context omitted.

They say it right in the header: "For a long time, we were unhappy with having to care about security issues and Linux distribution maintenance on our various Raspberry Pis."

So it’s like it’s own OS almost? What’s a userland?

Userland is the part of the OS that is not the kernel. It is the part you actually interact with.

https://en.wikipedia.org/wiki/User_space

Re: Gokrazy: A pure-Go userland for Raspberry Pi 3 appliances

#16
post #9
post #3

Earlier quoted context omitted.

They say it right in the header: "For a long time, we were unhappy with having to care about security issues and Linux distribution maintenance on our various Raspberry Pis."

So it’s like it’s own OS almost? What’s a userland?

It's everything the kernel doesn't do. In general, that means the surface with which you interact as a user. So if you're used to using a terminal, your SSH connection, your Bash session, are all userland programs (that use kernel features to do things). You can think of it as kernel is a framework like Rails and userland stuff is developers using and expending the interfaces... sort of.

When your computer runs headless, the init/process tree system is userland. Background (cron) jobs are userland, daemons are userland. Etc.

Re: Gokrazy: A pure-Go userland for Raspberry Pi 3 appliances

#17
post #14
post #13

Why is Go considered safe?

Go is memory-safe. See also https://en.wikipedia.org/wiki/Memory_safety

Are there not many statically typed, compiled languages that ship a runtime with a garbage collector? Why is Go a good choice here?

Why is this choice better than a language that provides memory safety using linear types so you don't even need a runtime or garbage collector?

Re: Gokrazy: A pure-Go userland for Raspberry Pi 3 appliances

#18
post #10

Earlier quoted context omitted.

Yep - for home automation style stuff (which the author seems to have built it for - see the showcase section), having a full Linux distro is actually a real pain. I've taken to building my own stuff with the ESP series of microcontrollers, home made PCBs, etc - once it's built - it just keeps chugging along, unlike my original stuff I built atop RaspberryPis with Linux.

I've done a lot of this sort of this as well. The ESP8266 is so great for simple on/off switches and sensors. But-- there are so many applications for having a full IoT Linux distribution that I can't believe this isn't already a solved problem. I'm imagining an ultra-stable distro that is easy to deploy to a headless machine, handles security updates, handles flaky wi-fi issues, tests the SD card (I've had more than…

Android-things solves this problem at the scale of embedded linux, and mbed solves this problem at the microcontroller level.

Re: Gokrazy: A pure-Go userland for Raspberry Pi 3 appliances

#19
post #17
post #14

Earlier quoted context omitted.

Go is memory-safe. See also https://en.wikipedia.org/wiki/Memory_safety

Are there not many statically typed, compiled languages that ship a runtime with a garbage collector? Why is Go a good choice here? Why is this choice better than a language that provides memory safety using linear types so you don't even need a runtime or garbage collector?

You can read more about why I like Go at https://michael.stapelberg.de/posts/2017-08-19-golang_favori....

Of course I used my favorite programming language for building gokrazy :).

Re: Gokrazy: A pure-Go userland for Raspberry Pi 3 appliances

#20
post #17
post #14

Earlier quoted context omitted.

Go is memory-safe. See also https://en.wikipedia.org/wiki/Memory_safety

Are there not many statically typed, compiled languages that ship a runtime with a garbage collector? Why is Go a good choice here? Why is this choice better than a language that provides memory safety using linear types so you don't even need a runtime or garbage collector?

Are there not many statically typed, compiled languages that ship a runtime with a garbage collector?

Not really a huge number, no. Java is probably the most obvious, if you count that as compiled. Maybe Haskell or D? I suppose even Swift of Objective C if you include RC in the definition of GC.

I would say the focus shouldn't be entirely on GC, however. Safety as a whole is the most important factor, and it's possible to be say without GC, as you point out. I reckon Go is actually quite an attractive language for this sort of application regardless – quite safe, quite lightweight, good libraries.

Post reply on HN