Re: java.ext.dirs problem

2009-06-27 Thread Laurent PETIT
While I'm far from a java classpath-related issues problem, I think I know enough to say that placing your libs in the java.ext.dirs classpath is a trick that could lead to problems. It's primary and sole intent is to hold extensions to the java API that then would be loaded with the core java

Re: Enlive questions

2009-06-27 Thread cody
On May 6, 12:36 am, Christophe Grand christo...@cgrand.net wrote: Hello Ryan, rzeze...@gmail.com a écrit : Either I've missed something, orEnlive*appears* to have problems handling comment tags. Indeed. I pushed a fix, please tell me whether it works for you now. Thanks for the

Re: executing tasks on a schedule

2009-06-27 Thread ataggart
What do you need that a cron job wouldn't provide? On Jun 26, 8:43 am, Stuart Halloway stuart.hallo...@gmail.com wrote: I am working on a Clojure project that is becoming more and more   schedule-oriented. So far I have been using Clojure's native   concurrency constructs, but I am becoming

Re: General Lisp Comment: side effects with Lisp oriented languages

2009-06-27 Thread Daniel Lyons
BerlinBrown, I apologize in advance; I must be chairman of Haskell hate or something. On Jun 26, 2009, at 3:51 PM, BerlinBrown wrote: One small issue I see with Lisp languages over something like Haskell where side effects are greatly minimized. I tend to write code in this style: This is

Re: Enlive questions

2009-06-27 Thread Christophe Grand
Hi Cody! On Sat, Jun 27, 2009 at 8:47 AM, cody c...@koeninger.org wrote: Maybe unrelated, but =(html-resource (java.io.StringReader. !-- o noes a comment -- htmlheadtitlet/title/headbodyh1h/h1/body/html)) ({:type :comment, :data o noes a comment }) Not the result I would expect.

Re: Bug: ClassNotFoundException with macro using private helper function.

2009-06-27 Thread Meikel Brandmeyer
Hi, Am 26.06.2009 um 20:41 schrieb Four of Seventeen: (defn- foo [args] body) (defmacro bar [args] body) `(foo ~some-args (fn [~more-args] ~...@body))) and it complained that foo was not public when I invoked bar from outside its home namespace. Yes. foo must be public in macros used by

Re: Small question: inserting something at the beginning of a vector

2009-06-27 Thread Meikel Brandmeyer
Hi, Am 27.06.2009 um 02:27 schrieb samppi: Mr. Brandmeyer You can call me Meikel, I guess. ;) What might also be interesting if you want to insert at one end and take out at the other is clojure.lang.PersistentQueue. conj will insert at the front and pop/peek will work at the end. There is

Re: Small question: inserting something at the beginning of a vector

2009-06-27 Thread Meikel Brandmeyer
Hi again, Am 27.06.2009 um 11:59 schrieb Meikel Brandmeyer: There is now constructor, like [] or {}. Just use c.l.PersistentQueue/EMPTY. I meant: there is _no_ constructor Sincerely Meikel smime.p7s Description: S/MIME cryptographic signature

Re: java.ext.dirs problem

2009-06-27 Thread mccraigmccraig
to help with the temptation i wrote a little ruby script which configures java classpaths and invokes clojure [only tried on macos... probably fine on linux, and should be portable to windows] http://github.com/mccraigmccraig/clojure-load.rb if you put all your clojure project repos,

Re: The API docs are gone!

2009-06-27 Thread Justin
This if off-topic but I'm wondering- is there any reason (doc ...) returns a URL instead of documentation for special forms? On Jun 27, 12:29 am, ataggart alex.tagg...@gmail.com wrote: On Jun 26, 9:12 pm, Four of Seventeen fsevent...@gmail.com wrote: Not that it really matters why it is/was

Re: Trying to use lazy-seq for the first time, failing.

2009-06-27 Thread Meikel Brandmeyer
Hi, Am 27.06.2009 um 02:23 schrieb _hrrld: Am I doing something silly? Or perhaps I've misunderstood lazy-seq's operation. I think, it's the latter. Here my try on an explanation: lazy-seq returns a value, which implements ISeq, ie. the seq interface. The code inside the lazy-seq is used to

Re: Trying to use lazy-seq for the first time, failing.

2009-06-27 Thread Jarkko Oranen
On Jun 27, 3:23 am, _hrrld hhaus...@gmail.com wrote: Hi, I'm trying to use lazy-seq to implement a cool piece of functionality I saw in the Factor programming language. Here is the documentation for that functionality:http://docs.factorcode.org/content/word-produce,sequences.html I think

Re: The API docs are gone!

2009-06-27 Thread Four of Seventeen
On Jun 27, 1:53 am, CuppoJava patrickli_2...@hotmail.com wrote: It was a server maintenance for wikispaces.org which is the hosting site for the Clojure website. But the Clojure website is clojure.org. NOT clojure.wikispaces.org or something. It's clearly standing alone, or at least it's

Re: ClassCastException - maybe a bug

2009-06-27 Thread Meikel Brandmeyer
Hi, Am 26.06.2009 um 23:44 schrieb Michael Spiegel: Running the following test code generates an exception: =(def foo (sorted-set bob alice michael)) = (contains? foo 5) java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Number (NO_SOURCE_FILE:0) I've tracked down

Re: Bug: ClassNotFoundException with macro using private helper function.

2009-06-27 Thread Four of Seventeen
On Jun 27, 5:53 am, Meikel Brandmeyer m...@kotka.de wrote: Hi, Am 26.06.2009 um 20:41 schrieb Four of Seventeen: (defn- foo [args] body) (defmacro bar [args] body)  `(foo ~some-args (fn [~more-args] ~...@body))) and it complained that foo was not public when I invoked bar from

Re: Trying to use lazy-seq for the first time, failing.

2009-06-27 Thread arasoft
I think you just forgot to return the value itself. This seems to work: (defn produce [value predicate generator] (when (predicate value) (let [result (generator value)] (cons result (lazy-seq (produce result predicate generator) ) And I would use quot instead of

Re: Trying to use lazy-seq for the first time, failing.

2009-06-27 Thread Jarkko Oranen
On Jun 27, 3:23 am, _hrrld hhaus...@gmail.com wrote: Hi, I'm trying to use lazy-seq to implement a cool piece of functionality I saw in the Factor programming language. Here is the documentation for that functionality:http://docs.factorcode.org/content/word-produce,sequences.html I

Re: Trying to use lazy-seq for the first time, failing.

2009-06-27 Thread _hrrld
On Jun 27, 9:48 am, Meikel Brandmeyer m...@kotka.de wrote: Hi, Am 27.06.2009 um 02:23 schrieb _hrrld: Am I doing something silly? Or perhaps I've misunderstood lazy-seq's operation. I think, it's the latter. Here my try on an explanation: (snip...) I found your explanation cogent and

Re: java.ext.dirs problem

2009-06-27 Thread Chouser
On Sat, Jun 27, 2009 at 2:34 AM, Laurent PETITlaurent.pe...@gmail.com wrote: While I'm far from a java classpath-related issues problem, I think I know enough to say that placing your libs in the java.ext.dirs classpath is a trick that could lead to problems. I've been using it mainly

Re: The API docs are gone!

2009-06-27 Thread J. McConnell
On Jun 27, 2009, at 12:28 PM, Four of Seventeen fsevent...@gmail.com wrote: On Jun 27, 1:53 am, CuppoJava patrickli_2...@hotmail.com wrote: It was a server maintenance for wikispaces.org which is the hosting site for the Clojure website. But the Clojure website is clojure.org. NOT

Re: java.ext.dirs problem

2009-06-27 Thread Laurent PETIT
Hi, 2009/6/28 Chouser chou...@gmail.com: On Sat, Jun 27, 2009 at 2:34 AM, Laurent PETITlaurent.pe...@gmail.com wrote: While I'm far from a java classpath-related issues problem, I think I know enough to say that placing your libs in the java.ext.dirs classpath is a trick that could lead to

Re: The API docs are gone!

2009-06-27 Thread Four of Seventeen
On Jun 27, 6:32 pm, J. McConnell jdo...@gmail.com wrote: On Jun 27, 2009, at 12:28 PM, Four of Seventeen fsevent...@gmail.com   wrote: Regardless, it's a security problem that someone other than Rich was able to bring clojure.org down for tens of minutes last night at the push of a

Re: The API docs are gone!

2009-06-27 Thread hank williams
If Rich wants to keep his stuff there because it meets his needs and he is fully aware of what they do and how they do it then all of this is irrelevant. In any case security risk is really a overblown term for even the worst case scenario of what could happen to documentation pages. If you are

Re: Trying to use lazy-seq for the first time, failing.

2009-06-27 Thread Wrexsoul
On Jun 26, 8:23 pm, _hrrld hhaus...@gmail.com wrote: Hi, I'm trying to use lazy-seq to implement a cool piece of functionality I saw in the Factor programming language. Here is the documentation for that functionality:http://docs.factorcode.org/content/word-produce,sequences.html I think

Re: ClassCastException - maybe a bug

2009-06-27 Thread Handkea fumosa
On Jun 27, 11:32 am, Meikel Brandmeyer m...@kotka.de wrote: Am 26.06.2009 um 23:44 schrieb Michael Spiegel: =(def foo (sorted-set bob alice michael)) = (contains? foo 5) java.lang.ClassCastException: java.lang.String cannot be cast to   java.lang.Number (NO_SOURCE_FILE:0) IIRC, this

Re: The API docs are gone!

2009-06-27 Thread Rich Hickey
On Sat, Jun 27, 2009 at 7:55 PM, Four of Seventeenfsevent...@gmail.com wrote: On Jun 27, 6:32 pm, J. McConnell jdo...@gmail.com wrote: On Jun 27, 2009, at 12:28 PM, Four of Seventeen fsevent...@gmail.com wrote: Regardless, it's a security problem that someone other than Rich was able to

Bug: (list? (cons 4 '(1 2 3))) returns false!

2009-06-27 Thread Handkea fumosa
user= (list? '(1 2 3)) true user= (list? (cons 4 '(1 2 3))) false --~--~-~--~~~---~--~~ 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

(for [binds] body) violates convention for non-conditional binding forms

2009-06-27 Thread Handkea fumosa
user= (doall (for [x (range 2) y (range 2)] (println x @ y) (* x y))) Expected: 0 @ 0 0 @ 1 1 @ 0 1 @ 1 (0 0 0 1) Got: #CompilerException java.lang.IllegalArgumentException: Wrong number of args passed to: core$for (NO_SOURCE_FILE:220) Wrapping the body in an explicit do fixes it,

Re: java.ext.dirs problem

2009-06-27 Thread Alex Combas
Hello, Undoubtedly it is not the best solution, but all I do is export a variable called CLASSPATH pointing to whichever directories I want to require or load. # append to your .bashrc script # Start CLASSPATH=/home/user/aaa:/home/user/bbb:$CLASSPATH export CLASSPATH # End The only gotcha so

Re: Bug: (list? (cons 4 '(1 2 3))) returns false!

2009-06-27 Thread Stephen C. Gilardi
On Jun 28, 2009, at 12:07 AM, Handkea fumosa wrote: user= (list? '(1 2 3)) true user= (list? (cons 4 '(1 2 3))) false user= (doc cons) - clojure.core/cons ([x seq]) Returns a new seq where x is the first element and seq is the rest. nil user=

Re: Bug: (list? (cons 4 '(1 2 3))) returns false!

2009-06-27 Thread Handkea fumosa
On Jun 28, 12:41 am, Stephen C. Gilardi squee...@mac.com wrote: On Jun 28, 2009, at 12:07 AM, Handkea fumosa wrote: user= (list? '(1 2 3)) true user= (list? (cons 4 '(1 2 3))) false    user= (doc cons)    -    clojure.core/cons    ([x seq])      Returns a

Re: Bug: (list? (cons 4 '(1 2 3))) returns false!

2009-06-27 Thread Richard Newman
cons is acting according to its documentation. It's list? that isn't. That's not strictly true: user= (doc list?) - clojure.core/list? ([x]) Returns true if x implements IPersistentList nil user= (cons 5 '(1 2 3)) (5 1 2 3) user= (ancestors (type *1))