Implementing MsgPack.rkt, part 2
In this part of the series I want to go into how to pack data to bytes in MessagePack. We will see how to dynamically dispatch on type and how to pack a selection of particular types.
In this part of the series I want to go into how to pack data to bytes in MessagePack. We will see how to dynamically dispatch on type and how to pack a selection of particular types.
When I originally set out to write MsgPack.rkt, a Racket implementation of the MessagePack protocol, I had a hard time wrapping my mind around where to begin. I had no experience in writing a serialisation library, and reading the source code of existing implementations only revealed the what, but not the why. This is why I'm starting this short mini-series of blog posts to provide a commentary on my implementation. I hope that it will serve other people who are looking for a starting point to their own implementations.
I found myself needing a program to apply binary patches in the IPS file format and I was really disappointed that there are no proper Unix programs for that purpose available. So I set out to make my own, but instead of just applying patches it would be a complete suite of tools to handle all IPS-related tasks.
This is a very useful project I had written quite a while ago at work and recently found collecting dust on my hard drive. It lets you create perfect 1:1 copies of NTFS hard drives on Unix. The problem with every software I had come across was that it would copy the data, but that wasn't enough, so we had to run Windows repair on every single drive.