Skip to main content

Links from my inbox May 21 2022

· 7 min read

Good Reads​

There’s all sorts of terms and experiences I’m sure I could apply this to, but right now the one that interests me most is the phrase a shitty job. I recently transitioned from having lived my whole life doing the kind of jobs you could do with zero day’s training and no developed skills. I’ve heard the phrase (and some classier high-end equivalents) since then, but it’s used much differently; it’s describing a different set of worries as experienced by a different kind of person living a different sort of life. The Author - Resident Contrarian on Substack - writes about different kinds of people issues.

Good old reads​

A few weeks ago, I learned about something called crash-only software (ht, Robert Greco). This is software that has no normal “start” or “stop” mechanisms. It can only be stopped by crashing it. Often this means unplugging the computer physically.

My thoughts about a classic paper

Because of that I usually make all my services and systems crash only. End up using things like use atomic file moves, open files with append-only, use kill -9 to stop services and so on. To make your system crash-onl,y you have to go down the base system calls.
Some observed effects so far (many are covered in the article):
* Faster restarts (if your regular operation involves restarting lots of processes).
* Less code (don't have to handle both the clean shutdown and dirty shutdown).
* Recovery/cleanup code if it is needed, is often ends up moved to startup instead of shutdown (you might have to recover corrupt files when you start up again. For example re-truncate the files to a known offset based on some index).
* Something else might need to manage external resources (OS IPC resources, shared memory, IPC message queues etc). This could be a supervisor process.
* If you do a lot of socket operations on localhost, your sockets could get stuck in TIME_WAIT state and you'll eventually run out of ephemeral ports if you do a lot of restarts (say during testing). SIGTERM signals often are caught and processes (libraries) perform a cleaner shutdown.
* Think very well about the database you use and see if it can can support crash only operation. Some do some don't ( I won't name any names here ).

on exactly how hard it is to save data without corruption or data loss 🚀

How the things work​

Delta-delta encoding, Simple-8b, XOR-based compression, and more - These algorithms aren't magic, but combined they can save over 90% of storage costs and speed up queries. Here’s how they work.

Fun​

C​

While considering concurrent queue design I came up with a generic, lock-free queue that fits in a 32-bit integer. The queue is “generic” in that a single implementation supports elements of any arbitrary type, despite an implementation in C.

🥑 Rust​

In this tutorial, we’ll demonstrate how to build a basic message relay service that clients can connect to via WebSockets.

🐚 Bash​

trap 'echo "# $BASH_COMMAND";read' DEBUG
echo line1
echo line2
echo line3
echo "Hello World";

Interview​

Recommended TO U by fine gene-tic algo-rightms

Projects​

Two years ago, frustrated with a long list of unfulfilled project ideas in my phone notes, I decided to start trying one idea each week in its tiniest form. I never kept to a weekly schedule, but I've kept plodding along since then and launched 8 things.

Fabrice's shadertoys catalog

Thanks to virtual columns, we almost have a NoSQL database ツ

Sometimes Litestream can be overkill for projects with a small database that do not have high durability requirements. In these cases, it may be more appropriate to simply back up your database daily or hourly. 🪨

You can access the service from a shell or from a Web browser like this:

A tool for automatically converting mitmproxy captures to OpenAPI 3.0 specifications. This means that you can automatically reverse-engineer REST APIs by just running the apps and capturing the traffic.

Resilience​

PowerShell​

Example 4: Customize the PowerShell prompt This example shows how to customize the PowerShell prompt.

PS C:\>
function prompt { 'PowerShell: ' + (Get-Location) + '> '}

PowerShell: C:\>
The function that defines the prompt includes a Get-Location command, which is run whenever the prompt appears in the console.

Bash is old. Bash is solid. Bash is ubiquitous. Bash isn’t going anywhere. I’ve done some crazy things with Bash in my career… Bash and me go a long way. That being said, using JSON in Bash is not always very ergonomic. Tools like jq, jello, jp, etc. help

CSharp​

Comments are closed. Login to edit/delete your existing comments

.NET Standard bindings for Google's TensorFlow for developing, training and deploying Machine Learning models in C# and F#.