It is really interesting that Gokrazy uses an upstream kernel (with a couple of minor patches). https://github.com/gokrazy/kernel/blob/3ecdc901da51c2c5b6bf7...
Gokrazy: A pure-Go userland for Raspberry Pi 3 appliances
31–40 of 90 posts
Re: Gokrazy: A pure-Go userland for Raspberry Pi 3 appliances
#32Earlier 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…
Sad but true. There's still a few companies selling microkernel-based solutions in defense and mobile with Linux user-lands. They'd OEM license their stacks for a new set of products aimed to do this. They cost a fortune. Whoever pays it wont get it back, though, cuz folks dont usually pay for security in that volume. So, nobody is doing it for small players for now.
Re: Gokrazy: A pure-Go userland for Raspberry Pi 3 appliances
#33This is so cool! I’m very happy to learn an effort like this exists, and looking forward to perusing the code for it... in Go (a language I really enjoy reading).
Re: Gokrazy: A pure-Go userland for Raspberry Pi 3 appliances
#34Earlier 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 :).
I can't resist while here thanking you for i3. I've been a mac user recently, but will likely be back to linux in the next year or so. Using i3 again will be probably be the greatest pleasure involved in that return ;)
Re: Gokrazy: A pure-Go userland for Raspberry Pi 3 appliances
#35Re: Gokrazy: A pure-Go userland for Raspberry Pi 3 appliances
#36It is really interesting that Gokrazy uses an upstream kernel (with a couple of minor patches). https://github.com/gokrazy/kernel/blob/3ecdc901da51c2c5b6bf7...
Why is that interesting? Just that they're not having to carry special patches for the RPi3 or what?
Re: Gokrazy: A pure-Go userland for Raspberry Pi 3 appliances
#37Earlier quoted context omitted.
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 headl…
... that will have security issues, require updates, distribution maintenance, and all that stuff they claim is unacceptable ?
Re: Gokrazy: A pure-Go userland for Raspberry Pi 3 appliances
#38Earlier quoted context omitted.
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...
Re: Gokrazy: A pure-Go userland for Raspberry Pi 3 appliances
#39Earlier quoted context omitted.
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...
Is there any language not safer than C++?
Also multithreading gets some improvements which will take more of the manual sync details away from the business logic. (http://www.modernescpp.com/index.php/multithreading-in-c-17-...)
It's still delivered attached to a foot-gun, but you could do worse.
Re: Gokrazy: A pure-Go userland for Raspberry Pi 3 appliances
#40Want something like this for one of the languages that I know... Node.js, Python or Rust. I'd include C++11, though for this kind of deployment method I think one needs packages easily available in a way separate from Linux distro (since there is none).