pugscode.org/ | nopaste: sial.org/pbot/perl6 | ?eval [~] <m oo se> | We do Haskell, too | > reverse . show $ foldl1 (*) [1..4]
Set by diakopter on 25 June 2007.
00:00 |Jedai| is now known as jedai 00:25 amnesiac joined 00:29 weinig_ joined 00:51 rlb3 joined 00:52 prism joined 00:53 nipotaway is now known as nipotan 01:16 avar joined
avar Aankhen``: *slap* 01:16
Aankhen`` spontaneously combusts for avar's pleasure.
avar woohoo 01:17
01:18 rlb3 joined
offby1 do it again! 01:19
Aankhen`` spontaneously combusts again, for offby1's pleasure.
01:19 diakopter_afk is now known as diakopter
offby1 Ashes that burn. Neat trick. 01:19
offby1 applauds
Aankhen`` …and before you ask, I'm all burnt out for now.
offby1 slaps Aankhen`` upside the haid 01:20
Aankhen`` Ouch.
offby1 let that be a lesson to you
Aankhen`` A lesson in what, exactly?
offby1 the evil of puns.
Eeevil
Aankhen`` Embrace the puns. Come to the dork side. 01:21
01:21 jedai joined
offby1 my hand is gonna be sore from slapping 01:21
avar You and your euphemisms 01:22
offby1 you and your single entendres
avar heh:)
01:24 rashakil joined
Aankhen`` Bahaahahaaahahaha. 01:27
Well, I'm off. College exam on VB. *shudders* 01:29
01:29 weinig joined
offby1 yikes 01:30
01:31 sunnavy joined
pasteling "evalbot_r16741" at 193.200.132.135 pasted "Pugs build failure" (6 lines, 278B) at sial.org/pbot/25819 01:38
01:38 evalbot_r16741 joined 01:48 offby1 joined 01:49 prism joined 01:52 ashleyb joined 02:10 ruscoekm joined
diakopter anyone want an svn commit account? 02:45
pasteling "evalbot_r16741" at 193.200.132.135 pasted "Pugs build failure" (6 lines, 278B) at sial.org/pbot/25821 02:47
02:47 evalbot_r16741 joined
offby1 diakopter: don't just _give_ it away, silly; _auction it off_ 02:50
diakopter places SUDO ALL rights on feather up for bid.... ;) 02:51
02:58 diakopter is now known as diakopter_afk 02:59 Jmax joined 03:08 REPLeffect joined
offby1 bids $1 03:13
03:14 diakopter_afk is now known as diakopter
diakopter sry; bidding closed already. :( 03:14
offby1 who won? who won?
second chance offer! 03:15
diakopter can't say. some script kiddie...
03:16 REPLeffe1t joined 03:26 revmischa joined, mobutu joined
revmischa perl6.on.nimp.org/btree.html 03:26
lambdabot Title: GNAA Last Measure Live!
Tene revmischa-- 03:27
03:28 jenk3m is now known as jmac, jmac is now known as jenk3m 03:29 revmischa left 03:32 mobutu left
Tene What's up with the spam attacks on the channel and on timtoady? 03:32
offby1 ? 03:34
wasn't me.
Nobody saw me. You can't prove a thing.
SamB Tene: some idiot thinks it's fun? 03:40
Tene I'm just confused by the target. 03:42
Aankhen`` offby1: So you *think*. 03:57
offby1 glances around nervously. 03:58
Aankhen`` For all you know we've been watching you.
That innocent-looking bulb? That could actually be a hidden camera.
04:04 weinig_ joined 04:06 weinig_ is now known as weinig 04:15 mako132 joined 04:18 ruscoekm_ joined
offby1 eek! 04:19
I just planted that last month. You're saying my onions are _spying_ on me?
04:23 Rawdog joined
Aankhen`` offby1: No, of course not. I'd never say something like that. 04:24
…on the other hand, I'm not saying they *aren't* spying on you either. 04:25
Aankhen`` wonders if *foo* => <i>foo</i> is a good idea.
offby1 I think Google Talk does just that
and _foo_ underlines
Victoria, BC? 04:26
offby1 plays "guess the city" 04:27
svnbot6 r16742 | lwall++ | [STD] some work on parameter syntax, more fake ops to chide unwary P5 folks 04:30
offby1 hey! I'm an unwary p5 folk. I don't wanna be chid. 04:31
Aankhen`` Nyah, nyah, you've been chided. 04:32
Tene Aankhen``: no, that was just a hanging chide.
Aankhen`` Tene: Hmm?
Tene Aankhen``: US culture pun.
"Hanging chad" referring to a recent presidential election. 04:33
Aankhen`` Ah.
diakopter offby1: <@TimToady> only like, if you use =~ instead of ~~, for instance... 04:37
allbery_b someone mentioned Chad Vader on another channel and I askjed if he was in charge of the Florida elections 04:40
Aankhen`` Very droll. 04:41
svnbot6 r16743 | Aankhen++ | * [irclog] added `title` attribute to r?\226?\128?\166 links. 04:47
Aankhen`` Woo.
svnbot6 did not like my commit message.
pasteling "evalbot_r16742" at 193.200.132.135 pasted "Pugs build failure" (6 lines, 278B) at sial.org/pbot/25827 04:51
05:11 TimToady joined
dduncan offby1, you just named my place of birth, 45 mins ago ... but any other reason you brought it up 05:11
? 05:12
offby1 dduncan: well, I /whois people to see where they are. Aankhen``s record said something about "vn.shawcable.net", so I guessed Victoria, because it, too, has a "V" in it :-p
dduncan well, Victoria BC is about a half-hour drive from where I am/live right now 05:13
TimToady there's a Victoria here in Texas too
lambdabot TimToady: You have 75 new messages. '/msg lambdabot @messages' to read them.
offby1 yikes.
allbery_b eep. 05:14
dduncan shawcable is the local cable provider, and in much of Canada ... don't know much about other areas
05:14 daxim_ joined
allbery_b (yes, there is sych a thing as being too popular...) 05:14
diakopter TimToady: you actually have at least 1 real msg (from me; backlog to see it)
05:14 weinig joined
Tene TimToady: any idea why you're the target of this weird spammer? 05:15
meppl good morning
dduncan yes
05:17 weinig joined
TimToady I dunno; maybe he wants people to feel sorry for me :) 05:18
05:18 devogon joined
diakopter an 'empathist', then? 05:19
er, pityist 05:20
05:23 Psyche^ joined 05:36 mjk joined 05:39 Psyche^ is now known as Patterner 05:57 diakopter is now known as diakopter_afk 06:13 iblechbot joined 06:37 dduncan left 06:49 BooK joined 06:51 elmex joined 06:55 elmex joined 07:06 weirdo joined
weirdo no call/cc in p6? 07:06
lumi Is specs.pugscode.org supposed to just go to the root of a pugs tree? 07:08
07:09 renormalist joined
Aankhen`` weirdo: Nope. You just use &?CALLER_CONTINUATION. 07:09
weirdo: As in sub foo () { my $cont = &?CALLER_CONTINUATION; }
weirdo wow. gotta hone my contination skills! 07:10
Aankhen`` Or at least that's how it was last I heard. I could be stuck in the past. :-)
07:10 franck__ joined
renormalist ?eval @moo = <1 2 3>; for @moo -> $i is copy { say $i++ } 07:11
07:11 evalbot_r16741 is now known as evalbot_r16743
evalbot_r16743 OUTPUT[1␤2␤3␤] undef 07:11
Aankhen`` If you really wanted, you could have a: sub callcc (&block) { &block.(&?CALLER_CONTINUATION); }
renormalist ?eval @moo = <1 2 3>; for @moo <-> $i { say $i++ }
evalbot_r16743 Error: ␤Unexpected ">"
lumi renormalist: ENOTIMPL I think 07:13
Couldn't the caller continuation just be &return? 07:16
Aankhen`` Probably not… I doubt &return saves its environment. 07:18
Er, did that even make any sense?
07:18 jedai joined 07:20 mtve joined
lumi If I pass a block with a call to return in it, where would it return? 07:21
Aankhen`` The outermost function?
Rather, the innermost function.
lumi So: sub foo { my $a = bar ({return 1}); $a + 1}; sub bar($x) { $x() + 15 }; foo # returns 2? 07:23
?eval sub foo { my $a = bar ({return 1}); $a + 1}; sub bar($x) { $x() + 15 }; foo 07:24
evalbot_r16743 2
lumi That's indeed what it does
07:36 marmic joined 07:46 marmic joined 07:54 kanru joined 07:58 bsb left 08:03 franck___ joined
broquaint Why's that? Is $x treated like a block (instead of a sub)? 08:05
08:06 akreal joined 08:07 jisom joined 08:08 ofer joined
lumi broquaint: I think so? Was I making up syntax? 08:13
That's not actually a very good test, is it 08:14
?eval sub foo { my $a = bar (-> $n {return $n + 1}); $a + 1}; sub bar($x) { $x(12) + 15 }; foo
evalbot_r16743 14
08:21 franck__ joined
broquaint So why does the anonymous sub leave &bar before the add op is evaluated (i.e the result isn't 29 as it is in Perl5 equivalent code)? 08:21
Aankhen`` ?eval sub foo { my $a = bar (-> $n {leave $n + 1}); $a + 1}; sub bar($x) { $x(12) + 15 }; foo 08:22
evalbot_r16743 17.0
Aankhen`` Huh. 08:23
lumi Because, I think, just like Aankhen`` said, 'return' returns from the innermost sub
Aankhen``: Huh?
What even happened there?
Aankhen`` Oh, sorry, I misunderstood.
Let me see.
It's supposed to exit the anonymous sub, yielding a value of 13, which should then be added to 15, yielding a value to be returned to foo, ending up with 29. 08:24
?eval sub foo { my $a = bar (-> $n {leave($n + 1)}); $a + 1}; sub bar($x) { $x(12) + 15 }; foo 08:25
evalbot_r16743 17.0
Aankhen`` I dunno.
Here's what S04 says:
A return always exits from the lexically surrounding sub or method definition (that is, from a function officially declared with the sub, method, or submethod keywords). Pointy blocks and bare closures are transparent to return. If you pass a closure object outside of its official "sub" scope, it is illegal to return from it. You may only leave the displaced closure block itself by falling off the end of it or by explicitly calling le
To return a value from any pointy block or bare closure, you either just let the block return the value of its final expression, or you can use leave, which comes in both function and method forms. The function (or listop) form always exits from the innermost block, returning its arguments as the final value of the block exactly as return does. The method form will leave any block in the dynamic scope that can be named as an object an
lumi I don't understand what's happening there
Aankhen`` I have no idea how that code ended up with a result of 17. 08:26
lumi So passing a 'return' outside its legit lexical scope is an error?
Aankhen`` And how it became a floating-point number in the process.
Apparently so.
lumi I don't follow "official sub scope"
Is this lexical scope, or dynamic scope/extent?
Aankhen`` Not sure.
Probably lexical scope, since it's defined to exit from the lexically surrounding sub/method. 08:27
lumi So passing it down even while still in dynamic scope would be an error
Aankhen`` I guess. 08:28
lumi This limits the kind of control structures you can write without macros, I guess
08:28 IllvilJa joined
Aankhen`` Well, say you have this: my $saved_block; sub foo () { bar(-> { return 1; }); }; sub bar ($block) { $saved_block = $block; }; foo(); $saved_block.() 08:29
What should it do?
lumi That's definitely an error without full continuations 08:31
Aankhen`` So tweak it.
Well, say you have this: my $saved_block; sub foo () { bar(); }; sub bar () { $saved_block = &?CALLER_CONTINUATION; }; foo(); $saved_block.()
(Sorry, just hit the Up arrow and altered the code.)
lumi I think that's an infinite loop 08:32
Aankhen`` Is it?
Doesn't it just throw away the value of bar()?
Or rather, return it, since it's the last statement.
Anyway, the point was, if you really want continuations, use continuations. 08:33
lumi The caller continuation is the entire rest of the program
Aankhen`` Oh yeah. I kinda ignored that little detail. :-$
I used to be intimidated by continuations. Then I thought I understood them. Then I was intimidated again.
lumi The dynamically scoped return is something much more limited
Also it's something we use every day, if you can think of, say, for loops as subroutine calls 08:34
Aankhen`` Is the "it" there dynamically-scoped return or continuations? 08:35
lumi Sorry, the dynamically-scoped return
Aankhen`` Ah.
lumi You pass a block to &for, and expect its return to return from you
Where you are a sub :P
broquaint Should a return in a pointy block throw some kind of warning/error?
Aankhen`` I'm sorry, that just isn't working for me. :-P
broquaint: No, it should throw an error if it's passed outside its "official sub scope". 08:36
lumi ?eval sub foo { for 0..10 -> $x { return $x if $x > 5 } }; foo
evalbot_r16743 \6
broquaint And outside the official sub scope one would probably want &leave instead? 08:37
Aankhen`` broquaint: Yes.
lumi broquaint: With different meaning
Aankhen`` `leave` says "just leave the innermost block".
lumi leave leaves the block
Aankhen`` `return` says "leave the innermost (lexically-scoped) block".
Um.
s/block/sub or method/
lumi What he said :P
Aankhen`` He said, she said, can't we all just get along? :-P 08:38
lumi s/he/$gender_neutral_pronoun/
broquaint Aha, thanks, good to know there's nothing surprising there :)
lumi I'd go with "hän" but it's too much work to conjugate 08:41
Aankhen`` ? 08:44
lumi As a gender-neutral pronoun 08:45
Aankhen`` Ah. I don't believe I've heard that before.
lumi They don't have genders in Finland, you see
Aankhen`` LOL.
08:46 ofer joined
Aankhen`` moritz: Ping. 08:48
moritz Aankhen``: pong 08:58
Aankhen`` Hola.
I'm spending some more time hacking on useless things: I want to stop abbreviations from being expanded multiple lines within the same line, but to do that I need to maintain per-line state. Is it okay with you if each filter gets an extra hash for that? 08:59
moritz Aankhen``: it's a good idea... 09:00
Aankhen`` Cool, I shall implement. 09:01
moritz Aankhen``: because it allows us to treat r(\d+) differently depending on the one how said it...
because if specbot6 says it it means something different
Aankhen`` Right.
Commited, try it out? 09:02
moritz wait a second... 09:03
svnbot6 r16744 | Aankhen++ | * [irclog] pass state to output filters so we don't expand the same abbreviation more than once in a line.
moritz ok, server is at r16744 09:05
Aankhen`` Goddang. 09:06
It didn't work.
moritz test: YAPC
Aankhen`` Okay, try again. 09:07
svnbot6 r16745 | Aankhen++ | * [irclog] tweak to previous commit.
moritz what's that? a closure with a goto? 09:08
pasteling "evalbot_r16744" at 193.200.132.135 pasted "Pugs build failure" (6 lines, 278B) at sial.org/pbot/25830
Aankhen`` Aye.
moritz it looks... scary
Aankhen`` Heh.
moritz why not just carry a hash of those abbreviations that were already applied in that line?
Aankhen`` In this case, it just simplifies the sub a bit. 09:09
Hmm.
Uh, hold on.
I think I mixed up two designs.
svnbot6 r16746 | Aankhen++ | * [irclog] more inanity fixing. 09:10
Aankhen`` Okay, new fix.
Did your server just go down? o_O 09:13
svnbot6 r16747 | Aankhen++ | * [irclog] normalize abbreviations in state too.
moritz test: YAPC YAPC IRC
Aankhen`` I can't seem to connect to it.
moritz seems to work ;)
it works fine for me
Aankhen`` That's good.
Yay, it works. 09:14
For reference, I was testing with moritz.faui2k3.org/irclog/out.pl?ch...24#id_l234
lambdabot Title: IRC log for #perl6, 2007-04-24, tinyurl.com/2xjg23
Aankhen`` By the way, I was wondering… what's the rationale behind showing joins but not quits or parts? 09:15
moritz I didn't know how to capture them when I implemented the bot 09:16
Aankhen`` Heh.
moritz now I have a second implementation using BasicBot that should work
maybe I should kill the old bot and start the new one 09:17
Aankhen`` What do you mean?
moritz the new one does capture parts 09:18
Aankhen`` Oh, I see.
09:18 irclogbot joined
moritz damned, I just did it, and my server doesn't have BasicBot.pm installed 09:18
I _knew_ there was a reason I ran the old one :( 09:19
Aankhen`` :-\
moritz: Is your line.tmpl out of date? 09:24
09:25 weirdo left
moritz md5sum line.tmpl 09:25
19987554527dcf67f6a00434ccf54b2d line.tmpl
should be up-to-date
Aankhen`` Your server doesn't seem to be putting classes on the message TDs, for some reason.
(I added it to line.tmpl earlier.) 09:26
moritz <td class="msg"> 09:28
or what were you expecting?
Aankhen`` Yes, that's what it should be.
moritz well, that's what I get ;)
Aankhen`` Bleh, Firefox is really acting weird today.
Okay, all there now. Sorry for bothering you. 09:30
moritz np 09:31
Aankhen`` Do you use the class="time" on the timestamps for something? Would it be a problem if it moved to the TD?
moritz the css for .time is commented out 09:33
so I think you could remove it
Aankhen`` Cool.
09:33 buetow joined
pasteling "evalbot_r16747" at 193.200.132.135 pasted "Pugs build failure" (6 lines, 278B) at sial.org/pbot/25831 09:39
svnbot6 r16748 | Aankhen++ | * [irclog] more abbrs; fixed a few cases where abbrs had optional characters, resulting in empty expansions.
r16749 | Aankhen++ | * [irclog] CSS tweaks.
09:41 stevan_ joined
Aankhen`` Okay, I should probably get to sleep. 09:42
Aankhen`` snores.
Ciao.
moritz g'night 09:43
09:47 Eidolos joined
wolverian matlab has some interesting features. most of the core functions and operators are overloaded on collection types, so e.g. array+2 adds 2 to all elements, and find(array < 2) returns the indices of all the elements that are < 2. then again, that leaves you with a bunch of container-specific functions to replace the ones that bypass the container.. 09:57
moritz but matlab is horrible to code, because the compiler catches no error at all 09:58
wolverian I don't think it compiles at all, but I could be wrong
it does weird on the load interpreting, anyway.
moritz or something, yes 09:59
wolverian running programs see changes on disk.
s/changes/changes in their code/
moritz for a research project I had to use it a lot, and it's just plain horror
wolverian but, yes, it's horrid to use, and I don't like the language itself either.
only good thing about matlab is the integration to various third party tools (pdl) and the great documentation system.
s/system/content/
moritz when I run a program, it runs for 45 minutes and then dies because I misstyped a variable name - d'oh!
wolverian for what it's worth, that's usually caugh by m-lint 10:00
...variable 'foo' might never be used... or so
s/caugh/caught/
but only usually. :)
do you happen to know R? I was wondering how sane its language is compared to this. 10:01
moritz no ;)
10:05 chris2 joined 10:23 demy joined, demy left 10:31 demy joined, demy left 10:34 crashmatrix joined 10:40 rho joined 10:42 iblechbot joined 10:48 |jedai| joined 10:49 |jedai| joined 10:50 |jedai| joined 10:53 |jedai| is now known as Oisoutch 11:00 buetow joined 11:17 rindolf joined
svnbot6 r16750 | agentz++ | converted S26.pod to UTF-8 11:24
11:24 pbuetow joined 11:44 nipotan is now known as nipotaway 11:50 bonesss joined 11:52 diakopter_afk is now known as diakopter, fglock joined 12:03 REPLeffect joined 12:04 agentzh joined
agentzh finally fixed the encoding of S26.pod... 12:04
lambdabot agentzh: You have 1 new message. '/msg lambdabot @messages' to read it.
agentzh @messages
lambdabot kolibrie said 21h 17m 26s ago: I did that by hand - having an automated way of doing it would certainly be nice
agentzh i thought S26 is already in UTF-8 but it was not. 12:05
12:07 franck___ joined
diakopter agentzh: again, oops/sorry :( 12:08
12:10 frobnitz joined
agentzh diakopter: why? i believe it's my mistake 12:10
diakopter oh 12:11
I updated/synced that file yesterday from Perl6::Perldoc...
dev.pugscode.org/changeset?new=docs...od%4016035 12:12
lambdabot Title: Diff r16035:16740 for docs/Perl6/Spec/Documentation.pod - Pugs - Trac, tinyurl.com/254kbx
agentzh diakopter: okay :) 12:13
diakopter did you change the svn mime-type or the contents, just now? 12:14
agentzh btw, i wrote the thesis for my B.S. degree using Pod 6 :)
diakopter: no, i've forgotten
i've found several bugs in damian's Perl6::Perldoc's XHTML emitter, especially the numbering scheme. 12:15
and i've patched it a lot
Pod 6 is cool!
pasteling "evalbot_r16750" at 193.200.132.135 pasted "Pugs build failure" (6 lines, 278B) at sial.org/pbot/25834 12:20
12:20 evalbot_r16750 joined, franck__ joined
diakopter heh heh; oops 12:21
diakopter adds a pugs evalbot and parrot-perl6 evalbot to #parrot
moritz diakopter: how to eval with parrot-perl6? 12:22
#eval or something? @eval?
diakopter moritz: working on it...
moritz: what do you suggest? 12:23
moritz ?pugs $str and ?parrot $str
lambdabot hackage.haskell.org/trac/ghc/newticket?type=bug
diakopter hee hee
moritz or ?p6por however you abbreviate p6-on-parrot 12:24
diakopter why did lambdabot answer that way
12:25 polettix joined
moritz doesn't know 12:25
lumi I think it corrects for spelling (?pugs/?bugs) 12:29
Or so
12:37 scw joined 12:39 |Jedai| joined 12:43 kanru joined
daxim_ ?lambda 12:43
lambdabot Done.
daxim_ crazy software 12:44
moritz ?lamba
lambdabot Unknown command, try @list
daxim_ lambada! :D/-< :D|-< :D\-<
12:51 WhiteYoung joined 12:58 cmarcelo joined 13:05 franck___ joined 13:06 marmic joined 13:11 diakopter is now known as diakopter_afk 13:12 pnu_ joined 13:21 bonesss joined 13:39 rfordinal joined 14:15 REPLeffect joined 14:17 integral joined 14:20 ruoso joined 14:21 lidden joined 14:22 TJCRI joined 14:24 diakopter_afk is now known as diakopter
fglock ruoso: ping 14:24
ruoso fglock, pong 14:25
fglock ruoso: mago said you will go to YAPC::EU 14:26
14:28 cmarcelo joined 14:29 cmarcelo joined
fglock I'd like to ask for a code review of the kp6 source code - I need to know if I'm using invalid Perl 6 syntax; I can't tell because I've already got used to it 14:34
moritz fglock: is there any part of the code that is particularly interesting for you? 14:36
ruoso fglock, it's not completely defined yet... 14:37
fglock, but I would love it for sure...
fglock moritz: I'm not sure about this constructor style: ::Obj( x => 1 ) # Obj.new( x => 1 )
moritz: this is probably wrong: $thing.val(3) instead of $thing.val = 3 14:38
moritz fglock: I think is is wrong indeed. you have to 'has $val is rw' for that, though 14:39
fglock but I'm not sure if this is valid: $thing.val := 3 # mp6 only has bind
can you bind to an accessor?
moritz can you bind to hash/list elements? 14:40
fglock yes
ok
moritz I just tried to use pugs to check kp6 syntax 14:43
it seems to have problems with pods that contains ^# comments
if I remove that POD block, Grammar.pm and Regex::Grammar don't produce syntax errors 14:44
fglock moritz: where is that? 14:45
moritz fglock: in KindaPerl6::Grammar::Regexp, somwhere around line 186 14:46
v6/v6-KindaPerl6/lib/KindaPerl6/Traverse.pm compiles OK with pugs as well
fglock it seems to be a pugs bug; I think it's valid pod 14:48
moritz right
fglock but I can fix that to avoid the bug
TimToady ::Obj( ... ) is a coercion, which isn't guaranteed to produce a new object like .new 14:49
moritz KindaPerl6::Visitor::Perl fails to compile as well, but that's a pugs bug too
diakopter lumi: it's spec.pugscode.org - though it appears specs points there as well... so I'll add that as an alias...
moritz all other modules under v6-KindaPerl6/lib/KindaPerl6 don't produce syntax errors with pugs 14:50
TimToady $thing.val(3) only works if you define your own accessor that works that way
14:52 [particle] joined
fglock TimToady, moritz: thanks! 14:52
note for myself: s/<'...'>/'...'/g in several places in the grammar 14:53
lunch & 14:54
14:54 the_dormant joined
kolibrie I have lots of those s/<'...'>/'...'/g to do too 14:54
lumi TimToady: Could you clarify 'official "sub" scope' in S04 for us please?
14:54 offby1 left
TimToady It's an official sub if it's introduced with a declarator keyword, but not if it starts with -> or { 14:55
If you want to return from a closure, just use the p5ish sub {...}
diakopter lumi: (fixed specs.) 14:56
TimToady but I think I'm just restating what the spec says
lumi TimToady: As implemented in pugs right now, if you call a sub with a block that has "return" in, it returns *from the sub you called*, and not from the lexically surrounding sub
TimToady as quoted here earlier
lumi I'm asking about dynamic/lexical meaning of scope 14:57
14:57 vel joined
TimToady the spec says lexical 14:57
lumi The common lisp guys call dynamic scope "extent", probably to avoid this exact confusion
TimToady well, extent is not a terribly good word either
doesn't imply time domain
lumi "duration"? 14:58
diakopter "span"?
TimToady course, it's also limited to your callees
in addition to the time
lumi But the pugs behaviour is right?
TimToady if it returns from the "official" sub lexically surrounding the return, then it's right 14:59
lumi "span" is better than "duration", then
Then it's wrong; like I said, it returns from the dynamically closest sub 15:00
TimToady the basic principle is this
when a user writes a sub or method
they expect return to return from that sub or method
15:00 vel_ joined
TimToady regardless of how the blocks inside are implemented 15:00
so the correct way is to throw a control exception that can only be caught by that lexically surrounding sub 15:01
(can be optimized away with known control structures, of course)
sub foo { mumble { return } } needs to treat the semantics of return as invariant regardless of whether mumble is builtin or user-defined 15:02
even if mumble internally has a call stack 1000 deep
does this make more sense? 15:03
and do you know offhand if there's a test for this?
lumi It does and I don't, and thanks :) 15:04
TimToady guess I'll poke around and see
lumi I'm off, have fun& 15:05
15:08 REPLeffect joined 15:11 the_dormant left, statico joined 15:12 statico joined 15:22 amnesiac joined 15:26 obvio171 joined 15:29 diakopter is now known as diakopter_afk 15:32 diakopter_afk is now known as diakopter 15:36 ruoso joined 15:41 ashelyb_ joined, isaacd joined 15:46 diakopter is now known as diakopter_afk 15:49 buetow joined
svnbot6 r16751 | agentz++ | podhtm.pl - trivial edits 15:59
r16752 | agentz++ | started a (personal) branch of PCR under misc/pX/agentz 16:00
16:00 diakopter_afk is now known as diakopter
pasteling "evalbot_r16750" at 193.200.132.135 pasted "Pugs build failure" (6 lines, 278B) at sial.org/pbot/25837 16:03
16:04 GabrielVieira2 joined
svnbot6 r16753 | agentz++ | agentz/PCR - moved t/Regex.pm to t/lib/Regex.pm and updated t/declare/00-demo.t accordingly 16:06
16:18 |Jedai| is now known as jedai 16:20 weinig joined
svnbot6 r16754 | kolibrie++ | version of talk presented at YAPC::NA 2007 (Houston) 16:21
r16754 | kolibrie++ | with some corrections suggested by TimToady++
r16755 | lwall++ | Test that return will bypass both bare blocks and pointy subs.
kolibrie TimToady had been multitasking
pasteling "evalbot_r16753" at 193.200.132.135 pasted "Pugs build failure" (6 lines, 278B) at sial.org/pbot/25839 16:23
16:34 diakopter is now known as diakopter_afk 16:37 diakopter_afk is now known as diakopter 16:38 rindolf joined 16:39 diakopter is now known as diakopter_afk, frobnitz joined 16:41 isaacd_ joined
svnbot6 r16756 | lwall++ | more tests of correct return 16:41
16:47 justatheory joined, franck__ joined
fglock agentz: feel free to change perl5/PCR 16:49
agentzh fglock: okay. thanks for the permission :)
fglock you didn't need permission already :) 16:50
agentzh heh
avar change it how?:)
fglock whatever good ideas you have
agentzh yay
avar has been carrying around the idea of documenting PCR :) 16:51
fglock I've been thinking to upgrade it to kp6's compiler structure, which is cleaner
agentzh fglock: please do :)
fglock: so i think it's safer for me to play aside
fglock: i'm still playing around PCR instead of actually changing it. 16:52
i'm currently working on the emitter testing facility. 16:53
avar agentzh: cool, to what end?:)
agentzh piece by piece
i'm adding smart comments to the generated perl 5 code so that i can reconstruct the tree 16:54
something like "## <alt> ... ## </alt>
fglock I'm trying to concentrate in kp6 project planning - I wish I get to YAPC::EU with something that people can hack on
agentzh fglock: okay :) feel free to work on whatever you like :)
avar agentzh: My PCR related TODO is generalizing the .pm => .pmc compiler to use along with a re::engine 16:55
and improving the perl5 rx emitter
16:55 diakopter_afk is now known as diakopter
agentzh avar: yes, i'm watching your work 16:55
avar lazy
agentzh avar: I'm also very interested to promote the use of PCR on the p5 land
*in promoting
currently PCR is still quite p6-centric, more or less 16:56
avar I want something that works morke like Parse::*, say make a "Parse::Rule" that happens to use PCR to compile a C<package Grammar::*> which is a p5 package
So people can ship modules with emitted PCR code
A re::engine could then be one interface to that 16:57
agentzh avar: that's exactly what i want
avar agentzh: hooha!
agentzh avar: i've been trying to use PCR to rewrite my makefile parser
it's currently written by hand
while Parse::RecDescent is too slow...
avar PCR is sort of slow, but it could be a lot faster with a 5.10 rx emitter:) 16:58
agentzh avar: looking forward to that :)
avar svn.pugscode.org/pugs/perl5/Pugs-Co...grammar.pl 16:59
lambdabot tinyurl.com/2b4vrv
fglock I'd like to do a 5.10 emitter for kp6, but I'm not sure how to deal with backtracking in subregexes and recursive regexes
avar this could be used as part of a M::I that converts a Grammar*.pm to Grammar*.pmc
agentzh avar: thanks 17:00
fglock subregexes can be inlined, but recursion is more complicated
avar maybe you could do:
fglock agentz: you could use v6.pm
agentzh
avar $str =~ $rx; if (pos($str) == $a_pos_that_matches_where_it_should_recurse) { recurse($str, $nextrx) } 17:01
?
agentzh fglock: *nod*
avar Or (??{}) maybe?
17:02 bonesss joined
fglock for example, /<xxx_star> x z / 17:03
the caller regex must tell xxx_star() to backtrack
avar where must it backtrack? 17:04
fglock it must match one-less 'x'
avar ah 17:05
fglock in order for the caller to match
[particle] as in regex xxx_star { xxx* }
17:05 diakopter is now known as diakopter_afk
avar no idea 17:05
[particle] fglock: you need continuations 17:06
17:06 dduncan joined
[particle] hey xxx_star: pick up where you left off 17:06
fglock [particle]: I mean, implement this using plain perl5.10 regex 17:07
[particle] yeah, i know. i don't know how to get around it without continuations 17:08
fglock it works in PCR-perl5, but it is perl5 code - not p5regex
17:08 justatheory_ joined
[particle] can you implement that bit with p5 code? 17:08
avar when I say p5regex I don't mean /purely/ p5regex. You'll always need some code too.. 17:09
but it could defenetely be made faster by using more of the p5 engine 17:13
fglock hmm - there is something wrong here: perl -e 'use v6-alpha' ' regex main::xxx { x* } "xxxxz" ~~ /<main::xxx>xz/; say $/.perl ' 17:16
17:16 vel joined
fglock [particle]: re implement, yes 17:17
17:18 bonesss is now known as bones`OFF, Psyche^ joined, Psyche^ is now known as Patterner, |Jedai| joined, unobe is now known as unobe_away 17:19 bonesss joined, bonesss is now known as bones`OFF, elmex joined, bonesss joined 17:20 diakopter_afk is now known as diakopter 17:21 cmarcelo left
avar fglock: Have you made any p6 rx engine where you can write a pure-perl6 method that does the same thing as token { (.*) } 17:21
17:21 cmarcelo joined
avar i.e. a "multi sub" in a grammar that sets up a capture 17:21
would you do that by returning a match object from it? 17:22
fglock avar: yes - mp6 regex emitter emits p6 code, which is recompiled to the backend; looking for an example... 17:23
17:24 justatheory_ joined
fglock avar: here it is: perl kp6-perl5.pl --do Token EmitPerl6 < examples/token.pl 17:25
avar will look later, don't have a pugs copy
fglock np - you shouldn't look at it anyway - the generated code isn't pretty :) 17:27
PerlJam fglock: are you at yapc?
fglock PerlJam: no, I'm still in Brazil 17:28
the generated code for this looks good; it's a PCR bug: perl -e 'use v6-alpha' ' regex Main::xxx {x*}; "xxxxz" ~~ /<Main::xxx>xz/; say $/.perl ' 17:38
avar huha bug! 17:40
fglock: Since the kp6 backend is "better"-ish wouldn't it make more sense in the long run to just use that for the application I had in mind? 17:41
I.e. to take a grammar end emit p5 code
fglock avar: yes, but kp6 is still way behind v6.pm and pugs - it depends on what limitations you can accept 17:43
[particle] workinger trumps betterer 17:44
avar huhuu
fglock kp6 is good to hack-on; not hack-with yet :)
mp6 is quite usable for building p5 modules - the dependencies are minimal 17:45
though it's not in CPAN 17:46
svnbot6 r16757 | diakopter++ | updated feather stuff... 17:47
17:49 franck___ joined
pasteling "evalbot_r16756" at 193.200.132.135 pasted "Pugs build failure" (6 lines, 278B) at sial.org/pbot/25842 17:50
17:55 justatheory_ is now known as justatheory
svnbot6 r16758 | fglock++ | kp6-roadmap - updated the list of syntax implementation errors 17:55
17:57 Southen_ joined
svnbot6 r16759 | agentz++ | [agentz/PCR] 17:57
r16759 | agentz++ | * added t/lib/Emitter.pm for testing the emitter outputs
r16759 | agentz++ | * added t/emitter/00-ratchet.t to test the ratchet emitter's outputs
r16759 | agentz++ | * removed trailing whitespaces in the .pm files
r16759 | agentz++ | * added "smart comments" to identify each piece generated by each emitter sub
agentzh the unit tests for the emitter can automatically update themselves 17:59
the emitter templates are supposed to change very often after all :)
see the following .t file for an example: svn.pugscode.org/pugs/misc/pX/agent...0-ratche.t 18:01
lambdabot tinyurl.com/yuksah
agentzh comments welcome :)
pasteling "evalbot_r16758" at 193.200.132.135 pasted "Pugs build failure" (6 lines, 278B) at sial.org/pbot/25843
agentzh off to bed & 18:02
18:02 agentzh left 18:27 franck__ joined 18:33 vel joined 18:38 takesako____ joined 18:41 jenk3m joined 18:43 b_jonas joined 18:44 BooK_ joined 18:56 jisom joined 19:01 beppu_ is now known as beppu
diakopter parrot svn, visually represented (but somewhat slow): perlcabal.org/svn/parrot/revision?rev=19378 also, pugs in there somewhere too. :) 19:21
19:29 diakopter is now known as diakopter_afk 19:30 rindolf joined 19:31 ludan joined
ludan hola 19:32
19:32 diakopter_afk is now known as diakopter
diakopter hi ludan 19:32
rindolf Hi all. 19:40
TimToady: here? 19:41
<pasteling> "rindolf" at 82.81.233.250 pasted "Excerpt from a pod2man generated man page - why is there a translation for "|"?" (18 lines, 795B) at sial.org/pbot/25846
I'd like to be enlightened.
Tene directs rindolf to web.enlightenment.org/ ;) 19:42
lambdabot Title: Enlightenment - Beauty at your fingertips
TimToady no clue, other than it looks like it's translating to "bv", which I'd assume is "broken vertical" or some such and probably prettier in someone's font somewhere... 19:47
rindolf Hi TimToady 19:48
TimToady: well, it breaks the searching through the man page/perldoc.
19:53 diakopter is now known as diakopter_afk 19:55 diakopter_afk is now known as diakopter
meppl good night 19:56
Aankhen`` Good night. 19:57
moritz moose! 19:58
Aankhen`` Aardvark! 20:03
fglock meppl: hi 20:06
20:07 Southen joined 20:09 weinig joined 20:17 rashakil joined
moritz fglock: is 'method' implemented in miniperl6? 20:21
svnbot6 r16760 | moritz++ | [mp6] miniperl6-spec.pod is now (very simple) POD
fglock moritz: I think so - looking
yes 20:22
and 'self' 20:23
moritz so 'method foo($self:){$self.bar}' is the same as method foo(){self.bar)' ?
svnbot6 r16761 | lwall++ | complain usefully on p5ish shift ops 20:24
wolverian does 'method foo ($a, $b: $c) { ... }' ever make sense? 20:25
moritz wolverian: I don't think so
20:26 Southen_ joined
moritz is confused... what is '@.body.>>emit' ? 20:28
20:28 jan__ joined
moritz what does .>>$methodname do? 20:28
pasteling "fglock" at 201.54.129.80 pasted "method and self" (11 lines, 338B) at sial.org/pbot/25847
Tene moritz: hyper 20:29
Aankhen`` Shouldn't that be >>.?
[particle] moritz: it runs the method against each object in @.body
Aankhen`` (The question mark is ancillary, sorry for the confusion.)
TimToady either is allowed
as is .>>.
Aankhen`` Ah.
20:29 nuff_ joined
fglock moritz: check the paste 20:29
TimToady however, if .emit does I/O, it can occur in any order 20:30
moritz ok
fglock: thanks
wolverian .>> is just weird to me. is >> a method?
TimToady no, modifies a postfix to a hyperop
moritz wolverian: it's the hyper op (I just learned that)
wolverian I guess it can be seen as hypering the .
TimToady, postfix being .?
er
TimToady .emit is the postfix
wolverian right
[particle] it's like cout >> "foo" ;)
...except nothing like it 20:31
moritz (C++)--
TimToady .foo(@args) is all a postfix
wolverian I'm just used to thinking $foo>>.meth and have to re-evaluate my reasons
moritz fglock: so mp6 even supports hyper ops? cool ;)
TimToady I would write >>.meth myself 20:32
fglock it's just syntax sugar; it doesn't thread
wolverian TimToady, so why is .>> allowed? sorry, I've been trying to keep up with the synopses, but I've missed some, I'm sure.
fglock hmm - it's not just syntax sugar - it depends on what the backend implements 20:33
TimToady wolverian: no good reason, probably 20:34
fglock and '@.body.>>emit' is probably wrong, as TimToady said
because it would emit in any order
moritz even if emit() is not declared as 'is hyper'? 20:35
moritz is truely confused now
TimToady emit has no idea whether it might be hyperized
svnbot6 r16762 | fglock++ | kp6-roadmap - TODO: '@.body.>>emit' is wrong, because it would emit the statements in any order 20:39
pasteling "evalbot_r16761" at 193.200.132.135 pasted "Pugs build failure" (6 lines, 278B) at sial.org/pbot/25850 20:40
fglock the roadmap is getting more interesting - lots of simple things to do
it's more hackathon-friendly :) 20:41
20:41 drupek12 joined
fglock @body.>>emit desugars to something like @body.hyper:{ .emit } # I hope the syntax is right 20:47
20:53 cmarcelo joined
Aankhen`` moritz: Ping. 21:03
moritz Aankhen``: pong 21:06
Aankhen`` moritz: Hola. Are actions stored in the DB itself as normal lines with a * before the nickname?
moritz Aankhen``: yes, they are 21:07
Aankhen`` Ah.
Okay, I'mma add another class to the TDs for actions.
moritz perhaps that was not the best of ideas ;)
Aankhen`` Hehe.
moritz I mean storing them this way
spinclad at least irc protects itself from such nicks 21:11
svnbot6 r16763 | diakopter++ | correct typo/spello in a comment in Perl-6.0.0-STD.pm
r16764 | Aankhen++ | * [irclog] special class for actions.
Aankhen`` I was thinking of italicising action text to make it more distinctive.
moritz Aankhen``: I'll go to bed soon, and if we're unlucky I'll not have internet access until monday :(
Aankhen`` Ouch! :-(
How come? 21:12
moritz Aankhen``: re itilic... go right ahead, but then remove the italic from the bots...
Aankhen``: perhaps but them in small caps instead?
Aankhen`` No, I meant just the action text. The nicks would be untouched.
moritz Aankhen``: visiting my girlfriend's parents
Aankhen`` Oh, I see.
moritz ok, that's fine by me
Aankhen`` Well, have fun and good luck. ^_^
moritz no need for luck, i'm well accepted ;) but thanks anyway ;) 21:13
Aankhen`` Ah, nevermind that then. :-P
21:15 thoughtp1lice is now known as thoughtpolice
svnbot6 r16765 | Aankhen++ | * [irclog] italicise action text. 21:15
Aankhen`` moritz: How does that look to you? 21:16
Aankhen`` is undecided.
(It's distinctive, but I'm not sure whether it looks nice.)
thoughtpolice later moritz
pasteling "evalbot_r16764" at 193.200.132.135 pasted "Pugs build failure" (6 lines, 278B) at sial.org/pbot/25851 21:17
21:20 marmic joined
Aankhen`` moritz: I'm off to shower. In case you leave before then, take care. :-) 21:22
moritz bye, and happy hacking ;-) & 21:25
21:26 buubot joined 21:31 BooK joined 21:36 weinig joined, weinig_ joined 21:38 buubot joined
Jmax hm 21:50
that's a damn good irclog 21:51
too bad it's not written in p6 ;o 21:52
does POE work well with p6/pugs?
avar no? 21:54
Jmax ok 21:56
21:56 rashakil joined 22:00 weinig joined 22:01 Psyche^ joined, Psyche^ is now known as Patterner 22:03 isaacd__ joined
Aankhen`` Jmax: Perl 6 is slated to get events built into the language, so POE doesn't make sense. 22:10
Jmax oh? nice
22:10 rhr joined 22:11 lumi joined 22:26 pbuetow joined
clkao TimToady: what are the things in like $self->madness("o d [ {") ? are they documented anywhere? 22:27
Tene clkao: what things are you referring to? 22:28
TimToady similar things are labelled with different madprops depending on where they are in the p5 grammar 22:29
that just picks the first madprop that matches 22:30
clkao ah ok. i see mad/p55 has /home/larry hardcoded ;) 22:31
22:34 unobe_away is now known as unobe 22:38 weinig joined, unobe is now known as unobe_away 22:42 diakopter is now known as diakopter_afk 23:05 hkb_zz_ joined 23:18 Aankhen`` joined 23:41 weinig joined