clojure-europe

For people in Europe... or elsewhere... UGT https://indieweb.org/Universal_Greeting_Time
dharrigan 2021-03-02T07:27:02.242900Z

Good Morning!

anthony-galea 2021-03-02T07:27:48.243200Z

Mornin

ordnungswidrig 2021-03-02T07:44:29.243400Z

Good morning!

ordnungswidrig 2021-03-02T07:46:46.244100Z

Today is a good day, I found a well fitting place to use my favourite function juxt :rolling_on_the_floor_laughing:

agigao 2021-03-02T08:09:20.244600Z

Feel ya! Had a similar day once 😄

reefersleep 2021-03-02T08:37:45.245400Z

I use it fairly often! It’s great for point-free programming (though that kind of terseness can become a bit unfriendly towards readers)

reefersleep 2021-03-02T08:38:08.245600Z

But it’s fun to try to do things point-free

djm 2021-03-02T07:53:07.244300Z

👋

orestis 2021-03-02T08:00:09.244500Z

Morning

agigao 2021-03-02T08:09:25.244900Z

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

javahippie 2021-03-02T08:17:32.245100Z

Moinsen

reefersleep 2021-03-02T08:36:46.245300Z

Godmorgen 🙂

borkdude 2021-03-02T08:42:24.245900Z

Morning

RAMart 2021-03-02T08:43:01.246100Z

☀️

benne 2021-03-02T08:54:37.246300Z

moin moin

thomas 2021-03-02T09:17:05.246500Z

mogge

slipset 2021-03-02T09:29:18.246700Z

morning

joelkuiper 2021-03-02T09:43:10.247400Z

Goedemorgen 🙂

reefersleep 2021-03-02T10:08:47.254400Z

Er du sønderjydsk?

reefersleep 2021-03-02T10:10:16.256900Z

Nice, wide representation we got going, it seems! Nation-wise. Still mostly a bunch of white, middle aged men, it seems.

slipset 2021-03-02T10:10:50.257400Z

So, the last couple of many days, I’ve spent my time trying to make data.json work as fast on reading json as cheshire does. One might ask why do this, and I might answer, why not? One of the reasons is simply because data.json does not depend on anything but Clojure. It’s been a bumpy ride, with a lot of help from http://clojure-goes-fast.com, reading tons of decompiled java code and also trying to make the Clojure compiler emit the java code that I think is the fastest. So, where am I at? For certain structures, I’m now faster than cheshire, but, but the bottleneck seems to be at parsing Strings (which is a big part json). The “hot code” is right here https://github.com/slipset/data.json/blob/no-dymic-vars-only/src/main/clojure/clojure/data/json.clj#L135 and as far as I can see there are several reasons why I can’t make this faster: 1. I haven’t figured out how to have an unsynchronized-mutable int. This is problematic because every array lookup now calls RT.intCast because java-arrays must be looked up with ints and not longs 2. The Clojure compiler doesn’t seem to be very interested in the fact that chars are native types, so it doesn’t want to emit fast, native based code when dealing with chars, only when dealing with int ’s So, if anyone has any tips in these areas, I’d be super happy 🙂

👍 1
👏 1
javahippie 2021-03-02T10:15:18.257700Z

This won’t help you right now, but this made me wonder how much potential there is, once the Value Types / Inline Types from Project Valhalla are available.

borkdude 2021-03-02T10:15:55.257900Z

Rewrite parts in Java. IMO doesn't make sense to spend a ton of time optimizing non-idiomatic Clojure code which is just a few lines in Java

👍 2
reefersleep 2021-03-02T10:16:14.258100Z

No offence to anyone, btw, just an observation 🙂

reefersleep 2021-03-02T10:17:03.258300Z

I thought the same as @borkdude (I have no experience in that level of optimization, though)

borkdude 2021-03-02T10:18:09.258500Z

httpkit (client + server) and jsonista do this too: core in Java, API in Clojure

orestis 2021-03-02T10:19:38.258800Z

I take offence at the middle aged 😄

😆 1
👴 1
slipset 2021-03-02T10:20:26.259Z

Ha!, just by writing this, I solved one of my problems 🙂

🦆 4
borkdude 2021-03-02T10:20:42.259200Z

@slipset Nice idea though, it would be nice to have a minimal and fast JSON lib in pure Java + Clojure a la httpkit

reefersleep 2021-03-02T10:20:46.259400Z

Quack quack, then! :duckie: :duckie: :duckie:

slipset 2021-03-02T10:23:33.259800Z

🙂

2021-03-02T10:38:04.260200Z

I completely fall into that description

joelkuiper 2021-03-02T11:02:09.260500Z

or https://github.com/metosin/jsonista

joelkuiper 2021-03-02T11:02:22.260800Z

the blog post goes into some of the java-y bits https://www.metosin.fi/blog/faster-json-processing-with-jsonista/

borkdude 2021-03-02T11:02:41.261100Z

The point of slipset's exercise is to have a JSON lib that only depends on clojure. Both cheshire and jsonista depend on Jackson

joelkuiper 2021-03-02T11:08:28.261300Z

right, was just as a point of comparison or inspiration maybe 🙂

borkdude 2021-03-02T11:09:08.261500Z

right

orestis 2021-03-02T11:32:53.261800Z

Joking aside, Europe is full of white people. And in my job postings I got 1-2 women in total applying out of 100 or so candidates. I've no idea of the underlying distribution to see if the kind of applicants I get are representative or not, and I want to do better. Any pointers or information welcome!

reefersleep 2021-03-02T12:36:31.262100Z

I’m surprised to hear that you had women/woman! That’s great. I’ve been fortunate enough to work directly with 3 female developers so far in my career, and it’s been awesome. Hope you get to see more female applicants later on. I’m aware that there’s a difference between distributions of white people in e.g. Denmark and the US, where these issues tend to flare up more 😉 Sometimes the excitement spills over into Denmark, like with the recent Black Lives Matter thing, and people forget that while there are problems of that kind here, too, it’s a completely different country in so many regards.

orestis 2021-03-02T12:54:20.264900Z

I’m ashamed to admit it, but I was like 20yo when I first saw a black person in a suit up close (in London). Up until then the only black people in Greece were unlucky African immigrants who got stuck. I’ve been working hard on my biases since :)

👍 1
reefersleep 2021-03-02T13:38:37.265200Z

Similar thing for me. I’m not really ashamed, those were just the circumstances I grew up in - mostly white people, few suit wearers in general 🙂 Think about my biases often.

orestis 2021-03-02T17:55:22.266400Z

I think I'm mostly ashamed of how ignorant I was back then, but yeah given the environment it was kinda unavoidable...