Skip to content

Instantly share code, notes, and snippets.

View aadah's full-sized avatar
🚲

Abdi-Hakin Dirie aadah

🚲
View GitHub Profile
@aadah
aadah / sketch.js
Last active September 13, 2024 01:21
attractor-based algorithmic art (p5.js)
const SEED = 42;
const NEGATE = true;
const WIDTH = 1000;
const HEIGHT = 1000;
const SCALE = 4;
const MAX_ALPHA = 1;
const MIN_ALPHA = 0;
@aadah
aadah / lisp.jl
Last active March 7, 2024 05:19
Lisp parser: Takes some generic Lisp code and returns a simple AST. Can parse floats, ints, and non-multiline strings.
using ArgParse
PREFIX = "STR:"
RGX_NUM = r"^-?\d+\.?\d*$"
RGX_STR = r"\".*?\""
gen_placeholder(str) = "$PREFIX$(hash(str))"
function identify_strings(code)