This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-01-02
Channels
- # announcements (7)
- # atom-editor (3)
- # babashka (8)
- # beginners (38)
- # biff (5)
- # calva (17)
- # cider (26)
- # clj-kondo (6)
- # clojure (49)
- # clojure-europe (47)
- # clojure-norway (19)
- # clojure-sweden (2)
- # clojure-uk (1)
- # clojurescript (22)
- # cursive (20)
- # datahike (1)
- # datomic (6)
- # etaoin (2)
- # honeysql (2)
- # hyperfiddle (36)
- # jobs-discuss (19)
- # leiningen (15)
- # malli (5)
- # off-topic (8)
- # overtone (1)
- # pathom (15)
- # pedestal (8)
- # polylith (4)
- # releases (1)
- # ring (5)
- # schema (10)
- # shadow-cljs (17)
- # timbre (3)
- # xtdb (17)
Good morning. First day of work 2024 for me.
We had to say goodbye to @grav at our org because of cutdowns of consultants. I think the decision makers should have gone with someone else. He's an excellent developer and an excellent dude to boot. Just a hint for anyone who's hiring 🙂
Nice image. Where's that?
Nice shot! For me, the lighting is giving a ghostly atmosphere and a foreboding about what is behind that door
really nice contrast. I love b&w architecture shots.
@U04V5V0V4 I love that door at the end, for the same reason you have, you just have no idea what’s behind it (spoilers, it’s a church 🙂 )
@lsolbach Thank you, all in camera. I don’t mess about with much post pressing in images. Like to get things as they should be when I take the shot.
Anyone tried their hand at Rust? I've recently become interested and am reading up.
The day job I have is in Golang so I don’t have the mental capacity to learn another language. It does look interesting though
I'm trying 🙂 but for the project I work on Go looked better with libraries I need
I’ve spent some time with it the last couple of weeks. Mostly because helping a colleague testing a Macroquad tutorial. Macroquad is a small game development library and Rust lets me compile the same program to a range of targets. Pretty amazing with efficiently compiled code like that reaching the browser, as well as Windows/Linux/Mac/Android/iOS.
No interactive programming in reach, though. The incremental compilation is fast, but still… In a game there is a lot of state. If I’m going to continue with this I think I will need a way to save and restore state between restarts to keep some sanity.
And… the type checking… Hmmm, I guess it saves my ass a ton, but still, it feels a bit like spending my time at airport security.
😄 There is a lot of upfront work - but I think it saves time on debugging later in longer running services
I agree with not having repl feels like writing in mirror script with my non-dominant hand
When I was a kid I had a friend who could do that. He could write the same thing mirrored with both hands, as well as first with one hand and then with the other. He could draw the same way. He was very good at drawing. I never got tired at watching him do that.
Hah, that's funny, I never even considered that the feedback loop would be different. Been REPL'ing it up in Clojure for too long. I suppose that there are many ways to automate the feedback loop - to me, continuous feedback feels like a prerequisite for any modern programming experience, but I might be wrong 🙂
I think run-tests-with-watcher is reasonable
Probably wiring up some TDD to run in parallell could help a lot. Yeah, so Vjay beat me to it.
My question have more been around “will this feel right”/“look right” so watching tests fail or succeed hasn’t really been what I need.
I get that, @U0ETXRFEW. I bet it's really tough to be in the exploratory phase when you don't have any experience yet, and also are used to much more malleability from Clojure.
I’m happy I gave it a shot. It’s a very interesting language. Good to know at least something about it. And the only way I can learn anything valuable about a thing like this is by doing.
> No interactive programming in reach, though. @U0ETXRFEW did you mean Rust?
Here is some Clojure-Rust interaction: https://github.com/borkdude/clojure-rust-graalvm And some Rust-Clojure interaction: https://github.com/babashka/sci/blob/master/doc/libsci.md#using-libsci-from-rust
Thanks, @U04V15CAJ. I’ll have a look.
Hm. Our github settings prevent merging a PR that has not been reviewed by someone not involved in the PR. Often, as a reviewer, I tend to want to leave a commit with an improvement on top of the existing commits - it's easier and faster than having to explain what I mean deal with the back and forth of arriving at the right code. But it excludes me from actually approving the PR. Am I doing it wrong?
I mean, I technically am doing it wrong, if we accept the current Github repo settings as law. But what's your opinions on the reviewer leaving commits on the branch?
No, I'm glad I asked! That's a neat feature. I'll make sure to use that for 1-line change suggestions from now on :)
My experience is that the use of Suggest needs to be communicated in the team. That it is being used, and something around how to deal with suggestions. And, also, I don’t know if you lock yourself out from approving anyway, if someone commits your suggestion. Needs some experimentation.


Indeed.
Not too long ago, I read about a pattern wherein you add e.g. a val to each item in a list, like :sort-key
, in order to be able to sort by that - then remove the key again after sorting. The concept is not Clojure-centric, it's a general programming pattern. Does anyone know what it's called, if anything?
Example:
(->> some-list-of-strings
;;Sort by integer
(mapv (juxt identity #(->> % (re-find #"\d+$") (js/parseInt))))
(sort-by second)
(mapv first) ;;Sorting done, now we'll remove the unneeded integer value
...
I thought about that as well while writing this post 😄 And I might just change the code accordingly. But I'm still interested in the name of the strategy.
@U04V5VAUN the wikipedia article references what I'm referring to! > The Schwartzian transform is a version of a Lisp idiom known as decorate-sort-undecorate, which avoids recomputing the sort keys by temporarily associating them with the input items. Cheers 🍻 https://en.wikipedia.org/wiki/Schwartzian_transform
The Schwartzian transform is a specialization of decorate-sort-undecorate, and I guess my example at the top of this thread is a Schwartzian transform. Not intentionally, just because, well, no need for naming things when you can use point free programming and higher order functions 🙂