Fork me on GitHub

Hi all! My latest moment of greatness: I had to work with a rather unhandy data structure. Lots of if and cond and the like in my code. I was very unhappy. Then a flash of genius strikes me: The data structure is spec'ed. All the unhandiness is defined there. What if I the data structure, manipulate the instance of the spec (as fulfilled by the data structure) and use to get the resulting data structure back? Turns out that this was much easier to handle in my case. It also turns out that this is nothing new, everyone is doing so and I'm super late to the party. 😂 But I thought it might be worth sharing nonetheless: 💡 If you need to evaluate or manipulate an unhandy data structure, have a look at its spec. It may be easier to work with the data structure's counterpart.

💡 3

@ramart Interesting approach.


Good Morning!


Also had an “everybody is doing it” epiphany this morning and learned that you can and should cache the .shadow-cljs folder in the ci pipeline


@javahippie can you tell more?


Good, somewhat grumpy, morning. I have been fighting with my Windows machine. Access denied on java. Struggling with path variables and various scoop issues to get a new java in place. Then I run into parsing of command line issues. Almost two hours with this and I didn’t even solve it. Didn’t need to right now, because the Calva issue I was checking doesn’t care about Java now that I can use nbb instead. Thanks for adding nrepl to that tool, @borkdude!


I saw a thread on Reddit where someone asked about what OS to use with Clojure development, Windows or Linux. I resisted the urge to warn about Windows, because I am unsure if it is just me. But as far as Calva dev goes, Windows is the new IE6. I spend 80% of the time on Windows issues. (Well, maybe not, but everytime I spend time on them, hours upon hours just burn up.)


Indeed. It's annoying. But a reality. Perhaps look at the previous Clojure survey how many Windows users there are. Or make your own survey. If there's almost none, perhaps give it lower priority. But in every niche Windows user that opens Calva for the first time there is a potential new fellow Clojurian!

Jakub Holý (HolyJak)09:10:49

We just need to find a Windows user that is fond of Calva and willing and able to maintain it there 🙂


I have someone like this in the #babashka "community", he is very helpful


It also helps to have Windows CI set up, but with a visual tool like Calva I can see this is much harder to do without wasting a lot of time.


So far I think I have counted that we would need 7 or 8 Windows CI setups…


Windows users are in minority for sure. But I just would never be able to bring myself to let them have bad experiences without giving it a shot trying to fix and/or help them with workarounds. This is a burden I must shoulder. I should probably practice in doing it with a smile instead of always being on the brink of throwing the Windows machine out the window (pun not intended, but haha). 😃

❤️ 3

I feel the same way


I don't exactly how you "replaced" Java with nbb, but you're welcome 😆


This issue Which I first thought was because I had fixed your issue with the cursor flying away with inline results. It wasn’t, thankfully, but a super duper strange ECMA thing that I have not the faintest clue on. He is using Windows and I wanted to rule out that as a single cause of the issue. Anyway, all I needed to do was check that inline results display, I wether the evaluation had traveled to a JVM and back with the results wasn’t important. 😃

Fahd El Mazouni08:10:11

today reading library docs to choose those who will replace spring ! 🎉 (open to recommendations if you have any, especially when it comes to websockets)

Jakub Holý (HolyJak)08:10:55

You mean Spring Framework? That's like a thousand heads hydra. Which heads in particular are you replacing?

Fahd El Mazouni09:10:27

see that's kind of part of why I'm so happy to get rid of it. It handles a lot of stuff, in a way that seems magical. It handles authentification, password hashing, websockets, and the whole webserver deal with routes and handlers and all that jazz. I've tried to clear things up by reading docs many times, but I didn't always find it helpful

Jakub Holý (HolyJak)09:10:21

💯 That is why I wrote (notice I kept myself from expressing my true feelings in the title, though they show up in the url :)) We use http-kit, which has built in support for websockets. It does not seem to be maintained much but it is stable and performant. Not sure whether you are looking for clojure or java solutions?

👍 1

hmmm Spring... that brings back memories night mares...

😂 2
Fahd El Mazouni10:10:19

oh thanks ! will definitely read this ! right now reading ring documentation then maybe I'll have a look at pedestal, but good to know that http-kit has built-in websocket support !

Jakub Holý (HolyJak)11:10:01

Ring is used much more so it might be easier to find libraries and get help, though #pedestal is certainly a quality choice too

Jakub Holý (HolyJak)11:10:45

BTW I guess you know about #luminus? (though personally I prefer to start with plain Ring and only add stuff when unavoidable)

Fahd El Mazouni11:10:40

heard of luminus but I also believe in minimalism 😛 actually mostly support and how easy it is to get help


Mornings facepalm 😄


Good morning!