Title: ? ppencode for Perl lover ?
1? ppencode for Perl lover ?
?? ??
TAKESAKO Yoshinori
2Quiz
3Q1. What does it mean?
??
? the Cabal comes to Japan
??
4Larry?
Damian
????(???)???!!
5Welcome to Japan
- ????????! m(_ _)m
- Yet Another Perl Conference
6Where is the Next Conference?
????????????????
7Where is this place?
waterfall ?
8Come on in, the water's fine.
- Waterfalls
- Not just for tourists.
- ??????????
- ??????????????
- for most programmers! (except hackers)
- ???????????????!
??????
9??????? ????????
10??????????
11(No Transcript)
12Escape
a water grave
????????????!
13use Ruby
14Talks1 Ruby On Snails
- ?????????????????
- Slow down development with this new framework
- by Dave Thomas and Mike Clark
15Waterfall 2006 Conference
- Location
- Niagara Falls, NY
- ???????(???????)???
- Date
- April 1st, 2006
- ????4?1?
the day after tomorrow !
http//www.waterfall2006.com/
16Talks2 Pair Managing
- Is not Pair Programming
- ???????????????
- 1??????????????2?
- Two Managers per Programmer
- by Jim Highsmith
?
?
?
173 Unfactoring from Patterns
- ?????????????
- Job Security through Unreadability
- by Joshua Kerievsky
18Unreadability?
Perl5?
19Unreadable
Perl5 code
?????Perl?????
20orz
21Sorry, Damian
and the other healthy nonsmokers
22Prescription(???)
23a Programming Language, too
?????????????
24Unreadable
Perl5?
?????????????????Perl5
25Sigils problem on Perl5
scalar array hash ------- ------ -------
s _at_a h s a0
h'?' s-gtfoo ? ?
26Sigils rule on Perl6
scalar array hash ------- ------ -------
s _at_a h s _at_a0 hlt?gt s.foo
_at_a.foo h.foo ?
27Readable
Perl6!
??????????????Perl6???!
28(No Transcript)
29OREILLY
30NOTREALLY
31(No Transcript)
32looks like
33Unreadable
JAPH!
?????JAPH????????
34But, its
Okay
??????????????????
35because
????
36Job Security through Unreadability
????????????????(?)
37Good job!
n ( ?) n_
_????? !! /,. ? i .,,E)
./ /" / /" _n ?????!! ./ /_?_
/ ?' ( l _? _ / / ,_? )/ / _? _
?????!! \ \ ( lt_, )( /( ,_? ) n
?___?? ? ? ? \ ( E) / /
\ ?? / ? ?_//
38JAPH
- print just another perl hacker
? ??????????JAPH
_at_asplit(/(\d)/, "4Hacker,2another3Perl1Just") sh
ift(_at_a)a_at_a print "_at_a1..4"
Randal Schwartz 1 Feb 1990 222858 GMT
???1,500- ?? ?? (?)
39hello world
package Earthsub Greet
_('Y','')_'!(Middle
Earth.ageltEarth
.age)?!(definedtimezOn
e2)?!(push_at_timeZone,loc
altime())?rotation?q?The Worl
d?q\wq\da-fq?..
?q."42b3d3728656
c6c6f6 0277f627c64672
b3072796e647 42b3b3rg7d"Ym
\\pu sh_at__,bless
c
ontinent
s\
pangaea l
ocal_at__local "o
cean"A(defi
nedcontinents)?
(vec(,
YYsplit(\' \',\
)3,YYsplit( q??,)2-
((Ytr/oa e
iu//)2))28160)?q
.q?!?\'?\'
AYs \Q.\Epack(
\'h\',j oin(q(),
grep_ Ym,,,
split("
",_at__0
)) )e
gexe d
"s ort
lt gt,
YY _at__
"'
s,(\r\n\s),,gs.Y.\x7e.g
evalGreet'the world'
http//www.perlmonks.org/index.pl?node_id329174
40Perl suck
Perl??????(?)
41use Ruby
42Brainwashed by Ruby
- We have been brainwashed by Takahasi-san
???????(??Ruby????)????????
43Perl??Ruby?????
I have yet another idea that every Perl mongers
want to use Ruby
Perl??Ruby????? ????????????
44The Best solution(???)
Steal the buttons of "" and "" from Perl
mongers' keyboard.
????????????????????
45most Perl mongers will have no alternative but
to use Ruby
?????Perl??????Ruby???
46It seems
Okay
??????????
47but
??
48Yet another Perl lover
???Perl????????????????????
!/usr/bin/perl -w q 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 YAPCAsia
49??????????????????
Programming Perl with only reserved
keywords and white spaces!
?????????!
without symbols!
50Reserved keywords(???)
Operators (38)
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
Built-in functions (182)
?????????
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
51But JAPH should not be written by manually
???JAPH?????????????
52No coding
? Best coding
????????? ????????
53? ppencode ?
??ppencode????????????????
54Demo????(Ajax??)
http//namazu.org/takesako/ppencode/demo.html
55ppencode is a JAPH generator
- I wrote only gen_ppencode.pl
ppencode (perl, JavaScirpt)
?
autogen
JAPH?
programming
autogen
input
output
gen_ppencode (6KB)
a message (8bit ok)
56No coding
? Best coding
????????? ????????
57Perl Ruby
vs
58Ruby version
??????(oxy??)?
- ./rrencode.rb 'hello, world!
- (,_at___at_)gtltlt(,(!!ltlt(?!(?/-?.?-?"
)))(?-?(?_-???/-?'))) (,,(!!ltlt(?!(?"
-?!?.-?,)))(?-?lt(?_-???-?!)))(,,(!!lt
lt(? !(?-?)?/-?-)))(?-?(?-??--?!)))(,
_\)gtltlt(,,(!!ltlt(? !?!?!))(?-?(?
-??--?!)))(,_)gtltlt(,,(!!ltlt(?!
(?'-? ?-?)))(?-?gt(?-?(?/-?'?)-?"))))(
,(!!ltlt(?!?!?!))(?-??
--?!))(,(!!ltlt(?!?!?!))(?-??"-?"))(
,_at__)gtltlt(, (!!ltlt(?!?!?!))(?-
?(?-?(?-??-?))))(,,(!!ltlt(?!(?/-
?. ?)-?')))(?-?(?-?(?/-?'?(-?!))))(,
(!!ltlt(?!(?'-??-?))))( ?-?gt(?-?(?-?
?-?))))(,,_)gtltlt(,(!!ltlt(?!(?
-?? -?()))(?-?(?-?gt?--?!)))(,,(!
!ltlt(?!?!?!))(?-?lt(?\\-?lt?(-?
)))(,,_at__at___at_)gtltlt(,(!!ltlt(?!(?--?,
?-?")))(?-??-?"))( ,_at__at___at_)gtltlt/
only symbols! without alphabets!
59We want Python version
_ n ( ???)? ??
pypyencode!
60Thank you
?? ??
TAKESAKO Yoshinori