This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-08-16
Channels
- # admin-announcements (2)
- # bangalore-clj (3)
- # beginners (15)
- # boot (303)
- # carry (18)
- # cider (7)
- # cljs-dev (222)
- # cljsrn (103)
- # clojure (196)
- # clojure-czech (2)
- # clojure-russia (69)
- # clojure-spec (21)
- # clojure-uk (48)
- # clojurescript (68)
- # cursive (18)
- # datomic (185)
- # events (1)
- # hoplon (2)
- # lambdaisland (1)
- # leiningen (1)
- # mount (10)
- # off-topic (1)
- # om (14)
- # onyx (154)
- # parinfer (1)
- # pedestal (3)
- # planck (5)
- # protorepl (9)
- # re-frame (17)
- # reagent (27)
- # ring (2)
- # specter (58)
- # test-check (1)
- # testing (7)
- # untangled (59)
- # yada (35)
@seancorfield: besides being new to Clojure, I'm also new to Slack. So when you said you added an example, I didn't know where to look for it. Now I know...😁 Hopefully the jdbc documentation can be updated soon.
@saicheong: I updated the readme in the java.jdbc repo yesterday (and fixed the postgres
/ postgresql
alias bug that confused both me and @josh_tackett — although that won’t be available until I release 0.6.2 Alpha 3 or whatever I call the next version). I’ll try to find time this week to update the http://clojure-doc.org documentation for java.jdbc (and then bug the maintainer to publish a new version of the site to include those changes).
Hi Everybody! I have this code:
(def c [0.0 0.18 0.36 0.54 0.72])
(partition 2 1 c)
=> ((0.0 0.18) (0.18 0.36) (0.36 0.54) (0.54 0.72))
(map #(- (second %) (first %)) (partition 2 1 c))
=> (0.18 0.18 0.18000000000000005 0.17999999999999994)
@mi-mina: this is not Clojure-specific; there is no exact representation of decimal numbers such as 0.18 as floats or doubles
but in general floating point math sucks and you shouldn’t use it if you require any semblance of precision
the real question is, does your problem depend on those numbers being precise, or do you just want to round those numbers up?
(btw this is why Clojure has Ratios)