Fork me on GitHub
#beginners
<
2021-04-25
>
Oliver06:04:54

Any recommendations for good reads how to build a (simple) application with Clojure? I understand the basics for data manipulation, but I struggle with control flow, user interface and working with immutability in practice.

Ben Sless07:04:43

desktop? web app? CLI?

Oliver07:04:44

Web app would be the target, but I am happy to start with some simple desktop apps if that is easier to start.

Ben Sless09:04:27

Web app would be easier, actually, take a look at https://github.com/seancorfield/usermanager-example/

🙏 1
Eric Ihli12:04:38

Are there any gotchas or concerns about putting side-effects in a transduction? I searched and found https://groups.google.com/g/clojure/c/SVaFtQgtolc and my understanding is that what the original asker is doing should be fine since transduce/reduce is non-lazy. But the first line of the answer that says "Transducers are a new feature and best practices are still emerging" make me wonder if the best practice that has emerged may be that it's a bad idea for some reason.

kennytilton13:04:13

Just inherited ` (some->> (get-in db [:hi :mom]) (into [])) Curious about (into []). Why not just a literal []? Thx!

Stuart13:04:53

(let [res '(:a :b :c)]
   (into [] res))
=> [:a :b :c]

(let [res '(:a :b :c)]
  [res])
=> [(:a :b :c)]
With the literal [] you won't get the conj type behaviour, so you will end up with a nested collection?

yuhan13:04:43

I usually use vec for this, but (into []) might communicate the intent clearer.

athomasoriginal15:04:55

I have a ring-jetty server. I use 3rd party libraries in my server which make network requests (think stripe sdk). I would like to monitor the network requests my server is making. What do people like to do for this? I use Charles Proxy to monitor front end requests, but i’m not sure if this tool is also used for monitor requests my server makes :thinking_face: (apologies if there is a better channel for this post as I know it’s not really Clojure specific)