Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2007-12-20

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:04 Auzon pugs: my $foo = "foobar"; $foo ~~ s/bar/d/;
00:04 exp_evalbot RESULT[Bool::True]
00:04 Auzon pugs: my $foo = "foobar"; $foo ~~ s/bar/d/; $foo
00:04 exp_evalbot RESULT[\"food"]
00:04 Auzon Ah....
00:05 theorbtwo joined #perl6
00:17 Auzon pugs: {v5; print /a/;}
00:17 exp_evalbot OUTPUT[*** No such subroutine: "&v5"␤    at /tmp/VhMUYjOkWQ line 1, column 2-4␤]
00:17 Auzon pugs: {use v5; print /a/;}
00:17 exp_evalbot RESULT[1.0]
00:18 Auzon pugs: {use v5; $_ = "qwerty"; print /a/;}
00:18 exp_evalbot RESULT[1.0]
00:18 Auzon pugs: {use v5; $_ = "qwerty"; $_ =~ /(\w)/;}
00:18 exp_evalbot RESULT[1.0]
00:18 Auzon pugs: {use v5; $_ = "qwerty"; my($capt) = $_ =~ /(\w)/; return $capt}
00:18 exp_evalbot RESULT["q"]
00:18 Auzon pugs: {$_ = "qwerty"; my($capt) = $_ =~ /(\w)/; return $capt}
00:18 exp_evalbot OUTPUT[*** ␤    Unexpected "/(\\"␤    There is no =~ operator in Perl 6 -- did you mean ~~ (match) or ~= (concat-assign)?␤    at /tmp/5sRzHUDAiG line 1, column 35␤]
00:19 Auzon Very nice :)
00:28 justatheory joined #perl6
00:51 jrockway_ joined #perl6
00:54 jisom joined #perl6
01:09 cnhackTNT joined #perl6
01:23 thestarslookdown joined #perl6
01:51 zakame joined #perl6
01:52 dduncan joined #perl6
01:54 dduncan Following a make realclean, I started to rebuild the latest Pugs using the final release of Perl 5.10.0, which worked, then started a make smoke, which is in progress.  Anyone else testing Pugs with the final 5.10.0?
01:56 zakame joined #perl6
02:11 cnhackTNT joined #perl6
02:20 thestarslookdown joined #perl6
02:39 Caelum joined #perl6
02:41 Squern joined #perl6
02:42 Squern Where's the latest docs on Perl 6 subroutine and method parameter lists?
02:44 Tene Squern: you can start looking at http://spec.pugscode.org/ I think.
02:44 lambdabot Title: Official Perl 6 Documentation
02:44 Limbic_Region http://dev.perl.org/perl6/doc/design/syn/S06.html
02:44 lambdabot Title: Synopsis 6: Subroutines - perl6
02:44 Squern Oh good, up to date synopsis.  Thanks.
02:44 Squern Perhaps dev.perl.org should point to them?  They all point to the originals from 4-6 years ago
02:45 Tene I've been disappointed a few times by dev.perl.org being so out-of-date
02:56 Limbic_Region left #perl6
03:02 Auzon pugs: method prefix:<±> (Num $x --> Num) { return +$x | -$x } my $tolerance = ±7!;
03:02 exp_evalbot OUTPUT[decodeUTF8': bad data: '\177'␤decodeUTF8': bad data: '\177'␤*** ␤    Unexpected "$tolerance"␤    expecting "=", context, ":" or "("␤    at /tmp/ObweMOMkM4 line 1, column 60␤]
03:02 Auzon pugs: method prefix:<±> (Num $x --> Num) { return +$x | -$x } my $tolerance = ±7;
03:02 exp_evalbot OUTPUT[decodeUTF8': bad data: '\177'␤decodeUTF8': bad data: '\177'␤*** ␤    Unexpected "$tolerance"␤    expecting "=", context, ":" or "("␤    at /tmp/AGNtDV3n9K line 1, column 60␤]
03:02 Auzon pugs: method prefix:<+-> (Num $x --> Num) { return +$x | -$x } my $tolerance = +-7;
03:02 exp_evalbot RESULT[\-7]
03:03 Auzon pugs: method prefix:<pm> (Num $x --> Num) { return +$x | -$x } my $tolerance = pm7;
03:03 exp_evalbot OUTPUT[*** No such subroutine: "&pm7"␤    at /tmp/hW2qmcbCic line 1, column 69-77␤]
03:03 Auzon pugs: method prefix:<pm> (Num $x --> Num) { return +$x | -$x } my $tolerance = pm 7;
03:03 exp_evalbot OUTPUT[*** No such subroutine: "&pm"␤    at /tmp/ZVFq5Upx8L line 1, column 69-78␤]
03:04 Tene pugs: my $x = 1; -1 | +1
03:04 exp_evalbot RESULT[(-1 | 1)]
03:05 Tene pugs: multi method prefix:<±> (Num $x --> Num) { return +$x | -$x }; my $tolerance = ±7; $tolerance
03:05 exp_evalbot OUTPUT[decodeUTF8': bad data: '\177'␤decodeUTF8': bad data: '\177'␤*** ␤    Unexpected "$tolerance"␤    expecting "=", context, ":" or "("␤    at /tmp/dETqiTqehs line 1, column 67␤]
03:05 Tene pugs: "evalbot chokes on utf8"
03:05 exp_evalbot RESULT["evalbot chokes on utf8"]
03:05 Tene pugs: multi method prefix:<_> (Num $x --> Num) { return +$x | -$x }; my $tolerance = _7; $tolerance
03:05 exp_evalbot OUTPUT[*** No such subroutine: "&_7"␤    at /tmp/Os4Ma3eXzF line 1, column 75-82␤]
03:06 Tene Bah.
03:06 Auzon Indeed
03:07 Squern So is "foo { code() } bar" for real?
03:07 Squern That is, interpolating {...} in strings as code?
03:08 Auzon pugs: "foo { 'For serious!' } bar"
03:08 exp_evalbot RESULT["foo For serious! bar"]
03:08 Squern I ask because that's going to mean an awful lot of backwacking.
03:08 Auzon Apparently
03:08 Auzon pugs: q~foo { 'For serious!' } bar~
03:08 Squern {} is pretty common in strings.  It's also going to make YAML a pain.
03:08 exp_evalbot RESULT["foo \{ \'For serious!\' } bar"]
03:08 Auzon Only for double quoted string
03:09 Squern Oh, we never use those
03:10 Schwern http://www.google.com/codesearch?hl=en&amp;q=+lang:perl+%5C%22%5C%7B&amp;start=90&amp;sa=N
03:10 lambdabot Title: lang:perl \"\{ - Google Code Search, http://tinyurl.com/2br2q9
03:12 Schwern Google code estimates "about 11,500" hits for "{
03:12 Schwern Although it seems to be 271 in reality.  Heh.
03:13 Auzon To be honest, I'd rather it use an ampersand at the beginning or something like that
03:15 Schwern That's what I thought
03:16 Schwern Or ${} and @{} to mean scalar vs array context like we do with @{[]}
03:16 * Schwern digs up the appropriate mailing list
03:16 Auzon Yeah. I've never heard of anyone having problems with accidentally putting @{[...]} in their string
03:17 Auzon pugs: "{use v5;}"
03:17 exp_evalbot RESULT[""]
03:17 Auzon pugs: "{...}"
03:17 exp_evalbot No output (you need to produce output to STDOUT)
03:20 Auzon pugs: qq:!c "{This should be the default, optionally allowing code.}"
03:20 exp_evalbot OUTPUT[*** ␤    Unexpected "\"{"␤    expecting operator␤    at /tmp/7bbSAhsfNQ line 1, column 7␤]
03:20 Auzon pugs: qq:c(0) "{This should be the default, optionally allowing code.}"
03:20 exp_evalbot OUTPUT[*** ␤    Unexpected "\"{"␤    expecting operator␤    at /tmp/kLpFSbOkWm line 1, column 9␤]
03:21 Auzon pugs: q:s "{This should be the default, optionally allowing code.}"
03:21 exp_evalbot RESULT["\{This should be the default, optionally allowing code.}"]
03:21 Auzon pugs: q:c "{This should be the default, optionally allowing code.}"
03:21 exp_evalbot OUTPUT[*** ␤    Unexpected "}\""␤    expecting ".", "\187", ">>", "=", "^", operator name, qualified identifier, variable name, "...", "--", "++", "i", array subscript, hash subscript or code subscript␤    at /tmp/A5XCvtqJKU line 1, column 60␤]
03:21 Auzon So turning it on works, but not off
03:29 Auzon pugs: gather for 1..4;
03:29 exp_evalbot OUTPUT[*** ␤    Unexpected ";"␤    expecting "_", fraction, exponent, term postfix, operator or block construct␤    at /tmp/zFqHsZLtrj line 1, column 16␤]
03:30 Auzon pugs: gather for 1..4 {.say};
03:30 exp_evalbot OUTPUT[1␤2␤3␤4␤]
03:33 cognominal_ joined #perl6
03:41 Bzek joined #perl6
03:47 Schwern Oh, ${...} won't work because ${foo} already means something.
03:47 Schwern Oh, but not in Perl 6!
03:52 jferrero joined #perl6
04:00 Psyche^ joined #perl6
04:11 chacha_chaudhry joined #perl6
04:21 zakame_ joined #perl6
04:38 zakame__ joined #perl6
04:47 DarkWolf84 joined #perl6
04:49 Alias__ joined #perl6
04:51 Khisanth joined #perl6
05:24 drbean_ left #perl6
05:31 chacha_c1audhry joined #perl6
05:47 Khisanth joined #perl6
05:50 c9s joined #perl6
06:10 zakame__ joined #perl6
06:19 c9s_ joined #perl6
06:19 Juerd_ joined #perl6
06:24 jjore-m joined #perl6
06:31 Ashizawa joined #perl6
06:59 dduncan left #perl6
07:15 penk joined #perl6
07:23 devogon joined #perl6
07:25 rgs joined #perl6
07:38 franck___ joined #perl6
07:48 drrho joined #perl6
07:55 iblechbot joined #perl6
08:27 elmex joined #perl6
09:09 franck____ joined #perl6
09:39 JarJarBi1ks joined #perl6
09:50 renormalist joined #perl6
10:01 charsbar joined #perl6
10:03 c9s joined #perl6
10:05 ebassi joined #perl6
10:07 agjal joined #perl6
10:10 pen1 joined #perl6
10:19 rindolf joined #perl6
10:27 Alias__ joined #perl6
10:28 agjal joined #perl6
10:58 chacha_chaudhry joined #perl6
10:58 chacha_chaudhry join #gnowsys-dev
10:59 chacha_chaudhry *typo :P
11:04 chacha_c` joined #perl6
11:14 chacha_chaudhry` left #perl6
11:16 masak joined #perl6
11:21 rindolf joined #perl6
11:23 Alias__ joined #perl6
11:26 ebassi joined #perl6
11:27 fglock joined #perl6
11:28 BinGOs_ joined #perl6
11:33 elmex joined #perl6
12:12 cognominal_ joined #perl6
12:45 masak is there an official p5-to-p6 translator? what's the state of that?
12:46 moritz_ masak: not sure... the infrastructure the the -DMAD option to Perl 5 Configure
12:46 masak ok, thx
12:47 moritz_ at least that's what parses the Perl 5
12:48 masak a year or so ago, I heard Larry talk about a translator of his that converted something like 99% of CPAN into Perl 6
12:48 masak it sounded like he was on the verge of releasing something
12:49 masak but since then, I haven't heard so much, and now his work seems to be focused on the Perl 6 grammar file
12:49 moritz_ I think that was the plan, not the status ;)
12:49 masak might have been :)
12:52 * moritz_ builds a 5.10.0 with -DMAD now
13:00 wolverian sid is still on 5.8.8?!?! so slow ;)
13:08 moritz_ aye
13:14 zakame joined #perl6
13:29 ispy_ joined #perl6
13:37 fullsux\ joined #perl6
13:45 Patterner I expected Sid to have 5.6.0...
13:45 Patterner or 4.036...
13:49 wolverian um, what?
13:49 moritz_ they're slow, but they don't go backwards
13:51 wolverian I wouldn't even call sid slow
13:52 wolverian it was sarcasm! or something.
13:52 wolverian stop confusing me, guys
13:58 jhorwitz joined #perl6
14:17 pen1 left #perl6
14:26 jjore-m moritz_, just fyi, MAD acquired a bit of bitrot in the last year. Allegedly it does not fully pass tests and no one has appeared to want to spend tuits on it.
14:26 jjore-m though it's still probably most loved as an eventual path from a running Perl 5 VM to something useful to a Perl 6 compiler.
14:31 agjal joined #perl6
14:35 Juerd_ And one of the people who knows much about MAD is spending his tuits on a Perl 5 fork :(
14:40 ferreira joined #perl6
14:44 jjore-m Gerard?
14:45 jjore-m It's not like MAD in Perl 5 is terribly important right now anyway.
14:46 jjore-m tho I'm glad larry has already added in all the annotations to Perl 5 that presumably he thinks he wants for use later.
14:46 jjore-m "all"
14:48 rindolf joined #perl6
14:51 Juerd_ jjore-m: Yes
14:51 Juerd_ Probably not all, but quite a lot
14:53 drbean joined #perl6
15:13 kyrbe joined #perl6
15:14 kyrbe left #perl6
15:17 Alias__ joined #perl6
15:18 elmex joined #perl6
15:27 agjal joined #perl6
15:27 pmurias joined #perl6
15:29 Alias__ joined #perl6
15:36 fglock joined #perl6
15:40 pbuetow joined #perl6
15:48 lisppaste3 joined #perl6
15:51 pbuetow joined #perl6
15:57 fglock [particle]: ping
15:59 TJCRI joined #perl6
15:59 lisppaste3 joined #perl6
16:06 njbartlett joined #perl6
16:19 kanru joined #perl6
16:22 pbuetow joined #perl6
16:25 zakame_ joined #perl6
16:26 charsbar_ joined #perl6
16:29 Psyche^ joined #perl6
16:32 zakame__ joined #perl6
16:35 fglock we just had a discussion on #parrot about tracking variables at compile-time
16:36 fglock the reason for this discussion is that the kp6 compiler seems to be doing extra work, keeping track of lexical scopes that it doesn't have to
16:37 fglock this makes it more difficult to port to other backends, such as Parrot
16:39 fglock one such case is:   my $x; BEGIN { $x = 3 }    # illegal in Perl 6?
16:40 fglock a corner case is:  our $x; BEGIN { $x = 3 }   # possibly illegal
16:40 fglock but this would be ok:   BEGIN { our $x = 3 }
16:41 fglock another implication is that lexically scoped macros would be impossible, but
16:42 fglock pmichaud said macros would likely instantiate a new parser,
16:43 fglock and the scope would be syntactically delimited
16:43 moritz_ sounds reasonable
16:49 fglock note that these cases are legal in pugs and in kp6, but S04 and S02 seem to forbid it
16:49 barney joined #perl6
16:50 jferrero joined #perl6
16:53 manne joined #perl6
17:08 jjore-w joined #perl6
17:19 fglock the BEGIN discussion have happened before:
17:19 fglock http://groups.google.com/group/perl.perl6.internals/browse_thread/thread/bca89d6f066ff4d5/c3e3139a6cce75fb
17:19 fglock s/have/has/
17:20 iblechbot joined #perl6
17:23 fglock the original discussion on kp6 BEGIN:
17:23 fglock http://svn.openfoundry.org/pugs/v6/v6-KindaPerl6/docs/begin-block.pod
17:23 lambdabot http://tinyurl.com/2d3hcu
17:23 fglock (long)
17:35 Khisanth joined #perl6
17:45 IllvilJa joined #perl6
17:45 Limbic_Region joined #perl6
17:53 justatheory joined #perl6
18:20 cmarcelo joined #perl6
18:28 justatheory joined #perl6
18:41 jjore-w left #perl6
18:44 lichtkind joined #perl6
18:58 agjal joined #perl6
18:58 drrho joined #perl6
19:17 mncharity joined #perl6
19:18 Limbic_Region joined #perl6
19:20 chris2 joined #perl6
19:32 [particle] sd times blames schwern! http://www.sdtimes.com/article/latestnews-20071215-05.html
19:32 lambdabot Title: Com.org - Only the best links ...
19:46 thestarslookdown joined #perl6
19:56 penk joined #perl6
20:00 ruz joined #perl6
20:07 lorn joined #perl6
20:37 agjal joined #perl6
20:46 njbartlett joined #perl6
21:31 snearch joined #perl6
22:00 ead joined #perl6
22:07 LimbicRegion joined #perl6
22:12 mwmwmw joined #perl6
22:16 jferrero joined #perl6
22:27 Schwern particle:  ...for something I did five years ago!
22:27 Schwern And poor Richard Clamp gets no mention. :(
22:30 Limbic_Region w
22:32 allbery_b joined #perl6
22:36 sahadev left #perl6
22:50 [particle] Schwern: really? ah, that's rich
22:51 agjal good night
23:31 Schwern particle:  I sent a correction.  Thanks for pointing it out.
23:45 Juerd_ Schwern: @ is used even more often than {, in strings, or so a quick look at my code base shows
23:46 Juerd_ Schwern: And @ has needed escaping in "" longer than I have used Perl. I don't even know which version started to require that.
23:47 Schwern Perl 5
23:47 Schwern But we already know about @
23:47 Schwern And $
23:47 Schwern Why add to the pile?
23:48 Juerd_ I will counter every why question with a why not.
23:48 Schwern Actually Perl 6 fixes the "foo@bar.com" problem
23:48 Juerd_ And vice versa
23:48 Schwern Juerd:  More to escape is more to think about which is bad.
23:48 Juerd_ No, it makes it even worse, IMO, by working *most of the time*
23:48 Schwern ?
23:49 Schwern I've only played with it a little but it appears you have to try pretty hard and the result looks an awful lot like a programming construct.
23:49 Schwern Anyhow, that's stuff I haven't looked into.
23:49 Juerd_ "foo@bar.com" works "foo@bar.com(really)" does not.
23:49 Schwern So, umm... what was the point again?
23:50 Juerd_ So it only makes it *harder* to realise you're doing something that might break.
23:50 Schwern I think that's stretching.
23:50 Schwern Also, getting $obj.method() working is soooo worth it
23:51 Schwern But again, it's not something I've really looked into.  Just the {} thing struck me.
23:52 Schwern $obj.method() at least still follows the "sigil in a string" tripwire.
23:52 Schwern That is, I still only have to be dimly aware that putting sigils in a string requires a little thought.
23:53 Schwern Whereas {} opens up a whole new class for little gain.
23:53 Schwern ${} would be no more mental load than what we have now
23:53 Juerd_ Just like the whole damn UTF8 mess in Perl 5 - if you do nothing, but work with UTF8 d(my terminal went away at this point)ata a lot, you think you have good code
23:53 Juerd_ UNTIL you hit that edge case
23:54 Juerd_ $obj.method() requiring parens requires look-ahead parsing, which sucks for parsability.
23:54 Schwern Fortunately, that's not a user problem.
23:54 Juerd_ Oh yes it is
23:54 Juerd_ User needs to parse too!
23:54 Schwern ?
23:55 Schwern With their eyes?
23:55 Juerd_ And brane, yes
23:55 Schwern We don't parse like computers.
23:55 Juerd_ Often we do
23:55 Schwern Picking out $obj.method(...) is easy for us.
23:55 Schwern Also, it's bloody rare in text
23:55 Juerd_ I'm happy with s:i/foo/bar/ for exactly that reason.
23:55 Schwern That's a whole different league
23:56 Schwern The problem with s/foo/bar/i isn't so much that the special cases are at the back, it's that there's *no indiciation* of a special case at the front.
23:56 Juerd_ In "foo@quux.blah.example.org.not.a.domain.hehe.silly.example.but.to.make.a.point()", the () at the end make the @ at the beginning special.
23:56 Schwern That it's a silly case is relevant.
23:57 jisom joined #perl6
23:57 Schwern When you interpolate, there's always going to be a way to trip over it.  The question is, how likely is that?
23:57 Juerd_ Anyway, I'm okay with the foo@bar.com thing, mostly. Just pointing out that it doesn't fix the problem, only make it a bit worse when you do run into it, even if that is less likely.
23:58 Schwern It would be interesting to grep CPAN for instances of m{\.\w+\(} inside a string.
23:58 Juerd_ I'm also okay with { } -- I'd *almost* ask for a \w/\W distinction like the one that was made for regexes: every \w character is literal, every \W character is special or reserved for future use.
23:58 Schwern so... uppercase braces?
23:58 Juerd_ \\\w is special, \\(\W) is literal $1
23:59 Schwern You've lost me
23:59 Juerd_ \w is alphanums and underscore
23:59 Juerd_ \W is the opposite
23:59 Schwern Ok
23:59 Juerd_ Does that unlose you? :)
23:59 Schwern How's that relate to {}?
23:59 Juerd_ Well, {} are \W, so they can be special.
23:59 Juerd_ And I'd almost ask if !@#$^&*(){)(*^$#@ could all be reserved for future use :)

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

Perl 6 | Reference Documentation | Rakudo