On Thursday, July 21, 2016 at 5:34:37 PM UTC-5, adrian...@mail.yu.edu wrote:
>
> Just for future reference this is a mailing list and not a traditional
> forum, so after you post something here it will email everyone subscribed.
>
Thanks Adrian. I actually didn't realize that.
--
You
And deleting a post from the Google Groups interface still leaves everyone
else’s replies – and in this case Steve’s first reply to your included your
original post anyway…
https://groups.google.com/forum/?hl=en#!topic/clojure/MxJOgQJPGN8
Sean Corfield -- (970) FOR-SEAN -- (904)
Just for future reference this is a mailing list and not a traditional
forum, so after you post something here it will email everyone subscribed.
On Thursday, July 21, 2016 at 6:24:28 PM UTC-4, Mars0i wrote:
>
> Ahh... I realized my mistake very soon after I posted the question, and
> deleted
Ahh... I realized my mistake very soon after I posted the question, and
deleted it. You must have caught it before it went away. Your explanation
is helpful, though. Thanks.
On Thursday, July 21, 2016 at 1:30:56 PM UTC-5, miner wrote:
>
> It looks like you’ve got your #s misplaced. I think
It looks like you’ve got your #s misplaced. I think you want something like
this:
(s/and #(> % 0.0) #(< % 1.0))
Of course, the first predicate expression could be replaced by `pos?`.
The `s/and` returns a single spec that combines multiple specs. Of course,
`clojure.core/and` is basically
With Clojure 1.9.0-alpha10:
*user=> (s/def ::interval-with-cloj-and #(and (> % 0.0) (< % 1.0)))user=>
(s/def ::interval-with-spec-and #(s/and (> % 0.0) (< % 1.0)))user=>
(s/valid? ::interval-with-cloj-and 1.0)false*That's what I expected.
*user=> (s/valid? ::interval-with-spec-and
On Saturday, April 25, 2015 at 1:47:27 AM UTC-4, Mike Rodriguez wrote:
I agree about wanting to use the explicit argument name surrounded by
markdown quotes in docs. I've definitely started adopting this practice and
wish there were conventions around this sort of thing. Without it, doc
I have found long docs like that to be useful in some major top-level function
if it has a large sort of input and configuration parameters to pass in.
Markdown I believe means with back ticks around the symbol to make it stand out
as an actual art name vs some other word in the sentence. I
Nicola Mometto wrote:
It's talking about fully qualified symbols that map to an actual var.
E.g
user= (ns-resolve *ns* 'clojure.string/join)
#'clojure.string/join
Ah. Thank you.
Ambrose Bonnaire-Sergeant wrote:
Could you clarify why you expect that?
Thanks,
Ambrose
Because the
I agree about wanting to use the explicit argument name surrounded by markdown
quotes in docs. I've definitely started adopting this practice and wish there
were conventions around this sort of thing. Without it, doc strings can easily
get ambiguous and confusing in how they relate the the
The last sentence of the `ns-resolve` documentation reads:
Note that
if the symbol is fully qualified, the var/Class to which it resolves
need not be present in the namespace.
What does that mean? I would expect something like the following to
produce a non-nil value:
user=
Could you clarify why you expect that?
Thanks,
Ambrose
On Thu, Apr 23, 2015 at 6:43 PM, Brian Marick mar...@exampler.com wrote:
The last sentence of the `ns-resolve` documentation reads:
Note that
if the symbol is fully qualified, the var/Class to which it resolves
need not be
It's talking about fully qualified symbols that map to an actual var.
E.g
user= (ns-resolve *ns* 'clojure.string/join)
#'clojure.string/join
Brian Marick writes:
The last sentence of the `ns-resolve` documentation reads:
Note that
if the symbol is fully qualified, the var/Class to
This fails:
(ns-resolve 'sumtin 'clecs.world/remove-entity)
Exception No namespace: sumtin found clojure.core/the-ns (core.clj:3830)
But this succeeds:
(ns-resolve 'seesaw.core 'clecs.world/remove-entity)
#'clecs.world/remove-entity
It seems when the 2nd argument is fully qualified, first
I disagree...
One of the nice things about clojrue is that, at tis hear, lies the
'equiv' operator which is basically the 'egal' fn as defined by Baker
[1993] [Equal rights for functional objects or the mroe things change
the more they stay the same]. When using '=' with data-structures you
From the docs:
Equality. Returns true if x equals y, false if not. Same as
Java x.equals(y) except it also works for nil, and compares
numbers and collections in a type-independent manner. Clojure's
immutable data
structures define equals() (and thus =) as a value,*not an identity*,
If you're looking for some truly unintuitive equality behavior check
this out:
user= (def pred (Boolean. false)) ;;not a primitive but an object
#'user/pred
user= (= pred false)
true
user= (when pred (println I really shouldn't print))
I really shouldn't print
nil
Jim
On 11/12/12 13:19,
Apologies...I did not realise this had already been answered... oops! :-)
On 11/12/12 13:32, Jim foo.bar wrote:
If you're looking for some truly unintuitive equality behavior check
this out:
user= (def pred (Boolean. false)) ;;not a primitive but an object
#'user/pred
user= (= pred false)
For more surprising behaviour:
(= #.* #.*)
Sent from my iPhone
On 11 Dec 2012, at 13:32, Jim foo.bar jimpil1...@gmail.com wrote:
If you're looking for some truly unintuitive equality behavior check this
out:
user= (def pred (Boolean. false)) ;;not a primitive but an object
I added some text to the macro if on ClojureDocs.org last time this issue was
discussed on the email list. It is a bit wordy, but does also mention that
this is something the Java docs themselves warn about.
http://clojuredocs.org/clojure_core/clojure.core/if
Andy
On Dec 11, 2012, at 5:38
On Tue, Dec 11, 2012 at 5:17 AM, Jim foo.bar jimpil1...@gmail.com wrote:
I disagree...
One of the nice things about clojrue is that, at tis hear, lies the 'equiv'
operator which is basically the 'egal' fn as defined by Baker [1993] [Equal
rights for functional objects or the mroe things change
one of the things which seem to be true but nowhere completely
successfully fleshed out is the fact that equality is very
subjective. there can and should be many different ways to pose and
answer the question a == b.
--
You received this message because you are subscribed to the Google
Groups
On Tue, Dec 11, 2012 at 3:32 PM, Raoul Duke rao...@gmail.com wrote:
one of the things which seem to be true but nowhere completely
successfully fleshed out is the fact that equality is very
subjective. there can and should be many different ways to pose and
answer the question a == b.
There
Hi,
Equality is never subjective. There maybe different equality relations
defined. In most cases (integer) one os well served by intuition.
In other cases (clojure's =) the definition may not be intuitive, but never
subjective.
On Dec 12, 2012 12:32 AM, Raoul Duke rao...@gmail.com wrote:
one
Great paper btw!
On Dec 12, 2012 12:42 AM, Phil Hagelberg p...@hagelb.org wrote:
On Tue, Dec 11, 2012 at 3:32 PM, Raoul Duke rao...@gmail.com wrote:
one of the things which seem to be true but nowhere completely
successfully fleshed out is the fact that equality is very
subjective. there
Equality is never subjective. There maybe different equality relations
defined. In most cases (integer) one os well served by intuition.
In other cases (clojure's =) the definition may not be intuitive, but never
subjective.
ok sheesh then ^subjective^context dependent
--
You received this
On Dec 11, 2012, at 5:42 PM, Phil Hagelberg p...@hagelb.org wrote:
Henry Baker's Equal Rights for Functional Objects paper:
http://home.pipeline.com/~hbaker1/ObjectIdentity.html
Henry Baker was/is a brilliantly just-outside-of-the-box thinker. Many of the
papers at
On Wednesday, October 3, 2012 1:56:19 PM UTC-4, Warren Lynn wrote:
Out of curiosity, if we want to check if two collections has the same
structure/type and elements, namely if I want
(my-equal [1 2 3 4 '(5)] [1 2 3 4 [5]]) = false
(my-equal [1 2 3 4 [5]] [1 2 3 4 [5]]) = true
Is there
It is surprising at first, but since vectors are used so commonly in
Clojure instead of lists to represent literal sequential collections of
data, it turns out to be extremely convenient to be able to compare it for
equality against sequential collections generated as lists or lazy
sequences.
The Joy of Clojure book touches on this, it is an important design and
style decision. Great book, good question too. I'm learning about all
this stuff right now and it is all good stuff.
On Wed, Oct 3, 2012 at 3:44 AM, Mark Engelberg mark.engelb...@gmail.com wrote:
It is surprising at first,
On Wednesday, October 3, 2012 4:44:44 AM UTC-4, puzzler wrote:
It is surprising at first, but since vectors are used so commonly in
Clojure instead of lists to represent literal sequential collections of
data, it turns out to be extremely convenient to be able to compare it for
equality
It is surprising at first, but since vectors are used so commonly in
Clojure instead of lists to represent literal sequential collections of
data, it turns out to be extremely convenient to be able to compare it for
equality against sequential collections generated as lists or lazy
What is the rationale for this?
user (= [1 2 3 4] '(1 2 3 4))
true
I was quite surprised when this turned out to be the cause of a bug in a
function I am constructing. Vectors and lists differ so substantially in
their implementation and in their behavior that a vector and a list
should
I've added some examples of :when and :while, including those given by Herwig
and Tassilo in this thread, at ClojureDocs:
http://clojuredocs.org/clojure_core/clojure.core/for
Note: Anyone with a free account can add/edit examples on that site.
Andy
On Aug 21, 2012, at 8:34 AM,
Thanks Andy, that's awesome.
On Thu, Aug 23, 2012 at 11:22 PM, Andy Fingerhut
andy.finger...@gmail.comwrote:
I've added some examples of :when and :while, including those given by
Herwig and Tassilo in this thread, at ClojureDocs:
http://clojuredocs.org/clojure_core/clojure.core/for
Note:
That's amazing.
Thanks.
On Thu, Aug 23, 2012 at 4:22 PM, Andy Fingerhut
andy.finger...@gmail.com wrote:
I've added some examples of :when and :while, including those given by Herwig
and Tassilo in this thread, at ClojureDocs:
http://clojuredocs.org/clojure_core/clojure.core/for
Note:
Extra restrictions on (range of values of) variables used in the for.
See here:
http://clojure.github.com/clojure/clojure.core-api.html#clojure.core/for
2012/8/21 nicolas.o...@gmail.com nicolas.o...@gmail.com
Dear all,
What is the meaning of :while in a for?
I understand :when, and also
=
On Tue, Aug 21, 2012 at 11:50 AM, Arie van Wingerden xapw...@gmail.com wrote:
Extra restrictions on (range of values of) variables used in the for.
See here:
http://clojure.github.com/clojure/clojure.core-api.html#clojure.core/for
The link says nothing about the meaning of the modifiers.
(I
Dear all,
What is the meaning of :while in a for?
I understand :when, and also that :while jumps more element when the
condition is not met,
but where does it jump to exactly?
Best regards,
Nicolas.
--
You received this message because you are subscribed to the Google
Groups Clojure group
On 21/08/12 11:28, nicolas.o...@gmail.com wrote:
Dear all,
What is the meaning of :while in a for?
I understand :when, and also that :while jumps more element when the
condition is not met,
but where does it jump to exactly?
Best regards,
Nicolas.
You may find this helpful...
https
, 2012 1:28:50 PM UTC+3, Nicolas Oury wrote:
Dear all,
What is the meaning of :while in a for?
I understand :when, and also that :while jumps more element when the
condition is not met,
but where does it jump to exactly?
Best regards,
Nicolas.
--
You received this message because
nicolas.o...@gmail.com nicolas.o...@gmail.com writes:
Hi Nicolas,
What is the meaning of :while in a for?
I understand :when, and also that :while jumps more element when the
condition is not met,
Yes. With :when every combination is checked, whereas with :while, the
remaining combinations
Jonas jonas.enl...@gmail.com writes:
`:while` on the other hand ends the list comprehension when the test
evaluates to false (or nil) and returns the sequence generated thus
far.
No, it's perfectly possible to have a comprehension with a :while that
generates more elements after :while
On Tuesday, August 21, 2012 2:22:39 PM UTC+3, Tassilo Horn wrote:
Jonas jonas@gmail.com javascript: writes:
`:while` on the other hand ends the list comprehension when the test
evaluates to false (or nil) and returns the sequence generated thus
far.
No, it's perfectly possible
No, it's perfectly possible to have a comprehension with a :while that
generates more elements after :while evaluated to false. :while skips
some bindings, but it doesn't need to skip all of them. See my original
reply to Nicolas.
Wow - I never knew that. That isn't at all obvious from
David Powell djpow...@djpowell.net writes:
No, it's perfectly possible to have a comprehension with a :while that
generates more elements after :while evaluated to false. :while skips
some bindings, but it doesn't need to skip all of them. See my original
reply to Nicolas.
Wow - I never
Jonas jonas.enl...@gmail.com writes:
Hi Jonas,
`:while` on the other hand ends the list comprehension when the
test evaluates to false (or nil) and returns the sequence generated
thus far.
No, it's perfectly possible to have a comprehension with a :while
that generates more elements
Even though this thread is almost over, I'll quickly chime in and hopefully
add some clarity.
I've only stumbled over for's :while because of this; I like it. It's the
only modifier in a for, that can actually stop evaluation of its source
sequence. It's akin to take-while.
Behold the generation
I understand now.
The documentation could be clearer on that.
Your triangular example is very clear.
--
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
I was reading an old post of Rick Hickey
https://groups.google.com/forum/?hl=defromgroups#!searchin/clojure/sbcl/clojure/xyXu0S-CDZk/N2DI7Rpu5BIJ
You can also
use :inline to wrap arithmetic primitives implemented as Java static
methods, as Clojure itself does for +/* etc, which HotSpot
Take a look at definline in clojure.core.
Regards,
BG
Sent from phone. Please excuse brevity.
On Jul 12, 2012 10:13 PM, john john.vie...@gmail.com wrote:
I was reading an old post of Rick Hickey
Hi,
This is definline -
https://github.com/clojure/clojure/blob/master/src/clj/clojure/core.clj#L4583
inline keyword in compiler -
https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/Compiler.java#L79
other inline stuff -
As I understand it, the Clojure reader expects to be able to resolve
namespace references as soon as it sees them. Since alias is a
function, the c alias doesn't exist until sometime after the reader
has already run. I think you will encounter a similar problem with
the import macro.
Ok,
Roger,
What Clojure version are you using? When I run your snippet with HEAD,
I get:
FAIL in clojure.lang.persistentlist$emptyl...@1 (blah2.clj:11)
test alias function
expected: (= 1 (do (alias (quote c) (quote coretest
actual: (not (= 1 nil))
Which is presumably what you want to see.
On
Wait, I'm an idiot. Ignore my last message ...
On Jan 3, 9:39 am, Mike Hogye stacktra...@gmail.com wrote:
Roger,
What Clojure version are you using? When I run your snippet with HEAD,
I get:
FAIL in clojure.lang.persistentlist$emptyl...@1 (blah2.clj:11)
test alias function
expected: (= 1
Now that you understand it, can you explain it me? :)
This simplified version of your snippet still throws the No such
namespace: c exception:
(ns coretest)
(defn foo [x] x)
(= 1
(do
(alias 'c 'coretest)
(c/foo true)))
But the following completes without any exceptions:
Maybe the reader does _not_ eagerly resolve c/foo when the top-level
enclosing form is a do, but it _does_ eagerly resolve c/foo when
the top-level enclosing form is a function?
On Jan 3, 10:02 am, Mike Hogye stacktra...@gmail.com wrote:
Now that you understand it, can you explain it me? :)
Hi !
Now that you understand it, can you explain it me? :)
-
I said it makes sense not that I understand it ;-)
The make sense part is:
Calling alias inside a do is something I probably won't do in production code.
It would make more sense to
Maybe the reader does _not_ eagerly resolve c/foo when the top-level
enclosing form is a do, but it _does_ eagerly resolve c/foo when
the top-level enclosing form is a function?
The two forms read are very similar:
coretest= (read-string (= 1
(do
(alias 'c 'coretest)
(c/foo
Hi !
Given the code below, I'm wondering why I get
No such namespace: c
It would be nice if some could explain to me what I'm doing wrong.
Regards
Roger
(ns coretest
(:use [clojure.test])
)
(defn foo [x]
(condp = x
true 1
false 2
I can't seem to find the explanation I once saw for this. It's
something like: c/foo is resolved when the do form is _read_ ...
at which point the alias hasn't happened yet.
On Jan 2, 3:14 pm, Roger Gilliar ro...@gilliar.de wrote:
Hi !
Given the code below, I'm wondering why I get
No such
Here's what I was thinking of:
http://groups.google.com/group/clojure/browse_thread/thread/c093ac2c7e7302ab
I believe it's the same phenomenon.
On Jan 2, 8:03 pm, Mike Hogye stacktra...@gmail.com wrote:
I can't seem to find the explanation I once saw for this. It's
something like: c/foo is
Mike, are you referring to this:
http://groups.google.com/group/clojure/browse_thread/thread/b4704108d85693d0/84dd4b690b6d7afd?lnk=gstq=alias#84dd4b690b6d7afd
?
Roger, I realize this invalidates your test, but if do this instead,
the error goes away:
(alias 'c 'coretest)
(testing test alias
i was confused by the meaning of coll, too . . .even at a more basic level
of not knowing that it meant collection. I even thought at first I was
seeing col1 or that the second lower('L') was a capitol(i). I read it as,
column one in my head.
Is it accurate to call it some-seq or something? I
When a function parameter is named coll, does that generally mean it
can be any kind of collection except a map?
For example, the some function takes a predicate function and a
coll, but it can't be a map.
--
R. Mark Volkmann
Object Computing, Inc.
On Jan 31, 6:42 pm, Mark Volkmann r.mark.volkm...@gmail.com wrote:
When a function parameter is named coll, does that generally mean it
can be any kind of collection except a map?
For example, the some function takes a predicate function and a
coll, but it can't be a map.
I think it means
On Feb 1, 2:42 am, Mark Volkmann r.mark.volkm...@gmail.com wrote:
When a function parameter is named coll, does that generally mean it
can be any kind of collection except a map?
For example, the some function takes a predicate function and a
coll, but it can't be a map.
I thought all
I think it means any class that implements java.util.Collection.
To be precise, I think nil is also always OK.
Sometimes other seq-able things like Java arrays can be passed too,
although I don't think this is ever promised to work (if it doesn't,
you can always explicitly call seq on them
I have been wanting to know the same thing...I was guessing Clojure
was an acronym for: Common_Lisp_Object_Java_?something?_?something?_?
something?, or possibly Concurrency_Language_OnThe_JVM_?something?_?
something?_?something?...I am dying to know. Or, like others have
cited, Closure en
I assume that the name Clojure is taken from the word closure,
replacing the s with a j for Java. I've never seen that in writing
though and my curiosity compels me to have this verified. Is that
right?
Also, is it pronounced it is spelled or is it pronounced the same as
closure? I did find a
Yes. Pronounced closure as if the j is French.
On Jan 3, 1:06 pm, Mark Volkmann r.mark.volkm...@gmail.com wrote:
I assume that the name Clojure is taken from the word closure,
replacing the s with a j for Java. I've never seen that in writing
though and my curiosity compels me to have this
On Saturday 03 January 2009 13:06, Mark Volkmann wrote:
...
Also, is it pronounced it is spelled or is it pronounced the same as
closure? I did find a post that said it's pronounced like
closure, but I've always pronounced it the way it is spelled.
What's the difference?
RRS
On Sat, Jan 3, 2009 at 4:13 PM, Randall R Schulz rsch...@sonic.net wrote:
On Saturday 03 January 2009 13:06, Mark Volkmann wrote:
...
Also, is it pronounced it is spelled or is it pronounced the same as
closure? I did find a post that said it's pronounced like
closure, but I've always
On Saturday 03 January 2009 16:48, Mark Volkmann wrote:
On Sat, Jan 3, 2009 at 4:13 PM, Randall R Schulz rsch...@sonic.net
wrote:
On Saturday 03 January 2009 13:06, Mark Volkmann wrote:
...
Also, is it pronounced it is spelled or is it pronounced the same
as closure? I did find a post
On Sat, Jan 3, 2009 at 7:36 PM, Randall R Schulz rsch...@sonic.net wrote:
On Saturday 03 January 2009 17:32, Tom Faulhaber wrote:
Think of a French-style j like in bonjour, Jean Renoir, or Jacques
Cousteau. That gives the word Clojure a sound that's *very* similar
to the concept of a
On Jan 3, 2009, at 9:10 PM, Mark Volkmann wrote:
Hey Rich, can you confirm what is official according to you?
Should the j be pronounced like a j or like an s?
You can hear the man himself saying it here: http://blip.tv/file/1313398/
I hear no particular nod in his pronunciation to the
76 matches
Mail list logo