This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-09-07
Channels
- # announcements (2)
- # babashka (24)
- # beginners (15)
- # calva (27)
- # clara (3)
- # clj-kondo (6)
- # cljs-dev (2)
- # clojure (83)
- # clojure-dev (35)
- # clojure-europe (82)
- # clojure-germany (2)
- # clojure-greece (1)
- # clojure-nl (5)
- # clojure-spec (52)
- # clojure-uk (14)
- # clojurescript (43)
- # conjure (16)
- # cursive (29)
- # data-science (1)
- # datalog (5)
- # datomic (1)
- # deps-new (8)
- # depstar (4)
- # emacs (6)
- # events (1)
- # fulcro (24)
- # jobs (4)
- # malli (12)
- # off-topic (46)
- # rewrite-clj (14)
- # shadow-cljs (53)
- # spacemacs (8)
- # specter (2)
- # sql (21)
- # tools-deps (62)
- # vrac (1)
- # xtdb (2)
Good morning!
morning
if max returns "the greatest of the nums"
(max 42 43)
=> 43
is this a bug?42 is the greatest of all. File a bug report.
Not quite understanding if this is a joke or not, but on a related issue
user=> (Math/abs -7)
7
user=> (= (Math/abs -7) -7)
false
user=> Integer/MIN_VALUE
-2147483648
user=> (= (Math/abs Integer/MIN_VALUE) Integer/MIN_VALUE)
true
user=> WTF??
Syntax error compiling at (REPL:0:0).
Unable to resolve symbol: WTF?? in this context
user=>
@slipset yes, it's a joke
I like that (REPL:0:0)
has wow! eyes
Java docs for abs
say "Note that if the argument is equal to the value of `Integer.MIN_VALUE`, the most negative representable `int` value, the result is that same value, which is negative."
so not all Java programmers have great abs ... another joke there, cos abs is also a six pack (muscles not beer) thing
Now, since -
is a function in Clojure, and functions in Clojure implement the Comparator interface, you can
(sort-by - [3 4 1 2])
And the reason for that is here https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/AFunction.java#L61
@slipset what about Long/compare
?
The point was not really how to sort numbers, but the fact that the approach with -
works for some numbers but not for all numbers
(and you could argue that I should know that not all numbers are equal (in some sense) when it comes to programming)
what is your point? 😝
maybe it is this: edge cases abound
I guess that yes, edge cases, and stuff that does the wrong thing instead of failing miserably.
@borkdude OT is what this channel is for 😉 https://clojurians.slack.com/archives/C6QH853H8/p1599493444012700
I fear what github has done to remembering how we got the freedom to change the software we use
I think Canonical has won in that more people are using Ubuntu. I think Microsoft has won by winning over Mac people from expensive hardware to a dev setup that works equally well.
there is value in expressing yourself clearly
far too much time is wasted by people not telling you what they really think
although he does seem to take this a bit too far
Linus has actually been abusive (more than abrasive) many times, and has at least admitted it.
Some of the rants are a little out of context. He's pretty articulate in his insults, but they were directed at people who should know better, people familiar with him.
I think many of them have been a bit of a boil over for him, after saying "no we won't do that" repeatedly to someone and yet still receiving patches. (I'm certain there's a counterexample to this - but it's my recollection from when I looked into it).
there a a problem with writing that kind of thing down
> Taken out of context
is a feature of writing the written word
Finland is known for being public about things I guess, maybe it's a cultural thing.
oh I thought he was Finnish
known for its long dark nights
Ah, I'm not totally crazy. He's a Swedo-Finnish https://en.wikipedia.org/wiki/Nils_Torvalds
I knew one of those from playing games online together, they considered themselves very swedish.
Linus has admitted he's had a problem in the past: https://lkml.org/lkml/2018/9/16/167
Sure, not denying that either. I just don't think there's any risk to new contributors.
If anything, there's more risk to them on GitHub with the poor patch practices encouraged by GitHub (long messages, no hard breaks, etc.)
I thought it was because GitHub extinguished the distributed nature of Git, and then was confused that people didn't want to move over...
after his rant, drew wrote an actually interesting article about distribution for linux dev: https://drewdevault.com/2020/09/02/Linux-development-is-profoundly-distributed.html
I pay for sourcehut, don’t use it but I do pay for it