Hacker News new | past | comments | ask | show | jobs | submit login
Clojure Links To Get You Up To Speed (mattsears.com)
44 points by mattsears on June 10, 2009 | hide | past | favorite | 11 comments



The tutorial by Mark Volkmann is great, and worth reading even if you already program in clojure for a while. There were more then a couple of things I'd skipped on learning in the beginning, or that were introduced after I first read the docs.


I've been looking for something like this for a while. Thanks!


Awesome. This one is definitely getting bookmarked. I'm definitely planning my next project around Clojure, just to learn the language (my current project is in Erlang and mostly because I got the book for it first).


Cool. I just set up a Clojure dev environment.

My questions:

1. can I make the REPL do "up arrow goes back in your command history" like BASH does?

edit: found the answer to this in one of the tutorials

2. Is clojure a good choice for making a screen scraping bot? normally I would use Perl or Ruby for this.

3. Is clojure (or any lisp) a good choice for doing complicated data analysis?


1. most people don't make significant use out of the basic REPL. They use one integrated in to their editor/IDE. Emacs/Slime is probably the most popular, but I think there are addons for the Java IDEs too.

2. That may depend on what you're scraping. Manipulating semi-structured text data is one of Perl's biggest uses, so it may work a bit better than Clojure for the same purpose. Clojure certainly has decent regex and string capabilities though, so yes, it's a good choice.

3. Yes. There's a very good dataflow library for Common Lisp called Cells. It provides dependent and independent variables that work a lot like spreadsheet cells within a program. There's a partial port to Clojure. Also, Clojure has watchers - functions that can be attached to reference types and run whenever their state changes. Clojure and Common Lisp are quite fast at math, especially with type annotations.


I got a sLIME environment set up and found a screen scraping tutorial. It is a regexp based tutorial which seems very Perlish. I guess I was wondering if there was going to be a magical Lisp pattern matching way of doing this. I'm building an aggregator of content for an industry filled with a bunch of jokers who don't have RSS feeds, clean HTML and are bad at keeping things consistent.

Next up, I'm checking out Cells. (that's for a different project than the scraper)

Thanks!


Regarding #2, I believe altlaw.org is exactly such a project. To the best of my knowledge, a screen scraping bot/webapp is the largest clojure project to date.


Thanks for bringing altlaw.org to my attention; lately I've been looking for examples of Clojure being used to do lots of string processing. I've found a presentation of the altlaw project here: http://files.meetup.com/1228907/altlaw-hadoop-meetup-2009-02...


this is great info, much thanks.


There is an excellent Clojure library for screen scraping. It's called Enlive, it's works via CSS3 selectors and thus very powerful and clean:

http://github.com/cgrand/enlive/tree/master


In case anyone is thinking about buying the book: Buy it. It's very good, and it's always nice to have a copy you can leaf through.




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: