Submit Search
Upload
Functional perl
•
Download as ODP, PDF
•
0 likes
•
1,211 views
E
Errorific
Follow
Unpolished talk on functional concepts in perl.
Read less
Read more
Technology
Report
Share
Report
Share
1 of 59
Download now
Recommended
PHP 101
PHP 101
Muhammad Hijazi
Selected Bash shell tricks from Camp CDL breakout group
Selected Bash shell tricks from Camp CDL breakout group
John Kunze
Codigos
Codigos
Brian Joseff
Class 7a: Functions
Class 7a: Functions
Marc Gouw
PHP performance 101: so you need to use a database
PHP performance 101: so you need to use a database
Leon Fayer
Python programming : Standard Input and Output
Python programming : Standard Input and Output
Emertxe Information Technologies Pvt Ltd
Database performance 101
Database performance 101
Leon Fayer
Python : Dictionaries
Python : Dictionaries
Emertxe Information Technologies Pvt Ltd
Recommended
PHP 101
PHP 101
Muhammad Hijazi
Selected Bash shell tricks from Camp CDL breakout group
Selected Bash shell tricks from Camp CDL breakout group
John Kunze
Codigos
Codigos
Brian Joseff
Class 7a: Functions
Class 7a: Functions
Marc Gouw
PHP performance 101: so you need to use a database
PHP performance 101: so you need to use a database
Leon Fayer
Python programming : Standard Input and Output
Python programming : Standard Input and Output
Emertxe Information Technologies Pvt Ltd
Database performance 101
Database performance 101
Leon Fayer
Python : Dictionaries
Python : Dictionaries
Emertxe Information Technologies Pvt Ltd
Python легко и просто. Красиво решаем повседневные задачи
Python легко и просто. Красиво решаем повседневные задачи
Maxim Kulsha
Closure, Higher-order function in Swift
Closure, Higher-order function in Swift
SeongGyu Jo
Share test
Share test
Anton Stuk
Functional programming in Python
Functional programming in Python
Colin Su
Closures
Closures
SV.CO
Ramda, a functional JavaScript library
Ramda, a functional JavaScript library
Derek Willian Stavis
Beginning Haskell, Dive In, Its Not That Scary!
Beginning Haskell, Dive In, Its Not That Scary!
priort
Linguagem sql
Linguagem sql
Tic Eslc
Perl6 one-liners
Perl6 one-liners
Andrew Shitov
Ramda lets write declarative js
Ramda lets write declarative js
Pivorak MeetUp
The secrets of inverse brogramming
The secrets of inverse brogramming
Richie Cotton
Linux class 15 26 oct 2021
Linux class 15 26 oct 2021
Khawar Nehal khawar.nehal@atrc.net.pk
Functional Pattern Matching on Python
Functional Pattern Matching on Python
Daker Fernandes
Sharper tools with F#
Sharper tools with F#
Kevin Avignon
Menu func-sh(1)
Menu func-sh(1)
Ben Pope
Rakudo
Rakudo
awwaiid
Workshop on command line tools - day 1
Workshop on command line tools - day 1
Leandro Lima
Side by Side - Scala and Java Adaptations of Martin Fowler’s Javascript Refac...
Side by Side - Scala and Java Adaptations of Martin Fowler’s Javascript Refac...
Philip Schwarz
Workshop on command line tools - day 2
Workshop on command line tools - day 2
Leandro Lima
Road to Power Query NINJA – 1st STEP
Road to Power Query NINJA – 1st STEP
Takeshi Kagata
Crv book n ys
Crv book n ys
Jaksa Nikodijevic
Program and Project Management at the New World Trade Center
Program and Project Management at the New World Trade Center
novacsi
More Related Content
What's hot
Python легко и просто. Красиво решаем повседневные задачи
Python легко и просто. Красиво решаем повседневные задачи
Maxim Kulsha
Closure, Higher-order function in Swift
Closure, Higher-order function in Swift
SeongGyu Jo
Share test
Share test
Anton Stuk
Functional programming in Python
Functional programming in Python
Colin Su
Closures
Closures
SV.CO
Ramda, a functional JavaScript library
Ramda, a functional JavaScript library
Derek Willian Stavis
Beginning Haskell, Dive In, Its Not That Scary!
Beginning Haskell, Dive In, Its Not That Scary!
priort
Linguagem sql
Linguagem sql
Tic Eslc
Perl6 one-liners
Perl6 one-liners
Andrew Shitov
Ramda lets write declarative js
Ramda lets write declarative js
Pivorak MeetUp
The secrets of inverse brogramming
The secrets of inverse brogramming
Richie Cotton
Linux class 15 26 oct 2021
Linux class 15 26 oct 2021
Khawar Nehal khawar.nehal@atrc.net.pk
Functional Pattern Matching on Python
Functional Pattern Matching on Python
Daker Fernandes
Sharper tools with F#
Sharper tools with F#
Kevin Avignon
Menu func-sh(1)
Menu func-sh(1)
Ben Pope
Rakudo
Rakudo
awwaiid
Workshop on command line tools - day 1
Workshop on command line tools - day 1
Leandro Lima
Side by Side - Scala and Java Adaptations of Martin Fowler’s Javascript Refac...
Side by Side - Scala and Java Adaptations of Martin Fowler’s Javascript Refac...
Philip Schwarz
Workshop on command line tools - day 2
Workshop on command line tools - day 2
Leandro Lima
Road to Power Query NINJA – 1st STEP
Road to Power Query NINJA – 1st STEP
Takeshi Kagata
What's hot
(20)
Python легко и просто. Красиво решаем повседневные задачи
Python легко и просто. Красиво решаем повседневные задачи
Closure, Higher-order function in Swift
Closure, Higher-order function in Swift
Share test
Share test
Functional programming in Python
Functional programming in Python
Closures
Closures
Ramda, a functional JavaScript library
Ramda, a functional JavaScript library
Beginning Haskell, Dive In, Its Not That Scary!
Beginning Haskell, Dive In, Its Not That Scary!
Linguagem sql
Linguagem sql
Perl6 one-liners
Perl6 one-liners
Ramda lets write declarative js
Ramda lets write declarative js
The secrets of inverse brogramming
The secrets of inverse brogramming
Linux class 15 26 oct 2021
Linux class 15 26 oct 2021
Functional Pattern Matching on Python
Functional Pattern Matching on Python
Sharper tools with F#
Sharper tools with F#
Menu func-sh(1)
Menu func-sh(1)
Rakudo
Rakudo
Workshop on command line tools - day 1
Workshop on command line tools - day 1
Side by Side - Scala and Java Adaptations of Martin Fowler’s Javascript Refac...
Side by Side - Scala and Java Adaptations of Martin Fowler’s Javascript Refac...
Workshop on command line tools - day 2
Workshop on command line tools - day 2
Road to Power Query NINJA – 1st STEP
Road to Power Query NINJA – 1st STEP
Viewers also liked
Crv book n ys
Crv book n ys
Jaksa Nikodijevic
Program and Project Management at the New World Trade Center
Program and Project Management at the New World Trade Center
novacsi
How to Build a Tower
How to Build a Tower
alaska150
Functional Planning of a Building
Functional Planning of a Building
Mr. Ramesh Nayaka
اسس تصميم المباني الادارية Office building design & The Edge Office a Greenes...
اسس تصميم المباني الادارية Office building design & The Edge Office a Greenes...
Ahmed SHoukry ELhfnawy
مباني ادارية
مباني ادارية
freemadoo
State of Education in the Philippines 2012
State of Education in the Philippines 2012
Arangkada Philippines
Burj khalifa
Burj khalifa
Safa Aboelssaad
Viewers also liked
(8)
Crv book n ys
Crv book n ys
Program and Project Management at the New World Trade Center
Program and Project Management at the New World Trade Center
How to Build a Tower
How to Build a Tower
Functional Planning of a Building
Functional Planning of a Building
اسس تصميم المباني الادارية Office building design & The Edge Office a Greenes...
اسس تصميم المباني الادارية Office building design & The Edge Office a Greenes...
مباني ادارية
مباني ادارية
State of Education in the Philippines 2012
State of Education in the Philippines 2012
Burj khalifa
Burj khalifa
Similar to Functional perl
Functional Pearls 4 (YAPC::EU::2009 remix)
Functional Pearls 4 (YAPC::EU::2009 remix)
osfameron
Simple Ways To Be A Better Programmer (OSCON 2007)
Simple Ways To Be A Better Programmer (OSCON 2007)
Michael Schwern
Perl6 a whistle stop tour
Perl6 a whistle stop tour
Simon Proctor
Perl6 a whistle stop tour
Perl6 a whistle stop tour
Simon Proctor
perl usage at database applications
perl usage at database applications
Joe Jiang
From Javascript To Haskell
From Javascript To Haskell
ujihisa
Is Haskell an acceptable Perl?
Is Haskell an acceptable Perl?
osfameron
Writing Maintainable Perl
Writing Maintainable Perl
tinypigdotcom
Good Evils In Perl (Yapc Asia)
Good Evils In Perl (Yapc Asia)
Kang-min Liu
Good Evils In Perl
Good Evils In Perl
Kang-min Liu
How to write code you won't hate tomorrow
How to write code you won't hate tomorrow
Pete McFarlane
Perl6 Regexen: Reduce the line noise in your code.
Perl6 Regexen: Reduce the line noise in your code.
Workhorse Computing
Why async and functional programming in PHP7 suck and how to get overr it?
Why async and functional programming in PHP7 suck and how to get overr it?
Lucas Witold Adamus
Mips1
Mips1
Stefano Salvatori
FP in scalaで鍛える関数型脳
FP in scalaで鍛える関数型脳
Yuri Inoue
Top 10 php classic traps
Top 10 php classic traps
Damien Seguy
Internationalizing CakePHP Applications
Internationalizing CakePHP Applications
Pierre MARTIN
PHPCon 2016: PHP7 by Witek Adamus / XSolve
PHPCon 2016: PHP7 by Witek Adamus / XSolve
XSolve
Refactoring to Macros with Clojure
Refactoring to Macros with Clojure
Dmitry Buzdin
Neatly Hashing a Tree: FP tree-fold in Perl5 & Perl6
Neatly Hashing a Tree: FP tree-fold in Perl5 & Perl6
Workhorse Computing
Similar to Functional perl
(20)
Functional Pearls 4 (YAPC::EU::2009 remix)
Functional Pearls 4 (YAPC::EU::2009 remix)
Simple Ways To Be A Better Programmer (OSCON 2007)
Simple Ways To Be A Better Programmer (OSCON 2007)
Perl6 a whistle stop tour
Perl6 a whistle stop tour
Perl6 a whistle stop tour
Perl6 a whistle stop tour
perl usage at database applications
perl usage at database applications
From Javascript To Haskell
From Javascript To Haskell
Is Haskell an acceptable Perl?
Is Haskell an acceptable Perl?
Writing Maintainable Perl
Writing Maintainable Perl
Good Evils In Perl (Yapc Asia)
Good Evils In Perl (Yapc Asia)
Good Evils In Perl
Good Evils In Perl
How to write code you won't hate tomorrow
How to write code you won't hate tomorrow
Perl6 Regexen: Reduce the line noise in your code.
Perl6 Regexen: Reduce the line noise in your code.
Why async and functional programming in PHP7 suck and how to get overr it?
Why async and functional programming in PHP7 suck and how to get overr it?
Mips1
Mips1
FP in scalaで鍛える関数型脳
FP in scalaで鍛える関数型脳
Top 10 php classic traps
Top 10 php classic traps
Internationalizing CakePHP Applications
Internationalizing CakePHP Applications
PHPCon 2016: PHP7 by Witek Adamus / XSolve
PHPCon 2016: PHP7 by Witek Adamus / XSolve
Refactoring to Macros with Clojure
Refactoring to Macros with Clojure
Neatly Hashing a Tree: FP tree-fold in Perl5 & Perl6
Neatly Hashing a Tree: FP tree-fold in Perl5 & Perl6
Recently uploaded
How to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
naman860154
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
2toLead Limited
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
carlostorres15106
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
BookNet Canada
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Enjoy Anytime
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
Padma Pradeep
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
OnBoard
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
HostedbyConfluent
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
Puma Security, LLC
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
Delhi Call girls
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
Neo4j
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Safe Software
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
Allon Mureinik
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
Delhi Call girls
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
Pooja Nehwal
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
Softradix Technologies
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
Scott Keck-Warren
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
Delhi Call girls
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
BookNet Canada
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
null - The Open Security Community
Recently uploaded
(20)
How to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Functional perl
1.
Functional Programming
Perl Christopher Mckay error@errorific.com
2.
What Am I
3.
What's this talk
all about?
4.
History
5.
How
6.
Why not?
7.
But I don't
use/appreciate/like perl?
8.
Functional Programming is
Easy
9.
So easy sysadmins
do it
10.
In the beginning...
11.
12.
Wrote Pearl Perl
13.
People wanted a
sort function Larry was generous
14.
sort F(a, a), [a]
--------> [a]
15.
@sorted_list =
sort {$_[0] <=> $_[1]} @list
16.
@sorted_list =
sort {$a <=> $b } @list
17.
@sorted_list
= sort {$a <=> $b} @list
18.
sort
String sorting sort {$a cmp $b} Also string sorting sort {$a <=> $b} Sort numerically sort &comparator Sort by function named comparator
19.
sort {
@a = split ///, $a; @b = split ///, $b; ($a[2] <=> $b[2]) || ($a[1] <=> $b[1]) || ($a[0] <=> $b[0]) || 0; } @list_of_dmy_dates
20.
1988 - Perl
2.0 1989 - Perl 3.0 1991 - Perl 4.0
21.
grep F(a, a), [a]
--------> [a]
22.
map F(a), [a] -------->
[a]
23.
1994 – Perl
5.0
24.
memoize F(a) → b
--------------> F(a) → b
25.
List::Util
reduce F(a, b) → b, [a] --------------> b
26.
List::MoreUtils any, all, none,
notall, true, false, firstidx, first_index, lastidx, part, mesh, last_index, insert_after, zip, uniq, apply, indexes, after, after_incl, before, before_incl, firstval, first_value, lastval, last_value, pairwise, distinct, minmax
27.
28.
So Perl evolved
a functional theme
29.
So how do
I make functional stuff in perl instead of just using it?
30.
Lexical scoping
31.
First class functions
32.
That's about it. Your
language does that too right?
33.
So lets write
a function that rolls a die
34.
my $dx =
sub { my ($sides) = @_; return (rand() * $sides) + 1; } my $roll = $dx->(6);
35.
I don't like
rolling 1's though so...
36.
my $cheat =
sub { my ($roll) = @_; if ($roll < 2) { return 2; } else { return $roll; } }
37.
I don't want
to get caught turning the die over though so ...
38.
my $inconspicuous_dx =
sub { my ($sides) = @_; return $cheat->($dx->($sides)); }
39.
my $compose =
sub { my ($fa, $fb) = @_; return sub { return $fa->($fb->(@_)); } }
40.
my $inconspicuous_dx =
$compose->($cheat, $dx); my $better_roll = $inconspicuous_dx->(6);
41.
Monads in Perl Masahiro
Honma (hiratara) YAPC::Asia 2011 Slides are in english Data::Monad
42.
All I ever
need is d6!
43.
my $d6 =
sub { return $inconspicuous_dx->(6); }; my $roll_a_6 = $d6->();
44.
Too lazy to
roll 20d6
45.
my $dice_tower_maker =
sub { my ($die) = @_; return sub { my ($rolls) = @_; return map { $die->() } (1 .. $rolls); } }
46.
my $dice_tower =
$dice_tower_generator->($d6); say join(', ', $dice_tower->(20));
47.
use List::Util; say sum
$dice_tower->(20);
48.
use List::Util; say reduce
{$a + $b} $dice_tower->(20);
49.
So why not
use this stuff for everything?
50.
The compilers not
out to help you
51.
Declaring functions gets
obtuse after awhile
52.
Purity isn't an
option, everything changes
53.
The community loves
objects
54.
If it was
simple in a functional language it probably takes some hacking to make it work in perl
55.
And the language
isn't extensible, yet
56.
Good things are
to come
57.
Perl 6
58.
Static typing
Better syntax Blocks and closures List comprehension Automatic parallelisation Lots more
59.
Thanks Questions?
Download now