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