pugscode.org/ | nopaste: sial.org/pbot/perl6 | pugs: [~] <m oo se> (or rakudo:, kp6:, elf: etc.) (or perl6: for all) | irclog: irc.pugscode.org/
Set by Tene on 29 July 2008.
meppl good night 01:48
Ontolog moritz_: for split with a negative limit, we want to throw an exception? 02:57
moritz_: to me it doesn't seem very a very Perlish thing to do
s1n Ontolog: there's a discussion on the mailing list about split 03:50
Ontolog i know i am following it 04:07
this is in regards to that discussion
pugs_svn r22465 | putter++ | [on_sbcl] Boxed strings and integers. Also "", 0, etc, now false. 04:27
r22465 | putter++ | [elf_h] Elf source tweak - a miscalled fixed-arity sub.
moritz_ Ontolog: I don't really know; I could argue either way 07:20
moritz_ rakudo: say $?PACKAGE 12:32
p6eval rakudo 31507: OUTPUT[Scope not found for PAST::Var '$PACKAGE'␤current instr.: 'parrot;PCT::HLLCompiler;panic' pc 156 (src/PCT/HLLCompiler.pir:103)␤]
masak rakudo: class A {}; A.new.WHAT.say 12:34
p6eval rakudo 31507: OUTPUT[A␤]
moritz_ rakudo; package A; say 1 12:48
masak rakudo: package A; say 1 12:49
p6eval rakudo 31507: OUTPUT[Could not find non-existent sub package␤current instr.: '_block11' pc 21 (EVAL_12:15)␤]
masak rakudo: package A { say 1 } 12:49
moritz_ rakudo: package A { say 1; };
p6eval rakudo 31507: OUTPUT[Statement not terminated properly at line 1, near "{ say 1 }"␤␤current instr.: 'parrot;PGE::Util;die' pc 119 (runtime/parrot/library/PGE/Util.pir:82)␤]
rakudo 31507: OUTPUT[Statement not terminated properly at line 1, near "{ say 1; }"␤␤current instr.: 'parrot;PGE::Util;die' pc 119 (runtime/parrot/library/PGE/Util.pir:82)␤]
masak :)
masak is it still true what it says on S06:601? 13:20
I seem to remember that something like that was retracted
moritz_ that looks out-of-dateish 13:22
masak it does, doesn't it?
@ask TimToady is it still true what it says on S06:601? I seem to remember that something like that was retracted
lambdabot Consider it noted.
masak lambdabot: thanks
moritz_ wonders if every "thanks" to lambdabot increases the karma of lambdabot's creator 13:23
masak hopes not
implicit karma transactions are evil 13:24
even if created for apparently good reasons
Juerd feather's uptime is 131 days. 13:26
That's pretty high for a box with way too many users with root access :)
moritz_ aye ;)
masak Juerd++ # feather 13:27
Juerd Remember when it crashed because all memory was exhausted?
That was 131 days ago. :)
So hurrah for those who put effort into fixing memory leaks!
moritz_ and for those who restart apache regularly ;) 13:28
Juerd Well, Apache is restarted automatically every 6 hours
0 */6 * * * root /usr/local/bin/incredibly_ugly_hack_to_restart_apache
masak :)
moritz_ made that hack even uglier 13:29
Juerd But better too :)
moritz_ speaking of which, I could do another apt-get upgrade on feather... 13:34
masak moritz_: we talked about named parameters being optional the other day. I just confirmed that they are on S06:763. 13:45
masak re S06:811, I don't understand what the difference would be between `sub head(*$head, *@tail)` and `sub head($head, *@tail)`... 13:49
masak is it that the latter would not match a call on the form `head(1..Inf)`? 13:51
masak on S06:860, is the backslash intentional? in other words, does .perl on a Capture print something starting with a backslash? 13:55
hm, seems it is. t/spec/S02-builtin_data_types/capture.t seems to use both '\' and '|'. nvm. 13:59
masak but wait! on S06:935, again a '\' is used in an argument list. now I'm confused. 14:02
S06 just becomes stranger and stranger the further into it I get... :/ 14:05
moritz_ masak: *$head seems to make $head optional 14:13
masak ah. 14:14
so a slurpy scalar is the same as an optional argument?
[particle]1 that seems right to me
[particle] i added parameter passing rules to nqp and rakudo some time ago 14:15
lemme look at the nqp source to remember
masak sure thing
moritz_ does nqp have slurpy params? 14:16
masak this: `@a ==> @b` would be a pure list assignment, wouldn't it?
could I write `@a ==> my @b`?
moritz_ I think you could
masak and `@a ==> @b` is the same as `push @b, @a`, yes? 14:17
[particle] svn.perl.org/parrot/trunk/compilers...ctions.pir ~423
moritz_ masak: you meant @a ==>> @b?
lambdabot tinyurl.com/4ox7d9
masak moritz_: aye
[particle] oh, also need parser link there... 14:18
moritz_ actions written in PIR look so painful ;)
[particle] svn.perl.org/parrot/trunk/compilers...Grammar.pm ~229
masak I only have a Grammar.pg 14:19
[particle] oh, sorry 14:20
.pg
PerlJam Wait ... when did ==> become two headed? (==>>)
[particle] if $key eq 'slurp' { # slurpy
$past.slurpy( $sigil eq '@' || $sigil eq '%' );
$past.named( $sigil eq '%' );
}
masak PerlJam: when it's additive, like >> in shells 14:21
[particle] it's only slurpy if it's a @ or %
masak [particle]: be that as it may, it's called 'slurpy scalar' in S06
[particle] seems * is ignored for *$param
masak [particle]: at least that's a semantics I can understand :)
PerlJam masak: so, ==> is like "empty the target and fill it from the source" and ==>> is "add the source to the target"?
[particle] spec.pugscode.org/ not responding :( 14:22
masak PerlJam: think so
[particle]: I had the same problem
moritz_ did not
[particle] dns cache?
masak might be
[particle] restarts ff 14:23
moritz_ no, browser redirect cache
with wget I get the same failure
PerlJam btw, wrt slurpy scalars, I always though they were to circumvent laziness. i.e., a slurpy scalar will eagerly get you one item from a listy source. 14:24
s/though/thought/
[particle] sure, but are they optional?
in nqp, they're not.
masak quite. 14:25
PerlJam I wouldn't expect them to be optional.
[particle] then * is meaningless on scalar params 14:26
masak S06 talks about them at length, so it doesn't seem they're meaningless
[particle] that's the part i'm trying to look at next :)
moritz_ tries to figure out what's wrong with feather's apache 14:29
HTTP/1.1 302 Object moved
Location: perlcabal.org/syn/
lambdabot Title: Official Perl 6 Documentation
moritz_ now magically works [tm]
[particle] works for me after ff restart 14:30
masak now Wikipedia is down instead :/
masak ah, here: "A heisenbug is a computer bug that disappears or alters its characteristics when an attempt is made to study it." 14:36
is there really a KitchenSink role in Perl 6? I don't know if that makes me laugh or cry 14:39
couldn't it at least be called Sink?
moritz_ uhm, this is weird... 14:41
the response header from feather's apache also includes
Server: Microsoft-IIS/6.0
masak haha
moritz_ X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
masak aye, S06 confirms the `@a ==> my $b` syntax. 14:42
wonder if `@a ==>> my $b` would be equivalent or a syntax error?
moritz_ STD parse ==>> my @b 14:45
masak are PRE blocks run after tie-breaking is finished on multisubs? 14:47
moritz_ yes 14:49
if you want additional conditions that contribute to tie-breaking, you have to use subset types instead
masak seems sane
PerlJam I would think that @a ==>> my @b should just work fine. (Since that's my "least surprise" and perl follows said principle) 14:50
masak :)
PerlJam: well, something like `my $b += 2` doesn't work 14:51
moritz_ pugs: my $b += 2;
p6eval pugs: RESULT[\2]
masak hm :)
moritz_ masak: sure? ;-)
masak "test first, then speak with certainty"
rakudo: my $b += 2; 14:52
p6eval rakudo 31512: OUTPUT[MMD function __i_add not found for types (78, 92)␤current instr.: 'infix:+=' pc 11837 (src/gen_builtins.pir:7430)␤]
moritz_ rakudo can't autovivify scalars yet
so my $x; $x++ will also fail
rakudo: my Str $x; $x++; say $x 14:53
p6eval rakudo 31512: OUTPUT[Str␤]
masak I would at least not be surprised if the above threw a not-defined warning, something which Pugs does not support, IIRC
moritz_ aye
otoh perl doesn't warn on $undef++ or $undef += $something either
because it's such a common non-error case
masak aye 14:54
with that reasoning, Perl 6 shouldn't either
moritz_ rakudo: my $x = 0; my @a = <1 2>; $x += @a; say $x
p6eval rakudo 31512: OUTPUT[2␤]
moritz_ I somehow thought that this doesn't work 14:55
rakudo: my $x = 0; my @a = <a b c d>; $x += @a; say $x
p6eval rakudo 31513: OUTPUT[4␤]
moritz_ rakudo: my @x = 1, 2, 3; my $i = 0; $i += @x; say $i 14:56
p6eval rakudo 31513: OUTPUT[3␤]
moritz_ closes RT #58274 14:57
pmichaud (my $b += 2;) I suspect this will throw a warning 16:17
masak ok. 16:18
pmichaud however, my $b; $b++; won't throw a warning, as we're explicitly allowed to increment undef values to Int
masak what's the difference?
pmichaud one's mentioned in the synopsis as being allowed while the other isn't? 16:19
moritz_ that does't look like a good reason to me ;)
masak the feel very similar to me 16:20
s/the/they/
moritz_ in perl 'my $b += 2' doesn't warn either
pmichaud I'm just reading the synopsis. :-) 16:21
I don't design the language, I just implement it.
The section that says that $x++ works on undef is in "Autoincrement precedence"
(in S03)
pmichaud since += isn't "autoincrement", I'm not generalizing in that manner 16:22
pmichaud otoh, the section "Declarators" does say: 16:24
When parentheses are omitted, you may use any infix assignment operator instead of = as the initializer. In that case, the left hand side of the infix operator will be the variable's prototype object:
constant Dog $fido .= new; # okay: a constant Dog object
so, "any infix assignment operator" would presumably include +=
that'll be weird.
meppl good night 16:25
[particle] Dog++ 16:26
pmichaud I'm not sure that STD.pm supports the other infix assignment ops as initializers yet, though. It seems to only handle '=' and '.='
[particle] what does that result in? 16:26
pmichaud that would be an error, because Dog isn't in a suitable container
pasteling "moritz_" at 89.13.207.187 pasted "failures while accessing dev.pugscode.org/changeset/22454" (9 lines, 2.2K) at sial.org/pbot/32382 16:27
[particle] where Dog is the protoobject
pmichaud right, it's not in a suitable container
it's like saying 3++
TimToady I think += should be able to turn an Int into a 0
lambdabot TimToady: You have 1 new message. '/msg lambdabot @messages' to read it.
TimToady or a Scalar into a 0
pmichaud TimToady: okay, works for me. 16:28
[particle] does that mean the Int protoobject has an Autoincrementable role?
or Vivifiable?
pmichaud I hadn't seen the line in S03 that said any infix assignment operator could be an initializer (until just now)
ruoso I think "Uninitialized" is a special value that knows how to turn itself into a lot of values... 16:29
like array, hash, 0, "" 16:30
TimToady I don't know how generalizable the thing is
ruoso because autovivification depends on it
pmichaud TimToady: I'd agree with that, also. :-)
TimToady but maybe it's related to the table of degenerate reduction ops
moritz_ I think the ops should be special, not the undef
ruoso postcircumfix:{} is not an op
TimToady if [*]() is 1 then maybe *= autovivs to 1 16:31
ruoso it's a method
moritz_ because it makes it easier to add types with new autovivification options
masak just as the discussion gets interesting, I have to go :P
pmichaud alas, so do I.
masak see you around
TimToady I suspect the question is already answered. :) 16:32
ruoso it is? 16:33
TimToady I think there's a deep relationship between assignment ops and reduction ops
ruoso has a blurred mind at the moment... 16:36
ruoso later &
rakudo_svn r31519 | pmichaud++ | [rakudo]: spectest-regression.csv update: 193 files, 4381 passing tests 18:44
r31520 | pmichaud++ | [rakudo]: Correct name of t/spec/S05-modifier/ignorecase.t 18:57
moritz_ uhm, I shouldn't commit when half asleep 18:59
PerlJam moritz_: no, you should wait until you are fully asleep, then commit. 20:41
:-)
Kitchy Will there be a good compiler for Perl 6 that would let me decompile into C?
PerlJam Kitchy: if the need is great, someone will write it. 20:42
[particle] i can't imagine that need will be great 20:44
PerlJam [particle]: me either.
[particle] but who am i to judge?
moritz_ you are [particle] ;-) 20:45
[particle] all i know is: it's not in the perl 6 spec, so it's not required for any perl 6 to implement.
Kitchy Is it expected that the Camel book equivalent for Perl 6 will include community-written manpage stuff like the Perl 5 book does? 20:55
...because it sounds like english isn't the first language of some of the current doc writers. 20:57
moritz_ you can be sure that whatever O'Reilly publishes will be thoroughly edited 20:58
(and you're welcome to fix spelling and grammar errors yourself ;-)
ruoso later & 22:08