The Latest Clojure Intertweets

We don’t get to report touching stories like this very often. Only tangentially related to clojure, this post is about an individual that decided to setup an Arduino store in West Africa, with the goal of getting more kids to interact and learn with electronics. The relationship with Clojure is that the author discovered Arduino while learning Clojure.

Rich Hickey introduces this new ‘reducer’ library that decomplects (ha! I need to create a new blog called ‘decomplected’) the functionality of operating over a collection, only to rebuild the functionality back in a way that is both faster and more flexible. It also lets you skip paying the price of lazyness when you don’t need it. Finally, parallel execution when possible via Java’s fork/join and other goodies that only RH can think of. There is a related Hacker News thread.

Good to see ClojureScript being used on the server side. Clutch is a library to integrate with Apache CouchDB, a document database that provides a JavaScript engine to run queries. Clutch historically allowed writing queries in Clojure, support but you needed to add a JVM backend to CouchDB. Now you can write these queries in ClojureScript, and have them run natively on the JS backend. If you are curious, here is how CouchDB views look like.

Clojure-ns-browser is a nice way to explore Clojure and all the clojure libraries. It let’s you quickly jump from documentation, to sources and to usage examples. It is a Swing) application built with Seesaw

Ah, nice! A DSL for building Robot controlling software to control Lego Mindstorms and Arduino robots. Clojure already controls the server, the broswer, the client… now Robots. This is one seriosly cool DSL that generates code that can be understood by the cited platforms.

This article describes how to REPL-in to remotely running services where direct TCP connections are not possible, or more speficically, Heroku. Using drawbar, a HTTP transport for nRepl, you can open a REPL in an already runnign webapp. I have heard this technique has been used to fix satellites or other space ships. Probably not HTTP though.

This is a chart plotting the times Clojure appears in Hacker News (HN) posts, compared to Ruby, Python, Haskell and Scala. NHacker News is a place where entrepreneurs hang out. Two things seem clear from this graph: Clojure has taken quite a dive since mid-2010, and HN is talking less and less about programming in aggregate.

Now this is one rant! Not everybody thinks that statelessness is a worthy goal. Some even think that striving for immutablility is evil. But some go even further and rant about how they think Functional Programming is “worse than crap.”

If you are writing an application that interacts with a social network you probably already know how hard it can be to test against the services provided by such social network. This library aids at creating automated integration tests against social networks.

This is a library that provides optimized tail calls to Clojure without having to call ‘recur’. It’s a source-to-source compiler and for now it only supports a small subset of Clojure. There is also a blog post with more details and the video of a recent presentation of this project.

It’s easy to see where the writer of the article is going when the article starts with “Those who don’t understand the work of Rich Hickey are doomed to reinvent it, poorly”. And indeed, the author of clojure-py initially implemented functions differently than Clojure-jvm because Python has a way of making objects callable, which Java does’t provide. Well, it turns out that using IFn (which is used in Clojure-jvm) not only makes the compiler code simpler, it also makes it faster.

This is the recording of a talk about making Tail Call Optimization performant enought in the Clojure/JVM. I couldn’t find the slides, and the video is not good enough to read the slides either, but the audio is good.

This is an awesome trick that has many uses, for example writing unit tests for a private function, or using private functions in macros. Both would not be possible if it wasn’t for this workaround the privacy of functions.

“With VMFest you can easily create and operate virtual machines, with emphasis on creating many clones of the same model VMs.” (Disclosure: I am the author). My –very well informed– sources tell me there are some cool new features about to come very soon.