Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2012-12-13

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:05 Psyche^ joined #perl6
00:06 sivoais joined #perl6
00:10 hash_table joined #perl6
00:15 cognominal joined #perl6
00:30 larks joined #perl6
01:03 anuby joined #perl6
01:20 _ilbot joined #perl6
01:20 Topic for #perl6 is now »ö« Welcome to Perl 6! | http://perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: http://irc.perl6.org/ | UTF-8 is our friend!
01:24 cognominal joined #perl6
01:24 hypolin joined #perl6
01:28 ggoebel_ joined #perl6
01:38 cognominal_ joined #perl6
01:49 pmichaud noteworthy date:  Dec 18 will be Perl's 25th birthday.  Might be worth an article/mention on p6advent.  :-)
01:51 timotimo pmichaud: can i ask you for a brief answer on the last paragraph of this comment here? https://rt.perl.org/rt3/Ticket/D​isplay.html?id=77856#txn-1177716
01:52 cognominal_ joined #perl6
02:06 pmichaud timotimo: looking
02:09 pmichaud timotimo: initially it looks good to me, although I'm not up to date on the latest parser changes.  Definitely jnthn++ should be the one to approve it for now
02:10 pmichaud if it follows the w\ay that STD.pm6 handles the error, then it's very likely correct; if it doesn't follow STD.pm6, then perhaps it should :)
02:11 timotimo oh, i was just wondering about adding a test case
02:11 pmichaud test cases are good but it's sometimes hard to trap compile-time errors and test the message
02:11 timotimo yes, my first attempts to get the error message as a string or something have failed
02:12 pmichaud you might be able to test things with an eval
02:12 timotimo say, what could be the cause of getting "Missing or wrong version of dependency 'src/Perl6/Actions.pm" when starting rakudo?
02:12 pmichaud Missing or wrong dependency almost always means there's an out of date .pbc somewhere
02:12 timotimo oh, that's interesting. i wonder how i made that come up
02:13 FROGGS_ joined #perl6
02:13 timotimo i'm trying to make rakudo spit out "did you mean @arr?" when the user writes $arr[1] instead of only "$arr not declared"
02:13 timotimo (when the user writes that and there exists a @arr)
02:13 hash_table joined #perl6
02:14 pmichaud that would be cool.  It kind of means that the error handler itself needs to look ahead (continue parsing) to see if there's a .[] or .{} after the unrecognized variable
02:15 timotimo i think as a first approximation it would be enough to just see if the other var exists
02:15 timotimo because i have no idea how to work the parser :D
02:15 pmichaud ...variables, since it could also be $arr{'foo}
02:15 pmichaud er,  $arr{'foo'}
02:17 timotimo by changing a bit of code in the Actions.pm i get the "missing or wrong dependency". i wonder if the build silently went wrong?
02:17 timotimo don't see any errors though
02:18 timotimo kind of don't want to run a make clean now. not on this laptop.
02:20 timotimo i think i'll go to bed instead of continuing to try.
02:20 popl Don't do it in your sleep.
02:21 timotimo why not? git allows reverts easily ;)
02:21 timotimo it might just impact the quality of sleep negatively
02:23 pmichaud I'm afk again
02:23 timotimo thank you for your help :)
02:23 s1n joined #perl6
02:31 ggoebel_ joined #perl6
02:35 timotimo http://t.h8.lv/0001-WIP-on-arr-1-error.patch - anyone who would like to can jump in and add the finishing touches and take as much blame/praise as they'd like
02:44 dayangkun joined #perl6
02:53 Util joined #perl6
02:54 tadzik joined #perl6
02:59 topo joined #perl6
03:13 topo joined #perl6
03:13 hypolin joined #perl6
03:13 tadzik joined #perl6
03:15 jaldhar_ joined #perl6
03:22 cognominal joined #perl6
03:32 jaldhar_ joined #perl6
03:37 fgomez joined #perl6
03:38 s1n joined #perl6
03:49 am0c joined #perl6
03:56 noggle_ joined #perl6
04:22 * colomon is almost done adding operators to Rakudo for the Day 13 Advent calendar post.
04:31 wamba joined #perl6
04:44 colomon are people getting rakudo test fails in is-prime.t and dash-e.t?
04:45 dalek roast: 2085636 | (Solomon Foster)++ | S03-operators/bag.t:
04:45 dalek roast: Fudge for Rakudo.
04:45 dalek roast: review: https://github.com/perl6/roast/commit/20856369b3
04:45 dalek perl6-roast-data: 1bbebbf | coke++ | / (3 files):
04:45 dalek perl6-roast-data: today (automated commit)
04:45 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/1bbebbfeae
04:46 colomon nr: (1..100).grep(*.is-prime)
04:46 p6eval rakudo 78b53a, niecza v24-5-g599cbcb:  ( no output )
04:46 colomon nr: say (1..100).grep(*.is-prime)
04:46 p6eval rakudo 78b53a, niecza v24-5-g599cbcb: OUTPUT«2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97␤»
04:48 dalek rakudo/nom: 798dbdd | (Solomon Foster)++ | src/ (3 files):
04:48 dalek rakudo/nom: Add Texas versions of the Set and Bag operators.
04:48 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/798dbdd12e
04:48 colomon forgive me if that introduces failures into is-prime.t -- I can't see how it could, and I need to get to bed.
05:08 PerlJam joined #perl6
05:19 dalek joined #perl6
05:21 topo joined #perl6
05:21 Util joined #perl6
05:21 rummik joined #perl6
05:23 telex joined #perl6
05:25 fgomez joined #perl6
05:35 dalek joined #perl6
05:35 telex joined #perl6
05:43 PerlJam joined #perl6
05:52 SamuraiJack joined #perl6
05:56 Juerd joined #perl6
05:56 Util joined #perl6
05:58 dalek joined #perl6
06:00 topo joined #perl6
06:02 telex joined #perl6
06:10 tadzik joined #perl6
06:20 Util joined #perl6
06:20 PerlJam joined #perl6
06:20 topo joined #perl6
06:28 Util joined #perl6
06:28 tadzik joined #perl6
06:29 kaleem joined #perl6
06:34 Bzek joined #perl6
06:38 Util joined #perl6
06:54 quester joined #perl6
07:02 quester left #perl6
07:38 tadzik joined #perl6
07:40 hugme joined #perl6
07:40 tadzik what happened? /o\
07:40 Juerd joined #perl6
07:43 sorear tadzik: looks like a classic case of "feather dropping off the internet"
07:44 Juerd That's an accurate description of what happened
07:44 Juerd More specifically, the underlying physical machine had a kernel oops. Cause unknown.
07:44 sorear just an oops, not a panic?
07:44 Juerd I mean panic.
07:44 Juerd The thing where numlock and capslock blink :)
07:45 Juerd It's configured to reboot on panic, but it didn't do so
07:45 Juerd Anyhow, I'm going back to bed.
07:45 Juerd 'nite
07:47 sorear g'nite Juerd
07:54 am0c pity p6eval..
07:55 cibs joined #perl6
07:55 p6eval joined #perl6
08:02 Kharec joined #perl6
08:06 pseudo1 joined #perl6
08:10 pseudo1 left #perl6
08:16 cedrvint pmichaud: OK, I will mention this 25th anniversary :)
08:25 benabik joined #perl6
08:38 cedrvint colomon: why your article isn't published yet? It looks good (colomon++) to me.
08:47 wamba joined #perl6
09:00 cedrvint Street Fighter, Zelda and Megaman turned 25 this year too! It can't be a coincidence :)
09:01 moritz ENODALEK
09:01 yves_ joined #perl6
09:02 moritz timotimo: I've pushed your patch from the backlog, with one small change: I've changed '.' to <sym>, as all the other operators do
09:02 moritz and I've added a small test
09:02 sahadev joined #perl6
09:03 cognominal joined #perl6
09:07 kurahaupo joined #perl6
09:34 felher Good morning, folks.
09:36 fhelmberger joined #perl6
09:38 moritz good morning, felher
09:41 dakkar joined #perl6
09:42 wamba joined #perl6
09:44 cedrvint r: sub term:<fourty-two> { 42 }
09:44 p6eval rakudo 58233d: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Cannot add tokens of category 'term'â�¤at /tmp/Rm5DrwGbof:1â�¤------> [32msub term:<fourty-two> [33mâ��[31m{ 42 }[0mâ�¤    expecting any of:â�¤        colon pairâ�¤        quote wordsâ�¤Â»
09:44 cedrvint NYI?
09:46 cedrvint n: sub term:<fourty-two> { 42 }
09:46 p6eval niecza v24-5-g599cbcb: OUTPUT«Potential difficulties:â�¤  &term:<fourty-two> is declared but not used at /tmp/C5BA4p_1zq line 1:â�¤------> [32msub term:<fourty-two> [33mâ��[31m{ 42 }[0mâ�¤â�¤Â»
09:46 cedrvint n: sub term:<fourty-two> { 42 }; fourty-two.say
09:46 p6eval niecza v24-5-g599cbcb: OUTPUT«42␤»
09:47 rindolf joined #perl6
09:47 cedrvint is there a way to add such terms with Rakudo?
09:49 moritz r: constant fourty-two = 42; fourty-two.say
09:49 p6eval rakudo 58233d: OUTPUT«42␤»
09:50 moritz r: macro fourty-two { quasy { 42 } }; say fourty-two.say
09:50 p6eval rakudo 58233d: OUTPUT«[31m===[0mSORRY![31m===[0m�Could not find sub &quasy�at /tmp/wm_7iEMfyC:1�------> �»
09:50 moritz r: macro fourty-two { quasi { 42 } }; say fourty-two.say
09:50 p6eval rakudo 58233d: OUTPUT«42␤True␤»
09:50 cedrvint I meant a term like "rand", not constant.
09:51 moritz r: sub term:sym<fourty-two> { 42 }; say fourty-two
09:51 p6eval rakudo 58233d: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Cannot add tokens of category 'term'â�¤at /tmp/j5zT0e5uJx:1â�¤------> [32msub term:sym<fourty-two> [33mâ��[31m{ 42 }; say fourty-two[0mâ�¤    expecting any of:â�¤        pair valueâ�¤        quote wordsâ�¤Â»
09:51 moritz no, doesn't work
09:52 cedrvint ok, thanks.
09:53 moritz might be added to src/Perl6/Grammar.pm around line 3214
09:56 wamba joined #perl6
10:00 rindolf joined #perl6
10:03 Kharec joined #perl6
10:11 wamba1 joined #perl6
10:22 bowtie joined #perl6
10:51 grondilu joined #perl6
10:51 grondilu rn:  print -1 mod 10
10:51 p6eval niecza v24-5-g599cbcb: OUTPUT«9»
10:51 p6eval ..rakudo 58233d: OUTPUT«-1»
10:52 grondilu ?
10:52 grondilu eval: print -1 mod 10
10:52 buubot_backup grondilu: ERROR: syntax error at (eval 20) line 1, near "1 mod "
10:52 grondilu eval: print -1 % 10
10:52 buubot_backup grondilu: 91
10:52 grondilu eval: -1 % 10
10:52 buubot_backup grondilu: 9
10:52 moritz bug in rakudo
11:03 spacebat joined #perl6
11:05 birdwindupbird joined #perl6
11:05 Su-Shee_ joined #perl6
11:48 amkrankruleuen joined #perl6
12:04 colomon cedrvint: because it's only half-finished.
12:04 colomon cedrvint: maybe not quite even that.
12:05 colomon cedrvint: but thanks!
12:05 moritz still 9 hours until the 13th ends in my time zone
12:06 moritz speaking of which
12:06 moritz tomorrow is PerlJam day, but he hasn't shown up for quite some time
12:06 moritz anybody want to claim tomorrow instead?
12:06 colomon moritz: and even more in my time zone!
12:08 * colomon is still debugging the next stage of his post.
12:09 colomon and the perl6-debugger isn't working for me atm.  :(
12:15 * moritz fails at implementing terms
12:16 moritz oh, actually it works, but only for  term:sym<foo>, not for term:foo
12:19 moritz n: sub term:sym<foo>() { 42 }; say foo
12:19 p6eval niecza v24-5-g599cbcb: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Undeclared routine:â�¤      'foo' used at line 1â�¤â�¤Potential difficulties:â�¤  &term:sym<foo> is declared but not used at /tmp/d0o33tw7Lv line 1:â�¤------> [32msub term:sym<foo>[33mâ��[31m() { 42 }; say foo[0mâ�¤â�¤Unhandled exception: Che…
12:19 moritz n: sub term:foo { 42 }; say foo
12:19 p6eval niecza v24-5-g599cbcb: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Undeclared routine:â�¤      'foo' used at line 1â�¤â�¤Potential difficulties:â�¤  &term:foo is declared but not used at /tmp/P69Rb4nBfs line 1:â�¤------> [32msub term:foo [33mâ��[31m{ 42 }; say foo[0mâ�¤â�¤Unhandled exception: Check failedâ�¤â�¤ …
12:19 moritz n: sub term:<foo> { 42 }; say foo
12:19 p6eval niecza v24-5-g599cbcb: OUTPUT«42␤»
12:20 moritz oh, also works for term:<foo>
12:20 moritz just not for term:foo
12:25 colomon rn: my $bag = bag a = > 10, b => 2; my $bag2 = bag a => 3, c => 3; say $bag (-) $bag2
12:25 p6eval niecza v24-5-g599cbcb: OUTPUT«[31m===[0mSORRY![31m===[0m��Preceding context expects a term, but found infix = instead at /tmp/WXnqLzycec line 1:�------> [32mmy $bag = bag a [33m�[31m= > 10, b => 2; my $bag2 = bag a => 3, c[0m��Parse failed��»
12:25 p6eval ..rakudo 58233d: OUTPUT«[31m===[0mSORRY![31m===[0m�Preceding context expects a term, but found infix = instead�at /tmp/NmF5HbIbn_:1�------> [32mmy $bag = bag a =[33m�[31m > 10, b => 2; my $bag2 = bag a => 3, c [0m�»
12:26 colomon rn: my $bag = bag a = > 10, b => 2; my $bag2 = bag a => 3, c => 3;
12:26 p6eval niecza v24-5-g599cbcb: OUTPUT«[31m===[0mSORRY![31m===[0m��Preceding context expects a term, but found infix = instead at /tmp/lIe6psHNW9 line 1:�------> [32mmy $bag = bag a [33m�[31m= > 10, b => 2; my $bag2 = bag a => 3, c[0m��Parse failed��»
12:26 p6eval ..rakudo 58233d: OUTPUT«[31m===[0mSORRY![31m===[0m�Preceding context expects a term, but found infix = instead�at /tmp/TP0TKA3UsW:1�------> [32mmy $bag = bag a =[33m�[31m > 10, b => 2; my $bag2 = bag a => 3, c [0m�»
12:26 colomon rn: my $bag = bag a => 10, b => 2; my $bag2 = bag a => 3, c => 3;
12:26 p6eval rakudo 58233d: OUTPUT«2 unexpected named parameters passed (a, b)␤  in sub bag at src/gen/CORE.setting:11886␤  in block  at /tmp/7Dd621p6v8:1␤␤»
12:26 p6eval ..niecza v24-5-g599cbcb: OUTPUT«Potential difficulties:â�¤  $bag is declared but not used at /tmp/bRW28pkkZw line 1:â�¤------> [32mmy [33mâ��[31m$bag = bag a => 10, b => 2; my $bag2 = b[0mâ�¤  $bag2 is declared but not used at /tmp/bRW28pkkZw line 1:â�¤------> [32mmy $bag = bag a => 10, b => 2…
12:26 colomon rn: my $bag = bag a => 10, b => 2; my $bag2 = bag a => 3, c => 3; say $bag (-) $bag2
12:26 p6eval niecza v24-5-g599cbcb: OUTPUT«Unhandled exception: Excess arguments to bag, unused named a, b␤  at /home/p6eval/niecza/lib/CORE.setting line 0 (bag @ 1) ␤  at /tmp/v1VZqx5eVE line 1 (mainline @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4208 (ANON @ 3) ␤  at /home/p6eval/niecza/…
12:26 p6eval ..rakudo 58233d: OUTPUT«2 unexpected named parameters passed (a, b)␤  in sub bag at src/gen/CORE.setting:11886␤  in block  at /tmp/FuLesyBuU6:1␤␤»
12:27 colomon rn: my $bag = bag a, b, a; my $bag2 = bag a, c; say $bag (-) $bag2
12:27 p6eval niecza v24-5-g599cbcb: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Undeclared routines:â�¤     'a' used at line 1,1,1â�¤ 'b' used at line 1â�¤     'c' used at line 1â�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib/CORE.setting line 1443 (die @ 5) â�¤  at /home/p6eval/niecza/src/STD.pm6…
12:27 p6eval ..rakudo 58233d: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&a' called (lines 1, 1, 1)␤Undefined routine '&b' called (line 1)␤Undefined routine '&c' called (line 1)␤»
12:27 colomon rn: my $bag = bag <a, b, a>; my $bag2 = bag <a, c>; say $bag (-) $bag2
12:27 p6eval rakudo 58233d, niecza v24-5-g599cbcb: OUTPUT«set(b,, a)␤»
12:28 colomon yeah, that's my bug all right
12:28 colomon rn: my $bag = bag <a, b, a>; my $bag2 = bag <a, c>; say set($bag); say set($bag2); say $bag (-) $bag2
12:28 p6eval rakudo 58233d, niecza v24-5-g599cbcb: OUTPUT«set(a,, b,, a)␤set(a,, c)␤set(b,, a)␤»
12:28 moritz are the commas inside the <...> intentional?
12:28 colomon rn: my $bag = bag <a b a>; my $bag2 = bag <a c>; say set($bag); say set($bag2); say $bag (-) $bag2
12:28 p6eval rakudo 58233d, niecza v24-5-g599cbcb: OUTPUT«set(a, b)␤set(a, c)␤set(b)␤»
12:29 colomon okay, not my bug at all
12:32 colomon rn: my $bag = bag <a b a>; my $bag2 = bag <a c>; say set($bag); say set($bag2); my $diff = $bag (-) $bag2; say $diff
12:32 p6eval rakudo 58233d, niecza v24-5-g599cbcb: OUTPUT«set(a, b)␤set(a, c)␤bag("a" => 2, "b" => 1)␤»
12:32 colomon that's my bug
12:33 moritz what should the result be?
12:34 moritz bag("a" => 1, "b" => 1) ?
12:35 colomon no, the problem here is that it's actually doing (my $diff = $bag) (-) $bag2
12:35 colomon rather than my $diff = ($bag (-) $bag2)
12:35 colomon TimToady: ^^
12:37 moritz r: rn: my $bag = bag <a b a>; my $bag2 = bag <a c>; say ($bag (-) $bag2)
12:37 p6eval rakudo 58233d: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Two terms in a rowâ�¤at /tmp/1d8SHyipwo:1â�¤------> [32mrn[33mâ��[31m: my $bag = bag <a b a>; my $bag2 = bag [0mâ�¤    expecting any of:â�¤        argument listâ�¤        postfixâ�¤        infix or meta-infixâ�¤        infix stopperâ�¤        state…
12:37 moritz rn: my $bag = bag <a b a>; my $bag2 = bag <a c>; say ($bag (-) $bag2)
12:37 p6eval rakudo 58233d, niecza v24-5-g599cbcb: OUTPUT«set(b)␤»
12:38 moritz rn: my $bag = bag <a b a>; my $bag2 = bag <a c>; my $diff = $bag (-) $bag2; say $diff
12:38 p6eval rakudo 58233d, niecza v24-5-g599cbcb: OUTPUT«bag("a" => 2, "b" => 1)␤»
12:50 LoRe joined #perl6
12:55 colomon moritz: (-) is purely a set operation, there is no bag equivalent, so it converts its arguments to Sets and returns a Set.
12:55 colomon so the say ($bag (-) $bag2) version is correct.
12:57 moritz colomon: why did you give it %list_infix precedence?
12:57 moritz then it's no wonder it's looser than item assignment
12:57 colomon moritz: I just did it as TimToady had it.
12:57 colomon but yes, now I'm thinking that's wrong.
12:58 moritz it seems those ops aren't in S03
12:59 moritz I wonder if the precedence should be the same as junctive and/junctive or
12:59 [Coke] joined #perl6
12:59 bbkr should custom exception be defined in lib/X/ directory or is it better to declare package like lib/JSON/RPC/X which provides X:: exceptions? the later method looks more friendly for package management but may cause unexpected namespace conflicts when multiple modules are loaded.
13:00 moritz bbkr: so far the recommendation is X::JSON::RPC::WhatGoesWrong
13:01 bbkr in lib/X/JSON/RPC ?
13:02 moritz the module -> path mapping doens't change just because there's an X in the name
13:02 moritz so yes
13:02 bbkr moritz: thanks
13:08 colomon btw, the script I've now got working can give you the ten most frequently used words that are in Hamlet and not in Much Ado About Nothing -- takes Rakudo 1m35s.
13:08 moritz what about niecza?
13:09 colomon now running
13:09 colomon 8.5 seconds
13:10 colomon had not expected such a big difference!
13:10 moritz r: say 95 / 8.5
13:10 p6eval rakudo 58233d: OUTPUT«11.176471␤»
13:14 MayDaniel joined #perl6
13:22 Util joined #perl6
13:30 GlitchMr joined #perl6
13:44 benabik joined #perl6
13:53 cognominal joined #perl6
14:00 cedrvint is there a documentation on how to add a new metaoperator?
14:00 atrodo joined #perl6
14:03 timotimo hey moritz, i've made another small change later that i forgot to make public: -        <sym> {} <?before \s | ',' | <terminator> >   +        [ <sym> <!before \w | '('> | <sym> {} <?before \s | ',' | <terminator> > ]
14:04 timotimo i wasn't sure what exactly that other part did that i just removed willy-nilly, so i added it back as an alternative
14:10 timotimo oh, that was for something completely different i think
14:11 bluescreen10 joined #perl6
14:13 timotimo it was for making $. give a better error, that's it!
14:16 PacoAir joined #perl6
14:20 * cedrvint read "it was for making $" ;)
14:20 timotimo i'd love to write a patch like that one day :D
14:21 * GlitchMr read "it was for making $" ;) as $" variable should have better error.
14:21 GlitchMr std: $"
14:21 p6eval std a8bc48f: OUTPUT«[31m===[0mSORRY![31m===[0m�Unsupported use of $" variable; in Perl 6 please use .join() method at /tmp/M02Syhr8_W line 1:�------> [32m$"[33m�[31m<EOL>[0m�Parse failed�FAILED 00:00 41m�»
14:22 GlitchMr Except this error is good error
14:22 [Coke] r: use Test; is("\c[LINE FEED (LF)]", "\c10", '\c[LINE FEED (LF)] works');
14:22 timotimo well, i was talking mostly about:
14:22 p6eval rakudo 9df474: OUTPUT«ok 1 - \c[LINE FEED (LF)] works␤»
14:22 timotimo r: $.
14:22 p6eval rakudo 9df474: OUTPUT«[31m===[0mSORRY![3​1m===[0mâ�¤Non-declarative sigil is missing its nameâ�¤at /tmp/KmSv8HnS2W:1â�¤------> [32m$[33mâ��[31m.[0mâ�¤    expecting any of:â�¤        statement listâ�¤        prefix or termâ�¤        prefix or meta-prefixâ�¤Â»
14:23 [Coke] that dies locally with "Unrecognized character name LINE FEED (LF)"
14:23 GlitchMr std: $.
14:23 p6eval std a8bc48f: OUTPUT«[31m===[0mSORRY![31m===[0m�Unsupported use of $. variable; in Perl 6 please use the filehandle's .line method at /tmp/pUiMczYiQh line 1:�------> [32m$.[33m�[31m<EOL>[0m�Parse failed�FAILED 00:00 41m�»
14:23 GlitchMr STD can already give good errors
14:23 cedrvint r: /{ make '$' }/
14:23 p6eval rakudo 9df474:  ( no output )
14:23 cedrvint it makes '$' :)
14:24 diakopter std: std: say: ;
14:24 p6eval std a8bc48f: OUTPUT«ok 00:00 40m␤»
14:24 timotimo it may make $, but no output? seems fishy
14:24 cedrvint :)
14:25 timotimo r: sub get-rich-quick() { make '$' }; say get-rich-quick();
14:25 p6eval rakudo 9df474: OUTPUT«Cannot bind attributes in a type object␤  in sub make at src/gen/CORE.setting:10305␤  in sub get-rich-quick at /tmp/8okUQM9d_c:1␤  in block  at /tmp/8okUQM9d_c:1␤␤»
14:27 timotimo so, i added a bit of code to Grammar.pl that made r: $. work correctly, but the original bug report complained about r: / $. / which my code doesn't catch (and i don't know why or how to figure it all out)
14:29 PacoAir joined #perl6
14:30 sahadev joined #perl6
14:38 cognominal joined #perl6
14:45 colomon rn: my $bag = KeyBag.new(<a a a b>); say $bag; $bag{b}--; say $bag;
14:45 p6eval rakudo 9df474: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&b' called (line 1)␤»
14:45 p6eval ..niecza v24-5-g599cbcb: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Undeclared routine:â�¤      'b' used at line 1â�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib/CORE.setting line 1443 (die @ 5) â�¤  at /home/p6eval/niecza/src/STD.pm6 line 1147 (P6.comp_unit @ 37) â�¤  at /home/p6…
14:45 colomon rn: my $bag = KeyBag.new(<a a a b>); say $bag; $bag<b>--; say $bag;
14:45 p6eval rakudo 9df474, niecza v24-5-g599cbcb: OUTPUT«keybag("a" => 3, "b" => 1)␤keybag("a" => 3)␤»
14:46 timotimo colomon: did you mean {b} and not <b>?
14:46 timotimo oh, i see yo ucorrected it
14:47 GlitchMr joined #perl6
14:51 cognominal_ joined #perl6
14:53 stopbit joined #perl6
15:02 bbkr is there a way to run prove on Perl 5 and Perl 6 tests at the same time? prove seems to not recognize Perl6 shebang. and -e flag changes executable globally for all tests.
15:03 cognominal_ joined #perl6
15:05 kaare_ joined #perl6
15:08 kivutar joined #perl6
15:08 timotimo wasn't perl5 supposed to launch perl6 if it encounters use v6; at the beginning of a file?
15:09 timotimo seems like that's not implemented :(
15:10 [Coke] $ panda install SDL
15:10 [Coke] connect failed: Connection refused
15:10 [Coke] (after a rakudo * 2012-11 install)
15:11 [Coke] ah, golfed it to just "panda". :(
15:11 benabik joined #perl6
15:13 * timotimo installs panda to see what's up
15:13 stopbit joined #perl6
15:15 timotimo i thought panda used github for its information? interesting
15:17 cognominal joined #perl6
15:18 timotimo ah, it's feather.perl6.nl:3000
15:18 timotimo and that's down, so ... not perl6s fault i guess
15:19 GlitchMr The problem with shebangs is that those won't work in Windows.
15:20 [Coke] ah. be nice if the error said what connect was refused.
15:20 GlitchMr I would say to use some program that does redirects when it doesn't recognize shebang. The problem is that the only such program I know is perl.
15:20 [Coke] Thanks for tracking that down.
15:20 GlitchMr And Perl only redirects when shebang doesn't contain "perl".
15:20 GlitchMr But "perl6" contains "perl".
15:20 timotimo [Coke]: um, the error did say "connection refused" :)
15:21 timotimo it didn't say "connection resuffused to feather.perl6.pl, though
15:21 GlitchMr Feather works fine.
15:21 timotimo then the server that does the ecosystem on feather has crashed?
15:22 timotimo hm, brb
15:23 [Coke] feather was recently restarted.
15:23 GlitchMr glitchmr@feather ~> uptime
15:23 GlitchMr 16:23:42 up
15:23 GlitchMr Recently, you say?
15:24 GlitchMr Well, it was restarted 16 hours ago.
15:33 skids joined #perl6
15:53 colomon Advent post up: http://perl6advent.wordpress.com/​2012/12/13/day-13-bags-and-sets/
15:53 colomon please let me know if you find any typos!  though I'm going to be at a preschool Christmas part for the next hour or so...
15:54 spider-mario joined #perl6
15:56 diakopter colomon++ lgtm
16:02 colomon *party
16:04 cognominal joined #perl6
16:07 PerlJam joined #perl6
16:29 benabik joined #perl6
16:30 GlitchMr colomon: I didn't knew you can simply call bag()
16:31 GlitchMr Well, looks I'll have to update that page second time
16:31 GlitchMr http://rosettacode.org/mw/index.php?​title=Letter_frequency&amp;curid=105​43&amp;diff=148564&amp;oldid=148507
16:41 ingy joined #perl6
16:45 cognominal joined #perl6
16:48 TimToady colomon: "compute the set of works" ~~ s/works/words/
16:52 jnthn evening o/
16:53 diakopter o/
16:54 diakopter http://www.webupd8.org/2012/01/install​-oracle-java-jdk-7-in-ubuntu-via.html - the bestest
16:59 TimToady colomon: perhaps ⊍ is good for calculating degrees of freedom for when you add independent dimensions to the "space" of each named muldimensional switch
16:59 TimToady *multi
17:00 timotimo colomon is a preschooler and does perl6 development? amazing!
17:05 TimToady moritz: p5ism in your post: if ($!) {
17:20 TimToady moritz: "interesting varibles"
17:21 Chillance joined #perl6
17:22 TimToady and an agreement problem in "write tests that checks"
17:22 cognominal joined #perl6
17:22 TimToady dunno whether you meant "a test that checks" or "tests that check"
17:23 TimToady (or both :)
17:29 popl joined #perl6
17:32 japhb .oO( Chancellor of the ExChecker )
17:38 sftp joined #perl6
17:44 benabik joined #perl6
17:46 colomon TimToady++
17:47 colomon TimToady: thoughts on the list infixish of the set/bag union/intersection operators?
17:48 kurahaupo joined #perl6
17:59 kaleem joined #perl6
17:59 moritz \o
18:00 moritz btw colomon++'s patch to add the set infix operators nearly tripled parse time of the setting for me
18:00 colomon oh!  you mean it's not always so ungodly slow?
18:02 colomon some sort of LTM side effect because the operators all start with (    ?
18:05 jnthn Unicode?
18:07 jnthn yeah
18:07 jnthn Just 'cus the lines are commented out doesn't mean they don't slow the parse down a load.
18:11 japhb Well, now that they're committed, you can remove them in a separate commit, and then at some later date bring them back by reverting the removal commit.  :-)
18:12 jnthn Aye
18:13 moritz r: sub postfix:['!']($x) { [*] 1..$x }; say 5!
18:13 p6eval rakudo 9df474: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Two terms in a rowâ�¤at /tmp/4EL3Se__hO:1â�¤------> [32m postfix:['!']($x) { [*] 1..$x }; say 5![33mâ��[31m<EOL>[0mâ�¤    expecting any of:â�¤        infix or meta-infixâ�¤        infix stopperâ�¤Â»
18:13 moritz r: sub postfix:('!')($x) { [*] 1..$x }; say 5!
18:13 p6eval rakudo 9df474: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Two terms in a rowâ�¤at /tmp/Z5D9K6AWuu:1â�¤------> [32m postfix:('!')($x) { [*] 1..$x }; say 5![33mâ��[31m<EOL>[0mâ�¤    expecting any of:â�¤        infix or meta-infixâ�¤        infix stopperâ�¤Â»
18:14 jnthn sub postfix:<!>($x) { [*] 1..$x }; say 5!
18:14 jnthn r: sub postfix:<!>($x) { [*] 1..$x }; say 5!
18:14 p6eval rakudo 9df474: OUTPUT«120␤»
18:15 jnthn Guess just a case of unhandled forms. I think you may be able to draw on some existing code to fix that.
18:19 moritz jnthn: I think so too. It was just that if it worked right now, I could rewritten the unicode ops as infix:["\c[ascii name of Unicode symbol]"] or so
18:25 diakopter rn: eval 'sub infix:<()>($a, $b) { $a+$b }; say '~('() 'x 500) ~ '3'
18:26 p6eval rakudo 9df474, niecza v24-5-g599cbcb: OUTPUT«3␤»
18:30 diakopter rn: eval 'sub infix:<()>($a, $b) { say $a.WHAT; $a+$b }; say '~('() 'x 4) ~ '3'
18:30 p6eval rakudo 9df474, niecza v24-5-g599cbcb: OUTPUT«Parcel()␤Int()␤3␤»
18:30 diakopter rn: eval 'sub infix:<()>($a, $b) { say $a.WHAT; $a+$b }; say '~('() 'x 6) ~ '3'
18:30 p6eval rakudo 9df474, niecza v24-5-g599cbcb: OUTPUT«Parcel()␤Int()␤Int()␤3␤»
18:30 diakopter rn: eval 'sub infix:<()>($a, $b) { say $a.WHAT; $a+$b }; say '~('() 'x 7) ~ '3'
18:30 p6eval rakudo 9df474: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Two terms in a rowâ�¤at eval_0:1â�¤------> [32mWHAT; $a+$b }; say () () () () () () () [33mâ��[31m3[0mâ�¤    expecting any of:â�¤        postfixâ�¤        infix or meta-infixâ�¤        infix stopperâ�¤        statement endâ�¤        statement modif…
18:30 p6eval ..niecza v24-5-g599cbcb: OUTPUT«Unhandled exception: Two terms in a row at (eval) line 1:â�¤------> [32mWHAT; $a+$b }; say () () () () () () () [33mâ��[31m3[0mâ�¤â�¤  at /home/p6eval/niecza/boot/lib/CORE.setting line 1443 (die @ 5) â�¤  at /home/p6eval/niecza/src/STD.pm6 line 5597 (STD.panic @ …
18:33 FROGGS_ wow, Stage parse      : 245.012
18:34 FROGGS_ moritz: exactly three times the time as before
18:36 diakopter std: https://gist.github.com/4278551
18:36 p6eval std a8bc48f: OUTPUT«ok 00:08 83m␤»
18:36 colomon working on patch...
18:37 GlitchMr .u ⊎
18:37 phenny U+228E MULTISET UNION (⊎)
18:38 GlitchMr I've added "Day 13 – Bags and Sets" to 2012 category
18:41 colomon GlitchMr++
18:41 colomon moritz, jnthn: is it enough to delete the offending lines, or does some more substantial change need to be done to the nature of the file?
18:42 moritz colomon: deleting the offending lines should be enough
18:42 GlitchMr KeyBag actually reminds me collections.Counter in Python.
18:42 GlitchMr >>> from collections import Counter
18:42 GlitchMr >>> Counter("the world isn't perfect")
18:42 GlitchMr Counter({' ': 3, 'e': 3, 't': 3, 'r': 2, 'c': 1, 'd': 1, "'": 1, 'f': 1, 'i': 1, 'h': 1, 'l': 1, 'o': 1, 'n': 1, 'p': 1, 's': 1, 'w': 1})
18:42 colomon moritz: ah, looks like I missed one.
18:44 colomon there we go!
18:46 TimToady .oO(a file with fewer than 128 non-ASCII chars would fit into an nfg8)
18:48 TimToady .o((albeit by cheating, insofar as it'd treat precomposed chars as non-composable))
18:49 jnthn ETOOCHEATY :P
18:50 noggle joined #perl6
18:51 wamba joined #perl6
18:54 werwerwer joined #perl6
18:57 colomon patch sent, and I turned on S03-operators/set.t and /bag.t, too.
18:57 GlitchMr Just wondering, isn't is-prime function NP-complete problem?
18:59 colomon GlitchMr: no (he said in a slightly uncertain voice)
19:00 moritz I think it's not known whether prime factoring is in NP
19:01 moritz and prime testing is potentially easier than prime factoring
19:01 GlitchMr https://www.wolfram.com/technology​/guide/NumericalPrecisionTracking/
19:02 GlitchMr Non-Mathematica should be "Neither Mathematica or Perl 6 ;-)".
19:02 fgomez joined #perl6
19:02 werwerwer if prime testing isn't NP then prime factoring isn't NP neither
19:05 moritz werwerwer: do you have any literature on that?
19:08 werwerwer moritz: nope, but i think that complexity_of_prime_factoring <= complexity_of_prime_testing * N^2, so <here goes my previous statement>
19:10 moritz werwerwer: if that were true, RSA wouldn't work
19:11 moritz we already know that the public key isn't a prime, so factoring a 1024bit key would only be in the order 1mio iterations
19:11 moritz (at least if there's a known algorithm, not just a proof of existence)
19:12 werwerwer mortiz: i suppose that prime testing is NP complete
19:12 grondilu Where in the specs are the Set operators described in the #13 advent calendar?
19:16 SamuraiJack joined #perl6
19:16 moritz http://en.wikipedia.org/wik​i/Primality_test#Complexity
19:16 moritz "The existence of the AKS primality test finally settled this long-standing question and placed PRIMES in P. However, PRIMES is not known to be P-complete, and it is not known whether it lies in classes lying inside P such as NC or L."
19:18 werwerwer RSA is saved :) wikipedia explains it all
19:52 bbkr_ joined #perl6
20:02 masak joined #perl6
20:02 masak evenin', #perl6
20:02 diakopter masak!
20:02 FROGGS_ hi @all
20:02 masak feather felt like rebooting, eh?
20:02 FROGGS_ or better: hi @*ALL ?
20:03 flussence I just read the day 11 post. That's a pretty clever solution, passing code instead of data between threads...
20:09 supernovus joined #perl6
20:09 supernovus So, how do we get panda working properly again now?
20:11 moritz it's broken?
20:12 supernovus Well, apparently when you install a package using it, it's not found, it can't even install other packages depending on the first package. I'm deleting my rakudo and panda source trees, and my ~/.panda and ~/.perl6 folders and recompiling from scratch, see if that fixes it.
20:14 * moritz tries
20:14 supernovus For what it's worth, I install a lot of my own packages using a local folder rather than downloading them, but I tried both ways, and neither worked.
20:16 supernovus Sometimes cleaning out everything and performing a fresh install fixes everything, so I'll let you know what happens :-)
20:17 moritz supernovus: note that stuff is now installed into %*CUSTOM_LIB<site> by default, not ~/.perl6/lib anymore
20:18 moritz Meh, I get No object at index 164
20:20 supernovus moritz: It may have something to do with the change. It wasn't finding the module regardless of where it's being installed now. I installed HTTP::Status and it showed that it was successfully installed, but when I tried to install a library that depends on it, it couldn't find it... again, if nobody else is reporting issues, a fresh install may fix things.
20:21 FROGGS_ can somebody please read the highlighted block please? https://gist.github.com/4223775#file-ins​tallation_and_usage_proposal-txt-L60-L71
20:23 supernovus Hmm, well, I think I may have an answer to my problem... panda has moved repositories...
20:23 moritz hm?
20:24 supernovus hmm, never mind, I tried to clone panda and got an error "fatal: remote error: Repository not found."
20:24 colomon grondilu: they're not in the spec.
20:25 colomon grondilu: they're in the spec tests, on the other hand, and in both Rakudo and Niecza.
20:25 kurahaupo joined #perl6
20:25 bbkr__ joined #perl6
20:25 supernovus guh, just a typo.
20:28 moritz moritz@jacq:~>panda install Math::RungeKutta
20:28 moritz connect failed: Connection refused
20:29 moritz maybe tadzik needs to restart some web service after the last feather reboot?
20:29 Tene_ joined #perl6
20:29 Tene_ joined #perl6
20:30 smash_ joined #perl6
20:30 quietfan1tic joined #perl6
20:30 thou joined #perl6
20:31 tadzik yeah
20:32 tadzik ok it's up
20:33 chee2 joined #perl6
20:34 crazed- joined #perl6
20:35 moritz tadzik: what command did you use?
20:35 moritz (just so instructions are in the logs)
20:35 szbalint joined #perl6
20:35 tadzik moritz: perl ~/modules/bin/app.pl
20:35 tadzik I added it to crontab @reboot, but doesn't seem to work :/
20:35 tadzik and I didn't get any email from cron
20:36 moritz which feather is that?
20:36 moritz 1?
20:36 tadzik yes
20:38 moritz ok, thanks
20:39 sorear joined #perl6
20:39 bruges_ joined #perl6
20:40 aindilis` joined #perl6
20:41 _jaldhar_ joined #perl6
20:43 _jfried joined #perl6
20:43 cosimo joined #perl6
20:44 marloshouse_ joined #perl6
20:44 wamba joined #perl6
20:46 BooK_ joined #perl6
20:47 supernovus Crossing fingers, I have my PATH updated with the new versions. Installing my base set of libraries now.
20:48 drbean joined #perl6
20:49 p6eval joined #perl6
20:50 moritz panda install Math::RungeKutta # succeeded for me
20:53 felher colomon++ # blog post about sets :)
20:53 masak colomon++
20:53 Bucciarati joined #perl6
20:53 masak 'night, #perl6
20:54 supernovus panda installed everything successfully for me this time
20:55 supernovus tadzik: is the source to the module app available?
20:56 felher 'night, masak
20:56 supernovus have a good one masak!
20:56 tadzik supernovus: if not, it should be :)
21:01 supernovus tadzik: It's not in the 'ecosystem' or 'modules.perl6.org' or 'panda' repositories, which is why I'd asked.
21:01 tadzik yeah, it's not published
21:02 tadzik I'll put it somewhere, in the ecosystem maybe?
21:02 tadzik probably won't bother anyone there :)
21:02 tadzik I'll just clean it up a bit
21:02 kivutar joined #perl6
21:03 benabik joined #perl6
21:03 supernovus ecosystem seems like a sensible location, maybe in a 'app' or 'service' subdirectory?
21:03 moritz or 'server' maybe :-)
21:03 supernovus That works too :-)
21:04 supernovus Does the app auto-generate the projects.json file, or depend on the 'update.pl' already in ecosystem? Or maybe I should just wait and read the code. Impatient as I am ;-)
21:05 tadzik it needs a cronjob that'll run updatelist.pl
21:06 tadzik # DO NOT EVER USE THAT FEATURE IN PRODUCTION
21:07 tadzik # OR TINY KITTENS SHALL DIE WITH LOTS OF SUFFERING
21:07 tadzik yeah, uh, I guess I should've read that earlier :P
21:07 supernovus lovely warning... oO
21:11 tadzik there we are
21:12 tadzik dale<TAB><TAB>
21:12 da1ek OMG GUYS, A COMMIT TO perl6/ecosystem! https://github.com/perl6/e​cosystem/commit/26bf37641
21:13 supernovus lol
21:13 doy joined #perl6
21:14 FROGGS_ hehe
21:14 FROGGS_ tadzik++ # humor :o)
21:18 supernovus Nice simple app.
21:19 tadzik feel free to improve/clean it up
21:21 FROGGS_ tadzik: do you have time to read that? https://gist.github.com/4223775#file-ins​tallation_and_usage_proposal-txt-L60-L71
21:21 popl tiny kittens are overrated.
21:21 FROGGS_ I'd like to have some feedback
21:22 FROGGS_ popl: what about huge kittens? mine is bitte than my almost-three-year-old son when it stands upright on its hind paws
21:23 FROGGS_ s/bitte/taller/ # I think
21:23 FROGGS_ no idea why I wrote "bitte"
21:25 tadzik FROGGS_: hm. I guess MANIFEST could also keep the current "best" module version, and panda activate would then update that
21:26 tadzik by default it'd be the newest one or so
21:26 FROGGS_ but you will have four MANIFEST files (home, site, vendor, perl)
21:26 tadzik oh, yes
21:27 FROGGS_ every file has a "best" module version
21:29 supernovus I'd say if a user doesn't specify a desired version/auth in their use statement, we shouldn't need to load the MANIFEST files either, just use the current logic, and look in home, site, vendor and perl (in that order) for a matching module. It will use the currently activated module.
21:29 popl FROGGS_: Cats in general.
21:30 FROGGS_ supernovus: if you do "use Foo::Bar", you will maybe find home/Foo/Bar.pm, site/Foo/Bar.pm, and so on
21:30 FROGGS_ supernovus: which one is the right one?
21:31 supernovus FROGGS_: If it exists in "home", that is the right one, otherwise look in "site", and so on. The manifest is only required if a specific version is requested. Also, how does @*INC interact with %*CUSTOM_LIB? Do we search @*INC first, before
21:31 FROGGS_ and what if the module is called Föö::Bär? whats the filename we should look for on a filesystem that can't handle ö and ä?
21:32 diakopter then the module writer obviously didn't want the module to be used on that platform
21:32 FROGGS_ supernovus: according to S11 the module with the highest version is the best, not the first we find
21:32 FROGGS_ diakopter: but it should be possible to use unicode names...
21:33 diakopter FROGGS_: sure, but you're just limiting folks' usage of your software
21:33 supernovus Hmm, in which case we'll have to read the MANIFEST files, every time. I'd suggested that once before and was shot down as being excessive overhead, which is why I'd thought that maybe the manifest should only be required if we ask for a specific version/auth.
21:34 FROGGS_ diakopter: no, since there is a file that tells you what the right filename for a given module name is
21:36 FROGGS_ supernovus: well, I know that it might be expensive to read four files... I guess asking TimToady won't hurt
21:36 supernovus Of course if we cache the MANIFEST information in a binary format that doesn't require significant parsing overhead (still having a plain text version that we can rebuild from if necessary) then that could mitigate some of the objections to having to read the manifest each time.
21:38 FROGGS_ supernovus: good point
21:39 supernovus I would also recommend using JSON as the plain text format for the MANIFEST rather than inventing yet another text-based data storage format.
21:39 FROGGS_ supernovus: btw, your question about @*INC and %*CUSTOM_LIB is answered somewhere on that page
21:39 FROGGS_ supernovus: sure, is just an example
21:40 leont joined #perl6
21:41 FROGGS_ @*INC comes without MANIFEST file, and does pretty much the same as Perl 5, if we find something, we will live with that
21:43 leont left #perl6
21:45 supernovus Given the way @*INC is described in the document, I think this could work well. Start with textual MANIFESTS, and add a binary format later. For a significant metadata speedup, the binary versions could be calculated using the combined data from all custom lib above. So the binary cache in 'perl' would contain just the manifest from 'perl', but the cache in 'site' for instance would contain 'site', 'vendor', and 'perl', and so for
21:45 supernovus th. So when using a binary cache, we'd only have to load one file.
21:46 FROGGS_ k
21:46 benabik_ joined #perl6
21:46 supernovus Again, binary caches being an optional feature that any given implementation may or may not support.
21:50 supernovus I guess one thing about using JSON as the data format for plain text MANIFEST files, is that JSON itself, and likely the JSON::Tiny library would have to become a part of the implementation (and likely the specification.)
21:51 diakopter supernovus: rakudo would probably use a binary packed form that can be directly mmap'd as data structures.
21:53 supernovus diakopter: Yeah, I was thinking the binary format may become the standard, and leave it up to the installer, such as panda to build both JSON and binary manifest files. Rakudo wouldn't know anything about the JSON version then.
21:58 benabik joined #perl6
22:10 sahadev left #perl6
22:11 FROGGS_ gmight and thanks for your help
22:14 tadzik I can has a draft of my advent calendar post: https://gist.github.com/4280548
22:15 tadzik Criticism will be very welcome
22:25 diakopter nice
22:26 diakopter "coroutine to be ran" -> "coroutine to be run"
22:29 cognominal joined #perl6
22:30 tadzik thanks, fixed
22:31 diakopter consider having schedule return a wrapper Cororoutine object that sets a flag when it's done, so the caller can optionally block/wait until a particular scheduled thing is done
22:32 diakopter er, s/roro/ro/
22:32 whiteknight joined #perl6
22:34 tadzik I guess async() could return an object you can wait() on
22:35 diakopter oh, yes, I meant async, not schedule
22:35 kurahaupo diakopter: (that sounded like a skit from a famous British sitcom)
22:36 diakopter tadzik: probably you should show an example of using Coroutines to do the same thing as the LWP example
22:39 tadzik oh, yes
22:39 tadzik implement AnyEvent::HTTP the good way :)
22:39 diakopter also, I'm not clear on how the mainline ever actually passes control to the things that are scheduled
22:40 diakopter ie. what's actually doing the event loop
22:41 diakopter something in parrot?
22:41 tadzik nah, it's implementing in Pure Perl
22:41 tadzik and it sucks, too ;)
22:41 diakopter for the IO thing?
22:42 diakopter s/thing/stuff,module/
22:43 tadzik hm, I'm confused :)
22:43 tadzik https://github.com/tadzik/MuEv​ent/blob/master/lib/MuEvent.pm is what we're at
22:44 diakopter so only one connection can be active at once?
22:46 tadzik no
22:46 tadzik you can have any number you want
22:46 diakopter how would one do that
22:49 diakopter if one thing sleeps for 10 seconds, does an every-1-second timer still fire during those 10 seconds?
22:54 diakopter or, s/sleeps/counts to a trillion/ if you like
22:54 tadzik yeah, it's not preemptive
22:54 tadzik if something runs for 10 seconds it will block the execution for 10 seconds
22:55 diakopter I don't see how more than one connection can be active
22:55 diakopter isn't a connection handled from start to finish in one execution unit (without yielding)?
22:57 tadzik like a network connection? Npe
22:57 tadzik see http://ttjjss.wordpress.com/2012/0​4/02/asynchronous-http-in-perl-6/ for example
23:08 diakopter tadzik: that doesn't answer my question, afaict
23:09 diakopter tadzik: socket.pmc talks about many "asynchronous versions" of various methods, but I can't find code for them.
23:10 diakopter they all look synchronous to me.
23:11 tadzik ah
23:11 tadzik I've not much idea about socket.pmc
23:11 diakopter reading INET.pm
23:13 diakopter accept looks blocking
23:14 tadzik it is
23:14 tadzik you have .poll() though
23:14 tadzik it works for one socket at a time though
23:14 diakopter that's what I was asking
23:15 chee2 joined #perl6
23:20 diakopter I don't see your http_get
23:20 diakopter oh there it is
23:23 diakopter so, when you're polling the sockets, you can only run callback at once.
23:23 tadzik that's right
23:24 wamba joined #perl6
23:25 diakopter so a user can add a callback to fetch a url, but say they don't want to close the socket when they're done; they want to issue another HTTP request
23:27 diakopter they can add another MuEvent::socket with their callback that doesn't include .close?
23:28 diakopter ok, I fully understand it now
23:28 diakopter the parrot docs are disingenuous
23:29 diakopter "there are these async versions... nope just kidding"
23:33 skids joined #perl6
23:35 diakopter tadzik: how does one tell the MuEvent loop to stop
23:35 diakopter (from one of the callbacks, obviously)
23:38 tadzik sorry, I'm a bit sleepish :)
23:38 tadzik I'll try to anwer you tomorrow, now I'm having trouble computing sentences
23:39 tadzik good night o/
23:39 diakopter o/
23:59 sivoais joined #perl6

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

Perl 6 | Reference Documentation | Rakudo