Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
export ARCH=arm64
if [ $(whoami) != root ]; then
echo "You should probably be running me as root!"
export RUN_AS_ROOT=sudo
@cellularmitosis
cellularmitosis / Makefile
Last active February 21, 2024 18:05
Compilation speed: tcc vs gcc (sudoku.c)
a.out: sudoku.c
gcc -std=c89 -Wall -Werror -Os sudoku.c -o a.out
ccbench:
@cat /proc/cpuinfo | grep 'model name' | head -n1
@tcc -v || true
@gcc --version | head -n1
@echo
@tcc sudoku.c
time tcc sudoku.c 2>&1 && mv a.out a.out.tcc
@merijn
merijn / MyState.hs
Last active January 15, 2021 19:20
MyState homework
data MyState s a = MyState (s -> (a, s))
get :: MyState s s
get = undefined
put :: s -> MyState s ()
put = undefined
modify :: (s -> s) -> MyState s ()
modify = undefined