� That's About Right | Main | A Daddyman Weekend �
February 13, 2006
Coroutines and Codeblock Callbacks in Ruby
I have decided that nobody is going to help me write the great system of my dreams, nor am I going to get rich enough in my lifetime to have time to do it full time. So I have chosen Ruby to be the language for implementation of XRepublic. It looks very close to exactly the kind of language I would have written. It's lovely.
But the last time I saw coroutines was an Ada class in 1984, and I think I got that part wrong. So this whole
reciever.each { |iteratedParm | [parm1..parmn}
construction is a little freaky. Especially if I can put yeilds in any place in the recieving class method. I mean it kind of makes sense at a high level, but when you do it with seemingly atomic objects, it's a little mind bending. I'm sure that I'll get used to it as time goes by, and writing about it helps. Still.. I want to get it and I don't want to not use it because of its weirdness.
Having had to think primarily in Perl and ksh for the past 5 years has twisted me into a particular shape. So I bought both the Ruby books yesterday: the Pragmatic Programmer's guide and Agile Development with Rails.
What this is all about is XRepublic. I've already got several classes designed and I'm going to build the whole thing from scratch. So politics is really becoming tiresome to talk about and I'm getting deep into the geekery. Of course in the end it's to build XRepublic which is all about politics. So we'll be back around to more of that next year some time. More later.
Posted by mbowen at February 13, 2006 07:57 AM
Trackback Pings
TrackBack URL for this entry:
http://www.visioncircle.org/mt/mt-tb.cgi/4952
Comments
Cool stuff, I've been thinking about getting into Ruby but most of my professional work is in ASP.NET or J2EE (or the POS Cold Fusion) so I decided to write my new (and still very buggy) webblog engine in the former.
I wrote this task, calendar, file, contact, inventory, kitchen sink management that I use to manage information at my job in ASP.NET and thought that it would be cool to integrate it all into some sort of "Life Management" application that allows a person to track personal projects, inventories (DVD collections in particular), important dates and the like and have this information viewable and modifiable (with appropriate authentications and per-object authorization) by site visitors.
I laughed when I read your code name, mine is xNET. I'm not arrogant enough to call my mind great in this field, so I'll just say that the congruence was charming.
Posted by: Rashid Muhammad at February 13, 2006 02:39 PM
They say Ruby's what Perl should be. When/If Perl 6 finally comes out, we'll see which rocks harder.
Good luck with the project and enjoy the Rails curve (convention over configuration, tho?).
Posted by: memer at February 15, 2006 05:43 AM
They say Ruby's what Perl should be.
Readable?
Posted by: Rashid Muhammad at February 15, 2006 05:47 AM