SlideShare ist ein Scribd-Unternehmen logo
1 von 44
Downloaden Sie, um offline zu lesen
PL/PERL6
                  	
     	
  	
  @choplin


2010   7   31                               1
       	
  
            @choplin
            Bioinformatician	
  @Perl	
  -­‐>
            Web	
  &	
  DB	
  programmer@Server	
  Side	
  JavaScript
                         @
            okuno.a.aa             gmail.com



2010   7   31                                                            2
Perl

2010   7   31          3
LL   	
  Perl

2010   7   31                   4
2010   7   31   5
Usable	
  Perl6

                Rakudo	
  Star



2010   7   31                     6
?

                    7

2010   7   31           7
Perl6

                  •Smart	
  Match
                  •Junction
                  •etc.

2010   7   31                       8
!




2010   7   31       9
Cool!
2010   7    31                                                                                 10
2010   7   31   11
2010   7   31   12
10




2010   7   31   13
Perl7?

2010   7   31            14
2010   7   31   15
2010   7   31   16
17

2010   7   31        17
 =	
  


                     PL/Perl6

2010   7   31                   18
PL/Perl6

•PL	
  =	
  Procedural	
  Language
•PostgreSQL

•PostgreSQL                 Perl6

2010   7   31                        19
PL/Perl6
                •PL/Parrot	
  (by	
  Jonathan	
  "Duke"	
  
                Leto	
  	
  	
  	
  	
  	
  	
  	
  )	
  


                                             PL/Perl6
                                             PL/Parrot

                                             PostgreSQL
2010   7   31                                                 20
PL/Perl6                  LL

                                                         !
 $psql	
  -­‐C	
  “CREATE	
  FUNCTION	
  hello()	
  
 RETURNS	
  text	
  AS	
  $$	
  return	
  ‘hello’	
  $$	
  
 LANGUAGE	
  plperl6;	
  SELECT	
  hello();”
                        hello()
                        -­‐-­‐-­‐-­‐-­‐-­‐-­‐
                        hello
                                                         21

2010   7   31                                                 21
PL/Perl6

                Perl6	
  :	
  Object	
  Oriented
                                 +
       SQL	
  :	
  Functional	
  Oriented	
  ( )


2010   7   31                                      22
2010   7   31   23
 


2010   7   31          24
SQL


                      25

2010   7   31              25
Map



2010   7   31         26
CREATE	
  FUNCTION	
  perl_array()	
  RETURNS	
  text	
  AS	
  $$
 	
  	
  	
  	
  	
  	
  	
  	
  my	
  $ary	
  =	
  "1t2t3t4";
 	
  	
  	
  	
  	
  	
  	
  	
  return	
  $ary.join('t');
 $$	
  LANGUAGE	
  plperl6;

 CREATE	
  FUNCTION	
  perl_factorial(integer)	
  RETURNS	
  integer	
  AS	
  
 $$
 	
  	
  	
  	
  	
  	
  	
  	
  my	
  $ret	
  =	
  1;
 	
  	
  	
  	
  	
  	
  	
  	
  for	
  1..@_[0]	
  {	
  $ret	
  *=	
  $_	
  }
 	
  	
  	
  	
  	
  	
  	
  	
  return	
  $ret;
 $$	
  LANGUAGE	
  plperl6;

 SELECT
 	
  perl_factorial(elem)
 FROM
 (
 	
  	
  	
  	
  	
  	
  	
  	
  SELECT	
  CAST(unnest(string_to_array(perl_array(),	
  
 't'))	
  AS	
  integer	
  AS	
  elem
 )array
 ;
2010   7   31                                                                              27
Reduce



2010   7   31            28
CREATE	
  FUNCTION	
  perl_array()	
  RETURNS	
  text	
  AS	
  $$
	
  	
  	
  	
  	
  	
  	
  	
  my	
  $ary	
  =	
  "1t2t3t4";
	
  	
  	
  	
  	
  	
  	
  	
  return	
  $ary.join('t');
$$	
  LANGUAGE	
  plperl6;

SELECT
	
  CASE	
  mod(col,	
  2)	
  WHEN	
  0	
  THEN	
  'odd'	
  WHEN	
  1	
  THEN	
  'even'	
  END	
  AS	
  
mod
	
  ,count(col)
FROM
(
	
  	
  	
  	
  	
  	
  	
  	
  SELECT	
  CAST(unnest(string_to_array(perl_array(),	
  
't'))	
  AS	
  integer)	
  AS	
  elem
)array
GROUP	
  BY	
  mod


2010   7   31                                                                                        29
2010   7   31   30
Perl6
           map	
  {factorial($_)},	
  @array;



           my	
  @tmp	
  =	
  map	
  {%count{$_}++},	
  (map	
  {($_	
  %	
  2)	
  ??	
  
           'even'	
  !!	
  'odd'},	
  @ary);
2010   7   31                                                                           31
32

2010   7   31        32
Rakudo	
  Star
                LWP::Simple
                  JSON::Tiny

                                 33

2010   7   31                         33
CREATE	
  FUNCTION	
  twitter_public_timeline()	
  RETURNS	
  text	
  AS	
  $$
	
  	
  	
  	
  	
  	
  	
  	
  use	
  LWP::Simple;
	
  	
  	
  	
  	
  	
  	
  	
  use	
  JSON::Tiny;
	
  	
  	
  	
  	
  	
  	
  	
  my	
  $url	
  =	
  'http://api.twitter.com/1/statuses/
public_timeline.json';
	
  	
  	
  	
  	
  	
  	
  	
  my	
  $lwp	
  =	
  LWP::Simple.new;
	
  	
  	
  	
  	
  	
  	
  	
  my	
  $content	
  =	
  $lwp.get($url);
	
  	
  	
  	
  	
  	
  	
  	
  my	
  $json	
  =	
  from-­‐json($content);
	
  	
  	
  	
  	
  	
  	
  	
  my	
  @ary;
	
  	
  	
  	
  	
  	
  	
  	
  for	
  $json.values	
  -­‐>	
  $post{	
  @ary.push($post<text>)	
  }
	
  	
  	
  	
  	
  	
  	
  	
  return	
  @ary.join("t");
$$	
  LANGUAGE	
  plperl6;

SELECT	
  twitter_public_timeline();



2010   7   31                                                                                          34
psql:twitter.sql:31:	
  server	
  closed	
  the	
  connection	
  
                unexpectedly
                	
  This	
  probably	
  means	
  he	
  server	
  terminated	
  abnormally
                	
  before	
  of	
  while	
  processing	
  the	
  request.
                psql:twiter.sql:31:	
  connection	
  to	
  server	
  was	
  lost



                                                                          ?
                                                                                            35

2010   7   31                                                                                    35
2010   7   31   36
Perl5
CREATE	
  FUNCTION	
  twitter_public_timeline()	
  RETURNS	
  text	
  AS	
  $$
	
  	
  	
  	
  	
  	
  	
  	
  use	
  LWP::Simple;
	
  	
  	
  	
  	
  	
  	
  	
  use	
  JSON;
	
  	
  	
  	
  	
  	
  	
  	
  my	
  $url	
  =	
  'http://api.twitter.com/1/statuses/
public_timeline.json';
	
  	
  	
  	
  	
  	
  	
  	
  my	
  $content	
  =	
  get($url);
	
  	
  	
  	
  	
  	
  	
  	
  my	
  $json	
  =	
  decode_json($content);
	
  	
  	
  	
  	
  	
  	
  	
  my	
  @ary;
	
  	
  	
  	
  	
  	
  	
  	
  for	
  my	
  $post	
  (@{	
  $json	
  }){push(@ary,	
  $post-­‐>{text})}
	
  	
  	
  	
  	
  	
  	
  	
  return	
  join	
  "t",	
  @ary;
$$	
  LANGUAGE	
  plperlu;

SELECT	
  twitter_public_timeline;



2010   7   31                                                                                              37
$psql -f twitter_perl5.sql
                                     twitter_public_timeline
                                                                                                                                                        !
   --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
   putzz pensei qe era minaa :X (@piconn live on http://twitcam.com/1ezjg)
    Ok el #TL esta demasiado X.. chao pescao!
                                        (/_;)
   Royal Links in Vegas Simulates British Open Venues http://bit.ly/bBJcIT
   Calling my sister & i'm scared.
   "a necessidade de se manter um histórico é a de poder reler, ver
   erros e corrigi-los...e pq é engraçado reler as lezeras de sempre ^^"
   será que isso é a esperança do meu curso de fotografia indo embora? ):
   alhamdulillah uang 50 rb dr gd. Q gue yg ilang entah berantah,skr d
   ganti berkali lipat dr gd. Q jg,terima kasih Allah :)

   RT @amochoco:
   Jahatttt gak boleh ijin...hikss
   How To Make Money Blogging... Big Money http://bit.ly/aIkMuu
          3
                                                            !!!
                                                                                                            ♪                                                   RT @9_kumi_3:
   @NaluHawaii                                                                                                                                                             ♪
    kasih gue kelinci dong..
    sinceramente, eu acho que eu vou chorar quando Hannah Montana
   acabar... eu sou muuuuuito apaixonada por essa série...
    Photo: manhattan skyline http://tumblr.com/xxwel6auo
    Shit playin cards drinkin what's up???!!




                          Perl5                                                                                                                                                                   !
    mission accomplished.!!
   (20 rows)




                                                                                                                                                                                                                           38

2010   7   31                                                                                                                                                                                                                      38
 


2010   7   31          39
!!?


                http://leto.net/dukeleto.pl/2010/06/rakudo-­‐perl-­‐6-­‐in-­‐your-­‐postgresql-­‐database.html

2010   7   31                                                                                                    40
Leto	
  ++,	
  Moritz	
  Lenz++




           http://groups.google.com/group/plparrot/browse_thread/thread/7aebe2e5a043e175



2010   7   31                                                                              41
    	
  

                PL/Perl6

2010   7   31                  42
SQL
2010   7   31   43
See	
  more	
  about	
  PL/Parrot	
  and	
  PL/Perl6
                     http://pl.parrot.org/
                     http://github.com/leto/plparrot
                     http://groups.google.com/group/plparrot



2010   7   31                                                          44

Weitere ähnliche Inhalte

Was ist angesagt?

PHP Performance SfLive 2010
PHP Performance SfLive 2010PHP Performance SfLive 2010
PHP Performance SfLive 2010De Cock Xavier
 
Modern Getopt for Command Line Processing in Perl
Modern Getopt for Command Line Processing in PerlModern Getopt for Command Line Processing in Perl
Modern Getopt for Command Line Processing in PerlNova Patch
 
Zend con 2016 - Asynchronous Prorgamming in PHP
Zend con 2016 - Asynchronous Prorgamming in PHPZend con 2016 - Asynchronous Prorgamming in PHP
Zend con 2016 - Asynchronous Prorgamming in PHPAdam Englander
 
Hypers and Gathers and Takes! Oh my!
Hypers and Gathers and Takes! Oh my!Hypers and Gathers and Takes! Oh my!
Hypers and Gathers and Takes! Oh my!Workhorse Computing
 
On UnQLite
On UnQLiteOn UnQLite
On UnQLitecharsbar
 
Perl web app 테스트전략
Perl web app 테스트전략Perl web app 테스트전략
Perl web app 테스트전략Jeen Lee
 
The $path to knowledge: What little it take to unit-test Perl.
The $path to knowledge: What little it take to unit-test Perl.The $path to knowledge: What little it take to unit-test Perl.
The $path to knowledge: What little it take to unit-test Perl.Workhorse Computing
 
BASH Variables Part 1: Basic Interpolation
BASH Variables Part 1: Basic InterpolationBASH Variables Part 1: Basic Interpolation
BASH Variables Part 1: Basic InterpolationWorkhorse Computing
 
2010 Smith Scripting101
2010 Smith Scripting1012010 Smith Scripting101
2010 Smith Scripting101bokonen
 
BSDM with BASH: Command Interpolation
BSDM with BASH: Command InterpolationBSDM with BASH: Command Interpolation
BSDM with BASH: Command InterpolationWorkhorse Computing
 
Kansai.pm 10周年記念 Plack/PSGI 入門
Kansai.pm 10周年記念 Plack/PSGI 入門Kansai.pm 10周年記念 Plack/PSGI 入門
Kansai.pm 10周年記念 Plack/PSGI 入門lestrrat
 
YAPC::Brasil 2009, POE
YAPC::Brasil 2009, POEYAPC::Brasil 2009, POE
YAPC::Brasil 2009, POEThiago Rondon
 

Was ist angesagt? (20)

PHP Performance SfLive 2010
PHP Performance SfLive 2010PHP Performance SfLive 2010
PHP Performance SfLive 2010
 
Modern Getopt for Command Line Processing in Perl
Modern Getopt for Command Line Processing in PerlModern Getopt for Command Line Processing in Perl
Modern Getopt for Command Line Processing in Perl
 
Perl6 grammars
Perl6 grammarsPerl6 grammars
Perl6 grammars
 
Get your teeth into Plack
Get your teeth into PlackGet your teeth into Plack
Get your teeth into Plack
 
Findbin libs
Findbin libsFindbin libs
Findbin libs
 
Metadata-driven Testing
Metadata-driven TestingMetadata-driven Testing
Metadata-driven Testing
 
Zend con 2016 - Asynchronous Prorgamming in PHP
Zend con 2016 - Asynchronous Prorgamming in PHPZend con 2016 - Asynchronous Prorgamming in PHP
Zend con 2016 - Asynchronous Prorgamming in PHP
 
Hypers and Gathers and Takes! Oh my!
Hypers and Gathers and Takes! Oh my!Hypers and Gathers and Takes! Oh my!
Hypers and Gathers and Takes! Oh my!
 
On UnQLite
On UnQLiteOn UnQLite
On UnQLite
 
Perl6 in-production
Perl6 in-productionPerl6 in-production
Perl6 in-production
 
Perl web app 테스트전략
Perl web app 테스트전략Perl web app 테스트전략
Perl web app 테스트전략
 
The $path to knowledge: What little it take to unit-test Perl.
The $path to knowledge: What little it take to unit-test Perl.The $path to knowledge: What little it take to unit-test Perl.
The $path to knowledge: What little it take to unit-test Perl.
 
BASH Variables Part 1: Basic Interpolation
BASH Variables Part 1: Basic InterpolationBASH Variables Part 1: Basic Interpolation
BASH Variables Part 1: Basic Interpolation
 
Memory Manglement in Raku
Memory Manglement in RakuMemory Manglement in Raku
Memory Manglement in Raku
 
2010 Smith Scripting101
2010 Smith Scripting1012010 Smith Scripting101
2010 Smith Scripting101
 
BSDM with BASH: Command Interpolation
BSDM with BASH: Command InterpolationBSDM with BASH: Command Interpolation
BSDM with BASH: Command Interpolation
 
Kansai.pm 10周年記念 Plack/PSGI 入門
Kansai.pm 10周年記念 Plack/PSGI 入門Kansai.pm 10周年記念 Plack/PSGI 入門
Kansai.pm 10周年記念 Plack/PSGI 入門
 
Git::Hooks
Git::HooksGit::Hooks
Git::Hooks
 
YAPC::Brasil 2009, POE
YAPC::Brasil 2009, POEYAPC::Brasil 2009, POE
YAPC::Brasil 2009, POE
 
Short Introduction To "perl -d"
Short Introduction To "perl -d"Short Introduction To "perl -d"
Short Introduction To "perl -d"
 

Ähnlich wie 2010/7/31 LTの虎@LL Tiger

PHP in 2018 - Q4 - AFUP Limoges
PHP in 2018 - Q4 - AFUP LimogesPHP in 2018 - Q4 - AFUP Limoges
PHP in 2018 - Q4 - AFUP Limoges✅ William Pinaud
 
Perl6 a whistle stop tour
Perl6 a whistle stop tourPerl6 a whistle stop tour
Perl6 a whistle stop tourSimon Proctor
 
Perl6 a whistle stop tour
Perl6 a whistle stop tourPerl6 a whistle stop tour
Perl6 a whistle stop tourSimon Proctor
 
Tuga IT 2018 Summer Edition - The Future of C#
Tuga IT 2018 Summer Edition - The Future of C#Tuga IT 2018 Summer Edition - The Future of C#
Tuga IT 2018 Summer Edition - The Future of C#Paulo Morgado
 
Massively Parallel Processing with Procedural Python (PyData London 2014)
Massively Parallel Processing with Procedural Python (PyData London 2014)Massively Parallel Processing with Procedural Python (PyData London 2014)
Massively Parallel Processing with Procedural Python (PyData London 2014)Ian Huston
 
Introduction to source{d} Engine and source{d} Lookout
Introduction to source{d} Engine and source{d} Lookout Introduction to source{d} Engine and source{d} Lookout
Introduction to source{d} Engine and source{d} Lookout source{d}
 
The bytecode hocus pocus - JavaOne 2016
The bytecode hocus pocus - JavaOne 2016The bytecode hocus pocus - JavaOne 2016
The bytecode hocus pocus - JavaOne 2016Raimon Ràfols
 
Drupal 8 multilingual APIs
Drupal 8 multilingual APIsDrupal 8 multilingual APIs
Drupal 8 multilingual APIsGábor Hojtsy
 
Scala is java8.next()
Scala is java8.next()Scala is java8.next()
Scala is java8.next()daewon jeong
 
The bytecode mumbo-jumbo
The bytecode mumbo-jumboThe bytecode mumbo-jumbo
The bytecode mumbo-jumboRaimon Ràfols
 
Quick tour of PHP from inside
Quick tour of PHP from insideQuick tour of PHP from inside
Quick tour of PHP from insidejulien pauli
 
Python and rust 2018 pythonkorea jihun
Python and rust 2018 pythonkorea jihunPython and rust 2018 pythonkorea jihun
Python and rust 2018 pythonkorea jihunJIHUN KIM
 
Old Oracle Versions
Old Oracle VersionsOld Oracle Versions
Old Oracle VersionsJeffrey Kemp
 

Ähnlich wie 2010/7/31 LTの虎@LL Tiger (20)

Introducing perl6
Introducing perl6Introducing perl6
Introducing perl6
 
Php 7 evolution
Php 7 evolutionPhp 7 evolution
Php 7 evolution
 
PHP in 2018 - Q4 - AFUP Limoges
PHP in 2018 - Q4 - AFUP LimogesPHP in 2018 - Q4 - AFUP Limoges
PHP in 2018 - Q4 - AFUP Limoges
 
Perl6 a whistle stop tour
Perl6 a whistle stop tourPerl6 a whistle stop tour
Perl6 a whistle stop tour
 
Perl6 a whistle stop tour
Perl6 a whistle stop tourPerl6 a whistle stop tour
Perl6 a whistle stop tour
 
Apache pig
Apache pigApache pig
Apache pig
 
Plpgsql internals
Plpgsql internalsPlpgsql internals
Plpgsql internals
 
Tuga IT 2018 Summer Edition - The Future of C#
Tuga IT 2018 Summer Edition - The Future of C#Tuga IT 2018 Summer Edition - The Future of C#
Tuga IT 2018 Summer Edition - The Future of C#
 
Massively Parallel Processing with Procedural Python (PyData London 2014)
Massively Parallel Processing with Procedural Python (PyData London 2014)Massively Parallel Processing with Procedural Python (PyData London 2014)
Massively Parallel Processing with Procedural Python (PyData London 2014)
 
Introduction to source{d} Engine and source{d} Lookout
Introduction to source{d} Engine and source{d} Lookout Introduction to source{d} Engine and source{d} Lookout
Introduction to source{d} Engine and source{d} Lookout
 
The bytecode hocus pocus - JavaOne 2016
The bytecode hocus pocus - JavaOne 2016The bytecode hocus pocus - JavaOne 2016
The bytecode hocus pocus - JavaOne 2016
 
Having Fun Programming!
Having Fun Programming!Having Fun Programming!
Having Fun Programming!
 
Full Stack Clojure
Full Stack ClojureFull Stack Clojure
Full Stack Clojure
 
Drupal 8 multilingual APIs
Drupal 8 multilingual APIsDrupal 8 multilingual APIs
Drupal 8 multilingual APIs
 
Scala is java8.next()
Scala is java8.next()Scala is java8.next()
Scala is java8.next()
 
The bytecode mumbo-jumbo
The bytecode mumbo-jumboThe bytecode mumbo-jumbo
The bytecode mumbo-jumbo
 
Quick tour of PHP from inside
Quick tour of PHP from insideQuick tour of PHP from inside
Quick tour of PHP from inside
 
Python and rust 2018 pythonkorea jihun
Python and rust 2018 pythonkorea jihunPython and rust 2018 pythonkorea jihun
Python and rust 2018 pythonkorea jihun
 
Perl 101
Perl 101Perl 101
Perl 101
 
Old Oracle Versions
Old Oracle VersionsOld Oracle Versions
Old Oracle Versions
 

Mehr von Akihiro Okuno

qpstudy 2013.07 NoSQL
qpstudy 2013.07 NoSQLqpstudy 2013.07 NoSQL
qpstudy 2013.07 NoSQLAkihiro Okuno
 
カジュアルにソースコードリーディング
カジュアルにソースコードリーディングカジュアルにソースコードリーディング
カジュアルにソースコードリーディングAkihiro Okuno
 
Write parser with fun!
Write parser with fun!Write parser with fun!
Write parser with fun!Akihiro Okuno
 
groonga with PostgreSQL
groonga with PostgreSQLgroonga with PostgreSQL
groonga with PostgreSQLAkihiro Okuno
 
Start Vim script @Ujihisa.vim 2011/11/19
Start Vim script @Ujihisa.vim 2011/11/19Start Vim script @Ujihisa.vim 2011/11/19
Start Vim script @Ujihisa.vim 2011/11/19Akihiro Okuno
 
Mongo db勉強会20110730
Mongo db勉強会20110730Mongo db勉強会20110730
Mongo db勉強会20110730Akihiro Okuno
 
第一回Mongo dbソースコードリーディング 20110628
第一回Mongo dbソースコードリーディング 20110628第一回Mongo dbソースコードリーディング 20110628
第一回Mongo dbソースコードリーディング 20110628Akihiro Okuno
 

Mehr von Akihiro Okuno (8)

qpstudy 2013.07 NoSQL
qpstudy 2013.07 NoSQLqpstudy 2013.07 NoSQL
qpstudy 2013.07 NoSQL
 
カジュアルにソースコードリーディング
カジュアルにソースコードリーディングカジュアルにソースコードリーディング
カジュアルにソースコードリーディング
 
SQLの話
SQLの話SQLの話
SQLの話
 
Write parser with fun!
Write parser with fun!Write parser with fun!
Write parser with fun!
 
groonga with PostgreSQL
groonga with PostgreSQLgroonga with PostgreSQL
groonga with PostgreSQL
 
Start Vim script @Ujihisa.vim 2011/11/19
Start Vim script @Ujihisa.vim 2011/11/19Start Vim script @Ujihisa.vim 2011/11/19
Start Vim script @Ujihisa.vim 2011/11/19
 
Mongo db勉強会20110730
Mongo db勉強会20110730Mongo db勉強会20110730
Mongo db勉強会20110730
 
第一回Mongo dbソースコードリーディング 20110628
第一回Mongo dbソースコードリーディング 20110628第一回Mongo dbソースコードリーディング 20110628
第一回Mongo dbソースコードリーディング 20110628
 

Kürzlich hochgeladen

How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditSkynet Technologies
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 

Kürzlich hochgeladen (20)

How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance Audit
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 

2010/7/31 LTの虎@LL Tiger

  • 1. PL/PERL6      @choplin 2010 7 31 1
  • 2.    @choplin  Bioinformatician  @Perl  -­‐>  Web  &  DB  programmer@Server  Side  JavaScript  @  okuno.a.aa gmail.com 2010 7 31 2
  • 3. Perl 2010 7 31 3
  • 4. LL  Perl 2010 7 31 4
  • 5. 2010 7 31 5
  • 6. Usable  Perl6 Rakudo  Star 2010 7 31 6
  • 7. ? 7 2010 7 31 7
  • 8. Perl6 •Smart  Match •Junction •etc. 2010 7 31 8
  • 9. ! 2010 7 31 9
  • 10. Cool! 2010 7 31 10
  • 11. 2010 7 31 11
  • 12. 2010 7 31 12
  • 13. 10 2010 7 31 13
  • 14. Perl7? 2010 7 31 14
  • 15. 2010 7 31 15
  • 16. 2010 7 31 16
  • 17. 17 2010 7 31 17
  • 18.  =   PL/Perl6 2010 7 31 18
  • 19. PL/Perl6 •PL  =  Procedural  Language •PostgreSQL •PostgreSQL Perl6 2010 7 31 19
  • 20. PL/Perl6 •PL/Parrot  (by  Jonathan  "Duke"   Leto                )   PL/Perl6 PL/Parrot PostgreSQL 2010 7 31 20
  • 21. PL/Perl6 LL ! $psql  -­‐C  “CREATE  FUNCTION  hello()   RETURNS  text  AS  $$  return  ‘hello’  $$   LANGUAGE  plperl6;  SELECT  hello();” hello() -­‐-­‐-­‐-­‐-­‐-­‐-­‐ hello 21 2010 7 31 21
  • 22. PL/Perl6 Perl6  :  Object  Oriented + SQL  :  Functional  Oriented  ( ) 2010 7 31 22
  • 23. 2010 7 31 23
  • 24.   2010 7 31 24
  • 25. SQL 25 2010 7 31 25
  • 26. Map 2010 7 31 26
  • 27. CREATE  FUNCTION  perl_array()  RETURNS  text  AS  $$                my  $ary  =  "1t2t3t4";                return  $ary.join('t'); $$  LANGUAGE  plperl6; CREATE  FUNCTION  perl_factorial(integer)  RETURNS  integer  AS   $$                my  $ret  =  1;                for  1..@_[0]  {  $ret  *=  $_  }                return  $ret; $$  LANGUAGE  plperl6; SELECT  perl_factorial(elem) FROM (                SELECT  CAST(unnest(string_to_array(perl_array(),   't'))  AS  integer  AS  elem )array ; 2010 7 31 27
  • 28. Reduce 2010 7 31 28
  • 29. CREATE  FUNCTION  perl_array()  RETURNS  text  AS  $$                my  $ary  =  "1t2t3t4";                return  $ary.join('t'); $$  LANGUAGE  plperl6; SELECT  CASE  mod(col,  2)  WHEN  0  THEN  'odd'  WHEN  1  THEN  'even'  END  AS   mod  ,count(col) FROM (                SELECT  CAST(unnest(string_to_array(perl_array(),   't'))  AS  integer)  AS  elem )array GROUP  BY  mod 2010 7 31 29
  • 30. 2010 7 31 30
  • 31. Perl6 map  {factorial($_)},  @array; my  @tmp  =  map  {%count{$_}++},  (map  {($_  %  2)  ??   'even'  !!  'odd'},  @ary); 2010 7 31 31
  • 32. 32 2010 7 31 32
  • 33. Rakudo  Star LWP::Simple JSON::Tiny 33 2010 7 31 33
  • 34. CREATE  FUNCTION  twitter_public_timeline()  RETURNS  text  AS  $$                use  LWP::Simple;                use  JSON::Tiny;                my  $url  =  'http://api.twitter.com/1/statuses/ public_timeline.json';                my  $lwp  =  LWP::Simple.new;                my  $content  =  $lwp.get($url);                my  $json  =  from-­‐json($content);                my  @ary;                for  $json.values  -­‐>  $post{  @ary.push($post<text>)  }                return  @ary.join("t"); $$  LANGUAGE  plperl6; SELECT  twitter_public_timeline(); 2010 7 31 34
  • 35. psql:twitter.sql:31:  server  closed  the  connection   unexpectedly  This  probably  means  he  server  terminated  abnormally  before  of  while  processing  the  request. psql:twiter.sql:31:  connection  to  server  was  lost ? 35 2010 7 31 35
  • 36. 2010 7 31 36
  • 37. Perl5 CREATE  FUNCTION  twitter_public_timeline()  RETURNS  text  AS  $$                use  LWP::Simple;                use  JSON;                my  $url  =  'http://api.twitter.com/1/statuses/ public_timeline.json';                my  $content  =  get($url);                my  $json  =  decode_json($content);                my  @ary;                for  my  $post  (@{  $json  }){push(@ary,  $post-­‐>{text})}                return  join  "t",  @ary; $$  LANGUAGE  plperlu; SELECT  twitter_public_timeline; 2010 7 31 37
  • 38. $psql -f twitter_perl5.sql twitter_public_timeline ! -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- putzz pensei qe era minaa :X (@piconn live on http://twitcam.com/1ezjg) Ok el #TL esta demasiado X.. chao pescao! (/_;) Royal Links in Vegas Simulates British Open Venues http://bit.ly/bBJcIT Calling my sister & i'm scared. "a necessidade de se manter um histórico é a de poder reler, ver erros e corrigi-los...e pq é engraçado reler as lezeras de sempre ^^" será que isso é a esperança do meu curso de fotografia indo embora? ): alhamdulillah uang 50 rb dr gd. Q gue yg ilang entah berantah,skr d ganti berkali lipat dr gd. Q jg,terima kasih Allah :) RT @amochoco: Jahatttt gak boleh ijin...hikss How To Make Money Blogging... Big Money http://bit.ly/aIkMuu 3 !!! ♪ RT @9_kumi_3: @NaluHawaii ♪ kasih gue kelinci dong.. sinceramente, eu acho que eu vou chorar quando Hannah Montana acabar... eu sou muuuuuito apaixonada por essa série... Photo: manhattan skyline http://tumblr.com/xxwel6auo Shit playin cards drinkin what's up???!! Perl5 ! mission accomplished.!! (20 rows) 38 2010 7 31 38
  • 39.   2010 7 31 39
  • 40. !!? http://leto.net/dukeleto.pl/2010/06/rakudo-­‐perl-­‐6-­‐in-­‐your-­‐postgresql-­‐database.html 2010 7 31 40
  • 41. Leto  ++,  Moritz  Lenz++ http://groups.google.com/group/plparrot/browse_thread/thread/7aebe2e5a043e175 2010 7 31 41
  • 42.     PL/Perl6 2010 7 31 42
  • 43. SQL 2010 7 31 43
  • 44. See  more  about  PL/Parrot  and  PL/Perl6 http://pl.parrot.org/ http://github.com/leto/plparrot http://groups.google.com/group/plparrot 2010 7 31 44