Coder Social home page Coder Social logo

labrepl's Introduction

labrepl for Clojure

Copyright (c) Relevance, Inc. All rights reserved.

The use and distribution terms for this software are covered by the Eclipse Public License 1.0 which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license.

You must not remove this notice, or any other, from this software.

What is it?

Labrepl is an environment for exploring the Clojure language. It includes:

  • a web application that presents a set of lab exercises with step-by-step instructions
  • an interactive repl for working with the lab exercises
  • solutions with passing tests
  • up-to-date versions of Clojure, contrib, incanter, compojure and a bunch of other libraries to explore

See the Wiki for getting started with NetBeans/Enclojure, Eclipse/Counterclockwise, Maven, Mac/Linux command line, Windows command line, IDEA/La Clojure, and Emacs.

Getting Started

Quick start:

bin/repl

Then follow the instructions at the REPL.

Setup instructions for most popular editors/IDEs can be found on the wiki

Running the Tests

  • Leiningen: lein test
  • Maven: mvn clojure:test

Thanks for contributions and reviews from

  • Aaron Bedra
  • Mike Clark
  • Daniel Solano Gómez
  • Rich Hickey
  • Shawn Hoover
  • Larry Karnowski
  • Michael Kohl
  • Jess Martin
  • Alex Ott
  • Laurent Petit
  • Seth Schroeder
  • Matthew Wizeman

labrepl's People

Contributors

abedra avatar adamfixflyer avatar alexott avatar citizen428 avatar clarkware avatar dfuenzalida avatar fhd avatar jackdempsey avatar pjvandehaar avatar richhickey avatar sattvik avatar spicycode avatar stuarthalloway avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

labrepl's Issues

Unable to "git clone" project using git 1.6.0.4

Hi, here is the error I receive when attempting to "git clone" this project:

Getting pack 2f483ef284a8154ca75f1308508e881fdb4ddcaa
which contains 94a9ed024d3859793618152ea559a168bbcbb5e2
got fd66aab356ee4e22becdcb1894faabc0b7412100
got ad92abaadf6bc34bca72033bcd7ea4c41f35b16d
got 8de3d051ce63b210a00ad09a403e4ea3b4946ae6
got f7d17ed138b2f8917dc8fecdb62e7db2371237a2
got 4e64e69940b70d1147bcc49788db600ff0e68a48
got 4ab0d927689c134b8e9301d9c6ac0175031737b2
got d9f5744cfb6b340c77d35fbec6aba4b96b1bdcfc
got ac47c3d1f7c480e959c2393aa83c3d5d20c97e30
got 854a05706034478e9a917223d277620c31812462
got 1b07a62fcca0f786c834a175681ffbfff61de66f
got aae325039196f81cb6ea25e2c7badf9010d306d8
got ada2ac9815c6d94c421d18b744ec5cf299c834cf
error: Unable to get pack file http://github.com/technomancy/emacs-starter-kit.git/objects/pack/pack-2f483ef284a8154ca75f1308508e881fdb4ddcaa.pack
transfer closed with 1337627 bytes remaining to read
error: Unable to find 94a9ed024d3859793618152ea559a168bbcbb5e2 under http://github.com/technomancy/emacs-starter-kit.git
Cannot obtain needed blob 94a9ed024d3859793618152ea559a168bbcbb5e2
while processing commit 6b38e16eaf847cee27c8b3fdf58d8bb88af5caf3.
fatal: Fetch failed.

Does anyone else see this issue? Should I be using a newer git?

Typo in its-all-data

In Collections list item 7 in src/labs/its_all_data.clj (line 110):
({:country "US", :capitol "Washington, D.C."} :country)
should be:
({:country "US", :capital "Washington, D.C."} :country)
for consistency with the other examples under the Collections header.

maven error

victor-stans-imac:labrepl victorstan$ mvn clojure:repl
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'clojure'.
[INFO] org.apache.maven.plugins: checking for updates from central
[INFO] org.codehaus.mojo: checking for updates from central
[INFO] artifact org.apache.maven.plugins:maven-clojure-plugin: checking for updates from central
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] The plugin 'org.apache.maven.plugins:maven-clojure-plugin' does not exist or no valid version could be found
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7 seconds
[INFO] Finished at: Thu Jul 22 01:24:10 EDT 2010
[INFO] Final Memory: 3M/81M
[INFO] --------------------------

lab mini-browser "/browser/*" does't work

After some debug,i found that it should use :* instead of "*" to retrieve param.So the application-routes should be

(defroutes application-routes
  (GET "/" [] (html
               (layout
                (namespace-browser (namespace-names))
                [:div {:class "browse-list empty"}])))
  (GET "/browse/*" request (let [[ns var] (str/split (get-in request [:params :*]) #"/")]
                             (html
                              (layout
                               (namespace-browser (namespace-names))
                               (var-browser ns (var-names ns))
                               (var-detail ns var)))))
  (files "/")
  (not-found "<h1>Not Found</h1>"))

Error running repl script if not in labrepl home.

If I run the repl script from the labrepl home directory (by entering script/repl) everything works.

If I run the repl script from the the script directory (by entering ./repl) then I get the following error.

Exception in thread "main" java.lang.NoClassDefFoundError: jline/ConsoleRunner
Caused by: java.lang.ClassNotFoundException: jline.ConsoleRunner
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
Could not find the main class: jline.ConsoleRunner. Program will exit.

IntelliJ incanter on Ubuntu 10.10 - No X11 DISPLAY variable was set

I am up to the exercise: Its All Data/A Little Real Data/Step 8
and got the following error (have included the steps to produce the
error):
user=> (def words (read-lines "data/words"))
#'user/words
user=> (count words)
234936
user=> (use '[incanter core charts])
nil
user=> (let
[f (frequencies (map first words))](view %28bar-chart %28keys f%29 %28vals f%29%29))
java.awt.HeadlessException:
No X11 DISPLAY variable was set, but this program performed an
operation which requires it. (NO_SOURCE_FILE:0)

I am on Ubuntu 10.10 Desktop - X11 is installed by default
Used this script to install pre-reqs before IntelliJ:
cd
sudo apt-get install python-software-properties
sudo apt-get update
sudo apt-get install sun-java6-jdk ant git tree maven2
sudo update-alternatives --config java

Installed IntelliJ like this:
As described at https://github.com/relevance/labrepl
Used IntelliJ Community Edition - ideaIC-10.0.2.tar.gz
As IntelliJ was first started, an update of IntelliJ was allowed.
maven updates/build allowed to happen.

Cheers,
--Peter G

localhost:8080 not available in latest commit

I believe this is related to evjan's repl issue also. I'm using emacs/swank approach.

The last working version I tried was tree 8f4903cbf32a522dc043 -- everything worked fine at that point. I'm guessing this is related to to the repl changes on 5-19-10. swank's output is below.

The repl (in inferior-lisp mode and slime) works fine, I just can't access the web based tutorial anymore. If I run 'script/repl' it will not produce a working REPL, but it does load the web server.

Clojure 1.2.0-master-SNAPSHOT
Starting swank...
WARNING: group-by already refers to: #'clojure.core/group-by in namespace: swank.util, being replaced by: #'swank.util/group-by
WARNING: group-by already refers to: #'clojure.core/group-by in namespace: swank.core, being replaced by: #'swank.util/group-by
WARNING: group-by already refers to: #'clojure.core/group-by in namespace: swank.util.concurrent.thread, being replaced by: #'swank.util/group-by
WARNING: group-by already refers to: #'clojure.core/group-by in namespace: swank.core.connection, being replaced by: #'swank.util/group-by
WARNING: group-by already refers to: #'clojure.core/group-by in namespace: swank.core.protocol, being replaced by: #'swank.util/group-by
WARNING: group-by already refers to: #'clojure.core/group-by in namespace: swank.util.io, being replaced by: #'swank.util/group-by
WARNING: group-by already refers to: #'clojure.core/group-by in namespace: swank.core.threadmap, being replaced by: #'swank.util/group-by
WARNING: group-by already refers to: #'clojure.core/group-by in namespace: swank.core.server, being replaced by: #'swank.util/group-by
WARNING: group-by already refers to: #'clojure.core/group-by in namespace: swank.util.net.sockets, being replaced by: #'swank.util/group-by
WARNING: group-by already refers to: #'clojure.core/group-by in namespace: swank.commands.basic, being replaced by: #'swank.util/group-by
WARNING: group-by already refers to: #'clojure.core/group-by in namespace: swank.commands.indent, being replaced by: #'swank.util/group-by
WARNING: group-by already refers to: #'clojure.core/group-by in namespace: swank.commands.completion, being replaced by: #'swank.util/group-by
WARNING: group-by already refers to: #'clojure.core/group-by in namespace: swank.commands.contrib, being replaced by: #'swank.util/group-by
WARNING: group-by already refers to: #'clojure.core/group-by in namespace: swank.commands.inspector, being replaced by: #'swank.util/group-by
user=> Connection opened on local port 4005

<ServerSocket ServerSocket[addr=0.0.0.0/0.0.0.0,port=0,localport=4005]>

WARNING: spit already refers to: #'clojure.core/spit in namespace: compojure.encodings, being replaced by: #'clojure.contrib.duck-streams/spit
WARNING: spit already refers to: #'clojure.core/spit in namespace: compojure.http.helpers, being replaced by: #'clojure.contrib.duck-streams/spit
WARNING: spit already refers to: #'clojure.core/spit in namespace: compojure.http.request, being replaced by: #'clojure.contrib.duck-streams/spit
WARNING: spit already refers to: #'clojure.core/spit in namespace: user, being replaced by: #'clojure.contrib.io/spit
java.lang.IllegalStateException: javadoc already refers to: #'clojure.java.javadoc/javadoc in namespace: user (run.clj:0)
user=>

Can't start up: not enough memory

I have 4G ram and can't start ./script/repl
/proc/meminfo:
MemTotal: 3604980 kB
MemFree: 117696 kB
Buffers: 69812 kB
Cached: 2471184 kB
SwapCached: 237236 kB

Suggestion for unified-update-model chapter

In the section for futures, someone new may try to run that first code block in the repl and face lots of frustration

(:use [clojure.http.client :only (request url-encode)]
[clojure.contrib.json :only (read-json)])

running this in the repl gives you a:
java.lang.ClassNotFoundException: clojure.http.client (NO_SOURCE_FILE:8)

can it be changed to something like

(ns some-name-space
(:use [clojure.http.client :only (request url-encode)])
(:use [clojure.contrib.json :only (read-json)]))

or

(use '[clojure.http.client :only (request url-encode)] '[clojure.contrib.json :only (read-json)]

so that it works from a file or from the repl

Labs fail to load because (name lab) throws ClassCastException

Steps to reproduce:

  1. launch labrepl with scripts/repl
  2. navigate to http://localhost:8080 in your browser
  3. visit one of the labs (ie: intro)
  4. observe traceback on the page as well as the labrepl console

The traceback begins as follows:

java.lang.ClassCastException: java.lang.String cannot be cast to clojure.lang.Named
    at clojure.core$name__4021.invoke(core.clj:1227)
    at labrepl.lab$instructions__1728.invoke(lab.clj:20)
    ...

log4j:WARN Please initialize the log4j system properly.

I finally got labrepl to work with one IDE, tried with intelliJ but didnt work, also comand line didnt work on mac os x. But Eclipse version seems to work! Yay!

So I can't wait to start learning more about Clojure, but the road so far is pretty bumpy... Any help in figuring out what this log4j error is? Consider I'm a complete beginner at all the java jargon, and there's plenty!

1:2 user=> (labrepl/-main)
2010-07-23 00:57:38.015::INFO: Logging to STDERR via org.mortbay.log.StdErrLogsolutions.mini_browser.proxy$javax.servlet.http.HttpServlet$0

2010-07-23 00:57:38.035::INFO: jetty-6.1.21
labrepl.proxy$javax.servlet.http.HttpServlet$0
2010-07-23 00:57:38.155::INFO: Started [email protected]:9000
2010-07-23 00:57:38.156::INFO: jetty-6.1.21
2010-07-23 00:57:38.160::INFO: Started [email protected]:8080
Welcome to the labrepl. Browse to localhost:8080 to get started!
nil
1:3 user=> log4j:WARN No appenders could be found for logger (labrepl).
log4j:WARN Please initialize the log4j system properly.

Missing artifact (dependencies of incanter)

Hello,

I'm trying to run the project in Eclipse with Counterclockwise, but I get the following errors:

10/29/10 11:15:58 AM IST: Missing artifact commons-logging:commons-logging:jar:1.1:runtime
10/29/10 11:15:58 AM IST: Missing artifact logkit:logkit:jar:1.0.1:runtime
10/29/10 11:15:58 AM IST: Missing artifact avalon-framework:avalon-framework:jar:4.1.3:runtime

These are dependencies of incanter:incanter:1.2.3-SNAPSHOT

How can I resolve the problem?

Thanks,
Anton

Refers conflict between names-and-places and its-all-data

names-and-places instructs the user to (use 'clojure.contrib.math). its-all-data has (use '[incanter core charts]). If these are both entered in the same REPL session, the following is produced by the second command:

WARNING: group-by already refers to: #'clojure.core/group-by in namespace: incanter.core, being replaced by: #'incanter.core/group-by
java.lang.IllegalStateException: sqrt already refers to: #'clojure.contrib.math/sqrt in namespace: user (repl-1:5)

Subsequently, this chunk of code will fail:

(let
[f (frequencies (map first words))](view %28bar-chart %28keys f%29 %28vals f%29%29))

with this exception:

java.lang.Exception: Unable to resolve symbol: view in this context (repl-1:9)

Selecting multi-lines of code on web pages includes the line numbers...

...which makes the simple copy&pasting of code-snippets a royal pain...

The issue is the use of the old version of SyntaxHighlighter - the latest and greatest doesn't include the line numbers anymore!
When I tried to make it work with the new SyntaxHighlighter 3.0.83, I found out that it also relies on XRegExp. The following recipe made it work for me:

Download SyntaxHighlighter version 3.0.83 from:
http://alexgorbatchev.com/SyntaxHighlighter/download/

In the labrepl source tree,
replace "shCore.js" in labrepl/public/javascript/ with new version from SH
replace "shCore.css" and "shThemeDefault.css" in labrepl/public/stylesheets/ with new versions from SH

Download "xregexp.js" from XRegExp at http://xregexp.com/
In the labrepl source tree,
add "xregexp.js" to labrepl/public/javascript/

In "labrepl/src/labrepl/web.clj"
add "/javascripts/xregexp.js" to vector "default-javascripts"
such that assignment looks like:

(def default-javascripts
["/javascripts/jquery.js"
"/javascripts/application.js"
"/javascripts/xregexp.js"
"/javascripts/shCore.js"
"/javascripts/shBrushClojure.js"])

Done - reload and run the web server, and if all went well... select multi-lines of code without the line numbers for easy copy&pasting in the repl!

swank is not added to classpath when running script/swank

The script/repl only add the jars immediately under "lib" but not "lib/dev" where the swank-clojure jar is located. That needs to be added to the classpath for script/swank to work; unless, of course, it was already supposed to be on the classpath somehow?

Problem with "lein deps"

Having trouble getting labrepl running. There is a hidden problem of some kind that is causing "lein deps" to fail. I am on a MacBook pro, 10.6.4.

msddpm2:/projects/labrepl] java -version
java version "1.6.0_20"
Java(TM) SE Runtime Environment (build 1.6.0_20-b02-279-10M3065)
Java HotSpot(TM) 64-Bit Server VM (build 16.3-b01-279, mixed mode)
msddpm2:
/projects/labrepl] lein version
Leiningen 1.4.0-SNAPSHOT on Java 1.6.0_20 Java HotSpot(TM) 64-Bit Server VM

msddpm2:~/projects/labrepl] lein deps
Copying 56 files to /Users/aaelony/projects/labrepl/lib
Downloading: org/clojure/clojure/1.2.0-beta1/clojure-1.2.0-beta1.jar from clojure-snapshots
An error has occurred while processing the Maven artifact tasks.
Diagnosis:

Unable to resolve artifact: Missing:

  1. org.clojure:clojure:jar:1.2.0-beta1

Try downloading the file manually from the project website.

Then, install it using the command:
mvn install:install-file -DgroupId=org.clojure -DartifactId=clojure -Dversion=1.2.0-beta1 -Dpackaging=jar -Dfile=/path/to/file

Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=org.clojure -DartifactId=clojure -Dversion=1.2.0-beta1 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

Path to dependency:
1) org.apache.maven:super-pom:jar:2.0
2) autodoc:autodoc:jar:0.7.0
3) org.clojure:clojure:jar:1.2.0-beta1


1 required artifact is missing.

for artifact:
org.apache.maven:super-pom:jar:2.0

from the specified remote repositories:
clojure (http://build.clojure.org/releases),
clojars (http://clojars.org/repo/),
clojure-snapshots (http://build.clojure.org/snapshots),
clojure-releases (http://build.clojure.org/releases),
central (http://repo1.maven.org/maven2)

Exception in thread "main" Unable to resolve artifact: Missing:

  1. org.clojure:clojure:jar:1.2.0-beta1

Try downloading the file manually from the project website.

Then, install it using the command:
mvn install:install-file -DgroupId=org.clojure -DartifactId=clojure -Dversion=1.2.0-beta1 -Dpackaging=jar -Dfile=/path/to/file

Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=org.clojure -DartifactId=clojure -Dversion=1.2.0-beta1 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

Path to dependency:
1) org.apache.maven:super-pom:jar:2.0
2) autodoc:autodoc:jar:0.7.0
3) org.clojure:clojure:jar:1.2.0-beta1


1 required artifact is missing.

for artifact:
org.apache.maven:super-pom:jar:2.0

from the specified remote repositories:
clojure (http://build.clojure.org/releases),
clojars (http://clojars.org/repo/),
clojure-snapshots (http://build.clojure.org/snapshots),
clojure-releases (http://build.clojure.org/releases),
central (http://repo1.maven.org/maven2)

(NO_SOURCE_FILE:0)
at clojure.lang.Compiler.eval(Compiler.java:5440)
at clojure.lang.Compiler.eval(Compiler.java:5391)
at clojure.core$eval.invoke(core.clj:2382)
at clojure.main$eval_opt.invoke(main.clj:235)
at clojure.main$initialize.invoke(main.clj:254)
at clojure.main$script_opt.invoke(main.clj:270)
at clojure.main$main.doInvoke(main.clj:354)
at clojure.lang.RestFn.invoke(RestFn.java:458)
at clojure.lang.Var.invoke(Var.java:377)
at clojure.lang.AFn.applyToHelper(AFn.java:174)
at clojure.lang.Var.applyTo(Var.java:482)
at clojure.main.main(main.java:37)

Caused by: Unable to resolve artifact: Missing:

  1. org.clojure:clojure:jar:1.2.0-beta1

Try downloading the file manually from the project website.

Then, install it using the command:
mvn install:install-file -DgroupId=org.clojure -DartifactId=clojure -Dversion=1.2.0-beta1 -Dpackaging=jar -Dfile=/path/to/file

Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=org.clojure -DartifactId=clojure -Dversion=1.2.0-beta1 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

Path to dependency:
1) org.apache.maven:super-pom:jar:2.0
2) autodoc:autodoc:jar:0.7.0
3) org.clojure:clojure:jar:1.2.0-beta1


1 required artifact is missing.

for artifact:
org.apache.maven:super-pom:jar:2.0

from the specified remote repositories:
clojure (http://build.clojure.org/releases),
clojars (http://clojars.org/repo/),
clojure-snapshots (http://build.clojure.org/snapshots),
clojure-releases (http://build.clojure.org/releases),
central (http://repo1.maven.org/maven2)

at org.apache.maven.artifact.ant.DependenciesTask.doExecute(DependenciesTask.java:175)
at org.apache.maven.artifact.ant.AbstractArtifactTask.execute(AbstractArtifactTask.java:678)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at clojure.lang.Reflector.invokeMatchingMethod(Reflector.java:90)
at clojure.lang.Reflector.invokeNoArgInstanceMember(Reflector.java:265)
at leiningen.deps$deps.invoke(deps.clj:65)
at leiningen.deps$deps.invoke(deps.clj:73)
at leiningen.deps$deps.invoke(deps.clj:76)
at leiningen.deps$deps.invoke(deps.clj:77)
at clojure.lang.Var.invoke(Var.java:365)
at clojure.lang.AFn.applyToHelper(AFn.java:163)
at clojure.lang.Var.applyTo(Var.java:482)
at clojure.core$apply.invoke(core.clj:542)
at leiningen.core$apply_task.invoke(core.clj:158)
at leiningen.core$_main.doInvoke(core.clj:214)
at clojure.lang.RestFn.applyTo(RestFn.java:138)
at clojure.core$apply.invoke(core.clj:540)
at leiningen.core$_main.invoke(core.clj:219)
at user$eval168.invoke(NO_SOURCE_FILE:1)
at clojure.lang.Compiler.eval(Compiler.java:5424)
... 11 more

Caused by: org.apache.maven.artifact.resolver.MultipleArtifactsNotFoundException: Missing:

  1. org.clojure:clojure:jar:1.2.0-beta1

Try downloading the file manually from the project website.

Then, install it using the command:
mvn install:install-file -DgroupId=org.clojure -DartifactId=clojure -Dversion=1.2.0-beta1 -Dpackaging=jar -Dfile=/path/to/file

Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=org.clojure -DartifactId=clojure -Dversion=1.2.0-beta1 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

Path to dependency:
1) org.apache.maven:super-pom:jar:2.0
2) autodoc:autodoc:jar:0.7.0
3) org.clojure:clojure:jar:1.2.0-beta1


1 required artifact is missing.

for artifact:
org.apache.maven:super-pom:jar:2.0

from the specified remote repositories:
clojure (http://build.clojure.org/releases),
clojars (http://clojars.org/repo/),
clojure-snapshots (http://build.clojure.org/snapshots),
clojure-releases (http://build.clojure.org/releases),
central (http://repo1.maven.org/maven2)

at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTransitively(DefaultArtifactResolver.java:324)
at org.apache.maven.artifact.ant.DependenciesTask.doExecute(DependenciesTask.java:170)
... 33 more

InvocationTargetException when starting it up in Ubuntu

When I install LabRepl using the command line guide in Ubuntu 10.04, I get the following output, and no REPL window (which I'm assuming will show up instead of the stack trace):

peter@fenix:~/clojure/labrepl$ script/repl
Clojure 1.2.0-master-SNAPSHOT
WARNING: spit already refers to: #'clojure.core/spit in namespace: compojure.encodings, being replaced by: #'clojure.contrib.duck-streams/spit
WARNING: spit already refers to: #'clojure.core/spit in namespace: compojure.http.helpers, being replaced by: #'clojure.contrib.duck-streams/spit
WARNING: spit already refers to: #'clojure.core/spit in namespace: compojure.http.request, being replaced by: #'clojure.contrib.duck-streams/spit
WARNING: spit already refers to: #'clojure.core/spit in namespace: user, being replaced by: #'clojure.contrib.io/spit
2010-05-28 22:23:21.056::INFO: Logging to STDERR via org.mortbay.log.StdErrLog
solutions.mini_browser.proxy$javax.servlet.http.HttpServlet$0
2010-05-28 22:23:21.113::INFO: jetty-6.1.21
2010-05-28 22:23:21.254::INFO: Started [email protected]:9000
labrepl.proxy$javax.servlet.http.HttpServlet$0
2010-05-28 22:23:21.259::INFO: jetty-6.1.21
2010-05-28 22:23:21.287::INFO: Started [email protected]:8080
Welcome to the labrepl. Browse to localhost:8080 to get started!
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at jline.ConsoleRunner.main(ConsoleRunner.java:69)
Caused by: java.lang.IllegalStateException: javadoc already refers to: #'clojure.contrib.repl-utils/javadoc in namespace: user
at clojure.lang.Namespace.warnOrFailOnReplace(Namespace.java:84)
at clojure.lang.Namespace.reference(Namespace.java:107)
at clojure.lang.Namespace.refer(Namespace.java:165)
at clojure.core$refer.doInvoke(core.clj:3276)
at clojure.lang.RestFn.applyTo(RestFn.java:140)
at clojure.core$apply.invoke(core.clj:542)
at clojure.core$load_lib.doInvoke(core.clj:4769)
at clojure.lang.RestFn.applyTo(RestFn.java:143)
at clojure.core$apply.invoke(core.clj:542)
at clojure.core$load_libs.doInvoke(core.clj:4788)
at clojure.lang.RestFn.applyTo(RestFn.java:138)
at clojure.core$apply.invoke(core.clj:544)
at clojure.core$use.doInvoke(core.clj:4868)
at clojure.lang.RestFn.invoke(RestFn.java:409)
at clojure.main$repl.doInvoke(main.clj:198)
at clojure.lang.RestFn.invoke(RestFn.java:422)
at clojure.main$repl_opt.invoke(main.clj:261)
at clojure.main$main.doInvoke(main.clj:353)
at clojure.lang.RestFn.invoke(RestFn.java:437)
at clojure.lang.Var.invoke(Var.java:373)
at clojure.lang.AFn.applyToHelper(AFn.java:169)
at clojure.lang.Var.applyTo(Var.java:482)
at clojure.main.main(main.java:37)
... 5 more

No libs directory

the scripts/repl script builds a classpath from lib/* but there is no lib directory in the repository. Am I missing something?

Sorry, I hadn't run lein deps. Works now.

Routes in mini-browser lab don't work with current Compojure

The syntax for the routes in defroute has changed, and I can't find the serve-files function anywhere. After a lot of documentation reading and experimenting, I made it work with this definition (replacement for the code at the last step of section "Layout"):

(defroutes mockup-routes
  (GET "/m1" [] (mockup-1))
  (GET "/m2" [] (mockup-2))
  (GET "/m3" [] (mockup-3))
  (GET "/*" [*] (file-response * {:root "public"})))

Cant initialize in INTELIJ REPL the labrepl

java.lang.Exception: Unable to resolve symbol: labrepl in this context (NO_SOURCE_FILE:0)

I get that message when i try doing the instructions on the site for INTELIJ IDE.

(require 'labrepl)

Error when trying to run script/repl

Exception in thread "main" java.lang.ClassNotFoundException: clojure.main
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at sun.misc.Launcher$ExtClassLoader.findClass(Launcher.java:229)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at jline.ConsoleRunner.main(Unknown Source)

when I run script/test it works fine though...

build fails: can't find clojure-contrib-1.2.0-master-SNAPSHOT.jar

I can't find clojure-contrib-1.2.0-master-SNAPSHOT.jar anywhere on the web, so I'm stuck. Here's the full output. Thanks for your help. --gw

NetBeans: Executing 'mvn.bat -Dnetbeans.execution=true install'
NetBeans: JAVA_HOME=C:\Program Files\Java\jdk1.6.0_20

Scanning for projects...

Building labrepl

task-segment: [install]

[resources:resources]
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
skip non existing resourceDirectory C:\tech\clojurestuff\RelevanceLabRepl\src\main\resources
Downloading: http://build.clojure.org/releases/org/clojure/clojure-contrib/1.2.0-master-SNAPSHOT/clojure-contrib-1.2.0-master-SNAPSHOT.pom
Unable to find resource 'org.clojure:clojure-contrib:pom:1.2.0-master-SNAPSHOT' in repository clojure-releases (http://build.clojure.org/releases)
Downloading: http://repo.incanter.org/org/clojure/clojure-contrib/1.2.0-master-SNAPSHOT/clojure-contrib-1.2.0-master-SNAPSHOT.pom
Unable to find resource 'org.clojure:clojure-contrib:pom:1.2.0-master-SNAPSHOT' in repository incanter (http://repo.incanter.org)
Downloading: http://repo1.maven.org/maven2/org/clojure/clojure-contrib/1.2.0-master-SNAPSHOT/clojure-contrib-1.2.0-master-SNAPSHOT.pom
Unable to find resource 'org.clojure:clojure-contrib:pom:1.2.0-master-SNAPSHOT' in repository central (http://repo1.maven.org/maven2)
Downloading: http://build.clojure.org/releases/org/clojure/clojure-contrib/1.2.0-master-SNAPSHOT/clojure-contrib-1.2.0-master-SNAPSHOT.pom
Unable to find resource 'org.clojure:clojure-contrib:pom:1.2.0-master-SNAPSHOT' in repository clojure (http://build.clojure.org/releases)
Downloading: http://build.clojure.org/snapshots/org/clojure/clojure-contrib/1.2.0-master-SNAPSHOT/clojure-contrib-1.2.0-master-SNAPSHOT.pom
Unable to find resource 'org.clojure:clojure-contrib:pom:1.2.0-master-SNAPSHOT' in repository clojure-snapshots (http://build.clojure.org/snapshots)
Downloading: http://clojars.org/repo//org/clojure/clojure-contrib/1.2.0-master-SNAPSHOT/clojure-contrib-1.2.0-master-SNAPSHOT.pom
Unable to find resource 'org.clojure:clojure-contrib:pom:1.2.0-master-SNAPSHOT' in repository clojars (http://clojars.org/repo/)
Downloading: http://build.clojure.org/releases/org/clojure/clojure-contrib/1.2.0-master-SNAPSHOT/clojure-contrib-1.2.0-master-SNAPSHOT.jar
Unable to find resource 'org.clojure:clojure-contrib:jar:1.2.0-master-SNAPSHOT' in repository clojure-releases (http://build.clojure.org/releases)
Downloading: http://repo.incanter.org/org/clojure/clojure-contrib/1.2.0-master-SNAPSHOT/clojure-contrib-1.2.0-master-SNAPSHOT.jar
Unable to find resource 'org.clojure:clojure-contrib:jar:1.2.0-master-SNAPSHOT' in repository incanter (http://repo.incanter.org)
Downloading: http://repo1.maven.org/maven2/org/clojure/clojure-contrib/1.2.0-master-SNAPSHOT/clojure-contrib-1.2.0-master-SNAPSHOT.jar
Unable to find resource 'org.clojure:clojure-contrib:jar:1.2.0-master-SNAPSHOT' in repository central (http://repo1.maven.org/maven2)
Downloading: http://build.clojure.org/releases/org/clojure/clojure-contrib/1.2.0-master-SNAPSHOT/clojure-contrib-1.2.0-master-SNAPSHOT.jar
Unable to find resource 'org.clojure:clojure-contrib:jar:1.2.0-master-SNAPSHOT' in repository clojure (http://build.clojure.org/releases)
Downloading: http://build.clojure.org/snapshots/org/clojure/clojure-contrib/1.2.0-master-SNAPSHOT/clojure-contrib-1.2.0-master-SNAPSHOT.jar
Unable to find resource 'org.clojure:clojure-contrib:jar:1.2.0-master-SNAPSHOT' in repository clojure-snapshots (http://build.clojure.org/snapshots)
Downloading: http://clojars.org/repo//org/clojure/clojure-contrib/1.2.0-master-SNAPSHOT/clojure-contrib-1.2.0-master-SNAPSHOT.jar

Unable to find resource 'org.clojure:clojure-contrib:jar:1.2.0-master-SNAPSHOT' in repository clojars (http://clojars.org/repo/)

[ERROR]BUILD ERROR

Failed to resolve artifact.

Missing:

  1. org.clojure:clojure-contrib:jar:1.2.0-master-SNAPSHOT

Try downloading the file manually from the project website.

Then, install it using the command:
mvn install:install-file -DgroupId=org.clojure -DartifactId=clojure-contrib -Dversion=1.2.0-master-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file

Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=org.clojure -DartifactId=clojure-contrib -Dversion=1.2.0-master-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

Path to dependency:
1) labrepl:labrepl:jar:0.0.1
2) org.clojure:clojure-contrib:jar:1.2.0-master-SNAPSHOT


1 required artifact is missing.

for artifact:
labrepl:labrepl:jar:0.0.1

from the specified remote repositories:
central (http://repo1.maven.org/maven2),
clojars (http://clojars.org/repo/),
incanter (http://repo.incanter.org),
clojure-snapshots (http://build.clojure.org/snapshots),
clojure (http://build.clojure.org/releases),
clojure-releases (http://build.clojure.org/releases)


For more information, run Maven with the -e switch

Total time: 4 seconds
Finished at: Sat Jun 26 19:17:59 PDT 2010

Final Memory: 9M/23M

*** end of output ***

Cannot run in La Clojure

user=> (require 'labrepl)
java.io.FileNotFoundException: Could not locate compojure__init.class or compojure.clj on classpath: (labrepl.clj:1)

but the compojure is there....

user=> (println (seq (.getURLs (java.lang.ClassLoader/getSystemClassLoader))))
(#<URL file:/C:/Program%3fFiles/Java/jdk1.6.0_14/jre/lib/alt-rt.jar> #<URL file:/C:/Program%3fFiles/Java/jdk1.6.0_14/jre/lib/charsets.jar> #<URL file:/C:/Program%3fFiles/Java/jdk1.6.0_14/jre/lib/deploy.jar> #<URL file:/C:/Program%3fFiles/Java/jdk1.6.0_14/jre/lib/javaws.jar> #<URL file:/C:/Program%3fFiles/Java/jdk1.6.0_14/jre/lib/jce.jar> #<URL file:/C:/Program%3fFiles/Java/jdk1.6.0_14/jre/lib/jsse.jar> #<URL file:/C:/Program%3fFiles/Java/jdk1.6.0_14/jre/lib/management-agent.jar> #<URL file:/C:/Program%3fFiles/Java/jdk1.6.0_14/jre/lib/plugin.jar> #<URL file:/C:/Program%3fFiles/Java/jdk1.6.0_14/jre/lib/resources.jar> #<URL file:/C:/Program%3fFiles/Java/jdk1.6.0_14/jre/lib/rt.jar> #<URL file:/C:/Program%3fFiles/Java/jdk1.6.0_14/jre/lib/ext/dnsns.jar> #<URL file:/C:/Program%3fFiles/Java/jdk1.6.0_14/jre/lib/ext/localedata.jar> #<URL file:/C:/Program%3fFiles/Java/jdk1.6.0_14/jre/lib/ext/sunjce_provider.jar> #<URL file:/C:/Program%3fFiles/Java/jdk1.6.0_14/jre/lib/ext/sunmscapi.jar> #<URL file:/C:/Program%3fFiles/Java/jdk1.6.0_14/jre/lib/ext/sunpkcs11.jar> #<URL file:/D:/temp/clojure-1.2.0-RC1/clojure.jar> #<URL file:/D:/temp/clojure-contrib-1.2.0-RC1/target/clojure-contrib-1.2.0-RC1.jar> #<URL file:/D:/lang/clojure11/labrepl2/labrepl/target/classes> #<URL file:/C:/Documents%3fand%3fSettings/Plummtw/.m2/repository/org/clojure/clojure/1.2.0-master-SNAPSHOT/clojure-1.2.0-master-SNAPSHOT.jar> #<URL file:/C:/Documents%3fand%3fSettings/Plummtw/.m2/repository/org/clojure/clojure-contrib/1.2.0-SNAPSHOT/clojure-contrib-1.2.0-SNAPSHOT.jar> #<URL file:/C:/Documents%3fand%3fSettings/Plummtw/.m2/repository/org/clojars/stuarthalloway/compojure/0.3.3-SNAPSHOT/compojure-0.3.3-SNAPSHOT.jar> #<URL file:/C:/Documents%3fand%3fSettings/Plummtw/.m2/repository/commons-codec/commons-codec/1.3/commons-codec-1.3.jar> #<URL file:/C:/Documents%3fand%3fSettings/Plummtw/.m2/repository/commons-io/commons-io/1.4/commons-io-1.4.jar> #<URL file:/C:/Documents%3fand%3fSettings/Plummtw/.m2/repository/commons-fileupload/commons-fileupload/1.2.1/commons-fileupload-1.2.1.jar> #<URL file:/C:/Documents%3fand%3fSettings/Plummtw/.m2/repository/org/mortbay/jetty/jetty/6.1.21/jetty-6.1.21.jar> #<URL file:/C:/Documents%3fand%3fSettings/Plummtw/.m2/repository/org/mortbay/jetty/jetty-util/6.1.21/jetty-util-6.1.21.jar> #<URL file:/C:/Documents%3fand%3fSettings/Plummtw/.m2/repository/org/mortbay/jetty/servlet-api/2.5-20081211/servlet-api-2.5-20081211.jar> #<URL file:/C:/Documents%3fand%3fSettings/Plummtw/.m2/repository/postgresql/postgresql/8.4-701.jdbc4/postgresql-8.4-701.jdbc4.jar> #<URL file:/C:/Documents%3fand%3fSettings/Plummtw/.m2/repository/log4j/log4j/1.2.14/log4j-1.2.14.jar> #<URL file:/C:/Documents%3fand%3fSettings/Plummtw/.m2/repository/org/incanter/incanter-full/1.2.0-SNAPSHOT/incanter-full-1.2.0-SNAPSHOT.jar> #<URL file:/C:/Documents%3fand%3fSettings/Plummtw/.m2/repository/org/incanter/incanter-core/1.2.0-SNAPSHOT/incanter-core-1.2.0-SNAPSHOT.jar> #<URL file:/C:/Documents%3fand%3fSettings/Plummtw/.m2/repository/incanter/parallelcolt/0.7.2/parallelcolt-0.7.2.jar> #<URL file:/C:/Documents%3fand%3fSettings/Plummtw/.m2/repository/incanter/netlib-java/0.9.1/netlib-java-0.9.1.jar> #<URL file:/C:/Documents%3fand%3fSettings/Plummtw/.m2/repository/incanter/arpack-combo/0.1/arpack-combo-0.1.jar> #<URL file:/C:/Documents%3fand%3fSettings/Plummtw/.m2/repository/org/incanter/incanter-io/1.2.0-SNAPSHOT/incanter-io-1.2.0-SNAPSHOT.jar> #<URL file:/C:/Documents%3fand%3fSettings/Plummtw/.m2/repository/org/incanter/incanter-chrono/1.2.0-SNAPSHOT/incanter-chrono-1.2.0-SNAPSHOT.jar> #<URL file:/C:/Documents%3fand%3fSettings/Plummtw/.m2/repository/joda-time/joda-time/1.6/joda-time-1.6.jar> #<URL file:/C:/Documents%3fand%3fSettings/Plummtw/.m2/repository/net/sf/opencsv/opencsv/2.0.1/opencsv-2.0.1.jar> #<URL file:/C:/Documents%3fand%3fSettings/Plummtw/.m2/repository/org/danlarkin/clojure-json/1.1-SNAPSHOT/clojure-json-1.1-SNAPSHOT.jar> #<URL file:/C:/Documents%3fand%3fSettings/Plummtw/.m2/repository/org/incanter/incanter-processing/1.2.0-SNAPSHOT/incanter-processing-1.2.0-SNAPSHOT.jar> #<URL file:/C:/Documents%3fand%3fSettings/Plummtw/.m2/repository/incanter/processing-core/1/processing-core-1.jar> #<URL file:/C:/Documents%3fand%3fSettings/Plummtw/.m2/repository/org/incanter/incanter-charts/1.2.0-SNAPSHOT/incanter-charts-1.2.0-SNAPSHOT.jar> #<URL file:/C:/Documents%3fand%3fSettings/Plummtw/.m2/repository/incanter/jfreechart/1.0.13/jfreechart-1.0.13.jar> #<URL file:/C:/Documents%3fand%3fSettings/Plummtw/.m2/repository/incanter/jcommon/1.0.16/jcommon-1.0.16.jar> #<URL file:/C:/Documents%3fand%3fSettings/Plummtw/.m2/repository/incanter/gnujaxp/1/gnujaxp-1.jar> #<URL file:/C:/Documents%3fand%3fSettings/Plummtw/.m2/repository/org/incanter/incanter-mongodb/1.2.0-SNAPSHOT/incanter-mongodb-1.2.0-SNAPSHOT.jar> #<URL file:/C:/Documents%3fand%3fSettings/Plummtw/.m2/repository/congomongo/congomongo/0.1.2-SNAPSHOT/congomongo-0.1.2-SNAPSHOT.jar> #<URL file:/C:/Documents%3fand%3fSettings/Plummtw/.m2/repository/org/clojars/somnium/mongo-java-driver/1.1.0-SNAPSHOT/mongo-java-driver-1.1.0-SNAPSHOT.jar> #<URL file:/C:/Documents%3fand%3fSettings/Plummtw/.m2/repository/org/clojars/somnium/clojure-db-object/0.1.1-SNAPSHOT/clojure-db-object-0.1.1-SNAPSHOT.jar> #<URL file:/C:/Documents%3fand%3fSettings/Plummtw/.m2/repository/org/incanter/incanter-pdf/1.2.0-SNAPSHOT/incanter-pdf-1.2.0-SNAPSHOT.jar> #<URL file:/C:/Documents%3fand%3fSettings/Plummtw/.m2/repository/com/lowagie/itext/1.4/itext-1.4.jar> #<URL file:/C:/Documents%3fand%3fSettings/Plummtw/.m2/repository/antlr/stringtemplate/2.2/stringtemplate-2.2.jar> #<URL file:/C:/Documents%3fand%3fSettings/Plummtw/.m2/repository/antlr/antlr/2.7.2/antlr-2.7.2.jar> #<URL file:/C:/Documents%3fand%3fSettings/Plummtw/.m2/repository/clojure-http-client/clojure-http-client/1.0.0-SNAPSHOT/clojure-http-client-1.0.0-SNAPSHOT.jar> #<URL file:/C:/Documents%3fand%3fSettings/Plummtw/.m2/repository/jline/jline/0.9.94/jline-0.9.94.jar> #<URL file:/C:/Documents%3fand%3fSettings/Plummtw/.m2/repository/junit/junit/3.8.1/junit-3.8.1.jar> #<URL file:/C:/Documents%3fand%3fSettings/Plummtw/.m2/repository/circumspec/circumspec/0.0.10/circumspec-0.0.10.jar> #<URL file:/C:/Documents%3fand%3fSettings/Plummtw/.m2/repository/swank-clojure/swank-clojure/1.1.0-SNAPSHOT/swank-clojure-1.1.0-SNAPSHOT.jar> #<URL file:/C:/Documents%3fand%3fSettings/Plummtw/.IntelliJIdea90/config/plugins/clojure-plugin/lib/clojure.jar> #<URL file:/D:/lang/clojure11/labrepl2/labrepl/test/> #<URL file:/D:/lang/clojure11/labrepl2/labrepl/src/>)
nil

updating the windows cmdline section of the readme

I had a question on how to update this section of the readme for labrepl in light of a few recent changes:

  1. lein self-install is now supported on Windows
  2. It says to download the latest clojure jar (1.3.1-alpha) but the latest project.clj that I pull down from github has clojure 1.2 - either the project.clj should be updated, and we just run lein deps, or is downloading clojure 1.3 and setting CLOJURE_JAR overriding the clojure jar in project.clj? If we use project.clj, can we do away with the "set CLOJURE_JAR"
  3. I have leiningen-1.3.0, and it doesn't seem to have a {your-lein-install}\bin directory - I just have {your-lein-install} directory in my path so I can call lein.bat.

This is the section in question:

Getting Started (Windows command line)

This is minimally tested. You are probably better off using Maven or one of the IDEs above. Let me know if you have problems.

  • Make sure you have Java installed.
  • Make sure you have
  • leiningen installed. Do not use lein self-install as Windows installation is a manual process. You will need to:
  • Download the leinigen.jar and set LEIN_JAR to point to it.
  • Download Clojure 1.3-alpha1
  • Set CLOJURE_JAR to point to the clojure.jar file.
  • Set your path to include {your-lein-install}\bin
  • Run lein.bat deps to install all the dependent libraries.
  • Run script\repl to launch the labrepl.
  • Browse to http://localhost:8080 for the labs.
  • Press Ctrl+D to exit the repl when you are done.

User input in a cmd.exe window is not echoed before pressing enter.

I installed this program using the "Getting Started (Maven)" instructions. My environment is Windows XP 32bit with Java 1.6.0 and Maven 2.2.1 and msysgit 1.6.5.1. I am at step 4. I can now see the website at localhost:8080. I navigate to the first page and then shift my focus back to the cmd.exe window. I see this in the window:

Welcome to the labrepl. Browse to localhost:8080 to get started!
user=> log4j:WARN No appenders could be found for logger (labrepl).
log4j:WARN Please initialize the log4j system properly.

I try typing (println "hello world") but nothing is echoed. I cannot see what I just typed. I then hit the Enter key and the input and result is shown.

Can labrepl run on 0.0.0.0 instead of localhost

Hello,

I try to do this course on nitrious.io.
They want that the server you made runs on 0.0.0.0 instead of localhost.

So I changed to this :

(defn -main [& args](run-jetty %28var application%29 {:host "0.0.0.0" :port 8080 :join? false})
(println "Welcome to the labrepl. Browse to http://localhost:8080 to get started!"))

but still the server is not be found.

Roelof

Emacs script/swank fails in util.clj (line 31)

Running inferior-lisp on Aquamacs results in:
Clojure 1.2.0-master-SNAPSHOT
Starting swank...
java.lang.Exception: Name conflict, can't def group-by because namespace: swank.util refers to:#'clojure.core/group-by (util.clj:31)

The REPL is useable, but crippled eg:
user=> (source println)
(source println)
java.lang.Exception: Unable to resolve symbol: source in this context (NO_SOURCE_FILE:1)

Whereas script/repl is working fine (and script/swank for Incanter is also working fine).

unexpected output in the min-1 function in the clojure labs

Unexpected output of the following function in the labs/looping page in the clojure labs web application

(defn min-1
[x & more](loop [min x
more %28seq more%29]
%28if-let [x %28first more%29]
%28recur %28if %28< x min%29 x min%29 %28next more%29%29
min%29))

I would expect it to return the minimum value of the vector, but it returns the whole vector.

I am a total beginner with clojure so I apologize for any stupid comment. But if this code really does not work maybe it is good to fix it, because many people might be trying to learn clojure with the labrepl clojure labs.

Thank you!

Whats done at port 9000?

When starting script/repl.bat (after using lein deps), I get
..
Clojure 1.2.0-master-SNAPSHOT
2010-04-09 21:35:45.609::INFO: Logging to STDERR via org.mortbay.log.StdErrLog
solutions.mini_browser.proxy$javax.servlet.http.HttpServlet$0
2010-04-09 21:35:45.734::INFO: jetty-6.1.21
2010-04-09 21:35:45.859::WARN: failed [email protected]:9000: java.net.Bi
ndException: Address already in use: JVM_Bind
2010-04-09 21:35:45.875::WARN: failed Server@9effe0: java.net.BindException: Ad
dress already in use: JVM_Bind
java.net.BindException: Address already in use: JVM_Bind (run.clj:0)
user=>

I dont know who uses this port, and I dont know what labrepl tries to do there. Any help?

Initializing error

On Mac:

When running script/repl the following error occurs.

boyd-browns-macbook-pro:labrepl bnb$ script/repl
Clojure 1.2.0-master-SNAPSHOT
java.lang.ExceptionInInitializerError (control.clj:9)
user>

The repl works but Firefox gives an 'unable to connect' when trying to browse to http://localhost:8080

Could not find control.clj.

IntelliJ error when starting the REPL

I'm using IntelliJ Community Edition on a Windows 7 box.

I've followed the instructions for setting up the IntelliJ environment, and when I type (require 'labrepl) in the REPL, i get the following error message:

Clojure 1.2.0-master-SNAPSHOT
user=> (require 'labrepl)
WARNING: reader macro ^ is deprecated; use meta instead
java.lang.RuntimeException: java.lang.IllegalArgumentException: Don't know how to create ISeq from: clojure.lang.Symbol (labrepl.clj:1)

Intellij - JDK step missing from docs, java.lang.NoClassDefFoundError: clojure/main

I repeat what I reported at http://groups.google.com/group/clojure/browse_thread/thread/87b42de9f763985f#

If you follow the labrepl instructions for Intellij IDEA, one part
says "just keep hitting next and accept defaults"

However, because no JDK(s) have been selected you get the following screen:
http://www.screencast.com/users/terrence_work/folders/Jing/media/87ff684d-8725-422f-8f9d-eda715505688

which I find confusing as a non-java programmer. I downloaded a java
jdk 1.6 from Sun and installed it, but it seems that also a JSDK
should be installed and I supposed the Intellij default one was fine.

But after doing those two steps and waiting for Maven to build some
things, I attempted
Tools > Clojure REPL > Add New Clojure REPL

and the new repl had the NoClassDef error when looking for clojure.main

so, if I was supposed to do more as far as installing JDK(s) I would
appreciate some specific instructions.

And I'm also guessing that I need to add clojure.jar to some sort of
java.library.path variable somehow, but dont know how to do that
either.

Screencast of adding the Java JDK and the Intellij JSDK as well as the
failing attempt to add a Clojure REPL is here:
http://www.screencast.com/users/terrence_work/folders/Jing/media/0fca5628-cca2-4811-b542-2d5dab8c9621

'show' function does not work

(source show) and (doc show) both work.

However:

user=> (show Integer)
NoSuchMethodError clojure.lang.Numbers.lt(Ljava/lang/Object;I)Z clojure.contrib.string/partition/step--78/fn--79 (string.clj:225)

user=> (show show)
NoSuchMethodError clojure.lang.Numbers.add(II)I clojure.contrib.string/partition/step--78/fn--79 (string.clj:224)

Lab uses clojure-1.3.0-alpha1.jar and clojure-contrib-1.2.0.jar

maven dependency issue

I followed the instructions mentioned in eclipse section to install labrepl.....after running the project in closure repl, I always get a class not found exception. It might be that there is some dependency missing in maven project.
=> (require 'labrepl)

ClassNotFoundException java.lang.ClassNotFoundException: org.mortbay.jetty.handler.AbstractHandler

When i took close look at maven logs, I found that closure maven plugin failed to compile..here is he snippet of maven output

Failed to execute goal com.theoryinpractise:clojure-maven-plugin:1.3.1:compile (default-cli) on project labrepl: Clojure failed. -> [Help 1]

Exception in thread "main" java.lang.ClassNotFoundException: org.mortbay.jetty.handler.AbstractHandler, compiling:(jetty.clj:1)
at clojure.lang.Compiler$InvokeExpr.eval(Compiler.java:3228)
at clojure.lang.Compiler.compile1(Compiler.java:6733)
at clojure.lang.Compiler.compile1(Compiler.java:6723)
at clojure.lang.Compiler.compile(Compiler.java:6794)
at clojure.lang.RT.compile(RT.java:368)
at clojure.lang.RT.load(RT.java:407)
at clojure.lang.RT.load(RT.java:381)
at clojure.core$load$fn__4389.invoke(core.clj:5308)

Symbols &gt; instead of > are shown

On page /labs/intro symbols > instead of > are shown.
Macros 'code' replaces '>' and '<' with '>' and '<' but inside CDATA we shouldn't do it.

Unrecognized Windows Sockets error

installed intellij idea on a windows seven machine, cloned the labrepl project from github, started the repl and tried starting the labrepl site (pretty much followed the instructions on the Getting Started section). i get this error :

user=> (labrepl/-main)
2011-04-23 18:49:49.518:INFO::Logging to STDERR via org.mortbay.log.StdErrLog
2011-04-23 18:49:49.519:INFO::jetty-6.1.26
2011-04-23 18:49:49.562:WARN::failed [email protected]:9000: java.net.SocketException: Unrecognized Windows Sockets error: 10106: create
2011-04-23 18:49:49.562:WARN::failed Server@43c0ae76: java.net.SocketException: Unrecognized Windows Sockets error: 10106: create
java.net.SocketException: Unrecognized Windows Sockets error: 10106: create (NO_SOURCE_FILE:0)

emacs instructions missing step

The instructions for using emacs in README.markdown are missing a step. It is necessary to run lein deps before attempting to run inferior-lisp, as scripts\swank depends on the lib directory created by lein deps.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.