Re: Bug in clojure.contrib.core/-? (improper quoting?)

2010-12-08 Thread Laurent PETIT
Patch added. I'm unable to understand how I can do the following 2 actions that I should do, following the recipe in http://clojure.org/patches : a. please add the 'patch' tag. b. Please mark the ticket 'ready to test' by checking that option under Choose an action... Maybe a permissions

Re: post your feedback on the conj

2010-12-08 Thread Sam Aaron
The rollout of videos has already started: http://twitter.com/clojure_conj/status/10324356836102144 Sam --- http://sam.aaron.name On 1 Dec 2010, at 18:39, PublicFarley wrote: Yup. Count me in as another Clojurian thirsty for videos from the conference. I'm definitely willing to fork

every? and some .. shoule take a predicate and multiple collections like map does..

2010-12-08 Thread Sunil S Nandihalli
Hello everybody, I think every? and some should take multiple collections like map .. I know it is trivial to implement that ..but it would be nice to have it as part of the default behaviour of every? , some , not-any? and not-every? should take more than one collection as the default

Re: Bug in clojure.contrib.core/-? (improper quoting?)

2010-12-08 Thread wlr
Effective communication tip: Please preserve links in responses, so that when somebody is trying to track down issues they don't have to work back through the thread to find links. Effective communication tip #2: Please don't top post, so that when somebody is trying to track down issues

newb q about quote

2010-12-08 Thread javajosh
I was looking at quote. user= (quote 1) 1 user= (quote) nil user= (quote quote) quote user= ((quote quote) 1) nil It's the last result that confuses me. I would have expected the result to be 1 - e.g. the same as (quote 1). I figured I'd try quote on something other than itself, and it just got

Re: newb q about quote

2010-12-08 Thread Aaron Cohen
On Wed, Dec 8, 2010 at 2:40 PM, javajosh javaj...@gmail.com wrote: I was looking at quote. user= (quote 1) 1 user= (quote) nil user= (quote quote) quote user= ((quote quote) 1) nil It's the last result that confuses me. I would have expected the result to be 1 - e.g. the same as

Re: newb q about quote

2010-12-08 Thread Tim Daly
There are 2 kinds of lisps based on the meaning of a symbol. Symbols have structure slots. The first kind of lisp has symbols with a function slot and a value slot. The second kind of lisp has only the value slot. This affects the meaning of a symbol when it is used in the first position of a

Re: newb q about quote

2010-12-08 Thread Meikel Brandmeyer
Hi, Am 08.12.2010 um 22:06 schrieb Tim Daly: There are 2 kinds of lisps based on the meaning of a symbol. Symbols have structure slots. And then there is clojure where symbols are just symbols without any slots. When the compiler encounters a symbol it resolves it to a Var or let local or

Re: easiest way to make a map out of a list?

2010-12-08 Thread Michael Ossareh
On Mon, Dec 6, 2010 at 21:01, Alex Baranosky alexander.barano...@gmail.comwrote: Way I have [:a 1:b 2] and I want to convert it to {:a 1 :b 2} Minor quibble - [] is a Vector not a list. List is (). -- You received this message because you are subscribed to the Google Groups Clojure group. To

String-friendly first/rest?

2010-12-08 Thread Surgo
To help myself learn Clojure, I figured I would write a pattern matching / destructing macro to better look like languages I'm more familiar with; i.e., destructuring by [first|second|rest] instead of [first second rest]. To do this I'm turning the aforementioned vector into a string (via str)

Re: String-friendly first/rest?

2010-12-08 Thread Laurent PETIT
2010/12/8 Surgo morgon.kan...@gmail.com To help myself learn Clojure, I figured I would write a pattern matching / destructing macro to better look like languages I'm more familiar with; i.e., destructuring by [first|second|rest] instead of [first second rest]. To do this I'm turning the

Re: Lots of newbie clojure questions

2010-12-08 Thread Surgo
Not really. (...) is a non-atomic s-expression. If it's evaluated unquoted, the first nested s-expression is evaluated and if it's not callable an exception is thrown. Macros, special forms (which are sort of like system-internal macros and are used to build all the other macros, and

Re: String-friendly first/rest?

2010-12-08 Thread Surgo
(rest anything) returns a seq, by definition. It's not about Strings, it's the contract of rest. A String is not a seq, but it's viewable as a seq, in which case each element of the seq will be a character of the String. Note that this is not particular to String, but to almost any clojure

Re: String-friendly first/rest?

2010-12-08 Thread Tim Robinson
Laurent is right. Best to use substring: (.substring test 1 (count test)) bc On Dec 8, 12:43 pm, Surgo morgon.kan...@gmail.com wrote: To help myself learn Clojure, I figured I would write a pattern matching / destructing macro to better look like languages I'm more familiar with; i.e.,

batch could be fun in clojure

2010-12-08 Thread Raoul Duke
another take on rpc/queries/services: www.odbms.org/download/2010-09-Batches-ICOODB.pdf apparently very preliminary, i can't find the java implementation referred to in the slides. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this

Re: String-friendly first/rest?

2010-12-08 Thread Meikel Brandmeyer
Hi, Am 08.12.2010 um 23:05 schrieb Surgo: That's a fair criticism. I suppose that I'm not necessarily looking for specifically String manipulation abstractions (I can just do a (.substr abc 1) to get bc as a String after all), but rather looking for an abstraction that takes something that's

Re: String-friendly first/rest?

2010-12-08 Thread Benny Tsai
(subs test 1) will work as well; the default behavior is to go to the end if no end position is specified. On Dec 8, 3:16 pm, Miki miki.teb...@gmail.com wrote: (.substring test 1 (count test)) bc FYI: Clojure has subs - (subs test 1 (count test)) -- You received this message because you

Re: String-friendly first/rest?

2010-12-08 Thread Laurent PETIT
2010/12/8 Surgo morgon.kan...@gmail.com (rest anything) returns a seq, by definition. It's not about Strings, it's the contract of rest. A String is not a seq, but it's viewable as a seq, in which case each element of the seq will be a character of the String. Note that this is not

Re: String-friendly first/rest?

2010-12-08 Thread Michael Gardner
On Dec 8, 2010, at 4:05 PM, Surgo wrote: That's a fair criticism. I suppose that I'm not necessarily looking for specifically String manipulation abstractions (I can just do a (.substr abc 1) to get bc as a String after all), but rather looking for an abstraction that takes something that's

Re: String-friendly first/rest?

2010-12-08 Thread Laurent PETIT
2010/12/8 Michael Gardner gardne...@gmail.com On Dec 8, 2010, at 4:05 PM, Surgo wrote: That's a fair criticism. I suppose that I'm not necessarily looking for specifically String manipulation abstractions (I can just do a (.substr abc 1) to get bc as a String after all), but rather

Re: newb q about quote

2010-12-08 Thread Tim Daly
On 12/8/2010 4:26 PM, Meikel Brandmeyer wrote: Hi, Am 08.12.2010 um 22:06 schrieb Tim Daly: There are 2 kinds of lisps based on the meaning of a symbol. Symbols have structure slots. And then there is clojure where symbols are just symbols without any slots. When the compiler encounters

Re: newb q about quote

2010-12-08 Thread javajosh
On Dec 8, 12:05 pm, Aaron Cohen aa...@assonance.org wrote: On Wed, Dec 8, 2010 at 2:40 PM, javajosh javaj...@gmail.com wrote: I was looking at quote. user= (quote 1) 1 user= (quote) nil user= (quote quote) quote user= ((quote quote) 1) nil It's the last result that confuses

Re: String-friendly first/rest?

2010-12-08 Thread Meikel Brandmeyer
Hi, Am 08.12.2010 um 23:53 schrieb Laurent PETIT: Meikel showed the way, though it's different enough in semantics to deserve its own protocol and not override (in fact replace, in his example) existing concepts. Well, this showed up the second time in two days, so I thought I'd write it

Re: String-friendly first/rest?

2010-12-08 Thread Phil Hagelberg
On Wed, Dec 8, 2010 at 2:00 PM, Laurent PETIT laurent.pe...@gmail.com wrote: (def test abc) (first test) \a (rest test) (\b \c) (string? (rest test)) false It would be really helpful if first/rest returned strings (or a character in the case of first), not lists, when given string

Unable to run Clojure (jline is missing)

2010-12-08 Thread HB
Hi, I downloaded Clojure 1.2 https://github.com/downloads/clojure/clojure/clojure-1.2.0.zip and extract it. I created CLOJURE_HOME and added $CLOJURE_HOME/script to my $PATH Upon trying clj or repl , I got this error: Exception in thread main java.lang.NoClassDefFoundError: jline/ ConsoleRunner

Re: Unable to run Clojure (jline is missing)

2010-12-08 Thread Tim Robinson
Did you download jline and put it in a location where it can been accessed with the classpath? http://jline.sourceforge.net/ On Dec 8, 6:47 pm, HB hubaghd...@gmail.com wrote: Hi, I downloaded Clojure 1.2https://github.com/downloads/clojure/clojure/clojure-1.2.0.zip and extract it. I

Re: Unable to run Clojure (jline is missing)

2010-12-08 Thread HB
I expect Clojure maintainers to provide a working distro but anyway, I checked clj script under the script directory: #!/bin/sh CLASSPATH=src/clj:test:test-classes:classes/:script/ jline-0.9.94.jar:../clojure-contrib/target/clojure-contrib-1.2.0- SNAPSHOT.jar if [ -z $1 ]; then exec java

Lisp history

2010-12-08 Thread Tim Daly
For those who were not around when the Common Lisp standard was being debated you might find this interesting: http://lisp.geek.nz/weekly-repl/ Common Lisp Standardization: The good, the bad, and the ugly by Peter Seibel -- You received this message because you are subscribed to the Google

Re: Unable to run Clojure (jline is missing)

2010-12-08 Thread Alex Osborne
HB hubaghd...@gmail.com writes: I checked clj script under the script directory: #!/bin/sh CLASSPATH=src/clj:test:test-classes:classes/:script/ jline-0.9.94.jar:../clojure-contrib/target/clojure-contrib-1.2.0- SNAPSHOT.jar if [ -z $1 ]; then exec java -server jline.ConsoleRunner

Re: Unable to run Clojure (jline is missing)

2010-12-08 Thread HB
I think it is unacceptable to provide broken, unpolished and not working scripts. I'm definitely respect the maintainers, I'm just annoyed because I spent a couple of hours trying to make it works. Thanks Alex, I owe you a huge mug of beer :) On Dec 9, 6:39 am, Alex Osborne a...@meshy.org wrote: