This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-06-21
Channels
- # ai (1)
- # announcements (18)
- # aws (7)
- # babashka (54)
- # babashka-sci-dev (6)
- # beginners (22)
- # calva (57)
- # cider (3)
- # clj-http (1)
- # clojure (144)
- # clojure-austin (1)
- # clojure-dev (38)
- # clojure-europe (34)
- # clojure-gamedev (4)
- # clojure-norway (8)
- # clojure-uk (5)
- # clojurescript (12)
- # clr (20)
- # conjure (4)
- # data-science (1)
- # emacs (30)
- # events (1)
- # graphql (9)
- # helix (7)
- # hyperfiddle (22)
- # introduce-yourself (4)
- # jobs (1)
- # leiningen (7)
- # malli (3)
- # off-topic (26)
- # polylith (26)
- # portal (5)
- # random (14)
- # shadow-cljs (113)
- # tools-deps (6)
- # xtdb (9)
Is there a more idiomatic way to add a key to every map in a collection than: (map #(assoc % :new-key true) list-of-maps)
?
I don't think so. Take your data types. A list of something needs to be mapped over. A map needs an assoc to set a new key / value. This seem perfectly reasonable with those to types in mind.
Its a good thing to think about though. Clojure is awesome with how simple code can be written. (Preface with me not being the best clojure coder that exists). I do encourage new folks to take that chance to think through the options because simpler code options do exist here where they don't in other languages. But there is a floor.
Is there a good video of someone developing Clojure using REPL-driven development? This style is new to me and I want to learn how to do it well
there's a Sean Corfield demo where he shows off stuff working at the REPL: <https://www.youtube.com/watch?v=gIoadGfm5T8> and a talk by Stuart Halloway that's sort of about the REPL and ideas for using it: <https://vimeo.com/223309989> and I like "Running with Scissors", again not exactly a demo, but just sort of ideas: <https://www.youtube.com/watch?v=Qx0-pViyIDU>
I think “Show me your REPL” episodes would be helpful, you can search the term in this slack to find some links. I haven’t watched them myself though
One thing to get used to is to testing things directly in the buffer
The comment
special form can help with this
My code is filled with those. They make it so I can do quick visual tests of my functions, and they're entirely ignored at normal runtime
Eric Normand has a great series https://ericnormand.podia.com/view/courses/repl-driven-development-in-clojure/680313-default-section/1971107-what-is-repl-driven-development
not video, but the #CKKPVDX53 explains it really well https://clojuredesign.club/
@U05D3EAA6FM If you watch any of my videos about REPL-driven development and have any Qs about what you see or hear, feel free to hit me up on DM. Some Qs I may suggest bringing back up in channel so others can chime in.
Two that I've found helpful are: https://youtube.com/@emacsrocks (Especially their excellent parens of the dead series) and https://youtube.com/playlist?list=PLhYmIiHOMWoGIMCmCRwMSrWkHJg12vevR
Calva in vscode has a lot of the same features as cider for emacs, so I think it translates well enough (different key bindings, similar features). The main takeaway is seeing how people work, though
Two days ago I recorded this https://www.twitch.tv/videos/1850363054 for the Exercism live stream (shameless plug)
This is me implementing a missing TodoMVC feature, in the ClojureDart/Flutter/Matrix world. https://www.youtube.com/watch?v=OkotzUNKkUE Note that CLJD has no repl (yet!), but when we save the system recompiles in a second and we see new print output immediately. hth