»ö« 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. |
|||
00:03
sivoais left
00:05
Psyche^ joined
00:06
sivoais joined
00:09
Patterner left,
Psyche^ is now known as Patterner
00:10
hash_table joined
00:15
hash_table left,
cognominal joined
00:20
bowtie left
00:29
larks left
00:30
larks joined
00:47
atrodo left
00:49
cognominal left
01:03
anuby joined
01:04
grondilu left
01:16
PerlPilot joined
01:17
gfldex_ joined,
LoRe_ joined
01:18
drbean left,
PerlJam left
01:19
drbean joined
01:20
_ilbot joined
01:24
cognominal joined,
hypolin joined
01:28
ggoebel_ joined
01:36
s1n left
01:38
cognominal_ joined,
cognominal left
01:45
cognominal_ left
|
|||
pmichaud | noteworthy date: Dec 18 will be Perl's 25th birthday. Might be worth an article/mention on p6advent. :-) | 01:49 | |
timotimo | pmichaud: can i ask you for a brief answer on the last paragraph of this comment here? rt.perl.org/rt3/Ticket/Display.htm...xn-1177716 | 01:51 | |
01:52
cognominal_ joined
02:03
whiteknight left
|
|||
pmichaud | timotimo: looking | 02:06 | |
02:09
ggoebel_ left
|
|||
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:09 | |
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:10 | ||
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 | ||
timotimo | yes, my first attempts to get the error message as a string or something have failed | ||
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? | ||
pmichaud | Missing or wrong dependency almost always means there's an out of date .pbc somewhere | ||
timotimo | oh, that's interesting. i wonder how i made that come up | ||
02:13
FROGGS_ joined
|
|||
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 | |
(when the user writes that and there exists a @arr) | |||
02:13
hash_table joined
|
|||
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:14 | |
timotimo | i think as a first approximation it would be enough to just see if the other var exists | 02:15 | |
because i have no idea how to work the parser :D | |||
pmichaud | ...variables, since it could also be $arr{'foo} | ||
er, $arr{'foo'} | |||
02:16
FROGGS left
|
|||
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 | |
don't see any errors though | |||
kind of don't want to run a make clean now. not on this laptop. | 02:18 | ||
i think i'll go to bed instead of continuing to try. | 02:20 | ||
popl | Don't do it in your sleep. | ||
timotimo | why not? git allows reverts easily ;) | 02:21 | |
it might just impact the quality of sleep negatively | |||
pmichaud | I'm afk again | 02:23 | |
timotimo | thank you for your help :) | ||
02:23
s1n joined
02:31
ggoebel_ joined
|
|||
timotimo | 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:35 | |
02:44
dayangkun joined
02:48
dayangkun left
02:52
Util left
02:53
Util joined
02:54
tadzik joined
02:59
topo joined
03:00
gootle left
03:12
hypolin left
03:13
tadzik left,
topo left,
topo joined,
hypolin joined,
tadzik joined
03:15
jaldhar_ joined
03:16
cognominal_ left
03:22
cognominal joined
03:24
s1n left
03:27
fgomez left
03:30
jaldhar_ left
03:32
jaldhar_ joined
03:37
fgomez joined
03:38
s1n joined
03:48
hash_table left
03:49
am0c joined
03:56
noggle_ joined
04:00
noggle left
|
|||
colomon is almost done adding operators to Rakudo for the Day 13 Advent calendar post. | 04:22 | ||
04:31
wamba joined
|
|||
colomon | are people getting rakudo test fails in is-prime.t and dash-e.t? | 04:44 | |
dalek | ast: 2085636 | (Solomon Foster)++ | S03-operators/bag.t: Fudge for Rakudo. |
04:45 | |
rl6-roast-data: 1bbebbf | coke++ | / (3 files): today (automated commit) |
|||
colomon | nr: (1..100).grep(*.is-prime) | 04:46 | |
p6eval | rakudo 78b53a, niecza v24-5-g599cbcb: ( no output ) | ||
colomon | nr: say (1..100).grep(*.is-prime) | ||
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» | ||
dalek | kudo/nom: 798dbdd | (Solomon Foster)++ | src/ (3 files): Add Texas versions of the Set and Bag operators. |
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:06
PerlPilot left
05:08
PerlJam joined
05:12
s1n left
05:13
dalek left
05:17
topo left,
Util left
05:19
dalek joined,
ChanServ sets mode: +v dalek
05:20
fgomez left
05:21
rummik left,
topo joined,
Util joined,
rummik joined
05:22
telex left
05:23
skids left,
telex joined
05:24
sftp left
05:25
fgomez joined
05:29
dalek left
05:32
telex left
05:35
dalek joined,
ChanServ sets mode: +v dalek,
telex joined
05:42
PerlJam left
05:43
PerlJam joined
05:50
Juerd left
05:52
SamuraiJack joined,
Util left
05:54
dalek left
05:56
tadzik left,
Juerd joined,
Util joined
05:58
topo left,
dalek joined,
ChanServ sets mode: +v dalek
06:00
telex left,
topo joined
06:02
telex joined
06:09
kurahaupo left
06:10
tadzik joined
06:12
topo left
06:13
PerlJam left
06:14
wamba left,
Util left
06:20
Util joined,
PerlJam joined,
topo joined
06:25
Util left
06:27
tadzik left
06:28
Util joined,
tadzik joined
06:29
kaleem joined
06:34
Bzek joined
06:36
Util left
06:38
Util joined
06:41
ggoebel_ left
06:45
dalek left
06:49
hugme left,
Juerd left,
sergot left
06:50
tadzik left,
PerlJam left,
topo left,
pmichaud left,
masak left,
Util left
06:54
quester joined
07:02
quester left
07:37
Guest31156 is now known as ponbiki
07:38
tadzik joined
07:40
hugme joined,
ChanServ sets mode: +v hugme
|
|||
tadzik | what happened? /o\ | 07:40 | |
07:40
Juerd joined
|
|||
sorear | tadzik: looks like a classic case of "feather dropping off the internet" | 07:43 | |
Juerd | That's an accurate description of what happened | 07:44 | |
More specifically, the underlying physical machine had a kernel oops. Cause unknown. | |||
sorear | just an oops, not a panic? | ||
Juerd | I mean panic. | ||
The thing where numlock and capslock blink :) | |||
It's configured to reboot on panic, but it didn't do so | 07:45 | ||
Anyhow, I'm going back to bed. | |||
'nite | |||
sorear | g'nite Juerd | 07:47 | |
am0c | pity p6eval.. | 07:54 | |
07:55
cibs joined,
p6eval joined,
ChanServ sets mode: +v p6eval
08:02
Kharec joined
08:06
pseudo1 joined
08:08
benabik left
08:10
pseudo1 left
|
|||
cedrvint | pmichaud: OK, I will mention this 25th anniversary :) | 08:16 | |
08:25
benabik joined
|
|||
cedrvint | colomon: why your article isn't published yet? It looks good (colomon++) to me. | 08:38 | |
08:47
wamba joined
08:56
cognominal left
08:57
sahadev1 left,
yves_ left
|
|||
cedrvint | Street Fighter, Zelda and Megaman turned 25 this year too! It can't be a coincidence :) | 09:00 | |
moritz | ENODALEK | 09:01 | |
09:01
yves_ joined
|
|||
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 | |
and I've added a small test | |||
09:02
sahadev joined
09:03
cognominal joined
09:07
kurahaupo joined
09:23
popl left
09:24
cognominal left
|
|||
felher | Good morning, folks. | 09:34 | |
09:36
fhelmberger joined
|
|||
moritz | good morning, felher | 09:38 | |
09:41
dakkar joined
09:42
wamba left,
wamba joined
|
|||
cedrvint | r: sub term:<fourty-two> { 42 } | 09:44 | |
p6eval | rakudo 58233d: OUTPUT«===SORRY!===Cannot add tokens of category 'term'at /tmp/Rm5DrwGbof:1------> sub term:<fourty-two> ⏏{ 42 } expecting any of: colon pair quote words» | ||
cedrvint | NYI? | ||
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:------> sub term:<fourty-two> ⏏{ 42 }» | ||
cedrvint | n: sub term:<fourty-two> { 42 }; fourty-two.say | ||
p6eval | niecza v24-5-g599cbcb: OUTPUT«42» | ||
09:47
rindolf joined
|
|||
cedrvint | is there a way to add such terms with Rakudo? | 09:47 | |
moritz | r: constant fourty-two = 42; fourty-two.say | 09:49 | |
p6eval | rakudo 58233d: OUTPUT«42» | ||
moritz | r: macro fourty-two { quasy { 42 } }; say fourty-two.say | 09:50 | |
p6eval | rakudo 58233d: OUTPUT«===SORRY!===Could not find sub &quasyat /tmp/wm_7iEMfyC:1------> » | ||
moritz | r: macro fourty-two { quasi { 42 } }; say fourty-two.say | ||
p6eval | rakudo 58233d: OUTPUT«42True» | ||
cedrvint | I meant a term like "rand", not constant. | 09:51 | |
moritz | r: sub term:sym<fourty-two> { 42 }; say fourty-two | ||
p6eval | rakudo 58233d: OUTPUT«===SORRY!===Cannot add tokens of category 'term'at /tmp/j5zT0e5uJx:1------> sub term:sym<fourty-two> ⏏{ 42 }; say fourty-two expecting any of: pair value quote words» | ||
moritz | no, doesn't work | ||
cedrvint | ok, thanks. | 09:52 | |
moritz | might be added to src/Perl6/Grammar.pm around line 3214 | 09:53 | |
09:56
wamba left,
wamba joined
09:58
Kharec left
10:00
rindolf left,
rindolf joined
10:01
hypolin left
10:03
Kharec joined
10:05
anuby left
10:11
wamba left,
wamba1 joined
10:22
bowtie joined
10:51
grondilu joined
|
|||
grondilu | rn: print -1 mod 10 | 10:51 | |
p6eval | niecza v24-5-g599cbcb: OUTPUT«9» | ||
..rakudo 58233d: OUTPUT«-1» | |||
grondilu | ? | 10:52 | |
eval: print -1 mod 10 | |||
buubot_backup | grondilu: ERROR: syntax error at (eval 20) line 1, near "1 mod " | ||
grondilu | eval: print -1 % 10 | ||
buubot_backup | grondilu: 91 | ||
grondilu | eval: -1 % 10 | ||
buubot_backup | grondilu: 9 | ||
moritz | bug in rakudo | ||
11:03
spacebat joined
11:05
birdwindupbird joined,
Su-Shee_ joined
11:07
kurahaupo left
11:09
Su-Shee left,
Su-Shee_ is now known as Su-Shee
11:48
amkrankruleuen joined
|
|||
colomon | cedrvint: because it's only half-finished. | 12:04 | |
cedrvint: maybe not quite even that. | |||
cedrvint: but thanks! | 12:05 | ||
moritz | still 9 hours until the 13th ends in my time zone | ||
speaking of which | 12:06 | ||
tomorrow is PerlJam day, but he hasn't shown up for quite some time | |||
anybody want to claim tomorrow instead? | |||
colomon | moritz: and even more in my time zone! | ||
colomon is still debugging the next stage of his post. | 12:08 | ||
and the perl6-debugger isn't working for me atm. :( | 12:09 | ||
moritz fails at implementing terms | 12:15 | ||
oh, actually it works, but only for term:sym<foo>, not for term:foo | 12:16 | ||
n: sub term:sym<foo>() { 42 }; say foo | 12:19 | ||
p6eval | niecza v24-5-g599cbcb: OUTPUT«===SORRY!===Undeclared routine: 'foo' used at line 1Potential difficulties: &term:sym<foo> is declared but not used at /tmp/d0o33tw7Lv line 1:------> sub term:sym<foo>⏏() { 42 }; say fooUnhandled exception: Che… | ||
moritz | n: sub term:foo { 42 }; say foo | ||
p6eval | niecza v24-5-g599cbcb: OUTPUT«===SORRY!===Undeclared routine: 'foo' used at line 1Potential difficulties: &term:foo is declared but not used at /tmp/P69Rb4nBfs line 1:------> sub term:foo ⏏{ 42 }; say fooUnhandled exception: Check failed … | ||
moritz | n: sub term:<foo> { 42 }; say foo | ||
p6eval | niecza v24-5-g599cbcb: OUTPUT«42» | ||
moritz | oh, also works for term:<foo> | 12:20 | |
just not for term:foo | |||
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«===SORRY!===Preceding context expects a term, but found infix = instead at /tmp/WXnqLzycec line 1:------> my $bag = bag a ⏏= > 10, b => 2; my $bag2 = bag a => 3, cParse failed» | ||
..rakudo 58233d: OUTPUT«===SORRY!===Preceding context expects a term, but found infix = insteadat /tmp/NmF5HbIbn_:1------> my $bag = bag a =⏏ > 10, b => 2; my $bag2 = bag a => 3, c » | |||
colomon | rn: my $bag = bag a = > 10, b => 2; my $bag2 = bag a => 3, c => 3; | 12:26 | |
p6eval | niecza v24-5-g599cbcb: OUTPUT«===SORRY!===Preceding context expects a term, but found infix = instead at /tmp/lIe6psHNW9 line 1:------> my $bag = bag a ⏏= > 10, b => 2; my $bag2 = bag a => 3, cParse failed» | ||
..rakudo 58233d: OUTPUT«===SORRY!===Preceding context expects a term, but found infix = insteadat /tmp/TP0TKA3UsW:1------> my $bag = bag a =⏏ > 10, b => 2; my $bag2 = bag a => 3, c » | |||
colomon | rn: my $bag = bag a => 10, b => 2; my $bag2 = bag a => 3, c => 3; | ||
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» | ||
..niecza v24-5-g599cbcb: OUTPUT«Potential difficulties: $bag is declared but not used at /tmp/bRW28pkkZw line 1:------> my ⏏$bag = bag a => 10, b => 2; my $bag2 = b $bag2 is declared but not used at /tmp/bRW28pkkZw line 1:------> my $bag = bag a => 10, b => 2… | |||
colomon | rn: my $bag = bag a => 10, b => 2; my $bag2 = bag a => 3, c => 3; say $bag (-) $bag2 | ||
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/… | ||
..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» | |||
colomon | rn: my $bag = bag a, b, a; my $bag2 = bag a, c; say $bag (-) $bag2 | 12:27 | |
p6eval | niecza v24-5-g599cbcb: OUTPUT«===SORRY!===Undeclared routines: 'a' used at line 1,1,1 'b' used at line 1 'c' used at line 1Unhandled exception: Check failed at /home/p6eval/niecza/boot/lib/CORE.setting line 1443 (die @ 5)  at /home/p6eval/niecza/src/STD.pm6… | ||
..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)» | |||
colomon | rn: my $bag = bag <a, b, a>; my $bag2 = bag <a, c>; say $bag (-) $bag2 | ||
p6eval | rakudo 58233d, niecza v24-5-g599cbcb: OUTPUT«set(b,, a)» | ||
colomon | yeah, that's my bug all right | 12:28 | |
rn: my $bag = bag <a, b, a>; my $bag2 = bag <a, c>; say set($bag); say set($bag2); say $bag (-) $bag2 | |||
p6eval | rakudo 58233d, niecza v24-5-g599cbcb: OUTPUT«set(a,, b,, a)set(a,, c)set(b,, a)» | ||
moritz | are the commas inside the <...> intentional? | ||
colomon | rn: my $bag = bag <a b a>; my $bag2 = bag <a c>; say set($bag); say set($bag2); say $bag (-) $bag2 | ||
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 | ||
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)» | ||
colomon | that's my bug | ||
moritz | what should the result be? | 12:33 | |
bag("a" => 1, "b" => 1) ? | 12:34 | ||
colomon | no, the problem here is that it's actually doing (my $diff = $bag) (-) $bag2 | 12:35 | |
rather than my $diff = ($bag (-) $bag2) | |||
TimToady: ^^ | |||
moritz | r: rn: my $bag = bag <a b a>; my $bag2 = bag <a c>; say ($bag (-) $bag2) | 12:37 | |
p6eval | rakudo 58233d: OUTPUT«===SORRY!===Two terms in a rowat /tmp/1d8SHyipwo:1------> rn⏏: my $bag = bag <a b a>; my $bag2 = bag  expecting any of: argument list postfix infix or meta-infix infix stopper state… | ||
moritz | rn: my $bag = bag <a b a>; my $bag2 = bag <a c>; say ($bag (-) $bag2) | ||
p6eval | rakudo 58233d, niecza v24-5-g599cbcb: OUTPUT«set(b)» | ||
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:41
benabik left
12:47
LoRe_ left
12:50
LoRe joined
|
|||
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 | |
so the say ($bag (-) $bag2) version is correct. | |||
moritz | colomon: why did you give it %list_infix precedence? | 12:57 | |
then it's no wonder it's looser than item assignment | |||
colomon | moritz: I just did it as TimToady had it. | ||
but yes, now I'm thinking that's wrong. | |||
moritz | it seems those ops aren't in S03 | 12:58 | |
I wonder if the precedence should be the same as junctive and/junctive or | 12:59 | ||
12:59
[Coke] joined
|
|||
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. | 12:59 | |
moritz | bbkr: so far the recommendation is X::JSON::RPC::WhatGoesWrong | 13:00 | |
bbkr | in lib/X/JSON/RPC ? | 13:01 | |
moritz | the module -> path mapping doens't change just because there's an X in the name | 13:02 | |
so yes | |||
bbkr | moritz: thanks | ||
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? | ||
colomon | now running | 13:09 | |
8.5 seconds | |||
had not expected such a big difference! | 13:10 | ||
moritz | r: say 95 / 8.5 | ||
p6eval | rakudo 58233d: OUTPUT«11.176471» | ||
13:13
amkrankruleuen left
13:14
MayDaniel joined
13:22
Util joined
13:30
GlitchMr joined,
kaleem left
13:44
benabik joined
13:53
cognominal joined
|
|||
cedrvint | is there a documentation on how to add a new metaoperator? | 14:00 | |
14:00
atrodo joined
|
|||
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:03 | |
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:04 | ||
oh, that was for something completely different i think | 14:10 | ||
14:11
bluescreen10 joined
|
|||
timotimo | it was for making $. give a better error, that's it! | 14:13 | |
14:16
PacoAir joined,
sahadev left
|
|||
cedrvint read "it was for making $" ;) | 14:20 | ||
timotimo | i'd love to write a patch like that one day :D | ||
GlitchMr read "it was for making $" ;) as $" variable should have better error. | 14:21 | ||
std: $" | |||
p6eval | std a8bc48f: OUTPUT«===SORRY!===Unsupported use of $" variable; in Perl 6 please use .join() method at /tmp/M02Syhr8_W line 1:------> $"⏏<EOL>Parse failedFAILED 00:00 41m» | ||
GlitchMr | Except this error is good error | 14:22 | |
timotimo | well, i was talking mostly about: | ||
[Coke] | r: use Test; is("\c[LINE FEED (LF)]", "\c10", '\c[LINE FEED (LF)] works'); | ||
p6eval | rakudo 9df474: OUTPUT«ok 1 - \c[LINE FEED (LF)] works» | ||
timotimo | r: $. | ||
p6eval | rakudo 9df474: OUTPUT«===SORRY!===Non-declarative sigil is missing its nameat /tmp/KmSv8HnS2W:1------> $⏏. expecting any of: statement list prefix or term prefix or meta-prefix» | ||
[Coke] | that dies locally with "Unrecognized character name LINE FEED (LF)" | 14:23 | |
GlitchMr | std: $. | ||
p6eval | std a8bc48f: OUTPUT«===SORRY!===Unsupported use of $. variable; in Perl 6 please use the filehandle's .line method at /tmp/pUiMczYiQh line 1:------> $.⏏<EOL>Parse failedFAILED 00:00 41m» | ||
GlitchMr | STD can already give good errors | ||
cedrvint | r: /{ make '$' }/ | ||
p6eval | rakudo 9df474: ( no output ) | ||
cedrvint | it makes '$' :) | ||
diakopter | std: std: say: ; | 14:24 | |
p6eval | std a8bc48f: OUTPUT«ok 00:00 40m» | ||
timotimo | it may make $, but no output? seems fishy | ||
cedrvint | :) | ||
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» | ||
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:27 | |
14:29
PacoAir left,
PacoAir joined
14:30
sahadev joined
14:32
cognominal left
14:35
GlitchMr left
14:38
cognominal joined
|
|||
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)» | ||
..niecza v24-5-g599cbcb: OUTPUT«===SORRY!===Undeclared routine: 'b' used at line 1Unhandled 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… | |||
colomon | rn: my $bag = KeyBag.new(<a a a b>); say $bag; $bag<b>--; say $bag; | ||
p6eval | rakudo 9df474, niecza v24-5-g599cbcb: OUTPUT«keybag("a" => 3, "b" => 1)keybag("a" => 3)» | ||
timotimo | colomon: did you mean {b} and not <b>? | 14:46 | |
oh, i see yo ucorrected it | |||
14:47
GlitchMr joined
14:51
cognominal left,
cognominal_ joined
14:53
stopbit joined
15:00
cognominal_ left,
stopbit left
|
|||
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:02 | |
15:03
cognominal_ joined,
benabik left
15:05
kaare_ joined
15:08
kivutar joined
|
|||
timotimo | wasn't perl5 supposed to launch perl6 if it encounters use v6; at the beginning of a file? | 15:08 | |
seems like that's not implemented :( | 15:09 | ||
[Coke] | $ panda install SDL | 15:10 | |
connect failed: Connection refused | |||
(after a rakudo * 2012-11 install) | |||
ah, golfed it to just "panda". :( | 15:11 | ||
15:11
benabik joined
15:13
cognominal_ left
|
|||
timotimo installs panda to see what's up | 15:13 | ||
15:13
stopbit joined
|
|||
timotimo | i thought panda used github for its information? interesting | 15:15 | |
15:17
cognominal joined
|
|||
timotimo | ah, it's feather.perl6.nl:3000 | 15:18 | |
and that's down, so ... not perl6s fault i guess | |||
GlitchMr | The problem with shebangs is that those won't work in Windows. | 15:19 | |
[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. | ||
[Coke] | Thanks for tracking that down. | ||
GlitchMr | And Perl only redirects when shebang doesn't contain "perl". | ||
But "perl6" contains "perl". | |||
timotimo | [Coke]: um, the error did say "connection refused" :) | ||
it didn't say "connection resuf^H^H^Hfused to feather.perl6.pl, though | 15:21 | ||
GlitchMr | Feather works fine. | ||
timotimo | then the server that does the ecosystem on feather has crashed? | ||
hm, brb | 15:22 | ||
[Coke] | feather was recently restarted. | 15:23 | |
GlitchMr | glitchmr@feather ~> uptime | ||
16:23:42 up | |||
Recently, you say? | |||
Well, it was restarted 16 hours ago. | 15:24 | ||
15:33
skids joined
15:34
rindolf left
15:38
fgomez left
15:47
bluescreen10 left
15:52
birdwindupbird left
|
|||
colomon | Advent post up: perl6advent.wordpress.com/2012/12/1...-and-sets/ | 15:53 | |
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
15:55
cognominal left
|
|||
diakopter | colomon++ lgtm | 15:56 | |
colomon | *party | 16:02 | |
16:04
cognominal joined
16:07
PerlJam joined
16:17
erkan left
16:23
benabik left
16:29
benabik joined
|
|||
GlitchMr | colomon: I didn't knew you can simply call bag() | 16:30 | |
Well, looks I'll have to update that page second time | 16:31 | ||
rosettacode.org/mw/index.php?title=...did=148507 | |||
16:34
daniel-s__ left
16:41
ingy left,
ingy joined
16:45
cognominal left,
cognominal joined
|
|||
TimToady | colomon: "compute the set of works" ~~ s/works/words/ | 16:48 | |
jnthn | evening o/ | 16:52 | |
diakopter | o/ | 16:53 | |
www.webupd8.org/2012/01/install-ora...u-via.html - the bestest | 16:54 | ||
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 | |
*multi | |||
timotimo | colomon is a preschooler and does perl6 development? amazing! | 17:00 | |
TimToady | moritz: p5ism in your post: if ($!) { | 17:05 | |
17:15
cognominal left
|
|||
TimToady | moritz: "interesting varibles" | 17:20 | |
17:21
Chillance joined
|
|||
TimToady | and an agreement problem in "write tests that checks" | 17:22 | |
17:22
cognominal joined
|
|||
TimToady | dunno whether you meant "a test that checks" or "tests that check" | 17:22 | |
(or both :) | 17:23 | ||
17:29
popl joined
|
|||
japhb | .oO( Chancellor of the ExChecker ) |
17:32 | |
17:33
benabik left
17:38
sftp joined
17:40
cognominal left
17:44
benabik joined
|
|||
colomon | TimToady++ | 17:46 | |
TimToady: thoughts on the list infixish of the set/bag union/intersection operators? | 17:47 | ||
17:47
dakkar left
17:48
kurahaupo joined
17:59
kaleem joined
|
|||
moritz | \o | 17:59 | |
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? | ||
some sort of LTM side effect because the operators all start with ( ? | 18:02 | ||
jnthn | Unicode? | 18:05 | |
18:06
kaleem left
|
|||
jnthn | yeah | 18:07 | |
Just 'cus the lines are commented out doesn't mean they don't slow the parse down a load. | |||
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:11 | |
jnthn | Aye | 18:12 | |
moritz | r: sub postfix:['!']($x) { [*] 1..$x }; say 5! | 18:13 | |
p6eval | rakudo 9df474: OUTPUT«===SORRY!===Two terms in a rowat /tmp/4EL3Se__hO:1------> postfix:['!']($x) { [*] 1..$x }; say 5!⏏<EOL> expecting any of: infix or meta-infix infix stopper» | ||
moritz | r: sub postfix:('!')($x) { [*] 1..$x }; say 5! | ||
p6eval | rakudo 9df474: OUTPUT«===SORRY!===Two terms in a rowat /tmp/Z5D9K6AWuu:1------> postfix:('!')($x) { [*] 1..$x }; say 5!⏏<EOL> expecting any of: infix or meta-infix infix stopper» | ||
jnthn | sub postfix:<!>($x) { [*] 1..$x }; say 5! | 18:14 | |
r: sub postfix:<!>($x) { [*] 1..$x }; say 5! | |||
p6eval | rakudo 9df474: OUTPUT«120» | ||
jnthn | Guess just a case of unhandled forms. I think you may be able to draw on some existing code to fix that. | 18:15 | |
18:16
Kharec left
|
|||
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:19 | |
diakopter | rn: eval 'sub infix:<()>($a, $b) { $a+$b }; say '~('() 'x 500) ~ '3' | 18:25 | |
p6eval | rakudo 9df474, niecza v24-5-g599cbcb: OUTPUT«3» | 18:26 | |
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» | ||
diakopter | rn: eval 'sub infix:<()>($a, $b) { say $a.WHAT; $a+$b }; say '~('() 'x 6) ~ '3' | ||
p6eval | rakudo 9df474, niecza v24-5-g599cbcb: OUTPUT«Parcel()Int()Int()3» | ||
diakopter | rn: eval 'sub infix:<()>($a, $b) { say $a.WHAT; $a+$b }; say '~('() 'x 7) ~ '3' | ||
p6eval | rakudo 9df474: OUTPUT«===SORRY!===Two terms in a rowat eval_0:1------> WHAT; $a+$b }; say () () () () () () () ⏏3 expecting any of: postfix infix or meta-infix infix stopper statement end statement modif… | ||
..niecza v24-5-g599cbcb: OUTPUT«Unhandled exception: Two terms in a row at (eval) line 1:------> WHAT; $a+$b }; say () () () () () () () ⏏3 at /home/p6eval/niecza/boot/lib/CORE.setting line 1443 (die @ 5)  at /home/p6eval/niecza/src/STD.pm6 line 5597 (STD.panic @ … | |||
FROGGS_ | wow, Stage parse : 245.012 | 18:33 | |
moritz: exactly three times the time as before | 18:34 | ||
diakopter | std: gist.github.com/4278551 | 18:36 | |
p6eval | std a8bc48f: OUTPUT«ok 00:08 83m» | ||
colomon | working on patch... | ||
GlitchMr | .u ⊎ | 18:37 | |
phenny | U+228E MULTISET UNION (⊎) | ||
GlitchMr | I've added "Day 13 – Bags and Sets" to 2012 category | 18:38 | |
18:40
kivutar left
|
|||
colomon | GlitchMr++ | 18:41 | |
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? | |||
moritz | colomon: deleting the offending lines should be enough | 18:42 | |
GlitchMr | KeyBag actually reminds me collections.Counter in Python. | ||
>>> from collections import Counter | |||
>>> Counter("the world isn't perfect") | |||
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}) | |||
colomon | moritz: ah, looks like I missed one. | ||
18:43
wamba1 left
|
|||
colomon | there we go! | 18:44 | |
TimToady | .oO(a file with fewer than 128 non-ASCII chars would fit into an nfg8) |
18:46 | |
.o((albeit by cheating, insofar as it'd treat precomposed chars as non-composable)) | 18:48 | ||
jnthn | ETOOCHEATY :P | 18:49 | |
18:49
noggle_ left
18:50
noggle joined
18:51
wamba joined
18:54
werwerwer joined
|
|||
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? | ||
colomon | GlitchMr: no (he said in a slightly uncertain voice) | 18:59 | |
moritz | I think it's not known whether prime factoring is in NP | 19:00 | |
and prime testing is potentially easier than prime factoring | 19:01 | ||
GlitchMr | www.wolfram.com/technology/guide/N...nTracking/ | ||
Non-Mathematica should be "Neither Mathematica or Perl 6 ;-)". | 19:02 | ||
19:02
fgomez joined
|
|||
werwerwer | if prime testing isn't NP then prime factoring isn't NP neither | 19:02 | |
moritz | werwerwer: do you have any literature on that? | 19:05 | |
werwerwer | moritz: nope, but i think that complexity_of_prime_factoring <= complexity_of_prime_testing * N^2, so <here goes my previous statement> | 19:08 | |
moritz | werwerwer: if that were true, RSA wouldn't work | 19:10 | |
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 | ||
(at least if there's a known algorithm, not just a proof of existence) | |||
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:14
SamuraiJack left
19:16
SamuraiJack joined
|
|||
moritz | en.wikipedia.org/wiki/Primality_test#Complexity | 19:16 | |
"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:17
SamuraiJack left
|
|||
werwerwer | RSA is saved :) wikipedia explains it all | 19:18 | |
19:26
fhelmberger left
19:51
kurahaupo left
19:52
bbkr_ joined
20:02
masak joined
|
|||
masak | evenin', #perl6 | 20:02 | |
diakopter | masak! | ||
FROGGS_ | hi @all | ||
masak | feather felt like rebooting, eh? | ||
FROGGS_ | or better: hi @*ALL ? | ||
flussence | I just read the day 11 post. That's a pretty clever solution, passing code instead of data between threads... | 20:03 | |
20:04
Bzek left
20:09
supernovus joined
|
|||
supernovus | So, how do we get panda working properly again now? | 20:09 | |
moritz | it's broken? | 20:11 | |
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:12 | |
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. | ||
Sometimes cleaning out everything and performing a fresh install fixes everything, so I'll let you know what happens :-) | 20:16 | ||
moritz | supernovus: note that stuff is now installed into %*CUSTOM_LIB<site> by default, not ~/.perl6/lib anymore | 20:17 | |
Meh, I get No object at index 164 | 20:18 | ||
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:20 | |
FROGGS_ | can somebody please read the highlighted block please? gist.github.com/4223775#file-insta...xt-L60-L71 | 20:21 | |
supernovus | Hmm, well, I think I may have an answer to my problem... panda has moved repositories... | 20:23 | |
moritz | hm? | ||
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. | ||
grondilu: they're in the spec tests, on the other hand, and in both Rakudo and Niecza. | 20:25 | ||
20:25
kurahaupo joined,
bbkr__ joined
|
|||
supernovus | guh, just a typo. | 20:25 | |
moritz | moritz@jacq:~>panda install Math::RungeKutta | 20:28 | |
connect failed: Connection refused | |||
maybe tadzik needs to restart some web service after the last feather reboot? | 20:29 | ||
20:29
Tene_ joined,
Tene_ left,
Tene_ joined
20:30
smash_ joined,
quietfan1tic joined,
thou joined
|
|||
tadzik | yeah | 20:31 | |
ok it's up | 20:32 | ||
20:33
chee2 joined
20:34
crazed- joined,
bbkr_ left,
wamba left
|
|||
moritz | tadzik: what command did you use? | 20:35 | |
(just so instructions are in the logs) | |||
20:35
crazed- is now known as crazedpsyc,
szbalint joined
|
|||
tadzik | moritz: perl ~/modules/bin/app.pl | 20:35 | |
I added it to crontab @reboot, but doesn't seem to work :/ | |||
and I didn't get any email from cron | |||
moritz | which feather is that? | 20:36 | |
1? | |||
tadzik | yes | ||
20:37
spider-mario left
|
|||
moritz | ok, thanks | 20:38 | |
20:39
sirrobert left,
sorear joined,
bruges_ joined
20:40
aindilis` joined
20:41
_jaldhar_ joined
20:43
_jfried joined,
cosimo joined
20:44
marloshouse_ joined,
wamba joined
20:46
BooK_ joined
|
|||
supernovus | Crossing fingers, I have my PATH updated with the new versions. Installing my base set of libraries now. | 20:47 | |
20:47
p6eval left,
jaldhar_ left,
drbean left,
Bucciarati left,
jfried left,
bruges left,
marloshouse left,
aindilis left,
cosimo_ left,
marloshouse_ is now known as marloshouse
20:48
drbean joined
20:49
p6eval joined,
ChanServ sets mode: +v p6eval
|
|||
moritz | panda install Math::RungeKutta # succeeded for me | 20:50 | |
20:53
benabik left
|
|||
felher | colomon++ # blog post about sets :) | 20:53 | |
masak | colomon++ | ||
20:53
Bucciarati joined
|
|||
masak | 'night, #perl6 | 20:53 | |
supernovus | panda installed everything successfully for me this time | 20:54 | |
tadzik: is the source to the module app available? | 20:55 | ||
felher | 'night, masak | 20:56 | |
supernovus | have a good one masak! | ||
tadzik | supernovus: if not, it should be :) | ||
20:57
doy left
20:58
_jfried is now known as jfried
|
|||
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 | ||
I'll put it somewhere, in the ecosystem maybe? | 21:02 | ||
probably won't bother anyone there :) | |||
I'll just clean it up a bit | |||
21:02
kivutar joined
21:03
benabik joined
|
|||
supernovus | ecosystem seems like a sensible location, maybe in a 'app' or 'service' subdirectory? | 21:03 | |
moritz | or 'server' maybe :-) | ||
supernovus | That works too :-) | ||
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:04 | ||
tadzik | it needs a cronjob that'll run updatelist.pl | 21:05 | |
# DO NOT EVER USE THAT FEATURE IN PRODUCTION | 21:06 | ||
# OR TINY KITTENS SHALL DIE WITH LOTS OF SUFFERING | 21:07 | ||
yeah, uh, I guess I should've read that earlier :P | |||
supernovus | lovely warning... oO | ||
21:09
GlitchMr left
|
|||
tadzik | there we are | 21:11 | |
dale<TAB><TAB> | 21:12 | ||
21:12
tadzik is now known as da1ek
|
|||
da1ek | OMG GUYS, A COMMIT TO perl6/ecosystem! github.com/perl6/ecosystem/commit/26bf37641 | 21:12 | |
21:12
da1ek is now known as tadzik
|
|||
supernovus | lol | 21:13 | |
21:13
doy joined
|
|||
FROGGS_ | hehe | 21:14 | |
tadzik++ # humor :o) | |||
supernovus | Nice simple app. | 21:18 | |
tadzik | feel free to improve/clean it up | 21:19 | |
FROGGS_ | tadzik: do you have time to read that? gist.github.com/4223775#file-insta...xt-L60-L71 | 21:21 | |
popl | tiny kittens are overrated. | ||
FROGGS_ | I'd like to have some feedback | ||
popl: what about huge kittens? mine is bitte than my almost-three-year-old son when it stands upright on its hind paws | 21:22 | ||
s/bitte/taller/ # I think | 21:23 | ||
no idea why I wrote "bitte" | |||
21:24
kivutar left
|
|||
tadzik | FROGGS_: hm. I guess MANIFEST could also keep the current "best" module version, and panda activate would then update that | 21:25 | |
by default it'd be the newest one or so | 21:26 | ||
FROGGS_ | but you will have four MANIFEST files (home, site, vendor, perl) | ||
tadzik | oh, yes | ||
FROGGS_ | every file has a "best" module version | 21:27 | |
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. | ||
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 | |
supernovus: which one is the right one? | |||
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 ä? | ||
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 | ||
diakopter: but it should be possible to use unicode names... | |||
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 | ||
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. | ||
FROGGS_ | supernovus: good point | 21:38 | |
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 | ||
supernovus: sure, is just an example | |||
21:40
leont joined
|
|||
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:41 | |
21:43
leont left
|
|||
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 | |
th. So when using a binary cache, we'd only have to load one file. | |||
FROGGS_ | k | 21:46 | |
21:46
benabik_ joined,
benabik left,
benabik_ is now known as benabik
|
|||
supernovus | Again, binary caches being an optional feature that any given implementation may or may not support. | 21:46 | |
21:49
sivoais left
|
|||
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:50 | |
21:50
benabik left
|
|||
diakopter | supernovus: rakudo would probably use a binary packed form that can be directly mmap'd as data structures. | 21:51 | |
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:53 | |
21:58
benabik joined
22:07
skids left
22:09
kaare_ left
22:10
sahadev left
|
|||
FROGGS_ | gmight and thanks for your help | 22:11 | |
22:14
Chillance left
|
|||
tadzik | I can has a draft of my advent calendar post: gist.github.com/4280548 | 22:14 | |
Criticism will be very welcome | 22:15 | ||
22:15
Tene_ is now known as Tene
22:25
supernovus left
|
|||
diakopter | nice | 22:25 | |
"coroutine to be ran" -> "coroutine to be run" | 22:26 | ||
22:29
benabik left,
cognominal joined
|
|||
tadzik | thanks, fixed | 22:30 | |
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:31 | |
er, s/roro/ro/ | 22:32 | ||
22:32
whiteknight joined
|
|||
tadzik | I guess async() could return an object you can wait() on | 22:34 | |
diakopter | oh, yes, I meant async, not schedule | 22:35 | |
kurahaupo | diakopter: (that sounded like a skit from a famous British sitcom) | ||
diakopter | tadzik: probably you should show an example of using Coroutines to do the same thing as the LWP example | 22:36 | |
tadzik | oh, yes | 22:39 | |
implement AnyEvent::HTTP the good way :) | |||
diakopter | also, I'm not clear on how the mainline ever actually passes control to the things that are scheduled | ||
ie. what's actually doing the event loop | 22:40 | ||
something in parrot? | 22:41 | ||
tadzik | nah, it's implementing in Pure Perl | ||
and it sucks, too ;) | |||
diakopter | for the IO thing? | ||
s/thing/stuff,module/ | 22:42 | ||
tadzik | hm, I'm confused :) | 22:43 | |
github.com/tadzik/MuEvent/blob/mas...MuEvent.pm is what we're at | |||
diakopter | so only one connection can be active at once? | 22:44 | |
tadzik | no | 22:46 | |
you can have any number you want | |||
diakopter | how would one do that | ||
if one thing sleeps for 10 seconds, does an every-1-second timer still fire during those 10 seconds? | 22:49 | ||
or, s/sleeps/counts to a trillion/ if you like | 22:54 | ||
tadzik | yeah, it's not preemptive | ||
if something runs for 10 seconds it will block the execution for 10 seconds | |||
diakopter | I don't see how more than one connection can be active | 22:55 | |
isn't a connection handled from start to finish in one execution unit (without yielding)? | |||
tadzik | like a network connection? Npe | 22:57 | |
see ttjjss.wordpress.com/2012/04/02/asy...in-perl-6/ for example | |||
23:00
sftp left
23:01
PacoAir left
|
|||
diakopter | tadzik: that doesn't answer my question, afaict | 23:08 | |
tadzik: socket.pmc talks about many "asynchronous versions" of various methods, but I can't find code for them. | 23:09 | ||
they all look synchronous to me. | 23:10 | ||
tadzik | ah | 23:11 | |
I've not much idea about socket.pmc | |||
diakopter | reading INET.pm | ||
accept looks blocking | 23:13 | ||
tadzik | it is | 23:14 | |
you have .poll() though | |||
it works for one socket at a time though | |||
diakopter | that's what I was asking | ||
23:15
chee2 left,
chee2 joined
23:16
chee2 is now known as chee
|
|||
diakopter | I don't see your http_get | 23:20 | |
oh there it is | |||
so, when you're polling the sockets, you can only run callback at once. | 23:23 | ||
tadzik | that's right | ||
23:23
wamba left
23:24
wamba joined
|
|||
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:25 | |
they can add another MuEvent::socket with their callback that doesn't include .close? | 23:27 | ||
ok, I fully understand it now | 23:28 | ||
the parrot docs are disingenuous | |||
"there are these async versions... nope just kidding" | 23:29 | ||
23:31
wamba left
23:33
skids joined
|
|||
diakopter | tadzik: how does one tell the MuEvent loop to stop | 23:35 | |
(from one of the callbacks, obviously) | |||
tadzik | sorry, I'm a bit sleepish :) | 23:38 | |
I'll try to anwer you tomorrow, now I'm having trouble computing sentences | |||
good night o/ | 23:39 | ||
diakopter | o/ | ||
23:44
stopbit left
23:47
MayDaniel left
23:50
popl left
23:59
sivoais joined
|