This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use v6; | |
use XML::Query; | |
use HTML::Parser::XML; | |
use HTTP::UserAgent; | |
my $ua = HTTP::UserAgent.new; | |
say "Getting the page"; | |
my $response = $ua.get("http://perl6advent.wordpress.com/category/table-of-contents/"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### *nom* | |
t/spec/S03-metaops/not.t ...................................... Failed 3/33 subtests | |
t/spec/S04-declarations/my.rakudo.moar ........................ Dubious, test returned 1 (wstat 256, 0x100) | |
Failed 20/75 subtests | |
t/spec/S04-statements/next.t .................................. Dubious, test returned 1 (wstat 256, 0x100) | |
Failed 12/12 subtests | |
t/spec/S05-mass/rx.rakudo.moar ................................ Dubious, test returned 1 (wstat 256, 0x100) | |
Failed 722/739 subtests | |
(less 8 skipped subtests: 9 okay) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ForYou { | |
has $.contents; | |
has $.recipient; | |
method give { | |
example_say "Hey " ~ $!recipient ~ "! A " ~ $!contents; | |
} | |
}; | |
class Present { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
our %TERM; | |
for 0..^%*ENV<COLUMNS> X 0..%*ENV<ROWS> -> $x, $y { | |
say "$x $y"; | |
%TERM<cup>[$x][$y] = qq:x{ tput cup $y $x }; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### i'm getting used to breaking moar :( | |
➜ lib perl6 Boxbrain.pm | |
clear | |
smcup | |
rmcup | |
sc | |
rc | |
moar(62161,0x7fff79f96300) malloc: *** error for object 0x7f8753d1b530: pointer being freed was not allocated | |
*** set a breakpoint in malloc_error_break to debug | |
/Users/jhaltiwanger/.rakudobrew/bin/perl6: line 2: 62161 Abort trap: 6 /Users/jhaltiwanger/.rakudobrew/moar-HEAD/install/bin/perl6 "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ perl6 thread-p5.pl6 | |
===SORRY!=== | |
Cannot look up attributes in a type object |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use OO::Monitors; | |
monitor Increment { | |
has $.counter; | |
method increment( $thread ) { | |
$!counter++; | |
say "incremented in $thread"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
processed escape sequence as 13 elems | |
\x[1b][24;36H | |
manual escape sequence is 8 elems |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/home/user/waves> ./bin/waves ~/ruby/xs | |
Ruby/Extensions: Binding#eval is already defined; not overwriting | |
Ruby/Extensions: Enumerable#none? is already defined; not overwriting | |
Ruby/Extensions: Enumerable#one? is already defined; not overwriting | |
Ruby/Extensions: Integer#even? is already defined; not overwriting | |
Ruby/Extensions: Integer#odd? is already defined; not overwriting | |
Ruby/Extensions: Symbol#to_proc is already defined; not overwriting | |
** Creating new Waves application ... | |
/usr/lib/ruby/1.8/fileutils.rb:1262:in `initialize': No such file or directory - /home/user/ruby/xs/Rakefile (Errno::ENOENT) | |
from /usr/lib/ruby/1.8/fileutils.rb:1262:in `open' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use Test; | |
plan 5; | |
my $s = Set.new( <w x y z> ); | |
my $sh = SetHash.new( <x y z> ); | |
my $b = ( w => 1, x => 2, y => 3, z => 4 ).Bag; | |
my $bh = ( x => 1, y => 2, z => 33 ).BagHash; | |
is ($s (^+) $b ), (x => 1, y => 2, z => 3).Bag, "(^+) - {$s.gist} (^+) {$b.gist} == {(x => 1, y => 2, z => 3).Bag}"; |