Slide 1

Slide 1 text

Rubinius X @brixen

Slide 2

Slide 2 text

Good morning!

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

No content

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

"You can't have your cake and eat it, too"

Slide 9

Slide 9 text

Professional possibility finders

Slide 10

Slide 10 text

improveffect.com

Slide 11

Slide 11 text

Yes, and...

Slide 12

Slide 12 text

We <3 Ruby

Slide 13

Slide 13 text

No content

Slide 14

Slide 14 text

No content

Slide 15

Slide 15 text

I'd rather be...

Slide 16

Slide 16 text

No content

Slide 17

Slide 17 text

What is the biggest risk to Ruby?

Slide 18

Slide 18 text

Ruby is stuck in the past

Slide 19

Slide 19 text

Why isn't Ruby the right tool?

Slide 20

Slide 20 text

Rubinius is Ruby

Slide 21

Slide 21 text

Rubinius is Ruby ~2.1 and 1.8.7

Slide 22

Slide 22 text

Rubinius X is Ruby 10

Slide 23

Slide 23 text

Ruby 2.1 is really

Slide 24

Slide 24 text

Ruby 2.1 is really, really

Slide 25

Slide 25 text

Ruby 2.1 is really, really, really

Slide 26

Slide 26 text

Ruby 2.1 is really, really, really, really

Slide 27

Slide 27 text

Ruby 2.1 is really, really, really, really legacy Ruby

Slide 28

Slide 28 text

Rubinius X is Rubinius

Slide 29

Slide 29 text

Network 1

Slide 30

Slide 30 text

Network 1 Performance 2

Slide 31

Slide 31 text

Network 1 Performance 2 Experience 3

Slide 32

Slide 32 text

Network 1 Performance 2 Experience 3 Context 4

Slide 33

Slide 33 text

Network 1 Socket • Concurrency • String

Slide 34

Slide 34 text

No content

Slide 35

Slide 35 text

No content

Slide 36

Slide 36 text

No content

Slide 37

Slide 37 text

No content

Slide 38

Slide 38 text

No content

Slide 39

Slide 39 text

No content

Slide 40

Slide 40 text

No content

Slide 41

Slide 41 text

! require "socket"!

Slide 42

Slide 42 text

No content

Slide 43

Slide 43 text

bit.ly/RubyHTTPClients

Slide 44

Slide 44 text

Go Node.js Elixir

Slide 45

Slide 45 text

Can we have networks?

Slide 46

Slide 46 text

Yes, and we can have one that just works

Slide 47

Slide 47 text

Rubinius has no global interpreter lock

Slide 48

Slide 48 text

Threads are fine

Slide 49

Slide 49 text

Locks are the problem

Slide 50

Slide 50 text

Shared mutable state

Slide 51

Slide 51 text

HAMT Hash Array Mapped Trie

Slide 52

Slide 52 text

HAMT ReTrieval

Slide 53

Slide 53 text

1 2 3 #hash value 12

Slide 54

Slide 54 text

1 ... 3 #hash value 14 4 5

Slide 55

Slide 55 text

Can we have simple data structures?

Slide 56

Slide 56 text

Yes, and we can have useful concurrent ones

Slide 57

Slide 57 text

String and Symbol

Slide 58

Slide 58 text

! irb> obj.method "to_s"! => #!

Slide 59

Slide 59 text

! irb> obj.method :to_s! => #!

Slide 60

Slide 60 text

irb> "to_s" == :to_s ! => false

Slide 61

Slide 61 text

irb> :to_s == "to_s"! => false

Slide 62

Slide 62 text

No content

Slide 63

Slide 63 text

HashWithIndifferentAccess

Slide 64

Slide 64 text

Erb • HAML • Slim • Moustache

Slide 65

Slide 65 text

JSON • YAML • XML/HTML

Slide 66

Slide 66 text

Strings are immutable

Slide 67

Slide 67 text

HashWithIndifferentAccess

Slide 68

Slide 68 text

Hash

Slide 69

Slide 69 text

Performance 2

Slide 70

Slide 70 text

Fences make good neighbors

Slide 71

Slide 71 text

Fences make poor friends

Slide 72

Slide 72 text

Compilation is usually lossy

Slide 73

Slide 73 text

def add(a, b)! c = a + b! end

Slide 74

Slide 74 text

push_local 0! # a! push_local 1 ! # b! send :+, 1! set_local 2! ! # c

Slide 75

Slide 75 text

add r1, r2, r3! # ^a ^b ^c! set_local r3, 2

Slide 76

Slide 76 text

Can we have stack bytecode?

Slide 77

Slide 77 text

Yes, and we can have register bytecode

Slide 78

Slide 78 text

assert_gte r1, r2, 0! add r1, r2, r3! # ^a ^b ^c! set_local r3, 2

Slide 79

Slide 79 text

and we can have assertion bytecode

Slide 80

Slide 80 text

record r1, r2! add r1, r2, r3! # ^a ^b ^c! set_local r3, 2

Slide 81

Slide 81 text

and we can have instrumentation bytecode

Slide 82

Slide 82 text

PEG

Slide 83

Slide 83 text

LPEG

Slide 84

Slide 84 text

and we can have parser bytecode

Slide 85

Slide 85 text

and we can have system bytecode

Slide 86

Slide 86 text

Experience 3

Slide 87

Slide 87 text

Run coverage in production

Slide 88

Slide 88 text

Smalltalk

Slide 89

Slide 89 text

def add(a, b)! a + b! end

Slide 90

Slide 90 text

Can we have file system support?

Slide 91

Slide 91 text

Yes, and we can have a dynamic code database

Slide 92

Slide 92 text

Rubinius::Console

Slide 93

Slide 93 text

Context 4

Slide 94

Slide 94 text

! puts "Hello, Chicago!"!

Slide 95

Slide 95 text

! "Hello, Chicago!".puts!

Slide 96

Slide 96 text

module Kernel! def puts(*args)! # ...! end! ! module_function :puts! end

Slide 97

Slide 97 text

! puts "Hello, Chicago!"!

Slide 98

Slide 98 text

fun puts(*args)! # ...! end

Slide 99

Slide 99 text

module Kernel! def puts(*args)! # ...! end! ! module_function :puts! end

Slide 100

Slide 100 text

fun puts(*args)! # ...! end

Slide 101

Slide 101 text

Can we have objects?

Slide 102

Slide 102 text

Yes, and we can have functions

Slide 103

Slide 103 text

destroyallsoftware.com

Slide 104

Slide 104 text

No content

Slide 105

Slide 105 text

fun add(a, b)! a + b! end

Slide 106

Slide 106 text

fun add(a: int, b: int)! a + b! end

Slide 107

Slide 107 text

load_int 0, r1! load_int 1, r2! add r1, r2, r3! # ^a ^b ^c! store_int r3, 2

Slide 108

Slide 108 text

Can we have dynamic types?

Slide 109

Slide 109 text

Yes, and we can have static types

Slide 110

Slide 110 text

(gradually)

Slide 111

Slide 111 text

Clay vs concrete

Slide 112

Slide 112 text

CLIs

Slide 113

Slide 113 text

parsers JSON • YAML • XML/HTML

Slide 114

Slide 114 text

HTTP parsers

Slide 115

Slide 115 text

Garbage collectors

Slide 116

Slide 116 text

Rubinius X is Rubinius

Slide 117

Slide 117 text

Rubinius X

Slide 118

Slide 118 text

Rubinius X 2.1

Slide 119

Slide 119 text

Source-to-source compiler

Slide 120

Slide 120 text

Try Rubinius github.com/rubinius/rubinius

Slide 121

Slide 121 text

# Gemfile! platforms :mri do! gem "ruby-debug"! end!

Slide 122

Slide 122 text

$ bundle update

Slide 123

Slide 123 text

$ bundle exec puma

Slide 124

Slide 124 text

@brixen

Slide 125

Slide 125 text

Thank you!

Slide 126

Slide 126 text

• 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