RSSAmplifier

Blog

steen's burrow

steen's online burrow

sgt.hootr.clubRSS feed ↗29 posts

Latest posts

This is my skinner box! It was made for me!

A while ago I started going to this local open source meetup. It looks like this: you meet up with a maniple of people that seem to share the same disease that keeps you up at night writing on the computer and you spend a day hacking on open source projects and bantering and bonding over technical preferences, bad job experiences, or a specific anime you watched roughly 16 years ago. In the…

The death and rebirth of my home server

A few evenings ago my partner and I were in the mood to install this particular Linux ISO. The guys from Red Letter Systems had spoken of it well, it had good reviews on boundingboxd, and my partner liked the installation trailer. I opened Tremotesf on my phone to check whether I already had it on the Pi, but the torrent list wouldn't load. The SMB mount wouldn't mount. I couldn't SSH into it…

Enumerate your logs

I'm working on my Soulseek client snus (named in honour of nicotine+ ), which is a Gleam application targeting the BEAM and an attempt to learn some things about OTP. I've also been working on some new projects at work that use structured logging and "audit logging" using structured fields, and I like the pattern! I'd like snus to have structured logs as well. How do I do it? A crash introduction…

Building smaller Docker images faster

I've been tasked (more or less) with building the first Go service at $DAYJOB , which is almost exclusively a Python shop. Why Go of all languages? Well, some of my coworkers are big fans of the gopher, it's an easy language, it's attached to one of the big companies, and it's much faster than Python, so I feel more comfortable pushing for this rather than Rust or (sadly) Nix. The project that…

Hacking on the reMarkable 2

Since last Wednesday, I am the proud owner of a reMarkable 2 . There was a black friday discount and some refurbished deals that meant I could get the tablet, the Marker Plus and the book cover for a little over the asking price of the base tablet and marker so I decided to take advantage of it. A short review The reMarkable is marketed as a distraction-free reading and writing device, and I can…

My Immich setup feat. NixOS

Immich reached a stable release! I started using it several months ago and I've been having a very pleasant experience with it, so I figured I could write a few lines about it. Immich is an open source self-hosted replacement for Google Photos and other similar paid services. It has a very polished web UI and mobile apps. This is what it looks like: Basically you slap it on your home server,…

About this blog

I just changed my blog's tech stack, so the time has come for me to write the obligatory meta-post about my blog. I spent thursday night setting up this blog again, throwing out my own Racket -based static blog generator and replacing it with Zola . I'm not particularly happy about killing my generator, but it was either choosing an off-the-shelf option or reimplementing a parser for a…

The masculine urge to reinvent the wheel

So I've been playing Baby Steps . It's a game about walking up a mountain by putting one foot in front of the other, and in the process it explores masculinity and how hard it is to accept help from others. I find that I have a lot more in common with Nate, the game's coveralls-wearing manchild protagonist and player character, than I would like to admit. I'm a self-taught programmer. After…

Simple Python devshells with Nix and direnv

In my last post, I mentioned I'm currently working at a Python shop. I'm also a huge fan of Nix, and I believe that a day may come when we can get rid of the messy deployment setup we use now and replace it with Nix, but it is not this day. Today I'm just gonna talk about how I stealthily manage my development environments for the Python projects at work with Nix and direnv, and how you could…

Do I not like Ruby anymore?

I recently started working at a Python shop. The reasons behind this choice of employment are very much unrelated to the technology stack. Python is not my favorite programming language . In fact, allow me to drop the euphemism and express my pure, unadulterated thoughts about it: I never liked Python, I see it as a huge red flag and I think the world would be a better place if we all decided to…

Solving Advent of Code 2021 Day 13 with a linear equation

This year I'm doing Advent of Code in Erlang. The data structures it provides are all immutable, so I have to be kinda clever if I don't want my solutions to run too slowly. This is my solution for Day 13: Transparent Origami . The first thing I noticed when I got the input was that all the folds are right down the middle, so I figured that instead of doing all the folds iteratively you could get…

Types of parser combinators

I've been trying to write this post for a long while. Parser combinators to me are a Leitmotiv that plays whenever I need to parse something and the times look dire. Every time I almost forget they exist, and every time a light will go off inside my head and I'll think, "I know! I'll use parser combinators!" Parser combinators are a universally useful concept. They're like parsley, because they go…

NixOps is easier than I thought

TL;DR: if you have an underpowered machine or two in your house or a small server that you're already managing using NixOS, and you find that running nixos-rebuild on it takes too long, you can easily keep your current configuration untouched and let a more beefy machine build it. Jump to the end of this post for a sample NixOps specification and instructions on how to use it. Also, NixOps…

Hellpoint breach map

I just finished playing Hellpoint, an indie soulslike which was surprisingly really good. It has a very deeply interconnected world which I loved exploring, but some areas are kinda confusing to navigate and I quickly realized I needed a map and the ones that were available online were... less than satisfactory. So I made one with Graphviz. I did explore the game thoroughly but I didn't manage to…

Offloading NixOS builds to a faster machine

I have a Raspberry Pi 3 sitting next to my router, from which I host a couple things to my local network. I installed NixOS on it and I love the experience: it completely removes the absolute nightmare that is configuring a Linux machine, and I find that incredibly liberating. But there's a catch: the Pi is slow and it doesn't have a lot of memory. Just evaluating the configuration with…

require_so: DRYer StackOverflow copying

Today I was reading a post on the StackOverflow blog when I was struck by this passage: Copying code from Stack Overflow is a form of code cloning Code cloning , you say? In my DRY Ruby codebase? Not if I can help it! And so I got to work. After extensive research, I concluded that deleting the snippet from StackOverflow to make my version the canonical one was not a viable option. So I flipped…

Announcing SatouinDp

My desktop is connected to two monitors and one TV, and for various reasons I find myself needing to switch my primary display more often than most people. This is my monitor setup. There's also a TV behind me, which I use to watch movies and play videogames. My laptop is also connected to the central monitor. When I'm working on my laptop I usually have my central monitor rotated by 90° (code…

The journey of packaging a .NET app on Nix

Me and a few friends have a Discord server where we all gather once a week (or even twice lately, due to recent events) to watch a movie together. It's been going on for about three and a half years and we thought it'd be about time to make a bot that handles voting and backlog and times for us, so we started writing one, in F#. My Raspberry Pi running NixOS is on 24/7, so I thought I could run…

Thoughts on Suspense for data fetching

React's Concurrent Mode has finally landed in React's experimental builds, and it just so happens that I have to start writing this new app at work to be used internally, so what better way to get my hands dirty with this new shiny stuff! In another post I expressed some disconcert at what little I remembered of Suspense's API (kinda missed that .read() thingy in the fetch request), and that... is…

Config constraints in the type system where they belong

Suppose we're maintaining a frontend application. This application has to work across different sites, each identified by a triplet of name, language and country. Let us have a type for that. interface Site { name : string ; language : string ; country : string ; } Our coworker Homer passes by and looks at our code. This is good enough, he might say, and we know he's wrong. We have a list of all…

A brief history of JAVAScript

JAVAScript is often described as a superset of JSon. This is only half the truth. Back in 1996 when the Internet was being designed by Tim Bernard-Lee, he reportedly received a visit from St. Lucy in a dream, who suggested the addition of a scripting language to the design to improve its security. The result was JSon; a simple, elegant and modern programming language, and yet familiar enough to…

A data-fetching component in React

Remember last year's talk about Suspense by Dan Abramov? I was still mostly learning React when that was uploaded to youtube, and seeing him talk about just this issue and presenting this magic API that seemed to solve it without much effort got me really hooked. But then Suspense actually comes out and (even an year later) it's just about code splitting. What gives? Fast forward one year, I was…

Reading Ur/Web signatures, part 1

So you stumbled upon Ur/Web and you rather like what it's about, but after trudging through the tutorials and the examples in the few blog posts you've seen around you can't seem to find your own footing. The compiler errors are long and life is short and you're about to throw your computer out the window. I understand. In this post, I'll walk you through the signatures of a few functions from the…

Overthinking cash in TypeScript

Part of my current project at work deals with monetary values in the form of cash, making change, and displaying the bills and coins on the screen. Since I recently started adding types to certain parts of the codebase with TypeScript, I thought it'd be fun to see how elaborately I could model the types of the values and of the functions using TypeScript's more advanced features, and while I was…

I survived Ur/Web

I don't remember when it was that I first tried Ur/Web , but I'm sure I didn't last long with it. As soon as I strayed a bit from the examples provided on the website (seemingly the only documentation available), I would hit a brick wall, in the form of unreadable compiler errors. I got so frustrated that I deleted all the files I was working on and the compiler with them, and I didn't touch the…

What the hell did I do this week, anyway?

Welcome to the first installation of What The Hell Did I Do This Week Anyway , the low-effort blog series where I write about random stuff that I did in the last few days. Emacs strikes again, or the stages of software grief This week I watched a bunch of Jonathan Blow's screencasts , where he talks about the language he's writing and all that business. It looks nice. Lately he's working on…

The social issues of programming languages

I'm sure you know what bikeshedding means, and even if you don't, you've probably experienced a high amount of it in some way or another. It's a folkloristic 1 programming term that describes the endless discussion over trivial aspects of a piece of software, such as spaces vs tabs, or which of the zillions of JS build systems to use, or whether operator overloading should be allowed. We'll call…

Continuations, Promises, and call/cc

Say you're in the kitchen in front of the refrigerator, thinking about continuations. You make yourself a sandwich right there and stick it on your desk. Then you sit on your armchair and open a browser window to search for their definition. You get a series of abstract explainations, and some examples involving fridges and sandwiches, which leave you more puzzled than when you began. You invoke…

The TTY Protocol

A few months ago, Gary Bernhardt streamed himself writing a text editor. I'm not sure he ever finished it, and for some reason he took down the VoDs on Twitch, but the little I've seen was still very interesting. Writing my own text editor (and using it) has always been one of my dreams and, being a vim user, I'd much rather have it run on my terminal. Bernhardt shares my opinion, so he started by…