On Friday, January 23, 2015 at 12:59:40 AM UTC+13, Derek Troy-West wrote:
>
> From the documentation:
>
> (chan buf-or-n xform ex-handler)
>
> "If a transducer is supplied a
> buffer must be specified. ex-handler must be a fn of one argument -
> if an exception occurs during transformation it wil
We're using Validateur for this:
https://github.com/michaelklishin/validateur Not sure if you've seen
that one either.
Schema is more of a type-system-lite - it's not very good out of the box
at allowing you to validate form data and return nice error messages in
a way that's easy for some fo
Not sure what to tell you. If you can post code we can use to reproduce the
problem, that would help. Alternately, put some println statements into
load-sym so you can be sure it's getting the values you think it is?
On Tue Jan 20 2015 at 11:45:34 PM bob wrote:
> Hi,
>
> I have a function
>
> (d
If you want to keep jar size down and avoid class loader problems, instead
of excluding source I'd avoid aot and only ship source. If you need the JVM
to find your main class you can write a shim and only aot-compile that.
On Wed Jan 21 2015 at 12:36:03 PM Brian Craft wrote:
> Fixed it by adding
Obviously...
user=> (= (byte 1) (short 1) (long 1) 1)
true
user=>
http://clojure.org/rationale
Language as platform vs. language + platform
- Old way - each language defines its own runtime
GC, bytecode, type system, libraries etc
- New way (JVM, .Net)
- Common runtime independent o
On Friday, January 23, 2015 at 3:13:08 PM UTC-5, Tassilo Horn wrote:
>
> philli...@newcastle.ac.uk (Phillip Lord) writes:
>
> >> I use satisfies? for optional features, e.g., if some data structure
> >> satisfies some protocol, then that optional feature is enabled, else
> >> it's disabled. Bu
And this is not a typeless language, it is a strongly dynamically typed
language.
--
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
On Friday, January 23, 2015 at 1:27:18 PM UTC-5, Luc wrote:
>
> Danger vs flexibility.
>
> < or > are safe. Should they throw an exception then ?
>
> Compiler in some older typed languages would warn you about testing
> equality between two float numbers irrelevant of their types but would be
>
phillip.l...@newcastle.ac.uk (Phillip Lord) writes:
>> I use satisfies? for optional features, e.g., if some data structure
>> satisfies some protocol, then that optional feature is enabled, else
>> it's disabled. But that's not really on a hot path so I don't care
>> much about satisfies? perfor
Danger vs flexibility.
< or > are safe. Should they throw an exception then ?
Compiler in some older typed languages would warn you about testing equality
between two float numbers irrelevant of their types but would be silent about
other operators.
Testing equality with floats is seldom used
If the underlying argument is that it is horribly dangerous to mix floats
and doubles in your code, then maybe (<= (float 1.5) (double 1.5)) should
have the semantics of (.compareTo (float 1.5) (double 1.5)), i.e., throw an
error.
I'm not certain that's a good idea for Clojure, but it does seem li
On Jan 23, 2015, at 11:51 AM, Andy Fingerhut wrote:
> Hash consistency is certainly nice, but if Clojure were changed such that (=
> float-val double-val) were always false, and no other changes were made, it
> would lead to this situation:
>
> user=> (<= (float 1.5) (double 1.5))
> true
> user
Not sure which properties you prefer to be true in programming languages
you use. Hash consistency is certainly nice, but if Clojure were changed
such that (= float-val double-val) were always false, and no other changes
were made, it would lead to this situation:
user=> (<= (float 1.5) (double 1
Looks awesome! I’m currently using prismatic/schema for what seems like exactly
the same thing; could you enlighten me how the two libraries are different?
thanks
lvh
> On Jan 23, 2015, at 3:39 AM, Leonardo Borges
> wrote:
>
> bouncer is a validation library for Clojure apps
>
> Github: ht
Hi everyone,
Zensight is an all-Clojure/ClojureScript startup in Cambridge, MA, and
we're hiring full-stack engineers. We're solving some interesting data
processing, machine learning, and information retrieval problems, as part
of a product to help sales people be more effective at communicati
On Jan 23, 2015, at 8:23 AM, Andy Fingerhut wrote:
> You can try creating a JIRA ticket suggesting that Clojure's = should return
> false when comparing floats and doubles to each other.
CLJ-1649, for anyone interested.
--
You received this message because you are subscribed to the Google
Grou
Great library! I don't know about it! Thanks!
2015-01-23 15:54 GMT+01:00 Plínio Balduino :
> This is awesome, Leonardo
>
> On Fri, Jan 23, 2015 at 9:39 AM, Leonardo Borges <
> leonardoborges...@gmail.com> wrote:
>
>> bouncer is a validation library for Clojure apps
>>
>> Github: https://github.co
This is awesome, Leonardo
On Fri, Jan 23, 2015 at 9:39 AM, Leonardo Borges <
leonardoborges...@gmail.com> wrote:
> bouncer is a validation library for Clojure apps
>
> Github: https://github.com/leonardoborges/bouncer
> Clojars: https://clojars.org/bouncer
>
> The main change with 0.3.2 is that b
Michael:
You can try creating a JIRA ticket suggesting that Clojure's = should
return false when comparing floats and doubles to each other. I have no
idea if it would go anywhere, but alternative (2) trying to get hashes to
be equal between = float/doubles has been suggested and declined. Witho
I'm sure we are all aware of the various issues with floating point math
(particularly equality comparisons); however none of that is relevant to this
discussion. The only issue here is an inconsistency between hashing and
equality testing in Clojure.
My claim is that the property "any two obje
public class TestClass {
public static void equality () {
double dd = 3.5;
float ff = 3.5f;
System.out.println(String.format("dd vs ff == %b", dd==ff));
double dd2 = 3.2;
float ff2 =
bouncer is a validation library for Clojure apps
Github: https://github.com/leonardoborges/bouncer
Clojars: https://clojars.org/bouncer
The main change with 0.3.2 is that bouncer now works with Clojurescript! -
thanks Robin(@Skinney)!
New validators have also been added. You can read more about
Well if it breaks elsewhere than in your code because you mix representations
and leak
them to some library in Java that you do not control I see my comments as
absolutely relevant.
It's not technical, it's failsafe. But that might not be of any interest to
your problem scope.
However it does i
Tassilo Horn writes:
>> I don't think satisfies? is worth optimizing as using ton of it seems
>> antithetical to protocols. It signals to me that a caller does in fact
>> care about the implementation, whereas protocols are about not
>> caring. Like your PR, if you want to ensure a protocol's cove
If there's a technical reason why Clojure can't return false for all =
comparisons between floats and doubles, I'd like to hear it. Otherwise, I don't
see how your response is relevant.
> On Jan 23, 2015, at 3:10 AM, Luc Prefontaine
> wrote:
>
> Agree, it's broken... in java...
> Has it has b
On Fri, Jan 23, 2015 at 1:10 AM, Luc Prefontaine <
lprefonta...@softaddicts.ca> wrote:
> Agree, it's broken... in java...
>
I think it's more frustrating in Clojure than in Java, though, because in
Java you have those big, ugly type annotations on every single variable,
input and output, so there
Agree, it's broken... in java...
Has it has been broken in the past in several architectures...
I understand your frustration but this is not something new. It's been a
problem for at least 30 years.
It is kind of a basic programming issue:
- Never compare floats with different representations.
On Jan 23, 2015, at 1:33 AM, Immo Heikkinen wrote:
>
> I actually ran into this while comparing nested data structures from two
> different sources and spent a good part of my day figuring out what's
> happening. While it is a good advice to avoid mixing floats and doubles, it
> is inevitable
28 matches
Mail list logo