Skip to content

Instantly share code, notes, and snippets.

View iitalics's full-sized avatar

Milo iitalics

  • Somerville, MA
View GitHub Profile
xxx $ yarn run --help
Multiple commands match your selection:
0. yarn run
1. yarn run [--inspect] [--inspect-brk] [-T,--top-level] [-B,--binaries-only] <scriptName> ...
Run again with -h=<index> to see the longer details of any of those commands.
xxx $ yarn run --help -h=1
Unknown Syntax Error: Unsupported option name ("--help").
#include <inttypes.h>
#include <math.h>
#include <pthread.h>
#include <stdio.h>
#include <unistd.h>
#include <jack/jack.h>
#include <jack/types.h>
static pthread_mutex_t io_mx;
GC: 0:min3 @ 152,693K(+65,683K); free 11,733K(-38,877K) 81ms @ 3491
FPS dropped: 10.162107446423168
GC: 0:MAJ4 @ 149,144K(+96,376K); free 14,272K(-14,272K) 95ms @ 3652
FPS dropped: 8.99780766307428
#lang racket/base
(require
racket/class
racket/gui/base
racket/draw)
(define lim-x0 10.0)
(define lim-y0 10.0)
(define lim-x1 340.0)
$ apt update
Reading package lists... Done
E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)
E: Unable to lock directory /var/lib/apt/lists/
W: Problem unlinking the file /var/cache/apt/pkgcache.bin - RemoveCaches (13: Permission denied)
W: Problem unlinking the file /var/cache/apt/srcpkgcache.bin - RemoveCaches (13: Permission denied)
(* This module, [S], defines a very minimal syntax tree that we are going to try to
convert into A-normal form (ANF). ANF is an intermediate form that makes control flow
explicit and lifts intermediate values into named variables. We are going to start with
a very basic lowering algorithm and gradually refine it until it is robust. *)
module S = struct
type name = string [@@deriving show]
type t =
| Var of name
| Int of int
use std::io::BufRead;
use std::{fmt, mem};
fn main() {
let a = Alloc::new();
let input = "(meow () (1 . (2 3)) ( x y z . w ))";
let mut rd = std::io::Cursor::new(input);
let mut p = Parser::new(&a);
while let Some(t) = token(&mut rd).unwrap() {
p.token(t).unwrap();
$ cat main.ml
let alt x y =
let rec seq1 () =
Seq.Cons (x, seq2)
and seq2 () =
Seq.Cons (y, seq1)
in seq1
$ ocamlopt -dclambda main.ml
@iitalics
iitalics / Sexp.ml
Last active October 3, 2024 15:15
s-expression lexing and parsing, interleaved using delimiter effects
open Effect.Shallow
(* sexp *)
type sexp =
| Atom of string
| List of sexp list
let rec pp_sexp ppf = function
| Atom s -> Format.pp_print_string ppf s
/*
[package]
name = "basic-midi-synth-alsa"
version = "0.1.0"
edition = "2021"
[dependencies]
anyhow = {version = "1.0"}
tracing = {version = "0.1"}
tracing-subscriber = {version = "0.3", features = ["env-filter"]}