Enviar pesquisa
Carregar
Extending Operators in Perl with Operator::Util
•
1 gostou
•
298 visualizações
Nova Patch
Seguir
Presented at Perl Seminar NY (PerlSemNY), February 2011.
Leia menos
Leia mais
Tecnologia
Denunciar
Compartilhar
Denunciar
Compartilhar
1 de 28
Baixar agora
Baixar para ler offline
Recomendados
Simplifying code monster to elegant in n 5 steps
Simplifying code monster to elegant in n 5 steps
tutec
Clustering com numpy e cython
Clustering com numpy e cython
Anderson Dantas
First step of Performance Tuning
First step of Performance Tuning
risou
ERPsimulate_script
ERPsimulate_script
Dorothy Bishop
Refsim (R program)
Refsim (R program)
Dorothy Bishop
Palestra sobre Collections com Python
Palestra sobre Collections com Python
pugpe
Python data structures
Python data structures
Harry Potter
Advance Techniques In Php
Advance Techniques In Php
Kumar S
Recomendados
Simplifying code monster to elegant in n 5 steps
Simplifying code monster to elegant in n 5 steps
tutec
Clustering com numpy e cython
Clustering com numpy e cython
Anderson Dantas
First step of Performance Tuning
First step of Performance Tuning
risou
ERPsimulate_script
ERPsimulate_script
Dorothy Bishop
Refsim (R program)
Refsim (R program)
Dorothy Bishop
Palestra sobre Collections com Python
Palestra sobre Collections com Python
pugpe
Python data structures
Python data structures
Harry Potter
Advance Techniques In Php
Advance Techniques In Php
Kumar S
Share test
Share test
Anton Stuk
جلسه سوم پایتون برای هکر های قانونی دوره مقدماتی پاییز ۹۲
جلسه سوم پایتون برای هکر های قانونی دوره مقدماتی پاییز ۹۲
Mohammad Reza Kamalifard
dplyr and torrents from cpasbien
dplyr and torrents from cpasbien
Romain Francois
Selected Bash shell tricks from Camp CDL breakout group
Selected Bash shell tricks from Camp CDL breakout group
John Kunze
tensorflow/keras model coding tutorial 勉強会
tensorflow/keras model coding tutorial 勉強会
RyoyaKatafuchi
Elixir & Phoenix – fast, concurrent and explicit
Elixir & Phoenix – fast, concurrent and explicit
Tobias Pfeiffer
Elixir & Phoenix – fast, concurrent and explicit
Elixir & Phoenix – fast, concurrent and explicit
Tobias Pfeiffer
Fog City Ruby - Triple Equals Black Magic
Fog City Ruby - Triple Equals Black Magic
Brandon Weaver
PLOTCON NYC: Behind Every Great Plot There's a Great Deal of Wrangling
PLOTCON NYC: Behind Every Great Plot There's a Great Deal of Wrangling
Plotly
الجلسة الأولى
الجلسة الأولى
Yaman Rajab
C++ Sobrecarga
C++ Sobrecarga
Ivan Ricarte
{tidytext}と{RMeCab}によるモダンな日本語テキスト分析
{tidytext}と{RMeCab}によるモダンな日本語テキスト分析
Takashi Kitano
Ruby nooks & crannies
Ruby nooks & crannies
Kerry Buckley
令和から本気出す
令和から本気出す
Takashi Kitano
大量地区化解决方案V5
大量地区化解决方案V5
bqconf
{tidygraph}と{ggraph}による モダンなネットワーク分析(未公開ver)
{tidygraph}と{ggraph}による モダンなネットワーク分析(未公開ver)
Takashi Kitano
Process Solutions Web
Process Solutions Web
Hunter Tate
Pendidikan Pusaka untuk Anak; Membangun Strategi Pelestarian Pusaka melalui J...
Pendidikan Pusaka untuk Anak; Membangun Strategi Pelestarian Pusaka melalui J...
Elanto Wijoyono
Acudeami
Acudeami
aleah
Actitudantetodo1
Actitudantetodo1
aleah
Alci Taller(2)
Alci Taller(2)
ranganatha2
Living Wall Case Study - Aug. 2011
Living Wall Case Study - Aug. 2011
Greenwall Ventures, LLC
Mais conteúdo relacionado
Mais procurados
Share test
Share test
Anton Stuk
جلسه سوم پایتون برای هکر های قانونی دوره مقدماتی پاییز ۹۲
جلسه سوم پایتون برای هکر های قانونی دوره مقدماتی پاییز ۹۲
Mohammad Reza Kamalifard
dplyr and torrents from cpasbien
dplyr and torrents from cpasbien
Romain Francois
Selected Bash shell tricks from Camp CDL breakout group
Selected Bash shell tricks from Camp CDL breakout group
John Kunze
tensorflow/keras model coding tutorial 勉強会
tensorflow/keras model coding tutorial 勉強会
RyoyaKatafuchi
Elixir & Phoenix – fast, concurrent and explicit
Elixir & Phoenix – fast, concurrent and explicit
Tobias Pfeiffer
Elixir & Phoenix – fast, concurrent and explicit
Elixir & Phoenix – fast, concurrent and explicit
Tobias Pfeiffer
Fog City Ruby - Triple Equals Black Magic
Fog City Ruby - Triple Equals Black Magic
Brandon Weaver
PLOTCON NYC: Behind Every Great Plot There's a Great Deal of Wrangling
PLOTCON NYC: Behind Every Great Plot There's a Great Deal of Wrangling
Plotly
الجلسة الأولى
الجلسة الأولى
Yaman Rajab
C++ Sobrecarga
C++ Sobrecarga
Ivan Ricarte
{tidytext}と{RMeCab}によるモダンな日本語テキスト分析
{tidytext}と{RMeCab}によるモダンな日本語テキスト分析
Takashi Kitano
Ruby nooks & crannies
Ruby nooks & crannies
Kerry Buckley
令和から本気出す
令和から本気出す
Takashi Kitano
大量地区化解决方案V5
大量地区化解决方案V5
bqconf
{tidygraph}と{ggraph}による モダンなネットワーク分析(未公開ver)
{tidygraph}と{ggraph}による モダンなネットワーク分析(未公開ver)
Takashi Kitano
Mais procurados
(16)
Share test
Share test
جلسه سوم پایتون برای هکر های قانونی دوره مقدماتی پاییز ۹۲
جلسه سوم پایتون برای هکر های قانونی دوره مقدماتی پاییز ۹۲
dplyr and torrents from cpasbien
dplyr and torrents from cpasbien
Selected Bash shell tricks from Camp CDL breakout group
Selected Bash shell tricks from Camp CDL breakout group
tensorflow/keras model coding tutorial 勉強会
tensorflow/keras model coding tutorial 勉強会
Elixir & Phoenix – fast, concurrent and explicit
Elixir & Phoenix – fast, concurrent and explicit
Elixir & Phoenix – fast, concurrent and explicit
Elixir & Phoenix – fast, concurrent and explicit
Fog City Ruby - Triple Equals Black Magic
Fog City Ruby - Triple Equals Black Magic
PLOTCON NYC: Behind Every Great Plot There's a Great Deal of Wrangling
PLOTCON NYC: Behind Every Great Plot There's a Great Deal of Wrangling
الجلسة الأولى
الجلسة الأولى
C++ Sobrecarga
C++ Sobrecarga
{tidytext}と{RMeCab}によるモダンな日本語テキスト分析
{tidytext}と{RMeCab}によるモダンな日本語テキスト分析
Ruby nooks & crannies
Ruby nooks & crannies
令和から本気出す
令和から本気出す
大量地区化解决方案V5
大量地区化解决方案V5
{tidygraph}と{ggraph}による モダンなネットワーク分析(未公開ver)
{tidygraph}と{ggraph}による モダンなネットワーク分析(未公開ver)
Destaque
Process Solutions Web
Process Solutions Web
Hunter Tate
Pendidikan Pusaka untuk Anak; Membangun Strategi Pelestarian Pusaka melalui J...
Pendidikan Pusaka untuk Anak; Membangun Strategi Pelestarian Pusaka melalui J...
Elanto Wijoyono
Acudeami
Acudeami
aleah
Actitudantetodo1
Actitudantetodo1
aleah
Alci Taller(2)
Alci Taller(2)
ranganatha2
Living Wall Case Study - Aug. 2011
Living Wall Case Study - Aug. 2011
Greenwall Ventures, LLC
Mediabrand present майкл вильярс стюарт (uk)
Mediabrand present майкл вильярс стюарт (uk)
Usanov Aleksey
System Administrator
System Administrator
Ogone Mpuru
Presentation globalfuturesvcm
Presentation globalfuturesvcm
CIAT
LECTRIC seminar - People Marketing
LECTRIC seminar - People Marketing
LECTRIC
Rosalia.tati
Rosalia.tati
silledaef
R. Jimenez - Fundamental Physics from Astronomical Observations
R. Jimenez - Fundamental Physics from Astronomical Observations
SEENET-MTP
доповідь
доповідь
Tamara Emec
Ppt Neva Esplugues
Ppt Neva Esplugues
Natzaret
Developing a Successful Mobile Strategy ap iv2
Developing a Successful Mobile Strategy ap iv2
Pete Morano
Go Offense! Go Defense! Portfolio Management in Toolkit 6
Go Offense! Go Defense! Portfolio Management in Toolkit 6
Doug Gerlach
Trendsfactory: Smart TV marketing (Rembrandt Smids)
Trendsfactory: Smart TV marketing (Rembrandt Smids)
LECTRIC
Apresentaçãoerasmo
Apresentaçãoerasmo
Professora Josete
Branko Dragovic - Modern Modifications of Einstein's Theory of Gravity
Branko Dragovic - Modern Modifications of Einstein's Theory of Gravity
SEENET-MTP
2011 02 stipo eindpresentatie plintenstrategie weesperstraat, synopsis
2011 02 stipo eindpresentatie plintenstrategie weesperstraat, synopsis
Stipo
Destaque
(20)
Process Solutions Web
Process Solutions Web
Pendidikan Pusaka untuk Anak; Membangun Strategi Pelestarian Pusaka melalui J...
Pendidikan Pusaka untuk Anak; Membangun Strategi Pelestarian Pusaka melalui J...
Acudeami
Acudeami
Actitudantetodo1
Actitudantetodo1
Alci Taller(2)
Alci Taller(2)
Living Wall Case Study - Aug. 2011
Living Wall Case Study - Aug. 2011
Mediabrand present майкл вильярс стюарт (uk)
Mediabrand present майкл вильярс стюарт (uk)
System Administrator
System Administrator
Presentation globalfuturesvcm
Presentation globalfuturesvcm
LECTRIC seminar - People Marketing
LECTRIC seminar - People Marketing
Rosalia.tati
Rosalia.tati
R. Jimenez - Fundamental Physics from Astronomical Observations
R. Jimenez - Fundamental Physics from Astronomical Observations
доповідь
доповідь
Ppt Neva Esplugues
Ppt Neva Esplugues
Developing a Successful Mobile Strategy ap iv2
Developing a Successful Mobile Strategy ap iv2
Go Offense! Go Defense! Portfolio Management in Toolkit 6
Go Offense! Go Defense! Portfolio Management in Toolkit 6
Trendsfactory: Smart TV marketing (Rembrandt Smids)
Trendsfactory: Smart TV marketing (Rembrandt Smids)
Apresentaçãoerasmo
Apresentaçãoerasmo
Branko Dragovic - Modern Modifications of Einstein's Theory of Gravity
Branko Dragovic - Modern Modifications of Einstein's Theory of Gravity
2011 02 stipo eindpresentatie plintenstrategie weesperstraat, synopsis
2011 02 stipo eindpresentatie plintenstrategie weesperstraat, synopsis
Semelhante a Extending Operators in Perl with Operator::Util
Useful javascript
Useful javascript
Lei Kang
Super Advanced Python –act1
Super Advanced Python –act1
Ke Wei Louis
[1062BPY12001] Data analysis with R / week 2
[1062BPY12001] Data analysis with R / week 2
Kevin Chun-Hsien Hsu
From Javascript To Haskell
From Javascript To Haskell
ujihisa
Ruby 1.9
Ruby 1.9
guestaef7ea
เฉลยMetrix1
เฉลยMetrix1
Noir Black
Basics
Basics
Logan Campbell
Basic operations by novi reandy sasmita
Basic operations by novi reandy sasmita
beasiswa
Pre-Bootcamp introduction to Elixir
Pre-Bootcamp introduction to Elixir
Paweł Dawczak
Coscup2021-rust-toturial
Coscup2021-rust-toturial
Wayne Tsai
Python Tidbits
Python Tidbits
Mitchell Vitez
PRE: Datamining 2nd R
PRE: Datamining 2nd R
sesejun
Datamining R 1st
Datamining R 1st
sesejun
MATLAB ARRAYS
MATLAB ARRAYS
Aditya Choudhury
Haskellで学ぶ関数型言語
Haskellで学ぶ関数型言語
ikdysfm
Datamining r 1st
Datamining r 1st
sesejun
An overview of Python 2.7
An overview of Python 2.7
decoupled
A tour of Python
A tour of Python
Aleksandar Veselinovic
Data types
Data types
Rajesh Kone
R programming language
R programming language
Alberto Minetti
Semelhante a Extending Operators in Perl with Operator::Util
(20)
Useful javascript
Useful javascript
Super Advanced Python –act1
Super Advanced Python –act1
[1062BPY12001] Data analysis with R / week 2
[1062BPY12001] Data analysis with R / week 2
From Javascript To Haskell
From Javascript To Haskell
Ruby 1.9
Ruby 1.9
เฉลยMetrix1
เฉลยMetrix1
Basics
Basics
Basic operations by novi reandy sasmita
Basic operations by novi reandy sasmita
Pre-Bootcamp introduction to Elixir
Pre-Bootcamp introduction to Elixir
Coscup2021-rust-toturial
Coscup2021-rust-toturial
Python Tidbits
Python Tidbits
PRE: Datamining 2nd R
PRE: Datamining 2nd R
Datamining R 1st
Datamining R 1st
MATLAB ARRAYS
MATLAB ARRAYS
Haskellで学ぶ関数型言語
Haskellで学ぶ関数型言語
Datamining r 1st
Datamining r 1st
An overview of Python 2.7
An overview of Python 2.7
A tour of Python
A tour of Python
Data types
Data types
R programming language
R programming language
Último
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
Scott Keck-Warren
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
Allon Mureinik
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Alan Dix
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
Ridwan Fadjar
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
HampshireHUG
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
Delhi Call girls
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
naman860154
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Igalia
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
ThousandEyes
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
soniya singh
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
Delhi Call girls
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
Malak Abu Hammad
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
Delhi Call girls
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
hans926745
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
Michael W. Hawkins
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
2toLead Limited
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
Maria Levchenko
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
Gabriella Davis
Último
(20)
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
Extending Operators in Perl with Operator::Util
1.
Operator::Util
Nick Patch Perl Seminar NY 15 February 2011
2.
released yesterday
3.
released yesterday
i ♥ feedback
4.
Perl 6 is
pretty cool
5.
meta-operators
6.
meta-operators [ ☺] Z
☺ X ☺ » ☺«
7.
reduction [+] 1..4
# 10 [*] 1..4 # 24 [~] 'a'..'d' # 'abcd'
8.
zip (1,2) Z+ (2,3)
# 3,5 (1,2) Z* (2,3) # 2,6 (1,2) Z~ <a b> # 1a,2b
9.
cross (flat) (1,2) X+
(2,3) # 3,4,4,5 (1,2) X* (2,3) # 2,3,4,6 (1,2) X~ <a b> # 1a,1b,2a,2b
10.
cross (lol) (1,2) X+
(2,3) # [3,4],[4,5] (1,2) X* (2,3) # [2,3],[4,6] (1,2) X~ <a b> # [1a,1b],[2a,2b]
11.
hyper 1..4
»~« 'a'..'d' # 1a,2b,3c,4d 1..4 »~» 'x' # 1x,2x,3x,4x 1..4 «~» <x y> # 1x,2y,1x,2y 1..4 «~« <x y> # 1x,2y
12.
more hyper! -« (1,2,3)
# -1,-2,-3 [1,[2,3]] »++ # [2,[3,4]] %foo «+» %bar # intersection %foo »+« %bar # union %foo »+=« %bar # %foo = union
13.
but it's not
Xmas yet
14.
cpanm Operator::Util
15.
use Operator::Util qw(
reducewith zipwith crosswith hyperwith );
16.
reducewith a.k.a. reduce
hyperwith a.k.a. hyper
17.
reduction reduce('+', [1..4])
# 10 reduce('*', [1..4]) # 24 reduce('.', ['a'..'d']) # 'abcd'
18.
zip zipwith('+', [1,2], [2,3])
# 3,5 zipwith('*', [1,2], [2,3]) # 2,6 zipwith('.', [1,2], ['a','b']) # 1a,2b
19.
cross (flat) crosswith('+', [1,2],
[2,3]) crosswith('*', [1,2], [2,3]) crosswith('.', [1,2], ['a','b']) # 3,4,4,5 # 2,3,4,6 # 1a,1b,2a,2b
20.
cross (lol) crosswith('+', [1,2],
[2,3], flat=>0) crosswith('*', [1,2], [2,3], flat=>0) crosswith('.', [1,2], ['a','b'], flat=>0) # [3,4],[4,5] # [2,3],[4,6] # [1a,1b],[2a,2b]
21.
hyper hyper('.',
[1..4], ['a'..'d'] ); hyper('.', [1..4], 'x', dwim_right=>1); hyper('.', [1..4], ['x','y'], dwim=>1 ); hyper('.', [1..4], ['x','y'], dwim_left=>1 ); # 1a,2b,3c,4d # 1x,2x,3x,4x # 1x,2y,1x,2y # 1x,2y
22.
more hyper! hyper('prefix:-',
[1,2,3]); hyper('postfix:++', [1,[2,3]]); hyper('+', %foo, %bar, dwim=>1); hyper('+', %foo, %bar); hyper('+=', %foo, %bar); # -1,-2,-3 # [2,[3,4]] # intersection # union # %foo = union
23.
default ops
zipwith(',', [1,2], ['a','b']) zip( [1,2], ['a','b']) crosswith(',', [1,2], ['a','b']) cross( [1,2], ['a','b']) # 1,a,2,b # 1,a,2,b # 1,a,1,b,2,a,2,b # 1,a,1,b,2,a,2,b
24.
associativity
reduce('-', [4, 3, 2]) reduce('**', [4, 3, 2]) # 4-3-2 = (4-3)-2 = -1 # 4**3**2 = 4**(3**2) = 262144
25.
chaining reduce('eq', @a)
# all elements eq? reduce('!=', @c) # no repeating elements? reduce('<', @b) # ascending elements?
26.
dwim for <
2 elems reduce('+', [] ) # 0 reduce('+', [5]) # 5 reduce('*', [] ) # 1 reduce('*', [5]) # 5
27.
even more hyper! hyper('->',
@objects, 'run', dwim=>1) hyper('+', [[1, 2], 3], [4, [5, 6]], dwim=>1) hyper('prefix:-', {a => 1, b => 2, c => 3}) # call ->run() on each # [[5, 6], [8, 9]] # a => -1, b => -2, c => -3
28.
resources git:
github.com/patch slides: patch.github.com
Baixar agora