Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
A Functional Blog In Clojure (ethanjfast.com)
27 points by unignorant on Aug 6, 2009 | hide | past | favorite | 9 comments


Homework: readable URLs.

  (concatenate 'string url-prefix
     (substitute #\- #\Space (or subject-line (first-ten-words body))))

Also, wrap up all those CRUD operations into methods that dispatch on the content type; once you have comments, comment creation, update, reading and deletion will be mostly identical to the posting. A lot of code duplication. Instead, abstract out the common code (and save yourself from database backend dependency by writing CREATE, VIEW, UPDATE and DELETE methods.


Thanks for the suggestions -- I agree with you completely.

Much of the code can be refactored in some way, and parts of it can be significantly abstracted. I wanted to get something up quickly, so the end result is certainly flawed.

But the nice thing about Clojure is that these kinds of changes can be made rather painlessly -- at least, in comparison to other languages.


This was a weekend project, and I am by no means an expert in Clojure (or Compojure). Also, I would be curious to know how it runs in IE...


In ie8 on XP SP2 the margins are off.

Your javascript appears to work properly.

http://imgur.com/yGDLc


Thanks, I will have to find out what is causing that...


Nice! I am currently learning Clojure, and I will be sure to follow along. Thanks, and good job. FWIW, the site looks fine in FF3.5 and Safari on the Mac. Looking forward to future posts.


Verbs in URIs smell. show == GET

Thanks for sharing your experience.


"Functional" as in...?


It was meant to be a pun.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: