Re: Querying hierarchies in core.logic

2013-03-11 Thread Ambrose Bonnaire-Sergeant
Hi,

There's a brief transcript of a conversation with Tassilo under the ns.

He also wrote a nice blog post on the technique
http://tsdh.wordpress.com/2012/01/06/using-clojures-core-logic-with-custom-data-structures/

Thanks,
Ambrose

On Mon, Mar 11, 2013 at 12:21 PM, JvJ  wrote:

> I understand that it is possible, and I have found a code example here :
> https://github.com/frenchy64/Logic-Starter/blob/master/src/logic_introduction/extend.clj#L76
>
> However, the code presented is rather terse, and some functions, such as
> lvar-in? aren't documented.
>
> Does anyone know of something that describes this code, or at least the
> process involved?
>
> Thanks.
>
> --
> --
> 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
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: fold over a sequence

2013-03-11 Thread Jim foo.bar
I don't think you will be able to do a parallel fold on a lazy-seq which 
is what clojure.data.xml/parse returns. Vectors are the only persistent 
collection that supports parallel fold and something tells me it's 
because they are NOT lazy...


why can't you 'vec' the result of xml/parse and then use fold on that? 
Is it a massive seq?


Jim


On 11/03/13 00:40, Paul Butcher wrote:
As things currently stand, fold can be used on a sequence-based 
reducible collection, but won't be parallel.


I'm currently working on code that processes XML generated by 
clojure.data.xml/parse, and would love to do so in parallel. I can't 
immediately see any reason why it wouldn't be possible to create a 
version of CollFold that takes a sequence and "chunks" it so that it 
can be folded in parallel. Has anyone tried this yet? Is there some 
gotcha lurking to catch me out?


--
paul.butcher->msgCount++

Snetterton, Castle Combe, Cadwell Park...
Who says I have a one track mind?

http://www.paulbutcher.com /
LinkedIn: http://www.linkedin.com/in/paulbutcher
MSN: p...@paulbutcher.com 
AIM: paulrabutcher
Skype: paulrabutcher

--
--
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
---
You received this message because you are subscribed to the Google 
Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to clojure+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.




--
--
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
--- 
You received this message because you are subscribed to the Google Groups "Clojure" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




What's the point of -> ?

2013-03-11 Thread edward
So I understand that:

(-> foo bar wibble)

is equivalent to

(wibble (bar (foo)))

With the advantage that the latter version is better, in the sense that 
it's clearer what the final result is (the result of the call to wobble).

What I don't understand is the need for -> the only thing it seems to do is 
make something Lispy appear to be imperative.

Is that it?

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: fold over a sequence

2013-03-11 Thread Marko Topolnik
The idea is to transform into a lazy sequence of eager chunks. That 
approach should work.

On Monday, March 11, 2013 11:40:01 AM UTC+1, Jim foo.bar wrote:
>
>  I don't think you will be able to do a parallel fold on a lazy-seq which 
> is what clojure.data.xml/parse returns. Vectors are the only persistent 
> collection that supports parallel fold and something tells me it's because 
> they are NOT lazy...
>
> why can't you 'vec' the result of xml/parse and then use fold on that? Is 
> it a massive seq?
>
> Jim
>  
>
> On 11/03/13 00:40, Paul Butcher wrote:
>  
> As things currently stand, fold can be used on a sequence-based reducible 
> collection, but won't be parallel.
>
>  I'm currently working on code that processes XML generated by 
> clojure.data.xml/parse, and would love to do so in parallel. I can't 
> immediately see any reason why it wouldn't be possible to create a version 
> of CollFold that takes a sequence and "chunks" it so that it can be folded 
> in parallel. Has anyone tried this yet? Is there some gotcha lurking to 
> catch me out?
>
>  --
> paul.butcher->msgCount++
>
> Snetterton, Castle Combe, Cadwell Park...
> Who says I have a one track mind?
>
> http://www.paulbutcher.com/
> LinkedIn: http://www.linkedin.com/in/paulbutcher
> MSN: pa...@paulbutcher.com 
> AIM: paulrabutcher
> Skype: paulrabutcher
>  
> -- 
> -- 
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clo...@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+u...@googlegroups.com 
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to clojure+u...@googlegroups.com .
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  
>
>
>  

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Newbie requesting review

2013-03-11 Thread Gary Verhaegen
For the sake of nitpicking, you are still using camelCase instead of
hyphenation in make-student.

On 11 March 2013 02:18, Craig Ching  wrote:
> Alright, thanks Gary and Marko, I really appreciate the advice!
>
>
> On Sunday, March 10, 2013 8:26:47 AM UTC-5, Marko Topolnik wrote:
>>
>> Several comments:
>>
>> 1. camelCase is not idiomatic for Clojure. Prefer lowercase-dashed-style.
>>
>> 2. use :keywords for map keys and, more generally, for any
>> enumeration-type values (coming from a closed set of options). If you want
>> JSON output, transform these into camelCased strings only at the "checkout
>> desk".
>
>
> Ugh, I *do* actually know better than that, thanks for pointing it out!
>
>>
>>
>> 3. make-student-factory is what you'd call a curried function. You'd have
>> an easier time with it if you declared it as a regular two-argument function
>> and then used either clojure.core/partial or a literal #(make-student
>> teacher-name %). That would allow you to use the function either directly as
>> a student factory, or as a factory of student factories. Note that your
>> approach to use a closure is idiomatic, I'm just advising a more idiomatic
>> way to get it.
>>
>
> Ok, I *think* I understand what you're saying.  I did try an anonymous
> function at one point, but gave it up, I don't know why I did because it
> ended up working pretty well after reading your advice.  How's this then?
>
> (ns teachers.core
>   (:require [clj-json.core :as json]))
>
> (defn- gen-items-json
>   [students]
>   (json/generate-string {:timestamp 5000
>  :items students
>  :identifier "id"
>  :label "id"
>  :rc 200
>  :msg "Data retrieved successfully."}))
>
> (defn- make-student
>   [teacher-name
>student-name
>age] {:id (str teacher-name "!" student-name)
>:TeacherName teacher-name
>:StudentName student-name
>:age age})
>
> (defn- make-name [prefix n] (str prefix n))
> (defn- make-teacher-name [n] (make-name "TEACHER" n))
> (defn- make-student-name [n] (make-name "STUDENT" n))
>
> (defn- make-students
>   [teacher-name n]
>   (map #(make-student teacher-name (make-student-name %) 0)
>(range n)))
>
> (defn- spit-json
>   [teacher-name n]
>   (println "Creating " n " students for teacher: " teacher-name)
>   (spit (str teacher-name ".json")
> (gen-items-json (make-students teacher-name n
>
> (defn gen
>   [num-teachers num-students]
>   (doseq [teacher-name (map make-teacher-name (range num-teachers))]
> (spit-json teacher-name num-students)))
>
> Thanks a ton for your time, this list is really a great place and I
> appreciate being able to come here with questions!
>
> Cheers,
> Craig
>
> --
> --
> 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
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: What's the point of -> ?

2013-03-11 Thread Chris Ford
I wouldn't say imperative, rather pipelined. -> can be used to represent a
deeply nested expression as a pipeline.

On 11 March 2013 13:58,  wrote:

> So I understand that:
>
> (-> foo bar wibble)
>
> is equivalent to
>
> (wibble (bar (foo)))
>
> With the advantage that the latter version is better, in the sense that
> it's clearer what the final result is (the result of the call to wobble).
>
> What I don't understand is the need for -> the only thing it seems to do
> is make something Lispy appear to be imperative.
>
> Is that it?
>
> --
> --
> 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
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: What's the point of -> ?

2013-03-11 Thread Marko Topolnik
On Monday, March 11, 2013 12:03:59 PM UTC+1, Michael Klishin wrote:

>
> 2013/3/11 >
>
>> What I don't understand is the need for -> the only thing it seems to do 
>> is make something Lispy appear to be imperative.
>>
>> Is that it?
>>
>
> When you have longer chains of functions, the "traditional way" forces you 
> to read from
> right to left. For most people, it is more convenient to read from left to 
> right.
> If you have anonymous functions in this chain and they span multiple lines,
> it only gets worse.
>
> ->, ->> and friends make it easier to see the data flow. It has nothing to 
> do
> with imperative style of programming.
>

It also makes it much easier to format and indent code in a readable 
manner, while respecting the established norms for Lisp code indentation.

Note also that Haskell, that bastillion of pure FP, has *do* which does 
pretty much the same thing for the monadic bind operation.

-Marko
 

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Newbie requesting review

2013-03-11 Thread Marko Topolnik
On Monday, March 11, 2013 2:18:32 AM UTC+1, Craig Ching wrote:

> Ok, I *think* I understand what you're saying.  I did try an anonymous 
> function at one point, but gave it up, I don't know why I did because it 
> ended up working pretty well after reading your advice.  How's this then?
>
> (defn- make-students
>   [teacher-name n]
>   (map #(make-student teacher-name (make-student-name %) 0)
>(range n)))
>

Yes, that's how I'd write it. Let me also comment on another slight aspect:

(defn- make-student
>   [teacher-name
>student-name
>age] {:id (str teacher-name "!" student-name)
>:TeacherName teacher-name
>:StudentName student-name
>:age age})


This kind if formatting hurts readability for people used to the style that 
most Clojure code adopts, which would look something like this:

(defn- make-student [teacher-name student-name age]
  {:id (str teacher-name "!" student-name)
   :TeacherName teacher-name
   :StudentName student-name
   :age age})

Placing the arguments vector on its own line is also an option, but you 
shouldn't start the body in the same line.

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Clojure 1.5.1

2013-03-11 Thread Stuart Halloway
Fixed, thanks.

Stu


On Sun, Mar 10, 2013 at 7:28 PM,  wrote:

> I think there's a typo in the download link on
> http://clojure.org/downloads:
>
> It says http://repo1.maven.org/maven2/org/clojure/clojure/1.5.*0*
> /clojure-1.5.1.zip
> whereas it should be
> http://repo1.maven.org/maven2/org/clojure/clojure/1.5.*1*
> /clojure-1.5.1.zip
> (note the "1.5.1" vs. "1.5.0" in the second to last part of the URL)
>
>
> Am Sonntag, 10. März 2013 19:35:34 UTC+1 schrieb stuart@gmail.com:
>
>> Clojure 1.5.1 fixes a memory leak in Clojure 1.5, discussed here:
>>
>> https://groups.google.com/d/**msg/clojure-dev/uAFM0Ti4AcQ/**GmnKmphF1BgJ
>>
>> Getting Clojure:
>>
>>   Web:  http://clojure.org/downloads
>>   Lein/Maven:   :dependencies [[org.clojure/clojure "1.5.1"]]
>>
>> Note that it will take a few hours for the links above to become live,
>> as the completed build moves into Maven Central.
>>
>> Thanks,
>>
>> Stu Halloway
>> Clojure/core
>>
>  --
> --
> 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
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
>
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: What's the point of -> ?

2013-03-11 Thread Bob Hutchison

On 2013-03-11, at 6:58 AM, edw...@kenworthy.info wrote:

> So I understand that:
> 
> (-> foo bar wibble)
> 
> is equivalent to
> 
> (wibble (bar (foo)))
> 
> With the advantage that the latter version is better, in the sense that it's 
> clearer what the final result is (the result of the call to wobble).
> 
> What I don't understand is the need for -> the only thing it seems to do is 
> make something Lispy appear to be imperative.
> 
> Is that it?

Consider:

  (-> foo
  (f1 p1 p2 p3)
  (f2 p4 p5 p6)
  (f3 p7 p8 p9))

vs

(f3 (f2 (f1 foo p1 p2 p3) p4 p5 p6) p7 p8 p9)

(assuming I cut and pasted correctly) and you can see a little better where 
this is going, especially if you tried putting real names in there.

Is it imperative? Is it declarative? Who cares?

Cheers,
Bob


> 
> -- 
> -- 
> 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
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Newbie requesting review

2013-03-11 Thread Craig Ching
Hi Gary,

On Monday, March 11, 2013 6:02:12 AM UTC-5, Gary Verhaegen wrote:
>
> For the sake of nitpicking, you are still using camelCase instead of 
> hyphenation in make-student. 
>
>
This part?

{:id (str teacher-name "!" student-name)
   :TeacherName teacher-name
   :StudentName student-name
   :age age}

That's what the web ui expects (I'm not really using teachers and students, 
but the actual data we do use is camel case) and there's actually a really 
good reason it uses what it uses.  I'll make sure I didn't miss any others 
though, thanks! 

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Newbie requesting review

2013-03-11 Thread Craig Ching


On Monday, March 11, 2013 6:35:09 AM UTC-5, Marko Topolnik wrote:
>
>
> This kind if formatting hurts readability for people used to the style 
> that most Clojure code adopts, which would look something like this:
>
> (defn- make-student [teacher-name student-name age]
>   {:id (str teacher-name "!" student-name)
>:TeacherName teacher-name
>:StudentName student-name
>:age age})
>
> Placing the arguments vector on its own line is also an option, but you 
> shouldn't start the body in the same line.
>
>
Ok, thanks Marko, I've been playing around a bit with my formatting and 
looking at a lot of clojure code, but you're right, I don't think I've seen 
anyone do it the way I've done here ;-)
 

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: fold over a sequence

2013-03-11 Thread Paul Butcher
On 11 Mar 2013, at 10:40, Jim foo.bar  wrote:

> why can't you 'vec' the result of xml/parse and then use fold on that? Is it 
> a massive seq?

In my case, it's the Wikipedia XML dump, so around 40GiB (so no, that wouldn't 
work :-)

--
paul.butcher->msgCount++

Snetterton, Castle Combe, Cadwell Park...
Who says I have a one track mind?

http://www.paulbutcher.com/
LinkedIn: http://www.linkedin.com/in/paulbutcher
MSN: p...@paulbutcher.com
AIM: paulrabutcher
Skype: paulrabutcher

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: fold over a sequence

2013-03-11 Thread Paul Butcher
On 11 Mar 2013, at 11:00, Marko Topolnik  wrote:

> The idea is to transform into a lazy sequence of eager chunks. That approach 
> should work.

Exactly. Right - I guess I should put my money where my mouth is and see if I 
can get it working...

--
paul.butcher->msgCount++

Snetterton, Castle Combe, Cadwell Park...
Who says I have a one track mind?

http://www.paulbutcher.com/
LinkedIn: http://www.linkedin.com/in/paulbutcher
MSN: p...@paulbutcher.com
AIM: paulrabutcher
Skype: paulrabutcher

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




clojureans in Boston and NYC

2013-03-11 Thread Giacomo Cosenza
Hello everyone,
on march 29th I'm moving from Milan (Italy) to Boston and I'm going to stay 
there for a month. During that month I'm pretty sure I'm going to visit NYC for 
few days. It would be an honor for me to have the opportunity to meet any 
clojurean living in Boston and NYC. There few italian clojureans and most of 
them live abroad and the only italian clojureans that I personally know are the 
ones working in my small sw company. 

If someone is interested to meet me, just let me know. I'll appreciate a lot.

Thanks so much for your attention.

Mimmo


 






-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: clojureans in Boston and NYC

2013-03-11 Thread Tamreen Khan
The Clojure NYC meetup gets together about once a month:
http://www.meetup.com/Clojure-NYC/


On Mon, Mar 11, 2013 at 10:06 AM, Giacomo Cosenza
wrote:

> Hello everyone,
> on march 29th I'm moving from Milan (Italy) to Boston and I'm going to
> stay there for a month. During that month I'm pretty sure I'm going to
> visit NYC for few days. It would be an honor for me to have the opportunity
> to meet any clojurean living in Boston and NYC. There few italian
> clojureans and most of them live abroad and the only italian clojureans
> that I personally know are the ones working in my small sw company.
>
> If someone is interested to meet me, just let me know. I'll appreciate a
> lot.
>
> Thanks so much for your attention.
>
> Mimmo
>
>
>
>
>
>
>
>
>
> --
> --
> 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
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: clojureans in Boston and NYC

2013-03-11 Thread Chas Emerick
The Boston Clojure group is very healthy, engaging, and enjoyable:

http://www.meetup.com/Boston-Clojure-Group/

And, if you get out further my way, we'd love to have you as a guest at the 
Functional Programmer Connoisseurs:

http://www.meetup.com/Functional-Programming-Connoisseurs/

Cheers,

- Chas

On Mar 11, 2013, at 10:06 AM, Giacomo Cosenza wrote:

> Hello everyone,
> on march 29th I'm moving from Milan (Italy) to Boston and I'm going to stay 
> there for a month. During that month I'm pretty sure I'm going to visit NYC 
> for few days. It would be an honor for me to have the opportunity to meet any 
> clojurean living in Boston and NYC. There few italian clojureans and most of 
> them live abroad and the only italian clojureans that I personally know are 
> the ones working in my small sw company. 
> 
> If someone is interested to meet me, just let me know. I'll appreciate a lot.
> 
> Thanks so much for your attention.
> 
> Mimmo
> 
> 
> 
> 
> 
> 
> 
> 
> 
> -- 
> -- 
> 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
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
> 
> 

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: What's the point of -> ?

2013-03-11 Thread edward
But to understand the first you have to expand it into the second- which 
means understanding the arcane squiggle -> and how it differs from the 
equally arcane squiggle ->>. Nasty, sticky, syntactic sugar :)

I suspect that early on, still being a Clojure noobie, I'll stick with the 
'proper' Lisp forms and no doubt as I become more experienced I'll pick 
more of the arcane Clojure idioms ;)

On Monday, March 11, 2013 10:58:29 AM UTC, edw...@kenworthy.info wrote:
>
> So I understand that:
>
> (-> foo bar wibble)
>
> is equivalent to
>
> (wibble (bar (foo)))
>
> With the advantage that the latter version is better, in the sense that 
> it's clearer what the final result is (the result of the call to wobble).
>
> What I don't understand is the need for -> the only thing it seems to do 
> is make something Lispy appear to be imperative.
>
> Is that it?
>

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: What's the point of -> ?

2013-03-11 Thread Dave Kincaid
I'm with you. I don't like it personally. Every time I come across it 
reading code I have to stop and think about what exactly it does.

On Monday, March 11, 2013 10:00:13 AM UTC-5, edw...@kenworthy.info wrote:
>
> But to understand the first you have to expand it into the second- which 
> means understanding the arcane squiggle -> and how it differs from the 
> equally arcane squiggle ->>. Nasty, sticky, syntactic sugar :)
>
> I suspect that early on, still being a Clojure noobie, I'll stick with the 
> 'proper' Lisp forms and no doubt as I become more experienced I'll pick 
> more of the arcane Clojure idioms ;)
>
> On Monday, March 11, 2013 10:58:29 AM UTC, edw...@kenworthy.info wrote:
>>
>> So I understand that:
>>
>> (-> foo bar wibble)
>>
>> is equivalent to
>>
>> (wibble (bar (foo)))
>>
>> With the advantage that the latter version is better, in the sense that 
>> it's clearer what the final result is (the result of the call to wobble).
>>
>> What I don't understand is the need for -> the only thing it seems to do 
>> is make something Lispy appear to be imperative.
>>
>> Is that it?
>>
>

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: What's the point of -> ?

2013-03-11 Thread Jim foo.bar

On 11/03/13 15:08, Dave Kincaid wrote:
I'm with you. I don't like it personally. Every time I come across it 
reading code I have to stop and think about what exactly it does.


I didn't use to like it either but after coding rubik's cube I've come 
to appreciate it more...imagine this:



(-> cube
   (rotate-left)
   (rotate-up)
   ...
   ...
   ...
   ...
   ...
)

In other words when you have serious nesting of similar actions, then it 
does read a lot cleaner...now, having said that, you will find in 
several Clojure books the same thing without any serious nesting (e.g: 
(-> m :some-key (+ 1))). I guess for such occasions it is purely a mater 
of taste...


Jim

--
--
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
--- 
You received this message because you are subscribed to the Google Groups "Clojure" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: What's the point of -> ?

2013-03-11 Thread Devin Walters
Consistency in any code base matters, so if you're going to thread, thread in 
similar scenarios.

For me it's kind of like coffee. It's an acquired taste.

'(Devin Walters)

On Mar 11, 2013, at 10:14 AM, "Jim foo.bar"  wrote:

> On 11/03/13 15:08, Dave Kincaid wrote:
>> I'm with you. I don't like it personally. Every time I come across it 
>> reading code I have to stop and think about what exactly it does.
> 
> I didn't use to like it either but after coding rubik's cube I've come to 
> appreciate it more...imagine this:
> 
> 
> (-> cube
>   (rotate-left)
>   (rotate-up)
>   ...
>   ...
>   ...
>   ...
>   ...
> )
> 
> In other words when you have serious nesting of similar actions, then it does 
> read a lot cleaner...now, having said that, you will find in several Clojure 
> books the same thing without any serious nesting (e.g: (-> m :some-key (+ 
> 1))). I guess for such occasions it is purely a mater of taste...
> 
> Jim
> 
> -- 
> -- 
> 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
> --- You received this message because you are subscribed to the Google Groups 
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
> 
> 

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: What's the point of -> ?

2013-03-11 Thread Jonathan Fischer Friberg
-> and ->> are for some reason really hard to grasp for
many when starting out - me included.

On Mon, Mar 11, 2013 at 11:58 AM,  wrote:

> So I understand that:
>
> (-> foo bar wibble)
>
> is equivalent to
>
> (wibble (bar (foo)))
>

Correct, but that misses the point. Thinking about -> in terms
of what the expansion is is not going to work. Think about
it like this: (imperative - I know, but explains it better I think)

We are going to execute (-> foo bar wibble).
We have a variable 'current-value', then:

1. Set current-value to foo
2. Set current-value to (bar current-value)
3. Set current-value to (wibble current-value)
4. Return current-value

Another example:
(-> {}
  (assoc :hello 3)
  (assoc :world 4)
  (dissoc :world)
  :hello
  inc)

We get:

1. Set current-value to {}
2. Set current-value to (assoc current-value :hello 3) i.e. {:hello 3}
3. Set current-value to (assoc current-value :world 4) i.e. {:hello 3
:world 4}
4. Set current-value to (dissoc current-value :world) i.e. {:hello 3}
5. Set current-value to (:hello current-value) i.e. 3
6. Set current-value to (inc current-value) i.e. 4
7. Return current-value
Result: 4

-> is not implemented imperatively like that, but the point is that you
shouldn't think about it in terms of expansion. You should think of it as
"we take the initial value,
run the first function on the initial value and "store" the result,
apply the second function on the stored value and "store" the result,
..."

Hope this clear things up.

Jonathan

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: What's the point of -> ?

2013-03-11 Thread Fogus
I wrote a post about -> and ->> a few years ago that might be helpful.  
http://blog.fogus.me/2009/09/04/understanding-the-clojure-macro/

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: What's the point of -> ?

2013-03-11 Thread Travis Vachon
-> can also be used in conjunction with a well designed DSL to
construct values in a very readable fashion. clj-time has some great
examples of this:


http://seancorfield.github.com/clj-time/doc/clj-time.core.html#var-from-now
(-> 30 minutes from-now)

http://seancorfield.github.com/clj-time/doc/clj-time.core.html#var-ago :
(-> 5 years ago)

Note that this takes advantage of the fact that (-> 30 minutes
from-now) is equivalent to (-> 30 (minutes) (from-now))

t

On Mon, Mar 11, 2013 at 12:29 PM, Fogus  wrote:
> I wrote a post about -> and ->> a few years ago that might be helpful.
> http://blog.fogus.me/2009/09/04/understanding-the-clojure-macro/
>
> --
> --
> 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
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Composable mutual recursive function composition

2013-03-11 Thread Brent Millare
I just added aliasing support. This way you can have "interface" keywords 
and depend on those. Then instead of redefining all functions to use a 
different key, you just change the alias.

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Working with a huge graph - how can I make Clojure performant?

2013-03-11 Thread Balint Erdi
 

Hey,


I got an assignment to implement an algorithm to calculate strongly 
connected components in a graph (
http://en.wikipedia.org/wiki/Kosaraju's_algorithm). The graph is rather 
big, it has ~900.000 vertices.


In its first pass, it needs to do a depth-first search on the graph and 
calculate the finishing time for each node (the finishing time for a node 
is a number from 0…V-1 where V is the number of vertices). Potentially 
several depth-first search need to be launched (done in the finishing-times 
function below) to discover all components.


The version I pasted below is the most performant. It discovers ~600.000 
vertices (2/3 of all vertices). However, on subsequent 
dfs-by-finishing-times it becomes extremely slow (exploring a handful of 
additional nodes/second) and I'm not sure why.


Here are a few things I tried to speed up the algorithm:


* rewrite to a recursive function (not tail-recursive) and use lazy-seqs

* define dfs-by-finishing-times in finishing-times so that the whole graph 
(G) does not have to be passed at each call.

* use persistent data structures everywhere instead of transients (I know 
this would only slow things down but it did not hurt to try)

* use a profiler (VisualVM) to learn where the bottlenecks are. I'm not 
very proficient with profilers but I could not extract any valuable 
information


Here are the code snippets in question:

(I also pasted it 
here: https://www.refheap.com/paste/3840cc772cc3a5b1d9c4f1db3 for better 
readability)

(defn dfs-by-finishing-times

  ([G u]

 (dfs-by-finishing-times G u #{}))

  ([G u explored]

 (loop [[v & vs :as stack] (list u), explored (transient explored), 
lhalf [], rhalf [],  iter-cnt 0]

 (if (seq stack)

  (let [neighbors (persistent!

   (reduce

(fn [c u] (if (explored u) c (conj! c u)))

(transient [])

(G v)))]

(cond

 (explored v) (recur vs explored lhalf rhalf (inc iter-cnt))

 (empty? neighbors) (recur vs (conj! explored v) (conj lhalf v) 
rhalf (inc iter-cnt))

 :else (recur (reduce (fn [stack e] (cons e stack)) vs 
neighbors)

   (conj! explored v)

   lhalf

   (cons v rhalf)

   (inc iter-cnt

  (concat lhalf rhalf)))

 ))


(defn finishing-times [G vertices]

  "The first pass of Kosaraju's algorithm.

   Scan the transpose graph of G, and mark the finishing time for each.

   G should already be the transposed graph"

  (loop [[u & vs :as stack] (seq vertices)

  explored #{},

  finished []]

 (if (nil? u)

   finished

   (let [path (dfs-by-finishing-times G u explored)

 new-explored (into explored path)]

 (recur (remove new-explored vs)

new-explored

(into finished path))

Do you have any insights into what technique I could use to speed up my 
algorithm? I'm pretty sure I'm missing a key point but I'm not sure 
what. Presumably the whole algorithm runs under 10 seconds in C# on the 
same graph so this is rather embarrassing :)

Appreciate your help,

Balint

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Get difference between two lists with java objects of same class

2013-03-11 Thread Ryan
Hello,

I have two lists which contain java objects of the same class. I am trying 
to find out if there is a clojure function which i can use to compare those 
lists based on a key and return the objects from list A that do not exist 
in list B.

Is there such a function in clojure? If not, what would be the most elegant 
way to achieve it.

Thank you for your time

Ryan

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Querying hierarchies in core.logic

2013-03-11 Thread JvJ
Thanks for pointing out the conversation!  It helps.  So did the article.

All this logic programming makes my brain hurt... but in a good way.

On Monday, 11 March 2013 06:11:30 UTC-4, Ambrose Bonnaire-Sergeant wrote:
>
> Hi,
>
> There's a brief transcript of a conversation with Tassilo under the ns.
>
> He also wrote a nice blog post on the technique 
> http://tsdh.wordpress.com/2012/01/06/using-clojures-core-logic-with-custom-data-structures/
>
> Thanks,
> Ambrose
>
> On Mon, Mar 11, 2013 at 12:21 PM, JvJ >wrote:
>
>> I understand that it is possible, and I have found a code example here : 
>> https://github.com/frenchy64/Logic-Starter/blob/master/src/logic_introduction/extend.clj#L76
>>
>> However, the code presented is rather terse, and some functions, such as 
>> lvar-in? aren't documented.
>>
>> Does anyone know of something that describes this code, or at least the 
>> process involved?
>>
>> Thanks.
>>
>> -- 
>> -- 
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clo...@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+u...@googlegroups.com 
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Clojure" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to clojure+u...@googlegroups.com .
>> For more options, visit https://groups.google.com/groups/opt_out.
>>  
>>  
>>
>
>

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Get difference between two lists with java objects of same class

2013-03-11 Thread Jim - FooBar();
Well, java.util.List specifies a retainAll(Collection c) method which is 
basically the intersection between the 2 collections (the Collection 
this is called on and the argument). You are actually looking for the 
'difference' but if you have the intersection and the total it's pretty 
trivial to find the difference.


alternatively, you can pour the lists into 2 clojure sets and take their 
proper difference (but this will remove duplicates as well)...


I'm not sure what you mean 'compare those lists based on a key' though...


Jim

On 11/03/13 18:15, Ryan wrote:

Hello,

I have two lists which contain java objects of the same class. I am 
trying to find out if there is a clojure function which i can use to 
compare those lists based on a key and return the objects from list A 
that do not exist in list B.


Is there such a function in clojure? If not, what would be the most 
elegant way to achieve it.


Thank you for your time

Ryan
--
--
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
---
You received this message because you are subscribed to the Google 
Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to clojure+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.




--
--
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
--- 
You received this message because you are subscribed to the Google Groups "Clojure" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Get difference between two lists with java objects of same class

2013-03-11 Thread Jim - FooBar();

On 11/03/13 18:35, Jim - FooBar(); wrote:
Well, java.util.List specifies a retainAll(Collection c) method which 
is basically the intersection between the 2 collections (the 
Collection this is called on and the argument). You are actually 
looking for the 'difference' but if you have the intersection and the 
total it's pretty trivial to find the difference. 


actually there is a removeAll(Collection c) which will (destructively) 
give you exactly what you want...I guess that would be the fastest way 
if you don't care about what happens to list A...


hope that helps,

Jim

--
--
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
--- 
You received this message because you are subscribed to the Google Groups "Clojure" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Querying hierarchies in core.logic

2013-03-11 Thread JvJ
Also, since I can't find the function lvar-in?, I'm assuming it works 
something like this:

(defn lvar-in?
  [a x]
  (lvar? (walk a x)))

On Monday, 11 March 2013 14:34:12 UTC-4, JvJ wrote:
>
> Thanks for pointing out the conversation!  It helps.  So did the article.
>
> All this logic programming makes my brain hurt... but in a good way.
>
> On Monday, 11 March 2013 06:11:30 UTC-4, Ambrose Bonnaire-Sergeant wrote:
>>
>> Hi,
>>
>> There's a brief transcript of a conversation with Tassilo under the ns.
>>
>> He also wrote a nice blog post on the technique 
>> http://tsdh.wordpress.com/2012/01/06/using-clojures-core-logic-with-custom-data-structures/
>>
>> Thanks,
>> Ambrose
>>
>> On Mon, Mar 11, 2013 at 12:21 PM, JvJ  wrote:
>>
>>> I understand that it is possible, and I have found a code example here : 
>>> https://github.com/frenchy64/Logic-Starter/blob/master/src/logic_introduction/extend.clj#L76
>>>
>>> However, the code presented is rather terse, and some functions, such as 
>>> lvar-in? aren't documented.
>>>
>>> Does anyone know of something that describes this code, or at least the 
>>> process involved?
>>>
>>> Thanks.
>>>
>>> -- 
>>> -- 
>>> You received this message because you are subscribed to the Google
>>> Groups "Clojure" group.
>>> To post to this group, send email to clo...@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+u...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/group/clojure?hl=en
>>> --- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Clojure" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to clojure+u...@googlegroups.com.
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>  
>>>  
>>>
>>
>>

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Get difference between two lists with java objects of same class

2013-03-11 Thread Ryan
Hey Jim,

Thanks for your replies for starters.

Indeed I do not care what will happen to the original lists, i only care to 
find out which objects from list A do not exist in list B. Ignore the key 
part. 
I was aware of the functionality which is provided by java.util.List but I 
was hoping for a more clojurish way instead of calling java methods.

or is it pointless and I should just use removeAll()?

Ryan

On Monday, March 11, 2013 8:49:45 PM UTC+2, Jim foo.bar wrote:
>
> On 11/03/13 18:35, Jim - FooBar(); wrote: 
> > Well, java.util.List specifies a retainAll(Collection c) method which 
> > is basically the intersection between the 2 collections (the 
> > Collection this is called on and the argument). You are actually 
> > looking for the 'difference' but if you have the intersection and the 
> > total it's pretty trivial to find the difference. 
>
> actually there is a removeAll(Collection c) which will (destructively) 
> give you exactly what you want...I guess that would be the fastest way 
> if you don't care about what happens to list A... 
>
> hope that helps, 
>
> Jim 
>

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Get difference between two lists with java objects of same class

2013-03-11 Thread Andy Fingerhut
There is clojure.data/diff, but whether it would work for you would depend on 
whether Clojure's = would compare your Java objects for equality in the way 
that you wanted.  You could try it out on some test case to see.

http://clojure.github.com/clojure/clojure.data-api.html#clojure.data/diff
http://clojuredocs.org/clojure_core/clojure.data/diff

Andy

On Mar 11, 2013, at 12:35 PM, Ryan wrote:

> Hey Jim,
> 
> Thanks for your replies for starters.
> 
> Indeed I do not care what will happen to the original lists, i only care to 
> find out which objects from list A do not exist in list B. Ignore the key 
> part. 
> I was aware of the functionality which is provided by java.util.List but I 
> was hoping for a more clojurish way instead of calling java methods.
> 
> or is it pointless and I should just use removeAll()?
> 
> Ryan
> 
> On Monday, March 11, 2013 8:49:45 PM UTC+2, Jim foo.bar wrote:
> On 11/03/13 18:35, Jim - FooBar(); wrote: 
> > Well, java.util.List specifies a retainAll(Collection c) method which 
> > is basically the intersection between the 2 collections (the 
> > Collection this is called on and the argument). You are actually 
> > looking for the 'difference' but if you have the intersection and the 
> > total it's pretty trivial to find the difference. 
> 
> actually there is a removeAll(Collection c) which will (destructively) 
> give you exactly what you want...I guess that would be the fastest way 
> if you don't care about what happens to list A... 
> 
> hope that helps, 
> 
> Jim 

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Get difference between two lists with java objects of same class

2013-03-11 Thread Jim - FooBar();
Clojure itself is being pragmatic about many many things... If you want 
removeAll() then use it...what can be better than a single method call?


mind you though, what Andy said applies here. It depends what you want 
to compare for...you want to do a 'deep' comparison (per =) or fall back 
to java's broken equality semantics? If you use removeAll() you 
automatically lose the ability to make such decisions for yourself... :-)



Jim


On 11/03/13 19:35, Ryan wrote:

Hey Jim,

Thanks for your replies for starters.

Indeed I do not care what will happen to the original lists, i only 
care to find out which objects from list A do not exist in list B. 
Ignore the key part.
I was aware of the functionality which is provided by java.util.List 
but I was hoping for a more clojurish way instead of calling java methods.


or is it pointless and I should just use removeAll()?

Ryan

On Monday, March 11, 2013 8:49:45 PM UTC+2, Jim foo.bar wrote:

On 11/03/13 18:35, Jim - FooBar(); wrote:
> Well, java.util.List specifies a retainAll(Collection c) method
which
> is basically the intersection between the 2 collections (the
> Collection this is called on and the argument). You are actually
> looking for the 'difference' but if you have the intersection
and the
> total it's pretty trivial to find the difference.

actually there is a removeAll(Collection c) which will
(destructively)
give you exactly what you want...I guess that would be the fastest
way
if you don't care about what happens to list A...

hope that helps,

Jim

--
--
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
---
You received this message because you are subscribed to the Google 
Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to clojure+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.




--
--
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
--- 
You received this message because you are subscribed to the Google Groups "Clojure" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Newbie requesting review

2013-03-11 Thread Marko Topolnik


> That's what the web ui expects (I'm not really using teachers and 
> students, but the actual data we do use is camel case) and there's actually 
> a really good reason it uses what it uses.  I'll make sure I didn't miss 
> any others though, thanks! 
>

You still have the option that I've mentioned, which is to convert from 
dashed-style into camelCase only when actually sending JSON, for example by 
running the keys through one of these functions:

(defn camelize [s] 
  (s/replace (name s) #"-(\w)" (comp s/upper-case second)))

(defn upcamelize [s] 
  (s/replace (name s) #"(?:-|^)(\w)" (comp s/upper-case second)))

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: What's the point of -> ?

2013-03-11 Thread Marko Topolnik
On Monday, March 11, 2013 4:00:13 PM UTC+1, edw...@kenworthy.info wrote:

> But to understand the first you have to expand it into the second- which 
> means understanding the arcane squiggle -> and how it differs from the 
> equally arcane squiggle ->>. Nasty, sticky, syntactic sugar :)
>
> I suspect that early on, still being a Clojure noobie, I'll stick with the 
> 'proper' Lisp forms and no doubt as I become more experienced I'll pick 
> more of the arcane Clojure idioms ;)
>

Have you ever written any Java, C++, or a similar language that uses the 
dot notation to invoke methods? The concept of "method chaining" should 
then be familiar to you, and useful in transferring that intuition into 
Clojure's thrushes. I remember my first encounter with them, I was confused 
a bit, but it went away very quickly---after a week or so. Basically, you 
use them a couple of times, get confident about what they do, and before 
you know it they are second nature.

-Marko

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




be.clojure.org: a humble question.

2013-03-11 Thread Thomas Goossens
Hi,

I'm not sure who to contact for this, so I guess this is the best medium.

In Belgium we are starting up de first Belgian clojure user group. This 
month our first meetup will take place. 

Information can be found here: http://lanyrd.com/2013/belgiumclj/

We would like to create a website that will be all about clojure in 
Belgium: meetups, jobs, stories. But we also need a domain name.

So I was wondering whether I could very humbly ask whether it would 
possible to use "be.clojure.org" for this purpose.

This is just a request and if it were possible then that's wonderful, if 
not then not heart-feelings :)

Best regards,

Thomas Goossens


-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Get difference between two lists with java objects of same class

2013-03-11 Thread Marko Topolnik


> I have two lists which contain java objects of the same class. I am trying 
> to find out if there is a clojure function which i can use to compare those 
> lists based on a key and return the objects from list A that do not exist 
> in list B.
>

Lists as in Clojure lists, or as in java.util.Lists?

Anyway, since you apparently need your own equality function (can't rely on 
Object#equals), you'll have to build more structures. Make a function that 
extract the key from the entire object, say *key-fn*, and then do

(apply dissoc (into {} (map #(-> [(key-fn %) %] list-a))) (map key-fn 
list-b))

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Get difference between two lists with java objects of same class

2013-03-11 Thread Marko Topolnik
Another approach, preserving the order of list-a, would be

(remove (comp (into #{} (map key-fn list-b)) key-fn) list-a)


On Monday, March 11, 2013 10:01:09 PM UTC+1, Marko Topolnik wrote:
>
>
> I have two lists which contain java objects of the same class. I am trying 
>> to find out if there is a clojure function which i can use to compare those 
>> lists based on a key and return the objects from list A that do not exist 
>> in list B.
>>
>
> Lists as in Clojure lists, or as in java.util.Lists?
>
> Anyway, since you apparently need your own equality function (can't rely 
> on Object#equals), you'll have to build more structures. Make a function 
> that extract the key from the entire object, say *key-fn*, and then do
>
> (apply dissoc (into {} (map #(-> [(key-fn %) %] list-a))) (map key-fn 
> list-b))
>
>

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: be.clojure.org: a humble question.

2013-03-11 Thread Rich Morin
On Mar 11, 2013, at 14:00, Thomas Goossens wrote:
> In Belgium we are starting up de first Belgian clojure user group. ...
> 
> We would like to create a website that will be all about clojure in
> Belgium: meetups, jobs, stories. But we also need a domain name.
> 
> So I was wondering whether I could very humbly ask whether it would
> possible to use "be.clojure.org" for this purpose.

Regardless of how the naming issue works out, I'd like to see a wiki
page that lists and/or maps all local groups.  Where should that be?

-r

 -- 
http://www.cfcl.com/rdmRich Morin
http://www.cfcl.com/rdm/resume r...@cfcl.com
http://www.cfcl.com/rdm/weblog +1 650-873-7841

Software system design, development, and documentation


-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Windows Installation

2013-03-11 Thread Phil Hagelberg

David Powell writes:

> I've made installers for clojure-based programs using InnoSetup
> before, and wouldn't mind doing it if people think it is a good idea.

If someone contributes a wizard-builder that I can run on my Debian
system, I can run it as part of the release process and store the wizard
next to the rest of the downloads.

It looks like the only wizard-builder tool that's in Debian is the
Nullsoft one: http://nsis.sourceforge.net/Main_Page (disclaimer: I've
never used it and know nothing about it apart from the fact that it's
included in Debian.)

If something else is used I can point to it in the official docs, but it
won't be updated on the same release schedule as the rest of Leiningen.

-Phil

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: be.clojure.org: a humble question.

2013-03-11 Thread Devin Walters
One exists here: http://dev.clojure.org/display/community/Clojure+User+Groups 

Cheers,
-- 
'(Devin Walters)


On Monday, March 11, 2013 at 4:19 PM, Rich Morin wrote:

> On Mar 11, 2013, at 14:00, Thomas Goossens wrote:
> > In Belgium we are starting up de first Belgian clojure user group. ...
> > 
> > We would like to create a website that will be all about clojure in
> > Belgium: meetups, jobs, stories. But we also need a domain name.
> > 
> > So I was wondering whether I could very humbly ask whether it would
> > possible to use "be.clojure.org (http://be.clojure.org)" for this purpose.
> > 
> 
> 
> Regardless of how the naming issue works out, I'd like to see a wiki
> page that lists and/or maps all local groups. Where should that be?
> 
> -r
> 
> -- 
> http://www.cfcl.com/rdm Rich Morin
> http://www.cfcl.com/rdm/resume r...@cfcl.com (mailto:r...@cfcl.com)
> http://www.cfcl.com/rdm/weblog +1 650-873-7841
> 
> Software system design, development, and documentation
> 
> 
> -- 
> -- 
> 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 
> (mailto: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 
> (mailto:clojure+unsubscr...@googlegroups.com)
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to clojure+unsubscr...@googlegroups.com 
> (mailto:clojure+unsubscr...@googlegroups.com).
> For more options, visit https://groups.google.com/groups/opt_out.
> 
> 


-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Windows Installation

2013-03-11 Thread Phil Hagelberg

Martin Jul writes:

> An alternative to GNU tools is to use the things that ship with
> Windows PowerShell and are on most developer's machines already, e.g.
> using the Invoke-RestMethod commandlet as an alternative to wget and
> curl.

So the latest version of bin/lein (which will become 2.1.0) actually
already uses Powershell as an HTTP client to get around the requirement
for curl/wget. The remaining problem is the bin/lein.bat file doesn't
get the same level of attention as bin/lein proper. So if you somehow
get GNU tools on Windows it's more work up-front, but you end up running
code that has been better debugged and is more up-to-date.

(Not saying one approach is necessarily inherently better since I don't
understand the cultural background behind the choice, but that's how it
is currently.)

-Phil

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Improving visibility of clojure-doc.org

2013-03-11 Thread Devin Walters
I assume this has been discussed to death already, but isn't there some way 
to get clojure-doc and clojuredocs to live under the same umbrella?

Another idea I'd like to throw out there:
I have the domains getclojure.org/com. Since clojure-doc.org is all about 
getting clojure, it seems like it might be an appropriate home for 
clojure-doc. At the very least it would kill some of the ambiguity between 
clojuredocs and clojure-doc.

Something to think about,
Devin

On Wednesday, February 27, 2013 12:06:46 PM UTC-6, Michael Klishin wrote:
>
> Started in October 2012, http://clojure-doc.org is a pretty extensive
> community documentation effort. It covers Clojure, its ecosystem
> and tools and has two key goals:
>
>  * We produce beginner-friendly content
>  * It is dead easy to join and help
>
> Even though recently that hasn't been
> as much activity as in the past, it is not abandoned and continues
> to accumulate useful, beginner-friendly material.
>
> We constantly get praises from newcomers to Clojure who discover
> clojure-doc.org. Unfortunately, it does not appear even in top 10
> in Google for "clojure docs" or "clojure documentation" and
> many community members are not aware of it.
>
> In part it is less visible because we no longer actively post
> progress reports. Things have settled down and most of changes
> now are small edits and improvements all over the place. It is
> a bit pointless to post progress reports more often than
> once a month or so.
>
> So I'd like to start a discussion about what can be done about it.
> The community (we have 40 contributors) has worked very hard
> on clojure-doc.org and I'd like to see high profile resources
> (namly clojure.org and leiningen.org) link to it. What would
> it take to convince clojure.org maintainers to do so?
>
> There are still guides left ot be written (macros, gen-class),
> but overall, I'd say there is no better source of freely available,
> beginner-friendly, hackable (no Clojure CA, everything is developed
> on GitHub [1], content is in Markdown) documentation. All it needs
> is some linking and promotion love.
>
> One way to help would be to start a campaign such as Mozilla's
> Promote JS [docs]. Unfortunately, unlike Mozilla key contributors
> behind clojure-doc.org largely lack graphic and Web design skills,
> so replicating that campaing is probably not an option.
>
> Do you have any ideas about how we can make clojure-doc.org more
> visible? Do you know who can help with getting a link from clojure.org?
> Do you think clojure-doc.org is not good enough to be the "blessed"
> open source documentation resource? Please post your suggestions
> and concerns.
>
> Improving CDS visibility will benefit the entire community plus all the 
> people who will join it in the future. Most of the work is already done,
> it just needs to be promoted better.
>
> Thanks you.
>
>
> 1. https://github.com/clojuredocs/cds
>
> -- 
> MK
>
> http://github.com/michaelklishin
> http://twitter.com/michaelklishin
>  

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Get difference between two lists with java objects of same class

2013-03-11 Thread Ryan
Thank you all for your replies.

@Marko, well, at first my question was intended to be more generic, but in 
reality I am dealing with two java.util.Lists

I probably didn't described very well what I wanted in the first place. All 
the objects in those lists contain an "id" property which has a unique 
value. I am trying to find out, which objects from the first list, based on 
that "id" property, are not included in list b.

I assume this rules out the use of clojure.data/diff and I will need my own 
function like Marko suggested to make those property comparisons.

Ryan

On Monday, March 11, 2013 11:05:47 PM UTC+2, Marko Topolnik wrote:
>
> Another approach, preserving the order of list-a, would be
>
> (remove (comp (into #{} (map key-fn list-b)) key-fn) list-a)
>
>
> On Monday, March 11, 2013 10:01:09 PM UTC+1, Marko Topolnik wrote:
>>
>>
>> I have two lists which contain java objects of the same class. I am 
>>> trying to find out if there is a clojure function which i can use to 
>>> compare those lists based on a key and return the objects from list A that 
>>> do not exist in list B.
>>>
>>
>> Lists as in Clojure lists, or as in java.util.Lists?
>>
>> Anyway, since you apparently need your own equality function (can't rely 
>> on Object#equals), you'll have to build more structures. Make a function 
>> that extract the key from the entire object, say *key-fn*, and then do
>>
>> (apply dissoc (into {} (map #(-> [(key-fn %) %] list-a))) (map key-fn 
>> list-b))
>>
>>

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Get difference between two lists with java objects of same class

2013-03-11 Thread Marko Topolnik
On Monday, March 11, 2013 10:55:12 PM UTC+1, Ryan wrote:

> Thank you all for your replies.
>
> @Marko, well, at first my question was intended to be more generic, but in 
> reality I am dealing with two java.util.Lists
>

I only asked because if they aren't java.util.Lists to begin with, you'd 
definitely not want to convert into one just to use removeAll.
 

> I probably didn't described very well what I wanted in the first place. 
> All the objects in those lists contain an "id" property which has a unique 
> value. I am trying to find out, which objects from the first list, based on 
> that "id" property, are not included in list b.
>
> I assume this rules out the use of clojure.data/diff and I will need my 
> own function like Marko suggested to make those property comparisons.
>

Yes, from data/diff's perspective you'd have all distinct objects.

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Improving visibility of clojure-doc.org

2013-03-11 Thread Phil Hagelberg

Devin Walters writes:

> I assume this has been discussed to death already, but isn't there some way 
> to get clojure-doc and clojuredocs to live under the same umbrella?

I believe this is the plan; it's just blocked on not having the manpower
to port clojuredocs.org's web UI off Rails and build a Clojure HTML
interface for it.

Volunteers welcome.

-Phil

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Get difference between two lists with java objects of same class

2013-03-11 Thread Ryan

>
> I only asked because if they aren't java.util.Lists to begin with, you'd 
> definitely not want to convert into one just to use removeAll.
>

What if, i had two clojure lists, with hash-maps which have the same keys 
and based on a specific key, i wanted to find the items from list-a which 
do not exist in list-b. Would i go with the two functions you suggested or 
is there something else I could use?

Ryan

On Tuesday, March 12, 2013 12:03:47 AM UTC+2, Marko Topolnik wrote:
>
> On Monday, March 11, 2013 10:55:12 PM UTC+1, Ryan wrote:
>
>> Thank you all for your replies.
>>
>> @Marko, well, at first my question was intended to be more generic, but 
>> in reality I am dealing with two java.util.Lists
>>
>
> I only asked because if they aren't java.util.Lists to begin with, you'd 
> definitely not want to convert into one just to use removeAll.
>  
>
>> I probably didn't described very well what I wanted in the first place. 
>> All the objects in those lists contain an "id" property which has a unique 
>> value. I am trying to find out, which objects from the first list, based on 
>> that "id" property, are not included in list b.
>>
>> I assume this rules out the use of clojure.data/diff and I will need my 
>> own function like Marko suggested to make those property comparisons.
>>
>
> Yes, from data/diff's perspective you'd have all distinct objects.
>
>

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Get difference between two lists with java objects of same class

2013-03-11 Thread Jim - FooBar();

On 11/03/13 21:55, Ryan wrote:
I probably didn't described very well what I wanted in the first 
place. All the objects in those lists contain an "id" property which 
has a unique value. I am trying to find out, which objects from the 
first list, based on that "id" property, are not included in list b.




If those objects override .equals() properly then I presume it would 
work just fine calling removeAll() and relying on the Collections 
framework which will eventually call .equals(). Do you own those 
objects? Is the 'id' field declared final and is it involved in the 
corresponding .equals() methods? Are those objects inheriting stuff? 
there are so many things that can go wrong when you start to wonder 
about object equality...


if performance is not critical to your problem you could create 
intermediate records/maps , do your logic safe and concise, get the ids 
you want and go find the original objects these ids belong to...in fact 
you can attach those objects as meta-data to save yourself the hassle!



;;not tested but seems reasonable!
(defrecord TEMP [id])

(def step1
(clojure.set/difference
   (set (map #(TEMP. (.getId %) {:ob %} nil) java-util-list-with-objects1))
   (set (map #(TEMP. (.getId %) {:ob %} nil) 
java-util-list-with-objects2)) ) ) ;;half way there


(def step2
 (for [t step1]
  (-> t meta :ob)))

;;not tested but seems reasonable doesn't it?

hope that helps...

Jim

ps: now that I look at it maybe a map (with 2 keys :id :ob) seems a 
simpler choice...



--
--
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
--- 
You received this message because you are subscribed to the Google Groups "Clojure" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: What's the point of -> ?

2013-03-11 Thread Sean Corfield
In addition to clj-time, I tend to use -> with date-clj as well:

(-> (today)
(subtract 30 :days))

And I find something like this:

(->> (-> response :body :postalCodes)
 (map to-location) (sort-by :city))

much easier to read than:

(sort-by :city (map to-location (:postalCodes (:body response

YMMV tho'...

On Mon, Mar 11, 2013 at 10:27 AM, Travis Vachon  wrote:
> -> can also be used in conjunction with a well designed DSL to
> construct values in a very readable fashion. clj-time has some great
> examples of this:
>
>
> http://seancorfield.github.com/clj-time/doc/clj-time.core.html#var-from-now
> (-> 30 minutes from-now)
>
> http://seancorfield.github.com/clj-time/doc/clj-time.core.html#var-ago :
> (-> 5 years ago)
>
> Note that this takes advantage of the fact that (-> 30 minutes
> from-now) is equivalent to (-> 30 (minutes) (from-now))
>
> t
>
> On Mon, Mar 11, 2013 at 12:29 PM, Fogus  wrote:
>> I wrote a post about -> and ->> a few years ago that might be helpful.
>> http://blog.fogus.me/2009/09/04/understanding-the-clojure-macro/
>>
>> --
>> --
>> 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
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Clojure" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to clojure+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>
> --
> --
> 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
> ---
> You received this message because you are subscribed to the Google Groups 
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>



--
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles, LLC. -- http://worldsingles.com/

"Perfection is the enemy of the good."
-- Gustave Flaubert, French realist novelist (1821-1880)

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: What's the point of -> ?

2013-03-11 Thread Dave Sann
I don't see why this should be arcane.

it is quite simple to understand. but yes, you do have to understand it. 
like anything.

this is good sugar...probably a fructose derivative...

On Tuesday, 12 March 2013 02:00:13 UTC+11, edw...@kenworthy.info wrote:
>
> But to understand the first you have to expand it into the second- which 
> means understanding the arcane squiggle -> and how it differs from the 
> equally arcane squiggle ->>. Nasty, sticky, syntactic sugar :)
>
> I suspect that early on, still being a Clojure noobie, I'll stick with the 
> 'proper' Lisp forms and no doubt as I become more experienced I'll pick 
> more of the arcane Clojure idioms ;)
>
> On Monday, March 11, 2013 10:58:29 AM UTC, edw...@kenworthy.info wrote:
>>
>> So I understand that:
>>
>> (-> foo bar wibble)
>>
>> is equivalent to
>>
>> (wibble (bar (foo)))
>>
>> With the advantage that the latter version is better, in the sense that 
>> it's clearer what the final result is (the result of the call to wobble).
>>
>> What I don't understand is the need for -> the only thing it seems to do 
>> is make something Lispy appear to be imperative.
>>
>> Is that it?
>>
>

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: What's the point of -> ?

2013-03-11 Thread kinleyd
@Dave Sann: Yup, I like it, it must be good sugar. I find it makes the code 
much more readable.

On Tuesday, March 12, 2013 8:05:40 AM UTC+6, Dave Sann wrote:
>
> I don't see why this should be arcane.
>
> it is quite simple to understand. but yes, you do have to understand it. 
> like anything.
>
> this is good sugar...probably a fructose derivative...
>
> On Tuesday, 12 March 2013 02:00:13 UTC+11, edw...@kenworthy.info wrote:
>>
>> But to understand the first you have to expand it into the second- which 
>> means understanding the arcane squiggle -> and how it differs from the 
>> equally arcane squiggle ->>. Nasty, sticky, syntactic sugar :)
>>
>> I suspect that early on, still being a Clojure noobie, I'll stick with 
>> the 'proper' Lisp forms and no doubt as I become more experienced I'll pick 
>> more of the arcane Clojure idioms ;)
>>
>> On Monday, March 11, 2013 10:58:29 AM UTC, edw...@kenworthy.info wrote:
>>>
>>> So I understand that:
>>>
>>> (-> foo bar wibble)
>>>
>>> is equivalent to
>>>
>>> (wibble (bar (foo)))
>>>
>>> With the advantage that the latter version is better, in the sense that 
>>> it's clearer what the final result is (the result of the call to wobble).
>>>
>>> What I don't understand is the need for -> the only thing it seems to do 
>>> is make something Lispy appear to be imperative.
>>>
>>> Is that it?
>>>
>>

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Improving visibility of clojure-doc.org

2013-03-11 Thread Robert Stuttaford
Has this effort started up yet? Is there a github url?

I'd really love to see clojuredocs.org showing the 1.5 apis. Willing to 
help make that happen!

On Tuesday, March 12, 2013 12:03:22 AM UTC+2, Phil Hagelberg wrote:
>
>
> Devin Walters writes: 
>
> > I assume this has been discussed to death already, but isn't there some 
> way 
> > to get clojure-doc and clojuredocs to live under the same umbrella? 
>
> I believe this is the plan; it's just blocked on not having the manpower 
> to port clojuredocs.org's web UI off Rails and build a Clojure HTML 
> interface for it. 
>
> Volunteers welcome. 
>
> -Phil 
>

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Improving visibility of clojure-doc.org

2013-03-11 Thread kinleyd
I also found clojure-doc.org accidentally, and was surprised it didn't show 
up in earlier searches, especially in the context of the high quality of 
the documentation.

I think merging the two resources (clojuredocs and clojure-doc) would 
greatly help (I'd be happy to help in this effort), and getting high 
profile links pointed to it (particularly on clojure.org itself) would make 
all the difference in adding to its visibility, regardless of the frequency 
of the updates to the site itself.

On Thursday, February 28, 2013 12:06:46 AM UTC+6, Michael Klishin wrote:
>
> Started in October 2012, http://clojure-doc.org is a pretty extensive
> community documentation effort. It covers Clojure, its ecosystem
> and tools and has two key goals:
>
>  * We produce beginner-friendly content
>  * It is dead easy to join and help
>
> Even though recently that hasn't been
> as much activity as in the past, it is not abandoned and continues
> to accumulate useful, beginner-friendly material.
>
> We constantly get praises from newcomers to Clojure who discover
> clojure-doc.org. Unfortunately, it does not appear even in top 10
> in Google for "clojure docs" or "clojure documentation" and
> many community members are not aware of it.
>
> In part it is less visible because we no longer actively post
> progress reports. Things have settled down and most of changes
> now are small edits and improvements all over the place. It is
> a bit pointless to post progress reports more often than
> once a month or so.
>
> So I'd like to start a discussion about what can be done about it.
> The community (we have 40 contributors) has worked very hard
> on clojure-doc.org and I'd like to see high profile resources
> (namly clojure.org and leiningen.org) link to it. What would
> it take to convince clojure.org maintainers to do so?
>
> There are still guides left ot be written (macros, gen-class),
> but overall, I'd say there is no better source of freely available,
> beginner-friendly, hackable (no Clojure CA, everything is developed
> on GitHub [1], content is in Markdown) documentation. All it needs
> is some linking and promotion love.
>
> One way to help would be to start a campaign such as Mozilla's
> Promote JS [docs]. Unfortunately, unlike Mozilla key contributors
> behind clojure-doc.org largely lack graphic and Web design skills,
> so replicating that campaing is probably not an option.
>
> Do you have any ideas about how we can make clojure-doc.org more
> visible? Do you know who can help with getting a link from clojure.org?
> Do you think clojure-doc.org is not good enough to be the "blessed"
> open source documentation resource? Please post your suggestions
> and concerns.
>
> Improving CDS visibility will benefit the entire community plus all the 
> people who will join it in the future. Most of the work is already done,
> it just needs to be promoted better.
>
> Thanks you.
>
>
> 1. https://github.com/clojuredocs/cds
>
> -- 
> MK
>
> http://github.com/michaelklishin
> http://twitter.com/michaelklishin
>  

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Improving visibility of clojure-doc.org

2013-03-11 Thread Cedric Greevey
If one of those is that Clojure documentation site that has a paywall, I
object unless the merged site has no paywall. Official and
officially-endorsed documentation for open source software should not be
behind a paywall.


On Tue, Mar 12, 2013 at 1:47 AM, kinleyd  wrote:

> I also found clojure-doc.org accidentally, and was surprised it didn't
> show up in earlier searches, especially in the context of the high quality
> of the documentation.
>
> I think merging the two resources (clojuredocs and clojure-doc) would
> greatly help (I'd be happy to help in this effort), and getting high
> profile links pointed to it (particularly on clojure.org itself) would
> make all the difference in adding to its visibility, regardless of the
> frequency of the updates to the site itself.
>
>
> On Thursday, February 28, 2013 12:06:46 AM UTC+6, Michael Klishin wrote:
>>
>> Started in October 2012, http://clojure-doc.org is a pretty extensive
>> community documentation effort. It covers Clojure, its ecosystem
>> and tools and has two key goals:
>>
>>  * We produce beginner-friendly content
>>  * It is dead easy to join and help
>>
>> Even though recently that hasn't been
>> as much activity as in the past, it is not abandoned and continues
>> to accumulate useful, beginner-friendly material.
>>
>> We constantly get praises from newcomers to Clojure who discover
>> clojure-doc.org. Unfortunately, it does not appear even in top 10
>> in Google for "clojure docs" or "clojure documentation" and
>> many community members are not aware of it.
>>
>> In part it is less visible because we no longer actively post
>> progress reports. Things have settled down and most of changes
>> now are small edits and improvements all over the place. It is
>> a bit pointless to post progress reports more often than
>> once a month or so.
>>
>> So I'd like to start a discussion about what can be done about it.
>> The community (we have 40 contributors) has worked very hard
>> on clojure-doc.org and I'd like to see high profile resources
>> (namly clojure.org and leiningen.org) link to it. What would
>> it take to convince clojure.org maintainers to do so?
>>
>> There are still guides left ot be written (macros, gen-class),
>> but overall, I'd say there is no better source of freely available,
>> beginner-friendly, hackable (no Clojure CA, everything is developed
>> on GitHub [1], content is in Markdown) documentation. All it needs
>> is some linking and promotion love.
>>
>> One way to help would be to start a campaign such as Mozilla's
>> Promote JS [docs]. Unfortunately, unlike Mozilla key contributors
>> behind clojure-doc.org largely lack graphic and Web design skills,
>> so replicating that campaing is probably not an option.
>>
>> Do you have any ideas about how we can make clojure-doc.org more
>> visible? Do you know who can help with getting a link from clojure.org?
>> Do you think clojure-doc.org is not good enough to be the "blessed"
>> open source documentation resource? Please post your suggestions
>> and concerns.
>>
>> Improving CDS visibility will benefit the entire community plus all the
>> people who will join it in the future. Most of the work is already done,
>> it just needs to be promoted better.
>>
>> Thanks you.
>>
>>
>> 1. https://github.com/**clojuredocs/cds
>>
>> --
>> MK
>>
>> http://github.com/**michaelklishin 
>> http://twitter.com/**michaelklishin 
>>
>  --
> --
> 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
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Improving visibility of clojure-doc.org

2013-03-11 Thread Rich Morin
On Mar 11, 2013, at 23:20, Cedric Greevey wrote:
> If one of those is that Clojure documentation site that has a paywall,
> I object unless the merged site has no paywall. Official and officially-
> endorsed documentation for open source software should not be behind a
> paywall.

Neither site is behind a paywall (as you would have discovered had you
bothered to look :-/).  Clojure Atlas _is_ behind a (cheap) paywall; I
think it's well worth the money, but suit yourself...

-r

 -- 
http://www.cfcl.com/rdmRich Morin
http://www.cfcl.com/rdm/resume r...@cfcl.com
http://www.cfcl.com/rdm/weblog +1 650-873-7841

Software system design, development, and documentation


-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.