IF, WHEN or SOME

2018-09-20 Thread Stephen Feyrer
Hi,

I have just been playing around with this idea and I got something.

user=> (def some-numbers ‘(2 4 6 8))  #This is my value to test later.
#’user/some-numbers
user=> (def evens? (partial (when (apply = (map even? some-numbers)
#’user/evens?
user=> (evens? (println “one”))
one
NullPointerException   user/eval239 (NO_SOURCE_FILE:74)
user=>

What is my mistake?

Thanks.


On 12 December 2017 at 07:52, Stephen Feyrer 
wrote:

> Hi Tim,
>
> Thank you.
>
>
> --
> Kind regards
>
> Stephen.
>
> On 11 December 2017 at 23:58, Timothy Baldridge 
> wrote:
>
>> I talked a bit about this in my video on Boolean Blindness:
>> https://www.youtube.com/watch?v=K1LaaJMscCc
>>
>> Might be worth a watch.
>>
>> On Mon, Dec 11, 2017 at 4:56 PM, Stephen Feyrer > > wrote:
>>
>>> Hi there,
>>>
>>> I have been trying to shake this thought for a while now.  Essentially,
>>> my thought was if you can return a function why not decision component of
>>> an IF, WHEN or SOME statement?  That would give you a re-usable named
>>> choice.
>>>
>>> Then you could write:
>>>
>>> (celebration: do-something do-something-else)
>>>
>>>
>>> This would be equivalent to writing:
>>>
>>> (def success [apples bananas pears])
>>>
>>> (defn celebration: [x y] (if (empty? success) x y))
>>>
>>> (celebration: (do-something do-something-else))
>>>
>>>
>>> I'm reasonably certain of the foolishness of this thought but
>>> occasionally, I have doubts.
>>>
>>> Maybe I'm barking up the wrong tree or possibly I've seen something like
>>> this before and forgotten about it.  Perhaps, this is just taking things
>>> too far...  Either way, it's deferring the choice until it's needed.  In
>>> the right hands it could make for more readable code.
>>>
>>> For completeness sake, to define the first form above you'd use:
>>>
>>> (defc celebration: (if (empty? success)))
>>>
>>>
>>> A more usable example might look like:
>>>
>>> (def nums [1 2 3 4 5 6 7 8])
>>>
>>> (defc even-nums: (some (even? nums)))
>>>
>>> I guess this makes the real question, is it a good thing to be able to
>>> defer choice like this?
>>>
>>>
>>> Btw, defc would be like def-choice but other options might be deft -
>>> def-test or defp - def-predicate.
>>>
>>>
>>> --
>>> Kind regards
>>>
>>> Stephen
>>>
>>> --
>>> 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/d/optout.
>>>
>>
>>
>>
>> --
>> “One of the main causes of the fall of the Roman Empire was that–lacking
>> zero–they had no way to indicate successful termination of their C
>> programs.”
>> (Robert Firth)
>>
>> --
>> 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/d/optout.
>>
>
>

-- 
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/d/optout.


Re: Validate XSD 1.1

2018-05-31 Thread Stephen Feyrer
Interesting read...  Prompts the question is there an alternative way to 
pull the library raw into a Leiningen project?

I have tested and this library works.



On Thursday, 31 May 2018 02:20:58 UTC+1, Matching Socks wrote:
>
> (A fun and enlightening discussion is here: 
> https://issues.apache.org/jira/browse/XERCESJ-1454 --- about whether to 
> post Xerces on Maven Central.)
>
>

-- 
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/d/optout.


Re: Validate XSD 1.1

2018-05-30 Thread Stephen Feyrer
Hi,

I have a work around which I am now in the process of testing.  

I have downloaded 
http://ftp.fau.de/apache//xerces/j/binaries/Xerces-J-bin.2.12.0.zip from 
which I extracted the xercesImpl.jar.

Then in the org.opengis.cite.xerces/xercesImpl-xsd11 pom I renamed the 
xercesImpl-xsd11-2.12-beta-r1667115.jar to 
xercesImpl-xsd11-2.12-beta-r1667115.old.jar and replaced it with the new 
jar.

The changes to the original source from clojars are as follows:

(System/setProperty 
"javax.xml.validation.SchemaFactory:http://www.w3.org/XML/XMLSchema/v1.1"; 
"org.apache.xerces.jaxp.validation.XMLSchema11Factory")

(defn- validator-from-schemas
  [sources]
  (-> (SchemaFactory/newInstance "http://www.w3.org/XML/XMLSchema/v1.1";)
  (.newSchema sources)
  (.newValidator)))

Then I ran this against an example of an xsd with an 'alternative' clause 
in it and no errors were produced.

vxsd.core=> (def is-valid-xml? (vxsd.core/create-validation-fn (slurp 
xsd-path)))
#'vxsd.core/is-valid-xml?

Now I am beginning testing against an xml document that should validate.

Assuming that this has resolved my issue, could you recommend some steps to 
make a publicly acceptable resolution i.e. one that isn't a boj?

Thank you.


--
Regards

Stephen.


On Wednesday, 30 May 2018 10:02:51 UTC+1, Stephen Feyrer wrote:
>
> Hi Sean,
>
> Now that you mention it (a second time - so maybe you do need to tell me 
> twice :[ ), that does make sense.  Thank you.
>
> This brings us to a new and perhaps more interesting error message:
>
> vxsd.core=> (def is-valid-xml? (vxsd.core/create-validation-fn (slurp 
> xsd-path)))
>
> CompilerException java.lang.IllegalArgumentException: No matching method 
> found: newSchema for class 
> org.apache.xerces.jaxp.validation.XMLSchema11Factory, 
> compiling:(form-init2829816141741533722.clj:1:20)
>
>
> --
> Regards
>
> Stephen.
>
>
>
> On Monday, 28 May 2018 23:23:20 UTC+1, Stephen Feyrer wrote:
>>
>> Hi there,
>>
>> I would to validate some XML documents in XSD version 1.1.  This cutting 
>> edge standard is now all of six years old.  So perhaps it is understandable 
>> that it hasn't reached the mainstream stable branches of either the Java or 
>> .NET eco-systems.
>>
>> For XSD version 1.0 there is https://clojars.org/clj-xml-validation and 
>> that works very well.
>>
>>
>> Now there is a library which is available to Java which claims XSD 1.1 
>> compliance:
>>
>> :dependencies [[org.clojure/clojure "1.9.0"]
>> [org.opengis.cite.xerces/xercesImpl-xsd11 
>> "2.12-beta-r1667115"]]
>>
>>
>>
>> So I have included that in my project.clj and copied the source of the 
>> above clojar into my pet project on my PC (Java HotSpot(TM) 64-Bit Server 
>> VM 10.0.1+10).  That is as far as I've gotten.  Nothing seems to pick up on 
>> the XSD version 1.1.
>>
>>
>> I have tried:
>>
>> (System/setProperty "javax.xml.validation.SchemaFactory:
>> http://www.w3.org/XML/XMLSchema/v1.1"; 
>> "org.apache.xerces.jaxp.validation.XMLSchema11Factory")
>>
>> (defn- validator-from-schemas
>>   [sources]
>>   (-> (SchemaFactory/newInstance "http://www.w3.org/XML/XMLSchema/v1.1";)
>>   (.newSchema sources)
>>   (.newValidator)))
>>
>>
>> Then I run:
>>
>> user=> (def is-valid-xml? (create-validation-fn (slurp xsd-path)))
>>
>> CompilerException java.lang.RuntimeException: Unable to resolve symbol: 
>> create-validation-fn in this context, 
>> compiling:(C:\cygwin64\tmp\form-init15757041316465825177.clj:1:20)
>>
>> My theory is that libraries like javax.xml and org.xml.sax are now in 
>> modules which is probably just one of many problems.
>>
>> Any insights are gratefully received?
>>
>>
>> --
>> Regards
>>
>> Stephen.
>>
>

-- 
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/d/optout.


Re: Validate XSD 1.1

2018-05-30 Thread Stephen Feyrer
Hi Sean,

Now that you mention it (a second time - so maybe you do need to tell me 
twice :[ ), that does make sense.  Thank you.

This brings us to a new and perhaps more interesting error message:

vxsd.core=> (def is-valid-xml? (vxsd.core/create-validation-fn (slurp 
xsd-path)))

CompilerException java.lang.IllegalArgumentException: No matching method 
found: newSchema for class 
org.apache.xerces.jaxp.validation.XMLSchema11Factory, 
compiling:(form-init2829816141741533722.clj:1:20)


--
Regards

Stephen.



On Monday, 28 May 2018 23:23:20 UTC+1, Stephen Feyrer wrote:
>
> Hi there,
>
> I would to validate some XML documents in XSD version 1.1.  This cutting 
> edge standard is now all of six years old.  So perhaps it is understandable 
> that it hasn't reached the mainstream stable branches of either the Java or 
> .NET eco-systems.
>
> For XSD version 1.0 there is https://clojars.org/clj-xml-validation and 
> that works very well.
>
>
> Now there is a library which is available to Java which claims XSD 1.1 
> compliance:
>
> :dependencies [[org.clojure/clojure "1.9.0"]
> [org.opengis.cite.xerces/xercesImpl-xsd11 
> "2.12-beta-r1667115"]]
>
>
>
> So I have included that in my project.clj and copied the source of the 
> above clojar into my pet project on my PC (Java HotSpot(TM) 64-Bit Server 
> VM 10.0.1+10).  That is as far as I've gotten.  Nothing seems to pick up on 
> the XSD version 1.1.
>
>
> I have tried:
>
> (System/setProperty "javax.xml.validation.SchemaFactory:
> http://www.w3.org/XML/XMLSchema/v1.1"; 
> "org.apache.xerces.jaxp.validation.XMLSchema11Factory")
>
> (defn- validator-from-schemas
>   [sources]
>   (-> (SchemaFactory/newInstance "http://www.w3.org/XML/XMLSchema/v1.1";)
>   (.newSchema sources)
>   (.newValidator)))
>
>
> Then I run:
>
> user=> (def is-valid-xml? (create-validation-fn (slurp xsd-path)))
>
> CompilerException java.lang.RuntimeException: Unable to resolve symbol: 
> create-validation-fn in this context, 
> compiling:(C:\cygwin64\tmp\form-init15757041316465825177.clj:1:20)
>
> My theory is that libraries like javax.xml and org.xml.sax are now in 
> modules which is probably just one of many problems.
>
> Any insights are gratefully received?
>
>
> --
> Regards
>
> Stephen.
>

-- 
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/d/optout.


RE: Validate XSD 1.1

2018-05-29 Thread Stephen Feyrer
Hi Sean,

That is defined in my core.clj.


—
Regards

Stephen 

-- 
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/d/optout.


Validate XSD 1.1

2018-05-28 Thread Stephen Feyrer
Hi there,

I would to validate some XML documents in XSD version 1.1.  This cutting
edge standard is now all of six years old.  So perhaps it is understandable
that it hasn't reached the mainstream stable branches of either the Java or
.NET eco-systems.

For XSD version 1.0 there is https://clojars.org/clj-xml-validation and
that works very well.


Now there is a library which is available to Java which claims XSD 1.1
compliance:

:dependencies [[org.clojure/clojure "1.9.0"]
[org.opengis.cite.xerces/xercesImpl-xsd11
"2.12-beta-r1667115"]]



So I have included that in my project.clj and copied the source of the
above clojar into my pet project on my PC (Java HotSpot(TM) 64-Bit Server
VM 10.0.1+10).  That is as far as I've gotten.  Nothing seems to pick up on
the XSD version 1.1.


I have tried:

(System/setProperty "javax.xml.validation.SchemaFactory:
http://www.w3.org/XML/XMLSchema/v1.1";
"org.apache.xerces.jaxp.validation.XMLSchema11Factory")

(defn- validator-from-schemas
  [sources]
  (-> (SchemaFactory/newInstance "http://www.w3.org/XML/XMLSchema/v1.1";)
  (.newSchema sources)
  (.newValidator)))


Then I run:

user=> (def is-valid-xml? (create-validation-fn (slurp xsd-path)))

CompilerException java.lang.RuntimeException: Unable to resolve symbol:
create-validation-fn in this context,
compiling:(C:\cygwin64\tmp\form-init15757041316465825177.clj:1:20)

My theory is that libraries like javax.xml and org.xml.sax are now in
modules which is probably just one of many problems.

Any insights are gratefully received?


--
Regards

Stephen.

-- 
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/d/optout.


Re: tlc Expect like library?

2018-02-13 Thread Stephen Feyrer
Hi Justin,

That looks really cool.  I'll take some time reading about it and see if I
can do anything.

Thank you.


--
Kind regards,

Stephen.

On 13 February 2018 at 18:26, Justin Smith  wrote:

> I've long thought implementing something like TCL expect in Clojure would
> be a fun project, as far as I know it hasn't been tried (though the google
> results are drowned out by the Expectations testing library so who
> knows...).
>
> If I were doing this from scratch I'd start with the Process and
> ProcessBuilder APIs, or use node child_process API with cljs. core.match
> might be useful for program interaction dispatch.
>
> On Tue, Feb 13, 2018 at 4:42 AM Stephen Feyrer 
> wrote:
>
>> Hi,
>>
>> I would like to ask, is there a Clojure version of the tlc expect library
>> or an equivalent?
>>
>> Something to launch and control other applications.  Specifically I want
>> to control text based terminal application.  Emulating the screen, moving
>> the cursor around and firing character codes at it?
>>
>> Thanks.
>>
>>
>> Stephen Feyrer.
>>
>> --
>> 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/d/optout.
>>
> --
> 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/d/optout.
>

-- 
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/d/optout.


tlc Expect like library?

2018-02-13 Thread Stephen Feyrer
Hi,

I would like to ask, is there a Clojure version of the tlc expect library
or an equivalent?

Something to launch and control other applications.  Specifically I want to
control text based terminal application.  Emulating the screen, moving the
cursor around and firing character codes at it?

Thanks.


Stephen Feyrer.

-- 
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/d/optout.


Re: IF, WHEN or SOME

2017-12-11 Thread Stephen Feyrer
Hi Tim,

Thank you.


--
Kind regards

Stephen.

On 11 December 2017 at 23:58, Timothy Baldridge 
wrote:

> I talked a bit about this in my video on Boolean Blindness: https://www.
> youtube.com/watch?v=K1LaaJMscCc
>
> Might be worth a watch.
>
> On Mon, Dec 11, 2017 at 4:56 PM, Stephen Feyrer 
> wrote:
>
>> Hi there,
>>
>> I have been trying to shake this thought for a while now.  Essentially,
>> my thought was if you can return a function why not decision component of
>> an IF, WHEN or SOME statement?  That would give you a re-usable named
>> choice.
>>
>> Then you could write:
>>
>> (celebration: do-something do-something-else)
>>
>>
>> This would be equivalent to writing:
>>
>> (def success [apples bananas pears])
>>
>> (defn celebration: [x y] (if (empty? success) x y))
>>
>> (celebration: (do-something do-something-else))
>>
>>
>> I'm reasonably certain of the foolishness of this thought but
>> occasionally, I have doubts.
>>
>> Maybe I'm barking up the wrong tree or possibly I've seen something like
>> this before and forgotten about it.  Perhaps, this is just taking things
>> too far...  Either way, it's deferring the choice until it's needed.  In
>> the right hands it could make for more readable code.
>>
>> For completeness sake, to define the first form above you'd use:
>>
>> (defc celebration: (if (empty? success)))
>>
>>
>> A more usable example might look like:
>>
>> (def nums [1 2 3 4 5 6 7 8])
>>
>> (defc even-nums: (some (even? nums)))
>>
>> I guess this makes the real question, is it a good thing to be able to
>> defer choice like this?
>>
>>
>> Btw, defc would be like def-choice but other options might be deft -
>> def-test or defp - def-predicate.
>>
>>
>> --
>> Kind regards
>>
>> Stephen
>>
>> --
>> 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/d/optout.
>>
>
>
>
> --
> “One of the main causes of the fall of the Roman Empire was that–lacking
> zero–they had no way to indicate successful termination of their C
> programs.”
> (Robert Firth)
>
> --
> 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/d/optout.
>

-- 
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/d/optout.


IF, WHEN or SOME

2017-12-11 Thread Stephen Feyrer
Hi there,

I have been trying to shake this thought for a while now.  Essentially, my
thought was if you can return a function why not decision component of an
IF, WHEN or SOME statement?  That would give you a re-usable named choice.

Then you could write:

(celebration: do-something do-something-else)


This would be equivalent to writing:

(def success [apples bananas pears])

(defn celebration: [x y] (if (empty? success) x y))

(celebration: (do-something do-something-else))


I'm reasonably certain of the foolishness of this thought but occasionally,
I have doubts.

Maybe I'm barking up the wrong tree or possibly I've seen something like
this before and forgotten about it.  Perhaps, this is just taking things
too far...  Either way, it's deferring the choice until it's needed.  In
the right hands it could make for more readable code.

For completeness sake, to define the first form above you'd use:

(defc celebration: (if (empty? success)))


A more usable example might look like:

(def nums [1 2 3 4 5 6 7 8])

(defc even-nums: (some (even? nums)))

I guess this makes the real question, is it a good thing to be able to
defer choice like this?


Btw, defc would be like def-choice but other options might be deft -
def-test or defp - def-predicate.


--
Kind regards

Stephen

-- 
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/d/optout.


Re: Map Keywords are functions, why not vector elements?

2017-11-19 Thread Stephen Feyrer
Hi,

A quick thank you to both Gary and Sean and everyone!  I will come back to
this once I have achieved a deeper understanding.

Apologies for the delayed response.


--
Kind regards

Stephen.

On 14 November 2017 at 09:59, Gary Verhaegen 
wrote:

> If you're going to call that for multiple elements of the same vector,
> it's worth thinking about doing some work upfront so that each look-up is
> faster:
>
> (defn indices [vect]
>   (->> vect
>(map-indexed vector)
>(reduce (fn [acc [idx el]]
>  (update acc el (fnil conj []) idx))
>{})))
> (indices [1 "is" 1 :same]){1 [0 2], "is" [1], :same [3]}
>
>
> would walk through the vector only once and create a map of value -> list
> of indices.
>
> On 14 November 2017 at 05:49, Sean Corfield  wrote:
>
>> I don’t think anyone addressed your question about finding all the
>> indices in a vector where the element matches a given search value?
>>
>>
>>
>> There are a number of ways to tackle that (given it’s going to be a
>> linear search). Since you want the indices, you are either going to need to
>> track them directly or use map-indexed to produce them automatically.
>>
>>
>>
>> (defn indices [x l] ; produces a vector
>>
>>   (loop [i 0 l l r []]
>>
>> (if (seq l)
>>
>>   (recur (inc i) (rest l) (if (= x (first l)) (conj r i) r))
>>
>>   r)))
>>
>>
>>
>> (defn indices [x l] ; produces a lazy sequence
>>
>>   (keep identity (map-indexed (fn [i v] (when (= x v) i)) l)))
>>
>>
>>
>> (defn indices [x l] ; produces a vector
>>
>>   (transduce (comp (map-indexed vector)
>>
>>(filter (comp (partial = x) second))
>>
>>(map first))
>>
>>  conj
>>
>>  []
>>
>>  l))
>>
>>
>>
>> Hopefully that’ll give you some options to think about…
>>
>>
>>
>> Sean Corfield -- (970) FOR-SEAN -- (904) 302-SEAN
>> An Architect's View -- http://corfield.org/
>>
>> "If you're not annoying somebody, you're not really alive."
>> -- Margaret Atwood
>>
>>
>> --
>> *From:* clojure@googlegroups.com  on behalf of
>> Stephen Feyrer 
>> *Sent:* Monday, November 13, 2017 5:19:32 PM
>> *To:* clojure@googlegroups.com
>> *Subject:* Re: Map Keywords are functions, why not vector elements?
>>
>> Hi Alex, Didier,
>>
>> Thanks for your patience.
>>
>> That covers everything which I can think of and a fair bit more :)  I
>> have a bit of reading and thinking to do now.
>>
>> Again, thank you.
>>
>>
>> --
>> Rule of thumb simple question, complicated answer
>>
>> Stephen.
>>
>> On 13 November 2017 at 22:09, Didier  wrote:
>>
>>> Yo are looking for indexOf (.indexOf vector value).
>>>
>>> (.indexOf ["a" "b"] "b")
>>> => 1
>>>
>>> (.indexOf ["a" "b" "b"] "b")
>>> => 1
>>>
>>> Note how indexOf searches for the index of the first value which matches
>>> value.
>>>
>>> To do what you ask, is a query over a vector, which requires a search on
>>> each element. This will take O(N) time. For a small list like in your
>>> example its probably good enough and not an issue.
>>>
>>> If you want the name of the horse in a given position, that's a key
>>> lookup, which is ~O(1) time. You can use get:
>>>
>>> (get ["a" "b"] 1)
>>> => "b"
>>>
>>> If you really needed performance, you would need to combine a LinkedList
>>> and a map. Some datastructures do it for you under the hood, like Apache
>>> LinkedMap, amalloy ordered, java LinkedHashMap, etc.
>>>
>>> Its possible to also just use sorted-map-by in a closure. But this only
>>> works if you're not going to add/update things to the datastructure after
>>> first creation.
>>>
>>> See the example on clojuredocs: https://clojuredocs.org/clojur
>>> e.core/sorted-map-by#example-542692d5c026201cdc327094
>>>
>>> --
>>> 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
>>>

Re: Map Keywords are functions, why not vector elements?

2017-11-13 Thread Stephen Feyrer
Hi Alex, Didier,

Thanks for your patience.

That covers everything which I can think of and a fair bit more :)  I have
a bit of reading and thinking to do now.

Again, thank you.


--
Rule of thumb simple question, complicated answer

Stephen.

On 13 November 2017 at 22:09, Didier  wrote:

> Yo are looking for indexOf (.indexOf vector value).
>
> (.indexOf ["a" "b"] "b")
> => 1
>
> (.indexOf ["a" "b" "b"] "b")
> => 1
>
> Note how indexOf searches for the index of the first value which matches
> value.
>
> To do what you ask, is a query over a vector, which requires a search on
> each element. This will take O(N) time. For a small list like in your
> example its probably good enough and not an issue.
>
> If you want the name of the horse in a given position, that's a key
> lookup, which is ~O(1) time. You can use get:
>
> (get ["a" "b"] 1)
> => "b"
>
> If you really needed performance, you would need to combine a LinkedList
> and a map. Some datastructures do it for you under the hood, like Apache
> LinkedMap, amalloy ordered, java LinkedHashMap, etc.
>
> Its possible to also just use sorted-map-by in a closure. But this only
> works if you're not going to add/update things to the datastructure after
> first creation.
>
> See the example on clojuredocs: https://clojuredocs.org/
> clojure.core/sorted-map-by#example-542692d5c026201cdc327094
>
> --
> 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/d/optout.
>

-- 
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/d/optout.


Re: Map Keywords are functions, why not vector elements?

2017-11-13 Thread Stephen Feyrer
Updating subject to make it make more sense, hopefully.

On 13 November 2017 at 14:15, Alex Miller  wrote:

> Regarding the title, this is incorrect. Map keys are not functions;
> keywords are functions that take an associative data structure and will
> look themselves up in it. So, the premise here is not even correct to start.
>
> Usually we prefer to work by starting from a problem and consider
> alternatives, but as you state below, you don't have a problem in mind.
>
>
Normally, I don't offer possible solutions when I enquiring about a
problem.  Maybe with forethought context and or constraints...

This is  more of a solution (based on a lack of understanding) without a
problem.  If you like the problem I'm hoping to address is to reduce my
lack of understanding.



>
> On Monday, November 13, 2017 at 3:49:41 AM UTC-6, Stephen Feyrer wrote:
>>
>> Hi there,
>>
>> This is possibly a silly question (and may have been asked before but I
>> couldn't find earlier examples) so here it goes.
>>
>>
>
>> Get the nth element of the vector
>>
>> user=> (3 [1 "is" the :same])
>> :same
>>
>>
>>
> Note that you can do something similar now with:
>
> ([1 "is" the :same] 3)
>

This works for me :)


>
> Whereas in the situation with maps, keywords (a specific common key type)
> are functions, here you are implying that anything could implicitly be
> invokable as a lookup function on an associative data structure. This
> doesn't make a lot of sense to me and would undoubtedly have performance
> effects. Maybe there is some case like `(map 1 [[:a 0] [:b 1] [:c 2]])`
> where this would make sense. But this doesn't make sense for all indexed
> data structures, just those indexed by longs. Layering invocability on
> longs would require special handling in the compiler (Keywords are a type
> that embeds this by implementing IFn naturally, so it's not a special case).
>
>>
>> Get the nthiness of an element in the vector
>>
>> user=> (::same [1 "is" the :same])
>> 3
>>
>>
> This is something completely different - a linear search for a match.
> Clojure has considered and rejected making linear searching easier multiple
> times. It's almost always a sign that you are using the wrong data
> structure in the first place and should be using a hashed data structure
> instead. There is no chance we would do something like this.
>

Perhaps, I'm not understanding vectors properly.  A vector is a set of
ordered elements, I think that is right.  Then at some point you might want
to get one of those elements picking it out by its index.  Equally, this is
probably where I've lost the plot you might want to know where in a vector
your element is residing.

Get the nthiness of an element in the vector
>>
>> user=> (:1 [1 "is" the :same])
>> (0 2)
>>
>>
> I don't even understand what is intended here.
>
>
You've already covered this above but I'll explain what I meant (just to be
clear).

user=> (nth [1 "is" the :same] 2)
1

And

user=> ([1 "is" the :same] 0)
1

Therefore, a lookup of value '1' would return the indices for both
occurrences in a list.



> Taking things further into the realms of really you should have stopped
>> there!
>>
>> Get the these element of the vector
>>
>> user=> ((1 3) [1 "is" the :same])
>> ("is" :same)
>>
>>
>> Just for fun I tried:
>>
>> user=> ((:this :the) {:this "is" :the "same"})
>>
>>
>>
>> NullPointerException   user/eval786 (NO_SOURCE_FILE:1)
>>
>>
>>
The thought here was the same as the above only with a list of invocations
to return a list of values.



>
>> I may be barking up the wrong tree or possibly just barking...  I hope
>> what I'm asking makes some sort of sense.
>>
>
> Not particularly.
>
>
>> By way of apology to the reader, when I began writing this question it
>> was ill thought out and seemed a lot simpler.  As a disclaimer, I can't
>> think of direct examples how this would improve readability or such or even
>> necessarily be useful.
>>
>
> Seems like that should have been a sign. :)
>

That was one yes, the other was the suggestion that this might be a silly
question.  In hindsight, I think the question I'm looking at now maybe
quite different to the one I thought I had when I started.

At this point I think I would ask, how do you find the indices of elements
within a vector for a certain value?  Or perhaps, should you be needing to
obtain 

Map Keys are functions, why not vector elements?

2017-11-13 Thread Stephen Feyrer
Hi there,

This is possibly a silly question (and may have been asked before but I
couldn't find earlier examples) so here it goes.

We start with a form which we're all familiar with:

user=> (:this {:this "is" :the "same"})
"is"


Then it's not a stretch to go to:

user=> (def the 1)
#'user/the
user=> (nth [1 "is" the :same] 1)

"is"


Here's where it gets tricky as we enter the land of make believe and
what-if?

I suggest a special form where vector elements could be treated like
functions in a manner similar to maps keys.  As this is purely
hypothetical there might be better ways of representing this:

Get the nth element of the vector

user=> (3 [1 "is" the :same])
:same


Get the nth element of the vector

user=> (2 [1 "is" the :same])
1


Get the nthiness of an element in the vector

user=> (::same [1 "is" the :same])
3


Get the nthiness of an element in the vector

user=> (:the [1 "is" the :same])
2


Get the nthiness of an element in the vector

user=> (:1 [1 "is" the :same])
(0 2)


Taking things further into the realms of really you should have stopped
there!

Get the these element of the vector

user=> ((1 3) [1 "is" the :same])
("is" :same)


Just for fun I tried:

user=> ((:this :the) {:this "is" :the "same"})


NullPointerException   user/eval786 (NO_SOURCE_FILE:1)



I may be barking up the wrong tree or possibly just barking...  I hope what
I'm asking makes some sort of sense.  By way of apology to the reader, when
I began writing this question it was ill thought out and seemed a lot
simpler.  As a disclaimer, I can't think of direct examples how this would
improve readability or such or even necessarily be useful.  Though, that
being said, I do believe that there people who'd make good use of such a
feature, though I don't know who they are either but I'm hoping you're
reading this ;)

My parting shot, I have a guess as to why things are the way they are but
that is completely in substantiated and lacks in even the most basic
rationality as I also guess as to why my guess might not be true... :(


--
Warning!  If you question everything the answer you'll get is "EVERYTHING!"

Stephen.

-- 
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/d/optout.


Re: An Averaging function

2014-07-12 Thread Stephen Feyrer
Hi,

Just to let you guys know I am paying attention and am trying to get all my
ducks in order.  I will definitely check out the resources you've
mentioned.  Thank you.


On 11 July 2014 08:11, Adrian Mowat  wrote:

> Hi Blake
>
> Brian Marick's book on FP for OO programmers is an excellent book for
> Clojure beginners who already have a programming background.
>
> https://leanpub.com/fp-oo
>
> Cheers
>
> Adrian
>
> --
> 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/d/optout.
>

-- 
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/d/optout.


Re: An Averaging function

2014-07-10 Thread Stephen Feyrer
Hi Sam, Lee.

Thank you both.

It would appear that I am faced with the old adage, "A little knowledge is
a dangerous thing".

Again thank you, you ' ve been a great help.  If I may impose upon you a
little further?  Would either of you be able to recommend an introductory
book either for Clojure or FP that might fit well with Clojure, for the
mildly bewildered?  I have a book Programming Clojure but it is written
with an assumption of prior knowledge/experience which I don't have.  By
the way, Programming Clojure is a good book, I just don't think I fit
within the target audience.


On 10 July 2014 02:41, Lee Spector  wrote:

>
> On Jul 9, 2014, at 9:31 PM, Lee Spector  wrote:
> > You could patch (not recommended!) this by adding "do" to the beginning
> of that list:
>
> Or -- I now see, instead of adding the "do" you could just remove the
> outermost parentheses after the parameter list. But as Sam and I said this
> is a bad way to go anyway -- you want to avoid the nested defs.
>
>  -Lee
>
> --
> 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/d/optout.
>

-- 
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/d/optout.


An Averaging function

2014-07-09 Thread Stephen Feyrer
Hi,

I tried to create the function below in a Lighttable instarepl.  In lieu of
any better idea for formatting, the <  > statements below indicate
instarepl output.

(defn avged ([x]
((def sumed (reduce + x)) < 10 >
(def counted (count x)) < 4 >
(def result (/ sumed counted)) < 5/2 >
result
)))

(avged [1 2 3 4]) < java.lang.ClassCastException: java.lang.Long cannot be
cast to clojure.lang.IFn
Var.java:392 clojure.lang.Var.fn
Var.java:423 clojure.lang.Var.invoke
(Unknown Source) user/avged >

The objective of this function is just a learning exercise.

I have three questions:

1. Why doesn't it work, return a value?

2. What does the error message mean?  and seeing this or similar again, how
do I investigate to get a meaningful Clojure solution?

3.  Code Style, what can I do to improve readability and form?


Thanks.

--
Stephen Feyrer.

-- 
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/d/optout.


Re: newbie seq question

2014-04-13 Thread Stephen Feyrer
Hi François,

Thank you.  I have read through each of the articles you've indicated and
will read in full the braveclojure book.

I am playing the syntax-quotes and will explore the io/resource package.


To be honest I am still not confident in what I'm doing but there are still
avenues to explore.  At this stage I just want to acknowledge your response
and let you know that it is very much appreciated.




--
Kind regards

Stephen.


On 13 April 2014 07:02, François Rey  wrote:

>  On 13/04/14 02:21, Stephen Feyrer wrote:
>
>
> // Get the java file io library
>  (import '(java.io File))
>
>  // Get some files
> (def f (File. "/My/files/"))
>
>  (def fs (file-seq f))
>
>  // Filters for suffixes ".mp3"
> (def get-mp3 (filter #(.endsWith (.getName %) ".mp3") fs))
>
>  // Get the path of one mp3
>  (println (take 1 get-mp3))
>
>  This code is gathered from various unrelated Clojure forum posts.  The
> resultant collection, I must admit defeats my understanding.
>
>
>  My first question is the println statement returns "(# /My/files/path/to/Some of/My Music Collection.mp3>)", would someone explain
> this data structure for me, bearing in mind that white spaces and commas
> are synonymous.
>
> It's not a data structure, it's just the way clojure prints out java
> object:
>
> user=> f
> #
>
>
> In the REPL Clojure tries to print out readable output, meaning something
> that can be read again by the reader as input:
>
> user=> (def a '(1 2 3))
> #'user/a
> user=> #'user/a
> #'user/a
> user=> (var a)
> #'user/a
> user=> map
> #
>
> In the case of object instances, it cannot be printed into such readable
> form, so it uses the #< to indicate this is unreadable:
>
> user=> #
>
> clojure.lang.LispReader$ReaderException: java.lang.RuntimeException:
> Unreadable form
>  java.lang.RuntimeException: Unreadable form
>
> See also the answer to this stackoverflow question:
>
> http://stackoverflow.com/questions/17263929/clojure-read-string-on-functions
>
> If you want to know more about reader macros:
> http://en.wikibooks.org/wiki/Learning_Clojure/Reader_Macros
>
> There's also this chapter from an online beginner's book I recommend (you
> may want to read the stuff before):
> http://www.braveclojure.com/read-and-eval/
>
>
>
>  Please note, while I have programmed a little in the past this does not
> prevent me from asking dumb questions.  Thus finally, if this is not the
> appropriate place for this sort question could you point me in the right
> direction?
>
> You're perfectly fine here, newbies welcome.
> In fact your question is about something that isn't much talked or written
> about in clojure.
>
> HTH
>  --
> 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/d/optout.
>

-- 
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/d/optout.


newbie seq question

2014-04-12 Thread Stephen Feyrer
Hey,

I have hacked together this code:

// Get the java file io library
(import '(java.io File))

// Get some files
(def f (File. "/My/files/"))

(def fs (file-seq f))

// Filters for suffixes ".mp3"
(def get-mp3 (filter #(.endsWith (.getName %) ".mp3") fs))

// Get the path of one mp3
(println (take 1 get-mp3))

This code is gathered from various unrelated Clojure forum posts.  The
resultant collection, I must admit defeats my understanding.


My first question is the println statement returns "(#)", would someone explain
this data structure for me, bearing in mind that white spaces and commas
are synonymous.

Next, I'd like to outline what I'd like to achieve.  I want to learn how to
program in Clojure.  To do this I decided on what I hope is a simple enough
project for a novice.  The goal of this project is to take a number of
files compare them, then identify the duplicates and allow the user to
delete one or more set of duplicate files, creating a selection based on a
common attribute i.e. a set being those files belonging to a distinct
parent directory.


Please note, while I have programmed a little in the past this does not
prevent me from asking dumb questions.  Thus finally, if this is not the
appropriate place for this sort question could you point me in the right
direction?


--
Kind regards

Stephen.

-- 
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/d/optout.