This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-10-08
Channels
- # announcements (10)
- # babashka (4)
- # beginners (98)
- # cider (47)
- # clara (6)
- # clj-kondo (16)
- # clojure (54)
- # clojure-australia (3)
- # clojure-berlin (3)
- # clojure-czech (2)
- # clojure-europe (77)
- # clojure-nl (4)
- # clojure-uk (12)
- # clojuredesign-podcast (6)
- # clojurescript (10)
- # conjure (56)
- # cursive (3)
- # data-science (6)
- # datascript (8)
- # datomic (213)
- # depstar (5)
- # events (1)
- # figwheel-main (2)
- # fulcro (23)
- # graalvm (2)
- # jobs (3)
- # london-clojurians (1)
- # malli (30)
- # meander (15)
- # midje (1)
- # mount (5)
- # off-topic (18)
- # re-frame (4)
- # reitit (15)
- # remote-jobs (1)
- # shadow-cljs (23)
- # spacemacs (10)
- # specter (1)
- # tools-deps (88)
- # vim (16)
- # xtdb (1)
does everyone here use rich comment blocks? https://betweentwoparens.com/rich-comment-blocks
I use rich comments loads though I’m fairly sure that’s down to pairing with you for so long @otfrom
I started using them some weeks ago. A commenter on my Twitch streams was very persistent and pushed me to it. Very thankful about that!
yes, I do use them, typically at the end of a file. at work we prepend it with ;;;; scratch
Clojure footgun of the week: https://twitter.com/borkdude/status/1314191092607324160
This is one of those "where FP meets the real world" things, where you need to look under the hood to see how things are implemented. Monoids... but please check the source.
@slipset that's a trick question. the only control flow in Clojure is throwing exceptions
Ok, so the thing is that years of java-damage leads me to write code like
(if foo
(side-effecting-fn! lol)
(side-effecting-fn! sob))
In the first case I use if
for control-flow, in the second I use it as an expression.
Honestly, I think both are fine, in different modes of thinking. Sometimes you're writing a script or task which imperatively does things, at other times you're just building up values.
I find that the latter helps me move difficult code away from the sideffecting code which then makes the difficult code easier to test
Speaking of which. ClojureD was so important for me, knowing how this year turned out.
It ended up being this years only conference, and it helped me get on the defn-podcast, which I must say, the recording Saturday-night was one of the best Saturdays this year.
And ClojureD showed how important the community is to me, and and how valuable I think it is to meet you guys IRL.
@borkdude thx to clj-kondo I can't look at https://clojurians.slack.com/archives/CBJ5CGE0G/p1602166804278100 w/o thinking that it should be a when
except when using mapv, you won't create that much garbage (compared to using a lazy seq as the last arg of into)
do you get an extra lazy seq if your map transducer is doing the work of the f in your mapv?
there is always my law (can I say that?) of "you are gonna need to comp in something else eventually"
not entirely sure I follow how that would be used. Have you got an example you can point me at?
(def src [1 2 3])
(def ed (eduction (map inc) src))
(def ed2 (eduction (map inc) ed))
(into [] ed2) ;; => [3 4 5]
in our app we have a SqlReducible, so in the example the src would be a result set from a database
this allows you to just pass the thing around, while not having one giant transducer