How yuriy-chumak/ol works
Main Components Identification
a) Core Components:
• Virtual Machine (src/olvm.c)
• Compiler (lang/*.scm)
• REPL Environment
• FFI (Foreign Function Interface)
b) Library System:
• Scheme Core Libraries
• Owl Legacy Libraries
• External Native Library Bindings
• Platform-specific Implementations
┌─────────────────────────────────────────────┐
• Applications │
• (REPL, Scripts, Embedded Usage) │
• ┤
• Standard Libraries │
• ┌─────────┐ ┌─────────┐ ┌───────────────┐ │
• Scheme │ │ Owl │ │ External Libs │ │
• (R7RS) │ │ Legacy │ │ (OpenGL, etc.) │ │
• ┘ └─────────┘ └───────────────┘ │
• ┤
• Language Core │
• ┌─────────┐ ┌─────────┐ ┌───────────────┐ │
• Compiler │ │ FFI │ │ VM Extensions │ │
• ┘ └─────────┘ └───────────────┘ │
• ┤
• Virtual Machine │
• ┌─────────────────────────────────────────┐│
• OLVM Core ││
• ┘│
• ┘
Data Flow Indicators
• Compilation flow (source → bytecode)
• Execution flow (bytecode → VM)
• FFI interactions
• Library dependencies
Key Features to Highlight
• Pure functional nature
• R7RS Scheme compatibility
• Cross-platform support
• Embedding capabilities
• FFI system
• Binary script compilation
Implementation Details
Notes about:
• Memory management
• Bytecode format
• Library loading mechanism
• Platform-specific adaptations
External Interfaces
Connections to:
• Native libraries
• Operating system
• External applications
• Embedded environments
The layered architecture that allows for
• Pure functional programming
• Cross-platform compatibility
• Embedding capabilities
The separation between
• Core VM implementation
• Language features
• Standard libraries
• External interfaces
The flow of
• Source code compilation
• Bytecode execution
• FFI calls
• Library loading
This design reflects Ol's nature as a small, embeddable, and purely functional Lisp implementation while showing its extensive capabilities through libraries and FFI.