☺{{#c|Pugs}}☻ の紹介 {{#q|唐鳳}} ---- {{#c|P}}ractical {{#c|E}}xtraction & {{#c|R}}eport {{#c|L}}anguage ---- {{#c|実用主義}} の情報抽出 レポート言語 ---- {{#c|P}}athologically {{#c|E}}clectic {{#c|R}}ubbish {{#c|L}}ister ---- 病的{{#c|折衷主義}} ガラクタ 出力機でもある ---- {{img src="/img/spacer.gif"> +? } rule term { <comment> | <alternation> | <non_alternation> } rule comment { \# \N* } rule alternation { <non_alternation> \| <term>+? } rule non_alternation { … } } ---- {{#c|✓ オブジェクト}} ---- ✓ オブジェクト {{#c|✓ 結合演算子}} ---- ✓ オブジェクト ✓ 結合演算子 {{#c|✓ 関数プログラミング}} ---- {{#c|←}} ---- 同梱 {{#c|← Perl5}} ---- ← Perl5 {{#c|← Parrot}} ---- ← Perl5 ← Parrot {{#c|← Haskell}} ---- {{#c|⇒}} ---- {{#c|pugscc}} ---- PIL {{#c|コンパイラ}} ---- {{#c|P}}ugs {{#c|I}}ntermediate {{#c|L}}anguage ---- {{#c|中間}} 言語 ---- コード生成 {{#c|⇒ Perl5}} ---- ⇒ Perl5 {{#c|⇒ Parrot}} ---- ⇒ Perl5 ⇒ Parrot {{#c|⇒ JavaScript}} ---- {{img src="/img/spacer.gif"> 1, y => 1, z => 0, @_);}} … } ---- {{#ui|# Perl 5}} sub render { my $self = shift; my %opts = (x => 1, y => 1, z => 0, @_); for my $item ({{#c| $self->filter(@{ $self->{_items} } }}) { … } } ---- {{#ui|# Perl 5}} sub render { my $self = shift; my %opts = (x => 1, y => 1, z => 0, @_); for my $item ( $self->filter(@{ $self->{_items} }) ) { {{#c| print $item->draw( }} {{#c| x => $opts{x}, }} {{#c| y => $opts{y}, }} {{#c| z => $opts{z}, }} {{#c| ), "\n"; }} } } ---- {{#ui|# Perl 6}} method render {{#c|($x = 1, $y = 1, $z = 0)}} { … } ---- {{#ui|# Perl 6}} method render ($x = 1, $y = 1, $z = 0) { for {{#c|@.filter(@.items)}} { … } } ---- {{#ui|# Perl 6}} method render ($x = 1, $y = 1, $z = 0) { for @.filter(@.items) { {{#c|say .draw(:$x, :$y, :$z);}} } } ---- 変数の先頭文字 {{#c|≆}} リファレンス {{#x|☣}} ---- {{#iu|Perl 1}} {{#c|$s @a}} {{#c| }} ---- {{#iu|Perl 1}} {{#h|$s @a }} {{#c| $a[0] $h{'?'} }} ---- {{#iu|Perl 3}} {{#h|$s @a }}{{#c|%h}} {{#h| $a[0] $h{'?'} }} ---- {{#iu|Perl 5}} {{#h|$s @a %h}} {{#c|$$s}}{{#h| $a[0] $h{'?'} }} ---- {{#iu|Perl 5}} {{#h|$s @a %h}} {{#c|@}}{{#h|$s $a[0] $h{'?'} }} ---- {{#iu|Perl 5}} {{#h|$s @a %h}} {{#c|%}}{{#h|$s $a[0] $h{'?'} }} ---- {{#iu|Perl 5}} {{#h|$s @a %h}} {{#c|$$s}}{{#h| $a[0] $h{'?'} }} ---- {{#iu|Perl 5}} {{#h|$s @a %h}} {{#h|$$s $a[0] $h{'?'} }} {{#c|$s->foo}}{{#x| ☹ ☹}} ---- {{#iu|Perl 6}} {{#h|$s @a %h}} {{#h|$$s }}{{#c|@a}}{{#h|[0] }}{{#c|%h<?> }} {{#c|$s.foo @a.foo %h.foo }} ☺ ---- 中身は {{#c|ジェンガ}} {{#x|☣}} ---- {{img src="/img/spacer.gif"> 0 } … ---- subset Positive of Num where { $_ > 0 } sub f ( {{#c|Positive}} $x, {{#c|Positive}} $y --> {{#c|Positive}} where { $_ >= ($x & $y) } ) { sqrt($x ** 2 + $y ** 2); } … ---- subset Positive of Num where { $_ > 0 } sub f ( Positive $x, Positive $y --> Positive where { $_ >= ($x & $y) } ) { sqrt($x ** 2 + $y ** 2); } my $five {{#c|:=}} f(3, 4); {{#ct|# Positive}}{{#ct|と推論}} ---- 遅延評価 {{#ci|vs.}} 先行評価 ---- ストリームの {{#c|生成器}} ☼ ---- my {{#c|@fib}} := ( 0, 1, each({{#c|@fib}}; {{#c|@fib[1…]}}) .map(&infix:<+>) ); ---- my $ignored = {{#c|lazy}} { 9 ** 9 ** 9 } my $unused = {{#c|lazy}} { say [1..$ignored] } print "Hello, world!" ---- 柔軟な構文 {{#ci|vs.}} 予測式解析 ---- 文法 {{#c|カテゴリ}} ☼ ---- sub {{#c|postfix:<!>}} ($x) { [*] 1..$x } say 10{{#c|!}}; {{#t|# 3628800}} ---- macro {{#c|circumfix:</* */>}} ($x) is parsed / .*? / { '' } {{#t|/* This is a C-style comment */}} ---- 進化 {{#ci|vs.}} 安全 ---- レキシカル {{#c|マクロ}} ☼ ---- {{#c|{‍{‍{}} {{#c|q:code}}/ use $_ / for < DBI CGI PPI > {{#c|}‍}‍}‍}} ---- macro hi () { {{#c|q:code(:COMPILING)}} { "Hello, $s" } } my $s = "world"; say hi; {{#t|# Hello, world}} ---- クラスベース {{#ci|vs.}} プロトタイプベース ---- メタオブジェクト {{#c|プロトコル}} ☼ ---- class Dog {{#c|is}} Mammal {{#c|does}} Pet { {{#c|my}} $count where 0..100; {{#c|has}} $!brain; has $name {{#c|is rw}} = "fido"; has $fur {{#c|handles}} Groomable; has $tail handles <wag hang>; has &vocalize = &say; method owner () {{#c|handles}} s/^owner_// { … } } ---- {{#c|my Dog $fido .= new;}} … ---- my Dog $fido .= new; {{#ct|# Dog.isa(Dog); $fido.isa(Dog);}} … ---- my Dog $fido .= new; {{#t|# Dog.isa(Dog); $fido.isa(Dog);}} $fido{{#c|.meta.add_method}}( 'bark', method () { $.vocalize('Woof!') } ); … ---- my Dog $fido .= new; {{#t|# Dog.isa(Dog); $fido.isa(Dog);}} $fido.meta.add_method( 'bark', method () { $.vocalize('Woof!') } ); {{#ct|# Dog.can('bark'); $fido.can('bark');}} ---- Perl 6 {{#ci|vs.}} その他の言語 ---- {{#c|他の言語の}} モジュール群 ☼ ---- {{#c|use jsan:DOM;}} ---- use jsan:DOM; {{#c|use perl5:DBI;}} ---- use jsan:DOM; use perl5:DBI; {{#c|use parrot:PGE;}} ---- シンタックスシュガーは {{#c|砂糖}}なので太 りやすいけど… ---- ノンカロリーの {{#c|人工甘味料}}による 味付けなら太 ってしまうことはない ---- …しかし {{#c|構想}} 5 年 ---- {{#c|キッチリ}}が まだ不十分 {{#x|☣}} ---- {{#c|Pugs}}の これまで… ---- {{#c|☑}} ---- {{#date|Feb 1}} TaPLの本が到着したので {{#c|演習を開始}}… (Types and Programming Languages) ---- {{#date|Feb 6}} 最初の{{#c|インタプリタ}}が動いた (1|2)+(3|4) ➥ (4|5|6) ---- {{#date|Feb 16}} {{#c|命令形}}の関数 say "Hello, world" ---- {{#date|Feb 23}} {{#c|Test.pm}} is(1+1, 2, 'add') ---- {{#date|Mar 19}} PCRE {{#c|正規表現}} s:P5:g/5/6/; ---- {{#date|Apr 26}} {{#c|BEGIN}} ブロック use CGI; ---- {{#date|May 8}} {{#c|svnbot.p6}} r2851 | iblech++ ---- {{#date|May 5}} {{#c|Parrot}} 組み込み AddHandler mod_pugs ---- {{#date|May 25}} Perl 6 の {{#c|Prelude.pm}} sub sprintf ($fmt, *@args) ---- {{#date|May 29}} {{#c|Perl5}} 組み込み use perl5:DBI; ---- {{#date|Jun 2}} {{#c|evalbot.p6}} [#perl6] ?eval 1+1 ---- {{#date|Jun 24}} Perl6 → {{#c|PIL}} → Parrot make smoke-pir ---- {{#date|Jul 14}} PIL → {{#c|Perl5}} make smoke-perl5 ---- {{#date|Jul 17}} PIL → {{#c|JavaScript}} make smoke-js ---- {{#date|Aug 1}} オブジェクトモデルを {{#c|自分自身で構築}} class Class is Object; ---- {{#date|Aug 3}} {{#c|Kontent}} Wiki use perl5:DBI; ---- {{#date|Sep 29}} バックエンドの{{#c|統合}} pugs -B Perl5 -e … ---- {{#date|Oct 9}} Haskell {{#c|Cabal}} をサポート libPugs.a ---- {{#date|Nov 2nd}} {{#c|Runtime API}}の草案 Perl6::ObjectSpace ---- {{#date|Nov 3}} S17: {{#c|並行処理}}の草案 sub f is atomic { … } ---- {{#date|Nov 4}} S22: {{#c|パッケージング}}の草案 p5-Foo-1.0-cpan+KANE.jib ---- {{#date|Nov 7}} 完全な{{#c|コルーチン}} coro { yield } ---- {{#date|Nov 23}} {{#c|$Larry}} から最初のコミットがあった日 {{#q|(あとは Guido を待つのみ ☺)}} ---- {{#date|Dec 1}} {{#c|6PAN}} のプロトタイプ use perl5:JIB; ---- {{#date|Dec 10}} {{#c|オブジェクト空間}}の評価 make pil ---- {{#date|Dec 20}} {{#c|レキシカルインポート}} { use Module; … } ---- {{#date|Dec 31}} {{#c|Haskell}} のルールエンジン Text.Parser.Rule Text.Parser.OpTable ---- {{#date|Jan 6}} {{#c|YAML}} 出力 say $x.yaml; ---- {{#date|Jan 16}} レキシカル {{#c|Parrot}} parrotIsBrokenXXX = False ---- {{#date|Jan 28}} {{#c|複数行}} シェル pugs> class Moose { ....> has $antler; ....> } pugs> my $moose = Moose.new; ---- {{#date|Feb 3}} 文法を{{#c|自分自身で解析}} grammar Perl6::Rx; ---- {{#date|Feb 14}} {{#c|Perl 5}} のルールエンジン pugs/misc/pX ---- {{#date|Feb 16}} Prelude.pm を {{#c|YAML化}} make {{#t|# 40分 → 8分}} ---- {{#date|Feb 22}} {{#c|$Larry}} /joins #perl6 <fglock> ラリー: ようこそ <Juerd> 病みつきにならないでね :) <ラリー> Juerd: もう遅いよ… ---- {{#date|Feb 23}} Test.pm を {{#c|YAML化}} make smoke {{#t|# 100分 → 70分}} ---- {{#date|Feb 24}} {{#c|Perl6::Doc}} ツリー 概要 / チュートリアル FAQ / Perl5 / 仕様 / API ---- {{#date|Feb 25}} {{#c|擬似クォート}}マクロ $ast = q:code/ say "hi" /; ---- {{#date|Mar 1}} P5 上でルールを{{#c|ブートストラップ}} use Pugs::Compiler::Rule; ---- {{#date|Mar 11}} {{#c|Module::Compile}} use v6-pugs; ---- {{#date|Mar 14}} Perl 5 で {{#c|PCRE}} を使う use re::override-PCRE; ---- {{#date|Mar 15}} S26: {{#c|ドキュメントモデル}} の草案 =doc kwid ---- {{#date|Mar 16}} コンパイラを{{#c|自分自身で構築}}! lrep.p6 ---- {{#date|Mar 24}} {{#c|演算子順位}}パーサー Pugs::Grammar::Category ---- {{#date|Mar 28}} P5 ルールエンジンが{{#c|速くなった}} RuleInline.pl ---- {{#c|Hackathons}} ♨ ---- {{#c|♨ 台北}} ---- ♨ 台北 {{#c|♨ ウイーン}} ---- ♨ 台北 ♨ ウイーン {{#c|♨ トロント}} ---- ♨ 台北 ♨ ウイーン ♨ トロント {{#c|♨ アムステルダム}} ---- ♨ 台北 ♨ ウイーン ♨ トロント ♨ アムステルダム {{#c|♨ エクト}} ---- ♨ 台北 ♨ ウイーン ♨ トロント ♨ アムステルダム ♨ エクト {{#c|♨ リスモア}} ---- ♨ 台北 ♨ ウイーン ♨ トロント ♨ アムステルダム ♨ エクト ♨ リスモア {{#c|♨ Mt.アベル}} ---- ♨ 台北 ♨ ウイーン ♨ トロント ♨ アムステルダム ♨ エクト ♨ リスモア ♨ Mt.アベル {{#c|♨ ウイーン (再び)}} ---- ♨ 台北 ♨ ウイーン ♨ トロント ♨ アムステルダム ♨ エクト ♨ リスモア ♨ Mt.アベル ♨ ウイーン (再び) {{#c|♨ 東京}} ---- ♨ 台北 ♨ ウイーン ♨ トロント ♨ アムステルダム ♨ エクト ♨ リスモア ♨ Mt.アベル ♨ ウイーン (再び) ♨ 東京 {{#c|♨ レドモンド™?}} ---- ♨ 台北 ♨ ウイーン ♨ トロント ♨ アムステルダム ♨ エクト ♨ リスモア ♨ Mt.アベル ♨ ウイーン (再び) ♨ 東京 ♨ レドモンド™? {{#c|♨ シカゴ?}} ---- ♨ 台北 ♨ ウイーン ♨ トロント ♨ アムステルダム ♨ エクト ♨ リスモア ♨ Mt.アベル ♨ ウイーン (再び) ♨ 東京 ♨ レドモンド™? ♨ シカゴ? {{#c|♨ パサデナ?}} ---- ♨ 台北 ♨ ウイーン ♨ トロント ♨ アムステルダム ♨ エクト ♨ リスモア ♨ Mt.アベル ♨ ウイーン (再び) ♨ 東京 ♨ レドモンド™? ♨ シカゴ? ♨ パサデナ? {{#c|♨ コネチカット?}} ---- ♨ 台北 ♨ ウイーン ♨ トロント ♨ アムステルダム ♨ エクト ♨ リスモア ♨ Mt.アベル ♨ ウイーン (再び) ♨ 東京 ♨ レドモンド™? ♨ シカゴ? ♨ パサデナ? ♨ コネチカット? {{#c|…まだまだ続くよ !}} ---- Pugs の {{#c|これから…}} ---- {{#c|‣‣}} ---- {{img src="/img/spacer.gif">
gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.