Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2008-07-24

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:05 timbunce joined #perl6
00:11 ruoso which is the opposite of a "multi" declaration? meaning... when you want a method to explicitly have only one signature...
00:11 lambdabot ruoso: You have 1 new message. '/msg lambdabot @messages' to read it.
00:12 b_jonas ruoso: dunno, I think that's the default
00:12 ruoso but there's a specific name for that, isn't it?
00:13 b_jonas maybe there's some equivalent to 'multi sub foo (signature)' like 'sub foo (signature) is multi' that you can negate with something like "isn't"
00:13 b_jonas is there an "isn't" and "doesn't" btw?
00:13 b_jonas possibly "is not" and "does not" and "has no"
00:13 b_jonas because the apostrophes would be strange
00:13 ruoso the keyword "only"
00:14 b_jonas ruoso: does that negate multi?
00:14 ruoso yes
00:14 b_jonas ah yeah, indeed
00:14 b_jonas that's what S06 says
00:15 ruoso I think I'll add different storage support for "multi methods" and "only methods"
00:15 ruoso (in p6opaque, I mean)
00:16 b_jonas which S documents the "is" and "does" and "has" modifiers?
00:16 ruoso where one is Hash of Hash of Method and the other is a plain Hash of Method
00:16 ruoso b_jonas, S12 documents OO mostly
00:20 b_jonas "but not" might also make sense
00:21 ruoso what does that mean?
00:21 ruoso pugs: my $a = 1 but False; if (! $a) { say 1 };
00:21 p6eval pugs: OUTPUT[*** Cannot cast from VBool False to Pugs.AST.Internals.VCode (VCode)␤    at Prelude.pm line 541, column 5-16␤]
00:22 ruoso pugs: my $a = 0 but True; if ($a) { say 1 };
00:22 p6eval pugs: OUTPUT[*** Cannot cast from VBool True to Pugs.AST.Internals.VCode (VCode)␤    at Prelude.pm line 541, column 5-16␤]
00:24 b_jonas ruoso: it would undo a but
00:24 b_jonas like
00:24 b_jonas (1 but False) but not False
00:25 b_jonas obviosuly you wouldn't write that like that but in a separate expression
00:25 pugs_svn r21472 | lwall++ | more buglets
00:25 ruoso b_jonas, (1 but False) but True ?
00:26 ruoso rakudo: say (1 but False) but True
00:26 b_jonas ruoso: that might work in the case of False
00:26 p6eval rakudo 29712: OUTPUT[The but operator can only be used with a role or enum value on the right hand side␤current instr.: 'die' pc 11105 (src/gen_builtins.pir:7110)␤]
00:26 b_jonas but you won't have such a negated role for most roles
00:27 b_jonas though actually
00:27 b_jonas it might have to be
00:27 b_jonas (1 but False) but not Bool
00:27 b_jonas because False is an enum, and so but not Bool would strip all the enum roles from the value
00:28 b_jonas or at least I think False is an enum, maybe it isn't?
00:28 ruoso it would probably make more sense (1 but False) doesnt Bool
00:28 b_jonas yeah, it is an enum, says S12
00:28 b_jonas "does not"? why?
00:29 b_jonas I thought "does" was for classes
00:29 b_jonas that is, applying a role to a class
00:29 ruoso because "but True" actually means "does Bool, .bool = True"
00:29 alester joined #perl6
00:30 b_jonas is that the syntax?
00:30 ruoso no... just a concept mock up
00:30 b_jonas not "but Bool :bool<true>" or something else with "but"
00:31 b_jonas wait, maybe there's both "but" and "does" with the only difference being that "but" creates a copy while "does" works in place?
00:33 ruoso b_jonas, see the end of the "Roles" section in S12
00:34 b_jonas ruoso: yeah, so I think that's the only difference between but and does
00:35 b_jonas also, the Enums section say that the syntax is this:
00:35 b_jonas either of the following:
00:35 b_jonas $x = "Today" but Tue;
00:36 b_jonas $x = "Today" but day::Tue;
00:36 b_jonas $x = "Today" but day<Tue>;
00:36 s1n left #perl6
00:36 b_jonas $x = "Today" but day(Tue);
00:36 b_jonas $x = "Today" but day(3);
00:36 b_jonas the last two also work for any properties as defined in the Roles section, and enums are always properties as well
00:37 japhb joined #perl6
00:37 b_jonas it seems to imply that both Tue and day are roles in this case
00:38 b_jonas (namely not just with the creation syntax but also by saying $x.does(Tue) and $x.does(day) are true for such an enum value)
00:38 b_jonas so I'd think both "but not True" and "but not Bool" should work
00:38 b_jonas and the same with "does not" instead of "but not" with the difference being mutate vs copy
00:39 b_jonas p6 does not define "does not" or "but not" anywhere though
00:40 ruoso @tell pmurias, I've had a great idea... to simplify p6opaque implementation (and metaclass implementation) I've separated the storage of "only methods" from the storage of "multi methods"
00:40 lambdabot Consider it noted.
00:41 ruoso @tell pmurias I've updated http://www.perlfoundation.org/perl6/index.cgi?smop_oo_api ... take a look ...
00:41 lambdabot Consider it noted.
00:42 apeiron joined #perl6
00:44 bacek joined #perl6
00:46 cognominal_ joined #perl6
00:47 pugs_svn r21473 | ruoso++ | [smop] reworking p6opaque.sm0p with the new definitions... as a refactoring on the way, tests are broken again
00:49 * ruoso later &
01:07 meppl joined #perl6
01:11 icwiener joined #perl6
01:47 xinming joined #perl6
01:53 xinming__ joined #perl6
01:55 alester joined #perl6
01:56 * zamanfou is now away: In the rain my tears are forever lost.
02:02 xinming_ joined #perl6
02:13 xinming joined #perl6
02:22 xinming joined #perl6
02:38 meppl good night
02:44 charsbar_ joined #perl6
02:45 xinming_ joined #perl6
02:54 [particle1 joined #perl6
03:01 Psyche^ joined #perl6
03:06 ikeda joined #perl6
03:10 justatheory joined #perl6
03:19 rhr_ joined #perl6
03:30 xinming joined #perl6
03:35 pbuetow_ joined #perl6
03:38 ikeda_ joined #perl6
03:44 felipe joined #perl6
03:48 xinming joined #perl6
03:58 kanru joined #perl6
04:04 justatheory joined #perl6
04:10 ikeda joined #perl6
04:14 xinming_ joined #perl6
04:16 arguile joined #perl6
04:26 xinming__ joined #perl6
04:27 ikeda_ joined #perl6
04:53 xinming joined #perl6
05:06 xinming_ joined #perl6
05:07 masak joined #perl6
05:13 bacek_ joined #perl6
05:16 xinming joined #perl6
05:19 Psyche^ joined #perl6
05:24 jfredett joined #perl6
05:52 xinming joined #perl6
06:14 c1sung joined #perl6
06:39 Alias_ joined #perl6
06:42 Alias__ joined #perl6
06:48 luqui joined #perl6
07:02 iblechbot joined #perl6
07:07 bacek joined #perl6
07:08 bacek__ joined #perl6
07:17 felipe joined #perl6
07:17 mofino joined #perl6
07:17 BinGOs joined #perl6
07:17 pl0d joined #perl6
07:17 lisppaste3 joined #perl6
07:17 bloonix joined #perl6
07:17 gbacon joined #perl6
07:17 meteorjay joined #perl6
07:17 Juerd joined #perl6
07:17 yath_ joined #perl6
07:17 funktio joined #perl6
07:18 Arathorn joined #perl6
07:18 apple-gunkies joined #perl6
07:18 frobnitz joined #perl6
07:18 breinbaas joined #perl6
07:18 pmichaud joined #perl6
07:18 moritz_ joined #perl6
07:18 josh- joined #perl6
07:35 timbunce joined #perl6
07:36 _timbunce joined #perl6
08:25 elmex joined #perl6
08:38 xinming joined #perl6
09:12 pmurias joined #perl6
09:13 jferrero joined #perl6
09:22 chris2 joined #perl6
09:27 pmurias TimToady: why did you reduce the number of {*} hooks in STD.pm? it should be done with wrapping where there is only one?
09:27 lambdabot pmurias: You have 2 new messages. '/msg lambdabot @messages' to read them.
09:31 moritz_ do {*} hooks affect LTM?
09:32 donaldh joined #perl6
09:33 pmurias likely
09:40 ashizawa joined #perl6
09:44 renormalist joined #perl6
09:51 jferrero joined #perl6
10:31 pmurias joined #perl6
10:46 meppl joined #perl6
10:51 agentzh joined #perl6
10:58 ruoso joined #perl6
11:02 ruoso pmurias, hi
11:10 m0py joined #perl6
11:10 pmurias ruoso: hi
11:10 pbuetow joined #perl6
11:11 ruoso pmurias, have you seen that I take the multi methods to another member of the proto_storage?
11:11 pmurias ruoso: yes
11:11 ruoso it should make it easier to implement the first objects...
11:11 pmurias but i don't know what to think of it
11:12 pmurias do Scalars redispatch methods they don't understand?
11:13 ruoso pmurias, I think so
11:13 ruoso actually.. not...
11:14 ruoso let me see
11:14 ruoso pugs: class Foo { method bar { 2 } }; my $a = Foo.new(); say VAR($a).bar();
11:14 p6eval pugs: OUTPUT[2␤]
11:14 ruoso pugs does it
11:15 ruoso pugs: class Foo { method bar { 2 } }; my $a = Foo.new(); say VAR($a).FETCH().bar();
11:15 p6eval pugs: OUTPUT[*** No such method in class Foo: "&FETCH"␤    at /tmp/5uDnuk6S3M line 1, column 56-77␤]
11:15 ruoso pugs: class Foo { method bar { 2 } }; my $a = Foo.new(); say VAR($a).WHAT;
11:15 Psyche^ joined #perl6
11:15 p6eval pugs: OUTPUT[Foo␤]
11:15 ruoso hmmm... it actually doesn't implement VAR correctly
11:17 ruoso pugs: my $a = Scalar.new(); class Foo { method bar {2} }; $a.STORE(Foo.new); say $a.bar;
11:17 p6eval pugs: OUTPUT[*** No such method in class Scalar: "&STORE"␤    at /tmp/XixGgLUixC line 1, column 53-70␤]
11:18 ruoso hmpf
11:18 ruoso kp6: class Foo { method bar { 2 } }; my $a = Foo.new(); say VAR($a).bar();
11:18 p6eval kp6 21473: OUTPUT[no method 'bar' in Class 'Scalar'␤]
11:18 ruoso kp6 refuses it
11:18 pmurias maybe $foo is traslated to CurrentLexicalPad<$foo>.FETCH()?
11:21 ruoso $foo?
11:21 pmurias any sort of lexical variable
11:21 ruoso oh.. yeah... that's for sure...
11:21 ruoso $foo actually means lexpad.{'$foo'}.FETCH()
11:22 * ruoso just noticed that was exactly what you've written before ;)
11:23 pmurias ruoso: i wouldn't be so sure of this
11:24 pmurias %hash<hash key>.method()?
11:25 * ruoso now sees the meaning of your first question...
11:26 ruoso but returning a scalar is the only way to implement
11:26 ruoso my $a := %hash<hash key>;
11:27 ruoso maybe the . operator is the one that makes the FETCH
11:28 ruoso which actually makes sense
11:28 ruoso as well as the = operator
11:29 pmurias either that or if a method is called on a scalar it calls it on it's value
11:29 ruoso but how do you call FETCH then?
11:30 pmurias FETCH would be special cased
11:30 ruoso hmmm... so you can't have a method FETCH on a value that is stored inside a scalar?
11:30 pmurias hmm or you would have to call VAR($foo).FETCH
11:33 ruoso VAR($foo) returns a scalar with the $foo scalar as the value of this scalar
11:34 ruoso so VAR($foo).FETCH() would be the same as $foo
11:34 ruoso hmmm
11:34 ruoso wait
11:35 ruoso if the '.' operator implies a FETCH
11:37 ruoso VAR($foo) needs a double-box for VAR($foo).FETCH() === $foo
11:37 ruoso so VAR() creates a scalar containing the scalar returned by the lexpad lookup
11:39 ruoso so, in VAR($foo).FETCH(), '.' accesses the scalar returned by the lexpad lookup because of the implied FETCH, and the explicit FETCH is being called on that scalar
11:39 ruoso kp6: my $a = 1; say VAR($a).FETCH() === $a;
11:39 p6eval kp6 21473: OUTPUT[syntax error at position 31, line 1 column 31:␤my $a = 1; say VAR($a).FETCH() === $a␤                               ^ HERE␤]
11:40 ruoso kp6: my $a = 1; say (VAR($a)).FETCH() === $a;
11:40 p6eval kp6 21473: OUTPUT[syntax error at position 33, line 1 column 33:␤my $a = 1; say (VAR($a)).FETCH() === $a␤                                 ^ HERE␤]
11:40 ruoso kp6: my $a = 1; say (VAR($a)).FETCH() == $a;
11:40 p6eval kp6 21473: OUTPUT[1␤]
11:40 ruoso kp6: my $a = 123; say (VAR($a)).FETCH() == $a;
11:40 p6eval kp6 21473: OUTPUT[1␤]
11:41 ruoso pmurias, does it make sense?
11:41 pmurias yes
11:41 pmurias but i has some issues
11:41 pmurias it would hinder language interoperability
11:42 pmurias and force more method call the nessesary
11:43 ruoso yeah... but... any other idea?
11:44 pmurias scalars forwarding method calls to their values and VAR() creating a special object which calls their real methods
11:45 pmurias we could somehow generalize the .^ and .^! syntax
11:48 ruoso that makes me think... how visible to the user is FETCH() and STORE()?
11:48 pmurias the have to use the VAR macro
11:48 ruoso the only reference of FETCH in the specs is in a Proxy object that would behave as the Scalar
11:49 ruoso maybe the effective FETCH could have a protected name...
11:50 pmurias we need multi part identifiers
11:50 ruoso and then we wouldn't have any problem by hiding any value method because it collides with the Scalar methods...
11:50 ruoso 'multi part identifiers'?
11:51 pmurias things like $foo.^foo $foo.^!foo would translate to (haven't thought about the syntax) $foo.HOW::foo $foo.REPR::foo
11:52 pmurias in other words we need namespaces for method name
11:52 pmurias s
11:53 ruoso I'm not so sure... $foo.^bar() is actually going to be rewritten as $foo.HOW.bar($foo)
11:53 ruoso now it's just a syntatic convenience
11:54 pmurias and .^!?
11:54 ruoso and the REPR calls are somewhat specific...
11:55 ruoso it's just a protected name
11:55 pmurias .^ is handled on the syntax level?
11:55 ruoso yes...
11:55 ruoso at least it's a reasonable way of doing it, since the actual method doesn't have the ^
11:57 pmurias qualified methods would be also a way for language interoperability, an object could have a different interface from python and from perl
11:57 lumi joined #perl6
11:57 Arathorn joined #perl6
11:57 apple-gunkies joined #perl6
11:57 frobnitz joined #perl6
11:57 breinbaas joined #perl6
11:57 pmichaud joined #perl6
11:57 moritz_ joined #perl6
11:59 ruoso pmurias, that's the beauty of representation polymorphism... we can have that feature later... it doesn't need to be a part of the standard p6opaque object
12:03 pmurias ruoso: do you have any usefull metaclass example which aren't done by represenation objects in smop?
12:04 ruoso not really... in fact I think the REPR api is a fundamental feature for you to have usefull interchangeable metaclasses
12:05 pmurias * examples
12:05 lumi joined #perl6
12:06 pmurias ruoso: what i meant what sort of (custom) metaclasses can we expect to be built on the REPR api
12:06 ruoso different MRO
12:06 ruoso for instance
12:07 ruoso pure-prototype × prototype by delegation × class-based
12:07 a-jing joined #perl6
12:07 a-jing left #perl6
12:10 ruoso pmurias, and also some more exotic metaclasses that fetch the methods elsewhere
12:10 ruoso and store only metainformation on how to do that fetching in the class_storage
12:13 ruoso pmurias, one very usefull one would be a P5Dispatch metaclass... that uses .^!who to determine the name of the p5 package where to dispatch the methods
12:19 pmurias isn't that the job of a REPR?
12:20 ruoso may be or may be not
12:20 ruoso it depends on what you want to acomplish
12:20 ruoso for instance...
12:20 ruoso if we manage to integrate smop with p5 the way I plan to do
12:20 ruoso we may have a smop object being used as is from inside p5
12:21 ruoso and then you might want to have a protoobject for a p5 module
12:22 pugs_svn r21474 | fglock++ | [v6.pm] version 0.25; marked cpan-tester failures as TODO (though I can't reproduce the problem)
12:24 iblechbot joined #perl6
12:24 Psyche^ joined #perl6
12:25 ruoso pmurias, of course that to access a p5 object, you need a different repr
12:26 ruoso pmurias, but one important feature of Perl 6 is that a subclass doesn't need to be of the same repr of a superclass... or even have the same metaclass
12:27 ruoso as well as an instance might have a different representation of its protoobject
12:31 pugs_svn r21475 | ruoso++ | [smop] bringing back some features that were already implemented in the old p6opaque.
12:31 pugs_svn r21476 | fglock++ | [v6.pm] Changelog update
12:32 * ruoso wonders what keeps fglock away from IRC...
12:47 pugs_svn r21477 | ruoso++ | [smop] bringing back test/12... still failing...
12:47 pmurias ruoso: it would be good to have a perl6 version of the sm0p fragments on top
12:48 ruoso yes, it would...
12:50 pmurias re IRC, don't you get distracted by IRC from coding?
12:51 * pmurias gets very distracted
12:51 ruoso not really...
12:51 Jedai joined #perl6
12:53 ruoso usually when I have to code something else I neglect IRC...
12:53 ruoso and only take a look from now and then...
12:58 pugs_svn r21478 | ruoso++ | [smop] some more advances in test/12 it now is just warning the non-implemented methods.
13:05 cmarcelo joined #perl6
13:07 pmurias maybe fglock works in a non-irc place now
13:07 pmurias * no-irc
13:15 pmurias shouldn't non-implemented methods kill smop instead of printing a warning message
13:16 ruoso pmurias, I'm not sure at this level... we still don't have an exception mechanism implementd
13:18 pmurias we could have a placeholder SMOP_THROW()
13:18 pmurias or better SMOP_FAIL?
13:18 moritz_ pmurias: fail() in perl 6 doesn't throw an exception by default
13:19 pmurias SMOP_DIE
13:20 pmurias at least sliently returnig false on unkown methods should be eliminated
13:21 ruoso pmurias, I'm trying to add the warning for now
13:21 ruoso for p6opaque the failure will be handled by the metaclass
13:21 ruoso that should return a failure  if the method is not found
13:23 pugs_svn r21479 | ruoso++ | [smop] delegation in p6opaque works again... there is a leak of the how scalar somewhere
13:26 pugs_svn r21480 | pmurias++ | [smop] tiny progess on Array
13:26 pmurias library and cycling&
13:28 ruoso pmurias, you forgot to add test/19
13:45 cognominal__ joined #perl6
13:46 pugs_svn r21481 | ruoso++ | [smop] YAY! test/12 passes again, delegation to the metaclass works again
13:53 pugs_svn r21482 | pmurias++ | [smop] forgot to add test 19
13:53 pmurias i'm using {0} instead of [0] as s1p needs to be fixed
13:54 pmurias got to go will fix on a fresher brain&
13:54 ruoso alright...
14:01 timbunce joined #perl6
14:04 jan_ joined #perl6
14:04 ruoso @tell pmurias I can't compile test/19... I'm removing it from the compilation for now
14:04 lambdabot Consider it noted.
14:08 ruoso @tell pmurias I can't compile any sm0p block...
14:08 lambdabot Consider it noted.
14:10 cognominal_ joined #perl6
14:11 TJCRI joined #perl6
14:11 pbuetow joined #perl6
14:14 ruoso @tell pmurias Can't call method "item" on an undefined value at ../sm0p/sm0p_with_actions line 58.
14:14 lambdabot Consider it noted.
14:22 * ruoso have to wait for the sm0p fix
14:22 kanru joined #perl6
14:23 pugs_svn r21483 | ruoso++ | [smop] moving test/14 back. It was still failing with a segfault, but I could not debug further because of the sm0p bug that is not compiling anything.
14:26 cognominal_ joined #perl6
14:52 meppl joined #perl6
15:20 masak joined #perl6
15:41 Lorn joined #perl6
15:46 pugs_svn r21484 | lwall++ | [STD] various bugs
15:46 pugs_svn r21484 | lwall++ | [t/spec] various bugs
15:46 pugs_svn r21484 | lwall++ | Now parses 95% (cheating on postfix:<!>)
15:47 moritz_ TimToady++
15:47 * moritz_ is thorougly impressed
15:47 timbunce joined #perl6
15:47 moritz_ of course we shouldn't forget that tricky stuff like hyper ops isn't jet migrated to spec/
15:51 pbuetow joined #perl6
15:52 Exodist joined #perl6
15:53 justatheory joined #perl6
15:54 pugs_svn r21485 | moritz++ | test target for STD.pm Makefile
15:57 timbunce joined #perl6
16:06 pmurias joined #perl6
16:07 pmurias ruoso: looking into it
16:07 lambdabot pmurias: You have 3 new messages. '/msg lambdabot @messages' to read them.
16:08 pmurias ruoso: you maybe be a victim of lex/ poisioning
16:08 pmurias remove lex/* test/lex/*
16:13 pugs_svn r21486 | lwall++ | require STD.pm to parse as first test
16:17 iblechbot joined #perl6
16:23 pugs_svn r21487 | moritz++ | [STD.pm] Makefile: test depends on all
16:23 pugs_svn r21488 | moritz++ | [spec] S04-statements/for.t it's neither '=~' nor '~~', it's '~='
16:26 pmurias ruoso: has removing lex fixed your problem
16:26 pmurias ?
16:27 TimToady heh, I wonder if I can get the parser to figure out which mistake they made...
16:28 moritz_ ;-)
16:28 pmurias TimToady: should i add a lex/ less option?
16:28 moritz_ btw what's wrong with ".$*PID" ?
16:31 TimToady $*PID."method"
16:31 pugs_svn r21489 | lwall++ | [STD] parse as types
16:31 pugs_svn r21489 | lwall++ | [type.t] of and as must come after signature
16:32 TimToady in theory, should backtrack on failure to find brackets, but currently just fails
16:32 justatheory TimToady: Sounds painful.
16:40 hercynium joined #perl6
16:40 TimToady it should probably figure out that a method name containing a newline is unlikely :)
16:50 pmurias how can i check if something is a typeglob in p5 as not only those seem to live in the symbol table?
16:54 pmurias =~ /^\*/ proved to be enough
17:04 cjfields joined #perl6
17:09 ruoso pmurias, yes...removing lex fixed it (as it looks)
17:09 alester joined #perl6
17:14 pugs_svn r21490 | ruoso++ | [smop] re-adding test/19 which now compiles (but still fails)
17:15 ruoso TimToady, if you have some time, please take a look on the Scalar × Value discussion we had earlier...
17:16 timbunce joined #perl6
17:19 ruoso pmurias, I think we should start checking if the invocant has the correct RI before executing anything...
17:19 ruoso pmurias, most of the time a segfault arises that is the cause
17:21 pmurias hm
17:21 pmurias we need to check if the capture is a native one too
17:21 ruoso yes... that too...
17:22 pmurias and convert a string identifier into a constant one
17:22 ruoso that too ;)
17:23 ruoso but the later is not that important because it won't generate a segfault...
17:23 ruoso we can explicitly say we don't support non-constant identifiers for now
17:23 pmurias silent failures are worse than segfaults
17:24 ruoso we should add also the warning about "unknown methods"
17:25 ruoso some of the objects have it alreaddy
17:26 pmurias we can either add it with a custom preprocessor or the c preprocessor
17:26 ruoso we could have a C macro that does this checking
17:26 ruoso something like
17:27 ruoso ___NATIVE_CAPTURE_ONLY___("p6opaque");
17:27 ruoso ___CORRECT_INVOCANT___(SMOP__p6opaque__RI, "p6opaque");
17:28 ruoso and even...
17:28 ruoso ___CONST_IDENTIFIER_ONLY___("p6opaque")
17:31 pmurias isn't it possible to get the correct name from the responder
17:31 alester joined #perl6
17:32 ruoso pmurias, in fact... it is
17:32 * ruoso writing the macros
17:32 ruoso I think I'll make it as an assert
17:33 ruoso it will make a failure exit
17:34 timbunce joined #perl6
17:35 pmurias ruoso: what do you use for debugging segfaults?
17:36 ruoso pmurias, to check the invocant I need to extract it from the capture... would it be ok for the macro to declare SMOP__Object* invocant;?
17:36 ruoso pmurias, valgrind
17:39 pmurias ruoso: you could add a new block and make it a lexical
17:39 ruoso pmurias, but usually the invocant will be used later...
17:40 ruoso so making the macro define it would avoid a second call to capture_invocant
17:40 pmurias ok
17:41 pugs_svn r21491 | ruoso++ | [smop] three macros that can be used to do some sanity checks that can save us from segfaults
17:46 pugs_svn r21492 | ruoso++ | [smop] uses the macros in p6opaque_proto_storage
17:52 pmurias ruoso: i used to catch segfaults with something like valgrind --db-attach=yes --db-command="cgdb %f %p" '
17:52 cognominal__ joined #perl6
17:52 ruoso pmurias, usually valgrind already gives me the output I need
17:52 ruoso pmurias, have you seen the SMOP Debugging wiki page?
17:52 pmurias yes
17:55 pmurias cgdb is IMHO nicer than gdb
17:55 pmurias ruoso: shouldn't the -q option be on the valgrind command on that page?
17:56 ruoso -q?
17:57 ruoso if you like to add it...
17:57 ruoso I usually like the valgrind report
17:58 pmurias i don't like the valgrind header
18:00 pugs_svn r21493 | ruoso++ | [smop] p6opaque_proto_storage completed! It delegates everything to hashes, arrays and scalars
18:04 meppl joined #perl6
18:11 pugs_svn r21494 | pmurias++ | [STD] a script to show changed globals after an STD use
18:18 justatheory joined #perl6
18:23 pugs_svn r21495 | ruoso++ | [smop] p6opaque has the accessors for all its members...
18:24 pugs_svn r21496 | moritz++ | [t] removed redundant test file general/basic.t
18:28 moritz_ t/oo/can.t looks so wrong to me
18:28 pugs_svn r21497 | ruoso++ | [smop] p6opaque p6 protocode with "is rw" for all the members
18:30 pmurias ruoso: should i add __UNKNOWN__METHOD__?
18:30 ruoso pmurias, yes... that's a good one too...
18:32 justatheory joined #perl6
18:32 pmurias should i die too?
18:32 ruoso I think so...
18:32 ruoso the assert interrupts the program too
18:33 ruoso you can even make an assert("message") that will always die
18:33 ruoso and it even shows the message
18:34 pmurias assert is supposed to be used for debugging only
18:34 ruoso is it?
18:34 moritz_ yes
18:34 pugs_svn r21498 | moritz++ | [spec] unfudged two tests for rakudo in for.t
18:34 moritz_ with the appropriate compiler options it's optimized away
18:36 ruoso hmm... maybe it's a good thing
18:36 ruoso because as the lowlevel consolidates, that checkings could be optimized away...
18:37 pmurias it's in NDEBUG
18:37 pugs_svn r21499 | moritz++ | [INSTALL] link to instructions on building pugs on cygwin, rurban++
18:37 pmurias if NDEBUG in set the get deleted
18:37 ruoso pmurias, how is the support for the q:s1p (or however it's called) inside C files?
18:38 pmurias it's use v6
18:38 ruoso use v6; and then it ends with the block?
18:38 pmurias yes
18:38 pmurias it uses indentation
18:38 ruoso does it include any boilerplate? like the goto, setr and stuff
18:39 pmurias not yet
18:39 pmurias didn't know what to add
18:39 ruoso I think a plain CPS with setr should be ok
18:39 ruoso like the ones in p6opaque.sm0p...
18:39 ruoso actually... like the one in p6opaque DISPATCH
18:40 justatheory joined #perl6
18:40 ruoso pmurias, p6opaque_message_DISPATCH in p6opaque.sm0p is a good example
18:40 pmurias is it ok to use __func__?
18:40 timbunce joined #perl6
18:40 ruoso where? what for?
18:41 pmurias error messages
18:41 pmurias it is c99 and a gnu extension
18:41 ruoso that's fine by m
18:41 ruoso e
18:43 pugs_svn r21500 | moritz++ | [spec] moved oo/inheritance.t to spec/, and updated it a bit
18:43 * ruoso can't stand sm0p blocks any more...
18:43 moritz_ that's intentional, right? ;-)
18:44 ruoso pmurias, how hard would it be for you to add inline "use v6;" support for the boilerplate in p6opaque_message_DISPATCH?
18:44 ruoso so I can rewrite test/14 with v6 instead of sm0p
18:45 pugs_svn r21501 | lwall++ | [STD] improve parsing of reduceops
18:45 pugs_svn r21501 | lwall++ | [Cursor] correct character class parse in canmatch
18:45 pugs_svn r21501 | lwall++ | [reduce-metaop] no such thing as [.{}]
18:47 pmurias ruoso: not very hard i think
18:49 pmurias ruoso: is it constant?
18:49 ruoso the boilerplate?
18:49 pmurias yes
18:49 ruoso I'd say so
18:50 ruoso I mean... that's not the only possible pattern... but it's a valid one
18:51 pmurias i could either add it to s1p or add a __SM0P__("inline code")?
18:52 ruoso moritz_, I wish I could stand it a little more, because if we make this preprocessor too good, the pressure for real p6 will be smaller
18:52 ruoso pmurias, I think you ca nadd it to s1p
18:53 pmurias we don't always have a $continuation in the enclosing c code
18:54 ruoso if we don't, the interpreter have something for which you are going to send it back
18:54 ruoso the pattern is, interrupt the current execution, execute something, set the value into the old continuation and get back to it
18:54 ruoso the interpreter always have something...
18:55 ruoso pmurias, btw... the last 5 sm0p statements are part of the boilerplate
18:55 ruoso and they should fetch the result from the last executed statement
18:56 ruoso (which means 1 statement before the boilerplate starts)
18:57 pmurias should it be return $expr in p6?
18:57 ruoso hmm...
18:57 ruoso having explicit return instead of implict might be usefull, because with no explicit return, you would be a plain CPS with no return value...
18:57 ruoso pmurias++
18:57 ruoso that's a better approach
18:58 ruoso turn the "return $expr" call into the setr thing
18:58 ruoso then the boilerplate is simply the last two statements
18:58 pmurias moritz_: the sm0p's design goal is to represent the nodes it's constructing accuratly not to be a programming language
19:01 pugs_svn r21502 | moritz++ | [spec] S12-class/inheritance.t: fudged for rakudo
19:01 pugs_svn r21502 | moritz++ | also removed newlines in order not to confuse fudge
19:11 * ruoso wonders if he should wait for the "use v6" trick to work on test/14 or if he should handle sm0p blocks one more time...
19:11 pmurias wait please
19:12 rakudo_svn r29727 | moritz++ | [rakudo] add S12-class/ineheritance.t to spectest_regression
19:12 rakudo_svn r29727 | moritz++ |  +10 pass, +7 todo, +15 skip - still much work for jonathan ;-)
19:12 * pmurias dosn't want to read any more sm0p blocks
19:12 cjfields moritz++
19:13 moritz_ cjfields: for anything particular, or just for being me? ;-)
19:13 cjfields for the test commits, of course
19:13 moritz_ well, one never knows ;-)
19:14 cjfields does jonathan have a rakudo day this week?
19:14 moritz_ friday (aka tomorrow)
19:15 moritz_ but I have no idea what he'll be working on
19:15 ruoso sm0p was usefull but I think I underestimated the limits of our patience...
19:15 ruoso s/under/over/
19:15 pugs_svn r21503 | lwall++ | [STD] infrastructure for grammar-modifying operator definitions
19:19 pugs_svn r21504 | pmurias++ | [s1p] return support
19:20 pmurias now, how to test it
19:21 ruoso test/14
19:21 ruoso we have to replace the two sm0p blocks
19:22 pmurias put the perl6 in a comment i'll try to make it work
19:23 ruoso alriht
19:24 pugs_svn r21505 | moritz++ | [spec] moved oo/roles/basic.t to spec/, heavily reworked and many eval()s
19:24 pugs_svn r21505 | moritz++ | removed
19:25 pugs_svn r21506 | ruoso++ | [smop] fix the order in fprintf for ___UNKNOWN_METHOD___
19:26 pugs_svn r21507 | moritz++ | [spec] S12-role/basic.t: fixed POD
19:26 ruoso pmurias, does "use v6" support variables?
19:26 pmurias c variables
19:27 pmurias $*global.STORE(123) should work
19:27 ruoso $*global being in the global namespace
19:27 ruoso but if I need the return of an expression as the argument of another, I need to do it inline, right?
19:28 timbunce joined #perl6
19:28 pmurias yes
19:29 pmurias we don't have lexical pads yet
19:30 pugs_svn r21508 | moritz++ | [spec] S12-role/basic.t: use defined() to test for objects of empty classes
19:32 pmurias ruoso: the problem with declaring invocant in INVOCANT_RI_SHOULD_MATCH is that usually i want a more specific type than SMOP__Object* (if i know it)
19:33 pugs_svn r21509 | ruoso++ | [smop] add v6 blocks for pmurias++ to make it work :)
19:33 ruoso pmurias, then you can cast it without doing an additional call to the capture
19:34 pugs_svn r21510 | moritz++ | [spec] moved var/is_copy.t to spec/
19:36 ruoso pmurias, are the blocks sane?
19:37 pugs_svn r21511 | moritz++ | [spec] moved var/is_rw.t to spec/
19:41 pugs_svn r21512 | moritz++ | [spec] S06-traits/is-rw.t: added smartlink, fudged for rakudo
19:42 pmurias ruoso: looking
19:42 pugs_svn r21513 | ruoso++ | [smop] making it compile (use v6 is commented out)
19:49 * pmurias gives on extending STD_red and hacks around
19:52 rakudo_svn r29728 | moritz++ | [rakudo] two more S06 tests for spectest_regression
19:52 rakudo_svn r29728 | moritz++ |  +6 pass, +3 skip
20:12 pmurias joined #perl6
20:13 pmurias ruoso: test 14 is supposed to fail?
20:13 ruoso pmurias, depends on the failure
20:13 ruoso (it actually depends how much of hash is implemented already)
20:13 ruoso pmurias, you can commit it even broken...
20:14 ruoso so I can help fixing ;)
20:14 pmurias ok
20:14 pugs_svn r21514 | pmurias++ | .^! added to elfX and STD_red
20:16 pmurias we could have a hackathon at yapc europe ;)
20:16 * ruoso not going :(
20:16 pmurias :(
20:16 * ruoso can take part of the hackathon remotely
20:16 ruoso ;)
20:18 pmurias ruoso: so your talk will be canceled?
20:18 ruoso unless someone is willing to pay for my travel tickets...
20:19 ruoso pmurias, does it compile for you?
20:19 iblechbot joined #perl6
20:19 pmurias ruoso: no
20:19 pmurias a continuation is needed
20:19 ruoso oh.. ok...
20:20 ruoso I'll add the boilerplate around it then
20:21 pmurias it could be added to sm0p.pl if it's constant
20:22 ruoso pmurias, maybe it's ok to make it outside...
20:22 pmurias speaking of boilerplate, i added a perl example to the wikipedia boilerplate page
20:22 ruoso which is the perl boilerplate?
20:22 pmurias #!/usr/bin/perl
20:22 pmurias use strict;
20:22 pmurias use warnings;
20:22 ruoso ah.. :)
20:23 pugs_svn r21515 | ruoso++ | [smop] add the continuation boilerplate in test/14;
20:24 ruoso now we have a bad invocant somewhere
20:26 pugs_svn r21516 | ruoso++ | [smop] add a help message in p6opaque
20:27 Alias_ joined #perl6
20:27 ruoso pmurias, .^!how is being invoked with the responder interface as the invocant
20:28 sri_work joined #perl6
20:28 timbunce joined #perl6
20:28 pmurias ruoso: i get a FETCH is not implemented in bool error at the top
20:29 ruoso isn't that just after [smop p6opaque] REPR method called with p6opaque RI (^!how)
20:29 ruoso because the .^!how method is failing...
20:31 pugs_svn r21517 | ruoso++ | [smop] added a "abort()" call to make the error more explicit
20:31 ruoso pmurias, what I don't get is what is the difference between the .^!methods call and the .^!how call
20:31 ruoso in the "use v6" block
20:34 ruoso oh...
20:34 ruoso the error is deeper inside
20:36 donaldh joined #perl6
20:36 pmurias if it's not in s1p i'll just &
20:44 REPLeffect joined #perl6
20:52 ruoso pmurias, .^!CREATE is taking the '.' as part of the identifier
20:52 ruoso it should only be '^!CREATE', not '.^!CREATE'
20:52 jferrero joined #perl6
20:54 pmurias ruoso: fixing
20:56 pugs_svn r21518 | ruoso++ | [smop] some fixes in p6opaque
21:00 icwiener joined #perl6
21:00 wknight8111 joined #perl6
21:01 pmurias fixed
21:01 pugs_svn r21519 | pmurias++ | [s1p] fixed .^!
21:04 pmurias ruoso: anything else you think is a s1p problem?
21:04 ruoso pmurias, I don't think so...
21:05 ruoso I'm actually very near of having test/14 passing
21:06 ruoso pmurias, do you have the forget call in the boilerplate?
21:08 pmurias yes
21:09 pmurias if you uncomment a line in sm0p.pl you can see the sm0p code
21:09 pugs_svn r21520 | ruoso++ | [smop] test/14 almost passing... for some reason the frame is being destroyed too late...
21:10 ruoso the last thing to figure out now is why 'ok 7' is being printed before it should...
21:11 ruoso pmurias, I have to go...
21:11 pmurias np, i should be going to sleep ASAP ;)
21:12 * ruoso eating crabs &
21:12 pugs_svn r21521 | lwall++ | remove accidental non-breakable spaces
21:14 nothingmuch joined #perl6
21:24 justatheory joined #perl6
21:36 cjfields joined #perl6
21:38 justatheory joined #perl6
21:46 timbunce joined #perl6
21:55 pugs_svn r21522 | moritz++ | updated SLAVES
21:59 bacek joined #perl6
22:01 Limbic_Region joined #perl6
22:09 cmarcelo joined #perl6
22:09 Alias_ joined #perl6
22:15 _timbunce joined #perl6
22:19 _timbunce joined #perl6
22:29 Alias__ joined #perl6
22:43 _timbunce joined #perl6
22:51 icwiener_ joined #perl6
22:55 meppl joined #perl6
23:20 justatheory joined #perl6
23:31 bacek joined #perl6
23:35 alester joined #perl6
23:35 timbunce joined #perl6
23:54 justatheory joined #perl6

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

Perl 6 | Reference Documentation | Rakudo