Ariel Ortiz

Ariel Ortiz is a programming languages enthusiast. Since 1994, he has been a full-time faculty member at the Tecnológico de Monterrey in Mexico, where he primarily teaches undergraduate computer science courses. His first encounter with Python was in 2001, and since then, he has integrated it into several of his classes, including Advanced Algorithms and Compiler Design. He is an active member of ACM’s Special Interest Group on Computer Science Education (SIGCSE) and has been a speaker at PyCon US, PyCon Latam, Python Brasil, and EuroPython conferences. Additionally, he is the main author of the Spanish-language websites EduPython and RIP3.


Sessions

07-13
09:30
90min
Crafting Your Own Compiler: From Python Logic to High-Speed WebAssembly
Ariel Ortiz

Ever wondered how a computer actually understands your logic? While Python interprets code line-by-line, WebAssembly allows us to compile high-performance modules that run at near-native speed in the browser. This tutorial breaks open the black box of language design, showing you how to translate human-readable logic into raw, executable power. We will use Python to build a functional compiler from scratch, translating a simple language into WebAssembly (Wasm): the industry standard for high-performance web and cloud computing.

Why Build a Compiler? (It’s Not Just for Language Designers)

Learning compiler logic isn’t just about creating the next C++ or Rust; it’s about mastering data transformation. The patterns used in compilers (lexing, parsing, and code generation) are the exact same patterns used in:

  • Data Engineering: Writing custom Extract, Transform, and Load (ETL) tools to transform massive datasets.
  • Domain Specific Languages (DSLs): Creating custom internal tools for finance, science, or game logic.
  • Performance Optimization: Understanding how code is “lowered” into machine instructions to write faster, leaner programs.
  • Security: Auditing how code is executed to prevent injection attacks and vulnerabilities.

The Project: chiqui_forth to Wasm

We will build a compiler for chiqui_forth, a tiny, stack-based language inspired by the legendary Forth (1970). Because both chiqui_forth and WebAssembly use Reverse Polish Notation (RPN), they are a perfect match for a first-time compiler project. You’ll see exactly how high-level logic is mapped to the “bare metal” of a virtual machine.

Outcomes

By the end of this session, you won’t just have a Wasm file; you’ll have a new mental model for software:

  • The Compiler Pipeline: Implement the full flow from raw text to executable binary.
  • Wasm Mastery: Gain a practical understanding of WebAssembly, the technology powering modern browser-based video editors, games, and serverless clouds.
  • Custom Tooling: Leave with a working Python-based compiler that you can extend to your own custom syntax.

Prerequisites

  • Python Proficiency: Comfort with variables, loops, lists, dictionaries, and file I/O.
  • Terminal Basics: Ability to navigate folders and run scripts from a command line.

No prior knowledge of compiler design, Wasm, or web development is required.

Python Core, Internals, Extensions
Chamber Hall A (S3A)
07-13
11:15
90min
Crafting Your Own Compiler: From Python Logic to High-Speed WebAssembly
Ariel Ortiz

Ever wondered how a computer actually understands your logic? While Python interprets code line-by-line, WebAssembly allows us to compile high-performance modules that run at near-native speed in the browser. This tutorial breaks open the black box of language design, showing you how to translate human-readable logic into raw, executable power. We will use Python to build a functional compiler from scratch, translating a simple language into WebAssembly (Wasm): the industry standard for high-performance web and cloud computing.

Why Build a Compiler? (It’s Not Just for Language Designers)

Learning compiler logic isn’t just about creating the next C++ or Rust; it’s about mastering data transformation. The patterns used in compilers (lexing, parsing, and code generation) are the exact same patterns used in:

  • Data Engineering: Writing custom Extract, Transform, and Load (ETL) tools to transform massive datasets.
  • Domain Specific Languages (DSLs): Creating custom internal tools for finance, science, or game logic.
  • Performance Optimization: Understanding how code is “lowered” into machine instructions to write faster, leaner programs.
  • Security: Auditing how code is executed to prevent injection attacks and vulnerabilities.

The Project: chiqui_forth to Wasm

We will build a compiler for chiqui_forth, a tiny, stack-based language inspired by the legendary Forth (1970). Because both chiqui_forth and WebAssembly use Reverse Polish Notation (RPN), they are a perfect match for a first-time compiler project. You’ll see exactly how high-level logic is mapped to the “bare metal” of a virtual machine.

Outcomes

By the end of this session, you won’t just have a Wasm file; you’ll have a new mental model for software:

  • The Compiler Pipeline: Implement the full flow from raw text to executable binary.
  • Wasm Mastery: Gain a practical understanding of WebAssembly, the technology powering modern browser-based video editors, games, and serverless clouds.
  • Custom Tooling: Leave with a working Python-based compiler that you can extend to your own custom syntax.

Prerequisites

  • Python Proficiency: Comfort with variables, loops, lists, dictionaries, and file I/O.
  • Terminal Basics: Ability to navigate folders and run scripts from a command line.

No prior knowledge of compiler design, Wasm, or web development is required.

Python Core, Internals, Extensions
Chamber Hall A (S3A)