»ö« | perl6-projects.org/ | nopaste: paste.lisp.org/new/perl6 | evalbot: perl6: say 3;' | irclog: irc.pugscode.org/ | UTF-8 is our friend!
Set by moritz_ on 27 June 2009.
00:10 kate21de1 left
davef hi - simple regex question. How do I capture parts of a regex into vars/ a hash in rakudo? 00:13
rakudo: 'USE java::nio::IntBuffer uses java::nio::ByteOrder' ~~ /^USE\s+(\w+)\s+/; $/.perl.say;
p6eval rakudo 402470: OUTPUT«Match.new(␤ # WARNING: this is not working perl code␤ # and for debugging purposes only␤ ast => "",␤ Str => "",␤ from => 50,␤ to => -2,␤)␤»
00:23 davef left 01:15 Whiteknight joined 01:44 szabgab left 01:46 szabgab joined 01:52 ihrd joined, ihrd left 02:05 Whiteknight left 02:13 agentzh joined
s1n is :name required for WALK? the spec seems to indicate that it returns methods and walk.t's cand_order calls the parameters as the matched methods 02:22
i was under the impression that WALK returned the classes in the hierarchy
or does it traverse the hierarchy looking for matching methods 02:23
02:27 buubot joined, synth joined 02:28 explorer left 02:30 KyleHa joined
KyleHa perl6: Inf.int.say 02:30
p6eval elf 27520: OUTPUT«Can't locate object method "int" via package "Inf" (perhaps you forgot to load "Inf"?) at (eval 123) line 3.␤ at ./elf_h line 5881␤»
..rakudo 402470: OUTPUT«-2147483648␤»
..pugs: OUTPUT«179769313486231590772930519078902473361797697894230657273430081157732675805500963132708477322407536021120113879871393357658789768814416622492847430639474124377767893424865485276302219601246094119453082952085005768838150682342462881473913110540827237163350510684586298239947245938479…
pugs_svn r27521 | kyle++ | [t/spec] Test for RT #61566 02:31
KyleHa STD: Inf.int.say
s1n use std: 02:32
KyleHa std: Inf.int.say
p6eval std 27520: OUTPUT«ok 00:02 36m␤»
KyleHa What should Inf.int.say say? 02:34
S02 says that the Int type can hold Inf and NaN, but I don't see how those are supposed to "look". 02:35
02:50 eternaleye joined 02:52 tann joined 02:53 alester joined 02:56 tann__ joined, tann_ left 03:13 tann left
KyleHa rakudo: say '~~' ~~ /~~/ 03:24
p6eval rakudo 402470: OUTPUT«perl6regex parse error: Unable to parse goal after ~ at offset 25, found '/'␤in Main (src/gen_setting.pm:3340)␤»
03:24 frankshaw joined
KyleHa rakudo: say '~~' ~~ /\~\~/ 03:24
p6eval rakudo 402470: OUTPUT«~~␤»
KyleHa rakudo: say '~~' ~~ /'~~'/
p6eval rakudo 402470: OUTPUT«~~␤»
03:26 HemanShaw joined
pugs_svn r27522 | kyle++ | [t/spec] Test for RT #61732 03:27
r27523 | kyle++ | [t/spec] Note an RT ticket that corresponds to an existing test. 03:28
r27524 | kyle++ | [t/spec] Test for RT #61772
r27525 | kyle++ | [t/spec] Better =~ braino tests for RT #61778
03:32 frew_ joined 03:38 KyleHa left 03:58 cottoo joined 04:22 sri_kraih_ joined 04:29 azawawi joined
azawawi hi 04:29
04:31 azawawi left 04:35 HemanShaw left, frankshaw left 04:38 ihrd joined 04:41 frew_ left 04:42 skids left 04:46 kate21de joined 04:50 ihrd left 04:51 ihrd joined, ihrd left 04:55 agentzh left 05:40 kane_ joined 05:45 nihiliad left 05:47 agentzh joined 05:51 RickyWh joined
RickyWh is perl 6 beta? 05:51
05:54 finanalyst joined
bionoid RickyWh: Not yet. :P 05:58
RickyWh ahh jeez 06:01
bionoid RickyWh: You can use it for experimenting and learning, but not for production stuff. Use perl5 :) 06:10
06:15 ejs joined 06:21 ejs left 06:25 rfordinal joined 06:34 iblechbot joined 06:38 DemoFreak joined 06:40 ejs joined 06:44 rfordinal left 06:47 alester left 06:51 ejs1 joined 06:58 ejs left 06:59 dakkar joined 07:02 ihrd joined 07:03 ihrd left 07:04 jan_ left, rfordinal joined 07:06 ihrd1 joined, ihrd1 left, jan joined 07:07 jan is now known as Guest33841, amoc joined 07:08 rfordinal left 07:10 ihrd joined, ihrd left 07:13 amoc left 07:21 ihrd joined, ihrd left 07:28 Jedai joined 07:36 pmurias joined
pmurias ruoso: hi 07:44
07:44 drbean joined
Matt-W Morning 07:49
pmurias morning 07:51
08:01 kate21de left 08:08 eMaX joined 08:09 barney joined 08:19 broquaint joined 08:28 fridim_ joined 08:30 fridim_ left 08:58 payload left 09:01 payload joined 09:03 drbean left 09:10 Eevee joined 09:28 payload left 09:31 donaldh joined 09:38 sri_kraih_ left 09:40 sri_kraih joined 09:42 mikehh joined 09:43 Eevee left 09:49 ejs1 left 09:50 Eevee joined 09:51 ejs1 joined, tann__ left
moritz_ phenny: tell KyleHa testing for Inf is generally done with ~~ Inf 10:08
phenny moritz_: I'll pass that on when KyleHa is around.
10:10 masak joined, synth left 10:20 frankshaw joined
Matt-W o/ masak 10:22
masak Matt-W: \o 10:23
Matt-W I won my battle with Xerces-C++ 10:26
masak congrats.
is there any practical difference between 'role R2 is R1 { ... }' and 'role R2 does R1 { ... }'?
Matt-W hmm 10:27
I'm not sure
moritz_ isn't the former forbidden? 10:28
Matt-W I haven't quite got my head into the philosophy behind role composition vs class inheritance
so I'm not sure if it makes sense for roles to be able to inherit from other roles 10:29
masak moritz_: in that case, I'm happy. 10:30
Matt-W would be quite happy too
moritz_ note that I too don't claim to grok roles in Perl 6 10:31
(or in general, that is)
10:31 Khisanth joined 10:32 drbean joined
ruoso hi pmurias 10:33
10:36 jauaor joined, jauaor left
pmurias ruoso: hi 10:40
ruoso pmurias, have you been able to find interesting results with the smop profiler? 10:42
pmurias i'm working on making the smop profiler faster as it's currently to slow to profile anything without --empty-setting 10:43
ruoso cool 10:44
so you're profiling the profiler :P
pmurias do you think it's ok if the profiler used Forest? (it will be an extra dependency when profiling) 10:45
moritz_ smop is all about going meta, isn't it? :-)
ruoso pmurias, forest? 10:46
10:46 jauaor_ joined
ruoso moritz_, heh... every cs problem can be solved with another level of indirection... except when the problem is "too many levels of indirection" 10:47
10:47 jauaor_ left
pmurias ruoso: a CPAN module for tree's 10:48
moritz_ unless you find a way to abstract away abstraction layers :-)
pmurias * trees
10:48 jauaor joined
ruoso moritz_, heh.. 10:49
jauaor hah
10:50 davef joined
ruoso pmurias, depending on CPAN modules is fine... 10:51
pmurias ruoso: do you know how can i hide the measurement overhead from the profile? 10:55
ruoso pmurias, not really
moritz_, but seriously, "abstracting away abstraction levels" is actually the plan on how SMOP can be really fast... 10:58
ruoso commute & 11:01
11:05 payload joined 11:09 frankshaw left 11:15 alc joined, alc left 11:20 donaldh left, meppl joined, donaldh joined 11:22 cognominal joined
davef Hi, I'm trying to port a java API to p6. I have classes that use other classes that have methods that return objects of the original class. 11:29
So one class 'uses' another which then 'use's the first. Should I be using 'need' and is it in rakudo? 11:30
moritz_ need is not yet in rakudo. 11:35
11:37 skids joined
davef If class A uses class B that has methods that return class A, will 'use' handle this? 11:37
moritz_ has no idea 11:38
11:39 icwiener joined
davef I assume that if class B has a method with --> A, then you need the 'use A' in class B's file. 11:39
moritz_ the compiler has to know somehow that A is a type 11:40
so it must see a type declaration somehwere
11:41 last joined
moritz_ (a workaround for now is to omit the declaration of the return type for now) 11:41
davef won't I get the same issue if a method has a parameter of the other class? 11:42
moritz_ you will, right 11:43
12:11 skids left 12:14 KyleHa joined 12:18 zamolxes joined 12:26 payload left, iblechbot left 12:31 molaf joined 12:44 ihrd joined, ihrd left 12:52 synth joined 12:58 Sunbeam[Pinged] joined 13:03 KyleHa left 13:05 last left 13:11 last joined 13:21 finanalyst left
davef Is P6 'is' equivalent to java's extends? 13:24
moritz_ class A is B { # in this context it's inheritance 13:25
Matt-W sub foo() is export 13:26
^ there it means something completely different
davef sorry, I meant in the class context.
Matt-W no problem 13:27
in that case, yes it's rather like 'extends'
insofar as inheritance in Perl 6 is like inheritance in Java 13:28
davef thanks 13:29
13:29 nihiliad joined 13:41 M_o_C joined 13:44 frankshaw joined 13:49 alester joined 13:51 nihiliad left, molaf left 13:56 PacoLinux joined 14:00 macae joined 14:09 frew joined 14:13 davef left, last left 14:15 skids joined 14:23 iblechbot joined 14:27 RickyWh left, Infinoid joined, RickyWh joined, TimToady joined, mattp joined, bloonix joined, ilbot2 joined, irc.freenode.net sets mode: +oo Infinoid TimToady 14:28 RickyWh left 14:29 frew left 14:31 RickyWh joined, ejs1 left 14:35 justatheory joined, KyleHa joined 14:38 frankshaw left 14:40 DemoPhreak joined 14:42 DemoFreak left 14:53 frew joined 15:03 Leland joined
Leland afternoon 15:03
trying to test implementation of classes in perl6 but getting "invoke() not implemented in class..." ... presumably I'm missing something fundamental ? 15:04
KyleHa It may be that your Perl 6 implementation is unfinished, as they all are. 15:05
phenny KyleHa: 10:08Z <moritz_> tell KyleHa testing for Inf is generally done with ~~ Inf
KyleHa Thanks Phenny. 15:06
Leland KyleHa: it's the latest git repository of rakudo
KyleHa Leland: I'm no expert in the Perl 6 OO, but there are tons of examples in the spec tests. 15:07
t/spectest.data lists which files are expected to run under rakudo.
Within those files, the tests that don't work are marked with "#?rakudo ..."
Leland thanks.. will double check it.. ran the tests the other day with abysmal results, but still.. will check again
KyleHa (That's called a "fudge")
Leland hmm.. class/basic.t supposed to work 15:09
Leland checks example
KyleHa At least you're getting an error message, not "Null PMC access". 8-) 15:10
Leland true :)
heh 15:13
spoke too soon on that one
o$ ./perl6 test.pl
Null PMC access in find_method()
KyleHa Oh, that's a bug. 15:14
moritz_ invoke() not implemented means that something is called as a sub that can't be
KyleHa If you can get that down to the minimum code required to get the Null PMC and send it to [email@hidden.address] that would be a help.
moritz_ like if you say Int()
KyleHa Hey, moritz_!
My Inf.int question was driven by a ticket regarding that. Give me a minute, and I'll find it again. 15:15
Leland class test { method hello { my Str $hello = "Hello World"; return $hello; } } my $foo = new test(); say $foo.hello(); 15:16
KyleHa rakudo: class test { method hello { my Str $hello = "Hello World"; return $hello; } } my $foo = new test(); say $foo.hello();
p6eval rakudo 402470: OUTPUT«Statement not terminated properly at line 2, near "my $foo = "␤in Main (src/gen_setting.pm:3340)␤»
KyleHa rakudo: class test { method hello { my Str $hello = "Hello World"; return $hello; }; }; my $foo = new test(); say $foo.hello();
p6eval rakudo 402470: OUTPUT«invoke() not implemented in class 'test'␤in Main (/tmp/l61NmEfVJA:2)␤»
skids pmurias: ping 15:17
moritz_ ah, it should be test.new().
Leland aha!
\o/
that's better.. thanks
moritz_ std: class test { }; new test() 15:18
p6eval std 27525: OUTPUT«##### PARSE FAILED #####␤Obsolete use of C++ constructor syntax; in Perl 6 please use method call syntax instead at /tmp/3luBP1icfm line 1:␤------> class test { }; new test()␤FAILED 00:02 36m␤»
KyleHa Here it is: rt.perl.org/rt3/Public/Bug/Display.html?id=61602
Leland many thanks 15:19
Leland returns to playing
moritz_ KyleHa: I'd test that as Inf.int ~~ Inf
and (-Inf).int ~~ -Inf
15:20 donaldh left, rfordinal joined
KyleHa Okay. 15:20
15:20 donaldh joined
KyleHa Thanks moritz_++ !! 15:20
masak waitwait, can Inf really be converted to int? 15:21
masak thought only Int had the Inf value
moritz_ masak: no
masak: but .int converts to Int, or so it seems
masak ah.
moritz_ not 100% sure about it
masak is it specced that way?
15:21 bionoid left
moritz_ rakudo: say (+Inf) 15:22
p6eval rakudo 402470: OUTPUT«Inf␤»
masak hopes it's a temporary Rakudo idiosyncracy
moritz_ rakudo: say (-Inf)
p6eval rakudo 402470: OUTPUT«-Inf␤»
KyleHa rakudo: say Inf.int ~~ Inf
moritz_ rakudo: say "4".Int
p6eval rakudo 402470: OUTPUT«0␤»
rakudo 402470: OUTPUT«Method 'Int' not found for invocant of class 'Str'␤»
moritz_ dunno, TimToady's call 15:23
KyleHa Infinity is fraught with peril.
15:23 terje_ joined
KyleHa I seem to recall some wise guy proving that there's more than one "size" of infinity. 15:23
PerlJam KyleHa: there is. 15:24
KyleHa I'm inclined to make a joke about drugs, but I'm not quite that bright at the moment.
15:25 terje_ is now known as bionoid
KyleHa I see a test for Inf.int already, now that I look. There's not an analogous test for NaN, however. 15:27
rakudo: say NaN.int ~~ NaN
p6eval rakudo 402470: OUTPUT«0␤»
KyleHa rakudo: NaN.int.say
p6eval rakudo 402470: OUTPUT«-2147483648␤»
15:28 nihiliad joined
KyleHa It says -9223372036854775808 here. I'm guess that's 32 bit vs. 64 bit. 15:28
moritz_ aye 15:29
KyleHa So should it be true that NaN.int ~~ NaN ? 15:30
moritz_ I'm not sure if .int is cocerction to Int or to int
if it's to Int, it should be NaN 15:31
if it's to int, it should die.
15:31 payload joined
PerlJam int giving Int would be surprising. 15:31
moritz_ aye
but prefix:<int> is gone
and .int was advertised as the alternvative
PerlJam what did prefix:<int> do exactly? 15:35
was that a replacement for perl5's version of int()?
moritz_ it was 15:36
PerlJam seems to me that truncate is the alternative then. 15:37
rakudo: say truncate(3.1415)
p6eval rakudo 402470: OUTPUT«3␤»
moritz_ rakudo: say truncate(Inf)
p6eval rakudo 402470: OUTPUT«-2147483648␤»
PerlJam and that would be a bug then 15:38
(or I'd expect truncate(Inf) and truncate(NaN) to return Inf and NaN respectively)
moritz_ PerlJam: same here
15:39 rfordinal left 15:40 gbacon joined 15:41 eMaX left
pugs_svn r27526 | kyle++ | [t/spec] truncate() on Inf and NaN 15:46
Leland chained concatenation of strings is now done only with ~ and not . right ?
moritz_ right
Leland $var1 ~ $var2 15:47
ok
shame thta it couldn't share a similarity with other languages using + ;)
moritz_ no, that's on purpose
Leland yea.. causes conflict with dynamic typing 15:48
PerlJam Leland: you can always redefine infix:<+> to be concatenation if you want :)
moritz_ in other languages (like javascript) the + stands for different operations depending on the type on the left side
in perl the + always stands for addtion, and forcefully coerces all operands to Num
Leland PerlJam: useful to know... though it could be useful for it to be dynamically overloaded if strict typedefs are used for the elements... is of typedef is Str then + = contact 15:49
concat
PerlJam moritz_: that's not quite true given MMD.
moritz_ PerlJam: right, but that's the design principle 15:50
15:50 dakkar left
Leland at least there's the flexibility to redefine the operators.. that in and of itself is a cool feature :) 15:50
moritz_ aye 15:51
PerlJam Leland: sub infix:<+>(Num $a, Str $b) { ... } # if that's a closer fit, that's the one that gets chosen.
moritz_ Perl 6 is designed with extensibility in mind
PerlJam Leland: beware over-specificity though
Leland PerlJam: can you override the definitions ?
PerlJam Leland: sure
Leland cool
moritz_ there's nearly nothing you can't override in Perl 6
PerlJam moritz_: what can't be overriden? I can't think of anything :) 15:53
Leland nice that you can override even basic operators though.. that's cool
KyleHa Someone should override overridability. 15:54
PerlJam Leland: and you can make up your own operators
Leland woot \o/
TimToady it's intentionally very difficult to override the definition of the language in someone else's lexical scope
PerlJam Leland: the canonical example is factorial: sub postfix:<!>($n) { [*] 1..$n }
moritz_ rakudo: sub postfix:<!>($n) { [*] 1..$n }; say 5! 15:55
p6eval rakudo 402470: OUTPUT«120␤»
PerlJam rakudo: sub postfix:<!>($n) { [*] 1..$n }; say 0!; # like magic! ;)
KyleHa I'm looking at this ticket: rt.perl.org/rt3/Public/Bug/Display.html?id=61844
p6eval rakudo 402470: OUTPUT«1␤» 15:56
KyleHa Those expressions don't kill rakudo anymore, but I don't know what they're supposed to do.
15:56 Exodist joined
moritz_ rakudo: say (1,2)[*..*] # empty list? 15:56
p6eval rakudo 402470: OUTPUT«Use of uninitialized value␤␤»
moritz_ rakudo: say (1,2)[*..*].PARRT 15:57
PerlJam moritz_: I'd guess [*..*] would give the whole thing.
p6eval rakudo 402470: OUTPUT«Method 'PARRT' not found for invocant of class 'Failure'␤»
moritz_ rakudo: say (1,2)[*..*].PARROT
p6eval rakudo 402470: OUTPUT«Failure␤»
moritz_ PerlJam: how so? it's not the same as [*]
KyleHa [*..*] is "whatever to whatever" ?
PerlJam KyleHa: right
moritz_ rakudo: say (0,)[*-1..*].PARROT
p6eval rakudo 402470: OUTPUT«List␤» 15:58
moritz_ rakudo: say (0,)[*-1..*]
p6eval rakudo 402470: OUTPUT«0Use of uninitialized value␤␤»
moritz_ that sounds right
PerlJam moritz_: In the spirit of "whatever", "whatever to whatever" means "everything" to me.
moritz_ PerlJam: in subscripts "whatever" means "number of items"
TimToady er, that's kind of a misstatement
whatever has no clue that it's in a subscript, ever 15:59
it's just some operators return WhateverCode, and a subscript will feed number of items to any WhateverCode it sees
*..* doens't return WhateverCode, so the subscript never feeds it :) 16:00
16:00 zamolxes left
moritz_ so what does *..* return, except a smiley? 16:00
KyleHa So should "(1,2)[*..*]" actually be Failure? 16:01
PerlJam Failure works for me. It allows growth for when we figure out something useful for it :0
er :)
moritz_ erm, Nil?
PerlJam There has to be *some* room for "this sequence of symbols is meaningless" 16:02
TimToady *..* is already defined to match anything Ordered currently
moritz_ so it's similar to -> *@a { [<=] @a] } ? 16:03
TimToady S03:2933
KyleHa Aha. 16:04
16:04 Psyche^ joined
KyleHa rakudo: say (1,2)[-Inf..+Inf] 16:04
p6eval rakudo 402470: ( no output )
KyleHa rakudo: say (1,2)[*..*]
p6eval rakudo 402470: OUTPUT«Use of uninitialized value␤␤» 16:05
TimToady was intended to be more like Orderable
KyleHa rakudo: say ((1,2)[-Inf..+Inf]) ~~ ((1,2)[*..*])
TimToady but given that Ordered isn't defined anywhere else in the specs, it's probably slightly bogus
16:05 takadonet joined
p6eval rakudo 402470: ( no output ) 16:05
takadonet hey everyone
16:06 Exodist left
KyleHa Maybe I'll just go look for one I can already figure out how to test. 16:06
moritz_ TimToady: just a quick sanity check, .int actually returns an int, .Int an Int, right? 16:07
KyleHa Opening up these dialogs always leaves me feeling slightly dizzy.
TimToady yes, they are simply typecasts
moritz_ KyleHa: i know that feeling :-)
PerlJam KyleHa: or convince TimToady to spec it in a way that makes sense for you to write a test :)
moritz_ ok, then Rakudo currently has it wrongish
TimToady permanent state of mind for me :)
I can argue that any negative subscript including -Inf should blow up, since we nailed down .[] subscripting to be 0-based always 16:08
and the *..* form was intended for pattern matching, not subscripting 16:09
PerlJam TimToady: could you expand on this sentence a bit: And even though C<*..*> can't be constructed at all, it's still useful as a selector object.
TimToady grep *..*, @list 16:10
16:10 last joined
TimToady if it means something like Orderable 16:10
but it's almost certainly clearer to use the role in that case
PerlJam TimToady: If @list were a Capture (or whatever the right term is these days), what would that mean? 16:11
TimToady the place you might want to use *..* is in a set of parallel when statements, where *..* matches the whole range always
and serves as a default, but slightly more specific than 'when *' 16:12
assuming it does represent a role, but it's certainly of marginal utility, in reality
PerlJam yeah, so I vote to get rid of it (if my vote has any weight)
TimToady Originally we thought *..* meant -Inf to Inf, but then we though it might want to generalize to non-numeric types 16:13
you have something against koalas?
huf you just broke my brain 16:14
PerlJam Only when they show up in the middle of Texas.
16:14 Leland left
TimToady but a slightly more useful variant would be *^..^*, which is everything except +/- Inf 16:14
PerlJam (or any other place that triggers me "non-native species" sense :)
TimToady hmm, I think the ^..^ is a wolf operator, so *^..^* would be a wolf in koala's clothing 16:15
but maybe it's just a dingo 16:16
PerlJam suddenly blames Damian 16:17
huf TimToady: that's clearly a cold cat. with earmuffs.
16:17 explorer joined
PerlJam rakudo: say 1..^5 16:17
p6eval rakudo 402470: OUTPUT«1234␤» 16:18
PerlJam rakudo: say 1^..^5
p6eval rakudo 402470: OUTPUT«234␤»
PerlJam rakudo: say 1^..^2
p6eval rakudo 402470: OUTPUT«␤»
PerlJam rakudo: say 1^..^1
p6eval rakudo 402470: OUTPUT«␤»
TimToady rakudo: say Inf.defined
p6eval rakudo 402470: OUTPUT«1␤»
TimToady so basically, *..* should exclude NaN, and *^..^* should also exclude -Inf and +Inf 16:19
16:19 Psyche^ is now known as Patterner
TimToady but match all the other Ints and Nums, for instance 16:20
perhaps that implies that -Inf/+Inf are considered Orderable 16:21
while NaN isn't
PerlJam IF ever I wanted that, I don't think I'd ever use *..* or *^..^*. I'd use a role or something instead. Anything were the symbology dial was turned down a bit. 16:22
s/were/where/
KyleHa If there are as many guesses about what cute critter an expression resembles as there are guesses about what the expression means...there's a serious comprehensibility problem. 16:23
PerlJam KyleHa: that may just be an issue of learning. 16:24
KyleHa Or perhaps there's an absurd comprehensibility problem.
PerlJam: Perhaps so. I'm new here.
PerlJam KyleHa: if the meaning of *..* falls out of the meaning of Whatever, then it makes enough sense that someone could figure it out if they didn't know what it meant.
16:25 barney left
PerlJam KyleHa: personally, *..* looks like a special case that I'd have to remember 16:25
TimToady the question is what DWIM means to someone who already knows the concepts of *..* and ^..^
KyleHa If that's the question, the answer can be had most precisely with a poll.
PerlJam heh 16:26
TimToady what would you expect 'a' .. * to mean?
KyleHa Survey says...hamster!
TimToady KyleHa: only if you can poll the future
pmichaud GOod morning, #perl6
PerlJam good morning pmichaud
TimToady language design is all about making decisions for people who can't know they're going to be polled in 20 years :) 16:27
KyleHa TimToady: Sadly, the only way in which I can poll the future is by pretending you meant "skewer."
PerlJam "making decisions for people who haven't even been born yet"
TimToady pmichaud++ just on general principles
takadonet morning pmichaud
TimToady okay, I'll go poll the skewer then :) 16:28
KyleHa Nyuck nyuck nyuck!
PerlJam rakudo: say 5^..^2
p6eval rakudo 402470: OUTPUT«␤»
TimToady PerlJam: perl never supports autoreversing ranges 16:29
PerlJam TimToady: I know, I'm just checking that rakudo does the right thing
TimToady I know, I was just checking that your brain does the right thing :) 16:30
PerlJam TimToady: my brain objects to *..* and ^..^ as there isn't enough context to figure out what it means :) 16:31
(Even when there *is* enough context, it's not really enough :)
TimToady isn't enough context to figure out what .. means either
16:31 rjh joined
dalek kudo: 03bc9da | pmichaud++ | docs/spectest-progress.csv:
spectest-progress.csv update: 415 files, 11796 passing, 0 failing
16:31
KyleHa "0 failing" FTW 16:32
pmichaud yes
TimToady we don't even know what "is" is without context :)
pmichaud the parrot folks did an awesome job on tracking down the gc-related bugs 16:33
TimToady +1 xx *
16:35 ujwalic joined 16:36 tann joined
TimToady PerlJam: and as you were pointing out to moritz_++ a bit ago, even + is ambiguous unless you know whether the user has defined extra candidates or not 16:36
[particle] pmichaud: are they all tracked down on all your test platforms now? 16:37
TimToady so I guess I don't know what you mean by "enough context". I don't have enough context... :)
pmichaud [particle]: 32-bit and 64-bit ubuntu, yes.
16:38 payload left, M_o_C left
[particle] well, heck, that's worth a celebratory email to the list. 16:38
pmichaud [particle]: we still have the "abort-on-exit" failures, but those don't directly impact Rakudo's usability as much as the gc failures do
[particle]: yes, I'm just getting started today :-)
16:38 REPLeffect joined 16:39 kane_ left
PerlJam TimToady: when presented with the tyranny of choice, I look for something concrete I can hang on to--a choice that makes sense under appropriate circumstances. These serve as guide-posts for a mental model. I guess I'm not finding enough guide posts that make *..* useful to me, so I'd rather use something a more verbose (and rather not have to suffer figuring out a future *..* when I cross it) 16:40
16:40 rfordinal joined
TimToady I feel similarly about Strange Words That Are Defined Somewhere Else 16:41
16:42 nihiliad left
TimToady to me, more verbose is just dehuffmanizing the same mysterious bits, it only feels more explanatory if you assume you know what the words mean, which is a linguistic illusion 16:44
16:45 donaldh left
[particle] words like TIMTOWTDI? 16:45
PerlJam But it's not an illusion! If you use the words consistently and define them to mean the mysterious mumble, then that's reality as far as most people are concerned. 16:46
16:46 Bruce joined
PerlJam They don't need to understand the mystery, just to know that input A gives output B and that it's consistent 16:46
16:46 ruoso joined
TimToady by that argument, they don't need to understand *^..^* either 16:47
PerlJam I guess so.
TimToady and operators tend to compose better than words
PerlJam Except that I expect more from *^..^* because it uses familiar symbols in a certain context.
TimToady which is why we all love to hate COBOL
PerlJam I think I still prefer the illusion of AllRealNumbers or NotANaN than *..* :) 16:49
TimToady what is the name of 'aaa' .. * then? 16:50
[particle] the string that shall not be named. 16:51
PerlJam that one I don't care to name :)
[particle] s/string/range/
PerlJam maybe I'm just trading one special case for another then.
ruoso Hello! 16:52
lisppaste3 Lorn pasted "recompiling re-smop" at paste.lisp.org/display/83520
Lorn ruoso: ^^ everything is up-to-date ( i did svn up few minutes ago )
ruoso Lorn, there's some issue with m0ld_exe in your env 16:55
Lorn, can you run ./m0ld_exe?
Lorn ruoso: yes, no errors
ruoso Lorn, and what about: ./m0ld_exe <<< 'my $x = 1' 16:56
Lorn ruoso: works fine, no errors 16:57
16:57 FurnaceBoy joined
KyleHa is ('not container' =:= 'not container') a failure, or just false? 16:57
ruoso what's the output?
Lorn ruoso: \n
ruoso Lorn, alright... you do have a problem 16:58
moritz_ KyleHa: I'd guess it'll fail()
KyleHa: (and by testing that you can define its behaviour thusly ;-)
ruoso pmurias, m0ld_exe is not working for Lorn... any idea why?
KyleHa moritz_: Yeah, maybe I'll do that.
Lorn ruoso: file m0ld_exe
m0ld_exe: empty
O_o 16:59
ruoso Lorn, remove the build directory and every file not in svn, then try doing make again
and paste that make
17:00 tann left
Lorn ruoso: now works! 17:00
ruoso hmmmm...
Lorn ruscons --clean 17:01
ruoso so... it's really slackware's fault ;) ;) ;)
Lorn ruoso: ops, scons --clean dont work ..
ruoso Lorn, make clean
then rm -rf build
Lorn ruoso: can we add rm -rf build in the Makefile?
ruoso: the scons --clean *is* the make clean 17:02
ruoso Lorn, not sure it is needed
pmurias skids: pong 17:03
Lorn ruoso: if you look in the Makefile clean: you will see just scons --clean, maybe some "rm -rf" will help
17:04 payload joined
Lorn maybe they will be added in the SConstruct ( makefile for scons ) i dont know 17:04
ruoso Lorn, does it build now?
Lorn ruoso: yes, now i'm trying re-mildew 17:05
pugs_svn r27527 | pmurias++ | [re-smop] make sure make clean cleans up everything 17:07
skids pmurias: from what I could get out of oprofile, mildew's biggest time committment is in allocs and frees. Especially hashes where each bucket is individually allocated.
Lorn ruoso: re-mildew compiles fine 17:08
pmurias: thanks! :)
ruoso Lorn, try make test in re-mildew now
17:09 kane_ joined
pmurias skids: so a hash bucket pool would speed things up? 17:10
Lorn ruoso: t/01-sanity - Ok
ruoso Lorn, there are a lot of tests... better wait them to finish 17:11
Lorn ruoso: i'm waiting just report 17:12
skids pmurias: probably. There's no particular call taking like 50% of the time or anything, but one of the leaders is hash_destr, which would be a simple free if a pool was (re)alloced.
Same probably goes for the way capture arrays are built. 17:13
pugs_svn r27528 | kyle++ | [t/spec] Incomplete test for RT #61918
r27529 | kyle++ | [t/spec] Test for RT #61928 from Todd Helper 17:14
r27530 | kyle++ | [t/spec] Add =:= failure tests to S03-operators/identity
r27531 | kyle++ | [t/spec] mv t/spec/S03-operators/identity t/spec/S03-operators/identity.t
r27532 | kyle++ | [t/spec] Fudge S03-operators/identity.t for Rakudo
Lorn ruoso: Can't locate Coro.pm 17:18
ruoso Lorn, that's almost fine... you won't be able to interoperate with p5, but you can install Coro and it will work 17:19
17:21 macae left
skids pmurias: release_code and smop_mold_frame_message are also standouts. 17:22
ruoso skids, smop_mold_frame_message is the runops of mold 17:24
skids ruoso: smop_mold_frame_message spends 30% of it's time in smop_nagc_release if I am reading this right. 17:25
KyleHa perl6: my $a='a'; say 'a' ~~ / $a /; 17:26
pmurias smop_nagc_release is the refcount decrement
p6eval rakudo 03bc9d: OUTPUT«Null PMC access in get_string()␤in regex PGE::Grammar::_block54 (/tmp/n8dRGxzJ17:1)␤called from Main (/tmp/n8dRGxzJ17:2)␤»
..pugs: OUTPUT«Error eval perl5: "if (!$INC{'Pugs/Runtime/Match/HsBridge.pm'}) {␤ unshift @INC, '/home/evalenv/pugs/perl5/Pugs-Compiler-Rule/lib';␤ unshift @INC, '/home/evalenv/pugs/third-party/Parse-Yapp/lib';␤ eval q[require 'Pugs/Runtime/Match/HsBridge.pm'] or die $@;␤}␤'Pugs::Runtime…
..elf 27532: OUTPUT«␤»
KyleHa std: my $a='a'; say 'a' ~~ / $a /; 17:27
p6eval std 27532: OUTPUT«ok 00:03 37m␤»
moritz_ it's allowed
just NYI
KyleHa The tests for scalars in a regex all say m/<{$var}>/ So is /$var/ OK?
Should it do what it does in Perl 5?
skids Hrm, it looks like smop_nagc_release and release_code can both call into each other, and that's what they spend a lot of time doing. 17:28
pmichaud $var / does a literal match against $var (assuming $var is a string)
moritz_ KyleHa: in the case of / $var / it never tries to compile $var as a regex
if $var is a string - literal match. If $var is a Regex => DWYM 17:29
KyleHa So in Perl 6, / $var / (when $var is a string) is like a Perl 5 (-1 != index $_, $var), sounds like.
moritz_ like /\Q$var\E/ 17:30
pmurias skids: are you working on it or should i clean it up?
KyleHa *nod*
Thanks!
moritz_ or like index, with the side effect of setting pos()
KyleHa Ah yeah. I never use pos(). Forgot about that part.
moritz_ ah well, without /g it's not even set, so ignore me ;-)
skids pmurias: no telling when I'll have my coding head on again. Hopefully I'll be in the mood sometime soon. The urge just hasn't hit lately, though. 17:31
moritz_ but other match variables are reset etc.
anyway, off to table tennis
ruoso skids, pmurias, is there a way to identify how many of this releases result in calls to DESTROYALL or to an actual free? 17:36
pugs_svn r27533 | kyle++ | [t/spec] Tests for RT #61960 17:37
pmurias ruoso: yes 17:38
ruoso pmurias, I'm guessing a lot of things get immediatly destroyed
which would explain why release takes so much more time than reference 17:39
while they are invoked in very similar rates
pmurias there's more spaghetti in the releases 17:40
ruoso pmurias, only when destroying 17:42
otherwise it's pretty much the same as reference 17:43
pmurias we could make _nofree the only option and make DESTROYALL call smop_nagc_free 17:45
(but i don't think that would improve performace)
17:48 payload left, explorer left, tann joined
ruoso pmurias, it wouldn't 17:49
pmurias, what would probably improve would be to abstract some abstractions ;)
pmurias, I mean, defining low-level shortcuts for common paths 17:50
tann why doesn't p6 take a step further and make parens optional for 'my', 'our'? ie. my $lo, $hi = $left, $right; 17:51
ruoso pmurias, and thus avoiding the creation of so many captures
and the consequent destroying of them
pmichaud tann: because of the precedence of "my" 17:53
tann: in this case, that would parse as (my $lo), $hi = $left, $right
skids
.oO(recyclable mold frames)
Lorn i got a warning in the t/benchmark.t "Use of uninitialized value in string.." ( statement_control.pm ) they try to eq without verify if the value/method exist example if ($m->{sym} eq 'unless'), does can i add a initial if like if (exists $m->{sym}) ... ? 17:54
ops re-mildew/t/benchmark.t
skids ruoso: 60% of the time when oprof found smop inside release_code, it was inside DESTROYALL 17:55
ruoso skids++ recycable mold frames is a really interesting idea 17:56
pmurias Lorn: the warning annoys me greatly so fix it if you know how
ruoso as well as recyclable captures
Lorn, pmurias, indeed.... i have no idea of where that warning comes from
17:56 Helios joined
tann pmichaud: shouldn't my/our be treated differently from a sub as they are used mainly as scoping declaratives? so, their terminated delims can be either '=' or ';' ? 17:57
pmurias recyclable yeast frames not mold frames are the future
ruoso pmurias, keeping a recycle bin for capture objects would probably help a lot too
Lorn ruoso, pmurias: i think it is becauce we try to use $m->{sym} without verify if they exist
ruoso meeting &
17:57 ruoso left
pmichaud tann: there are far more things that could "terminate" the my than just '=' or ';', though. 17:58
[particle] tann: my multi method foo($abc) { ... }
17:59 kate21de joined 18:02 cdarroch joined 18:06 SmokeMachine left
pugs_svn r27534 | pmurias++ | [re-smop] fix warning in mildew 18:07
pmurias Lorn: fixed the warning
Lorn pmurias: nice, let me see 18:12
18:15 sri_kraih left 18:33 payload joined 18:36 molaf joined 18:37 finanalyst joined
finanalyst hi. can anyone here help me with a Padre question. their server seems to be donw 18:41
down
i cant find how to get rakudo to execute a perl6 script 18:42
PerlJam finanalyst: perl6 scriptname
finanalyst: with appropriate path specification
finanalyst Perljam: sorry I know how to do it from command line. I mean inside padre. I understand I can run it within the system and get results in the Padre output window 18:44
PerlJam oh, sorry, I missed the padre context.
finanalyst i know its a bit off topic here, but not quite sure where to go for help
18:46 japhb joined
finanalyst problem seems to be with the environment settings but i cant figure out where they get set. 18:46
[particle] is there not a #padre? 18:48
yes, there is, on irc.perl.org.
finanalyst [particle]: thanx. will go there and try 18:49
[particle]: no one in #padre 18:51
[particle] ...on IRC.PERL.ORG
there are ~33 folks there last i checked :)
do you know how to get to another irc server?
finanalyst no
[particle] what irc client? 18:52
finanalyst jabber
sorry pidgin
[particle] ah, ok, i use pidgin
from the buddy list, Accounts menu
finanalyst then? 18:53
[particle] manage | add | protocol = irc, server = irc.perl.org, username = finanalyst | save
then from the buddies menu, you'll want to join a chat, using the new irc account, and room #padre 18:55
PerlJam [particle]++ 18:57
finanalyst [particle]: done that. but after join channel, it gives me a dialog with Channel: and Password: 18:58
[particle] try entering #padre, no password 18:59
finanalyst s/after/after Join a Chat/
[particle] i don't know that dialog
finanalyst tells me [email@hidden.address] disconnected 19:00
[particle] finanalyst: on your account details page (accounts|manage|select finanalyst|modify... 19:02
) 19:03
does it list protocol: irc | username: finanalyst | server: irc.perl.org | password: <blank> ?
finanalyst yes
blank
[particle] and the advanced tab 19:04
port: 6667 | encodings: UTF-8 | proxy type: 'use global proxy settings' ?
finanalyst username: finanalyst | Real Name 19:05
and those, but Use GNOME ProxySettings
[particle] ok, well that might work for you, but you may need to play with it
set it to whatever the irc.freenode.net settings are
finanalyst good point
finanalyst trying 19:06
KyleHa std: say qx/echo foo/
finanalyst the password is set.
p6eval std 27534: OUTPUT«ok 00:03 36m␤»
pmichaud rakudo: say qx/echo foo/; # just checking 19:07
p6eval rakudo 03bc9d: OUTPUT«operation not permitted in safe mode␤in Main (lib/Safe.pm:25)␤»
[particle] freenode has a registry for nicknames, so passwords are important
pmichaud \o/
[particle] irc.perl.org has no nickserv
finanalyst [particle]: I have tried both with pw and without. 19:10
[particle] sigh. 19:11
finanalyst Actually I connect to #perl6 using irc.ubuntu.com
[particle] /join #pidgin <-- it's on freenode :)
finanalyst frustration
[particle] yeah, i use pidgin on windows, so there are probably minor differences, and i'm no expert. sorry! 19:12
finanalyst thanx anyway
leedo you could try using that mibit web irc interface 19:14
www.mibbit.com/chat/ 19:15
sbp you can't use that on freenode anymore 19:18
19:18 eMaX joined
pugs_svn r27535 | kyle++ | [t/spec] more tests for qq:x 19:21
19:23 finanalyst left 19:24 masak left, finanalyst joined
szabgab finanalyst, have you solved your padre issue ? 19:25
finanalyst no not yet 19:26
trying to find a way onto #padre
szabgab what was the question ? how to run perl 6 code ?
finanalyst i have rakudo installed, 19:27
szabgab good
what os ?
finanalyst Ubuntu
19:28 jferrero joined
szabgab I hve two minutes to help you before I have to o :-) 19:28
go
finanalyst i have PERL6LIB and PARROT and LD_LIBRARY_PATH set in /etc/bash.bashrc 19:29
but when i do RUN & then env in Padre, I dont see PERL6LIB
szabgab what do you try to accomplish ? to run perl 6 code from Padre ? 19:30
19:30 payload1 joined, payload left
szabgab do you have a perl6 executable ? 19:30
oh and have you tried to run padre from the command prompt after you have confirmed that you have the environment variables? 19:31
or have you made an icon to launch padre ? 19:32
in the latter case your env variables might not be read as it is not running in the shell
finanalyst made an icon
ah!
19:33 ujwalic left
szabgab so try to run padre from the shell 19:34
finanalyst on running padre, I get an error message about not finding parrot.pm
or Parrot/Embed.pm 19:35
szabgab you don't need the Parrot plugin
you only need the Perl 6 plugin if you want to edit and run perl 6 files
finanalyst i get execvp(/perl6, /home/richard/development/RatingComparison/new/testpa.p6) failed with error 2! 19:36
for a simple say 'hi' script
i have the Perl 6 plugin.
19:36 davef joined
szabgab what is in the RAKUDO_DIR env variable ? 19:36
finanalyst not set
szabgab it should point to the directory where perl6 is 19:37
pugs_svn r27536 | pmurias++ | [re-smop] reduce starting hash_bucket number
finanalyst trying to st RAKUDO_DIR
szabgab so set it and then start padre again from the command line so it will see the new variable
finanalyst please note that is not in any of the documentation I could find
szabgab please either file a bug report on padre.perlide.org or send and e-mail to padre-dev 19:38
or if nothing works send an email to [email@hidden.address] I'll try to update the docs tomorrow
finanalyst, oh and is it working for you already ? 19:39
finanalyst still changing the setting. moment please
szabgab just remember you cannot run scripts that prompt() 19:40
or if you want you need to switch to run in xterm (you can do it in Preferences)
night & 19:41
finanalyst still not working. but good night and thanx for help 19:42
szabgab: got working!!!! 19:45
19:46 DemoPhreak is now known as DemoFreak 19:53 takadonet left 19:55 molaf left
KyleHa perl6: my $a = do BEGIN { time }; say $a 20:03
p6eval pugs: OUTPUT«300830613.879044␤»
..elf 27536: OUTPUT«Undefined subroutine &GLOBAL::time called at (eval 123) line 3.␤BEGIN failed--compilation aborted at (eval 123) line 3.␤ at ./elf_h line 5881␤»
..rakudo 03bc9d: OUTPUT«_block58␤»
20:14 skids left 20:16 icwiener_ joined 20:23 Bruce1 joined 20:27 Bruce1 left 20:28 Bruce1 joined, finanalyst left, jauaor left
szabgab finanalyst, I am glad it worked for you, it would be great if you could write down a step-by-step instruction - people who just learn it usually do it better than people who are supposed to already know 20:28
20:29 finanalyst joined 20:32 icwiener left, SmokeMachine joined 20:33 finanalyst left, jferrero left 20:36 Ehtyar joined 20:41 Bruce left 20:45 meppl left
KyleHa perl6: my $x; BEGIN { $x = 'begin'; say 'har' } 20:45
p6eval elf 27536, pugs: OUTPUT«har␤»
..rakudo 03bc9d: OUTPUT«Symbol '$x' not predeclared in <anonymous> (/tmp/hpHVtEdqRq:2)␤in Main (src/gen_setting.pm:456)␤»
[particle] rakudo: our $x; BEGIN { our $x = 'begin' }; print $x 20:51
p6eval rakudo 03bc9d: OUTPUT«begin»
[particle] ...current workaround for that behavior. 20:52
moritz_ rakudo: our $x; print $x; BEGIN { our $x = 'begin' }
p6eval rakudo 03bc9d: OUTPUT«begin»
[particle] KyleHa: what made you start those new test emails? 20:53
KyleHa I want to be able to open a ticket and see if it has tests written for it or not. 20:54
[particle] they're less than useful, without more content
like a diff of the added tests, or what lines they're on, or what revision they were committed, or *something*
moritz_ [particle]: they are useful for an implementor looking for tests 20:55
[particle] otherwise it's quite difficult to go to the ticket and see which tests are supposed to be for that ticket
moritz_ [particle]: did you actually try it?
[particle] try what?
moritz_ try to see which tests are associated with the ticket
KyleHa Look for the revision with the ticket number in the description, get the diff.
moritz_ often it's accompanied by a #?rakudo skip 'RT #\d+' 20:56
20:56 buubot left
KyleHa Or just "# RT #\d+" before the tests. 20:56
20:56 buubot joined
[particle] but this will change over time 20:57
when a test is modified for another issue at a later date
moritz_ but very slowly
[particle] yeah, now.
moritz_ when I update tests, I leave references to tickets in there
[particle] mail with the body: 20:58
This is an automatically generated mail to inform you that tests are now available in b/t/spec/S12-class/lexical.t
is not useful to me
what's b/ ?
KyleHa That's a bug I haven't fixed yet. 20:59
moritz_ part of the diff file name
[particle] so this mail is generated from a diff? why not include the whole diff for the file?
that way i can see the issue, and the proposed tests for it 21:00
moritz_ maybe not a bad idea
KyleHa Maybe the mail generator should be in the repo somewhere.
[particle] it gives me the ability to say, yes, these tests properly address the issue. let's resolve.
would be nice to have the script in the repo, and a bot running it, but i'm not able to help with that, just to offer constructive criticism :( 21:03
pmichaud right now does it actually generate mail, or does it just append to the ticket? 21:04
KyleHa It generates mail that gets appended to the ticket.
pmichaud (and then the ticket generates mail...)
KyleHa The email is sent to the ticket.
pmichaud right.
I don't think the script needs to include the diff -- it can just point to the diff via url or something. 21:05
as it is, I already get notification of the diff via the svn-commits mailing list
(although I'm thinking of unsubscribing as it's becoming very non-useful to me)
moritz_ but it's not in the ticket, so you have to make the connection yourself when you get back to it 3 months later 21:06
pmichaud right, which is why a url to the diff would be fine.
or even just the svn revision number.
as it stands now, though, just knowing the name of the file is a huge help.
[particle] yeah, url to diff, or svn number would be great
21:14 buubot left 21:15 buubot joined
moritz_ KyleHa: can you just put your current version into misc/commit-mails/ or so? 21:15
pmichaud looks like we need tests for <!> in t/spec/S05-* 21:18
moritz_ rakudo: say 'a' ~~ /<!>/ 21:19
p6eval rakudo 03bc9d: OUTPUT«get_attr_str() not implemented in class 'String'␤in regex PGE::Grammar::_block51 (/tmp/QEGq3PtOb9:1)␤called from Main (/tmp/QEGq3PtOb9:2)␤»
moritz_ where do we put such tests? 21:21
KyleHa I rewrote S04-closure-traits/in-eval.t. Can someone give me a san check? I don't want to commit if nobody can look at it.
moritz_ S05-mass/stdrules.t?
KyleHa: sure
21:21 meppl joined
KyleHa Thanks moritz_++ 21:22
pmichaud I haven't committed <!> to rakudo yet... just noticed we didn't have tests.
I'll be adding <!> as soon as my spectest run finishes.
pugs_svn r27537 | kyle++ | [t/spec] fix a copy/paste problem
r27538 | kyle++ | [t/spec] rewrite of S04-closure-traits/in-eval.t
21:24 pmurias left
moritz_ KyleHa: somehow I don't like the "eval first, then check $!" thing... 21:24
either use eval_lives_ok, or ok(eval '...; 1')
21:24 hercynium joined
KyleHa I do that since eval_lives_ok eats $! and sometimes I want to look at it. 21:24
moritz_ (maybe it's just because in Perl 5 it's evil, because DESTROY blocks can change $!) 21:25
KyleHa So ok(eval '...; 1'...) it is.
DESTROY eats $@ in Perl 5, but same thing.
moritz_ erm, yes
is $end, undef, '...' is not a good idea either 21:26
it warns
ok $end ~~ undef, '...'; # better
KyleHa OK.
pmichaud ok !$end.defined, '...' # better still
moritz_ from the quick review it seems fine otherwise
21:27 Khisanth left
moritz_ pmichaud: that used to not work for some values of undef in Rakudo 21:27
pmichaud then flag it as a bug :-)
moritz_ it's long been in RT
don't know if it's fixed by now
pmichaud me either.
moritz_ rakudo: my $x = try { 1/0 }; say $x.defined; say $!.defined 21:28
p6eval rakudo 03bc9d: OUTPUT«Null PMC access in isa()␤in Main (/tmp/8TxxQMh4Wf:2)␤»
moritz_ there you go.
KyleHa Ouch.
moritz_ so, ~~ undef it is for now :)
pmichaud okay, I'll go with that.
my $x = try { 1/0 }; say $x.PARROT;
rakudo: my $x = try { 1/0 }; say $x.PARROT;
p6eval rakudo 03bc9d: OUTPUT«Null PMC access in isa()␤in Main (/tmp/FU8DNNvOys:2)␤»
moritz_ rakudo: say (try { 1/0 }).PARROT 21:29
p6eval rakudo 03bc9d: OUTPUT«Null PMC access in find_method()␤in Main (/tmp/SjhovGP7u0:2)␤»
pmichaud rakudo: my $x = 1/0; say $x.PARROT;
p6eval rakudo 03bc9d: OUTPUT«Divide by zero␤»
moritz_ (I think the isa() points to the assignment op, but it's deeper than that it seems)
pmichaud that's wrong too.
moritz_ it should just fail(), right?
pmichaud oh, I suspect that try { 1/0 } is returning a null PMC 21:30
yes, I think it should just fail()
21:31 Khisanth joined, Whiteknight joined
KyleHa My code passed to eval_lives_ok dies. 21:33
passed to eval, however, it lives! 21:34
moritz_ wtf?
KyleHa lives_ok { eval_lives_ok 'nyuck nyuck nyuck' }, 'oh noes'
moritz_ rakudo: use Test; eval_lives_ok 'nyuck nyuck nyuck'
p6eval rakudo 03bc9d: OUTPUT«not ok 1 - ␤# Looks like you planned tests, but ran 1␤# Looks like you failed 1 tests of 1␤»
KyleHa And it eats $!, so I don't know why. 21:35
rakudo: use Test; eval_lives_ok '$handle = { $h ~= "1"; START { $h ~= "F" }; $h ~= "2" }';
p6eval rakudo 03bc9d: OUTPUT«not ok 1 - ␤# Looks like you planned tests, but ran 1␤# Looks like you failed 1 tests of 1␤»
pmichaud those should die.
$handle and $h aren't declared.
KyleHa rakudo: use Test;my $handle; my $h; eval_lives_ok ''$handle = { $h ~= "1"; START { $h ~= "F" }; $h ~= "2" }'; 21:36
p6eval rakudo 03bc9d: OUTPUT«Statement not terminated properly at line 2, near "$handle = "␤in Main (src/gen_setting.pm:3340)␤»
moritz_ ''$handle seems wrong
pugs_svn r27539 | moritz++ | [t/spec] simple tests for <!> in regex
KyleHa rakudo: use Test; my $handle; my $h ; eval_lives_ok '$handle = { $h ~= "1"; START { $h ~= "F" }; $h ~= "2" }';
p6eval rakudo 03bc9d: OUTPUT«not ok 1 - ␤# Looks like you planned tests, but ran 1␤# Looks like you failed 1 tests of 1␤» 21:37
KyleHa rakudo; use Test; my $handle; my $h; eval '$handle = { $h ~= "1"; START { $h ~= "F" }; $h ~= "2" }'; ok ! $!, 'oh hai';
rakudo: say hi 21:39
p6eval rakudo 03bc9d: OUTPUT«Could not find non-existent sub hi␤»
KyleHa rakudo: use Test; my $handle; my $h; eval '$handle = { $h ~= "1"; START { $h ~= "F" }; $h ~= "2" }'; ok $! !~~ Exception, 'goodness';
p6eval rakudo 03bc9d: OUTPUT«ok 1 - goodness␤# Looks like you planned tests, but ran 1␤»
KyleHa There.
I shall now remain prejudiced against eval_lives_ok. 21:40
moritz_ KyleHa: please open a ticket for that
KyleHa Is that a bug in Rakudo or Test.pm?
moritz_ rakudo: try { 1 / 0 }; say $! ~~ Exception
p6eval rakudo 03bc9d: OUTPUT«1␤» 21:41
pmichaud rakudo: eval '1 / 0'; say $! ~~ Exception
p6eval rakudo 03bc9d: OUTPUT«1␤»
pmichaud rakudo: say $! ~~ Exception
p6eval rakudo 03bc9d: OUTPUT«0␤»
pugs_svn r27540 | kyle++ | [t/spec] adjust in-eval.t tests after review from moritz++ 21:44
Tene rakudo: say $!.perl
p6eval rakudo 03bc9d: OUTPUT«undef␤»
pugs_svn r27541 | kyle++ | [misc] the script used to report tests to RT 21:46
KyleHa I'm going to postpone my eval_lives_ok bug report for a while. It's time to commute home and do battle with family members under the age of 10. 21:47
moritz_ good luck then 21:49
KyleHa Thanks.
literal is this up to date? svn.pugscode.org/pugs/docs/Perl6/FAQ/Capture.pod 21:50
KyleHa literal: I don't know, but it sure would be nice if it were. 21:51
moritz_ I think so, mostly
KyleHa Made a pretty good read on the train one day.
moritz_ there has been lots of discussion here about captures, with many ideas 21:52
but I don't think any of them made it into the specs yet
21:52 KyleHa left 21:54 Limbic_Region joined
pmichaud Capture.pod is almost certainly _not_ up to date. 22:02
22:20 iblechbot left 22:29 alester left
s1n pmichaud: ping 23:00
23:00 payload1 left 23:01 skids joined 23:02 Bruce1 left 23:07 jauaor joined
literal pmichaud: ok 23:08
23:08 kst joined 23:10 ihrd joined 23:11 ihrd left
literal I'm making a release of Perl6::Doc and I'm removing some things (for now) that aren't up to date 23:14
pmichaud s1n: pong 23:22
s1n pmichaud: i have a question or two about WALK 23:27
pmichaud they need to be quick -- I just got called to dinner
s1n is the :name parameter always required?
pmichaud I don't know.
s1n and if so, does it return the methods that match?
it's used in S12 as if it returns the methods, not the classes 23:28
pmichaud I didn't write .WALK, nor the spec. I can read up on it after dinner and perhaps give an answer, though.
I'm fairly certain that .WALK walks methods, not classes.
s1n i thought it walked class hierarchy
pmichaud because we focus more on multimethods
well, it walks class hierarchy to the degree that some methods overload others
s1n well if a method is overloaded, is it still a candidate? 23:29
pmichaud I think so.
s1n hmm interesting
pmichaud it's just a more specific candidate by virtue of the invocant type
s1n i would have thought an overloaded method in a derived class would mask the base class method of the same signiture
pmichaud (I may be way off here... I have not studied the spec closely)
s1n the spec is _very_ limited in it's discussion of WALK 23:30
pmichaud sure.
anyway, I'll read it after dinner and maybe I can answer better later (or tomorrow at p6m)
s1n okay
pmichaud gotta run or I'll be in doghouse. 23:31
s1n i'll post my writeup, feel free to comment, i'm going to read it at p6m tommorrow
23:35 DemoFreak left 23:39 payload joined
s1n pmichaud: if i start at a base class, are the derived overloads available for dispatch as well (the opposite of the question i previously asked) 23:57
i.e. can .WALK find derived class' overloaded methods when doing $base.WALK? 23:58