Posts tagged Clojure

Hands-on with Clojure day 3

:: Clojure, Hacker School

Please see the usual disclaimers from my previous posts.

As I mentioned yesterday, my next toy project is to write wrappers libraries for the new Hacker News API. This seems like a good exercise because the REST API is very simple, and I have experience doing this sort of thing in Racket. In fact, I’ll do the same thing in both Racket and Clojure.

The result is clacker-news and racker-news. Trademark registration application is in-process.1

Hands-on with Clojure day 2

:: Clojure, Hacker School

As with yesterday’s post, important disclaimers:

  • I’ve used Racket heavily but not Clojure.

  • Opinions expressed herein are not those of my employer, were I to have one.

  • If indignation lasts more than four hours, please seek medical attention.

Day 2 with Clojure was much more fun! I didn’t hit speed bumps with tooling and workflow, so frequently. I was able to focus mostly on the code itself, which was wonderful.

For a slightly more realistic task, I decided to make a really simple function that, given a URL, would make a GET request and return the value of the Server response header (if any), and a list of URLs found on the page that are for other servers. The idea being, you could crawl from some starting point and accumulate some data about web server technology.

Hands-on with Clojure

:: Clojure, Hacker School

Until now, Clojure has been an “armchair” language for me. I’ve read a lot about it, and I’ve read a fair amount of code written in it. But aside from typing a few things into an online REPL like Try Clojure, I’ve not really used it hands-on.

A couple days ago I started my 12-week batch at Hacker School. First on my list is to get some real experience with Clojure.

And I’m going to blog about the experience.

The ~> Threading Macro

:: Racket, Clojure, macros

Although I prefer Racket, there are a few idioms from Clojure I like. I’m particularly infatuated with the threading macros, -> and ->>.

I was surprised how little documentation I could find for these. So although I’m writing this for Racketeers, it’s possible a few Clojure folks might find it interesting, too.