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
Rubinius X
Search
brixen
September 04, 2014
Technology
3
280
Rubinius X
Presented at WindyCityRails 2014
brixen
September 04, 2014
Tweet
Share
More Decks by brixen
See All by brixen
Stop making mud pies!
brixen
0
110
Papers We Love - Immix mark-region garbage collector
brixen
2
730
An Ensemble of Programming Languages: How to Build a Platform for Collaboration
brixen
0
230
Types As Premature Optimization
brixen
2
550
Code Is What Code Does
brixen
0
410
Augmented Ruby: The Rubinius Language Platform
brixen
2
140
The Future of Ruby
brixen
1
330
Rubinius, and the Future of Ruby
brixen
2
250
So you want to design a programming language
brixen
1
150
Other Decks in Technology
See All in Technology
こんな時代だからこそ! 想定しておきたいアクセスキー漏洩後のムーブ
takuyay0ne
3
120
Playwrightで始めるUI自動テスト入門
devops_vtj
0
170
累計5000万DLサービスの裏側 – LINEマンガのKotlinで挑む大規模 Server-side ETLの最適化
ldf_tech
0
190
DMARCは導入したんだけど・・・現場のつぶやき 〜 BIMI?何それ美味しいの?
hirachan
1
160
技術の総合格闘技!?AIインフラの現在と未来。
ebiken
PRO
0
160
AIでデータ活用を加速させる取り組み / Leveraging AI to accelerate data utilization
okiyuki99
6
1.8k
AWS 環境で GitLab Self-managed を試してみた/aws-gitlab-self-managed
emiki
0
180
InsightX 会社説明資料/ Company deck
insightx
0
210
AIを使ってテストを楽にする
kworkdev
PRO
0
420
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
2
270
CLIPでマルチモーダル画像検索 →とても良い
wm3
2
810
AIがコードを書いてくれるなら、新米エンジニアは何をする? / komekaigi2025
nkzn
25
17k
Featured
See All Featured
BBQ
matthewcrist
89
9.9k
A Tale of Four Properties
chriscoyier
161
23k
A designer walks into a library…
pauljervisheath
209
24k
Keith and Marios Guide to Fast Websites
keithpitt
412
23k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.7k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
2
270
Site-Speed That Sticks
csswizardry
13
940
Leading Effective Engineering Teams in the AI Era
addyosmani
8
870
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
116
20k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Transcript
Rubinius X @brixen
Good morning!
None
None
None
None
None
"You can't have your cake and eat it, too"
Professional possibility finders
improveffect.com
Yes, and...
We <3 Ruby
None
None
I'd rather be...
None
What is the biggest risk to Ruby?
Ruby is stuck in the past
Why isn't Ruby the right tool?
Rubinius is Ruby
Rubinius is Ruby ~2.1 and 1.8.7
Rubinius X is Ruby 10
Ruby 2.1 is really
Ruby 2.1 is really, really
Ruby 2.1 is really, really, really
Ruby 2.1 is really, really, really, really
Ruby 2.1 is really, really, really, really legacy Ruby
Rubinius X is Rubinius
Network 1
Network 1 Performance 2
Network 1 Performance 2 Experience 3
Network 1 Performance 2 Experience 3 Context 4
Network 1 Socket • Concurrency • String
None
None
None
None
None
None
None
! require "socket"!
None
bit.ly/RubyHTTPClients
Go Node.js Elixir
Can we have networks?
Yes, and we can have one that just works
Rubinius has no global interpreter lock
Threads are fine
Locks are the problem
Shared mutable state
HAMT Hash Array Mapped Trie
HAMT ReTrieval
1 2 3 #hash value 12
1 ... 3 #hash value 14 4 5
Can we have simple data structures?
Yes, and we can have useful concurrent ones
String and Symbol
! irb> obj.method "to_s"! => #<Method: Object(Kernel)#to_s>!
! irb> obj.method :to_s! => #<Method: Object(Kernel)#to_s>!
irb> "to_s" == :to_s ! => false
irb> :to_s == "to_s"! => false
None
HashWithIndifferentAccess
Erb • HAML • Slim • Moustache
JSON • YAML • XML/HTML
Strings are immutable
HashWithIndifferentAccess
Hash
Performance 2
Fences make good neighbors
Fences make poor friends
Compilation is usually lossy
def add(a, b)! c = a + b! end
push_local 0! # a! push_local 1 ! # b! send
:+, 1! set_local 2! ! # c
add r1, r2, r3! # ^a ^b ^c! set_local r3,
2
Can we have stack bytecode?
Yes, and we can have register bytecode
assert_gte r1, r2, 0! add r1, r2, r3! # ^a
^b ^c! set_local r3, 2
and we can have assertion bytecode
record r1, r2! add r1, r2, r3! # ^a ^b
^c! set_local r3, 2
and we can have instrumentation bytecode
PEG
LPEG
and we can have parser bytecode
and we can have system bytecode
Experience 3
Run coverage in production
Smalltalk
def add(a, b)! a + b! end
Can we have file system support?
Yes, and we can have a dynamic code database
Rubinius::Console
Context 4
! puts "Hello, Chicago!"!
! "Hello, Chicago!".puts!
module Kernel! def puts(*args)! # ...! end! ! module_function :puts!
end
! puts "Hello, Chicago!"!
fun puts(*args)! # ...! end
module Kernel! def puts(*args)! # ...! end! ! module_function :puts!
end
fun puts(*args)! # ...! end
Can we have objects?
Yes, and we can have functions
destroyallsoftware.com
None
fun add(a, b)! a + b! end
fun add(a: int, b: int)! a + b! end
load_int 0, r1! load_int 1, r2! add r1, r2, r3!
# ^a ^b ^c! store_int r3, 2
Can we have dynamic types?
Yes, and we can have static types
(gradually)
Clay vs concrete
CLIs
parsers JSON • YAML • XML/HTML
HTTP parsers
Garbage collectors
Rubinius X is Rubinius
Rubinius X
Rubinius X 2.1
Source-to-source compiler
Try Rubinius github.com/rubinius/rubinius
# Gemfile! platforms :mri do! gem "ruby-debug"! end!
$ bundle update
$ bundle exec puma
@brixen
Thank you!
• http://scienceblogs.com/startswithabang/2011/11/18/the-new-opera- faster-than-ligh/ • http://www.todayinsci.com/Books/MechApp/chap23/page36.htm • http://www.urgentevoke.com/profiles/blogs/a-new-ecosystem-of- information • https://www.destroyallsoftware.com/talks/boundaries
• http://www.cleanposts.com/index.php/Win311file • https://bit.ly/RubyHTTPClients • http://www.amusingplanet.com/2009/03/impossible-illusions-made- possible.html Credits