Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2009-02-14

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:00 nihiliad left #perl6
00:01 shinobi-cl joined #perl6
00:11 BrunoX joined #perl6
00:32 bacek pmichaud: "git checkout master@{2009-02-01}" will checkout master branch at particular date.
00:36 shinobi-cl left #perl6
00:48 TimToady re "class is Foo {...}", you can currently use class { is Foo; ... } as a workaround
00:48 TimToady also :: parses as a package name, and could be forced to mean anonymous
00:48 TimToady std: class :: is Foo {...}
00:48 p6eval std 25322: OUTPUT«ok 00:02 33m␤»
00:52 TimToady much like you can currently say "sub & is bar {...}"
00:53 TimToady or "my $ is baz = 42"
00:54 TimToady if (state $)++ is perhaps a better example
01:02 mberends joined #perl6
01:27 [particle]1 joined #perl6
01:31 pugs_svn r25323 | lwall++ | Allow use of :: as anonymous package name
01:31 pugs_svn r25323 | lwall++ | Clear up more * as GLOBAL fossils
01:48 [particle] joined #perl6
01:51 skids /me may put some work in on WITCH this weekend (http://www.perlfoundation.​org/perl6/index.cgi?witch)
01:51 skids It;s been a year -- any characters change their meanings?
01:53 TimToady probably
01:53 TimToady looking
01:57 [particle]2 joined #perl6
02:00 iblechbot joined #perl6
02:24 TimToady sorry, got a phone call, looking again
02:25 skids Actually I was kinda worried I had created some sort of hour long distraction, not what I wanted to do :-)
02:27 TimToady [] is now used to disambiguate multiple metaops
02:28 TimToady basically any infix maybe have [] around it without change of meaning
02:28 TimToady $a [+] $b is same as $a + $b
02:28 TimToady but you can distinguish X[+=] from [X+]=
02:29 TimToady (description of reduce should probably mention that it only takes infix ops too)
02:29 icwiener_ joined #perl6
02:30 TimToady I think you missed use of [] to declare a shaped array
02:31 TimToady {N} and {N..M} in regex are wrong
02:32 TimToady it's just ** N and ** N..M these days, though a closure is allowed after **
02:34 skids OK, I'll get all that sorted.  Glad to see I linked to a copy of the Synopsis that got updated -- I'll just click through all the links and see if it still describes what I put.
02:34 TimToady in lparen, the (<>) entry is wrong
02:34 TimToady () is just capturing, <> is metasyntax, and they're unrelated
02:35 TimToady though <( and )> are standalone tokens indicating start and end of official match
02:36 skids Ah.  That was probably my perl5 instincts getting the better of me heheh.
02:36 TimToady maybe you meant <(...)>, but that's <{...}> these days
02:36 [particle] joined #perl6
02:37 TimToady + is no longer a twigil, * now indicates contextual variables defaulting to global
02:38 skids Yeah I saw something about the + twigil holocaust the other day.
02:38 TimToady oh, we also add &[+] as a short name for &infix:<+>:(Any,Any)
02:39 TimToady (or something like that)
02:40 TimToady - may now be used (along with ') in the middle of an identifier eat-fred's-sock($x)
02:41 * skids notes to update verbiage about that in underscore
02:42 [particle]1 joined #perl6
02:43 TimToady I do not see how - has wildcard uses in versions
02:44 TimToady - and ' aren't quite equiv to underscore
02:44 TimToady _ is simply considered alpha, while - and ' require a following alpha
02:44 TimToady (and may not occur at the front)
02:46 TimToady oh, just a nitpick, technically - isn't a dash to a typographer; dashes are longer, hyphens are short, and - is somewhere in the middle
02:46 TimToady er, minus is somewhere in the middle
02:46 SamB - is an ascii char
02:46 SamB I don't think it means much in particular to a typographer?
02:48 shinobi-cl joined #perl6
02:49 skids Yeah I'm one of those people who still use -- myself, point taken.
02:50 shinobi-cl perl6: my @numbers = 1,2,3; my $a = 4; say $a ~~ @numbers;
02:50 shinobi-cl rakudo: my @numbers = 1,2,3; my $a = 4; say $a ~~ @numbers;
02:50 SamB now, in a given context it probably means something to their typesetting software ;-P
02:50 p6eval rakudo b2e7ac: OUTPUT«Class 'Perl6MultiSub' not found␤current instr.: 'parrot;Perl6Role;!add_variant' pc 2645 (src/classes/Role.pir:42)␤»
02:50 p6eval ..elf 25323, pugs: OUTPUT«␤»
02:50 p6eval rakudo b2e7ac: OUTPUT«Class 'Perl6MultiSub' not found␤current instr.: 'parrot;Perl6Role;!add_variant' pc 2645 (src/classes/Role.pir:42)␤»
02:51 shinobi-cl pugs: my @numbers = 1,2,3; my $a = 4; say $a ~~ @numbers;
02:51 p6eval pugs: OUTPUT«␤»
02:51 TimToady also, * no longer means GLOBAL, but you know that
02:51 shinobi-cl pugs: my @numbers = 1,2,3; my $a = 4; say +($a ~~ @numbers);
02:51 p6eval pugs: OUTPUT«0␤»
02:51 shinobi-cl pugs: my @numbers = 1,2,3; my $a = 2; say +($a ~~ @numbers);
02:51 p6eval pugs: OUTPUT«0␤»
02:52 shinobi-cl pugs: my @numbers = 1,2,3; my $a = 2; say +($a ~~ *@numbers);
02:52 p6eval pugs: OUTPUT«*** ␤    Unexpected "numbers"␤    expecting term postfix, operator or ")"␤    at /tmp/mhfvIcZUPR line 1, column 47␤»
02:52 shinobi-cl ohh, * global no more... time to update my wiki
02:52 TimToady I'll have to look at the rest of them later, my ride home is here.
02:53 skids Thanks a lot!
02:53 TimToady yw &
02:53 shinobi-cl std: my @numbers = 1,2,3; my $a = 2; say +($a ~~ *@numbers);
02:53 p6eval std 25323: OUTPUT«############# PARSE FAILED #############␤Syntax error (two terms in a row?) at /tmp/Ir2WFWqZqH line 1:␤------> [32mumbers = 1,2,3; my $a = 2; say +($a ~~ *[31m@numbers);[0m␤    expecting any of:␤       POST␤   infix or meta-infix␤        infix stopper␤    postfix␤
02:54 p6eval ..postfix_prefix_meta_operator␤       ...
02:54 shinobi-cl std: my @numbers = (1,2,3); my $a = 2; say +($a ~~ *@numbers);
02:54 p6eval std 25323: OUTPUT«############# PARSE FAILED #############␤Syntax error (two terms in a row?) at /tmp/A68uGoos3Q line 1:␤------> [32mbers = (1,2,3); my $a = 2; say +($a ~~ *[31m@numbers);[0m␤    expecting any of:␤       POST␤   infix or meta-infix␤        infix stopper␤    postfix␤
02:54 p6eval ..postfix_prefix_meta_operator␤       ...
02:54 shinobi-cl std: my @numbers = (1,2,3); my $a = 2; say +($a ~~ @numbers);
02:54 p6eval std 25323: OUTPUT«ok 00:02 35m␤»
02:55 shinobi-cl std: my @numbers = (1,2,3); my $a = 0; say 'found' if ($a ~~ @numbers);
02:55 p6eval std 25323: OUTPUT«ok 00:02 34m␤»
02:56 shinobi-cl rakudo: my @numbers = (1,2,3); my $a = 0; say 'found' if ($a ~~ @numbers);
02:56 p6eval rakudo b2e7ac: OUTPUT«Class 'Perl6MultiSub' not found␤current instr.: 'parrot;Perl6Role;!add_variant' pc 2645 (src/classes/Role.pir:42)␤»
02:56 shinobi-cl pugs: my @numbers = (1,2,3); my $a = 0; say 'found' if ($a ~~ @numbers);
02:56 p6eval pugs: RESULT«undef»
02:56 shinobi-cl pugs: my @numbers = (1,2,3); my $a = 1; say 'found' if ($a ~~ @numbers);
02:56 p6eval pugs: RESULT«undef»
02:56 shinobi-cl pugs: my @numbers = (1,2,3); my $a = 1; say ?($a ~~ @numbers);
02:56 p6eval pugs: OUTPUT«␤»
02:56 shinobi-cl pugs: my @numbers = (1,2,3); my $a = 1; say ~($a ~~ @numbers);
02:56 p6eval pugs: OUTPUT«␤»
02:56 shinobi-cl pugs: my @numbers = (1,2,3); my $a = 1; say +($a ~~ @numbers);
02:56 p6eval pugs: OUTPUT«0␤»
02:57 shinobi-cl pugs: my @numbers = (1,2,3); my $a = 1|2; say +($a ~~ @numbers);
02:57 p6eval pugs: OUTPUT«0␤»
02:57 bacek perl6: multi sub is($a, $b) { say $a ~~ $b }; is(42, 42); is (42, 42);
02:57 p6eval pugs: OUTPUT«1␤pugs: Extra space found after &is (...) -- did you mean &is(...) instead?␤»
02:57 p6eval ..rakudo b2e7ac: OUTPUT«Class 'Perl6MultiSub' not found␤current instr.: 'parrot;Perl6Role;!add_variant' pc 2645 (src/classes/Role.pir:42)␤»
02:57 p6eval ..elf 25323: OUTPUT«␤␤»
02:57 bacek perl6: multi sub is($a, $b) { say $a ~~ $b }; is(42, 42);
02:57 p6eval pugs: OUTPUT«1␤»
02:57 p6eval ..rakudo b2e7ac: OUTPUT«Class 'Perl6MultiSub' not found␤current instr.: 'parrot;Perl6Role;!add_variant' pc 2645 (src/classes/Role.pir:42)␤»
02:57 p6eval ..elf 25323: OUTPUT«␤»
02:58 bacek Is space between 'is' and '(' meaningful?
02:58 bacek perl6: multi sub is($a, $b) { say $a ~~ $b }; is (42, 42);
02:58 p6eval pugs: OUTPUT«pugs: Extra space found after &is (...) -- did you mean &is(...) instead?␤»
02:58 p6eval ..rakudo b2e7ac: OUTPUT«Class 'Perl6MultiSub' not found␤current instr.: 'parrot;Perl6Role;!add_variant' pc 2645 (src/classes/Role.pir:42)␤»
02:58 p6eval ..elf 25323: OUTPUT«␤»
03:00 shinobi-cl pugs: my @numbers = (1,2,3); say +(1 ~~ @numbers);
03:00 p6eval pugs: OUTPUT«0␤»
03:01 shinobi-cl pugs: my @numbers = (1,2,3); say +(1 ~~ *@numbers);
03:01 p6eval pugs: OUTPUT«*** ␤    Unexpected "numbers"␤    expecting term postfix, operator or ")"␤    at /tmp/1W58IIp8cQ line 1, column 37␤»
03:02 shinobi-cl pugs: sub test($aa, $bb, $cc) { say "1:$aa 2:$bb 3:$cc" }; my @array = 7,8,9; test(*@array);
03:02 p6eval pugs: OUTPUT«*** ␤    Unexpected "array"␤    expecting term postfix, operator, ":" or ")"␤    at /tmp/lQ5WX2sbub line 1, column 80␤»
03:02 shinobi-cl pugs: sub test($aa, $bb, $cc) { say "1:$aa 2:$bb 3:$cc" }; my @numbers = 7,8,9; test(*@numbers);
03:02 p6eval pugs: OUTPUT«*** ␤    Unexpected "numbers"␤    expecting term postfix, operator, ":" or ")"␤    at /tmp/wDzdC5A0uq line 1, column 82␤»
03:03 shinobi-cl rakudo: sub test($aa, $bb, $cc) { say "1:$aa 2:$bb 3:$cc" }; my @numbers = 7,8,9; test(*@numbers);
03:03 p6eval rakudo b2e7ac: OUTPUT«./parrot: error while loading shared libraries: libparrot.so.0.9.0: cannot open shared object file: No such file or directory␤»
03:03 shinobi-cl oops
03:03 shinobi-cl rakudo: sub test($aa, $bb, $cc) { say "1:$aa 2:$bb 3:$cc"; }; my @numbers = 7,8,9; test(*@numbers);
03:03 p6eval rakudo b2e7ac: OUTPUT«./parrot: error while loading shared libraries: libparrot.so.0.9.0: cannot open shared object file: No such file or directory␤»
03:03 shinobi-cl std: sub test($aa, $bb, $cc) { say "1:$aa 2:$bb 3:$cc"; }; my @numbers = 7,8,9; test(*@numbers);
03:03 p6eval std 25323: OUTPUT«############# PARSE FAILED #############␤Unable to parse argument list; couldn't find final ')' at /tmp/0iRv8G4P3P line 1:␤------> [32mb 3:$cc"; }; my @numbers = 7,8,9; test(*[31m@numbers);[0m␤    expecting any of:␤   POST␤   infix or meta-infix␤        infix stopper␤
03:03 p6eval ..postfix␤        postfix_pr...
03:04 shinobi-cl std: sub test($aa, $bb, $cc) { say "1:$aa 2:$bb 3:$cc"; }; my @numbers = 7,8,9; test(@numbers[0], @numbers[1], @numbers[2]);
03:04 p6eval std 25323: OUTPUT«ok 00:04 36m␤»
03:04 shinobi-cl pugs: sub test($aa, $bb, $cc) { say "1:$aa 2:$bb 3:$cc"; }; my @numbers=7,8,9; &test(@numbers[0], @numbers[1], @numbers[2]);
03:04 p6eval pugs: OUTPUT«1:7 2:8 3:9␤»
03:05 shinobi-cl so, theres no "flatten" anymore?
03:05 shinobi-cl pugs: sub test($aa, $bb, $cc) { say "1:$aa 2:$bb 3:$cc"; }; my @numbers=7,8,9; &test(*@numbers);
03:05 p6eval pugs: OUTPUT«*** ␤    Unexpected "numbers"␤    expecting term postfix, operator, ":" or ")"␤    at /tmp/nDYmU6qGcN line 1, column 82␤»
03:05 bacek pugs: my $a=[2,12,42]; my @b = @$a; say ~@b
03:05 p6eval pugs: OUTPUT«2 12 42␤»
03:05 bacek std: my $a=[2,12,42]; my @b = @$a; say ~@b
03:05 p6eval std 25323: OUTPUT«ok 00:02 35m␤»
03:06 bacek rakudo: my $a=[2,12,42]; my @b = @$a; say ~@b
03:06 p6eval rakudo b2e7ac: OUTPUT«./parrot: error while loading shared libraries: libparrot.so.0.9.0: cannot open shared object file: No such file or directory␤»
03:08 eternaleye joined #perl6
03:09 shinobi-cl pugs: say +(1 ~~ (1,2,3) );
03:09 p6eval pugs: OUTPUT«0␤»
03:09 shinobi-cl pugs: say +(0 ~~ (1,2,3) );
03:09 p6eval pugs: OUTPUT«0␤»
03:09 shinobi-cl pugs: say +(6 ~~ (1,2,3) );
03:09 p6eval pugs: OUTPUT«0␤»
03:09 shinobi-cl pugs: say +(6 ~~ *(1,2,3) );
03:09 p6eval pugs: OUTPUT«*** Cannot cast from VNum Infinity to Pugs.AST.Types.VCode (VCode)␤    at /tmp/sAifSFIPxH line 1, column 5-22␤»
03:09 shinobi-cl pugs: say +(1 ~~ 1,2,3 );
03:09 p6eval pugs: OUTPUT«3␤»
03:10 shinobi-cl pugs: say 1 ~~ 1,2,3;
03:10 p6eval pugs: OUTPUT«123␤»
03:10 shinobi-cl pugs: say 'a' ~~ 1,2,3;
03:10 p6eval pugs: OUTPUT«23␤»
03:11 justatheory joined #perl6
03:11 shinobi-cl pugs: my @list = ('a', 'b', 'c'); say 'a' ~~ @list;
03:11 p6eval pugs: OUTPUT«␤»
03:12 shinobi-cl pugs: my @list = ('a', 'b', 'c'); say 1~~ @list;
03:12 p6eval pugs: OUTPUT«␤»
03:12 shinobi-cl pugs: my @list = ('a', 'b', 'c'); say 1 ~~ @@list;
03:12 p6eval pugs: OUTPUT«*** ␤    Unexpected ";"␤    expecting "::"␤    Variable "@@list" requires predeclaration or explicit package name␤    at /tmp/fHlaNBchsG line 1, column 44␤»
03:19 PZt joined #perl6
03:20 wayland joined #perl6
03:20 shinobi-cl pugs: my @list = ('a', 'b', 'c'); say 'a' ~~ @list;
03:20 p6eval pugs: OUTPUT«␤»
03:20 bacek TimToady: is "my $x; my @y = @$x" allowed syntax? Or  "my @y = @($x)" required?
03:20 shinobi-cl pugs: my @list = ('a', 'b', 'c'); say ?('a' ~~ @list);
03:20 p6eval pugs: OUTPUT«␤»
03:21 wayland I noticed some recent revisions of S16, adding an IO::Closeable role with a close method.  Am I right in understanding that this means that close() and IO.close() should now be ditched?
03:22 TimToady @$x is fine
03:22 lambdabot Maybe you meant: . ? @ bf ft id pl rc thx v wn
03:22 TimToady @shaddap
03:22 lambdabot Unknown command, try @list
03:23 TimToady shinobi-cl: smartmatch with a list doesn't do any() automatically
03:23 TimToady pugs: say (1,2,3) ~~ (1,2,3)
03:23 p6eval pugs: OUTPUT«1␤»
03:24 TimToady but the official flattener is prefix:<|> these days
03:25 TimToady I haven't been tracking the IO work
03:26 wayland Ok, I'll wait for ruoso or someone to answer that then :).
03:28 TimToady pugs: say 'a' ~~ any('a','b','c')
03:28 p6eval pugs: OUTPUT«any(VBool False,VBool True)␤»
03:28 shinobi-cl oh,, i see, thanks!
03:31 shinobi-cl pugs: sub test($aa, $bb, $cc) { say "1:$aa 2:$bb 3:$cc"; }; my @numbers=7,8,9; &test(|@numbers);
03:31 p6eval pugs: OUTPUT«*** No compatible multi variant found: "&test"␤    at /tmp/Gxq31raqOt line 1, column 74-90␤»
03:31 shinobi-cl std: sub test($aa, $bb, $cc) { say "1:$aa 2:$bb 3:$cc"; }; my @numbers=7,8,9; test(|@numbers);
03:31 p6eval std 25323: OUTPUT«ok 00:04 37m␤»
03:32 shinobi-cl pugs: sub test($aa, $bb, $cc) { say "1:$aa 2:$bb 3:$cc"; }; my @numbers=7,8,9; test(|@numbers);
03:32 p6eval pugs: OUTPUT«*** No compatible multi variant found: "&test"␤    at /tmp/ygdruHG9mi line 1, column 74-89␤»
03:32 shinobi-cl pugs @data=1,2,3; say @data; say |@data;
03:32 shinobi-cl pugs: @data=1,2,3; say @data; say |@data;
03:32 p6eval pugs: OUTPUT«*** ␤    Unexpected "="␤    expecting "::"␤    Variable "@data" requires predeclaration or explicit package name␤    at /tmp/dkWRIc7cCo line 1, column 6␤»
03:33 shinobi-cl pugs: my @data=1,2,3; say @data; say |@data;
03:33 p6eval pugs: OUTPUT«123␤123␤»
03:33 shinobi-cl pugs: my @data=(1,[2,3]); say @data; say |@data;
03:33 p6eval pugs: OUTPUT«12 3␤12 3␤»
03:34 TimToady I don't know why it didn't find test; looks like a bug
03:35 shinobi-cl pugs: sub test { my ($aa, $bb, $cc) = @_; say "1:$aa 2:$bb 3:$cc"; }; my @numbers=7,8,9; test(|@numbers);
03:35 p6eval pugs: OUTPUT«1:7 2:8 3:9␤»
03:35 shinobi-cl :D
03:36 TimToady I guess it's because pugs never got as far as implementing Captures
03:36 gravity joined #perl6
03:36 shinobi-cl pugs: sub test { my ($aa, $bb, $cc) = @_; say "1:$aa 2:$bb 3:$cc"; }; my @numbers=7,8; test(|@numbers);
03:36 p6eval pugs: OUTPUT«1:7 2:8 3:␤»
03:37 TimToady rakudo: sub test($aa, $bb, $cc) { say "1:$aa 2:$bb 3:$cc"; }; my @numbers=7,8,9; test(|@numbers);
03:37 p6eval rakudo b2e7ac: OUTPUT«Class 'Perl6MultiSub' not found␤current instr.: 'parrot;Perl6Role;!add_variant' pc 2645 (src/classes/Role.pir:42)␤»
03:37 TimToady I guess rakudo is still hosed
03:38 TimToady anyway, that should work
03:42 shinobi-cl pugs: my @list = ('a', 'b', 'c'); say ?('a' ~~ any(@list));
03:42 p6eval pugs: OUTPUT«any(VBool False,VBool True)␤»
03:42 shinobi-cl pugs: my @list = ('a', 'b', 'c'); say +('a' ~~ any(@list));
03:42 p6eval pugs: OUTPUT«any(VNum 0.0,VNum 1.0)␤»
03:42 shinobi-cl pugs: my @list = ('a', 'b', 'c'); say +('a' ~~ any(|@list));
03:42 p6eval pugs: OUTPUT«any(VNum 0.0,VNum 1.0)␤»
03:43 shinobi-cl pugs: my @list = ('a', 'b', 'c'); say +(1 ~~ any(@list));
03:43 p6eval pugs: OUTPUT«any(VNum 0.0)␤»
03:43 shinobi-cl pugs: my @list = ('a', 'b', 'c'); say ?(1 ~~ any(|@list));
03:43 p6eval pugs: OUTPUT«any(VBool False)␤»
03:43 shinobi-cl pugs: my @list = ('a', 'b', 'c'); say ?('b' ~~ any(|@list));
03:43 p6eval pugs: OUTPUT«any(VBool False,VBool True)␤»
03:45 shinobi-cl pugs: say 1 ~~ any(1,2,3)
03:45 p6eval pugs: OUTPUT«any(VBool False,VBool True)␤»
03:45 TimToady | is a no-op in list context
03:46 shinobi-cl so, how can i use the ~~ for see if an element belongs to an array?
03:47 TimToady pugs: my @list = <a b c>; say "yes" if "a" ~~ any(@list)
03:47 p6eval pugs: OUTPUT«yes␤»
03:48 TimToady dinner &
03:49 shinobi-cl my @list = 1,2,3; say +(1 ~~ any(@list));
03:49 shinobi-cl pugs: my @list = 1,2,3; say +(1 ~~ any(@list));
03:49 p6eval pugs: OUTPUT«any(VNum 0.0,VNum 1.0)␤»
03:50 shinobi-cl pugs: my @list = 1,2,3; say (1 ~~ any(@list)) ?? "yes" !! "nope" ;
03:50 p6eval pugs: OUTPUT«yes␤»
03:50 shinobi-cl pugs: my @list = 1,2,3; say (6 ~~ any(@list)) ?? "yes" !! "nope" ;
03:50 p6eval pugs: OUTPUT«nope␤»
03:50 shinobi-cl thanks!
03:51 shinobi-cl pugs: my %pets(cats=>1,dogs=>2,dodos=>0) ; say ('cats' ~~ any(keys %pets)) ?? "yes" !! "nope" ;
03:51 p6eval pugs: OUTPUT«*** Cannot cast from VList [] to Pugs.AST.Types.VCode (VCode)␤    at /tmp/ntUz2WImJ3 line 1, column 1-36␤»
03:51 shinobi-cl pugs: my %pets(cats=>1,dogs=>2,dodos=>0); say %pets;
03:51 p6eval pugs: OUTPUT«*** Cannot cast from VList [] to Pugs.AST.Types.VCode (VCode)␤    at /tmp/G363fwVvoL line 1, column 1-35␤»
03:51 shinobi-cl pugs: my %pets=(cats=>1,dogs=>2,dodos=>0); say %pets;
03:51 p6eval pugs: OUTPUT«cats        1dodos  0dogs   2␤»
03:52 shinobi-cl pugs: my %pets=(cats=>1,dogs=>2,dodos=>0) ; say ('cats' ~~ any(keys %pets)) ?? "yes" !! "nope" ;
03:52 p6eval pugs: OUTPUT«yes␤»
03:52 shinobi-cl pugs: my %pets=(cats=>1,dogs=>2,dodos=>0) ; say ('0' ~~ any(values %pets)) ?? "yes" !! "nope" ;
03:52 p6eval pugs: OUTPUT«yes␤»
03:52 shinobi-cl pugs: my %pets=(cats=>1,dogs=>2,dodos=>0) ; say ('3' ~~ any(values %pets)) ?? "yes" !! "nope" ;
03:52 p6eval pugs: OUTPUT«yes␤»
03:52 shinobi-cl pugs: my %pets=(cats=>1,dogs=>2,dodos=>0) ; say (3 ~~ any(values %pets)) ?? "yes" !! "nope" ;
03:52 p6eval pugs: OUTPUT«yes␤»
03:53 shinobi-cl pugs: my %pets=(cats=>1,dogs=>2,dodos=>0) ; say ('pigs' ~~ any(keys %pets)) ?? "yes" !! "nope" ;
03:53 p6eval pugs: OUTPUT«nope␤»
03:54 shinobi-cl pugs: my %pets=(cats=>1,dogs=>2,dodos=>0) ; say ( cats=>1 ~~ any(%pets)) ?? "yes" !! "nope" ;
03:54 p6eval pugs: OUTPUT«yes␤»
03:54 shinobi-cl pugs: my %pets=(cats=>1,dogs=>2,dodos=>0) ; say ( cats=>2 ~~ any(%pets)) ?? "yes" !! "nope" ;
03:54 p6eval pugs: OUTPUT«yes␤»
03:55 shinobi-cl pugs: my %pets=(cats=>1,dogs=>2,dodos=>0) ; say ( (cats=>2) ~~ any(%pets)) ?? "yes" !! "nope" ;
03:55 p6eval pugs: OUTPUT«yes␤»
03:55 shinobi-cl pugs: my %pets=(cats=>1,dogs=>2,dodos=>0) ; say (3 ~~ any(%pets.values)) ?? "yes" !! "nope" ;
03:55 p6eval pugs: OUTPUT«yes␤»
03:57 shinobi-cl pugs: my %pets=(cats=>1,dogs=>2,dodos=>0) ; say (3 ~~ none(values %pets)) ?? "yes" !! "nope" ;
03:57 p6eval pugs: OUTPUT«nope␤»
03:57 shinobi-cl pugs: my %pets=(cats=>1,dogs=>2,dodos=>0) ; say (1 ~~ none(values %pets)) ?? "yes" !! "nope" ;
03:58 p6eval pugs: OUTPUT«nope␤»
04:05 Nom- joined #perl6
04:34 Icarus joined #perl6
04:38 [particle] joined #perl6
04:41 hercynium joined #perl6
04:45 pmichaud joined #perl6
04:45 hercynium joined #perl6
04:45 [particle] joined #perl6
04:45 digitalicarus joined #perl6
04:45 wayland joined #perl6
04:45 PZt joined #perl6
04:45 eternaleye joined #perl6
04:45 [particle]1 joined #perl6
04:45 icwiener_ joined #perl6
04:45 mberends joined #perl6
04:45 BrunoX joined #perl6
04:45 skids joined #perl6
04:45 lambdabot joined #perl6
04:45 r0bby joined #perl6
04:45 cognominal joined #perl6
04:45 charsbar_ joined #perl6
04:45 Patterner joined #perl6
04:45 silug joined #perl6
04:45 Exodist joined #perl6
04:45 Tene_ joined #perl6
04:45 jan_ joined #perl6
04:45 Southen joined #perl6
04:45 kanru joined #perl6
04:45 meteorjay joined #perl6
04:45 BinGOs joined #perl6
04:45 araujo joined #perl6
04:45 kane_ joined #perl6
04:45 jjore joined #perl6
04:45 awwaiid joined #perl6
04:45 zev joined #perl6
04:45 nipotan joined #perl6
04:45 dmpk2k joined #perl6
04:45 mdxi joined #perl6
04:45 Helios joined #perl6
04:45 jeremiah joined #perl6
04:45 SamB joined #perl6
04:45 drbean_ joined #perl6
04:45 Cyrus___ joined #perl6
04:45 AzureStone_ joined #perl6
04:45 spooneybarger joined #perl6
04:45 idemal joined #perl6
04:45 aindilis` joined #perl6
04:45 p6eval joined #perl6
04:45 frobnitz joined #perl6
04:45 ft joined #perl6
04:45 zostay joined #perl6
04:45 Khisanth joined #perl6
04:45 szabgab joined #perl6
04:45 pugs_svn joined #perl6
04:45 simcop2387 joined #perl6
04:45 felipe joined #perl6
04:45 s1n joined #perl6
04:45 japhb joined #perl6
04:45 yahooooo joined #perl6
04:45 Eevee joined #perl6
04:45 bacek joined #perl6
04:45 kcwu joined #perl6
04:45 smtms joined #perl6
04:45 LCamel joined #perl6
04:45 Grrrr joined #perl6
04:45 broquaint joined #perl6
04:45 xinming joined #perl6
04:45 p6paste joined #perl6
04:45 perlbot joined #perl6
04:45 Aisling joined #perl6
04:45 JarJarBinks joined #perl6
04:45 ilogger2 joined #perl6
04:45 ascent_ joined #perl6
04:45 dalek joined #perl6
04:45 c9s joined #perl6
04:45 agentzh joined #perl6
04:45 wolverian joined #perl6
04:45 rhr joined #perl6
04:45 cj joined #perl6
04:45 gfldex joined #perl6
04:45 revdiablo joined #perl6
04:45 avar joined #perl6
04:45 bigpresh joined #perl6
04:45 tcliou|Away joined #perl6
04:45 jrockway joined #perl6
04:45 Caelum joined #perl6
04:45 integral joined #perl6
04:45 [cotto] joined #perl6
04:45 samlh joined #perl6
04:45 literal joined #perl6
04:45 preflex joined #perl6
04:45 sunnavy joined #perl6
04:45 f00li5h joined #perl6
04:45 TimToady joined #perl6
04:45 moritz_ joined #perl6
04:45 mtve joined #perl6
04:45 edenc joined #perl6
04:45 Maddingue joined #perl6
04:45 diakopter joined #perl6
04:45 baest joined #perl6
04:45 jnthn joined #perl6
04:45 Gothmog_ joined #perl6
04:45 estrabd joined #perl6
04:45 hcchien joined #perl6
04:45 clkao joined #perl6
04:45 spinclad joined #perl6
04:45 cls_bsd joined #perl6
04:45 simcop2387 digitalicarus: a bit of both i believe, lots of developers though i think
04:45 PerlJam joined #perl6
04:45 c9s_mv joined #perl6
04:45 lisppaste3 joined #perl6
04:45 IRSeekBot joined #perl6
04:45 c1sung joined #perl6
04:45 Matt-W joined #perl6
04:45 buu joined #perl6
04:45 orafu joined #perl6
04:46 digitalicarus I use Perl 5 a lot at work and in general. I'm curious about learning new things, but am torn...
04:47 digitalicarus It seems like all the interpreted languages do basically the same things. Why make a new Perl. Is it a matter of syntactic taste?
04:47 shinobi-cl look for roles
04:47 shinobi-cl for me, is the best thing
04:47 shinobi-cl and junctions too
04:48 simcop2387 digitalicarus: well syntactic issues, and lots of features people wanted, and things like that
04:49 digitalicarus I'm not trying to be derogatory, just curious. I'm very happy using Perl5, aside from cumbersome syntax for oop. I've been very tempted by ruby's block friendly syntax.
04:50 simcop2387 i can't say for sure but i believe a number of things like that are addressed (i haven't followed perl6 as closely as i wish i had been)
04:50 digitalicarus Does Perl6 attempt to offer any performance advantages?
04:50 diakopter no. no one tries to improve performance anymore.  I think everyone just forgot about it.
04:51 simcop2387 i think performance is best answered over in Parrot currently
04:51 shinobi-cl digitalicarus... use the library called Moose for perl5
04:51 shinobi-cl it will make oop much easier
04:52 shinobi-cl no more 'bless' needed
04:53 TimToady digitalicarus: Perl 6 is *potentially* faster than Perl 5 because the optimizer has more information, but we're concentrating on "correct" before "fast"
04:54 TimToady fast will come later
04:54 digitalicarus I guess my questions are aimed at utility. Is there anything I can do in Perl 6, ruby, python, etc that I can't do in Perl 5?
04:54 diakopter digitalicarus: for interesting ideas/thoughts about optimization of dynamic languages... see http://tartley.com/?p=456 and http://steve-yegge.blogspot.com/2008/​05/dynamic-languages-strike-back.html
04:55 TimToady digitalicarus: these are all turing complete languages, so the official answer is "no"
04:56 TimToady but there are certainly differences in what is easy
04:56 alester joined #perl6
04:57 digitalicarus There is some difference in accessibility of APIs. If I want access to a new type of device in a fledgling language, I must code it in C with language X hooks or wait for someone else to.
04:57 shinobi-cl well.. good night all!
04:57 shinobi-cl left #perl6
04:57 TimToady here's fibonacci in Perl 6: 1,1...&[+]
04:58 TimToady Perl 6 will have a better native interface than Perl 5
05:00 TimToady if for no other reason than Perl 6 can actually declare APIs with C-like types
05:00 TimToady at least for primitive types and simple structs
05:01 TimToady and the OO doesn't require translation; it can just encapsulate the actual C struct
05:02 digitalicarus I really enjoy the freedom of Perl 5, and I feel like it's more creative and artistic a syntax than some other interpreted languages. I suppose it all comes down to intuitive syntax and getting work done quicker. I hope that Perl 6 carries on the legacy of syntactic freedom. More than that I hope it gets its killer app.
05:02 digitalicarus After all, Ruby would be a lot more obscure if it weren't for Rails.
05:02 TimToady Perl 6 is all over freedom, and the killer app will come
05:03 TimToady it's a controlled freedom, so you don't do it accidentally, but all the defaults are tweakable underneath if you want
05:04 TimToady basically, things that seem generalizable in Perl 5 but aren't really, actually are generalizable in Perl 6
05:05 digitalicarus I will start looking into Perl 6. I've looked at Ruby and Python and can't fabricate a reason to learn another language that can't really do anything I can't with my meager Perl 5 chops.
05:06 digitalicarus Perhaps I'm not writing advanced enough code to need cutting edge language constructs :)
05:06 TimToady that's okay, we've tried hard to keep Perl 6 a language you can learn small-end first
05:07 TimToady but they'll be there when you need 'em
05:07 TimToady assuming we finish implementing it, of course...
05:07 digitalicarus Is my Perl 5 knowledge extensible to Perl 6? I mean, will I have a leg up on Perl 6 if I'm okay at 5?
05:07 TimToady certainly, there aren't many things you have to unlearn
05:08 TimToady $foo[$ix] becomes @foo[$ix], for instance
05:08 TimToady but that's more regular
05:08 TimToady and we use .foo instead of ->foo for method calls, for various reason
05:08 TimToady reasons
05:09 TimToady and foreach loops are now written for @list -> $elem {...}
05:09 TimToady because $elem is actually a formal parameter to the block
05:10 digitalicarus Seems to be influenced by the terseness of Ruby
05:10 TimToady in some ways, but hopefully better designed
05:10 TimToady certainly -> $x {...} is like ruby's {|x| ...}
05:11 TimToady interestingly, ruby is borrowing the -> form, last I heard
05:12 digitalicarus I thought I read somewhere that Matz was inspired in part by perl
05:12 simcop2387 the main thing i'm waiting for out of perl6 is parrot, its a very nifty idea
05:12 TimToady 60-70% of ruby syntax is straight out of perl
05:12 digitalicarus gtg. I will try to come back with more stimulating conversation after more research on the Perl 6 and parrot projects.
05:12 TimToady I'm waiting for Perl 6 to run on any platform
05:12 digitalicarus see you
05:12 TimToady have fun
05:13 pugs_svn r25324 | chrisdolan++ | S02 and S19 now say $?PROGRAM instead of $*PROGRAM_NAME
05:13 eternaleye joined #perl6
05:14 shinobi-cl joined #perl6
05:16 TimToady hmm $?PROGRAM makes no sense
05:18 TimToady the program name is not necessarily known at compile time
05:18 TimToady it can only be known at run time
05:21 pugs_svn r25325 | lwall++ | [S19] $?PROGRAM makes no sense
05:21 bigal joined #perl6
05:22 shinobi-cl i used to work on delphi many years
05:22 shinobi-cl one of the things i liked about it was the "with" keyword... which works just like "given"
05:24 TimToady it's another topicalizer, but I think "given" is more natural; "with" is too non-specific
05:24 shinobi-cl bue being that given is used as the switch-case, is not really an equivalent to with, since it limits you sometimes.. for example, using a case inside a "with"
05:25 shinobi-cl yes, i agree, with is too general
05:25 pugs_svn r25326 | lwall++ | [progname] program name needs to come from PROCESS namespace
05:26 shinobi-cl the idea of the "with" in delphi was mainly to type less code
05:27 shinobi-cl with qryRead do  begin  Writeln(Fields[0].AsString); Next end.... without with, you had to write qryRead in front of Fields[0] and Next
05:28 pugs_svn r25327 | lwall++ | [progname] botched previous patch
05:28 shinobi-cl it helped a LOT in code readability
05:28 TimToady that's basically from Pascal
05:29 shinobi-cl yes, pascal
05:29 TimToady we almost have the same, as long as you put an extra . on the front
05:29 TimToady given %foo { .<foo> = .<bar> }
05:30 shinobi-cl but if you use a given inside that given, you loose the default variable
05:30 shinobi-cl or is "lose"?
05:30 TimToady lose
05:31 TimToady but then it would be potentially ambiguous anyway
05:31 TimToady and you can say given %foo -> $f { $f.<foo> = $f.<bar> }
05:31 TimToady even if %foo is very long
05:31 bigal would like to help with P6, but not a great C programmer... anyone need help not C oriented?
05:31 TimToady well, in that case, $f<foo> = $f<bar> is fine
05:32 TimToady most of the folks around here aren't doing C
05:32 TimToady lotta people writing tests
05:32 bigal k, thought p6 written in c
05:32 shinobi-cl oh i see... its ok then.... even better that "with"
05:32 TimToady pugs is written in Haskell
05:32 TimToady the STD parser is written in Perl 6 :)
05:33 TimToady elf is at least partly in ruby
05:33 bigal rgr... not a Haskell xpert either (unfrtnly)
05:33 TimToady but you can program in Perl 6 if you write tests :)
05:33 bigal I'll back off then... was hoping to contribute.  not sure how to help though with my skill set.
05:33 TimToady or there are docs, wikis, etc
05:34 TimToady even just blogging your learning curve can be useful
05:34 bigal rgr that, can do docs, wikis, etc.  Just point me to the POC. I'll do 6hrs weekly
05:35 TimToady well, most of the Perl 6 folks hang out here, and most of the Parrot folks on #parrot on irc.perl.org
05:35 shinobi-cl i have a not official wiki... you can help there if you have some time :) and you can learn some perl6 from there... nothing like this channel, but enough for starting i think
05:35 TimToady various people do various bits of it
05:36 bigal rgr... bigal@terramagnetoscope.net  shoot me some work, I'll do my best
05:36 TimToady and nobody will be offended if you ask around
05:36 TimToady would you like a commit bit to the pugs repo to start with?
05:37 bigal perhaps, Im win32/Suse10.1/opensolaris os kind of person... anything for the team. Lord know's Ive benefitted from perl enough to pay back.
05:38 TimToady could always use help in portability
05:38 pugs_svn r25328 | wayland++ | S16-io: Reorganised everything, grouping things together a bit better.  This is only a
05:38 pugs_svn r25328 | wayland++ | draft; otherwise I'd be a lot more careful :).
05:38 pugs_svn r25328 | wayland++ |
05:38 pugs_svn r25328 | wayland++ | Specifically, I've:
05:38 pugs_svn r25328 | wayland++ | -  Taken some of the stuff that was spread throughout the document, and put it in
05:38 pugs_svn r25328 | wayland++ |    with its associated role
05:39 pugs_svn r25328 | wayland++ | -  Created sections for a lot of the different classes we'll need
05:39 pugs_svn r25328 | wayland++ |
05:39 pugs_svn r25328 | wayland++ | It still needs a lot of work.
05:40 bigal ok, I can offer 6 hrs weekly min, plus anything I can provide from my servers... owe alot to perl.
05:40 mikehh bigal: have you looked at http://www.perlfoundation.org/perl6/index.cgi
05:42 TimToady I've sent you a commitbit to the pugs repo; which contains the specs and test suite
05:42 TimToady it's customary to add yourself to AUTHORS as a test checkin
05:43 TimToady for pugs repo stuff the principle is forgiveness rather than permissions, so hack away
05:44 bigal checking www.perlfoundation.org/perl6/index.cgi now... I've donated 'lots' for me in $$ ($500) but worth it for me
05:45 bigal afraid of pugs as I am not a pugs guy. Self taught perl/C/Java guy... hate java, never touching C again without an order :>)
05:45 bigal Can learn pugs though if docs...
05:46 bigal rgr on the Pugs... I will make it my after hours project for this weekend/week.
05:47 bigal offered to chromatic previously (about 6 mo ago) got the impression that not too much use w/o C.. VM authoring abilities (which I have none of)
05:51 shinobi-cl pugs: my @list = 'a', 'b', 'c', 'c', 'f'; given @list -> $l {  say "Reversed array:";  .reverse.say;  say "Sorted array:"  .sort.say;  given .uniq.elems {  when $l.elems { say 'There are no repeated elements' }  default        { say 'There are repeated elements' }  } }
05:51 bigal Things are complicated to the avuser... rakudo, parrot, vm. Much dif to perl
05:51 p6eval pugs: OUTPUT«*** ␤    Unexpected "."␤    expecting operator, ":", "," or "}"␤    at /tmp/dKVmMatzp8 line 1, column 118␤»
05:51 TimToady pugs repo is not pugs program
05:51 TimToady most of the pugs repo has nothing to do with the Haskell implementation
05:52 shinobi-cl std: my @list = 'a', 'b', 'c', 'c', 'f'; given @list -> $l {  say "Reversed array:";  .reverse.say;  say "Sorted array:"  .sort.say;  given .uniq.elems {  when $l.elems { say 'There are no repeated elements' }  default        { say 'There are repeated elements' }  } }
05:52 p6eval std 25328: OUTPUT«############# PARSE FAILED #############␤Malformed block␤Syntax error (two terms in a row?) at /tmp/oFVIDIwwvN line 1:␤------> [32m";  .reverse.say;  say "Sorted array:"  [31m.sort.say;  given .uniq.elems {  when $l[0m␤    expecting any of:␤   infix or meta-infix␤      infix
05:52 p6eval ..stopper␤...
05:53 shinobi-cl std: my @list = 'a', 'b', 'c', 'c', 'f'; given |@list -> $l {  say "Reversed array:";  .reverse.say;  say "Sorted array:"  .sort.say;  given .uniq.elems {  when $l.elems { say 'There are no repeated elements' }  default        { say 'There are repeated elements' }  } }
05:53 p6eval std 25328: OUTPUT«############# PARSE FAILED #############␤Malformed block␤Syntax error (two terms in a row?) at /tmp/3M5z9L3FS1 line 1:␤------> [32m";  .reverse.say;  say "Sorted array:"  [31m.sort.say;  given .uniq.elems {  when $l[0m␤    expecting any of:␤   infix or meta-infix␤      infix
05:53 p6eval ..stopper␤...
05:53 bigal rgr, have "Perl 6... Essentials" from o'reilly. For me doesnt clearly delinieate(MP) between architectures
05:53 TimToady that's still two terms in a row
05:53 TimToady that book is somewhat obsolete these days
05:54 shinobi-cl std: my @list = 'a', 'b', 'c', 'c', 'f'; given |@list -> $l {  say "Reversed array:";  .reverse.say;  say "Sorted array:";  .sort.say;  given .uniq.elems {  when $l.elems { say 'There are no repeated elements'; }  default        { say 'There are repeated elements'; }  } }
05:54 p6eval std 25328: OUTPUT«mkdir lex: Permission denied at Cursor.pm line 547␤FAILED 00:02 32m␤»
05:54 shinobi-cl std: my @list = 'a', 'b', 'c', 'c', 'f'; given @list -> $l {  say "Reversed array:";  .reverse.say;  say "Sorted array:";  .sort.say;  given .uniq.elems {  when $l.elems { say 'There are no repeated elements'; }  default        { say 'There are repeated elements'; }  } }
05:54 p6eval std 25328: OUTPUT«############# PARSE FAILED #############␤Malformed block␤Malformed block␤Syntax error at /tmp/icmg6gKdmE line 1:␤------> [32may 'There are no repeated elements'; }  [31mdefault        { say 'There are repeated[0m␤    expecting terminator␤FAILED 00:04 36m␤»
05:54 TimToady need another ;
05:55 TimToady } only terminates a statement before newline
05:56 TimToady std: my @list = 'a', 'b', 'c', 'c', 'f'; given @list -> $l {  say "Reversed array:";  .reverse.say;  say "Sorted array:";  .sort.say;  given .uniq.elems {  when  $l.elems { say 'There are no repeated elements'; };default        { say 'There are repeated elements'; }  } }
05:57 p6eval std 25328: OUTPUT«ok 00:04 36m␤»
05:57 shinobi-cl thanks, again :)
05:57 shinobi-cl pugs: my @list = 'a', 'b', 'c', 'c', 'f'; given @list -> $l {  say "Reversed array:";  .reverse.say;  say "Sorted array:";  .sort.say;  given .uniq.elems {  when $l.elems { say 'There are no repeated elements'; };  default        { say 'There are repeated elements'; }  } }
05:58 p6eval pugs: OUTPUT«Reversed array:␤␤Sorted array:␤␤There are repeated elements␤»
05:58 TimToady if you -> $l it doesn't alias $_
06:00 TimToady pugs: my @list = 'a', 'b', 'c', 'c', 'f'; given @list {  say "Reversed array:";  .reverse.say;  say "Sorted array:";  .sort.say;  given .uniq.elems {  when $OUTER::_.elems { say 'There are no repeated elements'; };  default        { say 'There are repeated elements'; }  } }
06:00 p6eval pugs: OUTPUT«Reversed array:␤␤Sorted array:␤␤There are no repeated elements␤»
06:01 TimToady shoulda worked...
06:01 shinobi-cl my @list = 'a', 'b', 'c', 'c', 'f'; given @list -> $L {  say "Reversed array:";  $L.reverse.say;  say "Sorted array:";  $L.sort.say;  given $L.uniq.elems {  when $L.elems { say 'There are no repeated elements'; }  default        { say 'There are repeated elements'; }  } }
06:01 shinobi-cl pugs: my @list = 'a', 'b', 'c', 'c', 'f'; given @list -> $L {  say "Reversed array:";  $L.reverse.say;  say "Sorted array:";  $L.sort.say;  given $L.uniq.elems {  when $L.elems { say 'There are no repeated elements'; }  default        { say 'There are repeated elements'; }  } }
06:01 p6eval pugs: OUTPUT«Reversed array:␤fccba␤Sorted array:␤abccf␤There are repeated elements␤»
06:02 shinobi-cl pugs: my @list = 'a', 'b', 'c', 'c', 'f'; given @list -> $L {  say "Reversed array:";  $L.reverse.say;  say "Sorted array:";  $L.sort.say;  given $L.uniq.elems {  when $L.elems { say 'There are no repeated elements: Total:'~$_; }  default        { say 'There are repeated elements. Total:'~$_'; }  } }
06:02 p6eval pugs: OUTPUT«*** ␤    Unexpected "';"␤    expecting "::", term postfix, operator, ":", "," or "}"␤    at /tmp/KTTAeMqkIy line 1, column 287␤»
06:03 shinobi-cl pugs: my @list = 'a', 'b', 'c', 'c', 'f'; given @list -> $L {  say "Reversed array:";  $L.reverse.say;  say "Sorted array:";  $L.sort.say;  given $L.uniq.elems {  when $L.elems { say 'There are no repeated elements: Total:'~$_; }  default        { say 'There are repeated elements. Total:'~$_; }  } }
06:03 p6eval pugs: OUTPUT«Reversed array:␤fccba␤Sorted array:␤abccf␤There are repeated elements. Total:4␤»
06:03 shinobi-cl pugs: my @list = 'a', 'b', 'c', 'd', 'f'; given @list -> $L {  say "Reversed array:";  $L.reverse.say;  say "Sorted array:";  $L.sort.say;  given $L.uniq.elems {  when $L.elems { say 'There are no repeated elements: Total:'~$_; }  default        { say 'There are repeated elements. Total:'~$_; }  } }
06:03 p6eval pugs: OUTPUT«Reversed array:␤fdcba␤Sorted array:␤abcdf␤There are no repeated elements: Total:5␤»
06:05 shinobi-cl so thats how you use given as switch and as "with" combined :)  ...   better than pascal "with"
06:08 bigal looking form my win32 svn client... tracking svn.pugs
06:08 bigal tks
06:12 bigal brb
06:21 bigal joined #perl6
06:26 bacek pugs: try { die "Goodbye cruel world!" };say $!.^isa("Exception")
06:26 p6eval pugs: OUTPUT«␤»
06:27 bacek pugs: try { die "Goodbye cruel world!" };say $!.isa("Exception")
06:27 p6eval pugs: OUTPUT«␤»
06:27 bacek pugs: try { die "Goodbye cruel world!" };say $!.^isa("Failure")
06:27 p6eval pugs: OUTPUT«␤»
06:27 TimToady pugs: try { die "Foo" }; say $!.WHAT
06:27 p6eval pugs: OUTPUT«Str␤»
06:32 shinobi-cl left #perl6
06:37 pugs_svn r25329 | wayland++ | S02: Moved comment about standard file handles to S16.
06:37 pugs_svn r25329 | wayland++ | S16: Did more clearing up, and fixed some stupid things I did last time
06:41 Matt-W joined #perl6
06:43 kate21de joined #perl6
06:46 alc joined #perl6
06:53 Alias joined #perl6
07:03 Tene joined #perl6
07:07 pugs_svn r25330 | bacek++ | [spec] Fix min= and max= tests.
07:21 kate21de joined #perl6
07:54 abra joined #perl6
07:54 abra left #perl6
08:10 DemoFreak joined #perl6
08:15 kate21de joined #perl6
08:18 kate21de left #perl6
08:19 mikehh joined #perl6
08:21 bacek pugs: org(""); say "HI"
08:21 p6eval pugs: OUTPUT«*** No such subroutine: "&org"␤    at /tmp/uAcRz73jil line 1, column 1-8␤»
08:22 bacek pugs: ord(""); say "HI"
08:22 p6eval pugs: OUTPUT«HI␤»
08:40 kate21de joined #perl6
08:42 barney joined #perl6
09:11 bacek pugs: say -1i; say -1.i;
09:12 p6eval pugs: OUTPUT«-0 + -1i␤*** No such method in class Int: "&i"␤    at /tmp/TiquMRBb4l line 1, column 14-18␤»
09:58 maerzhase joined #perl6
09:59 maerzhase joined #perl6
10:02 pmurias joined #perl6
10:10 M_o_C joined #perl6
10:21 bacek msg pmichaud "git checkout `git log --reverse  --since="2009-02-01"|head -1|cut -f2 -d' '`"
10:46 alc joined #perl6
10:54 sri_kraih joined #perl6
11:08 kane__ joined #perl6
11:16 pmurias joined #perl6
11:18 shinobi-cl joined #perl6
11:24 masak joined #perl6
11:39 masak tinkering around with Druid, I thought I'd be hip just like mberends++ and import my Test.pm directly from the Rakudo repo by symlinking.
11:40 masak but when I did, I realized that the Rakudo Test.pm lacks a killer feature that the November Test.pm has.
11:40 masak now, as a conscientious Perl 6 contributor, what should I do?
11:41 masak just go ahead and patch the Rakudo Test.pm? (making sure to run the spectests before and after)
11:41 masak or send the patch as a rakudobug?
11:42 masak I know many Test.pm patches have been stalled due to the recent discussion about a test model overhaul.
11:42 duke_leto joined #perl6
11:42 duke_leto left #perl6
11:42 masak one of those stalled tickets even adds the functionality I'm missing, possibly even in a better way.
11:47 eternaleye joined #perl6
11:48 jnthn masak: Maybe to the list is safest.
11:48 jnthn masak: OTOH, if it's just adding something and not changing existing things, it's probably safe-ish to put it in...
11:50 jnthn masak: BTW, ticket queue is under 250! :-P
11:50 masak jnthn: I'll see if I can find the stalled patch tickets first.
11:50 masak jnthn: yes, I saw the flurry of activity. kudos.
11:51 jnthn Hope it helps.
11:51 masak jnthn: I'm the one having trouble keeping up now. :)
11:51 masak have to improve a lot of suboptimalized code...
11:51 masak and I only found one bug last night.
11:52 masak rakudo: say "you there, p6eval?"
11:52 jnthn Wow, that's quite a low-scoring night for you. :-P
11:52 eternaleye joined #perl6
11:52 masak jnthn: I know. what's with this sudden bout of stability? :P
11:52 p6eval rakudo b2e7ac: OUTPUT«Class 'Perl6MultiSub' not found␤current instr.: 'parrot;Perl6Role;!add_variant' pc 2645 (src/classes/Role.pir:42)␤»
11:52 jnthn meh. br0ken
11:52 * masak dives in to fix
11:53 masak oh, and it wasn't even a bug I found.
11:53 masak just a missing feature.
11:55 masak moritz_: timtowtdi.org is slaaaaaauw today.
11:55 jnthn If it's an easy to add misisng feature, ticket welcome. :-)
11:56 masak jnthn: don't worry, I'll post one. :)
11:56 masak I think it's easy to add.
11:58 masak http://rt.perl.org/rt3/Tic​ket/Display.html?id=63230
11:59 jnthn Talk about useless example - it doesn't even rename them. :-P
11:59 jnthn std: sub formalize($text, :case($case), :justify($justify)) {...}
11:59 masak :)
11:59 jnthn ...std...?
11:59 masak that's because it's from S06, illustrating what it desugars to.
12:00 masak I just wanted something from the canon.
12:00 jnthn Anyway, I'm sure STD handles it, which means I can just nab the parsing of it from there. :-)
12:00 masak if std is on timtowtdi.org, it might be slaaaaaaauw to day also.
12:00 masak jnthn++
12:04 Matt-W can rakudo tidy my house yet?
12:06 masak Matt-W: last time I tried, vacuum($carpet) threw a Null PMC access because it expected a Sealed::Box, not a Carpet. but that was some months ago, might work now.
12:06 Matt-W hmm first I'm going to have to $house.contents.grep(Carpet)
12:09 * jnthn wonders if you actually can give grep a typename like that
12:10 jnthn The module I really need to write is Automate::CoffeeMachine
12:10 masak might be handy.
12:13 pugs_svn joined #perl6
12:13 iblechbot joined #perl6
12:13 p6eval joined #perl6
12:14 jnthn rakudo: say "masak++"
12:14 p6eval rakudo b2e7ac: OUTPUT«Class 'Perl6MultiSub' not found␤current instr.: 'parrot;Perl6Role;!add_variant' pc 2645 (src/classes/Role.pir:42)␤»
12:14 masak hold on...
12:15 jnthn fail
12:15 masak I finally got access to timtowdtdi.org. haven't actually done anything yet.
12:15 jnthn Oh well, it was speculative karma then...
12:15 masak :)
12:20 meppl joined #perl6
12:29 M_o_C joined #perl6
12:32 masak rakudo: say "you there now, p6eval?"
12:32 p6eval rakudo a0a390: OUTPUT«you there now, p6eval?␤»
12:32 masak \o/
12:40 Matt-W woo
12:40 masak and now I have to go.
12:40 * Matt-W organises for masak to have a fanfare on his departure
12:41 masak I'm off to a local meeting about how to implement Esperanto on a local level.
12:41 masak :P
12:43 jnthn local $esperanto;
12:49 Matt-W see, everything's easy in Perl
13:08 alexn_org joined #perl6
13:42 cognominal joined #perl6
13:46 |MoC| joined #perl6
13:56 moritz_ joined #perl6
13:56 sri_kraih joined #perl6
13:56 DemoFreak joined #perl6
13:56 [particle] joined #perl6
13:56 BrunoX joined #perl6
13:56 skids joined #perl6
13:56 Cyrus___ joined #perl6
13:56 aindilis` joined #perl6
13:56 Khisanth joined #perl6
13:56 szabgab joined #perl6
13:56 japhb joined #perl6
13:56 yahooooo joined #perl6
13:56 bacek joined #perl6
13:56 dalek joined #perl6
13:56 TimToady joined #perl6
13:57 DemoFreak joined #perl6
14:01 cai_ joined #perl6
14:03 [particle]1 joined #perl6
14:29 kate21de ggh
14:30 kate21de left #perl6
14:31 cognominal joined #perl6
14:31 kate21de joined #perl6
14:33 masak joined #perl6
14:33 * masak revenas
14:38 jnthn revenas?
14:39 masak eo:'veni' = en:'to come'. the '-as' indicates present tense. eo:'re-' works as in English.
14:40 jnthn I'm happy you've re-come. ;-)
14:40 masak me too. :)
14:41 masak back to hacking on my shortest-path algorithm for Druid.
14:41 jnthn Sounds fun.
14:41 * jnthn is doing some work on $OTHER_JOB
14:41 * wolverian is taking a lojban course
14:42 masak also on the agenda for the weekend: a review of mberends' Pod suite, maybe some proto hacking, maybe maybe implementing unpack in moritz_ unofficial prelude.
14:42 masak wolverian: any impressions so far that you'd like to share? I'm interested.
14:43 jnthn proto hacking?
14:43 wolverian masak: it's incredibly easy to get on a level where you can actually form sentences easily and have conversations (albeit not very fluidly).
14:43 wolverian masak: I'm not familiar with esperanto or other constructed languages, so I can't really compare.
14:44 masak ok.
14:44 shinobi-cl left #perl6
14:44 shinobi-cl joined #perl6
14:44 masak so far I've been a bit put of by the grammatical vocab of Lojban.
14:44 wolverian all I've learned so far has made perfect sense in the minimalist logical context the language is based on, so I'm happy.
14:44 masak but maybe that'll eventually lure me in as well. :)
14:45 * jnthn is too tied up with Slovak and Russian to have time for much other languages ATM. :-|
14:45 masak wolverian: do you have any sense of the size of the international Lojban community?
14:45 masak jnthn: Slovak and Russian sounds plenty.
14:45 wolverian masak: lojban.org is somewhat active, as is #lojban; some hundreds.
14:45 wolverian masak: not a large community.
14:45 * masak was at a lecture by Douglas Hofstadter yesterday
14:46 masak heard him speak about his translation of Eugene Onegin.
14:46 masak wolverian: still, larger than many other conlangs.
14:46 masak certainly among the 10 largest.
14:46 wolverian oh, certainly.
14:47 wolverian I'm thinking of making an attempt at porting the grammar to parsec over the summer
14:47 kate21de left #perl6
14:47 masak :)
14:47 wolverian or perhaps perl 6 rules...
14:48 wolverian (thing is, if I do it in haskell, I'll probably get credits for it from the CS dept)
14:48 wolverian ("haskell workshop")
14:49 * masak anke konsideras lernor Ido
14:49 jnthn "masak is considering lerning Ido"?
14:49 masak jnthn: 'also', yes
14:50 masak with the extra twist that 'learning' is a future infinitive.
14:50 wolverian pfft, Ido has verbs, and nouns, and all that.
14:50 wolverian much too complex. :)
14:50 masak wolverian: :P
14:50 masak wolverian: have you looked at Toki Pona?
14:50 masak it's the latest minilang craze among the young Esperantists.
14:51 wolverian masak: yes, it's cute.
14:51 masak I don't much care for it. no language which calls pee 'yellow water' deserves my respect.
14:51 wolverian heh.
14:52 cognominal joined #perl6
14:52 wolverian pinca in lojban.
14:53 wolverian gotta run, cheers.
15:00 shinobi-cl std: my $a = [+](1,2,3); say $a;
15:00 p6eval std 25330: OUTPUT«############# PARSE FAILED #############␤Unable to parse array composer; couldn't find final ']' at /tmp/rw2ctPz2Wf line 1:␤------> [32mmy $a = [+[31m](1,2,3); say $a;[0m␤    expecting any of:␤ noun␤   prefix or meta-prefix␤      prefix_postfix_meta_operator␤
15:00 p6eval ..whitespace␤FAILED 00:02 ...
15:00 shinobi-cl std: my $a = (1,2,3)&[+]; say $a;
15:01 p6eval std 25330: OUTPUT«############# PARSE FAILED #############␤Unable to parse array composer; couldn't find final ']' at /tmp/6ha246PxIJ line 1:␤------> [32mmy $a = (1,2,3)&[+[31m]; say $a;[0m␤    expecting any of:␤        noun␤   prefix or meta-prefix␤      prefix_postfix_meta_operator␤
15:01 p6eval ..whitespace␤FAILED 00:02...
15:02 masak std: my $a = [+] 1,2,3; say $a
15:02 p6eval std 25330: OUTPUT«############# PARSE FAILED #############␤Unable to parse array composer; couldn't find final ']' at /tmp/8YF9Z6XpNK line 1:␤------> [32mmy $a = [+[31m] 1,2,3; say $a[0m␤    expecting any of:␤   noun␤   prefix or meta-prefix␤      prefix_postfix_meta_operator␤
15:02 p6eval ..whitespace␤FAILED 00:02 34m␤»
15:04 jnthn rakudo: my $a = [+] 1,2,3; say $a;
15:04 p6eval rakudo a0a390: OUTPUT«Class 'Perl6MultiSub' not found␤current instr.: 'parrot;Perl6Role;!add_variant' pc 2691 (src/classes/Role.pir:42)␤»
15:07 shinobi-cl pugs: say 1,1..9&[+]
15:07 p6eval pugs: OUTPUT«1all(VList [],VList [VInt 1,VInt 2,VInt 3,VInt 4,VInt 5,VInt 6,VInt 7,VInt 8,VInt 9])␤»
15:07 shinobi-cl pugs: say 1,1...&[+]
15:07 p6eval pugs: OUTPUT«1all(VInt 0,VList [VInt 1,VInt 2,VInt 3,VInt 4,VInt 5,VInt 6,VInt 7,VInt 8,VInt 9,VInt 10,VInt 11,VInt 12,VInt 13,VInt 14,VInt 15,VInt 16,VInt 17,VInt 18,VInt 19,VInt 20,VInt 21,VInt 22,VInt 23,VInt 24,VInt 25,VInt 26,VInt 27,VInt 28,VInt 29,VInt 30,VInt 31,VInt 32,VInt 33,VInt 3...
15:08 shinobi-cl pugs: say (+1,1..9&[+]);
15:08 p6eval pugs: OUTPUT«1all(VList [],VList [VInt 1,VInt 2,VInt 3,VInt 4,VInt 5,VInt 6,VInt 7,VInt 8,VInt 9])␤»
15:08 shinobi-cl pugs: say +(1,1..9&[+]);
15:08 p6eval pugs: OUTPUT«2␤»
15:08 Whiteknight joined #perl6
15:08 shinobi-cl pugs: say ~(1,1..9&[+]);
15:08 p6eval pugs: OUTPUT«1 all(VList [],VList [VInt 1,VInt 2,VInt 3,VInt 4,VInt 5,VInt 6,VInt 7,VInt 8,VInt 9])␤»
15:08 * masak dives in and reboots p6eval
15:09 Limbic_Region joined #perl6
15:11 shinobi-cl pugs: say ~(1,1..9&[+]);
15:11 p6eval pugs: OUTPUT«1 all(VList [],VList [VInt 1,VInt 2,VInt 3,VInt 4,VInt 5,VInt 6,VInt 7,VInt 8,VInt 9])␤»
15:11 shinobi-cl pugs: say ~(1,1..9[+]);
15:12 p6eval pugs: OUTPUT«*** ␤    Unexpected "]);"␤    at /tmp/eR87l9REyq line 1, column 15␤»
15:12 shinobi-cl pugs: say 1,1..9[+];
15:12 p6eval pugs: OUTPUT«*** ␤    Unexpected "];"␤    at /tmp/3F1ZeOgeP9 line 1, column 13␤»
15:12 masak shinobi-cl: may I ask what it is you're attempting?
15:12 shinobi-cl fibbionacci up to 9
15:13 masak hm.
15:13 shinobi-cl quote: 04:57TimToadyhere's fibonacci in Perl 6: 1,1...&[+]
15:13 masak oh.
15:16 masak rakudo: 'back yet?' ?? 'aye!' !! 'nay :('
15:16 p6eval rakudo a0a390: RESULT«"aye!"»
15:16 masak that's good.
15:19 shinobi-cl std: my @list = 1..9; say $_ for (@list);
15:19 p6eval std 25330: OUTPUT«ok 00:02 33m␤»
15:19 shinobi-cl pugs: my @list = 1..9; say $_ for (@list);
15:19 p6eval pugs: OUTPUT«1␤2␤3␤4␤5␤6␤7␤8␤9␤»
15:19 shinobi-cl pugs: my @list = 1..Inf; say $_ for (@list);
15:20 p6eval pugs: No output (you need to produce output to STDOUT)
15:20 shinobi-cl maybe i shouldnt did that
15:20 shinobi-cl hha my english sucks
15:21 masak shinobi-cl: yes, you need to practice. :) "shouldn't have done".
15:21 shinobi-cl pugs: my @list = 1..9; my $fib = +<<@list; say $fib;
15:21 p6eval pugs: OUTPUT«1 2 3 4 5 6 7 8 9␤»
15:21 shinobi-cl pugs: my @list = 1..9; my $fib = +>>@list; say $fib;
15:21 p6eval pugs: OUTPUT«*** ␤    Unexpected "$fib"␤    expecting "=", context, ":" or "("␤    at /tmp/ViMqCfNCjG line 1, column 21␤»
15:22 shinobi-cl pugs: my @list = 1..9; say 1 >>+>> @list;
15:22 p6eval pugs: OUTPUT«*** ␤    Unexpected ">>+>>"␤    expecting operator, ":" or ","␤    at /tmp/M4tfQ7Y3ar line 1, column 24␤»
15:22 shinobi-cl pugs: my @list = 1..9; say 1 +>> @list;
15:22 p6eval pugs: OUTPUT«*** ␤    Unexpected ">"␤    at /tmp/6Rltj9h5Bb line 1, column 26␤»
15:22 shinobi-cl pugs: my @list = 1..9; say 1 +> @list;
15:22 p6eval pugs: OUTPUT«0␤»
15:23 shinobi-cl pugs: my @list = 1..9; say 1 +<< @list;
15:23 p6eval pugs: OUTPUT«*** ␤    Unexpected end of input␤    expecting block, "\\", variable name, ">>" or "<<"␤    at /tmp/yNvbKs2KnP line 2, column 1␤»
15:23 shinobi-cl pugs: my @list = 1..9; say 1 <<+<< @list;
15:23 p6eval pugs: OUTPUT«*** ␤    Unexpected "<<+<<"␤    expecting operator, ":" or ","␤    at /tmp/MPPmVpEXDL line 1, column 24␤»
15:24 alexn_org joined #perl6
15:24 shinobi-cl std:  say 1 <<+>> 2;
15:24 p6eval std 25330: OUTPUT«ok 00:02 33m␤»
15:24 shinobi-cl pugs:  say 1 <<+>> 2;
15:24 p6eval pugs: OUTPUT«*** ␤    Unexpected "<<+>>"␤    expecting operator, ":" or ","␤    at /tmp/YRsgytQUMP line 1, column 7␤»
15:24 shinobi-cl rakudo:  say 1 <<+>> 2;
15:24 p6eval rakudo a0a390: OUTPUT«3␤»
15:24 shinobi-cl rakudo: my @list = 1..9; say 1 <<+>> @list;
15:24 p6eval rakudo a0a390: OUTPUT«2345678910␤»
15:25 shinobi-cl rakudo: my @list = 1..9; say @list <<+>> @list;
15:25 p6eval rakudo a0a390: OUTPUT«24681012141618␤»
15:25 shinobi-cl rakudo: my @list = 1..9; say @list >>+<< @list;
15:25 p6eval rakudo a0a390: OUTPUT«24681012141618␤»
15:26 shinobi-cl rakudo: my @list = 1..9; say @list <<+<< @list;
15:26 p6eval rakudo a0a390: OUTPUT«24681012141618␤»
15:26 shinobi-cl rakudo: my @list = 1..9; say 1 <<+<< @list;
15:26 p6eval rakudo a0a390: OUTPUT«2345678910␤»
15:26 shinobi-cl rakudo: my @list = 1..9; say 1 >>+>> @list;
15:26 p6eval rakudo a0a390: OUTPUT«Non-dwimmy hyperoperator cannot be used on arrays of different sizes or dimensions.␤current instr.: 'die' pc 17013 (src/builtins/control.pir:204)␤»
15:32 mikehh joined #perl6
15:33 shinobi-cl rakudo: my @list = 1..9; say 2 <<*>> @list;
15:33 p6eval rakudo a0a390: OUTPUT«24681012141618␤»
15:34 shinobi-cl rakudo: my @list = 1..9; say 2 <<*<< @list;
15:34 p6eval rakudo a0a390: OUTPUT«24681012141618␤»
15:34 shinobi-cl rakudo: my @list = 1..9; say 2 <<* @list;
15:34 p6eval rakudo a0a390: OUTPUT«Statement not terminated properly at line 1, near "<<* @list;"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
15:34 shinobi-cl rakudo: my @list = 1..9; say 2 *<< @list;
15:34 p6eval rakudo a0a390: OUTPUT«Statement not terminated properly at line 1, near "*<< @list;"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
15:40 shinobi-cl rakudo: my @list = 1..9; say 2 >>*<< @list;
15:40 p6eval rakudo a0a390: OUTPUT«Non-dwimmy hyperoperator cannot be used on arrays of different sizes or dimensions.␤current instr.: 'die' pc 17013 (src/builtins/control.pir:204)␤»
15:41 shinobi-cl rakudo: my @list = 1..9; say 2 >>*<< 3;
15:41 p6eval rakudo a0a390: OUTPUT«6␤»
15:41 shinobi-cl rakudo: my @list = 1..9; say 2 >>*<< 3,2;
15:41 p6eval rakudo a0a390: OUTPUT«62␤»
15:41 shinobi-cl i just dont get the arrow directions
15:46 masak shinobi-cl: AFAIK, the arrows always point toward the operator.
15:46 masak hm, maybe not.
15:47 shinobi-cl i just found anotrher perl6 wiki
15:47 shinobi-cl http://en.wikibooks.org/wiki/Pe​rl_6_Programming/Meta_Operators
15:47 masak aye, there are a few efforts to explain Perl 6 out there. :)
15:49 icwiener joined #perl6
15:50 shinobi-cl rakudo: my @list = 1..9; my $total = [+] @list; say $total;
15:50 p6eval rakudo a0a390: OUTPUT«45␤»
15:50 shinobi-cl rakudo: say [+]&1,1..9
15:51 p6eval rakudo a0a390: OUTPUT«Use of uninitialized value␤45␤»
15:51 shinobi-cl rakudo: say &1,1..9
15:51 p6eval rakudo a0a390: OUTPUT«Use of uninitialized value␤123456789␤»
16:05 masak rakudo: for "a".."c" Z ("?", "a".."b") -> $x1, $x2 { say $x1, $x2 }
16:05 p6eval rakudo a0a390: OUTPUT«Class 'Perl6MultiSub' not found␤current instr.: 'parrot;Perl6Role;!add_variant' pc 2691 (src/classes/Role.pir:42)␤»
16:05 * masak goes to fix
16:05 masak moritz_: any idea what's causing p6eval to break all the time?
16:07 pmurias joined #perl6
16:11 masak rakudo: for "a".."c" Z ("?", "a".."b") -> $x1, $x2 { say $x1, $x2 }
16:11 p6eval rakudo a0a390: OUTPUT«a?␤ba␤StopIteration␤current instr.: '_block14' pc 179 (EVAL_19:65)␤»
16:11 masak jnthn: does this look right to you?
16:11 TimToady pugs: for "a".."c" Z ("?", "a".."b") -> $x1, $x2 { say $x1, $x2 }
16:11 p6eval pugs: OUTPUT«a?ba␤cb␤»
16:12 * masak submits rakudobug
16:12 TimToady looks right to me
16:12 masak good enough for me :)
16:12 TimToady shouldn't need the parens, either
16:13 masak right. just making sure.
16:13 TimToady pugs: for "a".."c" Z "?", "a".."b" -> $x1, $x2 { say $x1, $x2 }
16:13 p6eval pugs: OUTPUT«a?ba␤cb␤»
16:13 jnthn rakudo: say "a".."c" Z "?", "a".."b";
16:13 p6eval rakudo a0a390: OUTPUT«a?bab␤»
16:13 dominiko joined #perl6
16:13 masak in other news, I never like to get the StopIteration error, even when I 'deserve' it, so to speak.
16:13 TimToady std: say [+] 1,2,3
16:13 p6eval std 25330: OUTPUT«ok 00:02 34m␤»
16:14 TimToady std: my $a = [+] 1,2,3; say $a
16:14 p6eval std 25330: OUTPUT«ok 00:02 35m␤»
16:14 TimToady std: my $a = [+](1,2,3); say $a
16:14 p6eval std 25330: OUTPUT«ok 00:02 35m␤»
16:14 TimToady huh, wonder why it didn't work earlier
16:15 TimToady probably lost track of the infix cache in lex, or some such
16:15 jnthn rakudo: say "a".."c" Z list("?", "a".."b");
16:15 p6eval rakudo a0a390: OUTPUT«a?bacb␤»
16:15 TimToady might have the wrong precedence on Z
16:16 Nom- Anyone seen any projects in the works along the lines of what DBI 2 is supposed to be? (Implement the JDBC API in Parrot) ?
16:16 Nom- I'm interested in getting involved in one... I'd really like to see it happen :)
16:16 TimToady Tim Bunch was working on one
16:16 TimToady *Bunce
16:17 TimToady dunno how far he's got
16:17 Nom- hmm ok
16:17 shinobi-cl left #perl6
16:18 TimToady looks like there's a dbi2-dev@perl.org mailing list
16:21 Nom- That gets replicated onto usenet right ?
16:21 Nom- *goes for a dig*
16:22 Nom- Ah, Tim Bunce is the current DBI developer?  I think he's the one who wants to work on DBI 2.0 (JDBC based), but hasn't started on it
16:22 TimToady probably waiting for us to get done :)
16:23 Nom- I've seen a few posts by him.. he just hasn't had time
16:24 TimToady maybe he can give you something to do, anyway
16:24 TimToady he's probably better at delegating than I am :)
16:25 Nom- Delegation is overrated.
16:25 Nom- I'll send a few messages and see what we come up with.
16:26 TimToady good luck; let us know if you want a commit bit to the pugs repo
16:26 TimToady which has all kinds of things in it in addition to pugs :)
16:27 Nom- :)
16:28 jnthn From CurGroup In DB.testgroups _
16:28 jnthn Where (CurGroup.project_id = Master.GetProjectID() Or _
16:28 jnthn ooops!
16:28 jnthn sorry
16:28 jnthn (Yes, it's Visual Basic. :-|)
16:29 Nom- That's what I thought ... ugh ... i feel dirty
16:29 masak the secret sins of jnthn revealed.
16:29 Nom- At least use C# :D
16:29 jnthn Nom-: I actually downloaded a code translator and have already translated some of it.
16:30 Nom- Good.  I don't know why they didn't just drop VB altogether and go pure C#
16:30 jnthn But...inherited codebase that I'm supposed to add to...with limited time to make suck less.
16:30 jnthn I wish they had...
16:31 jnthn Conversion to C# => a bunch of compiler errors about really bad stuff that the VB compiler just gives as warnings...
16:31 Nom- That's because you can do such evil, evil stuff in VB
16:32 * jnthn keeps writing semicolons on the end of lines of code...
16:38 Tene_ joined #perl6
16:39 nihiliad joined #perl6
16:48 drbean joined #perl6
16:51 kate21de joined #perl6
16:59 dominiko joined #perl6
17:03 masak rakudo: died again?
17:03 p6eval rakudo a0a390: OUTPUT«./parrot: error while loading shared libraries: libparrot.so.0.9.0: cannot open shared object file: No such file or directory␤»
17:03 masak seems so.
17:03 * masak rebuilds
17:04 shinobi-cl joined #perl6
17:04 Nom- heh
17:12 masak rakudo: say 'OH HAI'
17:12 p6eval rakudo a0a390: OUTPUT«OH HAI␤»
17:13 masak rakudo: 1??2
17:13 p6eval rakudo a0a390: OUTPUT«ResizablePMCArray: Can't pop from an empty array!␤current instr.: 'parrot;PGE;OPTable;parse' pc 1783 (compilers/pge/PGE/OPTable.pir:504)␤»
17:15 Nom- Do any of the implementations support async {} and other thread ops ?
17:16 masak Pugs might, ISTR.
17:17 shinobi-cl pugs: my @digits=0..100; say [+] @digits;
17:17 p6eval pugs: OUTPUT«5050␤»
17:18 shinobi-cl pugs: my @digits=0..100; say [+]@digits;
17:18 p6eval pugs: OUTPUT«*** ␤    Unexpected "@digits"␤    expecting dot, ":", "(", term postfix, operator or ","␤    at /tmp/FYcMWTkzMs line 1, column 27␤»
17:19 TimToady pugs: async { for 1..100 { .say } }; async { for 1..100 { .say }};
17:19 p6eval pugs: OUTPUT«1␤2␤3␤4␤5␤6␤7␤8␤9␤10␤11␤12␤13␤14␤15␤16␤17␤1​8␤19␤20␤1␤21␤22␤23␤24␤25␤26␤27␤28␤29␤30␤31␤32␤33␤3​4␤35␤36␤37␤38␤39␤40␤41␤42␤43␤44␤45␤46␤2␤3␤4␤5␤6␤7␤​8␤9␤10␤11␤12␤13␤14␤15␤16␤17␤18␤19␤20␤21␤22␤23␤24␤2​5␤26␤27␤28␤47␤48␤49␤50␤51␤52␤53␤54␤55␤56␤57␤58␤59
17:19 rindolf joined #perl6
17:20 shinobi-cl pugs: my @digits=0..10; say [*] @digits;
17:20 p6eval pugs: OUTPUT«0␤»
17:20 shinobi-cl pugs: my @digits=1..10; say [*] @digits;
17:20 p6eval pugs: OUTPUT«3628800␤»
17:20 jnthn rakudo: my @digits=1..10; say [*] @digits;
17:20 p6eval rakudo a0a390: OUTPUT«3628800␤»
17:20 jnthn Win!
17:21 jnthn async in Rakudo - waiting for Parrot to do threads in a way that's actually usable by HLLs.
17:21 jnthn I did already try it as a quick hack to see how epicly Parrot failed it.
17:25 masak uuh, S16 is such a fertile ground for bikeshedding... and still we all want it to end well.
17:25 Nom- Fair enough :)
17:28 shinobi-cl pugs: my @digits=0..10; say [<<*>>] @digits;
17:28 p6eval pugs: OUTPUT«*** ␤    Unexpected "@digits"␤    expecting operator, ":" or ","␤    at /tmp/sDI0xK8nKG line 1, column 31␤»
17:28 shinobi-cl pugs: my @digits=0..10; say [<<+>>] @digits;
17:28 p6eval pugs: OUTPUT«*** ␤    Unexpected "@digits"␤    expecting operator, ":" or ","␤    at /tmp/jNqI1jJQgz line 1, column 31␤»
17:28 shinobi-cl pugs: my @digits=0..10; say [**] @digits;
17:28 p6eval pugs: OUTPUT«0␤»
17:28 shinobi-cl pugs: my @digits=1..10; say [**] @digits;
17:28 p6eval pugs: OUTPUT«1␤»
17:29 shinobi-cl rakudo: my @digits=1..10; say [**] @digits;
17:29 p6eval rakudo a0a390: OUTPUT«1␤»
17:29 diakopter jnthn: which CLR/.net do you get to use?
17:29 shinobi-cl rakudo: my @digits=1..10; say [++] @digits;
17:29 p6eval rakudo a0a390: OUTPUT«say requires an argument at line 1, near " [++] @dig"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
17:30 shinobi-cl rakudo: my @digits=1..10; say [^] @digits;
17:30 p6eval rakudo a0a390: OUTPUT«Junction<0xb5ff3078>␤»
17:30 masak shinobi-cl: do you have Rakudo installed locally? :)
17:30 diakopter jnthn: oh, I guess that's linq, so 3.0 at least
17:31 shinobi-cl nope, this is my gf's laptop
17:33 shinobi-cl i have rakudo in my home... an older version though... cygwin is a little late on perl6 releases
17:35 shinobi-cl rakudo: my @digits=1..10; say [?^] @digits;
17:35 p6eval rakudo a0a390: OUTPUT«1␤»
17:40 mberends joined #perl6
17:40 Nom- Pretty much everything is "behind" on perl6 releases... it's hard to stay bleeding edge
17:41 maerzhase joined #perl6
17:42 jnthn diakopter: 3.5
17:42 jnthn So yes, there's Linq
17:43 jnthn And type inference, and lambdas (in C#...) and other goodies.
17:43 masak Nom-: if you ask me, there's less and less reason to, as well. there are fewer urgent things nowadays.
17:43 masak the Novmeber project will start targeting Rakudo releases by the next Rakudo release.
17:44 * jnthn wonders what that will do for bug discovery
17:44 jnthn I guess we get a new batch a month. ;-)
17:44 masak jnthn: either that, or continuously from the work we might do in branches.
17:45 masak it's only the master branch that has to target the latest release, I should add.
17:45 jnthn Aha, OK.
17:45 jnthn Sounds good - more sanity for November development, so time can be spent more on features than chasing Rakudo.
17:45 masak exactly.
17:46 masak perhaps not surprisingly, this decision was reached after the adventorous time in January. :)
17:47 * Nom- has missed something, he thinks.
17:47 masak Nom-: you should be thankful you missed it. :P
17:47 Nom- "November development" ?
17:47 masak Nom-: oh! ah!
17:47 masak http://github.com/viklund/november/tree/master
17:47 masak I wish I could show you the live home page as well, but it's down at the moment due to a recent Parrot bug.
17:48 Nom- oh, i see
17:49 shinobi-cl pugs: given Bool { my $A = ::True; my $B = ::True; my $C = ::True; my $Status = [|] ($A, $B, $C); say $Status; }
17:49 p6eval pugs: OUTPUT«any(VType (mkType "True"))␤»
17:49 shinobi-cl rakudo: given Bool { my $A = ::True; my $B = ::True; my $C = ::True; my $Status = [|] ($A, $B, $C); say $Status; }
17:49 p6eval rakudo a0a390: OUTPUT«Junction<0xb5f57980>␤»
17:49 shinobi-cl rakudo: given Bool { my $A = ::True; my $B = ::True; my $C = ::True; my $Status = [|] ($A, $B, $C); say ?$Status; }
17:49 p6eval rakudo a0a390: OUTPUT«1␤»
17:49 masak Nom-: in particular, see http://yapc.tv/2008/ye/lt/lt​2-01-masak-vilkund-november/ if you're interested.
17:49 shinobi-cl rakudo: given Bool { my $A = ::True; my $B = ::True; my $C = ::False; my $Status = [|] ($A, $B, $C); say ?$Status; }
17:49 p6eval rakudo a0a390: OUTPUT«1␤»
17:49 shinobi-cl rakudo: given Bool { my $A = ::True; my $B = ::True; my $C = ::False; my $Status = [&] ($A, $B, $C); say ?$Status; }
17:49 p6eval rakudo a0a390: OUTPUT«0␤»
17:49 shinobi-cl rakudo: given Bool { my $A = ::True; my $B = ::True; my $C = ::True; my $Status = [&] ($A, $B, $C); say ?$Status; }
17:49 p6eval rakudo a0a390: OUTPUT«1␤»
17:50 shinobi-cl cool
17:51 justatheory joined #perl6
17:54 Southen_ joined #perl6
18:02 frew joined #perl6
18:05 frew rakudo: (1,2,3,4).join(',')
18:05 p6eval rakudo a0a390: OUTPUT«"load_bytecode" couldn't find file 'PCT.pbc'␤current instr.: '' pc 405 (src/classes/Object.pir:20)␤»
18:05 kane__ joined #perl6
18:05 frew rakudo: 1,2,3,4.join(',')
18:05 p6eval rakudo a0a390: OUTPUT«"load_bytecode" couldn't find file 'PCT.pbc'␤current instr.: '' pc 405 (src/classes/Object.pir:20)␤»
18:05 frew rakudo: 1+1
18:05 p6eval rakudo a0a390: OUTPUT«Class 'Perl6MultiSub' not found␤current instr.: 'parrot;Perl6Role;!add_variant' pc 2691 (src/classes/Role.pir:42)␤»
18:05 frew fail.
18:06 frew pugs: (1,2,3,4).join(',')
18:06 p6eval pugs: RESULT«"1,2,3,4"»
18:06 frew pugs: (1,2,3,4).end
18:06 p6eval pugs: RESULT«3»
18:06 frew pugs: (1,2,3,4,5).end
18:06 p6eval pugs: RESULT«4»
18:06 TimToady The end is near!
18:06 frew I am pretty sure that didn't DWIM
18:06 TimToady what did you mean?
18:07 frew shouldn't end give me the last element in the array?
18:07 frew pugs: (1,2,3,3,5).end
18:07 p6eval pugs: RESULT«4»
18:07 frew oh
18:07 frew it's where the last one is
18:07 TimToady no, the index
18:07 frew interesting
18:07 frew ok
18:07 TimToady .[*-1] gives you the last element
18:07 frew ah, ok
18:07 frew then I'll add a test for it, since according to TASKS there isn't one
18:07 frew pugs: (1,2,3,3,5).shape
18:07 p6eval pugs: OUTPUT«*** No such method in class Array: "&shape"␤    at /tmp/yLKF3dP9OZ line 1, column 1 - line 2, column 1␤»
18:07 TimToady pugs ('a'..'z').[*-1]
18:08 TimToady pugs: ('a'..'z').[*-1]
18:08 p6eval pugs: RESULT«\"a"»
18:08 frew what is shape?
18:08 TimToady pugs: ('a'..'z').[-1]
18:08 p6eval pugs: RESULT«\"z"»
18:08 TimToady pugs is pre *-1
18:08 TimToady pugs doesn't know shape yet either
18:08 frew what about rakudo; why is the bot broken?
18:08 TimToady frew: dimensioned array
18:08 frew ah, cool
18:09 TimToady re rakudo v bot; it's a Cosmic Divergence
18:09 frew does that mean that it has to do with the switch from svn to git?
18:11 jnthn frew: It's some weird build issue
18:11 frew ah.  I guess that means I need to start building my local one again
18:15 frew pugs: my @a; @a.end
18:15 p6eval pugs: RESULT«-1»
18:16 frew I'll assume that's correct.
18:19 frew Do I have to do a make realclean every time I build rakudo?
18:20 mikehh joined #perl6
18:20 jnthn frew: I haven't found this is needed.
18:20 frew hmm
18:21 jnthn But worth maybe doing a realclean of everything if you ain't built for a while.
18:21 jnthn Parrot needs one now and then.
18:21 shinobi-cl pugs:  (1,2,3,3,5).last.say
18:21 p6eval pugs: OUTPUT«*** Cannot use this control structure outside a 'loop' structure␤    at /tmp/7xwvt8jkIs line 1, column 1 - line 2, column 1␤»
18:21 shinobi-cl pugs:  (1,2,3,3,5).last.say
18:21 p6eval pugs: OUTPUT«*** Cannot use this control structure outside a 'loop' structure␤    at /tmp/PzhXnr99CK line 1, column 1 - line 2, column 1␤»
18:21 shinobi-cl pugs:  (1,2,3,3,5).last;
18:21 p6eval pugs: OUTPUT«*** Cannot use this control structure outside a 'loop' structure␤    at /tmp/NeIJxnbfc4 line 1, column 1-17␤»
18:21 jnthn try .end
18:21 frew I'm getting a weird error when I try to build rakudo about Perl6MultiSub not found
18:21 jnthn frew: Try realclean etc.
18:21 shinobi-cl pugs:  |(1,2,3,3,5).end;
18:21 p6eval pugs: RESULT«4»
18:21 frew k
18:22 jnthn That's what is upsetting evalbot too...
18:22 jnthn I didn't reproduce it yet, but then I only tried on Win32...
18:22 shinobi-cl pugs:  (1,2,3,3,5).elems;
18:22 p6eval pugs: RESULT«5»
18:25 * jnthn -> dinner
18:31 Psyche^ joined #perl6
18:33 jferrero joined #perl6
18:39 frew pugs: my @a = (); @a.end
18:39 p6eval pugs: RESULT«-1»
18:39 shinobi-cl pugs: my @a = 1,2,3; my @b = 3,4,5;  say @a xx @b;
18:39 p6eval pugs: OUTPUT«123123123␤»
18:40 shinobi-cl pugs: my @a = 1,2,3; my @b = 3,4,5;  say @a xx 4;
18:40 p6eval pugs: OUTPUT«123123123123␤»
18:40 shinobi-cl pugs: my @a = 1,2,3; my @b = 5,6,3;  say @a xx @b;
18:40 p6eval pugs: OUTPUT«123123123␤»
18:40 shinobi-cl pugs: my @a = 1,2,3; my @b = 5,6,3,7;  say @a xx @b;
18:40 p6eval pugs: OUTPUT«123123123123␤»
18:41 frew pugs: my $a; $a.end
18:41 p6eval pugs: RESULT«0»
18:41 frew should that work?
18:42 frew pugs: my $a=12; $a.end
18:42 p6eval pugs: RESULT«0»
18:42 shinobi-cl you declared a, so is one element with undefined content. In the previuos try you specified that a is empty
18:42 frew but they are scalars
18:43 frew in the spec it's only supposed to take an array
18:44 shinobi-cl mmm well.. 0 makes sense to me, instead of undef.
18:44 frew I would have figured it would say that Scalar has not end method
18:44 shinobi-cl the other thing is to remove .end from the scalar protoclass
18:45 frew that's what seems right to me
18:45 shinobi-cl me too
18:45 frew but what *is* supposed to work is this:
18:45 frew pugs: my $a = [<f b b>]; $a.end
18:45 p6eval pugs: RESULT«2»
18:45 frew which may be why it's there
18:46 frew well, it's still not in the spec, but it makes sense as end is related to elems and elems works the same way
18:46 shinobi-cl pugs: my $a=0; say $a.elems;
18:46 p6eval pugs: OUTPUT«1␤»
18:46 shinobi-cl pugs: my $a=[0,0]; say $a.elems;
18:46 p6eval pugs: OUTPUT«2␤»
18:46 shinobi-cl ahhh i see
18:47 frew although 1.elems is supposed to fail according to the test
18:47 frew although it's currently skipped as it's basically unspec'd
18:47 shinobi-cl it considers $a as an array reference
18:47 frew right-o
18:47 dominiko left #perl6
18:47 shinobi-cl pugs: say 0.elems;
18:47 p6eval pugs: OUTPUT«1␤»
18:48 shinobi-cl pugs: say (1,2).elems;
18:48 p6eval pugs: OUTPUT«2␤»
18:48 shinobi-cl pugs: say [+] (1,2).elems;
18:48 p6eval pugs: OUTPUT«2␤»
18:48 frew pugs: my $a = []; $a.end
18:48 p6eval pugs: RESULT«-1»
18:50 shinobi-cl pugs: my $a=[1,2,3]; say [+] $a;
18:50 p6eval pugs: OUTPUT«1 2 3␤»
18:50 shinobi-cl pugs: my $a=[1,2,3]; say [+] $$a;
18:50 p6eval pugs: OUTPUT«6␤»
18:51 frew interesting
18:51 shinobi-cl pugs: my $a=([1,2,3],[4,5,6]); say [+] $$a;
18:51 p6eval pugs: OUTPUT«6␤»
18:51 shinobi-cl pugs: my $a=([1,2,3],[4,5,6]); say [+] $a;
18:51 p6eval pugs: OUTPUT«1 2 3 4 5 6␤»
18:51 shinobi-cl pugs: my $a=([1,2,3],[4,5,6]); say [+] $$$a;
18:51 p6eval pugs: OUTPUT«6␤»
18:52 shinobi-cl pugs: my $a=([1,2,3],[4,5,6]); say [+] $a[0];
18:52 p6eval pugs: OUTPUT«1 2 3␤»
18:52 shinobi-cl pugs: my $a=([1,2,3],[4,5,6]); say [+] $$a[0];
18:52 p6eval pugs: OUTPUT«1 2 3␤»
18:52 shinobi-cl pugs: my $a=([1,2,3],[4,5,6]); say [+] @$a[0];
18:52 p6eval pugs: OUTPUT«1 2 3␤»
18:54 shinobi-cl pugs: my $a=([1,2,3],4,5,6]); say [+] $a;
18:54 p6eval pugs: OUTPUT«*** ␤    Unexpected "$a"␤    expecting "=", "_", fraction, exponent, term postfix, operator, ")", context, ":" or "("␤    at /tmp/Zf9Dvt01Pv line 1, column 4␤»
18:54 shinobi-cl pugs: my $a=([1,2,3],4,5,6]); say [+] $a;
18:54 p6eval pugs: OUTPUT«*** ␤    Unexpected "$a"␤    expecting "=", "_", fraction, exponent, term postfix, operator, ")", context, ":" or "("␤    at /tmp/0Ni0YYbKkN line 1, column 4␤»
18:54 shinobi-cl pugs: my $a=([1,2,3],4,5,6); say [+] $a;
18:54 p6eval pugs: OUTPUT«1 2 3 4 5 6␤»
18:54 shinobi-cl pugs: my $a=([1,2,3],4,5,6); say [+] $$a;
18:54 p6eval pugs: OUTPUT«18␤»
18:55 shinobi-cl thats [3]+4+5+6
18:55 shinobi-cl my @list=1,2,3; my $x = @list; say $x;
18:56 shinobi-cl pugs: my @list=1,2,3; my $x = @list; say $x;
18:56 p6eval pugs: OUTPUT«1 2 3␤»
18:56 shinobi-cl pugs: my @list=1,2,3; my $x = @list; say $$x;
18:56 p6eval pugs: OUTPUT«123␤»
18:56 frew pugs: $a = <a b c>;
18:56 p6eval pugs: OUTPUT«*** ␤    Unexpected " ="␤    expecting "::"␤    Variable "$a" requires predeclaration or explicit package name␤    at /tmp/blLTbU1Y6X line 1, column 3␤»
18:56 frew pugs: my $a = <a b c>;
18:56 p6eval pugs: RESULT«\\("a", "b", "c")»
18:56 frew that's magical
18:57 shinobi-cl pugs: my $a = <a b c>; say $a;
18:57 p6eval pugs: OUTPUT«a b c␤»
18:57 shinobi-cl pugs: my $a = <a b c>; say $$a;
18:57 p6eval pugs: OUTPUT«abc␤»
18:59 cognominal joined #perl6
19:00 frew pugs: elems(1,2,3,4,5)
19:00 p6eval pugs: OUTPUT«*** No compatible multi variant found: "&elems"␤    at /tmp/BlvNftRRqJ line 1, column 1 - line 2, column 1␤»
19:00 shinobi-cl pugs: my $a=([1,2,3],[5,6]); say [+] $a;
19:00 p6eval pugs: OUTPUT«1 2 3 5 6␤»
19:00 frew pugs: end(1,2,3,4,5)
19:00 p6eval pugs: OUTPUT«*** No compatible multi variant found: "&end"␤    at /tmp/QWHJc1iPYL line 1, column 1 - line 2, column 1␤»
19:00 shinobi-cl pugs: my $a=([1,2,3],[5,6]); say [+] $$a;
19:00 p6eval pugs: OUTPUT«5␤»
19:03 shinobi-cl pugs: my @a=([1,2,3],[5,6]); say [+] @a;
19:03 p6eval pugs: OUTPUT«5␤»
19:04 shinobi-cl my @a = [1,2,3,4]; my $x = @a; say $x;
19:04 shinobi-cl pugs: my @a = [1,2,3,4]; my $x = @a; say $x;
19:04 p6eval pugs: OUTPUT«1 2 3 4␤»
19:04 Whiteknight joined #perl6
19:05 frew pugs: elems (1,2,3,4,5)
19:05 p6eval pugs: RESULT«5»
19:05 shinobi-cl weird... when using [+] it return the lenght in scalar context
19:05 shinobi-cl but when assigning the array to a scalar gives another thing
19:05 frew that is very strange indeed
19:06 shinobi-cl a reference... which is supposed to be that way. mAYBE is beacuse + coerces to a number
19:06 shinobi-cl pugs: my @a = [1,2,3,4]; my $x = @a; say +$x;
19:06 p6eval pugs: OUTPUT«1␤»
19:06 shinobi-cl pugs: my @a = [1,2,3,4]; my $x = +@a; say $x;
19:06 p6eval pugs: OUTPUT«1␤»
19:08 frew pugs: elems((1,2,3,4,5))
19:08 p6eval pugs: RESULT«5»
19:08 shinobi-cl pugs: my @a=([1,2,3],[5,6]); say [+] @a; say @a[0]; say @a[1]; say +@a[0]; say +@a[1];
19:08 p6eval pugs: OUTPUT«5␤1 2 3␤5 6␤3␤2␤»
19:09 shinobi-cl pugs: my @a=([1,2,3],[5,6]); say [+] @@a; say @a[0]; say @a[1]; say +@a[0]; say +@a[1];
19:09 p6eval pugs: OUTPUT«*** ␤    Unexpected ";"␤    expecting "::"␤    Variable "@@a" requires predeclaration or explicit package name␤    at /tmp/TrIst0oUzm line 1, column 35␤»
19:09 shinobi-cl pugs: my @a=([1,2,3],[5,6]); say [+] @$a; say @a[0]; say @a[1]; say +@a[0]; say +@a[1];
19:09 p6eval pugs: OUTPUT«*** ␤    Unexpected "$a"␤    expecting "@" or "::"␤    at /tmp/8Q4TqPGib8 line 1, column 33␤»
19:09 shinobi-cl pugs: my @a=([1,2,3],[5,6]); say [+] $$a; say @a[0]; say @a[1]; say +@a[0]; say +@a[1];
19:09 p6eval pugs: OUTPUT«*** ␤    Unexpected "$a"␤    expecting "::"␤    at /tmp/jxGj5rVND1 line 1, column 33␤»
19:10 TimToady my @a = [1,2,3] only puts 1 element into @a
19:12 frew TimToady: I am curious about your opinion as a linguist, do you think it's a good thing that foo(1,2,3) != foo (1,2,3)?
19:12 shinobi-cl i have doubts about this:
19:13 shinobi-cl pugs: my $a=([1,2,3],4,5,6); say [+] $a;
19:13 p6eval pugs: OUTPUT«1 2 3 4 5 6␤»
19:13 shinobi-cl pugs: my @a=([1,2,3],4,5,6); say [+] @a;
19:13 p6eval pugs: OUTPUT«18␤»
19:15 TimToady frew: um, it was the other way in Perl 5.  why do you think I changed it?
19:16 frew I dunno, I just thought that this was surprising when I first saw it
19:16 frew but I have designed or implemented exactly 0 languages
19:17 TimToady it's also surprising when someone writes print ($x + 1) * 2 in Perl 5
19:17 frew that's a good point, I hadn't thought of that
19:18 TimToady if you really want a little visual separation you can always say foo.(1,2,3)
19:18 frew of course
19:18 frew or just not use an anonymous array
19:18 TimToady but p6 get a lot of its power and extensibility from being consistent about postfixes
19:19 frew well, I would much rather consistency, I was just curious of the motivation
19:19 TimToady the consistency runs the other way too: you can be guaranteed that foo() will always call a function
19:20 TimToady even if foo is otherwise a keyword
19:20 TimToady std: if()
19:20 p6eval std 25330: OUTPUT«Undeclared routine:␤   if used at 1 ␤ok 00:02 33m␤»
19:20 fjord41 joined #perl6
19:20 frew so I can make a function called if()
19:20 frew and that won't collide with if expr ?
19:20 TimToady yes, to define your interface, for instance :)
19:20 TimToady if expr requires whitespace
19:20 frew oh
19:20 frew cool
19:20 TimToady because the expr is not a postfix
19:21 TimToady people have got into all sorts of bad habits based on C syntax
19:21 frew I don't know what you mean
19:21 TimToady we have to break a few of those bad habits in order to make Perl relevant 20 years from now
19:22 frew haha, awesome
19:22 shinobi-cl i dont quite understand this......
19:22 shinobi-cl pugs:  my $a=([1,2,3],4,5,6); say [+] $a;  my @b=([1,2,3],4,5,6); say [+] @b; my $x = $a; my $y = @b; say $x.elems; say $y.elems; say "x="~$x; say "y="~$y;
19:22 p6eval pugs: OUTPUT«1 2 3 4 5 6␤18␤4␤4␤x=1 2 3 4 5 6␤y=1 2 3 4 5 6␤»
19:24 shinobi-cl $a and @b are like the same.... but a metaperator applied to them gives different results
19:24 TimToady $a doesn't interpolate the list into list context
19:24 shinobi-cl pugs:  my $a=([1,2,3],4,5,6); say [+] ($a,);  my @b=([1,2,3],4,5,6); say [+] @b; my $x = $a; my $y = @b; say $x.elems; say $y.elems; say "x="~$x; say "y="~$y;
19:24 p6eval pugs: OUTPUT«1 2 3 4 5 6␤18␤4␤4␤x=1 2 3 4 5 6␤y=1 2 3 4 5 6␤»
19:25 TimToady you're still trying to interpolate $a in a list context
19:25 TimToady use @$a
19:25 shinobi-cl ahh i see
19:25 shinobi-cl pugs:  my $a=([1,2,3],4,5,6); say [+] (@$a);  my @b=([1,2,3],4,5,6); say [+] @b; my $x = $a; my $y = @b; say $x.elems; say $y.elems; say "x="~$x; say "y="~$y;
19:25 p6eval pugs: OUTPUT«18␤18␤4␤4␤x=1 2 3 4 5 6␤y=1 2 3 4 5 6␤»
19:25 shinobi-cl hehe, thanks... once again
19:25 TimToady |$a should work too
19:26 shinobi-cl pugs:  my $a=([1,2,3],4,5,6); say [+] $a;  my @b=([1,2,3],4,5,6); say [+] |@b; my $x = $a; my $y = @b; say $x.elems; say $y.elems; say "x="~$x; say "y="~$y;
19:26 p6eval pugs: OUTPUT«1 2 3 4 5 6␤18␤4␤4␤x=1 2 3 4 5 6␤y=1 2 3 4 5 6␤»
19:26 shinobi-cl pugs:  my $a=([1,2,3],4,5,6); say [+] |$a;  my @b=([1,2,3],4,5,6); say [+] @b; my $x = $a; my $y = @b; say $x.elems; say $y.elems; say "x="~$x; say "y="~$y;
19:26 p6eval pugs: OUTPUT«21␤18␤4␤4␤x=1 2 3 4 5 6␤y=1 2 3 4 5 6␤»
19:26 shinobi-cl it flats the list completely
19:27 TimToady bug, probably
19:27 shinobi-cl pugs:  my $a=([1,2,3],4,5,6); say [+] |@$a;  my @b=([1,2,3],4,5,6); say [+] @b; my $x = $a; my $y = @b; say $x.elems; say $y.elems; say "x="~$x; say "y="~$y;
19:27 p6eval pugs: OUTPUT«18␤18␤4␤4␤x=1 2 3 4 5 6␤y=1 2 3 4 5 6␤»
19:27 frew TimToady: which is right, foo(:array(1,2,3,4)) or foo(:array((1,2,3,4))) ?
19:27 TimToady it should flatten nested Captures but not nested Arrays
19:28 TimToady frew: I'm missing the context
19:28 frew sorry
19:28 frew a test
19:29 frew elems(1,2,3,4) is wrong, elems (1,2,3,4) is right
19:29 frew what about with named args?
19:29 frew elems(:array(1,2,3,4))?
19:29 frew or do I need more parens?
19:29 TimToady the parens on an adverb are not arguments to anything, they're just a list
19:30 TimToady so you don't need extra parens unless something binds that list to a scalar later
19:30 TimToady in list context, parens are a no-op
19:30 frew ok
19:30 TimToady (same as in p5, btw)
19:30 frew so they aren't necesary unless they have to clarify for parsing
19:31 TimToady yes, that's what parens are for :)
19:31 TimToady when binding to scalar context, then grouping becomes important again
19:31 frew k
19:32 TimToady pugs: say infix:<+>(('a','b','c'), ('x','y','z'))
19:32 p6eval pugs: OUTPUT«6␤»
19:32 TimToady pugs: say infix:<+>('a','b','c', 'x','y','z')
19:32 p6eval pugs: OUTPUT«*** No compatible multi variant found: "&infix:+"␤    at /tmp/QvJX6DxFlT line 1, column 5 - line 2, column 1␤»
19:33 TimToady however
19:33 TimToady pugs: say('a','b','c', 'x','y','z')
19:33 p6eval pugs: OUTPUT«abcxyz␤»
19:33 TimToady pugs: say(('a','b','c'),( 'x','y','z'))
19:33 p6eval pugs: OUTPUT«abcxyz␤»
19:34 TimToady pugs: say(('a','b','c'),(((((((('x','y','z')))))))))
19:34 p6eval pugs: OUTPUT«abcxyz␤»
19:34 TimToady no difference in list context
19:35 frew TimToady: are hyperops threaded?
19:37 pugs_svn r25331 | lwall++ | [STD] catch do...while p5ism
19:37 pugs_svn r25331 | lwall++ | don't report runaway string unless it crosses newline
19:38 TimToady they're concurrent, however the implementation chooses to do it
19:38 TimToady on a Cray you'd use vector processing
19:38 frew well, you would :-)
19:39 frew I would just be all like, "Hello Cray World!"
19:39 shinobi-cl my @a = 1,2,3; my @b = 5,6,3,7; say @a <<xx>> @b;
19:39 TimToady the design of parallelism in p6 is to specify where you want it without specifying exactly how or how much
19:39 shinobi-cl std: my @a = 1,2,3; my @b = 5,6,3,7; say @a <<xx>> @b;
19:40 p6eval std 25330: OUTPUT«ok 00:02 34m␤»
19:40 TimToady when you say "if $x eq any(@values)" it can evaluate those in parallel too
19:40 TimToady when you use a feed operator it's more like threading
19:40 shinobi-cl pugs: my @a = 1,2,3; my @b = 5,6,3,7; say @a <<xx>> @b;
19:40 p6eval pugs: OUTPUT«*** ␤    Unexpected "<<xx"␤    expecting operator, ":" or ","␤    at /tmp/SU4RAWCUbQ line 1, column 40␤»
19:41 shinobi-cl rakudo: my @a = 1,2,3; my @b = 5,6,3,7; say @a <<xx>> @b;
19:41 p6eval rakudo a0a390: OUTPUT«1 1 1 1 12 2 2 2 2 23 3 33 3 3 3 3 3 3␤»
19:41 shinobi-cl rakudo: my @a = 1,2,3; my @b = 5,6,3,7; say @a <<x>> @b;
19:41 p6eval rakudo a0a390: OUTPUT«111112222223333333333␤»
19:41 frew is that what a feed operator is?
19:41 TimToady pugs doesn't know the <<>> form, I think
19:41 TimToady foo() ==> bar(), like a unix pipe
19:41 TimToady only with objects
19:42 shinobi-cl rakudo: my @a = 1,2,3; my @b = 5,6,3,7; say $@a <<x>> $@b;
19:42 p6eval rakudo a0a390: OUTPUT«say requires an argument at line 1, near " $@a <<x>>"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
19:43 shinobi-cl std: my @a = 1,2,3; my @b = 5,6,3,7; say |@a <<x>> |@b;
19:43 p6eval std 25331: OUTPUT«ok 00:02 35m␤»
19:43 shinobi-cl rakudo: my @a = 1,2,3; my @b = 5,6,3,7; say |@a <<x>> |@b;
19:43 p6eval rakudo a0a390: OUTPUT«too many arguments passed (4) - 2 params expected␤current instr.: 'infix:»x«' pc 167177 (src/gen_metaop.pir:641)␤»
19:45 pugs_svn r25332 | frew++ | [t] added tests for Array.end
19:47 frew pugs: my Complex $a = (1,2);
19:48 p6eval pugs: RESULT«\\(1, 2)»
19:49 frew pugs: cis(0)
19:49 p6eval pugs: OUTPUT«*** No such subroutine: "&cis"␤    at /tmp/b8wBjwLQwN line 1, column 1 - line 2, column 1␤»
19:49 frew rakudo: cis(0)
19:49 p6eval rakudo a0a390: RESULT«1+0i»
19:50 frew rakudo: cis(0).polar
19:50 p6eval rakudo a0a390: RESULT«[1, 0]»
19:50 frew rakudo: cis(3.1415).polar
19:50 p6eval rakudo a0a390: RESULT«[1, 3.1415]»
19:50 frew rakudo: cis(2*3.1415).polar
19:50 p6eval rakudo a0a390: RESULT«[1, -0.000185307179586115]»
19:51 frew rakudo: cis(-3.1415).polar
19:51 p6eval rakudo a0a390: RESULT«[1, -3.1415]»
19:52 frew rakudo: my $a = 3.1415; cis($a); cis($a).polar
19:52 p6eval rakudo a0a390: RESULT«[1, 3.1415]»
19:52 frew rakudo: my $a = 3.1415; cis($a).say; cis($a).polar.say
19:52 p6eval rakudo a0a390: OUTPUT«-1+9.26536e-05i␤13.1415␤»
19:52 frew rakudo: my $a = 1; cis($a).say; cis($a).polar.say
19:52 p6eval rakudo a0a390: OUTPUT«0.540302+0.841471i␤11␤»
19:55 frew my calculator doesn't have batteries...what a drag!
19:55 jnthn Hopefully rakudo is giving the right answers, then! ;-)
19:55 frew haha, that's what I'm trying to figure out
19:56 frew is cis() the only way to make a complex number?
19:57 jnthn my $c = 5 + 2i; # I think also does it
19:57 frew indeed it does
19:57 frew thanks
19:57 shinobi-cl pugs: my Complex $value = sqrt (-1);
19:57 p6eval pugs: RESULT«\NaN»
19:58 shinobi-cl pugs: my Complex $value = sqrt (1);
19:58 p6eval pugs: RESULT«\1.0»
19:58 jnthn I'm not sure that pugs uses/enforces type constraints.
19:58 jnthn pugs: my Complex $x = "OH HAI";
19:58 shinobi-cl rakudo: my Complex $value = sqrt (-1);
19:58 p6eval pugs: RESULT«\"OH HAI"»
19:58 p6eval rakudo a0a390: OUTPUT«Type mismatch in assignment.␤current instr.: 'die' pc 17013 (src/builtins/control.pir:204)␤»
19:58 frew haha
19:58 frew awesome
19:58 jnthn I'm not sure that Rakudo enforces them correct though. ;-)
19:58 jnthn Complex probably should accept Num, the way that Num accepts Int.
19:59 jnthn Whether sqrt(-1) will automatically return a complex, I forget the answer to.
19:59 shinobi-cl pugs: my $pair = (thing => 0); say $pair;
19:59 jnthn There was probably a 10,000 message thread on p6l about it at some point though. ;-)
19:59 p6eval pugs: OUTPUT«thing       0␤»
20:00 shinobi-cl pugs: my $pair = (thing => 0); $pair = sqrt (-1); say $pair;
20:00 p6eval pugs: OUTPUT«NaN␤»
20:00 shinobi-cl rakudo: my $pair = (thing => 0); $pair = sqrt (-1); say $pair;
20:00 p6eval rakudo a0a390: OUTPUT«./parrot: error while loading shared libraries: libparrot.so.0.9.0: cannot open shared object file: No such file or directory␤»
20:01 frew rakudo: sin(3)
20:01 p6eval rakudo a0a390: OUTPUT«./parrot: error while loading shared libraries: libparrot.so.0.9.0: cannot open shared object file: No such file or directory␤»
20:01 DemoFreak joined #perl6
20:02 shinobi-cl pugs
20:03 * frew decides that he needs batteries
20:03 shinobi-cl pugs: say "true" if sin(3) isa Num;
20:03 p6eval pugs: OUTPUT«*** ␤    Unexpected "isa"␤    expecting operator␤    at /tmp/lcFPPyOKya line 1, column 22␤»
20:03 shinobi-cl pugs: say "true" if sin(3).^isa(Num);
20:03 p6eval pugs: OUTPUT«*** No such method in class Num: "&ITEM"␤    at /tmp/J60dreph7k line 1, column 15-31␤»
20:03 shinobi-cl pugs: say "true" if sin(3).isa(Num);
20:03 p6eval pugs: OUTPUT«true␤»
20:04 shinobi-cl pugs: say sqrt(-1).WHAT;
20:04 p6eval pugs: OUTPUT«Num␤»
20:04 shinobi-cl pugs: say sqrt(-1).sqrt;
20:04 p6eval pugs: OUTPUT«NaN␤»
20:04 shinobi-cl pugs: say sqrt(81).sqrt;
20:04 p6eval pugs: OUTPUT«3␤»
20:05 shinobi-cl pugs; my @list = sqrt(1)..sqrt(9); say @list;
20:06 shinobi-cl pugs: my @list = sqrt(1)..sqrt(9); say @list;
20:06 p6eval pugs: OUTPUT«123␤»
20:06 shinobi-cl pugs: my @list = sqrt(1)..sqrt(9); say @list.elems;
20:06 p6eval pugs: OUTPUT«3␤»
20:06 araujo joined #perl6
20:06 shinobi-cl pugs: my @list = sqrt(1)..sqrt(100); say @list.elems;
20:06 p6eval pugs: OUTPUT«10␤»
20:07 shinobi-cl pugs: my @list = sqrt(1)..sqrt(100); my $junc = all(@list); say $junc;
20:07 p6eval pugs: OUTPUT«all(VNum 1.0,VNum 2.0,VNum 3.0,VNum 4.0,VNum 5.0,VNum 6.0,VNum 7.0,VNum 8.0,VNum 9.0,VNum 10.0)␤»
20:07 shinobi-cl pugs: my @list = sqrt(-1)..sqrt(100); my $junc = all(@list); say $junc;
20:07 p6eval pugs: OUTPUT«all()␤»
20:07 shinobi-cl pugs: my @list = sqrt(-1)..sqrt(100); say @list.elems;
20:07 p6eval pugs: OUTPUT«0␤»
20:09 shinobi-cl pugs: my @list = sqrt(0)..sqrt(100); say @list.elems;
20:09 p6eval pugs: OUTPUT«11␤»
20:10 shinobi-cl pugs: my @list = sqrt(-1)..sqrt(100); my $junc = all(@list); say $junc.WHAT;
20:10 p6eval pugs: OUTPUT«Junction␤»
20:12 shinobi-cl pugs: my @list = sqrt(1),sqrt(2)..sqrt(100); say @list.elems;
20:12 p6eval pugs: OUTPUT«11␤»
20:12 shinobi-cl pugs: my @list = sqrt(1),sqrt(2)..sqrt(100); say @list;
20:12 p6eval pugs: OUTPUT«11.41421356237309512.4142135623730953.4​142135623730954.4142135623730955.4142135623730​956.4142135623730957.4142135623730958.41421356​23730969.41421356237309610.414213562373096␤»
20:13 shinobi-cl pugs: my @list = sqrt(1),sqrt(2)..sqrt(100); say $_.$/ for @list;
20:13 p6eval pugs: OUTPUT«␤␤␤␤␤␤␤␤␤␤␤»
20:13 shinobi-cl pugs: my @list = sqrt(1),sqrt(2)..sqrt(100); say $val.$/ for @list -> $val ;
20:13 p6eval pugs: OUTPUT«*** ␤    Unexpected ".$/"␤    expecting "::"␤    Variable "$val" requires predeclaration or explicit package name␤    at /tmp/vZZ7axSu67 line 1, column 48␤»
20:13 shinobi-cl pugs: my @list = sqrt(1),sqrt(2)..sqrt(100); for @list -> $val {say $val.$/;};
20:13 p6eval pugs: OUTPUT«␤␤␤␤␤␤␤␤␤␤␤»
20:13 mberends joined #perl6
20:13 shinobi-cl pugs: my @list = sqrt(1),sqrt(2)..sqrt(100); for @list -> $val {say $val ~ $/;};
20:13 p6eval pugs: OUTPUT«1␤1.4142135623730951␤2.414213562373095␤3.​414213562373095␤4.414213562373095␤5.414213562373​095␤6.414213562373095␤7.414213562373095␤8.414213​562373096␤9.414213562373096␤10.414213562373096␤»
20:17 mberends pugs: my @list = sqrt(1), 1.4142356 .. 9.4142356; for @list -> $val {say $val; }
20:17 p6eval pugs: OUTPUT«1␤1.4142356␤2.4142356␤3.4142356␤4.4142356␤5​.4142356␤6.4142356␤7.4142356␤8.4142356␤9.4142356␤»
20:17 mberends shinobi-cl: see what you just did, it is not what you meant.
20:19 mberends pugs: my @list = sqrt(1), 1.414 .. 10; for @list -> $val {say $val; } # better
20:19 p6eval pugs: OUTPUT«1␤1.414␤2.414␤3.414␤4.414​␤5.414␤6.414␤7.414␤8.414␤9.414␤»
20:20 maerzhase joined #perl6
20:27 mberends pugs: my @list = map( {sqrt $_}, 1..100 ); say @list
20:27 p6eval pugs: OUTPUT«11.41421356237309511.732050807568877222.23​6067977499792.4494897427831782.64575131106459072.​828427124746190333.16227766016837953.316624790355​43.46410161513775443.6055512754639893.74165738677​394133.87298334620741744.1231056256176614.2426406​871192854.3588989435406744.472135954999584...
20:27 mberends pugs: my @list = map( {sqrt $_}, 1..100 ); say @list.join",";
20:27 p6eval pugs: OUTPUT«*** ␤    Unexpected "\",\";"␤    expecting term postfix, operator, ":" or ","␤    at /tmp/rgCl9DjLab line 1, column 52␤»
20:27 mberends pugs: my @list = map( {sqrt $_}, 1..100 ); say @list.join(",");
20:27 p6eval pugs: OUTPUT«1,1.4142135623730951,1.7320508075688772,2,​2.23606797749979,2.449489742783178,2.645751311064​5907,2.8284271247461903,3,3.1622776601683795,3.31​66247903554,3.4641016151377544,3.605551275463989,​3.7416573867739413,3.872983346207417,4,4.12310562​5617661,4.242640687119285,4.35889894354067...
20:36 gravity joined #perl6
20:39 cognominal joined #perl6
20:44 mberends whee! HTTP::Daemon has a beautiful favicon: http://autoexec.demon.nl:8888/
20:46 mberends # for some value of beautiful ;)
20:55 frew So either the .polar method is smarter than me or it's wrong
20:55 frew I think it's smarter
20:56 frew it takes into account the quadrant
20:56 pugs_svn r25333 | putter++ | [elfparse] std.pm: Unbreak elfgreen build (broken by r25187).
21:06 c9s_mv_ joined #perl6
21:16 frew pugs: (0+1i)
21:16 p6eval pugs: RESULT«0.0 + 1.0i»
21:16 frew pugs: (0+1i).polar
21:16 p6eval pugs: OUTPUT«*** No such method in class Complex: "&polar"␤    at /tmp/WVf5Qmh58g line 1, column 1 - line 2, column 1␤»
21:16 frew rakudo: (0+1i).polar
21:16 p6eval rakudo a0a390: OUTPUT«Class 'Perl6MultiSub' not found␤current instr.: 'parrot;Perl6Role;!add_variant' pc 2691 (src/classes/Role.pir:42)␤»
21:16 frew rakudo: (0+1i)
21:16 p6eval rakudo a0a390: RESULT«0+1i»
21:16 frew rakudo: (0+1i).polar
21:16 p6eval rakudo a0a390: RESULT«[1, 1.5707963267949]»
21:17 frew rakudo: (0+-1i).polar
21:17 p6eval rakudo a0a390: RESULT«[1, -1.5707963267949]»
21:17 frew rakudo: (0-1i).polar
21:17 p6eval rakudo a0a390: RESULT«[1, -1.5707963267949]»
21:17 frew rakudo: (1).polar
21:17 p6eval rakudo a0a390: RESULT«[1, 0]»
21:17 frew rakudo: (1 + 0i).polar
21:17 p6eval rakudo a0a390: RESULT«[1, 0]»
21:17 frew rakudo: (1 + 0.0000001i).polar
21:17 p6eval rakudo a0a390: RESULT«[1, 9.99999999999997e-08]»
21:18 frew 3.14156/2
21:18 frew rakudo: 3.14156/2
21:18 p6eval rakudo a0a390: RESULT«1.57078»
21:18 jnthn mberends: How are you doing network I/O?
21:18 jnthn oh, with netcat...
21:19 * jnthn hopes for Parrot's socket stuff to work again soon, and S16 to become solider.
21:20 frew rakudo: (-1).polar
21:20 p6eval rakudo a0a390: RESULT«[-1, 0]»
21:20 frew hmm
21:21 frew should a magnitude ever be negative?
21:21 * frew doesn't think so
21:21 frew rakudo: (-1-1i).polar
21:22 p6eval rakudo a0a390: RESULT«[1.4142135623731, -2.35619449019234]»
21:22 frew rakudo: (-1-0i).polar
21:22 p6eval rakudo a0a390: RESULT«[1, 3.14159265358979]»
21:22 frew ah
21:22 frew better
21:23 |jedai| joined #perl6
21:24 frew is there a way I can get these pretty results on my local perl6?
21:24 frew in terms of output that is
21:25 jnthn frew: In Rakudo?
21:25 frew yeah
21:26 jnthn Well, there's the REPL, but it doesn't really get the value so you'd have to put a say at the start of each one
21:26 jnthn Just run perl6 without a script path.
21:26 jnthn Oh
21:26 jnthn Maybe call .perl on the thingy too to get it exactly like in here.
21:26 frew thanks
21:26 jnthn rakudo: (-1.0i).polar.perl.say
21:26 frew that's great
21:27 p6eval rakudo a0a390: OUTPUT«[1, -1.5707963267949]␤»
21:27 jnthn rakudo: class Object is also { method ps { self.perl.say } }; (-1.0i).polar.ps
21:27 p6eval rakudo a0a390: OUTPUT«[1, -1.5707963267949]␤»
21:28 jnthn frew: You can even stick a helper method on Object to save you some typing. Just run that class definition once in the repl. ;-)
21:28 frew haha
21:28 * jnthn afk for a bit
21:28 frew what would be best would be if .say called .perl on it's contents
21:35 frew Anyone in here know how to get a function that can take an array or a string or anything?
21:37 Matt-W as in, a function that can take any type?
21:37 frew yessir
21:38 Matt-W Just leave off the type annotation, I think
21:38 frew but I have to put a sigil right?
21:38 Matt-W you do, but if I remember my Perl 6 correctly (and I might not), if you put a single scalar and give it a single array with an @, it should come out in the scalar as an array reference
21:39 Matt-W I may, however, be wrong about that
21:39 frew no that's true
21:39 Matt-W rakudo: sub foo($t) { say $t.WHAT; } my @a; foo(@a);
21:39 p6eval rakudo a0a390: OUTPUT«Statement not terminated properly at line 1, near "my @a; foo"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
21:39 Matt-W pah
21:39 Matt-W rakudo: sub foo($t) { say $t.WHAT; }; my @a; foo(@a);
21:39 p6eval rakudo a0a390: OUTPUT«Array␤»
21:40 frew huh
21:40 Matt-W ahah, I was right
21:40 frew rakudo: sub s($foo) { $foo.perl.say }; s([1,2,3]); s (1,2,3);
21:40 p6eval rakudo a0a390: OUTPUT«[1, 2, 3]␤[1, 2, 3]␤»
21:40 frew see, I'd like arrays and arrayrefs to be distinguishable
21:41 Matt-W there's probably an array
21:41 Matt-W err
21:41 Matt-W a way
21:41 frew haha, an arrayerway
21:41 frew yeah
21:41 frew it's not a big deal at this point
21:41 frew it could def be done with a Multi sub
21:41 frew but that seems kludgy to me
21:42 Matt-W some way to tell an array in an @ container, and an array in a $ container
21:42 frew well, check this out though:
21:43 frew rakudo: my @a = <a b c>; @a.perl.say
21:43 p6eval rakudo a0a390: OUTPUT«["a", "b", "c"]␤»
21:43 frew rakudo: my $a = [a b c]; $a.perl.say
21:43 p6eval rakudo a0a390: OUTPUT«Could not find non-existent sub c␤current instr.: '_block14' pc 56 (EVAL_17:40)␤»
21:43 frew uhh
21:43 frew rakudo: my $a = [a b c]; $a.perl.say
21:43 p6eval rakudo a0a390: OUTPUT«Could not find non-existent sub c␤current instr.: '_block14' pc 56 (EVAL_17:40)␤»
21:44 Matt-W I think you want <> not []
21:44 frew rakudo: my $a = [1,2,3]; $a.perl.say
21:44 p6eval rakudo a0a390: OUTPUT«[1, 2, 3]␤»
21:44 frew there we go
21:44 Matt-W or that
21:44 frew see, you can't tell the difference of an array and an arrayref with .perl
21:44 frew rakudo: (1,2,3).perl.say
21:44 p6eval rakudo a0a390: OUTPUT«[1, 2, 3]␤»
21:45 Matt-W rakudo: my @a = [1, 2, 3]; say @a;
21:45 p6eval rakudo a0a390: OUTPUT«1 2 3␤»
21:45 Matt-W it's not really particularly relevant in terms of what .perl does
21:45 frew yeah
21:45 Matt-W because you can take its output, feed it back into an array or arrayref and it'll work
21:45 frew but I am just thinking that it would be nice for REPL to call .perl on everything
21:45 frew oh I see what you mean
21:46 frew I am just thinking basically for a users POV
21:48 Matt-W It's entirely possible, actually, that there is no distinction between an array and an arrayref
21:49 nihiliad left #perl6
21:57 frew that would be weird...
21:57 frew rakudo: (1,2,3)
21:57 p6eval rakudo a0a390: RESULT«[1, 2, 3]»
21:57 frew rakudo: @a = (1,2,3); @a[0]
21:57 p6eval rakudo a0a390: OUTPUT«Scope not found for PAST::Var '@a' in ␤current instr.: 'parrot;PCT;HLLCompiler;panic' pc 146 (src/PCT/HLLCompiler.pir:102)␤»
21:57 frew rakudo: my @a = (1,2,3); @a[0]
21:57 p6eval rakudo a0a390: RESULT«1»
21:57 frew rakudo: my @a = [1,2,3]; @a[0]
21:57 p6eval rakudo a0a390: RESULT«[1, 2, 3]»
21:58 frew rakudo: my $a = [1,2,3]; $a[0]
21:58 p6eval rakudo a0a390: RESULT«1»
21:58 frew maybe there isn't a distinction
21:58 Matt-W Well I think generally, everything that's not a value type is a reference
21:58 Matt-W just poking through S02
21:59 frew interesting
21:59 Matt-W all @ means is that the object at the other end does Positional
21:59 Matt-W and % requires that the object at the other end does Associative
21:59 Matt-W it's syntactic sugar
21:59 frew but if I do foo(@huge_array) it's not a huge deal
21:59 Matt-W from a certain point of view
21:59 Matt-W no I think that's passed by reference
21:59 frew that's excellent
21:59 Matt-W S02 talks about how value types are distinct from other types
21:59 japhb joined #perl6
22:00 Matt-W and Array is specifically mentioned as not being a value type
22:00 frew I need to read more than just S29...
22:00 Matt-W it is worth it
22:00 Matt-W although there's a lot to digest
22:00 Matt-W I need to re-read the whole lot again at some point
22:00 frew well, I've had my nose in testing functions, because that's pretty easy
22:00 frew at some point I'll learn the deeper stuff
22:00 frew I'm not in a huge rush at this point
22:01 Matt-W also, on the question of .perl
22:01 Matt-W S02 states that .perl assumes that the output will be used to regenerate the original object in item context
22:01 Matt-W so it always doing [] around lists is most definitely correct
22:01 frew that's fine
22:01 frew especially with my new knowledge of references in perl6
22:02 Matt-W just... don't kill me if I turn out to be slightly wrong :)
22:02 frew I wouldn't
22:02 frew like I said, it's not a huge deal at this point
22:02 frew I am just trying to make my local perl6 be nicer to me
22:02 Matt-W but the wohle references thing is definitely different in perl 6
22:02 Matt-W I have to go now
22:03 frew alright, station
22:03 Matt-W thanks for asking a question I knew the answer to :)
22:03 frew thanks for your help
22:03 frew haha
22:03 frew any time
22:03 Matt-W &
22:03 tjc001 joined #perl6
22:15 frew if I add an entirely new test is there something I need to do to add it to make spectest?
22:17 s1n frew: to add to the spectest, you need to commit to rakudo or submit a patch (from your fork)
22:18 frew ok
22:18 frew I guess I'll have to do that at some point then
22:18 frew I'm surprised it's not kept with pugs
22:20 s1n do you mean a part of rakudo's spectest or just the test suite in general?
22:20 frew the perl6 test suite
22:20 s1n i.e. just a new .t file?
22:20 frew yeah
22:20 frew I added the file
22:20 s1n oh, yeah, for now just submit that to the pugs repo
22:20 frew I just want to know if it will get run when people call make spectest
22:20 s1n no
22:21 s1n rakudo uses a file called t/spectest.dat, that's in rakudo's git repo
22:21 frew ah
22:21 frew and it generates a makefile or something from that?
22:22 s1n no, it runs the psuedo Test.pm with that as the test files to run
22:22 kane__ joined #perl6
22:22 frew ah
22:22 s1n it's a harness/Test.pm thing
22:23 frew how come variables don't stick around in the interactive version of rakudo?
22:23 s1n because it's not interactive
22:24 frew oh
22:24 s1n i mean, yes, it looks like it on the surface, but it's not really REPL
22:24 frew right
22:32 ejs joined #perl6
22:47 meppl joined #perl6
22:56 pugs_svn r25334 | lwall++ | [S02] allow *.foo to mean -> $obj { $obj.foo }
23:03 eternaleye joined #perl6
23:10 frew pugs: [1,2,3].perl
23:10 p6eval pugs: RESULT«"\\(1, 2, 3)"»
23:11 frew pugs: { 1+2+3}.perl
23:11 p6eval pugs: RESULT«":() \"\$_\" := \"Scalar\" #<Scalar:0xb7b68dfd>\n    \"\&?BLOCK\" := \"Sub\" #<Sub:0xb728483d> \{, , \"\$_\" := \"Scalar\" #<Scalar:0xb72e1b3d>\n                                              \"\@_\" := \"Array\" #<Array:0xb72e03d9>\n                                              \...
23:11 frew rakudo: { 1+2+3}.perl
23:11 p6eval rakudo a0a390: OUTPUT«Class 'Perl6MultiSub' not found␤current instr.: 'parrot;Perl6Role;!add_variant' pc 2691 (src/classes/Role.pir:42)␤»
23:12 frew rakudo: { 1+2+3 }.perl
23:12 p6eval rakudo a0a390: OUTPUT«Class 'Perl6MultiSub' not found␤current instr.: 'parrot;Perl6Role;!add_variant' pc 2691 (src/classes/Role.pir:42)␤»
23:12 frew that would be really cool if it worked...
23:13 frew parrot: 2.5.floor
23:13 frew oops
23:13 frew pugs: 2.5.floor
23:13 p6eval pugs: RESULT«2»
23:13 frew rakudo: 2.5.floor
23:13 p6eval rakudo a0a390: OUTPUT«Class 'Perl6MultiSub' not found␤current instr.: 'parrot;Perl6Role;!add_variant' pc 2691 (src/classes/Role.pir:42)␤»
23:13 frew pugs: rand.5.floor
23:13 p6eval pugs: RESULT«0.7483425792884879»
23:14 frew rakudo: 5.rand.floor
23:14 p6eval rakudo a0a390: OUTPUT«Class 'Perl6MultiSub' not found␤current instr.: 'parrot;Perl6Role;!add_variant' pc 2691 (src/classes/Role.pir:42)␤»
23:14 frew pugs: 5.rand.floor
23:14 p6eval pugs: RESULT«3»
23:14 frew pugs: 5.rand.floor
23:14 p6eval pugs: RESULT«3»
23:14 frew pugs: 5.rand.floor
23:14 p6eval pugs: RESULT«4»
23:16 bacek Hi there
23:16 bacek Should filpflop operator check flip again after flop?
23:16 bacek Or it's onetime check?
23:27 jnthn bacek: I think it flip-flops back and forth.
23:27 bacek jnthn: thanks.
23:27 jnthn bacek: Though something like foo() ff * will never flop once flipped...
23:27 jnthn (because of the whatever matching anything)
23:28 bacek jnthn: foo() ff 0 have same result, AFAIU
23:31 jnthn Ah, then the Whatever is probably a special case...but I think you're right...too tired to really think about much ATM. :-)
23:31 jnthn I didn't think of a good way to implement ff yet...
23:31 frew pugs: 1 ff 2
23:31 p6eval pugs: OUTPUT«*** No such subroutine: "&infix:ff"␤    at /tmp/ub4wzzmzFB line 1, column 1 - line 2, column 1␤»
23:32 jnthn I'm not sure I thought of a bad way yet either... ;-)
23:32 bacek jnthn: I'm implementing ff ATM :)
23:34 jnthn bacek: Nice!
23:34 jnthn Will be interested to see what you come up with.
23:35 jnthn Esepecially, how you plan on storing the flip-flop state.
23:36 bacek src/classes/Flipflop.pir
23:36 bacek Same way as Range
23:36 bacek Or it is bad idea?
23:38 bacek It is...
23:46 bacek What expected result for "for (1..5) -> { $_ if 1 ^ff 0 }" ?
23:47 bacek 2..5?
23:47 hanekomu joined #perl6

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo