Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2009-01-31

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:11 Khisanth joined #perl6
00:12 alester joined #perl6
00:25 pcbuetow joined #perl6
00:28 |jedai| joined #perl6
01:01 kanru joined #perl6
01:03 kid51 joined #perl6
01:08 shinobi-cl_ joined #perl6
01:16 FurnaceBoy joined #perl6
01:28 [particle] joined #perl6
01:30 FurnaceBoy joined #perl6
01:38 Tene joined #perl6
01:46 aindilis joined #perl6
02:14 shinobi-cl_ hi
02:14 shinobi-cl_ for classes, how should i call the constructor?
02:15 shinobi-cl_ i've read somewhere that is BUILD... but it does not seem to work
02:18 shinobi-cl_ method BUILD { say "aaaa" };
02:18 aindilis` joined #perl6
02:40 alester joined #perl6
03:02 aindilis joined #perl6
03:08 aindilis` joined #perl6
03:18 km2 joined #perl6
03:53 xinming joined #perl6
03:57 meppuru joined #perl6
03:59 Minthe joined #perl6
04:13 justatheory joined #perl6
04:16 s1n rakudo: (1,2,3) ~~ (1,*,*,3)
04:16 p6eval rakudo 36183: RESULT«Bool::False»
04:16 s1n rakudo: (1,2,3) ~~ (*,*,3)
04:17 p6eval rakudo 36183: RESULT«Bool::False»
04:17 s1n rakudo: (1,2) ~~ (1,*)
04:17 p6eval rakudo 36183: RESULT«Bool::True»
04:19 Tene rakudo: (1,2,3) ~~ (*,3)
04:19 p6eval rakudo 36183: RESULT«Bool::True»
04:21 s1n Tene: am i right in thinking the first one i did is working?
04:22 s1n Tene: a 3 element list compared against a 4 element list?
04:22 s1n std: if 5 > my $a = 4 { say $a }
04:22 p6eval std 25127: OUTPUT«00:02 33m␤»
04:22 Tene s1n: I have no idea what the spec says about matching against lists with whatevers.
04:22 s1n TimToady: any ideas?
04:29 TimToady read the spec?  :P
04:30 s1n TimToady: i have the hardest time finding anything in the spec
04:32 s1n TimToady: what about S02:795? that looks like the elements have to match up (lvalue undef)
04:33 TimToady S03:3227
04:33 TimToady or thereabouts
04:33 TimToady sorry, bad connection with huge lag times...
04:33 TimToady and have to go catch a ferry
04:33 s1n TimToady: i'm not sure how to read that
04:34 TimToady back in a couple hours &
04:43 TheOrz joined #perl6
04:44 shinobi-cl_ left #perl6
04:47 justatheory_ joined #perl6
04:59 shinobi-cl_ joined #perl6
05:00 shinobi-cl_ hi
05:04 shinobi-cl_ perl6: my $Thing_ITEM       = 1 is constant;
05:04 p6eval rakudo 36184: OUTPUT«Statement not terminated properly at line 1, near "is constan"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
05:04 p6eval ..elf 25127: OUTPUT«Undefined subroutine &GLOBAL::constant called at (eval 121) line 3.␤ at ./elf_h line 4333␤»
05:04 p6eval ..pugs: OUTPUT«*** ␤    Unexpected "is"␤    expecting operator␤    at /tmp/RcA8iW3tUR line 1, column 26␤»
05:04 shinobi-cl_ perl6: our $Thing_ITEM  = 1 is constant;
05:04 p6eval rakudo 36184: OUTPUT«Statement not terminated properly at line 1, near "is constan"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
05:04 p6eval ..elf 25127: OUTPUT«Undefined subroutine &GLOBAL::constant called at (eval 121) line 3.␤ at ./elf_h line 4333␤»
05:04 p6eval ..pugs: OUTPUT«*** ␤    Unexpected "is"␤    expecting operator␤    at /tmp/omRVtLKHg7 line 1, column 22␤»
05:05 shinobi-cl_ pugs: our $Thing_ITEM  = 1 is constant;
05:05 p6eval pugs: OUTPUT«*** ␤    Unexpected "is"␤    expecting operator␤    at /tmp/F98PfegK8c line 1, column 22␤»
05:05 shinobi-cl_ rakudo: our $Thing_ITEM  = 1 is constant;
05:05 p6eval rakudo 36184: OUTPUT«Statement not terminated properly at line 1, near "is constan"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
05:07 shinobi-cl_ perl6: class TestA { method BUILD { say "A" } }; my TestA $variable = .new;
05:07 p6eval rakudo 36184: RESULT«undef»
05:07 p6eval ..pugs: RESULT«\Scalar.new(()»
05:07 p6eval ..elf 25127: OUTPUT«Use of uninitialized value in concatenation (.) or string at ./elf_h line 3837.␤syntax error at (eval 123) line 8, near "= ->new"␤ at ./elf_h line 4333␤»
05:07 shinobi-cl_ perl6: class TestA { method BUILD { say "A" } }; my TestA $variable .= new;
05:07 p6eval rakudo 36184: OUTPUT«too many arguments passed (3) - 1 params expected␤current instr.: 'parrot;TestA;BUILD' pc 133 (EVAL_19:66)␤»
05:07 p6eval ..elf 25127: RESULT«undef␤»
05:07 p6eval ..pugs: OUTPUT«A␤»
05:07 shinobi-cl_ perl6: class TestA { submethod BUILD { say "A" } }; my TestA $variable .= new;
05:08 p6eval rakudo 36184: OUTPUT«too many arguments passed (3) - 1 params expected␤current instr.: 'parrot;TestA;BUILD' pc 133 (EVAL_19:66)␤»
05:08 p6eval ..elf 25127: RESULT«undef␤»
05:08 p6eval ..pugs: OUTPUT«A␤»
05:08 s1n anyone know how to find RT tickets you've commented on? fulltext seems to be bailing on me
05:08 shinobi-cl_ perl6: class TestA { submethod BUILD { say "A" } }; my $variable = TestA.new;
05:08 p6eval rakudo 36184: OUTPUT«too many arguments passed (3) - 1 params expected␤current instr.: 'parrot;TestA;BUILD' pc 136 (EVAL_19:64)␤»
05:08 p6eval ..pugs: OUTPUT«A␤»
05:08 p6eval ..elf 25127: RESULT«TestA.new(!!!)␤»
05:10 shinobi-cl_ how the hell i define a constant!
05:10 shinobi-cl_ perl6: use constant A => 3; print A;
05:10 p6eval rakudo 36184: OUTPUT«Can't find ./constant in @INC␤current instr.: 'die' pc 16844 (src/builtins/control.pir:204)␤»
05:10 p6eval ..pugs: OUTPUT«pugs: *** Unsafe function 'use' called under safe mode␤    at /tmp/4IfUgp5ctF line 1, column 1␤»
05:10 p6eval ..elf 25127: OUTPUT«Cant locate constant in ( . ).␤»
05:11 shinobi-cl_ perl6: my $A is constant = 3; print $A;
05:11 p6eval elf 25127, pugs, rakudo 36184: OUTPUT«3»
05:11 shinobi-cl_ :D
05:11 s1n rakudo: my Int constant $foo = 3
05:11 p6eval rakudo 36184: OUTPUT«Statement not terminated properly at line 1, near "constant $"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
05:12 s1n rakudo: constant $foo = 1
05:12 p6eval rakudo 36184: RESULT«1»
05:12 s1n wee
05:12 s1n rakudo: constant @foo 1,2,3
05:12 p6eval rakudo 36184: OUTPUT«Statement not terminated properly at line 1, near "1,2,3"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
05:12 shinobi-cl_ mmmm, constant replaces my? strange
05:12 s1n rakudo: constant @foo = 1,2,3
05:12 p6eval rakudo 36184: RESULT«[1, 2, 3]»
05:13 s1n shinobi-cl_: check S03:4088, S03:4107, S03:4114, etc
05:13 shinobi-cl_ perl6: our $A is constant = 1; print $A;
05:13 p6eval elf 25127, pugs, rakudo 36184: OUTPUT«1»
05:13 shinobi-cl_ perl6: our $A is constant = 666; print $A;
05:13 p6eval elf 25127, pugs, rakudo 36184: OUTPUT«666»
05:14 shinobi-cl_ s1n: will do
05:15 s1n shinobi-cl_: don't bother using the cabal/google search, it's pretty useless
05:16 shinobi-cl_ so, constant at the first is compile time, is constant is run time then?
05:17 s1n shinobi-cl_: it says it's at BEGIN time, is that at compile time?
05:19 shinobi-cl_ oh i see now... well, thanks! :)
05:19 shinobi-cl_ perl6: class TestA { method BUILD { say "ABC" } }; my TestA $variable .= new;
05:19 p6eval rakudo 36184: OUTPUT«too many arguments passed (3) - 1 params expected␤current instr.: 'parrot;TestA;BUILD' pc 133 (EVAL_19:66)␤»
05:19 p6eval ..pugs: OUTPUT«ABC␤»
05:19 p6eval ..elf 25127: RESULT«undef␤»
05:20 shinobi-cl_ perl6: class TestA { method BUILD($something) { say "ABC:" ~ $something } }; my TestA $variable .= new("123");
05:20 p6eval pugs: OUTPUT«*** Must only use named arguments to new() constructor␤    Be sure to use bareword keys.␤    at /tmp/CuMCekqk4v line 1, column 87-103␤»
05:20 p6eval ..elf 25127: RESULT«undef␤»
05:20 p6eval ..rakudo 36184: OUTPUT«argument doesn't hash␤current instr.: 'parrot;Perl6Object;BUILD' pc 788 (src/classes/Object.pir:283)␤»
05:20 shinobi-cl_ perl6: class TestA { method BUILD($something) { say "ABC:" ~ $something } }; my $variable = TestA.new("123");
05:20 p6eval pugs: OUTPUT«*** Must only use named arguments to new() constructor␤    Be sure to use bareword keys.␤    at /tmp/qAhAA5NxoF line 1, column 81-102␤»
05:20 p6eval ..rakudo 36184: OUTPUT«argument doesn't hash␤current instr.: 'parrot;Perl6Object;BUILD' pc 788 (src/classes/Object.pir:283)␤»
05:20 p6eval ..elf 25127: OUTPUT«Odd number of elements in anonymous hash at ./elf_h line 19.␤»
05:21 shinobi-cl_ perl6: class TestA { method BUILD($something) { say $something } }; my $variable = TestA.new("123");
05:21 p6eval rakudo 36184: OUTPUT«argument doesn't hash␤current instr.: 'parrot;Perl6Object;BUILD' pc 788 (src/classes/Object.pir:283)␤»
05:21 p6eval ..pugs: OUTPUT«*** Must only use named arguments to new() constructor␤    Be sure to use bareword keys.␤    at /tmp/QNFTXTWysx line 1, column 72-93␤»
05:21 p6eval ..elf 25127: OUTPUT«Odd number of elements in anonymous hash at ./elf_h line 19.␤»
05:21 shinobi-cl_ perl6: class TestA { method BUILD(Str $something) { say $something } }; my $variable = TestA.new("123");
05:21 p6eval pugs: OUTPUT«*** Must only use named arguments to new() constructor␤    Be sure to use bareword keys.␤    at /tmp/FX8GmReBeJ line 1, column 76-97␤»
05:21 p6eval ..rakudo 36184: OUTPUT«argument doesn't hash␤current instr.: 'parrot;Perl6Object;BUILD' pc 788 (src/classes/Object.pir:283)␤»
05:21 p6eval ..elf 25127: OUTPUT«Odd number of elements in anonymous hash at ./elf_h line 19.␤»
05:21 shinobi-cl_ perl6: class TestA { method BUILD(Str $something) { say $something } }; my $variable = TestA.new(something => "123");
05:21 p6eval pugs: OUTPUT«123␤»
05:21 p6eval ..rakudo 36184: OUTPUT«Parameter type check failed for $something in call to BUILD␤current instr.: 'die' pc 16844 (src/builtins/control.pir:204)␤»
05:21 p6eval ..elf 25127: OUTPUT«Odd number of elements in anonymous hash at ./elf_h line 19.␤»
05:21 s1n shinobi-cl_: it would be more polite if you stuck to using just one impl instead of perl6
05:22 shinobi-cl_ rakudo: class TestA { method BUILD(Str $something) { say $something } }; my $variable = TestA.new(something => "123");
05:22 p6eval rakudo 36184: OUTPUT«Parameter type check failed for $something in call to BUILD␤current instr.: 'die' pc 16844 (src/builtins/control.pir:204)␤»
05:22 s1n shinobi-cl_: thanks
05:22 shinobi-cl_ ok, and why is that?
05:22 shinobi-cl_ why i should pick one?
05:23 s1n perl6 has at least 3 impl responding
05:23 s1n can spam the channel after just a commands
05:23 shinobi-cl_ ahhh ok... i understand now, thanks again
05:24 s1n you can also try just std if you want to test against the spec parser (STD.pm)
05:24 shinobi-cl_ std: class TestA { method BUILD(Str $something) { say $something } }; my $variable = TestA.new(something => "123");
05:24 p6eval std 25127: OUTPUT«00:04 35m␤»
05:25 s1n that means it passed the parse
05:25 s1n it'll output a message if it fails
05:36 laye joined #perl6
05:38 ab5tract joined #perl6
05:39 justatheory joined #perl6
06:01 Minthe joined #perl6
06:08 cognominal joined #perl6
06:15 laye left #perl6
07:11 TheOrz joined #perl6
07:26 iblechbot joined #perl6
07:38 c9s joined #perl6
07:43 Sepheebear joined #perl6
07:53 Minthe joined #perl6
07:58 ejs joined #perl6
08:41 kanru joined #perl6
09:13 ejs joined #perl6
09:15 redicaps joined #perl6
09:31 maerzhase joined #perl6
09:36 riffraff joined #perl6
09:56 agentzh joined #perl6
10:11 agentzh left #perl6
10:25 finanalyst joined #perl6
10:30 Caelum joined #perl6
10:47 DemoFreak joined #perl6
10:54 ft joined #perl6
11:07 barney joined #perl6
11:17 Caelum joined #perl6
11:36 jan_ joined #perl6
11:37 maerzhase joined #perl6
11:40 pmurias joined #perl6
11:48 agentzh joined #perl6
12:07 barney joined #perl6
12:25 meppl joined #perl6
12:50 shinobi-cl_ joined #perl6
12:58 rindolf joined #perl6
13:01 vixey joined #Perl6
13:14 maerzhase joined #perl6
13:42 shinobi-cl_ left #perl6
13:59 masak joined #perl6
14:08 masak @tell shinobi-cl_ BUILD not implemented yet in Rakudo. it's been waiting for submethods for a while, I think.
14:08 lambdabot Consider it noted.
14:09 Whiteknight joined #perl6
14:10 ayrnieu joined #perl6
14:34 ejs joined #perl6
15:00 kid51 joined #perl6
15:04 masak rakudo: class A { method foo() { say "A" } }; class B is A { method foo() { say "B"; nextsame; } }; B.new.foo
15:04 p6eval rakudo 36196: OUTPUT«B␤Could not find non-existent sub nextsame␤current instr.: 'parrot;B;foo' pc 362 (EVAL_21:135)␤»
15:04 masak do I have the syntax/semantics correct here?
15:04 masak can I mix 'nextsame' with a simple non-set-of-methods method call?
15:05 masak S12 seems to indicate that I can.
15:07 masak rakudo: class A { method foo() { say "A" } }; class B is A { method foo() { say "B"; } }; B.new.+foo
15:07 p6eval rakudo 36196: OUTPUT«B␤A␤»
15:07 * masak <3 Rakudo
15:10 masak now, how do I do the above, but backwards? i.e. "A\nB\n".
15:11 masak the .WALK method is not implemented yet in Rakudo.
15:22 maerzhase joined #perl6
15:22 Limbic_Region joined #perl6
15:56 pugs_svn r25128 | diakopter++ | adding misc/ dir for mothballed item(s)
15:58 pugs_svn r25129 | diakopter++ | moved misc/yap6 to misc/mothballed/yap6
16:05 Tene_ joined #perl6
16:17 alexn_org joined #perl6
16:29 Traveler joined #perl6
16:30 Traveler joined #perl6
16:32 masak std: my Any ($a, $b)
16:32 p6eval std 25129: OUTPUT«00:02 33m␤»
16:42 pugs_svn r25130 | finanalyst++ | [t/examples/99problems/] moved to [misc/uncoded_99problems] files only contain comment stubs
16:44 pugs_svn r25131 | finanalyst++ | from [t/examples/99problems/] files only contain comment stubs. perl6 wiki to include reference here
16:45 pugs_svn r25132 | finanalyst++ | from [t/examples/99problems/] files only contain comment stubs. perl6 wiki to include reference here
16:48 Orlando joined #perl6
17:00 shinobi-cl_ joined #perl6
17:01 shinobi-cl_ perl6: module ABC;
17:01 lambdabot shinobi-cl_: You have 1 new message. '/msg lambdabot @messages' to read it.
17:01 p6eval elf 25132: RESULT«syntax error at (eval 120) line 6, near "})"␤syntax error at (eval 120) line 6, near "))"␤ at ./elf_h line 4333␤»
17:01 p6eval ..rakudo 36203: RESULT«./parrot: error while loading shared libraries: /home/evalenv/parrot/blib/lib/libparrot.so.0.9.0: file too short␤»
17:01 p6eval ..pugs: RESULT«undef»
17:01 diakopter hm
17:02 masak shinobi-cl_: I'm eagerly awaiting the BUILD submethods, too.
17:05 shinobi-cl_ i still dont get why BUILD has to be submethod
17:06 LimbicRegion joined #perl6
17:06 Jedai joined #perl6
17:07 pugs_svn r25133 | finanalyst++ | from [t/examples/99problems/] files only contain comment stubs. perl6 wiki to include reference here
17:12 masak shinobi-cl_: I'm half-unclear on it myself, but I can explain what I know.
17:12 masak .new is a method, BUILD is a submethod.
17:13 masak that means that when a .new method is overridden, it gets inherited by descendants.
17:13 masak whereas a declared BUILD doesn't.
17:14 justatheory joined #perl6
17:14 masak that's the technical reason. there's a psychological reson for this reason, but either I haven't heard it, or I've forgotten. :)
17:23 shinobi-cl_ the reason is that, on normal oop practice, you call the previous constructor explicitly
17:23 shinobi-cl_ i think
17:24 frew rakudo: rand
17:24 p6eval rakudo 36204: RESULT«0.508906955904425»
17:27 masak shinobi-cl_: 'the previous constructor'?
17:39 frew rakudo: 16.roots(4)
17:39 p6eval rakudo 36204: OUTPUT«Method 'roots' not found for invocant of class 'Int'␤current instr.: 'parrot;P6metaclass;dispatch' pc 287 (src/classes/ClassHOW.pir:145)␤»
17:39 frew that's annoying
17:40 frew does anyone here know how the bots are kept from doing Bad Things?
17:40 frew like rakudo: `rm -rf fdjal;fdf;sakjl`?
17:45 masak frew: well, for starters, `` quotes aren't implemented in Rakudo. :)
17:45 frew rakudo: {truncate}(1.3)
17:45 p6eval rakudo 36204: OUTPUT«No applicable methods.␤␤current instr.: '_block20' pc 115 (EVAL_16:65)␤»
17:45 frew but there is something like it, right?
17:45 masak rakudo: run('ls')
17:45 p6eval rakudo 36204:
17:45 p6eval ..OUTPUT«all_cstring.str␤apps␤blib␤CFLAGS␤ChangeLog␤compilers␤config␤config_lib.pasm␤Configure.pl␤CREDITS␤DEPRECATED.pod␤DEVELOPING␤docs␤DONORS.pod␤editor␤examples␤ext␤include␤languages␤lib␤LICENSE␤Makefile␤Makefile.PL␤MANIFEST␤MANIFEST.configure.generated␤MANIFEST.generated␤MANIFEST.SKIP...
17:45 masak frew: no.
17:46 frew what you just did was pretty similar...
17:46 masak yes.
17:46 frew what if you did rakudo: run('rm -rf ...')
17:46 masak it has all the problems you imply.
17:46 masak don't do that.
17:46 frew I won't
17:46 frew I was just curious
17:46 frew because we talked about the tryperl6 thing
17:46 masak I believe Pugs has barriers against such things.
17:46 frew and that would be the number 1 issue
17:46 masak frew: yes, absolutely.
17:47 masak you raise an important point, even for the #perl6 bots.
17:47 frew I was thinking about some kinda of chrooted environment
17:47 masak they should be run under some kind of protected mode.
17:47 masak yes, something like that.
17:47 masak or a flag to the perl6 executable.
17:47 frew yeah
17:47 masak [particle]: have you considered that?
17:47 frew run it as such and such a user
17:47 frew that has few privilages
17:48 masak or run it without disk access, or something like that.
17:48 shinobi-cl joined #perl6
17:48 shinobi-cl the previous constructor on the class heriarchy
17:48 frew rakudo: well, it would need some disk access to be able to get it's own libraries
17:48 p6eval rakudo 36204: OUTPUT«Could not find non-existent sub well␤current instr.: '_block14' pc 53 (EVAL_16:38)␤»
17:49 frew oops
17:49 shinobi-cl normally, the parent constructor is not called, you should call it explicitly
17:49 frew rakudo: eval("{truncate}(1.5)")
17:49 p6eval rakudo 36204: OUTPUT«No applicable methods.␤␤current instr.: '_block20' pc 140 (EVAL_16:68)␤»
17:49 shinobi-cl with submethod this "metodology" is implemented
17:50 frew rakudo: eval("truncate(1.5)")
17:50 p6eval rakudo 36204: RESULT«1»
17:50 shinobi-cl gives u more control
17:50 frew does anyone here know how rounders.t in S29-num works?
17:51 masak frew: well, let's call it 'no user-initiated disk access', then.
17:51 frew masak: I can't see a way to pull that off though
17:51 masak frew: just forbid all the 'run' and 'open' calls, and the `` syntax.
17:51 frew hm
17:51 frew ok
17:51 masak frew: what do you mean, how rounders.t works?
17:51 frew if that's really it
17:52 frew in rounders.t they use eval so they can generate tests
17:52 frew and it's like this:
17:52 frew my $code = "{$function}({$test[0]})"
17:52 frew are braces part of string interpolation in perl6 or something?
17:52 masak yes.
17:53 frew ok
17:53 frew that explains it then
17:53 masak see S02.
17:54 ayrnieu_ joined #perl6
17:56 f00li5h joined #perl6
17:56 sunnavy joined #perl6
17:58 jan_ joined #perl6
17:59 ilogger2 joined #perl6
17:59 japhb joined #perl6
17:59 aindilis joined #perl6
18:04 Psyche^ joined #perl6
18:08 frew rakudo: my $a = 'frew'; say "$a";
18:08 p6eval rakudo 36204: OUTPUT«frew␤»
18:08 frew rakudo: my $a = 'frew'; say "{$a}";
18:08 p6eval rakudo 36204: OUTPUT«frew␤»
18:09 ayrnieu rakudo: say "{my $a = 'frew'}"
18:09 p6eval rakudo 36204: OUTPUT«frew␤»
18:11 shinobi-cl left #perl6
18:11 shinobi-cl_ joined #perl6
18:13 frew so s29 doesn't say anything about e being a function
18:13 frew but the tests in s29-trig treat it like one
18:16 frew rakudo: atan(2)
18:16 p6eval rakudo 36204: RESULT«1.10714871779409»
18:16 frew std: atan(:x(2)
18:16 p6eval std 25133: OUTPUT«############# PARSE FAILED #############␤(Possible runaway string from line 1 to line 1)␤Unable to parse argument list; couldn't find final ')' at /tmp/6UraFluYBb line 0:␤------> [32m[31m[0m␤    expecting any of:␤       infix or meta-infix␤      infix stopper␤    standard
18:16 p6eval ..stopper␤00:02 32m␤»
18:16 frew std: atan(:x(2))
18:16 p6eval std 25133: OUTPUT«00:02 32m␤»
18:16 frew std: atan(:frew(2))
18:16 p6eval std 25133: OUTPUT«00:02 32m␤»
18:21 TimToady I've been pondering the e question...
18:22 TimToady and more generally, the subject of constants
18:23 TimToady my inclination is to say that e is a funny enum
18:23 TimToady like True
18:24 frew why?
18:24 finanalyst joined #perl6
18:24 TimToady because then it parses without the expectation of arguments
18:25 frew ah
18:25 rindolf joined #perl6
18:25 frew I am a little surprised you guys don't have some grammatical rule for constants
18:25 TimToady we don't currently treat 0-ary functions specially like p5 does
18:31 frew speaking of
18:31 frew do you have any idea if it will be as easy in perl6 as it is in ruby to create DSL's?
18:31 TimToady easier, I think
18:31 frew because a lot of people seem to be doing that kind of stuff with ruby
18:32 frew that's what I figured
18:32 TimToady yeah, well, any color as long as it's ruby
18:32 frew hahaha
18:32 TimToady to perl6, all other languages are DSLs
18:32 frew excellent
18:43 smtms joined #perl6
18:44 vixey and Perl 6 is a DSL for implementing Perl 6? :p
18:45 moritz_ and recursion is if you laugh nonetheless
18:46 SamB TimToady: ... right
18:51 jferrero joined #perl6
18:51 TimToady I guess if we treat the type of an enum as overloadable, we can say enum Num is also :e(2.7182818) or some such
18:53 moritz_ that's a nice idea; if there are no name conflicts, e resolves to Num::e, if somebody defines `sub e' then it takes precedence
18:54 TimToady assuming we make sub definitions override types
18:55 moritz_ the rules for enums are already that the shortname is only allowed if unambigous
18:55 moritz_ if there's a sub with the same name, I guess `e' isn't unamgigous anymore
18:55 TimToady so what happens if someone defines a sub named True, I wonder...
18:56 moritz_ then the enum is only available as Bool::True in that scope
18:57 TimToady and what happens if they declare a sub named Bool, I wonder
18:57 TimToady or Num
18:58 moritz_ it's one good way to shoot themselves into their foot
18:58 TimToady from the parsers standpoint, I have to know whether to expect an infix or term after Foo
18:58 TimToady *parser's
18:58 diakopter think of e as a sub that returns the e type?
18:59 moritz_ uhm
18:59 diakopter moritz_: :(
18:59 TimToady I guess the difference between a type like Bool and a type like True is that the enum is actually defined, not a protoobject
18:59 moritz_ diakopter: that "uhm" was not to you :)
18:59 diakopter moritz_: :D ;)
19:00 TimToady named values want to parse like types, but e.defined should be true
19:01 TimToady if you say Bool(), it's just a coercion from nothing to Bool, which presumably gives the Bool protoobject
19:01 TimToady but if you say True(), it's not a protoobject, since it's defined
19:01 diakopter pugs: say Bool.defined
19:01 p6eval pugs: OUTPUT«␤»
19:02 TimToady pugs: say True.defined
19:02 p6eval pugs: OUTPUT«1␤»
19:02 TimToady I suppose it's okay to say "coerce this to True"
19:03 TimToady where this is nothing
19:03 TimToady but it really bugs me to see tests for e() for some reason
19:03 diakopter pugs: say e();
19:03 TimToady and I certainly don't want e 1 to parse
19:03 p6eval pugs: OUTPUT«*** No such subroutine: "&e"␤    at /tmp/xLIvXAOqlM line 1, column 5-8␤»
19:03 diakopter pugs: say e;
19:03 p6eval pugs: OUTPUT«*** No such subroutine: "&e"␤    at /tmp/EPR5NvvCVh line 1, column 5-6␤»
19:03 diakopter pugs: say e.();
19:04 p6eval pugs: OUTPUT«*** No such subroutine: "&e"␤    at /tmp/sCfU9rl0dt line 1, column 5-9␤»
19:04 moritz_ perl6: say e
19:04 p6eval pugs: OUTPUT«*** No such subroutine: "&e"␤    at /tmp/hIvQppaFrQ line 1, column 5 - line 2, column 1␤»
19:04 p6eval ..elf 25133: OUTPUT«Undefined subroutine &GLOBAL::e called at (eval 120) line 3.␤ at ./elf_h line 4333␤»
19:04 p6eval ..rakudo 36209: OUTPUT«2.71828182845905␤»
19:04 TimToady or worse, e + 1 to parse as e(+1)
19:05 TimToady I don't really want to special-case 0-ary subs, when 0-ary multis mustn't be special-cased
19:05 TimToady multi foo () {...} has to look for arguments in the parser to know where there are any to feed to multi foo ($x) {...}
19:05 TimToady s/where/whether/
19:06 TimToady so I don't really want to treat constants the way Perl 5 does
19:08 cosimo joined #perl6
19:09 TimToady so enum values seems like the right model for named singleton defined values
19:09 diakopter prelude defined?
19:09 TimToady or imported
19:09 TimToady it can still live in Num
19:09 TimToady so Num::e is unambiguous
19:10 TimToady but I'm thinking defined values really shouldn't be responding to () unless they does the right role
19:11 TimToady so I think I'm gonna say that e() is illegal
19:12 TimToady well, not illegal, but a call to sub e
19:12 TimToady not a reference to the constant value
19:12 TimToady std: e()
19:12 p6eval std 25133: OUTPUT«Undeclared routine:␤   e used at 1 ␤00:02 32m␤»
19:12 TimToady heh, well, we're already there :)
19:13 TimToady std: pi()
19:13 p6eval std 25133: OUTPUT«Undeclared routine:␤   pi used at 1 ␤00:02 32m␤»
19:13 TimToady std: pi
19:13 p6eval std 25133: OUTPUT«00:02 32m␤»
19:13 TimToady std: e
19:13 p6eval std 25133: OUTPUT«00:02 32m␤»
19:13 diakopter std: NaN
19:13 p6eval std 25133: OUTPUT«00:02 32m␤»
19:14 diakopter std: NaN;
19:14 p6eval std 25133: OUTPUT«00:02 32m␤»
19:14 diakopter std: ZetaFunction;
19:14 p6eval std 25133: OUTPUT«Undeclared type:␤      ZetaFunction used at 1 ␤00:02 32m␤»
19:17 diakopter std: Inf;
19:17 p6eval std 25133: OUTPUT«00:02 32m␤»
19:17 frew does anyone here have a script to run the tests that have changed base on svn?
19:22 TimToady yes, it's called tryfile--I always just copy-paste the svn output containing tests to it
19:22 frew sweet
19:22 frew can I svn status | tryfile/
19:22 frew ?
19:22 TimToady however
19:23 TimToady if you feed non-.t files to it, it'll get confused
19:23 frew yeah
19:23 TimToady and it can't tell the difference between p5 and p6
19:23 frew that's fine
19:24 frew I think all the tests in S29 now have named arg tests
19:24 pugs_svn r25134 | frew++ | [t] added named arg tests to trig and num functions
19:25 TimToady you might have to add a t/ link to your perl6 directory though
19:26 frew ok
19:26 TimToady I suppose it could search up the directory tree
19:26 mtnviewmark joined #perl6
19:27 frew it's not a huge deal to make it do something like that
19:27 mtnviewmark std: $a ».foo(42)
19:27 p6eval std 25134: OUTPUT«############# PARSE FAILED #############␤Syntax error (two terms in a row?) at /tmp/heNG3Ec3Sn line 1:␤------> [32m$a »[31m.foo(42)[0m␤    expecting any of:␤      infix or meta-infix␤      infix stopper␤    standard stopper␤ terminator␤00:02 33m␤»
19:27 pugs_svn r25135 | frew++ | removed a completed task from TASKS
19:28 TimToady std: i\i
19:28 p6eval std 25134: OUTPUT«00:02 32m␤»
19:29 mtnviewmark aye aye?
19:30 araujo joined #perl6
19:31 mtnviewmark std: $a »$
19:31 p6eval std 25135: OUTPUT«############# PARSE FAILED #############␤Syntax error (two terms in a row?) at /tmp/dzEfNvPZqE line 1:␤------> [32m$a »[31m$[0m␤    expecting any of:␤     infix or meta-infix␤      infix stopper␤    standard stopper␤ terminator␤00:02 33m␤»
19:31 TimToady you can't use a metapostfix with whitespace, though I suppose it could be unambiguous
19:31 TimToady well, no, it would mean $_>>.foo presumably
19:32 TimToady not sure how it's actually parsing past the hyper at the moment
19:32 mtnviewmark heh
19:33 TimToady oh, of course, it's looking for the infix
19:33 mtnviewmark std: $a»$
19:33 TimToady those aren't LTM anymore
19:33 p6eval std 25135: OUTPUT«############# PARSE FAILED #############␤Syntax error (two terms in a row?) at /tmp/9xsEKTIvhU line 1:␤------> [32m$a»[31m$[0m␤    expecting any of:␤      infix or meta-infix␤      infix stopper␤    postfix␤        postfix_prefix_meta_operator␤       standard stopper␤
19:33 p6eval ..terminator␤00:02 33m␤»
19:33 mtnviewmark I was trying to see if it was acceptable to use the listops under hyper
19:33 mtnviewmark oh wait, they're prefix
19:33 mtnviewmark std: $«$a
19:33 p6eval std 25135: OUTPUT«############# PARSE FAILED #############␤Can't understand next input--giving up at /tmp/eQveFVmnod line 1:␤------> [32m[31m$«$a[0m␤    expecting any of:␤  noun␤   prefix or noun␤     statement end␤    statement list␤   variable␤       whitespace␤00:02 34m␤»
19:33 mtnviewmark well - there ya go....
19:34 TimToady listop requires whitespace
19:34 TimToady not sure if that helps though
19:34 TimToady $<< $a
19:34 TimToady std: $<< $a
19:34 p6eval std 25135: OUTPUT«############# PARSE FAILED #############␤(Possible runaway string from line 1)␤Unable to parse quote-words subscript; couldn't find right double-angle quote at /tmp/MmC5Qt9NXH line 0:␤------> [32m[31m[0m␤00:04 34m␤»
19:35 TimToady wonder why my compose key stopped working...
19:37 mtnviewmark actually, after thinking about your goal that if it isn't likely what the programmer thought, then it should generate an error -- Iistop's probably shouldn't be subject to metaops
19:37 TimToady now it's working again, weird
19:37 TimToady std: $« $a
19:37 mtnviewmark X= just dosen't seem useful
19:37 p6eval std 25135: OUTPUT«############# PARSE FAILED #############␤Can't understand next input--giving up at /tmp/uWvums4fpT line 1:␤------> [32m[31m$« $a[0m␤    expecting any of:␤ noun␤   prefix or noun␤     statement end␤    statement list␤   variable␤       whitespace␤00:02 34m␤»
19:38 TimToady TheDamian was suggesting forcing X= to mean the other thing
19:38 TimToady that is, [X]=
19:39 TimToady lunch &
19:39 ejs joined #perl6
19:43 gfldex_ joined #perl6
19:44 finanalyst TimToady: how do i tell you about a typo in S03.pod?
19:44 diakopter finanalyst: you fix it yourself? do you have an svn account?
19:45 diakopter I think they moved S03 into pugscode, right?
19:45 iblechbot joined #perl6
19:45 finanalyst i have a comit bit, but i didnt know whether I should touch a spec file
19:46 diakopter how certain are you it's a typo
19:46 diakopter :)
19:46 finanalyst english grammar. s/it is not know/it is not known/
19:46 diakopter (not as if it's difficult to back out, but I'm merely curious)
19:47 finanalyst or similar, i need to check
19:47 jhuni joined #perl6
19:47 finanalyst if Synopsis files in pugscode I can change
19:48 finanalyst just didnt know if it was polite / customary
19:50 mtnviewmark that's how I feel about changing STD.pm!  :-)
19:52 finanalyst sort of like interferring with the holy grail :)
19:52 diakopter finanalyst: where do you see that in S03?
19:53 diakopter oh, line 1562
19:53 finanalyst +The colon operator parses just like a comma, but marks the argument to its left as an
19:53 finanalyst +invocant, which has the effect of turning what would otherwise be a function
19:53 finanalyst +call into a method call.  It may only be used on the first argument of
19:53 finanalyst +an argument list or capture, and will fail to parse if used in any other position.
19:53 finanalyst +When used within a capture, it is not yet know what signature the capture will
19:53 finanalyst s/know/known/
19:54 finanalyst sorry you found it just as I answered
19:54 mtnviewmark adverbs are in which synop?
19:54 mtnviewmark or, is :foo the same as :foo(1)
19:58 mtnviewmark in S02, and yes <--- answering my own questions
20:02 finanalyst are all the examples in pugs/examples still considered valid perl6 ?
20:03 finanalyst some seem to have been hacked to accomodate pugs in some version or other
20:05 literal no, they're not all valid
20:07 finanalyst the reason Im asking is that they are all effectively part of the test suite.
20:07 finanalyst t/examples/all_parse.t tries to parse them
20:08 finanalyst and examples.t tries to run some of them and compare the output to stuff in examples/output
20:09 finanalyst imho i wonder whether including them in the test suite is necessary at this stage?
20:11 moritz_ if you feel like removing them, go ahead
20:12 moritz_ they are still in the svn history
20:15 finanalyst uhm ok
20:16 finanalyst just didnt want to do something for which there might be a good reason not to
20:17 moritz_ I used to think that we should preserve all Perl 6 code, but I'm slowly changing my mind
20:17 moritz_ all this non-working outdated Perl 6 cruft is hurting us
20:18 * mtnviewmark is editing STD.pm, which is a deep trip down the rabbit hole....
20:19 finanalyst while i can see that programs do test the compiler and come up with corner cases, the specification tests should be rigorously tied to the specifications
20:20 moritz_ they should
20:21 moritz_ the problem is that even the specifications aren't rigorously aligned to our idea of the language
20:22 pugs_svn r25136 | finanalyst++ | [t/examples] cleaning out old code
20:24 shinobi-cl_ about that, is there a way to know if some object does support some role?
20:24 shinobi-cl_ like     if $Thing can Fly { say "cool" };
20:26 meppl joined #perl6
20:26 moritz_ shinobi-cl_: if $thing ~~ Fly
20:26 moritz_ shinobi-cl_: or $thing.does(Fly)
20:27 shinobi-cl_ ahh, ok thanks :)
20:27 cosimo left #perl6
20:27 moritz_ erm wait, isn't that $thing.^does(Fly)? not sure...
20:27 cosimo joined #perl6
20:27 moritz_ rakudo: say 1.^does(Int)
20:27 p6eval rakudo 36214: OUTPUT«1␤»
20:27 moritz_ rakudo: say 1.does(Int)
20:27 p6eval rakudo 36214: OUTPUT«1␤»
20:28 shinobi-cl_ but, ihmo, i think that, in the same way you say "If $Thing isa Bird" you should be able to say "if $Thing can Fly"
20:29 moritz_ well, you can't do the former either
20:29 broquaint joined #perl6
20:29 moritz_ there's no infix operator named `isa'
20:29 moritz_ you can ask 'if $thing.isa(Bird) { ... }'
20:30 moritz_ std: say $thing isa Int
20:30 p6eval std 25136: OUTPUT«############# PARSE FAILED #############␤Syntax error (two terms in a row?) at /tmp/hOSiGDcgTa line 1:␤------> [32msay $thing [31misa Int[0m␤    expecting any of:␤       infix or meta-infix␤      infix stopper␤    standard stopper␤ statement modifier loop␤  terminator␤00:02
20:30 p6eval ..33m␤»
20:30 mtnviewmark I think does as an operator is on values - hence, I'd expect 1.does(Int) to be asking "is this object of a type that can fulfill the role Int" -
20:31 mtnviewmark and 1.^does(Int) to be asking "is the class of this object, an object of a type that can fulfill the role Int"
20:31 shinobi-cl_ rakudo: print ?(1.does(Num));
20:31 p6eval rakudo 36214: OUTPUT«0»
20:31 mtnviewmark but - I don't know if perl6 has metaclasses....
20:31 moritz_ mtnviewmark: ti does
20:31 moritz_ s/ti/it/
20:31 moritz_ and your explanation makes a whole lot of sense
20:32 moritz_ but rakudo doesn't implement many builtin types as roles yet
20:32 moritz_ pugs: say 1.does(Num)
20:32 p6eval pugs: OUTPUT«1␤»
20:32 moritz_ pugs: say 1.^does(Num)
20:32 p6eval pugs: OUTPUT«*** No such method in class Num: "&ITEM"␤    at /tmp/INgFiWNMLZ line 1, column 5 - line 2, column 1␤»
20:32 shinobi-cl_ rakudo: role Fly { } ; class Bird does Fly { } ; my $Tweety = new Bird; print $Tweety.does(Fly);
20:32 p6eval rakudo 36214: OUTPUT«Could not find non-existent sub new␤current instr.: '_block14' pc 60 (EVAL_19:41)␤»
20:32 moritz_ shinobi-cl_: Bird.new
20:33 shinobi-cl_ rakudo: role Fly { } ; class Bird does Fly { } ; my $Tweety = Bird.new ; print $Tweety.does(Fly);
20:33 p6eval rakudo 36214: OUTPUT«0»
20:33 moritz_ indirect method calls aren't allowed
20:33 moritz_ rakudo: role Fly { } ; class Bird does Fly { } ; my $Tweety = Bird.new ; print $Tweety.^does(Fly);
20:33 p6eval rakudo 36214: OUTPUT«1»
20:34 shinobi-cl_ ahhh the misteriuos ^ sigil
20:34 moritz_ rakudo: role Fly { } ; class Bird { } ; my $Tweety = Bird.new but Fly ; print $Tweety.^does(Fly);
20:34 p6eval rakudo 36214: OUTPUT«1»
20:34 cosimo what does 1.^does mean? The '^' bit?
20:34 moritz_ shinobi-cl_: I'm not sure if your example should also print 1
20:34 moritz_ cosimo: it's for accessing methods from the meta class
20:34 moritz_ or proto object, or whatever it's called
20:35 cosimo moritz_: to disambiguate potential clashes? or... ?
20:35 mtnviewmark so the question is -- is the does method a question about the class object it is sent to, or a question about the class of the object it is sent to
20:36 moritz_ cosimo: mainly as a shortcut - not all methods from the meta class can be called directly on the object
20:37 finanalyst Is there a reason why there is CONTEXT and CALLER packages in S02 and context and caller functions in S06?
20:37 shinobi-cl_ ^ is like "go up one level on the class structure" ? Or is just for internal metadata and methods?
20:38 moritz_ shinobi-cl_: it's more like "go one level meta", not up
20:39 cosimo moritz_: i *think* other languages use something like $Tweety.meta.does(Fly)
20:39 cosimo right?
20:39 moritz_ cosimo: yes
20:39 cosimo actually, ^does is really ugly to me, but...
20:40 moritz_ the $stuff.^foo($bar) form desugars to $stuff.HOW.foo($stuff, $bar)
20:40 moritz_ cosimo: it's not all about beauty I guess :/
20:41 mtnviewmark er, I would still think that it should be written $tweety.does(Fly) -- as we are asking if this particular value can preform the role of Fly, no?
20:41 mtnviewmark though - that does imply that all objects respond to .does
20:41 moritz_ mtnviewmark: yes
20:42 mtnviewmark okay, so $tweety.^does(Fly) would/should return false
20:42 moritz_ mtnviewmark: that's why I added .does to Object in S29
20:42 finanalyst moritz_: about context/caller specs in both S02 and S06. Should there be separate tests for them?
20:42 shinobi-cl_ what is the diferrence between WHAT and ^does, then?
20:42 mtnviewmark unless roles respond to .does by answering about the role they represent rather than the role they themselves can fulfill
20:42 shinobi-cl_ because WHAT is a meta-method too, right
20:42 moritz_ finanalyst: CALLER is a package, caller() a function
20:43 finanalyst but it is the same functionality, why are both needed?
20:43 moritz_ they're not the same
20:43 moritz_ caller() gives me information like line number, file name etc.
20:44 moritz_ $CALLER::_ is the caller's $_ variable
20:44 finanalyst ahh.
20:45 moritz_ ah, .WHAT is the protoobject, .HOW the metaclass object
20:45 cosimo so what can I do for perl6 if I have some hours to spend?
20:45 moritz_ rakudo: class A { }; say A.new.WHAT === A
20:45 p6eval rakudo 36214: OUTPUT«1␤»
20:45 moritz_ cosimo: write tests, for example
20:45 cosimo i worked on the spectests some time ago
20:45 moritz_ cosimo: t/TASKS contains some things to do
20:46 shinobi-cl_ mmmm, even when its longer, i like that better than ^does
20:46 shinobi-cl_ or ^isaq
20:46 shinobi-cl_ or ^isa
20:46 moritz_ rakudo: class A { }; say A.new.HOW === A
20:46 p6eval rakudo 36214: OUTPUT«0␤»
20:46 * moritz_ doesn't really grok the p6 object model yet - I guess ruoso, jnthn and TimToady are better people to ask about it
20:47 cosimo moritz_: cool. the only problem I see is that I'm not really up-to-date to language status and syntax.
20:47 shinobi-cl_ rakudo: role Fly {} ; class Bird does Fly {}; my Bird $B .= new; say $B.HOW === Fly;
20:47 p6eval rakudo 36214: OUTPUT«0␤»
20:48 shinobi-cl_ rakudo: role Fly {} ; class Bird does Fly {}; my $B = Bird.new; say $B.HOW === Fly;
20:48 p6eval rakudo 36214: OUTPUT«0␤»
20:48 * cosimo goes to read t/TASKS
20:48 shinobi-cl_ rakudo: role Fly {} ; class Bird does Fly {}; my $B = Bird.new; say $B.^does(Fly);
20:48 moritz_ cosimo: you could also try to fix some rakudo tickets, if you like debugging parrot + rakudo ;-)
20:48 p6eval rakudo 36214: OUTPUT«1␤»
20:49 mtnviewmark rakudo: role Fly {} ; class Bird does Fly {}; my Bird $B .= new; say $B.HOW ~~ Fly;
20:49 p6eval rakudo 36214: OUTPUT«too few arguments passed (2) - 3 params expected␤current instr.: 'parrot;P6metaclass;isa' pc 107 (runtime/parrot/library/P6object.pir:155)␤»
20:50 cosimo moritz_: eh, maybe at the next NPW hackaton, yes :-)
20:50 mtnviewmark rakudo: role Fly {} ; class Bird does Fly {}; my Bird $B .= new; say $B ~~ Fly;
20:50 p6eval rakudo 36214: OUTPUT«1␤»
20:50 moritz_ cosimo: ;-)
20:50 mtnviewmark there ya go
20:50 cosimo moritz_: will you be there?
20:51 mtnviewmark finally wrapped my head around how to write positive attribute assertions in the STD.pm parser!
20:51 moritz_ cosimo: I fear not
20:51 shinobi-cl_ rakudo: role Fly {} ; class Bird does Fly {}; my $B = Bird.new; say $B.HOW;
20:51 p6eval rakudo 36214: OUTPUT«get_string() not implemented in class 'P6metaclass'␤current instr.: 'print' pc 19824 (src/builtins/io.pir:26)␤»
20:51 shinobi-cl_ pugs: role Fly {} ; class Bird does Fly {}; my $B = Bird.new; say $B.HOW;
20:51 p6eval pugs: OUTPUT«<obj:Class>␤»
20:52 shinobi-cl_ rakudo: role Fly {} ; class Bird does Fly {}; my $B = Bird.new; say $B.^does;
20:52 p6eval rakudo 36214: OUTPUT«too few arguments passed (2) - 3 params expected␤current instr.: 'parrot;P6metaclass;does' pc 0 (src/classes/ClassHOW.pir:24)␤»
20:52 shinobi-cl_ rakudo: role Fly {} ; class Bird does Fly {}; my $B = Bird.new; say $B.^does();
20:52 p6eval rakudo 36214: OUTPUT«too few arguments passed (2) - 3 params expected␤current instr.: 'parrot;P6metaclass;does' pc 0 (src/classes/ClassHOW.pir:24)␤»
20:53 shinobi-cl_ rakudo: role Fly {}; role Sing{}; class Bird does Fly does Sing{}; my $B = Bird.new; say $B.^does(Fly | Sing);
20:53 p6eval rakudo 36214: OUTPUT«0␤»
20:53 mberends joined #perl6
20:54 shinobi-cl_ rakudo: role Fly {}; role Sing{}; class Bird does Fly does Sing{}; my $B = Bird.new; my $BirdStuff = any(Fly, Sing); say $B.^does($BirdStuff);
20:54 p6eval rakudo 36214: OUTPUT«0␤»
20:54 shinobi-cl_ pugs: role Fly {}; role Sing{}; class Bird does Fly does Sing{}; my $B = Bird.new; my $BirdStuff = any(Fly, Sing); say $B.^does($BirdStuff);
20:54 p6eval pugs: OUTPUT«any(VBool True)␤»
20:55 moritz_ I'm off to bed now, TTFN folks
20:55 mtnviewmark I wonder if p5=>= is supposed to be legal?
20:55 shinobi-cl_ pugs: role Fly {}; role Sing{}; class Bird does Fly does Sing{}; my $B = Bird.new; say $B.^does(Fly | Sing);
20:55 p6eval pugs: OUTPUT«any(VBool True)␤»
20:55 mtnviewmark std: $a p5=>= 'moo'
20:55 p6eval std 25136: OUTPUT«############# PARSE FAILED #############␤Can't make assignment out of comma operator at /tmp/5msmbbr2q4 line 1:␤------> [32m$a p5=>=[31m 'moo'[0m␤00:02 33m␤»
20:55 mtnviewmark oh!
20:56 mtnviewmark std: $a ,= 'moo'
20:56 p6eval std 25136: OUTPUT«00:02 33m␤»
20:56 mtnviewmark bizarro -- those operators are essentially the same
20:56 TimToady but only , has the exception currently
20:57 TimToady oops, afk &
20:57 shinobi-cl_ role Fly {}; role Sing{}; class Bird does Fly does Sing{}; my $B = Bird.new; say $B.^does(Fly | Sing); i don't get why this line returns a junction
20:58 mtnviewmark hey - and the tests have [<] and [!==] -- but I'd think those would be a bad idea -- since they almost certainly don't mean what the user thinks -- unless reduce is smart enough to know about chaining...
20:59 shinobi-cl_ pugs: role Fly {}; role Sing{}; class Bird does Fly does Sing{}; my $B = Bird.new; say $B.^does(Fly & Sing);
20:59 p6eval pugs: OUTPUT«all(VBool True)␤»
21:00 shinobi-cl_ pugs: role Fly {}; role Sing{}; class Bird does Fly does Sing{}; my $B = Bird.new; say ?($B.^does(Fly & Sing));
21:00 p6eval pugs: OUTPUT«all(VBool True)␤»
21:00 mtnviewmark perl6: [<] 3,5,7
21:01 p6eval pugs, rakudo 36214: RESULT«Bool::True»
21:01 p6eval ..elf 25136: OUTPUT«Parse error in: /tmp/vpfBFoRGiW␤panic at line 1 column 2 (pos 2): Error in quotesnabber␤WHERE: [<] 3,5,7␤WHERE:  /\<-- HERE␤  STD_red/prelude.rb:99:in `panic'␤  STD_red/std.rb:1315:in `quotesnabber'␤  (eval):1:in `__quote_2861163'␤  STD_red/prelude.rb:406:in `block in
21:01 p6eval ..longest_tok...
21:01 mtnviewmark oh - okay, S03 expressly states that [op] is aware of chaining semantics
21:02 mtnviewmark I suppose, in which case it has an implicit && in there
21:02 mtnviewmark or maybe it is implicit & -- not sure
21:02 mtnviewmark no, it's &&
21:03 shinobi-cl_ perl6: [!] 0,1,0
21:03 p6eval rakudo 36214: OUTPUT«Syntax error at line 1, near "[!] 0,1,0"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
21:03 p6eval ..elf 25136: OUTPUT«Parse error in: /tmp/KemBOrOlMh␤panic at line 1 column 0 (pos 0): Can't understand next input--giving up␤WHERE: [!] 0,1,0␤WHERE:/\<-- HERE␤  STD_red/prelude.rb:99:in `panic'␤  STD_red/std.rb:76:in `scan_unitstopper'␤  STD_red/std.rb:224:in `comp_unit'␤  STD_red/std.rb:210:in
21:03 p6eval ..`_UN...
21:03 p6eval ..pugs: OUTPUT«*** ␤    Unexpected "[!]"␤    expecting program␤    at /tmp/Ysabg5Sfnf line 1, column 1␤»
21:03 [particle] ! is not an infix op
21:03 cosimo sorry guys, i'm having problems accessing svn.pugscode.org... is that changed?
21:04 shinobi-cl_ ahh true, thanks :)
21:04 shinobi-cl_ rakudo: [+] 0,1,0
21:04 p6eval rakudo 36214: RESULT«1»
21:05 shinobi-cl_ rakudo:my @a = (1,2,3,4); print [+]@a;
21:06 shinobi-cl_ pugs:my @a = (1,2,3,4); print [+]@a;
21:06 shinobi-cl_ pugs: my @a = (1,2,3,4); print [+]@a;
21:06 p6eval pugs: OUTPUT«*** ␤    Unexpected "@a"␤    expecting dot, ":", "(", term postfix, operator or ","␤    at /tmp/SVfR9O52pE line 1, column 29␤»
21:06 shinobi-cl_ rakudo: my @a = (1,2,3,4); print [+]@a;
21:06 p6eval rakudo 36214: OUTPUT«10»
21:08 cosimo seems to work now...
21:10 mtnviewmark joined #perl6
21:10 Tene joined #perl6
21:10 diakopter cosimo: hmm
21:12 shinobi-cl_ role Fly {}; class Bird does Fly { has Str $.color is rw }; my Bird $B1 .= new; $B1.color = "red"; my Bird $B2 .= new; $B2.color = "blue"; [.color eq "blue"]$B1, $B2;
21:12 diakopter cosimo: well, it works from localhost (ssh/w3m)
21:12 shinobi-cl_ rakudo: role Fly {}; class Bird does Fly { has Str $.color is rw }; my Bird $B1 .= new; $B1.color = "red"; my Bird $B2 .= new; $B2.color = "blue"; [.color eq "blue"]$B1, $B2;
21:12 p6eval rakudo 36214: OUTPUT«Statement not terminated properly at line 1, near "$B1, $B2;"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
21:12 diakopter but I can't reach it from USA
21:12 shinobi-cl_ rakudo: role Fly {}; class Bird does Fly { has Str $.color is rw }; my Bird $B1 .= new; $B1.color = "red"; my Bird $B2 .= new; $B2.color = "blue"; [.color eq "blue"]($B1, $B2);
21:12 p6eval rakudo 36214: OUTPUT«Method 'color' not found for invocant of class 'Failure'␤current instr.: 'parrot;P6metaclass;dispatch' pc 287 (src/classes/ClassHOW.pir:145)␤»
21:12 shinobi-cl_ rakudo: role Fly {}; class Bird does Fly { has Str $.color is rw }; my Bird $B1 .= new; $B1.color = "red"; my Bird $B2 .= new; $B2.color = "blue"; [$.color eq "blue"]($B1, $B2);
21:12 p6eval rakudo 36214: OUTPUT«Lexical 'self' not found␤current instr.: '_block14' pc 213 (EVAL_19:70)␤»
21:12 shinobi-cl_ pugs: role Fly {}; class Bird does Fly { has Str $.color is rw }; my Bird $B1 .= new; $B1.color = "red"; my Bird $B2 .= new; $B2.color = "blue"; [$.color eq "blue"]($B1, $B2);
21:12 p6eval pugs: OUTPUT«*** Undeclared variable: ("$__SELF__",MkPad (padToList [("$_",PELexical {pe_type = (mkType "Scalar"), pe_proto = <Scalar:0xb61f7259>, pe_flags = MkEntryFlags {ef_isContext = True}, pe_store = <ref:0xb61fb895>}),("@_",PELexical {pe_type = (mkType "Array"), pe_proto = <Array:0xb61f...
21:14 shinobi-cl_ role Fly {}; class Bird does Fly { has Str $.color is rw }; my Bird $B1 .= new; $B1.color = "red"; my Bird $B2 .= new; $B2.color = "blue"; say [==]($B1, $B2);
21:14 shinobi-cl_ rakudo: role Fly {}; class Bird does Fly { has Str $.color is rw }; my Bird $B1 .= new; $B1.color = "red"; my Bird $B2 .= new; $B2.color = "blue"; say [==]($B1, $B2);
21:14 p6eval rakudo 36214: OUTPUT«get_number() not implemented in class 'Bird'␤current instr.: 'infix:==' pc 16064 (src/builtins/cmp.pir:15)␤»
21:15 shinobi-cl_ rakudo: role Fly {}; class Bird does Fly { has Str $.color is rw }; my Bird $B1 .= new; $B1.color = "red"; my Bird $B2 .= new; $B2.color = "blue"; say [~~]($B1, $B2);
21:15 p6eval rakudo 36214: OUTPUT«Method 'ACCEPTS' not found for invocant of class 'Bird'␤current instr.: 'infix:~~' pc 20055 (src/builtins/match.pir:18)␤»
21:20 cosimo diakopter: it works now, thanks
21:22 cosimo moritz_: where can I read about pod6 syntax?
21:22 cosimo or anyone, really
21:26 ejs joined #perl6
21:35 ejs joined #perl6
21:35 cosimo tried on perlcabal.org/syn/ but it's down...
21:36 diakopter hm
21:47 justatheory joined #perl6
21:49 cosimo ok, found S26 :-)
21:53 pugs_svn r25137 | cosimo++ | [t/builtins] Converted to new pod syntax
21:54 cosimo \o/
21:55 cosimo left #perl6
21:55 idemal joined #perl6
22:03 cognominal joined #perl6
22:30 jhuni joined #perl6
22:40 mtnviewmark joined #perl6
22:41 mtnviewmark rakudo: [=>] 1,2,3
22:41 p6eval rakudo 36214: OUTPUT«Syntax error at line 1, near "[=>] 1,2,3"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
22:42 mtnviewmark rakudo: [=] ()
22:42 p6eval rakudo 36214: OUTPUT«Syntax error at line 1, near "[=] ()"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
22:45 mtnviewmark I wonder if [=>] 1,2,3 is really a reasonable construction -- it builds lists out of pairs.... which is sort of icky, no?
22:45 mtnviewmark perl6: [=] 2,3,4
22:45 p6eval rakudo 36214: OUTPUT«Syntax error at line 1, near "[=] 2,3,4"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
22:45 p6eval ..elf 25137: OUTPUT«/home/evalenv/pugs/misc/STD_red/match.rb:117:in `block in to_dump0': undefined method `to_dump0' for nil:NilClass (NoMethodError)␤     from /home/evalenv/pugs/misc/STD_red/match.rb:117:in `map'␤       from /home/evalenv/pugs/misc/STD_red/match.rb:117:in `to_dump0'␤  from
22:45 p6eval ../home/evalenv/pugs/...
22:45 p6eval ..pugs: RESULT«2»
22:46 mtnviewmark and what is [=] supposed to do?
22:47 mtnviewmark [=] $x, @y, $z, 0
22:47 mtnviewmark is that really useful?
22:55 mtnviewmark pugs: my $a =1; my $b =2; my $c = 3; [=] $a, $b, $c, 7; say $a, $b, $c;
22:55 p6eval pugs: OUTPUT«123␤»
22:55 mtnviewmark perl6: my $a =1; my $b =2; my $c = 3; [=] $a, $b, $c, 7; say $a, $b, $c;
22:56 p6eval pugs: OUTPUT«123␤»
22:56 p6eval ..elf 25137: OUTPUT«/home/evalenv/pugs/misc/STD_red/match.rb:117:in `block in to_dump0': undefined method `to_dump0' for nil:NilClass (NoMethodError)␤     from /home/evalenv/pugs/misc/STD_red/match.rb:117:in `map'␤       from /home/evalenv/pugs/misc/STD_red/match.rb:117:in `to_dump0'␤  from
22:56 p6eval ../home/evalenv/pugs/...
22:56 p6eval ..rakudo 36214: OUTPUT«Syntax error at line 1, near "[=] $a, $b"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
23:04 eternaleye joined #perl6
23:20 Eevee joined #perl6
23:21 aindilis` joined #perl6
23:24 justatheory joined #perl6
23:32 |jedai| joined #perl6
23:47 [particle]1 joined #perl6
23:51 drbean kkjj
23:55 Orlando left #perl6

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

Perl 6 | Reference Documentation | Rakudo