03/02/2013
14/07/2011
13/07/2011
Some truly wacky looking C++ code (Boost 1.47.0)
I had to look at it a few times. Cool, sorta wacky.
try_
[
f(arg1)
]
.catch_<runtime_error>()
[
cout << val("caught runtime error or derived\n"),
throw_()
]
.catch_<exception>()
[
cout << val("caught exception or derived\n"),
throw_()
]
.catch_all
[
cout << val("caught some other type of exception\n"),
throw_(runtime_error("translated exception"))
]
26/03/2011
Facebook’s New Realtime Analytics System: HBase To Process 20 Billion Events Per Day
Facebook did it again. They’ve built another system capable of doing something useful with ginormous streams of realtime data. Last time we saw Facebook release their New Real-Time Messaging System: HBase To Store 135+ Billion Messages A Month. This time it’s a realtime analytics system handling over 20 billion events per day (200,000 events per second) with a lag of less than 30 seconds.
Alex Himel, Engineering Manager at Facebook, explains what they’ve built (video) and the scale required:
http://highscalability.com/blog/2011/3/22/facebooks-new-realtime-analytics-system-hbase-to-process-20.html
25/09/2010
11/11/2009
Google Go
Google’s Go: A New Programming Language That’s Python Meets C++
1st blush looks nice. Types good, C like performance good. Built for multi-core etc. I will admit I wish it looked more functionally inspired. I am loving Erlang these days (and to a lesser extent Haskell) so going more imperative again feels a step back…
I will give this one a *go* I think…
06/07/2009
LAgent: An Agent Framework in F# – YES
LAgent : an agent framework in F# – Part I – Workers and ParallelWorkers
LAgent : an agent framework in F# – Part II – Agents and control messages
LAgent: an agent framework in F# – Part III – Default error management
LAgent: an agent framework in F# – Part IV – Custom error management
LAgent: an agent framework in F# – Part V – Timeout management
LAgent: an agent framework in F# – Part VI – Hot swapping of code (and something silly)
05/07/2009
Good reads…
Been reading lots…
Finance, microstructure:
- A Dynamic Model of the Limit Order Book
- liquidity supply in a pure limit order book market
- Optimal liquidation against a Markovian limit order book
- Fluctuations and response in financial markets
Languages:
- Expert F# Hardback (Expert’s Voice in .Net)
- Programming Clojure (Pragmatic Programmers)
- Why Functional Programming Matters
Distributed computation:
Just good readin’
17/05/2009
Axum Genetic Algorithm Example
I have worked for some years on genetic, evolutionary, memetic and other optimisation software – specifically in the context of automated/ systematic trading. I have also worked for some years on very multi-threaded software systems. I have been interested in the actor model for writing concurrent software.
Axum
Axum anincubation project at Microsoft implementing the actor model for the CLR. Others have posted on it – Matthew Podwysocki has two posts here and here that are worth a look. The Axum team blog is here. Have a read as you can, they are much more ‘on it’ wrt Axum than I.
Genetic Algorithms
Genetic algorithms are a class of algorithms from the school of ‘evolutionary computation’. I will not go into a study here, just google genetic algos. Needless to say – this example is a very naive example. I tried pretty hard to use any of my ‘real’ evolutionary algorithm libraries, but they just did not work easily enough with Axum. More on that later…
Caveats
Aside from being a really naive GA, the demo is also ver imperative and array/ for loop based. This is not good – but I was focused on getting Axum running. After I was unable to pull in my real evolutionary algo libs I just went for bare bones. We are also doing a ‘pure numeric’ optimization problem, this is a common test alog for testing multi-objective optimizer software. It was easy to convert to axum – so I used it. Perhaps for future examples I will try to apply a GA in a more interesting way (eg; not just a maths problem).
High level steps I followed to getting the demo running
- Define the data elements flowing between actors. I 1st tried to use a class called ‘individual’ from my standard libs. Axum has a concept called schemas. Here is a post from the Axum team blog on schemas. Schemas are data transfer objects or ‘schematized messages‘ that are immutable and used to travel in a type safe way between agents, across channels.
- Next I defined the channels. Channels are aptly named, they are typed channels that your messages (those schematized object instances from above) travel through from one agent to another.
- Next I defined the agents that received messages from a channel, and published messages back onto a channel. In the agents are any ‘real code’. the schemas and channels are just construct definitions to establish what can travel around.
- Immutability of schema objects: I am not mutating the incoming individual to the Evaluate function, I am returning a new individual with the same genes as the incoming one and new fitness values that I assign.
- No side effects: Functions dealt only with local variables and returned data without causing side effects.
- Lots of odd casting business: Axum simply had strange problems calling external libs (like system.math in this case). I got many errors like “cannot cast double[] to double[]“. I saw some errors that showed that it seems Axum wraps all the primative types in an AxumSomethingOrOther<primative> type. Again, this just caused ugly code to deal with it + casting galore.
- Generally red herring error messages like ‘unable to recover’ with no more detail
- Poor handling of arrays (like my above casting issues) in many cases I had to copy values out of the arrays into new arrays.
- When newing a schema type, you can’t use () – just the new XXX {propName=xxx} if you put new XXX() you would get truly odd errors.
- Generally high difficulty integrating with other C# libs. I tried 1st to interop with a big lib, it barfed, I then tried to have another small C# project in the same solution, I got null pointer errors when adding ref’s to it, etc. I had all kinds of errors using external types -just too hard or not possible.
25/04/2009
03/03/2009
Semi-Random thoughts
I have talked with people for some time about work I had done in the past with copulas… today saw a good ref on Slashdot:
The Formula That Killed Wall Street
I do not like PowerShell.
I still love Rake for building/ running .net apps
Visual Studio crashes all the time when editing XAML (it hates custom attached properties I think)
Xceed’s latest release of their grid is replete with sucky bugs
I feel overly awake at 11:30, that is what happens when you go to the gym at night
The global economy sucks, everyone is feeling it. I hope the low is not so low we can’t all bear it. I really do not want my wife and kids to be truly effected by it.
I love my iPhone and my MacBook Air
I am pissed that my skateboard went missing during our move
I love living in London
I have been thinking a lot about WPF, what are good practices for larger apps wrt managing XAML/ templates/ styles etc
I want a good lock free (or at least low, low lock) hashtable for C# (not a bad place to start Julian M Bucknall)
Windbg rock
The latest Ants profiler is pretty impressive, well done
OK, that is enough
27/01/2009
Update
Well, it has been 55 days since I posted last – that is a record for me! As of my last post, my family and I moved to London. Since then, we have lived in Knightsbridge for a few weeks, gone on holiday to Austria, moved to Chelsea, unpacked our goods, furnished rooms, hooked up bills of all sorts… and so on.
It has been a whirlwind of activity, expense, fun and overall goodness. I have been ‘FaceBooking’ all my small, personal items regularly – it takes very little effort. Now that that business is all through, and life is getting back to ‘normal’, I will be blogging again about my normal technical fare.
Currently I am building some good software using WPF and the other MS stuff. I am also getting back into using Rake for my build and general scripting automation. All in all, things technically have been much the same. I plan to be elaborating more ASAP!
For now, here we are having fun in Austria

-Chris-





