Confused about exception handling

2013-07-08 Thread Marcel Möhring
Hello, as a Java developer I'm a bit confused about the lack of exceptions. A minimal example: (spit "filename" "a String" :encoding "UTF-8") the corresponding Java code has got 4 possible exceptions: UnsupportedEncodingException FileNotFoundException 2 x IOException (on .write and on .close)

Better ways of documenting functions with type information?

2013-01-13 Thread Marcel Möhring
Hello, is there a better way to document a function if I want to include type information and parameters for in/out? Currently I am using this approach but it feels rather clumsy: "Takes a screen and a pixel coordinate and returns a map of maps with pixel colors and adjusted pixel coord

XML parsing with namespace prefixes

2012-07-23 Thread Marcel Möhring
Hi, I am trying to parse an xpdl file. The problem for me is, that every tag is prefixed with xpdl namespace. The lookup from clojure.data.zip.xml always returns nil. (the same code works for non-prefixed XMLs) zipper: [{:tag :xpdl:Package, :attrs {:xmlns:xpdl "http://www.wfmc.org/2008/XP