feviskus

feviskus

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

From here: Work with pipe query syntax  |  BigQuery  |  Google Cloud Documentation
HN: SQL pipe syntax available in public preview in BigQuery | Hacker News

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.

First Post!

cmo

cmo

Brings to mind PRQL, which is a much larger change to query authoring.

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

AstonJ
Please see the new poll here: Which code editor or IDE do you use? (Poll) (2022 Edition) It’s been a while since we first asked this, I...
208 31707 143
New
MarioFlach
Hello, I want to share a project I’ve been working on for a while: https://github.com/almightycouch/gitgud Background Some time ago I ...
New
jer
I’ve been using umbrellas for a while, and generally started off (on greenfield projects at least) by isolating subapps based on clearly ...
New
PragTob
Hello everyone, I know we had quite some threads (read through lots of them) about background job processing but it remains a hotly deba...
New
lucaong
Hello Elixir and Nerves community, I have been working for a while on an open-source embedded key-value database for Elixir, that I call...
230 14362 124
New
cvkmohan
The upcoming Phoenix 1.6 release looks very interesting. Became a habit to watch the commits - and - what they are bringing in. phx.gen...
New
arcanemachine
https://nitter.net/josevalim/status/1744395345872683471 https://twitter.com/josevalim/status/1744395345872683471
New

Other popular topics Top

KronicDeth
Elixir plugin for JetBrain’s IntelliJ Platform (including Rubymine) This is a plugin that adds support for Elixir to JetBrains IntelliJ...
289 36689 110
New
vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
AstonJ
Posting this to see if we can make things easier for people to get into Neovim. If you use Neovim and have a favourite distro please let ...
New