Posted by Rick DeNatale
Sat, 17 Nov 2007 11:18:00 GMT
One of the things about working with software is that you can pretty much do anything you imagine.
Many of these things can be cool.
And many of them, particularly in retrospect, can be less than brilliant.
Here are two of the more visible cool, but stupid things I've done in the past.
Read more...
Posted in war_stories, smalltalk | Tags smalltalkdistributed, stupidity, visualage | 1 comment | no trackbacks
Posted by Rick DeNatale
Sat, 03 Nov 2007 06:51:00 GMT

I finally got to meet Matz in person today, and we had a nice little chat.
I was pleased to learn that he follows this blog. My readership might be small, but it's quality readership. One thing I told him was that as much as I love, and still love, Smalltalk, I really do feel that I love Ruby just a little bit more.
We talked a bit about the upcoming stabilization of 1.9, which will be frozen as far as language and standard libary changes for the Christmas 2007 1.9.1 release, at which time transition from development to stable status. He has been backing out some of the differences between 1.8.x and 1.9.0. He told me that he had recently, or was soon to, revert the changes to the scoping of class variables. It appears that class variables will continue to be shared between classes and subclasses.
He also cleared up a technical ruby mystery that's been puzzling me for some time.
About a year ago I wrote about a change in Ruby 1.9 which cleaned up the semantics when modules included by a class are re-included in a subclass. The mystery is that sometime after I wrote the article, in a subsequent revision of 1.9, this got dropped. I never could find out why this happened, so today I took the opportunity to ask Matz in person.
Read more...
Posted in ruby, smalltalk | Tags matz, railsconf, railsconf2007 | 4 comments | no trackbacks
Posted by Rick DeNatale
Sat, 03 Nov 2007 00:50:00 GMT

Photo by Nathaniel Talbott.
This was not quite the largest audience Matz has faced there were about 500 in attendance at this evening's "Town Hall Meeting", he asid that he had spoken to a group of over 1000 in Japan, but that was not to an exclusively Ruby audience.
I captured most of the questions and answers as best as I could. Any errors of paraphrasing are mine:
- Q1
- What about backwards compatibility. My program broke when Ruby 1.9 changed File.exists? to File.exist?
- A1
- We try to keep the language as backwards compatible as possible, but File.exists? was an old method inconsistent with the naming of predicates.
- Q2
- (From an Engineer from TI looking at putting Ruby into new calculators) I don't like the licence on the regexp library function in 1.8. The regexp engine in 1.9 isn't "encumbered" by the GPL?! When will 1.9 be out.
- A2
- Ruby 1.9.1 will be out by Christmas 2007, but might not be as stable as we want.
Read more...
Posted in ruby | Tags matz, railsconf, railsconf2007 | 3 comments | no trackbacks
Posted by Rick DeNatale
Fri, 02 Nov 2007 13:32:00 GMT
Jim's talk was entitled "Advanced Ruby Class Design"
He started out talking about his own background with various programming languages and how influences from experience with other languages can both help and hamper learning Ruby. He said that while some things from Java/C++ like modularity carry over usefully to Ruby, but, that some very useful Ruby techniques are inconceivable to Java/C++ programmers.
Unlike Wallace Shawn's Vizzini, I'm pretty sure that Jim really does know what that word means.
He gave some examples of this from his "Classics", unfortunately, my note-taking skills are such that I can't capture enough to go into them in detail.
- From Rake, an example of why the FileList class, which acts like an Array broke because it was initially implemented as a subclass of Array. The fix was to NOT make it a subclass of Array, something which can blow the mind of someone coming from a statically typed OO language.
- From Builder, which uses "method_missing" to turn Ruby method calls into XML, a problem caused by interference between domain names, like 'class', and core Ruby object methods. The solution was to create a BlankSlate class which undefines most of it's inherited methods (it spares methods like __id__, and __send__). Then he found that he also needed to deal with methods added to Kernel and Object after BlankSlate was loaded. To do this he used method_added_hooks in Kernel and Object so that BlankSlate could remove newly added methods as they were defined. This later changed to use the append_features hook instead to catch methods added to Object or Kernel by module inclusion. Again, this is something which really requires coming from a less dynamic language to "Think outside the box."
He made another foray into "Parsing without Parsing" a Ruby technique for tracking the execution of a Ruby block with method_missing and proxy objects to "parse" the "source" of the block and capture an object graph representation. His motivating example was doing something like Err the Blog's Ambition which generates SQL queries from Ruby blocks. He gave lots of useful Ruby metaprogramming tips, up to and including where Ruby limitations led him to abandon this approach for SQL generation. Because of things like the inability to handle "syntactic sugar" operators like && and || since they aren't implemented as methods, he felt that these restrictions on contents of the block left him short of his goal to express the query in "natural" Ruby.
But the technique itself is quite useful, and finds use in tools like FlexMock and RSpec.
All in all a very thought provoking presentation from Jim. I hope he makes the slides available soon.
Posted in ruby | Tags rubyconf, rubyconf2007 | no comments | no trackbacks
Posted by Rick DeNatale
Fri, 02 Nov 2007 10:22:00 GMT

The conference led off with Marcel Molina reprising his Ruby Hoedown talk
"What Makes Code Beautiful".
I notice that he's changed the final solution to the problem he posed to "monkey-patch" String, instead of introducing a CoercibleString subclass. Did he read my earlier blog post?
no comments | no trackbacks