This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-09-15
Channels
- # announcements (71)
- # architecture (2)
- # aws (41)
- # babashka (23)
- # beginners (80)
- # calva (26)
- # chlorine-clover (11)
- # cljfx (4)
- # cljs-dev (12)
- # clojure (78)
- # clojure-berlin (5)
- # clojure-czech (3)
- # clojure-dev (9)
- # clojure-europe (45)
- # clojure-france (16)
- # clojure-gamedev (2)
- # clojure-italy (3)
- # clojure-nl (4)
- # clojure-spec (8)
- # clojure-sweden (1)
- # clojure-uk (37)
- # clojurescript (18)
- # community-development (15)
- # conjure (30)
- # cursive (51)
- # datomic (16)
- # duct (19)
- # figwheel-main (3)
- # fulcro (23)
- # java (7)
- # jobs (2)
- # joker (10)
- # off-topic (7)
- # parinfer (1)
- # pathom (6)
- # reagent (5)
- # reitit (1)
- # remote-jobs (1)
- # sci (1)
- # shadow-cljs (55)
- # slack-help (3)
- # specter (4)
- # sql (21)
- # tools-deps (11)
- # vim (5)
- # xtdb (14)
Saw this on reddit/programming yesterday
It feels a lot like the threading macro ->
in clojure 🙂
/ Complex example
anArray
|> (a => pickEveryN(a, 2))
|> (a => a.filter(...))
|> makeQuery
|> (a => readDB(a, config))
|> await
|> extractRemoteUrl
|> fetch
|> await
|> parse
|> console.log;
Inspired by Elixir, I would guess: https://elixirschool.com/en/lessons/basics/pipe-operator/ (or maybe Elm?)
I did some ocaml at university, but that was before 2011, and I haven't looked at it since
Also LiveScript has it, they call it piping (https://livescript.net/#piping) and I remember I was using it ages back.
and F# iirc
i guess it's for langs that always curry cos all functions have only one argument, hence composition, right?
whereas threading is giving its outputs to the next form, not composing together all the logic/operations and then applying
vaguely recall that the thrush combinator is somewhat the inverse of composition
lemme google
with the caveat that as usual i have very little idea what i'm on about
Am I now in a minority in finding using npm libs from clojurescript still can be fraught wish issues? Just surprised that cljsjs is talking about issuing a draft partial depreciation warning...
Well I'm using figwheel / webpack, and it's still really hit and miss. IE requires work, but then using that doesn't give you any working reflection or any js obj worth looking at...
we've had an overall good shadow experience... but we moved off of boot-cljs, rather than figwheel