How mlochbaum/bqn works
Core Language Components
• Compiler/Interpreter System
• Virtual Machine (VM)
• Runtime System
• Standard Library
Implementation Architecture
a) Frontend Layer:
• Documentation System (docs/)
• REPL Interface (online and offline)
• Editor Support (editors/)
• Custom Font Rendering
b) Core Processing Layer:
• Parser/Lexer (spec/grammar.md, spec/token.md)
• Compiler Pipeline (implementation/compile/)
• Bytecode Generator
• Virtual Machine (implementation/vm.md)
c) Runtime Layer:
• Primitive Operations (implementation/primitive/)
• System Functions
• Foreign Function Interface (FFI)
• Type System (spec/types.md)
d) Testing/Development Infrastructure:
• Test Framework (test/)
• Benchmarking System (implementation/bootbench.md)
• Self-hosted Compiler (src/)
Use these visual elements:
Component Representation
• Use rectangles for major system components
• Use rounded rectangles for interfaces/APIs
• Use hexagons for processing units
Connection Types
• Double lines: Data flow
Key Relationships to Highlight:
Compilation Pipeline
Source Code → Parser → AST → Bytecode → VM Execution
Runtime Integration
VM ↔ Primitive Operations ↔ System Functions ↔ FFI
Development Workflow
Source Files → Self-hosted Compiler → Tests → Documentation
Frontend Integration
REPL → VM → Runtime System
Editor Support → Parser → Core Language
Special considerations:
Demonstrate the integration with external systems via FFI
• Version/status indicators
• Implementation-specific details
Level of Detail:
• Keep high-level architecture clear while showing important subsystems
• Major data flows and transformations
• System boundaries and external interfaces
• Maintain clarity of the self-hosted nature of the implementation