Top Hacker News stories, distilled to 17 syllables.
Fetches the front page from the Hacker News API and asks a local Llama 3.2 1B model to write a haiku about each story. Everything runs on-device — no API keys, no inference calls leaving your machine.
user@MacBookAir ~ % haiku-news
parse: load the model metadata from disk file.
initFromConfig: load the model from disk file and apply lora adapter, if any.
Herding syllables into lines...
▄▄▄ ▄▄▄ ▄▄ ▄▄▄ ▄▄▄ ▄▄▄
█▀██ ██ ██▄ ██▀ █▀██ ██
██ ██ ███▄ ██ ██ ██ ▀▀ ▄▄
██████ ██ ▀█▄██ ██████ ▄▀▀█▄ ██ ██ ▄█▀ ██ ██ ▄██▀█
██ ██ ██ ▀██ ██ ██ ▄█▀██ ██ ████ ██ ██ ▀███▄
▀██▀ ▀██▄ ▀██▀ ██ ▀██▀ ▀██▄▄▀█▄██▄██▄██ ▀█▄▄▀██▀██▄▄██▀
Top Hacker News stories, distilled to 17 syllables
# 1
Tailscale's frantic dance
Face AI intrusion fails
Shadows claim the night
https://tailscale.com/blog/hugging-face-intrusion
════════════════════════════════════════════════════════════════
# 2
Silent metal ride
Stopping at each floor with grace
Secrets in the lift
https://john.fun/elevators
════════════════════════════════════════════════════════════════
# 3
Digital realm's dark
Shadows dance upon my screen
Moonlight in the code
https://github.com/yc-software/qm
════════════════════════════════════════════════════════════════
# 4
Container types flow
Generic collection delight
Creativity shines
https://github.com/golang/go/issues/80590
════════════════════════════════════════════════════════════════
# 5
Blurred edges of life
Darkness creeps with hesitant steps
Lost in twisted path
https://lcamtuf.substack.com/p/severance
════════════════════════════════════════════════════════════════
npm i -g pear
pear install pear://n848ydyj6escctzngf8spq4o6hs78c7ku95bogbmq9amhxptzz4y
haiku-newsThe first run downloads Llama-3.2-1B-Instruct-Q4_0.gguf and shows a progress bar:
Downloading model ██████████████░░░░░░░░░░░░ 35%
Later runs skip straight to generating.
npm run makeProduces out/make/haiku-news via bare-build --standalone. On macOS, set
MAC_CODESIGN_IDENTITY to sign, and KEYCHAIN_PROFILE to also notarize.
index.mjs is the whole program:
loadModelpulls the model through the QVAC SDK model registry, reporting download progress toprintProgress.topItems(5)reads the top stories from the Hacker News Firebase API.- Each story title becomes a prompt; the five completions stream in parallel and are accumulated token by token.
unloadModelfrees the weights, thenprintHaikusrenders the results.
npm run lint # prettier --check + lunte
npm run format # prettier --write + lunte --fix