diff --git a/article.html b/article.html index 46b6e9f..1e37f21 100644 --- a/article.html +++ b/article.html @@ -562,130 +562,34 @@

Clojure Overview

Getting Started

-

- Clojure is a relatively new language. - It was first released on October 16, 2007 - after a couple of years of work. - The main Clojure download is referred to as "Clojure proper" - or the "core". - It can be obtained from - http://clojure.org/downloads. - Another option is to use - Leiningen. - The latest source can be obtained from its Git repository. -

-

- "Clojure Contrib" is - a repository for contributed libraries. - Some of its libraries are mature, commonly used and - may eventually be included in Clojure proper. - However, it's also the case that some of the older monolithic - contrib modules were - not mature, not commonly used nor - targeted for inclusion in Clojure proper. - It was a mixed bag. As part of the Clojure 1.3.0 roadmap, - the monolithic contrib library has been deprecated and is - no longer being maintained. In its place are a series of - independent contrib libraries that have been approved by - Clojure/core and have active maintainers and their own - projects on JIRA where bugs can be reported: - http://dev.clojure.org/jira/secure/BrowseProjects.jspa#all. - For documentation on these new libraries, see - http://dev.clojure.org/display/doc/Clojure+Contrib -

-

- Currently there is no "all inclusive" JAR for Clojure Contrib. - Individual contrib libraries can be included via Maven or - Leiningen by specifying the dependency. The easiest way to find - the latest version and the artifact ID is to follow the links on - this page, which also shows how the old monolithic contrib maps - to the new modular contrib libraries: - http://dev.clojure.org/display/design/Where+Did+Clojure.Contrib+Go. - Maven can be obtained from - http://maven.apache.org/. - Leiningen can be obtained from the link above. -

-

- To build from the most recent source, - assuming you have - Git, - Ant - and Maven installed, - run the following commands - to retrieve and build Clojure proper: -

-
-
-git clone git://github.com/clojure/clojure.git
-cd clojure
-ant clean jar
-# or: mvn package
-cd ..
-# for each modular contrib library, e.g., clojure.java.jdbc: 
-git clone git://github.com/clojure/java.jdbc.git
-cd java.jdbc
-mvn package
-
-
-

- Next, create a script to run the Read/Eval/Print Loop (REPL) - and to run Clojure programs. - This is typically named "clj". - Use of the REPL is explained later. - The simplest possible Windows script to do both things contains - the following single line - (for UNIX, Linux and Mac OS X, change %1 to $1): -

-
-
-java -jar path/clojure-version.jar %1
-
-
-

- This script assumes that java can be found in - a directory included in the PATH environment variable. - To make this script more useful: -

- -

- Using this script to start a REPL is described later. - Using the script to run a Clojure source file, - which typically has a .clj extension, - is done as follows: -

-
-
-clj source-file-path
+
+    

Clojure code for your own library and application projects will + typically reside in its own directory (named after the project) + and will be managed by + the Leiningen + project management tool. Leiningen (or "lein" for short) will + take care of downloading Clojure for you and making it available + to your projects. To start using Clojure, you don't need to + install Clojure, nor deal with jar files or + the java command — just install and use + lein (instructions on the Leiningen homepage, linked to above).

+ +

Once you've installed lein, create a trivial project to start + playing around with:

+
+
cd ~/temp
+lein new my-proj
+cd my-proj
+lein repl     # starts up the interactive REPL
 

- For more details, see - http://clojure.org/getting_started and - http://clojure.org/repl_and_main. -

-

- In order to take maximum advantage of multiple processors, - it may be necessary to start Clojure with - "java -server ...". + To create a new application project, do + "lein new app my-app"

- Command-line arguments passed to a Clojure program are available - in the predefined binding *command-line-args*. + For more about getting started, see + http://dev.clojure.org/display/doc/Getting+Started.

Clojure Syntax

@@ -5692,7 +5596,8 @@

Libraries

Many libraries of Clojure functions and macros that support capabilities beyond what is in Clojure proper - have been contributed. + have been contributed and are part of + Clojure Contrib. Some of these that were not discussed earlier are summarized below. In addition, many the known libraries are described at http://clojure.org/libraries.