This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-01-29
Channels
- # announcements (13)
- # aws-lambda (19)
- # babashka (11)
- # beginners (90)
- # calva (35)
- # chlorine-clover (16)
- # cider (8)
- # clj-kondo (6)
- # cljsrn (10)
- # clojure (44)
- # clojure-australia (1)
- # clojure-europe (35)
- # clojure-nl (6)
- # clojure-norway (7)
- # clojure-uk (101)
- # clojurescript (79)
- # community-development (40)
- # conjure (1)
- # contributions-welcome (4)
- # core-logic (2)
- # cursive (6)
- # datomic (4)
- # figwheel-main (5)
- # fulcro (18)
- # girouette (1)
- # graalvm (3)
- # hoplon (2)
- # hugsql (2)
- # jobs (5)
- # malli (26)
- # off-topic (74)
- # pathom (36)
- # portal (4)
- # reagent (10)
- # reitit (23)
- # remote-jobs (1)
- # shadow-cljs (27)
- # spacemacs (10)
- # sql (3)
- # startup-in-a-month (6)
- # tools-deps (55)
- # vim (11)
- # xtdb (15)
Good morning!
Gâmoie!
Morning
All snow is gone. Does anybody have an idea what this green stuff is? :thinking_face:đ
I wish cond->
has this since I sometimes need the condition in the result (which gives rise to things like better-cond or else-thread https://gist.github.com/borkdude/93efc3f5978a2ed545553a47caaf7aa8)
what is cool about things like better-cond etc is that it can be done easily, what is bad is that you can end up with conflicting small dependencies if you don't copypasta code like that
It raises a, to me, interesting question, which is how much of a dsl you should add into a âfeatureâ. Like, the common-lisp format and loop constructs are almost languages in them selves.
I guess it depends on how often you use a thing. The dsl that is destructuring is ok, because I use it all the time, the :>>
thingy is something Iâd likely not use, and if I did, it would confuse my cowworkers.
Perhaps there should be a poll across the community to discover small 3rd party extensions like better-cond, vote on them and promote them into the core library?
See this gist: https://gist.github.com/borkdude/93efc3f5978a2ed545553a47caaf7aa8 I think this covers most of these weird macro combinations, and the macro is super simple
that would remove dependencies and encourage small, reasoned growth of the core library.
(require '[clojure.core.match :refer [match]])
(defn regex [x]
(re-matches #"(\w+)->(\w+)" x))
(match "foo->bar"
([_ x y] :<< regex) [x y]
:else [])
Morning
got some good help on a transducer question on #beginners https://clojurians.slack.com/archives/C053AK3F9/p1611850109057600