Re: [ANN] Clojure 1.9.0-RC1
Correction - it's not about regex parsing. I removed reflection calls for StringBuilder and now it seems to be on par in speed. On Fri, Nov 24, 2017 at 1:20 AM, Sergey Didenko wrote: > Hi, > > is it expected that code which does a lot of regex parsing is ~14% slower > than it was under Clojure 1.8? > > On Tue, Nov 14, 2017 at 8:22 AM, Shantanu Kumar > wrote: > >> Sorry, my bad. I can see the same behavior in previous Clojure versions >> too. I discovered this in the middle of moving to 1.9.0-RC1 in one of >> the projects and somehow got it all mixed up. >> >> >> Shantanu >> >> On Tuesday, 14 November 2017 11:36:30 UTC+5:30, Andy Fingerhut wrote: >>> >>> I see the same behavior in Clojure 1.7.0 and 1.8.0 as you see in >>> 1.9.0-RC1. >>> >>> Andy >>> >>> On Mon, Nov 13, 2017 at 9:48 PM, Shantanu Kumar >>> wrote: >>> Sorry, I did not specify the problem completely earlier. The coercion fails only when *uncheked-math* is set to truthy in 1.9.0-RC1. user=> (byte \a) 97 user=> (set! *unchecked-math* true) ; or :warn-on-boxed true user=> (byte \a) ClassCastException java.lang.Character cannot be cast to java.lang.Number clojure.lang.RT.uncheckedByteCast (RT.java:1376) Shantanu On Tuesday, 14 November 2017 01:27:36 UTC+5:30, Alex Miller wrote: > > Works for me in 1.9.0-RC1. I don't know of anything that changed in > this area. > > Clojure 1.9.0-RC1 > user=> (byte \a) > 97 > > On Mon, Nov 13, 2017 at 1:09 PM, Shantanu Kumar > wrote: > >> The coercion (byte \a) works fine in Clojure 1.8, but it fails with >> `ClassCastException java.lang.Character cannot be cast to >> java.lang.Number` >> in 1.9.0-RC1. Is this by design? >> >> >> Shantanu >> >> -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clo...@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+u...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+u...@googlegroups.com. For more options, visit https://groups.google.com/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: [ANN] Clojure 1.9.0-RC1
Hi, is it expected that code which does a lot of regex parsing is ~14% slower than it was under Clojure 1.8? On Tue, Nov 14, 2017 at 8:22 AM, Shantanu Kumar wrote: > Sorry, my bad. I can see the same behavior in previous Clojure versions > too. I discovered this in the middle of moving to 1.9.0-RC1 in one of > the projects and somehow got it all mixed up. > > > Shantanu > > On Tuesday, 14 November 2017 11:36:30 UTC+5:30, Andy Fingerhut wrote: >> >> I see the same behavior in Clojure 1.7.0 and 1.8.0 as you see in >> 1.9.0-RC1. >> >> Andy >> >> On Mon, Nov 13, 2017 at 9:48 PM, Shantanu Kumar >> wrote: >> >>> Sorry, I did not specify the problem completely earlier. The coercion >>> fails only when *uncheked-math* is set to truthy in 1.9.0-RC1. >>> >>> user=> (byte \a) >>> 97 >>> user=> (set! *unchecked-math* true) ; or :warn-on-boxed >>> true >>> user=> (byte \a) >>> >>> ClassCastException java.lang.Character cannot be cast to >>> java.lang.Number clojure.lang.RT.uncheckedByteCast (RT.java:1376) >>> >>> >>> Shantanu >>> >>> On Tuesday, 14 November 2017 01:27:36 UTC+5:30, Alex Miller wrote: Works for me in 1.9.0-RC1. I don't know of anything that changed in this area. Clojure 1.9.0-RC1 user=> (byte \a) 97 On Mon, Nov 13, 2017 at 1:09 PM, Shantanu Kumar wrote: > The coercion (byte \a) works fine in Clojure 1.8, but it fails with > `ClassCastException java.lang.Character cannot be cast to > java.lang.Number` > in 1.9.0-RC1. Is this by design? > > > Shantanu > > -- >>> You received this message because you are subscribed to the Google >>> Groups "Clojure" group. >>> To post to this group, send email to clo...@googlegroups.com >>> Note that posts from new members are moderated - please be patient with >>> your first post. >>> To unsubscribe from this group, send email to >>> clojure+u...@googlegroups.com >>> For more options, visit this group at >>> http://groups.google.com/group/clojure?hl=en >>> --- >>> You received this message because you are subscribed to the Google >>> Groups "Clojure" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to clojure+u...@googlegroups.com. >>> For more options, visit https://groups.google.com/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: [core.spec] Stricter map validations?
Hello everyone, On Thursday, 16 November 2017 23:29:56 UTC+1, John Newman wrote: > > [...] when we constrain maps in that closed way, aren't we creating some > new subtype of a map, with fundamentally different semantics? If you are > going to fully close a map, you might as well use a deftype and make a > custom object and not call it a map, right? > Just to add my two cents, I've been following the discussion and this has been my thinking for quite some time. Is it not a valid argument? Having a validation mechanism pick only certain keys, or ensuring that keys in a map are specced, look as trivial to me than other data wrangling we do in Clojure. My (preliminary) conclusion in cases like this is to build validation tooling around spec, instead of using it directly. -- 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.