Fork me on GitHub
#clojure
<
2024-03-09
>
Teemu Kaukoranta08:03:21

A few months ago there was a thread where someone was looking for this article: https://medium.com/@maciekszajna/reloaded-workflow-out-of-the-box-be6b5f38ea98 I seem to remember reading a follow-up from another author, that had a slightly different take on the topic but still using closeable. I can't find it anymore and it's starting to bother me. Anyone know the article I'm looking for?

Teemu Kaukoranta10:03:30

Yes! Thank you

1
tlonist12:03:40

wow. surprisingly I was looking for the exact same blog article you referenced. thanks for sharing.

Patrix22:03:52

No worries! It was in my reading list and haven’t gotten around to it yet but the mention of “closable” made me remember it! Glad I could help :)

emccue19:03:19

(let [name "bob"]
  (string-template/of "Hello ~{name}."))
=> {:fragments ["Hello " "."], :values ["bob"]}
(let [name "bob"]
  (sqlvec (string-template/of "Hello ~{name}.")))
=> ["Hello ?." "bob"]

emccue19:03:12

(let [name "bob"]
  (<< sqlvec "Hello ~{name}."))
=> ["Hello ?." "bob"]

emccue19:03:28

obv. i can still support both usage styles. its clojure.

emccue19:03:53

but i feel like an idiot for not noticing that it could be simpler