Skip to content

Instantly share code, notes, and snippets.

View zellyn's full-sized avatar

Zellyn Hunter zellyn

View GitHub Profile
@zellyn
zellyn / conversation.md
Created August 26, 2024 19:58
Conversation with Claude about terminating processes in the terminal. Converted to markdown using Simon Willison's excellent tool: https://observablehq.com/@simonw/convert-claude-json-to-markdown

Terminating Processes in the Terminal: Ctrl-C vs Ctrl-\

human (Aug 26, 2024, 03:54 PM)

When in my terminal, I've noticed that ctrl-\ seems to often work when ctrl-c won't. I used to use ctrl-z and then kill %+, but ctrl-\ appears to work in the same places that ctrl-z does. Can you explain to me what's going on? Why do they differ in when they work, and what signals are actually getting sent?

assistant (Aug 26, 2024, 03:54 PM)

You've made an astute observation about different ways to terminate processes in a Unix-like terminal. Let's break down what's happening with each of these commands and signals:

@zellyn
zellyn / linear-types-claude-chat.md
Last active February 21, 2025 14:04
Chat with Claude about Linear Types

Understanding Linear Types: A Conceptual Explanation

human (Sep 3, 2024, 04:36 PM)

Can you ELI5 Linear Types? I'm particularly interested in:

  • a brief overview, detailed enough that I can "grok" them
  • examples of languages that have successfully implemented them and gained some real-world usage (if any)
  • how they might be incorporated into an otherwise simple language like Go or Hare

My current difficulty level is that I have a good conceptual overview-level understanding of Rust lifetimes, but haven't used them in anger. I deeply get the need, though: a C++ function that doesn't have a comment specifying what happens to ownership of the arguments is terrifying ๐Ÿ™‚

@zellyn
zellyn / crdts-category-theory.md
Created September 3, 2024 20:53
Discussion with Claude about CRDTs and category theory

๐Ÿ’ฌ Is a CvRDT basically a semigro...

human (Sep 3, 2024, 01:35 PM)

Is a CvRDT basically a semigroup?

assistant (Sep 3, 2024, 01:35 PM)

That's an insightful question that touches on the intersection of distributed systems and abstract algebra. Let's break this down:

@zellyn
zellyn / vagrant.org
Created April 3, 2010 18:25
Setting up a CentOS 5.4 base box for Vagrant
@zellyn
zellyn / gist:abcba33aeb1161923753f65780b620e1
Created July 12, 2023 12:33
bundlewrap fails to add a lock
bundlepi๐Ÿš ~/gh/bundlepi main *+ bw run lenovo id
โ€บ lenovo uid=0(root) gid=0(root) groups=0(root)
i โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
i โ”‚ node โ”‚ return code โ”‚ time โ”‚
i โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
i โ”‚ lenovo โ”‚ 0 โ”‚ 0.219s โ”‚
i โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
bundlepi๐Ÿš ~/gh/bundlepi main *+ bw -d lock add lenovo
[2023-07-12T08:31:19.257140] [DEBUG] invocation: /Users/zellyn/gh/bundlepi/.hermit/python/bin/bw -d lock add lenovo
[2023-07-12T08:31:19.327744] [DEBUG] node lenovo gets its dummy attribute from: default
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@zellyn
zellyn / README.md
Created October 31, 2012 16:01
Even more xkcd-style graphs, with SVG filters
@zellyn
zellyn / clear the scrollback on MacOS
Created March 9, 2017 14:10
My watchloop script, and helper functions
alias csb="clear && printf '\e[3J'"
rm -rf OpenEmulator-zellyn
git clone https://github.com/zellyn/OpenEmulator-OSX.git OpenEmulator-zellyn
cd OpenEmulator-zellyn
git checkout iie
git submodule update --init --recursive
open OpenEmulator.xcodeproj
package main
import (
"crypto/cipher"
"crypto/des"
"encoding/binary"
"fmt"
)
var des3 cipher.Block