Good Morning!
Morning
Wow, thanks for elaborate explanation!
morning
Morning Allβ¦
Saw this on reddit/programming yesterday <https://github.com/tc39/proposal-pipeline-operator/wiki>
It feels a lot like the threading macro ->
in clojure π
i.e.,
/ 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?)
ocaml has had |> since 2011
I have seen pipe operator for the first time in OCaml (if we donβt count shell).
exactly @bronsa
I did some ocaml at university, but that was before 2011, and I haven't looked at it since
it's function composition tho, not syntax threading
haskell has the same but calls it &
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 do believe it is yes, functional composition
just feels a bit like the threading macro π
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...
I don't have any problems with them.
Any bundles are smaller.
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...
Is it a case of just work out how to convert all your projects to shadow?
Perhaps this is a minority perspective π...
@folcon I use webpack and Figwheel :).
I wouldn't advocate for migration to shadow.
@folcon what problems are you encountering exactly? I'm surprised by your claims.
we've had an overall good shadow experience... but we moved off of boot-cljs, rather than figwheel
@dominicm I think I've worked out the problem, at least in this case, blame poor errors perhaps? But webpack 5 doesn't say that they remove the node module polyfills that were bundled in by default...
Unfortunately still took a fair while to debug >_<...