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.
Auzon pugs: my $foo = "foobar"; $foo ~~ s/bar/d/; 00:04
exp_evalbot RESULT[Bool::True]
Auzon pugs: my $foo = "foobar"; $foo ~~ s/bar/d/; $foo
exp_evalbot RESULT[\"food"] 00:05
Auzon Ah....
00:05 theorbtwo joined 00:17 stef_ left
Auzon pugs: {v5; print /a/;} 00:18
exp_evalbot OUTPUT[*** No such subroutine: "&v5"␤ at /tmp/VhMUYjOkWQ line 1, column 2-4␤]
Auzon pugs: {use v5; print /a/;}
exp_evalbot RESULT[1.0]
00:18 theorb left
Auzon pugs: {use v5; $_ = "qwerty"; print /a/;} 00:18
exp_evalbot RESULT[1.0]
Auzon pugs: {use v5; $_ = "qwerty"; $_ =~ /(\w)/;}
exp_evalbot RESULT[1.0]
Auzon pugs: {use v5; $_ = "qwerty"; my($capt) = $_ =~ /(\w)/; return $capt} 00:19
exp_evalbot RESULT["q"]
Auzon pugs: {$_ = "qwerty"; my($capt) = $_ =~ /(\w)/; return $capt}
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␤]
Auzon Very nice :)
00:29 justatheory joined 00:49 nipotaway is now known as nipotan 00:52 jrockway_ joined 00:53 jrockway left, devogon left 00:55 jisom joined 01:10 cnhackTNT joined, lisppaste3 left 01:11 Caelum left 01:23 thestarslookdown joined 01:36 thestarslookdown left 01:51 chris2 left 01:52 justatheory left, zakame joined 01:53 dduncan joined, agjal left
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:54
01:54 jhorwitz left 01:56 zakame left, zakame joined 01:57 jisom left 01:58 cnhackTNT left 02:08 polettix left 02:12 cnhackTNT joined 02:21 thestarslookdown joined 02:39 Caelum joined 02:42 Squern joined
Squern Where's the latest docs on Perl 6 subroutine and method parameter lists? 02:42
Tene Squern: you can start looking at spec.pugscode.org/ I think. 02:44
lambdabot Title: Official Perl 6 Documentation
Limbic_Region dev.perl.org/perl6/doc/design/syn/S06.html
lambdabot Title: Synopsis 6: Subroutines - perl6
Squern Oh good, up to date synopsis. Thanks. 02:45
Perhaps dev.perl.org should point to them? They all point to the originals from 4-6 years ago
Tene I've been disappointed a few times by dev.perl.org being so out-of-date 02:46
02:57 Limbic_Region left 03:01 cnhackTNT left
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␤]
Auzon pugs: method prefix:<±> (Num $x --> Num) { return +$x | -$x } my $tolerance = ±7; 03:03
exp_evalbot OUTPUT[decodeUTF8': bad data: '\177'␤decodeUTF8': bad data: '\177'␤*** ␤ Unexpected "$tolerance"␤ expecting "=", context, ":" or "("␤ at /tmp/AGNtDV3n9K line 1, column 60␤]
Auzon pugs: method prefix:<+-> (Num $x --> Num) { return +$x | -$x } my $tolerance = +-7;
exp_evalbot RESULT[\-7]
Auzon pugs: method prefix:<pm> (Num $x --> Num) { return +$x | -$x } my $tolerance = pm7;
exp_evalbot OUTPUT[*** No such subroutine: "&pm7"␤ at /tmp/hW2qmcbCic line 1, column 69-77␤]
Auzon pugs: method prefix:<pm> (Num $x --> Num) { return +$x | -$x } my $tolerance = pm 7;
exp_evalbot OUTPUT[*** No such subroutine: "&pm"␤ at /tmp/ZVFq5Upx8L line 1, column 69-78␤] 03:04
Tene pugs: my $x = 1; -1 | +1
exp_evalbot RESULT[(-1 | 1)]
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␤]
Tene pugs: "evalbot chokes on utf8"
exp_evalbot RESULT["evalbot chokes on utf8"]
Tene pugs: multi method prefix:<_> (Num $x --> Num) { return +$x | -$x }; my $tolerance = _7; $tolerance 03:06
exp_evalbot OUTPUT[*** No such subroutine: "&_7"␤ at /tmp/Os4Ma3eXzF line 1, column 75-82␤]
Tene Bah.
Auzon Indeed
Squern So is "foo { code() } bar" for real? 03:07
That is, interpolating {...} in strings as code? 03:08
Auzon pugs: "foo { 'For serious!' } bar"
exp_evalbot RESULT["foo For serious! bar"]
Squern I ask because that's going to mean an awful lot of backwacking.
Auzon Apparently
pugs: q~foo { 'For serious!' } bar~ 03:09
Squern {} is pretty common in strings. It's also going to make YAML a pain.
exp_evalbot RESULT["foo \{ \'For serious!\' } bar"]
Auzon Only for double quoted string
Squern Oh, we never use those
03:09 Squern is now known as Schwern
Schwern www.google.com/codesearch?hl=en&...0&sa=N 03:11
lambdabot Title: lang:perl \"\{ - Google Code Search, tinyurl.com/2br2q9
Schwern Google code estimates "about 11,500" hits for "{ 03:12
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
Schwern That's what I thought 03:16
Or ${} and @{} to mean scalar vs array context like we do with @{[]}
Schwern digs up the appropriate mailing list 03:17
Auzon Yeah. I've never heard of anyone having problems with accidentally putting @{[...]} in their string
pugs: "{use v5;}" 03:18
exp_evalbot RESULT[""]
Auzon pugs: "{...}"
exp_evalbot No output (you need to produce output to STDOUT)
Auzon pugs: qq:!c "{This should be the default, optionally allowing code.}" 03:21
exp_evalbot OUTPUT[*** ␤ Unexpected "\"{"␤ expecting operator␤ at /tmp/7bbSAhsfNQ line 1, column 7␤]
Auzon pugs: qq:c(0) "{This should be the default, optionally allowing code.}"
exp_evalbot OUTPUT[*** ␤ Unexpected "\"{"␤ expecting operator␤ at /tmp/kLpFSbOkWm line 1, column 9␤]
Auzon pugs: q:s "{This should be the default, optionally allowing code.}"
exp_evalbot RESULT["\{This should be the default, optionally allowing code.}"]
Auzon pugs: q:c "{This should be the default, optionally allowing code.}"
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␤]
Auzon So turning it on works, but not off
pugs: gather for 1..4; 03:30
exp_evalbot OUTPUT[*** ␤ Unexpected ";"␤ expecting "_", fraction, exponent, term postfix, operator or block construct␤ at /tmp/zFqHsZLtrj line 1, column 16␤]
Auzon pugs: gather for 1..4 {.say};
exp_evalbot OUTPUT[1␤2␤3␤4␤]
03:32 cognominal_ left 03:34 cognominal_ joined 03:42 Bzek joined
Schwern Oh, ${...} won't work because ${foo} already means something. 03:47
Oh, but not in Perl 6! 03:48
03:51 ispy_ left 03:53 jferrero joined 03:55 thestarslookdown left 04:00 Psyche^ joined 04:12 chacha_chaudhry joined 04:17 Patterner left, Psyche^ is now known as Patterner 04:22 zakame_ joined 04:36 zakame left 04:38 zakame__ joined 04:40 zakame__ left 04:42 zakame_ left 04:47 DarkWolf84 joined 04:50 Alias__ joined 04:52 Khisanth joined 05:18 diotalevi left 05:23 jferrero left 05:24 drbean_ left 05:31 chacha_c1audhry joined 05:42 thoughtpolice left 05:43 Khisanth left 05:47 Khisanth joined 05:50 chacha_chaudhry left, chacha_c1audhry is now known as chacha_chaudhry 05:51 c9s left, c9s joined 06:01 AzureStone left 06:10 zakame__ joined 06:11 zakame__ is now known as zakame 06:19 c9s_ joined, Juerd_ joined 06:20 c9s left 06:25 jjore-m joined 06:26 Juerd left 06:32 Ashizawa joined 06:39 c9s_ left 06:59 dduncan left 07:16 penk joined 07:19 rgs left 07:24 devogon joined 07:25 rgs joined 07:38 franck___ joined 07:48 drrho joined 07:55 iblechbot joined 08:12 chacha_chaudhry left 08:14 Bzek left 08:27 elmex joined 08:57 cognominal_ left 09:07 Alias__ left 09:09 franck____ joined 09:19 franck___ left 09:28 Khisanth left 09:31 ruz left 09:40 JarJarBi1ks joined 09:50 renormalist joined 09:52 JarJarBinks left 09:54 Caelum left 09:56 charsbar left 10:01 charsbar joined 10:04 c9s joined 10:06 ebassi joined 10:08 agjal joined 10:11 pen1 joined 10:19 rindolf joined 10:20 ebassi left 10:26 penk left, agjal left 10:27 Alias__ joined 10:29 agjal joined 10:58 chacha_chaudhry joined
chacha_chaudhry join #gnowsys-dev 10:59
*typo :P
11:03 cmarcelo left 11:05 chacha_c` joined, Ashizawa left 11:14 rindolf left, chacha_c` is now known as chacha_chaudhry` 11:15 chacha_chaudhry` left 11:17 masak joined 11:21 nipotan is now known as nipotaway, chacha_chaudhry left 11:22 rindolf joined 11:24 Alias__ left, Alias__ joined, renormalist left 11:27 ebassi joined 11:28 fglock joined 11:29 BinGOs_ joined, BinGOs left, BinGOs_ is now known as BinGOs 11:33 elmex left, elmex joined 11:34 rindolf left 12:12 cognominal_ joined 12:19 zakame left
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:47
12:47 ebassi is now known as ebassi|lunch
masak ok, thx 12:47
moritz_ at least that's what parses the Perl 5
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:49
it sounded like he was on the verge of releasing something
but since then, I haven't heard so much, and now his work seems to be focused on the Perl 6 grammar file
moritz_ I think that was the plan, not the status ;)
masak might have been :) 12:50
moritz_ builds a 5.10.0 with -DMAD now 12:52
wolverian sid is still on 5.8.8?!?! so slow ;) 13:00
13:07 agjal left, jrockway_ is now known as jrockway
moritz_ aye 13:09
13:15 zakame joined 13:28 njbartlett left 13:30 ispy_ joined, fglock left 13:33 ebassi|lunch is now known as ebassi 13:38 fullsux\ joined
Patterner I expected Sid to have 5.6.0... 13:45
or 4.036...
wolverian um, what? 13:49
moritz_ they're slow, but they don't go backwards 13:50
wolverian I wouldn't even call sid slow 13:52
it was sarcasm! or something.
stop confusing me, guys
13:59 jhorwitz joined 14:11 DarkWolf84 left 14:18 pen1 left
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
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:27
14:32 agjal joined
Juerd_ And one of the people who knows much about MAD is spending his tuits on a Perl 5 fork :( 14:36
14:41 ferreira joined
jjore-m Gerard? 14:45
It's not like MAD in Perl 5 is terribly important right now anyway.
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
"all" 14:47
14:48 rindolf joined
Juerd_ jjore-m: Yes 14:52
Probably not all, but quite a lot
14:54 drbean joined 15:03 iblechbot left 15:13 kyrbe joined, jjore-m left 15:15 kyrbe left 15:17 Alias__ left, Alias__ joined 15:18 elmex left, elmex joined 15:26 agjal left 15:27 agjal joined 15:28 pmurias joined 15:30 Alias__ left, Alias__ joined 15:37 fglock joined 15:39 kanru left 15:40 pbuetow left, pbuetow joined 15:43 elmex left 15:49 lisppaste3 joined 15:51 pbuetow left 15:52 pbuetow joined 15:53 lisppaste3 left
fglock [particle]: ping 15:58
15:59 TJCRI joined 16:00 gbacon left, lisppaste3 joined 16:05 masak left 16:06 njbartlett joined 16:19 kanru joined 16:20 pbuetow left 16:22 pmurias left 16:23 pbuetow joined 16:26 zakame_ joined, drrho left, charsbar_ joined 16:28 charsbar left 16:29 Psyche^ joined 16:32 zakame__ joined
fglock we just had a discussion on #parrot about tracking variables at compile-time 16:35
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
this makes it more difficult to port to other backends, such as Parrot
one such case is: my $x; BEGIN { $x = 3 } # illegal in Perl 6? 16:39
a corner case is: our $x; BEGIN { $x = 3 } # possibly illegal 16:40
but this would be ok: BEGIN { our $x = 3 } 16:41
16:41 Patterner left, Psyche^ is now known as Patterner, zakame left
fglock another implication is that lexically scoped macros would be impossible, but 16:42
pmichaud said macros would likely instantiate a new parser, 16:43
and the scope would be syntactically delimited
moritz_ sounds reasonable
16:46 zakame_ left
fglock note that these cases are legal in pugs and in kp6, but S04 and S02 seem to forbid it 16:50
16:50 barney joined 16:51 jferrero joined 16:52 rindolf left 16:53 manne joined 16:58 franck____ left, zakame__ left 17:01 IllvilJa left 17:09 jjore-w joined
fglock the BEGIN discussion have happened before: 17:19
groups.google.com/group/perl.perl6....9a6cce75fb
s/have/has/ 17:20
17:21 iblechbot joined
fglock the original discussion on kp6 BEGIN: 17:24
svn.openfoundry.org/pugs/v6/v6-Kind...-block.pod
(long)
lambdabot tinyurl.com/2d3hcu
17:26 jferrero left 17:35 Khisanth joined 17:45 IllvilJa joined, Limbic_Region joined 17:53 justatheory joined 18:13 ebassi left 18:21 cmarcelo joined 18:28 justatheory left 18:29 justatheory joined 18:42 jjore-w left 18:45 lichtkind joined 18:46 Limbic_Region left 18:52 agjal left 18:58 agjal joined 18:59 drrho joined 19:03 drrho left 19:17 mncharity joined, fullsux\ left 19:18 Limbic_Region joined 19:21 chris2 joined 19:28 fglock left
[particle] sd times blames schwern! www.sdtimes.com/article/latestnews-...15-05.html 19:32
lambdabot Title: Com.org - Only the best links ... 19:33
19:46 thestarslookdown joined 19:57 penk joined 20:01 ruz joined 20:07 lorn joined 20:16 agjal left 20:28 penk left 20:29 njbartlett left 20:36 manne left 20:37 agjal joined 20:46 njbartlett joined 21:31 thestarslookdown left 21:32 snearch joined 21:38 barney left 21:41 ferreira left 21:45 lorn left 21:54 TJCRI left 22:00 ead left, snearch left, ead joined 22:08 LimbicRegion joined 22:10 cmarcelo left 22:13 mwmwmw joined 22:16 jferrero joined 22:19 ispy_ left 22:23 Auzon left 22:26 Limbic_Region left, LimbicRegion is now known as Limbic_Region
Schwern particle: ...for something I did five years ago! 22:27
And poor Richard Clamp gets no mention. :(
Limbic_Region w 22:31
22:32 allbery_b left 22:33 allbery_b joined 22:37 sahadev left
[particle] Schwern: really? ah, that's rich 22:50
agjal good night 22:52
23:05 Alias__ left 23:06 agjal left
Schwern particle: I sent a correction. Thanks for pointing it out. 23:31
23:34 justatheory left
Juerd_ Schwern: @ is used even more often than {, in strings, or so a quick look at my code base shows 23:46
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
But we already know about @
And $
Why add to the pile? 23:48
23:48 chris2 left
Juerd_ I will counter every why question with a why not. 23:48
Schwern Actually Perl 6 fixes the [email@hidden.address] problem
Juerd_ And vice versa
Schwern Juerd: More to escape is more to think about which is bad. 23:49
Juerd_ No, it makes it even worse, IMO, by working *most of the time*
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.
Anyhow, that's stuff I haven't looked into. 23:50
Juerd_ [email@hidden.address] works [email@hidden.address] does not.
Schwern So, umm... what was the point again?
Juerd_ So it only makes it *harder* to realise you're doing something that might break.
Schwern I think that's stretching. 23:51
Also, getting $obj.method() working is soooo worth it
But again, it's not something I've really looked into. Just the {} thing struck me. 23:52
$obj.method() at least still follows the "sigil in a string" tripwire.
That is, I still only have to be dimly aware that putting sigils in a string requires a little thought. 23:53
Whereas {} opens up a whole new class for little gain.
${} would be no more mental load than what we have now 23:54
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
UNTIL you hit that edge case
$obj.method() requiring parens requires look-ahead parsing, which sucks for parsability.
Schwern Fortunately, that's not a user problem. 23:55
Juerd_ Oh yes it is
User needs to parse too!
Schwern ?
With their eyes?
Juerd_ And brane, yes
Schwern We don't parse like computers.
Juerd_ Often we do 23:56
Schwern Picking out $obj.method(...) is easy for us.
Also, it's bloody rare in text
Juerd_ I'm happy with s:i/foo/bar/ for exactly that reason.
Schwern That's a whole different league
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:57
Juerd_ In [email@hidden.address] the () at the end make the @ at the beginning special.
Schwern That it's a silly case is relevant.
23:57 jisom joined
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 [email@hidden.address] 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.
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:59
Schwern so... uppercase braces?
Juerd_ \\\w is special, \\(\W) is literal $1
23:59 iblechbot left
Schwern You've lost me 23:59
Juerd_ \w is alphanums and underscore
\W is the opposite
Schwern Ok