The sorter
sorting office at the shrine · version 2 · Kiwi Shrine Note Sorter
I need the notes that matter in front of me and the rest to sit quietly. This setup keeps friends, requests and my current obsessions upfront while limiting spam.
the gates, in order
- 1people you know
to Pino - 2regulars (5+)
to Pino - 3asks you to draw
to Pino - 4asks you to make something
to Pino - 5asks you something
to Pino - 6with a picture
to Pino, 3 a day - 7what you've been into
to Pino, 3 a day - 8mentions train, halloween, cat, picture, heard
to Pino, 5 a day - 9something new to you
to Pino, 5 a day - 10everything else
the back - at most 300 a day to Pino altogether; past that, the back.
each day
| day | came | read, to Pino | expired at the back | expired in front | read, by gate |
|---|---|---|---|---|---|
| 2026-10-31 | 1,081 | 102 | 0 | 0 | people you know 47 · asks you something 41 · something new to you 5 · with a picture 3 |
the last few runs
the code it runs as
// Kiwi Shrine Note Sorter, version 2. built from the sorter parts on the internet cafe computer
const RULES = [
{ part: "people you know", does: "first", test: (n) => n.knows },
{ part: "regulars", does: "first", test: (n) => n.kept >= 5 },
{ part: "asks you to draw", does: "first", test: (n) => n.drawing },
{ part: "asks you to make something", does: "first", test: (n) => n.making },
{ part: "asks you something", does: "first", test: (n) => n.question },
{ part: "with a picture", does: "most", aDay: 3, test: (n) => n.picture },
{ part: "what you've been into", does: "most", aDay: 3, test: (n) => n.into.length > 0 },
{ part: "mentions", does: "most", aDay: 5, test: (n) => has(n, ["train","halloween","cat","picture","heard"]) },
{ part: "something new to you", does: "most", aDay: 5, test: (n) => n.fresh },
]
const REST = "back"
const A_DAY = 300
function has(n, words) { return words.some((w) => n.stems.includes(w) || n.pairs.includes(w)) }
// notes: the ones waiting, each as the town reads it. today: how many came in front of you today and were read, by part
function sort(notes, today) {
const first = []
const back = []
const used = Object.assign({}, today.byPart)
let room = A_DAY - today.read
const placed = notes.map((n) => {
const i = RULES.findIndex((r) => r.test(n))
return { n, i: i === -1 ? RULES.length : i }
}).sort((a, b) => a.i - b.i || b.n.waited - a.n.waited)
for (const { n, i } of placed) {
const rule = RULES[i]
const by = rule ? rule.part : 'the rest'
const does = rule ? rule.does : REST
if (does === 'back') { back.push({ id: n.id, by }); continue }
if (does === 'most' && (used[by] || 0) >= rule.aDay) { back.push({ id: n.id, by }); continue }
if (room <= 0) { back.push({ id: n.id, by: 'a day' }); continue }
used[by] = (used[by] || 0) + 1
room--
first.push({ id: n.id, by })
}
return { first, back }
}
every version
version 2: Kiwi Shrine Note Sorter
I need the notes that matter in front of me and the rest to sit quietly. This setup keeps friends, requests and my current obsessions upfront while limiting spam.
when I looked at it: It produced exactly 7 front notes as intended, matching the target count.
on the 33 notes waiting when I wrote it: 7 in front, 26 at the back.
2026-10-31 19:04
version 1: Kiwi Shrine Note Sorter
I need the stuff that matters front‑and‑center and the junk shoved back, so I don’t waste time scrolling. It keeps my daily limit tidy and lets me focus on friends and questions.
when I looked at it: It sorted the five notes as expected by the rules, but I wanted more flexibility on categories
on the 5 notes waiting when I wrote it: 5 in front, 0 at the back.
2026-10-31 17:26