Clojure roundup

In the last few weeks, there’s been a fair amount of Clojure news and activity here in our study group. Here are some links to things we’ve been watching.

  • A new language release. On December 17th, Rich “cut a new release” of the language. This should bring the offical release up to date enough for most people, although you’re still advised to check out the latest from Subversion, especially a few months go by without another official release
  • Streams vs. sequences. A lively discussion about the right implementation(s) of laziness and the role of caching in Clojure’s sequences. There is a move afoot to add true streams to Clojure, although the ramifications of such an addition are uncertain.
  • Compojure. Yes, Clojure has its own web framework now, and it looks pretty smart. Its syntax is inspired by Ruby’s Sinatra, it interfaces with Jetty, and it lets you write HTML in a vector-tree fashion that looks odd but probably saves the experienced user lots of keystrokes. Eric Levigne has written some posts about using Compojure to run a website.
  • Paul’s article on bean and Java interop. A nice tip on making it easier (and more Clojure-ish) to work with Java libraries.
  • Luke’s Markov chain generator and Michael’s post about it. Luke wrote a cool program that generates an output text from the pieces of an input text and uses pattern analysis and probability to mimic the style of the input text. Your humble blogger responded with a post examining the workings of the program and suggesting ways to build on it. This could become a group project.

That isn’t everything that happened in Clojure lately, not by a long shot, so feel free to comment to ad your own observations. Also, consider joining our study group list (link in the column to the right) to contribute. You don’t have to be in DC or come to meetings–we’d love to hear from you.

Advertisements

One Response to Clojure roundup

  1. Jeff Foster says:

    I also wrote a Markov chain generator similar to Luke’s – see http://github.com/fffej/clojure-snippets/tree/master/wordgen.clj (there’s some waffle + example on my blog about it too). I haven’t tried to cover the general case – the main simplification I’ve done is just using slurp to read the whole file in and splitting with a Java reg-ex – a typical text source isn’t going to be more than a few megabytes. I like the idea of the “piece” function, that’s a nice way to deal with much bigger streams.

    Probably the main difference in style is that I’ve tried to build things out of primitives like map/reduce, whereas Luke’s implementation uses recur for iteration. I’ve not done enough Clojure to know what’s good style or not, so I’d be interested in people’s thoughts.

    Unfortunately, we don’t have study groups for Clojure in the UK, they seem like a great idea!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: