Today I received two emails. The first one asked for a much needed feature in tagsoup-parsec - allowing user-supplied state, which I added.
However, the other email reported the fact that shpider no longer worked.
Shpider uses curl for a backend. The funny thing about curl is that it only writes cookies to a file when its cleanup function is called, rather than when it recieves them. However, in the original curl-bindings, this function was only called on garbage collection, through a foreign pointer finalizer. This resulted in some weird behaviour, like cookies being written at unexpected times. This is crippling if your program logs in to a website and then expects a cookie to be written to hold the session key.
So I forked the library to work on a solution. The obvious one is to call the finalizer manually, which worked before, but seems to crash now ( new GHC? ), so now I have to handle my own garbage collection, in order to get deterministic behaviour.
I really should put shpider in a git repository, to let others peer at it more effectively.
In other news, I hope in a couple of days I shall be able to publish the first component of a cool new piece of tech.... ooooh, the suspense.
6 August 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment