feviskus

feviskus

Google's SQL dialect added a `|>` pipe operator

From here: Work with pipe query syntax  |  BigQuery  |  Google Cloud Documentation
HN: https://news.ycombinator.com/item?id=42998904

Example usage:

-- Filter items with no sales.
FROM Produce
|> WHERE sales > 0;

-- Compute total sales by item.
FROM Produce
|> WHERE sales > 0
|> AGGREGATE SUM(sales) AS total_sales, COUNT(*) AS num_sales
   GROUP BY item;

Thought it could be worth mentioning, as it shows how Elixir proceeds to influence other languages.

Most Liked

codeanpeace

codeanpeace

Really enjoyed that article on archeological semiotics and how it dropped a bunch of lore i.e. the original email thread. Well worth the read and really humanizes how the pipeline symbol came to be!

To summarize, |> was carried over from Isabelle/ML…

Now if we continue digging, The Early History of F#, also written by Don Syme aka the creator of F# unsurprisingly mentions the “obvious semiotic inspiration from UNIX pipes.” So this naturally begs the question of how the UNIX pipe operator came to be? Well here’s another fun tidbit of archeological semiotics …

Though Mahoney’s interview suggests that the original symbol for pipes was “> ,” in the 1994 book, “A Quarter Century of Unix,” McIlroy remembers when Thompson decided the symbol for pipes should instead be “|.” Thompson made the change “for a talk in London, because he couldn’t bear to reveal my ugly syntax.”
source: Pipe: How the System Call That Ties Unix Together Came About

So perhaps it went from > :icon_arrow: | :icon_arrow: |> :exploding_head:

sodapopcan

sodapopcan

To be “that guy,” Elixir took from |> from F#. Though perhaps someone will come along and tell me where F# took it from :upside_down_face:

Where Next?

Popular in Discussions Top

Other popular topics Top

sen
Hi All, I set a environment variables in dev.exs , like below code. when i start server, how can i set the ${enable} value? thanks. d...
New
Darmani72
If I have a post route which an argument: post /my_post_route/:my_param1, MyController.my_post_handler How would get the post params ...
New
JakeBecker
TL;DR: I’ve just released an implementation of Microsoft’s IDE-independent Language Server Protocol for Elixir. It adds language support ...
1144 53578 245
New
stefanchrobot
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
johnnyicon
Hi all, I've just started learning Elixir and Phoenix Framework, so please pardon my n00bness at this stage. I'm trying to use Postg...
New
chrismccord
This release brings a number of exciting features, including integration with the new Phoenix LiveDashboard and Phoenix LiveView. There h...
New
shijith.k
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
New
AstonJ
We’ve put together this wiki for Phoenix LiveView - please feel free to add any info you feel is worth including. What is Phoenix LiveV...
New
AstonJ
Seen any cool LiveView demos, sample apps or examples? Please post them here! :003:
New
lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New

We're in Beta

About us Mission Statement