IronPython, IronRuby Discussion with Jim Hugunin and Jon Lam

I’m dying because I’ve just had a long talk with two of Microsoft’s heavy hitters on the Dynamic Languages Runtime (DLR) team and have much to discuss, yet I am in a frenzy preparing for a business trip and cannot yet take the time to do the discussion any kind of justice.

The single-most important quote, I think, was the statement that “no one will take [our implementations] seriously until we can run– / We aren’t done until we can run–” [Django | Rails]. That was contrasted with important libraries that were heavily dependent themselves upon C-based libraries (Zope, in particular). It was also contrasted with libraries that rely on unusual language quirks or implementation details; the touchpoint on that was Ruby’s … shoot, I thought Lam said “objectspaces” but I don’t see that in the standard library … maybe he said “ObjectSpaces-like ability to traverse the entire in-memory object graph” (Anyone know what lib that would be?) … Anyway, the point was that this was an example of something that would be very difficult to implement within the constraints of the CLR.

I’ll update this entry when I can report in more detail…

Fuzzy Bits

Should array indices start at 0 or 1? My compromise of 0.5 was rejected without, I thought, proper consideration. (Stan Kelly-Bootle)

That quote, which I saw by way of Jeff Atwood’s latest, reminds me of what may be my favorite Stan Kelly-Bootle story. Stan worked on the EDSAC which stored memory using what were called “mercury delay lines” — long tubes of mercury, down which they would send an audio pulse, which would echo off the far end and return some brief amount of time later (thus useful as a rapidly-changeable datastore). Naturally, the resulting signal was pretty noisy, even in the best situations. So Stan and company had a cardboard ruler that they’d hold up to the oscilloscope — “Mmm… that’s a 1 … 0 … call it a 1 … ”

I always suspected that working with mercury might not have been entirely coincidental to Stan’s legendary wit.

I think my even-more favorite Stan Kelly-Bootle is from his 70th birthday party. He was in the corner of his garden, drinking Grey Goose from the bottle with a beautiful girl, 45-years his junior, on his lap and two more at either shoulder. Two fellows in tweed jackets straight from central casting were hunched at another table, single-handedly generating the nicotine and Guinness atmosphere of an English pub. “‘Ows ‘e do it?” Lamented one. The other leaned in, tapping the table significantly, “‘E’s got what yer call … charisma.” The other nods and despondently says “Charisma.”  He takes a long drink from his pint glass and summarizes what separates we mortals from the Stans of the world: “Ya’ can’t fucking fake charisma.”

I’ll Stand By You

It caught my eye that “I’ll Stand By You” by Carrie Underwood is the #2 single on iTunes. I clicked on the tune to hear the snippet (I won’t buy copy-protected music ever again, but I do like browsing…). Not to be harsh to Carrie Underwood, who has a lovely voice, but c’mon: covering Chrissie Hynde?

… at which point, Larry vapor-locks trying not to make a cheap joke about his adolescence…

… the larger point being that Chrissie Hynde is one of the great female singers, probably the best of the 80s. Admittedly, my list of top female vocalists is not exactly the American Idol pantheon (when are they going to give Patti Smith her due?) but no one can out-plaintive-yearn Chrissie Hynde. It’s like trying to out-ring-a-ding-ding Sinatra.

(As I wrote those last sentences, in perfect rebuke, Johnny Cash shuffled onto my playlist. OK: I would have paid huge money for Johnny Cash doing Hymn to Her.)

Matching Donations To Team Hanselman Fight Diabetes

There are lots of worthy causes out there to donate to, but it’s always nice to have a personal connection. Scott Hanselman, whose blog and podcast are must-reading/hearing, is fighting diabetes.

I’ll be matching donations to Team Hanselman up to … see now, never having done this before, I don’t know if I’m supposed to say the amount or keep it private or what … But anyway, contribute to Team Hanselman between May 9 and May 11, mention me or this blog and make me pay…

Creating DOS/Windows VM From MSDN Downloads?

My goal is to create a VM running Windows 3.11 (VMWare by preference, but Virtual PC if it’s easier).

One can download EN_MSDOS60.EXE and EN_WIN311.EXE from MSDN, but these files seem to simply be compressions of the files in the relevant distributions. Most challengingly, EN_MSDOS60.EXE uncompresses to ~6MB. I can make a bootable floppy (now that I just went out and bought a USB floppy drive), but I can’t put all of the files within the DOS distro on a single floppy. Searching for variations of “Install DOS” they all talk of the DOS setup disks. If I could get the file list for the DOS setup disks, I imagine that I could recreate them manually. Does anyone have that?

Or alternately, did I miss a downloadable, bootable CD-ROM image?

Or alternately, am I missing another way to accomplish my task?

Update: Looks to be a little harder than getting the right files on the floppy. My command prompts for important functions like fdisk and sys always result in “Incorrect DOS version”

Sun’s Fortress Language : Looks Very Well Designed

This is a rather daunting (124 slide) PDF on Sun’s “Fortress” programming language, designed in large part by Guy Steele, which is designed for scientific / mathematical programming. It looks really good — lots of good decisions (take advantage of Unicode, traits and objects, implict and explicit parallelism… well, actually, making parallelism the default for loops is a mistake…).

I do sometimes second-guess myself about whether concurrency is going to be a mainstream concern or whether taking advantage of 90% of your computer’s power (once you get to more than 10 cores) is going to be a niche problem. My gut tells me that mainstream programmers cannot ignore that much of a discrepency in performance; performance is always an issue and, even though the majority of performance problems are not CPU-bound, I just feel that no one will want to say “Yeah, it’s single-threaded” when the pointy-haired boss is looking for someone to blame for performance woes on a 16-core machine.

Found by way of James Governor

Thread Creation Overhead Can Trip Up Pros

 Michael Seuss has a good blog piece on parallelizing code that contains loop-carried dependenciess, which is to say, code such as the following, where the calculation in one pass is dependent on a previous pass’ calculation. The moral of the story, though, is that even when run to the point where the doubles start to overflow (i.e., at the upper limits of the code’s capability), the overhead of creating threads turns out to be an order of magnitude slower than the non-parallel version! (And this in code submitted by boffins on the OpenMP mailing list.)

This is a great example of why neither of the simplistic approaches to parallelization (“everything’s a future” or “let the programmer decide”) will ultimately prevail and how something akin to run-time optimization (a la HotSpot) will have to be used.

PLAIN TEXT

C:

  1. const double up = 1.1 ;

  2. double Sn=1000.0;

  3. double opt[N+1];

  4. int n;

  5. for (n=0; n<=N; ++n) {

  6.   opt[n] = Sn;

  7.   Sn *= up;

  8. }

Hidden Mysteries of the Bayesian Conspiracy

 Jeff Atwood recommends that everyone read an Intuitive Explanation of Bayesian Reasoning in order to become an initiate in the Bayesian conspiracy. What he doesn’t tell you is that Bayes’ theorem is only the outermost ring of the Bayesian Conspiracy. Once you’ve been initiated and spent the necessary apprenticeship bringing beer to the poobahs, you will begin to hear of something called “Bayesian Belief Networks”. They’re what all the Illuminati use. Is Jeff ignorant of Bayesian networks or is he — perhaps — all too knowledgeable and withholding information? If so, for what nefarious purpose?

Editor Harry McCracken (PC World) Resigns — Apparently Over Ad Pressure

According to this CNet article, Harry McCracken of PC World resigned when pressured by SVP Colin Crawford to tone down stories critical of advertisers. I have no idea of the inside scoop on this, and the CNet article is full of anonymous sources, but sadly, I can believe it.

I was never inappropriately pressured from the business side of the magazines, but I have learned that such autonomy is more unusual than not and I strongly suspect the Web has made things worse (everything is harder when journalism has been devalued, both literally and metaphorically).

If the story’s accurate, McCracken deserves a big tip o’ the hat.

Rails Forms With Auto-Hyperlink On FKs

Because I use primary_key_prefix_type = :table_name this did the trick for me. Basically, I just set up a hash mapping primary key column names (“InvoiceID” and the like) to the name of the appropriate controller (“invoice_admin”). When outputting a column, if the name of the column is contained in that hash, output a link. All I had to do was write a script to generate the hash and a template for the show.rhtml and Bob was my uncle…

 
# Methods added to this helper will be available to all templates in the application.
module ApplicationHelper
 
    #lazy initializer for mapping between the names of FK fields and the appropriate controller
    #:return: => nil
    def initialize_identity_columns
        @identityColumns = { 
      'InvoiceID' =>  'invoice_admin' 
      # ... etc ... 
    } 
    end
 
    #called within show.rhtml (probably) ala 
    # <% for column in LineItem.content_columns %>
    # <%= show_column_with_auto_hyperlink(@line_item, column) %>
    #<% end %>
    #:return: => String
    #:arg: currentObj => ActiveRecord::Base
    #:arg: column => ActiveRecord::ConnectionAdapters::Column
    def show_column_with_auto_hyperlink(currentObj, column)
      if @identityColumns == nil
        initialize_identity_columns()
      end
      html = "<p><b>#{column.human_name}:</b> #{currentObj.send(column.name)}&nbsp;"
      optionalLink = nil    
      if @identityColumns[column.name] != nil 
          html += link_to("Show", { :controller => @identityColumns[column.name], :action => "show", :id => currentObj.send(column.name) })
      end
      html += "</p>"
      return html
    end
end