Gokrazy is cool
xeiaso.net
xeiaso.net
The other issue I often had with raspberry pi systems was the high probability that an `apt-get upgrade` would trigger a filesystem error on mediocre sdcards. Gokrazy also helps with this 1) by having a read-only file system by default, 2) by using a/b partitions for updates, and 3) having very small image sizes.
It has honestly rejuvenated my enthusiasm for running code on raspberries pi.
Anyway, for those wanting to deploy more generic apps, that is why I initially wrote https://github.com/piku/piku - you still have to flash the OS (and rpi-imager does that with sane defaults these days), but once you're done you have Heroku-like deployments for any language runtime you install on the Pi.
I also have https://github.com/rcarmo/ground-init, a cloud-init like shim that simplifies setting up machines (I'm a big fan of cloud-init, but since Raspbian doesn't support it and Ubuntu on ARM requires some fiddling to make it work I decided it wasn't too hard to roll my own).
(I probably should look into glueing that into rpi-imager, but there is are only so many hours in the day...)
However, I will say one thing about Raspberry Pi's: If you ever find yourself needing to use Raspbian for any reason, you can configure a lot of things by editing the boot files on the FAT32 boot partition. For example, you can throw a wpa_supplicant config to get WiFi working, enable SSH, etc. just using the boot partition. This is basically how I manage Raspberry Pis that I'm just messing around with, although cooking a fresh root image every time would definitely be a nicer solution for "real" work. (My weapon of choice would probably be NixOS in most cases, but I have to try gokrazy first if I ever deploy anything interesting and less temporary to a Raspberry Pi in the near future.)
Another thing that should very much be in Xe's wheelhouse: For non-go software you can write a small go wrapper which launches the software from a nix closure. This is a fun way to get a single-purpose RPi up and running.
Just as soon as I can get a Pi, that is!
That gripe aside - I love this idea and the general principle. Minimal OS's are really interesting to me. I've long dreamed of a basic environment where there are 3 UI surfaces: a Terminal, a Web server / browser, an OpenGL context. Of course, if you have a full capablity web browser you can emulate a Terminal and use WebGL for 3d.
Of course, things like this exist I am sure - but the idea that you could have one that is a dozen files is super compelling. It reminds me of how I was able to get a basic http server in C using civetweb which is a handful of files I can just copy-paste into my source tree. Or the handful of files sized libraries like raylib that provide huge amounts of functionality.
I feel like it's not the government's place to argue semantics, and it's widely understood that the word "engineering" is used to describe a process that one engages in that involves some amount of education, but that the education is not necessarily scholastic in nature.
"Software engineer" specifically is used around the world to refer to the role performed. I'm in Canada, and my job title is "(lead) software engineer". It's on my contract; it's on my job portal. I'm not convinced this is been a problem for anyone, though I have heard of people in Canada getting in trouble for misrepesenting themselves as accredited engineers
I mean, Google doesn't call it's programmers in Canada "software engineers" like it does everywhere else, so yes.
> I feel like it's not the government's place to argue semantics,
er...what? regulating who does various professions and what they call themselves is a very common and important thing that government does.
you've got things backwards - swathes of programmers weirdly started calling themselves "engineers" in the relatively recent past.
> "Software engineer" specifically is used around the world to refer to the role performed.
I don't think it is? I spent 10+ years programming in an English-speaking country and it sounds weird and cringe to me, the same way as "Code Ninja" or "Rockstar" (or indeed the "Archmage" title mentioned elsewhere in the thread).
I graduated from UW in 2011 in software engineering. Never did my P.Eng. I drank the juice that software practitioner will need liability in the future....but it never panned out.
Note that the author of gokrazy is Michael Stapelberg (perhaps better known for writing i3), who doesn't seem to be directly affiliated with Tailscale.
Such a nice person to talk to, and a really great engineer!
It can also run programs that are not written in go, by using a little neat hack to build/embed a binary inside a Go package; this is e.g. how Gokrazy sets up persistent storage: https://github.com/gokrazy/mkfs
I don't think it's for everyone; if you're relying on your base OS / package manager for a lot of stuff, or just want to run Docker containers, I think there are simpler/better ways to set things up. But it's absolutely great at what it's made for; doubly so with the Raspberry Pi's finally being back in stock.
One of these days I will get around to picking it up again and trying to use it for the original idea I had.
https://developer.fyne.io/started/cross-compiling
is it possible to cross-compile that from a mac or window machine and get this rpi working binary ready to ship via Gokrazy? So far cross-compiling has failed for me. Too many x11 deps and weird stuff that makes it so much easier to just run go build on the rpi itself.
I’d be happy with a Linux entirely without GNU. I don’t see how a bunch of included GNU utilities gives it naming rights.
On the other hand, systemd in many ways really defines how the operating system works, making it worthy of inclusion in the name, unlike GNU.
On early-ish Linux, gnu projects provided basically the entire userland, and since it was also the compiler and the libc, that was the foundation to the entire system.
why on earth are you suggesting a thing is true that you've not looked into?
> There’s so many incarnations of Linux that surely GNU is relevant in only a small number of cases?
essentially all Linux systems aside from Alpine and Android use glibc and a GNU userland, and GCC is still the dominant compiler.
I guess this is just very low-effort trolling?
when you're handwaving 3.6 BILLION devices away, maybe your case isn't as strong as you think :)
When the question is "how accurate is it to refer to Linux systems as GNU/Linux", and 3.6 billion devices run Android, and probably as many TVs, home internet devices (modems, wifi, etc), don't ship with the GNU userspace, then the answer very well might be "not accurate at all".
In fact, at this point, I would be surprised to learn that there are more Linux based computers running GNU userspace than not running GNU userspace.
In my house, off the top of my head, I can count 7(!) devices that I know for a fact use Linux and don't have the GNU userspace, three that I'm unsure of, and two that do. And, you probably also have more Linux devices in your household not running GNU userspace, than those that do.
As for the compiler? That's a valid point, but I don't think that earns you naming rights :) We don't call it Windows/Visual Studio 11 or macos/clang.
:)
Posted from a Linux/OpenRC system.
i’ll make a blog post about this setup soon, it’s all still pretty in flux rn.
one thing worth mentioning is that if you’re operating in a limited bandwidth environment, goks update may be annoying/impossible to tolerate - it uploads the full resulting squashfs to the pi.
in my case, it’s about 40MB over the network per change, even if it’s just a flag adjustment. that’s just the cost of the “appliance model”
(comment x-posted from another site)
books i'm reading currently:template: now.html:9:33: executing "now.html" at <.CurrentBooks.ReadingLogEntries>: can't evaluate field CurrentBooks in type struct { Title string; Data interface {} } gok -i casa add tailscale.com/cmd/tailscaleIt's a minimal Linux distribution that contains just the Linux kernel and the bare minimum of userspace (basically just init) needed to run Go programs on Linux. Like Alpine Linux, but just for Go.
Former co-worker did this, and we still have tons of docker images in production that lack basic debugging functionality like... a shell. Alpine Linux is only like 8 MB more :(
Thus, I spend the investment up front in getting log streaming working, my logs are concise, I implement application monitoring, and I demand host monitoring from the platforms I use. If I check all of those boxes, I generally don't have anything I need to do with a shell.
Second to that is that I have dev stages that are built with containers that do have those tools, and generally if I run into those kinds of problems I see them in dev first.
While novel, you really need to have the engineering excellence in your org to be able to struct log to another system, blue/green deployments, etc.
One place where I worked where did bare metal orchestration with containers, we had tooling around seeing which services were failing, where to go look at logs (and filter them), and we threw away the ssh keys to the AWS ECS hosts to force you into a CD deployment model. You’ll never get Sherlock Holmes access to production. Not even to run SQL queries against your production database.
I (as a devops engineer) did that because (rightfully) rhe developers i was working with at the time didn’t include some troubleshooting tools (like tcpdump) and the inages were running as non root anyway.
Look up the manpage for nsenter, it’s all you need really.
Btw, tcpdump in production, hunting the correct network interface on a kubernetes cluster node… fond memories:)
That's a commendable security practice. A whole class of vulnerabilities is mitigated (and others are much harder to exploit) if you don't add unnecessary junk to your images, like a shell.
It's also endorsed by Google via distroless: https://github.com/GoogleContainerTools/distroless
But I love small systems like this. Today's software ecosystems have grown to ridiculous sizes. "Back to basics" is refreshing no matter the purpose.
Linux vs. GNU/Linux has been discussed ad nauseum.
Reading several pages through an article before it says what it's about, is both annoying & wasting many readers' time.
Things should be explained as they come, or have a linked explanation, or say things like "we'll explain what XYZ is later".
If an article is about a tool but I don't know what the tool is and the first paragraph doesn't explain it, am I really expected to skim the entire article in the hope that somewhere is hidden an explanation, and then go back and read from the top? That can't possibly be good story telling?
Good storytelling comes in many shapes and forms, maybe the author was trying to use anticipation as the main element!
I really don't understand the surprise you're apparently filled with when coming across an article that's not presented in the way you expected; an imaginary problem that stops existing once you scroll down or do a keyword search.
Unsolicited recommendation, if I may: do not watch Pulp Fiction.