Enviar búsqueda
Cargar
Знакомство с Perl 6
•
1 recomendación
•
482 vistas
A
Andrew Shitov
Seguir
Tecnología
Denunciar
Compartir
Denunciar
Compartir
1 de 220
Descargar ahora
Descargar para leer sin conexión
Recomendados
Интернационализация и локализация Rails. gem russian
Интернационализация и локализация Rails. gem russian
Yaroslav Markin
Common Lisp入門
Common Lisp入門
京大 マイコンクラブ
Screaming Frog SEO Spider на 100%. Инструкция. Самостоятельный аудит сайта
Screaming Frog SEO Spider на 100%. Инструкция. Самостоятельный аудит сайта
collaborator.pro
Class viii science -agriculcure
Class viii science -agriculcure
SANJIB ROY
PBN. Как создать и развивать свою сетку сайтов. Советы эксперта
PBN. Как создать и развивать свою сетку сайтов. Советы эксперта
collaborator.pro
Yandex Maps API
Yandex Maps API
gueste64ae0
Data-Driven SEO. Магия сегментирования в действии
Data-Driven SEO. Магия сегментирования в действии
collaborator.pro
Power BI для SEO
Power BI для SEO
collaborator.pro
Recomendados
Интернационализация и локализация Rails. gem russian
Интернационализация и локализация Rails. gem russian
Yaroslav Markin
Common Lisp入門
Common Lisp入門
京大 マイコンクラブ
Screaming Frog SEO Spider на 100%. Инструкция. Самостоятельный аудит сайта
Screaming Frog SEO Spider на 100%. Инструкция. Самостоятельный аудит сайта
collaborator.pro
Class viii science -agriculcure
Class viii science -agriculcure
SANJIB ROY
PBN. Как создать и развивать свою сетку сайтов. Советы эксперта
PBN. Как создать и развивать свою сетку сайтов. Советы эксперта
collaborator.pro
Yandex Maps API
Yandex Maps API
gueste64ae0
Data-Driven SEO. Магия сегментирования в действии
Data-Driven SEO. Магия сегментирования в действии
collaborator.pro
Power BI для SEO
Power BI для SEO
collaborator.pro
Social assistance programme
Social assistance programme
Suman Biswas
Introduction and course schedule
Introduction and course schedule
Prabir Chatterjee
Semantic HTML Basic
Semantic HTML Basic
Joseph Chiang
Nikishin Root Conf
Nikishin Root Conf
Liudmila Li
Apache
Apache
Alexey Bovanenko
20080424 Cdb2008 Postgresql8.3 Samokhvalov
20080424 Cdb2008 Postgresql8.3 Samokhvalov
Nikolay Samokhvalov
HTML
HTML
bill zhong
3.5
3.5
Prabir Chatterjee
2.5
2.5
Prabir Chatterjee
Parasha
Parasha
Evelyn YB
AGPsource Game Platform 3.0
AGPsource Game Platform 3.0
CoinIndex.agency
Postgresql microconf
Postgresql microconf
Alexey Vasiliev
Asterroid презентация
Asterroid презентация
Liudmila Li
Perl6 one-liners
Perl6 one-liners
Andrew Shitov
Creating a compiler in Perl 6
Creating a compiler in Perl 6
Andrew Shitov
Fun with Raspberry PI (and Perl)
Fun with Raspberry PI (and Perl)
Andrew Shitov
Perl6 in-production
Perl6 in-production
Andrew Shitov
Параллельные вычисления в Perl 6
Параллельные вычисления в Perl 6
Andrew Shitov
AllPerlBooks.com
AllPerlBooks.com
Andrew Shitov
Perl 6 for Concurrency and Parallel Computing
Perl 6 for Concurrency and Parallel Computing
Andrew Shitov
The Joy of Smartmatch
The Joy of Smartmatch
Andrew Shitov
YAPC::Europe 2013
YAPC::Europe 2013
Andrew Shitov
Más contenido relacionado
La actualidad más candente
Social assistance programme
Social assistance programme
Suman Biswas
Introduction and course schedule
Introduction and course schedule
Prabir Chatterjee
Semantic HTML Basic
Semantic HTML Basic
Joseph Chiang
Nikishin Root Conf
Nikishin Root Conf
Liudmila Li
Apache
Apache
Alexey Bovanenko
20080424 Cdb2008 Postgresql8.3 Samokhvalov
20080424 Cdb2008 Postgresql8.3 Samokhvalov
Nikolay Samokhvalov
HTML
HTML
bill zhong
3.5
3.5
Prabir Chatterjee
2.5
2.5
Prabir Chatterjee
Parasha
Parasha
Evelyn YB
AGPsource Game Platform 3.0
AGPsource Game Platform 3.0
CoinIndex.agency
Postgresql microconf
Postgresql microconf
Alexey Vasiliev
Asterroid презентация
Asterroid презентация
Liudmila Li
La actualidad más candente
(13)
Social assistance programme
Social assistance programme
Introduction and course schedule
Introduction and course schedule
Semantic HTML Basic
Semantic HTML Basic
Nikishin Root Conf
Nikishin Root Conf
Apache
Apache
20080424 Cdb2008 Postgresql8.3 Samokhvalov
20080424 Cdb2008 Postgresql8.3 Samokhvalov
HTML
HTML
3.5
3.5
2.5
2.5
Parasha
Parasha
AGPsource Game Platform 3.0
AGPsource Game Platform 3.0
Postgresql microconf
Postgresql microconf
Asterroid презентация
Asterroid презентация
Más de Andrew Shitov
Perl6 one-liners
Perl6 one-liners
Andrew Shitov
Creating a compiler in Perl 6
Creating a compiler in Perl 6
Andrew Shitov
Fun with Raspberry PI (and Perl)
Fun with Raspberry PI (and Perl)
Andrew Shitov
Perl6 in-production
Perl6 in-production
Andrew Shitov
Параллельные вычисления в Perl 6
Параллельные вычисления в Perl 6
Andrew Shitov
AllPerlBooks.com
AllPerlBooks.com
Andrew Shitov
Perl 6 for Concurrency and Parallel Computing
Perl 6 for Concurrency and Parallel Computing
Andrew Shitov
The Joy of Smartmatch
The Joy of Smartmatch
Andrew Shitov
YAPC::Europe 2013
YAPC::Europe 2013
Andrew Shitov
Perl 7, the story of
Perl 7, the story of
Andrew Shitov
Язык программирования Go для Perl-программистов
Язык программирования Go для Perl-программистов
Andrew Shitov
Как очистить массив
Как очистить массив
Andrew Shitov
What's new in Perl 5.14
What's new in Perl 5.14
Andrew Shitov
Что нового в Perl 5.14
Что нового в Perl 5.14
Andrew Shitov
Perl6 grammars
Perl6 grammars
Andrew Shitov
Text in search queries with examples in Perl 6
Text in search queries with examples in Perl 6
Andrew Shitov
There's more than one way to empty it
There's more than one way to empty it
Andrew Shitov
Perl 6 by example
Perl 6 by example
Andrew Shitov
How to clean an array
How to clean an array
Andrew Shitov
Perl 5.10 и 5.12
Perl 5.10 и 5.12
Andrew Shitov
Más de Andrew Shitov
(20)
Perl6 one-liners
Perl6 one-liners
Creating a compiler in Perl 6
Creating a compiler in Perl 6
Fun with Raspberry PI (and Perl)
Fun with Raspberry PI (and Perl)
Perl6 in-production
Perl6 in-production
Параллельные вычисления в Perl 6
Параллельные вычисления в Perl 6
AllPerlBooks.com
AllPerlBooks.com
Perl 6 for Concurrency and Parallel Computing
Perl 6 for Concurrency and Parallel Computing
The Joy of Smartmatch
The Joy of Smartmatch
YAPC::Europe 2013
YAPC::Europe 2013
Perl 7, the story of
Perl 7, the story of
Язык программирования Go для Perl-программистов
Язык программирования Go для Perl-программистов
Как очистить массив
Как очистить массив
What's new in Perl 5.14
What's new in Perl 5.14
Что нового в Perl 5.14
Что нового в Perl 5.14
Perl6 grammars
Perl6 grammars
Text in search queries with examples in Perl 6
Text in search queries with examples in Perl 6
There's more than one way to empty it
There's more than one way to empty it
Perl 6 by example
Perl 6 by example
How to clean an array
How to clean an array
Perl 5.10 и 5.12
Perl 5.10 и 5.12
Знакомство с Perl 6
1.
Знакомство с
Perl 6
2.
220 слайдов
3.
Про Perl 6
говорят с 2000
4.
perl6.ru появился в
2003
5.
Это мой 7-й
рассказ с 2007
6.
Сейчас 2009
7.
Готов ли Perl
6?
8.
Готов ли Perl
6? Ну почти
9.
Когда будет?
10.
Когда будет? На Рождество
11.
Когда будет? На Рождество
(год не указан)
12.
pre-alpha 2009-2010
13.
Когда в production?
14.
Когда в production? Зависит
от нас
15.
Когда в production? Зависит
от вас
16.
Когда в production?
Уже сейчас!
17.
Когда в production?
Уже сейчас! (На самом деле года через два после релиза)
18.
Зачем вообще нужен
Perl 6?
19.
Кто помнит переход с
Perl 4 на Perl 5?
20.
4 != 5
21.
5 != 6
22.
5 != 6
23.
Perl = Perl
24.
‘Perl’ eq ‘Perl’
25.
Как изучать Perl
6?
26.
Где взять Perl 6?
27.
Можно ли попробовать
Perl 6?
28.
?
29.
Как изучать
30.
Как изучать Знать Perl
5 изучить отличия
31.
Как изучать Знать Perl
5 Не знать Perl 5 изучить отличия
32.
Как изучать Знать Perl
5 Не знать Perl 5 изучить изучить отличия документацию
33.
Изучать ли ламповую схемотехнику, когда
есть транзисторы?
34.
У нас есть
два языка!
35.
У нас есть
два языка! Perl 5 и Perl 6
36.
У нас есть
два языка! Perl 5 и Perl 6 Завоевание мира стало проще
37.
Отличия от Perl
5
38.
Отличия от Perl
5 (не все)
39.
Отличия от Perl
5
40.
Отличия от Perl
5 В идеологии
41.
Синтаксис Perl 6 описан
грамматикой
42.
Синтаксис Perl 6 описан
грамматикой Синтаксис Perl 5 задан реализацией
43.
Много реализаций (пока
нет ни одной завершенной) Одна реализация (портирована на многие платформы)
44.
Perl 6 компилируется
45.
Perl 6 компилируется Perl
5 интерпретируется
46.
Программа Компилятор Байт-код Виртуальная машина
47.
Программа Компилятор Байт-код Виртуальная машина
48.
Basic Forth Jako Lisp m4 Ook Perl 6 Perl 5 Python Ruby Scheme Tcl
49.
Basic Forth Jako Lisp m4 Ook Perl 6 Perl 5 Python Ruby Scheme
байт-код Tcl
50.
Basic Forth Jako Lisp m4 Ook Perl 6 Perl 5 Python Ruby Scheme
LOL-код Tcl
51.
Отличия от Perl
5 В синтаксисе
52.
Хаффманизизация
53.
Perl 5 print quot;Hello, World!quot;;
54.
Perl 6 say quot;
quot;;
55.
Perl 6 quot;
quot;.say;
56.
Perl 6 my $ναριαβλε = quot;
quot;;
57.
Perl 6 $str.chars; $str.bytes; $str.glyphs;
58.
Perl 6 $str.chars.say;
59.
Perl 6 $str.chars.say; 3.14.elems.say;
60.
Унификация
61.
Cигилы
62.
Perl 5 my @arr = (0..5); say $arr[2];
63.
Perl 6 my @arr = (0..5); say @arr[2];
64.
Perl 6 my @arr = (0..5); say @arr[2, 3];
65.
Perl 6 my @arr = (0..5); say @arr.elems;
66.
Perl 5 my %hash = ( city => quot;Tashkentquot;, year => 2009 ); say $hash{city};
67.
Perl 6 my %hash = ( city => quot;Tashkentquot;, year => 2009 ); say %hash<city>;
68.
Perl 6 my %hash = city => quot;Tashkentquot;, year => 2009 ; say %hash<city year>;
69.
Perl 6 my %hash = city => quot;Tashkentquot;, year => 2009 ; say %hash.kv;
70.
Сигилы — не
тип переменной
71.
Сигилы — интерфейс
контейнера
72.
@ Объект реализует роль
Positional и поддерживает метод postcircumfix:<[ ]>
73.
% Объект реализует роль
Associative и поддерживает метод postcircumfix:<{ }>
74.
& Объект реализует роль
Callable и поддерживает метод postcircumfix:<( )>
75.
qw
76.
Perl 5 my @cities = ( quot;Moscowquot;, quot;Kievquot;, quot;Tashkentquot; );
77.
Perl 6 my @cities = quot;Moscowquot;, quot;Kievquot;, quot;Tashkentquot; ;
78.
Perl 5 my @cities = qw(Moscow Kiev Tashkent);
79.
Perl 6 my @cities = <Moscow Kiev Tashkent>;
80.
Твигилы
81.
Perl 5 $ENV{SERVER_NAME}
82.
Perl 6 %*ENV<SERVER_NAME>
83.
Perl 6 %*ENV<SERVER_NAME>
84.
Perl 6 %*ENV<SERVER_NAME>
85.
Perl 6 %*ENV<SERVER_NAME>
86.
$var $.var $^var $:var $*var $?var $=var $!var
87.
Perl 5 __LINE__
__FILE__ __PACKAGE__
88.
Perl 6 $?LINE
$?FILE $?PACKAGE
89.
Цепочки сравнений
90.
Perl 5 if ($latitude > 41.2 && $latitude < 41.4) { print quot;Tashkentnquot;; }
91.
if 41.2 < $latitude < 41.4 { say quot;Tashkentquot;; }
92.
Контексты
93.
Строковый контекст
my @array = (5..10); say ~@array; 5 6 7 8 9 10
94.
Числовой контекст
my @array = (5..10); say +@array; 6
95.
Строковый контекст
в контексте хеша my @array = (5..10); say ~ hash @array; 5 6 7 8 9 10
96.
Булевый контекст my @array = (5..10); say ?+@array;
97.
Конкатенация строк
98.
print quot;Uzbek quot; . quot;Perl quot; . quot;Workshopquot;;
99.
print quot;Uzbek quot; ~ quot;Perl quot; ~ quot;Workshopquot;;
100.
Установка Rakudo
101.
Исключения
102.
Perl 5 eval { print 1/0; } if ($@) { print_error(); }
103.
Perl 6 try { say 1/0; CATCH { print_error(); } }
104.
Perl 6 try { say 1/0; CATCH { print_error(); } }
105.
Циклы
106.
Perl 5 foreach (@list) { . . . }
107.
Perl 5 for (@list) { . . . }
108.
Perl 6 for @list { . . . }
109.
Perl 6 for @list ‐> $x { say $x; }
110.
Perl 6 for @list ‐> $x { say $x; }
111.
Perl 6 for @list ‐> $x, $y { say $x + $y }
112.
Perl 6 loop(my $t = 300; $t; $t‐‐){ sleep 1; };
113.
Функции
114.
sub flight($from, $to) { say quot;$from ‐‐> $toquot;; } flight(quot;Москваquot;, quot;Ташкентquot;);
115.
sub flight($from, $to) { say quot;$from ‐‐> $toquot;; } flight(quot;Москваquot;, quot;Ташкентquot;);
116.
sub flight($from, $to) { say quot;$from ‐‐> $toquot;; } flight quot;Москваquot;, quot;Ташкентquot;;
117.
sub flight($from, $to) { say quot;$from ‐‐> $toquot;; } flight from => quot;Москваquot;, to => quot;Ташкентquot;;
118.
sub flight($from, $to) { say quot;$from ‐‐> $toquot;; } flight from => quot;Москваquot;, to => quot;Ташкентquot;;
119.
sub choose(@a, @b) { return any(@a) < all(@b) ?? 1 !! 2; } say choose( @SkyExpressPrices, @AeroflotPrices );
120.
Гипероператоры
121.
my @Flight = (...); my @Food = (...);
122.
my @Flight = (...); my @Food = (...); my @FullPrice = @Flight >>+<< @Food;
123.
my @Flight = (...); my @Food = (...); my @FullPrice = @Flight >>+<< @Food; @FullPrice >>+=<< $Fuel;
124.
my @Flight = (...); my @Food = (...); my @FullPrice = @Flight »+« @Food;
125.
Объединения
126.
Объединения (квантовые суперпозиции)
127.
sub choose(@a, @b) { return any(@a) < all(@b) ?? 1 !! 2; }
128.
say 1 if 20 == 10 | 20 | 30;
129.
say 1 if 20 == 10 | 20 | 30; say 1 if 20 == any(10, 20, 30);
130.
say 1 if 20 == none(1, 2, 3);
131.
my $j = 2009 | 2010; say 1 if 2009 == $j;
132.
Перегрузка операторов и функций
133.
Перегрузка операторов и функций
(множественная диспетчеризация)
134.
1 + 2 2.71 + 3.14
135.
multi sub elections($candidate); multi sub elections(@candidates);
136.
multi infix:<+> ($a, $b) { return $a ‐ $b; } say 10 + 20; ‐10
137.
multi postfix:<!> ($n) { return [*] 1..$n; } say 2009!;
138.
multi postfix:<!> ($n) { return [*] 1..$n; } say 2009!;
139.
Где взять
140.
Предыстория
141.
Parrot 0.1.0 languages/perl6
142.
Parrot 0.1.0 Для компиляции
файла грамматики Perl 6 нужен 1 ГБ памяти
143.
Parrot 0.1.0 Настоящий байткод real.perl6.ru
144.
PUGS
145.
PUGS Perl User’s Golfing
System
146.
PUGS Perl User’s Golfing
System Написан на Haskell
147.
PUGS Perl User’s Golfing
System Вместе с GHC собирается часа четыре
148.
PUGS Perl User’s Golfing
System Самое большое подмножество языка на тот момент
149.
use v6;
150.
use v6; Модули на CPAN
для Perl 5
151.
use v6; Moose?
152.
use v6; 5.10?
153.
Perl 6 не
один Pugs Elf Rakudo KindaPerl6 SMOP
154.
Rakudo
155.
Rakudo
Rakudo-do — путь верблюда (яп.)
156.
Rakudo Компилятор в PIR-код
157.
Установка Rakudo $ git clone git://github.com/rakudo/rakudo.git
158.
Установка Rakudo $ git clone git://github.com/rakudo/rakudo.git $ cd rakudo
159.
Установка Rakudo $ git clone git://github.com/rakudo/rakudo.git $ cd rakudo $ perl Configure.pl ‐‐gen‐parrot
160.
Установка Rakudo $ git clone git://github.com/rakudo/rakudo.git $ cd rakudo $ perl Configure.pl ‐‐gen‐parrot
161.
Установка Rakudo $ git clone git://github.com/rakudo/rakudo.git $ cd rakudo $ perl Configure.pl ‐‐gen‐parrot $ make
162.
Установка Rakudo Сегодня нет make install
163.
Установка Rakudo $ ./perl6 ‐v
164.
Установка Rakudo $ ./perl6 ‐v This is Rakudo Perl 6, revision 38679 built on parrot 1.1.0‐devel for darwin‐thread‐multi‐2level. Copyright 2006‐2008, The Perl Foundation.
165.
Компилятор Rakudo
rakudo.org
166.
Виртуальная машина
Parrot parrot.org
167.
Документация, тесты
и грамматика pugscode.org
168.
Веб-приложения
на Perl 6
169.
real.perl6.ru 2004 год
170.
int main() { char* argv[] = { quot;parrotquot;, getenv (quot;PATH_TRANSLATEDquot;), NULL }; execvp(quot;/parrot‐0.1.0/parrotquot;, argv); return 0; }
171.
my @keys = ( 'SERVER_NAME', 'REMOTE_ADDR', 'HTTP_USER_AGENT' ); my $key; foreach $key (@keys){ print1 quot;$key=%ENV{$key}<br />quot;; }
172.
my @keys = ( 'SERVER_NAME', 'REMOTE_ADDR', 'HTTP_USER_AGENT' ); my $key; foreach $key (@keys){ print1 quot;$key=%ENV{$key}<br />quot;; }
173.
sub params2hash( %params, @params_key, @params_value){ for 0 .. @params_key ‐> $c { %params{@params_key[$c]} = @params_value[$c]; } }
174.
.include quot;counter.imcquot; open P0, quot;counter.txtquot; readline S0, P0 set I0, S0 inc I0 set I2, 0 seek P0, I2, I2 print P0, I0 close P0
175.
november-wiki.org
2008 год
176.
Рождество — December Вики
на Perl 6 — November
177.
Про что не рассказал?
178.
Про классы
179.
Про классы, про
роли
180.
Про классы,
про роли и про грамматики
181.
Кратко об этом на
примере November
182.
#!perl6 use v6; use CGI; use Wiki; my Wiki $wiki = Wiki.new; $wiki.init(); my $cgi = CGI.new; $cgi.init(); $wiki.handle_request($cgi);
183.
Классы и роли
184.
class Wiki does Session { my $.template_path is rw; my $.userfile_path is rw; has Storage $.storage is rw; has CGI $.cgi is rw; . . . }
185.
method handle_request(CGI $cgi) { $.cgi = $cgi; my $action = $cgi.param<action> // 'view'; given $action { when 'view' { self.view_page(); return; } when 'edit' { self.edit_page(); return; } when 'log_in' { self.log_in(); return; } } self.not_found(); }
186.
has Storage $.storage is rw; class Storage { . . . } class Storage::File is Storage { . . . } $.storage = Storage::File.new(); $.storage.init();
187.
my $input = $*IN.slurp(); self.parse_params(%params, $input);
188.
Грамматика
189.
if $par ~~ Text::Markup::Wiki::Minimal::Syntax::paragr { . . . } else { $result = '<p>Could not parse paragraph.</p>'; }
190.
grammar Text::Markup::Wiki::Minimal::Syntax { token paragraph { ^ [<heading> || <parchunk>+] $ }; token heading { '==' <parchunk>+ '==' }; token parchunk { <twext> || <wikimark> || <metachar> || <malformed> }; token twext { [ <.alnum> || <.otherchar> || <.whitespace> ] + }; token otherchar { <[ !..% (../ : ; ? @ ^..` {..~ ]> }; token whitespace { ' ' | n }; token wikimark { '[[' <twext> ']]' }; token metachar { '<' || '>' || '&' || ' }; token malformed { '[' || ']' } }
191.
grammar Text::Markup::Wiki::Minimal::Syntax { }
192.
token paragraph { ^ [<heading> || <parchunk>+] $ };
193.
token heading { '==' <parchunk>+ '==' };
194.
STD.pm — 150 КБ
195.
Что почитать
196.
Июнь 2003
197.
Июнь 2004
198.
Июнь 2004
2005
199.
2005
200.
2007?
201.
202.
Это все уже
история
203.
204.
Документация
205.
RFCs, Apocalypses, Exegeses
206.
Все это уже
история
207.
RFCs, Apocalypses, Exegeses, Synopses
208.
Synopses perlcabal.org/syn
209.
Synopses perlcabal.org/syn
S1 . . . S33
210.
S = Synopses
211.
S = Spec
212.
Кого почитать
213.
Мориц Ленц perlgeek.de
214.
Габор Сабо szabgab.com
215.
Джонатан Вортингтон
use.perl.org/ ~JonathanWorthington
216.
Карл Мэсак use.perl.org/~masak
217.
Патрик Мишо use.perl.org/~pmichaud
218.
Илья Беликин ihrd.livejournal.com
219.
perl6.ru
220.
__END__ Андрей Шитов http://shitov.ru
| andy@shitov.ru
Descargar ahora