How fkr-0/cl-fzy works
Main Components
a) Core Components:
• Match Engine (src/match.lisp)
• Choice Management (src/choices.lisp)
• Array Handling (src/arr.lisp)
• TTY Interface (src/tty.lisp, src/tty-interface.lisp)
b) System Integration:
• SBCL Thread Management
• Terminal I/O
• Worker Pool (4 cores mentioned)
┌─ User Interface Layer ─────────────────┐
• TTY Interface │
• Processing Layer ────────────────────┬┘
• ┌─ Worker Pool ─┐ │
• Worker 1 │ Choice Manager │
• Worker 2 │ ←→ (Coordinator) │
• Worker 3 │ │
• Worker 4 │ │
• ┘ │
• Core Engine Layer ──────────────────┬┘
• Match Engine │
• Array Handler │
• ┬┘
Component Relationships
• Blue: User interface components
• Green: Processing components
• Yellow: Core engine components
• Red: Critical paths and threading boundaries
Specific Elements to Highlight
a) Threading Model:
• Worker pool with 4 parallel workers
• SBCL thread management
• Synchronization points
b) Data Flow:
• Input string → Choice Manager
• Choice distribution to workers
• Result aggregation
• Final output to TTY
Technical Details
• SBCL dependency for threading
• Array handling for score matrices
• Match algorithm flow
• TTY interaction points
Implementation Notes
A side panel with:
• SBCL-specific features
• Threading constraints
• Performance considerations
• Array optimization notes