# \#piping

**URL:** https://discourse.julialang.org/tag/piping/683.md

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

---

## [C program embedding Julia - works in terminal but breaks in pipes](https://discourse.julialang.org/t/c-program-embedding-julia-works-in-terminal-but-breaks-in-pipes/86973)

<div class="topic-metadata">

**Author:** [@greatpet](https://discourse.julialang.org/u/greatpet)\
**Replies:** 8\
**Last updated:** [October 30, 2025, 2:43pm UTC](https://discourse.julialang.org/t/c-program-embedding-julia-works-in-terminal-but-breaks-in-pipes/86973 "2025-10-30T14:43:19Z")

</div>

I’d like to write a C program which embeds Julia code, and call this C program from an unrelated program using two-way pipes. While the C program works fine in the terminal, it breaks when called from pipes. Here’s a min…

---

## [\[ANN\] Chevrons.jl: friendly \>\> chevron \>\> based data piping](https://discourse.julialang.org/t/ann-chevrons-jl-friendly-chevron-based-data-piping/126066)

<div class="topic-metadata">

**Author:** [@cjdoris](https://discourse.julialang.org/u/cjdoris)\
**Replies:** 9\
**Last updated:** [February 27, 2025, 10:43am UTC](https://discourse.julialang.org/t/ann-chevrons-jl-friendly-chevron-based-data-piping/126066 "2025-02-27T10:43:57Z")

</div>

Announcing Chevrons.jl I’ve made another package for chaining/piping data transformations together, similar to Chain.jl and Pipe.jl, stealing some of their ideas but with nicer \>\>-based syntax and REPL integration. Here…

---

## [In Pipe.@pipe, |\> followed by .|\> Gives an error](https://discourse.julialang.org/t/in-pipe-pipe-followed-by-gives-an-error/47174)

<div class="topic-metadata">

**Author:** [@Lincoln\_Hannah](https://discourse.julialang.org/u/Lincoln_Hannah)\
**Replies:** 8\
**Last updated:** [January 8, 2025, 11:34pm UTC](https://discourse.julialang.org/t/in-pipe-pipe-followed-by-gives-an-error/47174 "2025-01-08T23:34:35Z")

</div>

|\> followed by .|\> Gives an error @pipe 2 |\> \_ .+ (1:3) #Works @pipe 2 .+ (1:3) .|\> \_^2 #Works @pipe 2 |\> \_ .+ (1:3) .|\> \_^2 #Gives Erro…

---

## [Fixing the Piping/Chaining Issue (Rev 3)](https://discourse.julialang.org/t/fixing-the-piping-chaining-issue-rev-3/90836)

<div class="topic-metadata">

**Author:** [@uniment](https://discourse.julialang.org/u/uniment)\
**Replies:** 89\
**Last updated:** [April 5, 2024, 3:13am UTC](https://discourse.julialang.org/t/fixing-the-piping-chaining-issue-rev-3/90836 "2024-04-05T03:13:54Z")

</div>

Third time’s (hopefully) the charm :wink: Okay so in contrast with my last two proposals (1, 2) this proposal is less preachy, and more “hey check out this crazy cool thing I did and please offer feedback.” Hopefully it…

---

## [Data First Pipeline](https://discourse.julialang.org/t/data-first-pipeline/103582)

<div class="topic-metadata">

**Author:** [@ShalokShalom](https://discourse.julialang.org/u/ShalokShalom)\
**Replies:** 5\
**Last updated:** [September 7, 2023, 9:10pm UTC](https://discourse.julialang.org/t/data-first-pipeline/103582 "2023-09-07T21:10:22Z")

</div>

As someone, who comes mainly from functional statically typed languages, I stumbled over this article, pointing out some potentially unique approach, and wondered how it would work in Julia. I have not had many experien…

---

## [Opinions on piping into variable?](https://discourse.julialang.org/t/opinions-on-piping-into-variable/86643)

<div class="topic-metadata">

**Author:** [@martin.auer](https://discourse.julialang.org/u/martin.auer)\
**Replies:** 11\
**Last updated:** [April 19, 2023, 7:39pm UTC](https://discourse.julialang.org/t/opinions-on-piping-into-variable/86643 "2023-04-19T19:39:52Z")

</div>

We use the Julia REPL quite a bit with custom data flows. When interactively toying around with them, we find the pipe operator extremely handy; especially combined with expressive Base.show() output, the sense of progre…

---

## [Fixing the Piping/Chaining Issue](https://discourse.julialang.org/t/fixing-the-piping-chaining-issue/89654)

<div class="topic-metadata">

**Author:** [@uniment](https://discourse.julialang.org/u/uniment)\
**Replies:** 212\
**Last updated:** [January 16, 2023, 5:45am UTC](https://discourse.julialang.org/t/fixing-the-piping-chaining-issue/89654 "2023-01-16T05:45:00Z")

</div>

Objective To satisfy Julia’s piping/chaining/currying/partial application problem with an elegant and functional approach worthy and idiomatic of Base Julia. If you want, skip the background reading material straight do…

---

## [Fixing the Piping/Chaining/Partial Application Issue (Rev 2)](https://discourse.julialang.org/t/fixing-the-piping-chaining-partial-application-issue-rev-2/90408)

<div class="topic-metadata">

**Author:** [@uniment](https://discourse.julialang.org/u/uniment)\
**Replies:** 40\
**Last updated:** [November 26, 2022, 3:15am UTC](https://discourse.julialang.org/t/fixing-the-piping-chaining-partial-application-issue-rev-2/90408 "2022-11-26T03:15:25Z")

</div>

Starting this thread anew to avoid confusion, because I changed my mind on which approach I support partway through a long thread (sorry!). It’s also useful to distill some of the last thread’s learnings. Thank you to a…

---

## [\[ANN\] DataPipes.jl 0.3.0](https://discourse.julialang.org/t/ann-datapipes-jl-0-3-0/60734)

<div class="topic-metadata">

**Author:** [@aplavin](https://discourse.julialang.org/u/aplavin)\
**Replies:** 67\
**Last updated:** [November 23, 2022, 10:39am UTC](https://discourse.julialang.org/t/ann-datapipes-jl-0-3-0/60734 "2022-11-23T10:39:37Z")

</div>

Yet another take on piping in Julia. Even with multiple existing implementations of the piping concept in general, I didn’t find one that is convenient enough \[for my usecases\] while still remains general. Additionally,…

---

## [Mid-chain array comprehensions affect (join) broadcasting behavior?](https://discourse.julialang.org/t/mid-chain-array-comprehensions-affect-join-broadcasting-behavior/81829)

<div class="topic-metadata">

**Author:** [@kostas-emman](https://discourse.julialang.org/u/kostas-emman)\
**Replies:** 0\
**Last updated:** [May 28, 2022, 10:36am UTC](https://discourse.julialang.org/t/mid-chain-array-comprehensions-affect-join-broadcasting-behavior/81829 "2022-05-28T10:36:36Z")

</div>

I could do what is presented here in a different way (e.g. using replace) but please bear with me since I am more interested in the intuition behind the behavior presented below. I use Julia 1.7.3. If I have a 2-elemen…

---

## [Multi-threading to the “combine” function](https://discourse.julialang.org/t/multi-threading-to-the-combine-function/67783)

<div class="topic-metadata">

**Author:** [@bojusemo](https://discourse.julialang.org/u/bojusemo)\
**Replies:** 5\
**Last updated:** [May 20, 2022, 10:15am UTC](https://discourse.julialang.org/t/multi-threading-to-the-combine-function/67783 "2022-05-20T10:15:43Z")

</div>

Hello folks, Could anybody guide me, please? Can multi-threading be designated to the “combine” function in the example below? Thank you in advance Boris julia\> begin using DataFrames, Chain d…

---

## [Is it possible to pipe to a function of several variables?](https://discourse.julialang.org/t/is-it-possible-to-pipe-to-a-function-of-several-variables/76393)

<div class="topic-metadata">

**Author:** [@Soldalma](https://discourse.julialang.org/u/Soldalma)\
**Replies:** 10\
**Last updated:** [February 14, 2022, 1:52pm UTC](https://discourse.julialang.org/t/is-it-possible-to-pipe-to-a-function-of-several-variables/76393 "2022-02-14T13:52:23Z")

</div>

In some other languages, like R, some package allows one to insert a call to a function of several variables into a sequence of pipes. This is done by specifying all arguments but one and inserting a . in the place of th…

---

## [Rationale for Pipe Order of Operations?](https://discourse.julialang.org/t/rationale-for-pipe-order-of-operations/73694)

<div class="topic-metadata">

**Author:** [@kapple](https://discourse.julialang.org/u/kapple)\
**Replies:** 4\
**Last updated:** [January 1, 2022, 3:33am UTC](https://discourse.julialang.org/t/rationale-for-pipe-order-of-operations/73694 "2022-01-01T03:33:31Z")

</div>

I feel like both blocks should result in the same result of 7. Is there a reason why the pipe isn’t the last thing processed?

---

## [@chain at element level?](https://discourse.julialang.org/t/chain-at-element-level/67906)

<div class="topic-metadata">

**Author:** [@Lincoln\_Hannah](https://discourse.julialang.org/u/Lincoln_Hannah)\
**Replies:** 0\
**Last updated:** [September 9, 2021, 4:19am UTC](https://discourse.julialang.org/t/chain-at-element-level/67906 "2021-09-09T04:19:29Z")

</div>

Does @chain have (or can it be given) the equivalent of Pipe’s dot pipe .|\> I know you can use transform with ByRow, or vectorise a function within a chain block, but it would be very nice to just drop to element l…

---

## [A confusing problem of pipe](https://discourse.julialang.org/t/a-confusing-problem-of-pipe/61438)

<div class="topic-metadata">

**Author:** [@314](https://discourse.julialang.org/u/314)\
**Replies:** 10\
**Last updated:** [May 20, 2021, 8:55am UTC](https://discourse.julialang.org/t/a-confusing-problem-of-pipe/61438 "2021-05-20T08:55:20Z")

</div>

This is my code split("hello-world julia", \[' ', '-'\]) .|\> x -\> filter(isletter, x) .|\> first .|\> uppercase |\> join I want to get the result "HWJ", but I get a 3-element Vector{String}: "H" "W" …

---

## [Function Composition vs Piping: Is there a performance difference?](https://discourse.julialang.org/t/function-composition-vs-piping-is-there-a-performance-difference/50589)

<div class="topic-metadata">

**Author:** [@Obtuya7](https://discourse.julialang.org/u/Obtuya7)\
**Replies:** 4\
**Last updated:** [November 22, 2020, 9:11pm UTC](https://discourse.julialang.org/t/function-composition-vs-piping-is-there-a-performance-difference/50589 "2020-11-22T21:11:04Z")

</div>

I noticed cases where the pipe operator (e.g. |\> ) is used over function composition (e.g. f(g(x))). I see composition used throughout the base code; so I assume that it’s the preferred convention. Are there any underly…

---

## [Combining functors, broadcasting, and pipes](https://discourse.julialang.org/t/combining-functors-broadcasting-and-pipes/48691)

<div class="topic-metadata">

**Author:** [@klaff](https://discourse.julialang.org/u/klaff)\
**Replies:** 2\
**Last updated:** [October 20, 2020, 4:27pm UTC](https://discourse.julialang.org/t/combining-functors-broadcasting-and-pipes/48691 "2020-10-20T16:27:12Z")

</div>

I’ve got another behavior I don’t quite understand. Here’s an MWE: begin struct MyStruct x end function(ms::MyStruct)(y) ms.x\*y end end ms1=MyStruct(2) ms1(2) # works 2 |\> ms1 # works ms1.((3,4)) # works b…

---

## [Function Composition and Piping](https://discourse.julialang.org/t/function-composition-and-piping/46472)

<div class="topic-metadata">

**Author:** [@Nathan\_Boyer](https://discourse.julialang.org/u/Nathan_Boyer)\
**Replies:** 2\
**Last updated:** [September 11, 2020, 6:48pm UTC](https://discourse.julialang.org/t/function-composition-and-piping/46472 "2020-09-11T18:48:39Z")

</div>

The following are equivalent based on the docs. Is there a Julian preference or functional reason to choose one over another, or is it just a matter of personal taste? Nesting: g(f(x)) Composition: (g ∘ f)(x) Piping: x…

---

## [Cummulative death by day by country](https://discourse.julialang.org/t/cummulative-death-by-day-by-country/42080)

<div class="topic-metadata">

**Author:** [@Chen](https://discourse.julialang.org/u/Chen)\
**Replies:** 29\
**Last updated:** [June 29, 2020, 1:45pm UTC](https://discourse.julialang.org/t/cummulative-death-by-day-by-country/42080 "2020-06-29T13:45:25Z")

</div>

In R, one would use tidyverse to, for example, aggregate daily deaths of COVID-19 by day and by country \[0\]. How would one do it in Julia? Is there a package that is similar to R’s tidyverse? Or does one write a couple …

---

## [Piping in Julia](https://discourse.julialang.org/t/piping-in-julia/14735)

<div class="topic-metadata">

**Author:** [@tnederlof](https://discourse.julialang.org/u/tnederlof)\
**Replies:** 13\
**Last updated:** [August 30, 2019, 10:58am UTC](https://discourse.julialang.org/t/piping-in-julia/14735 "2019-08-30T10:58:03Z")

</div>

Coming from a world where I use dplyr a lot in R for my SQL type operation needs, I find myself very confused on how to use pipes in Julia. In R I would try very hard to have the data be the first argument in a function …

---

## [Metaprogramming Queryverse/Query Pipelines](https://discourse.julialang.org/t/metaprogramming-queryverse-query-pipelines/27032)

<div class="topic-metadata">

**Author:** [@mthelm85](https://discourse.julialang.org/u/mthelm85)\
**Replies:** 7\
**Last updated:** [July 31, 2019, 1:47pm UTC](https://discourse.julialang.org/t/metaprogramming-queryverse-query-pipelines/27032 "2019-07-31T13:47:53Z")

</div>

Hello, I haven’t done any real metaprogramming yet (other than tinkering around with it) and I have a situation that I think could be a good fit for a metaprogramming solution. I’m working with a dataset in Queryverse a…

---

## [Function chaining with |\> and filter function](https://discourse.julialang.org/t/function-chaining-with-and-filter-function/17060)

<div class="topic-metadata">

**Author:** [@sirex](https://discourse.julialang.org/u/sirex)\
**Replies:** 5\
**Last updated:** [November 1, 2018, 9:24pm UTC](https://discourse.julialang.org/t/function-chaining-with-and-filter-function/17060 "2018-11-01T21:24:08Z")

</div>

How can I call filter(isodd) using function chaining |\>? This does not work: julia\> 1:9 |\> filter(isodd) ERROR: MethodError: no method matching filter(::typeof(isodd)) Closest candidates are: filter(::Any, ::Array{T,…

---

## [Piping operator |\> not documented?](https://discourse.julialang.org/t/piping-operator-not-documented/11985)

<div class="topic-metadata">

**Author:** [@drbenvincent](https://discourse.julialang.org/u/drbenvincent)\
**Replies:** 4\
**Last updated:** [June 27, 2018, 2:41pm UTC](https://discourse.julialang.org/t/piping-operator-not-documented/11985 "2018-06-27T14:41:53Z")

</div>

Am I going crazy here, or is the pipe operator |\> entirely missing from the docs? Seems like it’s something that should be there (with examples) maybe along with a lot of the other operators here Mathematical Operations …

---

## [String interpolation not working in julia pipe to julia !?!](https://discourse.julialang.org/t/string-interpolation-not-working-in-julia-pipe-to-julia/6385)

<div class="topic-metadata">

**Author:** [@TravisA9](https://discourse.julialang.org/u/TravisA9)\
**Replies:** 3\
**Last updated:** [October 11, 2017, 4:16pm UTC](https://discourse.julialang.org/t/string-interpolation-not-working-in-julia-pipe-to-julia/6385 "2017-10-11T16:16:52Z")

</div>

I was playing around a bit here on an idea based on an unanswered question I found on stackoverflow. Namely this one: Julia - pipe to Julia REPL - Stack Overflow The following is related and has a more direct answer: …
