technology from back to front

Archive for August, 2012

Intercession without source changes

Methods in a Smalltalk object live in the method dictionary of its class. A method dictionary maps Symbols to CompiledMethods. From the virtual machine’s perspective, anything that understands #run:with:in is compatible with a CompiledMethod, in the sense that the VM sends this message to things that it will execute.

As a result, it’s easy enough to put arbitrary objects (that understand #run:with:in) in a class’s method dictionary. In fact, there’s a library for it.

With this hammer in hand, it becomes trivial to perform all manner of intercessions on code, without instrumenting code through a rewrite+compile cycle: wrap the CompiledMethod in an ObjectAsMethodWrapper (or several) and away you go. What might you do? Pre- and post-condition checking, flagging which methods execute for coverage analysis, profiling, and so on. Today we’re going to turn a method into a memoised one.

Read more…

by
Frank Shearar
on
31/08/12

TDD for Esoteric Programming Languages (using Clojure and Befunge)

I’ve been learning Clojure recently, and I’d been looking around for a good initial project to test my new knowledge. I’ve always wanted to write a Befunge interpreter, and so decided that sounded like a fun project. Little did I know the maze of twisty little passages I was letting myself in for, but I’ve learnt a lot of interesting things along the way, and there’s a few things worth sharing.
Read more…

by
Tom Parker
on
25/08/12

Monticello -> Git

Back in the dark years of 2003, Avi Bryant and Colin Putney tried to use CVS to version their Smalltalk code and failed dismally. They decided to scratch their itch, and Monticello was born, a DVCS centred around managing the structured text of Smalltalk code.

Years have passed, and nowadays we have Mercurial and Git providing succour to so many. How can Smalltalk leverage these tools, instead of maintaining its own custom version control system?

Read more…

by
Frank Shearar
on
20/08/12

Software auditors for Lloyd’s of London

Lloyd’s asked us to take a look at the security design of a new gaming business that they had been asked to underwrite – this start-up has an interesting gaming model which has insured the payout of all wins over a certain value. For Lloyds, the maths works, but only if the software actually does what it should.

Topjack Games MD talks about how the business works.

by
Administrator
on
01/08/12

Search

Categories

You are currently browsing the LShift Ltd. blog archives for August, 2012.

Feeds

Archives

2000-14 LShift Ltd, 1st Floor, Hoxton Point, 6 Rufus Street, London, N1 6PE, UK+44 (0)20 7729 7060   Contact us