clojure-europe

For people in Europe... or elsewhere... UGT https://indieweb.org/Universal_Greeting_Time
kardan 2020-09-07T04:27:17.178200Z

Good morning

synthomat 2020-09-07T05:21:14.178500Z

Morning

2020-09-07T06:02:37.178700Z

Morning

ordnungswidrig 2020-09-07T07:28:40.179Z

Good morning!

slipset 2020-09-07T07:29:19.179200Z

morning

raymcdermott 2020-09-07T08:09:42.179400Z

morning

raymcdermott 2020-09-07T08:12:10.180200Z

if max returns "the greatest of the nums"

(max 42 43)
=> 43
is this a bug?

2020-09-12T07:26:11.271500Z

42 is the greatest of all. File a bug report.

slipset 2020-09-07T08:16:25.180900Z

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=>

2020-09-07T08:17:00.181100Z

morning

2020-09-07T08:17:48.181400Z

@raymcdermott I presume you know where your towel is?

2👽
thomas 2020-09-07T08:31:51.181600Z

morning

raymcdermott 2020-09-07T08:38:34.182100Z

@slipset yes, it's a joke

raymcdermott 2020-09-07T08:39:27.182600Z

I like that (REPL:0:0)has wow! eyes

raymcdermott 2020-09-07T08:45:23.183Z

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."

raymcdermott 2020-09-07T08:47:21.184700Z

so not all Java programmers have great abs ... another joke there, cos abs is also a six pack (muscles not beer) thing

slipset 2020-09-07T08:53:10.185Z

This reminds me of another fun thing I discovered some time back

slipset 2020-09-07T08:53:47.185600Z

So a comparator is basically a thing that returns positive, 0, negative

slipset 2020-09-07T08:54:24.186400Z

So a trick one could use is that - is a nice comparator for numbers.

slipset 2020-09-07T08:57:25.187800Z

Now, since - is a function in Clojure, and functions in Clojure implement the Comparator interface, you can (sort-by - [3 4 1 2])

slipset 2020-09-07T08:57:50.188400Z

Which works great until you hit numbers that are greater than Integer/MAX_VALUE

slipset 2020-09-07T08:59:36.188700Z

And the reason for that is here https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/AFunction.java#L61

ordnungswidrig 2020-09-07T09:32:46.189100Z

@slipset what about Long/compare?

slipset 2020-09-07T09:46:40.190700Z

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)

raymcdermott 2020-09-07T12:10:59.191500Z

what is your point? 😝

raymcdermott 2020-09-07T12:11:59.192100Z

maybe it is this: edge cases abound

slipset 2020-09-07T13:22:13.192300Z

What? I have to have a point?

2😂
slipset 2020-09-07T13:23:14.193Z

I guess that yes, edge cases, and stuff that does the wrong thing instead of failing miserably.

raymcdermott 2020-09-07T13:42:52.195900Z

I much prefer stuff that does the right thing and fails miserably

1🤯
2020-09-07T15:59:52.196400Z

@borkdude OT is what this channel is for 😉 https://clojurians.slack.com/archives/C6QH853H8/p1599493444012700

borkdude 2020-09-07T16:00:55.197Z

I love it that this channel is really off topic since it's not called #off-topic :)

2020-09-07T16:01:13.197200Z

but then we'd be on topic

2020-09-07T16:01:16.197400Z

wait

borkdude 2020-09-07T16:01:26.197800Z

🤯

2020-09-07T16:01:29.197900Z

oh, I see what you did there

2020-09-07T16:01:32.198100Z

exactly

2020-09-07T16:02:03.198400Z

I hated trying to use some emacs things on windows

2020-09-07T16:02:08.198600Z

tho at least JDEE worked

2020-09-07T16:02:24.199100Z

tramp wouldn't tho for some reason to do w/a lack of pipes

borkdude 2020-09-07T16:02:26.199200Z

@otfrom I've been experimenting with that too. I run emacs in WSL2

2020-09-07T16:02:50.199400Z

how has it been going?

2020-09-07T16:02:57.199700Z

do pipes work?

borkdude 2020-09-07T16:03:08.200300Z

Everything works in WSL2, since it's real linux

borkdude 2020-09-07T16:03:44.200600Z

I'll be giving a small presentation at wslconf.dev this week

1👍
dominicm 2020-09-07T16:03:55.200800Z

woah, crazy 😄

dominicm 2020-09-07T16:04:04.201300Z

That there's a whole conf for WSL, that is.

2020-09-07T16:04:11.201500Z

has linux won? or is this just more embrace, extend, extinguish?

dominicm 2020-09-07T16:04:36.202900Z

Conspiracy theory: Yeah, M$ are definitely aiming for extinguish right now.

2020-09-07T16:04:37.203Z

I fear what github has done to remembering how we got the freedom to change the software we use

2020-09-07T16:04:51.203500Z

@dominicm they are certainly in the embrace phase

borkdude 2020-09-07T16:05:01.203900Z

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.

dominicm 2020-09-07T16:05:39.204600Z

@otfrom You're right. 😄

dominicm 2020-09-07T16:05:52.205Z

They're trying to get Linux to transition from mailing lists to GitHub atm.

2020-09-07T16:06:15.205400Z

apparently emojified emails are the reason people won't step up to be maintainers

1😂
dominicm 2020-09-07T16:06:23.205800Z

😂

2020-09-07T16:06:24.205900Z

not b/c Linus is a git

dominicm 2020-09-07T16:06:56.206500Z

I thought it was because GitHub extinguished the distributed nature of Git, and then was confused that people didn't want to move over...

borkdude 2020-09-07T16:07:25.206800Z

They now have a backup in the arctic, so what could go wrong?

dominicm 2020-09-07T16:10:19.207600Z

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

2020-09-07T16:11:40.207700Z

there is value in expressing yourself clearly

2020-09-07T16:12:04.208Z

far too much time is wasted by people not telling you what they really think

2020-09-07T16:12:23.208500Z

although he does seem to take this a bit too far

2020-09-07T16:12:44.208900Z

Linus has actually been abusive (more than abrasive) many times, and has at least admitted it.

2020-09-07T16:12:54.209100Z

It is possible to be honest and kind

dominicm 2020-09-07T16:13:10.209300Z

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.

dominicm 2020-09-07T16:13:55.209500Z

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).

2020-09-07T16:14:05.209700Z

there a a problem with writing that kind of thing down

2020-09-07T16:14:26.209900Z

> Taken out of context is a feature of writing the written word

dominicm 2020-09-07T16:14:39.210200Z

Finland is known for being public about things I guess, maybe it's a cultural thing.

2020-09-07T16:14:52.210400Z

oh I thought he was Finnish

dominicm 2020-09-07T16:15:12.210600Z

I think he is.

dominicm 2020-09-07T16:15:16.210800Z

I don't know why I said that 😄

2020-09-07T16:15:31.211Z

known for its long dark nights

dominicm 2020-09-07T16:15:31.211200Z

Hum, Finnish american.

dominicm 2020-09-07T16:16:50.211600Z

Ah, I'm not totally crazy. He's a Swedo-Finnish https://en.wikipedia.org/wiki/Nils_Torvalds

dominicm 2020-09-07T16:17:16.211900Z

I knew one of those from playing games online together, they considered themselves very swedish.

2020-09-07T16:17:40.212100Z

Linus has admitted he's had a problem in the past: https://lkml.org/lkml/2018/9/16/167

2020-09-07T16:17:54.212300Z

I can go digging for the people he's alienated from lkml

dominicm 2020-09-07T16:18:41.212500Z

Sure, not denying that either. I just don't think there's any risk to new contributors.

dominicm 2020-09-07T16:19:04.212700Z

If anything, there's more risk to them on GitHub with the poor patch practices encouraged by GitHub (long messages, no hard breaks, etc.)

2020-09-07T16:20:09.212900Z

I think github would be a bad idea

raymcdermott 2020-09-07T18:52:25.214100Z

I pay for sourcehut, don’t use it but I do pay for it