ppencode n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
☣ ppencode ♨ PowerPoint Presentation
Download Presentation
☣ ppencode ♨

Loading in 2 Seconds...

play fullscreen
1 / 58

☣ ppencode ♨ - PowerPoint PPT Presentation


  • 151 Views
  • Uploaded on

☣ ppencode ♨. 竹迫 良範. TAKESAKO Yoshinori. ☣ ppencode ♨. 唐鳳. Otori-tan. Where is the Next Conference?. 下次 OSDC 要開在哪裡 ?. 這裡是哪裡 ?. “waterfall” 瀑布. 瀑布. 喜歡瀑布的人很多 不止觀光客而已 程式人也免不了 (Hacker 屬於例外 ). 落水. Waterfall. 模型. 天雨路滑 小心失足 …. 不斷重寫 = 生理災害. Escape.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about '☣ ppencode ♨' - gali


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
ppencode

☣ ppencode ♨

竹迫 良範

TAKESAKO Yoshinori

ppencode1

☣ ppencode ♨

唐鳳

Otori-tan

slide3

Where is

the Next

Conference?

下次 OSDC 要開在哪裡?

slide4
這裡是哪裡?

“waterfall”

瀑布

slide5
瀑布
  • 喜歡瀑布的人很多
    • 不止觀光客而已
    • 程式人也免不了
      • (Hacker 屬於例外)

落水

slide6

Waterfall

模型

天雨路滑

小心失足…

slide9

Escape

a watery grave

海底大逃難

ruby on snails
Ruby On Snails
  • 最新的開發工具
    • 讓您事倍功半!
      • by Dave Thomas and Mike Clark
200 7
2007年瀑布大會
  • 地點
    • Niagara Falls, NY
      • 尼加拉瓜大瀑布
  • 日期
    • April 1st, 2007
      • 二零零七年四月一日

http://www.waterfall2007.com/

pair managing
Pair Managing
  • 不是 Pair Programming
  • 最新的開發方式
    • 1Programmer
      • 2 Managers
        • by Jim Highsmith

unfactoring
Unfactoring
  • 反構
    • 讓程式愈來愈難懂
      • by Joshua Kerievsky
  • 複製
    • 貼上
      • 貼上
        • 貼上
          • 釋出!
slide15

難懂?

Perl5?

slide16

難懂的

Perl5程式?

slide18

戒煙

讓 Perl 程式的體質更健康

slide20

語言

補完計劃

slide21

難懂的

Perl5→

perl5
Perl5的印記問題

純量 陣列雜湊

------- ------ -------

$s @a %h

$$s $a[0] $h{'?'}

$s->foo ☹☹

perl6
Perl6的印記解決法

純量 陣列雜湊

------- ------ -------

$s @a %h

$$s @a[0] %h<?>

$s.foo @a.foo %h.foo

slide31
JAPH
  • print”just another perl hacker”;

● 史上第一個 JAPH

@a=split(/(\d)/,

"4Hacker,2another3Perl1Just");

shift(@a);%a=@a;

print "@a{1..4}";

Randal Schwartz 1 Feb 1990 22:28:58 GMT

税別¥1,500- 水野 貴明 (著)

slide32

但是

沒關係…

slide34

Job Security

through

Unreadability

程式沒人懂, 飯碗跑不掉

slide35

幹得好!

                ∩( ⌒)      ∩_ _グッジョブ !!/,. ノ      i.,,E).//"/ /"_n グッジョブ!!.//_、_    / ノ'  ( l_、 _ // ,_ノ` )/ / _、 _    グッジョブ!!   \ \ ( <_,` )(       /( ,_ノ` )      n     ヽ___ ̄ ̄ ノ ヽ     |  ̄     \    ( E)/ /   \   ヽフ    / ヽ ヽ_//

hello world
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~~~~~~~~~~~~~~~~~~~~~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~~~~~~~<=

~~~~~~~~~~~~>,~~~~~~~~~~~~~~~~~~~~~~~~~~YY

~~~~~~~~~~~@_~~~~~~~~~~~~~~~~~~~~~~~~

~~~~~~~~~"~~~~~~~~~~~~~~~~~~~';;

s,(~|\r|\n|\s),,g;s.Y.\x7e.g;

eval};Greet;'the world';

http://www.perlmonks.org/index.pl?node_id=329174

slide37

Perl

sucks

slide39
Ruby = 洗腦兵器
  • 高橋征義, YAPC::Asia 2006
perl ruby
讓 Perl 的人用 Ruby

我有個好主意

讓所有 Perl 程式員

都去用Ruby…

slide41
最佳解法

把 “$” 和 “;“兩個鍵

從 Perl 程式員的鍵盤上拔掉!

slide42

Perl 程式員

別無選擇

祇能忍痛

改用Ruby

slide43

猛一看

很有效…

slide45
反擊咒語!

硬派的Perl人, 不用標點也無所謂:

#!/usr/bin/perl -w

length q binmode glob and print chr ord uc q local and print chr ord uc qw q sin q and print chr oct ord q chr lc and print chr ord uc q oct do and print chr oct oct ord uc qw q fcntl q and print chr ord q stat s and print chr ord q qw q

→ print ”OSDC.tw\n”;

slide46

標點符號退散!

寫 Perl 程式

祇要用

保留字

空白鍵!

slide47
保留字

■ 算符… (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

■ 內建函式… (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

slide48

但是JAPH

不應該

用手寫

slide49

No coding

➥ Best coding

最好寫的程式

= 不用寫的程式

ppencode2

♨ ppencode ☣

所以竹迫君就寫了“ppencode”.

demo ajax
Demo (Ajax風味)

http://namazu.org/~takesako/ppencode/demo.html

ppencode japh
ppencode: JAPH 產生器
  • 其實他寫的是 gen_ppencode.pl

ppencode

(perl, JavaScirpt)

autogen

JAPH

programming

autogen

input

output

gen_ppencode

(6KB)

a message

(8bit ok)

slide53

No coding

➥ Best coding

大巧

= 不工

slide54

Perl

Ruby

vs

slide55
Ruby 版本
  • Ruby 的 rrencode 誕生!

吉田悠一さん(oxyさん)作

  • ./rrencode.rb 'hello, world!‘

($,^$$&&@_=$@);$><<($,|$$&&(%!%!<<(?!*(?/-?.+?$-?")))%(?}-?=+(?_-??+?/-?'))) +($,&$,||(%!%!<<(?!*(?"-?!+?.-?,)))%(?|-?<+(?_-??+?&-?!)))+($,&$,||(%!%!<<(? !*(?*-?)+?/-?-)))%(?}-?=+(?}-?]+?--?!)));($,|$$&&_=$\);$><<($,&$,||(%!%!<<(? !+?!+?!))%(?{-?;+(?]-?=+?--?!)));($,^$$&&_=$`);$><<($,&$,||(%!%!<<(?!*(?'-?& +?%-?#)))%(?~-?>+(?[-?;+(?/-?'+?)-?"))))+($,^$$&&(%!%!<<(?!+?!+?!))%(?{-?[+? --?!))+($,|$$&&(%!%!<<(?!+?!+?!))%(?]-?=+?"-?"));($,|$$&&@_=$~);$><<($,^$$&& (%!%!<<(?!+?!+?!))%(?}-?=+(?}-?]+(?;-?++?*-?#))))+($,&$,||(%!%!<<(?!*(?/-?.+ ?)-?')))%(?}-?=+(?~-?^+(?/-?'+?(-?!))))+($,^$$&&(%!%!<<(?!*(?'-?&+?+-?))))%( ?~-?>+(?}-?]+(?:-?*+?&-?$))));($,&$,||_=$&);$><<($,|$$&&(%!%!<<(?!*(?$-?#+?* -?()))%(?{-?;+(?^-?>+?--?!)))+($,&$,||(%!%!<<(?!+?!+?!))%(?|-?<+(?\\-?<+?(-? $)));($,&$,||@@_=$@);$><<($,^$$&&(%!%!<<(?!*(?--?,+?$-?")))%(?{-?[+?#-?"));( $,^$$&&@@_=$@);$><<$/

祇用符號! 沒有文字! (=Acme::EyeDrops)

python
Python 版本在哪裡?

_  ∩

( ゚∀゚)彡

 ⊂彡

pypyencode!

thank you

Thank you

感謝各位收看

唐鳳

Otori-tan

thank you1

Thank you

感謝各位收看

竹迫 良範

TAKESAKO Yoshinori