Inspiration
Standard cloud IDEs often feel clinical, sluggish, and disconnected from the visceral joy of coding. I wanted to build a workspace that felt alive—a high-performance, polyglot sandbox that combined the raw speed of a local terminal with a bold, Neo-Brutalist arcade aesthetic. Beyond just looking good, I was inspired by the friction of constant debugging. I envisioned an environment where you could write algorithmic C++ or Python, get instant zero-latency feedback on interactive inputs, and use an AI copilot to diagnose and instantly drop in fixed code the moment a segmentation fault occurred.
How I Built It
Zero Compiler was engineered using a decoupled architecture prioritizing speed and process isolation:
- The Frontend: Built around the Microsoft Monaco Editor (the powerhouse behind VS Code) to provide high-fidelity IntelliSense, multi-tab support, and instant document formatting. The UI is wrapped in a custom Neo-Brutalist CSS framework with dual themes (darryl-cream and darryl-carbon).
- The Backend Engine: A Python-based asynchronous server (
compiler/server.py) handles execution. Code is routed to isolated subprocesses with strict memory guardrails inside a multi-language Docker container (supporting C, C++, Python, Node.js, Go, Java, Rust, and more). - AI Auto-Repair: Integrated the Google Gemini AI API to capture exit codes, traceback errors, and runtime crashes. The engine parses the Abstract Syntax Tree (AST) context and streams verified, bug-free replacement code directly back into the editor model.
- Hardware Audio Synthesis: Rather than using heavy MP3 files, the 5-theme audio engine is built entirely on the native Web Audio API. Keystrokes and execution events trigger real-time waveform generation. For example, the Cyberpunk Synth's laser sweep is mathematically modeled using an exponential frequency decay over time $t$:
$$f(t) = f_{start} \cdot \left(\frac{f_{end}}{f_{start}}\right)^{\frac{t}{d}}$$
Where $f_{start} = 1400\text{ Hz}$, $f_{end} = 350\text{ Hz}$, and $d$ is the decay duration.
Challenges I Ran Into
The most significant hurdle was Standard Output (STDOUT) Buffering during interactive execution. In typical web compilers, if you run a C program with printf("Enter a number: "); scanf("%d", &n);, the prompt is buffered by the OS and won't display on the frontend until the program terminates.
To solve this, I had to bypass standard OS buffering. I built a zero-latency unbuffered pipe layer using PTY (and specialized Win32 pipes for Windows development) combined with a non-blocking asynchronous reading thread. This allowed the compiler to stream live output sequentially and feed inputs directly into a running process via the POST /api/execute/input endpoint.
Managing safe execution was another challenge. Allowing arbitrary code execution on a cloud server required implementing strict execution timeouts, process isolation, and a stateless session registry to instantly terminate runaway $O(N^2)$ infinite loops without crashing the host worker.
What I Learned
Building this project pushed me deep into the weeds of OS-level process management and I/O streams. I learned how to handle unbuffered binary streams in Python, safely containerize multi-language toolchains (like GCC, G++, and OpenJDK) within a single Docker environment, and map native Web Audio oscillators to UI events for a tactile user experience. I also learned how powerful LLMs can be when restricted to tight, context-aware tasks like AST rewriting, turning a generic chatbot into a precise, 1-click auto-fix engine.
Log in or sign up for Devpost to join the conversation.