Building a Compiler Inside the C++ Compiler with Daniel Nikpayuk
Get the full intelligence
Search transcripts, export clips, track mentions, and explore all topics from “Building a Compiler Inside the C++ Compiler with Daniel Nikpayuk” inside PodZeus.
Daniel Nikpayek, a mathematician and self-taught C++ developer from Canada's Inuvialuk community, has built a groundbreaking compiler-as-library inside C++ that functions as a proof assistant and functional type system. His project, cc-tmp, uses constexpr and template metaprogramming to create a self-contained, embeddable domain-specific language (DSL) that compiles to C++ at compile time—effectively turning the C++ compiler into a meta-compiler. By representing programs as flat numeric arrays (bytecode) and using continuation-passing style functions, Daniel constructs a minimal abstract machine that the C++ compiler can optimize directly, eliminating runtime overhead. This approach allows for serialization of compile-time state, dramatically reducing recompilation time. At its core, the system leverages the Curry-Howard isomorphism to model mathematical proofs as types, enabling formal verification of code properties. Daniel’s ultimate goal isn’t just a new language—it’s a multimedia programming studio for Indigenous youth, designed to empower storytelling and education through accessible, community-owned technology. His journey—from early struggles with LaTeX and Unicode layout to building a metacircular evaluator in C++—reflects a deep philosophical commitment to independence, intellectual rigor, and cultural relevance in software design. The episode reveals a rare fusion of theoretical computer science, indigenous knowledge systems, and practical engineering.
Build a functional type system in C++ using constexpr and template metaprogramming to model mathematical proofs via the Curry-Howard isomorphism.
Represent programs as flat numeric arrays (bytecode) passed as template parameters, enabling compile-time serialization and reuse to cut recompilation time.
Use continuation-passing style functions to create a self-contained abstract machine that compiles directly into optimized C++ function calls.
Leverage C++26’s embed, variadic indexing, and placement new to simplify and accelerate the development of meta-compilation systems.
Design a multimedia programming language from the ground up to empower Indigenous youth with tools for cultural storytelling and education.
…and 3 more takeaways available in PodZeus
Introduction and Podcast Context
Jason Turner introduces the 405th episode of CppCast, clarifies the monthly cadence, and welcomes guest Daniel Nikpayek, emphasizing the podcast's mission as a community-driven resource for C++ developers.
Daniel's Background and Early Influences
Daniel shares his journey from studying honors math and LaTeX at the University of Alberta, where he became fascinated with the limitations of typesetting non-Latin scripts like Inuktitut and Japanese, inspiring his long-term goal of building a multimedia programming language.
From Flashcards to C++ and Qt
Daniel recounts working in Banff, Alberta, during a five-year break from university, where he taught himself C++ while working night shifts. He built a flashcard app using Qt 4.8 and QML, which led him into exploring templates and metaprogramming.
The Metacircular Evaluator and TMP Journey
Daniel describes his attempt to build a metacircular evaluator in C++ TMP, inspired by Structure and Interpretation of Computer Programs. He struggled with recursion and performance, but the experiment deepened his understanding of compile-time computation.
From TMP to cc-tmp: A Functional Proof Assistant
Daniel explains his current project, cc-tmp—a library that uses constexpr to build a functional type system and proof assistant inside C++. It models logic via algebraic types and functions, enabling formal verification of compile-time properties.
“I want to create a library that gives me all the tools to prototype and then eventually create like the very first compiler for this programming language.”
“I'm not just ad hoc making stuff up. But so I gave a few talks that were hit heavy on theory, I thought this one I'd spend a lot more time just on the C++17 tricks.”
“I've never actually worked in industry before. I would like an industry job. Definitely like that. That's how you grow, you know, experience the people plus a job that ideally challenges me.”
Host
Guest
Daniel Nikpayek
person
Jason Turner
person
CppCast
media
cc-tmp
other
C++26
other
LaTeX
other
Qt
other
Rob Irving
person
NDC Toronto
other
Inuvialuk
other
Get the full intelligence
Search transcripts, export clips, track mentions, and explore all topics from “Building a Compiler Inside the C++ Compiler with Daniel Nikpayuk” inside PodZeus.
Start discovering podcast insights today
Start with a 7-day trial and explore a growing catalog of popular podcasts. No credit card required.
No credit card required • 7-day trial • Cancel anytime
