Thursday, March 01, 2007

Not Your Father's Pinewood Derby Car

My son designed a pinewood derby car for a 'open class' race we had the other night. He did the basic design, but got some help from Kevin Cole (a mechanical engineer at BYU) and I to tighten it up. Then he set about building the and painting the body, and went over to Kevin's house to put on the starter.

Finally it was time to race. Everything worked as expected. It was incredibly cool to hear the hiss of the car as it hurtled down the track trailing a plume of particulate dry ice. The only problem was the hump in the track — the car went airborne at that point, and didn't touch the ground again for 10+ feet past the finish line.

During the race itself, the car cleared the 30 ft in about 1.2 seconds, which is to scale speed of about 340 mph. (My earlier estimates were a little bit off.)

I hope you enjoy the video as much as we enjoyed racing it.

March Blogging Contest

Why does March always sneak up on me like this?

Now that we've finished the February Contest, it's time to start March's. We'll follow the same rules. Anyone who wants to submit a blog entry can just put a link to it into the comments below. On the 1st of April, Jason Gilmore and I, along with our guest judge(s), will read the entries and pick a winner. The winner gets 3 Apress books (print or PDF) of their choice.

The last two contests have been a bit 'Rah! Rah!' for some people, though I've enjoyed the entries. This month we're doing something a little bit different. No language, and no framework is perfect. Anyone who has more than a passing familiarity with one ought to know about its warts. With that in mind, March's challenge is —

What can Ruby on Rails learn from other web frameworks?

Give this some real thought and tell us about what you think Rails could do better. Give us an example of how another framework (it doesn't even have to be Ruby based) does it. Hopefully, we'll come up with some great ideas for the Rails core developers to chew on.

Write on! (I'm looking forward to your responses.)


Update: One of the Rails core developers has expressed some concerns with the topic of this contest. Just to be absolutely clear:

  • This is not an official Rails contest ... Rails is opinionated software, and the core developers opinions are the ones that matter. (Of course, you might be able to help them see the light with a well written entry.)
  • If you really want to see your ideas in Rails, you'd do well to remember: "Rails has never been about inviting suggestions, we'd prefer patches :)"

Tuesday, February 27, 2007

Rubinius Contest Winner

Well, I learned an important lesson from this contest — never try to run a contest when your judge is going to be in Hawaii, there's no way you can compete against the beach.

In better news for the rubinius community (and for our winner), I did eventually get enough of Evan's attention to pick a winner. After a lot of thought, Evan's decided on a new name for RNI. Zed's subtend is the winner, and I'll coordinate with him to get his choice of books off to him.

Monday, February 26, 2007

tumble blogging

I've been thinking about starting a tumbleblog for a while now, but haven't wanted to bother setting one up. Now, Tumblr has made it too easy for me not to do it. Watch On Ruby (the tumbleblog) for quick posts as I run into them.

Tuesday, February 20, 2007

Serial Parrot/Cardinal Interview: Episode II

In this episode, Kevin and I talk more about Parrot and objects, other Ruby implementations, and some of the sources Kevin's been working with.

The big news in alternative implementations was a shootout by Antonio Cangiano. While I think this is still a bit premature (only YARV and Ruby 1.8.5 complete 100% of the tests, see chart below), there's a lot to learn from it. I think it can help each of the alternative implementation projects to see where they can focus some of their effort to really improve their version of Ruby.

Implementation Completeness

I know Cardinal been blocked by the lack of solid Object support in Parrot so far, but what do you think can be done to help get Cardinal 'over the hump' so that you (and other contributors) can really get some momentum going?

Kevin: Attempts could be made to work with the current object system in Parrot. Having seen the trouble others have had with the current object system, I have decided that it is not worth my time to work with the object system as is.

Allison Randal has checked in a PIR based MOP called Simple Meta Object Protocol (SMOP). SMOP in its current form only supports attributes and parent classes. Support for methods needs to be added. I have the initial translation of SMOP to C based PMC coded up. The translation however, depends on the ability to call C PMC methods from C with PIR calling conventions. I have a plan to implement this functionality and call it PMINVOKE. This is the corresponding piece to PMETHOD functionality which I recently added to Parrot. PMETHOD allows C PMC Methods to be implmented with PIR calling conventions.

You've talked about wanting to build a MOP based object system, what advantages does that have for Cardinal and Parrot?

Kevin: MOP is a huge win for Parrot. MOP will allow common Parrot infrastructure pieces to be reused to implement the distinct object systems features that each language has. Parrot developers hope that a common Meta-MOP will permit the different object system philospohies of each language to interoperate at some common denominator level. At a minimum a common Meta-MOP will permit language implementor write object system translators. JRuby is having to do this with the Java and Ruby object systems, but without the help of any low level tools or common meta object subsystem.

As you see the JRuby and rubinius teams moving ahead, what pieces of their work do you think will apply to Cardinal?

Kevin: I think the knowledge base that they possess will be beneficial to Cardinal. The JRuby and rubinius projects currently trade and share a lot of insights about the problems areas of MRI. I'm a little disappointed that the alternative implementations have not built more common infrastructure in Ruby itself. Parsing is a real problem. I believe alternative implementors should build a common ruby parsing library to support rich parsing constructs that would make parsing ruby easier. Building a parsing framework is difficult, but adding code generation backends to a completed parsing framework would be relatively easy. Antlr and Perl 6 Rules are excellent examples of parsing frameworks with multiple code generation back ends. I am as guilty as the next implmentor in this respect, because Parrot provides a very rich parsing framework (Perl 6 Rules) which I'm proponent of.

Dan talked about using the plethora of papers on optimizing register based compilers to help improve Parrot. What papers and/or projects are you watching to help with your work?

Kevin: I've read the traits papers that discusses role composition. I've also checked out and read the CLOS MOP book. The traits papers have been very educational. The unanswered question is how to compose or accomidate state. I think a mix of the C++ multiple inheritance paradigm and explicit annotations as advocated by the traits papers may be the solution for composable state.


Given Kevin's work with on and MOP, the only sponsor that made sense this week was The Art of the Metaobject Protocol. Grab a copy and learn more about MOP while supporting these interviews.

If you enjoyed this, you might also enjoy Nick Sieger's Serial JRuby Interview:

  • Episode 1, in which Charles, Thomas, and Ola talk about their plans for JRuby.
  • Episode 2, in which Charles, Thomas, and Ola talk about cooperation with the rubinius team and YARV.
  • Episode 3, in which Charles, Thomas, and Ola talk about cooperation with the rubinius team Rails and (more about) YARV.
  • Episode 4, in which Charles, Thomas, Ola, and Tor Norbye talk about JRuby and NetBeans.
  • Episode 5, in which Charles, Thomas, and Ola talk about groovy.

James Gray has also started a serial interview. He's talking with Matz and Koichi. His first episode introduces them and discusses the recent merger of the VM formerly known as YARV and Ruby 1.9.

You might also enjoy my new Serial XRuby Interview or the original serial interview with the rubinius team.