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
88
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
440
Bob: A composable and inclusive CI/CD Platform
lispyclouds
0
260
Native CLI tooling with Clojure on GraalVM
lispyclouds
0
70
Building native CLI tools with Clojure on GraalVM
lispyclouds
3
240
Other Decks in Technology
See All in Technology
10年間のブログ発信を振り返って見えたWebアプリケーションエンジニアとしての軌跡
stefafafan
0
180
40代で“やっとエンジニアになれた”――閉じた学びを開き、空の青さを知る / 20260628 Naoki Takahashi
shift_evolve
PRO
4
660
ザ・データベース、MySQL ~ OSC 2026 Sendai ~
sakaik
0
180
「軸足」は 固定しなくていい - 熱量と強みで描く、しなやかなキャリアの形
kakehashi
PRO
1
230
現場のトークンマネジメント
dak2
1
170
AIチャット検索改善の3週間
kworkdev
PRO
2
160
iAEONの段階的リアーキテクト戦略 / iAEON's_Gradual_Re-architecture_Strategy
aeonpeople
0
250
FPC(フレキシブル)基板にZephyr実装してみた。
iotengineer22
0
160
螺旋型キャリアの生存戦略 / kinoko-conf2026
rakus_dev
1
810
【セミナー資料】Claude Code をセキュアに使うための考え方と設定の勘どころ / Claude Code Webinar 20260616
masahirokawahara
2
450
MUSUBI 田中裕一『AIと共に行う「しごとのリデザイン」- スモールバックオフィス編』AI Ops Lab #4
musubi
0
300
AIはどのように 組織のアジリティを変えるのか?
junki
4
1.1k
Featured
See All Featured
Writing Fast Ruby
sferik
630
63k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
320
First, design no harm
axbom
PRO
2
1.2k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
850
How to Ace a Technical Interview
jacobian
281
24k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
390
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
490
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.3k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.3k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
25k
AI: The stuff that nobody shows you
jnunemaker
PRO
8
730
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
200
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?