clojure-europe

For people in Europe... or elsewhere... UGT https://indieweb.org/Universal_Greeting_Time
plexus 2020-10-14T04:41:46.420100Z

Morning!

plexus 2020-10-14T04:42:36.420600Z

Where my Belgians at (if you can read this you are now an honorary Belgian) https://twitter.com/drGerlant/status/1315997215152799747

plexus 2020-10-14T07:23:04.432400Z

yeah it does bother me that this is dutch/french/english, while official languages in Belgium are dutch/french/german, but to be fair most belgians understand English, most don't understand German

thomas 2020-10-14T10:51:45.442700Z

I don't really speak any French, but I can read this with out too many problems

plexus 2020-10-14T12:45:45.444Z

It's all Indo-European to me

raymcdermott 2020-10-14T15:07:57.459500Z

glad I passed the informal test, especially since I am now a citizen 🙂

2020-10-14T06:03:39.421500Z

I think I might be 1/3 Belgian 😉

1
😁 2
2020-10-14T06:03:43.421700Z

Morning

slipset 2020-10-14T06:15:11.428800Z

Did some maths with one of my ten year olds this morning, as one does. Anyways, we ended up in some term rewriting. Like 2 + 3 is just 1 + 1 + 1 + 1 + 1. In order to do this, you need (AFAICT) three things. You need to be able to add one, subtract one, and check if something is zero. Which leads me to Clojure. I’ve sometimes wondered why we have inc, dec, and zero? And I guess a reason for this is that these are the three building blocks for arithmetic. And good morning!

ordnungswidrig 2020-10-14T06:23:04.428900Z

I must confess that I realized only until miday that this was actual multiple languages. And I don’t even speek dutch(?). Lol. I was missing some german sprinkled in though. Awesome text.

ordnungswidrig 2020-10-14T06:24:46.430600Z

@slipset you don’t even need subtraction, just the concept of peno numbers: 2 + 3 = S(S(0)) + S(S(S(0))) = S(0) + S(S(S(S(0)))) = 0 + S(S(S(S(S(0))))) = S(S(S(S(S(0))))) = 5

ordnungswidrig 2020-10-14T06:25:23.431100Z

Based on S(a) + S(b) = a + S(S(b))

ordnungswidrig 2020-10-14T06:25:26.431300Z

See https://wiki.haskell.org/Peano_numbers

slipset 2020-10-14T06:34:29.431800Z

Ah, nice! I'll have to introduce her to Peano numbers next time we do maths 🙂

2020-10-14T06:56:55.432Z

Bonjour !

agigao 2020-10-14T07:08:39.432200Z

დილა მშვიდობის!

borkdude 2020-10-14T07:47:35.433300Z

@slipset Maybe you can also teach them integer overflow, then you can simulate subtraction with only addition?

3
2020-10-14T07:51:08.433500Z

does this count as a non-euclidean thing? presumably the jump from MAX_INT to MIN_INT is not considered to be smooth

2020-10-14T07:51:47.433700Z

dunno, maybe it is, depends on your frames of reference

slipset 2020-10-14T08:03:39.433900Z

so the ints are basically represented in a ringbuffer 🙂

slipset 2020-10-14T08:04:19.434100Z

Doesn't make sense in maths as you need the concept of an infinite number of, well, numbers.

dominicm 2020-10-14T08:19:41.435700Z

Someone just said IDEA and my first thought was "ugh, intellij". But then I realized that they were not a programmer and they just had an idea they were excited about...

😄 3
ordnungswidrig 2020-10-14T08:19:54.435900Z

lol

borkdude 2020-10-14T08:20:21.436200Z

haha

ordnungswidrig 2020-10-14T08:21:27.436300Z

Integers forma quotient ring so techincally addition is enought.

ordnungswidrig 2020-10-14T08:21:45.436500Z

Ring don’t need to be infinite.

ordnungswidrig 2020-10-14T08:22:07.436700Z

I think it’s also a monoid ring

borkdude 2020-10-14T08:22:31.437100Z

Btw, did you know that addition has an identity element (zero), but subtraction doesn't.

ordnungswidrig 2020-10-14T08:22:36.437400Z

Don’t most developers refer to the software as “IntelliJ” (which is also misleading)

ordnungswidrig 2020-10-14T08:22:52.437500Z

I doesn’t? :thinking_face:

borkdude 2020-10-14T08:23:44.437700Z

(- 0 1) != (- 1 0)

ordnungswidrig 2020-10-14T08:24:01.437900Z

no wait, that’s commutation

ordnungswidrig 2020-10-14T08:24:10.438100Z

(- x 0) = x

ordnungswidrig 2020-10-14T08:24:22.438300Z

so 0 is the neutral element

borkdude 2020-10-14T08:24:29.438500Z

yes, but for an identity element it should also hold that (- 0 x) = x

ordnungswidrig 2020-10-14T08:24:35.438700Z

hmmm

ordnungswidrig 2020-10-14T08:24:44.438900Z

I see!

borkdude 2020-10-14T08:24:49.439100Z

this is why (-) doesn't work in Clojure

ordnungswidrig 2020-10-14T08:24:52.439300Z

That’s why I don’t like -

borkdude 2020-10-14T08:24:55.439500Z

but (+) does

ordnungswidrig 2020-10-14T08:25:21.439900Z

And why accountants avoid subtraction until the very last moment

ordnungswidrig 2020-10-14T08:25:30.440100Z

add all the assets

ordnungswidrig 2020-10-14T08:25:33.440300Z

add all the liabilities

ordnungswidrig 2020-10-14T08:25:53.440500Z

If your really fances then maybe(!) take the difference. But only if absolutely necessary :)

2020-10-14T10:46:56.441100Z

Cursive also works...

2020-10-14T10:47:54.441900Z

none of their other products are named intellij though, so the Idea part has always seemed superfluous

2020-10-14T10:48:00.442100Z

and indeed confusing

2020-10-14T10:50:24.442600Z

Jet Brains usually makes me think > Vulnerable to Seagulls

2020-10-14T12:23:27.443400Z

we're all vulnerable to the seagulls in our life

2020-10-14T12:23:46.443900Z

they swoop in, steal your food, flap, squawk, shit everywhere and then leave

thomas 2020-10-14T13:16:33.444800Z

@otfrom that sounds like a manager I once had!

dharrigan 2020-10-14T13:17:58.445100Z

A Flock Of Managers

thomas 2020-10-14T13:18:29.445700Z

seagull management! almost as bad as Mushroom management.

dharrigan 2020-10-14T13:19:00.445900Z

I had to google that one

dharrigan 2020-10-14T13:19:05.446100Z

or rather ddg

dharrigan 2020-10-14T13:20:38.446300Z

omg, there is actually this <https://en.wikipedia.org/wiki/Seagull_management>

dharrigan 2020-10-14T13:21:00.446500Z

> "Seagull managers fly in, make a lot of noise, dump on everyone, then fly out."

dharrigan 2020-10-14T13:21:30.447Z

the only thing missing from the prior apt analogy is the steal your food bit

2020-10-14T13:21:31.447100Z

that would be what I was referencing

dharrigan 2020-10-14T13:21:56.447300Z

🙂

javahippie 2020-10-14T13:30:06.448800Z

Once had a manager whose style was described as “Management by Crocodile”, but I am not sure if it’s translatable. “He’s surfacing, gapes his mouth wide open (meaning: talking loudly and a lot), and submerges again”.

2020-10-14T13:33:16.449Z

ooh, that sounds like me 😉

javahippie 2020-10-14T13:36:02.450100Z

Suprisingly, in german it would be… shorter: “Auftauchen, Maul aufreißen, abtauchen”

😂 1
thomas 2020-10-14T13:36:27.450600Z

oohh.. I hadn't heard of that one. Mushroom management is. Keep everyone in the dark, throw lots of sh*t over them and as soon one of them sticks it head out you chop it off.

😱 1
ordnungswidrig 2020-10-14T13:37:10.451100Z

lol

thomas 2020-10-14T13:37:13.451300Z

Any way... a Clojure (related) question....

dharrigan 2020-10-14T13:37:24.451900Z

Clojure? Get out of here!

thomas 2020-10-14T13:37:40.452300Z

I have a flamegraph... performance measurement.... but what do I do with it now?

thomas 2020-10-14T13:38:16.453Z

I know, shocking. Clojure, so 1959 this Lisp thing.

dharrigan 2020-10-14T13:38:21.453200Z

😛

javahippie 2020-10-14T13:39:02.453400Z

What was your goal of creating one? Was there a performance issue you are trying to debug?

thomas 2020-10-14T13:42:38.454Z

yes, I am getting more latency then the reference implementation.

thomas 2020-10-14T13:42:51.454400Z

So I was wondering what could cause that

2020-10-14T13:46:33.454700Z

what are you using to create your flame graph?

thomas 2020-10-14T13:46:48.454900Z

clojure-goes-fast/clj-async-profiler

thomas 2020-10-14T13:46:58.455200Z

but I think I begin to understand it....

thomas 2020-10-14T13:53:17.455900Z

ok, I know that you shouldn't do swap! on the fast path... but what is a good workaround for this?

borkdude 2020-10-14T13:54:39.456600Z

@thomas using volatile! and vreset! might help if you don't need thread safety and watches

thomas 2020-10-14T13:55:29.457Z

ok ta, let me have a look at that.

thomas 2020-10-14T13:58:00.457400Z

that might do the trick... let me try.

thomas 2020-10-14T14:01:15.458500Z

and maybe not... as I have one big atom holding state for all the clients and I need to update it for each client on each interaction with the client.

borkdude 2020-10-14T14:02:32.458800Z

maybe partition it into multiple atoms for each client?

thomas 2020-10-14T14:03:57.459300Z

yes, I was thinking about that.

raymcdermott 2020-10-14T15:09:43.459800Z

morning