This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-02-17
Channels
- # announcements (12)
- # babashka (27)
- # beginners (65)
- # biff (8)
- # calva (22)
- # clj-kondo (1)
- # clj-otel (5)
- # clojure (65)
- # clojure-europe (127)
- # clojure-nl (1)
- # clojure-norway (11)
- # clojure-portugal (2)
- # clojure-uk (2)
- # clojurescript (18)
- # cursive (5)
- # data-science (3)
- # datahike (14)
- # datascript (3)
- # datomic (7)
- # deps-new (11)
- # emacs (31)
- # exercism (1)
- # fulcro (1)
- # honeysql (3)
- # hyperfiddle (38)
- # introduce-yourself (4)
- # leiningen (2)
- # malli (20)
- # meander (2)
- # missionary (3)
- # off-topic (4)
- # pathom (3)
- # practicalli (2)
- # reagent (5)
- # releases (1)
- # sci (1)
- # shadow-cljs (9)
- # xtdb (8)
Good morning! I wish we had a winter vacation in Greece, it's such a good idea to get a break. Do you also have two weeks of school holidays for Easter though?
Morning!
I think a lot of the ones that hit here (Dundee anyway) are mostly hit a bit further north (I was surprised that a bit of Sweden is south of me)
I had to look up how far north Dundee was and... you have some really cool architecture IMO
I'll make a note to visit Dundee if I ever get to Scotland... I used to go the UK all the time when my nana and grandad were still alive
perhaps we will visit when my kid(s) are old enough. My wife always nags me about how we never visited my "other" home, especially since I keep talking about pub food and pudding
Anybody have any experience with HTMX? Or maybe have experience with similar alternatives? I want to experiment with something new for my blog system when I have time to continue building that. I am intrigued by HTMX, but also a tiny bit skeptical of any kind of templating DSL that limits you to a set of predefined constructs. SPAs are complex, but at least they give you full control over the entire experience. However, I long for something more like old-school PHP websites with a splash of dynamism, I just don't want to be too limited in what I can do.
I used it in a web app I cobbled together, but not in an earnest project. You could look for talks by Wim Deblauwe, he build an integration in the Java world for Spring Boot, or maybe articles by Frederik Hahne
https://github.com/javahippie/clojure-web-initializer was the project I used it in, but don’t judge to harshly, it was mostly put together on a Saturday Evening with a beer
To me it feels like using AJAX back in the day. I’m not sure of any usecases where it would limit me (personally). The example app contains a dynamic search field, and that’s as much dynamic behavior as I need for myself. State handling is a little harder, of course. In our company we started building a product on it. The feedback I get from the developer building it until now is, that for the small app the overhead is smaller than they had with re-frame apps by far and the development workflow is more direct. They built some reuseable components with it and are quite happy. I guess for a bigger application with many components which used shared state, a SPA with proper state management is a better choice, for smaller apps we will probably stick to SSR + HTMX
Maybe also ask in #C013Y4VG20J? It includes HTMX and the channel should be populated with people having experience with it. @U7YNGKDHA has battle tested it, so should have quite a lot of insights to share
> a Saturday Evening with a beer Not a beer drinker any longer, but when I was, this would have been quite few beers for a Saturday night 😃
> this would have been quite few beers for a Saturday night Wait, are you telling me you would have not stopped at one beer at a Saturday, or that my code looks like it would have been caused by way more beers than one? 😅
To qualify that some. It wasn't like I got smashed. Just that I found myself not being able to say ”no, one beer is enough, Peter”. I couldn't let the beers keep deciding these things. 😃 And ”Peter, no beers at all for you” works great.
No problem, @U0ETXRFEW! 🙂
Good for you! I haven’t had alcohol for years, don’t miss it. Have a suspicion I might have a sensitivity to it or contents of beer, like I react more poorly than the average person.
continues derailment 😛
Ok, let's continue. 😃 It's been a year for me now. Still miss it, but much less than say half a year ago. I don't miss the bad sleep it gave me.
I've been using it to render a complete UI - login, user journey and so on - error messages etc..
I drink alcohol free beer now, I can't stand the taste of alcohol anymore, let alone the hangover the next day
I used to drink (alcoholic) beers every day, I'm very habitual, it's all or nothing :P
tbf, I haven't built anything with htmx myself, but I hear good stories from users who have which makes me curious
My big issue with it (from reading the documentation) is that it is a lot more frameworky than I am used to, e.g. if you want to make a loading spinner you should use special htmx markup for that. Maybe that's fine, but it still feels weird to me that's it goes into such detail. On the other hand, the benefit of a well thought out framework is that many of those small things have easy, at-hand solutions...
The basic pitch is nice ("it's just expanding the original ideas of hypertext"), but the reality seems to be a proliferation of DSL keywords that you put in HTML attributes.
You don't have to do it like that. Mostly what i return is just html from the API invocation. Over 90% of the time it's just hx-get
with hx-post
.
I think I may include some htmx in my little example project
to show how it may be used to render stuff.
It's also a bit of a hack in some cases:
> To understand how CSS transitions actually work in htmx, you must understand the underlying swap & settle model that htmx uses.
> When new content is received from a server, before the content is swapped in, the existing content of the page is examined for elements that match by the id
attribute. If a match is found for an element in the new content, the attributes of the old content are copied onto the new element before the swap occurs. The new content is then swapped in, but with the old attribute values. Finally, the new attribute values are swapped in, after a "settle" delay (20ms by default). A little crazy, but this is what allowes CSS transitions to work without any javascript by the developer.
In danger of derailing even more. This caused some controversies this month, but resonates well with me https://infrequently.org/2023/02/the-market-for-lemons/
Very roughly: The SPA frameworks fail to deliver a good and performant user experience, that‘s why they market „Developer Experience“ instead, now, and attached the promise that better DX Leads to a better UX. The heavy investment in SPA Frameworks by many devs led to devs automatically defaulting to these frameworks now, no matter if they fit the use case
Critique on this article is that it is patronizing to assume that developers don‘t choose the right framework for the stack, but are influenced my marketing and cargo cult
Those JS companies are marketing very heavily, it's exhausting to read all of their announcements
I work a lot with bigger enterprise customers, and now it’s a self-fulfilling prophecy. I heard multiple times “we need to port our UI to Angular or React, else we won’t find developers”
The TypeScript marketing is also very aggressive, I muted all kinds of people who kept re-appearing in my timeline
TypeScript basically won because of marketing, there was an article recently about that and how flow, the alternative at the time, had actually a better foundation, but TS was slightly faster and therefore had a head start and then was marketed very aggressively
I asked a friend who is a JS developer jokingly, why they traded a dynamic language with nice functional features for Frontend-Java. They were not amused
When I first saw TS, I exactly thought: why would anyone want to adopt Java for front-end... ugh
A lof of decisions comes from up-high. I.e., all the other companies are using react, therefore, you lowly developer, you have to use react too
Even 'tho there may be push back from developers, companies quite often want to ensure that a developer is easily hot-swappable with another developer
There are several Clojure companies who don't use CLJS but TS/React because it's easier to find developers that way. I also know one company in NL over here who switched from the CLJS front-end to TS/React because they always had problems finding developers who could maintain their Reagent app.
I guess Pitch is a Clojure Company, but their latest Job postings just mention “react and redux”, with “Typescript” as nice to have https://pitch.com/jobs#job-6577411002
Even at Vouch David Nolen and Mike Fikes are using JS/TS for components and only write their front-end business logic in CLJS. I remember complaints from new employees who had to do JS and expected to arrive in CLJS nirvana with those people there 😂
That’s interesting!
"Use the best tool for the job" my ass! If the best tool isn't Clojure, I will find another job! 😛

@U4P4NREBY "Isn't it ironic" - it reminds me of a university teacher who wanted to have a good Windows experience for his students, so we in #CFN4QDHPS created an MSI installer for the clojure CLI. "Finally", he said after trying it, "my students can now use lein repl
without problems"!
I hope you get the irony that lein repl
doesn't use any clojure CLI tooling at all
I’m building a side project with HTMX at the moment, and in my opinion it does not feel frameworky at all. It provides a set of basic building blocks that extend HTML with what is necessary for making pages dynamic without writing JS. I mean, the logic is all on the server and the state is the page itself. Pure REST feels good! 😄
> we in #CFN4QDHPS created an MSI installer for the clojure CLI. "Finally", he said after trying it, "my students can now use lein repl
without problems"!
This is what my post in #C02CPM2R1KK is about. It's such a mess! We must do something about it.
And not only the confusion around deps and lein. I have tried on five or six Windows machines over the years. Never succeeded in installing Clojure CLI. What I do instead is to download deps.clj exe and rename it to clojure
and place it in the PATH.
@U0ETXRFEW That's exactly what the clojure MSI installer aims to fix: it wraps deps.clj in a clj.exe / clojure.exe. It will become the official installer for Windows at some point, Alex is on board with this
But you can also use scoop to install clj-deps
which also does pretty much the same thing. I have a powershell script to install deps.exe and add it to the path automatically, I think could change it to make it clj.exe as well, so then it's just a matter of executing a powershell expression
PowerShell -Command "iwr -useb | iex"
We should change this script a little bit top copy deps.exe to clj.exe. Then the install process is pretty similar to the raw posix script installerI'm fine with downloading and renaming for my own sake. To me the frustration has been about that the official install option is such a trap.
@U04V15CAJ re aggressive marketing on JS/TS: for some reason, I feel intimidated just by reading the name of certain VC-backed company and the amount of money behind…
I did a bit of playing around at the weekend and now my little ditty of a startrek project uses htmx
Enjoy!
Oh nice, the first time I saw sbd use Thymeleaf with Clojure
I usually use Selmer, but Thymeleaf has a lot of nice features, never thought about using it in Clojure
Yup indeed. I find it's definitely one of the great things about Clojure, it's interoperability with java libraries 🙂
Yep. In one project we generate documents with Jasper Reports. 10 lines of Interop Code to use a full fledged Reportgenerator
I’d like to read some blog articles about this interop story in general as well as about Thymeleaf and Jasper in particular. Just sayin 😀
I have a blog about Jasper in my head already, but for those topics we are in the middle of setting up a company blog. Hope it will be done soon 🤞
Gonna try to fasten light things standing outside. Already rainy, should be extreme gusts of wind this afternoon.
The HTMX rabbit hole lead me to this thing made by the same guy: https://hyperview.org/ That looks very interesting! Mobile apps made entirely in XML.