pugscode.org/ | nopaste: sial.org/pbot/perl6 | pugs: [~] <m oo se> (or rakudo:, kp6:, elf: etc.) (or perl6: for all) | irclog: irc.pugscode.org/
Set by Tene on 29 July 2008.
00:36 adc_Penner left 00:47 meppl left 01:00 alester joined, PZt joined, cognominal left 01:02 justatheory joined 01:04 FireMinion left 01:10 ruoso left, hercynium joined
agentzh azawawi: is there anything to be done on my part? ;) 01:14
*on my side 01:15
01:43 hercynium_ joined, hercynium_ left 01:44 charsbar joined 02:09 aindilis left 02:15 alc joined 02:19 alanhaggai joined 02:30 agentzh left 02:31 simcop2387 left, agentzh joined 02:33 simcop2387 joined 02:46 alanhaggai_ joined, alanhaggai left, alanhaggai_ is now known as alanhaggai 03:37 justatheory left 03:41 justatheory joined 03:43 justatheory left 03:52 sri_kraih_ left 03:55 sri_kraih joined 03:58 Psyche^ joined 04:01 alc left 04:14 Patterner left, Psyche^ is now known as Patterner 04:17 [particle] joined 04:27 Auzon joined 05:14 spx2 joined
azawawi hi 05:16
agentzh: none... things are perfect ;-)
@tell moritz_ the synopsis is now up2date with the latest small|full links. I think we should put a message when a 404 is received. 05:21
lambdabot Consider it noted.
azawawi @tell agentzh what is the cron schedule for docs/feather/script/update-syn? 05:24
lambdabot Consider it noted.
azawawi agentzh++
work &
05:24 azawawi left 05:30 hercynium left 05:31 chrisdolan joined
chrisdolan Rakudo closures in regexps: they're just PIR, not Perl6, right? 05:32
wayland76 Example? 05:35
chrisdolan m/ foo {{ say "foo found" }} / 05:39
05:39 Bzek joined
chrisdolan PGE defaults to PIR and I can't see anywhere that Rakudo overrides that default with the :lang adverb 05:40
wayland76 rakudo: m/ foo {{ say "foo found" }} / 05:43
p6eval rakudo 31963: RESULT[{ ... }]
wayland76 rakudo: say m/ foo {{ say "foo found" }} /
p6eval rakudo 31963: OUTPUT[_block15ā¤]
chrisdolan Err, I should probably have asked in #parrot... 05:44
wayland76 Well, chris, you're beyond me :). Based on past experience, I'd say that there's probably no-one listening now except you and me, but if you hang around for a while
...people usually start turning up a few hours from now
You could try, anyway 05:45
(try the #parrot channel, that is)
btw, those results we saw come back from rakudo are beyond my understanding :) 05:46
chrisdolan rakudo: "a" ~~ m/ a {{ say "hi" ~ "bye" }}/ 05:47
p6eval rakudo 31963: OUTPUT[error:imcc:syntax error, unexpected '~', expecting '\n' ('~')ā¤ in file 'EVAL_12' line 3ā¤hiā¤]
chrisdolan rakudo: "a" ~~ m/:lang('Perl6') a {{ say "hi" ~ "bye" }}/ 05:48
p6eval rakudo 31963: OUTPUT[Null PMC access in invoke()ā¤current instr.: '_block17_corou' pc 231 (EVAL_11:97)ā¤]
chrisdolan oops 05:49
rakudo: "a" ~~ m/:lang(Perl6) a {{ say "hi" ~ "bye" }}/
p6eval rakudo 31963: OUTPUT[invoke() not implemented in class 'Perl6::Compiler'ā¤current instr.: '_block17_corou' pc 231 (EVAL_11:97)ā¤]
chrisdolan So, I can explicitly tell PGE to compile closures as Perl6, but it fails to execute 05:50
05:59 ylsid joined 06:10 pbuetow joined
wayland76 Could be a bug. Have you looked at the Rakudo bug tracker yet? 06:26
(btw, I hadn't clicked that regexes could work that way -- cool :) ) 06:27
agentzh @tell ļ»æazawawi daily: 01 * * * * nice -n5 /home/agentzh/update-syn 06:31
lambdabot Consider it noted.
06:40 ashizawa joined 06:46 alester left 07:04 felipe left 07:05 pbuetow left 07:14 smg left 07:26 adc_Penner joined 07:32 Khisanth left 07:33 Bzek left 07:45 Khisanth joined 07:46 iblechbot joined 07:51 adc_Penner2 joined 07:54 adc_Penner left 07:55 tewk_ joined 08:17 araujo left 08:18 bacek_ joined 08:21 duzy joined 08:22 ylsid left 08:23 Auzon left 08:24 ylsid joined 08:28 araujo joined 08:29 ejs joined 08:36 Bzek joined
duzy hi, all, somebody knows how to avoid a Perl6 grammar <ident>* eat the last '\n' of a string like "abc def asd \n" 08:37
i'm trying to parse a space separated string, but <ident>* will eat the last "\n", this is what I want to avoid... 08:38
08:40 pmurias joined 08:44 smg joined 08:46 schmalbe joined 08:53 smg left 08:55 cosimo joined 09:20 penk joined 09:28 adc_Penner2 left 09:40 tomyan joined, elmex joined 09:43 ylsid left 09:53 yantom joined 09:56 tomyan left 10:00 araujo left 10:06 araujo joined 10:11 ruoso joined
pmurias ruoso: hi 10:18
ruoso hi pmurias 10:22
10:23 smg joined
pmurias ruoso: do you still believe in using token names in the MOP? 10:23
i just relised that add_macro uses the multi token name ;) 10:24
ruoso I was thinking that maybe the thing that receives the AST and returns the object might already call the specific metaclass method
pmurias in the real compiler we need to construct classes and subs as we go in order for BEGIN to work 10:26
ruoso right... and we can make the compiler pluggable for each of this contructors 10:28
including the built-ins
but that's after bootstrap
for now we can just assume to know "knowhow", "class" and "module" 10:29
and if we leave the initialization of the class to this compiler plug-in, we can have whatever API in the Meta 10:30
since it will be handwritten anyway
pmurias does a module have a metainstance? 10:31
ruoso well, a module is an object.. 10:35
10:36 wolv joined, wolv left
pmurias we also have to know "role" 10:48
10:49 schmalbe left 10:53 duzy left 10:57 elmex_ joined 11:02 gp_davied joined
pasteling "huehuehue" at 125.164.119.100 pasted "aw" (1 line, 4B) at sial.org/pbot/32894 11:05
ruoso pmurias, yes... yes... role... 11:09
pmurias :) 11:10
gp_davied where is channel scanner
i need shell
or new rfi
pmurias rfi = ? 11:11
gp_davied remote file injection
11:12 elmex left, elmex_ is now known as elmex, simcop2387 left
pmurias gp_davied: i don't think you're likely to get exploits here fyi it's a publicly logged channel 11:22
11:40 Alias_ left 11:41 iblechbot left 11:45 bacek_ left 11:47 bacek_ joined, penk left 11:50 simcop2387 joined 11:55 Bzek left 12:03 ashizawa left
Juerd_ feather3 is at 100% cpu usage 12:07
Could someone have a look please?
12:08 gp_davied left, Bzek joined 12:09 gp_davied joined 12:10 Lorn joined 12:17 Ontolog joined 12:23 gp_davied left 12:26 |Jedai| joined
ruoso pmurias, anyway... I think we can move on with add_method and compose_role... 12:30
pugs_svn r22781 | ruoso++ | [smop-s1p] sanitizing signatures in Object.pm 12:36
ruoso pmurias, I'm unsure about ClassHOW:170 12:38
pmurias, would you mind taking a look...
?
it's about using protoobjects in arguments to BUILDALL
pmurias i'm doing last minute bugfixing now ;) 12:39
12:43 Jedai left 12:44 Jedai joined
ruoso TimToady, "The default BUILD and BUILDALL are inherited from Object" in S12 seems to imply that BUILD is a method, but it's a submethod... some clarification in that section would be appreciated... 12:44
12:45 _Jedai_ left 12:47 xinming_ joined, xinming left
pugs_svn r22782 | ruoso++ | [smop-s1p] small fix in ClassHOW.pm 13:02
ruoso TimToady, is v6/smop/src-s1p/ClassHOW.pm:56 correct according to the spec? is that the way BUILDALL calls each BUILD? 13:03
13:05 kanru left 13:08 kanru joined 13:13 iblechbot joined
pugs_svn r22783 | ruoso++ | [smop-s1p] proposed ClassHOW.add_method implementation 13:17
13:19 abra joined
pmurias ruoso: what line is ClassHOW:170 in HEAD? 13:20
ruoso sorry.. wrong line...
it's line 70
not 170
PerlJam It's a junctive dissonance? 13:21
13:25 pmurias left 13:37 alanhaggai left 13:44 abra left
ruoso is it sane to consider that the compiler will be smart to create the accessors for attributes on his own? or is the metaclass supposed to register the accessor when someone adds an attribute via MOP? 13:45
13:48 abra joined
ruoso will consider that add_attribute will only create the attribute slot, not add any accessors ... 13:49
13:51 abra left 13:53 TheFluff joined
pugs_svn r22784 | ruoso++ | [smop-s1p] proposed ClassHOW.add_attribute implementation 13:54
13:58 pedrob joined 14:02 alanhaggai joined 14:06 TJCRI joined 14:08 abra joined 14:09 jhorwitz joined 14:10 pedrob left 14:14 bacek_ left
pugs_svn r22785 | ruoso++ | [smop-s1p] proposed ClassHOW.compose_role implementation 14:14
14:15 iblechbot left
ruoso just assumed Code has a method called "yada" that returns true if this method contains a plain ... 14:15
this is important during role_composition... 14:16
14:21 abra left
pugs_svn r22786 | ruoso++ | [smop-s1p] small typo in ClassHOW.pm identified by STD 14:22
14:31 abra joined 14:34 fronty joined, fronty left 14:38 iblechbot joined 14:42 alester joined 14:43 mj41_ joined
ruoso @tell pmurias, I was wondering if it would help if we make SMOP a p5 library, then you would be able to initialize the types in src-s1p directly... without the need to go through the m0ld compiler... 14:46
lambdabot Consider it noted.
ruoso lunch & 14:49
15:04 eternaleye left 15:06 mj41_ left 15:07 Exodist joined 15:11 mj41 left 15:33 Lorn left 15:47 ejs left 15:53 ruoso left, hercynium joined 15:54 ZuLuuuuuu joined 15:55 justatheory joined 16:00 zamolxes joined 16:03 fridim_ joined 16:05 smg left 16:20 schmalbe joined 16:33 Lorn joined 16:35 masak joined 16:36 Ontolog left 16:37 Ontolog joined 16:38 pbuetow joined 16:44 ruoso joined 16:53 pedrob joined 16:57 cosimo left
masak stdparse: my Int Str $a; 17:03
pbuetow who, an Int and a Str at the same time? 17:10
masak pbuetow: I was just curious about whether that's gramatically legal 17:13
pbuetow ahh ok :)
moritz_ std: my Int Str $a;
lambdabot moritz_: You have 2 new messages. '/msg lambdabot @messages' to read them.
p6eval std 22786: OUTPUT[parsedā¤]
moritz_ @massages
lambdabot azawawi said 1d 12h 12m 59s ago: im getting nouns for =begin pod comments from STD_syntax_highlight, is that the right behavior?
azawawi said 11h 51m 49s ago: the synopsis is now up2date with the latest small|full links. I think we should put a message when a 404 is received.
masak TimToady: if I create a variable of type Int Str, what can I store in it? 17:18
[particle] is that Int|Str? 17:19
lambdabot [particle]: You have 1 new message. '/msg lambdabot @messages' to read it.
[particle] @moosages
lambdabot azawawi said 1d 21h 49m 9s ago: size results between --simple and full mode are feather.perl6.nl/~azawawi/simple_test/
masak [particle]: I don't know. Rakudo seems to treat it as Int&Str, which means I can't store anything in it. 17:21
[particle] i don't think i've seen two types in a row before 17:22
is there a synopsis example?
masak don't know that either, but STD seems to feel it's ok :)
[particle] blech 17:24
moritz_ aye, it parses it as two typnames
but I wonder what the semantics are 17:25
PerlJam moritz_: I think the answer is "wrong" :)
masak they might be wrong. 17:27
I see no immediate use for writing separate type names like that
especially since there's already Int|Str and Int&Str 17:29
PerlJam might it be something more like "Array of Int" without the "of" ? 17:30
(If I had to guess, that's where I'd go)
otherwise, it's confusing and wrong. :)
masak PerlJam: so you mean that it maybe means something in the order of "Int of Str"? 17:31
17:31 azawawi joined
masak I'm not sure I can map that to anything sensible. 17:31
PerlJam I mean that may be its intended use and "my Int Str $foo" in an unintended consequence 17:32
masak to me, it feels like only "container" types like Array oughta be able to talk about "of"
PerlJam: I would argue that, if that is indeed the resulting semantics, then that's confusing and wrong, too :)
azawawi rakudo: say "good evening"; 17:33
p6eval rakudo 31963: OUTPUT[good eveningā¤]
PerlJam Now we only need to wait for TimToady to confirm or deny :)
17:35 smg joined
masak aye. I like this way of working. 17:36
[particle] our Boss of Me $TimToady; 17:38
masak :P
so the question is, is "Boss Me" legal, and does it mean the same as "Boss of Me" 17:39
moritz_ CPAN.pm-- # asking me for hundreds of optional dependencies, all of them separatel
masak CPAN.pm++ # automating installation for me in 99% of the cases
TimToady all the constraints in a parameter are ANDed together 17:40
PerlJam masak: PERL_MM_USE_DEFAULT=1 doesn't help?
TimToady including any implied by the sigil 17:41
17:41 alanhaggai left
PerlJam ah 17:41
TimToady Int Str can only contain to a type that supports both roles
note that we don't actually support junctional syntax on types 17:42
since Foo &bar is ambiguous
PerlJam so whitesapce disambiguation or not allowed?
[particle] heh
TimToady no 17:43
masak TimToady: is "5" an Int and a Str?
how can I store it into an Int Str $a?
[particle] class Foo is Int is Str {...}; my Foo $x .= new; my Int Str $a = $x; 17:44
masak heh
TimToady does is sufficient, you don't need is
17:44 speckbot left
masak so "5" isn't an Int? 17:44
TimToady are the quotes part of it? 17:45
[particle] rakudo: my Int $x = "5";
p6eval rakudo 31963: OUTPUT[Type check failedā¤current instr.: 'parrot;Perl6Object;infix:=' pc 60 (src/gen_builtins.pir:52)ā¤]
masak yes.
rakudo: my Int Str $a = 5;
[particle] rakudo: my Int $x = 5;
p6eval rakudo 31963: OUTPUT[Type check failedā¤current instr.: 'parrot;Perl6Object;infix:=' pc 60 (src/gen_builtins.pir:52)ā¤]
rakudo 31963: RESULT[5]
masak rakudo: my Int Str $a = "5";
p6eval rakudo 31963: OUTPUT[Type check failedā¤current instr.: 'parrot;Perl6Object;infix:=' pc 60 (src/gen_builtins.pir:52)ā¤]
TimToady rakudo: my Int Str $a = "5" but Int(5); 17:46
p6eval rakudo 31963: OUTPUT[The but operator can only be used with a role or enum value on the right hand sideā¤current instr.: 'die' pc 13159 (src/gen_builtins.pir:8135)ā¤]
[particle] closer to working :)
17:46 gantrixx left
TimToady except that C<but> will install a separate value for the Int vs the Str 17:47
so you want to compose an IntStr or something
and rakudo apparently needs to learn about punned roles/classes
PerlJam So ... this is the explicit mechanism for schizophrenic variables? 17:48
masak I'm wondering if there is any rakudobug stuff to be reported from all of this...
TimToady rakudo: class IntStr does Int does Str { ... } 17:49
p6eval rakudo 31963: OUTPUT[Method 'methods' not foundā¤current instr.: '!keyword_does' pc -85527 ((unknown file):-1)ā¤]
TimToady ?!?
masak there it is! :)
PerlJam Is the type constraint ANDing explicit in a synopsis somewhere? I'm missing it. 17:50
masak seems user-defined roles are OK, but things like Int and Str aren't
moritz_ rakudo implements these as classes 17:51
masak moritz_: shouldn't matter, should it? 17:52
a class has a corresponding role automatically created for it
TimToady if you use a role as a class, it should attempt to create it for you
moritz_ that NYI ;)
17:53 abra left
masak but there's nothing wrong about 'class A does Int' is there? I'm rakudobugging it right now. 17:54
17:54 adc_Penner joined
masak oh well, it shouldn't throw that error, in any case. 17:54
17:55 meppl joined 17:59 yantom left 18:00 pedrob left 18:06 araujo left 18:16 pedrob joined
pmichaud std: if(3<4) { say "yes"; } 18:17
p6eval std 22786: OUTPUT[parse failureā¤]
18:17 elmex left
moritz_ std: if(1); 18:18
p6eval std 22786: OUTPUT[cp: cannot create regular file `lex/STD/EXPR': Permission deniedā¤parse failureā¤]
moritz_ curses file caching
PerlJam pmichaud: you need a space on that one :)
18:19 elmex joined
pmichaud PerlJam: I was explicitly testing RT#60152, which doesn't have a space. 18:19
moritz_ std: if(1);
p6eval std 22786: OUTPUT[parse failureā¤]
PerlJam oh.
pmichaud the ticket says that rakudo does the wrong thing here (it does), but I wanted to report what the "right thing" was, which is that it's a syntax error.
18:19 anonymous_ joined
pmichaud but I wanted to verify that before saying so. 18:19
moritz_ my local copy of STD.pm parses if(1); 18:20
pmichaud as it should.
moritz_ aye
moritz_ heads off to table tennis 18:21
18:23 REPLeffect joined 18:26 abra joined 18:32 masak left 18:38 Bzek left 18:49 abra left
ruoso TimToady, just in case you didn't backlog... irclog.perlgeek.de/perl6/2008-10-27#i_649346 18:55
lambdabot Title: IRC log for #perl6, 2008-10-27
pugs_svn r22787 | azawawi++ | [STD_syntax_highlight] ETOOMUCHTIME now writes errors to the 18:58
r22787 | azawawi++ | [STD_syntax_highlight] simple and full html instead of doing nothing.
TimToady the *default* BUILD is a method so other classes can inherit it if they don't with to define their own, but that is because the default BUILD is written generically. the assumption is that any BUILD defined by a subclass will have specific knowledge about that class, and therefore should be a submethod
on the subject of registering things in the grammar, you can't modify the grammar by registration, only by derivation, or you essentially have monkey-typed languages in a lexical scope, which p6 prohibits 18:59
actions for existing grammatical rules are fine, of course
ruoso TimToady, but default BUILD you mean the one defined in Object 19:06
s/but/by/
TimToady, that applies for adding multi-token variants? 19:07
oh forget it... just finished parsing what you've said correctly...
I should derive the grammar to define the new multi-token variant... 19:08
19:08 pmurias joined
ruoso TimToady, but about BUILD, have you seen the code in src-s1p? 19:09
azawawi wonders if there are any tips or tricks for speeding up STD.pm ;-) 19:10
pmurias ruoso: re add_attribute i think it adds the accessor as one of the things metaclasses are used is changing the accessor to some inferior scheme like set_foo/get_foo
TimToady azawawi: mostly just compile to an engine that actually supports p6 regexes better than p5 does :) 19:11
that being said, there's still lots of room for optimizing STD on p5
but no easy tricks, or I'd have done them by now 19:12
azawawi TimToady: STD_syntax_highlight, 375 tests ~ 3 hours
pmurias how much of it is parsing? 19:13
azawawi TimToady: mostly in rx.t which im starting to hate ;-)
TimToady I parse the entire t/ in less than an hour
pmichaud std: my %h; %h{"key"} = "value"; say %h\{"key"};
p6eval std 22787: OUTPUT[parse failureā¤]
TimToady how long does a normal 'make testt' take on your machine?
azawawi pmurias: i think we have a recursive loop in match traversal in rx.t
TimToady: im using feather1
TimToady I don't know how that compares to my laptop 19:14
19:14 zamolxes left
PerlJam Juerd should get another grant to upgrade the hardware and setup a small cluster :) 19:15
pmurias azawawi: i doubt it, a recusive loop wouldn't finish at all
azawawi pmurias: somehow things are pretty slow in rx.t and memory is like 450m max
pmurias azawawi: you could try a profiler 19:16
pasteling "azawawi" at 212.38.146.187 pasted "Timing STD_syntax_light" (375 lines, 26K) at sial.org/pbot/32904
azawawi pmurias: from these results, you can clearly see we have a problem in rx.t 19:17
pmurias: i have not tried profiling perl code before; any resources? 19:18
pmurias Devel::NYTProf? 19:19
azawawi pmurias: cant find it on feather1 19:20
pmurias azawawi: it's on cpan
azawawi pmurias: i know; is it better than Devel::DProf ? 19:21
TimToady if STD has to rebuild the cache for rx.t, it takes 450m and 1m26s 19:22
if the cache exists already, it's only 178mb and 45s
ruoso TimToady, class A { }; class B is A { submethod BUILD {...} }; class C is B { }.... I suppose A inherits BUILD from Object, B uses its own, and C inherits from Object as well...
but it goes calling BUILD from less-derived to most-derived
which means that it will end up calling the same BUILD defined in object several times 19:23
TimToady yes, which is why that one must be written *generically*
pmurias azawawi: i'm not very experienced with profilers, the only time i tried Devel::DProf it didn't work
s/not very experienced/very inexperienced/ 19:24
NYTProf is line based
TimToady but you'd better have a large disk drive if you're going to use NYTProf on rx.t :)
ruoso TimToady, but if it's generic, why does it need to be a method... I mean... why does it need to be called several times? 19:25
it could just be called as a submethod in Object
that would do the initialization for all the attributes
TimToady it's generic insofar as it knows which class it is being called on behalf of, and pretends to be a submethod for that class
ruoso hmmm... ok 19:26
TimToady but things still have to happen in the right order
azawawi TimToady: btw, im getting <noun>s from pod comments [STD.pm], is that right?
TimToady so that any user's BUILD submethod can depend on the more basic parts of the object to be there already
ruoso TimToady, right... but how does Object.BUILD knows in which context it's being called? 19:27
TimToady I don't know how you'd get a noun from a pod comment offhand
ruoso TimToady, the whitespaces are part of the token inside noun
TimToady, then it's expanding the token to the last whitespace
as pod is whitespace, it gets inside the noun 19:28
TimToady I think :keepall is the wrong approach, probably
pmurias TimToady: why? 19:29
ruoso maybe it's possible to remove the trailing whitespace from the token and leave it to be catch outside it
TimToady because it attaches the ws to the noun, for instance :)
pmurias ruoso: when you leave messages and you use @tell pmurias, .... the messages goes to pmurias, ;) 19:30
TimToady I think the generically correct solution is to invert the information on the _ array by position so we can return a linear list of tokens and interstices
we already have the _ array to keep track of information by position
ruoso pmurias, I'm aware of that... are you referring to something in particular?
TimToady that's how we map positions to line numbers
we also cache ws knowledge in the _ array 19:31
and }\n info
pmichaud off-topic: is there a way to test an object for definedness without marking the corresponding exception as handled?
pmurias ruoso: the message you left me today
TimToady caching the inverted which-rules-matched-here info would be trivial
pmichaud in particular, I'm thinking of my Int $x = foo(); # foo returns some sort of Failure object 19:32
azawawi profiling S03-operators/assign.t on feather1 19:34
TimToady I suppose it could be argued that $x ends up with an undefined Int+Failure object
ruoso ETOOMANYTHREADS
pmichaud yes, but in testing the Failure returned from foo() for definedness, aren't we also marking the exception as handled? 19:35
ruoso pmurias, I still didn't get your point... what's wrong with the message?
TimToady if the failure is copied into the Intish location, then that could be marked as unhandled, I suppose 19:36
pmichaud that sounds funny. 19:37
(odd, not ha-ha)
TimToady well, is the electron you sent from A the same electron you noticed at B, or is it a clone? :) 19:38
the fundamental question seems to be whether $x can store a failure if it's declared Int 19:39
pmichaud S02 already says yes.
S02: Variables with non-native types can always contain undefined values, such as Object, Whatever and Failure objects. See S04 for more about failures (i.e. unthrown exceptions):
TimToady (we can always fix up a "handled" after the fact, or install a .peekdefined method)
pmichaud my Int $x = undef; # works
TimToady so there's Int protoobject, and Int with Failure mixed in 19:40
I guess
pmurias ruoso: lambdabot marked is as going to "pmurias," instead of "pmurias"
pmichaud the thing about fixing up a handled "after the fact" is that we really don't know to test for handled until after we've seen that the object is undefined
same for cloning
TimToady so is there a mechanism whereby the mixin can make sure $x is "unhandled"?
ruoso pmurias, oh... that... how stupid..
so there might be a lot of messages for this 'pmurias,' guy 19:41
pmichaud unless assignment of a Failure always marks it as unhandled, which also sounds odd.
19:41 pmurias is now known as pmurias_, pmurias_ is now known as pmurias
pmichaud anyway, I don't need an immediate answer and didn't really mean to hijack the other conversation. Just something to think about. 19:42
(I was primarily asking in case there was an immediate answer I hadn't seen/considered.)
TimToady I'm saying the original Failure from foo() may be marked handled, but the failureness copied into $x's Int may instill unhandleness there. I don't think we're just binding foo's failure directly to $x
It's possible there's exact answer to "what does handled mean?", much as tainting is just a rule-of-thumbish thing 19:44
s/there's/there's no/
pmichaud fair enough. For now, assigning a Failure marks it as unhandled, then?
TimToady I think so
pmichaud okay, thanks.
ruoso TimToady, ok... back to BUILD... 19:45
how does Object.BUILD knows which is the subclass it's intializing? 19:46
TimToady BUILDALL is essentially a dispatcher, so it uses the same mechanism as the dispatcher does (whatever that is :)
ruoso right... that's the BUILDALL aprt 19:47
*part
BUILDALL traverses the hierarchy, calling BUILD on each, from less-derived to most-derived
TimToady so it could just be a CALLER:: variable, for instance
but any dispatcher knows the actual class on whose behalf the method is being called currently 19:48
even if the invocant is a different type
ruoso hmm... ok...
TimToady so every dispather must make that info available somehow
*tch
most methods don't care about it, but if we say that every such dispatcher must keep the current class in a contextual var, the user method can get at it 19:49
ruoso so maybe it's saner for the MetaClass to define an automatic BUILD submethod if none is defined
TimToady could even call it $+CLASS (or $*CLASS maybe) 19:50
as distinguised from $?CLASS, which is compile-time constant
which is also distinguished from self.WHAT 19:51
a given object can have 3 different types at the same time :)
ruoso while I see your point... I'm pondering if defining a BUILD if there isn't one wouldn't be a better option 19:52
but maybe that's too complicated...
TimToady certainly one way to implement a generic is with an autoloader :)
ruoso let me see how the code using $+CLASS looks like... 19:53
TimToady essentially, that's just the loop variable in your dispatcher
ruoso sure... but how does it look like in Object.BUILD
TimToady sure, that's the user end of things, and I'm glad to delegate that part to you :P 19:54
ruoso heh... I could argue defining Object is not really user-end ;)
TimToady I delegate the meta end of things too :) 19:55
ruoso heh
TimToady I really only care about the middle end
ruoso Ok... if I understand correctly, Object.BUILD should loop on all of $+CLASS attributes, and initialize them as they exist in the *%initialize... 19:57
azawawi assign.t tmon.out ~ 676m so far and growing...
ruoso hmm... the MOP needs a method to list the attributes without including the inherited ones... any suggestion for the name of such method? 19:59
TimToady I though S12 mentioned an option for that 20:00
ruoso hmm... cool..
ruoso re-re-re-re-reading S12
TimToady S12:1983 mentions a selector parameter but doesn't name it 20:01
azawawi TimToady: about 8gb needed for to DProf rx.t ... Not bad.
ruoso TimToady, any idea on how this selector should look like? 20:02
TimToady offhand, no
probably needs to be specced.
and the current mention is in respect to the .methods method 20:03
ruoso which naturally could be extended to .attributes
TimToady maybe :where() or some such
ruoso :where<local>
TimToady :where{.depth == 0} :) 20:04
depends on what the thing gets smartmatched against eventually, I suppose 20:05
ruoso I was considering ~~ 'local'
and I wasn't really keeping track of traverse depth...
TimToady I doubt that's what an attribute descriptor would stringify to
ruoso ah... the attribute descriptor... I was thinking about matching the :$where parameter to 20:06
TimToady anyway, there's probably a Right Way, and a Wrong Way, and a Perl WAy
could also be a .attributes where Mumble 20:07
that is, basically a grep outside the .attributes call
but that's probably suboptimal 20:08
since the internals probably keep the lists separate
ruoso I'm not sure the attribute descriptor knows where it is...
20:08 spx2 left
ruoso I think it's the class that lists the attribute descriptors 20:08
TimToady indeed
so basically, just a parameter to tell the class what you want back, somehow or other 20:09
ruoso so, is :where<local> reasonable?
TimToady that has little benefit over :local
I'm leary of string options
ruoso indeed...
azawawi is feather1 on? 20:10
ruoso TimToady, so... :$local it is
TimToady unless that's the default
and :transitive is the option
or :super, or whatever 20:11
ruoso I tend to think that the Class should appear as opaque
to the user
most of the time
TimToady nodnod
ruoso so getting a partial information of the class should not be the default, I think
TimToady agrees
azawawi i cant seem to access feather1
TimToady I am not getting any DNS service for it, even 20:14
20:14 spx2 joined
TimToady maybe .nl got hit by an asteroid 20:14
ruoso TimToady, is calling ^methods(:local) sufficient to get a true value or does it need to be ^methods(:local(1))
20:15 xinming_ left, xinming joined
TimToady :local is Bool::True 20:15
:!local is Bool::False
ruoso ok... that's cool
TimToady or maybe just 1 and 0
but probably typed to Bool 20:16
ruoso true in bool context
:P
azawawi @tell juerd_ feather1..3 are offline. (8:16pm gmt)
lambdabot Consider it noted.
TimToady question is whether it should bind to a Bool context
ruoso TimToady, one thing I've just figured out... 20:19
I'm initializing the attributes using the accessor...
if they are public and rw
azawawi has nothing to do now &
ruoso that means if an attribute accessor is overriden, it might call an accessor of a subclass before the BUILD in that subclass is called 20:20
that is probably ok, since that's what overriding is...
20:20 azawawi left
ruoso but it should probably be noticed in the spec... 20:20
TimToady in general BUILD should only be setting $!foo, not $.foo 20:21
ruoso but should it still do that only for public and rw attributes? 20:22
and does that mean everybody trusts Object?
TimToady if you're going to delegate infrastructure to a parent class, you have to trust it 20:23
20:23 Juerd_ left, ab5tract joined
ruoso right... so that's a yes... 20:23
20:23 wolverian left
ruoso :P 20:23
20:23 dalek left
ruoso but does it initialize only public and rw attributes? 20:24
er... initialize is a bad word...
20:24 pmichaud left
ruoso set the value sent in the constructor or using protoobjects describes better 20:24
20:24 PerlJam left
ruoso TimToady, and also... which is the syntax for accessing a private attribute by its string name in a class by its string name... $object.::($+CLASS)!"$name" ? 20:26
TimToady that looks about right. 20:27
BUILD can initialize private attributes as well
20:27 bacek_ joined
TimToady that is its usual mode of operation, in fact. 20:27
it doesn't care whether there's an accessor, it just sets $!foo if you pass :foo($bar) 20:28
ruoso even if it's private....
I know you seem to have just said that...
TimToady even if it's public, it sets $!
20:28 ZuLuuuuuu left
ruoso my question is if it makes sense to allow private attributes to be set in the constructor 20:29
TimToady I think it does
ruoso right... as it's a purely-design issue... I'll just take your word ;P
TimToady private attributes are the only ones that are really there
ruoso yeah... I know... there are no such thing as "public attributes" 20:30
TimToady with $.foo there's no guarantee that you own $!foo
so you shouldn't be setting up someone else's attributes virtually
ruoso $object.::($+CLASS)!"$key" = %initialize{$key}; 20:31
now *that*'s a weird line
TimToady submethods are for setting up your part of the object, and not someone else's
ruoso I just wish I could commit... 20:33
TimToady, btw... I'm using $meth.yada to check if this is a {...} method
20:34 xuser left
ruoso having a way to find that out is required when composing roles that degenerate to interfaces 20:34
TimToady hmm, .yada needs to be true for token { <...> } as well 20:35
ruoso ok... considering I was asking if ".yada" was a good idea ;)
TimToady we should probably recognize these at compile time, really 20:36
ruoso agreed...
TimToady if only under the policy of "if it can be determined at compile time that a piece of code will fail at run time..." 20:37
pmurias ruoso: why can't you commit?
ruoso can't connect to svn 20:38
TimToady feather was hit by an asteroid
ruoso TimToady, I think S12 implies compile-time also...
when it says the role degenerate to an interface
TimToady, it looks like STD doesn't parse $object.::($+CLASS)!"$key" as expected 20:40
pmurias ruoso: re making smop a perl5 library how does it relate to embedding perl5 in smop
?
ruoso pmurias, it will probably make things easier in the future, but it's not entirely related
TimToady ruoso: I will look at it after lunch & 20:41
pmurias ruoso: the 2 things overlap don't they?
like having a SV RI? 20:42
ruoso yes... that is the part of making it easier in the future
but I don't think we're going to be able to callback p5 code so easily
but if we do, there's no point in embedding p5 in smop 20:43
at least in the near future
pmurias calling p5 from smop is very important
ruoso yes... that's the "future" part ;) 20:44
20:44 pedrob_ joined
ruoso in fact... if we can callback p5 from smop, it doesn't really matter who started first, p5 or smop... 20:45
the two interpreters would simply interoperate...
but my plan for p5<->smop integration is a bit more brave
I think I plan to make p5 really stackless, and eventually having a modified p5 interpreter inside smop that puts an initial pointer in the begging of SV* 20:46
being the SV RI
and allowing continuations in p5 and in SMOP
20:47 xuser joined
ruoso and then you wouldn't even know when you were running in the p5 interpreter or in the smop interpreter 20:48
20:51 ZuLuuuuuu joined
pmurias that's propably the optimal solution for p5 interop 20:51
20:51 schmalbe left, pedrob_ left
pmurias but having smop as a CPAN module which can be used to run a given fragment of code also has some benefits 20:52
even if we would have lots of contiunation barriers
ruoso pmurias, sure sure... one of them being glue together STD5 + viv + mildew + SMOP to run p6 code 20:53
and eventually being a Moose backend
which is something that is in my mind for a while now...
but if everything goes right, we'll be able to run p6 code from inside p5 20:54
using SMOP as runtime...
20:54 xuser left
ruoso later & 20:55
20:55 ruoso left
spx2 is there a good description of how infix->postfix should be done on parenthesisized arithmetic expressions ? if so,where should I read this ? 20:57
20:57 jhorwitz left 20:59 xinming_ joined
pmurias spx2: parenthesisized means you don't have to do OPP? 20:59
20:59 pedrob_ joined, xinming left
spx2 OPP= ? 21:00
also,I will stress that they are not fully parenthesisez expressions 21:01
I mean there can be some like 3+4*5-6*(2+3)
pmurias spx2: like in en.wikipedia.org/wiki/Operator-precedence_parser 21:03
lambdabot Title: Operator-precedence parser - Wikipedia, the free encyclopedia
pmurias homework of any sort ;) 21:04
?
spx2 pugs_svn: no,I'm working on improving my programming skills so that I will get a job not working on stupid problems 21:05
ok
scriptasylum.com/tutorials/infix_po.../index.htm
lambdabot Title: Infix to Postfix Conversion, tinyurl.com/3ygxjo
spx2 I've tried to follow this
which btw,is a simpler than the link you gave...and the author seems to have worked up a working implementation 21:06
pmurias: have you implemented something like this ?
pmurias yes
using the wikipedia link
spx2 hmm nice :)
maybe I'll look into it more
21:08 ZuLuuuuuu left 21:09 pedrob__ joined 21:10 pedrob left 21:12 ab5tract left 21:19 TJCRI left 21:23 xuser joined 21:26 zamolxes joined 21:28 pedrob_ left, pmurias left 21:29 Muixirt joined 21:32 pedrob joined, pedrob__ left 21:51 Lorn left 21:53 pedrob left
moritz_ can anybody access feather right now? 21:56
22:01 bacek_ left
Muixirt hi moritz_ 22:01
moritz_ hi Muixirt
Muixirt spectest_regession is still not working for S16-io/basic-open on my x86_64 Linux box 22:04
moritz_ Muixirt: did you open a ticket for that?
Muixirt no
moritz_ Muixirt: please do. [email@hidden.address] 22:05
Muixirt I'm wondering if someone else sees that. x86_64 Linux is quite common nowadays
22:07 hercynium left, pedrob joined 22:10 pedrob_ joined 22:14 pedrob__ joined
Muixirt moritz_, btw the output of make spectest_regression is littered with "Use of uninitialized value" 22:15
moritz_ I know :(
22:16 elmex left
Muixirt the perl5 spits that out, right? 22:16
moritz_ no
rakudo itself
rakudo: say 2 + undef;
p6eval rakudo 31963: OUTPUT[Use of uninitialized valueā¤2ā¤]
Muixirt oops
moritz_ problem is, we don't have a way to disable the warnings 22:17
somewhere in the tests we test for the value of 2+undef, and we'd like to disable the warnings
22:17 fridim_ left
moritz_ rakudo: say try { 2 + undef}; 22:18
p6eval rakudo 31963: OUTPUT[Use of uninitialized valueā¤2ā¤]
22:21 pedrob___ joined 22:29 dalek joined, pedro____ joined 22:30 wolverian joined 22:32 pedrob left 22:34 Juerd joined, PerlJam joined 22:37 pmichaud joined, pedrob_ left
pugs_svn r22788 | moritz++ | [t/spec] some unfudging for rakudo 22:40
22:41 pedrob__ left 22:42 masak joined, pbuetow left
chrisdolan @find chris 22:46
lambdabot Not in scope: type variable `chris'
chrisdolan oops
masak @seen chris 22:47
lambdabot I haven't seen chris.
masak where in the world is chris? ;)
wayland76 Probably hanging out with Carmen Sandiego :) 22:50
masak as good a guess as any :)
22:54 eternaleye joined, pedrob___ left 22:55 pedro____ is now known as pedrob 22:59 [particle]1 joined 23:05 adc_Penner left 23:06 [particle] left
pugs_svn r22789 | ruoso++ | [smop-s1p] Object.BUILD is no longer a submethod, but a method that is aware of which class it is representing... 23:07
23:07 ruoso joined 23:09 chrisdolan left 23:22 eternaleye left 23:24 sri_kraih_ joined 23:25 eternaleye joined 23:26 araujo joined 23:27 zamolxes left 23:30 Exodist left 23:32 felipe joined 23:33 sri_kraih left
ruoso anyone interested... any review on v6/smop/src-s1p/Object.pm and ClassHOW.pm is very much appreciated... 23:40
23:43 eternaleye left
masak ruoso: pleasant reading 23:47
Object.pm, line 121:
couldn't one make that line a default value of the $repr parameter in the args list instead? 23:48
ruoso: overall, it's refreshing to reach this kind of full-fledged Perl 6 code. we don't do stuff of this calibre yet in November. :) 23:51
ruoso masak, :P... 23:52
unfortunally this code doesn't yet compile...
23:52 Ontolog left
ruoso but it is going to be compiled by mildew 23:52
masak ruoso: I look forward to that.
ruoso and it's going to be the actual code behind SMOP MOP
masak sounds cool. 23:53
pugs_svn r22790 | ruoso++ | [smop-s1p] make p6opaque default in the signature instead of doing inside the block, as pointed by masak++ 23:54
23:58 iblechbot left
masak ruoso: ClassHOW.pm, line 39: what are the parentheses doing? 23:59
23:59 Limbic_Region joined