GoCompilersRust-inspiredStatic AnalysisDSL
Hybroid Live
A high-level programming language built with Go that transpiles to Lua. Designed for easy level development in PewPew Live.
Read moreOverview
Hybroid Live is a sophisticated domain-specific language (DSL) and compiler suite built from the ground up to modernize level development for the PewPew Live engine. While the engine runs on Lua, Hybroid provides a safer, more expressive, and performant developer experience by transpiling high-level code into optimized Lua.
Engineering Leadership & Contributions
1. Compiler Infrastructure (Go)
- Parser & Lexer Architecture: Led the development of a stable, UTF-8 aware lexer and a recursive-descent parser. Implemented a robust “synchronization” strategy to allow the compiler to continue parsing after encountering errors, enabling multiple error reports in a single pass.
- Multi-Pass Semantic Analysis: Developed and refined the “walker” system (Passes 1–3), which handles complex tasks like scope resolution, static type checking, and generic type inference for game entities.
- Code Generation: Engineered the generator to produce efficient Lua code, implementing features like bitwise operations, custom operators, and smart environment access.
2. Advanced Error System (“Alerts”)
- Inspired by the Rust compiler, I built a diagnostic system that provides high-fidelity error messages. This includes specialized
PrinterandCollectorcomponents that render color-coded code snippets with single-line and multi-line context, making it easy for developers to identify and fix issues.
3. Automated API Integration
- To keep Hybroid in sync with the evolving PewPew Live engine, I developed a Python-based API generator. This tool parses raw documentation from the engine’s utility repo and automatically generates the corresponding Hybroid bindings, ensuring 100% API coverage with zero manual boilerplate.
4. Project Tooling & DevOps
- Architected the CLI interface, implementing commands for project initialization (
init) and optimized builds. - Established the testing infrastructure, including automated Go verification suites and evaluator tests to ensure the compiler’s correctness.
Impact
Hybroid Live has transformed level creation from error-prone scripting to a professional software engineering workflow. By introducing static analysis and automated fixed-point math handling, it has significantly reduced runtime crashes and performance bottlenecks for the entire creator community.
Tools & Technologies
- Language: Go (Golang).
- Supporting Scripts: Python (API generation, build automation).
- Key Concepts: Abstract Syntax Trees (AST), Transpilation, Static Typing, Lexical Analysis.