grimoire
E-00

grimoire

A book of study for what you find on the internet. Read the source, write it down, cast the code, all in one window.

View on GitHubmacOS 13+ · plain files · no account

Gather your sources

Blogs, talks and papers go into one reading list, by URL or as a PDF from disk. The list is INDEX.md, a Markdown task list with #tags. Search it, filter it, tick things off.

my-vault/INDEX.mdclick a box
  • # Grimoire
  • [Attention Is All You Need](arxiv.org/abs/1706.03762) #ml #papers
  • [Async Rust, chapter 3](rust-lang.github.io/async-book) #rust #async
  • [Crafting Interpreters](crafting-interpreters.pdf) #compilers #books
  • <!-- lines it doesn't recognise are kept verbatim -->

Study beside the source

Open an item and the article, video or PDF sits on the left, your notes on the right. Sites that refuse to be framed still load, and PDFs get an outline, search and resume-where-you-left-off.

Attention Is All You Needarxiv.org · paper · #ml

Cast the code

Every item has a sandbox. Try the snippet you just read, watch the output stream in, and paste it back into your notes. Runs are numbered and timed. The ones that fail are struck through, never erased.

Sandboxattention/sandbox/main.py
import numpy as np

# one query attending over four keys
q = k = np.eye(4)
w = np.exp(q @ k.T / np.sqrt(d))
print((w / w.sum(1, keepdims=True)).round(2)[0])

No runs yet.

Pythonpython3RustrustcGogoCccJavajavaJavaScriptnode

Keep the book

There is no database and no account. Your vault is a folder: readable on GitHub, editable in any editor, synced with git. Clone it on another machine and it opens as it was.

my-vault/
my-vault/
├── INDEX.md                   # the reading list
├── .grimoire/
│   ├── config.json            # preferences, committed
│   └── local/                 # this machine only
├── attention-is-all-you-need/
│   ├── NOTES.md
│   └── sandbox/main.py
└── crafting-interpreters/
    ├── NOTES.md
    └── crafting-interpreters.pdf
$ git add . && git commit -m "notes on attention"
$ git push

Open the book.

grimoire is in early design. v1 targets macOS 13+, with Linux and Windows after. Read the plan, follow along, or lend a hand.