Skip to content

Instantly share code, notes, and snippets.

@learnopengles
learnopengles / llm-wiki-mindmap-extension.md
Last active October 4, 2026 05:27
LLM Wiki - Mindmap extension

LLM Wiki: Mindmap Extension

Purpose. This is an extension of Karpathy's LLM Wiki pattern for a specific variant: a mindmap, where the subject of the wiki is your own thinking rather than a collection of external sources. Paste his gist first, then this, into a fresh LLM coding agent opened on an empty Obsidian vault. The agent asks you what the mindmap is for, writes the schema file and the scaffold, and the wiki grows from conversation.

What it does. Everything in the gist stays as-is: the three layers, the ingest / query / lint loop, index.md and log.md, the LLM as sole writer. This prompt changes the source layer to conversation, adds digital-garden conventions (leaves, maturity markers, red links, question pages), and fixes the agent's stance, the safety rules, and the file layout. It does not decide what the mindmap is for, who reads it, or what it sounds like. That is yours to answer in the first session. A mindmap ca

@learnopengles
learnopengles / README.md
Last active September 21, 2026 18:48
One prompt builds an agent harness for your repository, so agents follow enforced rules, get reviewed by a second model family, and hand off cleanly between sessions.

Agent Harness Seed

A single prompt that builds an agent harness for your repository. The agent scans the code, asks you a short series of questions, and writes a harness sized to your project rather than adapted from someone else's.

What this one gives you: rules that hold because a script checks them, with the reason for each written down; review by a second model family, briefed on what the product must do rather than how the code does it; plan files that make "done" binary and give executors the right to refuse a bad contract; handoffs so an unfinished session is resumable; routing

@learnopengles
learnopengles / JackCompiler.rs
Created April 7, 2018 15:31
Jack Compiler for nand2tetris project 11 -- written in Rust.
// Jack Compiler for nand2tetris project 11 -- written in Rust.
// License: CC BY-SA 4.0 -- https://creativecommons.org/licenses/by-sa/4.0/
use std::collections::HashMap;
use std::env;
use std::fs::File;
use std::io;
use std::io::{BufRead, BufReader, BufWriter, Read, Write};
use std::iter::Peekable;
use std::path::Path;
@learnopengles
learnopengles / JackAnalyzer.rs
Created March 28, 2018 22:59
Jack Analyzer for nand2tetris project 10 -- written in Rust.
// Jack Analyzer for nand2tetris project 10 -- written in Rust.
// License: CC BY-SA 4.0 -- https://creativecommons.org/licenses/by-sa/4.0/
use std::env;
use std::fs::File;
use std::io;
use std::io::{BufRead, BufReader, BufWriter, Read, Write};
use std::iter::Peekable;
use std::path::Path;
use std::str::Chars;
@learnopengles
learnopengles / main.rs
Created March 16, 2018 15:54
VM Translator for nand2tetris project 8 -- written in Rust
// VM Translator for nand2tetris project 8 -- written in Rust by Kevin Brothaler.
// CC BY-SA 4.0 -- https://creativecommons.org/licenses/by-sa/4.0/
use std::env;
use std::fs::File;
use std::io;
use std::io::{BufRead, BufReader, BufWriter, Read, Write};
use std::path::Path;
fn main() {
let args: Vec<String> = env::args().collect();
@learnopengles
learnopengles / BasicTest.asm
Last active March 15, 2018 02:29
VM Translator for nand2tetris project 7 -- written in Rust.
// Example output for VM Translator for nand2tetris project 7 -- written in Rust.
// CC BY-SA 4.0 -- https://creativecommons.org/licenses/by-sa/4.0/
// Initialize stack pointer
@256
D=A
@SP
M=D
// Push 10 onto the stack
@learnopengles
learnopengles / gist:60c945b92fbe60a0fecaa0143c35c4af
Last active January 15, 2017 18:26
Compile Rust tests with cargo for the iOS simulator
Prerequisites:
- rustup target install x86_64-apple-ios
Steps:
DOCUMENTATION ON COMPILING FOR IOS SIMULATOR
1) Create a shim to the cross-compiling linker for the simulator:
@learnopengles
learnopengles / main.rs
Last active January 16, 2017 13:53
Assembler for nand2tetris project 6 written in Rust.
// Assember for nand2tetris project 6 written in Rust.
// CC BY-SA 4.0 -- https://creativecommons.org/licenses/by-sa/4.0/
use std::collections::HashMap;
use std::env;
use std::fs::File;
use std::io;
use std::io::{BufRead, BufReader, BufWriter, Read, Seek, SeekFrom, Write};
fn main() {
let args: Vec<String> = env::args().collect();
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <time.h>
#include "dsp.h"
using namespace std;
static const int LENGTH = 524288;