sourceextensions/blender/demos/hex-run.xtl

1⍝│ Blender, 10: HEX1000-UART computing C0DE+BEEF=, from a simulation of its 2⍝│ board. scripts/hex1000-sim.sh runs X_eTaL-fpga's board Verilog (at 3⍝│ FPGA_COMMIT) under iverilog, the text sent over its serial line, into 4⍝│ a waveform (VCD); scripts/hex1000-browser.py types the same text at 5⍝│ the live browser calculator in headless Chrome. This program reads 6⍝│ the waveform (Vcd.xtl), checks it -- the line carries the text, the 7⍝│ board receives it, Hex1000.xtl replaying the clocks agrees with the 8⍝│ circuit's registers at every one, the display ends as the 9⍝│ evaluator's (hx:c_alc) and the browser's -- and only then writes the 10⍝│ video (HexRun.xtl): the bits arriving and the key matrix in slow 11⍝│ motion, the typing as a time-lapse, one addition in slow motion, the 12⍝│ display, the browser's screen beside it. A YouTube video and a Short, 13⍝│ with a cue sheet and subtitles. 14⍝│ Title: HEX1000-UART: execution 15⍝│ Command: just ext blender hex-run 16⍝│ Run: just ext blender hex-run (the simulation, the browser, then this: 17⍝│ about 25 minutes, 1261 frames twice) 18 19"bl:" u̲se< "Blender" 20"bp:" u̲se< "Bpy" 21"vd:" u̲se< "Video" 22"vc:" u̲se< "Vcd" 23"hr:" u̲se< "HexRun" 24 25ʰc̲heck ← { result → 26 n̲ot "exit 0\nerrors 0\n" m̲atch 16 t̲ake result ? ⎕P̲ANIC "hex-run: Blender failed: " c̲at result 27 0 28} 29 30v ← ᵛᶜr̲ead "work/hexrun/hex-run.vcd" 31"the checks:" 32(v, ᵇˡr̲ead "work/hexrun/browser.txt") ʰʳc̲heck 0 33_ ← "work/hexrun/run.py" ᵇˡw̲rite! ᵇᵖlauncher 34_ ← "work/hexrun/hex-run.cues.toml" ᵇˡw̲rite! (ʰʳc̲ues v, ʰʳcueTable) ᵛᵈc̲ues 0 35_ ← "work/hexrun/hex-run.srt" ᵇˡw̲rite! (ʰʳc̲ues v, ʰʳcueTable) ᵛᵈs̲rt 0 36"the cue sheet (work/hexrun/hex-run.cues.toml):" 37ᵇˡr̲ead "work/hexrun/hex-run.cues.toml" 38_ ← "work/hexrun/video.py" ᵇˡw̲rite! ((ᵛᵈlandscape, v, "work/hexrun/browser.png") ʰʳs̲cene 0) c̲at (ᵛᵈr̲ender "hex-run.mp4") c̲at ᵛᵈreport 39_ ← "work/hexrun/short.py" ᵇˡw̲rite! ((ᵛᵈshorts, v, "work/hexrun/browser.png") ʰʳs̲cene 0) c̲at (ᵛᵈr̲ender "hex-run-short.mp4") c̲at ᵛᵈreport 40"rendering 1261 frames at 1920 by 1080 with Blender (EEVEE) ..." 41r ← "work/hexrun/run.py" ᵇˡr̲un! "work/hexrun/video.py work/hexrun/out" 42_ ← ʰc̲heck r 43"the run, and the error lines in Blender's log:" 44lines ← (n̲ot r = f̲irst "\n") p̲artition r 45d̲isclose 1 s̲elect lines 46d̲isclose 2 s̲elect lines 47"rendering the Short, 1261 frames at 1080 by 1920 ..." 48shortRun ← "work/hexrun/run.py" ᵇˡr̲un! "work/hexrun/short.py work/hexrun/out-short" 49_ ← ʰc̲heck shortRun 50shortLines ← (n̲ot shortRun = f̲irst "\n") p̲artition shortRun 51d̲isclose 1 s̲elect shortLines 52d̲isclose 2 s̲elect shortLines 53"what Blender made:" 54ᵇˡr̲ead "work/hexrun/out/report.txt"