Go 2 Generics: The usefulness of requiring minimal contracts
I was recently reading Ole Bulbuk's Why Go Contracts Are A BadIdea In The Light Of A Changing Go Community ( via ).One of the things that it suggests is that people will write generics contracts in a very brute force fashion by copying and pasting as much oftheir existing function bodies into the contract's body as possible(the article's author provides some examples of how people mightdo this). As much as the idea makes me cringe, I have to admitthat I can see
You might as well get an x86 CPU now, despite Meltdown and its friends
A year or so ago I wrote an entry about how Meltdown and Spectrehad made it a bad time to get a new x86 CPU ,because current CPUs would suffer from expensive mitigations forthem and future ones wouldn't. Then I went and bought a new homeCPU and machine anyway , and as time haspassed I've become more and more convinced that I made the rightdecision. Now I don't think that people should delay getting newx86 CPUs (or any CPUs)
My view on upgrading Prometheus (and Grafana) on an ongoing basis
Our normal habit is to use the distribution versions of programswe want to run, on whatever version of whatever OS we're running(usually Ubuntu Linux, but we follow this on CentOS, OpenBSD, andso on). If we can't do that for some reason, we generally freezethe version of the program we're using for the lifetime of thesystem, unless there are either security issues or strongly compellingupgrades (or, sometimes, that the version we're using is fallingout
Links: A Practitioner's Guide to System Dashboard Design (with a bonus)
A Practitioner's Guide to System Dashboard Design is a four articleseries on system dashboard design by Cory Watson of One Mo' Gin . The parts are:
If you like these (and I did), you probably also want to read Cory's The CASE Method: Better Monitoring For Humans ,and perhaps peruse the full articles index foradditional things to read.
(Via somewhere that I've now forgotten and can't find again.
V7 Unix programs are often not written the way you would expect
Yesterday I wrote that V7 ed read its terminal input in cookedmode a line at a time , which was anefficient, low-CPU design that was important on V7's small andlow-power hardware. Then in comments, frankg pointed out that I waswrong about part of that, namely about how ed read its input.Here, straight from the V7 ed source code ,is how ed read input from the terminal:
getchr(){ [...] if (readA pattern for dealing with missing metrics in Prometheus in simple cases
Previously, I mentioned that Prometheus expressions are filters , which is part of Prometheus havinga generally set-oriented view of the world. One of the consequencesof this view is that you can quite often have expressions that giveyou a null result when you really want the result to be 0.
For example, let's suppose that you want a Grafana dashboard thatincludes a box that tells you how many Prometheus alerts are currentlyfiring. When this happens, Prometheus exposes an ALERTS metricfor each active alert, so
One reason ed(1) was a good editor back in the days of V7 Unix
It is common to describe ed(1) as being line oriented, as opposedto screen oriented editors like vi . This is completely accuratebut it is perhaps not a complete enough description for today,because ed is line oriented in a way that is now uncommon. Afterall, you could say that your shell is line oriented too, and veryfew people use shells that work and feel the same way ed does.
The surface difference between most people's shells and ed isthat most people's shells
Private browsing mode versus a browser set to keep nothing on exit
These days, apparently a steadily increasing variety of websitesare refusing to let you visit their site if you're in privatebrowsing or incognito mode. These websites are advertising thattheir business model is invading your privacy (not that that'snews), but what I find interesting is that these sites don't reactwhen I visit them in a Firefox that has a custom history settingof 'clear history when Firefox closes'. As far as I can tell thisstill purges cookies and other website traces as
How Linux starts non-system software RAID arrays during boot under systemd
In theory, you do not need to care about how your Linux softwareRAID arrays get assembled and started during boot because it alljust works. In practice, sometimes you do , and on amodern systemd-based Linux this seems to be an unusually tangledsituation. So here is what I can determine so far about how itworks for software RAID arrays that are assembled and startedoutside of the initramfs, after your system has mounted your realroot filesystem and is running from it.
(How things work for starting
A VPN for me but not you: a surprise when tethering to my phone
My phone supports VPNs, of course, and Ihave it set up to talk to our work VPN. This is convenient forreasons beyond mere privacy when I'm using it over networks I don'tentirely trust; there are various systems at work that can only bereached from 'inside' machines (including the VPN server), or whichare easier to use that way.
My phone also supports tethering other devices to it to give themInternet access through the phone's connection (whatever that is