Skip to content

Instantly share code, notes, and snippets.

Plugins

Prefer LSP over Grep/Glob/Read for code navigation:

  • goToDefinition / goToImplementation to jump to source
  • findReferences to see all usages across the codebase
  • workspaceSymbol to find where something is defined
  • documentSymbol to list all symbols in a file
  • hover for type info without reading the file
  • incomingCalls / outgoingCalls for call hierarchy
for f in /opt/homebrew/opt/toilet/share/figlet/*.[tf]lf; do f=${f##*/}; toilet -t -f $f ${f%.*}; done
================================================================================
memref explained through C
================================================================================
Docs: https://mlir.llvm.org/docs/Dialects/MemRef/
SUMMARY
-------
memref = fat pointer (data pointer + shape + strides)
memref.cast = erase/assert static size. Same pointer, same data.
# /// script
# dependencies = ["exo-lang", "numpy"]
# ///
from __future__ import annotations
import ctypes
import subprocess
import tempfile
from pathlib import Path
# /// script
# dependencies = ["exo-lang"]
# ///
from __future__ import annotations
import ctypes
import subprocess
import tempfile
from pathlib import Path
@sueszli
sueszli / hello-docker.asm
Last active February 21, 2026 23:47
x86 backend for xdsl
; $ docker run --rm --platform linux/amd64 -v "$PWD":/app -w /app alpine sh -c "apk add nasm binutils && nasm -f elf64 hello-docker.asm -o hello.o && ld hello.o -o hello && ./hello"
global _start
section .text
_start:
mov rax, 1 ; write(
mov rdi, 1 ; STDOUT_FILENO,
mov rsi, msg ; "Hello, world!\n",
@sueszli
sueszli / run.py
Last active February 17, 2026 13:24
waymark quickstart
# /// script
# requires-python = "==3.12"
# dependencies = ["waymark"]
#
# [tool.uv.sources]
# waymark = { path = "python", editable = true }
# ///
import asyncio
import os
@sueszli
sueszli / demo.py
Last active February 16, 2026 16:43
# /// script
# dependencies = [
# "pytest",
# "pytest-asyncio",
# "waymark",
# ]
# ///
import asyncio
import os
# /// script
# dependencies = [
# "pytest",
# "pytest-asyncio",
# "waymark",
# ]
# ///
import asyncio
import sys
#!/bin/bash
set -euox pipefail
CONTAINER=pg
docker rm -f $CONTAINER 2>/dev/null || true
docker run -d --name $CONTAINER --rm -e POSTGRES_PASSWORD=pass postgres:17-alpine >/dev/null
until docker exec $CONTAINER pg_isready >/dev/null 2>&1; do :; done; sleep 1
# run stuff
docker exec $CONTAINER psql -U postgres -c "CREATE TABLE fruits (fruit TEXT);"