Skip to content

Instantly share code, notes, and snippets.

View blokyk's full-sized avatar
🏳️‍⚧️
"queer-coded? you're telling me a queer coded this??"

blokyk

🏳️‍⚧️
"queer-coded? you're telling me a queer coded this??"
View GitHub Profile
@pizlonator
pizlonator / pizlossafull.md
Last active October 23, 2026 12:41
How I implement SSA form

This document explains how I would implement an SSA-based compiler if I was writing one today.

This document is intentionally opinionated. It just tells you how I would do it. This document is intended for anyone who has read about SSA and understands the concept, but is confused about how exactly to put it into practice. If you're that person, then I'm here to show you a way to do it that works well for me. If you're looking for a review of other ways to do it, I recommend this post.

My approach works well when implementing the compiler in any language that easily permits cyclic mutable data structures. I know from experience that it'll work great in C++, C#, or Java. The memory management of this approach is simple (and I'll explain it), so you won't have to stress about use after frees.

I like my approach because it leads to an ergonomic API by minimizing the amount of special cases you have to worry about. Most of the compiler is analyses and transformations ov

@blokyk
blokyk / syno.sh
Last active September 4, 2026 14:41
A very simple CLI thesaurus with fuzzy search (using `fzf`) // Un chercheur de synonymes avec recherche approximative (avec `fzf`)
#!/usr/bin/env bash
# syno -- a basic thesaurus CLI based on fzf
#
# == USAGE ==
# You can either start syno directly, or give an initial query
# syno
# syno 'lovely'
# This will open `fzf` in interactive mode, displaying a list
# of matching words on the left, and the thesaurus enties on the right.
@sweetbbak
sweetbbak / README.md
Created February 28, 2024 22:10
How to install NixOS alongside another Linux distro (dual boot)

NixOS Linux dual-boot

This is a simple tutorial on how to dual boot NixOS alongside an existing Linux installation. This tutorial will show you how to install NixOS into an existing boot partition, making it available in the current bootloader configuration. I will also lightly touch on the mounting an existing home directory and any drives you may have.

This is tested on Apple Mac books, Linux with systemd-boot and it should work the exact same with Linux and Grub.

@gelisam
gelisam / ValueBasedDebugging.hs
Last active December 25, 2025 17:24
A proof of concept for a value-based debugging technique
-- A proof of concept for a value-based debugging technique: instead of
-- debugging by imperatively stepping through the evaluation, we instead
-- produce a value representing the evaluation tree.
--
-- This value can then be manipulated like any other value, e.g. instead adding
-- a breakpoint and stepping until the breakpoint is hit, you can write an
-- ordinary function which recurs into the evaluation tree until it finds a node
-- of interest. This way, more complex conditions can be easily expressed, e.g.
-- "find the smallest subtree in which a call of 'double' does not result in an
-- output which is the double of its input".
@CMCDragonkai
CMCDragonkai / nix_string_and_path_concatenation.md
Last active April 2, 2026 22:21
Nix: String and Path Concatenation #nix #nixos

Nix String and Path Concatenation

From Bas van Dijk:

To understand these things I would recommend using nix-repl:

$ nix-repl
Welcome to Nix version 1.11.2. Type :? for help.