Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
A PoC-ish Trick: LLVM IR Generation with Ruby
Search
remore
November 11, 2016
Technology
1.5k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
A PoC-ish Trick: LLVM IR Generation with Ruby
A Lightning Talk at RubyConf 2016
remore
November 11, 2016
More Decks by remore
See All by remore
Turning CDN edge into a Rack web server with ruby.wasm
remore
0
880
Prototyping Kubernetes CRI With Ruby and gRPC
remore
3
1.3k
How I made a pure-Ruby word2vec program more than 3x faster
remore
3
3.3k
Code, Arguments and Startups
remore
0
1.9k
詳解🔍Burn🔥
remore
4
5.5k
DockerCon 2015 Quick Recap
remore
0
490
dockerfileview: A Dockerfile viewer to trace ancestry of the base image
remore
2
480
Burn: 8-Bit Game Development With Ruby
remore
3
1.1k
Other Decks in Technology
See All in Technology
AX時代の自治体支援リソース再配分と役割分担の再構成:戦略とロードマップ(概要)
sishi2026
0
170
素人でもできた!AIを使った短編小説創作入門
delhi09
PRO
0
280
Claude Codeから見る、エンジニアの世界の変容とその先
oikon48
8
5.1k
アクセラレーターで実現するServiceNow活用の高速化 / ServiceNow World Forum 2026
visional_engineering_and_design
0
120
ALBのLCU予約とトラフィックの波によるプロダクト理解 / Understanding ALB LCU and Traffic Spikes
mito201
1
130
仕様駆動開発の、その先へ。決める力と確かめる仕組み
inariku
1
160
クラウドエージェントの先駆け Devin。今も最先端を走る、他との違い
kinopeee
1
540
2拠点SRE活動始めてみた | sogaoh's LT @ ホンマでっかSRE勉強会 #3
sogaoh
PRO
0
230
視野はAIに、視座は人に / ai-for-breadth-humans-for-perspective
nkzn
6
2.7k
書き手が人でもAIでも正しくなる道、SREを埋め込んだDeveloper Platform / tech drivers day8
chmikata
4
890
20261031_IoTLT_vol140_kitazaki_v1.pdf
kitazaki
0
150
Oracle Database Security 詳細解説
oracle4engineer
PRO
1
200
Featured
See All Featured
Thoughts on Productivity
jonyablonski
76
5.4k
Ruling the World: When Life Gets Gamed
codingconduct
0
430
Accessibility Awareness
sabderemane
1
280
From π to Pie charts
rasagy
1
430
How to build a perfect <img>
jonoalderson
1
6.2k
AI: The stuff that nobody shows you
jnunemaker
PRO
10
1.2k
Become a Pro
speakerdeck
PRO
31
6.3k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
350
The agentic SEO stack - context over prompts
schlessera
0
990
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
310
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.9k
Transcript
A PoC-ish Trick: LLVM IR Generation with Ruby A Lightning
Talk at RubyConf 2016 Kei Sawada (@remore)
None
a modern, fast, and open source language for data science
and technical computing
Julia is 4 years old young Good performance, as fast
as C Dynamic typing Julia has Capability to call C functions directly without wrappers or special APIs a compiler that used LLVM to translate Julia programs into ef cient executable code
In short,
Write some Julia code then you will get LLVM IR
without hassle
debussy:~ guest$ julia _ _ _ _(_)_ | A fresh
approach to technical computin (_) | (_) (_) | Documentation: http://docs.julialang.o _ _ _| |_ __ _ | Type "?help" for help. | | | | | | |/ _` | | | | |_| | | | (_| | | Version 0.4.6 (2016-06-19 17:16 UTC) _/ |\__'_|_|_|\__'_| | |__/ | x86_64-apple-darwin15.5.0 julia>
debussy:~ guest$ julia _ _ _ _(_)_ | A fresh
approach to technical computin (_) | (_) (_) | Documentation: http://docs.julialang.o _ _ _| |_ __ _ | Type "?help" for help. | | | | | | |/ _` | | | | |_| | | | (_| | | Version 0.4.6 (2016-06-19 17:16 UTC) _/ |\__'_|_|_|\__'_| | |__/ | x86_64-apple-darwin15.5.0 julia> function hello() "rubyconf" end hello (generic function with 1 method) julia>
debussy:~ guest$ julia _ _ _ _(_)_ | A fresh
approach to technical computin (_) | (_) (_) | Documentation: http://docs.julialang.o _ _ _| |_ __ _ | Type "?help" for help. | | | | | | |/ _` | | | | |_| | | | (_| | | Version 0.4.6 (2016-06-19 17:16 UTC) _/ |\__'_|_|_|\__'_| | |__/ | x86_64-apple-darwin15.5.0 julia> function hello() "rubyconf" end hello (generic function with 1 method) julia> hello() "rubyconf" julia>
julia> code_llvm(hello, ()) define %jl_value_t* @julia_hello_21549() { top: ret %jl_value_t*
inttoptr (i64 4447575696 to %jl_value_t*) } julia>
julia> code_llvm(hello, ()) define %jl_value_t* @julia_hello_21549() { top: ret %jl_value_t*
inttoptr (i64 4447575696 to %jl_value_t*) } julia> code_native(hello, ()) .section __TEXT,__text,regular,pure_instructions Filename: none Source line: 2 pushq %rbp movq %rsp, %rbp movabsq $4447575696, %rax ## imm = 0x109189E90 Source line: 2 popq %rbp ret julia>
OK Julia is a thing But we are in
None
What if
You can write some Ruby code which can be translated
into Julia where you can get LLVM IR easily?
Ruby -> Julia -> LLVM IR
None
Julializer Allow you to convert your arbitrary Ruby code into
Julia code
Time to DEMO!
For more examples and attempts, check out: github.com/remore/julializer github.com/remore/virtual_module Thanks!