Skip to content

Instantly share code, notes, and snippets.

View perigrin's full-sized avatar

Chris Prather perigrin

View GitHub Profile
@perigrin
perigrin / 2026-03-24-son-ir-design.md
Created March 24, 2026 22:11
SoN: Sea of Nodes IR for Perl 5 - Design Document

SoN: Sea of Nodes IR for Perl 5

Context

Perl 5's compiled optree serves simultaneously as AST, IR, and execution format. This coupling prevents global optimization -- the peephole optimizer can only see adjacent ops, data flow is implicit in stack operations, and there is no opportunity for dead code elimination, common subexpression elimination, or loop-invariant code motion across basic blocks.

@perigrin
perigrin / git-chain-prd.md
Last active March 15, 2026 09:28
git-chain PRD: local-first git-native Critical Chain project management CLI
title git-chain PRD v3
tags
projects
ideas
description Product requirements document for git-chain, a local-first git-native dependency-driven development workflow scheduler with telemetry

git-chain: Product Requirements Document

Overview

@perigrin
perigrin / bash_strict_mode.md
Created June 7, 2023 02:12 — forked from mohanpedala/bash_strict_mode.md
set -e, -u, -o, -x pipefail explanation
Azato,
We've all played ages of video games and 'classic' RPGs (with the classic fantasy tropes) where we're taught that fighting the monster is a matter of just doing enough papercuts that it falls down while living long enough to do so (the WoW or Final Fantasy model).
But in Tolkien Smaug wasted a village, killed thousands, but was killed by a single arrow placed correctly in a missing scale.
Think of these fights more in terms of literature and pacing instead of the classic 'they have X hp and we have to swing Y times with Q hits to drop it'. The problem in this context is that there is no accounting for fiction, this is a mechanical solution (a simulation) of a sword doing consistent damage, and scaling monster HP to allow for the same tool (swing) to be applied to every problem (monster).
I had this problem. I did a quadruple take when I read that a DRAGON has 16 hit points (a level 1 ranger can do that on a max damage roll). However let me describe a fight to you and maybe this will give you the
/*
A simple logging module based upon the advice of Dave Cheney
* https://dave.cheney.net/2015/11/05/lets-talk-about-logging
* https://dave.cheney.net/2017/01/23/the-package-level-logger-anti-pattern
*/
package log
import (
"io"
#!/usr/bin/env perl
use 5.10;
use POSIX qw(floor);
use DateTime;
=for example
var generateUUID = (function() {
"use strict";

Knot Tying

We're gonna talk about the basics of Knot Tying and learn a Square Knot, a Sheet Bend, and an Overhad Knot.

Materials

For this class you will need:

  1. a piece of rope about 24in long
@perigrin
perigrin / lxd-profile.gist
Last active September 5, 2019 19:04
Cloud Init Example w/ Docker
config:
security.nesting: "true"
user.user-data: |
#cloud-config
package_upgrade: true
users:
- name: perigrin
sudo: ['ALL=(ALL) NOPASSWD:ALL']
groups: sudo,admin
shell: /bin/bash