Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Medusa - Final Draft - PyCon India 2014
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Rahul De
September 21, 2014
Technology
0
84
Medusa - Final Draft - PyCon India 2014
The final draft for my presentation at PyCon India, 2014
Rahul De
September 21, 2014
Tweet
Share
More Decks by Rahul De
See All by Rahul De
What if your databases never forgot
lispyclouds
0
410
Bob: A composable and inclusive CI/CD Platform
lispyclouds
0
250
Native CLI tooling with Clojure on GraalVM
lispyclouds
0
66
Building native CLI tools with Clojure on GraalVM
lispyclouds
3
230
Other Decks in Technology
See All in Technology
Codex 5.3 と Opus 4.6 にコーポレートサイトを作らせてみた / Codex 5.3 vs Opus 4.6
ama_ch
0
170
FinTech SREのAWSサービス活用/Leveraging AWS Services in FinTech SRE
maaaato
0
130
We Built for Predictability; The Workloads Didn’t Care
stahnma
0
140
顧客との商談議事録をみんなで読んで顧客解像度を上げよう
shibayu36
0
250
広告の効果検証を題材にした因果推論の精度検証について
zozotech
PRO
0
190
OWASP Top 10:2025 リリースと 少しの日本語化にまつわる裏話
okdt
PRO
3
800
予期せぬコストの急増を障害のように扱う――「コスト版ポストモーテム」の導入とその後の改善
muziyoshiz
1
1.9k
OCI Database Management サービス詳細
oracle4engineer
PRO
1
7.4k
What happened to RubyGems and what can we learn?
mikemcquaid
0
300
【Ubie】AIを活用した広告アセット「爆速」生成事例 | AI_Ops_Community_Vol.2
yoshiki_0316
1
100
学生・新卒・ジュニアから目指すSRE
hiroyaonoe
2
630
OpenShiftでllm-dを動かそう!
jpishikawa
0
110
Featured
See All Featured
The agentic SEO stack - context over prompts
schlessera
0
640
Joys of Absence: A Defence of Solitary Play
codingconduct
1
290
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.6k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.1k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
0
180
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
200
The SEO identity crisis: Don't let AI make you average
varn
0
290
Evolving SEO for Evolving Search Engines
ryanjones
0
130
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
62
Measuring & Analyzing Core Web Vitals
bluesmoon
9
750
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
100
Transcript
Project Medusa PYCON INDIA / 2014 / BANGALORE
About Me Rahul De Developer, Foodie, Movie Enthusiast and a
Snake Charmer
Medusa She’s Faster, Stronger and Kills with One Look! http://github.com/rahul080327/medusa
What she isn’t An ugly terrifying monster Just another Python
Implementation Slow
What she is Runs Python Faster Compiles to Dart Uses
JIT and hotspot Extendable and Scalable
Demo 1: The Pledge HELLO WORLD
Demo 2: The Turn THE FIBONACCI SERIES
Demystifying Medusa TOWERS OF HANOI
A Python Script hanoi.py
The Cache (C++/SQLite 3) STEP 1
InFile (Primary Key) Hash GenCode <absolute file path> <SHA 256>
<dart code> “/home/Heisenberg/ hanoi.py” “345AEFF…” “import ‘dart:io’…”
The Compiler (Python) STEP 2
Python 2.7 Source Python AST Module AST Node Visitior Framework
Dart Code Generator for every Node/Optimizer Final Stitched/ Optimized Dart Code
The Python AST Module Module FunctionDef ‘TOH’ [n, x, y,
z] Stmt If Compare (n, >, 0) Stmt CallFunc ‘TOH’ [n - 1, x, y, z] Stmt CallFunc ‘TOH’ [n - 1, z y, x] CallFunc ‘TOH’ [25, 1, 2, 3] The Abstract Syntax Tree for hanoi.py
AST Node Visitor Framework FunctionDef ‘TOH’ [n, x, y, z]
Stmt If Compare (n, >, 0) Stmt CallFunc ‘TOH’ [n - 1, x, y, z] Stmt CallFunc ‘TOH’ [n - 1, z y, x] The FunctionDef node being visited
Optimised Dart Code Generator def TOH (n, x, y, z):
if n > 0: TOH (n - 1, x, z, y) TOH (n - 1, z, y, x) TOH (n, x, y, z) { if (n > 0) { TOH (n - 1, x, z, y); TOH (n - 1, z, y, x); } }
Final Stitched Dart Code import “file:////Users/Heisenberg/.medusa/lib/inbuilts.dart”; ! TOH (n,x,y,z) {
if (n > 0) { TOH((n - 1), x, z, y); TOH((n - 1), z, y, x); } } ! main() { TOH($n(25), $n(1), $n(2), $n(3)); }
Demo 3: The Prestige SOLVING TOWERS OF HANOI
The End The Prestige Images © Warner Brothers, Christopher Nolan
and respective owners.
Questions?