Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2011-08-21

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:06 lue what file is that in?
00:08 benabik src/gen/perl6-grammar.pir
00:10 benabik Hm…  ".annotate 'line', 1000 […] # rx literal "Capture[0x4b020388]""
00:10 benabik I'm guessing something's getting into the regex compiler that's not supposed to.
00:12 lue benabik: that's a generated file.
00:13 benabik lue: I know.  But why is it trying to match against a "Capture[HEXVALUE]" in a grammar?
00:14 lue not sure. I don't know how the conversion to pir works.
00:15 benabik The code generating it is "token special_variable:sym['$<']"
00:16 benabik That appears to be the only sym[] in the files.
00:20 flussence the other ones probably use <>-quotes
00:36 alim joined #perl6
00:38 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.
00:58 drbean joined #perl6
00:58 soh_cah_toa joined #perl6
01:10 soh_cah_toa pmichaud: ping
01:13 Woodi joined #perl6
01:24 sftp joined #perl6
01:29 REPLeffect joined #perl6
01:45 TimToady tadzik++ for fixing MAIN, which fixes quite a few RC entries
01:48 benabik And --target=past doesn't seem to be useful for nom…  "Cannot call a method on type variable $?CLASS"
02:08 sorear Does m:pos($p):global make any sense?
02:09 sorear we have some tests for s:global:pos(True)
02:44 tokuhirom joined #perl6
02:51 TiMBuS joined #perl6
02:57 TiMBuS joined #perl6
03:09 simcop2387 joined #perl6
03:23 Su-Shee_ joined #perl6
03:40 Moukeddar joined #perl6
03:46 soh_cah_toa joined #perl6
03:53 ponbiki joined #perl6
03:58 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 drbean joined #perl6
04:17 ponbiki joined #perl6
04:35 kaare__ joined #perl6
04:38 cotto joined #perl6
04:40 ponbiki joined #perl6
04:46 ponbiki joined #perl6
05:05 Moukeddar_ joined #perl6
05:22 ponbiki joined #perl6
05:25 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]␤»
05:25 p6eval ..pugs: OUTPUT«decodeUTF8': bad data: '\187'␤decodeUTF8': bad data: '\187'␤*** ␤    Unexpected "@primesquares"␤    expecting "=", operator, "}", context, ":" or "("␤    at /tmp/Y2EM9RYyAM line 1, column 89␤»
05:25 p6eval ..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 @ …
05:32 dalek 6model: 816dda0 | (Martin Berends)++ | c/t (14 files):
05:32 dalek 6model: [6model/c] many small build and testing changes
05:32 dalek 6model: review: https://github.com/jnthn/6model/commit/816dda0e81
05:57 ponbiki joined #perl6
06:06 snarkyboojum joined #perl6
06:11 ponbiki joined #perl6
06:21 ponbiki joined #perl6
06:33 ponbiki joined #perl6
06:37 dalek features: 59f5eea | larry++ | features.json:
06:37 dalek features: upgrade nom to partial impl of MAIN
06:37 dalek features:
06:37 dalek features: nom does MAIN now thanks to tadzik++, but not --help
06:37 dalek features: review: https://github.com/perl6/f​eatures/commit/59f5eea2b1
06:44 ponbiki joined #perl6
06:59 sorear niecza: $_ = "foo"; s/o/a/g; say $_
06:59 p6eval niecza v8-52-g3afe236: OUTPUT«[31m===[0mSORRY![3​1m===[0mâ�¤â�¤Unsupported use of suffix regex modifiers; in Perl 6 please use prefix adverbs at /tmp/xHYoFlmEAl line 1:â�¤------> [32m$_ = "foo"; s/o/a/g[33mâ��[31m; say $_[0mâ�¤Other potential difficulties:â�¤  Unsupported use of /g; in Perl …
06:59 sorear niecza: $_ = "foo"; s/o/a/ :g; say $_
06:59 p6eval niecza v8-52-g3afe236: OUTPUT«faa␤»
06:59 sorear TimToady: why is the second allowed but the first forbidden?
06:59 TimToady it was an accident :)
07:00 TimToady (that the second is allowed)
07:00 sorear should the second be forbidden?
07:00 TimToady <shrug>
07:00 TimToady probably
07:01 TimToady I can argue it both ways
07:03 TimToady certainly it cannot be used for something like :P5
07:03 sorear can't even be used for :i
07:03 TimToady conservative thing is to ban it for now
07:04 TimToady otherwise we just confuse people for little gain
07:04 sorear erroneously, or take measures to detect and stop it?
07:04 sorear currently niecza allows adverbs on anything that desugars to a sub or method call
07:05 sorear I could wrap up regexes in some kind of Paren-like node that fails adverbing
07:05 TimToady that might be wise, if it's not too much trouble
07:06 TimToady otherwise erroneous is okay
07:07 TimToady prefix-y adverbs are really more like traits, really
07:07 TimToady really, even...
07:07 TimToady m is i /foo/  :)
07:08 TimToady at least they'll get a dispatch error to trait-ish modifiers that have no run-time interface
07:09 TimToady it could be argued that putting them after is good documentation of run-time-ness, I suppose
07:09 ponbiki joined #perl6
07:15 tadzik good morning #perl6
07:17 sorear good morning tadzik
07:17 ponbiki joined #perl6
07:18 moritz good *, *
07:24 * TimToady should sleep, lest he overshoot and end up on HI time...
07:24 TimToady zzz &
07:25 Mowah joined #perl6
07:27 sorear niecza: sub foo() { say CALLER::<$/>.to }; { "abc" ~~ /b/; foo; }
07:27 p6eval niecza v8-52-g3afe236: OUTPUT«2␤»
07:28 Alias joined #perl6
07:28 MayDaniel joined #perl6
07:32 alim joined #perl6
07:55 woosley joined #perl6
08:10 alim joined #perl6
08:19 ponbiki joined #perl6
08:22 Mowah joined #perl6
08:24 Mowah left #perl6
08:24 wamba joined #perl6
08:33 MayDaniel joined #perl6
08:37 rafl left #perl6
08:47 im2ee joined #perl6
08:49 ponbiki joined #perl6
09:00 ponbiki joined #perl6
09:10 dalek specs: 3ac1098 | tadzik++ | S26-documentation.pod:
09:10 dalek specs: Disallow Pod blocks inside of Formatting Codes.
09:10 dalek specs: review: https://github.com/perl6/specs/commit/3ac10981f1
09:10 dalek specs: bf64672 | tadzik++ | S26-documentation.pod:
09:10 dalek specs: Clarify the implicit ending of formatting codes
09:10 dalek specs: review: https://github.com/perl6/specs/commit/bf64672f51
09:18 mj41 joined #perl6
09:25 ponbiki joined #perl6
09:26 dalek niecza: a014f92 | sorear++ | / (3 files):
09:26 dalek niecza: Add regex match modifiers, :pos :continue :nth :x
09:26 dalek niecza: review: https://github.com/sorear/niecza/commit/a014f92144
09:27 dalek roast: 813188e | sorear++ | S05-modifier/pos.t:
09:27 dalek roast: Fudge S05-modifier/pos.t for niecza
09:27 dalek roast: review: https://github.com/perl6/roast/commit/813188eafa
09:30 sorear Could someone please look at line 25 of S05-modifier/counted.t and tell me if/why it is correct?
09:31 sorear surely "abcd" ~~ m:nth(0)/./ should find 'a', the 0th match
09:33 Tedd1 joined #perl6
09:33 moritz 'a' would be the 1st match
09:48 birdwindupbird joined #perl6
09:52 sorear flussence: ping
09:52 dalek niecza: 5b8523c | sorear++ | lib/ (2 files):
09:52 dalek niecza: Add &dir
09:52 dalek niecza: review: https://github.com/sorear/niecza/commit/5b8523c9ea
09:53 woosley left #perl6
09:54 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␤»
09:56 drbean joined #perl6
09:57 * sorear out
10:04 ponbiki joined #perl6
10:05 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␤»
10:05 moritz nom: say pir::new__PS('IO').readdir(nqp::unbox_s('.')).WHAT
10:05 p6eval nom: OUTPUT«Class 'IO' not found␤  in mu <anon> at /tmp/moERnVo_SK:1␤  in mu <anon> at /tmp/moERnVo_SK:1␤␤»
10:05 moritz nom: say pir::new__PS('OS').readdir(nqp::unbox_s('.')).WHAT
10:05 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␤␤»
10:06 moritz nom: pir::say pir::typeof pir::new__PS('OS').readdir(nqp::unbox_s('.'))
10:06 p6eval nom: OUTPUT«ResizableStringArray␤»
10:12 wamba joined #perl6
10:12 wamba left #perl6
10:15 ponbiki joined #perl6
10:27 whiteknight joined #perl6
10:29 ponbiki joined #perl6
10:35 flussence sorear++ # niecza passes 17 T-T-W tests and I found a bug in my own code because of it
10:43 flussence whoops, it passes 81 now
10:45 HarryS joined #perl6
10:46 MayDaniel joined #perl6
10:47 ponbiki joined #perl6
10:49 wamba joined #perl6
10:59 woosley joined #perl6
11:22 dalek rakudo/nom: eee43c6 | moritz++ | / (2 files):
11:22 dalek rakudo/nom: implement &dir
11:22 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/eee43c606c
11:26 ponbiki joined #perl6
11:29 uasi joined #perl6
11:47 JimmyZ joined #perl6
11:56 ponbiki joined #perl6
12:06 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…
12:06 moritz nom: say dir
12:06 im2ee joined #perl6
12:06 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:09 moritz LHF: implement &first
12:11 ponbiki joined #perl6
12:11 im2ee joined #perl6
12:25 perl6 joined #perl6
12:32 ponbiki joined #perl6
12:36 woosley joined #perl6
12:41 JimmyZ joined #perl6
12:55 ponbiki joined #perl6
13:10 abercrombie joined #perl6
13:20 Tedd1 joined #perl6
13:25 ponbiki joined #perl6
13:41 uniejo_ joined #perl6
13:41 flussence moritz++ # nom's passing 4 of those tests now too :D
13:55 flussence nombug? This works if I change the * to a normal closure: https://github.com/flussence/Text-Tabs​-Wrap/blob/master/lib/Text/Tabs.pm#L58
13:56 flussence (it also works with ».subst ...why didn't I just do that in the first place? :)
13:59 tokuhirom joined #perl6
14:00 alester joined #perl6
14:04 flussence .oO( wtf is github doing to the character encoding on the code there? )
14:09 donri joined #perl6
14:25 im2ee joined #perl6
14:32 birdwindupbird joined #perl6
14:34 [Coke] I just built parrot-latest, then tried to build nqp latest.. .and it says i need 370 but only have 360. wtf.
14:41 [Coke] (but it's a problem with my parrot, no doubt. just annoying)
14:48 birdwindupbird joined #perl6
14:51 whiteknight joined #perl6
14:59 im2ee joined #perl6
15:02 kaare__ joined #perl6
15:07 [Coke] (someone managed to do a build & install to the wrong directory, my bad. ;)
15:08 simcop2387 joined #perl6
15:09 envi joined #perl6
15:11 [Coke] t\nqp\05-comments.t fails on windows.
15:14 ab5tract joined #perl6
15:18 Trashlord joined #perl6
15:21 Trashlord left #perl6
15:30 isBEKaml joined #perl6
15:36 JimmyZ joined #perl6
15:48 Trashlord joined #perl6
15:49 uniejo__ joined #perl6
16:09 Trashlord joined #perl6
16:12 sayu joined #perl6
16:17 coregateFX joined #perl6
16:24 satyavvd joined #perl6
16:25 perlhack joined #perl6
16:31 uniejo_ joined #perl6
16:37 satyavvd joined #perl6
16:40 satyavvd_ joined #perl6
16:46 kshannon joined #perl6
16:46 s1n joined #perl6
17:19 aindilis joined #perl6
17:26 REPLeffect joined #perl6
17:58 MayDaniel joined #perl6
18:03 * jnthn home
18:03 Ledrug joined #perl6
18:06 moritz \o
18:10 amuleto joined #perl6
18:10 amuleto histred
18:10 amuleto left #perl6
18:12 birdwindupbird joined #perl6
18:28 moritz http://idlewords.com/2011/08​/why_arabic_is_terrific.htm
18:53 Trashlord joined #perl6
19:15 sorear good * #perl6
19:17 moritz \o
19:19 MayDaniel joined #perl6
19:26 masak joined #perl6
19:26 masak oh hai #perl6
19:27 sorear Hi masak.
19:28 masak back in .se \o/
19:29 moritz nom: say join
19:29 p6eval nom: OUTPUT«␤»
19:29 moritz perl6: say join
19:29 p6eval pugs: OUTPUT«*** No compatible multi variant found: "&join"␤    at /tmp/bt0oWcyFrY line 1, column 5 - line 2, column 1␤»
19:29 p6eval ..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…
19:29 p6eval ..rakudo a55346: OUTPUT«␤»
19:31 masak '$tween', cute. :)
19:32 * moritz found the construct multi join($sep = '', *@values) curious
19:35 masak why?
19:35 sorear seems ... wrong and useless ... to me
19:36 moritz masak: because the default can never take effect, unless there are no arguments at all
19:36 moritz how often does one want an empty join?
19:36 masak probably not that often.
19:36 moritz I mean the only way to get that without it being an obvious bug if you interpolate arguments like join |@things
19:37 masak named arguments?
19:37 moritz and even then it's likely a bug if @things are empty
19:37 moritz masak: we removed that feature, remember? :-)
19:38 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:39 jaldhar joined #perl6
19:39 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
19:40 whiteknight joined #perl6
19:40 moritz sorear: so what would you do? always require a comparison block? require it to be named?
19:41 sorear I like the named argument idea
19:42 sorear what is the interaction between :nth and :global?
19:42 sorear some more of these tests don't make sense
19:44 moritz :global is like :x(1..*)
19:44 sorear what should s:nth(2):global do?
19:44 moritz match once only
19:44 sorear the tests say it should replace half of the occurrences.  which is _insane_
19:45 moritz it is, and conforms to an old spec
19:45 moritz the new spec says you need to write that as :nth(2, 4 ... *):g
19:45 moritz (maybe it works without the :g too, dunno)
19:46 moritz sorear: feel free to rip that test out, or correct it
19:46 sorear also, what in the world does m:x(2) mean
19:46 moritz it means "match exactly twice"
19:46 moritz just one match => fail
19:46 moritz after the second match is found, it stops looking
19:47 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?
19:48 flussence AIUI :g is just shorthand for :nth(1,2...*), if that makes sense
19:49 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...*)
19:49 moritz sorear: that's correct
19:50 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
19:51 moritz sorear: I think rakudo also checks $nth.defined
19:51 moritz it's the best we can do without resorting to an exponential number of multi candidates :-)
19:57 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:58 sorear masak: vectorize!
19:59 sorear masak: was this the scaling-image-views one?
20:00 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
20:00 masak vectorizing is an intriguing idea.
20:00 sorear I need to steal nom's native type semantics
20:00 sorear since people seem to be happy with them
20:01 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.
20:02 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:05 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:06 masak perhaps not worded exactly that way... :)
20:07 dalek rakudo/nom: a638825 | moritz++ | / (2 files):
20:07 dalek rakudo/nom: implement &first, run tests
20:07 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a638825162
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"
20:07 sorear I wonder if Darren knows that Perl 6 is 10 years old and has multiple users.
20:09 Trashlord joined #perl6
20:10 masak some people on p6l seem to live in some blissful unawareness of this.
20:11 masak 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 masak some people from that time remain.
20:11 masak it's up to us users to make use of p6l in a way which befits Perl 6's state of today.
20:38 mj41 joined #perl6
21:00 bluescreen10 joined #perl6
21:19 jaldhar joined #perl6
21:29 soh_cah_toa joined #perl6
21:30 soh_cah_toa pmichaud: ping
21:40 soh_cah_toa 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 soh_cah_toa 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
21:50 revdiablo joined #perl6
21:51 masak it should add skip tests, and then not run the tests that were skipped. does that answer your question?
21:52 masak 'night, #perl6
21:52 soh_cah_toa well, it doesn't actually skip anything though
21:53 soh_cah_toa that was my concern
21:54 tadzik hello #perl6
21:55 soh_cah_toa tadzik: hey, maybe you can help
21:55 tadzik maybe
21:56 cooper joined #perl6
21:56 soh_cah_toa just backscroll. i think maybe i'm misunderstanding skip()
21:57 tadzik soh_cah_toa: I think it's just “those $n tests segfault so I'll just comment them out and skip() them”
21:58 soh_cah_toa well, even if they fail they're not skipped
21:58 soh_cah_toa anything after is still tested
21:58 tadzik you don't even run them, that's the point
21:59 tadzik it's not like todo()
21:59 tadzik it's like “here be 5 passing tests”
22:01 soh_cah_toa look here http://nopaste.snit.ch/paste
22:02 soh_cah_toa how do you skip test 3?
22:02 tadzik I think you didn't mean that url
22:02 soh_cah_toa yeah, wait
22:02 soh_cah_toa http://nopaste.snit.ch/73331
22:02 soh_cah_toa there
22:02 tadzik you really want todo in this case
22:03 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
22:03 soh_cah_toa oh, i see
22:03 tadzik say, test 2 segfaults. You don't really want it to be ran, do you
22:03 tadzik then you just skip() it
22:03 tadzik (that's how I understand it, YMMV)
22:04 soh_cah_toa that's why i didn't understand b/c i was using plan *
22:10 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:14 sili joined #perl6
22:15 Trashlord joined #perl6
22:15 Ledrug Does anyone know what may cause error 137 when building rakudo? I got that building Rakudo Star 2011.07
22:20 lue hello world o/
22:31 thou joined #perl6
22:39 am0c joined #perl6
22:44 drbean joined #perl6
23:02 sorear hi
23:06 orafu joined #perl6
23:07 [Coke] plan * is ortho to skip.
23:36 imarcusthis joined #perl6
23:36 Psyche^ joined #perl6
23:38 jamessalty joined #perl6
23:40 eternaleye joined #perl6
23:46 coregateFX joined #perl6
23:59 dalek rakudo/nom: b729151 | Coke++ | t/spectest.data:
23:59 dalek rakudo/nom: track failure mode
23:59 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b729151a2e

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

Perl 6 | Reference Documentation | Rakudo