Posts in clojure


Myers' Diff Algorithm in Clojure
• 13 min read

If you're a programmer, you're probably fairly comfortable with understanding and interpreting diff patches of the kind that git and other version control systems use. In this post we'll walk through a Clojure implementation of the Myers' diff algorithm, which is the algorithm used by Git.
Continue Reading »

Arithmetic with Instaparse
• 4 min read

Last week I started playing around with the Instaparse library, which makes writing parsers really easy in Clojure. What Instaparse does is take the formal definition of a language and give you a parser for that language. You can then use that parser on a string, possibly containing something in that language. You need to write the gra...
Continue Reading »

Parts-of-speech tagging with Clojure
• 8 min read

One of the classical problems in Natural Language Processing is parts-of-speech tagging i.e. given a sentence of length n, find the sequence of part-of-speech tags for each word in the sentence. For example,
Continue Reading »

Making a streaming API from scraped data using Clojure
• 7 min read

p I recently found myself having to play around with some stock exchange data. The stock exchange in Nepal, unsurprisingly, doesn't provide a data API so I had to scrape their website. The non-realtime data isn't very interesting, just regular old scraping made a little more tedious by the fact that whoever designed the website didn't ...
Continue Reading »

Websockets with Clojure and http-kit
• 8 min read

div id="table-of-contents" h2Table of Contents/h2 div id="text-table-of-contents" ul lia href="#sec-1"1. A (fake) realtime happiness gauge/a/li lia href="#sec-2"2. Project setup/a/li lia href="#sec-3"3. Websocket server/a/li lia href="#sec-4"4. Front end/a/li /ul /div /div
Continue Reading »

Building a database-backed Clojurescript app
• 9 min read

In my previous post, I gave a pretty quick introduction to Clojurescript. If you haven't already, I recommend you read through that post. This post assumes that you have some Clojure knowledge and already have Leiningen running.
Continue Reading »

Getting started with Clojurescript
• 8 min read

There doesn't seem to be much written about running Clojurescript, especially considering how great a tool it really is. I know there is a book that's coming out soon, but I had some trouble getting started with Clojurescript so I decided to put together this post, that hopefully at least some of you will find useful. This post does as...
Continue Reading »