Good morning
Morning
Morning
Good morning!
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=>
morning
@raymcdermott I presume you know where your towel is?
morning
@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
This reminds me of another fun thing I discovered some time back
So a comparator is basically a thing that returns positive, 0, negative
So a trick one could use is that -
is a nice comparator for numbers.
Now, since -
is a function in Clojure, and functions in Clojure implement the Comparator interface, you can
(sort-by - [3 4 1 2])
Which works great until you hit numbers that are greater than Integer/MAX_VALUE
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
What? I have to have a point?
I guess that yes, edge cases, and stuff that does the wrong thing instead of failing miserably.
I much prefer stuff that does the right thing and fails miserably
@borkdude OT is what this channel is for 😉 https://clojurians.slack.com/archives/C6QH853H8/p1599493444012700
I love it that this channel is really off topic since it's not called #off-topic :)
but then we'd be on topic
wait
🤯
oh, I see what you did there
exactly
I hated trying to use some emacs things on windows
tho at least JDEE worked
tramp wouldn't tho for some reason to do w/a lack of pipes
@otfrom I've been experimenting with that too. I run emacs in WSL2
how has it been going?
do pipes work?
Everything works in WSL2, since it's real linux
I'll be giving a small presentation at wslconf.dev this week
woah, crazy 😄
That there's a whole conf for WSL, that is.
has linux won? or is this just more embrace, extend, extinguish?
Conspiracy theory: Yeah, M$ are definitely aiming for extinguish right now.
I fear what github has done to remembering how we got the freedom to change the software we use
@dominicm they are certainly in the embrace phase
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.
@otfrom You're right. 😄
They're trying to get Linux to transition from mailing lists to GitHub atm.
apparently emojified emails are the reason people won't step up to be maintainers
😂
not b/c Linus is a git
I thought it was because GitHub extinguished the distributed nature of Git, and then was confused that people didn't want to move over...
They now have a backup in the arctic, so what could go wrong?
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
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.
It is possible to be honest and kind
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
I think he is.
I don't know why I said that 😄
known for its long dark nights
Hum, Finnish american.
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
I can go digging for the people he's alienated from lkml
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 think github would be a bad idea
I pay for sourcehut, don’t use it but I do pay for it