Fork me on GitHub
#clojure-europe
<
2023-02-17
>
slipset05:02:10

Morning! Winter vacation, see you next Monday. I might be posting som pics…

🏂 14
vemv08:02:06

morning! starting stretched and caffeinated over here.

2
orestis08:02:58

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?

simongray08:02:06

well, maybe in Norway they do...

yes 2
otfrom08:02:17

windy here today, but only in a "unsecured bins went dancing overnight" kind of way

simongray08:02:35

@otfrom windy, rainy, supposedly a storm is coming

simongray08:02:52

in Copenhagen

otfrom08:02:37

I wonder if that is what we had overnight

otfrom08:02:59

96kph winds for a bit

jasonbell10:02:57

Was a bit blowy here last night too.

otfrom10:02:39

<NI joke>won't someone think of the flegs?</NI joke>

jasonbell11:02:11

Celtic/Rangers tops do not count as “flegs” 🙂

otfrom08:02:12

we've got some rain coming and a bit of wind, but not as bad as overnight

simongray08:02:14

it probably is 😉 We usually get your storms

simongray08:02:41

or storms from the Atlantic anyway

otfrom08:02:34

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)

simongray08:02:20

I had to look up how far north Dundee was and... you have some really cool architecture IMO

otfrom08:02:10

the V&A is pretty cool

simongray08:02:15

yeah and the bridge too

otfrom08:02:17

lots of good museums here

simongray08:02:08

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

👍 2
simongray08:02:07

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

thomas08:02:49

TGIF!!!!

2
thomas08:02:15

Windy here as well in Rotterdam...

simongray09:02:54

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.

javahippie09:02:56

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

javahippie09:02:19

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

javahippie09:02:07

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

👍 2
2
pez09:02:40

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

👍 6
simongray09:02:13

hm, good idea

pez09:02:04

> 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 😃

javahippie09:02:09

> 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? 😅

pez09:02:43

Haven't checked your code! 😃

pez09:02:32

Not stopping at one beer was part of the reason I quit.

pez09:02:30

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.

pez09:02:45

Sorry for derailing with my drinking habits!

simongray09:02:55

No problem, @U0ETXRFEW! 🙂

reefersleep09:02:58

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.

reefersleep09:02:11

continues derailment 😛

pez09:02:08

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.

dharrigan09:02:06

I've been using htmx in a side project I'm doing

dharrigan09:02:43

I find it pretty refreshing

dharrigan09:02:34

I've been using it to render a complete UI - login, user journey and so on - error messages etc..

borkdude09:02:45

I drink alcohol free beer now, I can't stand the taste of alcohol anymore, let alone the hangover the next day

🤝 2
borkdude09:02:44

I used to drink (alcoholic) beers every day, I'm very habitual, it's all or nothing :P

borkdude09:02:33

Just like HTMX: less is more, no JS hangovers :P

😇 2
pez09:02:58

> very habitual, it's all or nothing This is me too.

simongray09:02:59

haha, I appreciate the segue

pez09:02:38

That's why I am ready to go with Electric Clojure. I want all! Hangover welcome.

borkdude09:02:27

tbf, I haven't built anything with htmx myself, but I hear good stories from users who have which makes me curious

simongray09:02:42

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...

simongray09:02:29

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.

dharrigan09:02:52

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.

☝️ 4
borkdude09:02:00

I guess you could do your own spinner markup

simongray09:02:11

I think I'll try it out.

dharrigan09:02:15

I think I may include some htmx in my little example project to show how it may be used to render stuff.

👍 2
simongray09:02:47

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.

simongray09:02:56

:thinking_face:

simongray10:02:35

but so is React, tbh

💯 2
javahippie10:02:08

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/

simongray10:02:17

I saw that circulating but I think I also need a tl;dr 😛

javahippie10:02:36

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

javahippie10:02:43

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

pez10:02:35

Not a too rude assumption, I'd say.

borkdude10:02:54

Those JS companies are marketing very heavily, it's exhausting to read all of their announcements

javahippie10:02:11

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”

borkdude10:02:38

and TypeScript

borkdude10:02:49

The TypeScript marketing is also very aggressive, I muted all kinds of people who kept re-appearing in my timeline

2
borkdude10:02:53

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

borkdude10:02:46

"Why isn't functional programming the norm": marketing. Talk at 2019 ClojuTRE

simongray10:02:02

TS is starting to resemble Java circa 2005 more and more

javahippie10:02:12

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

😆 8
simongray10:02:31

TS even has a cool type system, but of course people are completely overusing it

borkdude10:02:06

When I first saw TS, I exactly thought: why would anyone want to adopt Java for front-end... ugh

dharrigan10:02:08

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

borkdude10:02:50

I know TS isn't Java, but that's what I thought in 2013 or so

dharrigan10:02:51

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

borkdude10:02:54

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.

simongray10:02:59

Those managers should read that classic Peter Naur paper

borkdude10:02:59

Can't blame them to be honest

simongray10:02:37

"Programming as theory-building"

javahippie10:02:37

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

borkdude10:02:49

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 😂

javahippie10:02:53

That’s interesting!

borkdude10:02:02

"Use the best tool for the job" my ass! If the best tool isn't Clojure, I will find another job! 😛

metal 6
8
simongray10:02:23

isn't it ironic... 🎵

borkdude10:02:25

@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"!

🙌 4
😭 2
😆 2
borkdude11:02:17

I hope you get the irony that lein repl doesn't use any clojure CLI tooling at all

😂 4
mdiin11:02:23

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! 😄

2
pez11:02:01

> 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.

pez11:02:23

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.

borkdude11:02:58

@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

❤️ 2
borkdude11:02:49

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

pez11:02:21

> It will become the official installer for Windows at some point Such fantastic news!!!

borkdude11:02:13

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 installer

pez11:02:49

I'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.

lemontea15:02:28

@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…

dharrigan09:02:18

I did a bit of playing around at the weekend and now my little ditty of a startrek project uses htmx Enjoy!

🙏 2
👀 2
2
javahippie10:02:20

Oh nice, the first time I saw sbd use Thymeleaf with Clojure

dharrigan10:02:17

I do like Thymeleaf. A hang-over from my Spring days 🙂

dharrigan10:02:38

Yup, could all be done in Hiccup, but <shrug> equally valid to do it in thymeleaf

javahippie10:02:03

I usually use Selmer, but Thymeleaf has a lot of nice features, never thought about using it in Clojure

dharrigan10:02:53

Yup indeed. I find it's definitely one of the great things about Clojure, it's interoperability with java libraries 🙂

javahippie10:02:47

Yep. In one project we generate documents with Jasper Reports. 10 lines of Interop Code to use a full fledged Reportgenerator

👀 4
pez10:02:04

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 😀

javahippie10:02:19

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 🤞

👍 4
reefersleep09:02:29

Gonna try to fasten light things standing outside. Already rainy, should be extreme gusts of wind this afternoon.

simongray10:02:15

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.

👀 6
simongray10:02:24

So Clojure apps made with Hiccup

😬 2
schmalz11:02:16

Morning all.

vemv11:02:23

a glimpse from yesterday. if only the other 95% of the stadium supported like the core 5%!

Ben Sless11:02:52

Was this the static vs dynamic types fight?

😁 2
vemv11:02:28

Barça functions are red and blue!

thomas15:02:35

Und jetzt wollen wir bier!!! 🍻 🍻 🍺