This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-06-03
Channels
- # announcements (12)
- # beginners (44)
- # boot (27)
- # calva (73)
- # cider (1)
- # clj-kondo (9)
- # cljdoc (9)
- # cljs-dev (15)
- # cljsrn (6)
- # clojure (90)
- # clojure-dev (5)
- # clojure-europe (4)
- # clojure-ireland (3)
- # clojure-italy (22)
- # clojure-mexico (2)
- # clojure-nl (8)
- # clojure-uk (32)
- # clojurescript (12)
- # core-async (2)
- # cursive (16)
- # data-science (10)
- # datascript (3)
- # datomic (44)
- # emacs (17)
- # events (4)
- # graalvm (1)
- # hoplon (5)
- # jackdaw (17)
- # keechma (11)
- # nrepl (7)
- # off-topic (24)
- # re-frame (19)
- # reitit (4)
- # rewrite-clj (2)
- # robots (9)
- # shadow-cljs (20)
- # sql (12)
- # testing (4)
- # tools-deps (23)
- # vim (55)
Wait, JavaScript has the idea of minus zero?! Is there some mathematical basis for that?
Yes there are two floating point zeros.
It’s in the standard AFAIK, not just in JS.
numeric representations don't have to be unique. seems like js treats them as unified?
I think === fails though.
The problem with float
or double
is they underflow towards zero when you make numbers too small.
i don't see how that's relevant. there's lots of strange things with float or double.
Good spot.
According to https://stackoverflow.com/questions/7223359/are-0-and-0-the-same it’s so you may have 1/-0 = -INF, 1/0 = INF if your float implementation supports that.
It was http://Object.is that fails (or succeeds), I’d forgotten which.
digging into a medium-sizeed plain JS React app created by someone who's not so strong on app architecture, and I 💯 understand why people clamor about typescript
i understood that there was no typescript
I can see how having a compiler track the data contracts would ameliorate some of the pain of making changes
This is how I feel. If I’m going to work with poorly designed systems, I want types to make it more tractable for me.
right. it's unfortunate that you eventually run up on: "I would like to design this better, but my type system won't let me"
medium sized plain js <anything> app are loads of fun if fundamentals are missing or wrong 🙂
right. it's unfortunate that you eventually run up on: "I would like to design this better, but my type system won't let me"
but in leu of good design, maybe having a tool that helps manage it is better? It's kind of a conundrum
One of my first tasks at my current job was overhauling the major sections of the app to TS. It was like cleaning out a junk drawer - the types turned up so much redundant and sometimes just wrong code. It was an extremely helpful exercise for me to understand the code base.