Plurrrr

week 31, 2022

CLI Workflow with Grep, Fzf, and Clp

grep, ag, and ripgrep search file contents for text that matches regular expressions. The previous links show some of their more advanced options.

fzf is an interactive Unix filter. You can feed it anything from stdin (files, previously entered commands, etc) and it displays the results on the screen along with a prompt. When you type into the prompt, fzf filters the list.

When combined, they can substantially speed up a CLI workflow.

Source: CLI Workflow with Grep, Fzf, and Clp, an article by Jon Eskin.

Our roadmap for Nix

We care about Nix, and we want it to thrive.

The way to get there is to strengthen Nix’s core as much as possible. Instead of getting lost in many exciting things that Nix could do, we must take a pragmatic approach in ensuring that the core functionality of Nix works well, and is available to everyone.

Source: Our roadmap for Nix, an article by Théophane Hufschmitt.

Monad Confusion and the Blurry Line Between Data and Computation

There's a common joke that the rite of passage for every Haskell programmer is to write a "monad tutorial" blog post once they think they finally understand with how they work. There are enough of those posts out there, though, so I don't intend for this to be yet another monad tutorial. However, based on my learning experience, I do have some thoughts on why people seem to struggle so much with monads, and as a result, why so many of those tutorials exist.

Source: Monad Confusion and the Blurry Line Between Data and Computation, an article by Micah Cantor.

Use One Big Server

A lot of ink is spent on the “monoliths vs. microservices” debate, but the real issue behind this debate is about whether distributed system architecture is worth the developer time and cost overheads. By thinking about the real operational considerations of our systems, we can get some insight into whether we actually need distributed systems for most things.

We have all gotten so familiar with virtualization and abstractions between our software and the servers that run it. These days, “serverless” computing is all the rage, and even “bare metal” is a class of virtual machine. However, every piece of software runs on a server. Since we now live in a world of virtualization, most of these servers are a lot bigger and a lot cheaper than we actually think.

Source: Use One Big Server, an article by Nima Badizadegan.

Five myths about volcanoes

Few geologic events capture the imagination like an erupting volcano. We thrill at the image: Hot, molten rock comes bursting out of the ground, destroying most everything in its path. Volcanoes can cause massive disasters that kill tens of thousands, and they can produce amazing sights like hypnotic lava fountains. With an eruption like the one underway at Hawaii’s Kilauea, the news fills with volcanoes. But it’s usually full of errors about them and how they operate.

Source: Five myths about volcanoes, an article by Erik Klemetti.

Testing Code That is Difficult to Test (With Perl)

Code that performs side effects is difficult to test because we need figure out how to sandbox the effects so we can observe the state of the sandbox before and after executing the effectful code. The difficulty is increased when the side effectful code also depends on specific OS configurations. Let us explore my solution to such a predicament.

Source: Testing Code That is Difficult to Test (With Perl), an article by Nicholas Hubbard.

The tools I use to build my website

Every so often I get an email from someone starting out in web development who asks something along these lines: “What do you use to create your website, benhoyt.com? Do you use a Content Management System? What theme do you use?”

I generally reply with a brief response, saying how I like to keep it simple: I use my text editor to write Markdown files, test locally using the Jekyll static site generator, and then push them live to GitHub Pages using a Git tool. I don’t use a fancy “theme”, just a simple layout I created using a few dozen lines of HTML and CSS.

Source: The tools I use to build my website, an article by Ben Hoyt.

Semantic Networks

A semantic network or net is a graph structure for representing knowledge in patterns of interconnected nodes and arcs. Computer implementations of semantic networks were first developed for artificial intelligence and machine translation, but earlier versions have long been used in philosophy, psychology, and linguistics. The Giant Global Graph of the Semantic Web is a large semantic network (Berners-Lee et al. 2001; Hendler & van Harmelen 2008).

Source: Semantic Networks, an article by John F. Sowa.

Worst practices #5 through #1

Every so often, you see code that someone else has written—or code that you wrote—and smack your head in wonder, disbelief, and dismay.

My previous article, “Ten Java coding antipatterns to avoid: Worst practices #10 through #6,” explores five of those antipatterns. I’ll conclude the discussion here with the final five worst practices, plus a bonus.

I’ll reiterate what I wrote in the previous article’s introduction: You should avoid these worst practices—and eliminate them when you maintain or refactor existing code. And, of course, resolve them if you see these issues during a code review.

Source: Ten Java coding antipatterns to avoid: Worst practices #5 through #1, an article by Ian Darwin.

How Kubernetes Reinvented Virtual Machines (in a good sense)

There are lots of posts trying to show how simple it is to get started with Kubernetes. But many of these posts use complicated Kubernetes jargon for that, so even those with some prior server-side knowledge might be bewildered. Let me try something different here. Instead of explaining one unfamiliar matter (how to run a web service in Kubernetes?) with another (you just need a manifest, with three sidecars and a bunch of gobbledygook), I'll try to reveal how Kubernetes is actually a natural development of the good old deployment techniques.

Source: How Kubernetes Reinvented Virtual Machines (in a good sense), an article by Ivan Velichko.

I've long been an enthusiastic user of print based debugging, although I did eventually realize that I reach for a debugger when dealing with certain sorts of bugs. But print based debugging is eternally controversial, with any number of people ready to tell you that you should use a debugger instead and that you're missing out by not doing so. Recently I had a thought about that and how it interacts with how much programming people do.

Source: Print based debugging and infrequent developers, an article by Chris Siebenmann.

Running Linux microVMs on macOS (M1/M2)

Sometimes, while working on macOS, you may find the need to test something quick on Linux, or use some utility that's only available on this OS. But, of course, you don't want to go through all the process of creating the VM from scratch.

The good news is, you don't need to! Using krunvm you can create and start a microVM from a regular container image (that is, an OCI image), in just two commands and a couple of seconds.

Source: Running Linux microVMs on macOS (M1/M2), an article by Sergio López.