HN user

chapmanb

23 karma

Biologist and Programmer: http://bcb.io http://github.com/chapmanb

[ my public key: https://keybase.io/chapmanb; my proof: https://keybase.io/chapmanb/sigs/Z8oDZfDpvPHuIYdzRuy614MCnV8bEj53xmOOba3IkeU ]

Posts1
Comments12
View on HN

Thanks for the feedback. I'd be very happy if this inspired better solutions. My goal was to solve a problem that was slowing down my work, and I reached for multiprocessing from my toolbox since that's my first choice to run work in parallel. Since I didn't find an existing implementation, I decided to share it. It would be great to learn from some alternative approaches.

I would say that learning Lisp is definitely worthwhile and will improve your Python coding; pg's essay argues for Lisp better than I could:

http://www.paulgraham.com/avg.html

You'll want to not just read a book, but also get hands on experience with the language. That's where I found Clojure a good choice for me since I could work on problems of interest to my work and reuse existing Java libraries.

Joy of Clojure also presents a persuasive argument in the opening chapter for Clojure, Lisp and functional programming. There is a pdf of that chapter available for free from the author's website:

http://joyofclojure.com/

I learned Clojure with Joy of Clojure, the early access version, coming from a Python background with very little practical experience in Java or Lisp. It's an excellent book.

The biggest advantage for my coding has actually been in my day-to-day Python work, where I'm much improved at designing functionally, parallelizing with multiprocessing, and building decorators and context functions to remove boilerplate code. So my Python is faster and cleaner; this is all thanks to being able to to think better about code design after working in Clojure.

For a good example of "why Clojure" take a look at Cascalog:

https://www.assembla.com/wiki/show/d9Z8_q-Omr35zteJe5cbLr

which leverages Hadoop/Cascading Java libraries and combines them with a Lisp-style custom query language.

There I was brainstorming ideas to replicate the hierarchical database/collection/document management that MongoDB and CouchDB offer. One solution I have used, and became disenchanted with, was combined keys with all this information munged together. It would be interesting to hear what others do with their key/value stores.