20 Apr '12, 3pm

@joncanady LMGTFY!

Chuck Vose's comment made me realize that the universal extprot message decoder can be simplified considerably if I simply deserialize the data and let Ruby do the pretty-printing for me (#inspect). I now have a 120 LoC universal decoder that can deserialize any message (without the original protocol definition), and can exchange data between OCaml and Ruby, the first extprot targets. But before I come to that, some clarifications on Ruby's Marshal vs. extprot are in order. What's the point? Why use extprot instead of Marshal.dump ? Marshal has been a core Ruby class forever. It is written in C, fairly fast (it's the fastest way to (de)serialize Ruby data, at any rate), and convenient to use: you just give it an object (nearly any object), and you get a string. Give it a string, and your object's back. Why would anybody want to use anything else? In fact, there are a few r...

Full article: http://eigenclass.org/R2/writings/extprot-vs-ruby-marshal

Tweets

sudo su - - Yaml, Psych and Ruby 1.9.2-p180 - H...

pivotallabs.com 21 Apr '12, 4pm

As mentioned in yesterday's standup blog, my pair and I encountered some problems with YAML parsing over the last few days...

というわけで日本語版も書きました:「Ruby 1.9.3-p194リリース」

ruby-lang.org 20 Apr '12, 10am

Ruby 1.9.3-p194 がリリースされました。 このリリースはRubyGemsに対するセキュリティフィックスを含んでいます。これは、リモートレポジトリへのSSLサーバ検証についてのものです。それ以外にも、多くの修正が含まれています。 R...

seriously, try() isn't part of core ruby bc of ...

everydayrails.com 21 Apr '12, 6pm

lets you call methods on an object without having to worry about the possibility of that object being nil and thus raising...