« April 2006 | Main | June 2006 »

May 2006

May 30, 2006

REPL goodness

I just found Brian Beckman’s blog who’s doing some really amazing things with Visual Basic.

I just read his Got REPL post and I absolutely loved it. One interesting observation was how folks in their Compiler Dev Lab audience thought that F# was the best dynamic language because it was demonstrated REPL-style.

So perhaps REPL style programming is even more important than dynamic typing when it comes down to productivity.

I’ve been doing a lot of thinking recently about REPL style programming environments and I hope to be able to share that thinking (well, really the implementation that resulted from that thinking) with y’all soon.

RubyCLR is going to Microsoft

Well … maybe not the way you might have thought :)

Erik Meijer just informed me that my talk has been accepted at the Lang .NET 2006 workshop that will be held at Microsoft’s campus in August.

In a conference where talks will be given by

  • Miguel de Icaza
  • Gilad Bracha
  • Shriram Krishnamurthi
  • Anders Hejlsberg,
  • Paul Vick
  • Jim Hugunin

I’m pretty sure that I’ll be the dumbest guy in the room. But then again, that’s the only way that you can grow.

Google Gapminder

From Google, perhaps the nicest data visualization software that I’ve seen. Gapminder is a tool that lets you view economic indicators from countries around the world over a period of time (1975 to 2004). You’ll get a chance to see where you are in the world, and some idea of the magnitude of what we collectively need to do to help get everyone else over the gap.

You have to see it for yourself – very clever usage of area to convey size, all contained within a very attractive Flash user interface.

May 29, 2006

Right click on MacBook Pro

The folks over at the OSX86 project have figured out how to enable right click on the MacBook Pro. It uses the same mechanism that the two finger scroll feature uses (if you haven’t done this on your MacBook Pro try it out!). So if you put two fingers on your trackpad and hit the button you’ll get a right-click. This makes life much easier when running Parallels. The CTRL-SHIFT click procedure in the RC was a major step backwards.

Here’s a direct link to the download.

Here’s a link to the forum thread.

May 27, 2006

Powerpoint 2007 is unusable

Wow. They totally missed their performance targets. On two separate computers (a dual core Opteron 175 and a 1.83GHz Core Duo) Powerpoint 2007 is too slow to be usable. There is a noticeable lag while typing. And don’t even think about trying to sort slides.

I’m reverting to Powerpoint 2003.

Update: Seems to run fine under Vista Beta 2 (the Opteron Box) now. So it might be some kind of video related issue in Parallels. Running Powerpoint 2003 on Parallels is wicked fast, but Powerpoint 2007 runs like a dog still.

May 25, 2006

My VS Live! Keynote on the Future of Programming Languages is now live

Apparently VS Live! did record my keynote on the Future of Programming Languages in Toronto. You’ll need to register with FTP to watch it though.

May 24, 2006

New developments in Ruby to .NET integration

There are a couple of new projects in the Ruby / CLR space that I should point to:

1) Wilco Bauwer who’s working on IronRuby.

2) Pascal Hurni who’s working on Brite.

IronRuby looks pretty impressive. He has interface implementation and simple inheritance scenarios working. The interop cases seem to work pretty well.

There are a lot of corner cases to getting this stuff to work correctly though, and it’s very hard to match the semantics of the CLR implementation with the original language. It’s one thing to play semantic games at an interop boundary – it’s another thing altogether to play those same games in the language. To see just how nasty this can get, take a look at what the IronPython team had to do with respect to value type semantics.

I hope one of these guys succeeds in making this happen. Then I can move onto working on the project I really want to make happen – RubyCLR is merely a means to an end :)

Sometimes you just have to look at a problem from a different perspective

Or have someone else look at your problem from that perspective :)

Earlier today I blogged about the automatic boxing problem for value types in RubyCLR. I was looking at the problem from the perspective of boxing the value type. Seems logical, right? But it turned out to be totally the wrong way to approach it given the current implementation of the CLR.

A big thank-you goes out to Shri Borde of the CLR team at Microsoft for suggesting another way of looking at the problem: create a boxed value type and copy the value type to be marshaled into it. You can create a boxed value type via Activator.CreateInstance(Type) and then you can copy the value type blob using the cpblk instruction. RubyCLR already caches the size of value types using my sizeof hack so this is a very easy thing to do.

Script# - Does it make sense?

I just saw that Nikhil Kothari has posted his work on creating a C# to JavaScript compiler. This is quite similar to the Google Web Toolkit that I posted about earlier.

While I like some of the ideas about GWT and Script# – avoiding the context switch away from your primary programming language, it feels like the wrong thing to do. Rails RJS Templates is a superior solution because it avoids trying to map Ruby 1:1 to JavaScript. Instead it maps to Rails’ domain specific language for describing client-side / server interactions.

I wonder if it will help novice JavaScript developers though, and whether that help will be worth it. It steers them away from JavaScript and back towards C#, but they’re going to have to learn the semantics of the browser object model + add-on libraries in any event. Those semantics (not to mention most of the docs / samples they’re likely to find via Google) are going to mesh far better with JavaScript than with C#).

May 23, 2006

ATLAS Bridges Rock

ATLAS is the relative newcomer to the AJAX scene. I haven’t spent much time looking at the client side pieces, but I have taken a good look at the server side pieces.

The one feature that really stands out is the XML to JSON marshalers that ship in the box. ATLAS introduces a nice (well, as nice as you can get with XML) syntax for declaratively describing the mapping between a Web Service (REST and SOAP are both supported among others) and your JSON schema.

At the bottom of this blog is a simple example that I hacked up last night that shows mapping an Amazon Web Service to JSON.

The transform element describes the XPath mapping that shreds the XML document into JSON. It returns an array of objects that each contain a url property that points to the album cover art for the Artist passed in the Artist parameter.

The reason why I love this feature is that it’s just so natural to marshal data to browsers as JSON. It also nicely works around the ‘I can only talk to the origin server’ security restriction imposed by most browsers on XmlHttpRequest calls, since your origin server now acts as a proxy (or a bridge) to the web service that you want to call.

You can even cache results on your origin server if you add a cache directive to your bridge. Kudos to the ATLAS team for making this just work.

<bridge namespace="Test" className="Amazon" >
  <proxy type="Microsoft.Web.Services.BridgeRestProxy" 
         serviceUrl="http://webservices.amazon.com/onca/xml" />

  <method name="getAlbums">
    <input>
      <parameter name="Service" value="AWSECommerceService" serverOnly="true" />
      <parameter name="Version" value="2005-03-23" serverOnly="true" />
      <parameter name="Operation" value="ItemSearch" serverOnly="true" />
      <parameter name="SubscriptionId" value="your key goes here" serverOnly="true" />
      <parameter name="SearchIndex" value="Music" serverOnly="true" />
      <parameter name="Condition" value="All" serverOnly="true" />
      <parameter name="ResponseGroup" value="Images" serverOnly="true" />
      <parameter name="Artist" />
    </input>
    <transforms>
      <transform type="Microsoft.Web.Services.XPathBridgeTransformer">
        <data>
          <attribute name="selector" value="//a:Item" />
          <dictionary name="namespaceMapping">
            <item name="a" value="http://webservices.amazon.com/AWSECommerceService/2005-03-23" />
          </dictionary>
          <dictionary name="selectedNodes">
            <item name="url" value="a:SmallImage/a:URL" />
          </dictionary>
        </data>
      </transform>
    </transforms>
  </method>
</bridge>

Photos

  • www.flickr.com
    This is a Flickr badge showing public photos from John Lam. Make your own badge here.

Recent Comments

Recent Posts

May 2008

Sun Mon Tue Wed Thu Fri Sat
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
Blog powered by TypePad