pugscode.org/ planetsix.perl.org/ | nopaste: sial.org/pbot/perl6 | evalbot: perl6: say 3; (or rakudo:, pugs:, elf:, etc) | irclog: irc.pugscode.org/ | ~315 days 'til Xmas
Set by mncharity on 8 February 2009.
00:00 nihiliad left 00:01 shinobi-cl joined 00:07 iblechbot left 00:11 BrunoX joined 00:29 Gangl left 00:32 mberends left
bacek pmichaud: "git checkout master@{2009-02-01}" will checkout master branch at particular date. 00:32
00:36 shinobi-cl left
TimToady re "class is Foo {...}", you can currently use class { is Foo; ... } as a workaround 00:48
also :: parses as a package name, and could be forced to mean anonymous
std: class :: is Foo {...}
p6eval std 25322: OUTPUT«ok 00:02 33m␤»
TimToady much like you can currently say "sub & is bar {...}" 00:52
or "my $ is baz = 42" 00:53
if (state $)++ is perhaps a better example 00:54
01:02 mberends joined 01:19 DemoFreak left 01:25 PZt left 01:27 [particle]1 joined 01:30 [particle] left
pugs_svn r25323 | lwall++ | Allow use of :: as anonymous package name 01:31
r25323 | lwall++ | Clear up more * as GLOBAL fossils
01:48 [particle] joined
skids /me may put some work in on WITCH this weekend (www.perlfoundation.org/perl6/index.cgi?witch) 01:51
It;s been a year -- any characters change their meanings?
TimToady probably 01:53
looking
01:57 [particle]2 joined 02:00 iblechbot joined 02:10 [particle]1 left 02:15 [particle] left 02:24 iblechbot left
TimToady sorry, got a phone call, looking again 02:24
skids Actually I was kinda worried I had created some sort of hour long distraction, not what I wanted to do :-) 02:25
TimToady [] is now used to disambiguate multiple metaops 02:27
basically any infix maybe have [] around it without change of meaning 02:28
$a [+] $b is same as $a + $b
but you can distinguish X[+=] from [X+]=
(description of reduce should probably mention that it only takes infix ops too) 02:29
02:29 icwiener_ joined
TimToady I think you missed use of [] to declare a shaped array 02:30
{N} and {N..M} in regex are wrong 02:31
it's just ** N and ** N..M these days, though a closure is allowed after ** 02:32
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
() is just capturing, <> is metasyntax, and they're unrelated
though <( and )> are standalone tokens indicating start and end of official match 02:35
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
TimToady + is no longer a twigil, * now indicates contextual variables defaulting to global 02:37
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)
(or something like that) 02:39
- may now be used (along with ') in the middle of an identifier eat-fred's-sock($x) 02:40
skids notes to update verbiage about that in underscore 02:41
02:42 [particle]1 joined
TimToady I do not see how - has wildcard uses in versions 02:43
- and ' aren't quite equiv to underscore 02:44
_ is simply considered alpha, while - and ' require a following alpha
(and may not occur at the front)
02:45 icwiener left
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
er, minus is somewhere in the middle
SamB - is an ascii char
I don't think it means much in particular to a typographer?
02:48 shinobi-cl joined
skids Yeah I'm one of those people who still use -- myself, point taken. 02:49
shinobi-cl perl6: my @numbers = 1,2,3; my $a = 4; say $a ~~ @numbers; 02:50
rakudo: my @numbers = 1,2,3; my $a = 4; say $a ~~ @numbers;
SamB now, in a given context it probably means something to their typesetting software ;-P
p6eval rakudo b2e7ac: OUTPUT«Class 'Perl6MultiSub' not found␤current instr.: 'parrot;Perl6Role;!add_variant' pc 2645 (src/classes/Role.pir:42)␤»
..elf 25323, pugs: OUTPUT«␤»
rakudo b2e7ac: OUTPUT«Class 'Perl6MultiSub' not found␤current instr.: 'parrot;Perl6Role;!add_variant' pc 2645 (src/classes/Role.pir:42)␤»
02:51 Whiteknight left
shinobi-cl pugs: my @numbers = 1,2,3; my $a = 4; say $a ~~ @numbers; 02:51
p6eval pugs: OUTPUT«␤»
TimToady also, * no longer means GLOBAL, but you know that
shinobi-cl pugs: my @numbers = 1,2,3; my $a = 4; say +($a ~~ @numbers);
p6eval pugs: OUTPUT«0␤»
shinobi-cl pugs: my @numbers = 1,2,3; my $a = 2; say +($a ~~ @numbers);
p6eval pugs: OUTPUT«0␤»
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 [particle]2 left
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.
skids Thanks a lot! 02:53
TimToady yw &
shinobi-cl std: my @numbers = 1,2,3; my $a = 2; say +($a ~~ *@numbers);
p6eval std 25323: OUTPUT«############# PARSE FAILED #############␤Syntax error (two terms in a row?) at /tmp/Ir2WFWqZqH line 1:␤------> umbers = 1,2,3; my $a = 2; say +($a ~~ *@numbers);␤ expecting any of:␤ POST␤ infix or meta-infix␤ infix stopper␤ postfix␤
..postfix_prefix_meta_operator␤ ... 02:54
shinobi-cl std: my @numbers = (1,2,3); my $a = 2; say +($a ~~ *@numbers);
p6eval std 25323: OUTPUT«############# PARSE FAILED #############␤Syntax error (two terms in a row?) at /tmp/A68uGoos3Q line 1:␤------> bers = (1,2,3); my $a = 2; say +($a ~~ *@numbers);␤ expecting any of:␤ POST␤ infix or meta-infix␤ infix stopper␤ postfix␤
..postfix_prefix_meta_operator␤ ...
shinobi-cl std: my @numbers = (1,2,3); my $a = 2; say +($a ~~ @numbers);
p6eval std 25323: OUTPUT«ok 00:02 35m␤»
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␤»
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)␤»
shinobi-cl pugs: my @numbers = (1,2,3); my $a = 0; say 'found' if ($a ~~ @numbers);
p6eval pugs: RESULT«undef»
shinobi-cl pugs: my @numbers = (1,2,3); my $a = 1; say 'found' if ($a ~~ @numbers);
p6eval pugs: RESULT«undef»
shinobi-cl pugs: my @numbers = (1,2,3); my $a = 1; say ?($a ~~ @numbers);
p6eval pugs: OUTPUT«␤»
shinobi-cl pugs: my @numbers = (1,2,3); my $a = 1; say ~($a ~~ @numbers);
p6eval pugs: OUTPUT«␤»
shinobi-cl pugs: my @numbers = (1,2,3); my $a = 1; say +($a ~~ @numbers);
p6eval pugs: OUTPUT«0␤»
shinobi-cl pugs: my @numbers = (1,2,3); my $a = 1|2; say +($a ~~ @numbers); 02:57
p6eval pugs: OUTPUT«0␤»
bacek perl6: multi sub is($a, $b) { say $a ~~ $b }; is(42, 42); is (42, 42);
p6eval pugs: OUTPUT«1␤pugs: Extra space found after &is (...) -- did you mean &is(...) instead?␤»
..rakudo b2e7ac: OUTPUT«Class 'Perl6MultiSub' not found␤current instr.: 'parrot;Perl6Role;!add_variant' pc 2645 (src/classes/Role.pir:42)␤»
..elf 25323: OUTPUT«␤␤»
bacek perl6: multi sub is($a, $b) { say $a ~~ $b }; is(42, 42);
p6eval pugs: OUTPUT«1␤»
..rakudo b2e7ac: OUTPUT«Class 'Perl6MultiSub' not found␤current instr.: 'parrot;Perl6Role;!add_variant' pc 2645 (src/classes/Role.pir:42)␤»
..elf 25323: OUTPUT«␤»
bacek Is space between 'is' and '(' meaningful? 02:58
perl6: multi sub is($a, $b) { say $a ~~ $b }; is (42, 42);
p6eval pugs: OUTPUT«pugs: Extra space found after &is (...) -- did you mean &is(...) instead?␤»
..rakudo b2e7ac: OUTPUT«Class 'Perl6MultiSub' not found␤current instr.: 'parrot;Perl6Role;!add_variant' pc 2645 (src/classes/Role.pir:42)␤»
..elf 25323: OUTPUT«␤»
shinobi-cl pugs: my @numbers = (1,2,3); say +(1 ~~ @numbers); 03:00
p6eval pugs: OUTPUT«0␤»
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␤»
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␤»
shinobi-cl pugs: sub test($aa, $bb, $cc) { say "1:$aa 2:$bb 3:$cc" }; my @numbers = 7,8,9; test(*@numbers);
p6eval pugs: OUTPUT«*** ␤ Unexpected "numbers"␤ expecting term postfix, operator, ":" or ")"␤ at /tmp/wDzdC5A0uq line 1, column 82␤»
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␤»
shinobi-cl oops
rakudo: sub test($aa, $bb, $cc) { say "1:$aa 2:$bb 3:$cc"; }; my @numbers = 7,8,9; test(*@numbers);
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␤»
shinobi-cl std: sub test($aa, $bb, $cc) { say "1:$aa 2:$bb 3:$cc"; }; my @numbers = 7,8,9; test(*@numbers);
p6eval std 25323: OUTPUT«############# PARSE FAILED #############␤Unable to parse argument list; couldn't find final ')' at /tmp/0iRv8G4P3P line 1:␤------> b 3:$cc"; }; my @numbers = 7,8,9; test(*@numbers);␤ expecting any of:␤ POST␤ infix or meta-infix␤ infix stopper␤
..postfix␤ postfix_pr...
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␤»
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]);
p6eval pugs: OUTPUT«1:7 2:8 3:9␤»
shinobi-cl so, theres no "flatten" anymore? 03:05
pugs: sub test($aa, $bb, $cc) { say "1:$aa 2:$bb 3:$cc"; }; my @numbers=7,8,9; &test(*@numbers);
p6eval pugs: OUTPUT«*** ␤ Unexpected "numbers"␤ expecting term postfix, operator, ":" or ")"␤ at /tmp/nDYmU6qGcN line 1, column 82␤»
bacek pugs: my $a=[2,12,42]; my @b = @$a; say ~@b
p6eval pugs: OUTPUT«2 12 42␤»
bacek std: my $a=[2,12,42]; my @b = @$a; say ~@b
p6eval std 25323: OUTPUT«ok 00:02 35m␤»
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 03:09 [particle] left
shinobi-cl pugs: say +(1 ~~ (1,2,3) ); 03:09
p6eval pugs: OUTPUT«0␤»
shinobi-cl pugs: say +(0 ~~ (1,2,3) );
p6eval pugs: OUTPUT«0␤»
shinobi-cl pugs: say +(6 ~~ (1,2,3) );
p6eval pugs: OUTPUT«0␤»
shinobi-cl pugs: say +(6 ~~ *(1,2,3) );
p6eval pugs: OUTPUT«*** Cannot cast from VNum Infinity to Pugs.AST.Types.VCode (VCode)␤ at /tmp/sAifSFIPxH line 1, column 5-22␤»
shinobi-cl pugs: say +(1 ~~ 1,2,3 );
p6eval pugs: OUTPUT«3␤»
shinobi-cl pugs: say 1 ~~ 1,2,3; 03:10
p6eval pugs: OUTPUT«123␤»
shinobi-cl pugs: say 'a' ~~ 1,2,3;
p6eval pugs: OUTPUT«23␤»
03:11 justatheory joined
shinobi-cl pugs: my @list = ('a', 'b', 'c'); say 'a' ~~ @list; 03:11
p6eval pugs: OUTPUT«␤»
shinobi-cl pugs: my @list = ('a', 'b', 'c'); say 1~~ @list; 03:12
p6eval pugs: OUTPUT«␤»
shinobi-cl pugs: my @list = ('a', 'b', 'c'); say 1 ~~ @@list;
p6eval pugs: OUTPUT«*** ␤ Unexpected ";"␤ expecting "::"␤ Variable "@@list" requires predeclaration or explicit package name␤ at /tmp/fHlaNBchsG line 1, column 44␤»
03:19 PZt joined 03:20 wayland joined
shinobi-cl pugs: my @list = ('a', 'b', 'c'); say 'a' ~~ @list; 03:20
p6eval pugs: OUTPUT«␤»
bacek TimToady: is "my $x; my @y = @$x" allowed syntax? Or "my @y = @($x)" required?
shinobi-cl pugs: my @list = ('a', 'b', 'c'); say ?('a' ~~ @list);
p6eval pugs: OUTPUT«␤»
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:21
TimToady @$x is fine 03:22
lambdabot Maybe you meant: . ? @ bf ft id pl rc thx v wn
TimToady @shaddap
lambdabot Unknown command, try @list
TimToady shinobi-cl: smartmatch with a list doesn't do any() automatically 03:23
pugs: say (1,2,3) ~~ (1,2,3)
p6eval pugs: OUTPUT«1␤»
TimToady but the official flattener is prefix:<|> these days 03:24
I haven't been tracking the IO work 03:25
wayland Ok, I'll wait for ruoso or someone to answer that then :). 03:26
TimToady pugs: say 'a' ~~ any('a','b','c') 03:28
p6eval pugs: OUTPUT«any(VBool False,VBool True)␤»
shinobi-cl oh,, i see, thanks!
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␤»
shinobi-cl std: sub test($aa, $bb, $cc) { say "1:$aa 2:$bb 3:$cc"; }; my @numbers=7,8,9; test(|@numbers);
p6eval std 25323: OUTPUT«ok 00:04 37m␤»
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␤»
shinobi-cl pugs @data=1,2,3; say @data; say |@data;
pugs: @data=1,2,3; say @data; say |@data;
p6eval pugs: OUTPUT«*** ␤ Unexpected "="␤ expecting "::"␤ Variable "@data" requires predeclaration or explicit package name␤ at /tmp/dkWRIc7cCo line 1, column 6␤»
shinobi-cl pugs: my @data=1,2,3; say @data; say |@data; 03:33
p6eval pugs: OUTPUT«123␤123␤»
shinobi-cl pugs: my @data=(1,[2,3]); say @data; say |@data;
p6eval pugs: OUTPUT«12 3␤12 3␤»
TimToady I don't know why it didn't find test; looks like a bug 03:34
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␤»
shinobi-cl :D
TimToady I guess it's because pugs never got as far as implementing Captures 03:36
03:36 gravity joined
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 gravity left
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)␤»
TimToady I guess rakudo is still hosed
anyway, that should work 03:38
shinobi-cl pugs: my @list = ('a', 'b', 'c'); say ?('a' ~~ any(@list)); 03:42
p6eval pugs: OUTPUT«any(VBool False,VBool True)␤»
shinobi-cl pugs: my @list = ('a', 'b', 'c'); say +('a' ~~ any(@list));
p6eval pugs: OUTPUT«any(VNum 0.0,VNum 1.0)␤»
shinobi-cl pugs: my @list = ('a', 'b', 'c'); say +('a' ~~ any(|@list));
p6eval pugs: OUTPUT«any(VNum 0.0,VNum 1.0)␤»
shinobi-cl pugs: my @list = ('a', 'b', 'c'); say +(1 ~~ any(@list)); 03:43
p6eval pugs: OUTPUT«any(VNum 0.0)␤»
shinobi-cl pugs: my @list = ('a', 'b', 'c'); say ?(1 ~~ any(|@list));
p6eval pugs: OUTPUT«any(VBool False)␤»
shinobi-cl pugs: my @list = ('a', 'b', 'c'); say ?('b' ~~ any(|@list));
p6eval pugs: OUTPUT«any(VBool False,VBool True)␤»
shinobi-cl pugs: say 1 ~~ any(1,2,3) 03:45
p6eval pugs: OUTPUT«any(VBool False,VBool True)␤»
TimToady | is a no-op in list context
03:45 Limbic_Region left
shinobi-cl so, how can i use the ~~ for see if an element belongs to an array? 03:46
TimToady pugs: my @list = <a b c>; say "yes" if "a" ~~ any(@list) 03:47
p6eval pugs: OUTPUT«yes␤»
TimToady dinner & 03:48
03:49 justatheory left
shinobi-cl my @list = 1,2,3; say +(1 ~~ any(@list)); 03:49
pugs: my @list = 1,2,3; say +(1 ~~ any(@list));
p6eval pugs: OUTPUT«any(VNum 0.0,VNum 1.0)␤»
shinobi-cl pugs: my @list = 1,2,3; say (1 ~~ any(@list)) ?? "yes" !! "nope" ; 03:50
p6eval pugs: OUTPUT«yes␤»
shinobi-cl pugs: my @list = 1,2,3; say (6 ~~ any(@list)) ?? "yes" !! "nope" ;
p6eval pugs: OUTPUT«nope␤»
shinobi-cl thanks!
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␤»
shinobi-cl pugs: my %pets(cats=>1,dogs=>2,dodos=>0); say %pets;
p6eval pugs: OUTPUT«*** Cannot cast from VList [] to Pugs.AST.Types.VCode (VCode)␤ at /tmp/G363fwVvoL line 1, column 1-35␤»
shinobi-cl pugs: my %pets=(cats=>1,dogs=>2,dodos=>0); say %pets;
p6eval pugs: OUTPUT«cats 1dodos 0dogs 2␤»
shinobi-cl pugs: my %pets=(cats=>1,dogs=>2,dodos=>0) ; say ('cats' ~~ any(keys %pets)) ?? "yes" !! "nope" ; 03:52
p6eval pugs: OUTPUT«yes␤»
shinobi-cl pugs: my %pets=(cats=>1,dogs=>2,dodos=>0) ; say ('0' ~~ any(values %pets)) ?? "yes" !! "nope" ;
p6eval pugs: OUTPUT«yes␤»
shinobi-cl pugs: my %pets=(cats=>1,dogs=>2,dodos=>0) ; say ('3' ~~ any(values %pets)) ?? "yes" !! "nope" ;
p6eval pugs: OUTPUT«yes␤»
shinobi-cl pugs: my %pets=(cats=>1,dogs=>2,dodos=>0) ; say (3 ~~ any(values %pets)) ?? "yes" !! "nope" ;
p6eval pugs: OUTPUT«yes␤»
shinobi-cl pugs: my %pets=(cats=>1,dogs=>2,dodos=>0) ; say ('pigs' ~~ any(keys %pets)) ?? "yes" !! "nope" ; 03:53
p6eval pugs: OUTPUT«nope␤»
shinobi-cl pugs: my %pets=(cats=>1,dogs=>2,dodos=>0) ; say ( cats=>1 ~~ any(%pets)) ?? "yes" !! "nope" ; 03:54
p6eval pugs: OUTPUT«yes␤»
shinobi-cl pugs: my %pets=(cats=>1,dogs=>2,dodos=>0) ; say ( cats=>2 ~~ any(%pets)) ?? "yes" !! "nope" ;
p6eval pugs: OUTPUT«yes␤»
shinobi-cl pugs: my %pets=(cats=>1,dogs=>2,dodos=>0) ; say ( (cats=>2) ~~ any(%pets)) ?? "yes" !! "nope" ; 03:55
p6eval pugs: OUTPUT«yes␤»
shinobi-cl pugs: my %pets=(cats=>1,dogs=>2,dodos=>0) ; say (3 ~~ any(%pets.values)) ?? "yes" !! "nope" ;
p6eval pugs: OUTPUT«yes␤»
shinobi-cl pugs: my %pets=(cats=>1,dogs=>2,dodos=>0) ; say (3 ~~ none(values %pets)) ?? "yes" !! "nope" ; 03:57
p6eval pugs: OUTPUT«nope␤»
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- left, Nom- joined 04:34 Icarus joined 04:38 [particle] joined 04:41 hercynium joined, Icarus is now known as digitalicarus
digitalicarus marco 04:42
diakopter polo? 04:43
04:44 Nom- left, shinobi-cl left, stephenlb left, elmex left, mj41_ left, mikehh left 04:45 scrottie left, allbery_b left, ilbot2 left, gbacon left
digitalicarus I'm curious about this channel. Are people here developers for Perl6 or do they use a form of it 04:45
04:45 c9s_mv left, lisppaste3 left, PerlJam left, Matt-W left, buu left, orafu left, IRSeekBot left, c1sung left, Nom- joined, shinobi-cl joined, stephenlb joined, elmex joined, mj41_ joined, mikehh joined, ilbot2 joined, scrottie joined, allbery_b joined, gbacon joined
simcop2387 digitalicarus: a bit of both i believe, lots of developers though i think 04:45
04:46 PerlJam joined, c9s_mv joined, lisppaste3 joined, IRSeekBot joined, c1sung joined, Matt-W joined, buu joined, orafu joined, irc.freenode.net sets mode: +o PerlJam
digitalicarus I use Perl 5 a lot at work and in general. I'm curious about learning new things, but am torn... 04:46
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
for me, is the best thing
and junctions too
simcop2387 digitalicarus: well syntactic issues, and lots of features people wanted, and things like that 04:48
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:49
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?
diakopter no. no one tries to improve performance anymore. I think everyone just forgot about it.
simcop2387 i think performance is best answered over in Parrot currently 04:51
shinobi-cl digitalicarus... use the library called Moose for perl5
it will make oop much easier
no more 'bless' needed 04:52
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:53
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 hercynium left
diakopter digitalicarus: for interesting ideas/thoughts about optimization of dynamic languages... see tartley.com/?p=456 and steve-yegge.blogspot.com/2008/05/dy...-back.html 04:54
TimToady digitalicarus: these are all turing complete languages, so the official answer is "no" 04:55
but there are certainly differences in what is easy 04:56
04:56 alester joined, [particle]1 left
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
TimToady here's fibonacci in Perl 6: 1,1...&[+] 04:57
Perl 6 will have a better native interface than Perl 5 04:58
if for no other reason than Perl 6 can actually declare APIs with C-like types 05:00
at least for primitive types and simple structs
and the OO doesn't require translation; it can just encapsulate the actual C struct 05:01
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
After all, Ruby would be a lot more obscure if it weren't for Rails.
TimToady Perl 6 is all over freedom, and the killer app will come
it's a controlled freedom, so you don't do it accidentally, but all the defaults are tweakable underneath if you want 05:03
basically, things that seem generalizable in Perl 5 but aren't really, actually are generalizable in Perl 6 05:04
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:05
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
but they'll be there when you need 'em 05:07
assuming we finish implementing it, of course...
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?
TimToady certainly, there aren't many things you have to unlearn
$foo[$ix] becomes @foo[$ix], for instance 05:08
but that's more regular
and we use .foo instead of ->foo for method calls, for various reason
reasons
and foreach loops are now written for @list -> $elem {...} 05:09
05:09 eternaleye left
TimToady because $elem is actually a formal parameter to the block 05:09
digitalicarus Seems to be influenced by the terseness of Ruby 05:10
TimToady in some ways, but hopefully better designed
certainly -> $x {...} is like ruby's {|x| ...}
interestingly, ruby is borrowing the -> form, last I heard 05:11
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
TimToady 60-70% of ruby syntax is straight out of perl
digitalicarus gtg. I will try to come back with more stimulating conversation after more research on the Perl 6 and parrot projects.
TimToady I'm waiting for Perl 6 to run on any platform
digitalicarus see you
TimToady have fun
05:13 digitalicarus is now known as digitalicarus_aw
pugs_svn r25324 | chrisdolan++ | S02 and S19 now say $?PROGRAM instead of $*PROGRAM_NAME 05:13
05:13 eternaleye joined 05:14 shinobi-cl joined
TimToady hmm $?PROGRAM makes no sense 05:16
the program name is not necessarily known at compile time 05:18
it can only be known at run time
pugs_svn r25325 | lwall++ | [S19] $?PROGRAM makes no sense 05:21
05:21 bigal joined
shinobi-cl i used to work on delphi many years 05:22
one of the things i liked about it was the "with" keyword... which works just like "given"
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"
yes, i agree, with is too general 05:25
pugs_svn r25326 | lwall++ | [progname] program name needs to come from PROCESS namespace
shinobi-cl the idea of the "with" in delphi was mainly to type less code 05:26
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:27
pugs_svn r25327 | lwall++ | [progname] botched previous patch 05:28
shinobi-cl it helped a LOT in code readability
TimToady that's basically from Pascal
shinobi-cl yes, pascal 05:29
TimToady we almost have the same, as long as you put an extra . on the front
given %foo { .<foo> = .<bar> }
shinobi-cl but if you use a given inside that given, you loose the default variable 05:30
or is "lose"?
TimToady lose
but then it would be potentially ambiguous anyway 05:31
and you can say given %foo -> $f { $f.<foo> = $f.<bar> }
even if %foo is very long
bigal would like to help with P6, but not a great C programmer... anyone need help not C oriented?
TimToady well, in that case, $f<foo> = $f<bar> is fine
most of the folks around here aren't doing C 05:32
lotta people writing tests
bigal k, thought p6 written in c
shinobi-cl oh i see... its ok then.... even better that "with"
TimToady pugs is written in Haskell
the STD parser is written in Perl 6 :)
elf is at least partly in ruby 05:33
bigal rgr... not a Haskell xpert either (unfrtnly)
TimToady but you can program in Perl 6 if you write tests :)
bigal I'll back off then... was hoping to contribute. not sure how to help though with my skill set.
TimToady or there are docs, wikis, etc
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:34 icwiener_ left
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
TimToady various people do various bits of it
bigal rgr... [email@hidden.address] shoot me some work, I'll do my best 05:36
TimToady and nobody will be offended if you ask around
would you like a commit bit to the pugs repo to start with?
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:37
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
r25328 | wayland++ | draft; otherwise I'd be a lot more careful :).
r25328 | wayland++ |
r25328 | wayland++ | Specifically, I've:
r25328 | wayland++ | - Taken some of the stuff that was spread throughout the document, and put it in
r25328 | wayland++ | with its associated role
r25328 | wayland++ | - Created sections for a lot of the different classes we'll need 05:39
r25328 | wayland++ |
r25328 | wayland++ | It still needs a lot of work.
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 www.perlfoundation.org/perl6/index.cgi
TimToady I've sent you a commitbit to the pugs repo; which contains the specs and test suite 05:42
it's customary to add yourself to AUTHORS as a test checkin
for pugs repo stuff the principle is forgiveness rather than permissions, so hack away 05:43
bigal checking www.perlfoundation.org/perl6/index.cgi now... I've donated 'lots' for me in $$ ($500) but worth it for me 05:44
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
Can learn pugs though if docs...
rgr on the Pugs... I will make it my after hours project for this weekend/week. 05:46
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:47
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
p6eval pugs: OUTPUT«*** ␤ Unexpected "."␤ expecting operator, ":", "," or "}"␤ at /tmp/dKVmMatzp8 line 1, column 118␤»
TimToady pugs repo is not pugs program
most of the pugs repo has nothing to do with the Haskell implementation
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:␤------> "; .reverse.say; say "Sorted array:" .sort.say; given .uniq.elems { when $l␤ expecting any of:␤ infix or meta-infix␤ infix
..stopper␤...
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:␤------> "; .reverse.say; say "Sorted array:" .sort.say; given .uniq.elems { when $l␤ expecting any of:␤ infix or meta-infix␤ infix
..stopper␤...
bigal rgr, have "Perl 6... Essentials" from o'reilly. For me doesnt clearly delinieate(MP) between architectures
TimToady that's still two terms in a row
that book is somewhat obsolete these days
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␤»
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'; } } }
p6eval std 25328: OUTPUT«############# PARSE FAILED #############␤Malformed block␤Malformed block␤Syntax error at /tmp/icmg6gKdmE line 1:␤------> ay 'There are no repeated elements'; } default { say 'There are repeated␤ expecting terminator␤FAILED 00:04 36m␤»
TimToady need another ;
} only terminates a statement before newline 05:55
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:56
p6eval std 25328: OUTPUT«ok 00:04 36m␤» 05:57
shinobi-cl thanks, again :)
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'; } } }
p6eval pugs: OUTPUT«Reversed array:␤␤Sorted array:␤␤There are repeated elements␤» 05:58
TimToady if you -> $l it doesn't alias $_
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␤»
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'; } } }
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'; } } }
p6eval pugs: OUTPUT«Reversed array:␤fccba␤Sorted array:␤abccf␤There are repeated elements␤»
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␤»
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␤»
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:'~$_; } } }
p6eval pugs: OUTPUT«Reversed array:␤fdcba␤Sorted array:␤abcdf␤There are no repeated elements: Total:5␤»
shinobi-cl so thats how you use given as switch and as "with" combined :) ... better than pascal "with" 06:05
bigal looking form my win32 svn client... tracking svn.pugs 06:08
tks
06:12 alester left
bigal brb 06:12
06:12 bigal left 06:21 bigal joined
bacek pugs: try { die "Goodbye cruel world!" };say $!.^isa("Exception") 06:26
p6eval pugs: OUTPUT«␤»
bacek pugs: try { die "Goodbye cruel world!" };say $!.isa("Exception") 06:27
p6eval pugs: OUTPUT«␤»
bacek pugs: try { die "Goodbye cruel world!" };say $!.^isa("Failure")
p6eval pugs: OUTPUT«␤»
TimToady pugs: try { die "Foo" }; say $!.WHAT
p6eval pugs: OUTPUT«Str␤»
06:32 shinobi-cl left
pugs_svn r25329 | wayland++ | S02: Moved comment about standard file handles to S16. 06:37
r25329 | wayland++ | S16: Did more clearing up, and fixed some stupid things I did last time
06:41 Matt-W left, Matt-W joined 06:43 kate21de joined 06:46 alc joined 06:53 Alias joined 07:03 Tene joined
pugs_svn r25330 | bacek++ | [spec] Fix min= and max= tests. 07:07
07:16 Tene_ left 07:18 kate21de left 07:21 kate21de joined 07:31 mberends left 07:40 Alias left 07:54 abra joined, abra left 08:06 kate21de left 08:07 mikehh left 08:10 DemoFreak joined 08:15 kate21de joined 08:18 kate21de left 08:19 mikehh joined
bacek pugs: org(""); say "HI" 08:21
p6eval pugs: OUTPUT«*** No such subroutine: "&org"␤ at /tmp/uAcRz73jil line 1, column 1-8␤»
bacek pugs: ord(""); say "HI" 08:22
p6eval pugs: OUTPUT«HI␤»
08:40 kate21de joined 08:42 barney joined 09:07 barney left
bacek pugs: say -1i; say -1.i; 09:11
p6eval pugs: OUTPUT«-0 + -1i␤*** No such method in class Int: "&i"␤ at /tmp/TiquMRBb4l line 1, column 14-18␤» 09:12
09:58 maerzhase joined 09:59 maerzhase left, maerzhase joined 10:02 pmurias joined, pmurias left 10:10 M_o_C joined 10:20 stephenlb left
bacek msg pmichaud "git checkout `git log --reverse --since="2009-02-01"|head -1|cut -f2 -d' '`" 10:21
10:35 wayland left 10:39 alc left 10:46 alc joined 10:54 sri_kraih joined 11:08 kane__ joined 11:16 pmurias joined 11:18 shinobi-cl joined 11:24 masak joined
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:39
but when I did, I realized that the Rakudo Test.pm lacks a killer feature that the November Test.pm has. 11:40
now, as a conscientious Perl 6 contributor, what should I do?
just go ahead and patch the Rakudo Test.pm? (making sure to run the spectests before and after) 11:41
or send the patch as a rakudobug?
I know many Test.pm patches have been stalled due to the recent discussion about a test model overhaul. 11:42
11:42 duke_leto joined, duke_leto left
masak one of those stalled tickets even adds the functionality I'm missing, possibly even in a better way. 11:42
11:46 eternaleye left 11:47 eternaleye joined
jnthn masak: Maybe to the list is safest. 11:48
masak: OTOH, if it's just adding something and not changing existing things, it's probably safe-ish to put it in... 11:49
masak: BTW, ticket queue is under 250! :-P 11:50
masak jnthn: I'll see if I can find the stalled patch tickets first.
jnthn: yes, I saw the flurry of activity. kudos.
jnthn Hope it helps. 11:51
11:51 eternaleye left
masak jnthn: I'm the one having trouble keeping up now. :) 11:51
have to improve a lot of suboptimalized code...
and I only found one bug last night.
rakudo: say "you there, p6eval?" 11:52
jnthn Wow, that's quite a low-scoring night for you. :-P
11:52 eternaleye joined
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)␤»
jnthn meh. br0ken
masak dives in to fix
oh, and it wasn't even a bug I found. 11:53
just a missing feature.
moritz_: timtowtdi.org is slaaaaaauw today. 11:55
jnthn If it's an easy to add misisng feature, ticket welcome. :-)
masak jnthn: don't worry, I'll post one. :) 11:56
I think it's easy to add.
rt.perl.org/rt3/Ticket/Display.html?id=63230 11:58
11:58 eternaleye left, pmurias left
jnthn Talk about useless example - it doesn't even rename them. :-P 11:59
std: sub formalize($text, :case($case), :justify($justify)) {...}
masak :)
jnthn ...std...?
masak that's because it's from S06, illustrating what it desugars to.
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. :-)
masak if std is on timtowtdi.org, it might be slaaaaaaauw to day also.
jnthn++
Matt-W can rakudo tidy my house yet? 12:04
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)
jnthn wonders if you actually can give grep a typename like that 12:09
The module I really need to write is Automate::CoffeeMachine 12:10
masak might be handy.
12:12 p6eval left 12:13 pugs_svn left, pugs_svn joined, iblechbot joined, p6eval joined
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)␤»
masak hold on...
jnthn fail 12:15
masak I finally got access to timtowdtdi.org. haven't actually done anything yet.
jnthn Oh well, it was speculative karma then...
masak :)
12:17 cognominal left 12:20 meppl joined 12:21 M_o_C left 12:29 M_o_C joined
masak rakudo: say "you there now, p6eval?" 12:32
p6eval rakudo a0a390: OUTPUT«you there now, p6eval?␤»
masak \o/
Matt-W woo 12:40
masak and now I have to go.
Matt-W organises for masak to have a fanfare on his departure
masak I'm off to a local meeting about how to implement Esperanto on a local level. 12:41
:P
12:41 masak left
jnthn local $esperanto; 12:43
Matt-W see, everything's easy in Perl 12:49
13:08 alexn_org joined 13:30 mikehh left 13:42 cognominal joined 13:46 |MoC| joined, cognominal left 13:48 alexn_org left 13:55 M_o_C left 13:56 sri_kraih left, DemoFreak left, [particle] left, BrunoX left, skids left, Cyrus___ left, aindilis` left, Khisanth left, szabgab left, japhb left, yahooooo left, bacek left, TimToady left, moritz_ left, dalek left, moritz_ joined, sri_kraih joined, DemoFreak joined, [particle] joined, BrunoX joined, skids joined, Cyrus___ joined, aindilis` joined, Khisanth joined, szabgab joined, japhb joined, yahooooo joined, bacek joined, dalek joined, TimToady joined, irc.freenode.net sets mode: +oo moritz_ TimToady 13:57 DemoFreak left, DemoFreak joined 14:01 cai_ joined 14:03 [particle]1 joined 14:21 [particle] left 14:26 sri_kraih left
kate21de ggh 14:29
14:30 kate21de left 14:31 cognominal joined, kate21de joined 14:33 masak joined
masak revenas 14:33
jnthn revenas? 14:38
masak eo:'veni' = en:'to come'. the '-as' indicates present tense. eo:'re-' works as in English. 14:39
jnthn I'm happy you've re-come. ;-) 14:40
masak me too. :)
back to hacking on my shortest-path algorithm for Druid. 14:41
jnthn Sounds fun.
jnthn is doing some work on $OTHER_JOB
wolverian is taking a lojban course
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
wolverian: any impressions so far that you'd like to share? I'm interested.
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).
masak: I'm not familiar with esperanto or other constructed languages, so I can't really compare.
masak ok. 14:44
14:44 shinobi-cl left, shinobi-cl joined
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.
masak but maybe that'll eventually lure me in as well. :)
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?
jnthn: Slovak and Russian sounds plenty.
wolverian masak: lojban.org is somewhat active, as is #lojban; some hundreds.
masak: not a large community.
masak was at a lecture by Douglas Hofstadter yesterday
heard him speak about his translation of Eugene Onegin. 14:46
wolverian: still, larger than many other conlangs.
certainly among the 10 largest.
14:46 maerzhase left
wolverian oh, certainly. 14:46
I'm thinking of making an attempt at porting the grammar to parsec over the summer 14:47
14:47 kate21de left
masak :) 14:47
wolverian or perhaps perl 6 rules...
(thing is, if I do it in haskell, I'll probably get credits for it from the CS dept) 14:48
("haskell workshop")
masak anke konsideras lernor Ido 14:49
jnthn "masak is considering lerning Ido"?
masak jnthn: 'also', yes
with the extra twist that 'learning' is a future infinitive. 14:50
wolverian pfft, Ido has verbs, and nouns, and all that.
much too complex. :)
masak wolverian: :P
wolverian: have you looked at Toki Pona?
14:50 cognominal left
masak it's the latest minilang craze among the young Esperantists. 14:50
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.
wolverian heh.
14:52 cognominal joined
wolverian pinca in lojban. 14:52
gotta run, cheers. 14:53
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:␤------> my $a = [+](1,2,3); say $a;␤ expecting any of:␤ noun␤ prefix or meta-prefix␤ prefix_postfix_meta_operator␤
..whitespace␤FAILED 00:02 ...
shinobi-cl std: my $a = (1,2,3)&[+]; say $a;
p6eval std 25330: OUTPUT«############# PARSE FAILED #############␤Unable to parse array composer; couldn't find final ']' at /tmp/6ha246PxIJ line 1:␤------> my $a = (1,2,3)&[+]; say $a;␤ expecting any of:␤ noun␤ prefix or meta-prefix␤ prefix_postfix_meta_operator␤ 15:01
..whitespace␤FAILED 00: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:␤------> my $a = [+] 1,2,3; say $a␤ expecting any of:␤ noun␤ prefix or meta-prefix␤ prefix_postfix_meta_operator␤
..whitespace␤FAILED 00:02 34m␤»
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)␤»
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])␤»
shinobi-cl pugs: say 1,1...&[+]
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...
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])␤»
shinobi-cl pugs: say +(1,1..9&[+]);
p6eval pugs: OUTPUT«2␤»
15:08 Whiteknight joined
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])␤»
masak dives in and reboots p6eval
15:09 Limbic_Region joined
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])␤»
shinobi-cl pugs: say ~(1,1..9[+]);
p6eval pugs: OUTPUT«*** ␤ Unexpected "]);"␤ at /tmp/eR87l9REyq line 1, column 15␤» 15:12
shinobi-cl pugs: say 1,1..9[+];
p6eval pugs: OUTPUT«*** ␤ Unexpected "];"␤ at /tmp/3F1ZeOgeP9 line 1, column 13␤»
masak shinobi-cl: may I ask what it is you're attempting?
shinobi-cl fibbionacci up to 9
masak hm. 15:13
shinobi-cl quote: 04:57TimToadyhere's fibonacci in Perl 6: 1,1...&[+]
masak oh.
rakudo: 'back yet?' ?? 'aye!' !! 'nay :(' 15:16
p6eval rakudo a0a390: RESULT«"aye!"»
masak that's good.
shinobi-cl std: my @list = 1..9; say $_ for (@list); 15:19
p6eval std 25330: OUTPUT«ok 00:02 33m␤»
shinobi-cl pugs: my @list = 1..9; say $_ for (@list);
p6eval pugs: OUTPUT«1␤2␤3␤4␤5␤6␤7␤8␤9␤»
shinobi-cl pugs: my @list = 1..Inf; say $_ for (@list);
p6eval pugs: No output (you need to produce output to STDOUT) 15:20
shinobi-cl maybe i shouldnt did that
hha my english sucks
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;
p6eval pugs: OUTPUT«1 2 3 4 5 6 7 8 9␤»
shinobi-cl pugs: my @list = 1..9; my $fib = +>>@list; say $fib;
p6eval pugs: OUTPUT«*** ␤ Unexpected "$fib"␤ expecting "=", context, ":" or "("␤ at /tmp/ViMqCfNCjG line 1, column 21␤»
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␤»
shinobi-cl pugs: my @list = 1..9; say 1 +>> @list;
p6eval pugs: OUTPUT«*** ␤ Unexpected ">"␤ at /tmp/6Rltj9h5Bb line 1, column 26␤»
shinobi-cl pugs: my @list = 1..9; say 1 +> @list;
p6eval pugs: OUTPUT«0␤»
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␤»
shinobi-cl pugs: my @list = 1..9; say 1 <<+<< @list;
p6eval pugs: OUTPUT«*** ␤ Unexpected "<<+<<"␤ expecting operator, ":" or ","␤ at /tmp/MPPmVpEXDL line 1, column 24␤»
15:24 alexn_org joined
shinobi-cl std: say 1 <<+>> 2; 15:24
p6eval std 25330: OUTPUT«ok 00:02 33m␤»
shinobi-cl pugs: say 1 <<+>> 2;
p6eval pugs: OUTPUT«*** ␤ Unexpected "<<+>>"␤ expecting operator, ":" or ","␤ at /tmp/YRsgytQUMP line 1, column 7␤»
shinobi-cl rakudo: say 1 <<+>> 2;
p6eval rakudo a0a390: OUTPUT«3␤»
shinobi-cl rakudo: my @list = 1..9; say 1 <<+>> @list;
p6eval rakudo a0a390: OUTPUT«2345678910␤»
shinobi-cl rakudo: my @list = 1..9; say @list <<+>> @list; 15:25
p6eval rakudo a0a390: OUTPUT«24681012141618␤»
shinobi-cl rakudo: my @list = 1..9; say @list >>+<< @list;
p6eval rakudo a0a390: OUTPUT«24681012141618␤»
shinobi-cl rakudo: my @list = 1..9; say @list <<+<< @list; 15:26
p6eval rakudo a0a390: OUTPUT«24681012141618␤»
shinobi-cl rakudo: my @list = 1..9; say 1 <<+<< @list;
p6eval rakudo a0a390: OUTPUT«2345678910␤»
shinobi-cl rakudo: my @list = 1..9; say 1 >>+>> @list;
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
shinobi-cl rakudo: my @list = 1..9; say 2 <<*>> @list; 15:33
p6eval rakudo a0a390: OUTPUT«24681012141618␤»
shinobi-cl rakudo: my @list = 1..9; say 2 <<*<< @list; 15:34
p6eval rakudo a0a390: OUTPUT«24681012141618␤»
shinobi-cl rakudo: my @list = 1..9; say 2 <<* @list;
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)␤»
shinobi-cl rakudo: my @list = 1..9; say 2 *<< @list;
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:36 bigal left 15:40 cai_ left
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)␤»
shinobi-cl rakudo: my @list = 1..9; say 2 >>*<< 3; 15:41
p6eval rakudo a0a390: OUTPUT«6␤»
shinobi-cl rakudo: my @list = 1..9; say 2 >>*<< 3,2;
p6eval rakudo a0a390: OUTPUT«62␤»
shinobi-cl i just dont get the arrow directions
15:45 Limbic_Region left
masak shinobi-cl: AFAIK, the arrows always point toward the operator. 15:46
hm, maybe not.
shinobi-cl i just found anotrher perl6 wiki 15:47
en.wikibooks.org/wiki/Perl_6_Progra..._Operators
masak aye, there are a few efforts to explain Perl 6 out there. :)
15:49 icwiener joined
shinobi-cl rakudo: my @list = 1..9; my $total = [+] @list; say $total; 15:50
p6eval rakudo a0a390: OUTPUT«45␤»
shinobi-cl rakudo: say [+]&1,1..9
p6eval rakudo a0a390: OUTPUT«Use of uninitialized value␤45␤» 15:51
shinobi-cl rakudo: say &1,1..9
p6eval rakudo a0a390: OUTPUT«Use of uninitialized value␤123456789␤»
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)␤»
masak goes to fix
16:05 cognominal left
masak moritz_: any idea what's causing p6eval to break all the time? 16:05
16:07 pmurias joined
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)␤»
masak jnthn: does this look right to you?
TimToady pugs: for "a".."c" Z ("?", "a".."b") -> $x1, $x2 { say $x1, $x2 }
p6eval pugs: OUTPUT«a?ba␤cb␤»
masak submits rakudobug 16:12
TimToady looks right to me
masak good enough for me :)
TimToady shouldn't need the parens, either
masak right. just making sure. 16:13
TimToady pugs: for "a".."c" Z "?", "a".."b" -> $x1, $x2 { say $x1, $x2 }
p6eval pugs: OUTPUT«a?ba␤cb␤»
jnthn rakudo: say "a".."c" Z "?", "a".."b";
p6eval rakudo a0a390: OUTPUT«a?bab␤»
16:13 dominiko joined
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
p6eval std 25330: OUTPUT«ok 00:02 34m␤»
TimToady std: my $a = [+] 1,2,3; say $a 16:14
p6eval std 25330: OUTPUT«ok 00:02 35m␤»
TimToady std: my $a = [+](1,2,3); say $a
p6eval std 25330: OUTPUT«ok 00:02 35m␤»
TimToady huh, wonder why it didn't work earlier
probably lost track of the infix cache in lex, or some such 16:15
jnthn rakudo: say "a".."c" Z list("?", "a".."b");
p6eval rakudo a0a390: OUTPUT«a?bacb␤»
TimToady might have the wrong precedence on Z
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
I'm interested in getting involved in one... I'd really like to see it happen :)
TimToady Tim Bunch was working on one
*Bunce
dunno how far he's got 16:17
Nom- hmm ok
16:17 shinobi-cl left 16:18 BrunoX left
TimToady looks like there's a [email@hidden.address] mailing list 16:18
Nom- That gets replicated onto usenet right ? 16:21
*goes for a dig*
16:21 alexn_org left
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 :)
Nom- I've seen a few posts by him.. he just hasn't had time 16:23
16:23 alc left
TimToady maybe he can give you something to do, anyway 16:24
he's probably better at delegating than I am :)
Nom- Delegation is overrated. 16:25
I'll send a few messages and see what we come up with.
TimToady good luck; let us know if you want a commit bit to the pugs repo 16:26
which has all kinds of things in it in addition to pugs :)
Nom- :) 16:27
jnthn From CurGroup In DB.testgroups _ 16:28
Where (CurGroup.project_id = Master.GetProjectID() Or _
ooops!
sorry
(Yes, it's Visual Basic. :-|)
Nom- That's what I thought ... ugh ... i feel dirty 16:29
masak the secret sins of jnthn revealed.
Nom- At least use C# :D
jnthn Nom-: I actually downloaded a code translator and have already translated some of it.
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.
I wish they had...
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
jnthn keeps writing semicolons on the end of lines of code... 16:32
16:38 Tene_ joined, mikehh left 16:39 nihiliad joined 16:48 drbean joined 16:51 kate21de joined 16:52 Tene left 16:56 dominiko left 16:59 dominiko joined
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␤»
masak seems so.
masak rebuilds
17:04 shinobi-cl joined
Nom- heh 17:04
17:09 drbean_ left
masak rakudo: say 'OH HAI' 17:12
p6eval rakudo a0a390: OUTPUT«OH HAI␤»
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)␤»
Nom- Do any of the implementations support async {} and other thread ops ? 17:15
masak Pugs might, ISTR. 17:16
shinobi-cl pugs: my @digits=0..100; say [+] @digits; 17:17
p6eval pugs: OUTPUT«5050␤»
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␤»
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␤18␤19␤20␤1␤21␤22␤23␤24␤25␤26␤27␤28␤29␤30␤31␤32␤33␤34␤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␤25␤26␤27␤28␤47␤48␤49␤50␤51␤52␤53␤54␤55␤56␤57␤58␤59
17:19 rindolf joined
shinobi-cl pugs: my @digits=0..10; say [*] @digits; 17:20
p6eval pugs: OUTPUT«0␤»
shinobi-cl pugs: my @digits=1..10; say [*] @digits;
p6eval pugs: OUTPUT«3628800␤»
jnthn rakudo: my @digits=1..10; say [*] @digits;
p6eval rakudo a0a390: OUTPUT«3628800␤»
jnthn Win!
async in Rakudo - waiting for Parrot to do threads in a way that's actually usable by HLLs. 17:21
I did already try it as a quick hack to see how epicly Parrot failed it.
masak uuh, S16 is such a fertile ground for bikeshedding... and still we all want it to end well. 17:25
Nom- Fair enough :)
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␤»
shinobi-cl pugs: my @digits=0..10; say [<<+>>] @digits;
p6eval pugs: OUTPUT«*** ␤ Unexpected "@digits"␤ expecting operator, ":" or ","␤ at /tmp/jNqI1jJQgz line 1, column 31␤»
shinobi-cl pugs: my @digits=0..10; say [**] @digits;
p6eval pugs: OUTPUT«0␤»
shinobi-cl pugs: my @digits=1..10; say [**] @digits;
p6eval pugs: OUTPUT«1␤»
shinobi-cl rakudo: my @digits=1..10; say [**] @digits; 17:29
p6eval rakudo a0a390: OUTPUT«1␤»
diakopter jnthn: which CLR/.net do you get to use?
shinobi-cl rakudo: my @digits=1..10; say [++] @digits;
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)␤»
shinobi-cl rakudo: my @digits=1..10; say [^] @digits; 17:30
p6eval rakudo a0a390: OUTPUT«Junction<0xb5ff3078>␤»
masak shinobi-cl: do you have Rakudo installed locally? :)
diakopter jnthn: oh, I guess that's linq, so 3.0 at least
shinobi-cl nope, this is my gf's laptop 17:31
i have rakudo in my home... an older version though... cygwin is a little late on perl6 releases 17:33
rakudo: my @digits=1..10; say [?^] @digits; 17:35
p6eval rakudo a0a390: OUTPUT«1␤»
17:40 mberends joined
Nom- Pretty much everything is "behind" on perl6 releases... it's hard to stay bleeding edge 17:40
17:41 maerzhase joined
jnthn diakopter: 3.5 17:42
So yes, there's Linq
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.
the Novmeber project will start targeting Rakudo releases by the next Rakudo release.
jnthn wonders what that will do for bug discovery 17:44
I guess we get a new batch a month. ;-)
masak jnthn: either that, or continuously from the work we might do in branches.
it's only the master branch that has to target the latest release, I should add. 17:45
jnthn Aha, OK.
Sounds good - more sanity for November development, so time can be spent more on features than chasing Rakudo.
masak exactly. 17:46
perhaps not surprisingly, this decision was reached after the adventorous time in January. :)
Nom- has missed something, he thinks. 17:47
masak Nom-: you should be thankful you missed it. :P
Nom- "November development" ?
masak Nom-: oh! ah!
github.com/viklund/november/tree/master
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.
Nom- oh, i see 17:48
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"))␤»
shinobi-cl rakudo: given Bool { my $A = ::True; my $B = ::True; my $C = ::True; my $Status = [|] ($A, $B, $C); say $Status; }
p6eval rakudo a0a390: OUTPUT«Junction<0xb5f57980>␤»
shinobi-cl rakudo: given Bool { my $A = ::True; my $B = ::True; my $C = ::True; my $Status = [|] ($A, $B, $C); say ?$Status; }
p6eval rakudo a0a390: OUTPUT«1␤»
masak Nom-: in particular, see yapc.tv/2008/ye/lt/lt2-01-masak-vil...-november/ if you're interested.
17:49 kane__ left
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␤»
shinobi-cl rakudo: given Bool { my $A = ::True; my $B = ::True; my $C = ::False; my $Status = [&] ($A, $B, $C); say ?$Status; }
p6eval rakudo a0a390: OUTPUT«0␤»
shinobi-cl rakudo: given Bool { my $A = ::True; my $B = ::True; my $C = ::True; my $Status = [&] ($A, $B, $C); say ?$Status; }
p6eval rakudo a0a390: OUTPUT«1␤»
shinobi-cl cool 17:50
17:51 justatheory joined 17:52 japhb left 17:54 Southen_ joined 18:02 frew joined 18:03 masak left
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
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)␤»
frew rakudo: 1+1
p6eval rakudo a0a390: OUTPUT«Class 'Perl6MultiSub' not found␤current instr.: 'parrot;Perl6Role;!add_variant' pc 2691 (src/classes/Role.pir:42)␤»
frew fail.
pugs: (1,2,3,4).join(',') 18:06
p6eval pugs: RESULT«"1,2,3,4"»
frew pugs: (1,2,3,4).end
p6eval pugs: RESULT«3»
frew pugs: (1,2,3,4,5).end
p6eval pugs: RESULT«4»
TimToady The end is near!
frew I am pretty sure that didn't DWIM
TimToady what did you mean?
frew shouldn't end give me the last element in the array? 18:07
pugs: (1,2,3,3,5).end
p6eval pugs: RESULT«4»
frew oh
it's where the last one is
TimToady no, the index
frew interesting
ok
TimToady .[*-1] gives you the last element
frew ah, ok
then I'll add a test for it, since according to TASKS there isn't one
pugs: (1,2,3,3,5).shape
p6eval pugs: OUTPUT«*** No such method in class Array: "&shape"␤ at /tmp/yLKF3dP9OZ line 1, column 1 - line 2, column 1␤»
TimToady pugs ('a'..'z').[*-1]
pugs: ('a'..'z').[*-1] 18:08
p6eval pugs: RESULT«\"a"»
frew what is shape?
TimToady pugs: ('a'..'z').[-1]
p6eval pugs: RESULT«\"z"»
TimToady pugs is pre *-1
pugs doesn't know shape yet either
frew what about rakudo; why is the bot broken?
TimToady frew: dimensioned array
frew ah, cool
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:10 justatheory left
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
pugs: my @a; @a.end 18:15
p6eval pugs: RESULT«-1»
18:16 araujo left
frew I'll assume that's correct. 18:16
18:16 Southen left
frew Do I have to do a make realclean every time I build rakudo? 18:19
18:20 mikehh joined
jnthn frew: I haven't found this is needed. 18:20
frew hmm
jnthn But worth maybe doing a realclean of everything if you ain't built for a while. 18:21
Parrot needs one now and then.
shinobi-cl pugs: (1,2,3,3,5).last.say
p6eval pugs: OUTPUT«*** Cannot use this control structure outside a 'loop' structure␤ at /tmp/7xwvt8jkIs line 1, column 1 - line 2, column 1␤»
shinobi-cl pugs: (1,2,3,3,5).last.say
p6eval pugs: OUTPUT«*** Cannot use this control structure outside a 'loop' structure␤ at /tmp/PzhXnr99CK line 1, column 1 - line 2, column 1␤»
shinobi-cl pugs: (1,2,3,3,5).last;
p6eval pugs: OUTPUT«*** Cannot use this control structure outside a 'loop' structure␤ at /tmp/NeIJxnbfc4 line 1, column 1-17␤»
jnthn try .end
frew I'm getting a weird error when I try to build rakudo about Perl6MultiSub not found
jnthn frew: Try realclean etc.
shinobi-cl pugs: |(1,2,3,3,5).end;
p6eval pugs: RESULT«4»
frew k
jnthn That's what is upsetting evalbot too... 18:22
I didn't reproduce it yet, but then I only tried on Win32...
shinobi-cl pugs: (1,2,3,3,5).elems;
p6eval pugs: RESULT«5»
jnthn -> dinner 18:25
18:31 Psyche^ joined 18:33 jferrero joined
frew pugs: my @a = (); @a.end 18:39
p6eval pugs: RESULT«-1»
shinobi-cl pugs: my @a = 1,2,3; my @b = 3,4,5; say @a xx @b;
p6eval pugs: OUTPUT«123123123␤»
shinobi-cl pugs: my @a = 1,2,3; my @b = 3,4,5; say @a xx 4; 18:40
p6eval pugs: OUTPUT«123123123123␤»
shinobi-cl pugs: my @a = 1,2,3; my @b = 5,6,3; say @a xx @b;
p6eval pugs: OUTPUT«123123123␤»
shinobi-cl pugs: my @a = 1,2,3; my @b = 5,6,3,7; say @a xx @b;
p6eval pugs: OUTPUT«123123123123␤»
frew pugs: my $a; $a.end 18:41
p6eval pugs: RESULT«0»
frew should that work?
pugs: my $a=12; $a.end 18:42
p6eval pugs: RESULT«0»
shinobi-cl you declared a, so is one element with undefined content. In the previuos try you specified that a is empty
frew but they are scalars
in the spec it's only supposed to take an array 18:43
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
shinobi-cl the other thing is to remove .end from the scalar protoclass
frew that's what seems right to me 18:45
shinobi-cl me too
frew but what *is* supposed to work is this:
pugs: my $a = [<f b b>]; $a.end
p6eval pugs: RESULT«2»
frew which may be why it's there
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;
p6eval pugs: OUTPUT«1␤»
shinobi-cl pugs: my $a=[0,0]; say $a.elems;
p6eval pugs: OUTPUT«2␤»
shinobi-cl ahhh i see
frew although 1.elems is supposed to fail according to the test 18:47
18:47 Patterner left, Psyche^ is now known as Patterner
frew although it's currently skipped as it's basically unspec'd 18:47
shinobi-cl it considers $a as an array reference
frew right-o
18:47 dominiko left
shinobi-cl pugs: say 0.elems; 18:47
p6eval pugs: OUTPUT«1␤»
shinobi-cl pugs: say (1,2).elems; 18:48
p6eval pugs: OUTPUT«2␤»
shinobi-cl pugs: say [+] (1,2).elems;
p6eval pugs: OUTPUT«2␤»
frew pugs: my $a = []; $a.end
p6eval pugs: RESULT«-1»
shinobi-cl pugs: my $a=[1,2,3]; say [+] $a; 18:50
p6eval pugs: OUTPUT«1 2 3␤»
shinobi-cl pugs: my $a=[1,2,3]; say [+] $$a;
p6eval pugs: OUTPUT«6␤»
frew interesting 18:51
shinobi-cl pugs: my $a=([1,2,3],[4,5,6]); say [+] $$a;
p6eval pugs: OUTPUT«6␤»
shinobi-cl pugs: my $a=([1,2,3],[4,5,6]); say [+] $a;
p6eval pugs: OUTPUT«1 2 3 4 5 6␤»
shinobi-cl pugs: my $a=([1,2,3],[4,5,6]); say [+] $$$a;
p6eval pugs: OUTPUT«6␤»
shinobi-cl pugs: my $a=([1,2,3],[4,5,6]); say [+] $a[0]; 18:52
p6eval pugs: OUTPUT«1 2 3␤»
shinobi-cl pugs: my $a=([1,2,3],[4,5,6]); say [+] $$a[0];
p6eval pugs: OUTPUT«1 2 3␤»
shinobi-cl pugs: my $a=([1,2,3],[4,5,6]); say [+] @$a[0];
p6eval pugs: OUTPUT«1 2 3␤»
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␤»
shinobi-cl pugs: my $a=([1,2,3],4,5,6]); say [+] $a;
p6eval pugs: OUTPUT«*** ␤ Unexpected "$a"␤ expecting "=", "_", fraction, exponent, term postfix, operator, ")", context, ":" or "("␤ at /tmp/0Ni0YYbKkN line 1, column 4␤»
shinobi-cl pugs: my $a=([1,2,3],4,5,6); say [+] $a;
p6eval pugs: OUTPUT«1 2 3 4 5 6␤»
shinobi-cl pugs: my $a=([1,2,3],4,5,6); say [+] $$a;
p6eval pugs: OUTPUT«18␤»
shinobi-cl thats [3]+4+5+6 18:55
my @list=1,2,3; my $x = @list; say $x;
pugs: my @list=1,2,3; my $x = @list; say $x; 18:56
p6eval pugs: OUTPUT«1 2 3␤»
shinobi-cl pugs: my @list=1,2,3; my $x = @list; say $$x;
p6eval pugs: OUTPUT«123␤»
frew pugs: $a = <a b c>;
p6eval pugs: OUTPUT«*** ␤ Unexpected " ="␤ expecting "::"␤ Variable "$a" requires predeclaration or explicit package name␤ at /tmp/blLTbU1Y6X line 1, column 3␤»
frew pugs: my $a = <a b c>;
p6eval pugs: RESULT«\\("a", "b", "c")»
frew that's magical
shinobi-cl pugs: my $a = <a b c>; say $a; 18:57
p6eval pugs: OUTPUT«a b c␤»
shinobi-cl pugs: my $a = <a b c>; say $$a;
p6eval pugs: OUTPUT«abc␤»
18:59 cognominal joined
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␤»
shinobi-cl pugs: my $a=([1,2,3],[5,6]); say [+] $a;
p6eval pugs: OUTPUT«1 2 3 5 6␤»
frew pugs: end(1,2,3,4,5)
p6eval pugs: OUTPUT«*** No compatible multi variant found: "&end"␤ at /tmp/QWHJc1iPYL line 1, column 1 - line 2, column 1␤»
shinobi-cl pugs: my $a=([1,2,3],[5,6]); say [+] $$a;
p6eval pugs: OUTPUT«5␤»
19:02 Whiteknight left 19:03 maerzhase left
shinobi-cl pugs: my @a=([1,2,3],[5,6]); say [+] @a; 19:03
p6eval pugs: OUTPUT«5␤»
shinobi-cl my @a = [1,2,3,4]; my $x = @a; say $x; 19:04
pugs: my @a = [1,2,3,4]; my $x = @a; say $x;
p6eval pugs: OUTPUT«1 2 3 4␤»
19:04 pmurias left, Whiteknight joined
frew pugs: elems (1,2,3,4,5) 19:05
p6eval pugs: RESULT«5»
shinobi-cl weird... when using [+] it return the lenght in scalar context
but when assigning the array to a scalar gives another thing
frew that is very strange indeed
shinobi-cl a reference... which is supposed to be that way. mAYBE is beacuse + coerces to a number 19:06
pugs: my @a = [1,2,3,4]; my $x = @a; say +$x;
p6eval pugs: OUTPUT«1␤»
shinobi-cl pugs: my @a = [1,2,3,4]; my $x = +@a; say $x;
p6eval pugs: OUTPUT«1␤»
frew pugs: elems((1,2,3,4,5)) 19:08
p6eval pugs: RESULT«5»
shinobi-cl pugs: my @a=([1,2,3],[5,6]); say [+] @a; say @a[0]; say @a[1]; say +@a[0]; say +@a[1];
p6eval pugs: OUTPUT«5␤1 2 3␤5 6␤3␤2␤»
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␤»
shinobi-cl pugs: my @a=([1,2,3],[5,6]); say [+] @$a; say @a[0]; say @a[1]; say +@a[0]; say +@a[1];
p6eval pugs: OUTPUT«*** ␤ Unexpected "$a"␤ expecting "@" or "::"␤ at /tmp/8Q4TqPGib8 line 1, column 33␤»
shinobi-cl pugs: my @a=([1,2,3],[5,6]); say [+] $$a; say @a[0]; say @a[1]; say +@a[0]; say +@a[1];
p6eval pugs: OUTPUT«*** ␤ Unexpected "$a"␤ expecting "::"␤ at /tmp/jxGj5rVND1 line 1, column 33␤»
TimToady my @a = [1,2,3] only puts 1 element into @a 19:10
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:
pugs: my $a=([1,2,3],4,5,6); say [+] $a; 19:13
p6eval pugs: OUTPUT«1 2 3 4 5 6␤»
shinobi-cl pugs: my @a=([1,2,3],4,5,6); say [+] @a;
p6eval pugs: OUTPUT«18␤»
TimToady frew: um, it was the other way in Perl 5. why do you think I changed it? 19:15
frew I dunno, I just thought that this was surprising when I first saw it 19:16
but I have designed or implemented exactly 0 languages
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
TimToady if you really want a little visual separation you can always say foo.(1,2,3) 19:18
frew of course
or just not use an anonymous array
TimToady but p6 get a lot of its power and extensibility from being consistent about postfixes
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
even if foo is otherwise a keyword 19:20
std: if()
p6eval std 25330: OUTPUT«Undeclared routine:␤ if used at 1 ␤ok 00:02 33m␤»
19:20 fjord41 joined
frew so I can make a function called if() 19:20
and that won't collide with if expr ?
TimToady yes, to define your interface, for instance :)
if expr requires whitespace
frew oh
cool
TimToady because the expr is not a postfix
people have got into all sorts of bad habits based on C syntax 19:21
frew I don't know what you mean
TimToady we have to break a few of those bad habits in order to make Perl relevant 20 years from now
frew haha, awesome 19:22
shinobi-cl i dont quite understand this......
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;
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␤»
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
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;
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␤»
TimToady you're still trying to interpolate $a in a list context 19:25
use @$a
shinobi-cl ahh i see
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;
p6eval pugs: OUTPUT«18␤18␤4␤4␤x=1 2 3 4 5 6␤y=1 2 3 4 5 6␤»
shinobi-cl hehe, thanks... once again
TimToady |$a should work too
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␤»
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;
p6eval pugs: OUTPUT«21␤18␤4␤4␤x=1 2 3 4 5 6␤y=1 2 3 4 5 6␤»
shinobi-cl it flats the list completely
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;
p6eval pugs: OUTPUT«18␤18␤4␤4␤x=1 2 3 4 5 6␤y=1 2 3 4 5 6␤»
frew TimToady: which is right, foo(:array(1,2,3,4)) or foo(:array((1,2,3,4))) ?
TimToady it should flatten nested Captures but not nested Arrays
frew: I'm missing the context 19:28
frew sorry
a test
elems(1,2,3,4) is wrong, elems (1,2,3,4) is right 19:29
what about with named args?
elems(:array(1,2,3,4))?
or do I need more parens?
TimToady the parens on an adverb are not arguments to anything, they're just a list
so you don't need extra parens unless something binds that list to a scalar later 19:30
in list context, parens are a no-op
frew ok
TimToady (same as in p5, btw)
frew so they aren't necesary unless they have to clarify for parsing
TimToady yes, that's what parens are for :) 19:31
when binding to scalar context, then grouping becomes important again
frew k
TimToady pugs: say infix:<+>(('a','b','c'), ('x','y','z')) 19:32
p6eval pugs: OUTPUT«6␤»
TimToady pugs: say infix:<+>('a','b','c', 'x','y','z')
p6eval pugs: OUTPUT«*** No compatible multi variant found: "&infix:+"␤ at /tmp/QvJX6DxFlT line 1, column 5 - line 2, column 1␤»
TimToady however 19:33
pugs: say('a','b','c', 'x','y','z')
p6eval pugs: OUTPUT«abcxyz␤»
19:33 DemoFreak left
TimToady pugs: say(('a','b','c'),( 'x','y','z')) 19:33
p6eval pugs: OUTPUT«abcxyz␤»
TimToady pugs: say(('a','b','c'),(((((((('x','y','z'))))))))) 19:34
p6eval pugs: OUTPUT«abcxyz␤»
TimToady no difference in list context
frew TimToady: are hyperops threaded? 19:35
pugs_svn r25331 | lwall++ | [STD] catch do...while p5ism 19:37
r25331 | lwall++ | don't report runaway string unless it crosses newline
TimToady they're concurrent, however the implementation chooses to do it 19:38
on a Cray you'd use vector processing
frew well, you would :-)
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;
TimToady the design of parallelism in p6 is to specify where you want it without specifying exactly how or how much
shinobi-cl std: my @a = 1,2,3; my @b = 5,6,3,7; say @a <<xx>> @b;
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
when you use a feed operator it's more like threading
shinobi-cl pugs: my @a = 1,2,3; my @b = 5,6,3,7; say @a <<xx>> @b;
p6eval pugs: OUTPUT«*** ␤ Unexpected "<<xx"␤ expecting operator, ":" or ","␤ at /tmp/SU4RAWCUbQ line 1, column 40␤»
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␤»
shinobi-cl rakudo: my @a = 1,2,3; my @b = 5,6,3,7; say @a <<x>> @b;
p6eval rakudo a0a390: OUTPUT«111112222223333333333␤»
frew is that what a feed operator is?
TimToady pugs doesn't know the <<>> form, I think
foo() ==> bar(), like a unix pipe
only with objects
19:42 mberends left
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)␤»
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␤»
shinobi-cl rakudo: my @a = 1,2,3; my @b = 5,6,3,7; say |@a <<x>> |@b;
p6eval rakudo a0a390: OUTPUT«too many arguments passed (4) - 2 params expected␤current instr.: 'infix:»x«' pc 167177 (src/gen_metaop.pir:641)␤»
pugs_svn r25332 | frew++ | [t] added tests for Array.end 19:45
frew pugs: my Complex $a = (1,2); 19:47
p6eval pugs: RESULT«\\(1, 2)» 19:48
frew pugs: cis(0) 19:49
p6eval pugs: OUTPUT«*** No such subroutine: "&cis"␤ at /tmp/b8wBjwLQwN line 1, column 1 - line 2, column 1␤»
frew rakudo: cis(0)
p6eval rakudo a0a390: RESULT«1+0i»
frew rakudo: cis(0).polar 19:50
p6eval rakudo a0a390: RESULT«[1, 0]»
frew rakudo: cis(3.1415).polar
p6eval rakudo a0a390: RESULT«[1, 3.1415]»
frew rakudo: cis(2*3.1415).polar
p6eval rakudo a0a390: RESULT«[1, -0.000185307179586115]» 19:51
frew rakudo: cis(-3.1415).polar
p6eval rakudo a0a390: RESULT«[1, -3.1415]»
frew rakudo: my $a = 3.1415; cis($a); cis($a).polar 19:52
p6eval rakudo a0a390: RESULT«[1, 3.1415]»
frew rakudo: my $a = 3.1415; cis($a).say; cis($a).polar.say
p6eval rakudo a0a390: OUTPUT«-1+9.26536e-05i␤13.1415␤»
frew rakudo: my $a = 1; cis($a).say; cis($a).polar.say
p6eval rakudo a0a390: OUTPUT«0.540302+0.841471i␤11␤»
frew my calculator doesn't have batteries...what a drag! 19:55
jnthn Hopefully rakudo is giving the right answers, then! ;-)
frew haha, that's what I'm trying to figure out
is cis() the only way to make a complex number? 19:56
jnthn my $c = 5 + 2i; # I think also does it 19:57
frew indeed it does
thanks
shinobi-cl pugs: my Complex $value = sqrt (-1);
p6eval pugs: RESULT«\NaN»
shinobi-cl pugs: my Complex $value = sqrt (1); 19:58
p6eval pugs: RESULT«\1.0»
jnthn I'm not sure that pugs uses/enforces type constraints.
pugs: my Complex $x = "OH HAI";
shinobi-cl rakudo: my Complex $value = sqrt (-1);
p6eval pugs: RESULT«\"OH HAI"»
rakudo a0a390: OUTPUT«Type mismatch in assignment.␤current instr.: 'die' pc 17013 (src/builtins/control.pir:204)␤»
frew haha
awesome
jnthn I'm not sure that Rakudo enforces them correct though. ;-)
Complex probably should accept Num, the way that Num accepts Int.
Whether sqrt(-1) will automatically return a complex, I forget the answer to. 19:59
There was probably a 10,000 message thread on p6l about it at some point though. ;-)
shinobi-cl pugs: my $pair = (thing => 0); say $pair;
p6eval pugs: OUTPUT«thing 0␤»
shinobi-cl pugs: my $pair = (thing => 0); $pair = sqrt (-1); say $pair; 20:00
p6eval pugs: OUTPUT«NaN␤»
shinobi-cl rakudo: my $pair = (thing => 0); $pair = sqrt (-1); say $pair;
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␤»
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
shinobi-cl pugs 20:02
frew decides that he needs batteries 20:03
shinobi-cl pugs: say "true" if sin(3) isa Num;
p6eval pugs: OUTPUT«*** ␤ Unexpected "isa"␤ expecting operator␤ at /tmp/lcFPPyOKya line 1, column 22␤»
shinobi-cl pugs: say "true" if sin(3).^isa(Num);
p6eval pugs: OUTPUT«*** No such method in class Num: "&ITEM"␤ at /tmp/J60dreph7k line 1, column 15-31␤»
shinobi-cl pugs: say "true" if sin(3).isa(Num);
p6eval pugs: OUTPUT«true␤»
shinobi-cl pugs: say sqrt(-1).WHAT; 20:04
p6eval pugs: OUTPUT«Num␤»
shinobi-cl pugs: say sqrt(-1).sqrt;
p6eval pugs: OUTPUT«NaN␤»
shinobi-cl pugs: say sqrt(81).sqrt;
p6eval pugs: OUTPUT«3␤»
shinobi-cl pugs; my @list = sqrt(1)..sqrt(9); say @list; 20:05
pugs: my @list = sqrt(1)..sqrt(9); say @list; 20:06
p6eval pugs: OUTPUT«123␤»
shinobi-cl pugs: my @list = sqrt(1)..sqrt(9); say @list.elems;
p6eval pugs: OUTPUT«3␤»
20:06 araujo joined
shinobi-cl pugs: my @list = sqrt(1)..sqrt(100); say @list.elems; 20:06
p6eval pugs: OUTPUT«10␤»
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)␤»
shinobi-cl pugs: my @list = sqrt(-1)..sqrt(100); my $junc = all(@list); say $junc;
p6eval pugs: OUTPUT«all()␤»
shinobi-cl pugs: my @list = sqrt(-1)..sqrt(100); say @list.elems;
p6eval pugs: OUTPUT«0␤»
shinobi-cl pugs: my @list = sqrt(0)..sqrt(100); say @list.elems; 20:09
p6eval pugs: OUTPUT«11␤»
shinobi-cl pugs: my @list = sqrt(-1)..sqrt(100); my $junc = all(@list); say $junc.WHAT; 20:10
p6eval pugs: OUTPUT«Junction␤»
shinobi-cl pugs: my @list = sqrt(1),sqrt(2)..sqrt(100); say @list.elems; 20:12
p6eval pugs: OUTPUT«11␤»
20:12 Whiteknight is now known as wknight8111
shinobi-cl pugs: my @list = sqrt(1),sqrt(2)..sqrt(100); say @list; 20:12
p6eval pugs: OUTPUT«11.41421356237309512.4142135623730953.4142135623730954.4142135623730955.4142135623730956.4142135623730957.4142135623730958.4142135623730969.41421356237309610.414213562373096␤»
shinobi-cl pugs: my @list = sqrt(1),sqrt(2)..sqrt(100); say $_.$/ for @list; 20:13
p6eval pugs: OUTPUT«␤␤␤␤␤␤␤␤␤␤␤»
shinobi-cl pugs: my @list = sqrt(1),sqrt(2)..sqrt(100); say $val.$/ for @list -> $val ;
p6eval pugs: OUTPUT«*** ␤ Unexpected ".$/"␤ expecting "::"␤ Variable "$val" requires predeclaration or explicit package name␤ at /tmp/vZZ7axSu67 line 1, column 48␤»
shinobi-cl pugs: my @list = sqrt(1),sqrt(2)..sqrt(100); for @list -> $val {say $val.$/;};
p6eval pugs: OUTPUT«␤␤␤␤␤␤␤␤␤␤␤»
20:13 mberends joined
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.414213562373095␤6.414213562373095␤7.414213562373095␤8.414213562373096␤9.414213562373096␤10.414213562373096␤»
20:15 mikehh left
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␤»
mberends shinobi-cl: see what you just did, it is not what you meant.
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
mberends pugs: my @list = map( {sqrt $_}, 1..100 ); say @list 20:27
p6eval pugs: OUTPUT«11.41421356237309511.732050807568877222.236067977499792.4494897427831782.64575131106459072.828427124746190333.16227766016837953.31662479035543.46410161513775443.6055512754639893.74165738677394133.87298334620741744.1231056256176614.2426406871192854.3588989435406744.472135954999584...
mberends pugs: my @list = map( {sqrt $_}, 1..100 ); say @list.join",";
p6eval pugs: OUTPUT«*** ␤ Unexpected "\",\";"␤ expecting term postfix, operator, ":" or ","␤ at /tmp/rgCl9DjLab line 1, column 52␤»
mberends pugs: my @list = map( {sqrt $_}, 1..100 ); say @list.join(",");
p6eval pugs: OUTPUT«1,1.4142135623730951,1.7320508075688772,2,2.23606797749979,2.449489742783178,2.6457513110645907,2.8284271247461903,3,3.1622776601683795,3.3166247903554,3.4641016151377544,3.605551275463989,3.7416573867739413,3.872983346207417,4,4.123105625617661,4.242640687119285,4.35889894354067...
20:36 gravity joined 20:37 cognominal left 20:39 cognominal joined
mberends whee! HTTP::Daemon has a beautiful favicon: autoexec.demon.nl:8888/ 20:44
# for some value of beautiful ;) 20:46
frew So either the .polar method is smarter than me or it's wrong 20:55
I think it's smarter
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 21:12 c9s_mv left
frew pugs: (0+1i) 21:16
p6eval pugs: RESULT«0.0 + 1.0i»
frew pugs: (0+1i).polar
p6eval pugs: OUTPUT«*** No such method in class Complex: "&polar"␤ at /tmp/WVf5Qmh58g line 1, column 1 - line 2, column 1␤»
frew rakudo: (0+1i).polar
p6eval rakudo a0a390: OUTPUT«Class 'Perl6MultiSub' not found␤current instr.: 'parrot;Perl6Role;!add_variant' pc 2691 (src/classes/Role.pir:42)␤»
frew rakudo: (0+1i)
p6eval rakudo a0a390: RESULT«0+1i»
frew rakudo: (0+1i).polar
p6eval rakudo a0a390: RESULT«[1, 1.5707963267949]»
frew rakudo: (0+-1i).polar 21:17
p6eval rakudo a0a390: RESULT«[1, -1.5707963267949]»
frew rakudo: (0-1i).polar
p6eval rakudo a0a390: RESULT«[1, -1.5707963267949]»
frew rakudo: (1).polar
p6eval rakudo a0a390: RESULT«[1, 0]»
frew rakudo: (1 + 0i).polar
p6eval rakudo a0a390: RESULT«[1, 0]»
frew rakudo: (1 + 0.0000001i).polar
p6eval rakudo a0a390: RESULT«[1, 9.99999999999997e-08]»
frew 3.14156/2 21:18
rakudo: 3.14156/2
p6eval rakudo a0a390: RESULT«1.57078»
jnthn mberends: How are you doing network I/O?
oh, with netcat...
jnthn hopes for Parrot's socket stuff to work again soon, and S16 to become solider. 21:19
frew rakudo: (-1).polar 21:20
p6eval rakudo a0a390: RESULT«[-1, 0]»
frew hmm
should a magnitude ever be negative? 21:21
frew doesn't think so
rakudo: (-1-1i).polar
p6eval rakudo a0a390: RESULT«[1.4142135623731, -2.35619449019234]» 21:22
frew rakudo: (-1-0i).polar
p6eval rakudo a0a390: RESULT«[1, 3.14159265358979]»
frew ah
better
21:23 |jedai| joined, kane__ left
frew is there a way I can get these pretty results on my local perl6? 21:24
in terms of output that is
jnthn frew: In Rakudo? 21:25
frew yeah
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
Just run perl6 without a script path.
Oh
Maybe call .perl on the thingy too to get it exactly like in here.
frew thanks
jnthn rakudo: (-1.0i).polar.perl.say
frew that's great
p6eval rakudo a0a390: OUTPUT«[1, -1.5707963267949]␤» 21:27
jnthn rakudo: class Object is also { method ps { self.perl.say } }; (-1.0i).polar.ps
p6eval rakudo a0a390: OUTPUT«[1, -1.5707963267949]␤»
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
jnthn afk for a bit
frew what would be best would be if .say called .perl on it's contents
21:32 cognominal left
frew Anyone in here know how to get a function that can take an array or a string or anything? 21:35
Matt-W as in, a function that can take any type? 21:37
frew yessir
Matt-W Just leave off the type annotation, I think 21:38
frew but I have to put a sigil right?
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
I may, however, be wrong about that 21:39
frew no that's true
Matt-W rakudo: sub foo($t) { say $t.WHAT; } my @a; foo(@a);
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)␤»
Matt-W pah
rakudo: sub foo($t) { say $t.WHAT; }; my @a; foo(@a);
p6eval rakudo a0a390: OUTPUT«Array␤»
frew huh 21:40
Matt-W ahah, I was right
frew rakudo: sub s($foo) { $foo.perl.say }; s([1,2,3]); s (1,2,3);
p6eval rakudo a0a390: OUTPUT«[1, 2, 3]␤[1, 2, 3]␤»
frew see, I'd like arrays and arrayrefs to be distinguishable
Matt-W there's probably an array 21:41
err
a way
frew haha, an arrayerway
yeah
it's not a big deal at this point
it could def be done with a Multi sub
but that seems kludgy to me
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:
rakudo: my @a = <a b c>; @a.perl.say 21:43
p6eval rakudo a0a390: OUTPUT«["a", "b", "c"]␤»
frew rakudo: my $a = [a b c]; $a.perl.say
p6eval rakudo a0a390: OUTPUT«Could not find non-existent sub c␤current instr.: '_block14' pc 56 (EVAL_17:40)␤»
frew uhh
rakudo: my $a = [a b c]; $a.perl.say
p6eval rakudo a0a390: OUTPUT«Could not find non-existent sub c␤current instr.: '_block14' pc 56 (EVAL_17:40)␤»
Matt-W I think you want <> not [] 21:44
frew rakudo: my $a = [1,2,3]; $a.perl.say
p6eval rakudo a0a390: OUTPUT«[1, 2, 3]␤»
frew there we go
Matt-W or that
frew see, you can't tell the difference of an array and an arrayref with .perl
rakudo: (1,2,3).perl.say
p6eval rakudo a0a390: OUTPUT«[1, 2, 3]␤»
Matt-W rakudo: my @a = [1, 2, 3]; say @a; 21:45
p6eval rakudo a0a390: OUTPUT«1 2 3␤»
Matt-W it's not really particularly relevant in terms of what .perl does
frew yeah
Matt-W because you can take its output, feed it back into an array or arrayref and it'll work
frew but I am just thinking that it would be nice for REPL to call .perl on everything
oh I see what you mean
I am just thinking basically for a users POV 21:46
Matt-W It's entirely possible, actually, that there is no distinction between an array and an arrayref 21:48
21:48 |MoC| is now known as M_o_C 21:49 nihiliad left
frew that would be weird... 21:57
rakudo: (1,2,3)
p6eval rakudo a0a390: RESULT«[1, 2, 3]»
frew rakudo: @a = (1,2,3); @a[0]
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)␤»
frew rakudo: my @a = (1,2,3); @a[0]
p6eval rakudo a0a390: RESULT«1»
frew rakudo: my @a = [1,2,3]; @a[0]
p6eval rakudo a0a390: RESULT«[1, 2, 3]»
frew rakudo: my $a = [1,2,3]; $a[0] 21:58
p6eval rakudo a0a390: RESULT«1»
frew maybe there isn't a distinction
Matt-W Well I think generally, everything that's not a value type is a reference
just poking through S02
frew interesting 21:59
Matt-W all @ means is that the object at the other end does Positional
and % requires that the object at the other end does Associative
it's syntactic sugar
frew but if I do foo(@huge_array) it's not a huge deal
Matt-W from a certain point of view
no I think that's passed by reference
frew that's excellent
Matt-W S02 talks about how value types are distinct from other types
21:59 japhb joined
Matt-W and Array is specifically mentioned as not being a value type 22:00
frew I need to read more than just S29...
Matt-W it is worth it
although there's a lot to digest
I need to re-read the whole lot again at some point
frew well, I've had my nose in testing functions, because that's pretty easy
at some point I'll learn the deeper stuff
I'm not in a huge rush at this point
Matt-W also, on the question of .perl 22:01
S02 states that .perl assumes that the output will be used to regenerate the original object in item context
so it always doing [] around lists is most definitely correct
frew that's fine
especially with my new knowledge of references in perl6
Matt-W just... don't kill me if I turn out to be slightly wrong :) 22:02
frew I wouldn't
like I said, it's not a huge deal at this point
I am just trying to make my local perl6 be nicer to me
Matt-W but the wohle references thing is definitely different in perl 6
I have to go now
frew alright, station 22:03
Matt-W thanks for asking a question I knew the answer to :)
frew thanks for your help
haha
any time
Matt-W &
22:03 tjc001 joined 22:08 rindolf left 22:11 meppl left
frew if I add an entirely new test is there something I need to do to add it to make spectest? 22:15
s1n frew: to add to the spectest, you need to commit to rakudo or submit a patch (from your fork) 22:17
frew ok 22:18
I guess I'll have to do that at some point then
I'm surprised it's not kept with pugs
22:19 iblechbot left, tjc001 left
s1n do you mean a part of rakudo's spectest or just the test suite in general? 22:20
frew the perl6 test suite
s1n i.e. just a new .t file?
frew yeah
I added the file
s1n oh, yeah, for now just submit that to the pugs repo
frew I just want to know if it will get run when people call make spectest
s1n no
rakudo uses a file called t/spectest.dat, that's in rakudo's git repo 22:21
frew ah
and it generates a makefile or something from that?
s1n no, it runs the psuedo Test.pm with that as the test files to run 22:22
22:22 kane__ joined
frew ah 22:22
s1n it's a harness/Test.pm thing
frew how come variables don't stick around in the interactive version of rakudo? 22:23
s1n because it's not interactive
frew oh 22:24
s1n i mean, yes, it looks like it on the surface, but it's not really REPL
frew right
22:32 ejs joined 22:47 meppl joined
pugs_svn r25334 | lwall++ | [S02] allow *.foo to mean -> $obj { $obj.foo } 22:56
23:03 eternaleye joined
frew pugs: [1,2,3].perl 23:10
p6eval pugs: RESULT«"\\(1, 2, 3)"»
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 \...
frew rakudo: { 1+2+3}.perl
p6eval rakudo a0a390: OUTPUT«Class 'Perl6MultiSub' not found␤current instr.: 'parrot;Perl6Role;!add_variant' pc 2691 (src/classes/Role.pir:42)␤»
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)␤»
frew that would be really cool if it worked...
parrot: 2.5.floor 23:13
oops
pugs: 2.5.floor
p6eval pugs: RESULT«2»
frew rakudo: 2.5.floor
p6eval rakudo a0a390: OUTPUT«Class 'Perl6MultiSub' not found␤current instr.: 'parrot;Perl6Role;!add_variant' pc 2691 (src/classes/Role.pir:42)␤»
frew pugs: rand.5.floor
p6eval pugs: RESULT«0.7483425792884879»
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)␤»
frew pugs: 5.rand.floor
p6eval pugs: RESULT«3»
frew pugs: 5.rand.floor
p6eval pugs: RESULT«3»
frew pugs: 5.rand.floor
p6eval pugs: RESULT«4»
23:16 mberends left
bacek Hi there 23:16
Should filpflop operator check flip again after flop?
Or it's onetime check?
23:23 icwiener left 23:26 ejs left
jnthn bacek: I think it flip-flops back and forth. 23:27
bacek jnthn: thanks.
jnthn bacek: Though something like foo() ff * will never flop once flipped...
(because of the whatever matching anything)
bacek jnthn: foo() ff 0 have same result, AFAIU 23:28
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
I didn't think of a good way to implement ff yet...
frew pugs: 1 ff 2
p6eval pugs: OUTPUT«*** No such subroutine: "&infix:ff"␤ at /tmp/ub4wzzmzFB line 1, column 1 - line 2, column 1␤»
jnthn I'm not sure I thought of a bad way yet either... ;-) 23:32
bacek jnthn: I'm implementing ff ATM :)
jnthn bacek: Nice! 23:34
Will be interested to see what you come up with.
Esepecially, how you plan on storing the flip-flop state. 23:35
bacek src/classes/Flipflop.pir 23:36
Same way as Range
Or it is bad idea?
23:37 kane__ left
bacek It is... 23:38
What expected result for "for (1..5) -> { $_ if 1 ^ff 0 }" ? 23:46
2..5? 23:47
23:47 hanekomu joined