pugscode.org/ | nopaste: sial.org/pbot/perl6 | ?eval [~] <m oo se> | We do Haskell, too | > reverse . show $ foldl1 (*) [1..4] | irclog: irc.pugscode.org/
Set by diakopter on 11 July 2007.
obra $TIMEOFDAY, #perl6 01:07
Tene obra: /ctcp #perl6 TIME 01:08
Oh, that was a greeting, not a question.
Tene .= fail();
allbery_b @localtime #perl6 -- :) 01:09
spinclad good &localtime(), @all 01:10
diakopter (* #perl6 *) 01:14
meppl good morning 06:25
moritz_ good afternoon ;) 14:41
andara good afternoon, moritz_ 14:42
bloonix good morning ;) 15:36
[particle] Infinoid: t\tools\pdb....ok 15:56
lichtkind how i can emulate $" in perl6? 16:21
bloonix lichtkind: hello 16:29
: On Fri, Mar 25, 2005 at 10:03:45PM -0800, Larry Wall wrote:
: > Hmm, well, if it got that far. Given strict being on by default,
: > this particular example should probably just die on the fact that $"
: > isn't declared, since there's no $" in Perl 6.
it seems that $" is gone 16:30
bloonix svn.pugscode.org/pugs/docs/AES/S28draft.pod 16:31
Gothmog_ But you may write something like "foo {@a.join: ", "} bar" 16:35
And there is probably something more elegant. 16:36
bloonix Gothmog_: jep
"$" is gone, replaced by @foo.join(":") or some such.
from S28draft.pod 16:37
bloonix ?eval 'foo' ~~ /(foo)/; say $1 17:16
pugsbot_r17185 OUTPUT[␤] Bool::True
bloonix whats wrong here? no 'foo' 17:17
diakopter ?eval 'foo' ~~ /foo/; say $1
pugsbot_r17185 OUTPUT[␤] Bool::True
bloonix I want capture it
diakopter afk
bloonix ?eval my $foo; 'foo' ~~ / (foo) { let $foo := $1 } /; say $foo; 17:20
pugsbot_r17185 *** Cannot parse regex: (foo) { let $foo := $1 } ␤*** Error: ␤OUTPUT[␤] Bool::True
bloonix ?eval 'foo' ~~ /(foo)/; say $0 17:21
pugsbot_r17185 OUTPUT[foo␤] Bool::True
bloonix *arg* 17:22
?eval 'foo' ~~ / (foo) { let $foo := $0 } /; 17:26
pugsbot_r17185 *** Cannot parse regex: (foo) { let $foo := $0 } ␤*** Error: ␤Match.new(␤ ok => Bool::False, ␤ from => 0, ␤ to => 0, ␤ str => "", ␤ sub_pos => (), ␤ sub_named => {}␤)
moritz_ ?eval 'foo' ~~ m/ $<foo> := (foo) /; $<foo> 17:47
pugsbot_r17185 \Match.new(␤ ok => Bool::True, ␤ from => 0, ␤ to => 3, ␤ str => "foo", ␤ sub_pos =>␤ (Match.new(␤ ok => Bool::True, ␤ from => 0, ␤ to => 3, ␤ str => "foo", ␤ sub_pos => (), ␤ sub_named => {}␤ ),), ␤ sub_named => {}␤)
moritz_ ?eval 'foo' ~~ m/ $<foo> := (foo) /; ~$<foo>
pugsbot_r17185 "foo"
pasteling "blooni" at 87.79.208.212 pasted "'foo bar baz' ~~ /(.*)/; say "" (9 lines, 135B) at sial.org/pbot/26642 17:50
bloonix thats confusing 17:51
moritz_ it is indeed 17:53
bloonix if I do $foo = $0 first and do $foo.split(rx/\s+/) its the same 17:54
moritz_ I think it's somehow because $0 is not a string
try (~$0) instead, and it works as expected 17:55
but that's not very DWIMmy
bloonix that works but tell me why 17:57
I dont understand it
shouldn't $0 work?
moritz_ wour List multi method split ( Str $input: Str $delimiter, Int $limit = * ) is export our List multi method split ( Str $input: Rule $delimiter, Int $limit = * ) is export 17:58
if it 17:59
sorry
seems to be a typing problem
pugs doesn't implement types very well (which should be changed by audreyt++'s waiting MO branch)
it doesn't handle $0 as a string, even though it probably should coerce it into a string 18:00
pugs_svnbot r17196 | lwall++ | substr should be exported multi method 19:04
r17196 | lwall++ | updated grammar description of printf formats to use newer, cleaner notation
diff: dev.pugscode.org/changeset/17196
lambdabot Title: Changeset 17196 - Pugs - Trac
Limbic_Region today I was teaching an introduction to perl to a bunch of Java developers. Every so often I would say, in Perl 6 this will be done as "X" or when a question would arise, I would answer the question and say, in Perl 6 this will be done like "Y"
rindolf Limbic_Region: heh. 19:05
Limbic_Region: isn't it a bit confusing?
Limbic_Region The most overwhelming response I got was - when is Perl 6 coming out 19:06
hrm - apparently this client is eating everything I am typing again
The most overwhelming response I got was - when is Perl 6 coming out
grrrr
diakopter Limbic_Region: <sigh>: here, reconnect in 5 minutes - lemme switch it back to use the perl version... oka?
Limbic_Region rindolf - not really since this was more a "concepts" class rather than syntax
diakopter - don't worry about it 19:07
diakopter ok
Limbic_Region it was fun though 19:08
diakopter - for what it is worth, I didn't have this problem when I used FireFox 19:09
diakopter Limbic_Region: oh (nor I, during the brief times I tested it) 19:15
TimToady I'm trying to decide whether <foo: I am a $x> should default to interpolating like "" or not...
I find myself want to write a lot of error messages with <panic: ...> that want to interpolate bits of what was already parsed... 19:16
and S05 doesn't specify what it means by "string" there.
Limbic_Region remind me what the advantage (in this case) of <panic: ...> is over "panic: ..." ? 19:18
[particle] it's certainly difficult to produce good error messages in the parser now
however you can provide a backtrace
that helps give some context
TimToady Limbic_Region: "panic: ..." would match that literally in a regex, whereas <panic: ...> is short for <panic('...')> or maybe <panic("...")> 19:20
Limbic_Region er um, I guess I didn't do a good job of asking my question
TimToady the : form is just sugar 19:21
saves wear and tear on the () keys
Limbic_Region and now I must wait and hope my client delivers the message
I guess it wasn't clear from your statement of "write a lot of error messages" that you needed a rule at all
[particle] so, there's not enough sugar to distinguish between interp and non-interp
Limbic_Region neat, they came in out of order
TimToady in particular, I'm trying to redirect bogus uses of old $@ and $# and such to the new things 19:22
and I find I want the <panic: ...> forms to work both ways. :/ 19:23
so *probably* I should leave it at single quotes and make me use panic("...") when I really want to interpolate
[particle] perhaps it's best to use the desugared form
Limbic_Region TimToady - oh nevermind - I was tripping over the word "write" - you meant write code and I was thinking the actual error message itself 19:24
TimToady on the theory that more complicate things should look more complicated
Limbic_Region really needs a break
[particle] more common things should be easier, though
TimToady yeah, that's the flip side
diakopter TimToady: what about <panic:"oops: $interpMe">
Limbic_Region When you put in your 40 before Wednesday it makes for a long week 19:25
TimToady well, if it was unintended, then you likely get a compile-time error
Limbic_Region gives up
When you put in your 40 before Wednesday it makes for a long week
diakopter Limbic_Region: I suspect all your sent messages are getting here; but they're delayed
Limbic_Region diakopter - well, they may be getting to feather but they are not all getting to irc 19:26
diakopter oh. it's possible they're getting to us but not to you, however. did you verify against moritz' log? (sorry to question your analysis) 19:27
Limbic_Region I typed the line about 40 about 5 times (2nd time being written)
how many times did you see the above line? (2nd time being written) 19:28
diakopter - I am looking at the logs now, many of the things I type never show up in IRC (2nd time being written) 19:29
diakopter Limbic_Region: :( you sure you don't want to give me 15 seconds (now) to make the cgi swap? 19:29
Limbic_Region diakopter - it won't make a difference but if you want to - sure 19:30
diakopter ok; you'll get booted; just wait 10 seconds then reconnect.
Limbic_Region waits to get booted 19:31
diakopter ok LR - try now? (assuming you're watching the logs) :) 19:32
spinclad TimToady: how much of a huffman burden would it be to write <panic: "message message $interpolateMe"> (two "'s longer than currently) ?
diakopter TimToady: I meant <panic:"$interp"> as opposed to <panic: "$raw"> 19:33
(where "$raw" is sent as '"$raw"', I mean)
spinclad iow the : replaces the ()s
Limbic_Region salutations from the great beyond (take 3)
diakopter - 3rd time I typed that it showed up 19:34
diakopter silly IE....
spinclad diakopter: i think we're proposing the same; priority is yours
Limbic_Region well, combination of IE, corporate proxy and firewall, and CGI:IRC (take 2)
Limbic_Region decides to call it a week 19:36
TTFN all
TimToady I suppose, given that panic is essentially a method call, that it makes sense to use colon the same way 19:40
[particle] meaning, that panic is the invocant? 19:44
diakopter panic is sorta like catch
^ (thinking out loud - not answering [particle]) 19:45
TimToady panic is the method name; the invocant is implicitly the current match context 19:48
anyway, that argues for <panic: "foo"> as the proper alterative to <panic("foo")> 19:49
[particle] and leaves open the possibility for <panic: :message<foo> :exitcode<255>> ? 19:51
i'm just wondering how much like method calls this will end up being
named optional slurpy etc
diakopter shouldn't a method call be <.panic: ...> for clarity? alternately asked, will the invocant always be the matchee? 19:53
TimToady it's exactly like, except the terminator is >, and the invocant is missing
[particle] <> implies $/ as invocant
except i guess that's not the case with <foo bar> 19:54
foo is still a method on $/, but bar is a regex
meppl good night 23:35