purplesyringa's blog

purplesyringa's blog

Alisa Sireneva

Hi! đź‘‹ I'm Alisa Sireneva (she/her), a software developer and blogger from Moscow. I specialize in performance optimization and systems programming. I also have experience with security, compression, and decentralized systems. My primary goal as a writer is to teach the concepts I regularly apply through accessible content.

Latest Posts

Wait, if (flags & O_SYNC) is wrong?

I needed to convert file status flags between operating systems yesterday. They are the values you pass as the second argument to open – O_NONBLOCK, O_NOATIME, O_SYNC, O_DSYNC,...

Programming used to be free

The appearance of Mythos – a private LLM allegedly capable of finding a multitude of 0-days – has made people concerned about being denied powerful tools. This seems to be a...

No one owes you supply-chain security

In case you’re unaware, I’m not a developer. I’m actually an autistic catgirl annoyed by suboptimal use of computing power, and fixing that happens to involve programming....

Simplest hash functions

What came to your mind when you read “hash functions” in the title? If you’re pragmatic, you probably remembered SHA-256 or MD5. Those are cryptographic hash functions, and they...

There is absolutely nothing wrong with Web

This is a rant about how broken everything Web is based on is. You know, the usual. No offence intended towards framework developers, I’m glad this technology exists, but I’m...

Optimization lessons from a Minecraft structure locator

Minecraft generates a bedrock floor at the bottom of the world from a random noise. Since it’s random, it can contain naturally generated unescapable regions – prisons. While...

Reinventing aliasing XOR mutability and lifetimes

Two years ago, I was pondering ways to enhance borrowck with proof-based analysis. At the time, I was only aware of formal verification tools for functional languages, while...

An ode to bzip

The story goes like this. ComputerCraft is a mod that adds programming to Minecraft. You write Lua code that gets executed by a bespoke interpreter with access to world APIs,...

Faster practical modular inversion

Last year, Lemire wrote about an optimized variation of the Euclidean algorithm for computing the greatest common divisor of two numbers, called binary Euclidean algorithm or...

Rust's v0 mangling scheme in a nutshell

Functions in binary files need to have unique names, so Rust needs to decide what to call its functions and statics. This format needs to be standardized so that debuggers and...

Faster comparison modulo α-equivalence

This article is a technical counterpart of my previous post Finding duplicated code with tools from your CS course. It is deliberately written in a terse manner, and I’m not...

A look at Rust from 2012

Recently I was scrolling through brson’s Rust quote database and stumbled upon a link to the official Rust tutorial from the very beginning of 2013. It says Rust 0.6 in the...

ntoh*/hton* is a bad API

Say you want to send a list of consumer records to another microservice over network via JSON. There are three concepts at play in this process: A logical value, which is how we...

Finding duplicated code with tools from your CS course

Suppose that you’re writing a static analyzer and you want to write a diagnostic for match arms with equal bodies: match number { 1 => { // <-- let x = 1; f(x) } 2 => f(g(h())),...

JVM exceptions are weird: a decompiler perspective

Some time ago, I played around with decompiling Java class files in a more efficient manner than traditional solutions like Vineflower allow. Eventually, I wrote an article on...
Shuffle Search Random