Slide 1

Slide 1 text

Previously…

Slide 2

Slide 2 text

Ruby is slow… – Usually it doesn’t matter – Most workload are I/O bound – But occasionally it does…

Slide 3

Slide 3 text

“Best of both worlds” – Native extensions – JSON gem – Very fast – Transparent to the user – Date, Pathname, etc…

Slide 4

Slide 4 text

Turbo Rails…? – String#blank? – Sam Saffron’s fast_blank – 50 LOC in C – 20x speedup

Slide 5

Slide 5 text

But C… – Unsafe – Risky – segfaults! – Maintenance burden – Contribution barrier

Slide 6

Slide 6 text

Skylight Agent – Started with Ruby – Too much overhead – Native extension! – But C…

Slide 7

Slide 7 text

Meet Rust – Like C: compiled, statically typed, very fast – Unlike C: enjoyable to use, guarantees safety – “If it compiles, it doesn’t crash” – Same guarantee as Ruby, but without GC

Slide 8

Slide 8 text

Zero-cost abstractions™ – In Ruby: tension between abstractions and performance – Symbol#to_proc, Enumerable#map, etc – In Rust: no such tradeoff – Compiler is magic

Slide 9

Slide 9 text

fast_blank in Rust* * boilerplate not included

Slide 10

Slide 10 text

fast_blank in Helix

Slide 11

Slide 11 text

The vision – Keep writing the Ruby you love… – …without the fear of eventually hitting a wall – Start with Ruby – Move to Helix when appropriate

Slide 12

Slide 12 text

Last year – Good proof-of-concept – Too hard to use – Missing basic features

Slide 13

Slide 13 text

This year – Deploy to production – Polish, documentation – Features – Focus on Rails

Slide 14

Slide 14 text

Demo! – End-to-end example – Deploy to Heroku – It works!™

Slide 15

Slide 15 text

▶ http://chancancode.tv/helix

Slide 16

Slide 16 text

Good use cases – CPU-bound – Simple inputs – Avoid chatty APIs

Slide 17

Slide 17 text

Good use cases

Slide 18

Slide 18 text

Good use cases – Use Rust libraries – Leverage Rust web browser tech – Mailer, Background job, Action Cable

Slide 19

Slide 19 text

No content

Slide 20

Slide 20 text

Roadmap – Greenfield project – Drop-in replacement – Reopen class – Ship to production – Binary distribution – Non-traditional use-cases – Performance parity with C – Miscellaneous features and QoL improvements

Slide 21

Slide 21 text

usehelix.com