This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-08-09
Channels
- # admin-announcements (5)
- # architecture (8)
- # beginners (7)
- # boot (41)
- # braveandtrue (1)
- # cider (77)
- # clara (3)
- # cljs-dev (56)
- # cljsjs (7)
- # cljsrn (7)
- # clojure (44)
- # clojure-austin (3)
- # clojure-brasil (1)
- # clojure-hk (3)
- # clojure-russia (137)
- # clojure-spec (14)
- # clojure-uk (44)
- # clojurescript (33)
- # cloverage (3)
- # core-async (10)
- # css (1)
- # cursive (16)
- # datomic (116)
- # devcards (14)
- # emacs (1)
- # events (1)
- # funcool (2)
- # functionalprogramming (1)
- # hammock-driven-dev (1)
- # jobs-rus (124)
- # lein-figwheel (1)
- # leiningen (1)
- # liberator (4)
- # melbourne (3)
- # mount (73)
- # off-topic (3)
- # om (4)
- # om-next (15)
- # onyx (38)
- # other-languages (4)
- # perun (2)
- # proton (36)
- # protorepl (2)
- # random (1)
- # re-frame (56)
- # reagent (7)
- # specter (4)
- # testing (1)
- # untangled (13)
- # yada (18)
@gfredericks: You are the man for doing this - https://github.com/google/closure-library/pull/741
@xcthulhu: I can't resist a good arithmetic bug
Okay I'm going to have to try to fix one now too. Google Closure doesn't handle UTF-8 properly, so every time I've tried to use it for taking SHA256 of unicode it's been borked.
Also I was curious how to speed up division, the way GMP does it is by divide and conquer reducing the problem to Möller-Granlund division: https://github.com/SaberMod/gnu-gmp/blob/faf7424576910eca222b0ddaea6bbe490e10e70e/mpn/generic/dcpi1_div_qr.c
(s/def ::basically-an-integer
(s/or :exact integer?
:inexact #(and (number? %)
(zero? (- (int %) %)))))
(s/def ::basically-a-positive-integer
(s/and ::basically-an-integer pos?))
user> (s/conform ::basically-an-integer 1.0)
;; => [:inexact 1.0]
user> (s/conform ::basically-a-positive-integer 1.0)
;; => ClassCastException [trace missing]
running into this error, I realize it’s because s/and
passes along the conformed value. is there an alternative to s/or
or s/and
that doesn’t add/pass along conformed information? would rather not have to think about the conformed value of the earlier spec when the spec essentially means “it’s safe to call pos? on it"@alexmiller: realizing that there hasn't been an alpha release in nearly a month makes me wonder: would you say that spec has pretty much stabilized at this point? Not that I'm requesting any sort of commitment to that, of course; just curious what your sense is.
Rich has just been busy/ooo
We have a ton of stuff queued up :)
@calvis Rich has suggested having both a flowing and non-flowing version of and
and I think it’s likely that will eventually happen (probably and->
for flowing and and
for non-flowing, although that changes the current meaning of and
)
@alexmiller: yeah, that would be helpful. can’t really keep track which of my specs are or’s and which aren't
one option here is to use s/conformer
in ::basically-a-positive-integer
to unwrap
(s/def ::basically-a-positive-integer (s/and ::basically-an-integer (s/conformer val) pos?))