Evan Martin (evan) wrote in evan_tech,
Evan Martin

dbus bindings for haskell, api design

That last post was intended as background for announcing my preliminary Haskell DBUS bindings.

The code is here, and the API docs are here. It's not much, but it's enough to make blocking calls to BMPx's volume-control APIs.

Reading the DBUS API docs is very interesting, because it reminds me of how much effort the Cairo folks have put into their API. It's very difficult (I think especially difficult when you're intimate with the code) to figure out the simplest point to delineate library-internal from library-external, and for every function they've added to Cairo there's been a discussion of whether that's the right place for it, what effect it'll have on language bindings, etc., etc. The DBUS docs, by contrast, feel pretty overwhelming and feel somewhat incoherent.

With each project like this I learn something more, which is always the point. The two goals of this one are understanding DBUS better and (obviously) Haskell. So far the most noteworthy piece is how dynamic exceptions work, which I've long wondered about and still don't quite understand. In O'Caml, exceptions are specially handled by the langauge (with an exn keyword, as I recall), but in Haskell (of course) it's just some functions and some fancy typing. I'd explain more but I doubt there's even one reader of this who cares. :P
Tags: d-bus, haskell

  • your vcs sucks

    I've been hacking on some Haskell stuff lately that's all managed in darcs and it's reminded me of an observation I made over two years ago now (see…

  • jaunty upgrade

    Upgraded to Ubuntu Jaunty. X hung with garbage on the screen after rebooting. Booted into "restore mode" (I forget the exact name), it gave me a…

  • ubuntu summit

    There's an Ubuntu summit going on in Mountain View next week. I'll be there Monday and plan to meet up with someone who's interested in packaging…

  • Post a new comment


    default userpic
    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 1 comment