A simple BigNum library for .NET

code 13 October 2007 | 7 Comments

Update Due to minor demand, the code is also available: BigNum source. Please note that I haven’t actually touched the code since it was first written. I’m sure there’s some things that don’t work properly. If you’re doing anything big with this you probably want to write some ‘destructive’ update functions for adding, etc. At [...]

Tagged in , , , ,

Fun(c) with C# 3.0

Uncategorized 9 October 2007 | 1 Comment

Looking through the list of predefined (or, in Microsoft’s parlance, standard) query operators defined in C# 3.0, there is one that stands out as missing: the ‘map’ function. However, with the new query expression syntax, this is trivial to define: public static IEnumerable<T> Map<F,T>(Func<F,T> func, IEnumerable<F> source) { return from it in source select func(it); [...]

Tagged in , , , , ,

Lazy Lists in C#

Uncategorized 28 September 2007 | 0 Comments

I had the thought—while browsing through some old code—that the code I used to implement futures in C# would be useful for doing things lazily, if you just moved the evaluation phase to when the value was actually demanded… this started me off thinking about how to implement a proper lazily-evaluated list in C#. A [...]

Tagged in , , , ,

Wanted: Summer of Code [2.auckland]

self 27 September 2007 | 2 Comments

I really (really) want to participate in the Wellington “Summer of Code 2.0” (blog), but it is Wellington-only… and I doubt any of the companies involved want to take on an unproven second-year student to work remotely on their software. Argh!

Tagged in , ,