Changes between Version 62 and Version 63 of Clojure Client Tutorial


Ignore:
Timestamp:
Aug 22, 2011 11:16:43 AM (13 years ago)
Author:
kedwar10
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Clojure Client Tutorial

    v62 v63  
    55== Getting Started ==
    66
    7 The first thing you need before using this client is the Leiningen script.  This tool makes managing clojure projects relatively easy by providing a REPL, automatically downloading dependencies, compiling your projects into jar files, and many other useful abilities.  You can download Leiningen and read its tutorial here
     7The first thing you need before using this client is the Leiningen script.  This tool makes managing clojure projects relatively easy by providing a REPL, automatically downloading dependencies, compiling your projects into jar files, and many other useful capabilities.  You can download Leiningen and read its tutorial here
    88* Script [[https://github.com/technomancy/leiningen]].
    99* Tutorial [[https://github.com/technomancy/leiningen/blob/stable/doc/TUTORIAL.md]].
    10 If you're having trouble with leiningen, type "lein help" in the shell to see available commands (you can configure leiningen individually for each project, however, so these will differ depending on which directory you are in). Leiningen supports integration with emacs via the swank/slime mechanism, and if you're bent on using this, you can read up on it here [[http://dev.clojure.org/display/doc/Getting+Started]] (I strongly recommend that you don't attempt this unless you're a emacs expert, as you will likely have to tweak emacs quite a bit to get it working; a simpler solution is to use gvim with the vimclojure script: this provides syntax highlighting and indentation and works out of the box).
    11 
    12 Once you have the script in a directory of your choice, add the following to your .cshrc file (assuming you are using the c shell; else lookup specific instructions for your shell)
     10If you're having trouble with leiningen, type "lein help" in the shell to see available commands (you can configure leiningen individually for each project, however, so these will differ depending on which directory you are in). Leiningen supports integration with a variety of text editors, but the most Clojure developers prefer to use emacs with the swank/slime mechanism (the setup can be quite involved however).  An alternative is to use the vimclojure plugin for vim (this is not as powerful as slime, but has the compensating advantage of working straight out of the box).  Follow the link for more details.
     11* Getting Started [[http://dev.clojure.org/display/doc/Getting+Started]].
     12
     13Once you have the script in a directory of your choice (and have made it executable), add the following to your .cshrc file (assuming you are using the c shell; else lookup specific instructions for your shell)
    1314
    1415{{{
     
    1819You could skip this step but it will less convenient later on for debugging.
    1920
    20 At this point I recommend reading "Joy of Clojure", by Michael Fogus and Chris Houser. This is an excellent introduction to clojure if you are already familiar with lisp or scheme.  Much of the inspiration for this client comes from this book so if you're having trouble figuring out what is going on, this will provide most of the background you will need.  If you're short on time or funds, just search for online tutorials, there are plenty out there.  If you need to quickly look up the documentation on any particular function, just type "(doc <function name>)" in the REPL (This will also work for functions that you define provided that you wrote docstrings or added meta-data).
     21While a background in Scheme and Java should be sufficient to immediately start working with the client, an excellent overview of the idiomatic use of Clojure can be found in "Joy of Clojure", by Michael Fogus and Chris Houser.  If you need to quickly look up the documentation on any particular function, just type "(doc <function name>)" in the REPL (This will also work for functions that you define provided that you wrote docstrings or added meta-data).
    2122
    2223Lisp and Scheme resources: