This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-04-25
Channels
- # architecture (4)
- # bangalore-clj (3)
- # beginners (11)
- # chestnut (1)
- # cider (24)
- # cljs-dev (14)
- # clojure (97)
- # clojure-finland (1)
- # clojure-gamedev (19)
- # clojure-italy (11)
- # clojure-nl (31)
- # clojure-norway (1)
- # clojure-uk (52)
- # clojurescript (71)
- # core-async (4)
- # cursive (60)
- # datascript (8)
- # datomic (115)
- # emacs (29)
- # figwheel (11)
- # fulcro (3)
- # garden (1)
- # hoplon (1)
- # lein-figwheel (1)
- # leiningen (7)
- # luminus (13)
- # mount (1)
- # off-topic (51)
- # onyx (31)
- # pedestal (2)
- # portkey (1)
- # re-frame (22)
- # reagent (22)
- # reitit (6)
- # remote-jobs (1)
- # schema (1)
- # shadow-cljs (73)
- # specter (2)
- # sql (1)
- # unrepl (3)
- # vim (11)
- # yada (4)
Morning đ
mÄnmÄn
greetings!
ah there was a clj meetup? If I'd known I might have stuck around after das kafka
(morning)
Another Clojure related question. How do people best deal with numerical precision? As an example of what I mean...
user=> (- 0.121 0.2)
-0.07900000000000001
@yogidevbear big decimal
I want "exactitude" đ Hoping to have (- 0.121 0.2)
return -0.079
for example
Like so @dominicm?
user=> (- (bigdec 0.121) (bigdec 0.2))
-0.079M
@yogidevbear there's a shorthand too ^^
you just have to watch out for division with big decimals IIRC
eg. (/ 1M 3M) => ArithmeticException Non-terminating decimal expansion; no exact representable decimal result.
vs. (.divide 1M 3M MathContext/DECIMAL64) => 0.3333333333333333M
Thanks for the heads-up @peterwestmacott :+1. For my use case I'm looking purely at addition/subtraction đ
Oh damn, I should have gone to the clj meetup while I was here. Didn't notice in time đ
Has anyone purchased/read Alex et. al.'s Programming Clojure 3rd ed. book? https://www.amazon.co.uk/gp/product/1680502468/
One of the graduates at work is reading this book as one of several ways to get comfortable with Clojure. They are enjoying the book. I've done several Clojure workshops with them and we've pair programmed with them. The book gives a nice background to all this and has some useful example code
Awesome, thanks for the feedback @U05254DQM đ
I think that one of my colleagues has.
qq. what versions of Java are people on?
@peterwestmacott I updated to 9 for a while, but ran into some issues with clojure lib dependencies so reverted back to 8
I was on 8, but apparently I need >=9 for the latest nashorn to run my cljs tests
Oracle donât want you to download 9, they want you to download 10
10 seems to throw ClassNotFoundExceptionâs trying to load clojure
I think maybe Iâm best sticking with 8 then for now - but it means holding at reagent â0.7.0â
so data science notebooks are just emacs org mode?
do you mind me asking how you run your cljs unit tests?
we've got some cljs tests running with phantom and boot-cljs-test
other tests are for re-frame things which are written in .cljc and run under .clj with https://github.com/Day8/re-frame-test
Do you trust CLJS tests to be run as CLJ?
the only place where we've had problems is regex - regex related tests are all in phantom+cljs
I had been wondering about running my cljs unit tests in the browser (eg. a test page), as it seems most representative of how the code will actually be run (and Iâm already using selenium for UI acceptance tests) - but then I have to deploy it first before I can run those, so time-to-feedback is increasedâŠ
if you are running UI tests then that might be a good idea - we skip UI tests altogether, and mostly only run event logic and subscription logic tests under clj and cljs specific tests under phantom. phantom seems quite close to our deployment platforms (which are mostly webkit based)
I donât particularly need â0.7.0â - but I try to keep my deps up to date so I donât have panic/pain when I need to upgrade something
the other option here is for me to ditch nashorn
obviously I think so, but then I'm a Church of Emacs zealot. đ