clojure-europe 2026-07-20

Good morning 🙂

looks like good weather, and I take it you avoided the fires in Edinburgh and the Cairngorms?

We stayed at Fort William.

It was pretty hot, not complaining tho.

Last hike came with clegs, I feel positively assaulted crying-laughing-joy-blood

Gorgeous!

we don't have that kind of scenery on the east coast, but we also don't have midges

tho at least the scenery and the midges are close by 🦟

I love being able to work my way through a (comment ) block in a REPL and C-x C-e C-c C-p my way through all the things and build up my understanding of what I'm doing

It's so nice. And so peaceful compared to mental abstraction juggling.

Didn't know about C-c C-p. Nice.

Put C-u at the front and the return value ends up in your source file

🎯 1

Damn, that's crazy stuff. I wonder when I will ever use that, though...

Ah, I use it all the time in my Rich comment blocks. But I should probably turn more of them into tests. I mostly do data science so it is nice to have something simpler than a notebook

C-u C-x C-e is helpful to write test assertions.

(is (= (expr),))
With cursor on ,, you suddenly have a test! (if your code is correct).

I should do that more often. I need to make sure my jump to test file works better

I've had a great time with significant-other.el! https://github.com/magnars/emacsd-reboot/blob/main/settings/significant-other.el s-j jumps from source file to test file and back, C-u s-j also creates the test file you're jumping to.

👍 1

I have yet to become red-pilled regarding unit tests. I struggle to envision when they would ever be useful in a well-designed code base.

I write them a lot. A bit wider feedback than one expression at a time. C-c C-k is bound to eval the namespace, but also run any namespace tests. A few tests makes me less hesitant to change / improve / extend the implementation. But proper tooling has been a very big deal for me, writing and running tests needs to be low effort.

I vaguely remember significant-other functionality being in clojure-mode or cider, but it has been so long my memory might be failing me. Something like find matching file or some such.

related - I love rcf tests from hyperfiddle https://github.com/hyperfiddle/rcf lets you convert those comment blocks into tests super easily…

I've been a bit on again off again with rcf. Creating enough tests in the comment blocks made my file a bit too big. I'm also trying to avoid LLM output where possible.

Ah yeah, I would only use them as a stricter comment block, not the only testing strategy

projectile-toggle-between-implementation-and-test

ah, it is a projectile thing

The significant other I linked to is independent of projectile, and can toggle between different things than tests and implementation, for example a namespace of functions returning hiccup and a namespace of examples of calling those functions (devcards/storybook/portfolio). projectile-toggle-between-implementation-and-test's implementation looks bigger. @ovidiu.stoica1094 packaged significant-other as https://github.com/ovistoica/significant-other.el, if an installable package is preferrable to 35 lines of Emacs Lisp.

❤️ 1

Thank you, @teodorlu. Another plus for significant-other.el (the package) is I removed the dependency on dash.el for people that care about things like this 🙂

👍 2

The villains on the lower parts of the Glenfinnan trail were some kind of horsefly. Diabolical hordes of them. Bite through clothing. I must have killed about a few dozen, looking like a some kind of maniac flailing about 🤪 Higher up, away from the creek, there were fewer of them luckily. Extra points for who spots the movie reference in the pics.