~/talk

Compiling Pythons with Custom Grammar for the sake of a joke

Talkat Open Source Bridge 2014 · 2014-06-24..06-27· [python]
slides:none on file

Rewrites CPython’s grammar to replace the literal import token with AO, edits the grammar file and runs make, then runs a project-wide find-and-replace to change import sites; hits a bootstrap problem when the system Python doesn’t understand AO, solves it by compiling a two-token Python that accepts both import and AO, adding that interpreter to PATH and re-compiling so import becomes invalid and AO random works. Produces a runnable build called Nini, with extra hacked builtins (type → Slytherin, wingardium_leviosa) and it succeeds.

AI-written summary · about

  1. 0:00Start
  2. 1:39What Is a Python Interpreter
  3. 3:21Import Statement
  4. 4:54What Is Compiling a Python Interpreter Mean
  5. 6:04Syntax Error
  6. 8:36Bootstrapping
  7. 11:54Bootstrap Compiling
  8. 16:09Overriding Built-In Functions
  9. 30:23Hacker School
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.