~/talk

Automatically Translating Python Source to Idiomatic Go Code

slides:none on file

A Go program parses Python into an AST, performs whole-program type inference and propagation, and emits formatted Go code via gofmt; it converts several thousand lines of dynamically typed Python into idiomatic, fully typed Go code and handles examples like fizzbuzz, classes and quicksort. The approach requires forbidding dynamic imports and runtime monkeypatching, and produces roughly 90–95% correct output that is hand-finished for production.

AI-written summary · about

  1. 0:00Introduction
  2. 1:01Andre Eriksson
  3. 2:42Welcome
  4. 3:35Story
  5. 4:58Why Go
  6. 6:34Why Python
  7. 7:32Master Plan
  8. 8:13Escape hatch
  9. 9:26Approach
  10. 10:13Python Syntax Tree
  11. 11:23Python Whole Program Analysis
  12. 12:27Python Example
  13. 14:35Type Inference
  14. 16:08Type Propagation
  15. 17:41Live Demo
  16. 23:42Conclusion
  17. 24:19Questions
~/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.