Live data from Hacker News

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

gokrazy.org

21–30 of 90 posts

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

#21
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?

There are a number of languages that meet the memory safety criteria, and they each have tradeoffs that may make them a good choice for a certain range of use cases. This project happens to be based on Go, but similar projects in other languages would be interesting as well.

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

#22
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…

ResinOS does all that and more.

It's container-based. Works super-well on a Pi3.

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

#23
post #19
post #17

Earlier quoted context omitted.

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 :).

Hey, the creator of i3!

I love your stuff! I enjoyed your episode on Go Time as well!

Cheers!

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

#24
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."

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.

What is it about Linux that doesn't keep your stuff chugging along?

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

#25
post #23
post #19

Earlier quoted context omitted.

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 :).

Hey, the creator of i3! I love your stuff! I enjoyed your episode on Go Time as well! Cheers!

Glad you like my work; thanks for the kind words!

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

#26
post #10

Earlier quoted context omitted.

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…

ResinOS does all that and more. It's container-based. Works super-well on a Pi3.

Oh, this is awesome. Can't wait to try it. Thank you!

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

#27
post #18
post #10

Earlier quoted context omitted.

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.

I'm a wary of Android only in that I'm so used to the Raspian ecosystem, but I will check it out. Thanks for the recommend!

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

#28
post #8

This is great! I think it could have uses far beyond the Raspberry Pi. As someone who's worked in the consumer electronics industry for years, I think we desperately need to rethink our approach to Linux-based electronics with respect to both the userland and the primary application. A legacy-free framework written in a safe language could go a long way to improving our currently lousy reputation with respect to secu…

Shameless self-promotion: also take a look at https://github.com/u-root/u-root :)

(The gokrazy and u-root people all work at Google, I just contacted them to see if we can help each other. Not a competing project.)

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

#29
post #8

This is great! I think it could have uses far beyond the Raspberry Pi. As someone who's worked in the consumer electronics industry for years, I think we desperately need to rethink our approach to Linux-based electronics with respect to both the userland and the primary application. A legacy-free framework written in a safe language could go a long way to improving our currently lousy reputation with respect to secu…

Yeah, the idea is great.

There are a few Basic, Pascal, Oberon and Java (not Android related) options available, but only a minority cares for them.

Still, big enough to keep those vendors doing business.

Having a minimal bare metal runtime for Go would also be nice, but it is a gigantic effort to make it portable across all types of hardware.

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

#30
post #14
post #13

Why is Go considered safe?

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

Go is not memory safe (though is certainly safer than C++). Various Go constructs like interfaces and slices are implemented via non-atomic multiword structs, and data races may result in invalid values leading to memory corruption, etc. See https://blog.stalkr.net/2015/04/golang-data-races-to-break-m...
Post reply on HN