RubyConf 2008 – Dave Thomas Keynote Notes

Dave Thomas presented tonight as the keynote speaker on day 2 of RubyConf 2008.  He introduced an interesting challenge to the Ruby community; fork Ruby and get creative with it.  Here are my notes from the talk, they’re a bit rough around the edges but you can get an idea of his vision and the message he was trying to get out.

First RubyConf since 2005 – conferenced out.  But he missed it.  Glad to be back.

Background – Coming up on 10th anniversary working with Ruby.  Early 1999, version 1.2 or 1.4.  Was much younger than (shows photos of a young kid).  Downloaded new languages daily.

Downloaded Ruby, thought it was cool, it made it past lunch, made it into the night.  Fell in love and it’s been the case ever since.  Was Java and C and moved everything to Ruby, serious for 10 years.

Is it OK to love a software tool?  Is that something you want to do?

You HAVE to love your software tools – the work we do is some of the most difficult on the planet (no dangerous), programmers, like poets, constantly start with a blank sheet of paper and construct completely out of imagination and make something from nothing.  You’re tired at the end of the day.  You have to love the tools or else you’ll resent what you do and it’ll show in your work.  Really really important to work with tools you love.  Grateful to Matz.  Went to Japan to talk to Matz, but Matz left, (Dave speaks to Matz and shows his appreciation).

Wrote books
Talked at lots of events
Went to lots of conferences (Ruby and Rails)
Learned at Rails conferences, to be cool, you need to swear on your slides.

F**K RUBY (in reference to the famous DHH slide)

(takes away the asterisks)
FORK RUBY

It’s time to fork Ruby!  But isn’t JRUBY, Rubunious, etc etc enough?  They’re not forks.  They’re implementations.

It’s time to fork the language.

(Shows a chart of times between releases)

1.0 -> 1.4 – 14 months
-> 1.4 – 8 months
-> 1.6 – 13 months
-> 1.8 – 48 months
-> 1.9 – 54 months

There’s a problem with this…  The bigger the time gap, the more stuff gets stuffed in and too many changes to manages.

Big changes == Slow adoption

Slow adoption == Unproven

Ruby 1.9 has great international language support for character encoding.  It was done nicely but the first library to be ported ran into many problems.  Not enough people using 1.9 to send feedback.

Shows a Katamari image (big ball of garbage), calls it a pattern.  The language picks up features as it rolls around the landscape and gets bigger.

Bigger is not better.  Bigger is scary.

Proposes tonight as a community to fork the Ruby language.

Some project ideas
• Ruby LIte
• Parallel Ruby
• Optionally-typed Ruby
• Closure-based Ruby

Ruby Lite
• Do we need it?
• Shows a chart of download sizes from release to release, they gradually increase over releases.  Starts under 2.5mb, gets to 10mb by 1.8.  1.9 is 32mb.  As of August, almost 40mb.  It has grown exponentially
• Can use this information to find out when Ruby 2.0 will be released: June 11, 2011.  100mb (laughs)
• Looks at number of methods
∘ Same pattern
• TOO BLOODY BIG
• Maybe there’s room for a light version?
• What would you do?
∘ Attack the language, built in classes or libraries
• Lose language features
∘ ?x (?\M-?C-x)
∘ -> (a,b) {c}
∘ Strange %q delimiters
∘ Here documents?
∘ Implicit sting concat
∘ Alias
∘ Nested assignment
∘ :: for method call
• Can live without these!
• All trivial things, what about bigger things
• Lose language features
∘ Class variables
∘ Global variables
∘ 70% of $vars
∘ unless/untill
∘ Protected
∘ Proc
• Not here to get rid of Ruby, just forking it
• Roll back encoding support, utf-8 is OK for the lite version, get rid of encoding support.  Much smaller!
• Lose built-in classes/modules
∘ Complex
∘ File::Stat
∘ FIleTest
∘ Mutex
∘ ObjectSpace
∘ Process:Gid/Status/Sys/Uid
∘ Rational?
∘ ThreadGroup
• Tirm down built in classes/modules
∘ String – 106
∘ Array – 81
∘ IO – 76
∘ Module – 59
∘ Hash – 53
∘ Time – 48
• ls x in (start..end)?
∘ To find out if x is in the range, how many methods to find this out?  4 methods.  ===, cover? include? member? All practically do the same thing.
• Trim down standard library
∘ Currently 127
∘ Trim to 10
‣ dlk
‣ irb
‣ mkmf
‣ minitest
‣ open-uri
‣ optparse
‣ rake
‣ rbconfig
‣ rdoc
‣ rubygems
∘ Everything else is a gem!  You don’t need to throw anything away!

Parallel Ruby – PUBY – not such a good name… PRUBY it is, squash it together
• How do we do it?
• We already have the construct.  The = sign
• a, b = b,a
∘ Assignment happens in parallel
∘ Values on LHS don’t impact calculations on RHS
∘ Documented as parallel assignment
• We can take this and make it more powerful
• a, b = calc1(c), calc2(y)
∘ Could perform calculation sin separate threads/processes
∘ Assignment only completes when all values become available
• But we can’t take the = operator, we need a new one
• //e?
• a, b, .. //= x, y, xx
• If any rvalue is a proc, call it rather than assign it
• (Shows code for finding the longest work in a (very) long list….) – Great candidate for parallelism, break up the work into chunks
∘ Shows a divvy-up function to do such a task
∘ *results //= *divvy_up(words, 10, longest) – Spanned out to multiple parts and all procs executed independently.  Sends out N processes, returns N results
∘ p results.max_by (|size,word|, word}
∘ Map/Reduce in 3-4 lines of code
∘ Kind of fun
• Is this the whole story?
• How do we share data without stepping on each other?  No idea!
• Possible idea…
• Within binding block, only variables listed as parameters are available and they are frozen/deep copied
• Will it work?  Who knows, but fun to investigate
• Hey, it’s just a concept

oTuby – Optionally typed Ruby
• Why?  Documentation aid to IDEs Runtime Checking (maybe)
• Type != Class
• Need to find a middle ground
• Possible approaches
∘ Just go for it — annotate with class or module names
∘ Command-line option to freeze built-in classes to allow optimizations
∘ Runtime type inference?

CLUBY – Closure-based Ruby, Ruby with blocks
• Make it easier to create lambas or project objects
• First, free the braces!  No need to spell lambda anymore!
• Next, rationalize blocks and procs
• Replace them all with { |prams|    }
• 3.times { |val| puts val * 9 }
• More cool examples of passing blocks
• Re-work the while syntax
• We can do much of this today but we don’t because it’s too damn ugly
• Re-writing class methods….Get rid of class variables
• Lose some keywords; class, modules, def, if, then, else, elsif, while, unless, until, case, when
• Lose a lot of syntax
• Gain a lot of flexibility
∘ What were once control structures are now methods…

Let’s play!  Experiment!

Just for Avi…  Yes, Smalltalk did this a long time ago…

Four different ideas of many ideas.  Thousands of experiments!

Would love to see more people doing this.,,,

More radical re-writing of the syntax

There’s a word for all of this…  Bullshit.  Who knows if any of it is going to work!

Tath – Old Scottish word,  A wonderful word!  The luxuriant grass which rises in tufts where the dung of cattle has been deposited.

Dave has done the depositing!  Go be nourished!

Summary
What’s wrong with Ruby?  Not much!

But this should not stop us from having fun.  Lets produce all of these wild ideas and see what works, and if they do work, maybe they will roll back into core.

Surprise him!

4 comments ↓

#1 The Rise of the Functional Paradigm | Zen and the Art of Programming on 11.08.08 at 2:21 pm

[...] yesterday’s address to the Ruby community, Dave Thomas invited Rubyists to fork Ruby, to freely research and experiment [...]

#2 Casimir on 12.12.08 at 3:49 am

What about object persistence ruby.. Persruby!

Persistence ala squeak/smalltalk/seaside. Sort of ruby with integrated odb . Or transparent automagic persistence, as I used to say on #ruby-lang before apeiros banned me :D

Maybe throw in some parallel features for robustness and backups. Ruby clouds? Man that was good coffee!

C

#3 Brad on 12.12.08 at 10:29 am

Was hoping you’d post a review of our site. We have some pretty talented ruby ninjas who have done a lot of work on it. might serve as a cool example for your conference. :) (http://iList.com)

#4 Jakob Alminde on 03.20.09 at 1:36 pm

Now that was unnecessarily crappily written …

What the fuck are “project object”s, y0 ….. ??