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
86
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
260
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
No Types Needed, Just Callable Method Check
dak2
1
190
Snowflake Intelligence導入で 分かった活用のコツ
wonohe
0
120
The Journey of Box Building
tagomoris
4
460
最初の一歩を踏み出せなかった私が、誰かの背中を押したいと思うようになるまで / give someone a push
mii3king
0
160
ハーネスエンジニアリングの概要と設計思想
sergicalsix
9
4.3k
MLOps導入のための組織作りの第一歩
akasan
0
310
Sansan Engineering Unit 紹介資料
sansan33
PRO
1
4.3k
Standards et agents IA : un tour d’horizon de MCP, A2A, ADK et plus encore
glaforge
0
130
AI時代のガードレールとしてのAPIガバナンス
nagix
0
210
Azure Lifecycle with Copilot CLI
torumakabe
3
1k
システムは「動く」だけでは足りない 実装編 - 非機能要件・分散システム・トレードオフをコードで見る
nwiizo
4
410
EBS暗号化に失敗してEC2が動かなくなった話
hamaguchimmm
2
180
Featured
See All Featured
Writing Fast Ruby
sferik
630
63k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
230
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
27
3.4k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
490
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
5.6k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
330
Why Our Code Smells
bkeepers
PRO
340
58k
ラッコキーワード サービス紹介資料
rakko
1
3M
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
A Tale of Four Properties
chriscoyier
163
24k
Believing is Seeing
oripsolob
1
110
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?