pugscode.org/ | nopaste: sial.org/pbot/perl6 | pugs: [~] <m oo se> (or rakudo:, kp6:, smop: etc.) || We do Haskell, too | > reverse . show $ foldl1 (*) [1..4] | irclog: irc.pugscode.org/ Set by TimToady on 25 January 2008. |
|||
00:00
dalek joined,
pugs_svnbot joined
00:02
Juerd joined
00:04
chris2 left,
pugs_svnbot left,
dalek left,
Juerd left
00:05
dalek joined,
IllvilJa left,
pugs_svnbot joined
00:06
Juerd joined
|
|||
Juerd | One more reboot to come | 00:06 | |
00:14
jjore-w left
00:17
eternaleye joined
00:22
Daveman joined
00:27
eternaleye_ joined
00:35
justatheory_ joined
|
|||
Juerd | printk: 1211297 messages suppressed. | 00:36 | |
Per few seconds :) | 00:37 | ||
meppl | good night | ||
Juerd | Good night | ||
meppl | ;) | ||
00:38
justatheory__ joined
00:40
eternaleye left
00:44
wknight-away is now known as wknight8111
00:49
meppl left,
justatheory left
|
|||
TimToady | avar: I've got some tweaks to re::engine::TRE that make it more useful for a longest-token lexer | 00:52 | |
avar | Excellent, want comaint or should I go through the upload moves?:) | 00:54 | |
TimToady | lemme just paste the patch for you to see | 00:55 | |
00:56
njbartlett left,
justatheory_ left
|
|||
avar | TRE has a lot of neat stuff I meant to use, like the $file_handle =~ $regex stuff | 00:56 | |
TimToady | heh, I can't get at pbot from work :( hang on | 00:57 | |
wall.org/~larry/tre.patch | 00:58 | ||
does two things | |||
one, when you use /gc it makes fields undef properly instead of pointing to current pos - 1 | 00:59 | ||
avar | Yes I see, this is a screwup I fixed in ::PCRE but didn't port to ::TRE | ||
TimToady | (I was starting to search at position 4 and it reports 3) | ||
the other is setting lastparen usefully | |||
to be the number of the last right paren we matched | 01:00 | ||
which means I can use the length of @- to find that number without scanning again | |||
which means all my alternatives in the lexer can each end with (foo) and I can tell which leaf of the search tree it ended on | 01:01 | ||
which maps directly to a "fate" navigation down the recursive matcher | |||
so the recursive descent engine doesn't have to rescan the token | 01:02 | ||
it just knows it has to drop down into <expect_token>/<noun>/<variable> or whatever and continue parsing | |||
anyway, I have a version called TREx that I'm fiddling with, so no rush | 01:03 | ||
avar | I actually do rx->nparens = rx->lastparen = rx->lastcloseparen = nparens; at /compile time/ in PCRE. But this semantic sounds nicer | 01:04 | |
TimToady | I just have to be careful because I think TRE won't report a match on a final () null match, so I have to be sure and (...) where ... is the final bit of the token | 01:05 | |
01:05
Lunchy joined
|
|||
TimToady | actually, I wish I could just directly access the tre tags, and install a 'you are here' tag at the end of each token | 01:06 | |
but this is good enough, and scanning the matches in C is a lot faster than doing it in Perl | |||
but expect_term's lexer can have 150 different tokens or more | 01:07 | ||
and I need to know *which* one matched | |||
I almost don't care what the matched string is... | |||
unless it was an identifier or something | 01:08 | ||
in any case, it's the eventual reduction that cares mostly | |||
but given that token 42 matched, I can know what that $33 gets bound to $<foo>, for instance | 01:09 | ||
01:10
zamolxes joined
|
|||
TimToady | but this means I can implement the longest-token matcher in Perl 5 now, yay | 01:11 | |
avar++ | |||
01:13
Lunchy left
01:15
Zygo joined
|
|||
TimToady | and since p5 can be called from pugs, I can use tre there, too, if I like | 01:16 | |
01:17
wknight8111 is now known as wknight-away
|
|||
avar | </releng> | 01:19 | |
pause.perl.org/incoming/re-engine-T....02.tar.gz | 01:20 | ||
TimToady | avar += 42 | ||
avar | I'll try to parse the rest of your comments when it's not almost 2am:) | 01:21 | |
01:29:08 * CPAN2 upload: re-engine-TRE-0.02 by AVAR | 01:30 | ||
whee:) | |||
01:31
Lunchy joined
|
|||
TimToady | thanks! | 01:32 | |
01:34
sunnavy left,
sunnavy joined
01:40
devogon left
|
|||
diakopter | buchetc: for posterity, the S17 link you gave above is out of date; svn.pugscode.org/pugs/docs/Perl6/Sp...rrency.pod is the current link | 01:44 | |
01:45
eternaleye__ joined,
eternaleye_ left
01:46
eternaleye__ is now known as eternaleye
|
|||
TimToady | decommuting & | 01:46 | |
01:47
Lorn_ left
01:48
Jedai joined
01:52
stevan_ left
01:53
stevan_ joined
02:13
zakame joined
02:20
drbean joined
02:30
Andy_ joined
02:39
mncharity joined
02:40
japhb joined
02:45
fridim_ left
03:11
jjore joined
03:13
Jedai left
03:26
eternaleye_ joined
|
|||
mncharity | given token foo:a { 'a' } and rule foo:b { 'b' } how does %foo know that it has to do <.ws> before key on one, but not the other? or...? | 03:31 | |
03:35
eternaleye left
03:39
Limbic_Region left
03:40
justatheory__ left
|
|||
mncharity | feather seems to be down. do we have a name yet for the {regex,rule,token} concept yet? ie, calling a 'regex foo //' a rule, or calling a 'rule foo //' a regex, are both confusing (though both true in different senses). ah, well. "thingies". | 03:42 | |
pugs_svnbot | r19891 | putter++ | [misc/red_STD] more grammar "thingies". start of a first top-down pass, doing rough transliterations and issue discovery (and getting a feel for task size). new productions are mostly "quick and sloppy" and untested, some unimplemented, and all generally lacking Match creation. That's a second pass. | 03:45 | |
diff: dev.pugscode.org/changeset/19891 | |||
lambdabot | Title: Changeset 19891 - Pugs - Trac | ||
pugs_svn | r19891 | putter++ | [misc/red_STD] more grammar "thingies". start of a first top-down pass, doing rough transliterations and issue discovery (and getting a feel for task size). new productions are mostly "quick and sloppy" and untested, some unimplemented, and all generally lacking Match | ||
..creation. That's a second pass. | |||
Auzon | Wow. Bots and bots and bots! | 03:46 | |
mncharity | though this time an interesting difference in bot output | ||
Auzon | Why do we have two pugs_svn(bots)? | 03:47 | |
TimToady | mncharity: we've been calling them all "rules" for now | 03:48 | |
as for the "key", that's looked up explicitly with <sym> | |||
and the rule would not, in fact, have a longest token, since it starts with ws | 03:49 | ||
or rather, its longest token is '' | |||
mncharity | btw, I'm not opposed to there being some unit tests... they would be nifty to have for regression testing. Volunteers encouraged. :) It's just that working code isn't a necessary objective for this first long slog through STD.pm, because I suspect most issues can be discovered without that last costly step. But they would be great to have. | ||
TimToady | it's good that you're feeding back changes into STD | ||
now that I know how to use TRE for a longest token matcher, I'm of two minds whether to continue in pugs calling into p5, or just write STD in p5 like you're doing in ruby | 03:50 | ||
03:51
jjore left
|
|||
mncharity | re key, head scratch, so for say %statement_control, there are a bunch of rules, all with sym, and all with the same key ""? if the value of an interpolated hash is an array, it tries all the elements? | 03:56 | |
feather is back | |||
re good feeding back, :) | 03:57 | ||
re two minds, the advantages of pugs calling into p5 are...? | 03:58 | ||
TimToady | there is no hash anymore | 03:59 | |
pugs knows perl 6, so I don't have to rewrite the closures :) | |||
mncharity | re "there is no hash anymore", sigh. another virtual memo missed. | 04:00 | |
TimToady | I don't think S05 even talks about hashes these days | ||
everything like that is done with multiple dispatch now | 04:01 | ||
mncharity | feather.perl6.nl/syn/S05.html#Varia...erpolation | ||
lambdabot | Title: S05 | ||
TimToady | well, I guess it does, but we don't use it in STD | ||
in any case, it's something that doesn't really have to be in 6.0.0 | 04:02 | ||
basically all the infix:<*> rules are considered | alternatives when you call the abstract <infix> rule | 04:03 | ||
cheat already rewrites all those to an explicit infix rule with | | 04:04 | ||
04:04
dduncan joined
|
|||
mncharity | so the multiple dispatch story is... value types like /\G<.ws> <sym>/ ? | 04:04 | |
TimToady | the cheat rewrite is still assuming that | does longest token selection | 04:05 | |
mncharity | right | 04:06 | |
TimToady | but for a first approximation they'll work as ordered alternatives in cheat's output | ||
mncharity | another story possibility might be parallel dispatch to all foo methods? | ||
TimToady | if you run cheat on STD.pm you'll see all the autogenerated <infix> et al. rules | 04:07 | |
at the end | |||
yes, if you can capture control before any of the methods does something with side effects | |||
mncharity | ok. so it sounds like I should feel free to implement categories ad hoc, rather than aiming for something hashy. | ||
TimToady | and keep them in lockstep to you can find out the longest token | 04:08 | |
but it's likely to be high overhead compared to running DFA first | |||
just do it like cheat does | |||
mncharity | I guess I'm still unclear on the "categories are mmd" story. | ||
but ad hoc == easier, so no worries | 04:09 | ||
TimToady | well, I need to wander off again, so later & | 04:10 | |
mncharity | np. thanks. | ||
04:36
lyokato joined
04:44
thoughtpolice left
|
|||
Juerd | mncharity: feather was down, but not when you said it seemed to be :) | 04:58 | |
mncharity: 'cause I couldn't have seen you say that if it'd been down :) | |||
04:59
avar joined
05:02
Schwern left
05:10
wknight-away left
05:35
justatheory joined
05:37
Andy_ left
05:42
monomorph joined
05:51
japhb left,
japhb joined
05:52
justatheory left
06:05
pbuetow joined
06:30
pbuetow left
06:33
silug left
06:39
devogon joined
06:42
drbean left
06:46
Psyche^ joined
07:03
Patterner left,
Psyche^ is now known as Patterner
07:11
cxreg joined
|
|||
mncharity | Juerd: :) & | 07:14 | |
07:14
mncharity left
07:35
psapo left,
psapo joined
07:36
iblechbot joined
07:49
masak joined
08:06
monomorph left
08:11
BinGOs_ joined,
BinGOs_ is now known as BinGOs
08:26
wolverian joined
08:29
pravus joined
08:31
silug joined
08:43
dduncan left
08:47
zamolxes left
09:09
zakame left
09:11
hareldvd joined
09:13
jrockway joined
09:34
sri_work joined
09:36
lay1 joined,
lyokato left
09:37
lay1 is now known as la1,
la1 is now known as lay1
09:41
lay1 left
09:42
kst left
09:43
laye joined
10:02
ebassi joined
10:23
chris2 joined
10:24
ruz joined
10:38
andara joined
10:46
masak left
|
|||
ruoso | pugs: class A { method b --> Bool { False } }; say A.b() | 10:52 | |
exp_evalbot | OUTPUT[***  Unexpected "-->" expecting "handles", "is", bare trait, subroutine parameters, trait or block at /tmp/miyJV4PSTj line 1, column 20] | ||
ruoso | pugs: class A { method b() --> Bool { False } }; say A.b() | ||
exp_evalbot | OUTPUT[***  Unexpected "-->" expecting bare trait, trait or block at /tmp/PegXz4iUnW line 1, column 22] | ||
ruoso | pugs: class A { method b(a --> Bool) { a } }; say A.b() | 10:53 | |
exp_evalbot | OUTPUT[***  Unexpected "a" expecting "|", ":", "*", parameter name or ")" at /tmp/6PPfnSVlAy line 1, column 20] | ||
ruoso | pugs: class A { method b($a --> Bool) { $a } }; say A.b() | ||
exp_evalbot | OUTPUT[*** No such method in class A: "&b" at /tmp/sded0Ktf7I line 1, column 47 - line 2, column 1] | ||
ruoso | pugs: class A { method b($a --> Bool) { $a } }; say A.b(True) | ||
exp_evalbot | OUTPUT[1] | ||
ruoso | so... --> is only valid to type the attriute, not the method return type... | ||
11:03
hareldvd left
11:10
zamolxes joined
11:16
andara left
11:33
pbuetow joined
|
|||
ruoso | TimToady, I've been updating the SMOP OO API after our conversation yesterday... could you please take a look at it? | 11:38 | |
11:38
Jedai joined
11:43
pbuetow left
11:56
iblechbot left
12:12
masak joined
12:15
pbuetow joined
12:22
Lorn__ left
|
|||
moritz_ | it seems we have two svnbots again, I'll withdraw mine | 12:25 | |
12:25
drbean joined
12:28
chris2 left
12:31
ebassi is now known as ebassi|lunch,
ebassi|lunch left,
ebassi joined
12:32
cognominal_ joined
12:36
kanru left
12:42
iblechbot joined
12:48
wknight-away joined
12:55
masak left
12:57
kanru joined
12:59
dalecooper joined
13:07
cmarcelo joined
13:12
pbuetow left
13:13
stevan_ left,
stevan_ joined
13:14
devogon left
13:15
devogon joined
13:17
monomorph joined,
wknight-away left
13:19
masak joined
13:27
IllvilJa joined
13:50
laye left
13:54
penk joined
13:55
drbean left
14:03
Andy_ joined
14:10
fridim_ joined
14:11
wknight-away joined
14:18
Andy_ left
14:32
Lorn joined
14:38
eternaleye_ left
|
|||
cognominal_ | is there a syntax to express two consecutive elements in a list, now that the => separator means a pair, say for passing parameters to a perl5 routine | 14:47 | |
[particle] | comma? | ||
14:47
Auzon left
|
|||
allbery_b | p5=> ? | 14:47 | |
(g*d knows how you'll get pugs to parse that one properly...) | 14:48 | ||
[particle] | p5=> is meant only to be used by translators, never by humans | ||
it's ugly for a reason | |||
allbery_b | meant to, yes, but I can see the p5-sub case too | ||
cognominal_ | ok | 14:49 | |
14:54
jhorwitz joined,
pmurias joined
|
|||
pmurias | allbery_b: you can always use a normal ',' | 14:54 | |
14:57
rdice joined
|
|||
allbery_b | sure, but (virtual) pairs have semantic (or, hm. connotative? since it's not semantic to p6) value | 14:57 | |
15:01
Zygo left,
ZYgo joined
15:02
ZYgo is now known as Zygo
|
|||
cj | morning folks | 15:10 | |
15:12
penk left
15:13
penk joined,
krumms joined
|
|||
masak | cj: good afternoon | 15:14 | |
krumms | is it okay to ask parrot-related questions here? | ||
[particle] | if it's about perl 6 and parrot, it's okay | 15:15 | |
otherwise it's better to head over to irc.perl.org#parrot | |||
krumms | ah, cheers | ||
15:31
gbacon joined
15:32
pbuetow joined,
pbuetow left
15:34
pbuetow joined
15:36
gbacon left
15:38
meltingwax joined
15:39
gbacon joined
15:49
gbacon left
15:50
gbacon joined
|
|||
alester | perlbuzz.com/2008/02/tell-us-how-to...-andi.html | 15:57 | |
lambdabot | Title: Tell us how to do it, Andi! - Perl Buzz | ||
15:59
thepler left
16:03
masak left
|
|||
pugs_svnbot | r19892 | ruoso++ | [smop] src-s1p/Object.pm -- Updated to reflect the new REPR API. | 16:13 | |
r19892 | ruoso++ | Using P6 POD now. | |||
diff: dev.pugscode.org/changeset/19892 | |||
lambdabot | Title: Changeset 19892 - Pugs - Trac | ||
16:17
Jedai left
16:21
krumms left
|
|||
ruoso | pugs: say Submethod.isa(Sub) | 16:21 | |
exp_evalbot | OUTPUT[1] | ||
16:22
krumms joined
|
|||
ruoso | pugs: say Hash.isa(Scalar) | 16:22 | |
exp_evalbot | OUTPUT[] | ||
ruoso | pugs: say Hash.isa(Container) | ||
exp_evalbot | OUTPUT[*** No such subroutine: "&Container" at /tmp/PNnlemA93Y line 1, column 14-23] | ||
16:26
dalecooper left
16:27
manfred joined
16:36
meltingwax left
|
|||
TimToady | ruoso> so... --> is only valid to type the attriute, not the method return type... | 16:38 | |
pugs merely parses the --> and ignores it, but it does specify the return type of the method | |||
I don't know what you mean by "type the attribute" since there is no attribute | 16:39 | ||
the type of $a is not influenced by anything after the --> | |||
if you meant parameter | |||
the reason the previous example failed is because you didn't pass a parameter to a 1-ary method | 16:40 | ||
s/parameter/argument | 16:42 | ||
EPRECAFFIENE | |||
ruoso | TimToady, so: our method foo(a) --> List of Method | ||
is valid? | |||
TimToady | --> goes inside the () | ||
ruoso | hmmm | 16:43 | |
I was thinking that --> inside the () was defining the type of the argument | |||
TimToady | s/argument/parameter/ but no | ||
it doesn't | |||
ruoso | our method foo(Int a --> List of Method) | ||
TimToady | that would be a method that returns a list of methods | ||
ruoso | our method foo(Int $a --> List of Method) I mean | 16:44 | |
ok... | |||
16:44
riffraff joined
|
|||
ruoso | so, is "our method foo( --> List of Method)" valid? | 16:44 | |
TimToady | could also be written our List of Method foo (Int $a) but that gets awkward | 16:45 | |
yes, but pugs doesn't parse it right yet | |||
ruoso | ok... | ||
16:45
pmichaud joined
|
|||
ruoso | did you see the last changes in the smop oo api? | 16:45 | |
TimToady | not yet; brewing coffee | 16:46 | |
very thick coffee... | |||
ruoso | heh | ||
16:49
PerlJam joined
|
|||
TimToady | first I was wondering if the bool/Bool distinction buys anything here | 16:51 | |
then I was wondering whether there's a native object to go with Object :) | |||
ruoso | when I access this methods from low-level, I can be sure to be the native one | ||
it makes it easier | |||
TimToady | since a native object can't change its repr | 16:52 | |
ruoso | ye | ||
specially since the native bool type is actually a pair of constants | |||
TimToady | 'course, from a Perl point of view there will be times where it's useful to say class Object is also... | ||
ruoso | I don't think Object needs a native, because the point of Object is exactly being representation-independent | 16:53 | |
16:53
zamolxes left
|
|||
TimToady | was just a thought | 16:54 | |
ruoso | althought as long as the p6opaque responder interface can be identified, it can be treated as native whenever possible | ||
for optimization matters | |||
TimToady | now I'm wondering how easy it will be for someone to accidentally say .BUILDALL on Object and define undef... :/ | 16:57 | |
we might need to prevent that explicitly | |||
ruoso | hmm... in fact.. | 16:58 | |
TimToady | maybe that's a good argument for Object's BUILD method to fail | ||
ruoso | like if (Object === $object) fail | ||
but in fact, that applies to every class | 16:59 | ||
well... maybe we need to define a rule that no instance may have definitions and that no class may be instantianted | 17:00 | ||
s/instantiated/target to BUILDALL/ | |||
which is as simple as, you can only add private storage to objects that have a single isa, no role and no other definition | 17:01 | ||
This way any $prototype.BUILDALL() will fail | |||
allbery_b | class variables? | ||
ruoso | that's class storage | ||
it's treated differently | |||
allbery_b | ok | ||
ruoso | so "(0 but True).new()" will always fail | 17:02 | |
or not | |||
TimToady | I don't see why it should fail offhand | 17:03 | |
ruoso | actually "(0 but True).new()" will always mean that both the objects share the same anon superclass | ||
and never the "defined object as superclass" as I was thinking possible before | |||
TimToady | yes, it's not prototyping in that sense | 17:04 | |
that we'd think of more as delegation | |||
ruoso | ok... in fact I have to admit it was a very exotic feature | 17:05 | |
TimToady | has $.ancestor handles *; | ||
allbery_b | hm. I | ||
'm a little worried about things like "single isa" | |||
17:06
marmic left
|
|||
ruoso | allbery_b, that only means that it is an instance of some prototype | 17:06 | |
but the prototype still can have MI | |||
allbery_b | maybe a .PROTO which is True initially; .new on such a thing rolls an inmstance (which automatically has .PROTO False), .BUILDALL fails if .PROTO | ||
17:06
pmurias left
|
|||
ruoso | allbery_b, take a look at pugs/v6/smop/src-s1p/Object.pm | 17:07 | |
that's what new, bless, CREATE and BUILDALL are supposed to do | |||
17:08
marmic joined
|
|||
TimToady | I'm not sure .WHAT should ever return something defined | 17:09 | |
ruoso | TimToady, that won't be the case anymore | ||
considering this last restriction | |||
you won't be able to have a defined object as a prototype | 17:10 | ||
pugs_svnbot | r19893 | ruoso++ | [smop] "fail if not $object.^!instance;" in Objects BUILDALL | ||
diff: dev.pugscode.org/changeset/19893 | |||
lambdabot | Title: Changeset 19893 - Pugs - Trac | ||
ruoso | TimToady, I've just updated the wiki to reflect that | 17:13 | |
TimToady | typo: Array or Role | ||
17:14
Psyche^ joined
|
|||
ruoso | fixed, thanks | 17:14 | |
TimToady | we're assuming here that an object can only have one package, which is probably reasonable, even though one could alias additional names | 17:16 | |
ruoso | TimToady, that's the class package, not the instance | ||
17:16
riffraff left
|
|||
ruoso | I'm not sure package of a instance makes sense | 17:16 | |
TimToady | well, p5 has that, but that's because the package *is* the class in p5 | 17:17 | |
ruoso | in fact, I was considering it as one of the "definitions" that a defined object is forbidden to have | 17:18 | |
I mean... | 17:19 | ||
$foo.WHO is always $foo.WHAT.WHO | |||
if $foo is defined | |||
TimToady | almost seems like we're trying to discuss policy that should be determined by .HOW | 17:21 | |
.HOW should be deciding how proto/class-based we are | |||
I'm inclined to leave out any arbitrary restrictions that can be decided later | 17:22 | ||
unless it can be shown to impact performance badly | |||
ruoso | well, in fact Object defines the default HOW behaviour | ||
17:23
gbacon left
|
|||
TimToady | I think .HOW is intrinsic to each object | 17:23 | |
ruoso | sure... | ||
17:23
gbacon joined
|
|||
TimToady | you never inherit .HOW from Object | 17:23 | |
except maybe by cloning | |||
ruoso | but the built-in types will have a standard behaviour... that's what I mean | ||
TimToady | *nod* | 17:24 | |
17:24
aindilis joined
|
|||
ruoso | we'll have to decide that at some point | 17:24 | |
17:24
zamolxes joined
|
|||
TimToady | at that level we are certainly class-based, not proto-based | 17:24 | |
ruoso | which seems to be consistent to what we reached now... | 17:25 | |
TimToady | in any case, native types *must* be class-based, for reasons that I hope are obvious | 17:26 | |
ruoso | sure... | 17:27 | |
17:27
Patterner left,
Psyche^ is now known as Patterner
|
|||
ruoso | the int prototype even have a different representation than an int object... | 17:27 | |
TimToady | built-in types that prefer to be class-based might be able to pretend proto-based to some extent | 17:28 | |
we'll have to see how it goes, and what the common failure modes are | |||
there's a delicate balance between letting people do what they want, and letting them do what they don't want... | 17:29 | ||
17:29
luqui joined
|
|||
TimToady | and we can even give them a knob to turn | 17:29 | |
with a setting on one end that says "Let me do whatever I want to Object" | 17:30 | ||
and Num, and Str, etc | |||
ruoso | including making Undef defined? | ||
TimToady | indeed | ||
default is not, probably | 17:31 | ||
17:32
meppl joined
|
|||
TimToady | have to run and save a matron in distress... & | 17:32 | |
pugs_svnbot | r19894 | ruoso++ | [smop] the foo( --> rettype) syntax is prettier than our rettype method foo() | 17:49 | |
diff: dev.pugscode.org/changeset/19894 | |||
lambdabot | Title: Changeset 19894 - Pugs - Trac | ||
ruoso | Object refers both to the package and to the class... does that means that there are two namespace resolutions? | 18:09 | |
18:11
meppel-san joined
18:15
blindfish joined
18:20
pmurias joined
|
|||
pmurias | one declares private methods with 'my method foo {...}' instead of 'my method !foo' ? | 18:21 | |
[particle] | the calling syntax is $obj!foo instead of $obj.foo | 18:23 | |
declaration is without ! iirc | |||
18:23
njbartlett joined
18:24
ebassi left
18:27
meppl left
|
|||
pmurias | fixing | 18:30 | |
pugs_svnbot | r19895 | pmurias++ | [smop] fixed minor syntax issue, private methods are declared with my method foo {...} | 18:34 | |
diff: dev.pugscode.org/changeset/19895 | |||
lambdabot | Title: Changeset 19895 - Pugs - Trac | ||
18:37
rintaro joined
18:39
wknight-away left
|
|||
ruoso | pmurias, [particle], I'm not sure... S12 seems to imply that my method !foo is the way of declaring a private method | 18:39 | |
ah... ok... | 18:40 | ||
there's a spot in S12 referring to that syntax | |||
but the correct seems to be my method foo | |||
S12 says my method !foo for private methods of a Role | 18:41 | ||
but I think that's probably wrong | |||
I can't really see a reason for private methods to be declared differently in Classes and Roles | |||
pmurias | me neither | ||
[particle] | no, me neither. i think the spec is wrong there. | 18:42 | |
18:45
rdice_ joined,
rdice left
|
|||
ruoso | Ok... I think I'll consider starting to implement p6opaque | 18:46 | |
If anyone have any comment on the smop oo api or in the p6opaque structure | |||
please do it *now* | |||
18:47
jjore-w joined
|
|||
pmurias | ruoso: does it make sense to keep the metadata in the object | 18:48 | |
? | |||
ruoso | the idea is to have the same representation to the undefined and defined values | 18:49 | |
that is important to enable autovivificatoin | |||
Dog{ name => fido } is my $a = Dog.clone; $a.^!whence = sub { name => fido }; | 18:50 | ||
actually not quite that | |||
Dog{ name => fido } is my $a = Dog.CREATE(); $a.^!isa.push(Dog); $a.^!whence = sub { name => fido }; | 18:51 | ||
changing the representation of an object is not really doable, because it might involve realloc | |||
18:52
luqui left
|
|||
pmurias | swimming& | 18:53 | |
19:01
buchetc joined
19:03
justatheory joined,
buchetc left
|
|||
ruoso | TimToady, at S12, in "Construction and Initialization", it's implied that BUILD might receive positional arguments... But the positional arguments to BUILDALL are already the protoobjects from which the new object will be initialized... is that just a misleading example? | 19:04 | |
in theory, BUILD will always receive named arguments... BUILDALL is supposed to take the whence closures and send it as parameters when the type match | 19:05 | ||
19:07
r0bby joined
|
|||
ruoso | hmmm... | 19:11 | |
if a whence closure returns positional arguments, BUILD might receive positional arguments | |||
it makes sense now... | 19:12 | ||
19:15
buchetc joined
19:19
TJCRI joined
|
|||
pugs_svnbot | r19896 | buchetc++ | [async.t] numer-/stringify more perl6ish | 19:22 | |
diff: dev.pugscode.org/changeset/19896 | |||
lambdabot | Title: Changeset 19896 - Pugs - Trac | ||
19:25
meppel-san is now known as meppl
19:28
rindolf joined
|
|||
ruoso | about Undef, one could argue that Undef is the immediate result of CREATE(), which was not yet blessed, therefore isn't really an Object yet... | 19:30 | |
and that won't even have an isa | 19:31 | ||
it's simply Undef | |||
pugs: say Undef ~~ Object | |||
exp_evalbot | OUTPUT[*** No such subroutine: "&Undef" at /tmp/KAOTAZeuU3 line 1, column 5 - line 2, column 1] | ||
ruoso | pugs: say undef ~~ Object | ||
exp_evalbot | OUTPUT[1] | ||
ruoso | it actually makes sense... you can't call any methods in Undef | 19:33 | |
it's not even a class yet | 19:34 | ||
it becomes a class in the moment Object is added to its isa | |||
TimToady | there is no Undef type, period | 19:35 | |
I just wrote it out of the synopses | |||
ruoso | pugs: say Object.CREATE().WHAT | 19:36 | |
exp_evalbot | OUTPUT[*** No such method in class Object: "&CREATE" at /tmp/jIDOmcbYc1 line 1, column 5 - line 2, column 1] | ||
pugs_svnbot | r19897 | buchetc++ | [async.t] numer-/stringify more perl6ish | ||
diff: dev.pugscode.org/changeset/19897 | |||
lambdabot | Title: Changeset 19897 - Pugs - Trac | ||
ruoso | the value returned from CREATE is not yet blessed... how do you define it? | 19:37 | |
it's not an Object yet | |||
it's not even an undefined Object | |||
s/how do you define it/how do you name it/ | 19:38 | ||
or should CREATE always return something that is already an Object | 19:39 | ||
TimToady | "Everything is an object" | 19:41 | |
ruoso | but it doesn't need to inherit from Object to be an object | 19:42 | |
even the native types are objects | |||
(at least in smop) | |||
TimToady | think of CREATE as more like .clone | 19:43 | |
it changes the identity, but does not define it | |||
.bless defines it, but does not change its identity | |||
pmichaud | question on #parrot: what does 'undef' return? | 19:44 | |
TimToady | Object | ||
pmichaud | okay, thanks. I can't find it in the synopses... but perhaps I'm just reading it wrong | ||
TimToady | actually, no | ||
I just specced it to return Failure | 19:45 | ||
it's just the most generic failure | |||
pmichaud | okay | ||
TimToady | we don't want to confuse bad undef with good undef :) | ||
pmichaud | an unhandled or handled failure? | 19:46 | |
TimToady | probably handled, but that's just a guess | ||
if you want an unhandled you should probably use fail anyway | 19:47 | ||
ruoso | and what about use fatal? | ||
TimToady | but I could argue it the other way too | ||
pmichaud | agreed | ||
19:47
kst joined
|
|||
ruoso | if undef returns a failure, it would fail immediatly in use fatal | 19:47 | |
s/fail/die/ | |||
TimToady | I imagine some people would like that... | 19:48 | |
cognominal_ | TimToady, what is the type of a mere undef, Object or Failure? | ||
TimToady | the type is Failure | ||
ruoso | I wouldn't expect a mere undef to die under use fatal | ||
TimToady | then use Object instead of undef | 19:49 | |
ruoso | hmm... | ||
ruoso feeling unconfortable with that | |||
TimToady | actually, I don't think it would die | 19:50 | |
cognominal_ | S04.pod talks about failure but not of a mere undef. | ||
TimToady | fail is what looks at its context to see if it should die | ||
you can return a Failure of any sort without dying under 'use fatal' | |||
cognominal_ | ho yes, my bad | ||
TimToady | so I think it's okay for undef to be the most general kind of Failure object | 19:51 | |
and marking it handled is also the most benign thing to do | |||
cognominal_ | I guess it would be good to say it explicitely in S04 =head1 Exception | ||
TimToady | but can still complain if you try to take a value from it | ||
cognominal_ | one can infer it, but thick headed people like me don't get it. | 19:52 | |
TimToady | prolly, there's never enough spec to go 'round... | ||
cognominal_ | :) | ||
I must say they have improved much lately even if it need more to read. | 19:53 | ||
ruoso | I was really thinking that Failure would look for "use fatal" in it's constructor... | ||
TimToady | makes it really hard to deal with Failure objects as mere objects when you need to | 19:55 | |
pugs_svnbot | r19898 | buchetc++ | [async.t] revert to last version (unforced check in) | ||
diff: dev.pugscode.org/changeset/19898 | |||
lambdabot | Title: Changeset 19898 - Pugs - Trac | ||
TimToady | so I think that behavior should probably be attached to the verb, not the noun | ||
cognominal_ | hum, prolly is not in Macbook dictionnary, I had to google for it :) | 19:56 | |
ruoso | so return Failure would never die immediatly | ||
TimToady | I believe that's the correct approach | 19:57 | |
ruoso | but would still die when it goes out of scope | ||
TimToady | only if it's been installed into $! | ||
pugs_svnbot | r19899 | cosimo++ | [t/spec] Refactored want.t tests under t/spec/S06. | ||
r19899 | cosimo++ | Fudge-ified tests marked as todo. | |||
diff: dev.pugscode.org/changeset/19899 | |||
lambdabot | Title: Changeset 19899 - Pugs - Trac | ||
ruoso | ahmmm... ok... | 19:58 | |
so it's the block who should look for $! | |||
TimToady | and see if it contains any unhandled failures | ||
19:58
cosimo_ joined
|
|||
TimToady | (we try not to throw away exception information in case there are cascading exceptions) | 19:59 | |
ruoso | but doing that for every block exit may look like too much overhead | ||
pugs_svnbot | r19900 | cosimo++ | [t] Fudge-ified tests marked as todo. Pod syntax fixed. | ||
diff: dev.pugscode.org/changeset/19900 | |||
lambdabot | Title: Changeset 19900 - Pugs - Trac | ||
19:59
ebassi joined
|
|||
TimToady | if you can prove that all calls are tested by // then you can skip the test | 20:00 | |
20:01
rindolf left
|
|||
ruoso | which is much unlikely | 20:01 | |
considering we're talking about *every* method call | |||
TimToady | it's still only a test of a single lexical | 20:02 | |
don't see how that can be very high overhead | |||
most of the smarts are in the fail() function | |||
20:02
cosimo joined
|
|||
TimToady | and it's why we mark $! as context var, so that fail can get at it | 20:02 | |
cosimo | hi | ||
TimToady | howdy | 20:03 | |
ruoso | it just freak me out the idea of having to do that in absolutely every block exit (including loops, closures etc) | 20:04 | |
TimToady | the mechanism is intentionally designed to force most of the calculations into fail() so we don't have to set up try {...} everywhere, which would much heavier than testing $! at the end | ||
and in the absence of an exception of some sort, it's a simple boolean test | 20:07 | ||
pugs_svnbot | r19901 | buchetc++ | [async.t] revert to last version (unforced check in) | ||
diff: dev.pugscode.org/changeset/19901 | |||
lambdabot | Title: Changeset 19901 - Pugs - Trac | ||
ruoso | ok... I'm still unconfortable with it... but... if that's the way it is... | 20:08 | |
ruoso home & | 20:09 | ||
TimToady | think of it as one of the prices you pay for disruptive technology :) | ||
ruoso | heh | 20:10 | |
20:14
manfred left
20:16
fridim_ left
20:18
cosimo_ left
|
|||
pugs_svnbot | r19902 | buchetc++ | [async.t] unforced checkin once again (beg for pardon) | 20:18 | |
diff: dev.pugscode.org/changeset/19902 | |||
lambdabot | Title: Changeset 19902 - Pugs - Trac | ||
20:19
Psyche^ joined
20:35
lisppaste3 left,
Patterner left,
Psyche^ is now known as Patterner
20:39
Psyche^ joined,
Patterner left,
Psyche^ is now known as Patterner
20:40
njbartlett_ joined
|
|||
cosimo | tsatsrv03.ud.satelgroup.net/src/view...amp;r2=1.2 | 20:40 | |
lambdabot | tinyurl.com/ytfyqj | ||
cosimo | sorry, wrong window :-| | ||
pmurias | TimToady: is there a description of a tagged DFS anywhere? | 20:43 | |
* DFA | |||
20:45
thoughtpolice joined
|
|||
TimToady | laurikari.net/ville/spire2000-tnfa.pdf | 20:46 | |
wolverian | dammit, of course it's again some dude from the *other* university in town.. | 20:48 | |
damn them and their useful results :) | |||
20:53
ilogger2 joined
|
|||
TimToady | also see the discussion at lambda-the-ultimate.org/node/2064 | 20:54 | |
lambdabot | Title: Regular Expression Matching Can Be Simple And Fast | Lambda the Ultimate | ||
pugs_svnbot | r19903 | cosimo++ | [t/spec] Refactored builtins/strings/trans.t tests into S05-transliteration. | ||
r19903 | cosimo++ | Fixed pod and :todo tests. | |||
diff: dev.pugscode.org/changeset/19903 | |||
lambdabot | Title: Changeset 19903 - Pugs - Trac | ||
22:13
Jamtech joined
|
|||
buchetc | pugs: say Thread.HOW.name | 22:15 | |
exp_evalbot | OUTPUT[Thread] | ||
buchetc | Exists a Thread.pm in perl6? | 22:16 | |
22:16
peeps[work] joined
|
|||
TimToady | not really correct | 22:16 | |
not specced | |||
but apparently pugs believes in the name | 22:17 | ||
the part that's not correct is that .HOW should lead to the metaclass instance, whose stringification isn't Thread | |||
buchetc | pugs: IO.HOW.name | 22:18 | |
exp_evalbot | RESULT["IO"] | ||
buchetc | also not correct? | ||
TimToady | should probably say ^IO | 22:19 | |
buchetc | ok, now I'm with you | 22:20 | |
TimToady | but pugs never got MO quite... | ||
commuting & | 22:21 | ||
buchetc | I'm looking for construct like async { say self.tid; } | 22:29 | |
pugs: say +async { } | 22:31 | ||
exp_evalbot | OUTPUT[***  Unexpected end of input Closing hash curly may not terminate a line; please add a comma or a semicolon to disambiguate at /tmp/2KE0LD2JKi line 2, column 1] | ||
buchetc | pugs: say +async{}; | 22:32 | |
exp_evalbot | OUTPUT[*** No compatible multi variant found: "&async" at /tmp/sC3xdd0IKn line 1, column 5-13] | ||
buchetc | pugs: say ~async{ }; | 22:33 | |
exp_evalbot | OUTPUT[*** No compatible multi variant found: "&async" at /tmp/YrAnAQNn4O line 1, column 5-14] | ||
buchetc | pugs: $thr = async{ }; say ~$thr; | 22:34 | |
exp_evalbot | OUTPUT[***  Unexpected " =" expecting "::" Variable "$thr" requires predeclaration or explicit package name at /tmp/kNjtPdeIEu line 1, column 5] | ||
[particle] | seems to me there is no async. | 22:35 | |
search the tests to be sure. | |||
buchetc | same call works in my environment; also t/spec/S17-async/async.t works at the smoke server | 22:37 | |
[particle] | maybe it's not safe. | 22:39 | |
buchetc | yes, that's what I think too | 22:40 | |
but original question is about the class 'Thread'. I'm looking for doc about it | |||
[particle] | (14:16:22) TimToady: not really correct | 22:41 | |
(14:16:50) TimToady: not specced | |||
22:42
wknight8111 joined
22:50
alester joined
|
|||
TimToady | all there is at this point is whatever is down in docs/Perl6/Spec/Concurrency.pod | 22:54 | |
but it's a big mess | |||
unfortunately, it's probably going to take a designer to clean it up | 22:58 | ||
buchetc | My attempt was to describe what's already working in S17. | 23:01 | |
Perhaps then cleaning up is more easy | 23:02 | ||
bed & | 23:08 | ||
23:10
peeps[work] left
23:11
apple-gunkies joined
23:22
Jamtech left
23:23
alester is now known as AndyAway
23:26
justatheory_ joined
23:27
justatheory_ left
|
|||
meppl | good night | 23:49 |