Community developer blogs

Harry Pierson's DevHawk

Website
Author
Harry Pierson
Last updated
19 Jun 2009 at 03:39
Url
http://devhawk.net
Feed
http://devhawk.net/rss.aspx

Recent Posts

  • Add-Bcd-Vhd.ps1

    Posted: 19 Jun 2009 at 03:39

    I *LOVE* the new boot from VHD feature in Win7. I am primarily using it for doing some VS 2010 dogfooding without messing up my primary drive partition. But man, the process for setting up a VHD for booting is brutal. Scott Hanselman did a great job laying out the steps, but I wanted something a bit more productive. First, I created a clean Win7 RC VHD and zipped it up for easy storage. The basic Win7 RC VHD is just under 5GB, but compresses down to about 1.5GB with 7-zip.

  • __clrtype__ Metaclasses: Named Attribute Parameters

    Posted: 19 Jun 2009 at 00:09

    In my last post, I added support for custom attribute positional parameters . To finish things off, I need to add support for named parameters as well. Custom attributes support named parameters for public fields and settable properties. It works kind of like C# 3.0’s object initalizers. However, unlike object initalizers, the specific fields and properties to be set on a custom attribute as well as their values are passed to the CustomAttributeBuilder constructor.

  • __clrtype__ Metaclasses: Positional Attribute Parameters

    Posted: 18 Jun 2009 at 01:02

    The basic infrastructure for custom attributes in IronPython is in place, but it’s woefully limited. Specifically, it only works for custom attributes that don’t have parameters. Of course, most of the custom attributes that you’d really want to use require additional parameters, both the positional or named variety. Since positional parameters are easier, let’s start with them. Positional parameters get passed to the custom attribute’s constructor. As we saw

  • __clrtype__ Metaclasses: Simple Custom Attributes

    Posted: 16 Jun 2009 at 00:34

    I know it’s been a while since my last __clrtype__ post, but I was blocked on some bug fixes that shipped as part of IronPython 2.6 Beta 1. So now let’s start looking at one of the most requested IronPython features – custom attributes! Over the course of the next three blog posts, I’m going to build out a mechanism for specifying custom attributes on the CLR type we’re generating via __clrtype__. All the various Builder classes in System.Reflection.Emit support

  • Strengthening the Microsoft Ecosystem with Source Code

    Posted: 04 Jun 2009 at 06:17

    Today was the Presentation Idol competition I blogged about a couple of weeks ago. Unfortunately, I didn’t win - but believe me when I say I was up against some serious competition. I think I was about in the middle of the pack – better than some but clearly not as good as others. Since I made a big deal about asking for people ideas on how to present my topic of choice – external contributions to Microsoft Open Source projects – I decided I’d post my deck and my script.

  • A Somewhat Scary Birthday

    Posted: 23 May 2009 at 03:23

    Yesterday was my 39th birthday. Among other things I got a vasovagal syncope (aka I fainted), a trip to the hospital and an MRI. Yeah, I’ve had better birthdays. But I’m feeling much better now. Since Monday, I’ve been having weird numbness and tingling in my hands, feet and midsection. Ever have your foot fall asleep? You know how it feels when your foot wakes up again? It’s kinda like that. After three days of that, I decided it was time to go see the doctor.

  • IronPython 2.6 Beta 1

    Posted: 21 May 2009 at 07:30

    In addition to the IronPython CTP for .NET Framework 4.0 Beta 1 I blogged about earlier, we also released the first beta of IronPython 2.6 today. How about that – two IronPython releases in one day! This is our second preview release as we work towards our 2.6 RTM in September. 2.6 Alpha 1 was released back in March. There are two big new features in this release. The first is our implementation of the ctypes module. The ctypes module is like P/Invoke for Python.

  • IronPython 2.6 CTP for .NET 4.0 Beta 1

    Posted: 21 May 2009 at 01:54

    The .NET Framework 4.0 and Visual Studio 2010 Beta 1 is now generally available for download. Jason Zander has a very thorough rundown on some of the new features in this release. Of course, my favorite new features in VS2010 is the new dynamic language support in C# and Visual Basic, which let’s you easily call out to IronPython code from those languages. For anyone who wants to experiment with interoperating C# or VB with IronPython, we released IronPython 2.6 CTP for .NET 4.

  • Microsoft and Open Source

    Posted: 19 May 2009 at 04:23

    In a couple of weeks, I‘m participating in an internal “Presentation Idol”competition. It’s a contest of presentation skills against impressive competition (I can’t name names, but rest assured it’s a strong group) being judged by Microsoft executives (again, I can’t name names, but this time it’s because I don’t know who’s judging) in front of what I assume will be a large technical internal Microsoft audience. To

  • Checkin Comments for IronPython Source

    Posted: 08 May 2009 at 01:19

    We’ve been slowly but surely increasing the frequency of IronPython source drops. When I joined the team last April, we we only pushing the source about twice a month (sometimes only once a month). By last July, we were pushing source about once a week. Since mid-January, we’ve pushed out the latest source 131 times, which comes to about once a day on average since the start of the year. Big kudos to Dave Fugate, who’s primarily responsible for improving the frequency of our source code dr

  • Happy Birthday Riley!

    Posted: 06 May 2009 at 10:29

    Today is my daughter Rileyanne’s fourth birthday. She was born on 5-5-05 (at 5:25pm no less!). Jules and I were picking out pictures for Riley’s “birthday ribbon” and we came across this one from her birthday party weekend before last. We had it a week early because my mother-in-law had surgery on her foot last week. It was a girls-only princess tea party, so I didn’t get to see her chasing bubbles in person. I loved this picture, but we ended up using one where you could see her face

  • “The Save”

    Posted: 03 May 2009 at 23:52

    This is an amazing picture of an amazing save in yesterday’s Capitals/Penguins 3-2 nail biting victory. (video on YouTube) The goalie is Simeon Varlamov who played most of the season at Hershey for the Capital’s minor league team. But he got the call in game two of the Caps opening round series against the Rangers and has posted a 1.5 Goals Against Average since, including two shutouts. Photo by Clyde Caplan. Used under a Creative Commons license.

  • Updated Powershell Scripts

    Posted: 30 Apr 2009 at 02:25

    For those who are interested, I just uploaded a bunch of changes to the PowerShell Scripts folder on my SkyDrive. Feel free to download them and use them as you need. find-to-set-alias – Brad Wilson enhanced this function significantly and broke it out into it’s own script. I had a small issue with his version where the folder search may only return a single value, so you can’t treat it like collection. My version wraps that command in @(…) so that you can always treat it like a colle

  • __clrtype__ Metaclasses Demo: Silverlight Databinding

    Posted: 25 Apr 2009 at 04:27

    I’ve gotten to the point where I can actually demo something interesting with __clrtype__ metaclasses: Silverlight Databinding. This is a trivial sample, data binding a list of Products (aka the sample class I’ve been using all week) to a list box. But according to Jimmy, this is something he gets asked about on a regular basis and there’s a AgDLR bug open for this. The __clrtype__ feature is specific to IronPython but I bet the IronRuby guys could implement something similar if they wante

  • __clrtype__ Metaclasses: Adding CLR Properties

    Posted: 25 Apr 2009 at 03:47

    When I was first experimenting with __clrtype__, I got to the point of making CLR fields work and then immediately tried to do some data binding with Silverlight. Didn’t work. Turns out Silverlight can only data bind against properties – fields aren’t supported. So now let’s add basic property support to ClrTypeMetaclass. Python has a rich mechanism for defining properties, but hooking that up requires DLR binders so for now I’m going to generate properties that are simple wrappers around

  • __clrtype__ Metaclasses: Adding CLR Fields

    Posted: 24 Apr 2009 at 01:30

    Now that we have the basic __clrtype__ metaclass infrastructure in place, let’s enhance it to add support for CLR fields. To do this, we’re going to need to add two things to our custom CLR type. First, we need to define the fields themselves. Second, we need to make sure that Python code will read and writes to the statically typed fields for the specified names rather than the storing them in the object dictionary as usual. Here’s the updated version of ClrTypeMetaclass (or you can get i

  • __clrtype__ Metaclasses: Customizing the Type Name

    Posted: 23 Apr 2009 at 02:51

    Now that we know a little about how IronPython uses CLR types under the hood, let’s start customizing those types. In a nutshell, __clrtype__ metaclasses are metaclasses that implement a function named __clrtype__ that takes the Python class definition as a parameter and returns a System.Type. IronPython will then use the returned Type  as the underlying CLR type whenever you create an instance of the Python class. Technically, you could emit whatever custom CL

  • Links for 2009-04-21 [del.icio.us]

    Posted: 22 Apr 2009 at 14:00

    43 Folders : Inbox Zero These are posts from a special 43 Folders series looking at the skills, tools, and attitude needed to empty your email inbox — and then keep it that way.

  • __clrtype__ Metaclasses: IronPython Classes Under the Hood

    Posted: 22 Apr 2009 at 00:59

    Before we start using __clrtype__ metaclasses, we need to understand a bit about how IronPython maps between CLR types and Python classes. IronPython doesn’t support Reflection based APIs or custom attributes today because IronPython doesn’t emit a custom CLR types for every Python class. Instead, it typically shares a single CLR type across many Python classes. For example, all three of these Python classes share a single underlying CLR type. class shop(object):  pass  class cheese

  • The Lounge Survey

    Posted: 21 Apr 2009 at 00:31

    I just joined The Lounge advertising network so I wanted to pass along an opportunity to win a bunch of great technical books. The Lounge is asking the readers of the blogs in their network to fill out a survey in order for them to improve how they target their advertising. It’s pretty much what you would expect from an advertising network focused on the .NET development platform: what language(s) do you use, what framework(s), what testing tool(s), etc, etc, etc. Takes like three min

AddThis

We'd love to hear what you think! Submit ideas or give us feedback