lateralus-lang 2.4.0__tar.gz

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 (284) hide show
  1. lateralus_lang-2.4.0/CHANGELOG.md +1367 -0
  2. lateralus_lang-2.4.0/CONTRIBUTING.md +169 -0
  3. lateralus_lang-2.4.0/MANIFEST.in +45 -0
  4. lateralus_lang-2.4.0/Makefile +138 -0
  5. lateralus_lang-2.4.0/PKG-INFO +411 -0
  6. lateralus_lang-2.4.0/README.md +390 -0
  7. lateralus_lang-2.4.0/RELEASE_NOTES.md +190 -0
  8. lateralus_lang-2.4.0/ROADMAP.md +313 -0
  9. lateralus_lang-2.4.0/bin/ltlc +226 -0
  10. lateralus_lang-2.4.0/bootstrap/v2_bench.ltl +554 -0
  11. lateralus_lang-2.4.0/bootstrap/v2_codegen.ltl +269 -0
  12. lateralus_lang-2.4.0/bootstrap/v2_crypto_lbe.ltl +1056 -0
  13. lateralus_lang-2.4.0/bootstrap/v2_debugger.ltl +669 -0
  14. lateralus_lang-2.4.0/bootstrap/v2_error_engine.ltl +834 -0
  15. lateralus_lang-2.4.0/bootstrap/v2_formatter.ltl +438 -0
  16. lateralus_lang-2.4.0/bootstrap/v2_ir_codegen.ltl +640 -0
  17. lateralus_lang-2.4.0/bootstrap/v2_lexer.ltl +508 -0
  18. lateralus_lang-2.4.0/bootstrap/v2_linter.ltl +619 -0
  19. lateralus_lang-2.4.0/bootstrap/v2_optimizer.ltl +857 -0
  20. lateralus_lang-2.4.0/bootstrap/v2_parser.ltl +897 -0
  21. lateralus_lang-2.4.0/bootstrap/v2_pattern_engine.ltl +891 -0
  22. lateralus_lang-2.4.0/bootstrap/v2_profiler.ltl +517 -0
  23. lateralus_lang-2.4.0/bootstrap/v2_python_codegen.ltl +730 -0
  24. lateralus_lang-2.4.0/bootstrap/v2_query_engine.ltl +1248 -0
  25. lateralus_lang-2.4.0/bootstrap/v2_reactive.ltl +898 -0
  26. lateralus_lang-2.4.0/bootstrap/v2_science.ltl +628 -0
  27. lateralus_lang-2.4.0/bootstrap/v2_source_map.ltl +310 -0
  28. lateralus_lang-2.4.0/bootstrap/v2_test_runner.ltl +271 -0
  29. lateralus_lang-2.4.0/bootstrap/v2_type_system.ltl +1552 -0
  30. lateralus_lang-2.4.0/docs/architecture.ltlml +412 -0
  31. lateralus_lang-2.4.0/docs/blog/hacking-with-lateralus.ltlml +195 -0
  32. lateralus_lang-2.4.0/docs/blog/lateralusos-phase3.ltlml +194 -0
  33. lateralus_lang-2.4.0/docs/blog/pipelines-deep-dive.ltlml +310 -0
  34. lateralus_lang-2.4.0/docs/blog/release-v1.3.ltlml +143 -0
  35. lateralus_lang-2.4.0/docs/blog/release-v1.5.ltlml +148 -0
  36. lateralus_lang-2.4.0/docs/blog/scientific-computing.ltlml +249 -0
  37. lateralus_lang-2.4.0/docs/blog/self-hosting-journey.ltlml +250 -0
  38. lateralus_lang-2.4.0/docs/blog/v15-type-system.ltlml +164 -0
  39. lateralus_lang-2.4.0/docs/blog/why-lateralus.ltlml +225 -0
  40. lateralus_lang-2.4.0/docs/cookbook.ltlml +1067 -0
  41. lateralus_lang-2.4.0/docs/grammar.ebnf +458 -0
  42. lateralus_lang-2.4.0/docs/index.ltlml +281 -0
  43. lateralus_lang-2.4.0/docs/language-spec.ltlml +1052 -0
  44. lateralus_lang-2.4.0/docs/papers/lateralus-design-paper.ltlml +214 -0
  45. lateralus_lang-2.4.0/docs/quick-reference.ltlml +474 -0
  46. lateralus_lang-2.4.0/docs/tutorial.ltlml +1450 -0
  47. lateralus_lang-2.4.0/examples/advanced_pipeline.ltl +237 -0
  48. lateralus_lang-2.4.0/examples/aim_messenger.ltl +1387 -0
  49. lateralus_lang-2.4.0/examples/async_demo.ltl +163 -0
  50. lateralus_lang-2.4.0/examples/c_backend_demo.ltl +116 -0
  51. lateralus_lang-2.4.0/examples/concurrent_demo.ltl +76 -0
  52. lateralus_lang-2.4.0/examples/crypto_challenges.ltl +181 -0
  53. lateralus_lang-2.4.0/examples/crypto_demo.ltl +96 -0
  54. lateralus_lang-2.4.0/examples/data_pipeline.ltl +137 -0
  55. lateralus_lang-2.4.0/examples/enum_demo.ltl +159 -0
  56. lateralus_lang-2.4.0/examples/error_demo.ltl +44 -0
  57. lateralus_lang-2.4.0/examples/fibonacci.ltasm +80 -0
  58. lateralus_lang-2.4.0/examples/fibonacci.ltl +22 -0
  59. lateralus_lang-2.4.0/examples/full_showcase.ltl +229 -0
  60. lateralus_lang-2.4.0/examples/game_of_life.ltl +209 -0
  61. lateralus_lang-2.4.0/examples/graph_demo.ltl +265 -0
  62. lateralus_lang-2.4.0/examples/hello.ltasm +39 -0
  63. lateralus_lang-2.4.0/examples/hello.ltl +20 -0
  64. lateralus_lang-2.4.0/examples/interpreter_demo.ltl +394 -0
  65. lateralus_lang-2.4.0/examples/irc_chat.ltl +1190 -0
  66. lateralus_lang-2.4.0/examples/math_demo.ltl +188 -0
  67. lateralus_lang-2.4.0/examples/neural_network.ltl +249 -0
  68. lateralus_lang-2.4.0/examples/physics_sim.ltl +275 -0
  69. lateralus_lang-2.4.0/examples/polyglot_demo.ltl +130 -0
  70. lateralus_lang-2.4.0/examples/science_demo.ltl +151 -0
  71. lateralus_lang-2.4.0/examples/showcase.ltl +258 -0
  72. lateralus_lang-2.4.0/examples/signal_processing.ltl +197 -0
  73. lateralus_lang-2.4.0/examples/statistics_demo.ltl +271 -0
  74. lateralus_lang-2.4.0/examples/structs.ltl +146 -0
  75. lateralus_lang-2.4.0/examples/testing_demo.ltl +250 -0
  76. lateralus_lang-2.4.0/examples/v14_showcase.ltl +133 -0
  77. lateralus_lang-2.4.0/examples/v15_showcase.ltl +249 -0
  78. lateralus_lang-2.4.0/examples/v15_types.ltl +125 -0
  79. lateralus_lang-2.4.0/examples/v16_showcase.ltl +146 -0
  80. lateralus_lang-2.4.0/examples/v17_showcase.ltl +183 -0
  81. lateralus_lang-2.4.0/examples/v18_showcase.ltl +184 -0
  82. lateralus_lang-2.4.0/examples/v19_showcase.ltl +238 -0
  83. lateralus_lang-2.4.0/examples/v20_showcase.ltl +401 -0
  84. lateralus_lang-2.4.0/examples/v21_showcase.ltl +401 -0
  85. lateralus_lang-2.4.0/examples/v22_showcase.ltl +263 -0
  86. lateralus_lang-2.4.0/examples/v23_showcase.ltl +445 -0
  87. lateralus_lang-2.4.0/lateralus_lang/__init__.py +45 -0
  88. lateralus_lang-2.4.0/lateralus_lang/__main__.py +697 -0
  89. lateralus_lang-2.4.0/lateralus_lang/ast_nodes.py +1325 -0
  90. lateralus_lang-2.4.0/lateralus_lang/async_runtime.py +669 -0
  91. lateralus_lang-2.4.0/lateralus_lang/bench.py +570 -0
  92. lateralus_lang-2.4.0/lateralus_lang/binary.py +512 -0
  93. lateralus_lang-2.4.0/lateralus_lang/bytecode_format.py +556 -0
  94. lateralus_lang-2.4.0/lateralus_lang/cli_extensions.py +266 -0
  95. lateralus_lang-2.4.0/lateralus_lang/codegen/__init__.py +14 -0
  96. lateralus_lang-2.4.0/lateralus_lang/codegen/bytecode.py +315 -0
  97. lateralus_lang-2.4.0/lateralus_lang/codegen/c.py +1280 -0
  98. lateralus_lang-2.4.0/lateralus_lang/codegen/javascript.py +1228 -0
  99. lateralus_lang-2.4.0/lateralus_lang/codegen/python.py +1895 -0
  100. lateralus_lang-2.4.0/lateralus_lang/codegen/wasm.py +485 -0
  101. lateralus_lang-2.4.0/lateralus_lang/compiler.py +436 -0
  102. lateralus_lang-2.4.0/lateralus_lang/crypto_engine.py +551 -0
  103. lateralus_lang-2.4.0/lateralus_lang/dap_server.py +455 -0
  104. lateralus_lang-2.4.0/lateralus_lang/debugger.py +382 -0
  105. lateralus_lang-2.4.0/lateralus_lang/engines.py +364 -0
  106. lateralus_lang-2.4.0/lateralus_lang/error_engine.py +503 -0
  107. lateralus_lang-2.4.0/lateralus_lang/errors/__init__.py +14 -0
  108. lateralus_lang-2.4.0/lateralus_lang/errors/bridge.py +198 -0
  109. lateralus_lang-2.4.0/lateralus_lang/errors/handler.py +458 -0
  110. lateralus_lang-2.4.0/lateralus_lang/ffi.py +417 -0
  111. lateralus_lang-2.4.0/lateralus_lang/formatter.py +372 -0
  112. lateralus_lang-2.4.0/lateralus_lang/integration_patch.py +173 -0
  113. lateralus_lang-2.4.0/lateralus_lang/ir.py +1011 -0
  114. lateralus_lang-2.4.0/lateralus_lang/jupyter_kernel.py +439 -0
  115. lateralus_lang-2.4.0/lateralus_lang/lexer.py +598 -0
  116. lateralus_lang-2.4.0/lateralus_lang/linter.py +671 -0
  117. lateralus_lang-2.4.0/lateralus_lang/lsp_server.py +1163 -0
  118. lateralus_lang-2.4.0/lateralus_lang/ltlcfg.py +610 -0
  119. lateralus_lang-2.4.0/lateralus_lang/markup/__init__.py +1024 -0
  120. lateralus_lang-2.4.0/lateralus_lang/markup.py +889 -0
  121. lateralus_lang-2.4.0/lateralus_lang/math_engine.py +861 -0
  122. lateralus_lang-2.4.0/lateralus_lang/notebook.py +659 -0
  123. lateralus_lang-2.4.0/lateralus_lang/optimizer.py +889 -0
  124. lateralus_lang-2.4.0/lateralus_lang/package_manager.py +1389 -0
  125. lateralus_lang-2.4.0/lateralus_lang/parser.py +1756 -0
  126. lateralus_lang-2.4.0/lateralus_lang/pattern_engine.py +722 -0
  127. lateralus_lang-2.4.0/lateralus_lang/profiler.py +298 -0
  128. lateralus_lang-2.4.0/lateralus_lang/query_engine.py +744 -0
  129. lateralus_lang-2.4.0/lateralus_lang/reactive.py +807 -0
  130. lateralus_lang-2.4.0/lateralus_lang/repl.py +328 -0
  131. lateralus_lang-2.4.0/lateralus_lang/repl_enhanced.py +549 -0
  132. lateralus_lang-2.4.0/lateralus_lang/science.py +457 -0
  133. lateralus_lang-2.4.0/lateralus_lang/source_map.py +197 -0
  134. lateralus_lang-2.4.0/lateralus_lang/test_runner.py +290 -0
  135. lateralus_lang-2.4.0/lateralus_lang/type_system.py +1127 -0
  136. lateralus_lang-2.4.0/lateralus_lang/vm/__init__.py +16 -0
  137. lateralus_lang-2.4.0/lateralus_lang/vm/assembler.py +321 -0
  138. lateralus_lang-2.4.0/lateralus_lang/vm/disassembler.py +390 -0
  139. lateralus_lang-2.4.0/lateralus_lang/vm/opcodes.py +301 -0
  140. lateralus_lang-2.4.0/lateralus_lang/vm/vm.py +536 -0
  141. lateralus_lang-2.4.0/lateralus_lang/watch.py +340 -0
  142. lateralus_lang-2.4.0/lateralus_lang.egg-info/PKG-INFO +411 -0
  143. lateralus_lang-2.4.0/lateralus_lang.egg-info/SOURCES.txt +282 -0
  144. lateralus_lang-2.4.0/lateralus_lang.egg-info/dependency_links.txt +1 -0
  145. lateralus_lang-2.4.0/lateralus_lang.egg-info/entry_points.txt +5 -0
  146. lateralus_lang-2.4.0/lateralus_lang.egg-info/requires.txt +5 -0
  147. lateralus_lang-2.4.0/lateralus_lang.egg-info/top_level.txt +1 -0
  148. lateralus_lang-2.4.0/pyproject.toml +61 -0
  149. lateralus_lang-2.4.0/setup.cfg +4 -0
  150. lateralus_lang-2.4.0/stdlib/algorithms.ltl +290 -0
  151. lateralus_lang-2.4.0/stdlib/arena.ltl +165 -0
  152. lateralus_lang-2.4.0/stdlib/async.ltl +218 -0
  153. lateralus_lang-2.4.0/stdlib/base64.ltl +185 -0
  154. lateralus_lang-2.4.0/stdlib/bitops.ltl +179 -0
  155. lateralus_lang-2.4.0/stdlib/bitset.ltl +212 -0
  156. lateralus_lang-2.4.0/stdlib/channel.ltl +318 -0
  157. lateralus_lang-2.4.0/stdlib/collections.ltl +183 -0
  158. lateralus_lang-2.4.0/stdlib/color.ltl +126 -0
  159. lateralus_lang-2.4.0/stdlib/core.ltl +112 -0
  160. lateralus_lang-2.4.0/stdlib/crypto.ltl +100 -0
  161. lateralus_lang-2.4.0/stdlib/csv.ltl +123 -0
  162. lateralus_lang-2.4.0/stdlib/data.ltl +339 -0
  163. lateralus_lang-2.4.0/stdlib/datetime.ltl +226 -0
  164. lateralus_lang-2.4.0/stdlib/deque.ltl +169 -0
  165. lateralus_lang-2.4.0/stdlib/encoding.ltl +154 -0
  166. lateralus_lang-2.4.0/stdlib/event.ltl +140 -0
  167. lateralus_lang-2.4.0/stdlib/filepath.ltl +159 -0
  168. lateralus_lang-2.4.0/stdlib/fmt.ltl +206 -0
  169. lateralus_lang-2.4.0/stdlib/functional.ltl +271 -0
  170. lateralus_lang-2.4.0/stdlib/graph.ltl +524 -0
  171. lateralus_lang-2.4.0/stdlib/hash.ltl +105 -0
  172. lateralus_lang-2.4.0/stdlib/heap.ltl +182 -0
  173. lateralus_lang-2.4.0/stdlib/http.ltl +170 -0
  174. lateralus_lang-2.4.0/stdlib/ini.ltl +219 -0
  175. lateralus_lang-2.4.0/stdlib/io.ltl +219 -0
  176. lateralus_lang-2.4.0/stdlib/iter.ltl +300 -0
  177. lateralus_lang-2.4.0/stdlib/json.ltl +262 -0
  178. lateralus_lang-2.4.0/stdlib/linalg.ltl +269 -0
  179. lateralus_lang-2.4.0/stdlib/logging.ltl +142 -0
  180. lateralus_lang-2.4.0/stdlib/lru.ltl +208 -0
  181. lateralus_lang-2.4.0/stdlib/math.ltl +206 -0
  182. lateralus_lang-2.4.0/stdlib/matrix.ltl +302 -0
  183. lateralus_lang-2.4.0/stdlib/mem.ltl +92 -0
  184. lateralus_lang-2.4.0/stdlib/network.ltl +350 -0
  185. lateralus_lang-2.4.0/stdlib/optimize.ltl +196 -0
  186. lateralus_lang-2.4.0/stdlib/os.ltl +183 -0
  187. lateralus_lang-2.4.0/stdlib/pool.ltl +164 -0
  188. lateralus_lang-2.4.0/stdlib/ptr.ltl +154 -0
  189. lateralus_lang-2.4.0/stdlib/queue.ltl +118 -0
  190. lateralus_lang-2.4.0/stdlib/random.ltl +44 -0
  191. lateralus_lang-2.4.0/stdlib/regex.ltl +133 -0
  192. lateralus_lang-2.4.0/stdlib/result.ltl +185 -0
  193. lateralus_lang-2.4.0/stdlib/ringbuf.ltl +158 -0
  194. lateralus_lang-2.4.0/stdlib/science.ltl +151 -0
  195. lateralus_lang-2.4.0/stdlib/semver.ltl +214 -0
  196. lateralus_lang-2.4.0/stdlib/set.ltl +149 -0
  197. lateralus_lang-2.4.0/stdlib/signals.ltl +395 -0
  198. lateralus_lang-2.4.0/stdlib/sort.ltl +211 -0
  199. lateralus_lang-2.4.0/stdlib/stack.ltl +123 -0
  200. lateralus_lang-2.4.0/stdlib/stats.ltl +214 -0
  201. lateralus_lang-2.4.0/stdlib/strings.ltl +113 -0
  202. lateralus_lang-2.4.0/stdlib/sync.ltl +152 -0
  203. lateralus_lang-2.4.0/stdlib/sys.ltl +199 -0
  204. lateralus_lang-2.4.0/stdlib/template.ltl +184 -0
  205. lateralus_lang-2.4.0/stdlib/testing.ltl +135 -0
  206. lateralus_lang-2.4.0/stdlib/time.ltl +34 -0
  207. lateralus_lang-2.4.0/stdlib/trie.ltl +170 -0
  208. lateralus_lang-2.4.0/stdlib/uuid.ltl +82 -0
  209. lateralus_lang-2.4.0/tests/test_async_runtime.py +236 -0
  210. lateralus_lang-2.4.0/tests/test_bytecode_format.py +165 -0
  211. lateralus_lang-2.4.0/tests/test_c_backend.py +748 -0
  212. lateralus_lang-2.4.0/tests/test_cli_extensions.py +228 -0
  213. lateralus_lang-2.4.0/tests/test_compiler.py +171 -0
  214. lateralus_lang-2.4.0/tests/test_crypto_engine.py +207 -0
  215. lateralus_lang-2.4.0/tests/test_dap_server.py +602 -0
  216. lateralus_lang-2.4.0/tests/test_debugger.py +216 -0
  217. lateralus_lang-2.4.0/tests/test_engines.py +195 -0
  218. lateralus_lang-2.4.0/tests/test_error_engine.py +304 -0
  219. lateralus_lang-2.4.0/tests/test_formatter_linter.py +199 -0
  220. lateralus_lang-2.4.0/tests/test_full_pipeline.py +367 -0
  221. lateralus_lang-2.4.0/tests/test_javascript_transpiler.py +310 -0
  222. lateralus_lang-2.4.0/tests/test_js_backend.py +618 -0
  223. lateralus_lang-2.4.0/tests/test_lexer.py +132 -0
  224. lateralus_lang-2.4.0/tests/test_lsp_server.py +533 -0
  225. lateralus_lang-2.4.0/tests/test_markup.py +240 -0
  226. lateralus_lang-2.4.0/tests/test_math_engine.py +286 -0
  227. lateralus_lang-2.4.0/tests/test_notebook.py +354 -0
  228. lateralus_lang-2.4.0/tests/test_optimizer.py +514 -0
  229. lateralus_lang-2.4.0/tests/test_package_manager.py +202 -0
  230. lateralus_lang-2.4.0/tests/test_parser.py +197 -0
  231. lateralus_lang-2.4.0/tests/test_pattern_engine.py +551 -0
  232. lateralus_lang-2.4.0/tests/test_profiler.py +202 -0
  233. lateralus_lang-2.4.0/tests/test_query_engine.py +393 -0
  234. lateralus_lang-2.4.0/tests/test_reactive.py +454 -0
  235. lateralus_lang-2.4.0/tests/test_repl.py +458 -0
  236. lateralus_lang-2.4.0/tests/test_science.py +254 -0
  237. lateralus_lang-2.4.0/tests/test_source_map.py +173 -0
  238. lateralus_lang-2.4.0/tests/test_type_system.py +385 -0
  239. lateralus_lang-2.4.0/tests/test_v12_features.py +524 -0
  240. lateralus_lang-2.4.0/tests/test_v15_features.py +776 -0
  241. lateralus_lang-2.4.0/tests/test_v16_features.py +626 -0
  242. lateralus_lang-2.4.0/tests/test_v17_features.py +798 -0
  243. lateralus_lang-2.4.0/tests/test_v18_features.py +495 -0
  244. lateralus_lang-2.4.0/tests/test_v19_features.py +382 -0
  245. lateralus_lang-2.4.0/tests/test_v20_features.py +411 -0
  246. lateralus_lang-2.4.0/tests/test_v21_features.py +436 -0
  247. lateralus_lang-2.4.0/tests/test_v22_features.py +598 -0
  248. lateralus_lang-2.4.0/tests/test_v23_features.py +514 -0
  249. lateralus_lang-2.4.0/tests/test_vm.py +239 -0
  250. lateralus_lang-2.4.0/tests/test_vm_expanded.py +664 -0
  251. lateralus_lang-2.4.0/tests/test_wasm_backend.py +332 -0
  252. lateralus_lang-2.4.0/vscode-lateralus/README.md +118 -0
  253. lateralus_lang-2.4.0/vscode-lateralus/extension.js +455 -0
  254. lateralus_lang-2.4.0/vscode-lateralus/icons/lateralus-asm-dark.svg +23 -0
  255. lateralus_lang-2.4.0/vscode-lateralus/icons/lateralus-asm-light.svg +23 -0
  256. lateralus_lang-2.4.0/vscode-lateralus/icons/lateralus-bytecode-dark.svg +13 -0
  257. lateralus_lang-2.4.0/vscode-lateralus/icons/lateralus-bytecode-light.svg +13 -0
  258. lateralus_lang-2.4.0/vscode-lateralus/icons/lateralus-cfg-dark.svg +9 -0
  259. lateralus_lang-2.4.0/vscode-lateralus/icons/lateralus-cfg-light.svg +9 -0
  260. lateralus_lang-2.4.0/vscode-lateralus/icons/lateralus-compiled-dark.svg +12 -0
  261. lateralus_lang-2.4.0/vscode-lateralus/icons/lateralus-compiled-light.svg +12 -0
  262. lateralus_lang-2.4.0/vscode-lateralus/icons/lateralus-dark.svg +16 -0
  263. lateralus_lang-2.4.0/vscode-lateralus/icons/lateralus-light.svg +16 -0
  264. lateralus_lang-2.4.0/vscode-lateralus/icons/lateralus-logo.svg +61 -0
  265. lateralus_lang-2.4.0/vscode-lateralus/icons/lateralus-markup-dark.svg +14 -0
  266. lateralus_lang-2.4.0/vscode-lateralus/icons/lateralus-markup-light.svg +14 -0
  267. lateralus_lang-2.4.0/vscode-lateralus/icons/lateralus-notebook-dark.svg +20 -0
  268. lateralus_lang-2.4.0/vscode-lateralus/icons/lateralus-notebook-light.svg +20 -0
  269. lateralus_lang-2.4.0/vscode-lateralus/language-configuration-asm.json +20 -0
  270. lateralus_lang-2.4.0/vscode-lateralus/language-configuration-cfg.json +24 -0
  271. lateralus_lang-2.4.0/vscode-lateralus/language-configuration-markup.json +36 -0
  272. lateralus_lang-2.4.0/vscode-lateralus/language-configuration-notebook.json +23 -0
  273. lateralus_lang-2.4.0/vscode-lateralus/language-configuration.json +36 -0
  274. lateralus_lang-2.4.0/vscode-lateralus/package.json +230 -0
  275. lateralus_lang-2.4.0/vscode-lateralus/snippets/lateralus-asm.json +84 -0
  276. lateralus_lang-2.4.0/vscode-lateralus/snippets/lateralus-cfg.json +69 -0
  277. lateralus_lang-2.4.0/vscode-lateralus/snippets/lateralus-markup.json +119 -0
  278. lateralus_lang-2.4.0/vscode-lateralus/snippets/lateralus-notebook.json +58 -0
  279. lateralus_lang-2.4.0/vscode-lateralus/snippets/lateralus.json +374 -0
  280. lateralus_lang-2.4.0/vscode-lateralus/syntaxes/lateralus-asm.tmLanguage.json +101 -0
  281. lateralus_lang-2.4.0/vscode-lateralus/syntaxes/lateralus-cfg.tmLanguage.json +158 -0
  282. lateralus_lang-2.4.0/vscode-lateralus/syntaxes/lateralus-markup.tmLanguage.json +359 -0
  283. lateralus_lang-2.4.0/vscode-lateralus/syntaxes/lateralus-notebook.tmLanguage.json +97 -0
  284. lateralus_lang-2.4.0/vscode-lateralus/syntaxes/lateralus.tmLanguage.json +310 -0
@@ -0,0 +1,1367 @@
1
+ # CHANGELOG — Lateralus Language
2
+
3
+ > Created and maintained by **bad-antics**
4
+
5
+ All notable changes to the Lateralus Language toolchain are documented here.
6
+ Follows [Semantic Versioning](https://semver.org/).
7
+
8
+ ---
9
+
10
+ ## [2.4.0] — 2025-07-19 — Deep Internals, Optimizer & Stdlib Expansion
11
+
12
+ ### CLI
13
+ - **4 New Subcommands** (total: 26):
14
+ - `bench` — Run micro-benchmarks on compile/parse pipelines
15
+ - `profile` — Profile compilation with per-phase timing breakdown
16
+ - `disasm` — Disassemble `.ltbc` bytecode files to readable `.ltasm`
17
+ - `clean` — Remove build artifacts, caches, and `__pycache__` directories
18
+ - Enhanced `info` subcommand with full v1.5–v2.4 feature list
19
+ - REPL flags: `--enhanced/-e`, `--no-color`, `--timing`
20
+
21
+ ### VM
22
+ - **Disassembler** (`vm/disassembler.py`, ~300 lines):
23
+ - `disassemble()` — Convert Bytecode objects to human-readable `.ltasm` text
24
+ - `disassemble_instruction()` — Single-instruction decode with operand formatting
25
+ - `instruction_length()` — Calculate byte length from OPCODE_META schemas
26
+ - Two-pass: jump target collection → labeled output generation
27
+ - Round-trip verified: assemble → disassemble produces correct output
28
+
29
+ ### Enhanced REPL
30
+ - **3 New Commands** (total: 14 special commands):
31
+ - `:save <file>` — Save REPL session history to a file
32
+ - `:doc <topic>` — Look up documentation for 51 builtins/keywords
33
+ - `:profile` — Profile the next expression with per-phase timing
34
+ - 51 builtin documentation entries covering all core functions and keywords
35
+
36
+ ### Optimizer
37
+ - **3 New Passes** (total: 10):
38
+ - **Dead branch elimination** — Evaluates constant conditions (`if true`, `if false`,
39
+ `if 1 > 2`) and simplifies unreachable branches
40
+ - **Algebraic simplification** — 20 algebraic identities covering additive, multiplicative,
41
+ bitwise, shift, and boolean patterns (e.g., `x + 0 → x`, `x * 1 → x`, `x & 0 → 0`,
42
+ `x | x → x`, `x ^ x → 0`)
43
+ - **Function inlining analysis** — Scores inline candidates based on body size, call
44
+ frequency, purity (no side effects), parameter count, and recursion; provides
45
+ `should_inline` recommendation
46
+
47
+ ### Stdlib
48
+ - **7 New Modules** (total: 59):
49
+ - `heap` — Binary min-heap: push, pop, peek, merge, heap_sort, n_smallest
50
+ - `deque` — Double-ended queue: push/pop front/back, rotation, reverse, contains
51
+ - `trie` — Prefix trie: insert, get, has, has_prefix, keys_with_prefix, longest_prefix
52
+ - `ini` — INI config parser/writer: section support, typed getters (int/bool/float), merge
53
+ - `arena` — Region-based memory allocator: block management, O(1) reset/deallocation
54
+ - `pool` — Object pool: acquire/release, bulk ops, drain/shrink, utilization stats
55
+ - `lru` — LRU cache: get/put with eviction, hit/miss tracking, resize, hit_rate
56
+
57
+ ### Tests
58
+ - **207 New Tests** (total: 1,976):
59
+ - 52 DAP server tests (`test_dap_server.py`) — All 15 DAP handlers
60
+ - 47 REPL tests (`test_repl.py`) — Basic and enhanced REPL, 9 test classes
61
+ - 61 VM tests (`test_vm_expanded.py`) — Disassembler, round-trip, string/collection ops,
62
+ bitwise, error handling, assembler edges, bytecode objects
63
+ - 47 optimizer tests (in `test_optimizer.py`) — Dead branches, algebraic identities,
64
+ inline analysis; total optimizer tests: 99
65
+
66
+ ---
67
+
68
+ ## [2.3.0] — 2025-07-18 — Tooling & OS Expansion
69
+
70
+ ### Stdlib
71
+ - **6 New Modules** (total: 52):
72
+ - `sort` — Sorting algorithms: quicksort, mergesort, insertion sort, selection sort;
73
+ utilities: `nsmallest()`, `nlargest()`, `binary_search()`, `count_inversions()`,
74
+ `is_sorted()`, `sort_by_key()`
75
+ - `set` — Set operations on deduplicated lists: `add()`, `remove()`, `has()`, `union()`,
76
+ `intersection()`, `difference()`, `symmetric_difference()`, `is_subset()`, `is_superset()`,
77
+ `is_disjoint()`, `equals()`, `power_set()`, `map_set()`, `filter_set()`, `fold()`
78
+ - `ringbuf` — Fixed-size circular buffer: `new()`, `push()`, `pop()`, `peek_front()`,
79
+ `peek_back()`, `to_list()`, `at()`, `map_buf()`, `drain()`
80
+ - `semver` — Semantic Versioning 2.0.0 parsing and comparison: `parse()`, `format()`,
81
+ `compare()`, `bump_major()`, `bump_minor()`, `bump_patch()`, `satisfies_caret()`,
82
+ `satisfies_tilde()`
83
+ - `event` — Pub/sub event emitter: `on()`, `once()`, `off()`, `fire()`, `fire_empty()`,
84
+ `event_names()`, `handler_count()`, `pipe()`, `reset()`
85
+ - `template` — String template engine with `<<name>>` delimiters: `render()`, `compile()`,
86
+ `extract_vars()`, `render_each()`, `render_join()`, `escape_html()`, `render_safe()`
87
+
88
+ ### Linter
89
+ - **5 New Rules** (total: 21+):
90
+ - `constant-condition` — Flags `if true`, `if false`, `guard true` (WARNING)
91
+ - `unused-import` — Detects imported modules never referenced in source (WARNING)
92
+ - `deep-nesting` — Warns at 5+ indent levels (INFO for 5-6, WARNING for 7+)
93
+ - `string-concat-in-loop` — Detects `+= "..."` inside for/while loops (INFO)
94
+ - `mutable-default` — Detects `fn(param = [])` or `fn(param = {})` (WARNING)
95
+
96
+ ### Formatter
97
+ - **Phase 7**: Trailing comma normalization — automatically adds trailing commas before
98
+ closing `}`, `]`, `)` brackets
99
+ - **Phase 8**: Blank line collapse — collapses 3+ consecutive blank lines to max 2
100
+
101
+ ### LSP Server
102
+ - **Code Actions** with 4 quick fixes:
103
+ - "Use `let` instead of `var`" → replaces `var` with `let`
104
+ - "Unnecessary semicolon" → removes trailing semicolons
105
+ - "Defined but never used" → prefixes unused variable with underscore
106
+ - "Already imported" → removes duplicate import line
107
+ - **Rename Symbol** — Whole-document word-boundary rename via `textDocument/rename`
108
+ - **Prepare Rename** — Validates rename is possible, returns range and placeholder
109
+ - Updated LSP server version to 2.3.0
110
+
111
+ ### Examples
112
+ - `v23_showcase.ltl` — Sorting, sets, ring buffers, semver, events, templates (~350 lines)
113
+ - `game_of_life.ltl` — Conway's Game of Life with patterns and simulation (~200 lines)
114
+ - `interpreter_demo.ltl` — Full arithmetic expression evaluator: tokenizer, parser, AST,
115
+ interpreter, REPL driver (~310 lines)
116
+ - All 37 examples compile successfully (37/37)
117
+
118
+ ### Tests
119
+ - 37 new tests in `test_v23_features.py` covering all v2.3.0 features
120
+ - **Total: 1,769 tests passing**
121
+
122
+ ### LateralusOS
123
+ - **7 New Shell Commands** (total: 55+):
124
+ - `top` — Task monitor with summary, uptime, and per-task state/priority
125
+ - `df` — Filesystem usage (ramfs, procfs, devfs)
126
+ - `id` — Display user/group identity info
127
+ - `seq [start] <end>` — Print number sequences
128
+ - `tr <from> <to>` — Character transliteration
129
+ - `rev <string>` — Reverse a string
130
+ - `factor <n>` — Prime factorization
131
+
132
+ ---
133
+
134
+ ## [2.2.0] — 2026-04-20 — Stdlib Expansion & Linter Intelligence
135
+
136
+ ### Language & Toolchain
137
+
138
+ - **12 New Stdlib Modules** (total: 49):
139
+ - `fmt` — String formatting with `{}` placeholders, `format()`, `printf()`, `sprintf()`,
140
+ padding (`pad_left`/`pad_right`/`pad_center`), number formatting (`hex`/`bin`/`oct`),
141
+ tabular output (`table()`), `repeat()`, `join()`
142
+ - `encoding` — Hex, Base64, and URL encoding/decoding (`hex_encode`/`hex_decode`,
143
+ `base64_encode`/`base64_decode`, `url_encode`/`url_decode`)
144
+ - `csv` — CSV parsing and generation with quote handling; `parse()`, `parse_dict()`,
145
+ `generate()`, `generate_dict()` with configurable delimiters
146
+ - `logging` — Structured logging with 6 severity levels (TRACE/DEBUG/INFO/WARN/ERROR/FATAL);
147
+ `set_level()`, per-level functions, `log_ctx()` for key-value context, `log_if()`, `log_assert()`
148
+ - `filepath` — Path manipulation: `dirname()`, `basename()`, `extension()`, `stem()`,
149
+ `join_path()`, `normalize()` (resolves `.`/`..`), `is_absolute()`/`is_relative()`,
150
+ `has_extension()`, `with_extension()`
151
+ - `uuid` — UUID v4 generation (`uuid4()`), validation (`is_valid()`), version extraction,
152
+ compact/expand forms, namespace constants (DNS, URL, OID, X500)
153
+ - `hash` — Hash functions: `fnv1a_32()`, `fnv1a_64()`, `djb2()`, `sdbm()`;
154
+ checksums: `checksum8()`, `fletcher16()`, `adler32()`;
155
+ utilities: `combine()` (boost-style), `hash_list()`, `bucket()`
156
+ - `color` — Color construction (`rgb()`, `rgba()`), channel extraction, `to_hex()`;
157
+ manipulation: `lighten()`, `darken()`, `mix()`, `invert()`, `grayscale()`;
158
+ 12 named constants + 9 Lateralus theme colors
159
+ - `queue` — Double-ended queue with `push_back`/`push_front`/`pop_front`/`pop_back`,
160
+ `front()`/`back()` peek, `drain()`, `concat()`, `filter_queue()`, `map_queue()`
161
+ - `stack` — LIFO stack with `push()`/`pop()`/`peek()`, `swap_top()`, `dup()`, `drop()`,
162
+ `fold()`, `contains()`, `reversed()`
163
+ - `base64` — RFC 4648 Base64 encoding/decoding: `encode()`/`decode()`,
164
+ URL-safe variants (`encode_url`/`decode_url`), `is_valid()`,
165
+ `encoded_length()`/`decoded_length()`
166
+ - `bitset` — Fixed-size bitset with `set()`/`clear()`/`test()`/`toggle()`,
167
+ set operations: `union()`/`intersection()`/`difference()`/`symmetric_difference()`,
168
+ `is_subset()`, `count()` (popcount), `to_binary_string()`
169
+
170
+ - **4 New Linter Rules**:
171
+ - `unreachable-code` (WARNING) — Detects dead code after `return`, `break`, `continue` statements
172
+ - `duplicate-import` (WARNING) — Flags modules imported more than once, with suggestion to remove
173
+ - `shadowed-variable` (INFO) — Warns when a variable shadows an earlier definition
174
+ - `todo-comment` (HINT) — Surfaces TODO, FIXME, HACK, and XXX comments in lint output
175
+
176
+ - **IR: `COND_SELECT` opcode** — Added ternary conditional selection to the IR layer, fixing
177
+ compilation of ternary expressions (`? :`) in modules that pass through semantic analysis
178
+
179
+ - **42 new tests** covering all new linter rules, stdlib module compilation, import validation,
180
+ and integration testing. Total: **1,734 tests passing**.
181
+
182
+ ### LateralusOS v0.3.0 — Virtual Filesystems, Signals & Shell UX
183
+
184
+ - **/proc Virtual Filesystem** (`fs/procfs.c`, ~330 lines): Full `/proc` implementation exposing
185
+ live kernel state as 9 readable pseudo-files:
186
+ - `/proc/version` — OS name, version, build info
187
+ - `/proc/uptime` — System uptime in seconds (from tick_count)
188
+ - `/proc/meminfo` — Heap statistics (total, used, free, peak, allocations)
189
+ - `/proc/cpuinfo` — CPU vendor string and feature flags (via CPUID)
190
+ - `/proc/loadavg` — 1-min/5-min/15-min load averages from scheduler
191
+ - `/proc/tasks` — Process table dump (TID, state, priority, name for all 32 slots)
192
+ - `/proc/net` — Network configuration (IP, mask, gateway, DNS, state)
193
+ - `/proc/mounts` — Mounted filesystem list (ramfs, procfs, devfs)
194
+ - `/proc/cmdline` — Boot command line
195
+ Auto-refreshes on `cat /proc/*` to always show current data.
196
+
197
+ - **/dev Virtual Device Filesystem** (`fs/devfs.c`, ~220 lines): 5 pseudo-device files:
198
+ - `/dev/null` — Always empty (discard sink)
199
+ - `/dev/zero` — Continuous zero stream description
200
+ - `/dev/random` — Pseudo-random hex data (xorshift64 LFSR seeded from tick_count)
201
+ - `/dev/serial` — COM1 serial port info (base 0x3F8, baud 115200)
202
+ - `/dev/fb0` — Framebuffer info (resolution, bpp, address from boot_info)
203
+ Auto-refreshes on `cat /dev/*` for live data.
204
+
205
+ - **Filesystem Initialization Fix**: Moved `ramfs_init()` from GUI-only path to `kernel_main()`
206
+ text path. All three virtual filesystems (ramfs, procfs, devfs) now initialize in Phase 8b
207
+ of kernel boot, before shell startup.
208
+
209
+ - **Signal Infrastructure**: Upgraded `cmd_kill()` to support named signals
210
+ (`TERM`, `KILL`, `INT`, `STOP`, `CONT`, `USR1`, `USR2`, `ALARM`) and numeric signal values.
211
+ Syntax: `kill <tid> [TERM|KILL|INT|STOP|CONT|USR1|USR2|ALARM|<number>]` (default: TERM).
212
+ Updated `sys_kill_task` syscall to route through `sched_signal()`.
213
+
214
+ - **Environment Variable Expansion**: Shell now expands `$VAR` and `${VAR}` references
215
+ in commands before execution. Supports `$?` for last exit code. New `env_get()`,
216
+ `env_unset()`, `env_expand()` internal functions.
217
+
218
+ - **Alias System**: Full alias support with `alias`, `unalias` commands.
219
+ Default aliases: `ll` → `ls`, `h` → `history`, `cls` → `clear`.
220
+ Supports `alias name=command` and `alias name="multi word command"`.
221
+ Up to 16 aliases with 32-char names and 128-char expansions.
222
+
223
+ - **Bang History Expansion**: `!N` syntax recalls and re-executes history entry N.
224
+
225
+ - **`unset` command**: Remove environment variables from the shell.
226
+
227
+ - **Load Average Tracking**: Exponentially weighted moving average (EMA) load tracking
228
+ in the scheduler. Samples every 5 seconds, tracks 1-min/5-min/15-min averages
229
+ using fixed-point arithmetic (×100). Alpha values: 8%, 2%, 1%.
230
+
231
+ - **Upgraded `uptime` command**: Now shows days/hours/minutes/seconds, active task count
232
+ from `sched_stats()`, and three load averages in `X.XX X.XX X.XX` format.
233
+
234
+ - **Tab completion**: Added `alias`, `unalias`, `unset` to shell auto-complete.
235
+
236
+ ---
237
+
238
+ ## [2.1.0] — 2026-04-19 — Kernel Decomposition & Network Stack (continued)
239
+
240
+ ### LateralusOS v0.3.0 — Process Table & TCP Transport
241
+
242
+ - **Process Table & Scheduler Upgrade**: Extended `SchedTask` struct with `parent_tid`,
243
+ `wait_tid`, `vfs_task_id` fields for proper parent-child process relationships.
244
+ New API: `sched_wait()` (blocks parent, returns child exit code), `sched_reap()`
245
+ (frees dead task stacks via `kfree`, periodic garbage collection every ~1s),
246
+ `sched_get_task()` (const pointer access for ps/monitoring).
247
+ Dead task reaping auto-runs in `sched_tick()` every 1024 ticks.
248
+
249
+ - **Syscall Upgrades**: Fixed `sys_getpid` to return `sched_current_tid()` (was hardcoded 1).
250
+ Fixed `sys_sleep` to use `sched_sleep()` (was busy-wait `hlt` loop).
251
+ Fixed `sys_yield` to use `sched_yield()` (was single `hlt`).
252
+ Added: `sys_spawn` (SYS_SPAWN=25), `sys_wait` (SYS_WAIT=7), `sys_kill_task` (SYS_KILL=22).
253
+ Now **23 registered syscall handlers**.
254
+
255
+ - **Shell `spawn` Command**: Spawn background daemon tasks from the shell.
256
+ Available tasks: `heartbeat [secs]` (periodic serial output),
257
+ `counter [n]` (count to n then exit), `netpoll` (network polling daemon).
258
+ Shows task name, TID, and priority on creation.
259
+
260
+ - **Live `ps` Rewrite**: `ps` command now shows real scheduler data — iterates
261
+ `sched_get_task(0..31)`, displays TID, STATE, PRIO, NAME with color coding
262
+ (green=RUNNING, cyan=READY, yellow=SLEEPING, red=DEAD, gray=BLOCKED).
263
+
264
+ - **Netpoll Daemon**: Automatically spawned at boot as a high-priority daemon (tid=1).
265
+ Calls `ip_poll()` and `tcp_tick()` at 10 Hz for continuous network + TCP timer service.
266
+
267
+ - **TCP Transport Layer**: Full TCP/IP implementation in `net/tcp.h` + `net/tcp.c` (~650 lines).
268
+ - RFC 793 state machine: 11 states (CLOSED → LISTEN → SYN_SENT → SYN_RECEIVED →
269
+ ESTABLISHED → FIN_WAIT_1/2 → CLOSE_WAIT → CLOSING → LAST_ACK → TIME_WAIT).
270
+ - 8 concurrent connection slots, 4 KB circular receive buffer per connection.
271
+ - `tcp_connect()` (active open), `tcp_listen()` (passive open), `tcp_send()`,
272
+ `tcp_read()`, `tcp_close()` (graceful FIN sequence).
273
+ - RFC-compliant checksum with pseudo-header, MSS=1460, window size=4096.
274
+ - Retransmit timer (3s, 5 retries), TIME_WAIT cleanup (5s).
275
+ - IP layer dispatches protocol 6 (TCP) to `tcp_recv()` state machine.
276
+ - `tcp` shell command displays active connections with state/color coding.
277
+ - `tcp dump` sends detailed connection table to serial for debugging.
278
+
279
+ - **Build Pipeline**: 22-step build (was 21). Kernel size: 695,976 bytes.
280
+ Zero warnings, zero errors. OS boots with all subsystems initialized.
281
+
282
+ ---
283
+
284
+ ## [2.1.0] — 2026-04-19 — Kernel Decomposition & Network Stack
285
+
286
+ ### LateralusOS v0.3.0 — Kernel Infrastructure
287
+ - **Heap Module Extraction**: Isolated heap allocator from monolithic kernel_stub.c into
288
+ `kernel/heap.h` + `kernel/heap.c`. New API: `kmalloc`, `kcalloc`, `krealloc`, `kfree`,
289
+ `heap_get_stats`, `heap_dump_stats`. Free-list + bump allocation with 16-byte alignment,
290
+ block splitting (MIN_SPLIT=64), and double-free detection (magic=0xDEADBEEF).
291
+ - **Virtual File System**: Full VFS layer in `fs/vfs.h` + `fs/vfs.c` (~340 lines).
292
+ 32 file descriptors per task, fd types: FILE, CONSOLE, PIPE_READ, PIPE_WRITE, NULL.
293
+ Operations: open (O_CREAT/O_TRUNC/O_APPEND), read, write, close, seek, dup, dup2, pipe.
294
+ Auto-allocates fd 0/1/2 as console for new tasks. `/dev/null` support.
295
+ - **Syscall Table Expansion**: 20 registered syscall handlers, VFS-backed sys_read/write/open/close.
296
+ New: `sys_pipe` (SYS_PIPE=20), `sys_dup` (SYS_DUP=21).
297
+ - **Shell Pipe & Redirect**: Capture buffer infrastructure hooked into `k_putc`.
298
+ Pipe (`|`) with built-in targets: `grep` (substring filter), `wc` (lines/words/bytes),
299
+ `head -N`, `tail -N`. Redirect: `>` (overwrite), `>>` (append) to ramfs files.
300
+ - **IPv4/ARP/UDP/ICMP/DHCP Network Stack**: Full implementation in `net/ip.h` + `net/ip.c`
301
+ (~740 lines). ARP cache (16 entries), IPv4 send with gateway routing, ICMP echo request/reply,
302
+ UDP bind/send/receive (8 port bindings), DHCP client (DISCOVER → OFFER → REQUEST → ACK
303
+ with 5-second timeout). Auto-DHCP during boot with static fallback (10.0.2.15).
304
+ - **Upgraded Shell Commands**: `ifconfig` shows IPv4/netmask/gateway/DNS, `ping` uses real
305
+ ICMP echo requests (3 pings, 2s timeout), `arp` uses IP stack's ARP dump.
306
+ New: `dhcp` command for manual DHCP lease renewal.
307
+ - **Build pipeline**: 20-step build process (gcc C99 freestanding + nasm elf64).
308
+ Zero warnings, zero errors. OS boots in QEMU with all subsystems initialized.
309
+
310
+ ### Codegen Improvements
311
+ - **Block lambda fix**: `fn(x) { expr }` anonymous functions now correctly transpile
312
+ to Python inline lambdas with multi-statement hoisting support.
313
+ - **Interface codegen**: ABC-style abstract class generation from interface declarations.
314
+ - **Type annotation mapping**: `fn` → `callable`, `map` → `dict` in Python transpiler.
315
+ - **Stdlib shims**: `join()`, `sqrt()`, runtime math builtins wired through codegen.
316
+ - **C backend fix**: `_temp()` variable collision resolved in C transpiler.
317
+
318
+ ### Showcase
319
+ - `v21_showcase.ltl` (401 lines) — enum pattern matching, interface dispatch, pipelines,
320
+ result types, iterators, string processing, matrix operations, state machines.
321
+
322
+ ### Infrastructure
323
+ - **32 new tests** in `test_v21_features.py` — block lambda codegen, interface codegen,
324
+ type mapping, pipeline + lambda composition, stdlib shims, showcase compilation.
325
+ - **1,670 total tests passing**, 0 failures.
326
+ - **30+ example programs**, all compiling successfully.
327
+
328
+ ---
329
+
330
+ ## [2.0.0] — 2026-04-18 — Self-Hosting
331
+
332
+ ### Bootstrap Compiler in Lateralus
333
+ - **5 bootstrap modules** written in Lateralus itself, all compiling with the production compiler:
334
+ - `v2_lexer.ltl` (~509 lines) — full tokenizer with keyword lookup, string/number literals, operators
335
+ - `v2_parser.ltl` (~900 lines) — recursive descent parser, 55 node types, 15+ parse functions
336
+ - `v2_codegen.ltl` (~270 lines) — IR code generation from AST
337
+ - `v2_ir_codegen.ltl` (~641 lines) — IR-level optimizations and lowering
338
+ - `v2_python_codegen.ltl` (~500 lines) — Python transpiler with full AST visitor
339
+ - Bootstrap parser handles: struct, enum, match, trait, impl, for, while, try/catch,
340
+ lambda, pipe, spread, decorators, async/await, guard, import, type alias
341
+ - 6 parser limitations documented and worked around (map literals, `type` keyword,
342
+ while conditions, match delimiters, slice syntax, `emit` keyword)
343
+
344
+ ### Grammar Specification
345
+ - `docs/grammar.ebnf` updated from v1.5 to v2.0 (339 → 458 lines).
346
+ - 13 new keywords: `select`, `nursery`, `cancel`, `unsafe`, `static`, `extern`, `mut`,
347
+ `macro`, `comptime`, `type`, `trait`.
348
+ - 12 new statement productions covering v1.6 structured concurrency, v1.8 metaprogramming,
349
+ v1.9 FFI, and v1.5 traits/type aliases.
350
+ - 8 new primary expressions: `cancel_expr`, `channel_expr`, `parallel_expr`, `inline_asm`,
351
+ `macro_invocation`, `addr_of_expr`, `deref_expr`, `alignof_expr`.
352
+ - Updated operator precedence table and decorator documentation.
353
+
354
+ ### LateralusOS v0.2.0
355
+ - **7 new shell commands** (28 total):
356
+ - `whoami` — prints "root"
357
+ - `hostname` — prints "lateralus"
358
+ - `date` — reads CMOS RTC, displays formatted UTC date/time with BCD conversion
359
+ - `ps` — process listing (kernel, ltlsh, idle)
360
+ - `sysinfo` — bordered system info box with CPU vendor (CPUID), memory, arch
361
+ - `cal` — mini calendar display
362
+ - `write <file> <content>` — write text to ramfs files in /home
363
+ - Version strings updated: OS v0.1.0 → v0.2.0, Language v1.5.0 → v2.0.0, ltlsh 0.1.0 → 0.2.0
364
+
365
+ ### Showcase
366
+ - `v20_showcase.ltl` (~310 lines) — self-contained mini compiler pipeline written in Lateralus:
367
+ tokenizer (14 keywords), recursive descent parser, dual-target code generator (Python + C),
368
+ compilation pipeline with statistics, built-in verification suite.
369
+
370
+ ### Infrastructure
371
+ - **60 new tests** in `test_v20_features.py` across 9 test classes:
372
+ `TestBootstrapCompilation`, `TestV16Parsing`, `TestV18Parsing`, `TestV19Parsing`,
373
+ `TestGrammarSpec`, `TestShowcaseCompilation`, `TestMultiTarget`,
374
+ `TestBootstrapParserCoverage`, `TestLexerKeywords`.
375
+ - **1,638 total tests passing**, 0 failures.
376
+ - **30 example programs**, all compiling successfully.
377
+
378
+ ---
379
+
380
+ ## [1.9.0] — 2026-04-17 — FFI & Ecosystem
381
+
382
+ ### C FFI Bridge (`lateralus_lang/ffi.py`)
383
+ - `load_library(name)` — platform-aware search with `ctypes` (`.so`, `.dylib`, `.dll`).
384
+ Cached library handles with 4-step resolution (direct path, lib prefix, system dirs).
385
+ - `FFIFunction` dataclass — lazy binding with auto type coercion between LTL and C types.
386
+ Supports: `int`, `float`, `str`, `bool`, `void`, `size_t`, `uint8`, `int64`, pointer types.
387
+ - `FFIRegistry` class — register and call external C functions with type-safe wrappers.
388
+ Methods: `declare_function()`, `declare_struct()`, `call()`, `get_function()`, `get_struct()`.
389
+ - `define_ffi_struct(name, fields)` — create ctypes `Structure` subclasses dynamically.
390
+ - Memory utilities: `ffi_alloc()`, `ffi_free()`, `ffi_read_string()`, `ffi_write_string()`.
391
+ - `get_ffi_builtins()` — returns runtime FFI functions for LTL VM integration.
392
+
393
+ ### JavaScript Target
394
+ - `Target.JAVASCRIPT` in compiler Target enum.
395
+ - `lateralus js <file> [-o output.js] [--format esm|cjs|iife]` CLI command.
396
+ - Full transpilation to JavaScript ES2022+ via `JavaScriptTranspiler`.
397
+ - Module format options: ES Modules (default), CommonJS, and IIFE.
398
+
399
+ ### WASM Target
400
+ - `Target.WASM` in compiler Target enum.
401
+ - `lateralus wasm <file> [-o output.wat]` CLI command.
402
+ - Compilation to WebAssembly Text Format (WAT) via `WasmCompiler`.
403
+
404
+ ### Jupyter Kernel
405
+ - `LateralusKernel` class with full kernel protocol implementation.
406
+ - `do_execute()` — compile LTL source → Python → exec with stdout/stderr capture.
407
+ - `do_complete()` — keyword, builtin, and namespace completions.
408
+ - `do_inspect()` — symbol inspection and documentation lookup.
409
+ - `do_is_complete()` — brace-counting heuristic for multiline input.
410
+ - `install_kernel()` — register with Jupyter via `jupyter_client` or manual fallback.
411
+ - ipykernel integration via dynamic `IPythonLateralusKernel` subclass.
412
+
413
+ ### C Backend Enhancements
414
+ - Added v1.6 async visitors: `_visit_NurseryBlock` (sequential fallback),
415
+ `_visit_AsyncForStmt` (sync for-loop), `_expr_ChannelExpr`, `_expr_CancelExpr`.
416
+ - Added v1.7 cfg visitors: `_visit_CfgAttr` (→ `#if defined()`),
417
+ `_expr_CfgExpr` (→ `defined()` ternary).
418
+ - Added v1.8 metaprogramming visitors: `_visit_ConstFnDecl` (→ `static inline`),
419
+ `_visit_MacroDecl` (→ `#define`), `_visit_MacroInvocation`,
420
+ `_visit_CompTimeBlock`, `_visit_DeriveAttr`, `_expr_ReflectExpr`,
421
+ `_expr_QuoteExpr`, `_expr_UnquoteExpr`.
422
+
423
+ ### LateralusOS
424
+ - **Network Shell Commands**: 4 new commands bring total to 21:
425
+ - `ifconfig` — display eth0 interface info (MAC, link, IO base, IRQ, TX/RX stats)
426
+ - `netstat` — network statistics (packets, bytes, errors)
427
+ - `ping <host>` — ARP broadcast probing with 3-packet send/receive
428
+ - `arp` — display ARP table entries
429
+
430
+ ### Infrastructure
431
+ - **50 new tests** in `test_v19_features.py` across 8 test classes:
432
+ `TestTargetEnum`, `TestJavaScript`, `TestWASM`, `TestFFI`, `TestJupyterKernel`,
433
+ `TestCBackendV18`, `TestV19Showcase`, `TestCompileResult`.
434
+ - **1,549 total tests passing**, 0 failures.
435
+ - **30 example programs**, all compiling successfully.
436
+ - New showcase: `v19_showcase.ltl` (180 lines) — Vector2D, Matrix2x2, Shape enum,
437
+ pipeline processing, const fn, FFI buffers, signal processing, Result types.
438
+
439
+ ---
440
+
441
+ ## [1.8.0] — 2026-04-16 — Metaprogramming
442
+
443
+ ### Compile-Time Evaluation
444
+ - `const fn` declarations — functions decorated with `@_lru_cache(maxsize=None)` for
445
+ compile-time memoized evaluation. Supports full parameter lists and return types.
446
+
447
+ ### Procedural Macros
448
+ - `macro name!(params) { body }` — define procedural macros that expand at compile time.
449
+ Compiled to `_macro_name()` Python functions.
450
+ - `name!(args)` invocation syntax — expands to `_macro_name(args)` calls.
451
+ Works in all expression contexts: `let`, `return`, function arguments, etc.
452
+
453
+ ### AST Transformation
454
+ - `quote { ... }` — capture AST fragments as data (`{"__ast__": [...]}`).
455
+ - `$ident` / `${expr}` — unquote (splicing) within quote blocks.
456
+ - `comptime { ... }` — inline compile-time block execution with marker comments.
457
+
458
+ ### Derive System (`@derive`)
459
+ - `@derive(Trait1, Trait2, ...)` on `struct` and `enum` declarations.
460
+ - **8 built-in derive traits**:
461
+ - `Debug` → `__repr__` method
462
+ - `Display` → `__str__` method
463
+ - `Eq` → `__eq__` method
464
+ - `Hash` → `__hash__` method
465
+ - `Clone` → `clone()` method
466
+ - `Default` → `default()` classmethod
467
+ - `Serialize` → `to_dict()` method
468
+ - `Deserialize` → `from_dict()` classmethod
469
+
470
+ ### Reflection API
471
+ - `reflect!(Type)` — compile-time type introspection returning
472
+ `{name, kind, fields, methods}` dict via `_type_info()` runtime helper.
473
+ - Supports struct (dataclass) field extraction and enum detection.
474
+
475
+ ### Infrastructure
476
+ - **4 new lexer keywords**: `macro`, `comptime`, `derive`, `reflect`
477
+ - **8 new AST nodes**: `ConstFnDecl`, `MacroDecl`, `MacroInvocation`,
478
+ `CompTimeBlock`, `DeriveAttr`, `ReflectExpr`, `QuoteExpr`, `UnquoteExpr`
479
+ - **56 new tests** in `test_v18_features.py` covering lexer, AST, parser,
480
+ codegen, derive traits, and integration scenarios.
481
+
482
+ ---
483
+
484
+ ## [1.7.0] — 2026-04-15 — Package Manager & Build System
485
+
486
+ ### Package Manager
487
+
488
+ #### `lateralus.toml` Manifest
489
+ - Replaced `lateralus.json` with TOML-based manifest (`lateralus.toml`).
490
+ - Lightweight TOML parser bundled (no external dependencies); supports
491
+ strings, integers, floats, booleans, arrays, tables, inline tables,
492
+ multiline arrays, and inline comments.
493
+ - Full `ProjectManifest` class with `from_toml()`, `from_json()` (legacy),
494
+ `from_file()`, `to_toml()`, `save()` and round-trip support.
495
+
496
+ #### Dependency Resolution
497
+ - `SemVer` with compound constraints (`>=1.0,<2.0`), caret (`^`), tilde
498
+ (`~`), range, wildcard (`*`), and exact pinning.
499
+ - `DepGraph` with topological sort and cycle detection.
500
+ - `DependencyResolver` with transitive resolution, local path / git / registry
501
+ source support.
502
+ - `LockFile` / `LockEntry` for reproducible builds.
503
+
504
+ #### Publishing
505
+ - `PackageBundle.create()` with SHA-256 integrity hash.
506
+ - `lateralus publish` (and `--dry-run`) CLI command.
507
+
508
+ ### Build System
509
+
510
+ #### Build Profiles
511
+ - `BuildProfile` dataclass: `opt_level`, `debug`, `strip`, `lto`, `features`,
512
+ `target`, `extra_flags`.
513
+ - Default profiles: `debug` (O0, debug), `release` (O3, strip, lto),
514
+ `bench` (O3, bench feature).
515
+ - `lateralus build --profile <name>`.
516
+
517
+ #### Workspaces
518
+ - `Workspace` dataclass with glob-based member resolution and exclude
519
+ patterns, shared dependencies.
520
+
521
+ ### Conditional Compilation
522
+
523
+ #### `@cfg` Decorator
524
+ - `@cfg(target, "python")` — strips decorated `fn`, `struct`, or `enum`
525
+ from codegen when the condition is false.
526
+ - Keys: `target`, `os`, `profile`, `feature`, plus custom keys.
527
+
528
+ #### `cfg!()` Expression
529
+ - `cfg!(target, "python")` — compile-time boolean expression.
530
+ - Evaluates against `CfgContext` (target, os, profile, features, custom keys).
531
+ - Usable in `if`, `let`, and any expression position.
532
+
533
+ ### CLI
534
+ - `lateralus init [name] [--template lib|bin|workspace]` — scaffold project.
535
+ - `lateralus add <pkg> [--version X] [--git URL] [--dev]` — add dependency.
536
+ - `lateralus publish [--dry-run]` — create and verify package bundle.
537
+ - Updated `lateralus info` with v1.6 and v1.7 feature lists.
538
+
539
+ ### Testing
540
+ - 71 new tests (1,443 total), 28 compiling examples.
541
+ - `v17_showcase.ltl` demonstrating @cfg, cfg!(), packages, profiles.
542
+
543
+ ---
544
+
545
+ ## [1.6.0] — 2026-04-01 — Concurrency & Async
546
+
547
+ ### Language — New Constructs
548
+
549
+ #### Structured Concurrency: `nursery` blocks
550
+ - `nursery { spawn task1(); spawn task2() }` — spawns tasks that are
551
+ guaranteed to complete before the nursery exits.
552
+ - Named nurseries: `nursery workers { ... }` for clarity.
553
+ - Automatic cancellation of sibling tasks on first failure.
554
+
555
+ #### Channels: `channel<T>(capacity)`
556
+ - `let ch = channel<int>(10)` — typed, buffered channel.
557
+ - `channel(5)` — untyped channel with capacity.
558
+ - `channel<str>()` — unbuffered typed channel.
559
+ - Thread-safe `send()`/`recv()` with `try_send()`/`try_recv()` variants.
560
+ - `close()`, `is_closed`, `len()`, iterator support.
561
+
562
+ #### Select Statement
563
+ - Multiplexes across channels with recv/send/timeout/default arms:
564
+ ```
565
+ select {
566
+ msg from inbox => { handle(msg) }
567
+ send(outbox, data) => { log("sent") }
568
+ after 1000 => { handle_timeout() }
569
+ _ => { handle_default() }
570
+ }
571
+ ```
572
+
573
+ #### Async For
574
+ - `async for event in stream { process(event) }` — iterate over async
575
+ streams/generators.
576
+
577
+ #### Cancellation Tokens
578
+ - `let token = cancel` — creates a `CancellationToken`.
579
+ - `token.cancel(reason)`, `token.is_cancelled`, `token.check()`.
580
+ - `token.on_cancel(callback)` — register cleanup handlers.
581
+ - `CancelledError` exception on cancelled `.check()`.
582
+
583
+ #### Parallel Combinators
584
+ - `parallel_map(items, fn)` — parallel map across items using thread pool.
585
+ - `parallel_filter(items, fn)` — parallel predicate filtering.
586
+ - `parallel_reduce(items, fn, init)` — tree-reduce in parallel chunks.
587
+
588
+ ### Compiler
589
+
590
+ #### AST Nodes (7 new)
591
+ - `SelectArm` — kind, channel, binding, value, body.
592
+ - `SelectStmt` — list of `SelectArm`.
593
+ - `ChannelExpr` — elem_type + capacity.
594
+ - `NurseryBlock` — body + optional name.
595
+ - `CancelExpr` — creates a cancellation token.
596
+ - `AsyncForStmt` — var, iter, body.
597
+ - `ParallelExpr` — kind (map/filter/reduce), items, func, init.
598
+
599
+ #### Lexer
600
+ - 3 new keyword tokens: `KW_SELECT`, `KW_NURSERY`, `KW_CANCEL`.
601
+
602
+ #### Parser
603
+ - `_parse_select()` — full select statement with recv/send/timeout/default arms.
604
+ - `_parse_nursery()` — nursery blocks with optional name label.
605
+ - `_parse_async_for()` — `async for x in stream { ... }`.
606
+ - Channel expression: `channel<T>(cap)` with optional generic type.
607
+ - Parallel expressions: `parallel_map/filter/reduce(items, fn[, init])`.
608
+ - Fixed `from` keyword handling in select recv arms (KW_FROM vs IDENT).
609
+
610
+ #### Python Codegen
611
+ - `visit_SelectStmt` — polling loop with `try_recv`/`try_send`, timeout via
612
+ `time.monotonic()`, default arm.
613
+ - `visit_NurseryBlock` — `with _Nursery() as name:` context manager.
614
+ - `visit_AsyncForStmt` — `async for var in iter:`.
615
+ - `ChannelExpr` → `_Channel(capacity)`.
616
+ - `CancelExpr` → `_CancellationToken()`.
617
+ - `ParallelExpr` → `_parallel_map/filter/reduce(fn, items[, init])`.
618
+
619
+ ### Async Runtime (`async_runtime.py`)
620
+ - `CancellationToken` — thread-safe cancel/check/on_cancel with callbacks.
621
+ - `CancelledError` — exception for cancelled operations.
622
+ - `Nursery` — structured concurrency using `ThreadPoolExecutor`, auto-cancels
623
+ siblings on failure, context manager interface.
624
+ - `select(*channels, timeout)` — polls channels, returns first available value.
625
+ - `parallel_reduce(fn, items, initial, workers)` — chunk-based tree reduction.
626
+ - Updated `ASYNC_BUILTINS` registry with all new entries.
627
+
628
+ ### Test Suite
629
+ - **68 new tests** (1,304 → 1,372):
630
+ - `TestV16Lexer` (6): keyword token recognition.
631
+ - `TestParseSelect` (6): recv/send/timeout/default arms, multi-arm, compilation.
632
+ - `TestParseNursery` (4): basic, named, multi-spawn, compilation.
633
+ - `TestParseChannel` (4): typed buffered/unbuffered, untyped, compilation.
634
+ - `TestParseCancel` (2): cancel expression, compilation.
635
+ - `TestParseAsyncFor` (2): async for parsing and compilation.
636
+ - `TestParseParallel` (6): parallel_map/filter/reduce parse and compile.
637
+ - `TestRuntimeChannel` (6): send/recv, try ops, close, iter, len, threaded.
638
+ - `TestRuntimeCancellation` (5): basic, reason, callback, check raises, idempotent.
639
+ - `TestRuntimeNursery` (4): basic, error propagation, cancel token, results.
640
+ - `TestRuntimeSelect` (3): single channel, multiple, timeout.
641
+ - `TestRuntimeParallel` (6): map, filter, reduce, reduce+initial, empty cases.
642
+ - `TestRuntimeTaskGroup` (3): spawn+wait, wait_first, cancel_all.
643
+ - `TestRuntimeRateLimiter` (2): acquire, refill.
644
+ - `TestV16Integration` (9): async fn, spawn, await, full program, pipeline,
645
+ select+channel, cancel, async for, header version.
646
+
647
+ ### Examples
648
+ - `v16_showcase.ltl` (NEW): Demonstrates channels, nursery, select, cancel,
649
+ async for, parallel_map/filter/reduce, and concurrent pipelines.
650
+
651
+ ---
652
+
653
+ ## [1.5.2] — 2026-04-01 — Kernel Concurrency & Backend Coverage
654
+
655
+ ### LateralusOS — Preemptive Scheduler & IPC
656
+
657
+ #### Preemptive Scheduler (`kernel/sched.h`, `kernel/sched.c`)
658
+ - Full preemptive round-robin scheduler with inline-asm context switching.
659
+ - 4 priority levels, configurable timeslice (default 10 ticks).
660
+ - 32 task slots, each with a 16KB stack.
661
+ - `sched_spawn()`, `sched_yield()`, `sched_exit()` for task lifecycle.
662
+ - `sched_sleep()` with tick-based wakeup, `sched_block()`/`sched_unblock()`
663
+ for synchronization primitives.
664
+ - `sched_list()` serial diagnostic output with task states.
665
+ - Wired into `irq0_handler` for timer-driven preemption.
666
+
667
+ #### IPC Message Queues (`kernel/ipc.h`, `kernel/ipc.c`)
668
+ - Ring-buffer message queue system: 16 queues × 32 capacity × 256-byte messages.
669
+ - Blocking `ipc_send()`/`ipc_recv()` using scheduler block/unblock.
670
+ - Non-blocking `ipc_try_send()`/`ipc_try_recv()` variants.
671
+ - Named queue lookup via `ipc_find()`, queue destruction via `ipc_destroy()`.
672
+ - `ipc_peek()`, `ipc_pending()`, `ipc_list()` introspection.
673
+ - Stats tracking: total sent/received/dropped per queue.
674
+
675
+ #### Build System
676
+ - Build steps: 14 → 16 (added `kernel/sched.o`, `kernel/ipc.o`).
677
+ - `kernel_stub.c`: replaced Phase 10/11 stubs with real `ipc_init()` and
678
+ `sched_init()` calls; added `sched_tick()` to timer interrupt handler.
679
+ - Kernel size: ~550KB, ISO: 10M.
680
+
681
+ ### Bootstrap
682
+ - **`bootstrap/v2_ir_codegen.ltl`** (NEW, ~500 lines): Self-hosted IR code
683
+ generator translating AST to SSA-like IR. Handles 14 expression types,
684
+ 7 statement types. `compile_to_ir()` pipeline: Source → Tokens → AST → IR
685
+ → human-readable text. `ir_stats()` provides compiler statistics.
686
+
687
+ ### WASM Backend
688
+ - Fixed missing `import re` in `codegen/wasm.py` — was causing `NameError`
689
+ in `expression_to_wat()`.
690
+
691
+ ### Test Suite
692
+ - **99 new tests** (1,205 → 1,304):
693
+ - 38 WASM backend tests: `TestWasmType` (8), `TestWatInstructions` (8),
694
+ `TestWasmModule` (8), `TestWasmCompiler` (4), `TestCompileToWasm` (3),
695
+ `TestWatSerialization` (3), `TestWasmIntegration` (4).
696
+ - 61 JS backend tests: `TestJSBuffer` (6), `TestOperatorMapping` (12),
697
+ `TestJSRuntime` (12), `TestJavaScriptTranspiler` (12),
698
+ `TestExpressionTranslation` (7), `TestParamTranslation` (5),
699
+ `TestLineTranslation` (5), `TestJSIntegration` (5).
700
+ - All 1,304 tests pass in ~1.9s.
701
+
702
+ ---
703
+
704
+ ## [1.5.1] — 2026-04-01 — Hardening & OS Drivers
705
+
706
+ ### Parser
707
+ - **`else if` syntax**: Parser now accepts `else if` as an alias for `elif`,
708
+ enabling both `elif` and `else if` interchangeably in if-chains.
709
+ - Added `_peek_next_is()` helper for multi-token lookahead.
710
+
711
+ ### LSP Server v2 Features
712
+ - **Document symbols**: `textDocument/documentSymbol` — reports functions,
713
+ structs, enums, traits, constants, and top-level bindings with proper
714
+ SymbolKind values and location ranges.
715
+ - **Go to definition**: `textDocument/definition` — finds declarations of
716
+ identifiers by scanning the document for `fn`, `let`, `const`, `struct`,
717
+ `enum`, `trait` definitions.
718
+ - **Find references**: `textDocument/references` — word-boundary search for
719
+ all occurrences of an identifier, with option to include/exclude declaration.
720
+ - **Signature help**: `textDocument/signatureHelp` — shows function signatures
721
+ and highlights active parameter as user types arguments.
722
+ - **Code formatting**: `textDocument/formatting` — integrates the formatter
723
+ module for on-demand code formatting.
724
+ - Fixed `doc.source` → `doc.text` bug in formatting handler.
725
+
726
+ ### CLI Extensions
727
+ - `lateralus fmt <file>` — format Lateralus source files.
728
+ - `lateralus lint <file>` — run linter checks.
729
+ - `lateralus lsp` — start the Language Server Protocol server.
730
+ - `lateralus dap` — start the Debug Adapter Protocol server.
731
+ - `lateralus-dap` entry point added to `pyproject.toml`.
732
+
733
+ ### Formatter
734
+ - v1.5 block recognition: `enum`, `struct`, `impl`, `trait`, `pub fn`,
735
+ `pub struct`, `pub enum`, `async fn` now get blank-line spacing.
736
+ - Fixed blank-line insertion to trigger before any block declaration when
737
+ preceded by non-empty code (not just after `}`).
738
+
739
+ ### Linter
740
+ - Added 12 v1.5 keywords to reserved word set: `enum`, `impl`, `trait`,
741
+ `async`, `await`, `yield`, `spawn`, `chan`, `select`, `Result`, `Option`, `none`.
742
+
743
+ ### C Backend Hardening
744
+ - Added 8 missing AST node visitors: `EmitStmt`, `MeasureBlock`,
745
+ `PipelineAssign`, `GuardExpr`, `WhereClause`, `SpreadExpr`, `TryExpr`,
746
+ `ProbeExpr` — all 8 now emit correct C code instead of silent TODO comments.
747
+ - Cleaned up fallback messages: `TODO:` → `unsupported:` for clarity.
748
+ - JavaScript backend: same cleanup for unknown node handler.
749
+
750
+ ### Standard Library
751
+ - **`stdlib/channel.ltl`** (NEW): CSP-style channel primitives for concurrent
752
+ communication. `channel_new`, `channel_send`, `channel_recv`, `try_send`,
753
+ `try_recv`, `channel_close`, `select`, `select_timeout`, `fan_out`,
754
+ `fan_in`, `pipeline`, `drain`, `collect`, `stats`. (34 modules total)
755
+
756
+ ### Test Suite
757
+ - **47 new tests** (1,158 → 1,205):
758
+ - 5 parser tests for `else if` syntax.
759
+ - 30 LSP server tests: document symbols (14), definition (7),
760
+ references (4), signature help (5), protocol-level v2 (7).
761
+ - 5 formatter tests for v1.5 block spacing.
762
+ - All 1,205 tests pass in ~1.8s.
763
+
764
+ ### IR
765
+ - Fixed `IROp.RAISE` → `IROp.THROW` alignment with AST naming convention.
766
+
767
+ ### REPL
768
+ - Updated version banner from v1.1.0 → v1.5.0.
769
+
770
+ ### Example Programs
771
+ - Fixed all 26 examples to compile cleanly (0 failures).
772
+ - Cleaned up syntax issues: `as` casts, `import` statements,
773
+ `fn` lambdas, generic type annotations, map literal patterns.
774
+
775
+ ### LateralusOS — Drivers & Syscalls
776
+
777
+ #### ATA PIO Disk Driver (`drivers/ata.h`, `drivers/ata.c`)
778
+ - Full ATA PIO mode disk driver for the primary IDE controller.
779
+ - IDENTIFY command: detects master/slave drives, reads model, serial,
780
+ sector count, and size.
781
+ - `ata_read_sectors()`: 28-bit LBA sector reads with polling.
782
+ - `ata_write_sectors()`: Sector writes with automatic cache flush.
783
+ - `ata_flush()`: Explicit cache flush command.
784
+ - Wired into kernel boot sequence as Phase 7 (disk detection).
785
+
786
+ #### Syscall Dispatch Table (`kernel/syscall.h`, `kernel/syscall.c`)
787
+ - Proper syscall dispatch table with 15 functional handlers replacing
788
+ the previous "38 syscalls registered (stub)" message.
789
+ - Implemented syscalls: `exit`, `read`, `write`, `open`, `close`,
790
+ `getpid`, `sleep`, `yield`, `brk`, `time`, `disk_read`, `disk_write`,
791
+ `disk_info`, `uptime`, `reboot`.
792
+ - `sys_write` to fd 1/2 outputs to serial port.
793
+ - `sys_sleep` uses PIT tick counter for millisecond-precision delays.
794
+ - `sys_reboot` performs triple-fault reboot.
795
+
796
+ #### Network Driver (`drivers/net.h`, `drivers/net.c`)
797
+ - RTL8139 PCI Ethernet NIC driver with PCI bus scan.
798
+ - Hardware init: reset, MAC read, RX/TX buffer allocation, bus mastering.
799
+ - `net_send()`: raw Ethernet frame transmission via TX descriptors.
800
+ - `net_recv()`: polled packet reception from RX ring buffer.
801
+ - `net_link_up()`, `net_mac_str()`, `net_get_info()` status queries.
802
+ - Wired into kernel boot sequence as Phase 9 (NIC detection).
803
+
804
+ #### Syscall Extensions
805
+ - Added `SYS_NET_SEND` (38), `SYS_NET_RECV` (39), `SYS_NET_INFO` (40).
806
+ - Syscall table: 15 → 18 handlers.
807
+
808
+ #### Parser Fix
809
+ - Fixed incomplete `_parse_guard()`: method now parses the else-block
810
+ and returns a proper `GuardExpr` instead of `None`.
811
+ - Added `None`-skip guard in `visit_BlockStmt` (defensive).
812
+
813
+ #### Build System
814
+ - Build steps: 11 → 14 (added `drivers/ata.o`, `drivers/net.o`,
815
+ `kernel/syscall.o`).
816
+ - Made `serial_puts()` and `kmalloc()` non-static for cross-module linking.
817
+
818
+ #### Boot Sequence
819
+ - Phase 7: ATA disk detection (reports drive model, size).
820
+ - Phase 8: Syscall table initialization (reports handler count).
821
+ - Phase 9: Network adapter detection (reports MAC, IRQ).
822
+ - Phases 10-11: IPC + Scheduler (stubs, renumbered).
823
+
824
+ ---
825
+
826
+ ## [1.5.0] — 2026-03-31 — ADT Edition
827
+
828
+ ### LSP Server v1.5.0
829
+ - **Compiler-powered diagnostics**: `lsp_server.py` now invokes the full
830
+ compiler pipeline (Lex → Parse → Semantic analysis) for real-time
831
+ parse errors, type errors, and semantic warnings in the editor.
832
+ - Severity mapping: LTL `FATAL`/`ERROR`/`WARNING`/`INFO`/`HINT` →
833
+ LSP severity levels with suggested-fix annotations.
834
+ - **New completions**: v1.5 keywords (`enum`, `impl`, `trait`, `async`,
835
+ `await`, `yield`), types (`Iterator`, `Comparable`, `Hashable`),
836
+ snippets (`enum`, `Result match`, `Option match`, `impl`, `test`).
837
+ - Server version bumped 0.1.0 → 1.5.0.
838
+
839
+ ### Gradual Typing (v1.5)
840
+ - **`GradualType`** class in `type_system.py`: wraps a known static type
841
+ and permits interop with `any`-typed code without compile-time errors.
842
+ Mismatches are deferred to runtime casts (Siek & Taha 2006).
843
+ - `TypeKind.GRADUAL` added to the type kind enum.
844
+ - `DYNAMIC` constant (`GradualType(ANY)`) for fully-dynamic boundaries.
845
+ - `parse_type_annotation` handles `~T` syntax for gradual types.
846
+ - `TypeChecker.check_assignment` skips static checking when either
847
+ side is a `GradualType`.
848
+
849
+ ### VS Code Extension
850
+ - **Grammar**: Added `trait` keyword, `none` builtin value, optional type
851
+ pattern (`int?`, `str?`), expanded builtin functions (15 new).
852
+ - **Snippets**: Added `fntb` (trait-bound function), `opt` (optional type),
853
+ `ltlc` (C transpile comment), `test` (test function).
854
+ - Types list expanded: `Iterator`, `Comparable`, `Hashable`.
855
+
856
+ ### Tutorial v1.5 Refresh
857
+ - **Chapter 22**: Result and Option types — `Result<T,E>`, `Option<T>`,
858
+ match-as-expression, `::` scope operator, 8 pattern types.
859
+ - **Chapter 23**: Optional types (`int?`), type narrowing, trait bounds
860
+ (`<T: Comparable>`), const generics (`<N: int>`).
861
+ - **Chapter 24**: C backend — transpilation, hosted vs freestanding,
862
+ LateralusOS real-kernel example.
863
+ - **Chapter 25**: Standard library tour — essential imports, v1.5 modules,
864
+ scientific stack overview.
865
+ - Removed outdated "Coming in v1.5" teaser from ending.
866
+
867
+ ### Stale Reference Fixes
868
+ - Updated all 9 stdlib headers from v1.2.0/v1.3.0 → v1.5.0.
869
+ - Fixed test counts: 1,071 → 1,158 in blog, 1,145 → 1,158 in ROADMAP
870
+ and phase3 blog.
871
+ - Fixed stdlib counts: 22 → 28 in onboarding page (3 locations) and
872
+ website blog excerpt.
873
+ - Added 6 missing module cards to onboarding: `datetime`, `http`, `iter`,
874
+ `os`, `regex`, `result`.
875
+
876
+ ### Example Programs
877
+ - Fixed 8 examples: string-based imports (`import "math"` → `import math`).
878
+ - Rewrote `v15_types.ltl`: removed map literals (parser limitation),
879
+ fixed lambda syntax, renamed `measure` → `area` to avoid keyword conflict.
880
+
881
+ ### Health Check
882
+ - Updated `scripts/health_check.py`: v1.3.0 → v1.5.0, added 6 new stdlib
883
+ modules, added `compiler` and `lsp_server` to import check, added
884
+ `vscode-lateralus/package.json` and 3 new doc files to file list.
885
+ - All 12/12 modules importable, 45/45 files present, HEALTHY.
886
+
887
+ ### Build & Test
888
+ - All 1,158 tests passing in ~2.0s.
889
+ - All 16 docs build (0 failures).
890
+
891
+ ### Type System Enhancements
892
+ - **Optional type syntax**: `int?`, `str?`, `map?` — append `?` to any type
893
+ for compiler-enforced nil checking. Parser now uses `QUESTION` token.
894
+ - **Type narrowing**: `TypeNarrower` class for flow-sensitive analysis.
895
+ Narrows optional types in `if x != nil` branches, supports `&&`/`||`/`!`
896
+ composition and `type_of()` checks.
897
+ - **Generics with trait bounds**: `fn sort<T: Comparable>(items: list)` —
898
+ bounded generic parameters parsed and stored as `{"name": str, "bound": str}`.
899
+ - **Const generics**: `struct Matrix<N: int, M: int>` — value-level generic
900
+ parameters for fixed-size type specifications.
901
+ - **FnDecl generics field**: Function declarations now store `generics` list.
902
+ - **Test count**: 1,158 tests passing (up from 1,145).
903
+
904
+ ### Standard Library Expansion (22 → 28 modules)
905
+ - **`stdlib.os`**: File system, paths, environment, process control.
906
+ - **`stdlib.datetime`**: Date/time construction, arithmetic, formatting,
907
+ calendar helpers (leap year, day-of-week, ISO 8601).
908
+ - **`stdlib.regex`**: Pattern matching, validation (email, URL, IP),
909
+ extraction, replacement.
910
+ - **`stdlib.http`**: HTTP client (GET/POST/PUT/DELETE), JSON helpers,
911
+ URL parsing and encoding.
912
+ - **`stdlib.result`**: Result/Option monads with `map`, `and_then`, `or_else`,
913
+ `try_call`, `collect_results`, `partition_results`.
914
+ - **`stdlib.iter`**: Lazy iterator combinators — `map`, `filter`, `take`,
915
+ `skip`, `flat_map`, `enumerate`, `zip`, `chain`, `unique`, `chunks`,
916
+ `windows`, `reduce`, `fold`.
917
+
918
+ ### Documentation
919
+ - **Cookbook**: Added Chapter 13 (5 recipes for optional types, trait bounds,
920
+ const generics, Result/Option patterns, C backend transpilation).
921
+ - **Quick Reference**: Added sections for optional types, trait bounds,
922
+ C backend, and 28 stdlib imports.
923
+ - **Blog**: New post "v1.5 Type System: Optional Types, Trait Bounds &
924
+ Type Narrowing".
925
+ - **Doc builder fix**: Fixed `render_ltlml()` vs `to_html()` bug in
926
+ `build_docs.py` — all 15 docs now build successfully.
927
+ - **Footer version**: Updated doc builder footer from v1.3 to v1.5.
928
+
929
+ ### Roadmap & Feature Flags
930
+ - Checked off: optional types, trait bounds, const generics, type narrowing.
931
+ - Added feature flags: `optional_types`, `trait_bounds`, `const_generics`,
932
+ `type_narrowing`, `c_backend` — all marked Stable.
933
+
934
+ ### LateralusOS — GUI Phase 3: Interactive Desktop
935
+
936
+ #### RAM Filesystem (`fs/ramfs.h`, `fs/ramfs.c`)
937
+ - **Inode-based in-memory filesystem**: 64 max nodes, 16 children per
938
+ directory, 2 KB max file content.
939
+ - Pre-populated directory tree: `/`, `/home`, `/etc`, `/tmp` with default
940
+ files (`hostname`, `motd`, `readme.txt`, `hello.ltl`, `spiral.txt`).
941
+ - Full POSIX-like API: `ramfs_create`, `ramfs_mkdir`, `ramfs_write`,
942
+ `ramfs_append`, `ramfs_read`, `ramfs_find`, `ramfs_list`, `ramfs_remove`.
943
+ - Path resolution with `..` and `.` support via `ramfs_resolve_path`.
944
+ - Integrated into both text-mode shell and GUI terminal.
945
+
946
+ #### PC Speaker Driver (`drivers/speaker.h`, `drivers/speaker.c`)
947
+ - **PIT Channel 2 tone generation**: programs ports 0x42, 0x43, 0x61.
948
+ - Non-blocking melody queue (8 notes max) with auto-advance.
949
+ - Pre-built sound effects:
950
+ - `speaker_boot_chime`: C5→E5→G5→C6 ascending arpeggio at startup.
951
+ - `speaker_window_open`: A5→D6 two-note chime on window creation.
952
+ - `speaker_keyclick`: 1200 Hz, 3 ms ultra-short feedback.
953
+ - `speaker_error_beep`: A3 warning tone.
954
+ - `speaker_notify`: E6 notification ding.
955
+
956
+ #### Cooperative Task Scheduler (`kernel/tasks.h`, `kernel/tasks.c`)
957
+ - **Lightweight callback scheduler**: 16 max concurrent tasks.
958
+ - Round-robin execution with configurable intervals.
959
+ - `task_create` (periodic) and `task_create_oneshot` (delayed, auto-remove).
960
+ - `tasks_tick()` — call at 1 kHz from PIT ISR.
961
+ - `tasks_list()` — human-readable table for terminal `tasks` command.
962
+
963
+ #### Functional GUI Terminal (`gui/terminal.h`, `gui/terminal.c`)
964
+ - **Full interactive terminal emulator** with 200-line scrollback, 80 columns.
965
+ - Support for 4 simultaneous terminal instances.
966
+ - **17 built-in commands**:
967
+ - `help`, `clear`, `history` — terminal management
968
+ - `ls [dir]`, `cat <file>`, `touch <file>`, `mkdir <dir>`, `rm <f>`,
969
+ `cd <dir>`, `pwd` — VFS file operations
970
+ - `echo <msg>` — print (supports `echo text > file` redirect)
971
+ - `uname`, `uptime`, `free`, `tasks` — system information
972
+ - `neofetch` — ASCII art system info banner
973
+ - Command history (16 entries) with Up/Down arrow navigation.
974
+ - Cursor blinking (500 ms interval).
975
+ - Working directory tracking with `cwd_node` for relative path resolution.
976
+ - Terminal windows set `is_terminal` flag for keyboard routing.
977
+
978
+ #### Alt+Tab Window Switcher
979
+ - **Overlay panel** listing all visible windows with highlighted selection.
980
+ - `Alt+Tab` cycles forward, `Shift+Alt+Tab` cycles backward.
981
+ - Releasing Alt key focuses the selected window (restores if minimized).
982
+ - Rendered as centered rounded-rect overlay between menus and cursor.
983
+
984
+ #### Animated Wallpaper
985
+ - **Color-cycling gradient** using integer sine/cosine tables (64 entries).
986
+ - **12 twinkling stars** at deterministic pseudo-random positions with
987
+ brightness that fades in and out.
988
+ - **5 Fibonacci spiral rings** with rotating dots in Catppuccin accent
989
+ colors (blue, green, yellow, pink, lavender).
990
+ - **Pulsing logo**: "LateralusOS" text with oscillating glow color.
991
+ - Phase-based animation: `wallpaper_phase` incremented every `gui_tick`.
992
+
993
+ #### Window Animations
994
+ - **Open animation**: 8-frame scale-from-center on window creation.
995
+ - **Close animation**: 7-frame shrink-to-center on window close.
996
+ - **Minimize animation**: 7-frame slide-to-taskbar on minimize.
997
+ - New `Window` fields: `anim_state`, `anim_frame`.
998
+
999
+ #### Keyboard Enhancements
1000
+ - **Ctrl key tracking**: scancodes 0x1D/0x9D, generates ASCII control codes.
1001
+ - **Alt key tracking**: scancodes 0x38/0xB8, enables Alt+Tab.
1002
+ - **Ctrl+T**: open new terminal.
1003
+ - **Ctrl+A**: toggle start menu.
1004
+ - **Ctrl+M**: open system monitor.
1005
+ - VFS commands (`ls`, `cat`, `touch`, `mkdir`) added to text-mode shell.
1006
+
1007
+ #### Lateralus Companion Files
1008
+ - `gui/terminal.ltl` — full terminal emulator in Lateralus (17 commands).
1009
+ - `gui/wallpaper.ltl` — animated wallpaper engine with sine tables.
1010
+ - `gui/animation.ltl` — window animation state machine with easing functions.
1011
+ - `drivers/speaker.ltl` — PIT Channel 2 speaker driver with melody queue.
1012
+ - `fs/vfs.ltl` — updated with full RAMFS implementation (~120 new lines).
1013
+ - `kernel/scheduler.ltl` — updated with cooperative task scheduler section.
1014
+
1015
+ #### Build & Metrics
1016
+ - **11-step build pipeline**: 4 new .c files, 11 total .o files linked.
1017
+ - Kernel size: **375 KB** (up from 136 KB in Phase 2).
1018
+ - ISO size: 13 MB.
1019
+ - 0 compiler warnings.
1020
+ - Boot test: PASSED (QEMU serial output verified).
1021
+
1022
+ ### Algebraic Data Types (ADTs)
1023
+ - `Result::Ok(v)` / `Result::Err(e)` — explicit constructors with `::` syntax.
1024
+ Both `Ok` and `Err` now carry `__match_args__` for Python `match/case` destructuring.
1025
+ - `Option::Some(v)` / `Option::None` — nullable type without null pointers.
1026
+ `Some` has `__match_args__`; `None_` is a singleton of `_NoneType`.
1027
+ - `Option()` helper wraps a Python value: `Some(v)` or `None_`.
1028
+ - New preamble types: `_LtlOption`, `Some`, `_NoneType`, `None_`.
1029
+
1030
+ #### Type Pattern Matching (match as expression)
1031
+ - `match expr { Pat => value, ... }` — match is now a first-class **expression**
1032
+ that returns a value, not only a statement.
1033
+ - `TypeMatchExpr` AST node with arms of `TypeMatchArm`.
1034
+ - Full pattern language in match arms:
1035
+ - `WildcardPattern` (`_`) — discard
1036
+ - `LiteralPattern` (`42`, `"ok"`) — value match
1037
+ - `BindingPattern` (`x`) — capture value
1038
+ - `TypePattern` (`Point(x, y)`) — struct destructuring
1039
+ - `EnumVariantPattern` (`Result::Ok(v)`) — ADT variant destructuring
1040
+ - `TuplePattern` (`(a, b)`) — tuple destructuring
1041
+ - `ListPattern` (`[h, ...t]`) — head/tail list split
1042
+ - `OrPattern` (`"Sat" | "Sun"`) — alternative patterns
1043
+ - Guard clauses: `Result::Ok(n) if n > 0 => "positive"`.
1044
+
1045
+ #### `::` Scope Operator
1046
+ - New `DOUBLE_COLON` token (`TK.DOUBLE_COLON`) — scoped namespace access.
1047
+ - Lexer correctly tokenizes `::` as a two-character token, distinct from `:`.
1048
+ - Used in all ADT constructor and pattern syntax.
1049
+
1050
+ #### Hindley-Milner Type Inference (expansion)
1051
+ - `TypeInferencer.occurs_check(var, typ)` — prevents infinite recursive types.
1052
+ - `TypeInferencer.unify(t1, t2, context)` — Robinson unification with 10 cases:
1053
+ TypeVar binding, List, Map, Tuple, Function, Optional, Union, ANY escape hatch.
1054
+ - `TypeInferencer.substitute(typ, subst)` — recursive substitution application.
1055
+ - `TypeInferencer.solve()` — drains constraint queue, returns error list.
1056
+ - `TypeInferencer.infer_pattern(pattern, subject)` — infers bindings for all
1057
+ 8 pattern kinds; handles rest bindings in list patterns.
1058
+
1059
+ ### Improvements
1060
+
1061
+ #### Python Transpiler (`codegen/python.py`)
1062
+ - Added `visit_TypeMatchExpr()` — emits `match/case` (Python 3.10+) or if-chain.
1063
+ - Added `_render_type_pattern()` — converts pattern nodes to Python pattern strings.
1064
+ - Added `_type_match_expr_iife()` — wraps match-as-expression in a helper function.
1065
+ - `ResultExpr` → `Ok(v)` / `Err(e)` in Python output.
1066
+ - `OptionExpr` → `Some(v)` / `None_` in Python output.
1067
+ - Preamble version comment updated to `v1.5`.
1068
+
1069
+ #### Bug Fixes
1070
+ - Fixed `_parse_while` method header accidentally deleted during parser refactor.
1071
+ Caused `AttributeError: 'Parser' object has no attribute '_parse_while'` in
1072
+ all while-loop tests (2 failures, now 0).
1073
+
1074
+ #### Deprecation Fixes
1075
+ - `notebook.py`: `datetime.utcnow()` replaced with `datetime.now(timezone.utc)`
1076
+ (eliminated 68 Python 3.12 `DeprecationWarning` instances).
1077
+
1078
+ ### Version & Metadata
1079
+ - `pyproject.toml`: `1.4.0` → `1.5.0`
1080
+ - `__init__.py`: `__version__` → `"1.5.0"`
1081
+ - `notebook.py` kernel_info version: `"1.3.0"` → `"1.5.0"`
1082
+ - Compiler preamble comment: `v1.3` → `v1.5`
1083
+
1084
+ ### New Files
1085
+ - `examples/v15_showcase.ltl` — comprehensive showcase of all v1.5 features
1086
+ - `tests/test_v15_features.py` — 60+ tests covering lexer, parser, type system,
1087
+ codegen, and end-to-end compilation of all v1.5 constructs
1088
+
1089
+ ### C99 Backend (`codegen/c.py`)
1090
+ - **Full C99 transpiler** — translates Lateralus AST to standalone C99 source.
1091
+ - **Two modes**: `CMode.HOSTED` (links libc, `main()` wrapper) and
1092
+ `CMode.FREESTANDING` (bare-metal, `_start()` entry, no libc).
1093
+ - 45+ AST visitor methods: functions, structs, enums, match, if/while/for/loop,
1094
+ Result/Option, type aliases, impl blocks, imports, try/recover, throw,
1095
+ foreign blocks, interface vtables, interpolated strings, casts, tuples, maps.
1096
+ - C-keyword collision avoidance (auto-prefix `ltl_` on reserved names).
1097
+ - Three-pass emit: forward declarations → struct definitions → implementations.
1098
+ - Runtime preamble with `ltl_value_t` tagged union, `ltl_str_new()`,
1099
+ `ltl_list_new()`, `ltl_heap_reset()`, bump allocator for freestanding.
1100
+ - `tests/test_c_backend.py` — 74 tests covering all visitors and edge cases.
1101
+ - CLI: `python -m lateralus_lang c <file.ltl> [-o out.c] [--freestanding]`
1102
+ and `ltlc c <file.ltl> [-o out.c] [--freestanding]`.
1103
+
1104
+ ### LateralusOS
1105
+ - **38 files scaffolded**: boot, kernel, HAL, drivers, FS, shell, services,
1106
+ editions, build tools, licensing, test harness, documentation.
1107
+ - **First VM boot**: Multiboot2 x86_64 long mode → QEMU boot (13 MB ISO).
1108
+ - **Interactive shell**: 15 commands (help, clear, uname, uptime, free, echo,
1109
+ version, cpuid, ticks, alloc, heap, history, reboot, halt, **gui**).
1110
+ - VGA text mode driver (80×25), PS/2 keyboard with shift, backspace,
1111
+ arrow-key history, PIC + PIT interrupt handling.
1112
+ - **Bump memory allocator** (`kmalloc`) with linker `_end` symbol.
1113
+ - Multi-edition build system: workstation, industrial, research, embedded.
1114
+ - Multi-architecture support: x86_64, ARM Cortex-M4, RISC-V 64.
1115
+ - Dual licensing: Freeware (free use/study/deploy) and Proprietary (modify/fork).
1116
+ - **Graphical Desktop Environment**:
1117
+ - Framebuffer driver: 1024×768×32bpp linear framebuffer via Multiboot2.
1118
+ - Embedded 8×16 bitmap font for pixel-perfect text rendering.
1119
+ - Drawing primitives: rectangles, circles, lines, gradients, rounded
1120
+ rectangles, alpha blending — all freestanding, no libc.
1121
+ - **GUI widget system**: windows with macOS-style traffic light buttons
1122
+ (close/minimize/maximize), draggable title bars, content areas.
1123
+ - **Desktop environment**: gradient wallpaper, bottom taskbar with clock
1124
+ and window tabs, Start button, Catppuccin Mocha color theme.
1125
+ - **PS/2 mouse driver**: IRQ12 handler, 3-byte packet decoder, cursor
1126
+ rendering, click/drag event dispatch.
1127
+ - Lateralus `.ltl` GUI components: `app.ltl` (theme/layout helpers),
1128
+ `widgets.ltl` (progress bar, toggle, slider, tab bar, toast),
1129
+ `shell_gui.ltl` (terminal emulator widget).
1130
+ - `gui` shell command launches graphical desktop; ESC returns to text mode.
1131
+ - Kernel size: 122 KB (up from 57 KB with text-only).
1132
+ - **GUI Phase 2 — Desktop Polish**:
1133
+ - **Double-buffering**: all rendering targets an off-screen back buffer;
1134
+ `fb_swap()` blits to hardware framebuffer in one pass — eliminates
1135
+ screen tearing. Back buffer allocated via `kmalloc` (~3 MB).
1136
+ - **Start menu**: popup panel above taskbar with 4 launchable apps
1137
+ (Terminal, System Monitor, README, About). Hover highlighting,
1138
+ click-to-launch, click-outside-to-dismiss.
1139
+ - **Context menu**: right-click anywhere on desktop to open a popup
1140
+ with same app launchers. Position-clamped to screen bounds.
1141
+ - **Desktop icons**: 4 clickable icons (Terminal, Monitor, About, README)
1142
+ on left side of desktop. 48×48 colored squares with glyph and label.
1143
+ Hover highlight, selection state.
1144
+ - **System Monitor window**: displays CPU, memory, timer, display,
1145
+ input info. Uptime and frame count auto-refresh every 2 seconds.
1146
+ - **Window resize**: drag handle at bottom-right corner of focused
1147
+ windows. Minimum size enforced at 200×150 pixels.
1148
+ - **Notification tray**: status area left of the taskbar clock showing
1149
+ uptime and approximate FPS, updated every 2 seconds.
1150
+ - New keyboard shortcut: Ctrl+M opens System Monitor.
1151
+ - Kernel size: 136 KB (up from 122 KB).
1152
+
1153
+ ### VS Code Extension
1154
+ - **LSP client** (`extension.js`): spawns `python -m lateralus_lang.lsp_server`,
1155
+ JSON-RPC, completions, hover, diagnostics, status bar indicator.
1156
+ - **6 custom SVG icons**: file icons for `.ltl`, `.ltasm`, `.ltlml`, `.ltlcfg`,
1157
+ `.ltbc`, plus `lateralus-logo.svg`.
1158
+ - **17 new snippets** for v1.5 constructs (Result, Option, match expression,
1159
+ pattern matching, ADT enums, pipeline operators).
1160
+ - Extension version bumped to 1.5.0.
1161
+
1162
+ ---
1163
+
1164
+ ## [1.4.0] — Scientific Edition
1165
+
1166
+ ### New Features
1167
+
1168
+ #### Error Handling: Result / Ok / Err / LtlError
1169
+ - `Ok(value)` and `Err(error)` are first-class result types — no exceptions
1170
+ needed for expected failures.
1171
+ - `Result(v)` wraps a value: returns `Ok(v)` for non-exception values or
1172
+ `Err(v)` for exception instances.
1173
+ - `LtlError` — rich error base class with `.message`, `.code`, `.ctx`,
1174
+ `.cause`; methods `.caused_by(e)`, `.with_context(**kw)`, `.format()`.
1175
+ - `expr?` — Rust-inspired propagation operator: unwraps `Ok` to its inner
1176
+ value, or raises `_PropagateSignal` for `Err`/`None`, propagating the
1177
+ failure up the call stack automatically.
1178
+ - `error.caused_by(cause)` — ChainExpr: attach a root cause to any error.
1179
+ - Full AST nodes: `PropagateExpr`, `ChainExpr`.
1180
+
1181
+ #### Mathematical Computing
1182
+ - **Complex numbers** (preamble): `complex_new`, `re`, `im`, `conj`,
1183
+ `magnitude`, `phase`, `polar`, `rect` — all backed by Python `cmath`.
1184
+ - **Matrix** (preamble): pure-Python `Matrix` class with `+`, `-`, `*`,
1185
+ `@`, `.T`; functions `matrix`, `zeros`, `ones`, `eye`, `mat_det`,
1186
+ `mat_inv`, `mat_transpose`, `mat_trace`, `mat_norm`, `mat_shape`,
1187
+ `mat_row`, `mat_col`, `mat_to_list`, `mat_from_list`.
1188
+ - **Statistics** (preamble): `mean`, `variance`, `std_dev`, `std_err`,
1189
+ `median`, `mode`, `percentile`, `covariance`, `correlation`,
1190
+ `normalize`, `zscore`, `histogram`.
1191
+ - **Numerics** (preamble): `newton` (Newton-Raphson), `bisect`,
1192
+ `trapz` (trapezoidal integration), `ndiff` (central differences).
1193
+ - **min/max** fixed to accept `key=` keyword argument.
1194
+
1195
+ #### Cryptography (preamble)
1196
+ - `sha256`, `sha512`, `md5`, `hmac_sha256`, `b64_encode`, `b64_decode`,
1197
+ `uuid4`, `uuid_ns` — backed by Python `hashlib`, `hmac`, `base64`, `uuid`.
1198
+
1199
+ #### Standard Library (new modules)
1200
+ - **`stdlib/complex.ltl`** — `complex`, `real`, `imaginary`, `conjugate`,
1201
+ `euler`, `cexp`, `csqrt`, `clog`, `format_complex`, `is_real`.
1202
+ - **`stdlib/matrix.ltl`** — `mat`, `zero_matrix`, `one_matrix`, `identity`,
1203
+ `transpose`, `det`, `inv`, `trace`, `norm`, `shape`, `matmul`, `solve`,
1204
+ `mat_map`, `mat_flatten`, `outer`, `dot`, `mat_print`.
1205
+ - **`stdlib/stats.ltl`** — `avg`, `pop_variance`, `pop_std`, `se_mean`,
1206
+ `med`, `most_frequent`, `pct`, `quartiles`, `iqr`, `pearson`, `cov`,
1207
+ `min_max`, `standardize`, `hist`, `ss_total`, `rmse`, `mae`,
1208
+ `linear_regression`, `predict`, `r_squared`, `outliers`, `sample`.
1209
+ - **`stdlib/numerics.ltl`** — `newton_root`, `bisection`, `integrate`,
1210
+ `derivative`, `second_derivative`, `simpson`, `gradient`, `fixed_point`,
1211
+ `euler_ode`, `rk4`, `polyval`, `diff_table`.
1212
+ - **`stdlib/crypto.ltl`** — `hash_sha256`, `hash_sha512`, `hash_md5`,
1213
+ `hmac`, `encode_b64`, `decode_b64`, `random_id`, `named_id`,
1214
+ `verify_sha256`, `checksum`, `xor_cipher`, `make_token`, `verify_token`.
1215
+
1216
+ #### LTLM Markup Language (`.ltlm`)
1217
+ - New file format for documentation, blogs, and papers embedded in the
1218
+ Lateralus ecosystem.
1219
+ - Supports: YAML-lite front-matter, headings `# ## ### ####`, **bold**,
1220
+ *italic*, `code`, ~~strikethrough~~, links, images, tables, blockquotes,
1221
+ bullet/ordered lists, fenced code blocks ` ```lang ` and LTLM semantic
1222
+ blocks `:::type ... :::` (note/warning/example/output/math/ltl/info).
1223
+ - `lateralus_lang/markup/` package: `parser.py` (Document AST) +
1224
+ `renderer.py` (HTML with dark-mode CSS layout, ANSI terminal with colors).
1225
+
1226
+ #### CLI Additions (`ltlc` / `python -m lateralus_lang`)
1227
+ - `ltlc test <file>` — discovers and runs all `@test`-decorated functions
1228
+ in a `.ltl` file; shows ✓/✗ per function with millisecond timing.
1229
+ - `ltlc doc <file.ltlm>` — renders an LTLM document; defaults to ANSI
1230
+ terminal output; `--html` emits a standalone dark-mode HTML page;
1231
+ `-o file` writes output to disk.
1232
+ - `ltlc info` — prints version, Python backend version, installed stdlib
1233
+ modules, and enabled feature flags.
1234
+
1235
+ #### Examples
1236
+ - **`examples/science_demo.ltl`** — complex numbers, matrices, statistics,
1237
+ numerical integration, ODE solving, `?` error propagation.
1238
+ - **`examples/engineering_demo.ltl`** — signal processing, crypto hashing,
1239
+ linear-systems solver, measure blocks, pipeline chaining.
1240
+ - **`examples/v2_bootstrap_preview.ltl`** — a preview of the Lateralus
1241
+ self-hosting bootstrap: a partial tokenizer written in Lateralus itself.
1242
+
1243
+ #### Documentation
1244
+ - `docs/spec/language_spec.md` — full language grammar and semantics.
1245
+ - `docs/spec/stdlib_reference.md` — all stdlib modules documented.
1246
+ - `docs/blog/` — six launch blog posts in LTLM format.
1247
+ - `docs/papers/` — three research papers (design, math, polyglot).
1248
+ - `docs/html/index.html` — dark-mode HTML docs landing page.
1249
+ - `ROADMAP.md` — versioned advancement schedule through v2.0.
1250
+
1251
+ ### Test Suite
1252
+ - **167 tests**, all passing (0 regressions from v1.3.0).
1253
+
1254
+ ---
1255
+
1256
+ ## [1.2.0] — Polyglot Edition
1257
+
1258
+ ### New Features
1259
+
1260
+ #### Polyglot Integration (`foreign` blocks + `@foreign` decorator)
1261
+ - New `foreign "<lang>" { "<source>" }` statement executes source code in an
1262
+ external runtime (Julia, Rust, C, Go, R, Zig, Fortran) via
1263
+ `lateralus.polyglot`.
1264
+ - Optional named params: `foreign "julia" (n: limit) { "sqrt(n)" }` passes
1265
+ Lateralus values as a JSON object to the foreign runtime.
1266
+ - New `@foreign("<lang>")` decorator on `fn` declarations:
1267
+ ```lateralus
1268
+ @foreign("julia")
1269
+ fn compute_primes(limit: int) -> list[int] {
1270
+ "using Primes; params=JSON3.read(readline()); ..."
1271
+ }
1272
+ ```
1273
+ The function body (single string literal) is sent to the polyglot runtime;
1274
+ params are marshalled as JSON; the `result` key of the response is returned.
1275
+ - `_get_polyglot()` lazy helper emitted into every transpiled Python module.
1276
+ - `FOREIGN_CALL` IR opcode + `extra` field on `IRInstr` for metadata.
1277
+
1278
+ #### Language Improvements
1279
+ - `fn` declarations now carry a `decorators` field — decorators are attached
1280
+ directly to the node they annotate (previously only `struct` and `enum` had
1281
+ this).
1282
+ - `@keyword_decorator` supported: any keyword (e.g. `@foreign`) can appear
1283
+ after `@` without requiring it to be an identifier.
1284
+ - `self` accepted as a parameter name in `fn` parameter lists (`KW_SELF`).
1285
+ - `struct X implements Y` alternative syntax for interface implementation.
1286
+ - `interface X extends Y` alternative syntax for interface inheritance.
1287
+ - Enum record variants: `Circle { radius: float }` brace-style in addition to
1288
+ the existing `Circle(radius: float)` paren-style.
1289
+ - Interface methods can be abstract (no body `{}`): `fn area(self) -> float`
1290
+ without a block is now valid inside `interface { }`.
1291
+ - `from X import Y` declarations are now collected into `Program.imports`
1292
+ (previously they landed in `Program.body`).
1293
+
1294
+ #### Standard Library
1295
+ - **`stdlib/io.ltl`** (new) — file I/O: `read_file`, `write_file`,
1296
+ `append_file`, `file_exists`, `lines_of`, `split_lines`, `prompt`,
1297
+ `read_int`, `read_float`, `print_table`, `basename`, `dirname`,
1298
+ `path_join`, `extension`.
1299
+ - **`stdlib/math.ltl`** (extended) — new functions: `lerp`, `sign`, `ln`,
1300
+ `log2`, `log10`, `sin`, `cos`, `tan`, `radians`, `degrees`, `hypot`,
1301
+ `isqrt`; new constants: `INF`, `NAN`.
1302
+
1303
+ #### Examples
1304
+ - **`examples/polyglot_demo.ltl`** — demonstrates `@foreign`, inline
1305
+ `foreign` blocks, pipeline chaining, struct + impl, and stdlib math.
1306
+
1307
+ ### Test Suite
1308
+ - **167 tests** (was 103), all passing.
1309
+ - New file `tests/test_v12_features.py` — 64 tests covering:
1310
+ - Struct (empty, fields, defaults, generics, `implements`, StructLiteral)
1311
+ - Enum (simple, named values, paren/brace variants, generics)
1312
+ - ImplBlock (method count, `for` interface)
1313
+ - InterfaceDecl (empty, methods, `extends`, async methods)
1314
+ - TypeAlias
1315
+ - Decorators (`@simple`, `@with_args`, `@multiple`, `@fn_decorator`, `@foreign`)
1316
+ - `from … import` (single, multiple, braces, alias)
1317
+ - `yield` / `spawn` parsing and transpilation
1318
+ - `InterpolatedStr` parsing and f-string transpilation
1319
+ - Pipeline `|>` chaining transpilation
1320
+ - `ForeignBlock` parsing and Python transpilation
1321
+ - `@foreign` function decorator transpilation
1322
+
1323
+ ### IR / VM
1324
+ - `IROp.FOREIGN_CALL` added.
1325
+ - `IRInstr.extra: Any` field for opcode-specific metadata.
1326
+ - `IRInstrBuilder.emit()` and `SemanticAnalyzer._emit()` accept `extra=`.
1327
+ - `SemanticAnalyzer.visit_ForeignBlock()` emits `FOREIGN_CALL` instructions.
1328
+
1329
+ ---
1330
+
1331
+ ## [1.1.0] — Struct / Enum / Generics Edition
1332
+
1333
+ ### New Language Features
1334
+ - **Structs**: `struct Name { field: Type = default }` with `@dataclass` transpilation.
1335
+ - **Enums**: `enum Color { Red, Green = 2, Blue(r: int) }` with Python `Enum` transpilation.
1336
+ - **Type aliases**: `type Callback = fn(int) -> str`.
1337
+ - **Impl blocks**: `impl Circle { fn area(self) { … } }` injecting methods into structs.
1338
+ - **Interfaces**: `interface Shape { fn area(self) -> float }` with ABC transpilation.
1339
+ - **Decorators**: `@name(args)` syntax on structs, enums, functions.
1340
+ - **`yield` / `spawn`**: generator and async concurrency primitives.
1341
+ - **`self`** keyword in method parameter lists.
1342
+ - **`where`** keyword for generic constraints (parsed, not yet type-checked).
1343
+ - **`not` / `and` / `or`** as word-form logical operators.
1344
+ - **`@` / `?`** single-character tokens for decorators and nullable types.
1345
+
1346
+ ### Tooling
1347
+ - `ltlc ast <file>` — print the AST as JSON or pretty-printed.
1348
+ - `ltlc ir <file>` — dump the IR module.
1349
+ - REPL commands `:ast`, `:ir`, `:ver`.
1350
+
1351
+ ### Standard Library
1352
+ - `stdlib/strings.ltl` — 19 string functions.
1353
+ - `stdlib/collections.ltl` — 24 collection utilities.
1354
+
1355
+ ### Tests
1356
+ - 103 tests, all passing.
1357
+
1358
+ ---
1359
+
1360
+ ## [1.0.0] — Initial Release
1361
+
1362
+ - Lexer, recursive-descent parser, AST.
1363
+ - IR three-address representation + semantic analysis.
1364
+ - Python 3.10+ transpiler target.
1365
+ - Stack-based VM + `.ltasm` assembler.
1366
+ - REPL, CLI (`ltlc`).
1367
+ - `stdlib/core.ltl`.