ANN: labrepl, making Clojure more accessible

107 views
Skip to first unread message

Stuart Halloway

unread,
Mar 23, 2010, 10:13:11 AM3/23/10
to clo...@googlegroups.com
The labrepl project (http://github.com/relevance/labrepl) is a
tutorial environment for learning Clojure. It is open source under the
same license as Clojure. Whether you are learning Clojure on your own,
or teaching or learning in a classroom environment, I want labrepl to
be useful to you.

Features:

* A compojure-based application that delivers step-by-step
instructions for writing Clojure code
* lab instructions, solutions, and tests (currently enough for 3-4
days of instructor-led training, YMMV)
* IDE integration (ish, see below)

Help wanted:

As the creator of labrepl, I intend to keep it up to date. I will be
adding new labs, adding new features, and making sure that the labs
all work with whatever new hotness appears in the Clojure language.
But I need your help. Specifically, I would like volunteers to sign up
for the following tasks:

(1) NetBeans integration: Test the instructions in the README and make
sure that they work, and show off NetBeans/Enclojure in its best
light. Bonus credit for writing a lab specifically on using Enclojure.
(2) CounterClockwise integration: Ditto above but for Eclipse/
Counterclockwise.
(3) IDEA integration: Ditto but for IDEA/La Clojure.
(4) Maven integration. The instruction use leiningen and project.clj,
but the maven pom.xml is checked in. For Java folks, it might be
easier to have instructions that just use maven and skip leiningen.
(5) Out-of-box experience audit. Is the leiningen-based setup easy
enough? If not, please make something simpler (maybe shell scripts
that pull the libs from a download site?)
(6) Better windows instructions/integration.

Let's make getting started with Clojure easier!

Stu

Michael Kohl

unread,
Mar 23, 2010, 10:28:31 AM3/23/10
to clo...@googlegroups.com
First off, great work on labrepl! I told people about it last night at
our functional programming user group and they seemed to like the
concept a lot :-)

On Tue, Mar 23, 2010 at 3:13 PM, Stuart Halloway
<stuart....@gmail.com> wrote:

> (5) Out-of-box experience audit. Is the leiningen-based setup easy enough?

IMHO it's perfect since it's simple, well documented and also
introduces new Clojurians to Leiningen right away.

Tonight I'll hopefully have some time to go through the labs and fix
some more minor formatting issues and typos :-)

Michael

Rich Hickey

unread,
Mar 23, 2010, 10:34:30 AM3/23/10
to clo...@googlegroups.com

On Mar 23, 2010, at 10:13 AM, Stuart Halloway wrote:

> The labrepl project (http://github.com/relevance/labrepl) is a
> tutorial environment for learning Clojure. It is open source under
> the same license as Clojure. Whether you are learning Clojure on
> your own, or teaching or learning in a classroom environment, I want
> labrepl to be useful to you.
>
> Features:
>
> * A compojure-based application that delivers step-by-step
> instructions for writing Clojure code
> * lab instructions, solutions, and tests (currently enough for 3-4
> days of instructor-led training, YMMV)
> * IDE integration (ish, see below)
>
> Help wanted:
>
> As the creator of labrepl, I intend to keep it up to date. I will be
> adding new labs, adding new features, and making sure that the labs
> all work with whatever new hotness appears in the Clojure language.
> But I need your help. Specifically, I would like volunteers to sign
> up for the following tasks:
>
> (1) NetBeans integration: Test the instructions in the README and
> make sure that they work, and show off NetBeans/Enclojure in its
> best light. Bonus credit for writing a lab specifically on using
> Enclojure.

I don't see any instructions for Netbeans+ Enclojure

> (2) CounterClockwise integration: Ditto above but for Eclipse/
> Counterclockwise.
> (3) IDEA integration: Ditto but for IDEA/La Clojure.
> (4) Maven integration. The instruction use leiningen and
> project.clj, but the maven pom.xml is checked in. For Java folks, it
> might be easier to have instructions that just use maven and skip
> leiningen.

I don't see pom.xml

Rich

Stuart Halloway

unread,
Mar 23, 2010, 10:37:51 AM3/23/10
to clo...@googlegroups.com
GIt just needed a little push. It's there now. Thanks Rich!

Alex Ott

unread,
Mar 23, 2010, 11:16:15 AM3/23/10
to clo...@googlegroups.com
Hello

Stuart Halloway at "Tue, 23 Mar 2010 10:37:51 -0400" wrote:
SH> GIt just needed a little push. It's there now. Thanks Rich!

It's better to add

<plugins>
<plugin>
<groupId>com.theoryinpractise</groupId>
<artifactId>clojure-maven-plugin</artifactId>
<version>1.3</version>
</plugin>
</plugins>

into <build> section, and

<dependency>
<groupId>swank-clojure</groupId>
<artifactId>swank-clojure</artifactId>
<version>1.1.0-SNAPSHOT</version>
</dependency>

into dependencies - in this case user can get access to 'mvn clojure:repl'
& 'mvn clojure:swank' commands

--
With best wishes, Alex Ott, MBA
http://alexott.blogspot.com/ http://alexott.net
http://alexott-ru.blogspot.com/

Per Vognsen

unread,
Mar 23, 2010, 11:23:04 AM3/23/10
to clo...@googlegroups.com
This is awesome, Stuart. With the live web server, a great addition
would be if the embedded code snippets would be interactively runnable
and tweakable right there in the web page. I'll see about hacking that
in myself.

-Per

> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clo...@googlegroups.com
> Note that posts from new members are moderated - please be patient with your
> first post.
> To unsubscribe from this group, send email to
> clojure+u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
>
> To unsubscribe from this group, send email to
> clojure+unsubscribegooglegroups.com or reply to this email with the words
> "REMOVE ME" as the subject.
>

Meikel Brandmeyer

unread,
Mar 23, 2010, 11:32:52 AM3/23/10
to Clojure
Hi,

On Mar 23, 3:13 pm, Stuart Halloway <stuart.hallo...@gmail.com> wrote:

> (1) NetBeans
> (2) CounterClockwise
> (3) IDEA
> (x) Emacs

Are you also interested in Vim integration?

Sincerely
Meikel

Stuart Halloway

unread,
Mar 23, 2010, 11:37:13 AM3/23/10
to clo...@googlegroups.com
Absolutely! (Shameful admission: I have never touched Vim in my life.)

I figured leaving it out entirely was the fastest way to entice a
contributor. :-)

Stu

Rick Moynihan

unread,
Mar 23, 2010, 1:33:24 PM3/23/10
to clo...@googlegroups.com
On 23 March 2010 14:13, Stuart Halloway <stuart....@gmail.com> wrote:
> The labrepl project (http://github.com/relevance/labrepl) is a tutorial
> environment for learning Clojure. It is open source under the same license
> as Clojure. Whether you are learning Clojure on your own, or teaching or
> learning in a classroom environment, I want labrepl to be useful to you.

Hi Stuart,

I saw your github repo for this the other day and was intrigued after
you mentioned it in your recent screencast.

After taking a look at it, I quite like what I see, but I'm still a
little perplexed on how it is supposed to be used.

Do you care to enlighten the un-enlightened on the workflow and
benefits of labrepl over some plain html tutorials and a standard
clojure REPL?

R.

Stuart Halloway

unread,
Mar 23, 2010, 1:58:10 PM3/23/10
to clo...@googlegroups.com
Sounds like it is time to improve the README. :-)

Run the repl and browse to localhost:8080. Click on a lab to get
started. That's it.

Better than plain HTML:
* Code less susceptible to copy paste errors: it is evaluated in
Clojure before being rendered in the browser. (This doesn't matter a
lot on day 1 but helps with maintainability.)
* The "show me" option makes it easy to try it yourself, or be gently
led by the code.

Better than plain REPL:
* works out of the box
* classpath already correct for fun third-party libs
* IDE setup already done

Better than either:
* Won't fall out of date. Has a test suite, which I run regularly.
* Aspires to be systematic, not just a one-off tutorial on topic A.
(Admittedly not there yet.)

This isn't rocket science, but it is sweating the details. Or it will
be. Make me sweat.

Stu

Meikel Brandmeyer

unread,
Mar 23, 2010, 2:43:49 PM3/23/10
to clo...@googlegroups.com
Hi,

On Tue, Mar 23, 2010 at 11:37:13AM -0400, Stuart Halloway wrote:

> Absolutely! (Shameful admission: I have never touched Vim in my life.)
>
> I figured leaving it out entirely was the fastest way to entice a
> contributor. :-)

Hehe. And I should learn to stay quiet. :)

Sincerely
Meikel

Rich Hickey

unread,
Mar 23, 2010, 3:57:48 PM3/23/10
to Clojure

On Mar 23, 10:13 am, Stuart Halloway <stuart.hallo...@gmail.com>
wrote:

I've shaken out the Netbeans+Enclojure recipe. Thanks to Eric Thorsen
for providing a quick patch to Enclojure so the working directory is
set to the project directory. I've enhanced the docs in the README to
provide a complete recipe. The short of it - just pull labrepl from
git, and Enclojure can do the rest. No command line, no lein, no
maven. The labrepl browser can run from the Enclojure integrated repl.

Rich

Rob Wolfe

unread,
Mar 23, 2010, 4:18:26 PM3/23/10
to clo...@googlegroups.com
Stuart Halloway <stuart....@gmail.com> writes:

> The labrepl project (http://github.com/relevance/labrepl) is a
> tutorial environment for learning Clojure. It is open source under the
> same license as Clojure. Whether you are learning Clojure on your own,
> or teaching or learning in a classroom environment, I want labrepl to
> be useful to you.

It's really great tutorial to start playing with Clojure.
I think it will be very useful for people just wanted
to check what's interesting in Clojure.
So I'm afraid that this requirement:
"""
Make sure you have leiningen installed
(http://github.com/technomancy/leiningen).
"""
might be a little bit too hard to fulfil for beginners.

What about creating standalone ZIP file, which will contain
all necessary components: Clojure, Leiningem and Labrepl?
I have in mind something like this:

|-- bin
| |-- lein
| |-- lein.bat
| |-- repl
| `-- repl.bat
|-- config
| `-- log4j.properties
|-- core
| |-- clojure-1.1.0.jar
| |-- labrepl-0.0.1.jar
| `-- leiningen-1.1.0-standalone.jar
|-- log
|-- project.clj
`-- public

Actually I created such structure myself pretty easy.
I needed just to tweak a little bit: lein, lein.bat,
repl and repl.bat in order to use JARs from "core" subdirectory.

Now in order to start reading this awesome tutorial there are
needed only these steps:
1. unzip labrepl-package.zip
2. cd labrepl-package
3. ./bin/lein deps (Windows: bin\lein deps)
4. ./bin/repl (Windows: bin\repl)

I tried that on Linux and Windows and it just plain works.
I uploaded this ZIP here:
http://github.com/downloads/robwolfe/lein-diagnostics/labrepl-package.zip
in case you want to take a look.

Br,
Rob


Mark Derricutt

unread,
Mar 23, 2010, 4:30:26 PM3/23/10
to clo...@googlegroups.com
1.3.2 is the latest version of the plugin and fixes some issues with the replScript settings ( it actually continues to run the repl, and not just exits - doh!)

--
Pull me down under...
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
clojure+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

To unsubscribe from this group, send email to clojure+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.

Laurent PETIT

unread,
Mar 23, 2010, 4:43:20 PM3/23/10
to clo...@googlegroups.com
I'll do the counterclockwise review tonight, review soon to come

2010/3/23 Stuart Halloway <stuart....@gmail.com>:

Alex Ott

unread,
Mar 24, 2010, 4:39:15 AM3/24/10
to clo...@googlegroups.com
Hello

Mark Derricutt at "Wed, 24 Mar 2010 09:30:26 +1300" wrote:
MD> 1.3.2 is the latest version of the plugin and fixes some issues with the replScript settings ( it actually continues to run the repl, and not
MD> just exits - doh!)

Yes, I already fixed this in my repo and created pull request - now use of
labrepl with maven is very simple - just run of 'mvn clojure:repl'

Lee Spector

unread,
Mar 24, 2010, 7:56:18 AM3/24/10
to clo...@googlegroups.com

Thanks to all who reassured me on the non-interference of lein/labrepl with my existing setup.

I did follow the labrepl getting started instructions, get it working, and see that there's some great stuff in there. Very much appreciated and I may want to use this if I teach Clojure in the fall.

That said, the labrepl "getting started" installation procedure, while certainly a step in the right direction, is still a couple of steps short of the simplicity that I and others have been looking for. I ran into a couple of minor confusions/glitches that I had no real problem overcoming myself but which might trip up others, and I still think there'd be great value in a "download, double click, and it works" package. I can feel the exasperation of those of you who find it incredible that the couple of extra steps, which are things that are as obvious to you as breathing, could hang up someone who is otherwise ready to do significant work with Clojure, but it really is true. Rob's ZIP file package looks like another good step in the right direction but is still not as simple as the procedure for many other languages and still doesn't provide a minimal Clojure-oriented editing environment.

Rich's revision of the Netbeans+Enclojure looks like it might be even closer to what I've been looking for, and I plan to try that out as soon as I get a chance.

Thanks all for all of the support.

-Lee

> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clo...@googlegroups.com
> Note that posts from new members are moderated - please be patient with your first post.
> To unsubscribe from this group, send email to
> clojure+u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
>
> To unsubscribe from this group, send email to clojure+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.

--
Lee Spector, Professor of Computer Science
School of Cognitive Science, Hampshire College
893 West Street, Amherst, MA 01002-3359
lspe...@hampshire.edu, http://hampshire.edu/lspector/
Phone: 413-559-5352, Fax: 413-559-5438

Check out Genetic Programming and Evolvable Machines:
http://www.springer.com/10710 - http://gpemjournal.blogspot.com/

Laurent PETIT

unread,
Mar 24, 2010, 8:44:07 AM3/24/10
to clo...@googlegroups.com
Hi Lee,

Please note that Stuart added to the README the tutorial for Eclipse/ccw.
I wrote it so that if every step works as expected (it did with my own
tests), there is no pre-requisite but having a JVM on your machine :
no need to know/install Git on the command line, no need to
know/install maven command line tool, no need to know/install
leiningen.

Detailed tutorial based along the lines of the Enclojure tutorial, but
for ccw, with the additional step (certainly doable in the enclojure
tutorial, I guess) of installing a Git plugin in Eclipse to
*completely* remove the need to use the command line.

HTH, feedback welcome,

--
Laurent

2010/3/24 Lee Spector <lspe...@hampshire.edu>:

Zmitro Lapcjonak

unread,
Mar 24, 2010, 9:28:12 AM3/24/10
to Clojure
On Mar 23, 4:13 pm, Stuart Halloway <stuart.hallo...@gmail.com> wrote:

> The labrepl project (http://github.com/relevance/labrepl) is a  
> tutorial environment for learning Clojure.

...


> (2) CounterClockwise integration: Ditto above but for Eclipse/

I followed the steps and successfully runned the labrepl with Eclipse
and CCW.

--
Zmitro Lapcionak

Zmitro Lapcjonak

unread,
Mar 24, 2010, 9:31:05 AM3/24/10
to Clojure
On Mar 23, 10:18 pm, Rob Wolfe <r...@smsnet.pl> wrote:

> Stuart Halloway <stuart.hallo...@gmail.com> writes:
> > The labrepl project (http://github.com/relevance/labrepl) is a

> What about creating standalone ZIP file, which will contain


> all necessary components: Clojure, Leiningem and Labrepl?

> I tried that on Linux and Windows and it just plain works.
> I uploaded this ZIP here:http://github.com/downloads/robwolfe/lein-diagnostics/labrepl-package...


> in case you want to take a look.

I took a look :)
Thanks for the zip.

--
Zmitro Lapcionak

Laurent PETIT

unread,
Mar 24, 2010, 9:53:15 AM3/24/10
to clo...@googlegroups.com
2010/3/24 Zmitro Lapcjonak <ido...@gmail.com>:

Good ! Which environment were you using ?

>
> --
> Zmitro Lapcionak

Zmitro Lapcjonak

unread,
Mar 24, 2010, 10:31:19 AM3/24/10
to Clojure

On Mar 24, 3:53 pm, Laurent PETIT <laurent.pe...@gmail.com> wrote:
> 2010/3/24 Zmitro Lapcjonak <idob...@gmail.com>:


>
> > On Mar 23, 4:13 pm, Stuart Halloway <stuart.hallo...@gmail.com> wrote:
>
> >> The labrepl project (http://github.com/relevance/labrepl) is a
> >> tutorial environment for learning Clojure.
> > ...
> >> (2) CounterClockwise integration: Ditto above but for Eclipse/
>
> > I followed the steps and successfully runned the labrepl with Eclipse
> > and CCW.
>
> Good ! Which environment were you using ?

WinXP pro sp3
JDK 1.5
Eclipse 3.5
CCW 0.0.51
Firefox 3.6

--
Zmitro Lapcionak

Laurent PETIT

unread,
Mar 24, 2010, 10:39:23 AM3/24/10
to clo...@googlegroups.com
Cool !

2010/3/24 Zmitro Lapcjonak <ido...@gmail.com>:

invis

unread,
Mar 24, 2010, 11:59:22 AM3/24/10
to Clojure
I am trying to start labrepl with emacs.
Labrepl is working nice, but I cant "slime-connect" :(
Have this message:
"open-network-stream: make client process failed: connection
refused, :name, SLIME Lisp, :buffer, nil, :host, 127.0.0.1, :service,
4005"
Could you tell me how to fix it ?

Kevin

unread,
Mar 23, 2010, 4:42:54 PM3/23/10
to clo...@googlegroups.com

> Help wanted:

> (5) Out-of-box experience audit. Is the leiningen-based setup easy
> enough? If not, please make something simpler (maybe shell scripts
> that pull the libs from a download site?)
> (6) Better windows instructions/integration.

Very nice! I'm looking at it now, on windows XP; only hiccup was that
the readme says use Clojure 1.1 jar, which fails; the dependencies seem
to call for 1.2.0-master-SNAPSHOT, which works (set in lein.bat).

Leiningen setup on Windows isn't too bad, but could be improved. Steps
I followed:

- grab leiningen from github
- edit lein.bat: make LEIN_JAR point to leiningen-1.0.1-standalone.jar
- put lein.bat on the path somewhere
- in leiningen dir, execute "lein compile"
- (lein uberjar will fail, so...)
- edit lien.bat again, change
set CLASSPATH=%CLASSPATH%;"%LEIN_JAR%"
to
set CLASSPATH=%CLASSPATH%;./classes
- execute "lein uberjar", now we're running with the fresh classes and
building a 1.1-version leiningen.jar
- edit lein.bat again: undo the classpath edit, and make LEIN_JAR
point to the newly generated leiningen.jar.

That gives a 1.1-version, standalone leiningen, size around 10MB, can be
run with no other dependencies. After that setup, I've been into both
the Incanter example from earlier, and this labrepl; so it appears to be
working.

Cheers,
Kevin Kelley

Shawn Hoover

unread,
Mar 24, 2010, 12:04:04 PM3/24/10
to clo...@googlegroups.com
It seems the swank server is not being started. I fixed it for Windows here:

I didn't test unix, but it might work with this change.

Kevin

unread,
Mar 24, 2010, 10:53:13 AM3/24/10
to clo...@googlegroups.com
> >
> >> The labrepl project (http://github.com/relevance/labrepl) is a
> >> tutorial environment for learning Clojure.
> > ...
> >> (2) CounterClockwise integration: Ditto above but for Eclipse/
> >
> > I followed the steps and successfully runned the labrepl with Eclipse
> > and CCW.
>
> Good ! Which environment were you using ?

I'll chime in too... I'm on Windows XP; I've been through labrepl setup
with: leiningen; Maven; Netbeans; and CCW, now. Of these:

- leiningen: straightforward; had issues with Windows bootstrap of lein
at first, but seems now to run fine with the default 1.0.1 lein bootstrap.

- Maven: easy to do, but I still have the "no echo in repl" problem when
starting with "mvn clojure:repl". Still don't know why. Using maven to
build, then running script\repl.bat does work.

- Netbeans/Enclojure: fails for me at the "Start Project REPL" step: not
sure yet why. The stack trace seems to say it's not finding sources in
the clojure jars it's using.

- Eclipse/CCW: all good: did a fresh install of eclipse and followed the
recipe for git, maven, and ccw; got a warning that Eclipse was using a JRE
and wanted a JDK (doh) so added a line in eclipse.ini (-vm
c:\jdk1.6\jre\bin\javaw.exe) to give it the jdk's runtime.

The JRE/JDK thing is probably just my bogosity; I let the standard java
updater
put its jre where it wants, but to develop I prefer a known fixed version,
so
I have a JDK placed separately. Therefore, of course the IDE will need to
be
pointed at it. I'd forgotten I'd done that, and Eclipse reminded me.

Anyway: out of all these variations, the CCW one is my favorite, so far.
Feels
very smooth, it's doing a lot of background stuff but doesn't give the feel
of "hidden magic" -- it's clear what's going on, defaults work, etc.

Cheers,
Kevin Kelley

Tchavdar Roussanov

unread,
Mar 24, 2010, 1:47:33 PM3/24/10
to Clojure
> (3) IDEA integration: Ditto but for IDEA/La Clojure.

I have tested labrepl on IntelliJ IDEA Ultimate 9 on Mac: Here are the
steps to install and run:

1. One time setup:

* Get labrepl from github (no need for leiningen).
* Install La Clojure plugin:
* Prefereneces/Plugins/Available, select La Clojure, right click
and download the plugin.
* Restart IDEA.
* Create project labrepl:
* File/Open project, navigate to directory where you pulled
labrepl and select pom.xml file.
* Wait for maven to download deendencies.

2. How to run the labrepl:

* From the menu select Tools/Clojure REPL/Add new Clojure REPL.
* In the integrated REPL:
* (require 'labrepl)
* (labrepl/-main)
* Browse to localhost:8080
* Enjoy!

Tchavdar

Mark Engelberg

unread,
Mar 24, 2010, 8:16:45 PM3/24/10
to clojure
I tried following Rob Wolfe's zip file instructions.  The bin\lein deps command seemed to work fine, but when I then invoked bin\repl, I got the following error:
CLASSPATH=";C:\labrepl-package\lib\ant-1.6.2.jar;C:\labrepl-package\lib\ant-laun
cher-1.6.2.jar;C:\labrepl-package\lib\antlr-2.7.2.jar;C:\labrepl-package\lib\arp
ack-combo-0.1.jar;C:\labrepl-package\lib\autodoc-0.7.0.jar;C:\labrepl-package\li
b\circumspec-0.0.10.jar;C:\labrepl-package\lib\clojure-1.2.0-master-20100323.140
115-17.jar;C:\labrepl-package\lib\clojure-contrib-1.2.0-master-20100122.191106-1
.jar;C:\labrepl-package\lib\clojure-db-object-0.1.1-20091229.021828-2.jar;C:\lab
repl-package\lib\clojure-http-client-1.0.0-20091229.021828-3.jar;C:\labrepl-pack
age\lib\clojure-json-1.1-20091229.021828-4.jar;C:\labrepl-package\lib\commons-co
dec-1.3.jar;C:\labrepl-package\lib\commons-fileupload-1.2.1.jar;C:\labrepl-packa
ge\lib\commons-io-1.4.jar;C:\labrepl-package\lib\compojure-0.3.2.jar;C:\labrepl-
package\lib\congomongo-0.1.2-20100215.165114-3.jar;C:\labrepl-package\lib\enlive
-1.0.0-20100308.145053-13.jar;C:\labrepl-package\lib\gnujaxp-1.jar;C:\labrepl-pa
ckage\lib\incanter-charts-1.2.0-20100321.173117-8.jar;C:\labrepl-package\lib\inc
anter-chrono-1.2.0-20100321.173117-9.jar;C:\labrepl-package\lib\incanter-core-1.
2.0-20100321.173117-11.jar;C:\labrepl-package\lib\incanter-full-1.2.0-20100321.1
73117-7.jar;C:\labrepl-package\lib\incanter-io-1.2.0-20100321.173117-9.jar;C:\la
brepl-package\lib\incanter-mongodb-1.2.0-20100321.173117-7.jar;C:\labrepl-packag
e\lib\incanter-pdf-1.2.0-20100321.173117-6.jar;C:\labrepl-package\lib\incanter-p
rocessing-1.2.0-20100321.173117-7.jar;C:\labrepl-package\lib\itext-1.4.jar;C:\la
brepl-package\lib\jcommon-1.0.16.jar;C:\labrepl-package\lib\jetty-6.1.21.jar;C:\
labrepl-package\lib\jetty-util-6.1.21.jar;C:\labrepl-package\lib\jfreechart-1.0.
13.jar;C:\labrepl-package\lib\jline-0.9.94.jar;C:\labrepl-package\lib\joda-time-
1.6.jar;C:\labrepl-package\lib\junit-3.8.1.jar;C:\labrepl-package\lib\log4j-1.2.
14.jar;C:\labrepl-package\lib\mongo-java-driver-1.1.0-20091229.021828-3.jar;C:\l
abrepl-package\lib\netlib-java-0.9.1.jar;C:\labrepl-package\lib\opencsv-2.0.1.ja
r;C:\labrepl-package\lib\parallelcolt-0.7.2.jar;C:\labrepl-package\lib\postgresq
l-8.4-701.jdbc4.jar;C:\labrepl-package\lib\processing-core-1.jar;C:\labrepl-pack
age\lib\servlet-api-2.5-20081211.jar;C:\labrepl-package\lib\stringtemplate-2.2.j
ar;C:\labrepl-package\lib\swank-clojure-1.1.0.jar;C:\labrepl-package\lib\tagsoup
-1.2.jar";";C:\labrepl-package\core\clojure-1.1.0.jar;C:\labrepl-package\core\la
brepl-0.0.1.jar;C:\labrepl-package\core\leiningen-1.1.0-standalone.jar";.;C:\Pro
gram Files\Java\jre6\lib\ext\QTJava.zip;src;test;config;data
Exception in thread "main" java.lang.NoClassDefFoundError: Files\Java\jre6\lib\e
xt\QTJava/zip;src;test;config;data
Caused by: java.lang.ClassNotFoundException: Files\Java\jre6\lib\ext\QTJava.zip;
src;test;config;data
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClassInternal(Unknown Source)
Could not find the main class: Files\Java\jre6\lib\ext\QTJava.zip;src;test;confi
g;data.  Program will exit.

Rob Wolfe

unread,
Mar 25, 2010, 3:38:38 AM3/25/10
to Clojure

On 25 Mar, 01:16, Mark Engelberg <mark.engelb...@gmail.com> wrote:
> I tried following Rob Wolfe's zip file instructions.  The bin\lein deps
> command seemed to work fine, but when I then invoked bin\repl, I got the
> following error:

[...]

> brepl-0.0.1.jar;C:\labrepl-package\core\leiningen-1.1.0-standalone.jar";.;C :\Pro
> gram Files\Java\jre6\lib\ext\QTJava.zip;src;test;config;data
> Exception in thread "main" java.lang.NoClassDefFoundError:
> Files\Java\jre6\lib\e
> xt\QTJava/zip;src;test;config;data
> Caused by: java.lang.ClassNotFoundException:
> Files\Java\jre6\lib\ext\QTJava.zip;
> src;test;config;data

Yeah, there is a bug in repl.bat. This error occurs when there is a
path
with spaces on class path.
Change this line in repl.bat:
set CLASSPATH=%CPLIB%;%CPCORE%;%CLASSPATH%;src;test;config;data

like this:
set CLASSPATH=%CPLIB%;%CPCORE%;"%CLASSPATH%";src;test;config;data

(note quotation marks around %CLASSPATH%)

HTH,
Rob

Sophie

unread,
Mar 26, 2010, 2:35:40 PM3/26/10
to Clojure
Just tried this with NetBeans 6.7.1 on OSX 10.5.8. Got through all
setup steps with no problem. When I try to start the project REPL, I
get:

"There did not appear to be both valid clojure and clojure-contrib
jars present in the classpath... (some paths to ...1.2.0-master-
SNAPSHOT.jar)"

If I elect "Use the default platform Clojure-1.0.0", a REPL starts,
then (require 'labrepl) gives FileNotFoundException for clojure/
contrib/logging__init.class & logging.clj

HTH.


chessguy

unread,
Mar 27, 2010, 1:23:47 PM3/27/10
to Clojure
I get this exact same error. Would love to know how to get around it.

Eric Thorsen

unread,
Mar 28, 2010, 7:30:52 PM3/28/10
to clo...@googlegroups.com
I just sent you a message before I saw this...
I'm in the midst of cutting a new release of the Enclojure plugin and I'm working on also providing a prepackaged version of Netbeans with the Enclojure plugin installed.  I wanted to include the LapRepl in the release and the pre-packaged netbeans (assuming that is ok?).
Users can keep up to date using maven yes?
mvn scm:update

The steps can be:
download prepackaged Netbeans with Enclojure.
Create the sample project (Labrepl).
Build the project and start a project REPL.

They follow the rest of the steps to starting up the LabRepl and they are up and running.

I'm testing on windows and Ubuntu and hope to have this up in the next day or so.
Eric
 

On Tue, Mar 23, 2010 at 10:13 AM, Stuart Halloway <stuart....@gmail.com> wrote:
The labrepl project (http://github.com/relevance/labrepl) is a tutorial environment for learning Clojure. It is open source under the same license as Clojure. Whether you are learning Clojure on your own, or teaching or learning in a classroom environment, I want labrepl to be useful to you.


Features:

* A compojure-based application that delivers step-by-step instructions for writing Clojure code
* lab instructions, solutions, and tests (currently enough for 3-4 days of instructor-led training, YMMV)
* IDE integration (ish, see below)

Help wanted:

As the creator of labrepl, I intend to keep it up to date. I will be adding new labs, adding new features, and making sure that the labs all work with whatever new hotness appears in the Clojure language. But I need your help. Specifically, I would like volunteers to sign up for the following tasks:

(1) NetBeans integration: Test the instructions in the README and make sure that they work, and show off NetBeans/Enclojure in its best light. Bonus credit for writing a lab specifically on using Enclojure.
(2) CounterClockwise integration: Ditto above but for Eclipse/Counterclockwise.

(3) IDEA integration: Ditto but for IDEA/La Clojure.
(4) Maven integration. The instruction use leiningen and project.clj, but the maven pom.xml is checked in. For Java folks, it might be easier to have instructions that just use maven and skip leiningen.
(5) Out-of-box experience audit. Is the leiningen-based setup easy enough? If not, please make something simpler (maybe shell scripts that pull the libs from a download site?)
(6) Better windows instructions/integration.

Let's make getting started with Clojure easier!

Stu

Stuart Halloway

unread,
Apr 1, 2010, 12:58:00 PM4/1/10
to clo...@googlegroups.com
Thanks, I have incorporated a modified version of these instructions
in the labrepl and in http://www.assembla.com/wiki/show/clojure/Getting_Started
.

Stu

Reply all
Reply to author
Forward
0 new messages