DLR Resources & Jobs

I’m back home from PyCon, but between digging out my inbox, finishing transition reports and doing my mid-year career discussion I’m a little busy. But I did want to point at a couple of recent posts from the IPy team blog:

Morning Coffee 157

  • My Xbox 360 started flashing the dreaded Red Ring of Death on Friday. <sigh> I’m not going to have much time to play in the next week, so it’s not the end of the universe, but I did have to dig an old DVD player out of the garage for interim duty.
  • My Caps really stepped in it over the weekend dropping two games they had to have and by most reports (aka according to my dad) that they dominated most of the way. Caps Playoff Math isn’t as dire as say Clinton’s Nomination Math, but they are three games back of the Hurricanes with twelve to play.
  • Ted Neward has a pretty good F# overview article in the most recent MSDN Magazine. I say pretty good because I wonder if someone with no functional programming experience will “get it”. As much as I like F# and functional programming, I think some of the basic concepts don’t pass Don Box’s two beer test.
  • Speaking of Ted, somehow his feed fell off my radar (bad DevHawk!) and I missed several great posts like Modular Toolchains (note to Ted, check out A Research C# Compiler), Why we need both static and dynamic in the same language (note to self, check out Cobra) and The Fallacies Remain…. (recently, I’m the guy shouting about risks).
  • Speaking of MSDN Magazine, have you seen their new site redesign? I can’t find any announcement of it, but man the site looks great.
  • If you missed MIX, the sessions are all online already. That was fast.
  • John Lam blogs about the availability of the Dynamic Silverlight bits. Apparently, Dynamic Silverlight includes more recent bits than the Silverlight 2 SDK, which does includes binaries and tools for IronPython, IronRuby and Managed JScript (quickstart). So you can get started with dynamic languages on Silverlight using the SL SDK alone, but I expect that the Dynamic Silverlight bits will be updated more regularly than the SDK.

Play Ball Script in F#

Scott Hanselman wanted an F# version of this Play Ball! round-robin scheduling PowerShell script. Here’s what I came up with:

let randomize list =
    let random = new System.Random()
    let list'=  
        list  
        |> List.map (fun i -> (random.Next(), i))
        |> List.sort (fun (i1,_) (i2,_) -> Int32.compare i1 i2)  
    let (_,list'') = List.unzip list'
    list''

let rec makeGames teams =
    match teams with
    | first :: rest ->
        [for team in rest -> (first, team)] @ (makeGames rest)
    | [] ->  []

let teams = ['a'..'f']
let games = teams |> makeGames |> randomize

MakeGames uses pattern matching to see if the list of teams is empty or not. If the list is empty, we simply return an empty list of games. If not, we use F#’s list comprehension syntax to generate a list of games between the first team in the list and each of the remaining teams. This list is combined (via the ‘@’ operator) with the results of calling makeGames recursively. This generates the un-randomized list of games.

Once we have the list of games, we need to randomize it. I ported the randomize function above over from a version I found in Erlang. Basically, it attaches a random number to each element in the list to be randomized, sorts by those randomly generated numbers, then throws the numbers away and returns the just the randomized list. Note, the Erlang version I referenced runs randomize log(length of list) times to ensure a fair shuffle, but I thought once would be enough for this simple script.

(Note to F# team: perhaps List.randomize should be a part of the standard F# library?)

Morning Coffee 149

Morning Coffee 146

  • The writers strike is officially over. Everyone goes back to work today. Thomas Cleaver has what I thought was the best post summarizing how the writers won. TV Guide has a rundown of how and when various shows will resume. I can’t wait to see Daily Show and Colbert Report tonight. Lost – aka the best show on TV – looks like it will be getting five more episodes (in addition to the eight shot before the strike).
  • Speaking of TV, Battlestar Galactica Fans: circle April 4th on your calendar.
  • Obama won all three “Potomac Primaries” yesterday, and is now the Democratic front-runner, though there’s a long way to go before the convention. Scott Adams of Dilbert fame has a great take on presidential experience – I’m guessing he’s an Obama fan.
  • In minor acquisition news, Microsoft is acquiring Caligari, makers of 3D modeling tool trueSpace. The Caligari folks are joining the Virtual Earth team, though I wonder what the XNA folks think of the acquisition. This isn’t the first 3D modeling product Microsoft ever acquired – we owned Softimage for four years in the ’90s.
  • Scott Hanselman and Tomas Resprepo both write about PowerShellPlus, which I saw week before last @ Lang.NET. Scott really likes it, for both PS novices and gurus, but Tomas thinks the UI is busy, based on the screenshots. Personally, I’m not doing much PS work lately – occasional one off stuff, but that’s it – so it doesn’t seem worth the effort.
  • Speaking of Scott & Tomas, Scott also has a nice gallery of VS themes. I’m partial to Tomas’ Ragnarok Grey. Is there a VSThemesGallery.com site somewhere?
  • Still speaking of Scott, he points to the new ASP.NET Developer Wiki (beta). I poked around, but didn’t find anything shiny. I was very surprised that searching for “MVC” returned no results.
  • Speaking of MVC, Scott Guthrie has a rundown on what’s coming in the MIX preview release of ASP.NET MVC. Biggest news IMO is that it’s /bin deployable – i.e. you don’t need your hoster to do anything special to support MVC (assuming they already support ASP.NET 3.5). Also big news, they’re releasing the source so you can build and patch (and enhance?) it yourself.
  • Chris Taveres continues is ObjectBuilder series and Tomas continues is DLR Notes series. BTW, my F# based DLR experimentation continues, albeit slowly (frakking day job). Hope to be able to post on this soon.
  • One of the things driving my interest in F# is manycore. An interesting tangent to manycore is general purpose programming on graphics processing units (aka GPGPU). MS Research just released a new version of Accelerator, just such a GPGPU system. I personally haven’t played with it – I’ve been focused on writing parsers, not parallel code.
  • Is XQuery really “a promising technology of the future” as Don Box suggests? I see exactly zero demand or use for it in my day-to-day work. Of course, Don’s paid to build future platform goo, so maybe it is promising and Don’s afore-mentioned goo will leverage it, though I remain skeptical. As for XML being “Done like a well-cooked steak”, I’d say XML is like a great steak cooked perfectly, except it’s done exactly how you don’t like it. You can appreciate its quality, but you don’t really enjoy it as much as you could have.