interplane-forge
INTERPLANE Forge
Brought by drakestapleton
interplane-forge / galaxy / page.om
| 1 | om2 |
| 2 | note galaxy.om: the INTERPLANE front page as one seeded Omega program. No scripts are emitted. |
| 3 | note stdin "css" prints the stylesheet. Otherwise stdin is tab-separated public facts, one per line: |
| 4 | note K key value a headline figure |
| 5 | note S name open done24 a hive cell (a factory station), at most 10 |
| 6 | note R name tier a project star, tier core, rest or tail |
| 7 | note M repo head note a merged head |
| 8 | note stdout is the page. Every field is HTML-escaped. Exit 0 on success, 1 when stdout fails. |
| 9 | note Star positions use the golden angle: cos and sin of pi(3 - sqrt 5), Wolfram, 17 digits. |
| 10 | const GCP f64 0.73736887807831990 |
| 11 | const GS f64 0.67549029426152364 |
| 12 | global ib uchar 65536 |
| 13 | global ibl ulong 1 |
| 14 | note caps: a name prints at most FCAP input bytes, a merge note NCAP; at most 400 stars, 12 merges, |
| 15 | note 10 cells and 400 dots per ring are drawn. README "Limits" carries the output bound these give. |
| 16 | const FCAP ulong 64 |
| 17 | const NCAP ulong 160 |
| 18 | global ob uchar 1048576 |
| 19 | text tcore "core" |
| 20 | text trest "rest" |
| 21 | text ttail "tail" |
| 22 | global obl ulong 1 |
| 23 | text tamp "&" |
| 24 | text tlt "<" |
| 25 | text tgt ">" |
| 26 | text tquo """ |
| 27 | text tapo "'" |
| 28 | text tna "not read" |
| 29 | note retired-network words: a fed field holding one of them is not printed as fed (rterm) |
| 30 | text rw1 "radicle" |
| 31 | text rw2 "heartwood" |
| 32 | text rw3 "rad:z" |
| 33 | text rw4 "/rad/" |
| 34 | text rw5 "rad clone" |
| 35 | text rw6 "rad init" |
| 36 | text rw7 "rad sync" |
| 37 | text rw8 "rad id" |
| 38 | text rw9 "rad patch" |
| 39 | text rw10 "rad auth" |
| 40 | text tretd "Retired" |
| 41 | text kdel "delivered" |
| 42 | text kver "verdicts" |
| 43 | text kapp "approved" |
| 44 | text kgpu "gpuw" |
| 45 | text h01 "<!doctype html><html lang='en' data-theme='dark'><head><meta charset='utf-8'><meta name='viewport' content='width=device-width,initial-scale=1'>" |
| 46 | text h02 "<title>INTERPLANE: the home for space junk</title><link rel='icon' type='image/svg+xml' href='/public/favicon.svg'><link rel='stylesheet' href='/assets/tokens.css'><link rel='stylesheet' href='/assets/galaxy.css'></head><body>\n" |
| 47 | text h03 "<header class='top'><a class='wm' href='/'>INTERPLANE</a><nav><a href='#galaxy'>Galaxy</a><a href='/explore'>Explore</a><a href='/index.html'>Protocol</a>" |
| 48 | text h04 "<a href='#proof'>Proof</a></nav><span class='live'><i class='dot'></i>Read from the Spark " |
| 49 | text h04b "</span></header>\n<main>\n" |
| 50 | text h05 "<div class='side'><section class='hero'><p class='eyebrow'>The home for space junk</p><h1>Bring the build that almost worked.</h1>" |
| 51 | text h06 "<p class='sub'>Half-finished experiments, abandoned repos, AI slop: all welcome. Interplane checks each piece against evidence on its exact revision, keeps what passes and shows the proof, so the next builder can reuse it. No proof. Not done.</p>" |
| 52 | text h06b "<p class='acts'><a class='btn' href='/explore'>Explore the junkyard</a><a class='btn ghost' href='/forge/'>What runs today</a></p>" |
| 53 | text h07 "<p class='claim'>Running here now: Sovereign Intelligence. NVIDIA hardware compatible. CUDA not required. No plugins, and no scripts on this page.</p>" |
| 54 | text h07b "<p class='scope'>Proven on the DGX Spark GB10. Other chips: not run.</p><pre class='cmd'>curl -fsSL https://www.aienos.com/si | sh</pre>\n<dl class='stats'>" |
| 55 | text h08 "<div><dt>Delivered</dt><dd>" |
| 56 | text h09 "</dd></div><div><dt>Verdicts, 24 h</dt><dd>" |
| 57 | text h10 "</dd></div><div><dt>Approved, to merge</dt><dd>" |
| 58 | text h11 "</dd></div><div><dt>GPU, watts</dt><dd>" |
| 59 | text h12 "</dd></div></dl></section>\n" |
| 60 | text h13 "<svg id='galaxy' viewBox='0 0 1200 800' preserveAspectRatio='xMidYMid slice' role='img' aria-label='The hive at the centre, every project a star around it'>\n" |
| 61 | text h14 "<g transform='translate(600 400)'>\n<circle class='orb' r='295'/><circle class='orb' r='380'/><circle class='orb' r='465'/>\n<g class='spin'>\n" |
| 62 | text h15 "</g>\n<g class='stars'>\n" |
| 63 | text h16 "</g>\n</g>\n<g class='comb'>\n" |
| 64 | text h17 "</g>\n</svg>\n" |
| 65 | text h18 "<aside id='proof'><p class='eyebrow'>Proof</p><h2>Latest merges</h2>" |
| 66 | text h19 "<p class='sub'>Each line is a merged commit. Compare the hash with your copy.</p><ol class='chain'>\n" |
| 67 | text h20 "</ol></aside></div>\n" |
| 68 | text h21 "<p class='legend'>Each cell: jobs in work now, then delivered in 24 h. <i class='k ka'></i><b>" |
| 69 | text h22 "</b> unverified, in review, inner ring <i class='k kb'></i><b>" |
| 70 | text h23 "</b> passed review, waiting to merge, second ring <i class='k kc'></i><b>" |
| 71 | text h24 "</b> public projects, one star each</p>\n</main></body></html>\n" |
| 72 | text f1 "</g>\n<g class='flow fa'>\n" |
| 73 | text f2 "</g>\n<g class='flow fb'>\n" |
| 74 | text o1 "<circle class='pl' cx='" |
| 75 | text o2 "' r='3'/>\n" |
| 76 | text kwai "waiting" |
| 77 | text kasof "asof" |
| 78 | text d1 "<circle class='d" |
| 79 | text d2 "' cx='" |
| 80 | text d3 "' cy='" |
| 81 | text d4 "' r='1'/>\n" |
| 82 | text s1 "<a href='/drakestapleton/" |
| 83 | text s2 "'><circle class='st " |
| 84 | text s3 "' r='" |
| 85 | text s4 "'><title>" |
| 86 | text s5 "</title></circle></a>\n" |
| 87 | text s6 "<text class='lb' x='" |
| 88 | text s6e "<text class='lb le' x='" |
| 89 | text s7 "' y='" |
| 90 | text s8 "'>" |
| 91 | text s9 "</text>\n" |
| 92 | text c1 "<g class='cell' transform='translate(" |
| 93 | text c2 ")'><polygon class='hx l" |
| 94 | text c3 "' points='0,-64 55,-32 55,32 0,64 -55,32 -55,-32'/><text class='cn' y='-22'>" |
| 95 | text c4 "</text><text class='cn' y='-8'>" |
| 96 | text c5 "</text><text class='cv' y='18'>" |
| 97 | text c6 "</text><text class='cs' y='36'>+" |
| 98 | text c7 " in 24 h</text></g>\n" |
| 99 | text m1 "<li><a href='/drakestapleton/" |
| 100 | text m2 "</a><code>" |
| 101 | text m3 "</code><span>" |
| 102 | text m4 "</span></li>\n" |
| 103 | text q01 "*{box-sizing:border-box}html,body{margin:0;height:100%;background:var(--bg-primary);color:var(--text-primary);font:14px/20px var(--font-sans,Inter,system-ui,sans-serif)}\n" |
| 104 | text q02 "a{color:var(--accent);text-decoration:none}a:hover{color:var(--accent-hover)}a:focus-visible{outline:2px solid var(--focus-ring);outline-offset:2px}\n" |
| 105 | text q03 ".top{position:fixed;inset:0 0 auto 0;z-index:3;display:flex;align-items:center;gap:24px;padding:12px 32px;background:var(--bg-header);border-bottom:1px solid var(--border)}\n" |
| 106 | text q04 ".wm{font-weight:700;letter-spacing:.3em;color:var(--text-primary)}.top nav{display:flex;gap:20px;flex:1}\n" |
| 107 | text q05 ".live{font:12px/16px var(--font-mono,ui-monospace,monospace);color:var(--text-secondary)}\n" |
| 108 | text q06 ".dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--live-dot);box-shadow:var(--glow-live);margin-right:8px;animation:tw 2s ease-in-out infinite}\n" |
| 109 | text q07 "#galaxy{position:fixed;left:472px;top:46px;width:calc(100% - 472px);height:calc(100% - 46px);z-index:0}\n" |
| 110 | text q08 ".side{position:fixed;left:32px;top:62px;bottom:16px;width:424px;z-index:2;display:flex;flex-direction:column;gap:16px;overflow:auto}\n" |
| 111 | text q08b ".hero,#proof{background:var(--bg-card);border:1px solid var(--border);border-radius:16px;padding:24px;flex:none}\n" |
| 112 | text q08c ".claim{margin:0 0 4px;font-weight:600}.acts{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 16px}.btn{display:inline-block;padding:8px 16px;border-radius:8px;background:var(--accent-fill);color:var(--on-accent-fill);font-weight:600}\n" |
| 113 | text q08d ".btn:hover{background:var(--accent-fill-hover);color:var(--on-accent-fill)}.ghost,.ghost:hover{background:none;border:1px solid var(--border-strong);color:var(--text-primary)}\n" |
| 114 | text q09 ".legend{position:fixed;left:472px;right:0;bottom:0;margin:0;padding:8px 16px;text-align:center;font-size:12px;color:var(--text-secondary);z-index:2;background:var(--bg-header);border-top:1px solid var(--border)}\n" |
| 115 | text q09b ".legend b{color:var(--text-primary);font-family:var(--font-mono,ui-monospace,monospace);margin:0 4px}.k{display:inline-block;width:8px;height:8px;border-radius:50%;margin-left:16px}\n" |
| 116 | text q09c ".ka{background:var(--danger)}.kb{background:var(--warning)}.kc{background:var(--accent)}\n" |
| 117 | text q09d ".fa{animation:spin 180s linear infinite}.fb{animation:spin 320s linear infinite reverse}.fa .pl{fill:var(--danger)}.fb .pl{fill:var(--warning)}\n" |
| 118 | text q10 ".eyebrow{margin:0 0 8px;font-size:12px;font-weight:600;letter-spacing:.2em;text-transform:uppercase;color:var(--accent)}\n" |
| 119 | text q11 "h1{margin:0 0 12px;font-size:36px;line-height:40px;font-weight:700}h2{margin:0 0 8px;font-size:18px;line-height:28px;font-weight:600}\n" |
| 120 | text q12 ".sub{margin:0 0 12px;color:var(--text-secondary)}.scope{margin:0 0 16px;font-size:12px;color:var(--warning)}\n" |
| 121 | text q13 ".cmd{margin:0 0 16px;padding:12px;border:1px solid var(--border);border-radius:8px;background:var(--fill-input);font:12px/16px var(--font-mono,ui-monospace,monospace);overflow:auto}\n" |
| 122 | text q14 ".stats{display:grid;grid-template-columns:repeat(4,auto);gap:12px;margin:0}.stats dt{font-size:11px;line-height:16px;color:var(--text-secondary)}\n" |
| 123 | text q15 ".stats dd{margin:0;font:600 20px/28px var(--font-mono,ui-monospace,monospace)}\n" |
| 124 | text q16 ".chain{list-style:none;margin:0;padding:0}.chain li{display:grid;grid-template-columns:1fr auto;gap:2px 8px;padding:8px 0;border-top:1px solid var(--border-faint)}\n" |
| 125 | text q17 ".chain code{font:12px/16px var(--font-mono,ui-monospace,monospace);color:var(--success)}.chain span{grid-column:1/3;font-size:12px;color:var(--text-secondary)}\n" |
| 126 | text q18 ".orb{fill:none;stroke:var(--accent);stroke-opacity:.12}.spin{animation:spin 900s linear infinite}\n" |
| 127 | text q19 ".d0,.d1,.d2{fill:var(--text-primary)}.d0{opacity:.3}.d1{opacity:.45;animation:tw 7s ease-in-out infinite}.d2{opacity:.6;animation:tw 11s ease-in-out infinite}\n" |
| 128 | text q20 ".st{transform-box:fill-box;transform-origin:center;transition:opacity .15s}.st.core{fill:var(--text-primary)}.st.rest{fill:var(--accent)}.st.tail{fill:var(--text-secondary)}\n" |
| 129 | text q21 ".stars a:hover .st,.stars a:focus .st{transform:scale(2)}.lb{fill:var(--text-tertiary);font:11px var(--font-mono,ui-monospace,monospace)}.le{text-anchor:end}\n" |
| 130 | text q22 ".hx{stroke:var(--border-strong);stroke-width:1}.l0{fill:var(--heat-0)}.l1{fill:var(--heat-1)}.l2{fill:var(--heat-2)}.l3{fill:var(--heat-3)}.l4{fill:var(--heat-4)}\n" |
| 131 | text q23 ".l2,.l3,.l4{animation:br 4s ease-in-out infinite}.comb text{text-anchor:middle;fill:var(--text-primary)}\n" |
| 132 | text q24 ".cn{font:600 11px var(--font-sans,Inter,system-ui,sans-serif)}.cv{font:600 20px var(--font-mono,ui-monospace,monospace)}\n" |
| 133 | text q25 ".comb .cs{font:10px var(--font-mono,ui-monospace,monospace);fill:var(--text-secondary)}\n" |
| 134 | text q26 "@keyframes spin{to{transform:rotate(360deg)}}@keyframes tw{50%{opacity:.25}}@keyframes br{50%{fill-opacity:.6}}\n" |
| 135 | text q27 "@media (max-width:1000px){main{display:flex;flex-direction:column}.side{display:contents}.hero{order:1;margin:72px 16px 0}#galaxy{order:2;position:relative;left:0;top:0;width:100%;height:80vh}\n" |
| 136 | text q27b ".legend{order:3;position:static;padding:12px}#proof{order:4;margin:16px;flex:none}.top{gap:12px;padding:12px 16px}.top nav{gap:12px;overflow-x:auto}.live{display:none}}\n" |
| 137 | text q28 "@media (prefers-reduced-motion:reduce){*{animation:none!important}}\n" |
| 138 | note ---- output buffer |
| 139 | fn emb c uchar to void |
| 140 | o = get obl 0 |
| 141 | put ob o c |
| 142 | put obl 0 add o 1 |
| 143 | end |
| 144 | fn em t view uchar * to void |
| 145 | n = len t |
| 146 | o = get obl 0 |
| 147 | i = ulong 0 |
| 148 | while lt i n bound 65536 |
| 149 | put ob add o i get t i |
| 150 | i = add i 1 |
| 151 | end |
| 152 | put obl 0 add o n |
| 153 | end |
| 154 | fn emn v ulong to void |
| 155 | d = new uchar 20 0 |
| 156 | n = ulong 0 |
| 157 | x = v |
| 158 | if eq x 0 |
| 159 | emb 48 |
| 160 | end |
| 161 | while gt x 0 bound 20 |
| 162 | put d n uchar add 48 rem x 10 |
| 163 | x = div x 10 |
| 164 | n = add n 1 |
| 165 | end |
| 166 | while gt n 0 bound 20 |
| 167 | n = sub n 1 |
| 168 | emb get d n |
| 169 | end |
| 170 | end |
| 171 | fn emi v long to void |
| 172 | if lt v 0 |
| 173 | emb 45 |
| 174 | emn ulong neg v |
| 175 | else |
| 176 | emn ulong v |
| 177 | end |
| 178 | end |
| 179 | note emfc: at most cap bytes of the input a..b, HTML-escaped; a cut never splits a UTF-8 character |
| 180 | fn emfc a ulong b ulong cap ulong to void |
| 181 | if le b a |
| 182 | ret |
| 183 | end |
| 184 | e = b |
| 185 | if gt sub b a cap |
| 186 | e = add a cap |
| 187 | k = ulong 0 |
| 188 | while lt k 3 bound 3 |
| 189 | if gt e a |
| 190 | u = get ib e |
| 191 | if ge u 128 |
| 192 | if lt u 192 |
| 193 | e = sub e 1 |
| 194 | end |
| 195 | end |
| 196 | end |
| 197 | k = add k 1 |
| 198 | end |
| 199 | end |
| 200 | i = a |
| 201 | while lt i e bound 160 |
| 202 | c = get ib i |
| 203 | if eq c 38 |
| 204 | em tamp |
| 205 | else |
| 206 | if eq c 60 |
| 207 | em tlt |
| 208 | else |
| 209 | if eq c 62 |
| 210 | em tgt |
| 211 | else |
| 212 | if eq c 34 |
| 213 | em tquo |
| 214 | else |
| 215 | if eq c 39 |
| 216 | em tapo |
| 217 | else |
| 218 | emb c |
| 219 | end |
| 220 | end |
| 221 | end |
| 222 | end |
| 223 | end |
| 224 | i = add i 1 |
| 225 | end |
| 226 | end |
| 227 | fn emf a ulong b ulong to void |
| 228 | emfc a b FCAP |
| 229 | end |
| 230 | fn emfn a ulong b ulong to void |
| 231 | emfc a b NCAP |
| 232 | end |
| 233 | note ---- input scanning: every index stays inside 0..ibl |
| 234 | fn find a ulong e ulong c uchar to ulong |
| 235 | i = a |
| 236 | while lt i e bound 65536 |
| 237 | if eq get ib i c |
| 238 | ret i |
| 239 | end |
| 240 | i = add i 1 |
| 241 | end |
| 242 | ret e |
| 243 | end |
| 244 | fn eol a ulong to ulong |
| 245 | ret find a get ibl 0 10 |
| 246 | end |
| 247 | note nextl: start of the first line at or after p whose first byte is ty, or ibl |
| 248 | fn nextl p ulong ty uchar to ulong |
| 249 | lim = get ibl 0 |
| 250 | s = p |
| 251 | while lt s lim bound 65536 |
| 252 | if eq get ib s ty |
| 253 | ret s |
| 254 | end |
| 255 | s = add eol s 1 |
| 256 | end |
| 257 | ret lim |
| 258 | end |
| 259 | note fld: start of field k (0 based) of the line s..e; e when the line has fewer fields |
| 260 | fn fld s ulong e ulong k ulong to ulong |
| 261 | p = s |
| 262 | j = ulong 0 |
| 263 | while lt j k bound 16 |
| 264 | p = find p e 9 |
| 265 | if lt p e |
| 266 | p = add p 1 |
| 267 | end |
| 268 | j = add j 1 |
| 269 | end |
| 270 | ret p |
| 271 | end |
| 272 | note rhas: does ib[a, b) hold t (t lowercase ASCII), compared without case |
| 273 | fn rhas a ulong b ulong t view uchar * to bool |
| 274 | n = len t |
| 275 | if lt sub b a n |
| 276 | ret false |
| 277 | end |
| 278 | if le b a |
| 279 | ret false |
| 280 | end |
| 281 | m = add sub sub b a n 1 |
| 282 | i = ulong 0 |
| 283 | while lt i m bound 65536 |
| 284 | k = ulong 0 |
| 285 | ok = true |
| 286 | while lt k n bound 64 |
| 287 | c = get ib add add a i k |
| 288 | if and ge c 65 le c 90 |
| 289 | c = uchar add c 32 |
| 290 | end |
| 291 | if ne c get t k |
| 292 | ok = false |
| 293 | k = n |
| 294 | else |
| 295 | k = add k 1 |
| 296 | end |
| 297 | end |
| 298 | if ok |
| 299 | ret true |
| 300 | end |
| 301 | i = add i 1 |
| 302 | end |
| 303 | ret false |
| 304 | end |
| 305 | note rterm: the fed field ib[a, b) names the network Interplane no longer uses (Radicle was removed |
| 306 | note on 2026-11-14); the page then prints a plain replacement instead of the fed words |
| 307 | fn rterm a ulong b ulong to bool |
| 308 | if le b a |
| 309 | ret false |
| 310 | end |
| 311 | if or rhas a b rw1 or rhas a b rw2 or rhas a b rw3 rhas a b rw4 |
| 312 | ret true |
| 313 | end |
| 314 | if or rhas a b rw5 or rhas a b rw6 or rhas a b rw7 rhas a b rw8 |
| 315 | ret true |
| 316 | end |
| 317 | ret or rhas a b rw9 rhas a b rw10 |
| 318 | end |
| 319 | fn pnum a ulong b ulong to ulong |
| 320 | v = ulong 0 |
| 321 | i = a |
| 322 | while lt i b bound 65536 |
| 323 | c = get ib i |
| 324 | if ge c 48 |
| 325 | if le c 57 |
| 326 | v = add mul v 10 ulong sub c 48 |
| 327 | end |
| 328 | end |
| 329 | i = add i 1 |
| 330 | end |
| 331 | ret v |
| 332 | end |
| 333 | fn feq a ulong b ulong t view uchar * to bool |
| 334 | n = len t |
| 335 | if ne sub b a n |
| 336 | ret false |
| 337 | end |
| 338 | i = ulong 0 |
| 339 | while lt i n bound 64 |
| 340 | if ne get ib add a i get t i |
| 341 | ret false |
| 342 | end |
| 343 | i = add i 1 |
| 344 | end |
| 345 | ret true |
| 346 | end |
| 347 | note kpos: start of the value of headline key t, or ibl |
| 348 | fn kpos t view uchar * to ulong |
| 349 | lim = get ibl 0 |
| 350 | s = nextl 0 75 |
| 351 | while lt s lim bound 65536 |
| 352 | e = eol s |
| 353 | a = fld s e 1 |
| 354 | if feq a find a e 9 t |
| 355 | ret fld s e 2 |
| 356 | end |
| 357 | s = nextl add e 1 75 |
| 358 | end |
| 359 | ret lim |
| 360 | end |
| 361 | note emk: the value of headline key t, or "not read" |
| 362 | fn emk t view uchar * to void |
| 363 | v = kpos t |
| 364 | if lt v get ibl 0 |
| 365 | emf v find v eol v 9 |
| 366 | else |
| 367 | em tna |
| 368 | end |
| 369 | end |
| 370 | fn knum t view uchar * to ulong |
| 371 | v = kpos t |
| 372 | if lt v get ibl 0 |
| 373 | ret pnum v find v eol v 9 |
| 374 | end |
| 375 | ret 0 |
| 376 | end |
| 377 | note cnt: how many input lines start with ty |
| 378 | fn cnt ty uchar to ulong |
| 379 | lim = get ibl 0 |
| 380 | n = ulong 0 |
| 381 | s = nextl 0 ty |
| 382 | while lt s lim bound 65536 |
| 383 | n = add n 1 |
| 384 | s = nextl add eol s 1 ty |
| 385 | end |
| 386 | ret n |
| 387 | end |
| 388 | note cntr: the R lines (stars) the page draws: those whose name passes rterm |
| 389 | fn cntr to ulong |
| 390 | lim = get ibl 0 |
| 391 | n = ulong 0 |
| 392 | s = nextl 0 82 |
| 393 | while lt s lim bound 65536 |
| 394 | e = eol s |
| 395 | a = fld s e 1 |
| 396 | if not rterm a find a e 9 |
| 397 | n = add n 1 |
| 398 | end |
| 399 | s = nextl add e 1 82 |
| 400 | end |
| 401 | ret n |
| 402 | end |
| 403 | note orbit: n dots (at most 400) on the circle of radius r, spread by the golden angle |
| 404 | fn orbit n ulong r ulong to void |
| 405 | x = 0.0f64 |
| 406 | y = 1.0f64 |
| 407 | rf = f64 r |
| 408 | m = n |
| 409 | if gt m 400 |
| 410 | m = ulong 400 |
| 411 | end |
| 412 | k = ulong 0 |
| 413 | while lt k m bound 400 |
| 414 | em o1 |
| 415 | emi long mul rf x |
| 416 | em d3 |
| 417 | emi long mul rf y |
| 418 | em o2 |
| 419 | t = neg add mul x GCP mul y GS |
| 420 | y = sub mul x GS mul y GCP |
| 421 | x = t |
| 422 | k = add k 1 |
| 423 | end |
| 424 | end |
| 425 | note ---- the galaxy |
| 426 | fn dustpt k ulong x f64 y f64 to void |
| 427 | r = mul 620.0f64 fsqrt div f64 add k 1 160.0f64 |
| 428 | em d1 |
| 429 | emn rem k 3 |
| 430 | em d2 |
| 431 | emi long mul r x |
| 432 | em d3 |
| 433 | emi long mul r y |
| 434 | em d4 |
| 435 | end |
| 436 | fn dust to void |
| 437 | x = 1.0f64 |
| 438 | y = 0.0f64 |
| 439 | k = ulong 0 |
| 440 | while lt k 160 bound 160 |
| 441 | dustpt k x y |
| 442 | t = neg add mul x GCP mul y GS |
| 443 | y = sub mul x GS mul y GCP |
| 444 | x = t |
| 445 | k = add k 1 |
| 446 | end |
| 447 | end |
| 448 | fn slabel a ulong b ulong px long py long to void |
| 449 | note a star left of the centre carries its label on its left, away from the hive |
| 450 | if lt px 0 |
| 451 | em s6e |
| 452 | emi sub px 9 |
| 453 | else |
| 454 | em s6 |
| 455 | emi add px 9 |
| 456 | end |
| 457 | em s7 |
| 458 | emi add py 4 |
| 459 | em s8 |
| 460 | emf a b |
| 461 | em s9 |
| 462 | end |
| 463 | note tier letter to ring: core 0, rest 1, tail 2 |
| 464 | fn sring c ulong e ulong to ulong |
| 465 | if lt c e |
| 466 | if eq get ib c 99 |
| 467 | ret 0 |
| 468 | end |
| 469 | if eq get ib c 116 |
| 470 | ret 2 |
| 471 | end |
| 472 | end |
| 473 | ret 1 |
| 474 | end |
| 475 | fn srad ring ulong k ulong to f64 |
| 476 | u = add mul ring 85 rem mul k 37 50 |
| 477 | ret f64 add u 270 |
| 478 | end |
| 479 | fn sdraw s ulong e ulong ring ulong px long py long to void |
| 480 | a = fld s e 1 |
| 481 | b = find a e 9 |
| 482 | em s1 |
| 483 | emf a b |
| 484 | em s2 |
| 485 | if eq ring 0 |
| 486 | em tcore |
| 487 | else |
| 488 | if eq ring 1 |
| 489 | em trest |
| 490 | else |
| 491 | em ttail |
| 492 | end |
| 493 | end |
| 494 | em d2 |
| 495 | emi px |
| 496 | em d3 |
| 497 | emi py |
| 498 | em s3 |
| 499 | emn sub 5 ring |
| 500 | em s4 |
| 501 | emf a b |
| 502 | em s5 |
| 503 | if eq ring 0 |
| 504 | slabel a b px py |
| 505 | end |
| 506 | end |
| 507 | fn star s ulong e ulong k ulong x f64 y f64 to void |
| 508 | ring = sring fld s e 2 e |
| 509 | r = srad ring k |
| 510 | sdraw s e ring long mul r x long mul r y |
| 511 | end |
| 512 | fn stars to void |
| 513 | lim = get ibl 0 |
| 514 | x = 1.0f64 |
| 515 | y = 0.0f64 |
| 516 | k = ulong 0 |
| 517 | s = nextl 0 82 |
| 518 | while lt s lim bound 400 |
| 519 | e = eol s |
| 520 | a = fld s e 1 |
| 521 | if not rterm a find a e 9 |
| 522 | star s e k x y |
| 523 | t = neg add mul x GCP mul y GS |
| 524 | y = sub mul x GS mul y GCP |
| 525 | x = t |
| 526 | k = add k 1 |
| 527 | end |
| 528 | s = nextl add e 1 82 |
| 529 | if ge k 400 |
| 530 | s = lim |
| 531 | end |
| 532 | end |
| 533 | end |
| 534 | note cell j of the honeycomb, rows of 3, 4 and 3 |
| 535 | fn cellat j ulong lv ulong to void |
| 536 | row = ulong 0 |
| 537 | col = j |
| 538 | if ge j 3 |
| 539 | row = ulong 1 |
| 540 | col = sub j 3 |
| 541 | end |
| 542 | if ge j 7 |
| 543 | row = ulong 2 |
| 544 | col = sub j 7 |
| 545 | end |
| 546 | cx = add 484 mul col 116 |
| 547 | if eq row 1 |
| 548 | cx = add 426 mul col 116 |
| 549 | end |
| 550 | em c1 |
| 551 | emn cx |
| 552 | emb 32 |
| 553 | emn add 300 mul row 100 |
| 554 | em c2 |
| 555 | emn lv |
| 556 | em c3 |
| 557 | end |
| 558 | fn cell s ulong e ulong j ulong to void |
| 559 | a = fld s e 1 |
| 560 | b = find a e 9 |
| 561 | sp = find a b 32 |
| 562 | o = fld s e 2 |
| 563 | n = pnum o find o e 9 |
| 564 | lv = div add n 9 10 |
| 565 | if gt lv 4 |
| 566 | lv = ulong 4 |
| 567 | end |
| 568 | cellat j lv |
| 569 | if rterm a sp |
| 570 | em tretd |
| 571 | else |
| 572 | emf a sp |
| 573 | end |
| 574 | em c4 |
| 575 | if lt sp b |
| 576 | if rterm add sp 1 b |
| 577 | em tretd |
| 578 | else |
| 579 | emf add sp 1 b |
| 580 | end |
| 581 | end |
| 582 | em c5 |
| 583 | emn n |
| 584 | em c6 |
| 585 | d = fld s e 3 |
| 586 | emn pnum d find d e 9 |
| 587 | em c7 |
| 588 | end |
| 589 | fn comb to void |
| 590 | lim = get ibl 0 |
| 591 | j = ulong 0 |
| 592 | s = nextl 0 83 |
| 593 | while lt s lim bound 10 |
| 594 | e = eol s |
| 595 | cell s e j |
| 596 | j = add j 1 |
| 597 | s = nextl add e 1 83 |
| 598 | if ge j 10 |
| 599 | s = lim |
| 600 | end |
| 601 | end |
| 602 | end |
| 603 | fn merges to void |
| 604 | lim = get ibl 0 |
| 605 | n = ulong 0 |
| 606 | s = nextl 0 77 |
| 607 | while lt s lim bound 12 |
| 608 | e = eol s |
| 609 | a = fld s e 1 |
| 610 | b = find a e 9 |
| 611 | h = fld s e 2 |
| 612 | t = fld s e 3 |
| 613 | em m1 |
| 614 | emf a b |
| 615 | em s8 |
| 616 | emf a b |
| 617 | em m2 |
| 618 | emf h find h e 9 |
| 619 | em m3 |
| 620 | te = find t e 9 |
| 621 | if not rterm t te |
| 622 | emfn t te |
| 623 | end |
| 624 | em m4 |
| 625 | n = add n 1 |
| 626 | s = nextl add e 1 77 |
| 627 | if ge n 12 |
| 628 | s = lim |
| 629 | end |
| 630 | end |
| 631 | end |
| 632 | fn css to void |
| 633 | em q01 |
| 634 | em q02 |
| 635 | em q03 |
| 636 | em q04 |
| 637 | em q05 |
| 638 | em q06 |
| 639 | em q07 |
| 640 | em q08 |
| 641 | em q09 |
| 642 | em q10 |
| 643 | em q11 |
| 644 | em q12 |
| 645 | em q13 |
| 646 | em q14 |
| 647 | em q15 |
| 648 | em q16 |
| 649 | em q17 |
| 650 | em q18 |
| 651 | em q19 |
| 652 | em q20 |
| 653 | em q21 |
| 654 | em q22 |
| 655 | em q08b |
| 656 | em q09b |
| 657 | em q09c |
| 658 | em q09d |
| 659 | em q08c |
| 660 | em q08d |
| 661 | em q23 |
| 662 | em q24 |
| 663 | em q25 |
| 664 | em q26 |
| 665 | em q27 |
| 666 | em q27b |
| 667 | em q28 |
| 668 | end |
| 669 | fn page to void |
| 670 | em h01 |
| 671 | em h02 |
| 672 | em h03 |
| 673 | em h04 |
| 674 | emk kasof |
| 675 | em h04b |
| 676 | em h05 |
| 677 | em h06 |
| 678 | em h06b |
| 679 | em h07 |
| 680 | em h07b |
| 681 | em h08 |
| 682 | emk kdel |
| 683 | em h09 |
| 684 | emk kver |
| 685 | em h10 |
| 686 | emk kapp |
| 687 | em h11 |
| 688 | emk kgpu |
| 689 | em h12 |
| 690 | em h18 |
| 691 | em h19 |
| 692 | merges |
| 693 | em h20 |
| 694 | em h13 |
| 695 | em h14 |
| 696 | dust |
| 697 | em f1 |
| 698 | orbit knum kwai 295 |
| 699 | em f2 |
| 700 | orbit knum kapp 380 |
| 701 | em h15 |
| 702 | stars |
| 703 | em h16 |
| 704 | comb |
| 705 | em h17 |
| 706 | em h21 |
| 707 | emn knum kwai |
| 708 | em h22 |
| 709 | emn knum kapp |
| 710 | em h23 |
| 711 | emn cntr |
| 712 | em h24 |
| 713 | end |