Live data from Hacker News

Try Clojure

try-clojure.org

11–20 of 63 posts

Re: Try Clojure

#11

Without emacs and its plethora of hellspawn requirements for a decent clojure environment, I just don't feel comfortable!! Grats on a nice web-based repl though :)

Yeah, yesterday I decided I wanted to do something with Lisp again, and I figured that Clojure was the hot new kid on the block, so I should use that, and now it's tonight and I still don't have SLIME hooked up to Clojure, presumably because there's no actual guide to anything, and any howto that anybody made is guaranteed to be out of date almost before they post it. Clojure is really appealing otherwise, though, as…

I had a similar problem, and by far the easiest thing for me has been:

1) Add lein-swank to the dev-dependencies of the project I'm working on (i.e., add this - :dev-dependencies [[leiningen/lein-swank "1.1.0"]] - to your project.clj file

2) lein deps

3) lein swank

4) M-x slime-connect in emacs, then accept the default host/port

edit: Blogged it http://increasinglyfunctional.com/2010/05/18/my-swank-clojur...

Re: Try Clojure

#13
Nice work.

Assuming you're trying to advocate Clojure, I'd recommend changing your tutorial to make things look easy (as opposed to highlighting gotchas). I recommend doing math examples first. Show how it makes a good calculator, but avoid discussion of ratios. That's (unnecessarily) confusing.. just like everything in the hello world example starting from the nil output on.

By the time I got to the sequence page, I just hit next to see if there was anything else of interest. I'd already gotten the strong impression this new language would just make my life harder. Worst of all though was when I flubbed up and typed (/4 3) rather than (/ 4 3).

Re: Try Clojure

#14

Earlier quoted context omitted.

Yeah, yesterday I decided I wanted to do something with Lisp again, and I figured that Clojure was the hot new kid on the block, so I should use that, and now it's tonight and I still don't have SLIME hooked up to Clojure, presumably because there's no actual guide to anything, and any howto that anybody made is guaranteed to be out of date almost before they post it. Clojure is really appealing otherwise, though, as…

I had a similar problem, and by far the easiest thing for me has been: 1) Add lein-swank to the dev-dependencies of the project I'm working on (i.e., add this - :dev-dependencies [[leiningen/lein-swank "1.1.0"]] - to your project.clj file 2) lein deps 3) lein swank 4) M-x slime-connect in emacs, then accept the default host/port edit: Blogged it http://increasinglyfunctional.com/2010/05/18/my-swank-clojur...

I'm about to try that (in the middle of trying another thing at the moment), and this isn't to you in particular, but as a general complaint, why do I have to have a project.clj file to get a nice repl in emacs?

Re: Try Clojure

#15

Earlier quoted context omitted.

I had a similar problem, and by far the easiest thing for me has been: 1) Add lein-swank to the dev-dependencies of the project I'm working on (i.e., add this - :dev-dependencies [[leiningen/lein-swank "1.1.0"]] - to your project.clj file 2) lein deps 3) lein swank 4) M-x slime-connect in emacs, then accept the default host/port edit: Blogged it http://increasinglyfunctional.com/2010/05/18/my-swank-clojur...

I'm about to try that (in the middle of trying another thing at the moment), and this isn't to you in particular, but as a general complaint, why do I have to have a project.clj file to get a nice repl in emacs?

if you have slime installed, you should just be able to "M-x slime" to open a clojure REPL. At least that's how it works in my emacs.

Re: Try Clojure

#16
Nicely done. Would be nice to support copy/paste into the editor. Get rid of the dark grey background on code snippets in the tutorial -- very difficult to read.

Having REPL inline with the tutorial is great...wish someone would build something similar for Haskell.

Re: Try Clojure

#17
post #16

Nicely done. Would be nice to support copy/paste into the editor. Get rid of the dark grey background on code snippets in the tutorial -- very difficult to read. Having REPL inline with the tutorial is great...wish someone would build something similar for Haskell.

http://tryhaskell.org/

Re: Try Clojure

#20
A Clojure REPL that works on iPhone and iPad platforms. Will the wonders of web application delivery never cease? :)
Post reply on HN