On 14 Wrz, 20:06, Richard Newman wrote:
> > Nope, it's not that easy. I changed "clojure.example.hello" to
> > "clojure.examples.hello" in the hello.clj file, and the message was
> > still the same. (Hard to believe, isn't it?)
>
> What's the value of *compile-path*? Is it in your classpath?
In
cript, this part was as follows:
(cd /path/to/my/clojure/dir
exec java -cp jline-0.9.94.jar:clojure-1.0.0.jar$CP \
jline.ConsoleRunner clojure.lang.Repl)
So, the JVM was run in my Clojure directory. Thus, the java classpath
returned by the getProperties method was simply:
"jline
On 14 Wrz, 06:01, Richard Newman wrote:
> (...)
> Possibly it's just that your ns doesn't match up to the source path
> (examples versus example).
Nope, it's not that easy. I changed "clojure.example.hello" to
"clojure.examples.hello" in the hello.clj file, and the message was
still the same.
I'm trying to compile a simple Clojure program, in order to get some
Java class
file. Here's my session (I'm in /home/tpj/test):
$ ls -R
.:
classes src
./classes:
./src:
clojure
./src/clojure:
examples
./src/clojure/examples:
hello.clj
$ runclojure -cp `pwd`/classes:`pwd`/sr
Hello. I've written a text, which could be titled a Clojure review. I
wanted to write something about the language, to present it to people,
who probably know something about programming, and perhaps know also
something about Lisp (but it isn't neccessary). I tried to describe
the Clojure's featur
Is there some better way to "call" recur than that:
(loop [ arg1 value1
arg2 value2
...
argn valuen ]
(...) ; some stuff here
(let [ (...) ; some bindings here
result (my-func ...)
a1 (nth result 0)
a2 (nth result 1)
...
an
> (...)
> This is perfectly possible, although not necessarily desirable.
>
> (ns com.example.MyClass
> (:gen-class
> :state state
> :init init
> :methods [[getMyIntField [] Integer]
> [setMyIntField [Integer] Void/TYPE]]))
>
> (defn -init
> [x]
> [[] (ref x)
Hello. I'm new to Lisp. I'm learning Common Lisp, and I'm trying to
take a (brief) look at Clojure. For now, I'm looking for answers to
the following questions:
1) Classes
a) gen-class: OK, but limited by Java (single inheritance)
"If you want to create a class and add methods and even have som