LingSys
↓ 0 downloadsYour machine's memory, GPU, motherboard and network, drawn and played in the Ling design system: LingSys, a small build for USB liquid-cooler displays, LingNet for IPv4/IPv6, DNS and packets, and a LingOS edition. 64-bit and 32-bit Windows builds included.
Keywords system-monitor, visualization, network, ipv6, gpu, lcd, lingos, ling
lingfu install LingSysCode / Files (48)
hatchmem.ling
# ══════════════════════════════════════════════════════════════════════════════
# HatchMEM: the machine's RAM drawn and played in the Ling design system.
#
# Line work only: circles, squares, Daemon tiles, Chesilin rings, crosshatch.
# circle = a read (a page comes in) square = a write (a page goes out)
# Seven memory categories take the seven Ling hues. The same numbers drive an
# additive synth: seven categories x four partials plus four shimmer partials,
# 32 audio_tone slots in all, and a short chime for every read and write.
#
# Keys: 1-4 or TAB view | A auto-cycle | H hud | M mute | ESC quit
# Run: ling run hatchmem.ling (run.ps1 starts the sampler for live data first)
# Args: full (borderless fullscreen) | sim (ignore mem.snap) | shot (save a screenshot per view, quit)
# ══════════════════════════════════════════════════════════════════════════════
bind TAU = 6.283185307179586
bind HUE = [357.0, 28.0, 46.0, 140.0, 215.0, 247.0, 285.0]
bind CAT_NAME = ["KERNEL", "STANDBY", "DATA", "MODIFIED", "MAPPED", "COMPRESSED", "FREE"]
bind CAT_LET = "ALBCKFM"
bind ANG1 = [0.785, 0.52, 1.05, 0.0, 2.09, 1.31, 0.26]
bind ORDER = [0, 2, 4, 5, 3, 1, 6]
bind RATIO = [1.0, 1.5, 2.0, 2.25, 3.0, 3.75, 4.5]
bind READ_W = [0.15, 0.9, 0.5, 0.0, 0.8, 0.2, 0.0]
bind WRITE_W = [0.1, 0.0, 0.7, 1.0, 0.2, 0.5, 0.0]
bind VIEW_NAME = ["RINGS", "TILES", "ORBITS", "WEAVE"]
# state list Z, built once per frame and handed to the views and the synth
bind Z_T = 0
bind Z_ROT = 1
bind Z_HS = 2
bind Z_SAT = 3
bind Z_W = 4
bind Z_H = 5
bind Z_CATS = 6
bind Z_TOTAL = 7
bind Z_ACT = 8
bind Z_RD = 9
bind Z_WR = 10
bind Z_FLT = 11
bind Z_EV = 12
bind Z_NAME = 13
bind Z_WS = 14
bind Z_PRIV = 15
bind Z_IOR = 16
bind Z_IOW = 17
bind Z_HIST = 18
bind Z_USED = 19
bind Z_ENERGY = 20
bind Z_HIL = 21
bind Z_LIVE = 22
# ---- BEGIN GLYPHS ----
# generated by tools/gen_glyphs.py from the Ling design system bundle; do not edit by hand
bind DAEMON_CH = "!#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~"
bind DAEMON = [
[212,699,[[0,611,6,577,26,548,54,529,88,523,122,529,150,548,170,577,176,611,170,645,150,674,122,693,88,699,54,693,26,674,6,645],[212,0,133,368,65,368,88,0]]],
[729,751,[[393,1,294,2,235,205,293,1],[172,420,206,304,173,420],[76,751,144,518,77,751],[634,0,535,1,500,120,534,0],[317,750,385,518,318,750],[487,508,387,508,410,430,510,430],[247,508,147,508,169,430,269,430],[147,508,0,508,0,430,169,430],[387,508,247,508,269,430,410,430],[672,430,672,508,487,508,510,430],[550,293,450,293,472,215,572,215],[309,293,209,293,232,215,332,215],[209,293,48,293,48,215,232,215],[450,293,309,293,332,215,472,215],[720,215,720,293,550,293,572,215],[535,1,634,1,575,205,729,205,729,303,547,303,513,420,681,420,681,518,485,518,418,750,318,750,387,508,487,508,417,750,318,750,418,750,485,518,681,518,681,420,513,420,547,303,729,303,729,205,575,205,634,1,572,215,472,215,500,120],[447,304,450,293,550,293,510,430,410,430,413,420],[294,2,393,2,332,215,232,215,234,205],[172,420,209,293,309,293,269,430,169,430],[77,751,147,508,247,508,176,751]]],
[500,749,[[400,283,394,192,370,136,351,119,292,103,210,103,151,119,131,136,116,160,101,248,102,333,116,401,151,437,177,446,292,450,351,437,384,401,398,333],[0,286,7,188,16,149,28,115,63,62,85,42,140,14,250,0,356,14,411,40,433,59,470,113,482,146,495,208,500,282,493,380,484,417,473,449,438,498,416,516,361,540,251,551,140,540,110,530,62,498,43,476,16,417,7,380,0,287],[175,279,183,340,190,351,214,363,272,365,301,358,318,340,324,305,318,217,311,206,288,193,230,191,200,198,183,217,176,253],[125,283,128,235,139,198,156,172,180,154,250,140,320,154,344,172,361,198,372,235,375,283,368,348,358,371,326,402,279,414,220,414,174,402,142,371,127,319],[175,285,183,345,190,355,214,364,301,361,318,345,324,311,318,222,311,210,288,195,230,192,200,201,183,222,176,259],[125,283,139,199,156,172,181,155,212,144,251,141,289,144,321,155,344,172,361,199,372,236,375,283,368,348,358,371,327,402,280,414,221,414,174,402,143,371,127,319],[1,30,79,30,79,749,1,749]]],
[569,751,[[50,139,57,77,74,58,88,54,125,51,176,58,193,77,199,113,193,201,186,212,162,224,104,225,74,219,57,201,51,165],[0,144,3,96,14,59,31,32,55,15,87,4,125,1,163,4,195,15,219,32,236,59,247,96,250,144,248,180,233,232,201,263,154,275,95,275,49,263,17,232,2,180],[50,146,57,205,64,215,88,224,176,221,193,205,199,172,193,82,176,61,162,55,104,52,74,61,57,82,51,120],[0,144,3,96,14,59,31,32,55,15,87,4,125,1,163,4,195,15,219,32,236,59,247,96,250,144,248,180,233,232,201,263,154,275,95,275,49,263,17,232,2,180],[369,614,376,552,406,529,465,527,494,534,512,552,518,588,516,660,512,676,494,694,444,701,394,694,376,676,370,640],[319,619,322,571,333,534,350,508,374,490,444,476,482,479,514,490,538,508,555,534,566,571,569,619,562,684,552,707,520,738,473,750,414,750,368,738,336,707,321,655],[369,621,376,680,406,700,494,696,512,680,518,647,512,557,504,544,482,530,423,527,394,536,376,557,370,595],[319,619,322,571,333,534,350,508,374,490,444,476,482,479,514,490,538,508,555,534,566,571,569,619,562,684,552,707,520,738,473,750,414,750,368,738,336,707,321,655],[343,0,443,0,226,750,126,750]]],
[428,583,[[341,582,259,583,18,0,94,0,341,583],[302,283,78,283,80,458,428,280,428,370,0,583,0,208,221,205,220,82,80,88,40,0,303,0]]],
[208,164,[[208,0,193,43,149,107,98,149,68,164,0,164,41,113,70,63,84,0]]],
[445,806,[[405,0,445,2,445,89,387,89,301,104,233,134,194,164,157,200,120,259,93,349,88,403,94,464,112,527,126,558,165,615,218,663,285,698,380,718,445,719,445,806,355,805,284,790,202,761,134,718,73,652,46,605,20,537,0,437,0,368,20,266,38,212,86,134,143,82,209,42,275,18,374,1]]],
[445,806,[[71,1,170,18,236,42,302,82,359,134,394,186,425,266,445,368,445,437,425,537,399,605,372,652,311,718,243,761,162,790,90,805,0,806,0,719,66,718,160,698,228,663,280,615,319,558,333,527,356,433,357,379,337,290,304,220,252,164,212,134,144,104,58,89,0,89,0,2,40,0]]],
[334,334,[[334,138,334,196,0,196,0,138],[138,0,196,0,196,334,138,334],[264,28,306,70,70,306,28,264],[28,70,70,28,306,264,264,306]]],
[445,445,[[445,183,445,261,0,261,0,183],[184,0,262,0,262,445,184,445]]],
[176,266,[[88,0,123,6,151,26,170,54,176,103,165,154,145,190,68,266,0,266,38,220,66,174,37,161,16,140,0,88,6,54,26,26,54,6]]],
[445,78,[[445,0,445,78,0,78,0,0]]],
[176,176,[[0,88,6,54,26,26,54,6,88,0,122,6,150,26,170,54,176,88,170,122,150,150,122,170,88,176,54,170,26,150,6,122]]],
[317,750,[[0,750,217,0,317,0,100,750]]],
[500,745,[[400,370,394,265,370,180,351,147,325,122,292,106,251,101,210,106,177,122,151,147,116,219,101,333,107,476,130,564,150,597,176,623,209,640,250,645,291,640,324,623,350,597,370,564,387,508,399,407],[0,373,4,293,16,222,28,180,63,106,85,75,140,28,173,12,250,0,289,2,353,20,405,52,446,96,475,162,484,201,492,242,500,369,496,450,484,521,457,603,438,638,416,669,360,716,290,742,250,745,209,742,139,716,84,669,62,638,43,603,16,521,4,450,0,374]]],
[456,749,[[23,381,16,585,0,749,68,749,147,381],[356,169,355,112,345,81,281,100,230,106,202,105,113,81,104,96,100,136,102,224,104,238,113,248,179,216,230,209,281,216,345,248,353,238,356,201],[0,172,1,120,12,54,29,24,52,8,83,1,229,5,344,0,390,6,410,15,445,52,454,73,456,106,451,256,435,302,406,320,230,309,72,322,35,314,12,283,1,220,0,173]]],
[456,749,[[23,381,16,585,0,749,68,749,147,381],[356,169,355,112,345,81,281,100,230,106,202,105,113,81,104,96,100,136,102,224,104,238,113,248,179,216,230,209,281,216,345,248,353,238,356,201],[0,172,1,120,12,54,29,24,52,8,83,1,229,5,344,0,390,6,410,15,445,52,454,73,456,106,451,256,435,302,406,320,230,309,72,322,35,314,12,283,1,220,0,173],[177,381,170,585,154,749,222,749,301,381]]],
[456,749,[[23,381,16,585,0,749,68,749,147,381],[331,381,324,585,308,749,376,749,455,381],[356,169,355,112,345,81,281,100,230,106,202,105,113,81,104,96,100,136,102,224,104,238,113,248,179,216,230,209,281,216,345,248,353,238,356,201],[0,172,1,120,12,54,29,24,52,8,83,1,229,5,344,0,390,6,410,15,445,52,454,73,456,106,451,256,435,302,406,320,230,309,72,322,35,314,12,283,1,220,0,173],[177,381,170,585,154,749,222,749,301,381]]],
[455,742,[[23,374,16,578,0,742,68,742,147,374],[0,192,455,192,455,292,0,292],[230,0,286,10,331,38,348,58,368,108,369,191,267,193,266,127,246,105,229,102,212,105,193,128,191,194,90,191,91,117,110,67,147,23,213,1]]],
[455,742,[[23,374,16,578,0,742,68,742,147,374],[0,192,455,192,455,292,0,292],[230,0,286,10,331,38,348,58,368,108,369,191,267,193,266,127,246,105,229,102,212,105,193,128,191,194,90,191,91,117,110,67,147,23,213,1],[177,374,170,578,154,742,222,742,301,374]]],
[455,742,[[23,374,16,578,0,742,68,742,147,374],[0,192,455,192,455,292,0,292],[230,0,286,10,331,38,348,58,368,108,369,191,267,193,266,127,246,105,229,102,212,105,193,128,191,194,90,191,91,117,110,67,147,23,213,1],[331,374,324,578,308,742,376,742,455,374],[177,374,170,578,154,742,222,742,301,374]]],
[455,750,[[23,382,16,586,0,750,68,750,147,382],[0,200,455,200,455,300,0,300],[0,0,455,0,455,100,0,100]]],
[455,750,[[23,382,16,586,0,750,68,750,147,382],[0,200,455,200,455,300,0,300],[0,0,455,0,455,100,0,100],[177,382,170,586,154,750,222,750,301,382]]],
[455,751,[[23,383,16,587,0,751,68,751,147,383],[0,201,455,201,455,301,0,301],[0,1,455,1,455,101,0,101,0,0],[331,383,324,587,308,751,376,751,455,383],[177,383,170,587,154,751,222,751,301,383]]],
[176,399,[[0,311,6,277,26,248,54,229,88,223,122,229,150,248,170,277,176,311,170,345,150,374,122,393,88,399,54,393,26,374,6,345],[0,88,6,54,26,26,54,6,88,0,122,6,150,26,170,54,176,88,170,122,150,150,122,170,88,176,54,170,26,150,6,122]]],
[176,491,[[0,88,6,54,26,26,54,6,88,0,122,6,150,26,170,54,176,88,170,122,150,150,122,170,88,176,54,170,26,150,6,122],[88,225,123,232,151,251,170,280,176,328,165,378,145,415,68,491,0,491,38,445,66,399,37,386,16,364,0,313,6,279,26,250,54,231]]],
[448,804,[[361,2,448,2,448,82,424,191,410,232,364,311,309,364,246,403,327,457,394,542,436,660,447,727,447,804,360,804,356,715,329,617,299,569,234,504,188,478,140,460,88,450,0,448,0,359,82,358,164,338,226,309,296,242,328,188,350,132,358,90,361,0]]],
[455,301,[[0,201,455,201,455,301,0,301],[0,1,455,1,455,101,0,101,0,0]]],
[448,801,[[87,49,98,130,119,186,151,239,195,286,221,306,283,335,365,355,448,356,448,445,359,447,307,458,237,486,191,521,149,567,119,615,92,713,88,801,1,801,1,725,8,672,47,553,79,501,120,455,202,401,158,376,100,328,51,256,23,189,0,80,0,0,87,0]]],
[226,701,[[0,613,6,579,26,551,54,532,88,525,122,532,150,551,170,579,176,613,170,647,150,676,122,695,88,701,54,695,26,676,6,647],[0,132,0,1,49,0,125,9,166,25,196,47,215,74,226,140,213,210,182,286,133,370,65,370,113,245,120,191,118,171,105,144,80,128,43,126]]],
[500,551,[[102,327,112,391,130,423,150,438,194,449,297,450,351,438,386,429,494,380,481,430,463,469,430,507,364,539,293,551,202,551,143,541,107,529,72,507,41,476,17,425,1,327],[178,327,192,354,222,366,297,363,310,354,323,327,466,327,432,357,378,390,351,403,295,416,221,416,184,409,156,389,137,360,127,327],[1,327,7,192,28,116,45,86,83,43,112,25,222,0,292,1,350,12,400,32,438,64,467,105,485,147,500,231,500,283,466,327,323,327,325,257,308,206,270,192,222,194,196,206,178,238,178,327,127,327,127,252,139,201,168,164,217,144,284,145,336,166,361,196,368,217,375,305,398,279,391,183,377,150,355,123,285,103,219,103,152,120,124,147,111,182,101,241,102,327]]],
[500,750,[[166,750,0,0,100,0,250,650,401,0,500,0,333,750]]],
[500,750,[[100,407,400,407,400,97,0,97,0,0,500,0,500,503,200,503,200,750,100,750]]],
[500,750,[[200,653,200,0,300,0,300,653,500,653,500,749,0,750,0,654]]],
[500,750,[[100,318,100,0,200,0,200,221,500,221,500,750,0,750,0,653,400,653,400,318]]],
[500,745,[[0,447,0,303,500,0,500,134,100,377,498,613,498,745]]],
[500,750,[[0,0,500,0,500,100,100,100,100,650,500,650,500,750,0,750,0,726]]],
[500,750,[[0,0,100,0,100,648,400,648,400,0,500,0,500,750,0,750]]],
[500,750,[[0,0,500,0,500,750,0,750,0,650,400,650,400,100,0,100]]],
[500,750,[[166,0,333,0,500,750,400,750,250,100,100,750,0,750]]],
[500,750,[[0,0,500,0,500,100,100,99,100,750,0,750]]],
[500,750,[[100,100,99,750,0,750,0,0,500,0,500,750,400,750,400,100]]],
[500,750,[[400,650,100,650,100,750,0,750,0,0,500,0,500,750,400,750],[400,550,400,100,101,100,100,550]]],
[500,751,[[368,750,0,750,0,650,365,650,400,441,400,425,0,425,0,325,400,325,400,100,0,100,0,0,500,0,500,441,450,751]]],
[500,750,[[350,750,394,425,0,425,0,325,400,325,400,100,0,100,0,0,500,0,500,441,450,750]]],
[500,750,[[500,425,454,421,416,429,385,447,340,503,324,540,306,618,300,750,200,750,189,583,168,520,152,493,107,452,42,429,0,425,0,325,77,307,133,277,161,252,197,194,212,130,210,62,200,0,300,0,314,125,303,203,276,271,230,326,200,348,125,375,166,391,205,418,235,457,250,505,284,406,310,372,340,346,374,330,412,322,500,325,500,375]]],
[500,749,[[415,350,100,350,100,650,500,650,500,749,1,749,0,250,315,250,315,0,415,0,415,340]]],
[500,750,[[100,325,500,325,500,425,100,425,100,750,0,750,0,0,100,0]]],
[500,750,[[300,650,450,650,450,750,50,750,50,650,200,650,200,100,0,100,0,0,500,0,500,100,300,100]]],
[500,750,[[0,0,500,0,500,100,100,100,100,325,500,325,500,750,0,750,0,650,400,650,400,425,0,425]]],
[500,750,[[300,100,300,750,200,750,200,100,0,100,0,0,500,0,500,100]]],
[500,750,[[500,325,500,425,0,750,0,650,400,373,0,100,0,0]]],
[500,750,[[100,100,500,100,500,200,350,200,350,400,250,400,250,200,100,200,100,750,0,750,0,0,100,0]]],
[500,750,[[100,425,100,675,0,675,0,75,100,75,100,326,400,326,400,0,500,0,500,750,400,750,400,425]]],
[500,750,[[0,0,100,0,100,650,200,650,200,0,500,0,500,750,400,750,400,100,300,100,300,750,0,750,0,18]]],
[500,750,[[100,100,100,650,500,650,500,750,0,750,0,0,500,0,500,100,350,100,350,400,250,400,250,100]]],
[500,750,[[500,0,500,750,400,750,400,100,0,100,0,0]]],
[200,783,[[0,0,200,0,200,98,98,98,98,686,200,686,200,783,0,783]]],
[200,783,[[200,0,200,783,0,783,0,686,102,686,102,98,0,98,0,0]]],
[804,448,[[802,361,802,448,722,448,613,424,572,410,493,364,440,309,401,246,347,327,262,394,144,436,77,447,0,447,0,360,89,356,187,329,235,299,300,234,326,188,344,140,354,88,356,0,445,0,446,82,466,164,495,226,562,296,616,328,672,350,714,358,804,361]]],
[672,96,[[672,22,672,96,0,95,0,0,672,0]]],
[211,164,[[124,0,126,38,150,100,187,146,211,164,143,164,105,141,50,88,0,0]]],
[503,499,[[298,499,210,499,0,0,104,0,254,375,404,0,503,0]]],
[500,500,[[194,266,400,266,400,95,0,95,0,0,500,0,500,363,200,363,200,500,100,500,100,266]]],
[500,496,[[300,399,500,399,500,496,0,496,0,399,200,398,200,0,300,0]]],
[500,500,[[208,230,111,230,111,0,211,0,211,130,500,130,500,500,0,500,0,400,400,400,400,230]]],
[499,503,[[0,298,0,210,499,0,499,104,124,254,499,404,499,503]]],
[500,500,[[0,0,500,0,500,100,97,100,97,400,495,400,495,500,0,500]]],
[500,500,[[0,500,0,0,99,0,99,402,403,402,403,0,500,0,499,500]]],
[500,500,[[500,500,0,500,0,400,400,400,400,100,0,100,0,0,500,0]]],
[503,499,[[205,0,293,0,503,499,399,499,249,124,99,499,0,499]]],
[500,500,[[0,0,500,0,500,100,99,101,100,500,0,500]]],
[500,500,[[500,0,500,500,400,500,402,96,100,100,100,500,0,500,0,0]]],
[500,499,[[400,399,100,400,100,499,0,499,0,0,500,0,500,499,400,499],[400,299,400,99,100,99,100,299]]],
[503,500,[[400,200,400,100,0,100,0,0,503,0,500,500,0,500,0,400,400,400,400,300,0,300,0,200]]],
[500,500,[[400,500,400,300,0,300,0,200,400,200,400,100,0,100,0,0,500,0,500,500]]],
[500,500,[[0,291,0,191,84,184,150,151,190,100,203,43,205,0,305,0,300,96,279,158,240,210,213,228,174,241,208,255,231,274,255,320,276,274,294,252,348,212,409,194,500,191,500,291,402,301,370,315,346,334,316,384,308,416,305,500,205,500,201,418,182,366,132,319,102,304,40,292]]],
[500,500,[[317,230,100,230,100,399,500,400,500,500,0,500,0,129,315,130,315,0,415,0,415,230]]],
[500,500,[[100,300,100,500,0,500,0,0,100,0,100,200,500,200,500,300]]],
[503,500,[[301,100,301,400,503,400,503,500,1,500,1,400,201,400,201,100,0,100,0,0,501,0,501,100]]],
[500,500,[[0,1,500,0,500,100,105,100,107,200,500,200,500,500,0,500,0,405,400,405,400,300,0,300]]],
[500,500,[[200,100,0,100,0,0,500,0,500,100,300,100,300,500,200,500]]],
[499,503,[[499,205,499,293,0,503,0,399,375,249,0,99,0,0]]],
[499,500,[[99,100,499,100,499,200,349,200,349,350,249,350,249,200,99,200,99,500,0,500,0,0,99,0]]],
[500,500,[[400,300,100,300,100,500,0,500,0,0,100,0,100,200,400,200,400,0,500,0,500,500,400,500]]],
[500,500,[[0,500,0,0,100,0,100,400,200,400,200,0,500,0,500,500,400,500,400,100,300,100,300,500]]],
[500,500,[[250,100,100,100,100,400,500,400,500,500,0,500,0,0,500,0,500,100,350,100,350,300,250,300]]],
[500,500,[[500,0,500,500,400,500,400,100,0,100,0,0]]],
[340,806,[[158,0,245,0,245,74,236,143,212,218,180,284,148,326,238,356,340,359,340,446,244,450,148,480,186,534,212,586,240,688,245,731,245,805,157,806,150,690,127,620,95,566,1,469,48,430,95,403,48,376,0,337,89,249,117,206,148,122,158,51]]],
[100,750,[[100,750,0,750,0,0,100,0]]],
[340,808,[[182,53,192,124,223,207,251,251,340,339,292,378,245,405,292,432,339,471,245,568,213,622,189,698,183,808,95,808,96,714,112,638,144,552,192,482,96,452,0,448,0,360,86,359,192,328,160,286,128,220,104,145,95,76,95,0,182,1]]],
[409,161,[[126,0,160,6,161,0,230,0,234,59,246,76,283,89,309,83,332,65,337,0,409,0,409,48,392,104,355,141,326,156,299,161,179,161,175,102,162,86,124,72,90,86,76,102,72,161,0,161,1,103,20,54,59,15,113,0]]]
]
bind CHESILIN_CH = "!,.0123456789?ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
bind CHESILIN = [
[97,844,[[47,0,97,0,62,218,46,250,0,250,34,42],[47,595,97,595,64,806,46,842,0,844,34,637]]],
[432,844,[[424,0,432,12,432,92,422,195,399,306,376,370,345,428,304,476,279,495,220,518,96,514,50,494,16,455,0,393,3,87,16,27,28,4,39,2,44,14,40,306,47,354,70,385,97,403,202,420,276,408,302,394,356,328,382,239,395,58,417,2],[54,590,336,590,321,751,310,798,299,830,286,844,24,844,30,714,42,632]]],
[317,844,[[30,0,317,0,294,169,276,239,262,254,0,254,2,168,26,10],[30,591,317,591,294,759,276,829,262,844,0,844,2,758,26,601]]],
[362,664,[[362,0,361,68,341,93,225,93,225,567,362,567,361,640,341,664,0,664,2,609,22,571,133,571,133,93,0,93,2,38,22,0]]],
[264,659,[[264,0,264,638,214,659,174,659,174,94,0,94,2,39,22,0]]],
[263,662,[[263,0,263,623,242,662,0,662,2,602,27,566,173,566,173,21,225,5]]],
[262,658,[[262,0,262,636,220,658,177,658,177,372,0,372,0,323,27,274,170,275,170,21,233,4]]],
[362,663,[[195,0,235,0,235,565,362,565,361,638,340,663,0,663,1,607,22,570,144,570,144,21,184,1]]],
[362,659,[[362,0,361,70,340,94,223,94,223,637,173,659,132,659,132,93,0,93,1,38,22,0]]],
[368,664,[[27,0,368,0,368,642,314,662,277,658,277,96,6,96,0,70,16,18]]],
[366,663,[[116,0,366,0,366,69,350,98,95,98,95,642,47,663,0,663,0,27,26,14,108,0]]],
[364,663,[[51,0,91,0,91,568,364,568,362,638,342,663,0,663,0,22,40,2]]],
[367,663,[[367,0,367,624,346,663,0,663,2,603,27,567,277,567,277,22,338,4]]],
[432,844,[[425,0,432,6,430,120,399,308,345,430,304,478,251,511,184,522,92,512,49,494,20,461,0,383,2,104,9,46,30,4,40,3,45,15,41,315,52,361,72,388,119,409,182,420,244,418,285,403,323,376,363,315,382,238,393,65,418,2],[166,595,216,595,186,795,168,840,120,844,153,637]]],
[78,321,[[45,0,78,0,78,276,61,321,42,321,42,102,7,103,0,91,8,38,32,3]]],
[290,1006,[[189,531,142,542,110,590,93,650,91,743,106,806,132,864,180,906,216,919,214,531],[271,0,287,7,290,985,281,994,234,1006,218,1004,215,989,187,997,121,986,63,944,38,910,8,830,0,725,14,644,34,588,53,560,131,490,188,462,214,458,212,24,228,10,266,0],[189,531,142,542,110,590,93,650,91,743,106,806,132,864,180,906,216,919,214,531],[271,0,287,7,290,985,281,994,234,1006,218,1004,215,989,187,997,121,986,63,944,38,910,8,830,0,725,14,644,34,588,53,560,131,490,188,462,214,458,212,24,228,10,266,0]]],
[290,1005,[[77,314,76,709,140,696,164,674,190,621,200,551,197,479,179,406,154,363,106,324],[63,0,78,4,78,237,138,239,175,252,231,295,251,322,280,393,290,445,290,517,286,556,264,625,212,701,136,757,74,775,74,981,59,995,15,1005,0,998,4,23,19,10,58,0],[77,314,76,709,140,696,164,674,190,621,200,551,197,479,179,406,154,363,106,324],[63,0,78,4,78,237,138,239,175,252,231,295,251,322,280,393,290,445,290,517,286,556,264,625,212,701,136,757,74,775,74,981,59,995,15,1005,0,998,4,23,19,10,58,0]]],
[289,1006,[[215,75,154,89,125,112,103,160,89,233,94,322,120,397,151,440,213,472],[274,0,289,5,286,982,268,996,231,1006,211,999,213,548,168,549,127,540,87,518,51,484,14,409,0,333,0,278,18,178,69,94,144,34,270,0],[215,75,154,89,125,112,103,160,89,233,94,322,120,397,151,440,213,472],[274,0,289,5,286,982,268,996,231,1006,211,999,213,548,168,549,127,540,87,518,51,484,14,409,0,333,0,278,18,178,69,94,144,34,270,0]]],
[109,270,[[54,0,95,30,108,60,108,102,79,207,55,270,18,235,1,206,45,26]]],
[393,1006,[[78,534,76,931,169,909,235,877,284,824,298,790,303,750,284,670,238,611,176,569,81,534],[64,0,80,4,77,457,138,459,211,479,317,544,319,24,326,14,354,4,393,5,393,706,389,748,356,824,332,857,268,914,158,974,14,1006,0,999,5,21,59,0],[78,534,76,931,169,909,235,877,284,824,298,790,303,750,284,670,238,611,176,569,81,534],[64,0,80,4,77,457,138,459,211,479,317,544,319,24,326,14,354,4,393,5,393,706,389,748,356,824,332,857,268,914,158,974,14,1006,0,999,5,21,59,0]]],
[392,1005,[[75,84,77,474,152,468,221,440,285,376,303,308,292,242,257,182,197,132,105,91],[59,0,72,2,75,17,99,8,157,14,264,58,333,112,368,160,384,198,392,229,392,984,375,996,335,1005,318,1001,315,427,226,495,157,526,77,548,79,980,44,1001,5,1000,0,22,53,0],[75,84,77,474,152,468,221,440,285,376,303,308,292,242,257,182,197,132,105,91],[59,0,72,2,75,17,99,8,157,14,264,58,333,112,368,160,384,198,392,229,392,984,375,996,335,1005,318,1001,315,427,226,495,157,526,77,548,79,980,44,1001,5,1000,0,22,53,0]]],
[288,997,[[272,0,286,4,288,505,258,522,145,541,112,586,91,666,93,750,109,820,125,853,174,904,209,919,250,924,259,933,251,962,194,996,151,994,95,972,38,910,8,830,0,719,22,617,52,561,130,490,188,462,214,458,211,24,266,1]]],
[180,82,[[0,0,143,0,180,55,180,82,54,82,22,58,0,23]]],
[291,1006,[[78,535,75,931,134,918,174,882,201,773,196,687,171,612,141,570,80,535],[64,0,80,4,77,457,163,467,221,504,266,568,280,606,291,678,282,800,240,889,172,956,87,993,14,1006,0,1000,5,21,59,1],[78,535,75,931,134,918,174,882,201,773,196,687,171,612,141,570,80,535],[64,0,80,4,77,457,163,467,221,504,266,568,280,606,291,678,282,800,240,889,172,956,87,993,14,1006,0,1000,5,21,59,1]]],
[290,1005,[[77,314,76,709,140,696,164,674,190,621,200,551,197,479,179,406,154,363,106,324],[63,0,78,4,78,237,138,239,175,252,231,295,251,322,280,393,290,445,290,517,286,556,264,625,212,701,136,757,74,775,74,981,59,995,15,1005,0,998,4,23,19,10,58,0],[77,314,76,709,140,696,164,674,190,621,200,551,197,479,179,406,154,363,106,324],[63,0,78,4,78,237,138,239,175,252,231,295,251,322,280,393,290,445,290,517,286,556,264,625,212,701,136,757,74,775,74,981,59,995,15,1005,0,998,4,23,19,10,58,0]]],
[487,1009,[[187,77,160,81,139,94,110,133,92,207,90,266,100,334,129,402,162,441,207,463,209,77,192,77],[282,548,280,934,333,929,352,916,388,848,397,784,396,723,370,629,355,601,300,555],[268,0,284,5,282,472,345,472,383,488,442,543,476,615,487,748,468,842,421,923,347,982,294,1002,242,1009,205,999,207,540,155,541,127,533,70,496,44,466,10,393,0,265,28,151,43,121,90,65,178,12,266,0],[187,77,160,81,139,94,110,133,92,207,90,266,100,334,129,402,162,441,207,463,209,77,192,77],[282,548,280,934,333,929,352,916,388,848,397,784,396,723,370,629,355,601,300,555],[268,0,284,5,282,472,345,472,383,488,442,543,476,615,487,748,468,842,421,923,347,982,294,1002,242,1009,205,999,207,540,155,541,127,533,70,496,44,466,10,393,0,265,28,151,43,121,90,65,178,12,266,0]]],
[333,1005,[[238,530,202,534,146,564,110,614,91,702,100,768,128,828,180,880,260,918,258,530,241,530],[60,0,75,3,77,559,148,501,222,467,295,455,332,466,333,982,316,996,280,1005,262,1002,259,992,217,996,174,986,116,957,57,904,8,812,0,748,1,23,19,9,54,0],[238,530,202,534,146,564,110,614,91,702,100,768,128,828,180,880,260,918,258,530,241,530],[60,0,75,3,77,559,148,501,222,467,295,455,332,466,333,982,316,996,280,1005,262,1002,259,992,217,996,174,986,116,957,57,904,8,812,0,748,1,23,19,9,54,0]]],
[288,997,[[103,0,148,6,186,22,243,77,277,149,288,272,285,312,264,383,215,460,140,518,74,538,76,974,30,996,2,994,0,495,27,477,143,456,180,406,198,315,190,218,164,150,116,96,81,79,31,68,38,34,95,1]]],
[181,228,[[29,0,142,97,176,143,180,177,164,228,52,138,7,88,2,45,20,6]]],
[392,1006,[[318,74,226,96,159,128,110,180,95,215,90,257,104,322,144,386,214,436,316,472],[377,0,392,5,388,981,372,995,329,1005,314,1000,316,547,240,544,183,527,126,500,76,461,75,983,38,1002,1,1002,0,299,4,257,37,182,62,148,126,90,236,31,366,1],[318,74,226,96,159,128,110,180,95,215,90,257,104,322,144,386,214,436,316,472],[377,0,392,5,388,981,372,995,329,1005,314,1000,316,547,240,544,183,527,126,500,76,461,75,983,38,1002,1,1002,0,299,4,257,37,182,62,148,126,90,236,31,366,1]]],
[290,1005,[[77,314,76,709,140,696,164,674,190,621,200,551,197,479,179,406,154,363,106,324],[63,0,78,4,78,237,138,239,175,252,231,295,251,322,280,393,290,445,290,517,286,556,264,625,212,701,136,757,74,775,74,981,59,995,15,1005,0,998,4,23,19,10,58,0],[77,314,76,709,140,696,164,674,190,621,200,551,197,479,179,406,154,363,106,324],[63,0,78,4,78,237,138,239,175,252,231,295,251,322,280,393,290,445,290,517,286,556,264,625,212,701,136,757,74,775,74,981,59,995,15,1005,0,998,4,23,19,10,58,0]]],
[289,997,[[63,0,77,4,75,458,137,460,173,472,229,514,265,574,278,613,289,673,289,728,269,830,216,916,140,975,81,995,51,997,31,990,40,956,82,928,146,910,175,876,190,835,199,771,192,678,168,608,147,578,120,552,87,536,28,532,0,520,3,24,57,0]]],
[332,1006,[[74,88,76,474,147,464,194,433,226,384,243,310,228,221,200,170,155,124,76,88],[59,0,70,2,74,13,98,8,160,17,216,44,263,82,292,117,327,194,332,984,318,995,275,1006,258,1002,255,446,187,503,149,523,74,546,29,549,2,542,0,22,52,0],[74,88,76,474,147,464,194,433,226,384,243,310,228,221,200,170,155,124,76,88],[59,0,70,2,74,13,98,8,160,17,216,44,263,82,292,117,327,194,332,984,318,995,275,1006,258,1002,255,446,187,503,149,523,74,546,29,549,2,542,0,22,52,0]]],
[291,1005,[[76,86,76,475,136,470,155,456,182,413,200,341,200,261,184,195,153,134,108,98],[59,0,72,4,76,17,106,8,151,14,188,30,246,85,280,157,291,288,287,326,265,395,216,472,168,514,110,541,77,547,80,981,62,996,25,1005,5,999,0,24,11,12,55,0],[76,86,76,475,136,470,155,456,182,413,200,341,200,261,184,195,153,134,108,98],[59,0,72,4,76,17,106,8,151,14,188,30,246,85,280,157,291,288,287,326,265,395,216,472,168,514,110,541,77,547,80,981,62,996,25,1005,5,999,0,24,11,12,55,0]]],
[202,364,[[143,0,202,12,202,30,145,56,145,336,92,363,75,364,47,347,10,312,0,288,19,258,38,256,50,270,50,28,120,2]]],
[392,1006,[[77,510,77,579,166,510,392,510,392,985,374,998,335,1006,321,1002,318,989,288,998,258,996,161,966,73,906,28,850,3,784,0,748,2,510],[317,531,242,538,152,581,105,637,90,707,95,748,110,786,159,846,220,887,319,921],[2,510,1,24,18,10,54,0,75,4,77,510],[392,510,166,510,242,476,317,458,315,25,342,6,379,0,389,8],[317,531,242,538,152,581,105,637,90,707,95,748,110,786,159,846,220,887,319,921],[60,0,75,4,77,579,136,529,196,494,317,458,315,25,342,6,388,4,392,985,374,998,335,1006,321,1002,318,989,288,998,258,996,194,980,100,929,28,850,3,784,1,24,18,10,54,0]]],
[333,1006,[[259,78,186,93,148,118,106,174,91,233,96,306,128,382,171,428,257,470],[320,0,333,4,332,522,321,533,277,546,200,546,127,520,77,482,75,984,58,997,22,1006,1,999,0,301,11,225,42,158,114,77,209,26,315,0],[259,78,186,93,148,118,106,174,91,233,96,306,128,382,171,428,257,470],[320,0,333,4,332,522,321,533,277,546,200,546,127,520,77,482,75,984,58,997,22,1006,1,999,0,301,11,225,42,158,114,77,209,26,315,0]]],
[487,1009,[[277,81,280,473,335,462,360,441,387,381,396,317,389,217,371,166,341,120,280,81],[205,539,149,549,114,588,96,640,90,722,96,789,122,860,166,910,207,929],[262,0,334,6,371,18,427,60,463,120,476,159,487,219,487,274,474,354,436,435,371,502,313,531,279,539,282,983,255,1000,195,1009,156,1007,102,987,44,932,11,860,0,736,12,656,50,576,114,510,205,471,203,24,219,10,256,0],[277,81,280,473,335,462,360,441,387,381,396,317,389,217,371,166,341,120,280,81],[205,539,149,549,114,588,96,640,90,722,96,789,122,860,166,910,207,929],[262,0,334,6,371,18,427,60,463,120,476,159,487,219,487,274,474,354,436,435,371,502,313,531,279,539,282,983,255,1000,195,1009,156,1007,102,987,44,932,11,860,0,736,12,656,50,576,114,510,205,471,203,24,219,10,256,0]]],
[487,1008,[[278,81,280,464,339,452,360,435,385,385,397,320,394,238,375,175,344,123,295,87],[263,0,340,7,380,22,440,75,476,146,487,278,484,317,456,397,390,478,307,524,233,544,153,554,126,574,106,607,90,695,91,743,98,795,117,848,151,895,178,916,225,932,270,935,277,948,255,985,192,1008,109,990,58,950,19,881,0,791,0,736,12,658,28,617,69,556,142,500,205,480,203,23,220,10,257,0],[278,81,280,464,339,452,360,435,385,385,397,320,394,238,375,175,344,123,295,87],[263,0,340,7,380,22,440,75,476,146,487,278,484,317,456,397,390,478,307,524,233,544,153,554,126,574,106,607,90,695,91,743,98,795,117,848,151,895,178,916,225,932,270,935,277,948,255,985,192,1008,109,990,58,950,19,881,0,791,0,736,12,658,28,617,69,556,142,500,205,480,203,23,220,10,257,0]]],
[480,1009,[[199,544,135,560,106,592,91,632,83,748,110,850,150,901,202,927],[287,0,333,5,372,20,433,73,454,107,477,183,480,280,466,356,449,396,407,456,334,510,274,529,276,986,230,1008,161,1006,112,993,47,944,0,842,0,678,33,592,100,522,182,480,328,453,355,432,374,400,390,293,384,228,361,156,314,98,280,80,208,72,203,60,225,23,278,1],[199,544,135,560,106,592,91,632,83,748,110,850,150,901,202,927],[287,0,333,5,372,20,433,73,454,107,477,183,480,280,466,356,449,396,407,456,334,510,274,529,276,986,230,1008,161,1006,112,993,47,944,0,842,0,678,33,592,100,522,182,480,328,453,355,432,374,400,390,293,384,228,361,156,314,98,280,80,208,72,203,60,225,23,278,1]]],
[78,321,[[45,0,78,0,78,276,61,321,42,321,42,102,7,103,0,91,8,38,32,3]]],
[290,1006,[[189,531,142,542,110,590,93,650,91,743,106,806,132,864,180,906,216,919,214,531],[271,0,287,7,290,985,281,994,234,1006,218,1004,215,989,187,997,121,986,63,944,38,910,8,830,0,725,14,644,34,588,53,560,131,490,188,462,214,458,212,24,228,10,266,0],[189,531,142,542,110,590,93,650,91,743,106,806,132,864,180,906,216,919,214,531],[271,0,287,7,290,985,281,994,234,1006,218,1004,215,989,187,997,121,986,63,944,38,910,8,830,0,725,14,644,34,588,53,560,131,490,188,462,214,458,212,24,228,10,266,0]]],
[290,1005,[[77,314,76,709,140,696,164,674,190,621,200,551,197,479,179,406,154,363,106,324],[63,0,78,4,78,237,138,239,175,252,231,295,251,322,280,393,290,445,290,517,286,556,264,625,212,701,136,757,74,775,74,981,59,995,15,1005,0,998,4,23,19,10,58,0],[77,314,76,709,140,696,164,674,190,621,200,551,197,479,179,406,154,363,106,324],[63,0,78,4,78,237,138,239,175,252,231,295,251,322,280,393,290,445,290,517,286,556,264,625,212,701,136,757,74,775,74,981,59,995,15,1005,0,998,4,23,19,10,58,0]]],
[289,1006,[[215,75,154,89,125,112,103,160,89,233,94,322,120,397,151,440,213,472],[274,0,289,5,286,982,268,996,231,1006,211,999,213,548,168,549,127,540,87,518,51,484,14,409,0,333,0,278,18,178,69,94,144,34,270,0],[215,75,154,89,125,112,103,160,89,233,94,322,120,397,151,440,213,472],[274,0,289,5,286,982,268,996,231,1006,211,999,213,548,168,549,127,540,87,518,51,484,14,409,0,333,0,278,18,178,69,94,144,34,270,0]]],
[109,270,[[54,0,95,30,108,60,108,102,79,207,55,270,18,235,1,206,45,26]]],
[395,1006,[[78,534,76,931,169,909,235,877,284,824,298,790,303,750,284,670,238,611,176,569,81,534],[64,0,80,4,77,457,138,459,211,479,317,544,319,24,326,14,355,4,395,5,394,690,389,748,376,787,332,857,302,887,232,938,158,974,14,1006,0,999,5,21,59,0],[78,534,76,931,169,909,235,877,284,824,298,790,303,750,284,670,238,611,176,569,81,534],[64,0,80,4,77,457,138,459,211,479,317,544,319,24,326,14,355,4,395,5,394,690,389,748,376,787,332,857,302,887,232,938,158,974,14,1006,0,999,5,21,59,0]]],
[392,1005,[[75,84,77,474,152,468,221,440,285,376,303,308,292,242,257,182,197,132,105,91],[59,0,72,2,75,17,99,8,157,14,264,58,333,112,368,160,384,198,392,229,392,984,375,996,335,1005,318,1001,315,427,226,495,157,526,77,548,79,980,44,1001,5,1000,0,22,53,0],[75,84,77,474,152,468,221,440,285,376,303,308,292,242,257,182,197,132,105,91],[59,0,72,2,75,17,99,8,157,14,264,58,333,112,368,160,384,198,392,229,392,984,375,996,335,1005,318,1001,315,427,226,495,157,526,77,548,79,980,44,1001,5,1000,0,22,53,0]]],
[288,997,[[272,0,286,4,288,505,258,522,145,541,112,586,91,666,93,750,109,820,125,853,174,904,209,919,250,924,259,933,251,962,194,996,151,994,95,972,38,910,8,830,0,719,22,617,52,561,130,490,188,462,214,458,211,24,266,1]]],
[180,82,[[0,0,143,0,180,55,180,82,54,82,22,58,0,23]]],
[291,1006,[[78,535,75,931,134,918,174,882,201,773,196,687,171,612,141,570,80,535],[64,0,80,4,77,457,163,467,221,504,266,568,280,606,291,678,282,800,240,889,172,956,87,993,14,1006,0,1000,5,21,59,1],[78,535,75,931,134,918,174,882,201,773,196,687,171,612,141,570,80,535],[64,0,80,4,77,457,163,467,221,504,266,568,280,606,291,678,282,800,240,889,172,956,87,993,14,1006,0,1000,5,21,59,1]]],
[290,1005,[[77,314,76,709,140,696,164,674,190,621,200,551,197,479,179,406,154,363,106,324],[63,0,78,4,78,237,138,239,175,252,231,295,251,322,280,393,290,445,290,517,286,556,264,625,212,701,136,757,74,775,74,981,59,995,15,1005,0,998,4,23,19,10,58,0],[77,314,76,709,140,696,164,674,190,621,200,551,197,479,179,406,154,363,106,324],[63,0,78,4,78,237,138,239,175,252,231,295,251,322,280,393,290,445,290,517,286,556,264,625,212,701,136,757,74,775,74,981,59,995,15,1005,0,998,4,23,19,10,58,0]]],
[487,1009,[[187,77,160,81,139,94,110,133,92,207,90,266,100,334,129,402,162,441,207,463,209,77,192,77],[282,548,280,934,333,929,352,916,388,848,397,784,396,723,370,629,355,601,300,555],[268,0,284,5,282,472,345,472,383,488,442,543,476,615,487,748,468,842,421,923,347,982,294,1002,242,1009,205,999,207,540,155,541,127,533,70,496,44,466,10,393,0,265,28,151,43,121,90,65,178,12,266,0],[187,77,160,81,139,94,110,133,92,207,90,266,100,334,129,402,162,441,207,463,209,77,192,77],[282,548,280,934,333,929,352,916,388,848,397,784,396,723,370,629,355,601,300,555],[268,0,284,5,282,472,345,472,383,488,442,543,476,615,487,748,468,842,421,923,347,982,294,1002,242,1009,205,999,207,540,155,541,127,533,70,496,44,466,10,393,0,265,28,151,43,121,90,65,178,12,266,0]]],
[333,1005,[[238,530,202,534,146,564,110,614,91,702,100,768,128,828,180,880,260,918,258,530,241,530],[60,0,75,3,77,559,148,501,222,467,295,455,332,466,333,982,316,996,280,1005,262,1002,259,992,217,996,174,986,116,957,57,904,8,812,0,748,1,23,19,9,54,0],[238,530,202,534,146,564,110,614,91,702,100,768,128,828,180,880,260,918,258,530,241,530],[60,0,75,3,77,559,148,501,222,467,295,455,332,466,333,982,316,996,280,1005,262,1002,259,992,217,996,174,986,116,957,57,904,8,812,0,748,1,23,19,9,54,0]]],
[288,997,[[103,0,148,6,186,22,243,77,277,149,288,272,285,312,264,383,215,460,140,518,74,538,76,974,30,996,2,994,0,495,27,477,143,456,180,406,198,315,190,218,164,150,116,96,81,79,31,68,38,34,95,1]]],
[181,228,[[29,0,142,97,176,143,180,177,164,228,52,138,7,88,2,45,20,6]]],
[392,1006,[[318,74,226,96,159,128,110,180,95,215,90,257,104,322,144,386,214,436,316,472],[377,0,392,5,388,981,372,995,329,1005,314,1000,316,547,240,544,183,527,126,500,76,461,75,983,38,1002,1,1002,0,299,4,257,37,182,62,148,126,90,236,31,366,1],[318,74,226,96,159,128,110,180,95,215,90,257,104,322,144,386,214,436,316,472],[377,0,392,5,388,981,372,995,329,1005,314,1000,316,547,240,544,183,527,126,500,76,461,75,983,38,1002,1,1002,0,299,4,257,37,182,62,148,126,90,236,31,366,1]]],
[290,1005,[[77,314,76,709,140,696,164,674,190,621,200,551,197,479,179,406,154,363,106,324],[63,0,78,4,78,237,138,239,175,252,231,295,251,322,280,393,290,445,290,517,286,556,264,625,212,701,136,757,74,775,74,981,59,995,15,1005,0,998,4,23,19,10,58,0],[77,314,76,709,140,696,164,674,190,621,200,551,197,479,179,406,154,363,106,324],[63,0,78,4,78,237,138,239,175,252,231,295,251,322,280,393,290,445,290,517,286,556,264,625,212,701,136,757,74,775,74,981,59,995,15,1005,0,998,4,23,19,10,58,0]]],
[289,997,[[63,0,77,4,75,458,137,460,173,472,229,514,265,574,278,613,289,673,289,728,269,830,216,916,140,975,81,995,51,997,31,990,40,956,82,928,146,910,175,876,190,835,199,771,192,678,168,608,147,578,120,552,87,536,28,532,0,520,3,24,57,0]]],
[332,1006,[[74,88,76,474,147,464,194,433,226,384,243,310,228,221,200,170,155,124,76,88],[59,0,70,2,74,13,98,8,160,17,216,44,263,82,292,117,327,194,332,984,318,995,275,1006,258,1002,255,446,187,503,149,523,74,546,29,549,2,542,0,22,52,0],[74,88,76,474,147,464,194,433,226,384,243,310,228,221,200,170,155,124,76,88],[59,0,70,2,74,13,98,8,160,17,216,44,263,82,292,117,327,194,332,984,318,995,275,1006,258,1002,255,446,187,503,149,523,74,546,29,549,2,542,0,22,52,0]]],
[291,1005,[[76,86,76,475,136,470,155,456,182,413,200,341,200,261,184,195,153,134,108,98],[59,0,72,4,76,17,106,8,151,14,188,30,246,85,280,157,291,288,287,326,265,395,216,472,168,514,110,541,77,547,80,981,62,996,25,1005,5,999,0,24,11,12,55,0],[76,86,76,475,136,470,155,456,182,413,200,341,200,261,184,195,153,134,108,98],[59,0,72,4,76,17,106,8,151,14,188,30,246,85,280,157,291,288,287,326,265,395,216,472,168,514,110,541,77,547,80,981,62,996,25,1005,5,999,0,24,11,12,55,0]]],
[202,364,[[143,0,202,12,202,30,145,56,145,336,92,363,75,364,47,347,10,312,0,288,19,258,38,256,50,270,50,28,120,2]]],
[392,1006,[[77,510,77,579,166,510,392,510,392,985,374,998,335,1006,321,1002,318,989,288,998,258,996,161,966,73,906,28,850,3,784,0,748,2,510],[317,531,242,538,152,581,105,637,90,707,95,748,110,786,159,846,220,887,319,921],[2,510,1,24,18,10,54,0,75,4,77,510],[166,510,242,476,317,458,315,25,332,10,369,0,389,8,392,510],[317,531,242,538,152,581,105,637,90,707,95,748,110,786,159,846,220,887,319,921],[60,0,75,4,77,579,136,529,196,494,317,458,315,25,342,6,388,4,392,985,374,998,335,1006,321,1002,318,989,288,998,258,996,194,980,100,929,28,850,3,784,1,24,18,10,54,0]]],
[333,1006,[[259,78,186,93,148,118,106,174,91,233,96,306,128,382,171,428,257,470],[320,0,333,4,332,522,321,533,277,546,200,546,127,520,77,482,75,984,58,997,22,1006,1,999,0,301,11,225,42,158,114,77,209,26,315,0],[259,78,186,93,148,118,106,174,91,233,96,306,128,382,171,428,257,470],[320,0,333,4,332,522,321,533,277,546,200,546,127,520,77,482,75,984,58,997,22,1006,1,999,0,301,11,225,42,158,114,77,209,26,315,0]]],
[487,1009,[[277,81,280,473,335,462,360,441,387,381,396,317,389,217,371,166,341,120,280,81],[205,539,149,549,114,588,96,640,90,722,96,789,122,860,166,910,207,929],[262,0,334,6,371,18,427,60,463,120,476,159,487,219,487,274,474,354,436,435,371,502,313,531,279,539,282,983,255,1000,195,1009,156,1007,102,987,44,932,11,860,0,736,12,656,50,576,114,510,205,471,203,24,219,10,256,0],[277,81,280,473,335,462,360,441,387,381,396,317,389,217,371,166,341,120,280,81],[205,539,149,549,114,588,96,640,90,722,96,789,122,860,166,910,207,929],[262,0,334,6,371,18,427,60,463,120,476,159,487,219,487,274,474,354,436,435,371,502,313,531,279,539,282,983,255,1000,195,1009,156,1007,102,987,44,932,11,860,0,736,12,656,50,576,114,510,205,471,203,24,219,10,256,0]]],
[487,1008,[[278,81,280,464,339,452,360,435,385,385,397,320,394,238,375,175,344,123,295,87],[263,0,340,7,380,22,440,75,476,146,487,278,484,317,456,397,390,478,307,524,233,544,153,554,126,574,106,607,90,695,91,743,98,795,117,848,151,895,178,916,225,932,270,935,277,948,255,985,192,1008,109,990,58,950,19,881,0,791,0,736,12,658,28,617,69,556,142,500,205,480,203,23,220,10,257,0],[278,81,280,464,339,452,360,435,385,385,397,320,394,238,375,175,344,123,295,87],[263,0,340,7,380,22,440,75,476,146,487,278,484,317,456,397,390,478,307,524,233,544,153,554,126,574,106,607,90,695,91,743,98,795,117,848,151,895,178,916,225,932,270,935,277,948,255,985,192,1008,109,990,58,950,19,881,0,791,0,736,12,658,28,617,69,556,142,500,205,480,203,23,220,10,257,0]]],
[480,1009,[[199,544,135,560,106,592,91,632,83,748,110,850,150,901,202,927],[287,0,333,5,372,20,433,73,454,107,477,183,480,280,466,356,449,396,407,456,334,510,274,529,276,986,230,1008,161,1006,112,993,47,944,0,842,0,678,33,592,100,522,182,480,328,453,355,432,374,400,390,293,384,228,361,156,314,98,280,80,208,72,203,60,225,23,278,1],[199,544,135,560,106,592,91,632,83,748,110,850,150,901,202,927],[287,0,333,5,372,20,433,73,454,107,477,183,480,280,466,356,449,396,407,456,334,510,274,529,276,986,230,1008,161,1006,112,993,47,944,0,842,0,678,33,592,100,522,182,480,328,453,355,432,374,400,390,293,384,228,361,156,314,98,280,80,208,72,203,60,225,23,278,1]]]
]
# ---- END GLYPHS ----
# ───────────────────────────── small helpers ─────────────────────────────────
fn mix(a, b, k) { return a + (b - a) * k }
fn pos_mod(a, m) {
bind r = a % m
if r < 0.0 { bind r = r + m }
return r
}
# set the pen to Ling hue k; shift is the global hue drift in degrees
fn col(k, sat, lit, shift) {
set_color_hsl(pos_mod(HUE[k] + shift, 360.0), clamp(sat, 0.0, 100.0), clamp(lit, 0.0, 100.0))
}
fn ink(lit) { set_color_hsl(214.0, 14.0, clamp(lit, 0.0, 100.0)) }
fn px(cx, r, a) { return cx + r * sin(a) }
fn py(cy, r, a) { return cy - r * cos(a) }
fn pline(cx, cy, r0, a0, r1, a1) {
draw_line(px(cx, r0, a0), py(cy, r0, a0), px(cx, r1, a1), py(cy, r1, a1))
}
# square of half-size h centred on (x, y), turned by a
fn square(x, y, h, a) {
bind c = cos(a)
bind s = sin(a)
bind x0 = x - h * c + h * s
bind y0 = y - h * s - h * c
bind x1 = x + h * c + h * s
bind y1 = y + h * s - h * c
bind x2 = x + h * c - h * s
bind y2 = y + h * s + h * c
bind x3 = x - h * c - h * s
bind y3 = y - h * s + h * c
draw_line(x0, y0, x1, y1)
draw_line(x1, y1, x2, y2)
draw_line(x2, y2, x3, y3)
draw_line(x3, y3, x0, y0)
}
# hatch inside a circle: parallel chords at angle a, spacing sp
fn hatch_disc(cx, cy, r, a, sp) {
bind nx = cos(a + 1.5708)
bind ny = sin(a + 1.5708)
bind tx = cos(a)
bind ty = sin(a)
bind d = 0.0 - r + sp * 0.5
while d < r {
bind h = sqrt(max(r * r - d * d, 0.0))
draw_line(cx + nx * d - tx * h, cy + ny * d - ty * h, cx + nx * d + tx * h, cy + ny * d + ty * h)
bind d = d + sp
}
}
# hatch inside an axis-aligned square [x, x+s] x [y, y+s], lines at 45 degrees
fn hatch_box(x, y, s, sp) {
bind d = sp
while d < 2.0 * s {
bind ax = x
bind ay = y + d
bind bx = x + d
bind by = y
if d > s {
bind ax = x + d - s
bind ay = y + s
bind bx = x + s
bind by = y + d - s
}
draw_line(ax, ay, bx, by)
bind d = d + sp
}
}
fn fmt_mb(v) {
if v >= 1024.0 { return num_str(round(v / 102.4) / 10.0) + "G" }
return num_str(round(v)) + "M"
}
fn fmt_rate(v) {
if v >= 10000.0 { return num_str(round(v / 1000.0)) + "K" }
if v >= 1000.0 { return num_str(round(v / 100.0) / 10.0) + "K" }
return num_str(round(v))
}
# ───────────────────────────── glyph drawing ─────────────────────────────────
# Outlines come from the Ling bundle. Contours are closed, y runs down.
# Daemon glyph fitted into a bw x bh box centred on (x, y), turned by a
fn daemon_glyph(ch, x, y, bw, bh, a) {
bind i = str_find(DAEMON_CH, ch)
if i < 0 { return 0 }
bind g = DAEMON[i]
bind sc = min(bw / g[0], bh / g[1])
bind gw = g[0] * sc
bind gh = g[1] * sc
bind c = cos(a)
bind s = sin(a)
bind polys = g[2]
bind p = 0
while p < len(polys) {
bind pts = polys[p]
bind n = len(pts) / 2
bind j = 0
while j < n {
bind k = (j + 1) % n
bind ux = pts[j * 2] * sc - gw / 2.0
bind uy = pts[j * 2 + 1] * sc - gh / 2.0
bind vx = pts[k * 2] * sc - gw / 2.0
bind vy = pts[k * 2 + 1] * sc - gh / 2.0
draw_line(x + ux * c - uy * s, y + ux * s + uy * c, x + vx * c - vy * s, y + vx * s + vy * c)
bind j = j + 1
}
bind p = p + 1
}
return 1
}
# a run of Daemon letters, h tall, left-aligned at (x, y) where y is the vertical centre
fn daemon_text(str, x, y, h) {
bind n = str_len(str)
bind i = 0
while i < n {
bind ch = str_slice(str, i, 1)
if ch != " " { daemon_glyph(ch, x + i * h * 0.74 + h * 0.3, y, h * 0.62, h, 0.0) }
bind i = i + 1
}
}
fn text_w(str, h) { return str_len(str) * h * 0.74 }
# Chesilin glyph bent round a ring: radius rm, centred on angle ac (radians, clockwise from up)
fn chesilin_glyph(ch, cx, cy, rm, ac, bw, bh) {
bind i = str_find(CHESILIN_CH, ch)
if i < 0 { return 0 }
bind g = CHESILIN[i]
bind sc = min(bw / g[0], bh / g[1])
bind gw = g[0] * sc
bind gh = g[1] * sc
bind polys = g[2]
bind p = 0
while p < len(polys) {
bind pts = polys[p]
bind n = len(pts) / 2
bind j = 0
while j < n {
bind k = (j + 1) % n
bind ux = pts[j * 2] * sc - gw / 2.0
bind uy = pts[j * 2 + 1] * sc - gh / 2.0
bind vx = pts[k * 2] * sc - gw / 2.0
bind vy = pts[k * 2 + 1] * sc - gh / 2.0
bind m = 1 + floor(abs(vx - ux) / (rm * 0.05))
bind q = 0
while q < m {
bind f0 = q / m
bind f1 = (q + 1) / m
pline(cx, cy, rm - mix(uy, vy, f0), ac + mix(ux, vx, f0) / rm, rm - mix(uy, vy, f1), ac + mix(ux, vx, f1) / rm)
bind q = q + 1
}
bind j = j + 1
}
bind p = p + 1
}
return 1
}
# ring text: the string repeats round the whole ring in n cells, turned by spin
fn ring_text(str, cx, cy, r0, r1, spin, lit, k, sat, hs) {
bind band = r1 - r0
bind rm = (r0 + r1) / 2.0
bind sl = str_len(str)
bind n = floor(TAU * rm / (band * 0.62))
bind da = TAU / n
col(k, sat, lit, hs)
bind i = 0
while i < n {
bind ch = str_slice(str, i % sl, 1)
if ch != " " { chesilin_glyph(ch, cx, cy, rm, spin + (i + 0.5) * da, rm * da * 0.72, band * 0.62) }
bind i = i + 1
}
}
# a Daemon tile: frame, corner brackets, letter, optional hatch
fn tile(ch, x, y, s, lit, k, sat, hs, fillk) {
col(k, sat, lit, hs)
draw_line(x, y, x + s, y)
draw_line(x + s, y, x + s, y + s)
draw_line(x + s, y + s, x, y + s)
draw_line(x, y + s, x, y)
bind a = s * 0.055
bind b = s * 0.21
draw_line(x + a, y + a + b, x + a, y + a)
draw_line(x + a, y + a, x + a + b, y + a)
draw_line(x + s - a - b, y + a, x + s - a, y + a)
draw_line(x + s - a, y + a, x + s - a, y + a + b)
draw_line(x + s - a, y + s - a - b, x + s - a, y + s - a)
draw_line(x + s - a, y + s - a, x + s - a - b, y + s - a)
draw_line(x + a + b, y + s - a, x + a, y + s - a)
draw_line(x + a, y + s - a, x + a, y + s - a - b)
if fillk > 0.0 {
col(k, sat * 0.8, lit * 0.45, hs)
hatch_box(x + a, y + a, s - 2.0 * a, max(2.5, s * 0.07) / fillk)
}
col(k, sat, min(lit + 16.0, 92.0), hs)
daemon_glyph(ch, x + s / 2.0, y + s / 2.0, s * 0.6, s * 0.6, 0.0)
}
# ───────────────────────────── data ──────────────────────────────────────────
# mem.snap, see sampler.ps1. Returns [good, g, r, private_all, names, ws, priv, ior, iow]
fn parse_snap(text) {
bind g = []
bind r = []
bind pall = 0.0
bind names = []
bind ws = []
bind priv = []
bind ior = []
bind iow = []
bind lines = split(text, "\n")
bind i = 0
while i < len(lines) {
bind f = split(trim(lines[i]), "|")
bind tag = f[0]
if tag == "g" {
bind g = []
bind j = 1
while j < len(f) {
bind g = list_push(g, to_number(f[j]))
bind j = j + 1
}
}
if tag == "r" {
bind r = []
bind j = 1
while j < len(f) {
bind r = list_push(r, to_number(f[j]))
bind j = j + 1
}
}
if tag == "s" { bind pall = to_number(f[1]) }
if tag == "p" {
if len(f) >= 8 {
bind names = list_push(names, f[1])
bind ws = list_push(ws, to_number(f[3]))
bind priv = list_push(priv, to_number(f[4]))
bind ior = list_push(ior, to_number(f[5]))
bind iow = list_push(iow, to_number(f[6]))
}
}
bind i = i + 1
}
bind good = 0
if len(g) >= 11 {
if len(r) >= 8 { bind good = 1 }
}
return [good, g, r, pall, names, ws, priv, ior, iow]
}
# the seven category sizes in MB, from the sampler's counters
fn categories(g, pall) {
bind total = g[0]
bind avail = g[1]
bind free = g[2]
bind standby = g[3]
bind modified = g[4]
bind kernel = g[5] + g[6]
bind comp = g[7]
bind inuse = max(total - avail - modified, 0.0)
bind data = clamp(pall - comp, 0.0, max(inuse - kernel - comp, 0.0))
bind mapped = max(inuse - kernel - comp - data, 0.0)
return [kernel, standby, data, modified, mapped, comp, free]
}
# a made-up machine for when there is no sampler: 16 GB, breathing, with bursts of paging
fn sim_cats(t) {
bind total = 16384.0
bind kernel = 900.0 + 150.0 * sin(t * 0.13)
bind standby = 4200.0 + 1600.0 * sin(t * 0.05 + 1.0)
bind data = 5200.0 + 2200.0 * sin(t * 0.031 + 2.0) + 600.0 * sin(t * 0.21)
bind modified = 130.0 + 110.0 * (sin(t * 0.4) + 1.0)
bind comp = 700.0 + 300.0 * sin(t * 0.07)
bind mapped = 1500.0 + 500.0 * sin(t * 0.09 + 3.0)
bind free = max(total - kernel - standby - data - modified - comp - mapped, 200.0)
return [kernel, standby, data, modified, mapped, comp, free]
}
fn sim_rates(t) {
bind b1 = pow(abs(sin(t * 0.37)), 6.0)
bind b2 = pow(abs(sin(t * 0.23 + 1.0)), 8.0)
bind b3 = pow(abs(sin(t * 0.51 + 2.0)), 5.0)
return [3000.0 + 2500.0 * sin(t * 0.7) + 40000.0 * b3, 40.0 + 4000.0 * b1, 20.0 + 3000.0 * b2]
}
bind SIM_NAMES = ["chrome", "code", "firefox", "explorer", "python", "node", "slack", "spotify", "ling", "audiodg",
"svchost", "dwm", "teams", "steam", "obs", "docker", "mysqld", "discord", "winword", "excel"]
# weighted pick: w is a list of weights, u in [0,1)
fn pick(w, u) {
bind sum = 0.0
bind i = 0
while i < len(w) {
bind sum = sum + w[i]
bind i = i + 1
}
bind v = u * sum
bind i = 0
while i < len(w) - 1 {
if v < w[i] { return i }
bind v = v - w[i]
bind i = i + 1
}
return len(w) - 1
}
# Hilbert curve table for a 32 x 32 page map: flat [x0, y0, x1, y1, ...]
fn hilbert_table(n) {
bind out = []
bind d = 0
while d < n * n {
bind t = d
bind x = 0
bind y = 0
bind s = 1
while s < n {
bind rx = floor(t / 2) % 2
bind ry = (t % 2 + rx) % 2
if ry == 0 {
if rx == 1 {
bind x = s - 1 - x
bind y = s - 1 - y
}
bind tmp = x
bind x = y
bind y = tmp
}
bind x = x + s * rx
bind y = y + s * ry
bind t = floor(t / 4)
bind s = s * 2
}
bind out = list_push(out, x)
bind out = list_push(out, y)
bind d = d + 1
}
return out
}
# ───────────────────────────── pulses ────────────────────────────────────────
# EV is flat, six numbers per pulse: kind (0 read circle, 1 write square), category,
# born, seed, magnitude, process index.
fn ev_add(ev, kind, cat, born, seed, mag, proc) {
bind ev = list_push(ev, kind)
bind ev = list_push(ev, cat)
bind ev = list_push(ev, born)
bind ev = list_push(ev, seed)
bind ev = list_push(ev, mag)
bind ev = list_push(ev, proc)
return ev
}
fn ev_cull(ev, t, life) {
bind out = []
bind i = 0
while i < len(ev) {
if t - ev[i + 2] < life {
bind j = 0
while j < 6 {
bind out = list_push(out, ev[i + j])
bind j = j + 1
}
}
bind i = i + 6
}
return out
}
# ───────────────────────────── view 1: RINGS ─────────────────────────────────
fn ring_geom(c, R) {
bind r1 = R * (1.0 - c * 0.1)
bind band = R * 0.082
return [r1, r1 - band, band]
}
fn ring_spin(Z, c) {
bind dir = 1.0
if c % 2 == 1 { bind dir = 0.0 - 1.0 }
return Z[Z_ROT] * dir * (0.35 + 0.12 * c) + Z[Z_T] * dir * 0.03 * (c + 1)
}
fn view_rings(Z) {
bind W = Z[Z_W]
bind H = Z[Z_H]
bind cx = W / 2.0
bind cy = H / 2.0
bind R = min(W, H) * 0.5 - 16.0
bind t = Z[Z_T]
bind hs = Z[Z_HS]
bind sat = Z[Z_SAT]
bind cats = Z[Z_CATS]
bind total = Z[Z_TOTAL]
bind en = Z[Z_ENERGY]
bind c = 0
while c < 7 {
bind gm = ring_geom(c, R)
bind r1 = gm[0]
bind r0 = gm[1]
bind band = gm[2]
bind frac = cats[c] / total
bind spin = ring_spin(Z, c)
bind e = en[c]
# the two rails
col(c, sat * 0.7, 26.0 + 14.0 * e, hs)
draw_circle(cx, cy, r1)
draw_circle(cx, cy, r0)
# crosshatch over the occupied sector, a second angle once the ring is busy
bind sweep = max(frac * TAU, 0.03)
bind da = 0.0215
bind n = floor(sweep / da)
bind k = 0
col(c, sat, 36.0 + 26.0 * e, hs)
while k < n {
bind a = spin + k * da
pline(cx, cy, r0, a, r1, a + 0.05 + 0.05 * e)
bind k = k + 1
}
if e > 0.35 {
bind k = 0
col(c, sat, 30.0 + 22.0 * e, hs)
while k < n {
bind a = spin + k * da
pline(cx, cy, r0, a + 0.05, r1, a)
bind k = k + 2
}
}
col(c, sat, 62.0 + 28.0 * e, hs)
pline(cx, cy, r0 - 4.0, spin, r1 + 4.0, spin)
pline(cx, cy, r0 - 4.0, spin + sweep, r1 + 4.0, spin + sweep)
# ring text: name, size, share
bind label = CAT_NAME[c] + " " + fmt_mb(cats[c]) + " " + num_str(round(frac * 1000.0) / 10.0) + "% "
ring_text(label, cx, cy, r0 + band * 0.06, r1 - band * 0.06, spin * 0.6 + 1.0, 74.0 + 20.0 * e, c, sat, hs)
bind c = c + 1
}
# hub: used share in Daemon, ticks turning
bind hr = R * 0.3 - 6.0
ink(34.0)
draw_circle(cx, cy, hr)
bind k = 0
while k < 60 {
bind a = k * TAU / 60.0 + Z[Z_ROT] * 0.5
bind tl = 5.0
if k % 5 == 0 { bind tl = 11.0 }
pline(cx, cy, hr - tl, a, hr, a)
bind k = k + 1
}
bind used = num_str(round(Z[Z_USED] * 100.0)) + "%"
col(2, sat, 78.0, hs)
daemon_text(used, cx - text_w(used, hr * 0.5) / 2.0, cy - hr * 0.08, hr * 0.5)
ink(55.0)
daemon_text("USED", cx - text_w("USED", hr * 0.2) / 2.0, cy + hr * 0.4, hr * 0.2)
# pulses ride their ring
bind ev = Z[Z_EV]
bind i = 0
while i < len(ev) {
bind age = t - ev[i + 2]
bind p = age / 1.8
bind cc = ev[i + 1]
bind gm = ring_geom(cc, R)
bind rm = (gm[0] + gm[1]) / 2.0
bind a = ring_spin(Z, cc) + ev[i + 3] * TAU
bind x = px(cx, rm, a)
bind y = py(cy, rm, a)
col(cc, sat, (1.0 - p) * (55.0 + 40.0 * ev[i + 4]), hs)
if ev[i] == 0 {
draw_circle(x, y, gm[2] * (0.25 + 1.5 * p))
draw_circle(x, y, gm[2] * (0.1 + 0.9 * p))
} else {
square(x, y, gm[2] * (1.1 - 0.8 * p), a + p * 2.0)
square(x, y, gm[2] * (0.6 - 0.4 * p), a - p * 2.0)
}
bind i = i + 6
}
}
# ───────────────────────────── view 2: TILES ─────────────────────────────────
fn cell_cat(i, cum) {
bind k = 0
while k < 6 {
if i < cum[k] { return ORDER[k] }
bind k = k + 1
}
return ORDER[6]
}
fn view_tiles(Z) {
bind W = Z[Z_W]
bind H = Z[Z_H]
bind t = Z[Z_T]
bind hs = Z[Z_HS]
bind sat = Z[Z_SAT]
bind cats = Z[Z_CATS]
bind total = Z[Z_TOTAL]
bind en = Z[Z_ENERGY]
bind hil = Z[Z_HIL]
bind S = min(H * 0.76, W * 0.5)
bind cs = S / 32.0
bind mx = W * 0.36
bind my = H * 0.5
bind tilt = 0.09 * sin(t * 0.07) + 0.07 * sin(Z[Z_ROT] * 0.8)
bind ca = cos(tilt)
bind sa = sin(tilt)
# cumulative cell counts along the curve, in ORDER
bind cum = []
bind run = 0.0
bind k = 0
while k < 7 {
bind run = run + cats[ORDER[k]] / total * 1024.0
bind cum = list_push(cum, round(run))
bind k = k + 1
}
bind i = 0
while i < 1024 {
bind c = cell_cat(i, cum)
bind gx = hil[i * 2] - 15.5
bind gy = hil[i * 2 + 1] - 15.5
bind x = mx + (gx * ca - gy * sa) * cs
bind y = my + (gx * sa + gy * ca) * cs
bind hv = fract(sin(i * 12.9898) * 43758.5453)
bind hv = fract(hv + 0.18 * sin(t * 0.6 + i * 0.37) + 1.0)
bind e = en[c]
bind h = cs * 0.46
col(c, sat * 0.8, 20.0 + 16.0 * hv + 14.0 * e, hs + (hv - 0.5) * 10.0)
square(x, y, h, tilt)
if c != 6 {
bind nl = 1 + floor(hv * 3.0 + e * 2.0)
bind m = 0
col(c, sat, 30.0 + 26.0 * hv + 22.0 * e, hs + (hv - 0.5) * 10.0)
while m < nl {
bind u = (m + 0.5) / nl
bind s0 = (u * 2.0 - 1.0) * h
bind an = tilt + ANG1[c]
bind dx = cos(an) * h * 0.9
bind dy = sin(an) * h * 0.9
bind ox = (0.0 - sin(an)) * s0
bind oy = cos(an) * s0
draw_line(x + ox - dx, y + oy - dy, x + ox + dx, y + oy + dy)
bind m = m + 1
}
} else {
col(6, sat * 0.5, 18.0, hs)
draw_pixel(x, y)
}
bind i = i + 1
}
ink(30.0)
square(mx, my, S * 0.5 + cs * 0.9, tilt)
# pulses: read = circles leaving a cell, write = squares closing on it
bind ev = Z[Z_EV]
bind j = 0
while j < len(ev) {
bind age = t - ev[j + 2]
bind p = age / 1.8
bind c = ev[j + 1]
bind kk = 0
while kk < 7 {
if ORDER[kk] == c {
bind lo = 0
if kk > 0 { bind lo = cum[kk - 1] }
bind span = max(cum[kk] - lo, 1.0)
bind idx = min(floor(lo + ev[j + 3] * span), 1023)
bind gx = hil[idx * 2] - 15.5
bind gy = hil[idx * 2 + 1] - 15.5
bind x = mx + (gx * ca - gy * sa) * cs
bind y = my + (gx * sa + gy * ca) * cs
col(c, sat, (1.0 - p) * (60.0 + 35.0 * ev[j + 4]), hs)
if ev[j] == 0 {
draw_circle(x, y, cs * (0.5 + 3.5 * p))
draw_circle(x, y, cs * (0.3 + 1.6 * p))
} else {
square(x, y, cs * (2.6 - 2.1 * p), tilt + p * 3.0)
square(x, y, cs * 0.5, tilt)
if p < 0.35 { draw_disc(x, y, cs * 0.35) }
}
}
bind kk = kk + 1
}
bind j = j + 6
}
# legend: seven Daemon tiles
bind lx = W * 0.68
bind ts = min(H * 0.095, 62.0)
bind c = 0
while c < 7 {
bind ly = H * 0.1 + c * (ts + H * 0.03)
bind e = en[c]
tile(str_slice(CAT_LET, c, 1), lx, ly, ts, 52.0 + 30.0 * e, c, sat, hs, 0.6 + e)
col(c, sat, 68.0, hs)
daemon_text(CAT_NAME[c], lx + ts + 14.0, ly + ts * 0.3, ts * 0.3)
ink(62.0)
daemon_text(fmt_mb(cats[c]) + " " + num_str(round(cats[c] / total * 1000.0) / 10.0) + "%", lx + ts + 14.0, ly + ts * 0.68, ts * 0.26)
bind bw = W * 0.28
bind bx = lx + ts + 14.0
bind by = ly + ts * 0.95
col(c, sat * 0.8, 40.0, hs)
draw_line(bx, by, bx + bw, by)
bind fw = bw * cats[c] / total
col(c, sat, 60.0 + 20.0 * e, hs)
bind u = 0.0
while u < fw {
draw_line(bx + u, by, bx + u + 4.0, by - 5.0)
bind u = u + 3.0
}
bind c = c + 1
}
}
# ───────────────────────────── view 3: ORBITS ────────────────────────────────
fn name_hue(name) {
bind h = 0
bind i = 0
while i < str_len(name) {
bind h = (h * 31 + str_find(DAEMON_CH, str_slice(name, i, 1)) + 1) % 7919
bind i = i + 1
}
return h % 7
}
fn view_orbits(Z) {
bind W = Z[Z_W]
bind H = Z[Z_H]
bind cx = W / 2.0
bind cy = H / 2.0
bind R = min(W, H) * 0.5 - 20.0
bind t = Z[Z_T]
bind hs = Z[Z_HS]
bind sat = Z[Z_SAT]
bind names = Z[Z_NAME]
bind ws = Z[Z_WS]
bind pv = Z[Z_PRIV]
bind ior = Z[Z_IOR]
bind iow = Z[Z_IOW]
bind np = min(min(len(names), len(ior)), 22)
bind i = 0
while i < np {
ink(14.0)
draw_circle(cx, cy, R * (0.24 + 0.74 * i / max(np - 1, 1)))
bind i = i + 1
}
# the sun: memory in use
bind used = num_str(round(Z[Z_USED] * 100.0)) + "%"
col(2, sat, 70.0, hs)
draw_circle(cx, cy, R * 0.12)
draw_circle(cx, cy, R * 0.1)
daemon_text(used, cx - text_w(used, R * 0.09) / 2.0, cy, R * 0.09)
bind k = 0
while k < 36 {
bind a = k * TAU / 36.0 - Z[Z_ROT] * 0.7
pline(cx, cy, R * 0.12, a, R * 0.12 + 5.0 + 4.0 * (k % 3), a)
bind k = k + 1
}
# bodies: circle = working set, square = private bytes
bind pos = []
bind i = 0
while i < np {
bind orr = R * (0.24 + 0.74 * i / max(np - 1, 1))
bind dir = 1.0
if i % 2 == 1 { bind dir = 0.0 - 1.0 }
bind io = clamp(log10(1.0 + ior[i] + iow[i]) / 4.0, 0.0, 1.0)
bind a = i * 2.399 + Z[Z_ROT] * dir * (0.8 / sqrt(1.0 + i)) * (1.0 + 2.0 * io)
bind x = px(cx, orr, a)
bind y = py(cy, orr, a)
bind pos = list_push(pos, x)
bind pos = list_push(pos, y)
bind k = name_hue(names[i])
bind r = clamp(4.0 + sqrt(ws[i]) * 0.3, 5.0, R * 0.11)
col(k, sat, 48.0 + 24.0 * io, hs)
draw_circle(x, y, r)
draw_circle(x, y, r * 0.86)
col(k, sat, 32.0 + 22.0 * io, hs)
hatch_disc(x, y, r * 0.84, ANG1[k] + Z[Z_ROT] * 0.5, max(2.6, r * 0.12))
bind sh = r * 0.7 * sqrt(clamp(pv[i] / max(ws[i], 1.0), 0.05, 1.0))
col(k, sat, 78.0, hs)
square(x, y, sh, t * 0.6 * dir + i)
if r > 15.0 {
col(k, sat, 88.0, hs)
daemon_glyph(str_upper(str_slice(names[i], 0, 1)), x, y, r * 0.5, r * 0.6, 0.0)
}
if r > 11.0 {
bind nm = str_upper(str_slice(names[i], 0, 10))
bind m = str_len(nm)
bind rm2 = r + 9.0
bind da = 11.0 / rm2
bind q = 0
col(k, sat * 0.9, 70.0, hs)
while q < m {
bind ch = str_slice(nm, q, 1)
if ch != " " { chesilin_glyph(ch, x, y, rm2, (q - (m - 1) / 2.0) * da, 9.0, 8.0) }
bind q = q + 1
}
}
bind i = i + 1
}
# pulses leave their process
bind ev = Z[Z_EV]
bind j = 0
while j < len(ev) {
bind pidx = ev[j + 5]
if pidx < np {
bind p = (t - ev[j + 2]) / 1.8
bind x = pos[pidx * 2]
bind y = pos[pidx * 2 + 1]
bind k = name_hue(names[pidx])
bind r = clamp(4.0 + sqrt(ws[pidx]) * 0.3, 5.0, R * 0.11)
col(k, sat, (1.0 - p) * (60.0 + 38.0 * ev[j + 4]), hs)
if ev[j] == 0 {
draw_circle(x, y, r * (1.0 + 1.1 * p))
draw_circle(x, y, r * (1.0 + 0.5 * p))
} else {
square(x, y, r * (1.9 - 0.8 * p), p * 2.5)
square(x, y, r * (1.4 - 0.6 * p), 0.0 - p * 2.5)
}
}
bind j = j + 6
}
}
# ───────────────────────────── view 4: WEAVE ─────────────────────────────────
# Seven strings, one per category, each a sine at that category's partial ratio and
# loudness: the picture of the additive synth. The bottom trace is their sum. Notes
# (every read and write) are born at the playhead and scroll left.
fn lane_y(c, H) { return H * 0.1 + c * H * 0.1 }
fn view_weave(Z) {
bind W = Z[Z_W]
bind H = Z[Z_H]
bind t = Z[Z_T]
bind hs = Z[Z_HS]
bind sat = Z[Z_SAT]
bind cats = Z[Z_CATS]
bind total = Z[Z_TOTAL]
bind en = Z[Z_ENERGY]
bind x0 = W * 0.12
bind x1 = W * 0.9
bind xph = W * 0.86
bind sw = 8.0
bind amp = H * 0.042
bind c = 0
while c < 7 {
bind y = lane_y(c, H)
bind e = en[c]
bind a = amp * (0.12 + 0.88 * sqrt(cats[c] / total)) * (0.7 + 0.5 * e)
col(c, sat * 0.6, 14.0, hs)
draw_line(x0, y, x1, y)
col(c, sat, 40.0 + 36.0 * e, hs)
bind x = x0
bind prevy = y + a * sin(0.0 - t * RATIO[c] * 1.3)
while x < x1 {
bind u = (x + sw - x0) / (x1 - x0)
bind ny = y + a * sin(u * TAU * RATIO[c] * 2.0 - t * RATIO[c] * 1.3)
draw_line(x, prevy, x + sw, ny)
bind prevy = ny
bind x = x + sw
}
tile(str_slice(CAT_LET, c, 1), W * 0.03, y - H * 0.035, H * 0.07, 40.0 + 40.0 * e, c, sat, hs, 0.3 + e)
col(c, sat, 40.0 + 40.0 * e, hs)
bind dr = H * 0.033
draw_circle(W * 0.095, y, dr)
pline(W * 0.095, y, 0.0, 0.0, dr, t * RATIO[c] * 0.6 + c)
bind c = c + 1
}
# the sum of the seven strings
bind ys = H * 0.86
ink(18.0)
draw_line(x0, ys, x1, ys)
col(2, sat * 0.4, 86.0, hs)
bind x = x0
bind prevy = ys
bind first = 1
while x < x1 {
bind u = (x - x0) / (x1 - x0)
bind s = 0.0
bind k = 0
while k < 7 {
bind s = s + sqrt(cats[k] / total) * sin(u * TAU * RATIO[k] * 2.0 - t * RATIO[k] * 1.3)
bind k = k + 1
}
bind ny = ys + s * H * 0.045
if first == 0 { draw_line(x - 3.0, prevy, x, ny) }
bind prevy = ny
bind first = 0
bind x = x + 3.0
}
ink(70.0)
draw_line(xph, H * 0.05, xph, H * 0.95)
draw_line(xph + 6.0, H * 0.05, xph + 6.0, H * 0.95)
# notes: four numbers each, kind, category, born, magnitude
bind hist = Z[Z_HIST]
bind i = 0
while i < len(hist) {
bind age = t - hist[i + 2]
bind x = xph - age * (xph - x0) / 14.0
bind c = hist[i + 1]
bind y = lane_y(c, H)
bind r = H * 0.011 + H * 0.014 * hist[i + 3]
bind lit = 78.0 - age * 4.0
if age < 0.4 { bind lit = 96.0 }
col(c, sat, lit, hs)
if hist[i] == 0 {
draw_circle(x, y, r)
if age < 0.9 { draw_circle(x, y, r * (1.0 + age * 3.0)) }
} else {
square(x, y, r, age * 0.4)
if age < 0.9 { square(x, y, r * (1.0 + age * 2.0), age * 2.0) }
}
bind i = i + 4
}
}
# ───────────────────────────── hud ───────────────────────────────────────────
fn hud(Z, view, auto, mute) {
bind W = Z[Z_W]
bind H = Z[Z_H]
bind sat = Z[Z_SAT]
bind hs = Z[Z_HS]
col(2, sat, 72.0, hs)
daemon_text("HATCHMEM", 18.0, 26.0, 20.0)
ink(60.0)
bind mode = "SIM"
if Z[Z_LIVE] == 1 { bind mode = "LIVE" }
bind tag = VIEW_NAME[view] + " " + mode
if auto == 1 { bind tag = tag + " AUTO" }
if mute == 1 { bind tag = tag + " MUTE" }
daemon_text(tag, 18.0, 52.0, 13.0)
bind stat = "RD " + fmt_rate(Z[Z_RD]) + "/S WR " + fmt_rate(Z[Z_WR]) + "/S FLT " + fmt_rate(Z[Z_FLT]) + "/S TOTAL " + fmt_mb(Z[Z_TOTAL])
ink(52.0)
daemon_text(stat, 18.0, H - 18.0, 13.0)
bind keyhint = "1-4 VIEW A AUTO H HUD M MUTE ESC QUIT"
ink(40.0)
daemon_text(keyhint, W - text_w(keyhint, 11.0) - 18.0, H - 18.0, 11.0)
}
# ───────────────────────────── synth ─────────────────────────────────────────
# 28 category partials (7 categories x 4 harmonics) + 4 shimmer partials = slots 0..31.
fn synth(Z, f0, level) {
bind cats = Z[Z_CATS]
bind total = Z[Z_TOTAL]
bind en = Z[Z_ENERGY]
bind rot = Z[Z_ROT]
bind wr = log10(1.0 + Z[Z_WR]) / 4.0
bind c = 0
while c < 7 {
bind w = 0.12 + 0.88 * sqrt(cats[c] / total)
if c == 6 { bind w = w * 0.5 }
bind ang = c * TAU / 7.0 + rot * 0.25
bind h = 1
while h <= 4 {
bind a = level * 0.05 * w * pow(0.62, h - 1) * (0.55 + 0.9 * en[c])
audio_tone(c * 4 + h - 1, 4.0 * cos(ang), 0.0, 4.0 * sin(ang) + 6.0, wr * 2.5, f0 * RATIO[c] * h, a, 0.09 + en[c] * 2.2 + h * 0.03, 0.0015 + 0.012 * en[c])
bind h = h + 1
}
bind c = c + 1
}
# shimmer: upper partials that open with reads, writes, faults and overall activity
bind sh = [Z[Z_RD], Z[Z_WR], Z[Z_FLT], Z[Z_ACT] * 1000.0]
bind s = 0
while s < 4 {
bind lv = clamp(log10(1.0 + sh[s]) / 4.5, 0.0, 1.0)
bind ang = s * TAU / 4.0 + rot * 0.6
audio_tone(28 + s, 5.0 * cos(ang), 1.0, 5.0 * sin(ang) + 6.0, 1.0 + lv * 2.0, f0 * (12.0 + 4.0 * s + 0.25 * s * s), level * 0.012 * lv, 0.3 + lv * 5.0, 0.004 + 0.01 * lv)
bind s = s + 1
}
}
# one chime for a pulse
fn chime(kind, cat, mag, f0, seed) {
bind oct = 4.0
if seed > 0.5 { bind oct = 8.0 }
bind wave = "sine"
bind dur = 1.1
if kind == 1 {
bind wave = "tri"
bind dur = 0.6
}
bind ang = seed * TAU
audio_sfx(4.0 * cos(ang), 0.0, 4.0 * sin(ang) + 6.0, 1.0 + mag, f0 * RATIO[cat] * oct, 0.07 * (0.4 + 0.6 * mag), dur, wave)
}
# ───────────────────────────── main ──────────────────────────────────────────
bind start = do {
bind args = get_args()
bind full = 0
bind forceSim = 0
bind shot = 0
bind ai = 0
while ai < len(args) {
if args[ai] == "full" { bind full = 1 }
if args[ai] == "sim" { bind forceSim = 1 }
if args[ai] == "shot" { bind shot = 1 }
bind ai = ai + 1
}
if full == 1 { open_fullscreen("HatchMEM") } else { open_window(1280, 720, "HatchMEM") }
bind W = get_width()
bind H = get_height()
set_blend(1)
set_frame_blur(0.45)
audio_volume(0.7)
audio_fx_reverb(0.55)
audio_fx_delay(0.42, 0.45, 0.3)
bind hil = hilbert_table(32)
bind t0 = time_now()
bind tprev = 0.0
bind view = 0
bind auto = 0
bind showHud = 1
bind mute = 0
bind lastRead = 0.0 - 10.0
bind lastSfx = 0.0
bind live = 0
bind autoT = 0.0
bind shotView = 0
bind shotN = 0
# smoothed state
bind cats = sim_cats(0.0)
bind tgtCats = cats
bind total = 16384.0
bind rates = [0.0, 0.0, 0.0, 0.0]
bind tgtRates = rates
bind names = SIM_NAMES
bind ws = []
bind pv = []
bind ior = []
bind iow = []
bind i = 0
while i < len(SIM_NAMES) {
bind ws = list_push(ws, 100.0)
bind pv = list_push(pv, 80.0)
bind ior = list_push(ior, 0.0)
bind iow = list_push(iow, 0.0)
bind i = i + 1
}
bind tws = ws
bind tpv = pv
bind energy = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
bind ev = []
bind hist = []
bind rot = 0.0
bind hueShift = 0.0
bind act = 0.0
bind rdA = 0.0
bind wrA = 0.0
bind fltA = 0.0
bind alA = 0.0
while window_is_open() {
bind t = time_now() - t0
bind dt = clamp(t - tprev, 0.001, 0.1)
bind tprev = t
# ---- input
if key_pressed("escape") { close_window() }
if key_pressed("1") { bind view = 0 }
if key_pressed("2") { bind view = 1 }
if key_pressed("3") { bind view = 2 }
if key_pressed("4") { bind view = 3 }
if key_pressed("tab") { bind view = (view + 1) % 4 }
if key_pressed("a") { bind auto = 1 - auto }
if key_pressed("h") { bind showHud = 1 - showHud }
if key_pressed("m") { bind mute = 1 - mute }
if auto == 1 {
if t - autoT > 28.0 {
bind autoT = t
bind view = (view + 1) % 4
}
}
if shot == 1 {
bind view = shotView
bind shotN = shotN + 1
if shotN == 150 {
screenshot("hatchmem_" + VIEW_NAME[view])
bind shotView = shotView + 1
bind shotN = 0
if shotView > 3 { close_window() }
}
}
# ---- data: the snapshot, re-read about twice a second
if t - lastRead > 0.4 {
bind lastRead = t
bind live = 0
if forceSim == 0 {
if file_exists("mem.snap") {
bind snap = parse_snap(read_file("mem.snap"))
if snap[0] == 1 {
bind live = 1
bind g = snap[1]
bind r = snap[2]
bind total = g[0]
bind tgtCats = categories(g, snap[3])
bind tgtRates = [r[0], r[1] + r[3], r[2] + r[4] + r[7], r[5]]
bind names = snap[4]
bind tws = snap[5]
bind tpv = snap[6]
bind ior = snap[7]
bind iow = snap[8]
}
}
}
if live == 0 {
bind total = 16384.0
bind tgtCats = sim_cats(t)
bind sr = sim_rates(t)
bind tgtRates = [sr[0], sr[1], sr[2], sr[0] * 0.2]
bind names = SIM_NAMES
bind tws = []
bind tpv = []
bind ior = []
bind iow = []
bind q = 0
while q < len(SIM_NAMES) {
bind base = 3000.0 / (1.0 + q * 0.7)
bind tws = list_push(tws, base * (1.0 + 0.3 * sin(t * 0.1 + q)))
bind tpv = list_push(tpv, base * 0.7 * (1.0 + 0.2 * sin(t * 0.13 + q * 2.0)))
bind ior = list_push(ior, 400.0 * pow(abs(sin(t * 0.3 + q * 1.7)), 6.0))
bind iow = list_push(iow, 300.0 * pow(abs(sin(t * 0.27 + q * 2.3)), 6.0))
bind q = q + 1
}
}
}
# glide toward the targets so the drawing and the synth never jump
bind k = clamp(dt * 2.5, 0.0, 1.0)
bind nc = []
bind i = 0
while i < 7 {
bind nc = list_push(nc, mix(cats[i], tgtCats[i], k))
bind i = i + 1
}
bind cats = nc
bind nr = []
bind i = 0
while i < 4 {
bind nr = list_push(nr, mix(rates[i], tgtRates[i], clamp(dt * 3.0, 0.0, 1.0)))
bind i = i + 1
}
bind rates = nr
if len(tws) == len(ws) {
bind nw = []
bind np2 = []
bind i = 0
while i < len(ws) {
bind nw = list_push(nw, mix(ws[i], tws[i], k))
bind np2 = list_push(np2, mix(pv[i], tpv[i], k))
bind i = i + 1
}
bind ws = nw
bind pv = np2
} else {
bind ws = tws
bind pv = tpv
}
bind fl = rates[0]
bind rd = rates[1]
bind wr = rates[2]
bind al = rates[3]
bind used = clamp(1.0 - (cats[6] + cats[1]) / total, 0.0, 1.0)
bind rdA = mix(rdA, clamp(log10(1.0 + rd) / 3.6, 0.0, 1.0), clamp(dt * 2.0, 0.0, 1.0))
bind wrA = mix(wrA, clamp(log10(1.0 + wr) / 3.6, 0.0, 1.0), clamp(dt * 2.0, 0.0, 1.0))
bind fltA = mix(fltA, clamp(log10(1.0 + fl) / 5.0, 0.0, 1.0), clamp(dt * 2.0, 0.0, 1.0))
bind alA = mix(alA, clamp(log10(1.0 + al) / 5.0, 0.0, 1.0), clamp(dt * 2.0, 0.0, 1.0))
bind act = (rdA + wrA + fltA) / 3.0
# ---- look: rotation, hue and saturation follow the machine
bind rot = rot + dt * (0.06 + 0.9 * act)
bind hueShift = 10.0 * sin(t * 0.05) + 26.0 * wrA - 12.0 * rdA
bind sat = 52.0 + 40.0 * used
# per-category energy: how lit each category is right now
bind ne = []
bind i = 0
while i < 7 {
bind target = 0.0
if i == 0 { bind target = 0.25 * fltA + 0.2 * rdA }
if i == 1 { bind target = rdA }
if i == 2 { bind target = 0.6 * fltA + 0.5 * wrA }
if i == 3 { bind target = wrA }
if i == 4 { bind target = 0.7 * rdA + 0.2 * wrA }
if i == 5 { bind target = 0.5 * wrA + 0.3 * rdA }
if i == 6 { bind target = alA }
bind ne = list_push(ne, mix(energy[i], clamp(target, 0.0, 1.0), clamp(dt * 3.0, 0.0, 1.0)))
bind i = i + 1
}
bind energy = ne
# ---- pulses: reads are circles, writes are squares, allocations are circles in the FREE hue
bind ev = ev_cull(ev, t, 1.9)
bind hist = ev_cull(hist, t, 14.5)
bind f0 = 55.0 * pow(2.0, 0.55 * used)
bind nsp = 0
bind rate = [14.0 * rdA, 14.0 * wrA, 9.0 * alA]
bind src = 0
while src < 3 {
bind want = rate[src] * dt
bind cnt = floor(want)
if rand() < want - cnt { bind cnt = cnt + 1 }
bind m = 0
while m < cnt {
bind kind = 0
bind wts = READ_W
if src == 1 {
bind kind = 1
bind wts = WRITE_W
}
bind cat = 6
if src < 2 {
bind sh = []
bind q = 0
while q < 7 {
bind sh = list_push(sh, wts[q] * (0.12 + sqrt(cats[q] / total)))
bind q = q + 1
}
bind cat = pick(sh, rand())
}
bind pw = []
bind q = 0
while q < len(ws) {
bind io = ior[q]
if src == 1 { bind io = iow[q] }
bind pw = list_push(pw, 0.2 + io + sqrt(ws[q]) * 0.03)
bind q = q + 1
}
bind proc = pick(pw, rand())
bind seed = rand()
bind mag = 0.3 + 0.7 * rand()
bind ev = ev_add(ev, kind, cat, t, seed, mag, proc)
bind hist = ev_add(hist, kind, cat, t, seed, mag, proc)
if nsp < 3 {
if t - lastSfx > 0.07 {
if mute == 0 { chime(kind, cat, mag, f0, seed) }
bind lastSfx = t
bind nsp = nsp + 1
}
}
bind m = m + 1
}
bind src = src + 1
}
# the weave wants four numbers a note: kind, category, born, magnitude
bind h4 = []
bind i = 0
while i < len(hist) {
bind h4 = list_push(h4, hist[i])
bind h4 = list_push(h4, hist[i + 1])
bind h4 = list_push(h4, hist[i + 2])
bind h4 = list_push(h4, hist[i + 4])
bind i = i + 6
}
# ---- state, synth, picture
bind Z = [t, rot, hueShift, sat, W, H, cats, total, act, rd, wr, fl, ev, names, ws, pv, ior, iow, h4, used, energy, hil, live]
bind level = 1.0
if mute == 1 { bind level = 0.0 }
synth(Z, f0, level)
fill(0, 0, 0)
if view == 0 { view_rings(Z) }
if view == 1 { view_tiles(Z) }
if view == 2 { view_orbits(Z) }
if view == 3 { view_weave(Z) }
if showHud == 1 { hud(Z, view, auto, mute) }
present()
}
}