Show HN: MacMind – A transformer neural network in HyperCard on a 1989 Macintosh
TL;DR Highlight
A 1,216-parameter transformer written purely in HyperTalk learned bit-reversal on a Mac SE/30.
Who Should Read
A backend developer who uses LLM APIs but wants to see how attention and backprop actually work.
Core Mechanics
- A transformer built only in HyperTalk
- It is a single-layer, single-head model with 1,216 parameters.
- Embeddings, positional encoding, self-attention, cross-entropy loss, backprop and SGD are all HyperTalk.
- There is no compiled code and no external library.
- The task is the bit-reversal permutation
- It is the first step of the FFT (Fast Fourier Transform).
- Input [3, 7, 1, 9, 5, 2, 8, 4] must become [3, 5, 1, 8, 7, 2, 9, 4].
- The model is never told the rule and learns from random examples.
- The attention map shows the FFT butterfly pattern
- Positions 0, 2, 5 and 7 attend to themselves.
- Positions 1 and 4, and positions 3 and 6, attend to each other.
- The author says this matches the structure Cooley and Tukey published in 1965.
- The architecture is minimal
- It has embeddings, Q/K/V/output projections and a residual connection (adds the input back to the output).
- There is no feed-forward block and no layer norm.
- Weights are stored as comma-separated numbers in hidden HyperCard fields.
- It was trained overnight on real hardware
- Training ran on a Macintosh SE/30 with System 7.6.1 and was also tested in Basilisk II.
- Each step takes several seconds and convergence (~1,000 steps) takes hours.
- The bottleneck is the HyperTalk interpreter, not the host CPU.
- HyperCard 2.0 or later is required
- HyperCard 1.x evaluates arithmetic left to right (2 + 3 * 4 = 20).
- That would silently corrupt matrix multiplies and gradients.
- Standard operator precedence arrived in 2.0.
Community Reactions
- Running it in HyperCard Simulator
- One commenter said it works in HyperCard Simulator if there are no XCMDs and shared an import of the trained stack.
- A question about missing source
- One commenter noted the repo only shows the Python validator, not the HyperCard stack or .img build code.
- Using it as an emulator benchmark
- One commenter is debugging an ARM64 JIT for BasiliskII and plans to use this as a new benchmark.
- A view on old hardware
- One commenter said it shows progress is also clever math and algorithms, not only bigger GPUs.
How to Apply
- Run validate.py today
- Run pip install numpy, then python3 validate.py.
- Confirm the same architecture converges to 100% accuracy.
- Print the attention matrix yourself
- Modify validate.py to print the 8x8 attention weights.
- Check that positions 0, 2, 5 and 7 attend to themselves.
- Use it as a team teaching model
- Walk through the 1,216-parameter table in a study session to explain forward and backward flow.
- Have people change the learning rate or task and compare loss curves.
Try It
pip install numpy
git clone https://github.com/SeanFDZ/macmind
cd macmind
python3 validate.pyTerminology
Related Papers
Gemini 4 Neon is the new #1 on the Models Engineering Index
Gemini 4 Neon ranks first on the Models Engineering Index with 68.0, combining multiple benchmarks.
LLMs can read and write executables byte by byte from a hex dump
Given only a hex dump and no tools, an LLM analyzed, patched and wrote working executables.
Claude was trained on protein sequences at scale
Next-amino-acid tests on obscure proteins show only the latest Claude models predict them
Remembered as Brief: Stored Preferences SilentlyRemove Decision-Critical Information
A stored 'keep it short' preference silently drops warnings; listing must-know points first restores content.
All AI-generated code should be Open Source
A blog argues AI-generated code should be open source; most HN commenters disagreed.
What thousands of conversations look like inside a language model
Mapping Qwen3-1.7B states showed Chinese sitting apart from English, while German and Croatian overlapped it.
AI, activity, and outcomes in software engineering
AI sped up writing code, but shipping speed did not rise as much, says a talk
LLMs Play Zachtronics' TIS-100
16 LLMs played TIS-100 and set 133 new Pareto frontier points across 18 puzzles