As I said, there’s currently no good TagLib bindings that I can use for the tagging program I’d like to write, as the only ones available (ruby-taglib and rtaglib) are using the (very limited) C interface.
So I’ve decided to start working on new ruby bindings using the C++ interface. The extension API of Ruby is not the worst I’ve seen: when I tried writing bindings for Python in my UO Server Emulator, I really was being driven crazy.
What I’m still looking for is if there’s a way to get something called when an instance has to be disposed by the garbage collector (so that I can delete it). For the rest, it’s mainly requiring work on the code to compile, as that’s what the bindings consist of: lots of functions that just calls the true function.
I think I can “simplify” the work by using some M4 magic (the idea came from ciaranm and his bragging around about the M4 macros he wrote to avoid rewriting the same thing over and over), but that surely requires lot of refinements, because of course without having the code it’s also difficult to design the interface.
Anyway, this thing is actually interesting me because it’s something different from what I’ve done in the past and it seems like it can be of help 🙂
If somebody wants to see what I’m talking about the M4 things, I’ve used bazaar again: . The version (1.4) is related to the API version of the library, it will proceed like 1.4.1, 1.4.2, and so on and bump to 1.5 following taglib.
Thanks to Caleb who replied me as usual really quickly, now I know what I have to do 🙂
I’m working on the actual code that generate implementation (it’s M4 code, thanks again to Ciaran for giving me the idea), and I already have something done. The road to work is really long but it’s a starting point 🙂