Skip to content

Instantly share code, notes, and snippets.

Elements of skainswo Style

In the course of my open source and day-to-day work I am occasionally asked to weigh in on software design. In the interest of my time and energy and the time and energy of others, this document is an attempt to codify as much as possible of my personal design philosophy and programming aesthetics. It is my goal that after reading this document and all of the linked material you will have a faithful mental model of how I think about the world and programming in particular -- hopefully to the extent that you could imitate me in a PR review or design discussion, whether or not you agree.

i know kung fu
s/kung fu/skainswo's programming world view

Complexity

❯ nix-build -A python3Packages.anndata
this derivation will be built:
/nix/store/swwnk1mhz2wfxy75asx67zjg2qkhi8di-python3.12-anndata-0.11.4.drv
building '/nix/store/swwnk1mhz2wfxy75asx67zjg2qkhi8di-python3.12-anndata-0.11.4.drv'...
Sourcing python-remove-tests-dir-hook
Sourcing python-catch-conflicts-hook.sh
Sourcing python-remove-bin-bytecode-hook.sh
Sourcing pypa-build-hook
Using pypaBuildPhase
Sourcing python-runtime-deps-check-hook
nixpkgs on  samuela/scanpy
❯ nix-build -A python3Packages.anndata
this derivation will be built:
/nix/store/kgligwzymlzjy7wvlb9jc9wv0wl3i198-python3.12-anndata-0.11.4.drv
building '/nix/store/kgligwzymlzjy7wvlb9jc9wv0wl3i198-python3.12-anndata-0.11.4.drv'...
Sourcing python-remove-tests-dir-hook
Sourcing python-catch-conflicts-hook.sh
Sourcing python-remove-bin-bytecode-hook.sh
Sourcing pypa-build-hook
// This config is in the KDL format: https://kdl.dev
// "/-" comments out the following node.
// Check the wiki for a full description of the configuration:
// https://github.com/YaLTeR/niri/wiki/Configuration:-Overview
// See https://github.com/YaLTeR/niri/wiki/Application-Issues#electron-applications
environment {
ELECTRON_OZONE_PLATFORM_HINT "auto"
}
// This config is in the KDL format: https://kdl.dev
// "/-" comments out the following node.
// Check the wiki for a full description of the configuration:
// https://github.com/YaLTeR/niri/wiki/Configuration:-Overview
// See https://github.com/YaLTeR/niri/wiki/Application-Issues#electron-applications
environment {
ELECTRON_OZONE_PLATFORM_HINT "auto"
}
@samuela
samuela / gist:b0eadb6fc95508f51efd0aaeb4b3e590
Created March 16, 2025 14:08
bazel_7 enableNixHacks build log
nixpkgs on  master on ☁️
󰂃 10% ❯ nix-build -E 'with import <nixpkgs> {}; bazel_7.override { enableNixHacks = true; }'
this derivation will be built:
/nix/store/abzdw0gb1lz10w5rc97y88l3glpfxy0y-bazel-7.4.1.drv
building '/nix/store/abzdw0gb1lz10w5rc97y88l3glpfxy0y-bazel-7.4.1.drv'...
Running phase: unpackPhase
unpacking source archive /nix/store/9dh7hw9x3jw35s0xjb2zinlkh3ckr0yw-bazel-7.4.1-dist.zip
source root is .
Running phase: patchPhase
applying patch /nix/store/bak52cz0p06vsjd6wn0v3k7d8r822nca-java_toolchain.patch
{
"nodes": {
"naersk": {
"inputs": {
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1698420672,
"narHash": "sha256-/TdeHMPRjjdJub7p7+w55vyABrsJlt5QkznPYy55vKA=",
"owner": "nix-community",
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1711624657,
"narHash": "sha256-IViG6BKCJY/I6oRNfAANf/QitYylepQSCzgam0TF+bs=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "72c6ed328aa4e5d9151b1a512f6ad83aca7529fa",
"type": "github"
root@6b49c5e222e1:/workspaces/sshenanigans# cargo build
Compiling openssl-sys v0.9.101
Compiling anyhow v1.0.81
Compiling clap_builder v4.5.2
Compiling serde_json v1.0.114
Compiling rustix v0.38.31
Compiling sharded-slab v0.1.7
Compiling lock_api v0.4.11
Compiling tracing v0.1.40
Compiling flate2 v1.0.28
#! /usr/bin/env nix-shell
#! nix-shell -i python3 -p python3 python3Packages.boto3
import boto3
import json
def fetch_cloudtrail_events():
# NOTE: this is us-west-2 specific!
client = boto3.client(
"cloudtrail",