• Arbitrary Restrictions On C# Generic Constraints

    I’m really feeling the pain of the simplicity of C#’s generics system. I have found some situations where I could introduce more type safety by being able to refer to a type parameter on the left hand side of a generic constraint which is not a parameter of the immediate definition, but rather that of an enclosing class. For an example of what I mean, see this:

    Read on →

  • Todays Java Atrocity

    ```java class SomeLibraryClass { public SomeLibraryClass(Class klass) { // Use klass to overcome Java generics limitations } }

    Read on →

  • Implementing The Disposable Pattern In Scala

    One excellent feature of the CLR in general and C# in particular is deterministic finalization: the ability to control when resources are released. In C# this is realized with the IDisposable interface and the using keyword. Effectively, the statements:

    Read on →

  • Breaking The Running Key Cipher: Part 1

    I love challenges of all kinds, both the algorithmic and cryptographic. There is just something inherently compelling about pitting your wits alone against an intellectual challenge, free to apply any and all means to beat it. I recently took part in a crypto challenge where we were meant to break a text encoded with the running key cipher, which I hadn’t encountered before, and I came up with a rather satisfying solution for I thought might be good to share here.

    Read on →

  • Uninformed Journal Volume 7 Released

    For those of you who are unaware, the lastest edition of the very entertaining Uninformed Journal came out recently. It’s a pretty interesting edition, though not as bulky as some of their previous releases: I hope the project isn’t losing momentum. In particular I found that the article by skape (one half of the duo who originally broke Windows Patchguard [pdf]) about dynamic analysis of memory access in arbitrary software was nice: he outlines a variety of tricks for doing this, using page tables, segment registers and runtime instrumentation, and some research areas where this would be useful, like taint propagation. There’s probably a product or two waiting in there for some enterprising company to create :-).

    Read on →