Slide 1

Slide 1 text

No content

Slide 2

Slide 2 text

Привiт!

Slide 3

Slide 3 text

Божидар

Slide 4

Slide 4 text

Божо cool

Slide 5

Slide 5 text

Bozhidar

Slide 6

Slide 6 text

Bozhidar

Slide 7

Slide 7 text

Божи дар

Slide 8

Slide 8 text

Божий дар

Slide 9

Slide 9 text

No content

Slide 10

Slide 10 text

Sofia, Bulgaria Sofia, Bulgaria

Slide 11

Slide 11 text

No content

Slide 12

Slide 12 text

bbatsov

Slide 13

Slide 13 text

Ruby & Rails style guides

Slide 14

Slide 14 text

•rubystyle.guide •rails.rubystyle.guide •rspec.rubystyle.guide •minitest.rubystyle.guide •blog.rubystyle.guide

Slide 15

Slide 15 text

No content

Slide 16

Slide 16 text

No content

Slide 17

Slide 17 text

No content

Slide 18

Slide 18 text

rubocop-minitest

Slide 19

Slide 19 text

rubocop-rake

Slide 20

Slide 20 text

No content

Slide 21

Slide 21 text

emacsredux.com

Slide 22

Slide 22 text

metaredux.com

Slide 23

Slide 23 text

#7 on the list of top white hackers in Bulgaria!

Slide 24

Slide 24 text

No content

Slide 25

Slide 25 text

Божидар Батсов

Slide 26

Slide 26 text

стацковарфлоу

Slide 27

Slide 27 text

Expert in cyber security

Slide 28

Slide 28 text

Expert in the following programming languages: Unix, Emacs, Perl and Ruby

Slide 29

Slide 29 text

The Don Juan of IT in Bulgaria

Slide 30

Slide 30 text

No content

Slide 31

Slide 31 text

slide intentionally left blank

Slide 32

Slide 32 text

No content

Slide 33

Slide 33 text

No content

Slide 34

Slide 34 text

Bulgarian Cheese

Slide 35

Slide 35 text

Болгарка

Slide 36

Slide 36 text

Слънчев Бряг

Slide 37

Slide 37 text

Златни пясъци

Slide 38

Slide 38 text

Банско

Slide 39

Slide 39 text

Луканка

Slide 40

Slide 40 text

Rakia Connecting People

Slide 41

Slide 41 text

Shopska Salad (use only with Rakia)

Slide 42

Slide 42 text

No content

Slide 43

Slide 43 text

No content

Slide 44

Slide 44 text

Bulgarian politics are shit wrapped in cellophane.

Slide 45

Slide 45 text

I’m never happy about a small pig and a new boss.

Slide 46

Slide 46 text

To mess with my deputy is like sitting butt naked on a hedgehog.

Slide 47

Slide 47 text

No content

Slide 48

Slide 48 text

No content

Slide 49

Slide 49 text

No content

Slide 50

Slide 50 text

No content

Slide 51

Slide 51 text

No content

Slide 52

Slide 52 text

No content

Slide 53

Slide 53 text

No content

Slide 54

Slide 54 text

No content

Slide 55

Slide 55 text

The most beautiful city in Ukraine

Slide 56

Slide 56 text

No content

Slide 57

Slide 57 text

То є Львів, мій колєґа, про нього різне кажуть: Приезжим из востока Криївку тут покажуть. То є Львів, моє місто, не з простого тіста, Ліплений роками – друзями й ворогами. То є Львів старенький, мудрий, сивий дядько, Кожному залишить кавалочок на згадку. То є Львів "Бонжорно!", Неаполь і Ліворно, По-галицьки говорять, наші в них погоду роблять.

Slide 58

Slide 58 text

То є Львів, шановні, вбирайте шлюбні сподні, Краватку, маринарку і "вйо!" по Стрийськім парку. То є Львів чудовий, вуйко ґонуровий, Я тішуся, шо з вами ходжу цими вулицями. То є Львів старенький, мудрий, сивий дядько, Кожному залишить кавалочок на згадку. То є Львів "Бонжорно!", Неаполь і Ліворно, По-галицьки говорять, наші в них погоду роблять. То є Львів, то Львів...

Slide 59

Slide 59 text

No content

Slide 60

Slide 60 text

No content

Slide 61

Slide 61 text

No content

Slide 62

Slide 62 text

Not on Ruby’s Core Team

Slide 63

Slide 63 text

Matz on Ruby

Slide 64

Slide 64 text

Language Maturity

Slide 65

Slide 65 text

The Ruby Community

Slide 66

Slide 66 text

Ruby is not dying

Slide 67

Slide 67 text

No content

Slide 68

Slide 68 text

No content

Slide 69

Slide 69 text

We have to feed the community intellectually. — Matz

Slide 70

Slide 70 text

We have to keep moving forward. — Matz

Slide 71

Slide 71 text

Backwards Compatibility

Slide 72

Slide 72 text

We’re not going to repeat the Python 3 mistakes! — Matz

Slide 73

Slide 73 text

Victim of the Hype Cycle

Slide 74

Slide 74 text

No content

Slide 75

Slide 75 text

Rails Mania (2008)

Slide 76

Slide 76 text

Ruby Today

Slide 77

Slide 77 text

Ruby Today

Slide 78

Slide 78 text

2025

Slide 79

Slide 79 text

Matz’s Retirement

Slide 80

Slide 80 text

No content

Slide 81

Slide 81 text

Ruby 4

Slide 82

Slide 82 text

Ruby 4x4

Slide 83

Slide 83 text

Ruby 4 is going to be 4 times faster than Ruby 3

Slide 84

Slide 84 text

Ruby 4 is going to be 12 times faster than Ruby 2

Slide 85

Slide 85 text

Ruby 4 is finally going to be fast enough!

Slide 86

Slide 86 text

No content

Slide 87

Slide 87 text

What about Ruby 3?

Slide 88

Slide 88 text

–Matz “We’ll aim to release Ruby 3 for the Olympic Games in Tokyo in 2020.”

Slide 89

Slide 89 text

Ruby 3 Goals •Improved programming safety •Faster performance •Better concurrency/parallelism support •Better tools

Slide 90

Slide 90 text

Optional static typing?

Slide 91

Slide 91 text

Duck inference?

Slide 92

Slide 92 text

Actors?

Slide 93

Slide 93 text

Stream based model?

Slide 94

Slide 94 text

Ownership based model?

Slide 95

Slide 95 text

Guilds?

Slide 96

Slide 96 text

3 times faster performance?

Slide 97

Slide 97 text

Smaller Goals •Sane keyword arguments (?!!?!) •Pattern Matching •Deprecation of quirky features •Frozen string literals

Slide 98

Slide 98 text

No content

Slide 99

Slide 99 text

Ruby 3.0 Redux

Slide 100

Slide 100 text

Dictionary Definitions

Slide 101

Slide 101 text

Ruby

Slide 102

Slide 102 text

noun 1. a precious stone consisting of corundum in colour varieties varying from deep crimson or purple to pale rose. 2. a programming language optimised for programmer happiness

Slide 103

Slide 103 text

3

Slide 104

Slide 104 text

number 1. equivalent to the sum of one and two; one more than two; 3 2. A mystical version rarely achieved by most software projects.

Slide 105

Slide 105 text

Redux

Slide 106

Slide 106 text

adjective 1. brought back, revived Emacs era redux 2. (usually postpositive) (esp of an artistic work) presented in a new way Apocalypse Now Redux

Slide 107

Slide 107 text

No content

Slide 108

Slide 108 text

Ruby 3.0 is not a single magic release

Slide 109

Slide 109 text

Ruby 3.0 is an idea

Slide 110

Slide 110 text

No content

Slide 111

Slide 111 text

Ruby follows SemVer

Slide 112

Slide 112 text

Ruby 3 is going to be 3 times faster than Ruby 2.0

Slide 113

Slide 113 text

Generational GC (Ruby 2.1)

Slide 114

Slide 114 text

Incremental GC (Ruby 2.2)

Slide 115

Slide 115 text

MJIT (Ruby 2.6)

Slide 116

Slide 116 text

New AST library (Ruby 2.6)

Slide 117

Slide 117 text

Deprecation of flip-flops (Ruby 2.6)

Slide 118

Slide 118 text

Ruby 2.7

Slide 119

Slide 119 text

Numbered block parameters

Slide 120

Slide 120 text

numbers.map { Math.log2(@1) }

Slide 121

Slide 121 text

foo.bar { @1 + @2 }

Slide 122

Slide 122 text

h = Hash.new { @1[@2] = "Go Fish: #{@2}" }

Slide 123

Slide 123 text

h = Hash.new { @1[@2] = "Go Fish: #{@2}" }

Slide 124

Slide 124 text

No content

Slide 125

Slide 125 text

https://bugs.ruby-lang.org/issues/15723

Slide 126

Slide 126 text

numbers.map { Math.log2(_1) }

Slide 127

Slide 127 text

No content

Slide 128

Slide 128 text

Method reference operator

Slide 129

Slide 129 text

[2, 4, 8, 16, 32].map { |n| Math.log2(n) }

Slide 130

Slide 130 text

[2, 4, 8, 16, 32].map(&method(Math.log2))

Slide 131

Slide 131 text

[2, 4, 8, 16, 32].map(&Math.:log2)

Slide 132

Slide 132 text

[2, 4, 8, 16, 32].map { Math.log2(_1) }

Slide 133

Slide 133 text

Beginless range

Slide 134

Slide 134 text

Beginless range

Slide 135

Slide 135 text

Beginningless range

Slide 136

Slide 136 text

arr[..3]

Slide 137

Slide 137 text

items.where(price: ..20)

Slide 138

Slide 138 text

No content

Slide 139

Slide 139 text

Pattern Matching (https://bugs.ruby-lang.org/issues/14912)

Slide 140

Slide 140 text

person = JSON.parse('{...}', symbolize_names: true) if person[:name] == ‘Alice’ children = person[:children] if children.length == 1 && children[0][:name] == ‘Bob’ p children[0][:age] end end

Slide 141

Slide 141 text

case JSON.parse('{...}', symbolize_names: true) in {name: "Alice", children: [{name: "Bob", age: age}]} p age ... end

Slide 142

Slide 142 text

No content

Slide 143

Slide 143 text

Resources • https://speakerdeck.com/k_tsj/pattern-matching-new- feature-in-ruby-2-dot-7 • https://medium.com/@baweaver/ruby-2-7-pattern-matching- first-impressions-cdb93c6246e6 • https://medium.com/@baweaver/ruby-2-7-pattern-matching- destructuring-on-point-90f56aaf7b4e

Slide 144

Slide 144 text

All those features are experimental and subject to change

Slide 145

Slide 145 text

Deprecating $; and $,

Slide 146

Slide 146 text

> $; = " " warning: non-nil $; will be deprecate => " " > "hello world!".split warning: $; is set to non-nil value => ["hello", "world!"] > $, = " " warning: non-nil $, will be deprecated => " " > ["hello", "world!"].join warning: non-nil $, will be deprecated => "hello world!"

Slide 147

Slide 147 text

Compaction GC

Slide 148

Slide 148 text

MJIT Tuning/optimizations

Slide 149

Slide 149 text

flip-flops were finally deprecated!

Slide 150

Slide 150 text

Then they were reinstated…

Slide 151

Slide 151 text

No content

Slide 152

Slide 152 text

Pipeline operator

Slide 153

Slide 153 text

foo() .bar(1, 2) .display

Slide 154

Slide 154 text

foo() |> bar 1, 2 |> display

Slide 155

Slide 155 text

No content

Slide 156

Slide 156 text

Added, contested and removed

Slide 157

Slide 157 text

No content

Slide 158

Slide 158 text

Ruby 2.7 is coming for Christmas!

Slide 159

Slide 159 text

Ruby 3.0 (Current Status)

Slide 160

Slide 160 text

Better Tools

Slide 161

Slide 161 text

RubyGems 3

Slide 162

Slide 162 text

The bundling of Bundler (Ruby 2.6)

Slide 163

Slide 163 text

Gemifying the Standard Library (ongoing progress)

Slide 164

Slide 164 text

Default vs Bundled Gems

Slide 165

Slide 165 text

Default Gems • Bundler • RubyGems • date • irb • json • …

Slide 166

Slide 166 text

Bundled Gems • minitest • did_you_mean • rake • …

Slide 167

Slide 167 text

stdgems.org

Slide 168

Slide 168 text

irb • New reline backend (portable replacement for readline) • Completion • Multi-line editing • Syntax-highlighting • Integration with RDoc

Slide 169

Slide 169 text

No content

Slide 170

Slide 170 text

RDoc • Redesigned documentation system • Twice as fast

Slide 171

Slide 171 text

Ruby 3x3

Slide 172

Slide 172 text

Only applies to certain benchmarks

Slide 173

Slide 173 text

Ruby 2.6 is 65% faster than Ruby 2.0

Slide 174

Slide 174 text

No content

Slide 175

Slide 175 text

10% average speedup per release

Slide 176

Slide 176 text

No content

Slide 177

Slide 177 text

MJIT is the biggest hope for Ruby 3x3

Slide 178

Slide 178 text

Guilds

Slide 179

Slide 179 text

No content

Slide 180

Slide 180 text

No content

Slide 181

Slide 181 text

Developed outside the Ruby’s main repo

Slide 182

Slide 182 text

https://github.com/ko1/ruby/tree/guild

Slide 183

Slide 183 text

Work in progress ™

Slide 184

Slide 184 text

Parallel Programming in Ruby 3 with Guilds (http://www.atdot.net/~ko1/activities/2018_rubyconf2018.pdf)

Slide 185

Slide 185 text

Static Typing

Slide 186

Slide 186 text

https://bugs.ruby-lang.org/issues/9999

Slide 187

Slide 187 text

No content

Slide 188

Slide 188 text

Native Support for Тype Signatures in Ruby 3.0

Slide 189

Slide 189 text

No content

Slide 190

Slide 190 text

With a twist…

Slide 191

Slide 191 text

Dedicated Ruby interface files (.rbi)

Slide 192

Slide 192 text

Dedicated Ruby signature files (.rbs)

Slide 193

Slide 193 text

class Person @name: String @contacts: Array def initialize: (name: String) -> any def name: -> String def contacts: -> Array def guess_country: -> (String | nil) end

Slide 194

Slide 194 text

https://github.com/soutaro/steep

Slide 195

Slide 195 text

Type Signatures for Ruby Core (https://github.com/ruby/ruby-signature)

Slide 196

Slide 196 text

Rakia Connecting People

Slide 197

Slide 197 text

Open Questions • Is Steep becoming part of the Standard Library? • How is Sorbet going to make use of its type annotations? • Typing applications

Slide 198

Slide 198 text

Built-in Type Inference Checker

Slide 199

Slide 199 text

def foo(x) if x > 10 x.to_s else x.boo() x + 42 end end foo(42)

Slide 200

Slide 200 text

$ exe/type-profiler test.rb test.rb:6: [error] undefined method: Integer#boo test.rb:7: [error] failed to resolve overload: Integer#+ Object#foo :: (Integer) -> String

Slide 201

Slide 201 text

Resources • https://www.slideshare.net/mametter/a-typelevel-ruby- interpreter-for-testing-and-understanding • https://github.com/mame/ruby-type-profiler

Slide 202

Slide 202 text

Sane Keyword Arguments

Slide 203

Slide 203 text

https://bugs.ruby-lang.org/issues/14183

Slide 204

Slide 204 text

# The following calls pass keyword arguments foo(..., key: val) foo(..., **hsh) foo(..., key: val, **hsh)

Slide 205

Slide 205 text

# The following calls pass **normal** arguments foo(..., {key: val}) foo(..., hsh) foo(..., {key: val, **hsh})

Slide 206

Slide 206 text

Breaking change!!!

Slide 207

Slide 207 text

Migration warning in Ruby 2.7

Slide 208

Slide 208 text

def a_method(k: 1) puts "k: #{k}" end a_method({k: 1}) (irb):4: warning: The last argument is used as the keyword parameter (irb):1: warning: for `a_method' defined here => k: 1

Slide 209

Slide 209 text

# To avoid the warning # and make it Ruby 3 compatible, # use the double splat operator a_method(**{k: 1}) => k: 1

Slide 210

Slide 210 text

What’s not in Ruby 3.0?

Slide 211

Slide 211 text

Actors

Slide 212

Slide 212 text

Stream processing

Slide 213

Slide 213 text

Frozen string literals

Slide 214

Slide 214 text

Deprecation of autoload

Slide 215

Slide 215 text

https://github.com/fxn/zeitwerk

Slide 216

Slide 216 text

Deprecation of backticks (`some-command`)

Slide 217

Slide 217 text

Deprecation of character literals (?x)

Slide 218

Slide 218 text

Summary

Slide 219

Slide 219 text

• Ruby 2.7 will be the final release in the 2.x series • Ruby 3.0 is scheduled to land in 2020 • Ruby 2.7 will serve as a preview for many of the key features in Ruby 3.0 • Static typing and Guilds are the biggest changes coming to Ruby 3.0 • Keyword argument overhaul is going to be a breaking change • The migration path from Ruby 2.x to 3.x should be very smooth

Slide 220

Slide 220 text

Community Impact

Slide 221

Slide 221 text

Community Contributed Features • UTF-8 • Enumerator • Generational GC • Keyword Arguments • JIT • Concurrency

Slide 222

Slide 222 text

Community Contributions • Rake • Bundler • Documentation & Tutorials • A ton of amazing libraries • Rails • …

Slide 223

Slide 223 text

No content

Slide 224

Slide 224 text

Real Namespaces (https://bugs.ruby-lang.org/issues/14982)

Slide 225

Slide 225 text

No content

Slide 226

Slide 226 text

Felina

Slide 227

Slide 227 text

Дякую! twitter: @bbatsov github: @bbatsov https://metaredux.com https://emacsredux.com Pivorak 4.0 Lviv, Ukraine 18.10.2019