Skip to content

Instantly share code, notes, and snippets.

View pdarragh's full-sized avatar

Pierce Darragh pdarragh

View GitHub Profile
@pdarragh
pdarragh / better_io.py
Last active February 3, 2021 20:35
Simple Python I/O using argparse
import argparse
from pathlib import Path
"""
Run this by doing:
$ python3 better_io.py /path/to/file
This version uses the `type` parameter of the `add_argument` function to pass
@pdarragh
pdarragh / examples.ml
Created September 16, 2021 17:48
OCaml Examples from Pierce's Office Hours (2021-09-16)
type color =
| Red
| Green
| Blue
| Black
type row = color list
type screen = row list
@pdarragh
pdarragh / papers.md
Last active February 23, 2025 02:04
Approachable PL Papers for Undergrads

Approachable PL Papers for Undergrads

On September 28, 2021, I asked on Twitter:

PL Twitter:

you get to recommend one published PL paper for an undergrad to read with oversight by someone experienced. the paper should be interesting, approachable, and (mostly) self-contained.

what paper do you recommend?

@pdarragh
pdarragh / _cookies.md
Last active December 14, 2021 01:35
Cookie Recipes
@pdarragh
pdarragh / x86_racket_on_apple_silicon.md
Created December 4, 2022 22:32
Instructions for installing Racket and nasm in an x86 instance of Homebrew.

Finally got around to setting up an x86 instance of Homebrew via Rosetta to install x86 Racket. Here's all the steps I took.

First, ensure Rosetta 2 is installed:

$ /usr/sbin/softwareupdate --install-rosetta

Then install x86-64 Homebrew. However, I've also kept the regular Apple Silicon Homebrew. Turns out they require different path prefixes anyway, so the regular one is at /opt/homebrew while the x86 one is at /usr/loca/homebrew. To install the x86 one, I did: