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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Rahul De
September 21, 2014
Technology
85
0
Share
Medusa - Final Draft - PyCon India 2014
The final draft for my presentation at PyCon India, 2014
Rahul De
September 21, 2014
More Decks by Rahul De
See All by Rahul De
What if your databases never forgot
lispyclouds
0
420
Bob: A composable and inclusive CI/CD Platform
lispyclouds
0
250
Native CLI tooling with Clojure on GraalVM
lispyclouds
0
68
Building native CLI tools with Clojure on GraalVM
lispyclouds
3
240
Other Decks in Technology
See All in Technology
ハーネスエンジニアリング×AI適応開発
aictokamiya
1
900
The essence of decision-making lies in primary data
kaminashi
0
190
OPENLOGI Company Profile for engineer
hr01
1
61k
ThetaOS - A Mythical Machine comes Alive
aslander
0
230
MCPで決済に楽にする
mu7889yoon
0
160
JAWS DAYS 2026でAIの「もやっと」感が解消された話
smt7174
1
110
Navigation APIと見るSvelteKitのWeb標準志向
yamanoku
2
130
Bref でサービスを運用している話
sgash708
0
210
QA組織のAI戦略とAIテスト設計システムAITASの実践
sansantech
PRO
1
270
Bill One 開発エンジニア 紹介資料
sansan33
PRO
5
18k
GitHub Advanced Security × Defender for Cloudで開発とSecOpsのサイロを超える: コードとクラウドをつなぐ、開発プラットフォームのセキュリティ
yuriemori
1
120
Microsoft Fabricで考える非構造データのAI活用
ryomaru0825
0
540
Featured
See All Featured
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
2.6k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
220
We Are The Robots
honzajavorek
0
210
Designing Experiences People Love
moore
143
24k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.2k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
290
How STYLIGHT went responsive
nonsquared
100
6k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
990
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
79
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
130
Building AI with AI
inesmontani
PRO
1
830
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
0
190
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?