Miscellaneous updates(2016-11-23)

Some random updates: I’ve been reading Neal Stephenson’s Quicksilver. This is the second time I’ve started to read the book and I must say that I’m just having a lot of trouble getting into the book. That said, I haven’t abandoned it yet- I’ve…

Some recent reads

I haven’t posted here in quite a while, and I’d like to re-boot the site with something easy. So I wrote up “mini book reviews” of some books that I read recently and liked quite a lot. Bringing Down The House by Ben Mezrich This is a book…

First impressions on nand2tetris

I recently started reading a very interesting book called [The Elements of Computing Systems][nand2tetris] by Noam Nisan and Shimon Schocken. The book is nicknamed “nand2tetris”, so called because the reader starts off with a NAND gate and using it as a building block for more complex systems builds a…

Arithmetic with Instaparse

Last week I started playing around with the [Instaparse][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…

Parts-of-speech tagging with Clojure

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, $$\text{POS(“the”,”man”,”walks”) = (“article”,”noun”,”verb”)}$$ There are several approaches to parts-of-speech tagging, and…

Making a streaming API from scraped data using Clojure

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…

Websockets with Clojure and http-kit

Table of Contents * 1. A (fake) realtime happiness gauge * 2. Project setup * 3. Websocket server * 4. Front end Websocket is a relatively new network protocol that enables a connection between client and server to have long-living connections. What this means is that servers can push things to clients and vice-versa…

Building a database-backed Clojurescript app

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. In this post, I’ll show how to create a SQL database-backed…