Distributed Memory's Image
More about this blog
Latest Post
07 Mar 2010
Total Posts
53
Readers
783
Liked
0
Disliked
0
Views-Per-Post
14.77
vote up
0
vote down

IronPython, WPF, and button-free windows

So, how do we achieve something like this with WPF, using IronPython? Assume Vista or later (if you want to support XP, do something different if System.Environment.OSVersion.Version.Major < 6) Start with some XAML <Window
Mar 07 2010 03:34 PM
vote up
0
vote down

IronPython and callback delegates with 'out' or 'ref' parameters -- the obvious way doesn't work

The only on-line documentation I could find that mentioned this has a TODO - Delegates with out/ref parameters about halfway down. So, experiment time. Build callback.dll containing (or the same with 'out'): namespace Callback { using System; public
Mar 07 2010 02:18 PM
vote up
0
vote down

Hints of Spring

Last Sunday, after a snowy start, mild sunny weather in the afternoon got me out in the garden clearing out more dead foliage, and spotting this season's weeds starting to emerge. Also cleared the tomato and chilli plants from the greenhouse -- the last
tags: garden
Feb 25 2010 04:33 AM
vote up
0
vote down

Meaningless Patterns

In recent weeks, I have looked at the odometer in my car after parking at home in the evening and spotted 35200, 35300, 35500 and, today, 35600.
tags: mileage
Feb 25 2010 03:48 AM
vote up
0
vote down

It almost feels like cheating...

I've been noodling about in the last few days, with a view to eventually porting some 'C' code from last century to .net by incremental replacement; something I tried and gave up as too horrible some years (back when we only had Managed C++ on .net). In
tags: .net
Feb 24 2010 05:27 AM
vote up
0
vote down

Links for 23-Feb

Martin Fowler on Version Control Tools. PowerShell: Standard members property. MSBuild Task factory. F#: Survival guide e-book. A simpler mailbox processor and agents. Structural typing constraints. JavaScript Reactive Framework and Observables. 50
Feb 23 2010 03:27 PM
vote up
0
vote down

F# under the covers XII -- Reflector 6.0 decompilation to C#

A new Reflector release (6.0.0.918), and time to see whether it can approximate in C# some compiled F# code that the 5.1.6.0 version balked at. The generated IEquatable.Compare method that couldn't be handled before now succeeds -- the section that had
tags: f#
Feb 17 2010 01:48 PM
vote up
0
vote down

Updating F# posts to 1.9.9.9 - part 2 : October 2009 CTP

Post 1.9.7.8 there have been few changes to code generation, and most of them subtle -- or are places where I no longer remember what I was on about. Headline issues are: Module member value initialization is now done in a way that no longer triggers
tags: f#
Feb 14 2010 01:58 AM
vote up
0
vote down

Updating F# posts to 1.9.9.9 - part 1 : Before the October 2009 CTP

I've actually been fairly lucky about code changes (apart from probably being the only person on the planet affected by the change in the camel-casing of the NonPublicRepresentation enumeration flag -- which really means ImplementationArtefact) -- the
tags: f#
Feb 12 2010 02:22 PM
vote up
0
vote down

F# under the covers XI½ -- F# 1.9.9.9 changes everything

Well, I just tried building my code coverage static analyzer under the February CTP; and the first thing I get is that the attribute decorations for F# algebraic types have changed. In particular the SourceConstructFlags.NonpublicRepresentation
tags: f#
Feb 11 2010 03:16 PM
vote up
0
vote down

Links for 10-Feb

Functional C# : Extracting higher order functions with generics. Related : F# Changing one's C# coding style Marking the .net 4 RC1 release on SmallestDotNet. PoSH 2.0 -- the localized help files. JQuery 1.4.x highlights IronJS -- Ecmascript on the DLR
tags: .net
Feb 09 2010 04:43 PM
vote up
0
vote down

No Disk -- \Device\harddisk3\dr3

Googlebait title for a problem I was having with NCover 1.5.8 on my main desktop machine at home over the weekend; whenever trying to run nUnit or FxCop inside NCover, they were raising one or many (respectively) dialog boxes with thie message. Except if
Feb 09 2010 01:01 AM
vote up
0
vote down

F# October CTP and VS 2008 - output window glitch

I first noticed this when adding a simple post-build step through the project properties for running unit tests as part of the build inside Visual Studio -- the May CTP echoed the data going to stdout just like with any other language; in October
tags: f#
Feb 06 2010 03:05 PM
vote up
0
vote down

“Hello Glade#” from IronPython

I was a little pessimistic yesterday about this operation -- but with a little sidestepping to use a different method on the Glade XML object, and a little bit of Python metaprogramming, we can actually get something much more general than the F#
Feb 02 2010 05:21 AM
vote up
0
vote down

“Hello Glade#” from F#

Another bit of spiking, a rather tardy follow up from raw GTK#, starting from the C# example at the Mono Project site, but incorporating the earlier example, so as to build in a clean application exit, for one thing. In the .glade file, I changed the
tags: f#
Jan 31 2010 07:47 PM
vote up
0
vote down

Hello, Functional World! -- A gap in the market

Reading my newly arrived copy of Real World Functional Programming, I couldn't help but feel that its very gentle introduction to the style so nearly makes it suited to being a pure introduction to programming via the functional style, if only it were
Jan 19 2010 05:24 AM
vote up
0
vote down

Review catch-up — Anime

Asura Cryin' second season For the first half at least, it carried on as before, throwing ever more stuff into the pot every episode; before suddenly deciding to pick one of the multiplicity of minor characters, nominate them as Final Boss, and go for
tags: anime
Jan 18 2010 04:34 AM
vote up
0
vote down

An interlude of thaw

Finally a few mild days, and the heap of snow shovelled from the drive has finally melted, leaving the garden snow free after a whole month. The milder weather and the sun was enough that the greenhouse windows even started to open a little, very
tags: garden
Jan 18 2010 01:38 AM
vote up
0
vote down

Links for 14-Jan

After a long period of snow, slush, ice, cold, gloom and general all-around lack of enthusiasm... .Net4 beta2 available via Windows Update -- how to opt in. CSI -- a C# interpreter for scripting F# -- refactoring to active patterns. C++ -- C++0x features
tags: .net
Jan 14 2010 03:46 PM
vote up
0
vote down

The importance of API design

Reflecting on the exercise leading up to yesterday's post, one of the things that struck me in the comparison of the .net Framework used from F# and the Java APIs available to Scala/JVM was how much the former got little details right to facilitate
tags: .net
Jan 01 2010 03:47 AM
vote up
0
vote down

A little toy in Scala

Proving that with a little help from tools like JarJar and Pack200, an applet written in Scala will come in somewhere between and IronPython and an F# Silverlight equivalent, considering the weight of infrastructure code that gets dragged along to
tags: scala
Dec 31 2009 01:42 AM
vote up
0
vote down

A quick Scala gotcha

Wouldn't it be nice, I thought, to be able to put UI decoration as a mixin to any sort of component, like trait HasImage { def image : java.awt.Image } trait Tiled { self : scala.swing.Component with HasImage => peer.setOpaque(false) override def
tags: scala
Dec 28 2009 09:30 PM
vote up
0
vote down

Anime - Aoi Hana (Sweet Blue Flowers)

A quiet little story of school-girl romance, very sweetly done; and with a delicate and restrained art style, presumably heavily post-processed photographs in the main. The story follows childhood friends Fumi (tall, dark haired) and Akira (redhead)
tags: anime
Dec 26 2009 01:39 AM
vote up
0
vote down

Winter Wonderland

Thursday evening last, it started to snow -- blizzarding enough that Karen's evening call carers got lost on the way back, took the wrong turn and ended up stuck in the snow on a farm road, and had to be towed out by tractor. Friday, the snow was drifted
Dec 26 2009 12:52 AM
vote up
0
vote down

Links for 18-Dec

MSFT SCVMM updater for VM images version 2.1 released. Mixed-language assembly builds in Visual Studio. .net 4 highlights. Joe Armstrong approves of WebSockets. Immutable wrapper pattern. F#: Making F# type inference friendly to C#. Generic monads. FoldR
tags: .net
Dec 18 2009 11:03 PM
vote up
0
vote down

Using a different mscorlib for F# in Visual Studio (Silverlight and probably XNA too)

It turns out that I was lucky last year when building an F# Silverlight 2 application by hand in Visual Studio -- I didn't make an explicit reference to mscorlib. It turns out that if you browse to the Silverlight mscorlib assembly to make an explicit
tags: f#
Dec 14 2009 02:17 PM
vote up
0
vote down

Packaging Scala applets into one jar in NetBeans with JarJar

Pretty much a note to self; using NetBeans that started off as 6.7.1, but has the bleeding-edge depot, and using a Scala 2.8 nightly, FWIW. Get the jarjar tool; put it and a copy of scala-library.jar and scala-swing.jar in a lib directory under the
tags: scala
Dec 13 2009 05:37 PM
vote up
0
vote down

F# and Silverlight 3 addendum

You can make a permanent fix for the hint path needed to find FSharp.Core.dll by editing the template in C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ProjectTemplatesCache\FSharp\Silverlight\SilverlightLibrary3.zip\SilverlightLibrary.fsproj
tags: f#
Dec 05 2009 10:16 PM
vote up
0
vote down

F# October CTP and Silverlight 3.0

Following on from last year's compendium for Silverlight 2 -- There's an official Silverlight 3.0 project template for Visual Studio 2008; while targetted at the May CTP, these can be used with the October CTP by opening up the .fsproj file and amending
tags: f#
Dec 05 2009 03:54 PM
vote up
0
vote down

The Moon in Winter

This morning at 07:13, about 35 minutes before sunrise, the sky was pale in the east with the approaching dawn -- and when I went downstairs, the just-past-full moon was casting shadows in the dining room. The cats all agreed that this was good for their
tags: astronomy
Dec 05 2009 02:14 AM
vote up
0
vote down

Working on F# with NDepend

Following up from the earlier post here, looking more in depth at some of the results out of NDepend for my own little code quality project, and in addition to the results noted there First out of the gate, for sanity's sake, when working with F#, it
tags: f#
Nov 29 2009 02:39 AM
vote up
0
vote down

F# under the covers XI -- Literal expressions that aren't; attributes that don't

Consider the following simple C# property public static FileShare get_Options() { return (FileShare.Delete | FileShare.Write); } This compiles in debug mode to .method public hidebysig specialname static valuetype [mscorlib]System.IO.FileShare
tags: f#
Nov 27 2009 04:06 PM
vote up
0
vote down

Links for 24-Nov

Simon Willison is excited by Node.js PPK remarks that Apple is not evil -- and may be surprisingly cunning. Luke Hoban's F# for Parallel and Asynchronous Programming (PDC video) Bart Czernicki's Silverlight 3 and F# Support in Visual Studio
Nov 24 2009 05:00 PM
vote up
0
vote down

F# -- a few notes and something to play with

Seq.take<'T> While F# documentation is there on MSDN, it is a little sketchy. For example, take Seq.take<'T>: Return the first N elements of the sequence. Contrast, for example, Scala's Seq[A].take Returns a sequence consisting only over the
tags: .net
Nov 24 2009 04:47 PM
vote up
0
vote down

F# under the covers X -- the curious case of record types

They're coming thick and fast now... Define a record type such as type Context = { Line : int; Column : int; EndLine : int; EndColumn : int } The class that results looks like [Serializable, CompilationMapping(SourceConstructFlags.RecordType)] public
tags: f#
Nov 23 2009 05:10 AM
vote up
0
vote down

F# under the covers IX -- the case of the missing coverage

As I'm driving my little set of FxCop rules and associated helpers to a state I feel comfortable with calling a 1.0 release, I'm looking in more detail at how the code coverage in the automated system/integration test is going, trying to drive that
tags: f#
Nov 21 2009 11:17 PM
vote up
0
vote down

NDepend -- a belated "kicking the tyres" review

First off, a little confession -- while I'm a C# coder by day, by night I use a whole variety of other languages instead; so I don't have a large corpus of my own code to use it against; and having installed my gift copy of NDepend v2.12.1.3123 (Pro
tags: f#
Nov 20 2009 03:30 AM
vote up
0
vote down

Links for 19-Nov

New from the PDC: Windows Identity Framework RTM. Silverlight 4 beta. Reactive Extensions release (Introduction parts 3,4, another introduction). IronScheme 1.0 RC1. WPF - from C# to F#. Automating signing of PoSh scripts. Prefer structured lifetimes -
Nov 19 2009 08:26 PM
vote up
0
vote down

Nature notes

Mild wet and very windy up from the south, so mild that, when I went downstairs to get a bedtime drink last night, I found that the cats had brought a frog in, and were just sitting around looking at it. And while a few clear cool nights have just about
tags: garden
Nov 13 2009 01:38 PM
vote up
0
vote down

Alpha-encoding file versions

When building installers the UpgradeVersion must have a unique property value that is an installer public property (upper-case alpha). So, what better way of adding uniqueness than making it have the form "product name + product version" with the version
Nov 13 2009 04:12 AM