Joben.Rara.blogs(".NET")

There are two ways to write error-free programs; only the third one works.

May 2007 - Posts

DLR on Mono

Hey Cruizer, DLR is now on Mono. Smile

It’s now official. Thanks to Zoltan Varga’s recent check-in to SVN, Mono now successfully runs IronPython 2.0A1/DLR,


[mdavid@domU-12-31-37-00-03-10 Debug]$ mono -V
Mono JIT compiler version 1.2.4 (/trunk/ r77478)
Copyright (C) 2002-2007 Novell, Inc and Contributors. www.mono-project.com
        TLS:           __thread
        GC:            Included Boehm (with typed GC)
        SIGSEGV:       normal
        Architecture:  x86
        Disabled:      none
[mdavid@domU-12-31-37-00-03-10 Debug]$ mono ipy.exe IronPython console: IronPython 2.0A1 (2.0.10427.02) on .NET 2.0.50727.42 
Copyright (c) Microsoft Corporation. All rights reserved.
>>>
[Mono:DLR] Hello, Dynamic Language Runtime-enabled World!
 
Name game on SilverLight

Cruizer has a point, "SilverLight" really does sound like a play on "Flash". I never thought of it that way. I guess I'm losing my sense of fun. ~Groovy

Names aside, I think looking at SilverLight just from a "Flash" angle is missing the exciting stuff. I'm not too pumped up about having another "media player" or animation engine. (That is a topic for a different post) 

What I'm really excited about is its support for dynamic languages. To think that they could shrink the .NET runtime to around 4MB and still have it support a lot of useful namespaces is amazing.

Looking at the VB Team's blog on SilverLight support for "VBx", the runtime would support some generic collections (List & Dictionary) and even LINQ over objects while still including most of the "well-loved" VB functions. I think they have really done well in shipping out a well-factored .NET framework including "Microsoft.VisualBasic.dll"

I'm not a VB guy and I'm experiencing "DLR envy" as I code in C#. So I'm really looking forward to IronRuby. I've never really played with IronPython (What about Boo?). Nothing against VB/Python, it's just personal preference and a personal sense of "nice code".

Posted: 05-17-2007 4:09 AM by velocity | with 1 comment(s)
Filed under: ,
How Did We Come Up With Silverlight?

Read the different names they were considering before settling on Silverlight.

This is amusing. You can clearly see "geek" written all over with some smart ass ones. I seriously think MS needs a shot of "cool". Silverlight is ... well... just alright.

Link to Tim Sneath : How Did We Come Up With Silverlight?

Posted: 05-16-2007 12:49 PM by velocity | with 1 comment(s)
Filed under: ,
"Clean up sources before packing them" by SBC Packers

I recently did a walkthrough of the Web Service Software Factory for a group of developers. They are considering its use for their Web Services development. I used the accompanying Hands-On-Lab for the exercise and made some minor modifications to make it "fit" their current environment.

After the walkthrough, I needed to send them a copy of the HOL including the changes I made. That should be easy enough, right? Compress and Send. First, I need to delete all the \bin and \obj directories to keep the compressed file's size to a minimum. Problem is, there are about 10 exercises and each of the solution folder is about 3 levels deep in each exercise folder. I'm lazy so I need to find an easier way. I could have used "Clean Sources" but that would mean running away from a good challenge of doing the same thing using PowerShell [:-)].

Here's my PowerShell script for deleting the \bin and \obj directories under all those solution folders.

The canonical version

get-childitem * -recurse | where-object { $_.PSIsContainer -eq $true } | where-object { $_.Name -eq "bin" -or $_.
Name -eq "obj" } | foreach-object { remove-item -path $_.FullName -recurse -whatif }

This should read like this: "Get everything in this directory and its sub-directories. Select Items which are containers (a.k.a. directories). Select folders whose names are "bin" or "obj". For each folder, delete the folder and all the files/folders that it contains.

The "readable" version (using aliases)

dir * -recurse | where { $_.PSIsContainer -eq $true } | where { $_.Name -eq "bin" -or $_.Name -eq
"obj" } | foreach { remove-item -path $_.FullName -recurse -whatif }

BTW, remove the -whatif in the end if you actually want the command to execute. Keeping the -whatif in allows you to "see" what would happen without actually executing the command.

Groove to Snap's I've got the Power [;-)] Man, I'm really showing my age.

Posted: 05-15-2007 5:43 PM by velocity | with 3 comment(s)
Filed under:
PowerShell Links Roundup

Link #1

Scott Hanselman writes about a Reflector add-in that outputs PowerShell Code

The one I've been messing with for the last few weeks is the PowerShell Language Add-in. Reflector can "decompile" (not the correct word) the IL within an assembly and show you the "intent" of that IL in any number of languages like C#, VB, Delphi, etc. Daniel "kzu" Cazzulino has created a PowerShell Language Add-in that, for the most part, shows you what the code would look like in PowerShell.

Reflector Addins and PowerShell Language Support for Reflector

Link #2

Editing PowerShell scripts - Syntax files for PowerShell

Jon Galloway has PowerShell Language Definitions for Notepad++

Peter Provost gives us Windows PowerShell Syntax File for vim

Posted: 05-15-2007 4:36 PM by velocity | with no comments
Filed under:
Silverlight surfing

Pardon the silver surfer tagline, I just watched the FF trailer, and as Johnny would say "That is so cool".

Over the last week, there have been a flurry of activities in the blogspace surrounding Microsoft's announcement on MIX. John Lam tries to come up with a way to organize all the different things being said about Silverlight and what it means to all developers.

Some highlights are:

- IronRuby is coming.

- VBx anyone?

- DLR and Iron Python/Ruby are being released under the Microsoft Permissive License (a.k.a Open Source). So Mono can just pick it up and use it without the need to re-implement anything under Mono.

All in all, I think this brings about more options/choices for developers on any side of the fence. 

Link to John Lam on Software

 

del.icio.us tags: , ,
Posted: 05-07-2007 4:10 AM by velocity | with no comments
Filed under: , , ,
CLR meets DLR...the future is dynamic.

Jim Hugunin of IronPython fame announced at the MIX conference the DLR (Dynamic Language Runtime). While IronPython demonstrates how good the support for dynamic languages are today in the CLR, the

"new Dynamic Language Runtime (DLR) adds a small set of key features to the CLR to make it dramatically better.  It adds to the platform a set of services designed explicitly for the needs of dynamic languages.  These include a shared dynamic type system, standard hosting model and support to make it easy to generate fast dynamic code." 

"these features enable all of the dynamic languages which use the DLR to freely share code with other dynamic languages as well as with the existing powerful static languages on the platform such as VB.NET and C#."

The first four languages include Python, Ruby (sweet Smile), JavaScript, & Visual Basic. Silverlight will include support for these languages so for browser based applications, you will now have the chance to use your favorite language (like Ruby) in client side programming. Silverlight 1.1 Alpha already supports Python. See this "Getting Started" guide.

Would you like to see the bits? It's part of the IronPython package which you can download from codeplex.

Link to Jim Hugunin's Thinking Dynamic