»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend!
Set by sorear on 4 February 2011.
lue what file is that in? 00:06
benabik src/gen/perl6-grammar.pir 00:08
benabik Hm… ".annotate 'line', 1000 […] # rx literal "Capture[0x4b020388]"" 00:10
I'm guessing something's getting into the regex compiler that's not supposed to.
lue benabik: that's a generated file. 00:12
benabik lue: I know. But why is it trying to match against a "Capture[HEXVALUE]" in a grammar? 00:13
lue not sure. I don't know how the conversion to pir works. 00:14
benabik The code generating it is "token special_variable:sym['$<']" 00:15
That appears to be the only sym[] in the files. 00:16
flussence the other ones probably use <>-quotes 00:20
benabik NQP doesn't appear to handle sym['$<'] the way Rakudo's grammar expects. The generated PIR seems to try to match "Capture[0xdeadbeef]" instead of '$<'. I'll look into it in a bit if nobody else gets a chance. 00:38
benabik hopes somebody else gets a chance.
soh_cah_toa pmichaud: ping 01:10
TimToady tadzik++ for fixing MAIN, which fixes quite a few RC entries 01:45
benabik And --target=past doesn't seem to be useful for nom… "Cannot call a method on type variable $?CLASS" 01:48
sorear Does m:pos($p):global make any sense? 02:08
we have some tests for s:global:pos(True) 02:09
abercrombie Hi #perl6. A section from S04: you must either use the curly form or surround the entire expression in brackets of some sort: @primesquares = (do $_ if prime($_) for 1..100) >>**>> 2; My question is: What is the according curly form? Thanks. 03:58
mberends perl6: sub prime($i) {my $p=True; for 2..sqrt($i) -> $n {$p=False if $i%$n==0}; return $p}; my @primesquares = do {$_ if prime($_) for 1..100} »**» 2; say @primesquares.perl; # abercrombie, but ey's quit 05:25
p6eval rakudo a55346: OUTPUT«[1, 4, 9, 25, 49, 121, 169, 289, 361, 529, 841, 961, 1369, 1681, 1849, 2209, 2809, 3481, 3721, 4489, 5041, 5329, 6241, 6889, 7921, 9409]␤»
..pugs: OUTPUT«decodeUTF8': bad data: '\187'␤decodeUTF8': bad data: '\187'␤*** ␤ Unexpected "@primesquares"␤ expecting "=", operator, "}", context, ":" or "("␤ at /tmp/Y2EM9RYyAM line 1, column 89␤»
..niecza v8-52-g3afe236: OUTPUT«Unhandled exception: No value for parameter $val in CORE _hyper_type␤ at /home/p6eval/niecza/lib/CORE.setting line 0 (CORE _hyper_type @ 0) ␤ at /home/p6eval/niecza/lib/CORE.setting line 1668 (CORE hyper @ 2) ␤ at /tmp/rfvDA3iLPo line 1 (MAIN mainline @ …
dalek odel: 816dda0 | (Martin Berends)++ | c/t (14 files):
odel/c] many small build and testing changes
05:32
dalek atures: 59f5eea | larry++ | features.json:
upgrade nom to partial impl of MAIN

nom does MAIN now thanks to tadzik++, but not --help
06:37
sorear niecza: $_ = "foo"; s/o/a/g; say $_ 06:59
p6eval niecza v8-52-g3afe236: OUTPUT«===SORRY!===␤␤Unsupported use of suffix regex modifiers; in Perl 6 please use prefix adverbs at /tmp/xHYoFlmEAl line 1:␤------> $_ = "foo"; s/o/a/g⏏; say $_␤Other potential difficulties:␤ Unsupported use of /g; in Perl …
sorear niecza: $_ = "foo"; s/o/a/ :g; say $_
p6eval niecza v8-52-g3afe236: OUTPUT«faa␤»
sorear TimToady: why is the second allowed but the first forbidden?
TimToady it was an accident :)
(that the second is allowed) 07:00
sorear should the second be forbidden?
TimToady <shrug>
probably
I can argue it both ways 07:01
certainly it cannot be used for something like :P5 07:03
sorear can't even be used for :i
TimToady conservative thing is to ban it for now 07:04
otherwise we just confuse people for little gain
sorear erroneously, or take measures to detect and stop it?
currently niecza allows adverbs on anything that desugars to a sub or method call 07:05
I could wrap up regexes in some kind of Paren-like node that fails adverbing
TimToady that might be wise, if it's not too much trouble
otherwise erroneous is okay 07:06
prefix-y adverbs are really more like traits, really 07:07
really, even...
m is i /foo/ :)
at least they'll get a dispatch error to trait-ish modifiers that have no run-time interface 07:08
it could be argued that putting them after is good documentation of run-time-ness, I suppose 07:09
tadzik good morning #perl6 07:15
sorear good morning tadzik 07:17
moritz good *, * 07:18
TimToady should sleep, lest he overshoot and end up on HI time... 07:24
zzz &
sorear niecza: sub foo() { say CALLER::<$/>.to }; { "abc" ~~ /b/; foo; } 07:27
p6eval niecza v8-52-g3afe236: OUTPUT«2␤»
dalek ecs: 3ac1098 | tadzik++ | S26-documentation.pod:
Disallow Pod blocks inside of Formatting Codes.
09:10
ecs: bf64672 | tadzik++ | S26-documentation.pod:
Clarify the implicit ending of formatting codes
dalek ecza: a014f92 | sorear++ | / (3 files):
Add regex match modifiers, :pos :continue :nth :x
09:26
ast: 813188e | sorear++ | S05-modifier/pos.t:
Fudge S05-modifier/pos.t for niecza
09:27
sorear Could someone please look at line 25 of S05-modifier/counted.t and tell me if/why it is correct? 09:30
surely "abcd" ~~ m:nth(0)/./ should find 'a', the 0th match 09:31
moritz 'a' would be the 1st match 09:33
sorear flussence: ping 09:52
dalek ecza: 5b8523c | sorear++ | lib/ (2 files):
Add &dir
moritz rakudo: say dir[0..5] 09:54
p6eval rakudo a55346: OUTPUT«Operation not permitted in safe mode␤ in 'Safe::forbidden' at line 2:/tmp/Th1XenJTry␤ in main program body at line 22:/tmp/Th1XenJTry␤»
sorear out 09:57
moritz nom: say pir::new__PS().readdir(nqp::unbox_s('.')).WHAT 10:05
p6eval nom: OUTPUT«===SORRY!===␤error:imcc:The opcode 'new_p' (new<1>) was not found. Check the type and number of the arguments␤ in file '(file unknown)' line 34373297␤»
moritz nom: say pir::new__PS('IO').readdir(nqp::unbox_s('.')).WHAT
p6eval nom: OUTPUT«Class 'IO' not found␤ in mu <anon> at /tmp/moERnVo_SK:1␤ in mu <anon> at /tmp/moERnVo_SK:1␤␤»
moritz nom: say pir::new__PS('OS').readdir(nqp::unbox_s('.')).WHAT
p6eval nom: OUTPUT«Can only use get_what on a SixModelObject␤ in mu <anon> at /tmp/oRJxckANeP:1␤ in mu <anon> at /tmp/oRJxckANeP:1␤␤»
moritz nom: pir::say pir::typeof pir::new__PS('OS').readdir(nqp::unbox_s('.')) 10:06
p6eval nom: OUTPUT«ResizableStringArray␤»
flussence sorear++ # niecza passes 17 T-T-W tests and I found a bug in my own code because of it 10:35
whoops, it passes 81 now 10:43
dalek kudo/nom: eee43c6 | moritz++ | / (2 files):
implement &dir
11:22
moritz niecza: say dir 12:06
p6eval niecza v8-54-g5b8523c: OUTPUT«Unhandled exception: CORE dir may not be used in safe mode␤ at /home/p6eval/niecza/lib/CORE.setting line 0 (CORE dir @ 0) ␤ at /tmp/uZ2l4LNrDR line 1 (MAIN mainline @ 1) ␤ at /home/p6eval/niecza/lib/CORE.setting line 2050 (CORE C949_ANON @ 2) ␤ at /home…
moritz nom: say dir
p6eval nom: OUTPUT«60␤.vim std_mine sprixel Perlito .ccache old_perl5 niecza mono-2.10.1.tar.bz2 .cache partcl-nqp log .pugs_history .bash_history nqp std_hilited 6model _sprixel01 p1 rakudo-star-2011.04.tar.gz .lesshst .aptitude .bashrc .cpanm nom-inst2 rakudo-star-2010.09 .ghc perl5 evalbot … 12:06
moritz LHF: implement &first 12:09
flussence moritz++ # nom's passing 4 of those tests now too :D 13:41
flussence nombug? This works if I change the * to a normal closure: github.com/flussence/Text-Tabs-Wra...abs.pm#L58 13:55
(it also works with ».subst ...why didn't I just do that in the first place? :) 13:56
flussence
.oO( wtf is github doing to the character encoding on the code there? )
14:04
[Coke] I just built parrot-latest, then tried to build nqp latest.. .and it says i need 370 but only have 360. wtf. 14:34
(but it's a problem with my parrot, no doubt. just annoying) 14:41
[Coke] (someone managed to do a build & install to the wrong directory, my bad. ;) 15:07
[Coke] t\nqp\05-comments.t fails on windows. 15:11
jnthn home 18:03
moritz \o 18:06
amuleto histred 18:10
moritz idlewords.com/2011/08/why_arabic_is_terrific.htm 18:28
sorear good * #perl6 19:15
moritz \o 19:17
masak oh hai #perl6 19:26
sorear Hi masak. 19:27
masak back in .se \o/ 19:28
moritz nom: say join 19:29
p6eval nom: OUTPUT«␤»
moritz perl6: say join
p6eval pugs: OUTPUT«*** No compatible multi variant found: "&join"␤ at /tmp/bt0oWcyFrY line 1, column 5 - line 2, column 1␤»
..niecza v8-54-g5b8523c: OUTPUT«Unhandled exception: No value for parameter $tween in CORE join␤ at /home/p6eval/niecza/lib/CORE.setting line 0 (CORE join @ 0) ␤ at /tmp/3SZmPrUer4 line 1 (MAIN mainline @ 1) ␤ at /home/p6eval/niecza/lib/CORE.setting line 2050 (CORE C949_ANON @ 2) ␤ at…
..rakudo a55346: OUTPUT«␤»
masak '$tween', cute. :) 19:31
moritz found the construct multi join($sep = '', *@values) curious 19:32
masak why? 19:35
sorear seems ... wrong and useless ... to me
moritz masak: because the default can never take effect, unless there are no arguments at all 19:36
how often does one want an empty join?
masak probably not that often.
moritz I mean the only way to get that without it being an obvious bug if you interpolate arguments like join |@things
masak named arguments? 19:37
moritz and even then it's likely a bug if @things are empty
masak: we removed that feature, remember? :-)
masak moritz: we didn't kill it all the way dead. :/ 19:38
sorear join |@things is wrong regardless, since it treats @things[0] as the 'tween 19:38
moritz sorear: if that's what the user wants, it might not be wrong 19:39
sorear like how sort @list's behavior of treating @list[0] as the comparison function if Callable is quite bogus imo
moritz sorear: so what would you do? always require a comparison block? require it to be named? 19:40
sorear I like the named argument idea 19:41
sorear what is the interaction between :nth and :global? 19:42
some more of these tests don't make sense
moritz :global is like :x(1..*) 19:44
sorear what should s:nth(2):global do?
moritz match once only
sorear the tests say it should replace half of the occurrences. which is _insane_
moritz it is, and conforms to an old spec 19:45
the new spec says you need to write that as :nth(2, 4 ... *):g
(maybe it works without the :g too, dunno)
sorear: feel free to rip that test out, or correct it 19:46
sorear also, what in the world does m:x(2) mean
moritz it means "match exactly twice"
just one match => fail
after the second match is found, it stops looking
sorear and it returns... what? 19:47
moritz what does m:g return? a Match with all submatches as positional captures? or a list of Match objects?
flussence AIUI :g is just shorthand for :nth(1,2...*), if that makes sense 19:48
moritz flussence: no, I think it's short for :x(1..*) 19:49
sorear I'm interpreting lack of :nth (or rather, !defined($nth)) as meaning :nth(1,2...*)
moritz sorear: that's correct
sorear I'm not sure if :nth(Any) should really be allowed, but Perl 6 doesn't have an :opt_flag syntax 19:50
flussence oh, I forgot :x was there
moritz sorear: I think rakudo also checks $nth.defined 19:51
it's the best we can do without resorting to an exponential number of multi candidates :-)
masak tadzik: yes, one of my presentation systems runs Perl 6. but I've really only used it once, and it produced a baziljonabyte-sized PDF. (not Perl 6's fault, it just used big background images on every slide.) haven't used it since. 19:57
sorear masak: vectorize! 19:58
masak: was this the scaling-image-views one? 19:59
masak no, that one came out fine (and was written in Perl 5) 20:00
sorear looks like I'm rewriting Cool.match in Perl 6...hopefeully this won't cause too uch of a performance regression
masak vectorizing is an intriguing idea.
sorear I need to steal nom's native type semantics
since people seem to be happy with them
moritz sorear: it might be a bit too early to comment on that generally, but I feel that the presence of boxing and unboxing primitives makes things very clear to me 20:01
sorear moritz: sorry, I haven't personally used nom native types.
moritz ie you always know exactly if you have an Int or an int, and if you subclass Int, you can do the instantiation just be boxing a native int into SubclassOfInt 20:02
masak I plan to send a summary email to the p6l thread: "so, Damian says we must have the feature, and Stefan says that any known slicing of the feature is worse than the original problem. any other takers?" 20:05
perhaps not worded exactly that way... :) 20:06
dalek kudo/nom: a638825 | moritz++ | / (2 files):
implement &first, run tests
20:07
moritz "... and one really weird opinion that proposes we change the entire Perl 6 object system from ground up, without providing much details"
sorear I wonder if Darren knows that Perl 6 is 10 years old and has multiple users.
masak some people on p6l seem to live in some blissful unawareness of this. 20:10
but it's not so strange. the model on which p6l is founded is from a time when there weren't any users of the language. 20:11
some people from that time remain.
it's up to us users to make use of p6l in a way which befits Perl 6's state of today.
soh_cah_toa pmichaud: ping 21:30
i got a question about the skip() sub in Test. it doesn't seem to work with a SKIP {} block like the one in Test::More. all it does is add an extra test saying that it was skipped which doesn't make much sense. am i not doing this right? 21:40
also, i thought that specifying a count would mean "skip this many tests after me" but all it really does is add extra skip tests
masak it should add skip tests, and then not run the tests that were skipped. does that answer your question? 21:51
'night, #perl6 21:52
soh_cah_toa well, it doesn't actually skip anything though 21:52
that was my concern 21:53
tadzik hello #perl6 21:54
soh_cah_toa tadzik: hey, maybe you can help 21:55
tadzik maybe
soh_cah_toa just backscroll. i think maybe i'm misunderstanding skip() 21:56
tadzik soh_cah_toa: I think it's just “those $n tests segfault so I'll just comment them out and skip() them” 21:57
soh_cah_toa well, even if they fail they're not skipped 21:58
anything after is still tested
tadzik you don't even run them, that's the point
it's not like todo() 21:59
it's like “here be 5 passing tests”
soh_cah_toa look here nopaste.snit.ch/paste 22:01
how do you skip test 3? 22:02
tadzik I think you didn't mean that url
soh_cah_toa yeah, wait
nopaste.snit.ch/73331
there
tadzik you really want todo in this case
soh_cah_toa hm, ok 22:03
tadzik skip is useful if you have the next test commented out, but don't want to break plan
soh_cah_toa oh, i see
tadzik say, test 2 segfaults. You don't really want it to be ran, do you
then you just skip() it
(that's how I understand it, YMMV)
soh_cah_toa that's why i didn't understand b/c i was using plan * 22:04
soh_cah_toa i had an idea for a does_ok() sub. kinda like isa_ok() except it checks for roles instead of inheritance. anyone think that's a good idea? i could easily add it 22:10
Ledrug Does anyone know what may cause error 137 when building rakudo? I got that building Rakudo Star 2011.07 22:15
lue hello world o/ 22:20
sorear hi 23:02
[Coke] plan * is ortho to skip. 23:07
dalek kudo/nom: b729151 | Coke++ | t/spectest.data:
track failure mode
23:59