porting to C++
In my attempts to fight my own boredom, as an unemployed hacker, I took on myself to do something: porting Tomboy to C++. It is actually not that hard, just a lot of work to do manually because there is over a dozen of thousands of lines of code. This show me that the door is open to reimplementing Gtk# software (or parts) in C++ with not too many problems, making it easy to have them available for C applications.
Nonetheless there are still some challenges:
- Garbage collection: I replaced this with a combination of Gtkmm memory management, std::tr1::shared_ptr<> and stack allocated object. Seems to be working so far. I could also be using a garbage collector, but it seems to be unecessary.
- String and file path utilities: Boost has string algorithms and Boost.Filesystem
- XML: while XML parsing is not a big issue with the various libraries available, APIs have enough difference to make it non-trivial. I also had to write a convenient wrapper of xmlTextWriter to make my life easier.
- Add-ins: I don't have the support for generic addins as found in Mono. No big deal, I implemented a factory in a few lines with a couple of macros. Some core features are actually implemented as add-ins, so I had to do it. Dynamic loading shouldn't be too hard.
- regex: some of these core feature use regulars expression. Not a big deal if it wasn't for apparently different syntax.
Of course the code is available. I have set up a repository on gitorious. There is not tarball yet as I still need to iron a few major bugs. On over 13KLOC of code, there are to be some :-)
 emphasis mine