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
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 small prisons are common, larger ones are hard to find – a...
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 Rust is impure. For the purposes of borrow checking, though, we...
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, and now you’re writing code instead of having fun. Computers...
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 Stein’s algorithm. It’s a best-of-class implementation, though...
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 profilers can recover the full names (e.g. alloc::vec::Vec...
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 going to hold your hand. Consider reading the previous post...
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 corner, but it lists many things that were removed in 0.6, so...
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 humans treat the data. In this example, this would be “a...
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())), 3 => "", 4 => { // <-- let x = 1; f(x) } _ =>...
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 my approach to decompiling control flow, which was a great...
A few days ago, I stumbled upon a Hacker News discussion about the expression problem – a conundrum that occasionally arises in software design. Some of the commenters noted that Rust completely avoids this problem thanks to trait...
Fenwick trees and interval trees are well-known data structures in computer science. Interval trees in particular are commonly used in bioinformatics and computational geometry, and Fenwick trees are useful for keeping statistics. This...
Here, read the intro of the Wikipedia page for Command pattern with me: In object-oriented programming, the command pattern is a behavioral design pattern in which an object is used to encapsulate all information needed to perform an...
In contemporary “AI” discourse, people often make a point that LLM output cannot be trusted, since it contains hallucinations, often doesn’t handle edge cases properly, causes vulnerabilities, and so on. This is seen as an argument to...
This is a tech phenomenon that I keep getting blindsided by no matter how much I try to anticipate it. Physical work feels difficult. You can look at someone and realize you don’t have nearly as much stamina, and even if you did, it...