Showing posts with label matz. Show all posts
Showing posts with label matz. Show all posts

Saturday, November 3, 2007

RubyConf 2007: Keynote by Matz

Part I Language Matters or Not

Turing Theory => Language does not matter, at least in theory. Twitter On Rails. Trouble illustrated by a lolcats photo. There has been a 1000% performance boost since January 2007. What made the difference? MySQL, Solaris and dtrace.

What makes the difference? Not the language itself. It's the attitude of the users. Python users believe in the one true way. Ruby users like diversity. I said that I liked all programming languages, except for a few. As proof, Matz is wearing a python shirt.

People matters. Motivation Matters. Enthusiasm Matters.

Martin Fowler said, "Ruby people are nice." There is a Love/Hate Ratio graph. Ruby, Lisp and Python are the top three. We are using the most beloved language in the world.

Thank you!

Part II What's in 1.9, or What's not in 1.9

We will be releasing 1.9 this Christmas. Unfortunately it is not as stable as we would like. The Grand picture is that 1.8 is the long term stable release, 1.9 introduces major incompatibility and will be the bleeding edge for a time, and 2.0 is the driving force.

1.9 Incompatibility

Some will be severe, and some will be trivial. Severe #1: block arguments are changed. They are local variables only. Blocks are scoped more strictly. Severe #2: string is no longer enumerable. What will be iterated over needs to be specified explicitly (lines, chars, bytes). Severe #3: M17N Unicode is introduced. Character-based indexing ("ABCaio"[0] returns "A" and [3, 1] returns "a"; the preceding "aio" should be read as Japanese Hiragana, because I don't have Japanese support on this computer). Encoding aware comments. You can specify UTF-8 in a special comment at the beginning of your script. You can open files of other encoding formats.

Trivial Incompatibilities: lots of changes, some deprecation, and even more enhancements. Some new features:
  • "->" lambdas ("->" is a mutation of the lambda character)
  • ".()" to call
  • multiple splats in an argument list
  • mandatory arguments after optional arguments
  • built-in enumerator
  • external iterator (e1=[1,2,3,4].each e2=[10,11,4].each loop{p e1.next+e2.next} #prints 11, 13 and 7; loop will catch the end of iterator silently; inherited from the language named Satan?)

Part III Implementations

Realistic alternatives: JRuby, Rubinius, and IronRuby. All are faster than MRI. Finally, we succeeded in getting rid of Matz (It's ok; I'm a designed of languages). Also, we have YARV, the fastest Ruby VM ever. Praise should go to Koichi. In 1.9, Ruby goes on a major memory diet.

Part IV Where are we from? Who are we? Where are going?

Where are we from? Many languages.
Who are we? Rubyists.
Where are going? World domination.

Beware of a bubble economy and the cycle of tragedy (humble start, success, pride, conflict/war, drop to nothing, repeat). We are at success.

Where will we go? Enterprisey. I don't want to, but I can't help it. The suits are surrounding us.
Where will we go? Scalability. It is not a language issue. It is a system issue (data size, access frequency, program size, and number of CPUs).

Q & A

1.8 has green threads. Will 1.9 have native threads, due to the move towards multi-core CPUs? I envision multi-core CPUs will use multiple processes.

No one is working on a shim library for 1.8->1.9 as there was in 1.6->1.8, because of the massive differences.

What will required arguments after optional arguments look like?
def foo(a, b=24, c)
...
end
foo(1,2,3) # a =1, b=2, c=3
foo(1,2) # a=1, b=24, c=2

def bar(a, b=1, c=2, d)
...
end
bar(1,2,3) # a=1, b=2, c=2, d=3


You talked about named arguments at another conference. What is the status on that? We didn't have enough time to complete that for Christmas. You will have to wait until 2.0 for that.

Why would you want the ability to have required arguments after optional arguments? It is useful with named arguments. Fill the required arguments at the front of the list, then at the end of the list, and finally fill in the optional arguments.

Are you worried about the niceness scaling as the community grows exponentially? I was worried when the conference went from 60 people to 500 people. I think it has been a success so far. It is kind of like a miracle.

With the external iterator throwing an exception at the end of the loop, is there a stack trace associated with it and is it a performance consideration? Someone from twitter answered that the bug they found had an exception thrown with a 400 level stack trace. If you aren't doing anything crazy with the iterator, you should be fine.

Will the 1.9 byte code be frozen anytime soon? Deferred to Koichi. No.

Will there be an AOT compiler in 1.9? Deferred to Koichi. Not in the Christmas release. Sometime in the future.

What would you like to see in Ruby 3.0? 3.0? Class box. We should be able to isolate our changes to a class in a name space. Looking to do that in 2.0.

Why does method wrapping (aspects) keep getting punted? I feel that the features in Aspect/J is application-level or maybe framework-level. The language should provide primitive features.

How will future pressures of forking be dealt with? Fortunately or unfortunately, Ruby is difficult to implement. People implement lisp once or twice. I implemented Ruby once; never again. Ryan Davis shouts, "How many people have implemented lisp?" 10% of the room raises their hands.

Have you given any thought to passing multiple blocks to a method? I tried several times, but was never successful. It is important to keep the simple syntax that the Ruby block has.

Speaking of crazy syntax, do you like list comprehensions in Haskel? No.

That's all folks.

Disclaimer: I might have misheard any portion of this.

Friday, November 2, 2007

RubyConf 2007: Town Meeting with Matz

For those of you not familiar, Yukihiro "Matz" Matsumoto is the creator of Ruby.

First person complains about File.exists? changing to File.exist? and asks, as a "real" programming language, shouldn't it be backwards compatible? Sometimes we need to break compatibility. File.exists? was introduced around 1.4 and should have been removed earlier. The room did not like this question.

Someone from the TI calculator division is looking to put Ruby as an interpreter on TI's next line of calculators.
  • When will 1.9 be production ready? Christmas. (Ah, but what Christmas)
  • When will there be a version of Ruby not encumbered by the GPL?
Next person doesn't see significant gains in performance with Ruby 1.9. He says that Fixnum and a few other classes are optimized. I'm not sure what the answer was.

What do you think of the other VMs trying to run Ruby (JRuby, Rubinius, RubyCLR)? What do you think of the competition? Dealing with Ruby on the VM side is hard. He wants to compliment these teams on their accomplishments.

Does working on Ruby still make you happy? What is one of the most enjoyable moments? Started development in 1993. One of the initial things was to enjoy making it. The enjoyment of designing, implementing, and coding in Ruby continues.

What is the Ruby community like in Japan? Pretty much the same as here. Does the increase in Ruby usage have much of an impact on you?

What editor do you use? emacs

When can we expect to see a 1.9 feature list, so that we can start making changes to JRuby? Maybe before mid-November.

When it comes to Ruby, do you consider yourself to be a scientist? Hobbyist.

Can we expect the parse tree to be made available to normal programs, at some point? Probably not. It would be tough for us to support in the future.

What other languages are you paying attention to at the moment?

...

Leopard has a ruby with dtrace built-in. Have you or others on the core team used it? Never used dtrace by itself.

Do you want to join us next year for the European Ruby conference? Maybe.

Rails has propelled the popularity. Do you see another project that could boost Ruby in the same way?

Is there a time when you say to yourself, "Ruby might not be the right tool for the job"? There is some weakness on projects that have large teams (100 or so) and run for a long time. The rules of the game are changing, though. Team sizes are getting smaller and smaller to produce an effective tool.

I'm having trouble hearing Matz's responses.

Trotter: In the essay on Beautiful Code, you say that beautiful code is familiar. Is there anything that you haven't done in Ruby, because you want it to stay familiar?

What is your second favorite programming language? I love all programming languages except for several.

What would you remove from Ruby? ................................from Ruby?!

Someone from NASA asks have you ever studied the Toyota Production System in terms of dealing with defects?

Are continuations in or out in 1.9? You have to require additional libraries in 1.9. It is out of the core language, but will be available.

Can we settle on a final 1.8 spec? How about 1.8.6?

Are there any parallelism plans with the language?

You talked about selector namespaces in Ruby 2.0, what are your thoughts about it now? It's hard to do efficiently?

What is the difference between 1.9 and 2.0? 1.9 is the transition from 1.8 to 2.0. Ruby 2.0 will be a major enhancement with little to no thought about compatibility.

Is there any other project you would like to work on, besides Ruby? An emacs GMail reader.

Is there anything that you would like to see someone in the community make, that you don't have time for? Better the issue tracking and bug reports. Don't want it on trac with the python.

So, you've come to be called the Benevolent Dictator in the ruby community. There have been other imitators (JRuby, Rubinius, etc.) that may have other goals in mind. Have they taken some of your control away? How do you feel about that? If you design a language, you might be punished. For all the enjoyment he gets from Ruby, it is a cost he has to pay.

Do you see a difference between the code written by people in the states, or in Europe vs that written by people in Japan?

...

You mentioned that you were interested in the Io programming language. In Io there are no keywords; everything is a method. Is this the way that Ruby will be going? Not the way that Ruby is going.

...

Have you considered bundling some of activesupport into Ruby? Some of it will be coming in 1.9, but 2.days.ago will not.

What do you think of people with no programming experience, picking up Ruby as their first language? Ruby is designed for programmers. I am a programmer, so Ruby is designed for me. Might not be suited for an introduction to programming. Some parents don't give their children very sharp knives, but some do.

Someone might come into Ruby and use CSV.rb, where everone else is using fastcsv, because it is better. How do you see the standard library over time? Diversity is a good thing in general, so competing implementations can be useful over time. They can lead to confusion, though. Should there be someone watching over the standard library? Wish people would coordinate before they create a duplicate project.

...

Last year, internationalization was a hot topic. Where does that stand today? It still is a hot topic.

Question about book publishing in Japan. What books are coming out over there, but not here (like cgi programming with ruby)? Are there more books being seen in Japan? Publishers used to send Matz a copy of new ruby books; not any more. In a small town, there are 50-60 Ruby books in the bookstore.

...

What kind of programming do you do day-to-day? Uh, Ruby.

What is your favorite movie? I don't know. Matrix.