<?xml version="1.0" encoding="UTF-8"?>
<feed xml:lang="en-US" xmlns="http://www.w3.org/2005/Atom">
  <title>PaulBarry.com - Getting Started with Clojure and Aquamacs</title>
  <subtitle type="html">My thoughts, ideas, questions and concerns on technology, sports, music and life</subtitle>
  <id>tag:paulbarry.com,2007:Paulbarry.com</id>
  <generator uri="http://www.paulbarry.com" version="3.0">PaulBarry.com</generator>
  <link href="http://paulbarry.com/xml/atom/article/4906/feed.xml" rel="self" type="application/atom+xml"/>
  <link href="http://paulbarry.com/articles/2008/07/02/getting-started-with-clojure-and-aquamacs" rel="alternate" type="text/html"/>

  <updated>2008-11-21T15:08:08-05:00</updated>
  <entry>
    <author>
      <name>Paul Barry</name>
      <email>mail@paulbarry.com</email>
    </author>
    <id>urn:uuid:2f0f9a76-da0c-4f00-8590-cf53113ae747</id>

    <published>2008-07-02T18:34:17-04:00</published>
    <updated>2008-07-02T18:34:17-04:00</updated>
    <title type="html">Getting Started with Clojure and Aquamacs</title>
    <link href="http://paulbarry.com/articles/2008/07/02/getting-started-with-clojure-and-aquamacs" rel="alternate" type="text/html"/>

    <category term="technology" scheme="http://paulbarry.com/articles/category/technology" label="Technology"/>
        <category term="Clojure" scheme="http://paulbarry.com/articles/tag/clojure"/>
    <category term="Emacs" scheme="http://paulbarry.com/articles/tag/emacs"/>
    <category term="lisp" scheme="http://paulbarry.com/articles/tag/lisp"/>
    <category term="Aquamacs" scheme="http://paulbarry.com/articles/tag/aquamacs"/>
        <summary type="html">&lt;p&gt;I just posted a short screencast on how to get started with &lt;a href=&quot;http://clojure.org&quot;&gt;Clojure&lt;/a&gt; and &lt;a href=&quot;http://aquamacs.org&quot;&gt;Aquamacs&lt;/a&gt;:&lt;/p&gt;

&lt;p&gt;&lt;object type=&quot;application/x-shockwave-flash&quot; data=&quot;http://blip.tv/scripts/flash/showplayer.swf?enablejs=true&amp;amp;feedurl=http%3A%2F%2Fpaulbarry%2Eblip%2Etv%2Frss&amp;amp;file=http%3A%2F%2Fblip%2Etv%2Frss%2Fflash%2F1051238%3Freferrer%3Dblip%2Etv%26source%3D1&amp;amp;showplayerpath=http%3A%2F%2Fblip%2Etv%2Fscripts%2Fflash%2Fshowplayer%2Eswf&quot; width=&quot;640&quot; height=&quot;510&quot; allowfullscreen=&quot;true&quot; id=&quot;showplayer&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://blip.tv/scripts/flash/showplayer.swf?enablejs=true&amp;amp;feedurl=http%3A%2F%2Fpaulbarry%2Eblip%2Etv%2Frss&amp;amp;file=http%3A%2F%2Fblip%2Etv%2Frss%2Fflash%2F1051238%3Freferrer%3Dblip%2Etv%26source%3D1&amp;amp;showplayerpath=http%3A%2F%2Fblip%2Etv%2Fscripts%2Fflash%2Fshowplayer%2Eswf&quot; /&gt;&lt;param name=&quot;quality&quot; value=&quot;best&quot; /&gt;&lt;embed src=&quot;http://blip.tv/scripts/flash/showplayer.swf?enablejs=true&amp;amp;feedurl=http%3A%2F%2Fpaulbarry%2Eblip%2Etv%2Frss&amp;amp;file=http%3A%2F%2Fblip%2Etv%2Frss%2Fflash%2F1051238%3Freferrer%3Dblip%2Etv%26source%3D1&amp;amp;showplayerpath=http%3A%2F%2Fblip%2Etv%2Fscripts%2Fflash%2Fshowplayer%2Eswf&quot; quality=&quot;best&quot; width=&quot;640&quot; height=&quot;510&quot; name=&quot;showplayer&quot; type=&quot;application/x-shockwave-flash&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/p&gt;

&lt;p&gt;One of the fun features of Clojure, or any Lisp I suppose, is the interactive development workflow.  As you can see in the video, you write code by creating expressions that define functions and then you evaluate those functions in the REPL (Read-Eval-Print-Loop).  You can redefine a function at any time.  You can imagine that if you had a production system running, you could connect to it via a REPL or something like that, evaluate some expressions that redefine functions that contain bugs, and the system would be fixed with no downtime.&lt;/p&gt;

&lt;p&gt;Here&apos;s the contents of the &lt;code&gt;~/bin/clj&lt;/code&gt; script:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;#!/bin/bash 

SRC_DIR=/Users/pbarry/src

CLOJURE_JAR=$SRC_DIR/clojure/clojure.jar
JLINE_JAR=$SRC_DIR/jline/jline-0.9.94.jar

if [ -z &quot;$1&quot; ]; then 
    java -cp $JLINE_JAR:$CLOJURE_JAR jline.ConsoleRunner clojure.lang.Repl    
else
    java -cp $CLOJURE_JAR clojure.lang.Script $1
fi
&lt;/code&gt;&lt;/pre&gt;
</summary>
    <content type="html">&lt;p&gt;I just posted a short screencast on how to get started with &lt;a href=&quot;http://clojure.org&quot;&gt;Clojure&lt;/a&gt; and &lt;a href=&quot;http://aquamacs.org&quot;&gt;Aquamacs&lt;/a&gt;:&lt;/p&gt;

&lt;p&gt;&lt;object type=&quot;application/x-shockwave-flash&quot; data=&quot;http://blip.tv/scripts/flash/showplayer.swf?enablejs=true&amp;amp;feedurl=http%3A%2F%2Fpaulbarry%2Eblip%2Etv%2Frss&amp;amp;file=http%3A%2F%2Fblip%2Etv%2Frss%2Fflash%2F1051238%3Freferrer%3Dblip%2Etv%26source%3D1&amp;amp;showplayerpath=http%3A%2F%2Fblip%2Etv%2Fscripts%2Fflash%2Fshowplayer%2Eswf&quot; width=&quot;640&quot; height=&quot;510&quot; allowfullscreen=&quot;true&quot; id=&quot;showplayer&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://blip.tv/scripts/flash/showplayer.swf?enablejs=true&amp;amp;feedurl=http%3A%2F%2Fpaulbarry%2Eblip%2Etv%2Frss&amp;amp;file=http%3A%2F%2Fblip%2Etv%2Frss%2Fflash%2F1051238%3Freferrer%3Dblip%2Etv%26source%3D1&amp;amp;showplayerpath=http%3A%2F%2Fblip%2Etv%2Fscripts%2Fflash%2Fshowplayer%2Eswf&quot; /&gt;&lt;param name=&quot;quality&quot; value=&quot;best&quot; /&gt;&lt;embed src=&quot;http://blip.tv/scripts/flash/showplayer.swf?enablejs=true&amp;amp;feedurl=http%3A%2F%2Fpaulbarry%2Eblip%2Etv%2Frss&amp;amp;file=http%3A%2F%2Fblip%2Etv%2Frss%2Fflash%2F1051238%3Freferrer%3Dblip%2Etv%26source%3D1&amp;amp;showplayerpath=http%3A%2F%2Fblip%2Etv%2Fscripts%2Fflash%2Fshowplayer%2Eswf&quot; quality=&quot;best&quot; width=&quot;640&quot; height=&quot;510&quot; name=&quot;showplayer&quot; type=&quot;application/x-shockwave-flash&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/p&gt;

&lt;p&gt;One of the fun features of Clojure, or any Lisp I suppose, is the interactive development workflow.  As you can see in the video, you write code by creating expressions that define functions and then you evaluate those functions in the REPL (Read-Eval-Print-Loop).  You can redefine a function at any time.  You can imagine that if you had a production system running, you could connect to it via a REPL or something like that, evaluate some expressions that redefine functions that contain bugs, and the system would be fixed with no downtime.&lt;/p&gt;

&lt;p&gt;Here&apos;s the contents of the &lt;code&gt;~/bin/clj&lt;/code&gt; script:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;#!/bin/bash 

SRC_DIR=/Users/pbarry/src

CLOJURE_JAR=$SRC_DIR/clojure/clojure.jar
JLINE_JAR=$SRC_DIR/jline/jline-0.9.94.jar

if [ -z &quot;$1&quot; ]; then 
    java -cp $JLINE_JAR:$CLOJURE_JAR jline.ConsoleRunner clojure.lang.Repl    
else
    java -cp $CLOJURE_JAR clojure.lang.Script $1
fi
&lt;/code&gt;&lt;/pre&gt;
</content>
  </entry>
  <entry>
    <author>
      <name>Lombardi</name>
    </author>
    <id>urn:uuid:cca01541-0315-41e9-9dde-1845ee9d853a</id>
    <published>2008-07-02T21:41:10-04:00</published>
    <updated>2008-07-02T21:41:10-04:00</updated>
    <title type="html">Comment on "Getting Started with Clojure and Aquamacs" by Lombardi</title>
    <link href="http://paulbarry.com/articles/2008/07/02/getting-started-with-clojure-and-aquamacs#comment-5155" rel="alternate" type="text/html"/>
    <content type="html">Awesome.</content>
  </entry>
  <entry>
    <author>
      <name>David J.</name>
    </author>
    <id>urn:uuid:d88bc11f-fba7-4a2b-8e50-e89fb7230720</id>
    <published>2008-11-02T19:19:14-05:00</published>
    <updated>2008-11-02T19:19:14-05:00</updated>
    <title type="html">Comment on "Getting Started with Clojure and Aquamacs" by David J.</title>
    <link href="http://paulbarry.com/articles/2008/07/02/getting-started-with-clojure-and-aquamacs#comment-5221" rel="alternate" type="text/html"/>
    <content type="html">Thanks for sharing this!</content>
  </entry>
  <entry>
    <author>
      <name>JMan</name>
    </author>
    <id>urn:uuid:64bd4e5e-6942-47c9-8d3b-7adf6c9b2df8</id>
    <published>2008-11-03T14:36:09-05:00</published>
    <updated>2008-11-03T14:36:09-05:00</updated>
    <title type="html">Comment on "Getting Started with Clojure and Aquamacs" by JMan</title>
    <link href="http://paulbarry.com/articles/2008/07/02/getting-started-with-clojure-and-aquamacs#comment-5222" rel="alternate" type="text/html"/>
    <content type="html">Very helpful. Thank you. Here is that customization.el snippet for your copy / paste pleasure:&lt;br/&gt;&lt;br/&gt;---&lt;br/&gt;(add-to-list &apos;load-path &amp;quot;~/clojure/clojure-mode&amp;quot;)&lt;br/&gt;(setq inferior-lisp-program &amp;quot;clj&amp;quot;)&lt;br/&gt;(require &apos;clojure-mode)&lt;br/&gt;(setq auto-mode-alist&lt;br/&gt;      (cons &apos;(&amp;quot;\\.clj$&amp;quot; . clojure-mode)&lt;br/&gt;            auto-mode-alist))&lt;br/&gt;&lt;br/&gt;(add-hook &apos;clojure-mode-hook&lt;br/&gt;           &apos;(lambda ()&lt;br/&gt;              (define-key clojure-mode-map &amp;quot;\C-c\C-e&amp;quot; &apos;lisp-eval-last-sexp)))&lt;br/&gt;---&lt;br/&gt;&lt;br/&gt;Also, this may be an obvious point, but make sure the clj executable is in your path and properly CHMODed. &lt;br/&gt;</content>
  </entry>
  </feed>