News for hackers. Stuff that matters.
Re:For the Love of Pipes by duckerude on Tuesday January 22, 2019 @09:05AM (#18968284)
Small correction (or it won't run on my system):

  1:3 |> x -> map(y -> y+1, x) |> x -> join(x, ",") |> length
All those anonymous functions seem a bit distracting, though https://github.com/JuliaLang/julia/pull/24990 could help with that.
Re:For the Love of Pipes by msravi on Tuesday January 22, 2019 @03:13PM (#18971964)
Ok, in Julia 1.0+ you just have to use the dot operator:

1:3 |> x->x.+1 |> x->join(x,",") |> length

Note the dot in x.+1, that tells + to operate on each element of the array (x), and not the array itself.

Re:For the Love of Pipes by msravi on Tuesday January 22, 2019 @09:24AM (#18968394)
Ok... not sure which version of Julia you're using, but I'm on 0.5 and it works there... Maybe it changed in a later version
Re:For the Love of Pipes by shele on Tuesday January 22, 2019 @01:25PM (#18970792)
Maybe a bit nicer

    (1:3 .|> x->x+1) |> x->join(x,",") |> length