☣ ppencode for perl lover ♨
DESCRIPTION
☣ ppencode for Perl lover ♨. 竹迫 良範. TAKESAKO Yoshinori. r. Quiz. Q1. What does it mean?. 使徒. ← the Cabal comes to Japan. 来日. Larry と. Damian. キタ━━ ( ゚∀゚ )━━ ッ !!. Welcome to Japan. はい、ここで拍手 ! m(_ _)m Yet Another Perl Conference. Where is the Next Conference?. - PowerPoint PPT PresentationTRANSCRIPT
☣ ppencode for Perl lover ♨
竹迫 良範TAKESAKO Yoshinori
Quizr
使徒来日Q1. What does it mean?← the Cabal
comes to Japan
キタ━━ ( ゚∀゚ )━━ ッ !!Damia
n
Larryと
Welcome to Japan
はい、ここで拍手 ! m(_ _)m
Yet Another Perl Conference
Where is the NextConference?次のカンファレンスはどこでやる?
Where is this place?
“waterfall”滝
Come on in, the water's fine.
Waterfalls:Not just for tourists.
ウォーターフォールは:観光客だけのものじゃなくって
for most programmers! (except hackers)職業プログラマにも必要ですから!
落ちるな危険
滝底に落ちないように気をつける…
Waterfall Model
開発は
デスマーチになるかも
Escapea water grave
デスマーチから抜け出そう!
use Ruby;
Talks#1: Ruby On Snails
新フレームワークで開発を遅くしようSlow down development
with this new frameworkby Dave Thomas and Mike Clark
Waterfall 2006 Conference
LocationNiagara Falls, NY
ナイアガラの滝(ニューヨーク州)で開催
DateApril 1st, 2006
開催日は4月1日 the day after tomorrow !http://www.waterfall2006.com/
Talks#2: Pair Managing
Is not Pair Programmingペアプロじゃなくって、ペア管理
1人のプログラマにマネージャが2人Two Managers per Programmer
by Jim Highsmith ☹☻
☻
#3: Unfactoring from Patterns
読みにくいコードで職を守るJob Security through Unreadability
by Joshua Kerievsky
You don’t need to
Unreadability?
Perl5?
Unreadable
Perl5 code読みにくい Perl プログラム
orz
Sorry, Damian…Sorry, Damian…
and the other healthy nonsmokersand the other healthy nonsmokers
Prescription (処方箋)
a ProgrammingLanguage, too
プログラミング言語も同様に
Unreadable
Perl5→読みにくいプログラムを量産し続ける Perl5
Sigils problem on Perl5
scalar array hash------- ------ -------
$s @a %h
$$s $a[0] $h{'?'}
$s->foo ☹ ☹
Sigils rule on Perl6
scalar array hash------- ------ -------
$s @a %h
$$s @a[0] %h<?>
$s.foo @a.foo %h.foo
☺
Readable
Perl6!読みやすいプログラムを書ける Perl6 になる!
O’REILLY
NOT’REALLY
looks like…
Unreadable
JAPH!解読困難な JAPH に似ているかも?
But, it’s
Okay…でも、そんなことはどうでもいいんです
because…なぜなら・・・
Job Securitythrough
Unreadability読みにくいコードで職を守れるから(笑)
Good job! ∩ ( ⌒) ∩ _ _ グッジョブ !! /,. ノ i .,,E ) ./ /" / /" _n グッジョブ !! ./ /_ 、 _ / ノ ' ( l _ 、 _ / / ,_ ノ ` )/ / _ 、 _ グッジョブ !! \ \ ( <_,` )( /( ,_ ノ ` ) n ヽ ___  ̄ ̄ ノ ヽ |  ̄ \ ( E ) / / \ ヽフ / ヽ ヽ _ //
JAPH
print ”just another perl hacker”;
税別¥ 1,500- 水野 貴明 ( 著 )
@a=split(/(\d)/,
"4Hacker,2another3Perl1Just");
shift(@a);%a=@a;
print "@a{1..4}";
Randal Schwartz 1 Feb 1990 22:28:58 GMT
● 記録されている最初の JAPH
hello world
package Earth;sub Greet{ %_=('Y','~');$_='$;=!(Middle Earth.age~~~<Eart~~~~~~~~~~~~~h .age)?!(defined$ti~~~~~~~~~~~mez~~~On e[2])?!(push@time~~~~~~~~~~~~~~~~Zone,loc ~altime())?rotation?~~~~~~~~~~~~~q~~?The Worl ~~d?:q:[\w]::q=[\~~~~~~~~~~~~~~~~~d~a-f]=:q?..~~ ~~~?:q:.:;"42b3d3~~~~~~~~~~~~~~~~~~~~~728656c6c6f6 ~~~~~0277f627c64672~~~~~~~~~~~~~~~~~~~~~b3072796e647 ~~~~~~~42b3b3rg7d"=Ym~~~~~~~~~~~~~~~~~~~\$;~~*\;p~~~~u ~~~~~~~~~sh@_,$&;bless~~~~~~~~~~~~~~~~~~~~~~~~~$c~~~~~~~ ~~~~~~~~~o~ntine~~~~~n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Y.\x7e.g; eval};Greet;'the world';
http://www.perlmonks.org/index.pl?node_id=329174
Perlsuck
Perl ってサイテー(笑)
use Ruby;
Brainwashed by Ruby
We have been brainwashed by Takahasi-san
我々は高橋さん(日本 Ruby の会会長)に洗脳されている
Perl 厨に Ruby を使わせる
I have yet another idea that every Perl mongers
want to use Ruby…
Perl 厨に Ruby を使わせるもっと良い方法があります
The Best solution (最適解)
Steal the buttons of "$" and ";"from Perl mongers' keyboard.
キーボードから「 $ 」と「 ; 」を盗めばいいんだ
most Perl mongerswill have
no alternative but to use Ruby
そうすれば Perl 厨は仕方なく Ruby を使う
It seems
Okay…一見良さそうに見える…
butけど
Yet another Perl lover
#!/usr/bin/perl -wq chr uc and print chr ord uc qw q y q and print chr ord uc q map m and print chr oct ord q qx eq and print chr ord uc q oct do and print chr oct ord uc q chr lc and print chr oct ord uc q chr uc and print chr ord uc q map m and print chr ord qw q s q and print chr ord q tie gt and print chr ord q each le
→ print ”YAPC::Asia”;
本当に Perl を愛する人はこんなプログラムを書き始める:
Programming Perl with only
reserved keywordsand white spaces!
予約語とスペースだけでプログラミング
without symbols!記号を一切使わずに!
Reserved keywords (予約語)
lt gt le ge eq ne cmp not and or xor if else elsif while for foreach continue goto last local map my next redo require return use tr y s m q qq qr qw qx x
abs accept alarm atan2 bind binmode bless caller chdir chmod chomp chop chown chr chroot close closedir connect cos crypt dbmclose dbmopen defined delete die do dump each eof eval exec exists exit exp fcntl fileno flock fork formline getc getlogin getpeername getpgrp getppid getpriority getpwnam getgrnam gethostbyname getnetbyname getprotobyname getpwuid getgrgid getservbyname gethostbyaddr getnetbyaddr getprotobynumber getservbyport getpwent getgrent gethostent getnetent getprotoent getservent setpwent setgrent sethostent setnetent setprotoent setservent endpwent endgrent endhostent endnetent endprotoent endservent getsockname getsockopt glob gmtime grep hex import index int ioctl join keys kill lc lcfirst length link listen localtime log lstat mkdir msgctl msgget msgrcv msgsnd no oct open opendir ord pack pipe pop pos print printf push quotemeta rand read readdir readlink recv ref rename reset reverse rewinddir rindex rmdir scalar seek seekdir select semctl semget semop send setpgrp setpriority setsockopt shift shmctl shmget shmread shmwrite shutdown sin sleep socket socketpair sort splice split sprintf sqrt srand stat study substr symlink syscall sysread system syswrite tell telldir tie time times truncate uc ucfirst umask undef unlink unpack untie unshift utime values vec wait waitpid wantarray warn write
■ Built-in functions… (182)
■ Operators… (38)
数字があるため除外
But JAPH should not
be written by
manuallyでも、 JAPH は手で書くもんじゃない
よね
No coding➥ Best coding
コードはできるだけ書かないのが最善
♨ ppencode ☣
So I wrote “ppencode”.
で、 ppencode というプログラムを書いてみました
Demo をどうぞ( Ajax 風味)
http://namazu.org/~takesako/ppencode/demo.html
ppencode is a JAPH generator
I wrote only gen_ppencode.pl
gen_ppencode(6KB)
ppencode(perl, JavaScirpt)
a message(8bit ok)
programming JAPHautogen
inputoutput
autogen
♨
No coding➥ Best coding
コードはできるだけ書かないのが最善
Perl
Rubyvs
Ruby version
Ruby で rrencode が誕生!./rrencode.rb 'hello, world!‘
($,^$$&&@_=$@);$><<($,|$$&&(%!%!<<(?!*(?/-?.+?$-?")))%(?}-?=+(?_-??+?/-?'))) +($,&$,||(%!%!<<(?!*(?"-?!+?.-?,)))%(?|-?<+(?_-??+?&-?!)))+($,&$,||(%!%!<<(? !*(?*-?)+?/-?-)))%(?}-?=+(?}-?]+?--?!)));($,|$$&&_=$\);$><<($,&$,||(%!%!<<(? !+?!+?!))%(?{-?;+(?]-?=+?--?!)));($,^$$&&_=$`);$><<($,&$,||(%!%!<<(?!*(?'-?& +?%-?#)))%(?~-?>+(?[-?;+(?/-?'+?)-?"))))+($,^$$&&(%!%!<<(?!+?!+?!))%(?{-?[+? --?!))+($,|$$&&(%!%!<<(?!+?!+?!))%(?]-?=+?"-?"));($,|$$&&@_=$~);$><<($,^$$&& (%!%!<<(?!+?!+?!))%(?}-?=+(?}-?]+(?;-?++?*-?#))))+($,&$,||(%!%!<<(?!*(?/-?.+ ?)-?')))%(?}-?=+(?~-?^+(?/-?'+?(-?!))))+($,^$$&&(%!%!<<(?!*(?'-?&+?+-?))))%( ?~-?>+(?}-?]+(?:-?*+?&-?$))));($,&$,||_=$&);$><<($,|$$&&(%!%!<<(?!*(?$-?#+?* -?()))%(?{-?;+(?^-?>+?--?!)))+($,&$,||(%!%!<<(?!+?!+?!))%(?|-?<+(?\\-?<+?(-? $)));($,&$,||@@_=$@);$><<($,^$$&&(%!%!<<(?!*(?--?,+?$-?")))%(?{-?[+?#-?"));( $,^$$&&@@_=$@);$><<$/
only symbols! without alphabets!
吉田悠一さん( oxy さん)作
We want Python version
_ ∩ ( ゚∀゚ )彡 ⊂彡
pypyencode!
Thank you
ご清聴ありがとうございました
竹迫 良範TAKESAKO Yoshinori