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

2010-05-19 Thread Terrence Brannon
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

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@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+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: swank-clojure and GNU Emacs 23 - package.el install issues

2010-05-18 Thread Terrence Brannon
On Tue, May 18, 2010 at 1:34 AM, Justin Kramer jkkra...@gmail.com wrote:
 Per Phil Hagelberg's suggestion on IRC, I downloaded and used his
 package.el, which fixed the issue for me:

 http://github.com/technomancy/package.el/raw/master/package.el

I copied that package.el over ~/emacs.d./elpa/package.el and now I get
Bad url: :clojure-mode-1.7.1.el

Stack backtrace follows:

Debugger entered--Lisp error: (error Bad url: :clojure-mode-1.7.1.el)
  signal(error (Bad url: :clojure-mode-1.7.1.el))
  error(Bad url: %s :clojure-mode-1.7.1.el)
  url-retrieve-internal(clojure-mode-1.7.1.el (lambda (rest
--cl-rest--) (apply #[... \302\303\304p#\210 \305L\210 pL\207
[G25101 G25100 url-debug retrieval Synchronous fetching done (%S) t]
4] (quote --asynch-buffer--) (quote --retrieval-done--) --cl-rest--))
(nil))
  url-retrieve(clojure-mode-1.7.1.el (lambda (rest --cl-rest--)
(apply #[... \302\303\304p#\210 \305L\210  pL\207 [G25101 G25100
url-debug retrieval Synchronous fetching done (%S) t] 4] (quote
--asynch-buffer--) (quote --retrieval-done--) --cl-rest--)))
  url-retrieve-synchronously(clojure-mode-1.7.1.el)
  (let ((buffer ...)) (save-excursion (set-buffer buffer)
(package-handle-response) (re-search-forward ^$ nil ...)
(forward-char) (delete-region ... ...) (package-unpack-single ...
version desc requires) (kill-buffer buffer)))
  package-download-single(clojure-mode 1.7.1 Major mode for Clojure
code nil)
  (cond ((eq kind ...) (package-download-tar elt v-string)) ((eq kind
...) (package-download-single elt v-string ... ...)) (t (error
Unknown package kind:  ...)))
  (let* ((desc ...) (v-string ...) (kind ...)) (cond (... ...) (...
...) (t ...)))
  (lambda (elt) (let* (... ... ...) (cond ... ... ...)))(clojure-mode)
  mapc((lambda (elt) (let* (... ... ...) (cond ... ... ...))) (clojure-mode))
  package-download-transaction((clojure-mode))
  (let ((transaction ...)) (package-download-transaction transaction))
  (let ((pkg-desc ...)) (unless pkg-desc (error Package '%s' not
available for installation ...)) (let (...)
(package-download-transaction transaction)))
  package-install(clojure-mode)
  (cond ((eq cmd 68) (when ... ...) (message Deleting %s-%s...
pkg-name pkg-vers) (package-delete pkg-name pkg-vers) (message
Deleting %s-%s... done pkg-name pkg-vers)) ((eq cmd 73)
(package-install ...)))
  (let ((cmd ...) (pkg-name ...) (pkg-vers ...) (pkg-status ...))
(cond (... ... ... ... ...) (... ...)))
  (while (not (eobp)) (let (... ... ... ...) (cond ... ...)) (forward-line))
  package-menu-execute()
  call-interactively(package-menu-execute nil nil)
  recursive-edit()
  byte-code(\306   @\307=\203!

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@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+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Assembla instructions for java -cp clojure.jar yield java.lang.NoClassDefFoundError: clojure/main

2010-05-18 Thread Terrence Brannon
re: http://www.assembla.com/wiki/show/clojure/Getting_Started_with_Emacs


java -cp path/to/clojure.jar clojure.main

this suggestion fails:

metap...@locohost:~/prg/tmp$ java -cp /home/metaperl/.clojure/clojure
clojure.main
Exception in thread main java.lang.NoClassDefFoundError: clojure/main
Caused by: 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 java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
Could not find the main class: clojure.main.  Program will exit.
metap...@locohost:~/prg/tmp$

by the way, clojure.el does not have complete usage instructions in
it, particularly the need to set the inferior-lisp-program correctly.

I thought it was standard practice to include complete install instructions.

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@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+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Assembla instructions for java -cp clojure.jar yield java.lang.NoClassDefFoundError: clojure/main

2010-05-18 Thread Terrence Brannon
My bad... .jar was left off the the first argument :)

On Tue, May 18, 2010 at 12:04 PM, Terrence Brannon scheme...@gmail.com wrote:
 re: http://www.assembla.com/wiki/show/clojure/Getting_Started_with_Emacs


 java -cp path/to/clojure.jar clojure.main

 this suggestion fails:

 metap...@locohost:~/prg/tmp$ java -cp /home/metaperl/.clojure/clojure
 clojure.main
 Exception in thread main java.lang.NoClassDefFoundError: clojure/main
 Caused by: 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 java.lang.ClassLoader.loadClass(ClassLoader.java:307)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
 Could not find the main class: clojure.main.  Program will exit.
 metap...@locohost:~/prg/tmp$

 by the way, clojure.el does not have complete usage instructions in
 it, particularly the need to set the inferior-lisp-program correctly.

 I thought it was standard practice to include complete install instructions.


-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@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+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: #IllegalArgumentException java.lang.IllegalArgumentException: Metadata must be Symbol,Keyword,String or Map

2010-02-17 Thread Terrence Brannon
On Wed, Feb 17, 2010 at 5:51 AM, Meikel Brandmeyer m...@kotka.de wrote:


 #^ attaches metadata to the following thing read.


The reference manual REPL transcript http://clojure.org/special_forms
makes it look like it is being used to retrieve the metadata:

user= ^#'mymax
-{:name mymax,
   :user/comment this is the best fn ever!,
   :doc mymax [xs+] gets the maximum value in xs using  ,
   :arglists ([x] [x y] [x y  more])
   :file repl-1,
   :line 126,
   :ns #Namespace user ,

:test #user$fn__289 user$fn__...@20f443 }

Also, I'm not clear on why I cant get the metadata for this variable x I
just defined even though meta() takes an object as argument 
http://clojure.org/metadata

user= (def #^{ :doc some doc } x 12)
#'user/x
user= (meta x)
nil
user= x
12
user=

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@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+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: #IllegalArgumentException java.lang.IllegalArgumentException: Metadata must be Symbol,Keyword,String or Map

2010-02-17 Thread Terrence Brannon
On Wed, Feb 17, 2010 at 6:49 AM, Terrence Brannon scheme...@gmail.comwrote:



 Also, I'm not clear on why I cant get the metadata for this variable x I
 just defined even though meta() takes an object as argument 
 http://clojure.org/metadata


Because I passed the value of the variable x, not the object... here's how
to get the metadata:

user= (meta (var x))
{:ns #Namespace user,
 :name x,
 :file NO_SOURCE_PATH,
 :line 2,
 :doc some doc}

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@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+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

swank-clojure and debian/stable issue

2010-02-16 Thread Terrence Brannon
After installing swank-clojure via ELPA on emacs23, and type M-x slime, I
get this error:

(require 'swank.swank)

(swank.swank/ignore-protocol-version nil)

(do (.. java.net.InetAddress getLocalHost getHostAddress)
nil)(swank.swank/start-server /tmp/slime.29897 :encoding
iso-latin-1-unix)

Exception in thread main java.lang.NoClassDefFoundError:
clojure.lang.Symbol
   at clojure.main.clinit(main.java:19)
   at java.lang.Class.initializeClass(libgcj.so.70)

Process inferior-lisp exited abnormally with code 1

-- 
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@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+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: java.lang.NoClassDefFoundError: clojure/main

2009-02-04 Thread Terrence Brannon

well, I found technomancy's update of clojure mode... there was
something very odd though.

each time I would 'git clone' it, I would end up with the jochu source
code instead... even though .git/config pointed to technomancy's
github location!

I had to manually download the .zip file and unpack it!

My working .emacs config is here -
http://paste.lisp.org/display/74865

inlined for convenience -
;;; clojure-mode
;;; http://github.com/technomancy/clojure-mode/tree/master

(add-to-list 'load-path c:/tmp/c/technomancy-clojure-mode)
(require 'clojure-mode)

(setq clojure-src-root c:/tmp/c)
(clojure-slime-config)

(autoload 'clojure-mode clojure-mode A major mode for Clojure t)
(add-to-list 'auto-mode-alist '(\\.clj$ . clojure-mode))




On Feb 3, 10:17 pm, Terrence Brannon metap...@gmail.com wrote:
 Hello, I cannot get slime and clojure-mode up and running:

 ;;; inferior lisp output

 (add-classpath file:///c:/Documents and Settings/Administrator/
 Application Data/emacs-contrib/swank-clojure/)

 (require 'swank.swank)

 (swank.swank/ignore-protocol-version 2009-01-30)

 (swank.swank/start-server c:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/slime.
 21424 :encoding iso-latin-1-unix)

 java.lang.NoClassDefFoundError: clojure/main
 Caused by: java.lang.ClassNotFoundException: clojure.main
         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: clojure.main.  Program will exit.
 Exception in thread main
 Process inferior-lisp exited abnormally with code 1

 ;;; .emacs

 ;;; clojure-mode

 ;;;http://github.com/nablaone/slime/tree/master
 (add-to-list 'load-path ~/emacs-contrib/slime)

 ;;;http://github.com/jochu/swank-clojure/tree/master
 (add-to-list 'load-path ~/emacs-contrib/swank-clojure)

 ;;;http://github.com/jochu/clojure-mode/tree/master
 (add-to-list 'load-path ~/emacs-contrib/clojure-mode)

 (require 'slime)

 (autoload 'slime slime  t)
 ;(swank-clojure-config (setq swank-clojure-jar-path ~/src/clojure/
 clojure.jar))
 (setq swank-clojure-jar-path ~/src/clojure/clojure.jar)

 ;(setq swank-clojure-extra-classpaths '(~/src/clojure-contrib/clojure-
 contrib.jar))

 ;; (setq swank-clojure-binary clojure)
 ;(require 'clojure-auto)
 (require 'swank-clojure-autoload)

 (autoload 'clojure-mode clojure-mode A major mode for Clojure t)
 (add-to-list 'auto-mode-alist '(\\.clj$ . clojure-mode))
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Clojure group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~--~~~~--~~--~--~---



How to write a unicode character in clojure?

2009-02-04 Thread Terrence Brannon

How do you write a unicode character in clojure?

Or properly put: what form do you provide the reader so that it
produces a unicode character as data structure?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Clojure group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~--~~~~--~~--~--~---



Re: How to write a unicode character in clojure?

2009-02-04 Thread Terrence Brannon

I got some help from hiredman in the IRC channel -
http://github.com/metaperl/begin-clojure/blob/619eb489fb68839d2376d2cdf7375f2370d38494/1/unicode-chars.txt


On Feb 5, 2:24 am, Terrence Brannon metap...@gmail.com wrote:
 How do you write a unicode character in clojure?

 Or properly put: what form do you provide the reader so that it
 produces a unicode character as data structure?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Clojure group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~--~~~~--~~--~--~---



java.lang.NoClassDefFoundError: clojure/main

2009-02-03 Thread Terrence Brannon

Hello, I cannot get slime and clojure-mode up and running:

;;; inferior lisp output

(add-classpath file:///c:/Documents and Settings/Administrator/
Application Data/emacs-contrib/swank-clojure/)

(require 'swank.swank)

(swank.swank/ignore-protocol-version 2009-01-30)

(swank.swank/start-server c:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/slime.
21424 :encoding iso-latin-1-unix)

java.lang.NoClassDefFoundError: clojure/main
Caused by: java.lang.ClassNotFoundException: clojure.main
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: clojure.main.  Program will exit.
Exception in thread main
Process inferior-lisp exited abnormally with code 1

;;; .emacs

;;; clojure-mode


;;; http://github.com/nablaone/slime/tree/master
(add-to-list 'load-path ~/emacs-contrib/slime)

;;; http://github.com/jochu/swank-clojure/tree/master
(add-to-list 'load-path ~/emacs-contrib/swank-clojure)

;;; http://github.com/jochu/clojure-mode/tree/master
(add-to-list 'load-path ~/emacs-contrib/clojure-mode)

(require 'slime)

(autoload 'slime slime  t)
;(swank-clojure-config (setq swank-clojure-jar-path ~/src/clojure/
clojure.jar))
(setq swank-clojure-jar-path ~/src/clojure/clojure.jar)

;(setq swank-clojure-extra-classpaths '(~/src/clojure-contrib/clojure-
contrib.jar))

;; (setq swank-clojure-binary clojure)
;(require 'clojure-auto)
(require 'swank-clojure-autoload)

(autoload 'clojure-mode clojure-mode A major mode for Clojure t)
(add-to-list 'auto-mode-alist '(\\.clj$ . clojure-mode))


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Clojure group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~--~~~~--~~--~--~---



What is defn-

2009-02-03 Thread Terrence Brannon

What is the significance of the dash after defn? How does it differ
from defn?

Source:
http://www.codepoetics.com/wiki/index.php?title=Topics:SICP_in_other_languages:Clojure:Chapter_1#.3B_1.1.4_The_Elements_of_Programming_-_Compound_Procedures

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Clojure group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~--~~~~--~~--~--~---



somehow (quote foo) came back from the REPL

2009-02-02 Thread Terrence Brannon

I was fooling around in the REPL and from the looks of the transcript,
I typed the very same thing, yet in one case the REPL returned (quote
foo) and in the other case it returned foo.

Transcript follows:

user= \newline
\newline
user= \c
\c
user= nil
nil
user= false
false
user= :foo
:foo
user= 'foo
(quote foo)
user= 'foo
foo

How did that happen?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Clojure group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~--~~~~--~~--~--~---