This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-11-14
Channels
- # adventofcode (1)
- # babashka (60)
- # beginners (107)
- # calva (11)
- # cider (3)
- # clara (11)
- # clj-kondo (6)
- # cljs-dev (33)
- # clojure (70)
- # clojure-dev (4)
- # clojure-europe (3)
- # clojure-italy (2)
- # clojure-kc (1)
- # clojure-losangeles (12)
- # clojure-nl (4)
- # clojure-spec (32)
- # clojure-uk (35)
- # clojuredesign-podcast (1)
- # clojurescript (28)
- # core-logic (4)
- # cursive (5)
- # datomic (34)
- # devcards (1)
- # emacs (16)
- # events (13)
- # fulcro (15)
- # graalvm (5)
- # graphql (3)
- # jobs (8)
- # joker (2)
- # kaocha (17)
- # malli (6)
- # music (3)
- # off-topic (58)
- # protorepl (7)
- # re-frame (28)
- # rewrite-clj (9)
- # shadow-cljs (102)
- # spacemacs (3)
- # sql (20)
- # tools-deps (9)
Just to let y’all know I am on my way, looks like I’ll be there just about 6, though may a few minutes after.
Thanks for coming to the talk tonight. My slides are available here: https://docs.google.com/presentation/d/1Z774le3MvqBzZJ907heKJ6Nle26uqzr_ywK19ORVwsY/edit?usp=sharing
the accompanying clojure file I used when developing the talk is here: https://github.com/kyleburton/talks/blob/master/2019.macros/scratchpad/src/scratchpad/macros.clj
The tricks I mentioned were:
juxt
instead of a hash function. E.g. (juxt count identity)
instead of #(list (count %) %)
(doto println)
(or (doto tap>)
) for temporarily logging the value of an expression, this is especially useful with the thread first macro:
(-> it ... (doto println) ...)
(This is Ed)
It was great to meet everyone, I need to come down more often
And for anyone interested in the podcast I'm one half of, head to https://clojuredesign.club (or look in your local podcast directory)
@fiddlerwoaroof (Missed the meeting, no sitter last night, hi I’m Jacob 🙂 ) I’m curious about the hash function! How did hash functions come up? I use these to avoid duplicate work on the edges of my system. I recently found a thorough one here https://github.com/replikativ/hasch
This "thread last" example was in the slides (sorts a list of strings by its length):
(->>
["sort" "this" "by" "length"]
(map #(list (count %) %))
(sort-by first)
(mapv second))
Ed pointed out that the #(list (count %) %)
could be written using juxt
:
(->>
["sort" "this" "by" "length"]
(map (juxt count identity))
(sort-by first)
(mapv second)