I Ching, cast in Hazel
Hazel activities › ancient oracles · source on GitHub · hazeljs on npmAsk a question, then cast six lines, one at a time, from the bottom up: by three coins, or by dividing the yarrow stalks. Each line is cast by a Hazel program, shown beside the reading as text, or in Hazel's own editor at the press of a button; the page only passes it random numbers and draws what comes back. Change the program and the page builds it again. While it has an error or a hole, the page's own JavaScript casts instead, and each line says which did.
A new reading
This app needs JavaScript, and a page served over http (python3 -m http.server, then localhost).
The vocabulary every module sees (i-ching/rules/preamble.hz). The listings are text, highlighted, until Edit in Hazel opens each in Hazel's own editor (about 7 MB each), where Ctrl+click on a name, or F12, goes to its definition; Show as text goes back, your edits kept.
loading preamble.hz…
loading Lines.hz…
loading Casting.hz…
loading Book.hz…
(cast = Casting.cast, reading = Reading.reading).loading Reading.hz…
hazeljs-examples · versions · Apache 2.0 (code), CC BY 4.0 (words) · by Matthew Hammer · an example for hazeljs