Nick Sieger: Tag rubyconftag:blog.nicksieger.com,2005:TypoTypo2010-11-22T18:03:42+00:00Nick Siegerurn:uuid:6ea91e85-04db-4944-aecb-c5060fd9ec202010-11-11T18:38:00+00:002010-11-22T18:03:42+00:00New Orleans live music this weekend during RubyConf<p>My boy Erik Jacobson from way back and also of <a href="http://www.mamadigdown.com/" title="Mama Digdown's Hot Tunes!">Mama Digdown’s Brass Band</a> is a New Orleans regular and knows the local scene well.</p>
<p>He graciously gave me the lowdown for this weekend. I’d like to make a few of these gigs; probably at least the Stooges at Hi Ho tonight, maybe Hot 8, Ellis and/or Cotton Mouth Kings tomorrow, and one of Shannon Powell or Wes Anderson on Saturday. Let me know if you’re interested by <a href="http://twitter.com/nicksieger">messaging me on Twitter</a>.</p>
<p>Erik also mentioned that there might be a <a href="http://en.wikipedia.org/wiki/Second_line">Second Line</a> happening on Sunday afternoon that I might try to check out before I take off in the evening. Let me know too if you are up for that.</p>
<p>Ok, here’s Erik’s take:</p>
<h3>Thursday</h3>
<p><strong>Shamarr Allen @ Irvin Mayfields Jazz Playhouse. 8:00pm.</strong></p>
<p>He’s a fantastic young trumpet player and a friend of mine. This is the nice/upscale club that is in the hotel on Bourbon Street.</p>
<p><strong>Kermit Ruffins @ Vaughn’s. 8:00pm.</strong></p>
<p>You probably know, but Kermit is a trumpet player and is a quintessential New Orleans character. Vaughn’s is a great local dive bar that is in the Bywater neighborhood out by the Navy Yard. You’ll want to take a cab there. There is also free beans and rice at his shows.</p>
<p><strong>Stooges Brass Band @ Hi Ho Lounge probably around 10:00pm.</strong></p>
<p>I got a hold of Walter from the Stooges and he said they were playing tonight. They are a fantastic brass band and it’s a great local spot to catch them. Good friends of Mama Digdown’s.</p>
<p><strong>Soul Rebels Brass Band @ Le Bon Temps Roulee @ 11:00pm</strong></p>
<p>This is always a good hangout. There will be a ton of people there. The Soul Rebels are awesome and always play pretty late into the night.</p>
<p>If you felt like being adventurous, you could hit either Vaughn’s or the Playhouse from like 9-10, then take a cab to the Hi Ho for a set until around 11:30 and then finish with the Rebels. That is a lot of music, it’s just so hard to pick which ones to leave out.</p>
<h3>Friday</h3>
<p><strong>Hot 8 Brass Band @ 12Bar. 7:00pm</strong></p>
<p>HOT, HOT brass band. They are good friends who have been up north many times. This is a new club that is pretty close you your hotel.</p>
<p><strong>Hot Club of New Orleans @ DBA. 6:00pm</strong></p>
<p>This is a great Django style band. I went to college with the violin player Matt Rhoady. He also hails from Mpls and went to Henry High/ This club is over on Frenchman Street near Snug Harbor.</p>
<p><strong>Kid Chocolate Brown @ Irvin Mayfields Jazz Playhouse. 8:00pm</strong></p>
<p>Cool young trumpet player and singer. He also plays in Los Hombres Calientes from time to time.</p>
<p><strong>Ellis Marsalis Quartet @ Snug Harbor 8:00pm</strong></p>
<p>This is certainly worth going to and I am sure he’ll have a good band with him.</p>
<p><strong>New Orleans Cotton Mouth Kings @ Spotted Cat. 10:00pm</strong></p>
<p>This place is really close to Snug Harbor and would be fun to hit after Ellis. Great traditional band with young cats. Good people watching too. This is a cool scene here I think it’s free too!</p>
<h3>Saturday</h3>
<p><strong>Soul Rebels @ DBA. 11:00pm</strong></p>
<p>If you missed them on tonight, you can catch them here. This would be a good place to hear them.</p>
<p><strong>Shannon Powell @ Irving Mayfields Jazz Playhouse. 8:00pm</strong></p>
<p>He is so badass. You should really try to swing by if you can. He is the drummer that was on that Orchestra Hall gig I played this summer. Cool dude too. At 11:00pm there is also a brass band playing this club called the KinFolk Brass Band.</p>
<p><strong>Wessell Andersen @ Snug Harbor. 8:00pm</strong></p>
<p>I am sure you know him from Wynton records. He is amazing. It is a hard decision between him and Shannon Powell. </p>Nick Siegerurn:uuid:b2e0444e-6cf4-468d-a222-0f5a783aed942010-03-12T23:21:04+00:002010-11-22T18:03:44+00:00RubyConf India 2010!<p>I’m honored to be heading to the first ever <a href="http://www.rubyconfindia.org/"><strong>RubyConf India</strong></a> in Bangalore next week. I’ll be delivering an update on Rails 3, JRuby, and what’s in store for the future of the combined platform in 2010. I’m looking forward to meeting you there!</p>
<p><a href="http://rubyconfindia.org"><img src="http://rubyconfindia.org/stock/rubyconf-badges/RubyConf2010/270X185_speaking.jpg" alt="I'm speaking at RubyConf India 2010"></a></p>Nick Siegerurn:uuid:c4cb7cde-ff0f-4760-aefe-71d6461b89b32006-10-20T20:18:00+00:002010-11-22T18:06:39+00:00RubyConf: Graphics with Ruby<p>Geoff Grosenbach is waxing on pagefuls of numbers condensed into a small, tidy graph that increases the amount of information you can communicate on a page.</p>
<p><a href="http://www.flickr.com/photos/nicksieger/279242427/" title="Photo Sharing"><img src="http://static.flickr.com/107/279242427_32770c5081_m.jpg" width="240" height="160" alt="Topfunky fox" /></a><br/>
<em>The cartoon fox makes his second appearance of the day in one of Geoff’s sparklines</em></p>
<p>It is in our hands, the hands of the programmer, to show designers what the range of visual representation capabilities are.</p>
<h2>Libraries</h2>
<ul>
<li>Scruffy -- SVG graphs, no dependencies (i.e., RMagick)</li>
<li>GNUPlot -- the old standby</li>
<li>MRPlot -- scientific plots</li>
<li>PNG -- line and font drawing in pure ruby from Seattle.rb</li>
<li>Gruff -- depends on RMagick</li>
<li>Sparklines -- depends on RMagick</li>
<li>[Ploticus and RRD were mentioned during the talk as well]</li>
</ul>
<h2>Applications</h2>
<ul>
<li>Automatically generating image mastheads with a font mask, a gradient and a cloud image showing through the mask</li>
<li>UrbanDrinks.com -- plotting bars on a timeline showing happy hours in Portland</li>
<li>“Scene graph” -- rendering multiple layers of images/icons on the filesystem into a composite graphics “scene”</li>
<li>BillMonk.com -- rendered image with multiple components that allows you to circumvent cross-site or crippled javascript issues</li>
<li>In a Rails controller:
<ul>
<li>Generate and cache (with <code>caches_page</code>) an image with text</li>
<li>Register a new mime type and use <code>responds_to {|type| type.jpg { ... } }</code></li>
</ul></li>
<li>Requisite reference to Edward Tufte</li>
</ul>
<h2>Techniques</h2>
<ul>
<li>Comparisons -- show two competing trendlines on a graph</li>
<li>Multivariate analysis -- stockhive.com stock chart rendering</li>
<li>Content is king -- be judicious</li>
</ul>Nick Siegerurn:uuid:26c1ed61-3411-4a33-9275-5014a5bc581e2007-11-04T02:12:00+00:002010-11-22T18:11:02+00:00RubyConf Day 2: Morning Sessions<h2>John Lam: IronRuby</h2>
<p>Why IronRuby? John started with RubyCLR, which was a bridge between two languages/environments (.NET CLR and Ruby). Last year he didn’t know he’d be uprooting his family from Toronto and moving to Seattle. Now he finds himself in Microsoft trying to make sense of his new position. He describes a number of higher level goals for himself and IronRuby at Microsoft.</p>
<p><em>Change or die.</em> Involvement in open source can only go up, right? The challenge is that the company is already doing well, so it’s hard to convince middle management that anything should change.</p>
<p><em>Open source</em>. To their credit, the IronRuby team appears to be on the leading edge of open source at Microsoft (c.f Microsoft Public License). They also had planned all along to take external contributions, and have in fact started to receive them</p>
<p><em>Rails.</em> One of the key goals is to be true to the language, and that includes being able to Run Rails.</p>
<p><em>Performance.</em> Use IronRuby as a testbed for DLR performance testing.</p>
<p>John is showing the REPL now (running under Mono actually), pointing out that “integer math is now supported” (apparently early on someone pointed out that subtraction didn’t work) and that CLR list types automatically appear like Ruby arrays.</p>
<p>Heavy DLR pitch ahead. Performance history, how the CLR used to be slow for dynamic languages, and how it’s better now.</p>
<p>John is running the Rubinius specs now, and showing only 373 out of 1030 failing. (It looked like he was running the core specs only.) Praise for the Rubinius team!</p>
<p>It’s possible to bind C# types to Ruby using annotations. Lots of C# code being shown, including a mess of generated code.</p>
<p>John also showed a XAML/Silverlight demo that was scripted by Ruby.</p>
<h2>Charles Nutter and Thomas Enebo: JRuby</h2>
<p>JRuby: “Not Just” JRuby for the JVM. I found it hard to take notes for this talk since I’m so close to it. Fortunately, their slides were pretty verbose and comprehensive, and hopefully will be posted shortly.</p>
<h2>Evan Phoenix: Rubinius</h2>
<p>Rubinius talk in roller derby mode. Ask questions early and often.</p>
<p>What is the end game of Rubinius (or JRuby, or IronRuby)? Total. World. Domination. <strong>For Ruby!</strong></p>
<p>Rubinius is 3 things: form, function, and elbow grease. <code>Ruby::Syntax, Ruby::Behavior, and Google.search("crazy cs papers")</code>.</p>
<p><em>Rapid fire CS Nerd attack mode coming</em>. Generational collection, bytecode execution, stackless, bytecode represenation, .rba archives.</p>
<p>Who would rather program C than Ruby? Java? C#? (Only one guy raised his hand that he’d rather code C.)</p>
<p><em>Hard-hitting portion of the talk.</em> The kernel, broken down.</p>
<ul>
<li><p>1.8</p>
<ul>
<li>84,516 lines of C</li>
<li>0 lines of Ruby</li>
</ul></li>
<li><p>1.9</p>
<ul>
<li>128,786 lines of C</li>
<li>0 lines of Ruby</li>
</ul></li>
<li><p>IronRuby</p>
<ul>
<li>48,282 lines of C#</li>
<li>0 lines of Ruby</li>
</ul></li>
<li><p>JRuby</p>
<ul>
<li>114,507 lines of Java</li>
<li>0 lines of Ruby*</li>
</ul></li>
</ul>
<p>(*Even though I got heckled for saying it, JRuby does actually have some code written in Ruby that’s not the standard library.)</p>
<ul>
<li>Rubinius
<ul>
<li>25,398 lines of C</li>
<li>13,946 lines of Ruby</li>
</ul></li>
</ul>
<p>1.8 and 1.9 are really Ruby for C programmers. JRuby is Ruby for Java programmers. IronRuby is Ruby for C# programmers. But Rubinius is <em>Ruby for Ruby programmers</em>.</p>
<p>Dogfooding. Gives feedback, which enables tighter loops, improves the kernel, makes life better for everyone on the platform.</p>
<p>Road, rubber, all that jazz. Evan mentions that Rubinius runs 24 of 31 benchmarks faster than Ruby 1.8, but the numbers are shifting rapidly. Evan wanted a 1.0 for RubyConf, but he has come to realize that several things are more important than a milestone. Design, and the technical challenges, certainly. But more importantly, the community.</p>
<p>Taking a cue from the Perl 6 community, <code>-Ofun</code>. The free-flowing commit bit, where patch sumbitters whose patches are accepted are immediately entitled commit rights, has given rise to 57 committers. 17 of these have changed more than 400 lines of code.</p>Nick Siegerurn:uuid:4056b0d7-7b02-4fae-b5b7-536b0cfa5b762006-10-21T02:59:38+00:002010-11-22T18:11:21+00:00RubyConf: Matz Roundtable<p><em>An annual tradition at RubyConf is the “Roundtable”, where any member of the audience can come up and ask Matz any question. Transcript follows with partial paraphrasing.</em></p>
<p><em>Q. Will Ruby ever get the features of <code>evil</code> built in? Will we get <code>become</code>?</em> No.</p>
<p><em>Q. If Symbol is a “frozen” String, why do we need Symbol?</em> I don’t have a complete answer to that question -- following tradition.</p>
<p><em>Q. What’s the most unusual architecture Ruby has ever run on?</em> Ruby...I can’t think of one...JRuby? Some guys ran compiled Ruby on the NECS supercomputer. [From the audience] Symbian.</p>
<p><em>Q. As Ruby gains acceptance, it becomes more resistance to change. How do you keep agile while gaining momentum?</em> We have forked off 1.8, so if you want stable, use Ruby 1.8 forever.</p>
<p><em>Q. The array patch -- is there any chance of a backport for those of us who want 1.8 forever?</em> Could be, but the current patch has a bug in 1.9.</p>
<p><em>Q. Why isn’t YARV the only VM for 1.9? [Comment about register-based VM]</em> I’m not sure whether stack-based or register-based VMs are better...[THAT GUY!]...[Given the hook]</p>
<p><em>Q. It seems like momentum is based on strong metaprogramming facilities. With 1.9 there are more user-friendly features. Will code eventually be data, or are we just patching on techniques on a tool that is being used more heavily?</em> An extreme way to do metaprogramming is to use Lisp, but for practicality we have to start somewhere. I’m not sure that s-expressions are the way to go. We’re not going to have macros. It will remain similar to what we have in 1.9. <em>The ability to serialize code would be really powerful -- will that happen?</em> Disclosing internal state is tricky because it changes. It could be a platform-specific feature.</p>
<p><em>Q. Recently for 1.9, there was a patch for Array and String to be in the object header. Was this profiled? It seems like it would be an incredible performance problem.</em> It was done for slowness of malloc and gc. In some cases it could run slower, but it benchmarked at about 5% faster. It should be tested thoroughly.</p>
<p><em>Q. Ruby 2.0 will not have green threads or continuations, correct? Are there specific reasons for that decision?</em> It is difficult to implement green threads in YARV.</p>
<p><em>Q. People want to see development move quickly, but may not be able to contribute code. Can you suggest ways for those programmers to contribute?</em> Submit patches to the list. What is the obstacle to joining us? [Question restated] Submit testing, submit documentation. Contribute to RubyCentral? (looks at Chad Fowler)</p>
<p><em>Q. The CSV library is useful, but slow. Can we see FasterCSV in stdlib?</em> It’s ok to replace the csv library with FasterCSV, as long as the compatibility issues are resolved.</p>
<p><em>Q. I want to thank you because I love writing in Ruby every day. I tried to write Python first. Recently an unrelated upgrade broke my Python apps. Will we be able to manage multiple versions of Ruby?</em> You’ll have to have two versions, 1.8, and future ones.</p>
<p><em>Q. What would you say is the most important feature of your personality that has given you success?</em> Endurance? <em>Can you elaborate?</em> It’s easy to design a language, many of them disappear in a year or two. I’ve been working on Ruby for 13 years.</p>
<p><em>Q. I wanted to see in IRB how the class was implemented at runtime. (He means an uneval feature)</em> [Audience member (Eric Hodel?) mentioned ParseTree]</p>
<p><em>Q. If there wasn’t Ruby, what would you be programming in?</em> Some language of my own not named Ruby.</p>
<p><em>Q. Do you still look at RCRchive?</em> Yes. I’ll talk about it in the keynote.</p>
<p><em>Q. I would like a feature abstraction that would allow Ruby to fork itself rather than actually forking. Can you see this added to core?</em> We have to define the behavior of that feature. We have to have a good name for the method. Then there will be no problem to add it to core.</p>
<p><em>Q. Why do you need to bind methods to an object of the same original module?</em> If you bind a method taken from String class to Array class, it will crash, and we need to prevent it.</p>
<p><em>Q. What do you think of Ruby.NET?</em> I’m pretty open to new implementations. <em>Should there be a standard (language specs) that other projects should follow?</em> <a href="http://headius.blogspot.com">Charles</a> started work for a <a href="http://www.headius.com/rubyspec/">written 1.8 spec</a>, and I’ll help him with that if I have time.</p>Nick Siegerurn:uuid:0b5efe1d-0753-4dff-8919-0727d66728932006-10-24T22:51:55+00:002010-11-22T18:11:21+00:00Rubyconf Wrap-Up<p>Whew! Back home from my first RubyConf, it’s taken me a couple days to collect some parting thoughts. As you might have noticed, I was <a href="/articles/tag/rubyconf2006">pretty busy last weekend</a>.</p>
<p>First of all, what an awesome and welcoming community. It’s going to sound cliché, but there are so many intelligent and motivated people walking around that you can’t help but be inspired to roll up your sleeves and get your hands dirty.</p>
<p>There were definitely some high points for me. The beauty and power of the language, even after using it for almost two years, still amazes me. Pretty much every piece of code I saw, whether in a presentation or looking over someone’s shoulder, had a clear purpose and communicated its intent better than any general-purpose machine language I have seen. The simplicity of Evan’s new <a href="/articles/2006/10/20/rubyconf-sydney-and-rubinius">Ruby-in-ruby VM</a>, the syntax integration tricks of John’s <a href="/articles/2006/10/23/rubyconf-your-ruby-in-my-clr">RubyCLR</a> project, the forthcoming <a href="/articles/2006/10/21/rubyconf-mac-os-x-and-ruby">RubyOSA</a> APIs, and Geoffrey’s <a href="/articles/2006/10/20/rubyconf-graphics-with-ruby">graphics programs</a>, are all great testaments to Ruby’s power.</p>
<p>There was an implementer’s summit on Friday night, which I attended (see also coverage <a href="http://tbray.org/ongoing/When/200x/2006/10/20/RubyConf">here</a> and <a href="http://on-ruby.blogspot.com/2006/10/rubyconf-2006-implementers-summit.html">here</a>). There are now at least 8 active implementations of Ruby (<a href="http://www.ruby-lang.org/">Ruby</a>, <a href="http://www.atdot.net/yarv/">Yarv</a>, <a href="http://www.jruby.org/">JRuby</a>, <a href="http://on-ruby.blogspot.com/2006/09/ruby-hacker-interview-kevin-tew.html">Cardinal</a>, <a href="http://blog.fallingsnow.net/rubinius/">Rubinius</a>, <a href="http://www.zenspider.com/Languages/Ruby/MetaRuby.html">MetaRuby</a>, <a href="http://plas.fit.qut.edu.au/Ruby.NET/">Ruby.NET</a>, <a href="http://wilcoding.xs4all.nl/wilco/IronRuby.aspx">IronRuby</a>), and two interop bridges (<a href="http://www.rubyclr.com/">RubyCLR</a> and <a href="http://www.rubycocoa.com/">RubyCocoa</a>)! The biggest news was that there are plans to revive the <a href="http://rubyforge.org/projects/rubytests">Ruby testing</a> project (formerly the Rubicon) and share as many tests as possible among the implementations.</p>
<p><a href="http://www.forbiddenweb.org/topic/126213/index.html">RejectConf</a> was a huge success, due largely to the indefatigable <a href="http://nubyonrails.com/articles/2006/10/24/adam-keys-ussruby-sketch-from-rubyconf-2006">Adam</a> <a href="http://youtube.com/results?search_query=adamkeys&search=Search">Keys</a>. <a href="http://blog.tewk.com/?p=88">Kevin Tew</a> has a decent wrap-up of the talks that occurred. <a href="http://headius.blogspot.com/">Charlie’s</a> demo of NetBeans in-place refactoring feature drew a couple oohs and ahs and even one f-bomb. <a href="http://blog.zenspider.com/archives/2006/10/heckle_another_rubyconf_hack.html">Heckle</a>, in time, should be an awesome tool as well. Big thanks to <a href="http://www.zenspider.com/">zenspider</a> for coordinating it. It’s destined to become an annual tradition. Perhaps the organizers of future RubyConfs could account for it in the budget?</p>
<p>On a lighter note, there were quite a few humorous moments that kept popping up. A <a href="http://ni.hili.st/posts/pages/16">summary may read like a list</a> of inside jokes, so here’s some context. <strong>THAT GUY</strong> is a reference to a disclaimer in <a href="/articles/2006/10/21/rubyconf-zed-shaw-fuzzing">Zed’s talk</a> about the <a href="http://perl.plover.com/yak/presentation/samples/slide027.html">know-it-all guy who always pipes up during your talk</a> with skepticism. THAT GUY kept getting called out during the rest of the conference. Ani, the developer evangelist from Microsoft was pretty thick-skinned. She was heckled constantly about MS, Vista, and everything else, and still kept a smile on her face. And of course you already watched Adam’s one-act play, right?</p>
<p>My note-taking streak wasn’t quite perfect; I didn’t take notes Kevin’s mkmf talk nor Rich’s talk about indi, and I slept in and missed Justin’s Streamlined talk. Also, the beer was flowing for RejectConf, and despite the quality summer of code talks, I was spent. Fortunately, you can fill in the blanks by following along with <a href="http://www.oreillynet.com/ruby/blog/2006/10/blogging_about_rubyconf_2006.html">Curt Hibbs</a> and the <a href="http://technorati.com/tags/rubyconf2006">rest of the blogosphere</a>. Thanks for tuning in, and I hope you got something worthwhile here. See you next year!</p>Nick Siegerurn:uuid:ec8eface-3fb9-477d-8ad8-e91e4c5c9a1d2006-10-21T19:01:35+00:002010-11-22T18:11:21+00:00RubyConf: Rinda in the Real World<p><em>Speaker: <a href="http://www.vanderburg.org/">Glenn Vanderburg</a></em></p>
<p>Rinda is a distributed coordination system, by Masatoshi SEKI, based on work by David Gelernter (called Linda). It’s similar to JavaSpaces, but more in the Ruby spirit. It uses DRb for communication (also by Seki-san).</p>
<p>There are several existing tutorials on Rinda, but none with a broad, real-world applicability. As Glenn started to go deeper with Rinda, flaws began to be exposed.</p>
<h2>Rinda Basics</h2>
<ul>
<li>The <strong>TupleSpace</strong> is in the conceptual middle, as a bag of tuples “arrays”. Participants can write tuples into the space, or take them out (usually according to a set of conditions).</li>
<li><strong>Tuples</strong> are usually requests to do some work by some unknown requester, or responses to that work.</li>
<li>A <strong>RingServer</strong> is a broadcast/multicast lookup service for finding Rinda tuplespaces.</li>
<li><strong>Templates</strong> are used to find tuples to take. <code>Template#match</code> requires that the tuples have the same length, and that all the non-nil elements are triple-equal (<code>===</code>).</li>
<li>In practice arrays are always used in the <code>#take</code> and <code>#write</code> methods, and they’re implicitly converted to the appropriate object.</li>
</ul>
<h2>Protocol design</h2>
<p>When you’re deciding what to store/read in the tuples, you’re essentially designing a communication protocol. So you need to take the extra precautions required as you would when designing any API or protocol, including documentation, evolution of changes, process workflow, etc.</p>
<ul>
<li><em>Parts of tuples:</em> command/request, identifiers, and associated parameters/data. Usually templates will match on the command, sometimes on the ID, but never on the data. </li>
<li>Strings work well in tuples, because you can use Regexps to select them.</li>
<li>Numbers work well, because you can match them with Ranges</li>
<li>Symbols don’t work so well (at least until <a href="http://redhanded.hobix.com/inspect/SymbolIs_aString.html"><code>Symbol < String</code></a>)</li>
<li>Communication patterns -- synchronous communication is not a good fit for a Rinda architecture (e.g., a request for status)</li>
</ul>
<h2>Deployment</h2>
<p>DRb does not marshal code/behavior (unlike Java and RMI). This is a limitation that forces you to consider how to use custom objects in the tuples, because the code must be shared (and thus jointly upgraded) across all participants.</p>
<p>Multiple processes are probably more reliable for the various components of the architecture (RingServer, TupleSpace, clients) rather than using green threads, although this is just a hypothesis.</p>
<p>The TupleSpace is the single point of failure -- if the process with it crashes, when it starts back up, it’s likely to have a new DRb URL, so it’s helpful to have a proxy around the tuple space in clients that can rediscover it if it crashes.</p>
<p>Be wary of multiple ring servers on the same subnet! Behavior may be unexpected. You may notbe using the tuple space that you wanted, and when the other ring server goes away, so does your tuple space.</p>
<p>DRb does not have any security built into it, such as unforgeable object IDs, encrypted transport, authentication, etc. This can be a problem in some situations.</p>
<p>There is no persistence by default, so consider adding some for crash resistance, or deal with occasional loss of tuples.</p>
<p>There are no transactions, so the requester will never know if it still processing or was lost.</p>
<p>As Ruby matures and gains exposure, some libraries that have been good enough for a while may need reconsideration. As a case in point, Rinda and DRb haven’t been updated since February of 2004.</p>
<h2>Q & A</h2>
<p><em>Q. Are write/take atomic?</em> Yes, if you timeout, the tuple will still be there. Two workers cannot get the same tuple.</p>
<p><em>Q. Where would you use this instead of traditional message queues (reinvent the wheel)?</em> There’s more flexibility in this architecture. (Justin Gehtland) In this particular case, they have a JMS backend, but the Ruby code could not assume connectivity to that backend.</p>
<p><em>Q. Is there a common correlator design pattern?</em> Tie response types to request types to limit the pool of potential matches. In the situation where there is a single requester, it’s simple to just generate sequential numbers. In a P2P situation, you may need to use a hostname or PID to help distinguish. [Sounds like a GUID/UUID system to me.]</p>
<p><em>Q. Have you used expiry dates to grab abandoned tuples?</em> No, sounds like an interesting possibility.</p>Nick Siegerurn:uuid:b565842e-e6dc-4ddf-bc06-69de35a908702006-10-23T14:16:00+00:002010-11-22T18:11:21+00:00RubyConf: Your Ruby in My CLR<p><strong>John Lam</strong> wanted to build a photo-flash-card application using Avalon and Indigo and Flickr, but also using Ruby as the implementation language. So along the way he decided to build an interop layer (a bridge) between Ruby and the CLR to do it.</p>
<p>Now that John has <a href="http://www.iunknown.com/articles/2006/10/20/dynamic-languages-microsoft-and-me">joined Microsoft</a>, his new mission (bigger picture) is to further dynamic language implementations on the CLR.</p>
<h2>Bridging type systems</h2>
<ul>
<li><p>Dynamic methods in the CLR allow you to do better than simply invoking the reflection API.</p>
<pre><code>Ruby | C | CLR
============================================
shadow class | dynamic method | instance
</code></pre></li>
<li><p>Polymorphic inline caching -- caching method dispatches on different call sites based on the assumption that types don’t change that often</p></li>
<li>Generate shadow classes and method stubs using <code>const_missing</code> and <code>method_missing</code></li>
<li>Overload resolution happens in the method shims (a one time cost) to choose, e.g., which constructor to use for <code>System::Collections::ArrayList.new</code></li>
<li>Integration is done to make the CLR feel more Rubyish</li>
</ul>
<h2>Implementation</h2>
<ul>
<li><p>This changes identity (proxied object):</p>
<pre><code>ArrayList.new.as(IEnumerable)
</code></pre></li>
<li><p>This is less Rubyish, but identity is preserved:</p>
<pre><code>IEnumerable.get_enumerator(ArrayList.new)
</code></pre></li>
</ul>
<p>There are trade-offs and warts to a bridge approach to Ruby integration on top of a platform such as the CLR: there is a need to inject artificial type information occasionally to be able to construct CLR objects (e.g., arrays -- <code>Array.of(Int32).new(3)</code>). Generics are evil! Simple stuff doesn’t seem so bad: <code>List.of(Int32).new</code>, but there’s more pain to be had (see John for details). John also built a RubyInline-like implementation for the CLR languages too, to allow for getting things done (even if it’s dirty). Finally, method overloading is a problem, especially when there is no equivalent Ruby type -- this gave way to <code>instance_shim</code> which is a sort of aliasing method that mixes in type metadata for use by the interop layer.</p>
<p>On the other hand, there are many places where Ruby (even in bridged mode) can make the experience of developing on the CLR better. Implementing CLR interfaces is a feature that allows Ruby objects to cross to the CLR side, (e.g., adding IEnumerable to Ruby Array). Performance across the CLR boundary (marshalling data) is ~100 times slower than C#, but still fast (3 million calls/second). Huge benefits are gained from using DSLs in Ruby to help with the implementation of the interop layer. Also, RubyCLR allows mixing in methods into CLR types, so we can re-skin APIs that feel clunky in Ruby. This is really leveraging the power of Ruby in the best possible way.</p>
<p>My take is that it looks like the RubyCLR project will probably not be seeing much further development, unless John finds a willing maintainer -- but this is speculation, I haven’t confirmed with John. Yet, the problem of impedance matching between type systems is a recurring theme in the dynamic language arena, and so John’s work is valuable in helping us to understand this issue.</p>
<h2>More Info</h2>
<ul>
<li><a href="http://www.rubyclr.com/">http://www.rubyclr.com/</a></li>
<li><a href="http://www.iunknown.com/">http://www.iunknown.com/</a></li>
</ul>Nick Siegerurn:uuid:0de6115d-57e6-482e-9c45-964a94088b5b2006-10-20T19:04:00+00:002010-11-22T18:11:21+00:00RubyConf 2006 Begins<p>The RubyConf room is filling up this morning. I’ll be doing my best to live-blog the conference here so stay tuned!</p>
<p><a href="http://www.flickr.com/photos/nicksieger/274770531/" title="Photo Sharing"><img src="http://static.flickr.com/110/274770531_01f9ba4a44_m.jpg" width="240" height="160" alt="DSCF4909.JPG" /></a></p>
<p><a href="http://www.flickr.com/photos/nicksieger/274770462/" title="Photo Sharing"><img src="http://static.flickr.com/79/274770462_957803fcd8_m.jpg" width="240" height="160" alt="DSCF4908.JPG" /></a></p>Nick Siegerurn:uuid:ef58cdca-f7a4-49f2-b428-968f05a581302006-10-20T19:06:00+00:002010-11-22T18:11:22+00:00RubyConf: History of Ruby<p>Takahashi-san is here to present on the history of Ruby, an apparently thankless task, because none of the other original Rubyists are
historians. Takahashi is the co-author of two Japanese books on Ruby, <em>Enjoy Ruby</em> and <em>Ruby Recipe Book</em>. He also has the “Takahashi
method” of presentation named after him. His talk presented an informative timeline of Ruby, the details of which were a bit tricky to
capture. If I transcribed anything erroneously, please let me know.</p>
<h2>Pre-history age</h2>
<ul>
<li>Born 24th of February 1993. Without code! </li>
<li>Matz and Keiju-san proposed the name first.</li>
<li>Thus one of the philosophies of Ruby came to be -- that the name of things matters. Matz: “I guess Ruby is cool”. Keiju: “I also like
coral”. Matz: “oops”.</li>
</ul>
<h2>Ancient age</h2>
<ul>
<li>Ruby is in public -- release 21 December 1995 -- ruby-0.95.</li>
<li>ruby-list ML was launched. First mail: ruby-0.95 test failed. Subsequently 3 versions of Ruby were released in two days.</li>
<li>No CVS repository at the time. Anonymous CVS was to come in 1999.</li>
<li>25 December 1996 -- Ruby 1.0 released.</li>
<li>1 July 1997: Matz announces that Netlab hired him to be a full-time Ruby developer.</li>
<li>22 Septempber 1997: an article was published on Ruby -- the first article on the web about Ruby.</li>
<li>15 May 1998: RAA launched, maintained manually by Matz.</li>
<li>7 December 1998: Ruby home page was in English, but very simple.</li>
</ul>
<h2>Middle</h2>
<ul>
<li>Ruby is spreading in Japan during this time. The community is growing around Japanese programming language designers and programmers
who do not understand English. Finally they have a tool that they can embrace and establish their own opinions and choices.</li>
<li>27 October 1999: Matz and Keiju’s book is published, the first Ruby book</li>
<li>More Ruby books would follow in 2001-2002 (~20 books -- a bubble). But the bubble popped in 2003.</li>
<li>4 November 1999: Ruby workshop</li>
<li>There were some Perl and Ruby/Perl conferences during this time also.</li>
<li>26 May 2001: YARPC -- Yet Another Ruby and Perl Conference</li>
<li>9 August 2003: Lightweight language (LL) -- lightweight language workshop (LL Saturday) in 2003. PHP, Perl, Ruby and Python were
present. LL Weekend, LL Day and Night, and LL Ring would follow in 2004-2006.</li>
<li>LL Ring: 300 attendees talking about LLs in a real boxing ring.</li>
</ul>
<h2>Modern</h2>
<ul>
<li>Ruby spreads outside of Japan</li>
<li>16 Feb 2002 -- ruby-talk ML surpasses ruby-list ML. </li>
<li>ruby-talk was started in December of 1998, but the first posts are almost all Japanese authors writing in English.</li>
<li>SunWorld in Februrary 1999 has an article entitled “New choices for scripting” including Ruby.</li>
<li>February 2000: IBM Developerworks article on the “latest open source gem from Japan”.</li>
<li>InformIT article by Matz also in 2000.</li>
<li>15 December 2001: Programming Ruby by the Pragprogs (1st edition of the Pickaxe).</li>
<li>RubyConf.new(2001)</li>
<li>Ruby Kaigi -- first Japanese Ruby conference didn’t happen until 2006, it turns out only because of a dinner of Japanese rubyists at
RubyConf 2005 decided that it would be fun.</li>
</ul>
<h2>Contemporary</h2>
<ul>
<li>Rails age -- the killer application for Ruby</li>
<li>We all know what happened, so we’ll skip this part.</li>
</ul>