@maniclang/workbench 0.1.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (644) hide show
  1. package/CONTRIBUTING.md +40 -0
  2. package/README.md +155 -0
  3. package/dist/client/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
  4. package/dist/client/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
  5. package/dist/client/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
  6. package/dist/client/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
  7. package/dist/client/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
  8. package/dist/client/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
  9. package/dist/client/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
  10. package/dist/client/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
  11. package/dist/client/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
  12. package/dist/client/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
  13. package/dist/client/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
  14. package/dist/client/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
  15. package/dist/client/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
  16. package/dist/client/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
  17. package/dist/client/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
  18. package/dist/client/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
  19. package/dist/client/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
  20. package/dist/client/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
  21. package/dist/client/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
  22. package/dist/client/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
  23. package/dist/client/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
  24. package/dist/client/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
  25. package/dist/client/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
  26. package/dist/client/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
  27. package/dist/client/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
  28. package/dist/client/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
  29. package/dist/client/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
  30. package/dist/client/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
  31. package/dist/client/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
  32. package/dist/client/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
  33. package/dist/client/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
  34. package/dist/client/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
  35. package/dist/client/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
  36. package/dist/client/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
  37. package/dist/client/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
  38. package/dist/client/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
  39. package/dist/client/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
  40. package/dist/client/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
  41. package/dist/client/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
  42. package/dist/client/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
  43. package/dist/client/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
  44. package/dist/client/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
  45. package/dist/client/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
  46. package/dist/client/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
  47. package/dist/client/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
  48. package/dist/client/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
  49. package/dist/client/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
  50. package/dist/client/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
  51. package/dist/client/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
  52. package/dist/client/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
  53. package/dist/client/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
  54. package/dist/client/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
  55. package/dist/client/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
  56. package/dist/client/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
  57. package/dist/client/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
  58. package/dist/client/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
  59. package/dist/client/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
  60. package/dist/client/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
  61. package/dist/client/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
  62. package/dist/client/assets/abap-CRCWOmpq.js +1 -0
  63. package/dist/client/assets/apex-DnsZk_dE.js +1 -0
  64. package/dist/client/assets/azcli-1IWB1ccx.js +1 -0
  65. package/dist/client/assets/bat-DPkNLes8.js +1 -0
  66. package/dist/client/assets/bicep-Corcdgou.js +2 -0
  67. package/dist/client/assets/cameligo-CGrWLZr3.js +1 -0
  68. package/dist/client/assets/clojure-D9WOWImG.js +1 -0
  69. package/dist/client/assets/codicon-CgENjH2v.ttf +0 -0
  70. package/dist/client/assets/coffee-B7EJu28W.js +1 -0
  71. package/dist/client/assets/cpp-SEyurbux.js +1 -0
  72. package/dist/client/assets/csharp-BoL64M5l.js +1 -0
  73. package/dist/client/assets/csp-C46ZqvIl.js +1 -0
  74. package/dist/client/assets/css-DQU6DXDx.js +3 -0
  75. package/dist/client/assets/cssMode-CtRONlr8.js +4 -0
  76. package/dist/client/assets/cypher-D84EuPTj.js +1 -0
  77. package/dist/client/assets/dart-D8lhlL1r.js +1 -0
  78. package/dist/client/assets/dockerfile-DLk6rpji.js +1 -0
  79. package/dist/client/assets/ecl-BO6FnfXk.js +1 -0
  80. package/dist/client/assets/editor.worker-CZyr7Ur9.js +26 -0
  81. package/dist/client/assets/elixir-BRjLKONM.js +1 -0
  82. package/dist/client/assets/flow9-Cac8vKd7.js +1 -0
  83. package/dist/client/assets/freemarker2-BTSNJUl8.js +3 -0
  84. package/dist/client/assets/fsharp-fd1GTHhf.js +1 -0
  85. package/dist/client/assets/go-O9LJTZXk.js +1 -0
  86. package/dist/client/assets/graphql-LQdxqEYJ.js +1 -0
  87. package/dist/client/assets/handlebars-qkUBjVg6.js +1 -0
  88. package/dist/client/assets/hcl-DxDQ3s82.js +1 -0
  89. package/dist/client/assets/html-pguqE00h.js +1 -0
  90. package/dist/client/assets/htmlMode-BCCLuk2F.js +4 -0
  91. package/dist/client/assets/index-BFrMLHHu.css +1 -0
  92. package/dist/client/assets/index-CdBC-xgi.js +1250 -0
  93. package/dist/client/assets/ini-BvajGCUy.js +1 -0
  94. package/dist/client/assets/java-SYsfObOQ.js +1 -0
  95. package/dist/client/assets/javascript-ciDUXdez.js +1 -0
  96. package/dist/client/assets/jsonMode-BmkXC0tI.js +10 -0
  97. package/dist/client/assets/julia-DQXNmw_w.js +1 -0
  98. package/dist/client/assets/kotlin-qQ0MG-9I.js +1 -0
  99. package/dist/client/assets/less-GGFNNJHn.js +2 -0
  100. package/dist/client/assets/lexon-Canl7DCW.js +1 -0
  101. package/dist/client/assets/liquid-CwE4UIwf.js +1 -0
  102. package/dist/client/assets/lua-D28Ae8-K.js +1 -0
  103. package/dist/client/assets/m3-DPitgjJI.js +1 -0
  104. package/dist/client/assets/markdown-B811l8j2.js +1 -0
  105. package/dist/client/assets/mdx-K_9Emnjy.js +1 -0
  106. package/dist/client/assets/mips-CdjsipkG.js +1 -0
  107. package/dist/client/assets/msdax-CYqgjx_P.js +1 -0
  108. package/dist/client/assets/mysql-BHd6q0vd.js +1 -0
  109. package/dist/client/assets/objective-c-B1aVtJYH.js +1 -0
  110. package/dist/client/assets/pascal-BhNW15KB.js +1 -0
  111. package/dist/client/assets/pascaligo-5jv8CcQD.js +1 -0
  112. package/dist/client/assets/perl-DlYyT36c.js +1 -0
  113. package/dist/client/assets/pgsql-Dy0bjov7.js +1 -0
  114. package/dist/client/assets/php-120yhfDK.js +1 -0
  115. package/dist/client/assets/pla-CjnFlu4u.js +1 -0
  116. package/dist/client/assets/postiats-CQpG440k.js +1 -0
  117. package/dist/client/assets/powerquery-DdJtto1Z.js +1 -0
  118. package/dist/client/assets/powershell-Bu_VLpJB.js +1 -0
  119. package/dist/client/assets/protobuf-IBS6jZEB.js +2 -0
  120. package/dist/client/assets/pug-kFxLfcjb.js +1 -0
  121. package/dist/client/assets/python-BzIc0EVe.js +1 -0
  122. package/dist/client/assets/qsharp-q7JyzKFN.js +1 -0
  123. package/dist/client/assets/r-BIFz-_sK.js +1 -0
  124. package/dist/client/assets/razor-lXZl6dtu.js +1 -0
  125. package/dist/client/assets/redis-CHOsPHWR.js +1 -0
  126. package/dist/client/assets/redshift-CBifECDb.js +1 -0
  127. package/dist/client/assets/restructuredtext-CghPJEOS.js +1 -0
  128. package/dist/client/assets/ruby-CYWGW-b1.js +1 -0
  129. package/dist/client/assets/rust-DMDD0SHb.js +1 -0
  130. package/dist/client/assets/sb-BYAiYHFx.js +1 -0
  131. package/dist/client/assets/scala-Bqvq8jcR.js +1 -0
  132. package/dist/client/assets/scheme-Dhb-2j9p.js +1 -0
  133. package/dist/client/assets/scss-CTwUZ5N7.js +3 -0
  134. package/dist/client/assets/shell-CsDZo4DB.js +1 -0
  135. package/dist/client/assets/solidity-CME5AdoB.js +1 -0
  136. package/dist/client/assets/sophia-RYC1BQQz.js +1 -0
  137. package/dist/client/assets/sparql-KEyrF7De.js +1 -0
  138. package/dist/client/assets/sql-BdTr02Mf.js +1 -0
  139. package/dist/client/assets/st-C7iG7M4S.js +1 -0
  140. package/dist/client/assets/swift-D7IUmUK8.js +1 -0
  141. package/dist/client/assets/systemverilog-DgMryOEJ.js +1 -0
  142. package/dist/client/assets/tcl-PloMZuKG.js +1 -0
  143. package/dist/client/assets/tsMode-BAXmgo_t.js +11 -0
  144. package/dist/client/assets/twig-BfRIq3la.js +1 -0
  145. package/dist/client/assets/typescript-Cdf8nS1n.js +1 -0
  146. package/dist/client/assets/typespec-CzxlYoT_.js +1 -0
  147. package/dist/client/assets/vb-BwAE3J76.js +1 -0
  148. package/dist/client/assets/wgsl-B_1kOXbF.js +298 -0
  149. package/dist/client/assets/xml-DGyPgYnj.js +1 -0
  150. package/dist/client/assets/yaml-Dqv3HtbL.js +1 -0
  151. package/dist/client/index.html +14 -0
  152. package/dist/client/manic-logo.png +0 -0
  153. package/dist/client/wasm/manic_lang.d.ts +74 -0
  154. package/dist/client/wasm/manic_lang.js +302 -0
  155. package/dist/client/wasm/manic_lang_bg.wasm +0 -0
  156. package/dist/client/wasm/manic_lang_bg.wasm.d.ts +13 -0
  157. package/dist/server/agentProtocol.d.ts +131 -0
  158. package/dist/server/agentProtocol.js +21 -0
  159. package/dist/server/agentProtocol.js.map +1 -0
  160. package/dist/server/agentRuns.d.ts +46 -0
  161. package/dist/server/agentRuns.js +138 -0
  162. package/dist/server/agentRuns.js.map +1 -0
  163. package/dist/server/agentThreads.d.ts +20 -0
  164. package/dist/server/agentThreads.js +205 -0
  165. package/dist/server/agentThreads.js.map +1 -0
  166. package/dist/server/aiSecrets.d.ts +21 -0
  167. package/dist/server/aiSecrets.js +68 -0
  168. package/dist/server/aiSecrets.js.map +1 -0
  169. package/dist/server/app.d.ts +34 -0
  170. package/dist/server/app.js +804 -0
  171. package/dist/server/app.js.map +1 -0
  172. package/dist/server/assets.d.ts +34 -0
  173. package/dist/server/assets.js +659 -0
  174. package/dist/server/assets.js.map +1 -0
  175. package/dist/server/candidateFix.d.ts +28 -0
  176. package/dist/server/candidateFix.js +111 -0
  177. package/dist/server/candidateFix.js.map +1 -0
  178. package/dist/server/cli.d.ts +2 -0
  179. package/dist/server/cli.js +118 -0
  180. package/dist/server/cli.js.map +1 -0
  181. package/dist/server/diagnostics.d.ts +13 -0
  182. package/dist/server/diagnostics.js +73 -0
  183. package/dist/server/diagnostics.js.map +1 -0
  184. package/dist/server/engineCheck.d.ts +7 -0
  185. package/dist/server/engineCheck.js +60 -0
  186. package/dist/server/engineCheck.js.map +1 -0
  187. package/dist/server/engineInstall.d.ts +34 -0
  188. package/dist/server/engineInstall.js +228 -0
  189. package/dist/server/engineInstall.js.map +1 -0
  190. package/dist/server/enginePaths.d.ts +3 -0
  191. package/dist/server/enginePaths.js +76 -0
  192. package/dist/server/enginePaths.js.map +1 -0
  193. package/dist/server/folderPicker.d.ts +1 -0
  194. package/dist/server/folderPicker.js +54 -0
  195. package/dist/server/folderPicker.js.map +1 -0
  196. package/dist/server/manicAgent.d.ts +75 -0
  197. package/dist/server/manicAgent.js +476 -0
  198. package/dist/server/manicAgent.js.map +1 -0
  199. package/dist/server/manicEnv.d.ts +18 -0
  200. package/dist/server/manicEnv.js +64 -0
  201. package/dist/server/manicEnv.js.map +1 -0
  202. package/dist/server/promptStore.d.ts +11 -0
  203. package/dist/server/promptStore.js +85 -0
  204. package/dist/server/promptStore.js.map +1 -0
  205. package/dist/server/renderJobs.d.ts +54 -0
  206. package/dist/server/renderJobs.js +290 -0
  207. package/dist/server/renderJobs.js.map +1 -0
  208. package/dist/server/settings.d.ts +40 -0
  209. package/dist/server/settings.js +262 -0
  210. package/dist/server/settings.js.map +1 -0
  211. package/dist/server/smartDraw.d.ts +7 -0
  212. package/dist/server/smartDraw.js +88 -0
  213. package/dist/server/smartDraw.js.map +1 -0
  214. package/dist/server/workspace.d.ts +27 -0
  215. package/dist/server/workspace.js +172 -0
  216. package/dist/server/workspace.js.map +1 -0
  217. package/examples/.manic-output/40b6f3b9-7638-4c0e-bb4f-570d45d1b225/job.json +26 -0
  218. package/examples/.manic-output/993f3788-f75e-445c-ba45-c401907b3c02/job.json +26 -0
  219. package/examples/.manic-output/993f3788-f75e-445c-ba45-c401907b3c02/markers.json +13 -0
  220. package/examples/.manic-output/993f3788-f75e-445c-ba45-c401907b3c02/out.mp4 +0 -0
  221. package/examples/.manic-workbench-threads/thread_3ce7448a13f64f9e887d1bc8106a97a8.json +45 -0
  222. package/examples/.manic-workbench-threads/thread_d494cda29249477591056234719e4a3a.json +21 -0
  223. package/examples/.manic-workbench-threads/thread_e98ebdc225184ea5b8ddda8b44541f63.json +29 -0
  224. package/examples/README.md +35 -0
  225. package/examples/a-story-1.manic +222 -0
  226. package/examples/a-story.manic +100 -0
  227. package/examples/achromat-cinematic.manic +105 -0
  228. package/examples/achromat.manic +32 -0
  229. package/examples/aes-decrypt.manic +359 -0
  230. package/examples/aes-encrypt.manic +359 -0
  231. package/examples/aes-round.manic +70 -0
  232. package/examples/aes-story.manic +622 -0
  233. package/examples/ai-story.manic +118 -0
  234. package/examples/analysis.manic +53 -0
  235. package/examples/archimedes_pi.manic +89 -0
  236. package/examples/area_under_curve.manic +131 -0
  237. package/examples/art-rakkan.manic +69 -0
  238. package/examples/aspheric-lens.manic +32 -0
  239. package/examples/astronomical-watch.manic +96 -0
  240. package/examples/asymptote-randomwalk3-reference.manic +58 -0
  241. package/examples/asymptote-tiling-reference.manic +65 -0
  242. package/examples/aws-clustered-web-services.manic +186 -0
  243. package/examples/aws-event-processing-clusters-poc.manic +97 -0
  244. package/examples/aws-three-tier-web-application.manic +134 -0
  245. package/examples/band.manic +43 -0
  246. package/examples/banner.manic +37 -0
  247. package/examples/bayes.manic +27 -0
  248. package/examples/bellcurve.manic +41 -0
  249. package/examples/bfs_dfs.manic +35 -0
  250. package/examples/block-tackle.manic +26 -0
  251. package/examples/bloom-scope.manic +172 -0
  252. package/examples/boolean.manic +46 -0
  253. package/examples/boxplot-wave.manic +93 -0
  254. package/examples/boxplot.manic +43 -0
  255. package/examples/brace.manic +46 -0
  256. package/examples/brachistochrone-annotated.manic +51 -0
  257. package/examples/brachistochrone.manic +27 -0
  258. package/examples/bubble_sort.manic +41 -0
  259. package/examples/bullet-block-annotated.manic +48 -0
  260. package/examples/bullet-block.manic +11 -0
  261. package/examples/bullet-impact.manic +65 -0
  262. package/examples/bungee.manic +9 -0
  263. package/examples/c4-internet-banking-components.manic +33 -0
  264. package/examples/c4-internet-banking-containers.manic +29 -0
  265. package/examples/c4-internet-banking.manic +26 -0
  266. package/examples/c4-story.manic +171 -0
  267. package/examples/c4-test.manic +52 -0
  268. package/examples/c4-zoom.manic +69 -0
  269. package/examples/calculus-demo.manic +129 -0
  270. package/examples/calculus-one.manic +288 -0
  271. package/examples/captions.manic +31 -0
  272. package/examples/car-suspension-annotated.manic +57 -0
  273. package/examples/car-suspension.manic +8 -0
  274. package/examples/cart-pendulum.manic +11 -0
  275. package/examples/charts-bar-line.manic +26 -0
  276. package/examples/charts-column-race.manic +19 -0
  277. package/examples/charts-gdp-race.manic +43 -0
  278. package/examples/charts-german-elections.manic +28 -0
  279. package/examples/charts-line-race.manic +21 -0
  280. package/examples/circle-in-three.manic +156 -0
  281. package/examples/circle-thirds-no-triangle.manic +161 -0
  282. package/examples/clip-window.manic +34 -0
  283. package/examples/cloud-feathers.manic +50 -0
  284. package/examples/cloud-jellyfish-v2.manic +87 -0
  285. package/examples/cloud-jellyfish.manic +48 -0
  286. package/examples/cloud-kaleidoscope.manic +48 -0
  287. package/examples/cloud-koi.manic +51 -0
  288. package/examples/cloud-lissajous.manic +23 -0
  289. package/examples/cloud-medusae.manic +46 -0
  290. package/examples/cloud-phoenix.manic +49 -0
  291. package/examples/cloud-plumes.manic +47 -0
  292. package/examples/cloud-pottery.manic +104 -0
  293. package/examples/cloud-shells.manic +50 -0
  294. package/examples/cloud-starfield.manic +23 -0
  295. package/examples/cloud-wave-lattice.manic +23 -0
  296. package/examples/cloud-word.manic +31 -0
  297. package/examples/cloud3-ripple.manic +53 -0
  298. package/examples/cloud3-sphere.manic +26 -0
  299. package/examples/clt.manic +35 -0
  300. package/examples/collide-blocks-annotated.manic +45 -0
  301. package/examples/collide-blocks.manic +11 -0
  302. package/examples/compare-pendulum.manic +11 -0
  303. package/examples/complex-flowchart.manic +196 -0
  304. package/examples/compound-pulley.manic +25 -0
  305. package/examples/conics.manic +46 -0
  306. package/examples/coordinates.manic +52 -0
  307. package/examples/correlation.manic +35 -0
  308. package/examples/covariance.manic +30 -0
  309. package/examples/creator-affine-fern-growth.manic +72 -0
  310. package/examples/creator-bowl-to-saddle.manic +86 -0
  311. package/examples/creator-branch-counting-tree3.manic +77 -0
  312. package/examples/creator-chaos-game-fern.manic +72 -0
  313. package/examples/creator-circle-inversion-chain.manic +61 -0
  314. package/examples/creator-convex-hull-depth.manic +59 -0
  315. package/examples/creator-coordinate-worlds.manic +182 -0
  316. package/examples/creator-ellipse-reflection-property.manic +59 -0
  317. package/examples/creator-free-kicks.manic +261 -0
  318. package/examples/creator-geometry-language-showcase.manic +259 -0
  319. package/examples/creator-geometry-morph-promo.manic +151 -0
  320. package/examples/creator-heightmap-world.manic +130 -0
  321. package/examples/creator-hilbert3-spatial-index.manic +203 -0
  322. package/examples/creator-how-rocket-launch-works.manic +192 -0
  323. package/examples/creator-implicit-surface-parameterized.manic +51 -0
  324. package/examples/creator-incenter-dissection.manic +56 -0
  325. package/examples/creator-lattice-paths.manic +118 -0
  326. package/examples/creator-line-inversion.manic +49 -0
  327. package/examples/creator-lsystem-fractal-curve.manic +121 -0
  328. package/examples/creator-mandelbrot-escape-test.manic +58 -0
  329. package/examples/creator-monty-hall.manic +104 -0
  330. package/examples/creator-noise-story.manic +123 -0
  331. package/examples/creator-one-tile-pattern-story.manic +169 -0
  332. package/examples/creator-pathfinding.manic +82 -0
  333. package/examples/creator-point-to-plane-distance.manic +167 -0
  334. package/examples/creator-race-quiz.manic +76 -0
  335. package/examples/creator-randomwalk3-diffusion.manic +72 -0
  336. package/examples/creator-reflected-ellipse.manic +48 -0
  337. package/examples/creator-rule90-sierpinski.manic +64 -0
  338. package/examples/creator-three-shadows-of-a-curve.manic +48 -0
  339. package/examples/creator-trigonometry-one-angle.manic +307 -0
  340. package/examples/creator-v2-latex-algebra.manic +29 -0
  341. package/examples/creator-v2-latex-calculus.manic +37 -0
  342. package/examples/creator-v2-latex-physics.manic +29 -0
  343. package/examples/creator-v2-olympiad-geometry.manic +92 -0
  344. package/examples/creator-v2-options-socials.manic +21 -0
  345. package/examples/creator-v2-timers.manic +25 -0
  346. package/examples/creator-v2-timing-square.manic +25 -0
  347. package/examples/creator-v2-timing.manic +34 -0
  348. package/examples/creator-v2.manic +36 -0
  349. package/examples/creator-why-rockets-use-stages.manic +198 -0
  350. package/examples/creator-wrap-real-line.manic +51 -0
  351. package/examples/cubic-graphs.manic +432 -0
  352. package/examples/curve-features.manic +41 -0
  353. package/examples/definedmotion-fourier-gallery.manic +171 -0
  354. package/examples/derivative-of-ln-x.manic +194 -0
  355. package/examples/diagonalise.manic +56 -0
  356. package/examples/dijkstra.manic +29 -0
  357. package/examples/dimensions-unfold.manic +211 -0
  358. package/examples/disc-integration.manic +172 -0
  359. package/examples/double-incline.manic +9 -0
  360. package/examples/double-integral3.manic +43 -0
  361. package/examples/double-pendulum.manic +35 -0
  362. package/examples/double-spring.manic +9 -0
  363. package/examples/drop-mass.manic +25 -0
  364. package/examples/eigen3.manic +34 -0
  365. package/examples/equal_cuts.manic +44 -0
  366. package/examples/equation.manic +16 -0
  367. package/examples/equilateral.manic +57 -0
  368. package/examples/euler_line.manic +51 -0
  369. package/examples/exponential-shells.manic +188 -0
  370. package/examples/extrude3.manic +37 -0
  371. package/examples/factorial-flowchart.manic +69 -0
  372. package/examples/fibonacci-sphere.manic +57 -0
  373. package/examples/flow-lorenz.manic +47 -0
  374. package/examples/fourier-series-live-wave.manic +114 -0
  375. package/examples/fourier-square-wave-live.manic +114 -0
  376. package/examples/fractal_tree.manic +39 -0
  377. package/examples/frame3-grid-policies.manic +48 -0
  378. package/examples/ftc.manic +54 -0
  379. package/examples/function_graph.manic +54 -0
  380. package/examples/galton-board-process.manic +150 -0
  381. package/examples/gcp-clustered-web-services.manic +186 -0
  382. package/examples/gcp-message-collecting.manic +139 -0
  383. package/examples/geo-pythagoras-short.manic +119 -0
  384. package/examples/glsl-boxgrid.manic +105 -0
  385. package/examples/glsl-parameter.manic +30 -0
  386. package/examples/glsl-raymarch.manic +59 -0
  387. package/examples/glsl-shapes.manic +122 -0
  388. package/examples/gradient-descent-field.manic +116 -0
  389. package/examples/gradient-fastest-descent-shorts.manic +153 -0
  390. package/examples/gradient-fastest-descent.manic +125 -0
  391. package/examples/gradient-pendulum-shorts.manic +117 -0
  392. package/examples/gradient.manic +74 -0
  393. package/examples/graph.manic +45 -0
  394. package/examples/graph_moving.manic +67 -0
  395. package/examples/grid-astar.manic +15 -0
  396. package/examples/grid-life-soup.manic +31 -0
  397. package/examples/grid-life-zoo.manic +46 -0
  398. package/examples/grid-life.manic +19 -0
  399. package/examples/grid-wfc.manic +13 -0
  400. package/examples/growing-fractal-tree3.manic +58 -0
  401. package/examples/gun-shot.manic +82 -0
  402. package/examples/hashmap.manic +38 -0
  403. package/examples/heightmap3-world.manic +64 -0
  404. package/examples/heightmap3.manic +23 -0
  405. package/examples/hilbert-curve3-space-filling.manic +117 -0
  406. package/examples/hill_run.manic +71 -0
  407. package/examples/histogram.manic +43 -0
  408. package/examples/hotdog-taco.manic +147 -0
  409. package/examples/hue_wave.manic +35 -0
  410. package/examples/hypothesis.manic +32 -0
  411. package/examples/image.manic +29 -0
  412. package/examples/incircle_tangents.manic +64 -0
  413. package/examples/incline-bumper.manic +11 -0
  414. package/examples/incline-pulley.manic +11 -0
  415. package/examples/incline-showcase.manic +55 -0
  416. package/examples/inline-math.manic +16 -0
  417. package/examples/inscribed-angle-short.manic +56 -0
  418. package/examples/integral-sqrt-tanx.manic +255 -0
  419. package/examples/integrals.manic +274 -0
  420. package/examples/inverse-derivatives.manic +94 -0
  421. package/examples/k8s-cluster-components.manic +82 -0
  422. package/examples/k8s-stateful-architecture.manic +134 -0
  423. package/examples/k8s-three-tier.manic +146 -0
  424. package/examples/kapitza.manic +11 -0
  425. package/examples/latex-disintegration.manic +123 -0
  426. package/examples/lens-paper.manic +36 -0
  427. package/examples/lens-prescription.manic +33 -0
  428. package/examples/lens-system.manic +34 -0
  429. package/examples/lens.manic +31 -0
  430. package/examples/limit-infinity.manic +30 -0
  431. package/examples/limit.manic +33 -0
  432. package/examples/linear-algebra-3d.manic +50 -0
  433. package/examples/linear-algebra.manic +115 -0
  434. package/examples/linear-map.manic +39 -0
  435. package/examples/linear-map3.manic +33 -0
  436. package/examples/linear-system.manic +99 -0
  437. package/examples/linear_transform.manic +43 -0
  438. package/examples/linked_list.manic +38 -0
  439. package/examples/lln.manic +31 -0
  440. package/examples/loop-cinematic.manic +41 -0
  441. package/examples/loop-track.manic +11 -0
  442. package/examples/lorenz-attractor.manic +55 -0
  443. package/examples/lorenz-shells.manic +43 -0
  444. package/examples/lost-in-patterns.manic +149 -0
  445. package/examples/lsystem-asymptote-curves.manic +81 -0
  446. package/examples/manic-ml-activation-focus.manic +133 -0
  447. package/examples/manic-ml-cnn-edge-story.manic +102 -0
  448. package/examples/manic-ml-forward-pass.manic +93 -0
  449. package/examples/manic-ml-learning-step.manic +116 -0
  450. package/examples/manic-ml-logits-sampling.manic +112 -0
  451. package/examples/manic-ml-scalar-to-tensor.manic +143 -0
  452. package/examples/manic-ml-token-embedding.manic +110 -0
  453. package/examples/manic-ml-transformer-attention.manic +102 -0
  454. package/examples/manic-ml-transformer-block.manic +116 -0
  455. package/examples/manic-promo.manic +64 -0
  456. package/examples/map-attractor.manic +45 -0
  457. package/examples/mask-lens.manic +33 -0
  458. package/examples/matrix.manic +37 -0
  459. package/examples/matrix3.manic +101 -0
  460. package/examples/matrix_addition.manic +66 -0
  461. package/examples/matrix_addition_plane.manic +91 -0
  462. package/examples/maxwell-boltzmann-effusion-v2.manic +142 -0
  463. package/examples/maxwell-boltzmann-process.manic +86 -0
  464. package/examples/microservices-platform.manic +140 -0
  465. package/examples/molecule.manic +8 -0
  466. package/examples/morph-icons.manic +29 -0
  467. package/examples/morph.manic +29 -0
  468. package/examples/morph3.manic +49 -0
  469. package/examples/motion-flow-foundation.manic +148 -0
  470. package/examples/motion-graphics-v2-story.manic +189 -0
  471. package/examples/motion-graphics-v2.manic +81 -0
  472. package/examples/motion-graphics.manic +81 -0
  473. package/examples/multivariable3.manic +26 -0
  474. package/examples/mystory.manic +9 -0
  475. package/examples/newton.manic +39 -0
  476. package/examples/newtons-cradle.manic +10 -0
  477. package/examples/nine_point.manic +59 -0
  478. package/examples/noise-terrain.manic +16 -0
  479. package/examples/off-axis.manic +32 -0
  480. package/examples/onprem-advanced-web-service-v2.manic +196 -0
  481. package/examples/onprem-advanced-web-service.manic +175 -0
  482. package/examples/orthocenter.manic +63 -0
  483. package/examples/param3.manic +43 -0
  484. package/examples/parameter-journeys.manic +154 -0
  485. package/examples/parameterized-field-advection.manic +57 -0
  486. package/examples/parameterized-generated-families3.manic +83 -0
  487. package/examples/particles-flow.manic +61 -0
  488. package/examples/pascal-triangle.manic +92 -0
  489. package/examples/pendulum-annotated.manic +72 -0
  490. package/examples/pendulum-damped.manic +35 -0
  491. package/examples/pendulum.manic +38 -0
  492. package/examples/perfect-reel.manic +43 -0
  493. package/examples/pie.manic +41 -0
  494. package/examples/pieday.manic +113 -0
  495. package/examples/piston.manic +7 -0
  496. package/examples/popkorn-field.manic +38 -0
  497. package/examples/prism-cinematic.manic +36 -0
  498. package/examples/prism.manic +32 -0
  499. package/examples/probability.manic +57 -0
  500. package/examples/process-branching-dispatch.manic +71 -0
  501. package/examples/process-stream-observe.manic +54 -0
  502. package/examples/projection.manic +57 -0
  503. package/examples/prompt-test-10.manic +257 -0
  504. package/examples/prompt-test-11.manic +168 -0
  505. package/examples/prompt-test-12.manic +177 -0
  506. package/examples/prompt-test-13.manic +228 -0
  507. package/examples/prompt-test-14.manic +319 -0
  508. package/examples/prompt-test-15.manic +325 -0
  509. package/examples/prompt-test-16.manic +252 -0
  510. package/examples/prompt-test-2.manic +239 -0
  511. package/examples/prompt-test-3.manic +336 -0
  512. package/examples/prompt-test-4.manic +195 -0
  513. package/examples/prompt-test-5.manic +223 -0
  514. package/examples/prompt-test-6.manic +222 -0
  515. package/examples/prompt-test-7.manic +156 -0
  516. package/examples/prompt-test-8.manic +266 -0
  517. package/examples/prompt-test-9.manic +171 -0
  518. package/examples/prompt-test.manic +158 -0
  519. package/examples/pulley-annotated.manic +54 -0
  520. package/examples/pulley-paper.manic +52 -0
  521. package/examples/pulley-scale.manic +23 -0
  522. package/examples/pulley.manic +24 -0
  523. package/examples/quadratic-formula-continuity.manic +110 -0
  524. package/examples/quiz-euler.manic +52 -0
  525. package/examples/quiz-geometry-2.manic +107 -0
  526. package/examples/quiz-geometry.manic +108 -0
  527. package/examples/quiz-skins.manic +22 -0
  528. package/examples/raft-cm.manic +24 -0
  529. package/examples/ramp.manic +25 -0
  530. package/examples/ray-fan.manic +27 -0
  531. package/examples/raymarch-alpha.manic +39 -0
  532. package/examples/raymarch-boxgrid.manic +47 -0
  533. package/examples/raymarch-docker-latency.manic +74 -0
  534. package/examples/raymarch-metaballs.manic +37 -0
  535. package/examples/raymarch-sculpture.manic +39 -0
  536. package/examples/raymarch-shapes3.manic +31 -0
  537. package/examples/reactive-integral.manic +172 -0
  538. package/examples/reactive-math-journey.manic +185 -0
  539. package/examples/reactive-math-notation.manic +150 -0
  540. package/examples/reactive-multiformat.manic +130 -0
  541. package/examples/reactive-world.manic +111 -0
  542. package/examples/refraction-paper.manic +40 -0
  543. package/examples/refraction.manic +32 -0
  544. package/examples/resonance.manic +10 -0
  545. package/examples/rewrite-exponential-cubic.manic +141 -0
  546. package/examples/rewrite-integration.manic +199 -0
  547. package/examples/riemann_rainbow.manic +61 -0
  548. package/examples/riemann_readout.manic +61 -0
  549. package/examples/robot-arm.manic +25 -0
  550. package/examples/rref.manic +48 -0
  551. package/examples/second-law-thermodynamics.manic +385 -0
  552. package/examples/series-parallel-springs.manic +8 -0
  553. package/examples/serverless-processing.manic +145 -0
  554. package/examples/shader-cellular.manic +35 -0
  555. package/examples/shader-fractal.manic +45 -0
  556. package/examples/shader-fx.manic +34 -0
  557. package/examples/shader-glitch-grid.manic +55 -0
  558. package/examples/shader-parameter.manic +25 -0
  559. package/examples/shader-patterns.manic +37 -0
  560. package/examples/shader-plasma.manic +43 -0
  561. package/examples/shader-shapes-dsl.manic +46 -0
  562. package/examples/shader-shapes.manic +37 -0
  563. package/examples/shader-warp.manic +22 -0
  564. package/examples/shapes-howto.manic +411 -0
  565. package/examples/sine_wave.manic +42 -0
  566. package/examples/skew.manic +40 -0
  567. package/examples/smoke.rs +57 -0
  568. package/examples/solids3.manic +22 -0
  569. package/examples/some-story.manic +299 -0
  570. package/examples/spinning-cylinder-flow.manic +87 -0
  571. package/examples/spline.manic +21 -0
  572. package/examples/spot-diagram.manic +32 -0
  573. package/examples/spring-annotated.manic +60 -0
  574. package/examples/spring-chain.manic +11 -0
  575. package/examples/spring-damped.manic +33 -0
  576. package/examples/spring-incline.manic +10 -0
  577. package/examples/spring-paper.manic +46 -0
  578. package/examples/spring-pendulum.manic +14 -0
  579. package/examples/spring.manic +33 -0
  580. package/examples/sqrt-tanx.manic +217 -0
  581. package/examples/ssl-handshake-sdf.manic +116 -0
  582. package/examples/stack_queue.manic +53 -0
  583. package/examples/statistics.manic +60 -0
  584. package/examples/story-addressable-asset-cues.manic +71 -0
  585. package/examples/story-dependent-chain-history.manic +56 -0
  586. package/examples/story-living-dependency-cloud.manic +50 -0
  587. package/examples/story-time-varying-field3.manic +57 -0
  588. package/examples/story.manic +4 -0
  589. package/examples/string-art-breath.manic +70 -0
  590. package/examples/string-wave.manic +10 -0
  591. package/examples/summary.manic +48 -0
  592. package/examples/svg-howto.manic +172 -0
  593. package/examples/svg-import.manic +18 -0
  594. package/examples/systems-architecture-poc.manic +92 -0
  595. package/examples/systems-arrow-patterns.manic +151 -0
  596. package/examples/systems-foundation.manic +71 -0
  597. package/examples/systems-rabbitmq-consumers.manic +118 -0
  598. package/examples/table.manic +39 -0
  599. package/examples/table_braces.manic +54 -0
  600. package/examples/tangent-length-short.manic +57 -0
  601. package/examples/tangent.manic +29 -0
  602. package/examples/tangents.manic +54 -0
  603. package/examples/taylor.manic +44 -0
  604. package/examples/terminal_boot.manic +40 -0
  605. package/examples/test.manic +61 -0
  606. package/examples/text-guide.manic +304 -0
  607. package/examples/textbook-coordinate-worlds.manic +129 -0
  608. package/examples/textbook-doubly-list.manic +33 -0
  609. package/examples/textbook-function-to-solid.manic +126 -0
  610. package/examples/textbook-geometry-dimension-reduction.manic +129 -0
  611. package/examples/textbook-incline-fbd.manic +43 -0
  612. package/examples/textbook-length-area-volume.manic +137 -0
  613. package/examples/textbook-matrix-inverses.manic +172 -0
  614. package/examples/textbook-pulley.manic +35 -0
  615. package/examples/textbook-statistical-dimensions.manic +151 -0
  616. package/examples/textbook-tension.manic +39 -0
  617. package/examples/textbook-watermelon-sections.manic +216 -0
  618. package/examples/thales-semicircle-short.manic +53 -0
  619. package/examples/three-d-v2-lab.manic +83 -0
  620. package/examples/three-d-v2-story.manic +106 -0
  621. package/examples/three-d-v2.manic +69 -0
  622. package/examples/three_d.manic +39 -0
  623. package/examples/timing-v2-scene.manic +47 -0
  624. package/examples/trajectory.manic +28 -0
  625. package/examples/transform_copy.manic +35 -0
  626. package/examples/transforms.manic +54 -0
  627. package/examples/trapped-light-dimensions.manic +226 -0
  628. package/examples/tree-of-leaves.manic +215 -0
  629. package/examples/triangle.manic +68 -0
  630. package/examples/two_person_walk.manic +296 -0
  631. package/examples/two_pointer.manic +32 -0
  632. package/examples/type-to-sdf.manic +139 -0
  633. package/examples/typewriter.manic +28 -0
  634. package/examples/vector_field.manic +32 -0
  635. package/examples/vertical-spring.manic +10 -0
  636. package/examples/volume3.manic +21 -0
  637. package/examples/volumes-solid-of-revolution.manic +111 -0
  638. package/examples/walk.manic +154 -0
  639. package/examples/wheel-duo.manic +91 -0
  640. package/examples/wheel-radial.manic +78 -0
  641. package/examples/wheel-square.manic +83 -0
  642. package/examples/wireframe-spheres.manic +37 -0
  643. package/examples/zeroth-law-thermodynamics.manic +269 -0
  644. package/package.json +59 -0
@@ -0,0 +1,385 @@
1
+ // ============================================================================
2
+ // second-law-thermodynamics.manic — entropy, irreversibility, and time's arrow
3
+ // ----------------------------------------------------------------------------
4
+ // Engine-test recreation of engine-test-4.mp4. The subject is thermodynamics,
5
+ // but the vocabulary stays generic: persistent particles, authored layouts,
6
+ // plots, counters, arrows, LaTeX, and ordinary timeline composition.
7
+ // ============================================================================
8
+
9
+ title("Second Law of Thermodynamics");
10
+ canvas("9:16");
11
+ template("mono");
12
+ watermark(manicMark, (150, 145), "Made With Manic");
13
+
14
+ let cold = 194;
15
+ let pink = 326;
16
+ let hot = 40;
17
+ let blue = 226;
18
+ let green = 154;
19
+ let red = 10;
20
+
21
+ // ---------------------------------------------------------------------------
22
+ // 1 · MIXING MULTIPLIES THE NUMBER OF POSSIBLE MICROSTATES
23
+ // ---------------------------------------------------------------------------
24
+
25
+ equation(law, (540, 175), `S=k_B\ln\Omega`, 58);
26
+ rect(mixBox, (540, 520), 720, 280);
27
+ outline(mixBox, dim); outlined(mixBox); stroke(mixBox, 3);
28
+ rect(mixLeft, (360, 520), 350, 260); hidden(mixLeft);
29
+ rect(mixRight, (720, 520), 350, 260); hidden(mixRight);
30
+ line(mixDivider, (540, 390), (540, 650)); color(mixDivider, dim); stroke(mixDivider, 2);
31
+
32
+ particles(mixCold, mixLeft, 36, 6, 17);
33
+ particles(mixWarm, mixRight, 36, 6, 29);
34
+ hue(mixCold, cold, 0.72, 0.68); hue(mixWarm, pink, 0.72, 0.68);
35
+ glow(mixCold, 0.8); glow(mixWarm, 0.8);
36
+
37
+ text(mixCaption, (540, 745), "Mixing creates overwhelmingly more possible states");
38
+ size(mixCaption, 27); color(mixCaption, dim);
39
+ line(mixX, (260, 1040), (570, 1040)); line(mixY, (260, 1040), (260, 840));
40
+ color(mixX, dim); color(mixY, dim); stroke(mixX, 2); stroke(mixY, 2);
41
+ plot(mixCurve, (260, 1040), 78, 175, "1-exp(-2*x)", (0, 3.6));
42
+ hue(mixCurve, blue, 0.55, 0.68); stroke(mixCurve, 4); untraced(mixCurve);
43
+ dot(mixMarker, (260, 1040), 7); color(mixMarker, fg); glow(mixMarker, 1.0);
44
+ equation(mixDelta, (385, 815), `\Delta S/(Nk_B\ln 2)`, 27); color(mixDelta, dim);
45
+ counter(mixCount, (735, 945), 0, 1, "log₁₀(Ω/Ω₀) = ", "");
46
+ size(mixCount, 28); hue(mixCount, hot, 0.45, 0.72);
47
+
48
+ tag(mixBox, s1); tag(mixDivider, s1);
49
+ tag(mixCold, s1); tag(mixWarm, s1); tag(mixCaption, s1);
50
+ tag(mixX, s1); tag(mixY, s1); tag(mixCurve, s1); tag(mixMarker, s1); tag(mixDelta, s1); tag(mixCount, s1);
51
+
52
+ // ---------------------------------------------------------------------------
53
+ // 2 · HEAT FLOW MAKES TOTAL ENTROPY INCREASE
54
+ // ---------------------------------------------------------------------------
55
+
56
+ rect(hotBox, (315, 500), 260, 240); rect(coldBox, (765, 500), 260, 240);
57
+ outline(hotBox, dim); outline(coldBox, dim); outlined(hotBox); outlined(coldBox);
58
+ stroke(hotBox, 3); stroke(coldBox, 3);
59
+ particles(hotMatter, hotBox, 26, 6, 41); particles(coldMatter, coldBox, 26, 6, 73);
60
+ hue(hotMatter, hot, 0.66, 0.68); hue(coldMatter, blue, 0.66, 0.68);
61
+ link(heatLink, hotBox, coldBox); hue(heatLink, blue, 0.46, 0.62); stroke(heatLink, 4);
62
+ hidden(heatLink);
63
+ equation(hotLabel, (315, 325), `T_h`, 36); equation(coldLabel, (765, 325), `T_c`, 36);
64
+ hue(hotLabel, hot, 0.58, 0.72); hue(coldLabel, blue, 0.58, 0.72);
65
+ counter(hotTemp, (315, 680), 403, 0, "", " K");
66
+ counter(coldTemp, (765, 680), 397, 0, "", " K");
67
+ hue(hotTemp, hot, 0.55, 0.70); hue(coldTemp, blue, 0.55, 0.70);
68
+ text(flowCaption, (540, 780), "Heat flows until both sides reach one temperature");
69
+ size(flowCaption, 27); color(flowCaption, dim);
70
+ line(flowX, (305, 1130), (650, 1130)); line(flowY, (305, 1130), (305, 880));
71
+ color(flowX, dim); color(flowY, dim); stroke(flowX, 2); stroke(flowY, 2);
72
+ plot(flowCurve, (305, 1130), 78, 215, "1-exp(-2.4*x)", (0, 3.6));
73
+ hue(flowCurve, blue, 0.56, 0.70); stroke(flowCurve, 4); untraced(flowCurve);
74
+ dot(flowMarker, (305, 1130), 7); color(flowMarker, fg); glow(flowMarker, 1.0);
75
+ equation(flowS, (430, 855), `S_{\mathrm{tot}}`, 30); color(flowS, dim);
76
+
77
+ tag(hotBox, s2); tag(coldBox, s2); tag(hotMatter, s2); tag(coldMatter, s2);
78
+ tag(hotLabel, s2); tag(coldLabel, s2); tag(hotTemp, s2); tag(coldTemp, s2);
79
+ tag(flowCaption, s2); tag(flowX, s2); tag(flowY, s2); tag(flowCurve, s2); tag(flowMarker, s2); tag(flowS, s2);
80
+ hidden(s2);
81
+
82
+ // ---------------------------------------------------------------------------
83
+ // 3 · FREE EXPANSION: ONE GAS, TWICE THE VOLUME
84
+ // ---------------------------------------------------------------------------
85
+
86
+ rect(expandBox, (540, 520), 720, 280); outline(expandBox, dim); outlined(expandBox); stroke(expandBox, 3);
87
+ rect(expandLeft, (360, 520), 350, 260); hidden(expandLeft);
88
+ line(expandDivider, (540, 390), (540, 650)); color(expandDivider, dim); stroke(expandDivider, 2);
89
+ hidden(expandDivider);
90
+ particles(expandGas, expandLeft, 54, 6, 101);
91
+ hue(expandGas, cold, 0.38, 0.76); glow(expandGas, 0.7);
92
+ text(expandCaption, (540, 745), "More volume means exponentially more possible states");
93
+ size(expandCaption, 27); color(expandCaption, dim);
94
+ line(expandX, (250, 1040), (560, 1040)); line(expandY, (250, 1040), (250, 845));
95
+ color(expandX, dim); color(expandY, dim); stroke(expandX, 2); stroke(expandY, 2);
96
+ plot(expandCurve, (250, 1040), 85, 60, "x", (0, 2.6));
97
+ hue(expandCurve, green, 0.52, 0.70); stroke(expandCurve, 4); untraced(expandCurve);
98
+ dot(expandMarker, (250, 1040), 7); color(expandMarker, fg); glow(expandMarker, 1.0);
99
+ equation(expandAxis, (390, 820), `\ln(V/V_0)/\ln 2`, 27); color(expandAxis, dim);
100
+ equation(expandStates, (760, 905), `V^N\longrightarrow(2V)^N`, 37);
101
+ hue(expandStates, hot, 0.52, 0.70);
102
+ counter(expandCount, (760, 1010), 8.9, 1, "log₁₀(Ω/Ω₀) = ", "");
103
+ size(expandCount, 26); color(expandCount, dim);
104
+
105
+ tag(expandBox, s3); tag(expandGas, s3);
106
+ tag(expandCaption, s3); tag(expandX, s3); tag(expandY, s3); tag(expandCurve, s3);
107
+ tag(expandMarker, s3); tag(expandAxis, s3); tag(expandStates, s3); tag(expandCount, s3);
108
+ hidden(s3);
109
+
110
+ // ---------------------------------------------------------------------------
111
+ // 4 · A HEAT ENGINE CANNOT TURN EVERY JOULE INTO WORK
112
+ // ---------------------------------------------------------------------------
113
+
114
+ line(hotRail, (230, 410), (850, 410)); hue(hotRail, hot, 0.72, 0.65); stroke(hotRail, 5);
115
+ line(coldRail, (230, 1200), (850, 1200)); hue(coldRail, blue, 0.72, 0.65); stroke(coldRail, 5);
116
+ equation(hotRailLabel, (540, 365), `T_h`, 31); equation(coldRailLabel, (540, 1250), `T_c`, 31);
117
+ hue(hotRailLabel, hot, 0.56, 0.70); hue(coldRailLabel, blue, 0.56, 0.70);
118
+ line(engineX, (265, 1010), (805, 1010)); line(engineY, (265, 1010), (265, 555));
119
+ color(engineX, dim); color(engineY, dim); stroke(engineX, 2); stroke(engineY, 2);
120
+ equation(engineP, (250, 520), `p`, 28); equation(engineV, (835, 1010), `V`, 28);
121
+ color(engineP, dim); color(engineV, dim);
122
+ // Two paths share the hot state, separate during the cycle, and reconverge.
123
+ // Each visible path is split only to carry the warm/cool colour progression;
124
+ // the hidden whole paths give `travel` one continuous geometric route.
125
+ plot(engineHotPath, (285, 990), 112, 235, "1/(x+0.65)+0.14+0.05*x*(4.1-x)", (0, 4.1));
126
+ plot(engineColdPath, (285, 990), 112, 235, "1/(x+0.65)+0.14-0.035*x*(4.1-x)", (0, 4.1));
127
+ hidden(engineHotPath); hidden(engineColdPath);
128
+ plot(engineHotA, (285, 990), 112, 235, "1/(x+0.65)+0.14+0.05*x*(4.1-x)", (0, 1.55));
129
+ plot(engineHotB, (285, 990), 112, 235, "1/(x+0.65)+0.14+0.05*x*(4.1-x)", (1.55, 4.1));
130
+ plot(engineColdA, (285, 990), 112, 235, "1/(x+0.65)+0.14-0.035*x*(4.1-x)", (0, 1.85));
131
+ plot(engineColdB, (285, 990), 112, 235, "1/(x+0.65)+0.14-0.035*x*(4.1-x)", (1.85, 4.1));
132
+ hue(engineHotA, hot, 0.68, 0.70); hue(engineHotB, red, 0.58, 0.69);
133
+ hue(engineColdA, 260, 0.52, 0.72); hue(engineColdB, blue, 0.62, 0.70);
134
+ stroke(engineHotA, 5); stroke(engineHotB, 5); stroke(engineColdA, 5); stroke(engineColdB, 5);
135
+ untraced(engineHotA); untraced(engineHotB); untraced(engineColdA); untraced(engineColdB);
136
+ dot(engineDot, (285, 596), 8); color(engineDot, fg); glow(engineDot, 1.1); hidden(engineDot);
137
+ arrow(qHot, (330, 410), (330, 610)); hue(qHot, hot, 0.72, 0.68); stroke(qHot, 4); untraced(qHot);
138
+ equation(qHotLabel, (360, 525), `Q_h`, 28); hue(qHotLabel, hot, 0.56, 0.70); hidden(qHotLabel);
139
+ arrow(workArrow, (650, 850), (875, 700)); color(workArrow, dim); stroke(workArrow, 4); untraced(workArrow);
140
+ equation(workLabel, (880, 660), `W`, 28); color(workLabel, dim); hidden(workLabel);
141
+ arrow(qCold, (675, 1000), (675, 1170)); hue(qCold, blue, 0.72, 0.68); stroke(qCold, 4); untraced(qCold);
142
+ equation(qColdLabel, (735, 1090), `|Q_c|`, 28); hue(qColdLabel, blue, 0.56, 0.70); hidden(qColdLabel);
143
+ text(engineCaption, (540, 1345), "A heat engine must release some heat");
144
+ size(engineCaption, 30); hue(engineCaption, hot, 0.38, 0.74);
145
+ equation(engineEta, (540, 1490), `\eta_C=1-\frac{T_c}{T_h}<1`, 47);
146
+
147
+ // Persistent transition strokes preserve object identity between scenes:
148
+ // entropy curve → heat connector → expansion divider, then the volume graph
149
+ // seeds the heat-engine curve. All are ordinary generic `morph` paths.
150
+ plot(mixToHeat, (260, 1040), 78, 175, "1-exp(-2*x)", (0, 3.6));
151
+ hue(mixToHeat, blue, 0.55, 0.68); stroke(mixToHeat, 4);
152
+ morph(mixToHeat, heatLink); hidden(mixToHeat);
153
+
154
+ line(heatToExpand, (445, 500), (635, 500));
155
+ hue(heatToExpand, blue, 0.46, 0.62); stroke(heatToExpand, 4);
156
+ morph(heatToExpand, expandDivider); hidden(heatToExpand);
157
+
158
+ line(engineSeed, (285, 596), (355, 790)); hidden(engineSeed);
159
+ plot(expandToEngine, (250, 1040), 85, 60, "x", (0, 2.6));
160
+ hue(expandToEngine, green, 0.52, 0.70); stroke(expandToEngine, 4);
161
+ morph(expandToEngine, engineSeed); hidden(expandToEngine);
162
+
163
+ tag(hotRail, s4); tag(coldRail, s4); tag(hotRailLabel, s4); tag(coldRailLabel, s4);
164
+ tag(engineX, s4); tag(engineY, s4); tag(engineP, s4); tag(engineV, s4);
165
+ tag(engineHotA, s4); tag(engineHotB, s4); tag(engineColdA, s4); tag(engineColdB, s4);
166
+ tag(engineCaption, s4); tag(engineEta, s4);
167
+ tag(engineDot, s4future); tag(qHot, s4future); tag(qHotLabel, s4future);
168
+ tag(workArrow, s4future); tag(workLabel, s4future);
169
+ tag(qCold, s4future); tag(qColdLabel, s4future);
170
+ hidden(s4);
171
+
172
+ // ---------------------------------------------------------------------------
173
+ // 5 · SAME ENDPOINTS, DIFFERENT ENTROPY PRODUCTION
174
+ // ---------------------------------------------------------------------------
175
+
176
+ text(revHead, (300, 350), "REV. LIMIT"); text(irrHead, (780, 350), "IRREV");
177
+ size(revHead, 28); size(irrHead, 28); hue(revHead, green, 0.45, 0.72); hue(irrHead, red, 0.55, 0.68);
178
+ rect(revPanel, (300, 610), 330, 330); rect(irrPanel, (780, 610), 330, 330);
179
+ outline(revPanel, dim); outline(irrPanel, dim); outlined(revPanel); outlined(irrPanel);
180
+ stroke(revPanel, 3); stroke(irrPanel, 3);
181
+ rect(revGasBox, (260, 610), 220, 210); rect(irrGasBox, (740, 610), 220, 210);
182
+ hidden(revGasBox); hidden(irrGasBox);
183
+ rect(revSmall, (215, 610), 120, 210); rect(irrSmall, (695, 610), 120, 210);
184
+ hidden(revSmall); hidden(irrSmall);
185
+ particles(revGas, revGasBox, 20, 5, 131, "grid");
186
+ particles(irrGas, irrGasBox, 20, 5, 151, "grid");
187
+ hue(revGas, green, 0.55, 0.72); hue(irrGas, red, 0.58, 0.68);
188
+ line(revPiston, (405, 505), (405, 715)); line(irrPiston, (885, 505), (885, 715));
189
+ color(revPiston, dim); color(irrPiston, dim); stroke(revPiston, 5); stroke(irrPiston, 5);
190
+ text(compareCaption, (540, 865), "Same endpoints · different entropy production");
191
+ size(compareCaption, 28); color(compareCaption, dim);
192
+ rect(revMeter, (300, 1120), 70, 260); rect(irrMeter, (780, 1120), 70, 260);
193
+ outline(revMeter, dim); outline(irrMeter, dim); outlined(revMeter); outlined(irrMeter);
194
+ stroke(revMeter, 3); stroke(irrMeter, 3);
195
+ line(irrBar, (780, 1235), (780, 1235)); hue(irrBar, red, 0.72, 0.67); stroke(irrBar, 28);
196
+ line(revZero, (278, 1235), (322, 1235)); hue(revZero, green, 0.58, 0.70); stroke(revZero, 5);
197
+ equation(revEq, (300, 1325), `S_{\mathrm{gen}}=0`, 31);
198
+ equation(irrEq, (780, 1325), `S_{\mathrm{gen}}>0`, 31);
199
+ hue(revEq, green, 0.48, 0.70); hue(irrEq, red, 0.55, 0.68);
200
+
201
+ tag(revHead, s5); tag(irrHead, s5); tag(revPanel, s5); tag(irrPanel, s5);
202
+ tag(revGas, s5); tag(irrGas, s5); tag(revPiston, s5); tag(irrPiston, s5); tag(compareCaption, s5);
203
+ tag(revMeter, s5); tag(irrMeter, s5); tag(irrBar, s5); tag(revZero, s5); tag(revEq, s5); tag(irrEq, s5);
204
+ hidden(s5);
205
+
206
+ // ---------------------------------------------------------------------------
207
+ // 6 · THE ARROW OF TIME IS A STATISTICAL ARROW
208
+ // ---------------------------------------------------------------------------
209
+
210
+ rect(timeBox, (540, 610), 720, 310); outline(timeBox, dim); outlined(timeBox); stroke(timeBox, 3);
211
+ particles(timeGas, timeBox, 63, 6, 211, "grid");
212
+ hue(timeGas, hot, 0.48, 0.74); glow(timeGas, 0.7);
213
+ arrow(timeForward, (300, 980), (780, 980)); hue(timeForward, red, 0.62, 0.69); stroke(timeForward, 5);
214
+ equation(timeForwardLabel, (540, 1035), `t`, 28); color(timeForwardLabel, dim);
215
+ arrow(timeReverse, (780, 980), (300, 980)); color(timeReverse, fg); stroke(timeReverse, 5); hidden(timeReverse);
216
+ equation(timeReverseLabel, (540, 1035), `t`, 28); color(timeReverseLabel, dim); hidden(timeReverseLabel);
217
+ text(timeCaption, (540, 1135), "A special state naturally spreads into a typical one");
218
+ size(timeCaption, 29); hue(timeCaption, hot, 0.34, 0.74);
219
+ equation(returnProb, (540, 285), `\Pr(\mathrm{return})=\frac{\Omega_{\mathrm{low}}}{\Omega_{\mathrm{eq}}}=e^{-\Delta S/k_B}`, 43);
220
+ equation(returnOdds, (540, 365), `\Pr(\mathrm{ordered\ return})<10^{-40}`, 34);
221
+ hue(returnOdds, hot, 0.48, 0.72); hidden(returnProb); hidden(returnOdds);
222
+
223
+ tag(timeBox, s6); tag(timeGas, s6gas); tag(timeForward, s6); tag(timeForwardLabel, s6);
224
+ tag(timeCaption, s6);
225
+ tag(timeReverse, s6future); tag(timeReverseLabel, s6future);
226
+ tag(returnProb, s6future); tag(returnOdds, s6future);
227
+ hidden(s6); hidden(s6gas);
228
+
229
+ circle(finalOrbit, (540, 790), 270); hidden(finalOrbit);
230
+ for i in 0..72 {
231
+ let a = tau*i/72;
232
+ dot(finalDot{i}, (540 + 270*cos(a), 790 + 270*sin(a)), 4);
233
+ hue(finalDot{i}, 10 + 300*i/72, 0.54, 0.62);
234
+ glow(finalDot{i}, 0.5);
235
+ tag(finalDot{i}, finalRing);
236
+ }
237
+ equation(finalLaw, (540, 765), `\Delta S_{\mathrm{universe}}=S_{\mathrm{gen}}\ge 0`, 48);
238
+ text(finalCaption, (540, 875), "Irreversible change produces entropy");
239
+ size(finalCaption, 31); color(finalCaption, dim);
240
+ hidden(finalRing); hidden(finalLaw); hidden(finalCaption);
241
+
242
+ // ---------------------------------------------------------------------------
243
+ // TIMELINE · six continuous beats, approximately 39 seconds
244
+ // ---------------------------------------------------------------------------
245
+
246
+ step("mixing") {
247
+ wait(5.5);
248
+ par {
249
+ seq { wait(0.45); fade(mixDivider, 0.20); }
250
+ seq { wait(0.55); arrange(mixCold, mixBox, "random", 0.95, out); wander(mixCold, 4.0); }
251
+ seq { wait(0.55); arrange(mixWarm, mixBox, "random", 0.95, out); wander(mixWarm, 4.0); }
252
+ seq {
253
+ wait(0.55);
254
+ par {
255
+ draw(mixCurve, 2.20, out);
256
+ travel(mixMarker, mixCurve, 2.20, out);
257
+ to(mixCount, value, 25.3, 2.20, out);
258
+ }
259
+ }
260
+ }
261
+ }
262
+
263
+ step("heat-flow") {
264
+ seq {
265
+ par {
266
+ fade(s1, 0.65);
267
+ show(mixToHeat, 0.10);
268
+ to(mixToHeat, morph, 1, 0.65, smooth);
269
+ seq { wait(0.20); show(s2, 0.45); }
270
+ rewrite(law, `\dot S_{\mathrm{tot}}=K\frac{(T_h-T_c)^2}{T_hT_c}>0`, 0.65, smooth);
271
+ }
272
+ par {
273
+ wander(hotMatter, 4.4);
274
+ wander(coldMatter, 4.4);
275
+ draw(flowCurve, 3.6, smooth);
276
+ travel(flowMarker, flowCurve, 3.6, smooth);
277
+ to(hotTemp, value, 400, 4.0, smooth);
278
+ to(coldTemp, value, 400, 4.0, smooth);
279
+ recolor(hotMatter, cyan, 4.0);
280
+ recolor(coldMatter, cyan, 4.0);
281
+ seq { flow(mixToHeat, 1.1); flow(mixToHeat, 1.1); flow(mixToHeat, 1.1); flow(mixToHeat, 1.1); }
282
+ }
283
+ wait(0.45);
284
+ }
285
+ }
286
+
287
+ step("free-expansion") {
288
+ seq {
289
+ par {
290
+ fade(s2, 0.65);
291
+ fade(mixToHeat, 0.25);
292
+ show(heatToExpand, 0.10);
293
+ to(heatToExpand, morph, 1, 0.65, smooth);
294
+ recolor(heatToExpand, dim, 0.65);
295
+ seq { wait(0.20); show(s3, 0.45); }
296
+ rewrite(law, `\Delta S=Nk_B\ln 2`, 0.65, smooth);
297
+ }
298
+ par {
299
+ seq { arrange(expandGas, expandBox, "random", 1.10, out); wander(expandGas, 1.45); }
300
+ fade(heatToExpand, 0.65);
301
+ draw(expandCurve, 2.45, smooth);
302
+ travel(expandMarker, expandCurve, 2.45, smooth);
303
+ to(expandCount, value, 20.9, 2.45, smooth);
304
+ }
305
+ wait(0.25);
306
+ }
307
+ }
308
+
309
+ step("heat-engine") {
310
+ seq {
311
+ par {
312
+ fade(s3, 0.65);
313
+ show(expandToEngine, 0.10);
314
+ to(expandToEngine, morph, 1, 0.65, smooth);
315
+ seq { wait(0.20); show(s4, 0.45); }
316
+ rewrite(law, `\frac{Q_h}{T_h}=\frac{|Q_c|}{T_c}`, 0.65, smooth);
317
+ }
318
+ par {
319
+ seq { draw(engineHotA, 1.85, smooth); draw(engineHotB, 3.35, smooth); }
320
+ seq { draw(engineColdA, 2.35, smooth); draw(engineColdB, 2.85, smooth); }
321
+ seq {
322
+ wait(0.15); show(engineDot, 0.15);
323
+ travel(engineDot, engineColdPath, 4.9, smooth);
324
+ }
325
+ fade(expandToEngine, 0.30);
326
+ seq { draw(qHot, 0.7); show(qHotLabel, 0.2); wait(1.0); }
327
+ seq { wait(1.3); draw(workArrow, 0.8); show(workLabel, 0.2); }
328
+ seq { wait(2.6); draw(qCold, 0.8); show(qColdLabel, 0.2); }
329
+ }
330
+ wait(2.15);
331
+ }
332
+ }
333
+
334
+ step("entropy-generation") {
335
+ seq {
336
+ par {
337
+ fade(s4, 0.50); fade(s4future, 0.50);
338
+ show(s5, 0.50);
339
+ rewrite(law, `\Delta S_{\mathrm{universe}}=S_{\mathrm{gen}}`, 0.50, smooth);
340
+ }
341
+ par {
342
+ arrange(revGas, revSmall, "grid", 2.4, smooth);
343
+ arrange(irrGas, irrSmall, "random", 2.4, smooth);
344
+ par { move(revPiston, (275, 505), 2.4, smooth); grow(revPiston, (275, 715), 2.4, smooth); }
345
+ par { move(irrPiston, (755, 505), 2.4, smooth); grow(irrPiston, (755, 715), 2.4, smooth); }
346
+ grow(irrBar, (780, 1025), 2.4, smooth);
347
+ }
348
+ wait(1.10);
349
+ }
350
+ }
351
+
352
+ step("time-arrow") {
353
+ seq {
354
+ par {
355
+ fade(s5, 0.50); fade(law, 0.50);
356
+ show(s6, 0.50); show(s6gas, 0.50);
357
+ }
358
+ par {
359
+ arrange(timeGas, timeBox, "random", 4.0, smooth);
360
+ seq { wait(3.0); pulse(timeForward, 0.8); }
361
+ }
362
+ wait(0.35);
363
+ par {
364
+ fade(timeForward, 0.30); fade(timeForwardLabel, 0.30);
365
+ show(timeReverse, 0.30); show(timeReverseLabel, 0.30);
366
+ say(timeCaption, "Exact reversal can reconstruct the past", 0.35);
367
+ }
368
+ arrange(timeGas, timeBox, "grid", 3.1, smooth);
369
+ par {
370
+ show(returnProb, 0.45); show(returnOdds, 0.45);
371
+ say(timeCaption, "But that reversal must be fantastically precise", 0.40);
372
+ }
373
+ wait(1.15);
374
+ par {
375
+ fade(s6, 0.90);
376
+ fade(s6future, 0.90);
377
+ arrange(timeGas, finalOrbit, "ring", 0.90, smooth);
378
+ seq { wait(0.55); fade(s6gas, 0.35); }
379
+ seq { wait(0.55); show(finalRing, 0.35); }
380
+ seq { wait(0.55); transform(finalRing, (540,790), 0.9511, -0.3090, 0.3090, 0.9511, 0.55, out); }
381
+ seq { wait(0.30); par { show(finalLaw, 0.60); show(finalCaption, 0.60); } }
382
+ }
383
+ wait(1.70);
384
+ }
385
+ }
@@ -0,0 +1,8 @@
1
+ // series-parallel-springs.manic — same mass, springs in series vs parallel.
2
+ title("Series vs parallel springs");
3
+ canvas("16:9");
4
+ text(hdr,(cx,44),"Same mass, same springs — series is soft (slow), parallel is stiff (fast)"); size(hdr,21); color(hdr,cyan); bold(hdr); display(hdr);
5
+ seriesparallel(sp, (560,150), 68);
6
+ timegraph(sp, (1060,320), 95); // y_s(t) vs y_p(t): parallel oscillates faster
7
+ text(cap,(cx,h-30),"parallel adds stiffness (k₁+k₂); series divides it (1/k = 1/k₁+1/k₂)"); size(cap,15); color(cap,dim); display(cap);
8
+ run(sp, 11);
@@ -0,0 +1,145 @@
1
+ title("Serverless Event Processing — From Kafka to Cold Storage");
2
+ canvas("16:9");
3
+ template("neon");
4
+
5
+ let u = (w+h-abs(w-h))/1440;
6
+ watermark(mark, (w*0.15, h*0.055), "Made With Manic");
7
+ text(kicker, (cx, h*0.055), "SERVERLESS · EVENT PROCESSING · MIXED STACK");
8
+ text(headline, (cx, h*0.115), "Events in. Results, dead letters, and cold storage out.");
9
+ text(caption, (cx, h*0.935), "Dashed relationships show every route the architecture allows.");
10
+ size(kicker, 16*u); color(kicker, dim); bold(kicker);
11
+ size(headline, 27*u); bold(headline); wrap(headline, w*0.88);
12
+ size(caption, 18*u); color(caption, dim); wrap(caption, w*0.86);
13
+
14
+ if h > 1.25*w {
15
+ architecture(pipeline, (cx, h*0.52), w*0.86, h*0.72);
16
+ }
17
+ else {
18
+ architecture(pipeline, (cx, h*0.52), w*0.94, h*0.70);
19
+ }
20
+
21
+ // --- the ingress + event source + a bold analytics tap (on-prem stack) ---
22
+ cluster(ingest, pipeline, "INGEST");
23
+ node(ingress, ingest, "onprem:fluentd", "logging");
24
+ node(source, ingest, "onprem:kafka", "Event-Sourcing");
25
+ node(spark, ingest, "onprem:spark", "Spark");
26
+
27
+ cluster(flows, pipeline, "EVENT FLOWS");
28
+
29
+ cluster(engines, flows, "DATA PROCESSING ENGINES");
30
+ node(clicks, engines, "onprem:docker", "click stream");
31
+ node(logins, engines, "onprem:docker", "user logins");
32
+ node(analytics, engines, "onprem:docker", "data analytics");
33
+
34
+ node(queue, flows, "aws:sqs", "results queue");
35
+ node(dlq, flows, "aws:sqs", "Dead Letter Queue");
36
+
37
+ cluster(processing, flows, "PROCESSING");
38
+ node(persist, processing, "aws:lambda", "persist results");
39
+
40
+ cluster(storage, flows, "STORAGE");
41
+ node(store, storage, "aws:s3", "cold storage");
42
+ node(dw, storage, "aws:redshift", "operational storage");
43
+
44
+ // --- topology (Mingrammer edges) ---
45
+ connect(parse, ingress, source); // ingress >> Edge("parse") >> source
46
+ connect(toSpark, source, spark); // source >> Edge(bold) >> Spark
47
+ connect(toEngines, source, engines); // source >> workers
48
+ connect(toQueue, engines, queue); // workers >> queue
49
+ connect(toHandlers, queue, processing); // queue >> handlers
50
+ connect(toDlq, queue, dlq, 120*u); // queue >> dlq
51
+ connect(toStore, processing, store); // handlers >> store
52
+ connect(toDw, processing, dw); // handlers >> dw
53
+
54
+ // --- colour every path by its RELATIONSHIP (cold dashed line + hot overlay) ---
55
+ color(parse, cyan); color(parse.hot, cyan);
56
+ color(toEngines, cyan); color(toEngines.hot, cyan);
57
+ color(toQueue, cyan); color(toQueue.hot, cyan);
58
+ color(toHandlers, cyan); color(toHandlers.hot, cyan);
59
+ color(toSpark, magenta); color(toSpark.hot, magenta);
60
+ color(toStore, gold); color(toStore.hot, gold);
61
+ color(toDw, gold); color(toDw.hot, gold);
62
+ color(toDlq, red); color(toDlq.hot, red);
63
+ // legend
64
+ text(legPipe, (w*0.24, h*0.175), "PIPELINE"); size(legPipe, 13); color(legPipe, cyan); bold(legPipe);
65
+ text(legAna, (w*0.40, h*0.175), "ANALYTICS"); size(legAna, 13); color(legAna, magenta); bold(legAna);
66
+ text(legStore, (w*0.58, h*0.175), "STORAGE"); size(legStore, 13); color(legStore, gold); bold(legStore);
67
+ text(legDlq, (w*0.74, h*0.175), "DEAD-LETTER"); size(legDlq, 13); color(legDlq, red); bold(legDlq);
68
+ hidden(legPipe); hidden(legAna); hidden(legStore); hidden(legDlq);
69
+ message(event, source, "event");
70
+
71
+ hidden(pipeline.nodes);
72
+ hidden(ingest.parts); hidden(flows.parts); hidden(engines.parts); hidden(processing.parts); hidden(storage.parts);
73
+ hidden(event.parts);
74
+ untraced(parse); untraced(toSpark); untraced(toEngines); untraced(toQueue);
75
+ untraced(toHandlers); untraced(toDlq); untraced(toStore); untraced(toDw);
76
+
77
+ step("ingest") {
78
+ par {
79
+ show(ingest.parts, 0.45);
80
+ show(ingress, 0.40);
81
+ show(source, 0.40);
82
+ show(spark, 0.40);
83
+ say(caption, "Fluentd parses raw logs into Kafka; a bold tap also streams the source into Spark.", 0.40);
84
+ }
85
+ }
86
+ wait(0.20);
87
+
88
+ step("event-flows") {
89
+ par {
90
+ show(flows.parts, 0.50);
91
+ show(engines.parts, 0.45);
92
+ stagger(0.10) { show(clicks, 0.35); show(logins, 0.35); show(analytics, 0.35); }
93
+ show(queue, 0.40); show(dlq, 0.40);
94
+ show(processing.parts, 0.45); show(persist, 0.40);
95
+ show(storage.parts, 0.45); show(store, 0.40); show(dw, 0.40);
96
+ say(caption, "Docker engines process the stream; a queue, a dead-letter queue, a Lambda, and storage complete it.", 0.40);
97
+ }
98
+ }
99
+ wait(0.20);
100
+
101
+ step("possible-topology") {
102
+ par {
103
+ stagger(0.08) {
104
+ draw(parse, 0.4); draw(toEngines, 0.4); draw(toQueue, 0.4); draw(toHandlers, 0.4);
105
+ draw(toDlq, 0.4); draw(toStore, 0.4); draw(toDw, 0.4); draw(toSpark, 0.4);
106
+ }
107
+ show(legPipe, 0.3); show(legAna, 0.3); show(legStore, 0.3); show(legDlq, 0.3);
108
+ say(caption, "Every dashed edge is a possible relationship—not a claim that data is flowing.", 0.40);
109
+ }
110
+ }
111
+ wait(0.30);
112
+
113
+ step("ingress-flow") {
114
+ par {
115
+ seq { flow(parse, 1.0); flow(toSpark, 1.0); }
116
+ say(caption, "Logging → parse → Kafka → Spark: the ingest-and-analytics tap.", 0.40);
117
+ }
118
+ }
119
+ wait(0.20);
120
+
121
+ step("runtime-hot-path") {
122
+ par {
123
+ show(event.parts, 0.25);
124
+ hotpath(event, 6.0, 27);
125
+ say(caption, "One event chooses valid branches: Kafka → an engine → results queue → Lambda → storage.", 0.40);
126
+ }
127
+ }
128
+ wait(0.30);
129
+
130
+ step("dead-letter") {
131
+ par {
132
+ flow(toDlq, 1.2);
133
+ say(caption, "Messages the handler cannot process are diverted to the dead-letter queue.", 0.40);
134
+ }
135
+ }
136
+ wait(0.30);
137
+
138
+ step("takeaway") {
139
+ par {
140
+ pulse(flows.parts, 0.70);
141
+ pulse(event.parts, 0.60);
142
+ say(caption, "One mixed stack—on-prem ingest, serverless compute, cloud storage—stays readable end to end.", 0.45);
143
+ }
144
+ }
145
+ wait(1.40);
@@ -0,0 +1,35 @@
1
+ // shader-cellular — the Book-of-Shaders "Cellular noise" (Worley/Voronoi)
2
+ // chapter. `voronoi(x,y)` scatters one feature point per unit cell and returns
3
+ // the distance to the NEAREST one — so the field organises into cells: bright
4
+ // near a point, dark at the equidistant borders. Drifting the coordinate in `t`
5
+ // makes the cells flow. The 3×3 neighbour search runs inside the engine, so the
6
+ // formula stays a closed-form, seekable function of (u, v, t) — no loop in the DSL.
7
+ //
8
+ // manic examples/shader-cellular.manic
9
+ title("Cellular noise — a Voronoi shader");
10
+ canvas("9:16");
11
+ template("black");
12
+
13
+ shader(bg) {
14
+ let s = 5.5;
15
+ let d = voronoi(u*s*asp, v*s + t*0.4); // distance to nearest cell point
16
+ let edge = smoothstep(0.0, 0.08, d); // ~0 at borders → dark cracks
17
+ let tb = smoothstep(0.0, 0.14, v) * smoothstep(1.0, 0.86, v); // darken top/bottom so captions read
18
+ let hue = mod(d*200.0 + t*24.0, 360.0); // colour by distance
19
+ let sat = 0.8;
20
+ let val = (0.15 + 0.7*edge) * tb;
21
+ }
22
+
23
+ caption(head, "Cellular noise", (540, 150), 34);
24
+ caption(sub, "distance to the nearest of many scattered points", (540, 214), 20);
25
+ hidden(head);
26
+ hidden(sub);
27
+ equation(eq, (540, 1720), `F_1(p)=\min_i\;\lVert p - q_i\rVert`, 34);
28
+ hidden(eq);
29
+
30
+ show(head);
31
+ wait(1.4);
32
+ show(sub);
33
+ wait(2.4);
34
+ show(eq);
35
+ wait(22);
@@ -0,0 +1,45 @@
1
+ // shader-fractal — a LIVING Julia set. Each pixel iterates z = z² + c a fixed
2
+ // number of times and colours by how fast it escapes — the Book-of-Shaders
3
+ // "Fractals" chapter, but with NO per-pixel loop in the DSL: `julia(zx,zy,cx,cy)`
4
+ // runs the iteration in the engine and returns an escape fraction in [0,1]. We
5
+ // sweep the constant `c` in a circle over time, so the fractal morphs through the
6
+ // whole Julia family — every frame still a pure function of `t` (scrub-safe).
7
+ //
8
+ // manic examples/shader-fractal.manic
9
+ title("A living Julia set — one formula per pixel");
10
+ canvas("9:16");
11
+ template("black");
12
+
13
+ shader(bg) {
14
+ // complex plane, aspect-corrected and centred
15
+ let zx = (u - 0.5) * 3.0 * asp;
16
+ let zy = (v - 0.5) * 3.0;
17
+ // the constant c orbits slowly → the set continuously morphs
18
+ let cx = 0.7 * cos(t * 0.35);
19
+ let cy = 0.7 * sin(t * 0.35);
20
+ let e = julia(zx, zy, cx, cy); // escape fraction: 1 = trapped, 0 = flees
21
+ let inside = step(0.985, e); // 1 for the fractal body
22
+ let band = 0.5 + 0.5 * sin(e * 26.0 - t * 2.0); // rainbow escape contours
23
+ let glow = 1.0 - inside; // dark body, lit exterior
24
+ let r = band * glow;
25
+ let g = (0.4 + 0.6 * band) * glow;
26
+ let b = (1.0 - 0.5 * band) * glow + inside * 0.06;
27
+ }
28
+
29
+ // ---- textbook annotations ----
30
+ caption(head, "A living Julia set", (540, 150), 34);
31
+ caption(sub, "z → z² + c, coloured by escape speed", (540, 214), 20);
32
+ hidden(head);
33
+ hidden(sub);
34
+ equation(eq, (540, 1720), `z_{n+1} = z_n^2 + c`, 44);
35
+ caption(lab, "no per-pixel loop in the DSL — the engine iterates", (540, 1800), 20);
36
+ hidden(eq);
37
+ hidden(lab);
38
+
39
+ show(head);
40
+ wait(1.4);
41
+ show(sub);
42
+ wait(2.4);
43
+ show(eq);
44
+ show(lab);
45
+ wait(24);
@@ -0,0 +1,34 @@
1
+ // shader-fx — the Layer-1 shader/formula helpers (fx kit) in action: `fill` and
2
+ // `stroke` turn an SDF distance into a solid + an outline, `gain` shapes a gradient.
3
+ // All scalar builtins, transpiled to GLSL with the CPU field as the exact fallback.
4
+ //
5
+ // manic examples/shader-fx.manic
6
+ title("fill · stroke · gain — SDF mask helpers");
7
+ canvas("16:9");
8
+ template("black");
9
+
10
+ shader(fx) {
11
+ let x = u * asp;
12
+ let y = v;
13
+
14
+ // three shapes, unioned
15
+ let s0 = sdhexagon(x - 0.60, y - 0.5, 0.15);
16
+ let s1 = sdstar(x - 1.05, y - 0.5, 0.17, 5);
17
+ let s2 = sdcircle(x - 1.48, y - 0.5, 0.13);
18
+ let d = smin(smin(s0, s1, 0.01), s2, 0.01);
19
+
20
+ // masks from the distance
21
+ let fl = fill(d, 0.0, 0.004); // 1 inside → 0 outside
22
+ let ol = stroke(d, 0.0, 0.03, 0.004); // bright band on the iso-line
23
+
24
+ // gain-shaped vertical gradient behind the shapes
25
+ let bgv = gain(v, 2.2);
26
+ let base = 0.10 + 0.20 * bgv;
27
+
28
+ // compose: gradient bg, teal fill, white outline
29
+ let r = mix(mix(base, 0.16, fl), 1.0, ol);
30
+ let g = mix(mix(base, 0.52, fl), 1.0, ol);
31
+ let b = mix(mix(base * 1.7, 0.62, fl), 1.0, ol);
32
+ }
33
+
34
+ wait(4);