svn switch --relocate svn.openfoundry.org/pugs svn.pugscode.org/pugs/ | run.pugscode.org | spec.pugscode.org | paste: sial.org/pbot/perl6 | pugs.blogs.com | dev.pugscode.org/
Set by putter on 11 February 2007.
wolverian rindolf, I think it thought helsinki is in estonia. augh. :) 00:11
(I fixed it. nice that you can move the pins.)
rindolf wolverian: OK. 00:12
wolverian I added myself too :) 00:13
rindolf wolverian: thanks. :-)
00:17 diotalevi left 00:19 mako132_ joined
svnbot6 r15739 | lwall++ | Carry over @ vs @@ contextualization to zip and Z and map. 00:21
r15739 | lwall++ | Delete old each function.
r15739 | lwall++ | Fix old Lazy declarations, they're just Lists.
r15739 | lwall++ | Remove hateful bogus package names on multis.
r15739 | lwall++ | (Please use standard declarations as they would appear in situ.)
r15739 | lwall++ | Multis should generally just come from the natural class of the invocant.
r15739 | lwall++ | If there is no natural class, the section's default module should be assumed.
r15739 | lwall++ | If the section doesn't have a default module, it needs one. (todo)
r15739 | lwall++ | If a section has more than one default module, it needs to be split. (todo)
r15739 | lwall++ | Avoid non-OO classification. I know what a Proc is, but what's a Conc?
r15739 | lwall++ | Control flow should generally be associated with Context object.
r15739 | lwall++ | Normalized normalization methods.
r15739 | lwall++ | Random C<> cleanup, still incomplete.
r15739 | lwall++ | More clarification of StrPos stuff.
r15739 | lwall++ | Various other things I forget now.
wolverian removal of Lazy looks nice, yay. 00:22
00:25 Psyche^ joined, Psyche^ is now known as Patterner 00:57 sunnavy joined 01:04 Southen_ joined 01:41 ozo_ joined 01:42 ozo_ left 01:45 ozo_ joined
Aankhen`` pugs++ # I know it took a while, and it's not perfect, but the Perl 5 integration seems to Just Work most of the time. 01:57
02:01 mjk joined 02:06 Limbic_Region joined 02:12 jrockway joined 02:48 yhsuan joined 02:56 [particle] joined 03:03 fletchnj joined 03:06 fletchnj left 03:52 justatheory joined 04:08 mkirank joined
mkirank ?eval say "hello" 04:14
evalbot_r15739 OUTPUT[helloā¤] Bool::True
mkirank ?eval my @a = (1,2,3);my @b=(10,11,12);say @a+@b; 04:15
evalbot_r15739 OUTPUT[6ā¤] Bool::True
Aankhen`` ?eval (1, 2, 3) Ā»+Ā« (10, 11, 12) 04:22
evalbot_r15739 (11, 13, 15)
Aankhen`` ?eval <1 2 3> Ā»+Ā« <10 11 12>
evalbot_r15739 (11.0, 13.0, 15.0)
04:27 RHainsworth joined
mkirank I'm getting the error 04:27
ghc.exe: unknown package: base-1.0 (dependency of pugs-fps-0.7)
when I try to build pugs on windows ...
04:27 RHainsworth left
diakopter ?eval my @b = <z a b d e>; say @b.sort; 04:31
evalbot_r15739 OUTPUT[abdezā¤] Bool::True
diakopter ?eval say <q w e r t y>.sort\ .() 04:34
evalbot_r15739 Error: Cannot cast from VList [VStr "e",VStr "q",VStr "r",VStr "t",VStr "w",VStr "y"] to Pugs.AST.Internals.VCode (VCode)
diakopter ?eval say <q w e r t y>.sort() 04:35
evalbot_r15739 OUTPUT[eqrtwyā¤] Bool::True
diakopter ?eval say <q w e r t y>.sort.()
evalbot_r15739 Error: Cannot cast from VList [VStr "e",VStr "q",VStr "r",VStr "t",VStr "w",VStr "y"] to Pugs.AST.Internals.VCode (VCode)
diakopter ?eval say <q w e r t y>.sort.(); 04:37
evalbot_r15739 Error: Cannot cast from VList [VStr "e",VStr "q",VStr "r",VStr "t",VStr "w",VStr "y"] to Pugs.AST.Internals.VCode (VCode)
offby1 bummer 04:40
?eval say <<q w e r t y>>.sort.();
evalbot_r15739 Error: Cannot cast from VList [VStr "e",VStr "q",VStr "r",VStr "t",VStr "w",VStr "y"] to Pugs.AST.Internals.VCode (VCode)
04:43 dmpk2k joined
diakopter ?eval .perl 04:44
evalbot_r15739 "\\undef"
diakopter ?eval perl 04:45
04:45 justatheory joined
evalbot_r15739 Error: ā¤Unexpected end of input 04:45
diakopter heh
TimToady sort.() should sort itself out once we switch to STD.pm for parsing. 04:46
offby1 ooh, STD brings back unpleasant memories of junior-high health class. 04:47
diakopter syntactically transliterated deficiencies? 04:49
?eval say Object.new.DESTROYALL.perl; 04:51
evalbot_r15739 OUTPUT[undefā¤] Bool::True
diakopter ?eval say Object.new.DESTROYALL; 04:52
evalbot_r15739 OUTPUT[ā¤] Bool::True
TimToady darn it, now you've gone and destroyed everything. we'll have to start all over. 04:57
diakopter ?eval .clone.say; 04:58
evalbot_r15739 Error: Pattern match failure in do expression at src/Pugs/Prim.hs:1313:4-14
diakopter ?eval .DESTROYALL; 04:59
evalbot_r15739 undef
TimToady see, it's all gone :(
diakopter that's three variants of undef - "\\undef", OUTPUT[undefā¤] Bool::True, and undef
spinclad ?eval Object.new.DESTROYALL.perl; 05:00
evalbot_r15739 "undef"
diakopter there's another
spinclad the OUTPUT form was from when you said() it 05:01
so still three variants i think
?eval perl() 05:02
evalbot_r15739 Error: No compatible multi variant found: &perl
TimToady well .perl is always going to return a string, not an undef
undef.perl isn't undefined. :)
spinclad a different string than DESTROYALL.perl gave though, that's a bit odd 05:03
05:03 mkirank left
spinclad so down to two variants 05:03
TimToady ?eval ().perl 05:04
evalbot_r15739 "()"
TimToady ?eval undef.perl 05:05
evalbot_r15739 "undef"
spinclad ?eval $_.perl
evalbot_r15739 "\\undef"
spinclad :)
what is that?
TimToady a Scalar containing undef, perhaps
my $x; $x.perl 05:06
spinclad ?eval $_
evalbot_r15739 \undef
spinclad yeah, that
?eval my $x; $x.perl
evalbot_r15739 "\\undef"
diakopter ?eval 'say "foo";'.eval.perl.eval;
evalbot_r15739 OUTPUT[fooā¤] Bool::True 05:07
diakopter hrm
TimToady val 'say "foo";'.eval.perl
?eval 'say "foo";'.eval.perl
evalbot_r15739 OUTPUT[fooā¤] "Bool::True"
TimToady say is returning True 05:08
diakopter ?eval "'say \"foo\";'.eval.perl".eval; 05:09
evalbot_r15739 OUTPUT[fooā¤] "Bool::True"
diakopter ?eval $::({return 1;}) 05:12
evalbot_r15739 pugs: Internal error:ā¤ Invalid sigil "$<"ā¤Please file a bug report.
diakopter tells evalbot to file a bug report herself.
TimToady ?eval ~{return 1;} 05:14
evalbot_r15739 "<SubBlock(<anon>)>"
TimToady there's your <
?eval $::('*PID') 05:16
evalbot_r15739 \undef
TimToady ?eval $::('*OS')
evalbot_r15739 \undef
diakopter ?eval <>.({1;}) 05:17
evalbot_r15739 Error: Cannot cast from VList [] to Pugs.AST.Internals.VCode (VCode)
TimToady translation: I haven't the foggiest idea how to "call" a list.
05:17 Achilles14 joined 05:18 Achilles14 left
diakopter do/will the perl6 specs define anything about such error messages? 05:19
Aankhen`` I'm not familiar with Haskell, soā€¦ what would the API look like for the unified events & threads model in Perl 6?
TimToady to the event handler it looks like sending information to a thread scheduler queue, kinda sort. From the thread viewpoint it looks like unblocking. 05:20
05:20 jisom joined
Aankhen`` Ah. 05:21
I think I need to do some more reading. :-D
diakopter ?eval ().<a b>.perl.say;
evalbot_r15739 OUTPUT[[undef, undef]ā¤] Bool::True
diakopter I have no idea what happened there 05:22
TimToady you more or less said "make me an empty list", subscript it by .{'a','b'} and tell me what you find.
which is nothing, twice.
nothing twice in Perl is [undef, undef] 05:23
offby1 sees TimToady's nothing twice, and raises him ... nothing. 05:24
TimToady double or nothing...er, double *and* nothing.
diakopter ?eval 'please ignore the gibberish'; |[{(|)}]|.say; 05:26
evalbot_r15739 Error: ā¤Unexpected "[{(|)}]|."
diakopter hmm; it worked on run.pugscode.org
TimToady what did it say? 05:27
diakopter (not that). it just gave another prompt. no output line. 05:28
TimToady should parse as |([...]) | .say, I think
though unary | without an arg is probably an error
inside (|)
?eval 'please ignore the gibberish'; |[{(|[])}]|.say 05:29
evalbot_r15739 OUTPUT[ā¤] (Bool::True | {Syn "block" {Syn "|" {Syn "\\[]" {Syn "," {}}}}})
TimToady yeah, the inner | needs an arg
05:30 ludwig joined
TimToady ?eval 'please ignore the gibberish'; |[{(<|>)}]|.say 05:31
evalbot_r15739 OUTPUT[ā¤] (Bool::True | {Syn "block" {"|"}})
diakopter ?eval <>.clone; .say; 05:33
evalbot_r15739 Error: Pattern match failure in do expression at src/Pugs/Prim.hs:1313:4-14
05:33 ludwig is now known as ludwig-
TimToady I don't believe clone is implemented 05:33
audreyt only for userdef objs 05:34
lambdabot audreyt: You have 5 new messages. '/msg lambdabot @messages' to read them.
audreyt just started to impl for builtins; once the pad branch is merged back it'll be there
TimToady: btw, I hope this is sane 05:35
diakopter audreyt: check your @messages :P
audreyt sub f { my $x = 123 }; BEGIN{ f() }
say f(); # 123
or rather 05:36
sub f ($compiling) { my $x; $x = 123 if $compiling; say $x }; BEGIN {f(1)} 05:37
f(0); # still say 123
f(0); # undef now
basically the runtime sees the _last_ pad of compile time
in perl5 currently compile-time calls to subs with half-formed compile-time pads will clear the freshness flag prematurely 05:38
but there's no real reason to do that in p6, especially since we implicitly reclone inner functions upon entry
sub f ($x) { sub g { $x } }; 05:39
g(); # undef
my $g1 = f(1);
g(); # 1
$g1(); 3 1
er, s/3/#/
my $g2 = f(2);
g(); # 2; 05:40
$g2(); # 2
$g1(); # 1
etc. so the "will not stay shared" problem is gone.
it's implemented that way now; again just sanity check :)
TimToady it does seem a little odd not to get undef on first f(0), but it's mostly because you've conditionalized on $compiling 05:41
audreyt diakopter: got it :)
right.
TimToady doesn't seem like a big problem to me.
audreyt ok, thanks.
diakopter ?eval .new .= ..; 05:50
evalbot_r15739 Error: the right-hand-side of .= must be a function application
geoffb How do you say AUTOLOAD in P6, and is it implemented in Pugs?
TimToady see S10:84 05:52
and given there's no tests for it, I doubt it.
audreyt so write some :) 05:53
geoffb I still have to figure out why I can't commit my previous tests ... sigh.
audreyt TimToady: any reason why CANDO uses 05:55
Item, $name
rather than just having the name containing '$' ?
faster dispatch based on sigils?
diakopter ?eval my $exec = 'methodName'; .new.$exec; .say; 05:56
evalbot_r15739 OUTPUT[ā¤] Bool::True
TimToady I think more for extensibility. 05:57
and showing off smartmatching of type parameters. :) 05:58
where the type is being treated as a value parameter match
It's possible it's redundant in the usual case. 05:59
but also you could ask for weird containers there.
audreyt but then 06:00
SomeCanDoPkg::<$foo>
how does it know that it must ask for Item?
hardcoded enum-type table?
or is that sort of lookup not handled by CANDO?
TimToady I think CANDO is assuming that someone has already figured out the desired container type 06:01
audreyt what are the *%args for non-Code CANDO?
TimToady and $name is just an arbitrary string to it
I dunno, traits maybe... 06:02
audreyt but Code also has traits...
also the semi should be comma before *%args 06:04
06:04 devogon joined
diakopter ?eval perl.die; 06:04
evalbot_r15739 Error: Died 06:05
TimToady I suspect *%args is mostly just a placeholder for things we haven't thought of yet.
audreyt that's fine
but we don't multi dispatch on slurpy-nameds anyway
so the semi is really comma :) 06:06
diakopter ?eval .DESTROYALL; .WHAT; 06:07
evalbot_r15739 ::Scalar
audreyt still fuzzy on how to implement the return type dispatch other than hardcode a sigil-enum 06:08
but otherwise CANDO seems implementable
TimToady how do you dispatch to a value like 42?
a proto-type is just another value that happens not to be defined. :) 06:09
audreyt ~~ surely?
multi f (0) { 1 }
multi f ($x) { 123 }
dunno. may not be entirely sane, that syntax 06:10
TimToady multi f (Squirrel) { "Moose" }
audreyt sure, but the question here is that
my @x := SomeCanDoPkg::<$foo>
does it dispatch with CANDO and Array then '$foo'?
and with assignment we really don't know the expected type 06:11
my $x = SomeCanDoPkg::<&bar>
how do we know it must dispatch with Code, other than intuit from sigil-enum-map?
TimToady I think in the usual case we just intuit from the sigil
audreyt and is there a reason why in the unusual case the CANDO can't simply check &want? 06:12
that way we save a parameter and avoid contravariance bug
(where a return type is matched in reverse narrowness)
TimToady I don't think it has anything to do with want, really.
audreyt ok. 06:13
so those type names really are hardcoded
cando, then.
06:13 BooK_ joined
audreyt so unlike AUTOLOAD which does something immediately in p5 06:14
CANDO must return another closure
06:14 prly_ joined
TimToady CANDO is asking "do you choose to declare this?" 06:15
audreyt multi method CANDO (Code, $_) { when '&meth' { return method { ...meth body... } } }
something like that?
TimToady yeah, something like that. 06:16
audreyt consequence is that 06:17
class AnotherPkg is SomeCanDoPkg { ... }
then not only AnotherPkg.meth is dyngenned
but AnotherPkg::<&sym> is as well 06:18
basically the p5 "inheriting autoload for non-method" thing
not really saying there's anything terribly broken with that 06:19
TimToady the non-method multi matches on package as first arg
audreyt but it matches using mmd semantics
with usual subtyping-fits rule
so AnotherPkg does not define CANDO, it still matches the base class's multi cnaod
TimToady just saying you could write it more generically than a single package 06:20
audreyt yeah.
and if you really want to not let derived class use it
then declare it as submethod
I guess. so that's fine
TimToady and the intent is that CANDO gets to choose whether to create the actual object eagerly or lazily. 06:21
in the latter case making use of AUTODEF, presumably. 06:22
audreyt S06:1317 06:25
the backslash there is... doing what again?
diakopter ?eval hash moo=>boo=>loo=>'goo' 06:26
evalbot_r15739 {("moo" => ("boo" => ("loo" => "goo"))),}
audreyt TimToady: also, an optimization bug. 06:28
geoffb ?eval sub stub { undef } our &glBegin := &stub; glBegin();
audreyt during codegen for subs with known param
it's helpful to unroll the incoming Capture into params and throw the Capture structure away 06:29
especially when there are slurpies
evalbot_r15739 undef
audreyt however the possibility of .nextsame and .callsame
means we need to save a snapshot of the incoming Capture somewhere
geoffb ?eval sub stub { undef } sub stub_all {our &glBegin := &stub; } BEGIN {stub_all();} glBegin();
audreyt just in case the "same" form is called
evalbot_r15739 undef
geoffb ?eval sub stub { undef } sub stub_all {my $eval = "our \&glBegin := \&stub;\n"; eval $eval } BEGIN {stub_all();} glBegin(); 06:30
evalbot_r15739 undef
audreyt in JavaScript the same problem is there but
geoffb ?eval sub stub { 'foo' } sub stub_all {my $eval = "our \&glBegin := \&stub;\n"; eval $eval } BEGIN {stub_all();} glBegin();
evalbot_r15739 "foo"
audreyt an optimizing compiler can check for presence of the "arguments" call in the function body
and if it's not there, don't save the original arguments 06:31
but .nextsame is highly magical; it cannot be a normal method
06:31 jisom joined
audreyt because that implies seeing caller's args contextually 06:31
geoffb ?eval sub stub { 'foo' } sub stub_all {my @symbols = < glBegin>; my $eval = ''; for @symbols -> $symbol {$eval ~= "our \&$symbol := \&stub;\n"; } eval $eval } BEGIN {stub_all();} glBegin(); 06:32
evalbot_r15739 "foo"
audreyt so what is it really? a thought is that it's really a postfix-method-macro thing that expands to
.nextwith(|$|)
geoffb hmmm, must be just my old build ...
audreyt and we check visibility of $|
geoffb waits impatiently for GHC to finish compiling
audreyt if it's in scope then we save away the incoming arg
as if the use sayd
sub f (|$|:( orig signature here )) { ... } 06:33
but I wonder if it's a sane treatment, or if I mistook nextsame's semantics
geoffb ?eval sub stub { 'foo' } sub stub_all {my @symbols = < glBegin>; my $eval = ''; for @symbols -> $symbol {$eval ~= "our \&$symbol := \&stub;\n"; } eval $eval } BEGIN {stub_all();} glBegin('blurtz', 'flaffle', 5);
audreyt </question> 06:34
evalbot_r15739 "foo"
TimToady hmm, well, any wrappable routine has to allow that the new wrapper is going to call it even if the old "core" didn't, so compile-time analysis doesn't help much there... 06:35
audreyt but it's the wrapper saving its args
not the inner wrappable
so compile-time analysis of that wrapper is still viable 06:36
TimToady but if the original call site threw away info that the wrapper wants...
audreyt I think we can't touch callsite
the only optimization we can do is to throw away the incoming Capture object after binding is done with it 06:37
sub f ($x is copy) { ... }
or even in the usual (sub f ($x) {...}) case
we can throw away the info after binding to x
about whether we were called as
(x => 1) 06:38
or
(1)
or
(x => 1, x => 2)
TimToady yes, and likewise for protos
audreyt which is good for heap space with long call chains
TimToady the main point of protos was to enable that rewrite.
audreyt because all the callers will have thrown away their $|
but the presence of .nextsame somehow assumes you can ask CALLER::<$|> 06:39
which seems to me defeats all this
hence the question about possible other interpretation of .nextsame
.callsame is worth because it doesn't even erase the stack 06:40
*worse
TimToady if the data is in some format on some stack, all we need is for .nextsame to point the wrapped function at the same (presumably immutable) value lists
audreyt true, but what about callsame?
TimToady as long as they agree on the format, doesn't have to be a Capture
geoffb ?eval sub stub { 'foo' } sub stub_all {my @symbols = < glBegin>; my $eval = ''; for @symbols -> $symbol {$eval ~= "our \&$symbol := \&stub;\n"; } eval $eval } BEGIN {stub_all();} glBegin('blurtz', 'flaffle', 5); "furball" 06:41
audreyt but they don't have to agree on the format...
evalbot_r15739 "furball"
TimToady and maybe if the wrapper tries to pull it out as a Capture, it's just
"best effort"
"here's a Capture that could have produced these arguments..."
audreyt sub f ($x) { $x := 123; &g.callsame } 06:42
does the "best effort" means &g gets 123?
that sounds very fishy...
TimToady I don't think so.
if you want to monkey with the arguments you should use callwith instead. 06:43
audreyt ok, so the incoming capture is still preserved somewhere other than the pad
otherwise there's nowhere that callsame can get the original $x from
TimToady we can just say that $x := 123 is erroneous. 06:44
audreyt and that somewhere is contextual
even though $x is not
otherwise wouldn't allow definition of callsame in user-code 06:45
class MyCode; method callsame { ... how? ... }
geoffb ?eval sub stub { 'foo' } sub stub_all {my @symbols = < glBegin>; my $eval = ''; for @symbols -> $symbol {$eval ~= "our \&$symbol := \&stub;\n"; } eval $eval } BEGIN {stub_all();} method foo {glBegin('blurtz', 'flaffle', 5); } "furball" 06:46
evalbot_r15739 "furball"
TimToady .HOW.callsame
audreyt :)
method callsame { .(|(caller.arguments)) }
method callsame { .nextsame(|(caller.arguments)) }
TimToady $.nextsame? 06:47
audreyt er, yes.
self.nextsame, actually
since it could've been called in a slurpy list context 06:48
ok, so I'll not worry about codegen or optimization yet and simply provides .arguments field
TimToady It's quite possible that we want to reserve is as a HOWish not-quite-a-method thing 06:49
and we can do that if it helps optimization later. Not every primitive has to be user overridable.
06:49 lisppaste3 joined
TimToady not without we also give them a very sharp circularity saw... 06:49
audreyt what, you mean we are not lisp?
oh wait. you meant "not every primitive has to be user overridable _during runtime_." 06:50
TimToady Perl Evaluator Runs Lisp
audreyt sure :)
overriding primitives is a compile-time BEGIN-block macro-writer business :) 06:51
TimToady we have to give the optimizer some rope to shoot the user in the foot with.
audreyt mm metaphor mixins
TimToady Paradigm Exchange Research Laboratory
People Experience Renewed Love
Please Everyone, Right & Left 06:52
geoffb imagines one of those prison weapons, like the paper mache crossbow that fires slivers of lunch tray
TimToady Persistent Energy Reinvents Life
Perennially Emergent Reinvention Language
Power Enterprise-Related Labor
Perform Excellent Refactoring Liberation 06:53
Pele Energy Releases Lava
geoffb Portal Encouraging Reality Liberation
TimToady Please Enhance Real Life
that's enough for today. :)
diakopter Pigeonholing Emitter Reaches Lower 06:54
geoffb Pasta Enjoyment Requires Lactase
(since I tend to use much cheese ...)
audreyt curious that I've never noticed that REPL is an anagram before 06:55
diakopter Primal Exasperation Remits Licenses
TimToady so's ERPL :)
audreyt well yeah, but REPL means something :) 06:56
Kattana agrees with geoffb, and is more confused by the rest of what is going on. 06:57
TimToady People ERPL Really Late
audreyt print eval read loop;
geoffb farking clasticase!
I'm trying to do a variant of my gl progam with all of the gl calls replaced with stubs, so I can investigate Pugs' performance profile without gl and Perl 5 embedding confusing things ... 06:58
But my stubbing doesn't seem to work, and I can't manage to make a small case that breaks!
Debolaz2 reinvents the wheel at rafb.net/p/h3ufAB12.html 06:59
lambdabot Title: Nopaste - Exception handling
geoffb www.broadwell.org/dl/step075-stubbed.p6 produces:
06:59 Debolaz2 is now known as Debolaz
geoffb *** No compatible multi variant found: &glPixelStore 06:59
at step075-stubbed.p6 line 210, column 5-41
And that's after an svk pull; make clean; configure; make
Kattana not to cause a distraction but here is an interesting bit of linguistics some people here might appreciate www.everything2.com/index.pl?node_id=1866132
lambdabot Title: wanna (idea)@Everything2.com
audreyt geoffb: .p6 you mean. 07:00
diakopter Please Eradicate Romance Languages
geoffb audreyt: huh? 07:01
Kattana wonders if there is room for invisible words in perl6
audreyt er nvm.
I copy/pasted incorrectly :)
geoffb oh, heh
audreyt what does &glPixelStore.perl print?
geoffb \{Prim ([Pugs.AST.Internals.Val] -> Pugs.AST.Eval.Eval Pugs.AST.Internals.Val)}
(Two copies because I was printing it twice in different scopes to make sure it didn't disappear on me) 07:02
audreyt if you call it immediately after the .perl 07:03
what does it do?
geoffb checking ....
Just moves the same error earlier 07:04
trying a hunch ...
audreyt try changing the eval to
"sub $routine \{ undef \}"
and see if that works
geoffb ok
\sub {Syn "block" {undef}} 07:06
Initializing ...
*** Cannot use Undef as a Code object
at step075-stubbed.p6 line 211, column 18-37
Oh now *that's* interesting ... if I change the call 'glPixelStore(GL_UNPACK_ALIGNMENT, 1)' to just 'glPixelStore()' the error goes away (and moves to the next gl call, but that's not surprising) 07:08
audreyt ok I see why.
it's fixed in pad branch 07:09
but! you can use trunk if you say
$eval ~= "our \&$routine ::= \&stub;\n";
and
$eval ~= "our \&$constant ::= \&constant_stub;\n";
geoffb Ah
audreyt for very obscure reasons (trunk was confusing nested compiling scopes due to eval)
geoffb OK, fair enough
audreyt it's generally good form to use ::= anyway
geoffb is ::= more correct anyway?
audreyt yeah.
geoffb OK, what's the difference again?
audreyt ::= evaluates the rhs at compile time 07:10
and only binds once
instead of upon all reentry
geoffb OK, got it
Lemme try that
audreyt sub f { our $x := say(123) } f(); f(); # prints twice
sub f { our $x ::= say(123) } f(); f(); # prints once -- during compilation
geoffb gotcha
geoffb is very glad to be getting up to speed *now*, because the learning curve is going to be LONG 07:11
diakopter and non-converging. 07:12
audreyt hm, a sec.
TimToady I've been learning Perl 6 for 20 years now...
geoffb nope, doesn't work in trunk -- it errors out at my first test call: 07:13
pugs: *** Undeclared variable: &glPixelStore
at step075-stubbed.p6 line 65, column 9-27
Er, I should say, my first "say &glPixelStore.perl" 07:14
The relevant line in $eval was "our &glPixelStore ::= &stub;", which looks correct to me 07:15
audreyt I think you misspelled constant as contant
so entire eval was failing
geoffb nope, not I
OH! 07:16
DUH!
The original sub!
sigh
07:16 Belaf joined
audreyt everything works if I say 07:16
sub stub { undef }
sub constant_stub () { 1 }
then
$eval ~= "our \&$constant ::= \&constant_stub;\n";
$eval ~= "our \&$routine ::= \&stub;\n";
then
say $eval;
eval $eval;
die $! if $!;
geoffb yep, definitely
Should have guarded that eval in the first place ... 07:17
audreyt indeed
so := vs ::= is not that
:= works too here
diakopter perspicuity eschewed, readability lessened. 07:18
geoffb I made the switch anyway, for correctness
audreyt sure
07:18 drbean_ joined
audreyt the canonical way is not eval though. 07:19
it's this:
macro import_all {
... the same body ...
for @routines -> $routine {
$eval ~= "our \&$routine ::= \&stub;\n";
}
$eval;
}
geoffb will it work in current pugs?
audreyt then instead of BEGIN
just say
import_all;
it will expand inline into the $eval
and if it fails compilation you'll know
sure!
geoffb ROCK ON
geoffb trying that
audreyt a sane macro system is a killer feature :) 07:20
geoffb EXCELLENT, working
TimToady not that text macros are entirely sane, but then most killers aren't.
geoffb too cool, audreyt!
audreyt well I guess you could've used quasiquoters... that'd work too 07:21
but in any case it's better than calling &eval
since it's a single compiler scope
with macros
geoffb: yay! :)
audreyt anticipates geoffb producing some kind of writeup about it 07:22
geoffb I hope to, but my time is pretty limited, so it may be a while ... sigh 07:23
tene geoffb: just copy/paste IRC logs
then trim
audreyt but glad you're having some amount of fun :)
geoffb Definitely
geoffb reminded by tene of Schwern's lightning talk a couple years ago at OSCON -- programming by deletion 07:24
tene Heh.
Sounds interesting.
geoffb Essentially: start with a string containing everything, then delete the parts that aren't your program. Very sculptural. 07:25
audreyt kinda the dual to the old "programming is an art of debugging a blank screen" saying
TimToady Patriarchal Entity Requires Lassitude 07:26
Please Emit Remaining Language & 07:27
audreyt TimToady++
DebolazX: nice wheel reinvention :) 07:29
gaal what's "~=" ?
tene Pink Elephants Reviewed the Language
geoffb gaal: .= in P5
tene gaal: $x = $x ~ $y
gaal oh right :)
yes thanks :)
audreyt whenever you see ~=, it really want to be replaced by take :) 07:30
geoffb: 07:31
[~] gather {
for @constants -> $constant {
take "our \&$constant ::= \&constant_stub;\n";
}
for @routines -> $routine {
take "our \&$routine ::= \&stub;\n";
}
}
}
avoids a variable, makes the intention clear
(the [~] intention is "join by concat")
geoffb OK, so in www.broadwell.org/dl/ there are now three versions: the original step075.p6 (uses P5 embedding and GL code), a -stubbed version (no embedding needed, all SDL/GL calls stubbed out), and a -nogfx version (all SDL/GL calls deleted).
lambdabot Title: Index of /dl
tene perhaps map instead of for.
audreyt maybe, but for feels more imperative :) 07:32
gaal gather is for in nonvoid context :)
geoffb On my machine, -stubbed reports 9.1 fps, -nogfx reports 13.3 fps.
So either call overhead is very significant, or just having all those symbols in the current namespace is expensive. 07:33
audreyt meaning, huge method call overhead.
both, actually.
the reason is that currently pugs does a recursive type inference
whenever you do a call
so it's O(m*n) where m is parameter count and n is stack depth 07:34
it's _very_ expensive.
geoffb OK ... does this go away with your Pad work, or is that sometime later?
ouch!
audreyt this go away with gaal's SigMonoid work
where we never infer and thus runs in O(m)
geoffb What O() will it become with that done?
audreyt just parameter count
geoffb so O(m). Not bad. 07:35
tene The depth of which stack?
geoffb Especially since my stack depth is non-trivial, since I use a lot of little methods that call other little methods
audreyt tene: term dependency stack
f(g(a(), b(), c())) 07:36
must infer the type of g()
which depends on type of a() b() c()
before it even performs the inner call to a()!
and g() does that again since there's no cache
so it's actually O(m*n!) or something like that. 07:37
geoffb OWW
audreyt it's a wonder that pugs runs at all.
;)
geoffb Go gaal, go gaal!
audreyt we needed to do that because:
1) there were no concept of proto() 07:38
2) multi were decided by type "distance" not "narrowness"
gaal looks like I need copious amounts of caffeine to get this finished, so let me tell you what
geoffb Well, now you have a sort-of real life benchmark to see how well method call changes do ...
gaal I'm going to check in my unfinished p6 code version and get that coffee
audreyt very good :)
geoffb audreyt: both of which are now not so sucky?
audreyt right. 07:39
geoffb excellent.
audreyt and also Pad is O(1) in my branch now
but that may not affect things so much
but I better finish it :)
audreyt goes hacking
geoffb When does your branch drop?
audreyt tonight if lucky
tomorrow if not
geoffb schweet
audreyt then you can say
our &sub := &moose; 07:40
sub moose { ... }
# note the "reversed" order
geoffb cool, I've been working around that for now.
audreyt I think the academic word for that is "letrec" or something :)
geoffb has not been in academia for a long time .... 07:41
gaal Y-combs, Y-combs everywhere
brb 07:42
svnbot6 r15740 | gaal++ | * add (start of) an imperative implementation of the Signature
r15740 | gaal++ | unification algorithm
geoffb maybe sleep, maybe not & 07:46
07:48 nnunley joined 08:33 iblechbot joined
geoffb apparently ... not 08:34
Schwern geoffb: Oh, I can't take credit for that brilliant talk. That was mjd. 08:52
geoffb Ah, right, sorry
Schwern perl.plover.com/yak/debruijn/ 08:53
lambdabot Title: Debugging the de Bruijn Sequence
08:53 Belaf_ joined
Schwern Done totally silent. 08:53
geoffb And the best part was the suu.html 08:55
08:59 Jedai joined
buu This boss is officially ridiculous 09:07
tene Did you try looking for a weak spot or using upgraded weapons?
buu =[ 09:08
If only I could.
Aankhen`` Hit the weak spot for massive damage!
Okay, so I actually read all of the Unifying events and threads paper. A lot of it went over my head, especially since I don't understand Haskell, but whatever I comprehended seems pretty delectable. :-) 09:29
geoffb OK, I did P5 backports of the P6 stubbed and nogfx versions. Here's the totals: 09:33
audreyt hm I think I accidentally sped up smoketime by 2x.
rerunning to make sure it's not an illusion
tene bad audreyt! add some sleep()s!
geoffb PUGS: norm: 4.8 fps, stubbed: 9.0 fps, nogfx: 13.9 fps
audreyt (that is, reduced pugs startup cost by 50%)
or more. still benching 09:34
geoffb PERL5: norm: 4160 fps, stubbed: 6616 fps, nogfx: 14632 fps
So we have roughly 3 orders of magnitude difference
audreyt okay 09:35
that's very reasonable :)
geoffb ok, now really going to try to sleep &
g'night all
tene g'night
svnbot6 r15741 | audreyt++ | * build_pugs.pl: Regen prelude if instance was new. 09:58
r15742 | audreyt++ | * DrIFT.YAML: New asYAMLanchor API to allow sharing of 10:07
r15742 | audreyt++ | YAML nodes globally instead of just lexically within
r15742 | audreyt++ | the YAML stream. The instance on [a] and [:a:] alone
r15742 | audreyt++ | shrinks the Prelude.pm.yml by 20%.
r15743 | audreyt++ | * Drift.RuleYAML: New DrIFT rule to make all derived types anchorable.
r15744 | audreyt++ | * Pugs.AST.Internals: Refactor TraitBlocks into its own 10:10
r15744 | audreyt++ | data type to increase sharing; also marked various extra
r15744 | audreyt++ | anchored YAML instances.
r15745 | audreyt++ | * Chase the TraitBlocks change.
gaal yay audreyt! :) 10:12
10:15 buetow joined
audreyt still running smoke but seems like the gain is significant. 10:17
svnbot6 r15746 | audreyt++ | * Mark various instances YAML-anchored; this should reduce
r15746 | audreyt++ | startup time back to the level it was before (or maybe faster.)
r15747 | audreyt++ | * Regen instances.
audreyt after PadRefactor there wouldn't be a subEnv anymore 10:18
so all modules can be precompiled safely
instead of hand-crafted ones that avoids forward refs with qualified
gaal trying to understand r15741... how can you anchor to something that isn't in the stream?
audreyt so might be time to revive .t.yml plan
15742? 10:19
gaal er, yes
audreyt well, you can't which is why you gen an anchor
next time it gens a ref
the diff is that we were using a ReaderT
and insert is local
(children sees the anchor)
but now it's ReaderT IORef
so insert is global 10:20
(siblings sees the anchor)
things like [] can't be shared locally
since it has no children
sharing it globally results in huge win
i.e. we were using YAML as a tree
now we're using it as a graph
gaal so eg TraitBlocks refactoring is there because empty TraitBlocks is very common?> 10:21
audreyt s/using/emitting/
gaal s/>//
audreyt ypu
yup
so instead of a lot of [] [] [] []
the emptyTraitBlock is now a single anchor
without that refactoring you'll see
*8 *8 *8 *8
assumign ReaderT-IORef cache
with the old cache it's [] [] [] []
gaal nod 10:22
audreyt (look at the new .yml to see the diff)
gaal there's a strictness change in YAML (Set a) now (lost a $!) 10:23
(r15746)
on purpose?
audreyt 746 actually took away three anchors 10:24
the $! was introduced a couple commits earlier
so never mind that
10:25 chris2_ joined
audreyt seems generating stableptr on map and set somehow makes HsSyck unhappy 10:25
and fails with "moose"
so those three anchor were taken away
10:26 chris2_ is now known as chris2
tene audreyt: more pending commits soon? 10:27
gaal why is the pod split into an array? what's PEStatic?
pasteling "evalbot_r15741" at 194.145.200.126 pasted "Pugs build failure" (628 lines, 25.7K) at sial.org/pbot/23556
audreyt tene: no
gaal: array because spec says @=foo is by line
tene audreyt: thanks 10:28
audreyt PEStatic is PadEntry for our and state
gaal oh
audreyt revision: 15737
test_count: 733
duration: 1266
revision: 15746
test_count: 733
duration: 642 10:29
yay!
gaal woot!
masak wow, whence the great speedup? 10:30
gaal hmm, is hs/MkTraitBlocks = [ [], [], []... ] correct?
audreyt masak: more sharing of .yml nodes
startup time is dominated by YAML parsing
gaal i see that with 15747 10:31
audreyt so reduce .yml size by 50% means 2x faster speedup
gaal I thought emptyTraitBlocks should have been shared?
audreyt gaal: it should, I don't see that
gaal regenning..
audreyt I see one
masak audreyt: I must not have been following development closely enough lately. what uses .yml nodes?
audreyt - &66 !hs/MkTraitBlocks
and a lot of *66
masak: blib6/lib/Prelude.pm.yml 10:32
blib6/lib/Test.pm.yml
precompilation
masak audreyt: ah, of course
audreyt .yml is our "bytecode" so to speak
masak yes :)
audreyt gaal: still not seeing it? I have 10:33
[T|audreyt]~/work/pugs$ ll blib6/lib/*yml
-rw-r--r-- 1 audreyt 874584 Mar 17 18:14 blib6/lib/Prelude.pm.yml
-rw-r--r-- 1 audreyt 504983 Mar 17 18:16 blib6/lib/Test.pm.yml
gaal still compiling
audreyt that's down from
-rw-r--r-- 1 audreyt 2822451 Mar 17 11:08 blib6/lib/Prelude.pm.yml
-rw-r--r-- 1 audreyt 1818599 Mar 14 18:34 blib6/lib/Test.pm.yml
gaal huh no, mine are still large :( 10:34
audreyt weird... ghc 6.7?
gaal -rw-r--r-- 1 gaal gaal 2881774 2007-03-17 06:35 blib6/lib/Prelude.pm.yml
-rw-r--r-- 1 gaal gaal 1838800 2007-03-17 06:26 blib6/lib/Test.pm.yml
6.7.20070301 10:35
15747
I'll make clean.
audreyt feb22 here but shouldn't matter
make clean might not help
*ponders
gaal too late :)
audreyt heh :) 10:36
gaal svk st ?
audreyt all clean
gaal I need a hw upgrade :)
audreyt maybe aggressive GC
let me try something
gaal oh, you're thinking sharing only becomes manifest with plenty of RAM? 10:37
audreyt yes because stableptr was unreffed
a sec I can fix that 10:38
10:39 ludan joined
audreyt plays a bit with (void *)s 10:41
clkao fnord
gaal always fun, that
clkao *(fnord **)f
svnbot6 r15748 | audreyt++ | * DriFT.YAML: Attempt to delay GC of stable pointers. 10:44
r15749 | audreyt++ | * regen instances.
gaal audreyt, do you regen instances in separate commits on purpose? 10:45
audreyt yes to force -M
svnbot6 r15750 | audreyt++ | * err typo.
audreyt since svn doesn't guarantee that
gaal -M ? 10:46
oh
audreyt ensure that Instances.hs has a later mtime than its orig
gaal right
nodnod
audreyt ok, new .yml generation still works here
svnbot6 r15751 | audreyt++ | * typo again...
gaal clean didn't help, trying latest r
audreyt no idea it'll work for you or not
this is linux or win32? 10:47
gaal (co)linux
audreyt really no idea
gaal medium memory (600mb)
audreyt can someone build pugs and paste the size of blib6/lib/*yml?
tene? :)
(brb)
tene audreyt: will do shortly
tene svn up
gaal btw did you see that asm hackery to tell if you're running inside a VM? cute :) 10:48
tene laptop still dead/gone, so on a relatively slow box ATM
audreyt no... ?
gaal runs unpriv, too. sec, finding url
invisiblethings.org/papers/redpill.html 10:49
lambdabot Title: invisiblethings.org - Red Pill
audreyt good name!
10:49 xerox_ joined
gaal also, some folks claim to have disproved the Riemann Hypothesis 10:49
not that I can follow the proof, but it looks non-constructive
arxiv.org/pdf/math.NT/0703367 10:50
10:50 Jedai joined
gaal # that's completely OT but if true, very moose 10:50
grrr why does src/Pugs/Run/Perl5.hs always issue a warning about pugs_getenv. it's declared! 10:52
ok, that didn't help :( 10:53
audreyt ETOOBAD :/
assumption then is that newStablePtr doesn't get you okay values for values 10:54
upload your .yml?
want to see which nodes are anchored and which are not
gaal perlcabal.org/~gaal/tmp/Prelude.pm.yml.bz2 10:55
10:56 xerox_ is now known as xerox
gaal I wonder if we can allow more compact serialization of sepcialized types. so much of the prelude is position annotations... 11:00
audreyt wow
zero sharing!
newStablePtr isn't working at all in your GHC
gaal looks it
should I try with 6.6? 11:01
audreyt prolly colinux more than anything 11:02
feather will be done in 10min
can check then
we can workaround using addressOf
instead of newStablePtr
I think.
gaal doesn't newStablePtr pin the addr? 11:03
...I thought that's precisely what it does?
11:05 ozo_ joined
audreyt but repin 11:06
gaal I have a 6.6 build running... if it fails I'll try a native win32 11:09
audreyt repin can cache or it can choose not to
need to run... bbiab 11:10
11:10 rindolf joined
tene tene@hussein:~/src/pugs/blib6/lib $ du *yml 11:18
2820 Prelude.pm.yml
1800 Test.pm.yml
gaal audreyt: looks like you had -Oleg turned on again... 11:21
tene: which ghc are you using?
tene 6.6
11:21 RHainsworth joined, as joined 11:22 RHainsworth left
gaal I should have timed this but I get the feeling that 6.7 is much faster to compile pugs than 6.6 11:32
big files with 6.6 too, trying win32... 11:44
11:51 mjk joined, Achilles14 joined
tene I get 2827 and 1804 on a different box 11:59
12:09 araujo joined
gaal nah, should be much, much lower when audreyt's change kicks in 12:18
i'm having setup problems with 6.7 on win32
xerox gaal -Oleg? 12:43
tene xerox: she had to run 12:44
it was a pun
xerox tene: I thought it was a pun on Oleg and the -O option... nevermind.
tene ahh
moritz if anybody is interested in pugs builds for debian: moritz.faui2k3.org/debian/pugs/r15751/ 12:48
lambdabot Title: Index of /debian/pugs/r15751
xerox palindrome release 12:50
moritz s/release/revision/ 12:51
13:01 shlomif joined 13:02 shlomi joined, mj41_ joined, shlomi is now known as rindolf 13:08 iblechbot joined 13:40 ruoso joined
pasteling "rindolf" at 88.153.198.34 pasted "Parrot failures on Mandriva Cooker (Pentium 4)" (7 lines, 428B) at sial.org/pbot/23558 13:41
13:46 vel joined 13:58 explorer joined 14:20 xinming joined 14:31 Limbic_Region joined
masak sigh... longest-token-first and the unsortedness of hashtables don't really go together well 14:33
14:43 bonesss joined
Limbic_Region yawns 14:44
salutations all 14:45
@tell putter my audreyt donation has been made via proxy ( diakopter++ ). Do you know who, if anyone, is leading the effort at getting a donation page online? I saw docs/feather/donate.pugscode.org but am confused as to what still needs to be done 14:51
lambdabot Consider it noted.
15:23 weinig|bbl is now known as weinig 15:25 Khisanth joined 15:37 cookys joined 15:54 ofer0 joined 15:59 shlomif joined, shlomif is now known as rindolf 16:04 chris2 joined 16:06 Khisanth joined 16:22 lanny joined
lanny Any way to get NickServ to send you the password you registered with? 16:26
16:42 prly joined 17:06 xinming joined 17:12 lichtkind joined 17:21 idiotmax joined 17:25 bonesss joined 17:27 VanilleBert joined 17:46 bonesss joined 17:48 neonse joined 17:57 larsen_ joined 18:04 larsen__ joined 18:28 t4 joined 18:33 VanilleBert left
svnbot6 r15752 | audreyt++ | * build_pugs.pl: Also regen prelude if DrIFT.YAML changed. 18:37
18:38 thepler joined
svnbot6 r15753 | audreyt++ | * Glorious YAML compressor. 18:38
r15753 | audreyt++ | I delayed Pad refactoring for one night to write this
r15753 | audreyt++ | generic common-graph-elimination algorithm for non-recursive
r15753 | audreyt++ | YAML trees, because apparently newStablePtr isn't portable
r15753 | audreyt++ | enough (gaal++ and tene++).
r15753 | audreyt++ | Now we abandon newStablePtr altogether and instead inspect
r15753 | audreyt++ | the YAML tree to find out the maximum possible degree of
r15753 | audreyt++ | compression. Test.pm.yml is now shorter than Prelude.pm.yml!
r15753 | audreyt++ | So now everybody should see a >2x speed up. :-)
audreyt actually, more than 2x; up to 5x for smaller programs. 18:39
Patterner updates 18:41
audreyt would like reports on "make ; make blib6/lib/Test.pm.yml ; ls -l blib6/lib/*yml"
as well as smoke time differences
geoffb Is a make clean necessary? 18:42
audreyt no
geoffb pulling and making ...
I know I asked this a few days ago, but I forgot -- is parallel compile working, and how do I tell it to do so?
I'd love to actually use that second core I paid for .... 18:43
Patterner wild guess would be "make -j3" :)
audreyt you can do make -j3 :)
geoffb Yeah, but time is dominated by GHC compile.
Patterner needs a faster computer... 18:44
geoffb So the question becomes making GHC parallelize
audreyt there's a patch.
hackage.haskell.org/trac/ghc/ticket/910
lambdabot Title: #910 (--make should have a -j flag for parallel building) - GHC - Trac
audreyt slated to 6.8
so "not yet but soon".
geoffb can't wait for Etch to release, so sid will start flowing downhill again ....
k
audreyt that patch scales linearly (as is all GHC-based SMP parallelism nowadays) 18:45
so once it's in trunk it'll make a lot of difference I expect :)
geoffb That rocks. Because of STM?
nodnod
audreyt yeah.
geoffb is boggled that such a simple concept makes such a huge difference
audreyt well, imagine database without transactions...
oh wait, that wasn't too long ago... 18:46
*cough* MySQL *cough*
geoffb NODNODNOD
Patterner STM?
geoffb A few years ago, the company I was working at had to fly out the original MySQL coders to help us work around the lousy performance.
audreyt Patterner: software transactional memory. transactions for variable updates, instead of locks.
Patterner mysql is not a database, it's an electronic rolodex. 18:47
Patterner googles for it
audreyt mysql>=5 is fine though...
geoffb They helped with the R/O stuff, but we had to rewrite the heavy R/W stuff ourselves.
For certain table types only, yes?
audreyt sure
Patterner: we implement stm (examples/concurrency/stm-contend.pl
)
which is based on the idea that you can declare transactions of updates that happens atomically wrt other threads. 18:48
geoffb Happen to know if STM is in Parrot?
audreyt the primitives are in
lichtkind audreyt: im a bit behinf schedule i rewritten some parts but it was more work than i thought, maybe tomorrow you get mail what was your gmail again i will note int this time in my thunderbird
audreyt not really exposed/exercised by anything
lichtkind: audreyt.org at gmail
geoffb Wow, the changes since last night are causing GHC to recompile quite a bit 18:49
audreyt yeah, anything that touches Pugs.AST.Internals does that
that module will be Gone in a week, fortunately
or at least massively shrunk
geoffb and there was much rejoicing
audreyt oh wow.
Patterner Hmm... is "Ruf" a good translation for "Call"...?
audreyt timing:
duration: 538
test_count: 733
gaal !!! 18:50
devbot6 gaal: Error: "!!" is not a valid command.
audreyt this is the first time since forever I have a <10min smoke.
geoffb yay
<9, even
audreyt indeed
Patterner is still watching the compilation...
geoffb on 101
audreyt expected to drop 50% again with Pad+Multi refactoring next week
if not more, I think
geoffb good
Tests don't get run enough if they're not fast enough. 18:51
gaal hmmm.... big yml still.
audreyt -rw-r--r-- 1 audreyt 804390 Mar 18 02:33 blib6/lib/Prelude.pm.yml
-rw-r--r-- 1 audreyt 339244 Mar 18 02:30 blib6/lib/Test.pm.yml
gaal remaking it.
-rw-r--r-- 1 gaal gaal 2881926 2007-03-17 14:52 blib6/lib/Prelude.pm.yml
-rw-r--r-- 1 gaal gaal 1838800 2007-03-17 06:47 blib6/lib/Test.pm.yml
audreyt ...rm them and "make pugs" and "make blib6/lib/Test.pm.yml"...
gaal (14:52 is now on this machine)
yeah...
audreyt this time there's nothing machine-dependent, so if you still see large yaml we have a fun problem to debug ) 18:52
:)
gaal btw: VStr "Compile error -- invalid Pugs.PIL1.PIL_Expr: Stmts etc. 18:53
-rw-r--r-- 1 gaal gaal 2881926 2007-03-17 14:54 blib6/lib/Prelude.pm.yml
-rw-r--r-- 1 gaal gaal 1838848 2007-03-17 14:54 blib6/lib/Test.pm.yml
we have a fun problem to debug, then...
audreyt we do
audreyt ponders
18:53 forsaken joined
audreyt still zero sharing in the .yml? 18:53
gaal by the size, yes. looking... 18:54
geoffb compile done!
checking
gaal huh. inline pod's squashed
(one string)
geoffb Mine's still big
audreyt only one string shared?
geoffb -rw-r--r-- 1 geoff geoff 2881926 2007-03-17 11:53 blib6/lib/Prelude.pm.yml
-rw-r--r-- 1 geoff geoff 1818599 2007-03-16 23:55 blib6/lib/Test.pm.yml
gaal no; one string w/ embnewlines vs. array 18:55
audreyt thinking.
gaal i don't spot any sharing....
there is _some_: 18:56
eg: - &7 !hs/MkType
hmm but not sure any deref
audreyt ok, but nowhere near enough
really? that's interesting
geoffb Interesting: rm blib6/lib/*.yml ; make changed my filesizes to match gaal's
gaal it'd look like *7 right?
audreyt yes.
gaal no deref. 18:57
audreyt thinking.
gaal 31 refs.
achors, that is. with nonconseq numbers.
audreyt nonconseq
that is again very interesting.
that means the AReference nodes vaporized 18:58
gaal all hs/Vars
18:58 chris2 joined
audreyt upload yml again? 18:58
gaal nonconseq but at least monotonic
sec
geoffb working on make clean; ./configure; make in case that helps
18:58 xerox joined
audreyt geoffb: wouldn't help... :) 18:59
geoffb well heck, worth a try ...
gaal perlcabal.org/~gaal/tmp/Prelude.pm.yml.bz2
geoffb I can debug perl. I can't debug haskell, so I have to fall back to the simple things.
:-)
Limbic_Region audreyt - 2x speed up from when? My smoke tie went from 88 min to like 147 19:00
xerox bugs? where? (:
gaal my asYAMLanchor is basically commented out to id. is that supposed to be that way? 19:01
audreyt Limbic_Region: just a sec
gaal: yes. the trick is in compress below
Limbic_Region: give me 1hr or so before resmoking :)
gaal yeah I see the compress... 19:02
your cpu isn't 64 bit is it?
Limbic_Region audreyt - the times I reported btw are prior to your most recent checkins
audreyt 32 here 19:03
Limbic_Region any parallelization?
geoffb 32 bit here as well 19:04
Limbic_Region setting concurrent > 1 is intermittently broke here for me (Win32)
oh, sorry
misread
audreyt gaal: try this
put this into test.hs 19:05
import DrIFT.YAML
import Data.Yaml.Syck
main = emitYamlFile "compressed.yml" =<< compressYamlNode =<< parseYamlFile "blib6/lib/Prelude.yml"
geoffb Oh that's odd -- make after make clean crashed
audreyt and then
geoffb: make again?
gaal: and then
util/runcompiler --make -isrc test.hs src/pcre/pcre.o
./test
and see if size changes for compressed.yml
geoffb audreyt: getting farther this time
gaal compiling... 19:06
audreyt still thinking where the bug is
the hashing scheme maybe
19:07 dmpk2k joined
gaal ugh, size zero. I'll add error moosages 19:07
audreyt sorry
Prelude.pm.yml
typo 19:08
not Prelude.yml
gaal fixed that already
audreyt mmm
gaal oh my bad
-rw-r--r-- 1 gaal gaal 2881927 2007-03-17 15:09 compressed.yml
-rw-r--r-- 1 gaal gaal 2881926 2007-03-17 14:54 blib6/lib/Prelude.pm.yml 19:09
byte difference is prolly a newline...
xerox diff?
audreyt ok, assume hash is at fault 19:10
gaal diff's too messed up, it's a wonder there's only one byte difference 19:11
Limbic_Region audreyt - presumably you have received my donation via proxy? # diakopter++
audreyt Limbic_Region: I had. much much thanks!
gaal diff -ub | wc -l => 62k lines!
map order primarily, i gues
s
audreyt probably
Limbic_Region good - and in a few days I can help contribute to getting the page up and the word out
rindolf Hi audreyt, gaal 19:12
audreyt Limbic_Region++
gaal xerox: can you spot the bug? :)
hi rindolf
yes, Limbic_Region++
rindolf gaal: what's up? 19:13
audreyt gaal: assume hash is bad
perlcabal.org/~audreyt/tmp/YAML.hs
gaal rindolf: audreyt forgot to flip the MORE MAGIC switch
audreyt put it in src/DrIFT, remake
the test, that is
it should run much slower
gaal yeah sec...
audreyt but result here is 19:14
-rw-r--r-- 1 audreyt 812944 Mar 18 03:12 compressed.yml
(it used checksum instead of hashing so lots of collisons)
Limbic_Region is precompiling prelude and test now not a good idea?
gaal nod
audreyt Limbic_Region: a better idea than before
as soon as I make this work outsie my machine :)
Limbic_Region ah, ok - good then 19:15
audreyt if hashing is not at fault, then comparison is... though I doubt it can come to that
gaal -rw-r--r-- 1 gaal gaal 2881927 2007-03-17 15:17 compressed.yml
:(
audreyt let's see...
pasteling "audreyt" at 122.126.35.100 pasted "minimal test" (10 lines, 350B) at sial.org/pbot/23570 19:21
audreyt gaal: try this? should print
---
- &1 bar
- baz
- *1
(and feel free to revert the unhash patch now) 19:22
(so it'd run faster)
gaal ---
- bar
- baz
- bar
audreyt oh excellent.
easier to debug in any case.
debugging 19:23
gaal why no tags at all, though?
audreyt not well formed I guess? 19:25
19:26 devogon joined
audreyt debugging on feather. give me 10min 19:26
gaal sure
want shell here too?
audreyt no. compression is flawless 19:27
AReference is genned
the problem is now at HsSyck side
i.e. given this perfectly fine 19:28
MkNode {n_id = 503388359, n_elem = ESeq [MkNode {n_id = 2964694693, n_elem = EStr "bar", n_tag = Just "foo", n_anchor = AAnchor 1},MkNode {n_id = 2725169137, n_elem = EStr "baz", n_tag = Just "moo", n_anchor = ASingleton},MkNode {n_id = 0, n_elem = ENil, n_tag = Nothing, n_anchor = AReference 1}], n_tag = Nothing, n_anchor = ASingleton}
HsSyck refuses to gen anchors
gaal why's your box special?
audreyt very good question.
gaal different syck? 19:30
audreyt we link statically with syck/ no? 19:32
gaal we sure oughta...
audreyt trying that hypothesis... 19:33
it could still be a newStablePtr problem though
19:35 Limbic_Region joined
gaal brb 19:36
Limbic_Region audreyt - does that "wait an hour before smoking" still stand? 19:37
audreyt Limbic_Region: no, probably another 30min 19:39
gaal "you rush a miracle moose, you get rotten miracles" 19:42
audreyt but this is higly strange :/
so I've traced it down to C-level calls
which is identical
gaal ah!
different gccs
-O
audreyt syck_emitter_mark_node does get the sptrs
-O2 is in effect
i686-apple-darwin8-gcc-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc. build 5367) 19:43
gaal gcc (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-20)
let me try -O0
audreyt I thought blaming the compiler is the last resort..
gaal how do I pass that to c?
audreyt edit .cabal 19:44
the hssyck one
gaal yeah but -O there is ghc
audreyt -optc-O0
gaal -f-
ah
ok
audreyt a fresh checkout on my machine still outputs anchors 19:47
so it's not a contaminated checkout
also libsyck is not installed
19:48 justatheory joined
gaal still rebuilding deps... 19:49
19:50 xinming joined, avarab joined
gaal okay, that didn't change anything. :-P 19:52
19:55 Schwern joined
audreyt hm 19:57
I wonder if sizeof(int) == sizeof(long)
or rather
sizeof((void*)) == sizeof(long)
gaal the former's true, the latter not necessarily. iirc. 19:58
audreyt happens to work on feather 19:59
so that's not it either.
gaal hmm
20:00 avarab is now known as avar
audreyt boils down to syck's internal hash st_lookup failure. 20:00
tracing it
emitter.c line 397 20:01
and line 1252
doesn't work together somehow.
(I may have to crash before finished tracing though, so cycles welcome...) 20:02
gaal "/* XXX - Added by Audrey Tang to handle self-recursive structures - XXX */"
audreyt line 394, not 397. 20:03
st_lookup( e->markers, n, (st_data_t *)&oid ) &&
this is false somehow
gaal what's ST_DATA_T_DEFINED guard for? 20:05
it's never mentioned anywhere but syck.h once 20:06
do you enter line 100 there?
not that I see why it'd make any difference... any pointer's a word on most these archs
a word32 even
audreyt yeah that's not it 20:07
gaal although
(st_data_t)oid
on next line
audreyt that line is entered here. 20:08
gaal long != unsigned long
SYMID is the latter...
audreyt it is stableptr bug. 20:09
fixing.
gaal huh
audreyt two calls to freeze got two different ptrs 20:10
markYamlNode freeze emitter node = do nodePtr <- freeze node
that one, and
mapM_ (syck_emit_item e) =<< mapM freeze sq 20:11
that one
this is very annoying :)
but, same bug as we ran into before.
gaal I.... don't get it 20:13
audreyt there's a
ptr <- newStablePtr node
in freezeNode
suppose each time you call it with same node
it gens another ptr
instead of the old one...
so the mark-phase ptr will disagree with emit-phase
gaal how would that happen? 20:14
bug inside newStablePtr?
audreyt I have no idea...
testing that hypothesis
gaal wouldn't that like crash ghc all the time?
audreyt no
gaal is feather SMP?
audreyt both will be safe
and stable
and dereffable
gaal your cpu is SMP 20:15
audreyt it's just they are not cached, so to speak
mine is, yes.
but ghc only uses one
(no GHCRTS)
fixed! 20:16
the fix is trivial.
gaal memoize newStablePtr? :-P
audreyt yeah.
in line 256
ptr <- newStablePtr node
let ptr' = castPtr $ castStablePtrToPtr ptr
instead of blindly do that
we first do a hash lookup for aanchor nodes
and if it's there, use the memoized value 20:17
problem solved
committing
gaal audreyt++
audreyt try it? 20:19
svnbot6 r15754 | audreyt++ | * Fix an incorrect assumption about newStablePtr always generating 20:20
r15754 | audreyt++ | the same thing for the same value in Data.Yaml.Syck, which prevented
r15754 | audreyt++ | proper anchoring on certain machines, by memoizing newStablePtr.
gaal building... 20:21
20:23 DHGE joined
pasteling "evalbot_r15754" at 194.145.200.126 pasted "Pugs build failure" (253 lines, 13.3K) at sial.org/pbot/23571 20:24
gaal I needed to do some cleaning after this stuff, if the build breaks for anybody, make clean or just rm -rf third-party/installed
audreyt waits for the build to build...
gaal did but didn't regen ymls..... 20:25
sec
audreyt *crossed fingers*
gaal clearly I need a faster machine :) 20:26
20:26 Aankhen`` joined
moritz gaal: who doesn't? *g* 20:26
audreyt did you remember to revert the src/DrIFT/YAML.hs? checksum patch ?:)
that is very slow :)
gaal it works!
audreyt ship it!
gaal -rw-r--r-- 1 gaal gaal 815374 2007-03-17 16:28 blib6/lib/Prelude.pm.yml
-rw-r--r-- 1 gaal gaal 339244 2007-03-17 16:28 blib6/lib/Test.pm.yml
audreyt Limbic_Region: smoke should be fine to do now to measure time difference. :)
gaal: measure
gaal audreyt++ audreyt++ audreyt++
audreyt time ./pugs -e1
?
gaal++ gaal++ gaal++
it should be noticeably faster 20:27
gaal indeed faster by half!
w00t
audreyt and with -MTest
it's 3x or so
because compression worked even better there
woot
evalbot will return momentarily
gaal this really rocks :) 20:28
audreyt the resulting .pm.yml is of course unfit for human consumption :)
:D
would be nice if we thought about that back in the prehackathon :)
gaal unlike, heh, the situation heretofore?
audreyt lol true.
allbery_b hm. I think that bug bit here too, my current Prelude.pm.yml is the same size as gaal's
(OSX PPC) 20:29
gaal allbery_b: rm it
allbery_b gaal's old one that is
gaal and Test.pm.yml
allbery_b will do a full regen later
(I build both ghc and pugs from distclean/realclean)
gaal starting a smoke; haven't done that in ages :)
allbery_b I launch them and leave them overnight, since G4 minis aren't exactly speed demons :) 20:30
gaal ?eval "audreyt++ saved about {0.60 * 733} seconds from smokes"
hee, no evalbot yet
audreyt > 0.60*733 20:31
lambdabot 439.8
gaal anyway, the nice thing about that is that it's 7.33 minutes :)
audreyt :D 20:32
svnbot6 r15755 | audreyt++ | * Force Test.pm.yml regen if Prelude.pm.yml is old. 20:34
r15756 | audreyt++ | * build_pugs.pl: also regen prelude if this build_pugs.pl has changed.
audreyt allbery_b: can you try just "make pugs" 20:35
and see if the yml shrinks now? (r15757)
svnbot6 r15757 | audreyt++ | * typo.
audreyt should be incremental 20:36
gaal 508 refs in Test, 861 in Prelude 20:39
I wonder how many hits
but, not important
Limbic_Region testing now audreyt 20:40
headed out for a while - will report when I get back
geoffb Pulling last four revs and building ...
audreyt Limbic_Region: thanks!
the speedup is consistently 2x+ here, so would like to hear about GHC 6.6 and nonunix setups 20:41
gaal I wonder what's hs/MkPrag .. eol-block that I see in Test.pm?
geoffb Yes!, make alone worked, and fast
-rw-r--r-- 1 geoff geoff 815374 2007-03-17 13:40 blib6/lib/Prelude.pm.yml
-rw-r--r-- 1 geoff geoff 339244 2007-03-17 13:41 blib6/lib/Test.pm.yml
audreyt gaal: it's something that tells that a block is parsed at eof
rather eol
gaal those sizes look good, geoffb
20:42 evalbot_r15754 joined
gaal audreyt: where did it come from? 20:42
Patterner how many tests of "make test" do you expect to fail atm?
20:42 the_dormant joined
gaal the Prag node, that is 20:42
audreyt gaal: parser
a block that ends its line can't be a hash composer 20:43
it's just there to mark that fact
gaal got it, :69
audreyt Patterner: smoke.pugscode.org/ has the fiured
lambdabot Title: Pugs Smoke Reports
audreyt figures
~500ish
?eval 1+1 20:44
evalbot_r15754 2
audreyt ?eval use java:java.lang.System;
evalbot_r15754 Error: *** Unsafe function 'require_java' called under safe modeā¤ at -e line 16, column 7-74
20:44 devogon_ joined
audreyt 4:44am again... 20:44
really need to sleep
geoffb g'night, audreyt! 20:45
audreyt thanks a lot for helping me to figure out I'm not hallucinating :)
gaal night! very mooseful day
20:45 explorer joined
audreyt another 9 days of those accidental speedups and we'll be 1000 times faster... 20:45
geoffb smiles expectantly :-) 20:46
gaal like noodles
geoffb can't wait to convert all of his personal P5 code over
audreyt :) *wave* & 20:47
svnbot6 r15758 | audreyt++ | * ext/Perl6-Grammar/t/basic.t: unTODO now that captures in PCR works.
moritz is there still work going on on a p5 to p6 translator?
20:50 devogon__ joined
moritz or has it even started yet? 20:50
gaal t/examples/all_parse.t still takes a while! (184 sec here...) 20:51
moritz: I think there hasn't been much work on it lately 20:52
moritz gaal: then it's probably futile to ask how far it is progressed ;-) 20:53
gaal not futile, but I don't know the answer :) 20:54
20:57 devogon joined 21:00 gnuvince joined 21:01 devogon_1 joined 21:03 DHGE left 21:04 justatheory joined 21:11 avarab joined
gaal 561.640u 1695.350s 38:48.99 96.9% 0+0k 0+0io 1pf+0w 21:11
but I don't know how it compares to before :) 21:12
21:24 avarab is now known as avar 21:28 ferreira joined
svnbot6 r15759 | audreyt++ | * Merged various YAML::Syck tweaks, including proper base64 routines 21:35
r15759 | audreyt++ | to separate Buf from Str later. Also, double-quoted strings in YAML output
r15759 | audreyt++ | no longer contains continuation lines, which confused YAML.pm terribly.
21:37 ferreira left
svnbot6 r15760 | audreyt++ | * Data.Yaml.Syck: We now generate inline YAMLs by default, which uses 21:41
r15760 | audreyt++ | 1/6 of the original disk space, and loads about 15% faster.
r15761 | audreyt++ | * regen instances.
21:45 devogon joined 21:49 Psyche^ joined 21:50 ferreira joined 21:56 ferreira left, devogon_ joined 22:00 Psyche^ is now known as Patterner 22:10 devogon joined 22:30 avarab joined 23:24 avar joined, vel joined 23:28 devogon joined 23:50 jisom joined 23:57 MikeJS joined