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

This post is about Windows. Last time we saw that sockets are pretty much just handles, and as such, they can be inherited. If a process creates an inheritable socket and runs CreateProcess with the appropriate parameters, its children...
WinAPI represents most “things” as HANDLEs: files, cross-process mutexes, threads, jobs, etc. Sockets, however, are a notable exception: while on Unix systems they’re no different from files, Windows denotes them by a different type:...
Last time, I found out that Rust’s implementation of subprocesses on Windows makes it impossible to spawn children that inherit selected handles without race conditions. Even if you do everything by the book, a simultaneous call to...
Say you’re writing a Windows IPC library for Rust, and you want to pass a handle to a child process. Maybe it’s a pipe, maybe it’s a file, maybe it’s a broker process handle. It turns out that there’s no correct way to do so due to...
I found the post SIMD in Pure Python by retr0id about optimizing Game of Life and thought it’s a good opportunity to yap about SWAR. Make sure to read that post before continuing here! Or at least skim it.
About two months ago, I found the Teal programming language, which describes itself as a statically-typed dialect of Lua. It transpiles to Lua and runs typecheck on the developer’s machine, so it fills roughly the same niche as...
If a>b>1 and x>1, you can prove that loga⁡x<logb⁡x. (As a reminder, loga⁡x denotes the value t such that x=at.) This is very intuitive if you think about it: for “normal” numbers, the greater a, the smaller t you will need to get the...
If a>b>1 and x>1, you can prove that loga⁡x<logb⁡x. (As a reminder, loga⁡x denotes the value t such that x=at.) This is very intuitive if you think about it: for “normal” numbers, the greater a, the smaller t you will need to get the...
I need a place to describe this algorithm, since it seems to be undocumented on the 'net, so here it is. SRC is a replacement for MTF in BWT-based compressors. According to OpenBWT, it’s the best known MTF replacement measured by...
So I was optimizing a domain-specific compressor the other day, as one does. One important problem was chunking the input string and optimally choosing the most compact encoding for each chunk (different encodings compress different...
So I was optimizing a domain-specific compressor the other day, as one does. One important problem was chunking the input string and optimally choosing the most compact encoding for each chunk (different encodings compress different...
This problem arose when I was writing a specialized data compressor. Say you want to encode a byte stream, and bytes can be encoded in different formats, e.g. optimized for ASCII, numbers, raw binary, etc. These formats prioritize better...
I blog because I want to share knowledge. That’s how I have fun. It feels rewarding to sit down and formulate your thoughts after spending a week researching a topic for a side project. Oftentimes, such topics are largely unexplored:...
Intended audience: data compression geeks. The Burrows-Wheeler transform takes a string as an input and rearranges its characters, grouping them by context. It is invertible with 𝒪(1) additional input, and together these properties give...
This is a guest post by Yuki about some tricks we use for Lua code compression in our shared ComputerCraft pet project. I’ve written about how we adapted bzip2 for this purpose earlier; this story is an installment that takes place in...
Search Random