A few years back, I came across Robert Graham’s wc2 repository on GitHub. wc2 is an implementation of the Unix wc command that is significantly faster than the existing GNU and BSD wc implementations. It achieves its speed by using something called a state machine . The repo contains a nice write-up that explains some things, but doesn’t explain how the program actually works. I wrote…
Everyone knows the classic print("Hello World") program they might have written when they first started learning programming. Recently, I saw a meme version of it , where instead of print("Hello World") , it’s HelloWorld("print") accompanied by Elliot from Mr.Robot saying “Sometimes I dream of saving the world”. 
 




 

 
 
 

…

 Recently, I’ve gotten hooked on the game Elite Dangerous , a space flight simulation game which contains a 1:1 scale replica of the Milky Way galaxy. In the game, players can use ships to jump between star systems, with a very limited range (usually around 80 lightyears). 
 There are around 400 million stars discovered by players. A small fraction, around 4.4 million of them, are…
I have an open source project which uses GitHub Releases as its binary distribution platform. I have a GitHub actions workflow which builds the Rust project using cargo , creates an installer and creates something called a “build provenance attestation”, which is a verifiable signature of the installer binary, created and managed by GitHub using SigStore . This can paired with a wordy…
I’ve recently been working on an app which uses Expo , a framework for React Native. It actually has a pretty nice developer experience, abstracting away many of the ugly parts of app development. 
 For the project, I needed to rely heavily on native APIs, like the Nearby Connections API , and found out that the best way was to create an Expo module with npx create-expo-module , which…
I’ve been learning a lot about low-level programming languages lately, and for a long time there has been one thing that has interested me: SIMD (or ‘single instruction, multiple data’) code. I’ve seen a lot of articles about having massive performance gains by utilizing SIMD and wanted to learn how to do it myself. 
 This article is a journey into implementing ~60%…
I wanted to reduce the number of dependencies in my Rust project, and I noticed that the rust-i18n crate has a lot of dependencies (a whopping 46 of them). Since I didn’t really have that many translations and they didn’t need any special logic, I figured that I could just write a very simple localization function myself. 
 First, I made an enum in a new file lang.rs to represent…
I recently saw a bunch of videos about simple particle simulations where there are thousands of tiny 2D balls interacting with each other, and it looked very fun! I wanted to do something very similar, but I also wanted to use Zig, a language that I haven’t used much before but is currently one of the trendiest languages around. This post is primarily about using the Zig build system to…
It’s the time of year to start sending some summer job applications again. And is there a better way to procrastinate improve the job searching experience than to generate the CV from simple markup with Typst? 
 Typst is new 1 a typesetting system similar to LaTeX, but has much nicer syntax, and also it’s written in Rust!🤷 
 In this post I’ll show some basic features of…
Anyone who has implemented a simple HTTP 1.1 server can tell you that it is a really simple protocol. Basically, it’s a text file that has some specific rules to make parsing it easier. 
 All HTTP requests look something like this: 1 
 GET /path HTTP/1.1\r\n
 Host: aarol.dev\r\n
 Accept-Language: en,fi-FI\r\n
 Accept-Encoding: gzip, deflate\r\n
\r\n
 The first…
Making changes to websites is tricky, because even small changes may lead to visual regressions in the page layout. For example, changing a bit of CSS to fix something somewhere may blow up in a completely different place. I could just click around and make sure everything looks okay, but that is boring and error-prone. What if I told you that there is a way to make sure that every pixel on your…
Recently, the cushions of my old headset, the HyperX Cloud Stinger, were breaking apart pretty bad. I had been using them for 5+ years at that point, so it was time for an upgrade. I bought a new wireless gaming headset, the SteelSeries Arctis Nova 7 . So far, it has been great. I was expecting to feel a noticeable delay in the audio since they are wireless, but I am happy to report that with the…

 Advent of Code is an annual set of Christmas-themed computer programming challenges that follow an Advent calendar. It has been running since 2015. 
 The programming puzzles cover a variety of skill sets and skill levels and can be solved using any programming language. Participants also compete based on speed on both global and private leaderboards. 
 – Wikipedia 
 
…
Dev Drive is a new type of storage volume in Windows 11 that is specially made for programming workloads. Instead of the typical NTFS filesystem, it uses ReFS (Resilient File System), which is a newer filesystem based on Copy-on-Write (COW) linking. Basically, if you have two copies of a file, only one copy actually exists on the disk. The other one exists only as a link to the first one. Then,…
Have you ever shared a link somewhere and wondered where those little preview images of websites come from? Well if you didn’t know, they are called OpenGraph tags. Open Graph protocol was invented by Facebook and is now used by many other social media sites, like X (Twitter), LinkedIn, Reddit, Discord, Mastodon and many others. 
 They look like this: 
 < head > 
 < meta property…
Valmistuin ylioppilaaksi keväällä 2023. Kirjoitin viisi eri ainetta, joista sain seuraavat arvosanat: 
 
 
 
 Aine 
 Pistemäärä / Max 
 Arvosana 
 L:n pisteraja 
 
 
 
 
 Äidinkieli 
 80 / 120 
 E 
 89 
 
 
 Pitkä englanti 
 271 / 299 
 L 
 267 
 
 
 Pitkä matematiikka 
 105 / 120 
 L 
 81…
After Lastpass suffered a massive data breach last year, I began looking for an alternative password manager. Bitwarden is another centralized password manager like LastPass, but with the added benefit of being completely open source ! They also allow you to spin up your own Bitwarden server and connect to them with all of their clients. 
 Fly.io has a generous free tier, allowing up to 3…
Compared to Javascript, Python and other single threaded languages, Go takes a very different approach to 
 I was having difficulties understanding how concurrent Go programs are supposed to work. Coming from single-threaded event-driven languages like Dart and Javascript, it was not easy wrapping my head around things like mutexes or channels. I recently found the Little Book of Semaphores ,…

 TLDR:
 # 
 http . ListenAndServe ( ':8080' , nil) // bad 
 http . ListenAndServe ( 'localhost:8080' , nil) // good 
 If you are using Go with Windows, you might encounter a small annoyance when running a http server. When using go run to run the server, Windows Defender will sometimes prompt you for firewall access. Here is an example of a Gin server doing it: 
…





 

 
 
 
 
 
 
 
 
 
 
 
 ATTENTION: there are now several forks of SD that offer web GUI’s and can install on Windows in one click (most notably sd-webgui ). If you want to run Stable Diffusion programmatically and don’t mind some extra steps, read on. 
 
 
 Prerequisites
 # 
 In order to…
Fly.io is a cloud service that can be used to easily deploy fullstack applications on the web. You only pay for what you use, and servers can be scaled up and down easily. Fly.io supports lots of frameworks and Docker images, which will come in handy. I’ll show how you can deploy a Caddy web server serving a single page application with a Go backend. 
 
 Getting started
 # 
…

 X11 doesn’t support monitors with variable refresh rates: When using one 60hz monitor and one 144hz monitor, the shell (Gnome, KDE etc) will run at 60hz on both monitors. Wayland might fix this, but: 
 Wayland is not enabled on Nvidia GPUs by default. Even if it is possible to use Wayland with the proprietary drivers, it’s not stable enough to be the default, for example in…
While reading the code of flutter apps, I’ve seen this particular piece of code repeated way too many times: 
 return MaterialApp ( 
 theme : ThemeData.dark().copyWith(
 textTheme: ...
 ) , 
 home : ...
)
 This is problematic for a couple reasons that become clear when we take a peek at how ThemeData works. 
 This is taken directly from the material…
There are a lot of units to remember in physics. I often make errors because I forget to multiply by something, or I’m mixing up meters and kilometers by mistake. Wouldn’t it be convenient to not have to worry about that and make the computer to it instead? I recently found out that SpeedCrunch , which is a fast & minimal open-source scientific calculator, happens to support units…
The app I’m currently building has a feature which displays a custom wallpaper on the home screen. It involves the user choosing an image from their gallery and cropping it to their device’s aspect ratio. The app then modifies the image and sets it as the background. 
 There’s just problem: How do I get the pixel dimensions of the screen? 
 
 Screen height in…
This is the first post on my website. I made this website to host anything that I want to publish. My number one goal is to write about things that atleast one person somewhere might find useful. Solutions to problems that I have encountered, guides on languages/frameworks or just something cool I want to share. 
 
 Static site generation
 # 
 Static site generators output plain…

 👋 Hi, I’m Aaro
 # 
 I’m a Finnish undergraduate CS student at Aalto University . 
 I am very interested in software architecture, performance optimizations and designing scalable, reliable software. 
 There are a lot of open-source projects on my Github , including reload , a Go middleware package and arctis-battery-indicator , a Windows task bar program written…
A couple years ago I was recommended a video called “ Tomorrow Corporation Tech Demo ”. This is a 14-minute video by Allan Blomquist, a low-level programmer and one of the 3 people at indie game studio Tomorrow Corporation . In the video, he showcases the debugging tools built around their game-engine and code editor. I highly recommend watching the video yourself. It’s one of…