Re: SRSLY? (= (true? identity) (false? identity)) => true

2017-09-01 Thread Didier
What might confuse you, is why Clojure even have true? and false? functions?

Its because conditional constructs like if, cond, when, test for truthy (aka 
logical true) and falsey (aka logical false), not true and false. Nil and False 
are falsey, and everything else is truthy.

Most of the time this is great, you can do:

(if (:a {}) ... ...)

Since if tests for truthy, keyword access of map values can be used as a valid 
if condition.

But sometimes that's not what you want, sometimes you want nil to not be 
considered false, or :error to not be considered true. In those cases, you wrap 
the test condition in true? and false?. That way you're explicitly checking for 
true or false, not truthy and falsey.

-- 
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: SRSLY? (= (true? identity) (false? identity)) => true

2017-09-01 Thread Ravindra Jaju
(= 1 10) => false
(= 2 10) => false

(= 10 10) => true
(= false false) => true
(= (= 1 10) (= 2 10)) => true

class BoolTest {
public static void main(String args[]) {
System.out.println(Boolean.TRUE.equals(System.class) ==
Boolean.FALSE.equals(System.class)); // prints "true", System.class being
an arbitrary choice, like the choice of "identity", a fn.
}
}

The domain for functions true? and false? is arbitrarily vast (possibly,
the entire set of values as I believe they never throw exceptions), and the
range is the limited space [True, False]. Very few domain-values would,
expectedly, map to True, as it is a strict equality check. Your expression
checks the equality of false with itself.


On Sat, Sep 2, 2017 at 9:36 AM, Rostislav Svoboda <
rostislav.svob...@gmail.com> wrote:

> > identity isn't a boolean, so neither true? nor false? should return true
> for it
>
> But then why it should return 'false'?
>
> 2017-09-02 6:04 GMT+02:00 Justin Smith :
> > identity isn't a boolean, so neither true? nor false? should return true
> for
> > it
> >
> >
> > On Fri, Sep 1, 2017 at 9:01 PM Rostislav Svoboda
> >  wrote:
> >>
> >> > (true? identity) -> false
> >> > (false? identity) -> false
> >> > (= false false) -> true
> >>
> >> Well:
> >> (= identity identity) -> true
> >>
> >> My math books say booleans can't be true and false in the same time.
> >>
> >> --
> >> 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.
>

-- 
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: SRSLY? (= (true? identity) (false? identity)) => true

2017-09-01 Thread Andy Fingerhut
By design, true? never throws an exception.   Neither does false?  You can
create functions similar to those that throw an exception when given a
non-boolean value, if you want such functions.

(Note: examples below rely on existence of clojure.core/boolean? which does
not exist in Clojure 1.8.0)

user=> (clojure-version)
"1.9.0-alpha19"
user=> (defn true-boolean?
  #_=>   [x]
  #_=>   (assert (boolean? x))
  #_=>   (true? x))
#'user/true-boolean?

user=> (true-boolean? true)
true
user=> (true-boolean? false)
false
user=> (true-boolean? identity)
AssertionError Assert failed: (boolean? x)  user/true-boolean?
(form-init3633819970128261150.clj:3)


Do the following function return values help shed any light on things,
perhaps?  They demonstrate that true and false are boolean value, but
identity has a value that is not a boolean type, but a function type.

user=> (boolean? true)
true
user=> (boolean? false)
true
user=> (boolean? identity)
false
user=> (fn? true)
false
user=> (fn? false)
false
user=> (fn? identity)
true

Andy


On Fri, Sep 1, 2017 at 9:06 PM, Rostislav Svoboda <
rostislav.svob...@gmail.com> wrote:

> > identity isn't a boolean, so neither true? nor false? should return true
> for it
>
> But then why it should return 'false'?
>
> 2017-09-02 6:04 GMT+02:00 Justin Smith :
> > identity isn't a boolean, so neither true? nor false? should return true
> for
> > it
> >
> >
> > On Fri, Sep 1, 2017 at 9:01 PM Rostislav Svoboda
> >  wrote:
> >>
> >> > (true? identity) -> false
> >> > (false? identity) -> false
> >> > (= false false) -> true
> >>
> >> Well:
> >> (= identity identity) -> true
> >>
> >> My math books say booleans can't be true and false in the same time.
> >>
> >> --
> >> 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.
>

-- 
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: SRSLY? (= (true? identity) (false? identity)) => true

2017-09-01 Thread Timothy Baldridge
Think about what you're asking:

"Hey, is identity a boolean true value?"

"No, it is a function, not a boolean"


"Is, identity a boolean false value?"

"No, it's a function, not a boolean"


Makes plenty sense to me.


On Fri, Sep 1, 2017 at 10:06 PM, Rostislav Svoboda <
rostislav.svob...@gmail.com> wrote:

> > identity isn't a boolean, so neither true? nor false? should return true
> for it
>
> But then why it should return 'false'?
>
> 2017-09-02 6:04 GMT+02:00 Justin Smith :
> > identity isn't a boolean, so neither true? nor false? should return true
> for
> > it
> >
> >
> > On Fri, Sep 1, 2017 at 9:01 PM Rostislav Svoboda
> >  wrote:
> >>
> >> > (true? identity) -> false
> >> > (false? identity) -> false
> >> > (= false false) -> true
> >>
> >> Well:
> >> (= identity identity) -> true
> >>
> >> My math books say booleans can't be true and false in the same time.
> >>
> >> --
> >> 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.
>



-- 
“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.


Re: SRSLY? (= (true? identity) (false? identity)) => true

2017-09-01 Thread Rostislav Svoboda
> identity isn't a boolean, so neither true? nor false? should return true for 
> it

But then why it should return 'false'?

2017-09-02 6:04 GMT+02:00 Justin Smith :
> identity isn't a boolean, so neither true? nor false? should return true for
> it
>
>
> On Fri, Sep 1, 2017 at 9:01 PM Rostislav Svoboda
>  wrote:
>>
>> > (true? identity) -> false
>> > (false? identity) -> false
>> > (= false false) -> true
>>
>> Well:
>> (= identity identity) -> true
>>
>> My math books say booleans can't be true and false in the same time.
>>
>> --
>> 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.


Re: SRSLY? (= (true? identity) (false? identity)) => true

2017-09-01 Thread Rostislav Svoboda
> You seem to be confused about what true? and false? are intended to do.

No no, it's not me who's confused about booleans. It's the computer :)

2017-09-02 5:59 GMT+02:00 Justin Smith :
> You seem to be confused about what true? and false? are intended to do.
>
> +user=> (doc true?)
> -
> clojure.core/true?
> ([x])
>   Returns true if x is the value true, false otherwise.
> nil
> +user=> (doc false?)
> -
> clojure.core/false?
> ([x])
>   Returns true if x is the value false, false otherwise.
> nil
>
>
> On Fri, Sep 1, 2017 at 8:57 PM Rostislav Svoboda
>  wrote:
>>
>> > This is what I would expect - the identity function is neither the value
>> > true, or the value false
>>
>> Hmm. No matter what's the value of the identity, the functions
>> 'true?', 'false?', 'not' should then return an exception (or something
>> else) instead of a boolean.
>>
>> 2017-09-02 5:49 GMT+02:00 Mark Engelberg :
>> > (true? identity) -> false
>> > (false? identity) -> false
>> > (= false false) -> true
>> >
>> > On Fri, Sep 1, 2017 at 8:43 PM, Rostislav Svoboda
>> >  wrote:
>> >>
>> >> Hi, can anybody explain it please?
>> >>
>> >> $ java -cp clojure-1.8.0.jar clojure.main
>> >> Clojure 1.8.0
>> >> user=> (= (true? identity) (false? identity))
>> >> true
>> >>
>> >> And in 1.9.0-alpha19 it behaves the same.
>> >>
>> >> thx Bost
>> >>
>> >> --
>> >> 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.
>
> --
> 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 fro

Re: SRSLY? (= (true? identity) (false? identity)) => true

2017-09-01 Thread Justin Smith
identity isn't a boolean, so neither true? nor false? should return true
for it


On Fri, Sep 1, 2017 at 9:01 PM Rostislav Svoboda <
rostislav.svob...@gmail.com> wrote:

> > (true? identity) -> false
> > (false? identity) -> false
> > (= false false) -> true
>
> Well:
> (= identity identity) -> true
>
> My math books say booleans can't be true and false in the same time.
>
> --
> 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: SRSLY? (= (true? identity) (false? identity)) => true

2017-09-01 Thread Rostislav Svoboda
> (true? identity) -> false
> (false? identity) -> false
> (= false false) -> true

Well:
(= identity identity) -> true

My math books say booleans can't be true and false in the same time.

-- 
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: SRSLY? (= (true? identity) (false? identity)) => true

2017-09-01 Thread Justin Smith
You seem to be confused about what true? and false? are intended to do.

+user=> (doc true?)
-
clojure.core/true?
([x])
  Returns true if x is the value true, false otherwise.
nil
+user=> (doc false?)
-
clojure.core/false?
([x])
  Returns true if x is the value false, false otherwise.
nil


On Fri, Sep 1, 2017 at 8:57 PM Rostislav Svoboda <
rostislav.svob...@gmail.com> wrote:

> > This is what I would expect - the identity function is neither the value
> true, or the value false
>
> Hmm. No matter what's the value of the identity, the functions
> 'true?', 'false?', 'not' should then return an exception (or something
> else) instead of a boolean.
>
> 2017-09-02 5:49 GMT+02:00 Mark Engelberg :
> > (true? identity) -> false
> > (false? identity) -> false
> > (= false false) -> true
> >
> > On Fri, Sep 1, 2017 at 8:43 PM, Rostislav Svoboda
> >  wrote:
> >>
> >> Hi, can anybody explain it please?
> >>
> >> $ java -cp clojure-1.8.0.jar clojure.main
> >> Clojure 1.8.0
> >> user=> (= (true? identity) (false? identity))
> >> true
> >>
> >> And in 1.9.0-alpha19 it behaves the same.
> >>
> >> thx Bost
> >>
> >> --
> >> 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.
>

-- 
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: SRSLY? (= (true? identity) (false? identity)) => true

2017-09-01 Thread Rostislav Svoboda
> This is what I would expect - the identity function is neither the value 
> true, or the value false

Hmm. No matter what's the value of the identity, the functions
'true?', 'false?', 'not' should then return an exception (or something
else) instead of a boolean.

2017-09-02 5:49 GMT+02:00 Mark Engelberg :
> (true? identity) -> false
> (false? identity) -> false
> (= false false) -> true
>
> On Fri, Sep 1, 2017 at 8:43 PM, Rostislav Svoboda
>  wrote:
>>
>> Hi, can anybody explain it please?
>>
>> $ java -cp clojure-1.8.0.jar clojure.main
>> Clojure 1.8.0
>> user=> (= (true? identity) (false? identity))
>> true
>>
>> And in 1.9.0-alpha19 it behaves the same.
>>
>> thx Bost
>>
>> --
>> 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.


Re: SRSLY? (= (true? identity) (false? identity)) => true

2017-09-01 Thread Mark Engelberg
(true? identity) -> false
(false? identity) -> false
(= false false) -> true

On Fri, Sep 1, 2017 at 8:43 PM, Rostislav Svoboda <
rostislav.svob...@gmail.com> wrote:

> Hi, can anybody explain it please?
>
> $ java -cp clojure-1.8.0.jar clojure.main
> Clojure 1.8.0
> user=> (= (true? identity) (false? identity))
> true
>
> And in 1.9.0-alpha19 it behaves the same.
>
> thx Bost
>
> --
> 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: SRSLY? (= (true? identity) (false? identity)) => true

2017-09-01 Thread Justin Smith
This is what I would expect - the identity function is neither the value
true, or the value false

On Fri, Sep 1, 2017 at 8:44 PM Rostislav Svoboda <
rostislav.svob...@gmail.com> wrote:

> Hi, can anybody explain it please?
>
> $ java -cp clojure-1.8.0.jar clojure.main
> Clojure 1.8.0
> user=> (= (true? identity) (false? identity))
> true
>
> And in 1.9.0-alpha19 it behaves the same.
>
> thx Bost
>
> --
> 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: [ANN] Clojure 1.9.0-alpha19

2017-09-01 Thread Alex Miller
Due to the new dependence on external jars, these instructions will be 
different in Clojure 1.9. We will be providing additional tooling to make this 
easier but that's still a work in progress.

-- 
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.


SRSLY? (= (true? identity) (false? identity)) => true

2017-09-01 Thread Rostislav Svoboda
Hi, can anybody explain it please?

$ java -cp clojure-1.8.0.jar clojure.main
Clojure 1.8.0
user=> (= (true? identity) (false? identity))
true

And in 1.9.0-alpha19 it behaves the same.

thx Bost

-- 
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: [ANN] Clojure 1.9.0-alpha19

2017-09-01 Thread Bost
Hi, readme.txt says:

To run: java -cp clojure-${VERSION}.jar clojure.main

so I tried it out:

$ java -cp clojure-1.9.0-alpha19.jar clojure.main
Exception in thread "main" java.lang.ExceptionInInitializerError
at clojure.main.(main.java:20)
Caused by: java.io.FileNotFoundException: Could not locate 
clojure/spec/alpha__init.class or clojure/spec/alpha.clj on classpath.
at clojure.lang.RT.load(RT.java:459)
at clojure.lang.RT.load(RT.java:422)
at clojure.lang.RT.doInit(RT.java:465)
at clojure.lang.RT.(RT.java:334)
... 1 more

-- 
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.


[ANN] Arche: A Battery Pack for Alia/Cassandra

2017-09-01 Thread Derek Troy-West
Introducing Arche (https://github.com/troy-west/arche).

Using Alia (https://github.com/mpenet/alia) as a base, Arche provides the 
following:

   - Cassandra state management (Cluster / Session / Prepared Statements / 
   Execution Options / UDTs)
   - Optional DI/lifecycle via Integrant 
    or Component 
   
   - Externalisation of query definitions via an extension of HugSQL 
    to support CQL
   - Automatic hyphen/underscore translation with when using HugCQL 
   - Query configuration by simple EDN map of key/cql or key/map (when 
   configuring per-query opts)
   - Prepared statement execution by keyword, supports all Alia execution 
   modes (vanilla, core.async, manifold)
   - User Defined Type (UDT) encoding by keyword
   - As much configuration from EDN as possible (see: tagged literal 
   support)

If you work with Clojure and Cassandra I hope you find this useful.

Best,
 Derek Troy-West




-- 
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.


Datomic evals clojure subset in datalog - how can I do this?

2017-09-01 Thread Dustin Getz
Datomic allows clojure.core fns to be embedded inside datalog queries, 
except eval (http://docs.datomic.com/query.html)

1. Do we know how secure is this - what if the datalog comes from untrusted 
user input? 

2. What is the best way to implement restricted-eval like this on jvm, 
compared to on js?

-- 
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.