clj-commons

quoll 2024-10-04T21:56:39.441839Z

Last year I released https://github.com/quoll/tiara as a library for ordered maps and sets. At the time, it was faster than both https://github.com/frankiesardo/linked and https://github.com/clj-commons/ordered. I just re-ran those benchmarks today, and was surprised to discover that Ordered has improved a lot for random access. It also doesn't run into the heap exhaustion that I used to encounter while benchmarking. This surprised me, because there has been no change to the relevant code in any of these libraries. Instead, I'm running on JDK 21, while last year I think it was run on JDK 11. Anyway, this prompted me to tweak Tiara again, since it had fallen behind (by 15%) on random access. But https://github.com/quoll/tiara 🙂 This reminded me that there had been a comment last year wondering if I might take on the "Ordered" project. I think @nbtheduke manages it now.

1
quoll 2024-10-04T21:57:51.202839Z

I guess my question is… if I took it on, would we want the existing Ordered project, or is Tiara appropriate to use instead?

2024-10-04T22:00:14.901779Z

i don't but i am in the clj-commons org on github and can help as you might need

quoll 2024-10-04T22:01:02.380149Z

Sean thought it might be you, but I just saw that you have a PR on it right now, so I figured it might not be!

2024-10-04T22:01:59.564959Z

i think additive non breaking changes are welcome

lread 2024-10-04T22:02:02.008439Z

There's a code owners convention for clj-commons projects: https://github.com/clj-commons/ordered/blob/master/.github/CODEOWNERS

quoll 2024-10-04T22:02:28.960269Z

Ah, thank you!

lread 2024-10-04T22:02:40.659599Z

You are most welcome!

quoll 2024-10-04T22:04:02.438729Z

Well, if Daniel were to see this right now, I would tell him to go to bed. So I guess I will catch up with him at some point in the coming days

lread 2024-10-04T22:07:11.286949Z

As for ordered vs Tiara... I know that clj-yaml currently uses ordered. And https://clojars.org/org.flatland/ordered/dependents. So we'd keep it around, I'm sure. But if Tiara is a better alternative, some folks are sure to move to it.

lread 2024-10-04T22:07:37.037289Z

(if that's what you were asking?)

quoll 2024-10-04T22:08:23.150759Z

I think someone suggested updating Ordered to use Tiara's mechanism instead.

quoll 2024-10-04T22:09:22.273399Z

I haven't benchmarked removals (since that hasn't been an interesting use-case for me), but on insertion and reading, it's generally faster

lread 2024-10-04T22:09:28.513669Z

Oh! I see!

quoll 2024-10-04T22:09:58.228939Z

It uses less memory than Ordered does, but as I pointed out in the main thread, JDK 21 seems to have removed that as an issue 🙂

lread 2024-10-04T22:12:11.738449Z

Babashka also has support for ordered. So that would probably be a consideration. Changes to ordered in the past have affected it (for examplehttps://github.com/clj-commons/ordered/issues/71)

quoll 2024-10-04T22:12:43.210159Z

I do recall @borkdude being in the conversation last year

lread 2024-10-04T22:17:35.918159Z

Sweet!

quoll 2024-10-04T22:29:03.542059Z

At the time I thought that maybe I should, but then life got in the way. However, I'm doing Clojure full-time again, so it has my head back in the space.

🎉 1
lread 2024-10-04T22:45:24.897649Z

Very nice to have your head (and the rest of you that makes you you) back with us @quoll!

quoll 2024-10-04T22:47:38.223729Z

Well, I never fully left. But my role had not been as a developer, and then when I got into AI, I had to do more Python. That was both good for me, and a good reminder of why I prefer Clojure

quoll 2024-10-04T22:48:24.860949Z

But I work for @slipset now. He’s been making me learn Liberator 🙂

quoll 2024-10-04T22:57:12.489009Z

(not true: I've been learning the company's system, and in the process I've had to start learning Liberator)

quoll 2024-10-04T22:57:28.554319Z

Cue the Blake's 7 theme

borkdude 2024-10-05T07:58:26.398089Z

Yes, ordered perf improvements are welcome! :)

borkdude 2024-10-05T09:31:43.509989Z

And glad you're more back into Clojure now!

quoll 2024-10-05T12:01:39.064729Z

Well, it depends on what you’re doing as to how much of an improvement you’re likely to experience 🙂

borkdude 2024-10-05T12:18:50.416219Z

I guess so, trade-offs