perl6-projects.org/ | nopaste: sial.org/pbot/perl6 | evalbot: 'perl6: say 3;' | irclog: irc.pugscode.org/ | UTF-8 is your friend! Set by moritz_ on 4 May 2009. |
|||
pugs_svn | r26687 | lwall++ | [STD] more work on lexically scoped language braids | 00:04 | |
r26687 | lwall++ | allow :temp and scope declarators in regex language | |||
r26687 | lwall++ | [gimme5] translate temp to maintain P6 semantics wrt old value | |||
00:08
PhatEddy joined
|
|||
PhatEddy | just to note that the role/enum conflict I tested earlier might be a variant of RT #65022 | 00:10 | |
rakudo: package A { class Baz{ } }; package P { class Baz{ } } | |||
p6eval | rakudo 53f705: OUTPUT«Re-declaration of type Baz at line 1, near "}"current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:86)» | 00:11 | |
jnthn | Oh, they probably all boil down to the same underlying issue. | 00:13 | |
PhatEddy | since I am doing package tests I will probably associate the last example with the RT and add a comment on the variations | 00:14 | |
jnthn | Sounds fine. :-) | 00:15 | |
00:38
payload left
|
|||
pmichaud | back. | 00:38 | |
but only for a bit. dinner. | 00:39 | ||
00:42
eternaleye joined
|
|||
jnthn thinks he has a working first cut of WALK. | 00:42 | ||
00:44
bacek__ joined
|
|||
PhatEddy | rakudo: package A{our $fifty = 42; my $thirty = 30}; say $A::fifty ; say $A::thirty | 01:01 | |
p6eval | rakudo 53f705: OUTPUT«42Use of uninitialized value» | 01:02 | |
s1n | PhatEddy: looks like a bug | ||
PhatEddy | Am I right in thinking that $A::thirty should have complained harder? Am I over-testing packages? | ||
jnthn | How so? | ||
It maybe should have complained harder, not sure. | 01:03 | ||
It certainly should not have printed 30, which it didn't. :-) | |||
s1n | does 'my' always imply private? | ||
jnthn | It implies lexical. | ||
$A::thirty is a package lookup. | |||
s1n | what scope is 'our'? | 01:04 | |
jnthn | package | 01:05 | |
well, lexical alias to a package variable... | |||
01:12
Kyosuke_Kiryu left
01:14
Kyosuke_Kiryu joined
|
|||
TimToady | note however that STD currently assumes that "my $A::b" is short for "my package A { our $b }", more or less | 01:15 | |
without the declarator, $A::b scans outward for an A package | 01:18 | ||
decommuting & | |||
PhatEddy | rakudo: package A { constant $pi = 3.14 }; say $A::pi | ||
p6eval | rakudo 53f705: OUTPUT«Use of uninitialized value» | ||
PhatEddy realizes not sure what that was supposed to do | 01:21 | ||
dalek | kudo: c0480a5 | jnthn++ | src/classes/Object.pir: list is just a method, and should not get a namespace entry. We need to do this more widely, but this scratches an immediate itch. |
01:23 | |
kudo: 902f999 | jnthn++ | src/parrot/ClassHOW.pir: Need to lie about top of the Perl 6 object hierarchy. |
|||
01:27
wknight8111 left
|
|||
dalek | kudo: b7b3c60 | jnthn++ | src/classes/Routine.pir: .name method for Routines. |
01:34 | |
kudo: 71c69d0 | jnthn++ | src/setting/Object.pm: First cut of WALK; doesn't know all of the various orderings, but knows how to handle canonical and super. |
|||
jnthn | erm, 3:30am. Sleep time. | 01:36 | |
jnthn ide spat. Dobru noc. :-) | |||
01:57
cognominal left
02:23
PhatEddy left
02:42
mikehh_ joined
03:20
charsbar_ joined
03:37
lucs left
03:40
orafu joined
04:04
SamB left
04:06
hercynium left
04:07
fridim_ joined
04:15
alester_ joined
04:23
fridim_ left
04:29
skids left,
Kisu left
04:41
Kisu joined
05:03
renormalist joined
05:08
renormalist left
05:15
iblechbot joined
05:28
justatheory left
05:31
alester_ left
05:38
jhuni joined
05:42
jhuni left
05:54
spx2 joined
06:15
wollmers joined
06:19
iblechbot left
|
|||
moritz_ | good morning | 06:27 | |
06:27
nihiliad left
06:34
ejs joined
|
|||
patmat | good morning moritz_! | 06:46 | |
moritz_ | there's a game called "world of padman", and I always mis-read "patman" as "padman" on first sight ;-) | 07:04 | |
07:10
DemoFreak joined,
eMaX left
|
|||
Matt-W | Morning | 07:10 | |
moritz_ | rakudo: sub foo(){}; say &foo.name | 07:15 | |
p6eval | rakudo 71c69d: OUTPUT«foo» | ||
moritz_ | rakudo: module A { sub foo(){}}; say &A::foo.name | ||
p6eval | rakudo 71c69d: OUTPUT«foo» | ||
pugs_svn | r26688 | wollmers++ | [t/spec] add verbosity for diagnosis | 07:16 | |
r26689 | azawawi++ | [S:H:P6] version 0.52 released which includes latest STD | 07:17 | ||
r26689 | azawawi++ | [S:H:P6] updated Moose dependency to 0.77 | |||
r26689 | azawawi++ | [S:H:P6] removed dependency on Readonly | |||
07:17
Kyosuke_Kiryu left
07:47
meppl joined
|
|||
pugs_svn | r26690 | wollmers++ | [t/spec] typo | 07:57 | |
07:58
ejs left
07:59
AzureStone joined
|
|||
moritz_ | rakudo: say 'a' ~~ /[ a | <fail: "no a"> ]/ | 08:08 | |
p6eval | rakudo 71c69d: OUTPUT«a» | ||
moritz_ | rakudo: say 'b' ~~ /[ a | <fail: "no a"> ]/ | ||
p6eval | rakudo 71c69d: OUTPUT«too many arguments passed (6) - 1 params expectedcurrent instr.: 'parrot;PGE;Match;fail' pc 2275 (compilers/pge/PGE/Regex.pir:83)» | ||
moritz_ | so how do I fail from a regex? | ||
rakudo: say 'b' ~~ /[ a | <panic: "no a"> ]/ | |||
p6eval | rakudo 71c69d: OUTPUT«Unable to find regex 'panic'Null PMC access in invoke()current instr.: 'parrot;PGE;Grammar;' pc 308 (EVAL_16:138)» | ||
08:10
riffraff joined
08:23
payload joined
|
|||
pugs_svn | r26691 | wollmers++ | [t/spec] simplified and unfudged | 08:26 | |
08:28
minazo left
08:30
donaldh joined
|
|||
pugs_svn | r26692 | wollmers++ | [t/spec] minor cleanup | 08:33 | |
moritz_ | wollmers: are you sure that is() autothreads? | 08:34 | |
ok $?OS eq $osnames, ...; would be safer | 08:35 | ||
08:39
masak joined
|
|||
pugs_svn | r26693 | wollmers++ | [t/spec] eq is safer, moritz++ | 08:40 | |
masak | greetings, pickcamels. | ||
moritz_ | h h | 08:41 | |
are we known to be that picky? :-) | |||
Matt-W | pickcamels? | ||
masak | oh, don't overanalyze. just accept it. :P | 08:42 | |
08:45
nemstep` joined
08:58
nemstep left
08:59
bacek__ left
|
|||
moritz_ | masak: if we don't overanalyze, we have nothing to say :-) | 09:04 | |
masak | moritz_: uh, correct. everybody please resume your overanalysis. | 09:05 | |
pugs_svn | r26694 | masak++ | [S32/Containers] fixed minor typo | 09:06 | |
09:10
nemstep` left
09:11
nemstep` joined
09:12
smtms joined
|
|||
pugs_svn | r26695 | wollmers++ | [t/spec] fudge tests for rakudo | 09:21 | |
09:27
ZuLuuuuuu joined
|
|||
pugs_svn | r26696 | wollmers++ | [t/spec] fudge tests for rakudo | 09:29 | |
moritz_ | wollmers: there's no use in fudging tests for rakudo if rakudo doesn't implement the feature being tested | 09:32 | |
lunch & | 09:33 | ||
09:33
donaldh_ joined
09:35
donaldh_ left
09:47
cognominal joined
10:39
aindilis joined
|
|||
jnthn | H H | 10:49 | |
Matt-W | OH HAI | 10:51 | |
10:52
payload left,
masak left
|
|||
jnthn needs to do some stuff for $OTHER_WORK...will get onto Perl 6 things a bit later today. :-) | 11:08 | ||
11:09
mikehh_ is now known as mikehh
11:20
donaldh left,
donaldh joined
|
|||
pugs_svn | r26697 | wollmers++ | [t/spec] added TODO: clarify | 11:23 | |
11:32
pancake joined
|
|||
pancake | are private classes declared as the apocalypsis says? 'class :Name' ? does this changed or its just a missfeature of rakudo? | 11:35 | |
11:35
Jedai joined
|
|||
moritz_ | don't read the apocalypsis, they are historical documents only | 11:36 | |
the synopsis are the specification | |||
I'd guess it's 'my class Name { .. }' these days | |||
std: my class A { } | |||
pancake | yep, i know, but im so clicks far from the synopsis and prefered to ask :) | ||
p6eval | std 26697: OUTPUT«ok 00:02 35m» | ||
pancake | ok :) | 11:37 | |
my looks better | |||
but didnt seems to work | 11:38 | ||
pastebin.com/m5571ef12 | 11:39 | ||
buubot | pancake: The paste m5571ef12 has been copied to erxz.com/pb/17440 | ||
moritz_ | then it's NYI | ||
(NYI is "not yet implemented") | 11:40 | ||
pancake | yep, easily deductible acronim :) | 11:41 | |
11:43
payload joined
11:48
xinming_ joined
12:04
pancake left
|
|||
pugs_svn | r26698 | wollmers++ | [t/spec] added TODO: | 12:06 | |
12:07
wolv is now known as wolverian
12:13
azawawi joined
|
|||
pugs_svn | r26699 | wollmers++ | [t/spec] added TODO: | 12:14 | |
12:36
ruoso joined
|
|||
jnthn | std: class Foo:ver<0.0.1> { { | 12:37 | |
std: class Foo:ver<0.0.1> { } | |||
ruoso | Hello! | ||
p6eval | std 26699: OUTPUT«##### PARSE FAILED #####Unable to parse blockoid; couldn't find final '}' at /tmp/SCWYpneOmP line 0:------>  expecting statement listFAILED 00:02 37m» | ||
std 26699: OUTPUT«ok 00:02 35m» | |||
jnthn | hi ruoso | ||
ruoso | jnthn, do you have any plans on implementing contextual variables in rakudo? | 12:38 | |
jnthn | It's on the "things that should probably happen soonish" list. | 12:39 | |
azawawi | hi | ||
jnthn | I think pmichaud wants to get the support for them into PCT too, or will also need them in PGE, so I haven't rushed to get them into Rakudo just yet. | 12:40 | |
azawawi | ruoso: hi, did u manage to find out why make mildew was croaking on kubuntu...? | 12:41 | |
ruoso | azawawi, no... I haven't found... | 12:42 | |
azawawi | ruoso: oh well, im nearly finished with the run mildew/rakudo option on Padre::Plugin::Perl6... | 12:43 | |
ruoso | azawawi, great... don't be worried about the problem in mildew tho, because we're getting the refactored smop/mildew on shape pretty soon, and that shall fix the problems you're having | 12:44 | |
azawawi | jnthn: what is the status of PGE syntax highlighting that i previously disabled (or hijacked :)) in Padre Perl6? | 12:45 | |
jnthn | azawawi: No idea - I think Gabor added it at the Hackathon? | 12:46 | |
But not sure it's had any changes (or needed them) on the PGE side since then. | 12:47 | ||
azawawi | jnthn: today im going to finish the STD/PGE syntax highlighting switch... | 12:48 | |
jnthn | OK, nice. | ||
azawawi | hmmm, rakudo parrot build failed on win32 xp... was working yesterday. | 12:49 | |
jnthn | That's odd - works here for me today. :-S | 12:50 | |
details? | |||
oh, and make sure you have the correct Parrot revision..it was bumped up yesterday. | |||
moritz_ | azawawi: did you remember to 'make parrot'? | 12:51 | |
azawawi make realclean; & | |||
jnthn | ruoso: S12 specs a method ^isa() (as opposed to ^isa($possible_parent)) to get the parents of the current class. | 12:53 | |
I'm thinking by default that would want to return just the immediate parents? | |||
Perhaps with a flag that makes it get the whole MRO? | |||
Your ClassHOW for s1p is missing this, btw. | |||
ruoso | jnthn, a flag doing the opposite | ||
jnthn | You think the mro should be the default? | 12:54 | |
ruoso | for .^methods and .^attributes TimToady agreed to have a :local named argument to fetch declarion local to that type | ||
azawawi | jnthn: i ran perl Configure.pl --gen-parrot; mingw32-make failed; but im going to try it again after mingw32-make realclean | ||
jnthn | Oh, so the default is "everything"? | ||
ruoso | jnthn, yes... because, usually, you don't care how it is defined, you only want to know if it is | ||
jnthn | And you pass :local for "just this class"? | ||
OK. | |||
ruoso | yes | 12:55 | |
jnthn | kthnx, will implement. | ||
moritz_ | and spec, please | ||
jnthn | aye, S12 wants an update. | ||
ruoso | about ^isa | ||
I think we have an API inconsistency there... | |||
jnthn | yes | ||
ruoso | because ^does receives an argument | 12:56 | |
jnthn | $foo.^isa(Int) # is $foo an Int | ||
$foo.^isa() # get me the list of parents of Foo | |||
Oh, you mean | |||
roles list of roles | |||
ruoso | I thought about it too... but it looks weird for it to return different types.... | ||
jnthn | Probably wants to de | 12:57 | |
does | |||
*be | |||
? | |||
ruoso | jnthn, yeah... maybe ^roles and ^super | ||
jnthn | If they're different multi variants we're fine. | ||
ruoso | jnthn, but it looks weird | ||
maybe the parameter is a filter | |||
jnthn | Well, not ^super because that implies "only the direct superclasses" | 12:58 | |
You could do it as an optional parameter. | |||
ruoso | ^isa(Int) return all the types in the hierarchy that matches Int | ||
jnthn | I think that we should probably have isa and does being the arguemnt and non-argument form. | ||
*or* have a separate ^parents and ^roles | |||
e.g. name them both matching or both different. | 12:59 | ||
But not one matching and one not. | |||
ruoso | jnthn, true.... | ||
what about the filter idea? | |||
jnthn | Don't like it. | ||
azawawi | jnthn: mingw32-make failure log: sial.org/pbot/36440 | ||
jnthn | I want ^isa(Foo) to tell me Fast. | ||
ruoso | right | ||
I'd be pretty much ok with ^roles and ^parentes | 13:00 | ||
s/tes/ts/ | |||
jnthn | Yeah | ||
ruoso | do we need TimToady's blessinh? | ||
jnthn | And part of me thinks requiring multi-dispatch and optional parameter stuff for something so fundemental and up in Object is probably not great. | ||
ruoso | or we just tell him we implemented that way :P | 13:01 | |
jnthn | For sure, Rakudo doesn't have a bootstrap issue there, but I can appreciate for smop that may not be the case. | ||
ruoso | jnthn, and using multis to change the actual meaning of a method is weird... you usually want to customize behavior, not be an entirely different method | ||
jnthn | Yeah, that too. | ||
OK, let's go for ^roles and ^parents and stop overloading meanings onto one method name. | 13:02 | ||
ruoso | good | ||
jnthn | We could always apply the forgiveness vs permission rule. ;-) | ||
moritz_ | that's the general trend anyway | ||
see the reverse -> .flip split | |||
reverse -> reverse|flip|invert actually :-) | |||
jnthn | I'll patch S12 and the sepc tests and Rakudo. | ||
13:03
abra joined
|
|||
ruoso | cool | 13:03 | |
jnthn | and you can patch src-s1p. ;-) | ||
moritz_ | hattrick! | ||
13:03
riffraff left
|
|||
ruoso | jnthn, should roles and parents be available in Object as well? or just as meta methods? I'd argue to be just metamethods... | 13:04 | |
jnthn | I think just as meta-methods. | 13:05 | |
Matt-W | seems like meta-method thing to me | ||
jnthn | .^methods is for sure only in the meta-class. | ||
ruoso: Oh, I wanted to pick your brains on one other thing too. | |||
in smop as far as I understand it you have the metaclass as a "singleton" | |||
wolverian | can I specify that a role Foo can be composed only into classes that also compose Bar | ||
s,$,?, | |||
ruoso | jnthn, not really singleton, but shared amongst a lot of types | 13:06 | |
jnthn | OK, but is there a single "instance" of ClassHOW essentially? | ||
ruoso | in practical terms, yes | ||
jnthn | I appreciate instance is maybe not quite the word in the prototye-OO world. | ||
OK, so that's the direction I'm thinking we'll head in Rakudo too. | 13:07 | ||
With that in mind though, I'm not too clear on: | |||
ruoso | jnthn, yes... ClassHOW is not really an instance | ||
jnthn | (from S12) | ||
Alternately, you can associate a class method with the current metaclass instance, | |||
which as a singleton object knows your package, and can function as a more traditional | |||
"class" method: | |||
our $count; method ^count { return $count } | |||
ruoso | but conceptually, you could have something that was really an instance | ||
jnthn, I think that part of S12 is just broken ;) | 13:08 | ||
jnthn | OK, we should probably ask TimToady about it. | ||
I can't see how we can have the metaclass both as a "pure prototype" (is that how you call it in smop?) or as we'll have it in Rakudo more of a singleton, and yet still have it know about individual classes... | 13:09 | ||
Oh, unless the representation API knows the package... | |||
ruoso | jnthn, it does | ||
.^!who | |||
jnthn | (as in, provides a way to get at it) | ||
ah, OK | |||
ruoso | in SMOP, the "class" information is in the protoobject^Wtype object | 13:10 | |
the HOW knows how to use it | |||
that's why you have the same ClassHOW being used by most classes | |||
a more class-based OO would have the methods stored in the HOW itself | |||
jnthn | Rakudo is heading in a pretty similar direction. | ||
ruoso | jnthn, that's very much cool | 13:11 | |
jnthn | Sure, but I don't see how you can really do that and do the represenation stuff too. | ||
ruoso | think of the representation stuff just as a way to get the actual data stored into the object | ||
jnthn | Right. | 13:12 | |
ruoso | in SMOP it is a method call, but there's no reason for you to do that in Parrot | ||
since parrot has a much more defined low-level structure | |||
in SMOP it is a method call, simply because that's the only thing SMOP knows how to do | |||
(call methods) | |||
jnthn | It turns out that a subset of the Parrot vtable methods actually match up pretty closely with your representation API. :-) | ||
Not enough that we can really easily unify it. | 13:13 | ||
ruoso | exactly... so you can map the code using .^! directly to vtable calls | ||
jnthn, I'm open to work through getting it unified | |||
jnthn | Well, it's not always going to be a direct mapping. | ||
One awkward point for us is your repr API's assumption that instance storage is a HoH. | 13:14 | ||
ruoso | right... that's very Perl6-ish | ||
which is not very parrot-ish | |||
how would parrot need for it to look like? | 13:15 | ||
jnthn | Well, thing is, as I understand it the repr API is meant to allow us to easily interoperate with other object models. | ||
And it seems like too big an assumption in general. | |||
Well, Parrot knows how to get an attribute, set an attribute, and those two can optionally take the class the attribute belongs to, otherwise it will just grab the nearest attribute up the mro. | 13:16 | ||
ruoso | yes... my idea is that we can interchange HOW and REPR as pleased | ||
so you could use a different representation with ClassHOW, as long as that REPR provided all the API ClassHOW requires | |||
i.e.: using a Glib object with ClassHOW | |||
jnthn | Right, but does a GLib object really conveniently provide a HoH view or its attribute store? | 13:17 | |
*of its... | |||
HoH is not really an efficient object layout. | |||
ruoso | jnthn, that's why I'm very open on getting the REPR unified... It wasn't still tested with other REPR implementations | 13:18 | |
jnthn | OK. | ||
ruoso | btw... wasn't the mro supposed to be implemented by the HOW itself? | ||
jnthn | Interesting question. | 13:19 | |
I mean, ^dispatch and ^can are two places that are affected by this. | |||
And those are fine... | |||
Oh, hmm | 13:20 | ||
What does $!foo (getting at instance storage) compile down to in smop? | |||
ruoso | I mean... I should be able to implement a different MRO by using a custom HOW | ||
jnthn | e.g. class Foo { has $!foo; method x { $!foo } } # the $!foo reference in the method | ||
ruoso | self.^!instance_storage.{$?PACKAGE}<foo> | ||
jnthn | Is attribute lookup meant to be via the metaclass too? | ||
OK, so that goes straight via the repr API? | 13:21 | ||
ruoso | jnthn, S12 makes it very clear that private attributes are not virtual | ||
so... I think it's ok to go through the REPR api directly | |||
13:22
exodist joined
|
|||
jnthn | Sure, Parrot provides for them being, and we'll have to customize that in p6opaque or something. | 13:22 | |
Or maybe not even there. | |||
Just in emitting something that specifies the package always. | |||
(We currently are going through what I'd call our repr API today, e.g. the vtable methods, for attribute lookup.) | |||
ruoso | yes... in mildew the above line is pretty much the result for $!foo | 13:23 | |
jnthn | (But I'm pretty sure we ain't always getting the right answers.) | ||
Ok, so we're consistent-ish in smop and Rakudo there already. Great. | |||
13:23
skids joined
|
|||
jnthn | So, I think the best way forward, is I'll dig into getting Rakudo moving in the right kinda direction, and then once I've got our HOW/repr distinction straightened out some, we can look at how we might be able to unify it some. | 13:25 | |
azawawi: Looking at your nopaste, I suspect it may be due to some recent Parrot changes in the way dynpmcs related to Parrot. | 13:26 | ||
13:29
Jedai left
13:30
sri_kraih joined
13:31
masak joined
13:36
PhatEddy joined,
smtms left
|
|||
pugs_svn | r26700 | jnthn++ | [spec] Rename ^isa() to get list of parents to ^parents so there's no confusion with .^isa(Foo) and consistency with .^does(Foo) and .^roles(). Also fill out the introspection specification a little more. | 13:36 | |
pmichaud | jnthn++ ruoso++ | 13:37 | |
That use of .isa() to "get list of parents" really bugged me. | |||
jnthn | Hey, you had a commit bit too. ;-) | ||
pmichaud | I find that my ideas for design improvements are ultimately rejected more often than not. :-| | 13:38 | |
at least, it seems that way. :-) | |||
pugs_svn | r26701 | wollmers++ | [t/spec] cosmetic cleaning: remove trailing space | ||
jnthn | btw, what are we going to call the new Parrot PMC for doing the proto-y object stuff? | 13:39 | |
ProtoObject is tempting now Perl 6 ain't using it. ;-) | |||
pmichaud | I'll let you decide that. Allison suggested Protoobject. | ||
I'm find with Protoobject, but please don't capitalize the 'O'. | |||
jnthn | :-( | ||
pmichaud | *fine | 13:40 | |
jnthn | I liked it much better with the capital O... | ||
pmichaud | but the word is consistently "protoobject", not "proto object" | ||
jnthn | hmm...true | ||
pmichaud | similarly we say "prototype" and not "proto type". I.e., we would say Prototype and not ProtoType | 13:41 | |
jnthn | *nod* | ||
I guess we can also be 1337 | |||
prot00bject! | |||
w00t! | |||
OK, Protoobject it is. | |||
pmichaud | When I was actively teaching (and serving as committee member on graduate projects), I often ran into an Over Eagerness to Capitalize Words that seemed Important. | 13:42 | |
jnthn | And you Really didn't like It? ;-) | ||
pmichaud | I continually saw project proposals (and even some final reports) where the writer thought it was important to always capitalize things like "Web Browser" | 13:43 | |
as in: | |||
"The user opens the Web Browser and navigates to the start page for the application." | |||
jnthn | Ugh. | ||
moritz_ | pmichaud: they were all Germans in their heart :-) | ||
masak agrees with pmichaud | |||
moritz_ | we capitalize nouns, and it's hard to get rid of that habit | ||
jnthn | moritz_: I was thinking about German too. :-) | ||
pmichaud | It must have been German then. | ||
jnthn | "Mein Hund ist kaput." | ||
masak | UnNecessary CaPitaliSation Should Be AvoidEd. | 13:44 | |
jnthn | ^ capital 'cus it's noun | ||
uh, one too far over :-) | |||
pmichaud | But I did see it a lot. It also bugged me a bit that the committee chairpersons (who were supposed to have revised the draft before getting to me) didn't notice or think to correct the author on it first. | ||
anyway, "Protoobject." :-) | 13:45 | ||
13:45
clkao joined
|
|||
jnthn | rant win :-) | 13:46 | |
pmichaud | although with prot00bject I can always aim my laser right between the "eyes". | ||
masak | :) | ||
pmichaud | (The zero in my current font has a dot in the middle, which makes them look like a miniature xeyes application :-) | ||
13:47
ruoso left
|
|||
pmichaud | Ugh, I really don't want to do $otherjob today. | 13:47 | |
13:49
hcchien joined
|
|||
masak | don't do it, then! | 13:49 | |
pmichaud | Well, if I don't, then I might not have $otherjob tomorrow. Plus I'm supposed to travel to $otherjob.location tomorrow to demonstrate the current state of the project, which is likely to be Nil() unless I do $otherjob.work today. | 13:51 | |
13:52
H1N1 is now known as H1N1[A]
|
|||
jnthn | Ugh. Un-fun. | 13:52 | |
pugs_svn | r26702 | ruoso++ | [smop/src-s1p] add ^roles and ^parents... the implementation is yet very naive... thats probably where the mro gets in | 13:53 | |
pmichaud | and yes, this also means I'm likely to be scarce tomorrow (travel, meetings, travel) | ||
I should be back around on Fri. | |||
masak | pmichaud: good luck with $otherjob! | ||
jnthn | I expect I'll do Rakudo Day on Friday. | 13:55 | |
masak | IO::Encoded.ins: "Returns the number of lines or records that have been input. Now with cleaned-up localization usage." what does the latter sentence mean? | ||
also, why must getc have C<Int $chars = 1> as a param? nearly all other methods are content with being called repeatedly... | 13:58 | ||
$*IN.getc for ^$n; | |||
also, given that it _does_ have this param, isn't the C<Char> return type wrong? | |||
or is the intention to only return the last char read? | |||
moritz_ | masak: because IO without proper buffering is painfully slow, perhaps | 13:59 | |
13:59
nemstep` is now known as nemstep
|
|||
moritz_ | masak: but yes, the return type looks wrong | 13:59 | |
masak | moritz_: I question both the need for the param and the return type. | ||
moritz_ | masak: feel free :-) | ||
masak | in no other language is getc required to read several chars, AFAIK. | ||
let's save experiments in overdesign for the external libraries as far as possible. | 14:00 | ||
donaldh | slightly off-topic question: how is pugs_svn implemented? | ||
moritz_ | donaldh: with Bot::BasicBot | ||
masak: right. that's what read() is for :-) | |||
masak | moritz_: that, too. | ||
donaldh | moritz_: is it listening to commit emails? or triggers, or what? | ||
14:01
ruoso joined
|
|||
moritz_ | donaldh: it uses SVN::Log to talk to the svn server directly... should I put the code somewhere? | 14:01 | |
donaldh | moritz_: yes that would be great. I've already started tinkering with ilbot since I find it one of the prettiest IRC log bots I've seen. | 14:02 | |
moritz_: is it polling the svn server then? | 14:03 | ||
ruoso | jnthn, proto-y? | ||
14:05
smtms joined
|
|||
moritz_ | donaldh: moritz.faui2k3.org/files/svnbot.pl.txt | 14:05 | |
donaldh: problem is, currently it polls too often | |||
it should be ever 20s, but I fear it does it more often, actually | |||
jnthn | ruoso: ? | ||
ruoso | jnthn, sorry... I didn't backlog fully in the last days... what is the proto-y thing you mentioned? | 14:06 | |
jnthn | ruoso: A PMC that gives us something a bit more prototype-oo based - basically to avoid some of the "faking" our P6object library does today. | 14:08 | |
And help get us more to the representation/meta-class separation point. | |||
ruoso | I see.... | ||
isn't that p6opaque? | 14:09 | ||
donaldh | moritz_: thanks, I'll take a look. | ||
jnthn | yes and no | ||
p6opaque will be a subclass of it | |||
ruoso | ah... ok | ||
jnthn | Which adds some Perl 6 specific bits. | ||
ruoso | makes sense... | 14:10 | |
jnthn, wouldn't this get you really close to the ResponderInterface concept as in SMOP? | |||
14:11
amoc joined
|
|||
jnthn | In my view, Parrot's never been so far away from it anyway. | 14:12 | |
Your ResponderInterface is essentially a list of things you expect a representation to be able to do, so far as I can tell. | |||
Which isn't all that different from Parrot's vtable, apart from Parrot's v-tables provide a more extensive range of things, not just object-y ones. | 14:13 | ||
ruoso | jnthn, except that not all ResponderInterfaces need to implement the REPR api | ||
but yes... I see what you mean | |||
jnthn | Not all Parrot PMCs implement all of the vtable either. | 14:14 | |
ruoso | so the Protoobject is basically a PMC that will be able to implement the REPR api | ||
jnthn | Right. It'll basically subclass Object, and let you do things like add_method, etc. | ||
Without having to explicitly deal with the fact that there's also a Class behind the scenes. | |||
ruoso | "also a class"? | 14:15 | |
jnthn | So you'll be able to just deal with one object and not two. And that one object will handle the full repr API. | ||
Right. Remember that Parrot is essentially class-based behind the scenes. | |||
This will just help us ignore that a bit more. :-) | 14:16 | ||
ruoso | right... got that... | ||
so you really could call it ResponderInterface instead ;) | |||
jnthn | (While still allowing everything else that thinks in a class-based way to continue inter-operating just fine with us.) | ||
Well, things that go into Parrot should be not specific to Perl 6. | |||
ruoso | ResponderInterface is not | ||
it's simply an abstraction that hides how the objects are laid out in low-level | 14:17 | ||
jnthn | I really don't think that name is going to fly. :-) | ||
ruoso | ok... not really important... | ||
but it's cool that we're getting the same building blocks at this point | |||
jnthn | Yes. | ||
It's nice that smop has come and investigated this area in more detail. | 14:18 | ||
ruoso | it does make me proud of it ;) | 14:19 | |
knowing that no matter what, SMOP was already worth the work ;) | |||
jnthn | Oh, I think it's for sure that SMOP has been helpful in fleshing out various areas of the spec and working out how to do stuff. | 14:21 | |
ruoso | now I need to get my secret plan going... which is to make perl 5.12 to run Perl 6 | ||
by merging SMOP inside perl5 | |||
masak | \o/ | 14:23 | |
moritz_ | well, it's not secret anymore :-) | ||
jnthn | That's certainly a "rather you than me" task. :-) | ||
masak | ruoso: I've said it before: the moment that happens, smop will turn up on my radar like a frikkin' blimp. | ||
ruoso | I think as soon as this refactoring is over, I'll be able to start working on that | 14:24 | |
moritz_ | how much work is left? | ||
14:24
[particle]1 joined
|
|||
pugs_svn | r26703 | jnthn++ | [t/spec] Update an introspection test to be inline with the spec and correct a few other bits in it, and fudge it for Rakudo. | 14:25 | |
14:25
frettled joined
|
|||
ruoso | moritz_, we need to finish porting p6opaque and the low-level HOWs | 14:25 | |
and then get mildew passing all the tests it was passing before | 14:26 | ||
PhatEddy | I have been working on package RT tests and believe I have come up with a file of tests for 14 otherwise (afaict) untested package related RT's (19 tests). | 14:27 | |
14:27
[particle]1 is now known as [particle]nyc
|
|||
jnthn | PhatEddy++ # thanks! | 14:27 | |
14:27
frettled left
|
|||
PhatEddy | Anyone willing to look at the file before I decide what to do with it next. I could put up a gist link ... | 14:27 | |
moritz_ | jnthn: are you planning to make :ver<1.0> parse in Rakudo? | 14:28 | |
PhatEddy: sure | |||
TimToady | gah, you guys talk too fast--how am I ever supposed to backlog all that? :) | ||
14:28
frettled joined
|
|||
PhatEddy | link to package tests: gist.github.com/107520 | 14:29 | |
[particle]nyc | my $backlog is lazy; | ||
TimToady is not allowed to be lazy when it comes to Perl 6 | |||
[particle]nyc | for @need-to-know.lines { ... } | ||
14:29
iblechbot joined
|
|||
TimToady | well, except vicariously lazy | 14:29 | |
moritz_ | PhatEddy: the first one... shouldn't that stringify to AlsoEmpty() (with the parens)? | 14:30 | |
PhatEddy: the third one is wrong... it shouldn't live, it just shouldn't give a Null PMC access | 14:31 | ||
PhatEddy: same with the next one | 14:32 | ||
is eval('Simple::B1::a'), 1, 'enum in package' # - I don't see no B1 anywere - should that be just B? | 14:33 | ||
PhatEddy | first one gives invoke() not implemented error now ... | ||
TimToady | ruoso: we're going to have to figure out the relationship of p5 and p6 namespaces, and I'm afraid it ain't gonna be pretty... | ||
masak | gist.github.com/107541 # only in Perl... | ||
ruoso | pmichaud, if I use a PIR closure in the regex, will it be possible to see the Perl 6 lex from that closure? | ||
TimToady, the cool thing in P6 is that the namespace is not global | 14:34 | ||
so it makes it very easy to solve that | |||
PhatEddy | if you think the first one should be AlsoEmpty() I can test for that ... | ||
moritz_ | yes | ||
PhatEddy working on third and fourth | |||
TimToady | it's just that dispatchers that want to interoperate will often need to look in two places | ||
moritz_ | #65022 - you can simply use an eval_lives_ok here | ||
ruoso | TimToady, why? if you're in P6, you look in the lexical scope only... | 14:35 | |
if you're in p5, you look in the package only | |||
TimToady | there are things that have to look in both p5 and p6 lexical scopes interleaved, if we can interleave code | ||
moritz_ | same with RT #64204 | ||
ruoso | sure... but that's when doing lexical lookup... no problem there | ||
masak | oh my, pun is still un-updated after the prefix:<=> thing... :/ | 14:36 | |
ruoso | the dispatcher only have to decide if it does a lexical or package lookup | ||
the P6 dispatcher is lexically-based | |||
TimToady is vaguely reassured | |||
ruoso | the P5 dispatcher is package-based | ||
14:36
pmurias joined
|
|||
jnthn | masak: nice! | 14:36 | |
masak ♥e Perl 6 | 14:37 | ||
PhatEddy | If you are asking to make the third and fourth like the tests for # 64204 I can do that and it would make sense. | ||
masak | er, s/e// | ||
moritz_ | PhatEddy: yes, I think so | ||
TimToady | well, lovee would be the opposite of the lover | ||
and I think Perl 6 loves you too | |||
pmurias | jnthn: re HoH a representation doesn't have to store it that way it just needs to expose such an iterface | 14:38 | |
lambdabot | pmurias: You have 1 new message. '/msg lambdabot @messages' to read it. | ||
TimToady | well, at least it ♥s you... | ||
PhatEddy | Ok and that B1 should be 'B' ... | ||
pmurias | jnthn: the other choice would be to have an Arrayish interface to the data | 14:39 | |
amoc also ♥s Perl | |||
ruoso | btw... for those wondering... "faz" comes from the verb "fazer" in portuguese, which is "to do".... but when used with the singular third person (and portuguese allows it to have the subject hidden)... | 14:40 | |
14:40
SamB joined
|
|||
PhatEddy | moritz_: Well once I fix the warts and it runs, will it be OK to name it basic.t in S10-packages and commit it? | 14:40 | |
moritz_ | (to me "faz" is a big German newspaper :-) | ||
masak | TimToady: I think you're right. :) | ||
moritz_ | PhatEddy: yes | 14:41 | |
masak | for those of you who haven't tried out pun yet, I can do this and you can't: perl6n -e '.say if .chars > 78' lib/Installer.pm | ||
(neener neener) | |||
PhatEddy | moritz_: thank you so very much for spotting the problems. I don't really understand karma or I would try to play with it ... :) | 14:42 | |
moritz_ | PhatEddy: there's not much to understand. If I type PhatEddy++, you get karma. That works for everyone here :-) | 14:43 | |
PhatEddy | moritz_++ | 14:44 | |
masak | karma++ | ||
14:44
ejs joined
|
|||
TimToady | everyone here++ | 14:46 | |
frettled | That didn't work, someone needs to file a bug. ;) | 14:47 | |
TimToady | .oO(I know a bug who would not like to be filed...) |
14:48 | |
skids | .oO(filing bugs is hard, given the unibody construction) |
14:49 | |
moritz_ | @karma here | ||
lambdabot | here has a karma of 1 | ||
moritz_ | well, that worked. | 14:50 | |
TimToady | everyone here++ | 14:51 | |
SamB | don't expect lambdabot to remember your karma for long ;-P | ||
TimToady | @karma everyone here | ||
lambdabot | everyonexC2 has a karma of 0 | ||
TimToady | stupid lambdabot | ||
SamB | what the HECK??? | ||
14:51
azawawi left
|
|||
TimToady | lambdabot is running in Latin-1 mode :( | 14:52 | |
SamB | ah | ||
you used some wierd UTF-8 space! | |||
TimToady | actually, I used a Latin-1 space, but encoded in utf-8 | ||
moritz_ | the non-breaking space | 14:53 | |
SamB | well, it doesn't look like it would have worked anyway | ||
TimToady | shoulda, if lambdabot were doing Unicode correctly | ||
another good reason for writing our own... | |||
SamB | oh, wait ... | 14:54 | |
SamB remembers that the second byte of a utf-8 encoded latin-1 char isn't the same as the n | |||
frettled | @karma everyone here | ||
lambdabot | everyone has a karma of 3 | ||
TimToady | sometimes it is, and sometimes it isn't the same | ||
14:55
payload left,
mberends joined
|
|||
TimToady | @karma ¥ | 14:56 | |
lambdabot | ¥ has a karma of 0 | ||
14:56
nihiliad joined
|
|||
frettled | @karma lambdabot | 14:56 | |
lambdabot | lambdabot has a karma of -1 | ||
TimToady | Perl 6++ | 14:57 | |
@karma Perl 6 | |||
lambdabot | Perl 6 has a karma of 1 | ||
TimToady | now *that* one is a weird Unicode space | 14:58 | |
14:58
ejs left
|
|||
TimToady | @karma Perl 6 | 14:59 | |
lambdabot | Perl 6 has a karma of 0 | ||
frettled | Ah, time for that Oslo.pm meet where Marcus will repeat his G(et)it talk for the benefit of those of us who didn't attend during NPW. | ||
TimToady | that's probably the one we *should* be using "NARROW NO BREAK SPACE" | ||
frettled | or just regular space :D | 15:00 | |
TimToady | with a :nobreak adverb | ||
:!break, excuse me | |||
frettled | \o/ | ||
TimToady | must...back...log... | 15:02 | |
masak | TimToady-eval: say +['foo', 'bar'].comb(/foobar/) | ||
TimToady | Nil | 15:03 | |
er, 0 | |||
masak | TimToady: in what way, then, is a list treated as a string? | ||
TimToady | [] makes an array, not a list :P | ||
masak | er. | ||
TimToady | actually, comb should probably work on array too | ||
masak | rakudo: say Array ~~ List | ||
p6eval | rakudo 71c69d: OUTPUT«1» | ||
masak stands arms akimbo | 15:04 | ||
Liskov says "comb should work on Array too!" | 15:05 | ||
moritz_ says "that's what we have >>. for" | |||
TimToady | well, if comb works for lists at all; is that specced anywhere? | ||
masak | TimToady: aye. | ||
S32/Str | |||
moritz_ | that's a weird place for that :-) | 15:06 | |
masak | we talked about it yesterday; I'm making the required additions in Container and IO right now. | ||
moritz_ | TimToady: what do you think, should .comb always return a List of Match objects? | ||
or optionally strings? | |||
masak | btw, S32/Containters.pod contains a lot of signatures on the form 'our Junction multi method none( @values: )' -- I suppose that's not a valid way to supply a return type in Perl 6? | 15:07 | |
moritz_ | why not? | 15:08 | |
jnthn | It's valid. | ||
masak | oh. ok. | ||
moritz_ | std: our Junction multi method none( @values: ) { } | ||
p6eval | std 26703: OUTPUT«ok 00:02 37m» | ||
15:08
wolverian left
|
|||
jnthn | rakudo: our Int multi foo() { }; say &foo.returns | 15:08 | |
p6eval | rakudo 71c69d: OUTPUT«Object()» | ||
jnthn | rakudo: our Int sub foo() { }; say &foo.returns | ||
masak | for a moment, I thought it was someone's Java interference. | ||
p6eval | rakudo 71c69d: OUTPUT«Int()» | ||
jnthn | Ah, for multis heck knows what it returns. :-) | 15:09 | |
moritz_ | and heck ~~ Object | ||
masak | good thing it doesn't blow up, at least. | ||
jnthn | rakudo: our Int sub foo() { }; say &foo.candidates[0].returns | ||
p6eval | rakudo 71c69d: OUTPUT«Method 'candidates' not found for invocant of class ''current instr.: 'parrot;P6metaclass;dispatch' pc 248543 (src/gen_actions.pir:23326)» | ||
jnthn | rakudo: our Int multi foo() { }; say &foo.candidates[0].returns | ||
p6eval | rakudo 71c69d: OUTPUT«Int()» | ||
jnthn | w00t | 15:10 | |
masak | jnthn: maybe only subs should also have a .candidates? | ||
jnthn | masak: dunno | ||
môže byť | |||
masak | TimToady: I'm now blocked on the .comb-on-lists commit. should I just scrap it for now? | ||
I could adapt the comment in Str.pod acoordingly... | 15:11 | ||
TimToady | at the moment the spec seems to assume that strings should be returned by default. I didn't write that part... | ||
moritz_ | TimToady: I know, that's why I'm asking | ||
masak does git svn blame | |||
jnthn makes a cuppa and digs back in | |||
moritz_ | IMHO it would be sane to assume that Matches are returned by default | ||
and that :str or so would be an optimization | 15:12 | ||
TimToady | well, if it's really cat mediated, then foobar should certainly match across the boundary | ||
and I think Match objects should be the default, not string | 15:13 | ||
since Match can autopromote to string at need, but not the other way | |||
moritz_ | aye | 15:14 | |
TimToady | though the real sticking point for implementation is cat | ||
if you don't cheat and do it eagerly | |||
dalek | kudo: 45fcaee | pmichaud++ | docs/spectest-progress.csv: spectest-progress.csv update: 380 files, 11013 passing, 0 failing |
15:15 | |
TimToady | we've said that StrPos is opaque, but returning a match across an array boundary will certainly stress that | ||
masak | TimToady: git-svn claims you wrote the "You may also comb lists and filehandles" part. | 15:16 | |
TimToady | and then there's the whole mutable/immutable problem, which we also have with returning string results | ||
pmichaud | s/you wrote/last edited/ # perhaps | ||
masak | pmichaud: nope. wrote. | ||
I went all the way back. | 15:17 | ||
TimToady | svn claims that line is wayland | ||
pmichaud | even into S29? | ||
masak | aye. | ||
at that time, it was called Functions.pod. | |||
TimToady | oh, S29 | ||
okay | |||
masak | TimToady: you're only on the first layer if you find wayland. :) | ||
TimToady | yes, I don't mind that part :) | ||
pmichaud | git-svn ftw | ||
masak | TimToady: then why did my array example eval to 0? | ||
TimToady | I already changed my mind on that | 15:18 | |
masak | oh, ok. | ||
I missed that. | |||
so, 1, then. | |||
TimToady | yes, returns one match object | 15:19 | |
which, even if returned as a Capture and autoitemized, still returns 1 | |||
but I think comb can stay explicit List return rather than Capture | |||
15:20
donaldh left
|
|||
TimToady | there being little use case for using comb to extract a single value | 15:20 | |
15:20
donaldh joined
|
|||
pugs_svn | r26704 | masak++ | [S32/IO] removed $chars param from .getc | 15:20 | |
r26704 | masak++ | | |||
r26704 | masak++ | See <irclog.perlgeek.de/perl6/2009-05-06...122346> for the | |||
r26704 | masak++ | discussion about this. | |||
r26705 | masak++ | [S32/Containers] added .comb | |||
r26705 | masak++ | [S32/IO] added .comb | |||
15:25
payload joined
|
|||
TimToady | on the other hand, using comb(/./) will generate an awful lot of Match objects | 15:28 | |
looking at the getc discussion, I wonder if there wants to be something that says: whatever this is, return me its characters in order | 15:29 | ||
and *that* could have a limiter | |||
skids | irclog.perlgeek.de/perl6/2009-04-17#i_1071956 <-- previous conversation on return value of comb | ||
TimToady | unfortunately, ..chars is taken | ||
I like the "spec fight!" part :) | 15:34 | ||
well, to argue it the other way for a bit, in most simple cases strings are indistinguishable from match objects except in boolean context | 15:35 | ||
(and methods) | |||
moritz_ | maybe .chars and .bytes etc. just return lazy lists of characters? | 15:38 | |
TimToady | I'm half inclined to leave it as strings, but change the default to . instead of \S+ | ||
moritz_ | and they know their lengths, so that they can be used as numbers efficiently | ||
TimToady | (comb, that is) | ||
moritz_ | (don't know if that's feasible, and if it's a good idea) | ||
TimToady | setup of a lazy chars object just to get the length is probably rather heavyweight | ||
moritz_ | right | ||
TimToady | but if .comb is split(''), then it already applies to most of the things you might want the chars from, including filehandles | 15:40 | |
and already has the limiter we removed from getc | |||
we could have a .words that was short for .comb('\S+') if we decided to go that way | 15:41 | ||
er, | |||
/\S+/ | |||
I think I just made a good argument for .words :) | |||
(by accident) | 15:42 | ||
so I think .comb() is the new split('') | |||
so we can say .comb.mumble.join without arguments | 15:43 | ||
masak | words++ | ||
I've actually wanted this at times. | |||
TimToady | for words() {...} | ||
dalek | kudo: 871c1e3 | jnthn++ | src/ (2 files): Get .^parents and .^methods a bit more in line with spec; update WALK. |
||
kudo: bd1c1e9 | jnthn++ | t/spectest.data: Add S12-introspection/meta-class.t. |
|||
masak | \o/ | ||
kudo: 79eb819 | jnthn++ | src/parser/ (2 files): Get us able to parse module names with colonpairs in (don't do anything with them for now though; this just brings us closer to STD.pm and lets us parse a spectest I want to be able to run). |
|||
TimToady | like lines() that way | ||
masak | exactly. | 15:44 | |
TimToady | though I wish we weren't overloading plural for two different meanings that way; maybe lazy iterators are okay for the longer units | ||
moritz_ | jnthn: you brought us a large step closer to running most of the modules in pugs/ext/ :-) | 15:45 | |
TimToady | esp if the iterator can optimize when it finds itself in numeric context | ||
jnthn | moritz_: By...? | ||
moritz_ | jnthn: by the parsing commit | ||
jnthn | moritz_: Oh. | ||
:-) | |||
moritz_ | jnthn: they all start with module Name:v<0.0.1> or so | ||
jnthn | I only did it so I could get away with parsing a spectest. :-) | ||
TimToady: $object.*@candidates(@args); | 15:46 | ||
And $object.@candidates(@args); | |||
In the second one, IIUC, we call the first one, and if it just returns rather than defers we don't bother with the rest of the list. | |||
With .* what would happen? | |||
Would we call them all anyway? | |||
15:47
Su-Shee joined
|
|||
Su-Shee | Hi. | 15:47 | |
TimToady | masak: are you editing S32 then? | ||
jnthn | And if one of them did defer, so we consumed part of the candidate list, would we then resume calling the next unconsumed thing, rather than re-calling? | ||
masak | TimToady: I'll need to backlog and re-read, but sure. | ||
TimToady | thanks | ||
masak | TimToady: er, does this mean that IO and List will also have .words, in addition to .comb? | 15:48 | |
TimToady | yes | 15:49 | |
masak | gotcha. | ||
TimToady | and that there's a function words that reads from $*ARGFILES | 15:50 | |
or whatever we're calling it today | |||
moritz_ | $*MAGICARGS :-) | 15:51 | |
jnthn | $*ARGH | ||
TimToady | std: for lines {...} | ||
p6eval | std 26705: OUTPUT«##### PARSE FAILED #####Missing block at /tmp/YK1AF1COtS line 0:------>  expecting parameterized blockFAILED 00:02 35m» | ||
masak | rakudo: for lines { ... } | ||
p6eval | rakudo bd1c1e: OUTPUT«No applicable candidates found to dispatch to for 'lines'current instr.: '_block14' pc 70 (EVAL_19:52)» | ||
TimToady | std: for lines {...}; | 15:52 | |
p6eval | std 26705: OUTPUT«##### PARSE FAILED #####Missing block at /tmp/vuSQ7kzZfZ line 1:------> for lines {...}; expecting any of: blockoid parameterized block standard stopper terminator whitespaceFAILED 00:02 35m» | ||
TimToady | hmm, why isn't it...oh, right... | ||
std: for foo {...} | |||
p6eval | std 26705: OUTPUT«##### PARSE FAILED #####Missing block (eaten by accidental listop?) at /tmp/DN5DFyJCUA line 0:------>  expecting parameterized blockUndeclared routine: foo used at 1 FAILED 00:02 35m» | ||
Su-Shee | moritz_: it seems your indispensable documentation in your blog has a little link mistake.. | ||
TimToady | I was looking for 'eaten by accident' but lines is already defined | 15:53 | |
so my test didn't catch it | |||
15:53
Psyche^ joined
|
|||
moritz_ | Su-Shee: that happens... which post, which link? | 15:53 | |
Su-Shee | moritz_: all of the perl 6 basics series linked from "posts in category" in your left-side "menu" | ||
15:54
justatheory joined
|
|||
Su-Shee | moritz_: 03-control-structures.html/03-control-structures.html for example | 15:54 | |
moritz_ | Su-Shee: I see what you mean... I'll look into that tonight | 15:55 | |
Su-Shee: thanks for the notice | |||
15:55
kidd joined
|
|||
Su-Shee | moritz_: thanks for writing it. :) | 15:56 | |
masak | rakudo: my $x = "OH HAI"; "foo" ~~ / ^ foo {{ $P1 = find_lexsay $P1}} $ / | 15:59 | |
p6eval | rakudo bd1c1e: OUTPUT«The opcode 'find_lex_p' (find_lex<1>) was not found. Check the type and number of the argumentscurrent instr.: 'parrot;PGE;Grammar;' pc 276 (EVAL_18:127)» | ||
masak | oops. | ||
rakudo: my $x = "OH HAI"; "foo" ~~ / ^ foo {{ $P1 = find_lex "$x"say $P1}} $ / | |||
p6eval | rakudo bd1c1e: OUTPUT«Lexical '$x' not foundcurrent instr.: 'anon' pc 3 (EVAL_19:3)» | ||
masak submits rakudobug | |||
ruoso | masak, pmichaud already told me PGE didn't catch up with perl 6 lexicals yet | ||
pmichaud, but I wonder if there's any way to work-around it in the meanwhile... | 16:00 | ||
masak | yes, but did he tell RT? :) | ||
this was supposed to be the workaround. | |||
that's why it's important to complain when it doesn't work. | |||
things such as variable access are half the utility of closures. | |||
16:03
kaether joined
|
|||
TimToady | BLing, I'm fine with .^parents | 16:03 | |
I pretend not to care about anything behind .HOW in any case | 16:04 | ||
ruoso | one thing it would be interesting for you to care about HOW would be to define the different roles that a HOW could implement | ||
which would define which OO features it supports | 16:05 | ||
16:08
cdarroch joined,
Psyche^ is now known as Patterner
|
|||
masak just wrote C<a ? b ! c> in Java, uncomprehending about the syntax errors he got | 16:09 | ||
TimToady | should I show up for the parrot thingy before YAPC, or is that likely to be VM-only-ish? | ||
jnthn | Oh, is it defined as before YAPC now? | ||
pmichaud | TimToady: I think you could go either way. | ||
The hackathon is post-YAPC. | |||
jnthn | Oh, are we talking about YAPC::EU or YAPC::NA? | ||
pmichaud | YAPC::NA | ||
jnthn | ah. | ||
TimToady | I'm talking about NA | ||
pmichaud | "the parrot thingy" == "Parrot Virtual Machine Workshop" | 16:10 | |
TimToady | is that a hackathon? | ||
pmichaud | TimToady: I expect it to be more tutorial-like than hackathon-like. | ||
TimToady | k | ||
jnthn | yeah, as opposed the "the other parrot thingy" == "Parrot Developer summit" | ||
TimToady | and the other is after EU? | ||
or NA? | |||
pmichaud | particle would be the person to ask about the PVMW at YAPC::NA | ||
TimToady | Glo seems to want to know where I'll be when :) | ||
ruoso | masak, btw... I think the fix to that bug would be the fix to accessing named closures from the Perl 6 lexical scope itself, which is how it is implemented now.... | 16:11 | |
jnthn | TimToady: I've heard discussion of something Parrot-ish at YAPC::EU, but don't know before or after or if... | ||
TimToady | so there's a hackathon after NA? | ||
pmichaud | so, the current schedule (as I understand it): PVWM Jun 20-21, YAPC::NA Jun 22-24, Hackathon Jun 25-26 | ||
masak | ruoso: ok. | ||
jnthn | ruoso: The fix is probably more about setting :outer correctly. | 16:12 | |
(I suspect the regex doesn't know its outer lexical scope.) | |||
TimToady | ok, Daniel didn't seem to know about the post-hackathon | ||
pmichaud | the regex does, its embedded closure doesn't. | ||
jnthn | Ah, OK. | ||
ruoso | pmichaud, the embedded doesn't do it properly tho | ||
pmichaud | the regex does, its embedded closure doesn't. | 16:13 | |
ruoso | sorry | ||
the regex doesn't | |||
rakudo: sub foo { sub bar { }; return / foo <bar> /;}; "foo " ~~ foo(); | |||
p6eval | rakudo bd1c1e: OUTPUT«No such attribute '$.pos'current instr.: 'parrot;PGE;Grammar;' pc 583 (EVAL_16:233)» | 16:14 | |
ruoso | hmm... let me try to reproduce the specific problem a bit better | ||
pmichaud | bar isn't returning anything that PGE understands. | ||
ruoso | that wasn't the problem I was trying to reproduce | ||
rakudo: sub foo { my sub bar { }; return / foo <bar> /;}; "foo " ~~ foo(); | 16:15 | ||
p6eval | rakudo bd1c1e: OUTPUT«Unable to find regex 'bar'Null PMC access in invoke()current instr.: 'parrot;PGE;Grammar;' pc 586 (EVAL_18:234)» | ||
ruoso | there it is | ||
masak submits rakudobug | |||
jnthn | ruoso: Does making bar non-lexical change anything? | ||
ruoso | it stops solving my problem ;) | ||
jnthn, but the above error was a sane error | 16:16 | ||
jnthn, as it wasn't lexically scoped, it was found | |||
(by above I mean the one before the last) | 16:17 | ||
pmichaud | rakudo: sub foo { my sub bar { 1 }; return { bar(); } }; foo(); | ||
p6eval | rakudo bd1c1e: ( no output ) | ||
pmichaud | rakudo: sub foo { my sub bar { 1 }; return { bar(); } }; foo().say; | 16:18 | |
p6eval | rakudo bd1c1e: OUTPUT«_block38» | ||
ruoso | rakudo: sub foo { my sub bar { 1 }; return { bar(); } }; foo().().say; | ||
p6eval | rakudo bd1c1e: OUTPUT«1» | ||
masak | ah, that one is in RT already. | 16:19 | |
arnsholt | Hmm. Rakudo doesn't want to build after I updated a few minutes ago. Anyone else? | 16:20 | |
ruoso | pmichaud, does that mean it is a different problem than you initially thought? | ||
jnthn | arnsholt: details? | ||
(I've got Rakudo building fine here... | 16:21 | ||
) | |||
moritz_ | arnsholt: did you reconfigure + 'make parrot'? | ||
arnsholt | Says "Class 'Perl6MultiSub' not found", and a stack trace | ||
ruoso | pmichaud, as an absolutely misinformed bystander... it seems to be that PGE is taking the package as the namespace instead of the closer lexical scope... | ||
pmichaud | ruoso: not precisely | ||
16:21
payload left
|
|||
pmichaud | ruoso: PGE uses parrot's find_name opcode, which first checks the lexical scope, then checks package scope. | 16:22 | |
moritz_ | pmichaud: iirc you wanted to review the patch to the build system... any progress on that? or do you want me to do a first pass? | ||
arnsholt | moritz_: I reconfigured, and I think it does make parrot as part of the top-level rule. At any rate, it says that parrot is up to date now | ||
TimToady | jnthn: when does the code in a role block execute? | ||
jnthn | TimToady: When you create a particular parameterization of the role. | ||
role Foo[::T] { }; | |||
ruoso | pmichaud, oh right... so it really seems to be an :outer problem... | ||
moritz_ | arnsholt: you could also try a 'make clean' in rakudo | ||
arnsholt | Yeah, Trying that now | 16:23 | |
jnthn | class C1 does Foo[Int] { }; # runs once here | ||
TimToady | I wonder if we need a COMPOSE {...} block | ||
jnthn | class C2 does Foo[Str] { }; # runs again here | ||
TimToady | to check things at compose time | ||
jnthn | class C3 does Foo[Int] { }; # doens't run again, we already had a Foo[Int] created | ||
arnsholt | Yeah, that worked | 16:24 | |
jnthn | TimToady: So you can do things like, checking if another role has been composed too? | ||
TimToady | earlier wolverian was asking if there's a way to require another role in the composition | ||
jnthn | *nod* | ||
TimToady | (still bling) | ||
so kind of COMPOSECHECK, really | |||
or POSTCOMP | |||
jnthn | Right. post-compose | ||
TimToady | implying possibly PRECOMP | ||
jnthn | "is there anything about this class independent of what else is composed into it that I care about?" | 16:25 | |
Hmm. Perhaps. | |||
I'd really want it post compose I guess because the order of composition is not meant to matter. | |||
TimToady | would probably be a mistake to overload PRE/POST | ||
ruoso | I'm not sure we need such blockx | ||
16:26
M_o_C joined
|
|||
TimToady | ruoso: as a primitive for building other assertions about the composition, mostly | 16:26 | |
ruoso | I think that's something that could be delegated to the HOW of the role | ||
we could promote custom HOW instead of hook blocks | |||
jnthn | ruoso: Most users aren't going to write HOWs. | ||
TimToady | well, presumably most users wouldn't write POSTCOMP either, but something that desugars to it | 16:27 | |
ruoso a bit afraid of the huge amount of hook blocks we have now in Perl 6 | |||
jnthn | True. | ||
masak | as long as they don't slow down people who don't use them... | 16:28 | |
TimToady waves hands frantically in the direction of the optimizer, then hides behind a tree | |||
masak | 休 | ||
pmichaud | I think the problem is that our regexes aren't getting a capture_lex on them, so they aren't capturing the lexical environment. | 16:29 | |
oh, alas, that appears not to be the problem. | 16:30 | ||
ruoso | jnthn, TimToady, one thing I just realized however, is that compose_role is on the side of the target class at this point... | 16:31 | |
pmichaud | oh, I see the problem. Yes, PGE bug. Its outer handler is properly lexical, but the inner one is not. | ||
ruoso | pmichaud, sounds easy to fix when you say it ;P | ||
masak | pmichaud++ | ||
ruoso | jnthn, TimToady, maybe it should be done in the side of the role | ||
TimToady | it? | ||
ruoso | the role composition | ||
pmichaud | rakudo: sub foo { sub bar { }; return token / foo <bar > /; }; "foo " ~~ foo(); | 16:32 | |
p6eval | rakudo bd1c1e: OUTPUT«Malformed regex definition at line 1, near "/ foo <bar"current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:86)» | ||
TimToady | compose yourself... | ||
pmichaud | rakudo: sub foo { sub bar { }; return token { foo <bar > }; }; "foo " ~~ foo(); | ||
p6eval | rakudo bd1c1e: OUTPUT«Syntax error at line 1, near "}; \"foo "current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:86)» | ||
ruoso | compose yourself into that class | ||
TimToady | I think the class and the role should each say "after you" a couple times first | ||
pmichaud | rakudo: sub foo { sub bar { }; return token { foo <bar> }; }; "foo " ~~ foo(); | ||
TimToady | "no I insist" | ||
p6eval | rakudo bd1c1e: OUTPUT«No such attribute '$.pos'current instr.: '_block35' pc 547 (EVAL_17:220)» | ||
pmichaud | there. | ||
ruoso | what changed | 16:33 | |
? | |||
pmichaud | token versus regex | ||
ruoso | cooo | ||
cool | |||
pmichaud | regex has to take a continuation -- that continuation didn't have its outer lexical context set properly | ||
ruoso testing | |||
pmichaud | token doesn't have to take a continuation (no backtracking), so there's no inner continuation to have to worry about. | ||
TimToady | token can have explicit backtracking | 16:34 | |
.*? and .*! | 16:35 | ||
pmichaud | but we don't backtrack into the token | ||
within the token, yes, there's backtracking. | |||
TimToady | trew | ||
ruoso | pmichaud, .clone is not implemented in Match... | ||
is it? | |||
pmichaud | I don't think it is. | ||
moritz_ | isn't there some modifier to force backtracking? | ||
ruoso | right | ||
pmichaud | Match objects are not things that lend themselves to cloning. | ||
ruoso | what are the parameters to Match.new? | ||
pmichaud | an existing Match object will work. | 16:36 | |
Match.new($/) | |||
16:39
kaether_ joined
16:40
sri_kraih left,
AzureStone left,
Kisu left,
kane___ left,
DemoFreak left,
simcop2387 left,
rewt left,
pmichaud left,
Helios left,
allbery_b left,
awwaiid left,
yahooooo left,
revdiablo left,
kcwu left,
pasteling left,
kaether left,
jrockway left,
literal left,
mtve left,
hcchien left,
eternaleye left,
H1N1[A] left,
xinming_ left,
aindilis left,
nemstep left,
Tene left,
cotto left,
amoc left,
SamB left,
wollmers left,
cxreg left,
Aisling left
16:41
kaether_ is now known as kaether
|
|||
PhatEddy | rakudo: package A {} ; try { A::nonesuch }; say "hi"; A::nonesuch | 16:41 | |
p6eval | rakudo bd1c1e: OUTPUT«hiNull PMC access in invoke()current instr.: '_block14' pc 110 (EVAL_20:66)» | 16:42 | |
16:42
Eevee joined
|
|||
PhatEddy | should try catch the Null PMC there? | 16:42 | |
16:42
Aisling joined
16:43
jnthn joined,
literal joined,
frew|wor1 joined,
hcchien joined,
xinming_ joined,
aindilis joined,
nemstep joined,
eternaleye joined,
H1N1[A] joined,
jan_ joined,
hatseflats joined,
[particle] joined,
japhb joined,
buu joined,
Maddingue joined,
Tene joined,
cotto joined,
irc.freenode.net sets mode: +oo jnthn Tene
|
|||
PhatEddy I guess otherwise how would you catch it? | 16:43 | ||
masak | PhatEddy: no. a Null PMC access should never occur in the first place. | 16:44 | |
It Is Simply Wrong. | |||
16:45
rafl joined,
awwaiid joined,
yahooooo joined,
revdiablo joined,
kcwu joined,
pasteling joined
|
|||
PhatEddy | TimToady: I happened to notice that my proposed spec tests sometimes check for ~$! ~~ /:s Null PMC/ which is rakudo specific ... rationalizing the question I guess. | 16:46 | |
16:46
SamB joined,
wollmers joined,
cxreg joined,
phenny joined,
diakopter joined,
Woody2143 joined
16:47
pmichaud joined,
cls_bsd joined,
DemoFreak joined,
simcop2387 joined,
rewt joined,
avar joined,
Helios joined,
allbery_b joined,
irc.freenode.net sets mode: +o pmichaud,
sri_kraih joined,
gfldex joined,
scook0 joined,
breinbaas joined,
rhr joined,
ascent_ joined,
ingy joined,
bacek joined,
broquaint joined,
kane___ joined,
Kisu joined,
AzureStone joined,
dalek joined,
agentzh joined,
bacek left,
rhr left,
ingy left,
Kisu left,
AzureStone left,
broquaint left,
ascent_ left,
kane___ left,
AzureStone joined,
Kisu joined,
kane___ joined,
broquaint joined,
bacek joined,
ingy joined,
ascent_ joined,
rhr joined,
kaether_ joined,
amoc joined,
Infinoid joined,
silug joined,
sephee joined
16:48
kaether left,
kaether_ is now known as kaether
|
|||
TimToady | .oO(netsplits are Simply Wrong too) |
16:48 | |
pmichaud | spectests should probably not do anything Rakudo specific. | ||
(or any-other-implementation-specific) | |||
TimToady | no "probably" about it | 16:49 | |
though generally the attempt should indicate the specs aren't clear enough at some point | 16:50 | ||
so what *should* the generic error "My platform blew up" look like to Perl 6? | 16:51 | ||
16:51
eternaleye left
|
|||
jnthn | segmentation fault | 16:51 | |
;-) | |||
16:51
ALFONSO joined,
kaether_ joined
|
|||
TimToady | well, then, is it $! ~~ ESIGSEGV? | 16:52 | |
ruoso | pmichaud, does the match contain the full string being matched? how do I get it? | ||
TimToady | for extra credit, make $! ~~ ESIGKILL work :) | 16:53 | |
PhatEddy | Please bear in mind someone could do a 'die "lost in space"' from a setting/prelude some day ... | ||
pmichaud | ruoso: the match does contain (a reference to) the full string being matched... I'm not sure there's a method to get to it yet, though. | ||
ruoso | hmm... it seems it is not copied using Match.new($/) | 16:54 | |
pmichaud | well, it would take the same original target that $/ has. | ||
TimToady | well, culturally we can prohibit string exceptions where we decide they're detrimental, or at least classify them all as X_RANDOM or some such | ||
pmichaud | Assuming that $/ is a Match object. | ||
ruoso | it is... | ||
but $/.perl doesn't seem to be very usefull | 16:55 | ||
16:55
hudnix joined
|
|||
pmichaud | I'll add .orig to PGE | 16:55 | |
ruoso | pmichaud, it currently dies with null pmc at get_string when I try to coerce it to bool | ||
16:55
kaether left,
kaether_ is now known as kaether
|
|||
pmichaud | it? | 16:56 | |
ruoso | rakudo | ||
pmichaud | rakudo dies with null pmc at get_string when you try to coerce ?? to bool | ||
ruoso | the match...yes... | ||
pmichaud | which match? | ||
ruoso | pmichaud, I'm pushing the code to github... | 16:57 | |
pmichaud | okay. | ||
ruoso | github.com/ruoso/faz/blob/40aca7f7c...patcher.pm | ||
16:57
IRSeekBot joined
|
|||
ruoso | it dies between 'subrx 4' and 'subrx 4.1' | 16:58 | |
pmichaud | because $_ isn't set. | ||
at least, that's my guess. | |||
ruoso | what should it have? | ||
pmichaud | well, wiat. | ||
I misread the rx(...) part. | |||
you're passing the Match object to a regex? | 16:59 | ||
you need to either send 'pos', or set the Match object's .to() | |||
ruoso | in that same call | ||
? | |||
pmichaud | (that still doesn't quite explain the null pmc) | ||
17:00
km2 joined
|
|||
pmichaud | creating a new Match object creates a false match unless you do something to turn it into a valid one. | 17:00 | |
ruoso | but the submatches are actually a pge token directly | ||
pmichaud | I'm not quite sure what you're wanting $submatch = $/.new($/); .... $result = rx($submatch); to do | 17:01 | |
PhatEddy | Just noting that we do string "die" from places in setting as of now ... | ||
pmichaud | PhatEddy: "die" is standard Perl 6. There's no problem with that. | ||
ruoso | pmichaud, I thought it would be needed to have a new match | ||
pmichaud | regexes will create + return a new match | ||
you don't have to create one for the regex to populate. | |||
ruoso | right... | 17:02 | |
PhatEddy | Could someone then explain: (TimToady) well, culturally we can prohibit string exceptions | 17:03 | |
TimToady | culturally: if you do that, you will be taken out and shot | ||
ruoso | cool | ||
pugs_svn | r26706 | masak++ | [S32/Str] comb now defaults to /./, use words for /\S+/ | 17:04 | |
pmichaud | I took 'string exceptions' to mean "keying off of specific strings returned by an exception" | ||
TimToady | but more likely it means we need a better way of implicitly typing our exceptions in various scopes | ||
so anything thrown in the compiler defaults to a syntax error type | |||
and anything thrown in the setting defaults to some other exception type | |||
17:05
mizioumt joined
|
|||
TimToady | alternately, it's not default types, but mixins of who has seen this exception go past | 17:05 | |
[particle]nyc | and anything thrown in a string defaults to a string exception type? same for regex, expression, and other dsl's? | ||
TimToady | so an exception gains a pedigree as it passes up the stack | ||
[particle]nyc | sounds like swine flu | ||
bird-pig-human | |||
17:06
masak left,
ALFONSO left
|
|||
ruoso | interesting... | 17:07 | |
TimToady | but probably in general we need to have helper routines that die with an appropriately typed exception, panic, parsefail, settingfail, whatever | ||
[particle]nyc | so !!! in a setting gives a different typed exception than in a rule | 17:08 | |
TimToady | or we go through at some point and change every die "foo" to die new XYZ: "foo" | ||
[particle]nyc | brr | ||
PhatEddy | there aren't that many in the rakudo setting right now I think | ||
[particle]nyc | die XYZ("foo") would do it, too | 17:09 | |
pmichaud | ...and many places that are currently "die" may need to become "fail". | ||
TimToady | I think perhaps, since any type defines a coercion, we can just say XYZ("foo") | ||
usually fail XYZ("foo") | |||
17:10
azawawi joined
|
|||
[particle]nyc | XYZ("foo").fail ? | 17:10 | |
ruoso | pmichaud, hmm.... now the program just go nowhere... it says "before" but not "after" nor "fail".... I pushed the last version to github... | ||
[particle]nyc | does invoking an exception throw it? | ||
dalek | kudo: 2e2f74b | jnthn++ | src/pmc/p6invocation.pmc: P6Invocation should act more like a mutable iterator; we'll only clone it if we have to. |
||
kudo: cab8784 | pmichaud++ | build/PARROT_REVISION: Bump PARROT_REVISION so we get fixes to PCT and .orig in PGE. |
|||
moritz_ | adn that would automatically gather information about the source location etc? | ||
dalek | kudo: c38a2ea | pmichaud++ | : Merge branch 'master' of [email@hidden.address] |
||
TimToady | certainly not | ||
at least, not if you mean invoking the type object | 17:11 | ||
it's currently undefined on an actual exception object | |||
17:11
japhb left
|
|||
TimToady | afaik | 17:11 | |
and I think it's bad huffman to use .() for control flow | 17:12 | ||
even .fail is a bit bogus, from the standpoint of keeping the control flow out front where it can be easily seen | 17:13 | ||
[particle]nyc | i like your reasoning on that. | ||
17:13
mico joined
|
|||
pmichaud | what does 'return' mean in this context? do we 'return' from pointy subs? | 17:13 | |
ruoso | pmichaud, ah... sorry... | 17:14 | |
TimToady | and I still think that if we want to encourage people to avoid string exceptions, we should huffmanize exception types as much as possible | ||
[particle]nyc | you LEAVE them iiuc | ||
TimToady | Exception:: is completely bogus in that regard | ||
and I've long been asking for something like X:: instead | |||
or even XFOO to go with EFOO | 17:15 | ||
pmichaud | TimToady: I'd be very happy if you defined some basic exception types for us implementors to use as a model. | ||
or gave us a model to work from. | |||
[particle]nyc | the X! sigil/twigil pair :) | ||
TimToady OH NOES | 17:16 | ||
Tene | that would be really great. | ||
TimToady | X-Files | ||
[particle]nyc | X-Org | ||
TimToady | an exceptional organization, to be sure | 17:17 | |
skids | Exceptions seem to be the exception to huffmanization. IDoNotKnowHowToHuffmanizeException. | 17:18 | |
[particle]nyc | X'Cept | ||
TimToady | X'I-DIDN'T-LIKE-IT | ||
I actually kinda like X' as a productive prefix unlikely to run into other uses of X- | 17:20 | ||
pmichaud | although it does look like a metaop. | ||
X~ X+ X-cetrera. | |||
TimToady | I expect the rest of the word to be in Klingon | ||
pmichaud | *-cetera | ||
Tene | TimToady: if you could spec out some core exception classes or roles, I'd be very pleased. | ||
TimToady | X'GBOR'TH!!! | 17:21 | |
Tene | klingon doesn't use X | ||
TimToady | does now :) | ||
pmichaud | Gesundheith. | ||
Grrr. | |||
Can't type today. | |||
(or any other day lately) | |||
TimToady | I can'th thype eithher. | ||
skids | >< | ||
pmichaud | pbthbhthth | ||
see also: Ack Phhth | 17:22 | ||
PhatEddy | I don't know if I followed this well enough to do a detailed RT ticket - but I think I could open a somewhat vague one on 'typed exceptions for prelude' | ||
TimToady | probably not worth a ticket till specced | ||
pmichaud | Perhaps what we need is to find the current instances of die/fail and decide what they should be. | ||
then from that we can start to understand the exception types we want. | 17:23 | ||
TimToady | what, build the sidewalks where there are already paths in the grass? | ||
pmichaud | Oh, right. Never mind, that will never work. :-) | ||
moritz_ | sounds not perl6ish enough | ||
azawawi | pmichaud: im trying to build rakudo on win32 and it keeps failing. sial.org/pbot/36440. Any ideas how to fix it? | ||
pmichaud | we'll probably violate some language zoning ordinance or something. | ||
TimToady | but, but, but, think of all the prior art we could mangle into unrecognizability | 17:24 | |
pmichaud | azawawi: unfortunately, I don't have win32 to be able to test much (more) | ||
azawawi tries it on feather1... | 17:25 | ||
TimToady | I do kinda like the notion of exception types as mixins though | ||
pmichaud | azawawi: that said, I know that some recent Parrot commits removed PARROT_EXPORT from a number of functions, and it's possible that doing so has caused dynpmcs to stop working in certain Windows compilers. | 17:26 | |
TimToady | especially if an exception handler can mix in a new type and rethrow | ||
pmichaud | well, the Failure role seems to me as though it really wants to be used as a mixin | ||
TimToady | that'd be F'd now... | 17:27 | |
pmichaud | for example, assuming that infix:</> should return a Failure instead of immediately dying... what should that look like in Perl 6? | 17:28 | |
TimToady | return Num but F'd; :) | ||
pmichaud | return Num but F'd("Divide by zero"); # ? | ||
TimToady | well, s/return/fail | ||
jnthn | azawawi: It works under the MS VC++ compiler; it may be something specific to mingw | ||
pmichaud | and is it "return" or.... right | ||
jnthn | F'd? | 17:29 | |
oh, Failed... | |||
17:29
mizioumt left
|
|||
jnthn | not...right... :-) | 17:29 | |
pmichaud | And X'd can be "X-rated" :-) | ||
jnthn | .oO( Failed wasn't the first word that came to mind ) |
||
TimToady | to the pure all things are pure :P | ||
pmichaud | well, Perl 6 can certainly be colorful. We're moving out of simply using punctuation for swearing to actually having it in the identifiers. :-) | 17:30 | |
PerlJam | greetings. | ||
pmichaud | it seems odd to me that we would do fail Num but F'd(...); though. Why two "fail"s? | ||
TimToady | my F'ing $F'er is F'd; | 17:31 | |
azawawi | jnthn: I am going to investigate it then. :) | ||
pmichaud | azawawi: did this just start showing up? | ||
17:32
mico left
|
|||
azawawi | pmichaud: after today's parrot svn update... | 17:32 | |
ruoso | pmichaud, cool... it parses already... now I'm struggling to get the captures... | ||
[particle]nyc | how do you access the return type of a sub inside the sub? | 17:33 | |
17:33
M_o_C left
|
|||
PhatEddy | azawawi: I am getting the same think with mingw and Activestate - am working with the latest pull on cygwin ... | 17:33 | |
TimToady | fail Num: "divide by zero"; # maybe | ||
jnthn | std: ::F'ing := Failure; my F'ing $F'er is F'd; | 17:34 | |
p6eval | std 26706: OUTPUT«##### PARSE FAILED #####In "my" declaration, typename F'ing must be predeclared (or marked as declarative with :: prefix) at /tmp/QEM2pH3BOX line 1:------> ::F'ing := Failure; my F'ing $F'er is F'd;FAILED 00:02 35m» | ||
[particle]nyc | seems you'd want to "return {whatever-type-i-should-be-returning} but F'd" | ||
...frequently, so it may deserve a shortcut | |||
azawawi | PhatEddy: strawberry + mingw here | ||
moritz_ | std: ::F'ing ::= Failure; my F'ing $F'er is F'd; | ||
p6eval | std 26706: OUTPUT«##### PARSE FAILED #####In "my" declaration, typename F'ing must be predeclared (or marked as declarative with :: prefix) at /tmp/gakuGGANGC line 1:------> ::F'ing ::= Failure; my F'ing $F'er is F'd;FAILED 00:02 35m» | ||
TimToady | std: subset F'ing of Failure; my F'ing $F'er is F'd; | 17:35 | |
p6eval | std 26706: OUTPUT«ok 00:02 36m» | ||
pmichaud | That's just F'd. | ||
[particle]nyc | Mo'Fo, the new exception-based web framework for perl 6 | 17:36 | |
pmichaud | we might be careful with that -- Morrison and Forrestor might come after us. | ||
*Forrester (grrr!) | |||
jnthn | Or the Mozilla Foundation. ;-) | ||
17:36
kaether left
|
|||
dalek | kudo: ee7d456 | jnthn++ | (2 files): P6Invocation should become more Iterator-ish. |
17:36 | |
kudo: 663cde0 | jnthn++ | src/ (2 files): Refactor indirect method dispatch, and make $x.@foo form do something along the lines of what we'll eventually want it to. |
|||
[particle]nyc | my $typing is F'd; | 17:37 | |
skids | E'pic F' | ||
moritz_ | skids: that's a parse error ;-) | ||
TimToady | std: E'pic F' | ||
p6eval | std 26706: OUTPUT«##### PARSE FAILED #####Syntax error (two terms in a row?) at /tmp/2H2iX1Azy8 line 1:------> E'pic F' expecting any of: POST argument list infix or meta-infix infix stopper postfix postfix_prefix_meta_operator standard | ||
..stopper statement modifier loop ... | |||
ruoso continues to pester pmichaud... | 17:38 | ||
pmichaud, I've just pushed a last version... | 17:39 | ||
it already parses... | |||
but i'm failing to get the captures... | |||
pmichaud | azawawi/others: I suspect that the point where PARROT_REVISION was bumped in 9a1cacdc is the beginning of compilation problems under Win32 (more) | ||
TimToady | sigh, *still* backlogging... | 17:40 | |
[particle]nyc | pmichaud: i agree. i think jonathan F'd up there. | ||
17:40
literal left
|
|||
TimToady | I believe in victorian capitalization, Gentle Reader | 17:40 | |
pmichaud | my suggestion is to get a known version of rakudo before that (I suggest 4d7fe560), but try building it with the latest Parrot. | ||
I suspect you'll get the same error. | |||
17:40
literal joined
|
|||
TimToady | fouled up? | 17:41 | |
pmichaud | "failed up" | ||
[particle]nyc | there's trouble with the parrot makefile when using nmake | ||
moritz_ | followed up? | ||
17:41
literal left
|
|||
jnthn | What most likely happened is that the Parrot change happened, but we didn't bump our Parrot revision for a couple of days later. | 17:41 | |
[particle]nyc | ooh, "failing up" sounds like a good self-help book title | ||
jnthn | I suspect it's whoever did the dynpmc changes that really failed up. | 17:42 | |
TimToady | What The Failure? | ||
pmichaud | correct. | ||
I also suspect there aren't any direct "dynpmc" changes. | |||
[particle]nyc | cotto did dynpmc, i believe they were tested on strawberry | ||
i tested fine on msvc | 17:43 | ||
pmichaud | [particle]: I think those changes are in a branch, ye? | ||
*yes ? | |||
[particle]nyc | no, merged to trunk | ||
jnthn | [particle]nyc: It seems it's just mingw | ||
[particle]nyc | maybe that affects rakudo, if it wasn't modified to match something new? | ||
strawberry uses mingw, no? | |||
TimToady | std: sub infix:<the> {...}; *.WHAT the * | ||
pmichaud | [particle]: I think PARROT_EXPORT has been removed recently. | ||
p6eval | std 26706: OUTPUT«ok 00:03 36m» | ||
pmichaud | (from a variety of functions) | 17:44 | |
jnthn | [particle]nyc: I saw fperrad asking about the patch in #parrot recently IIRC, and he builds on mingw | ||
(IIRC) | |||
azawawi | [particle]nyc: yes, strawberry+mingw | ||
17:44
literal joined
17:45
kaether joined
|
|||
pmichaud | does Parrot's "make test" do any testing of dynpmc building and linking? | 17:45 | |
[particle]nyc | pmichaud: it was removed from pmc2c | ||
so vtable functions are no longer exported in pmc or dynpmc. | |||
jnthn | They musta done a bit more than just rip that out. | ||
Otherwise it wouldn't work on MS VC++. | |||
pmichaud | ISTR that one of the reasons we had to leave PARROT_EXPORT in was because otherwise things wouldn't link properly on certain Win32 compilers | 17:46 | |
jnthn | I don't know enough about mingw to know why it'd break that and not MS VC++ though. | ||
[particle]nyc | there's runtime resolution of which vtable functions are needed, rather than compile time | ||
jnthn | pmichaud: I believe they look up the vtable indirectly now. | ||
[particle]nyc | ...when building pmc's. | ||
pmichaud | jnthn: okay. | ||
jnthn | pmichaud: Which would be a legit change, IMO. | ||
pmichaud | Sure, I'm fine with that. | ||
skids | X'pt, F'd, E'vt, C'tl, S'gl, N'n <-- just trying stuff on | 17:47 | |
jnthn | MS VC++ was certainly one of the compilers that did need PARROT_EXPORT before. | ||
pmichaud | azawawi: just to verify, you've done "make realclean" in both the rakudo and parrot trees and then built from that? | ||
azawawi: or even better, start from a completely fresh checkout...? | |||
azawawi | pmichaud: yup i did that... | ||
[particle]nyc | ...with no installed parrot | 17:48 | |
azawawi | pmichaud: im going to pull it out again on another directory | ||
[particle]nyc | you're failing during link time, so it could be trying to link with an old libparrot | ||
pmichaud | in particular, the link failures all appear (to me) to be the vtable functions. | 17:49 | |
[particle]nyc | yes | ||
TimToady | maybe we should reserve X' for builtin types for X in A..Z | 17:50 | |
pmichaud | +1 | ||
skids thinks maybe spec-reserving idents { <[A-Z]> ' <ident> } ... | |||
[particle]nyc | X'kcd | ||
why not <upper>? | |||
or whatever the real unicode type is | 17:51 | ||
s/type/class/ | |||
TimToady | Your code is Σ'd | ||
pmichaud | I wonder if S'task, T'Pring, or any of those characters might complain, though. | 17:52 | |
skids | Sorry A..Z or is that S'ry? | ||
[particle]nyc | I'm U'r M'n | 17:54 | |
17:54
azawawi left
17:55
azawawi joined,
azawawi left
|
|||
TimToady | I'd think O'Reilly would really like Perl 6, except for the fact that we reserved his name... | 17:56 | |
revenge for the camel :) | |||
pmichaud | Otoh, at least O'Reilly is a valid identifier in Perl 6. That's more than can be said for many languages. | 17:57 | |
skids | O'right common usage F' | ||
pmichaud | and we could reserve the O' section of the namespace for "really good documentation" | ||
TimToady | std: F*d | ||
p6eval | std 26706: OUTPUT«Undeclared name: F used at 1 Undeclared routine: d used at 1 ok 00:02 35m» | ||
17:58
scook0_ joined
|
|||
pmichaud | ruoso: you're having difficulty getting the captures? | 17:59 | |
17:59
azawawi joined,
Aisling left
|
|||
pmichaud | It looks to me as though they should simply be in $<subrx> | 17:59 | |
ruoso | pmichaud, I got a little further with that... | ||
now I need to be able to use a match as a capture | |||
17:59
Aisling joined
|
|||
pmichaud | "use a match as a capture..."? | 17:59 | |
matches are already captures. | 18:00 | ||
18:00
scook0 left
|
|||
ruoso | when I try to do self.run-action($<subrx>.ast, |$<subrx><rx>) | 18:00 | |
it dies | |||
moritz_ | how so? | 18:01 | |
pmichaud | rakudo has no clue how to do |$<subrx><rx>, afaik | ||
ruoso | ah... right... | ||
pmichaud | I know rakudo can do |@array and |%hash... but I think that's it for now. | ||
ruoso | ok.. | ||
so if I | |||
my %a = $<subrx><rx>; my @a = $<subrx><rx>; foo(|@a, |%a); | 18:02 | ||
would that work? | |||
18:02
japhb joined
|
|||
pmichaud | it might -- I'm not sure what will happen when $<subrx><rx> gets copied into %a. | 18:02 | |
my %a := ... might work in that case. | |||
moritz_ | you'll need %(...) and @(...) before the assignment | ||
(presumably) | |||
pmichaud | and yes, what moritz++ said. | ||
time for me to grab some lunch, and then really focus on $otherjob for a while. | 18:04 | ||
18:16
abra left
|
|||
PhatEddy | Given our discussion on catching the Null PMCs, might eval_perl6_lives_ok and eval_platform_lives_ok (no dies) be plausible additions to Test.pm. | 18:19 | |
We could fake with string pattern matching for now ... | 18:20 | ||
(sorry about the m'ss'ng p'nct'ti'n) | |||
azawawi | pmichaud, jnthn: ok, rakudo worked now on a fresh directory. must be something missing in realclean/clean. thx | ||
pugs_svn | r26707 | lwall++ | slight braino | 18:21 | |
18:21
LadyLunacy joined
18:22
mizioumt joined
|
|||
PerlJam | TimToady: heh, I was just about to make that change. | 18:27 | |
szabgab | azawawi, fixed some Padre code in your Plugin | 18:28 | |
azawawi | szabgab: hi there :) | 18:32 | |
szabgab | yeah , hi me :-) | ||
when are we going to have a perl 6 debugger in Padre ? | 18:33 | ||
ruoso | rakudo: sub bar { }; sub foo (*@_, *%_) { bar(|@_, |%_) }; foo(); | 18:34 | |
moritz_ | probably two days after we have the first Perl 6 debugger at all | ||
p6eval | rakudo ee7d45: ( no output ) | ||
18:35
ZuLuuuuuu left
|
|||
azawawi | pmichaud: after investigating the win32 build problem, it seems that neither clean/realclean delete generated files in rakudo pmc/ | 18:39 | |
18:39
mizioumt left
|
|||
azawawi | pmichaud: after removing them; rakudo win32 build worked again. | 18:40 | |
18:43
kaether left
18:46
mtve joined,
desertm4x joined
18:49
amoc left
|
|||
ruoso | considerign I have a token like token { <a> <b> } | 18:49 | |
is there a way for me to expand the captures of <b> as if it was inlined, instead of being a subtoken? | 18:50 | ||
PhatEddy | I counted about 40 perl6 rts, either open or new, with Null PMC in the title. find/grep through t/spec turned up only one of the rt#s ... | ||
moritz_ | ruoso: $/ = $<b> | ||
or maybe $/ := $<b> | 18:51 | ||
ruoso | but that would override <a> wouldn't it? | ||
(and rakudo doesn't like it, anyway) | |||
moritz_ | ah, now I know what you mean | ||
don't think you can | 18:52 | ||
ruoso | hmm... | ||
moritz_ | (though I've wished for that functionality as well) | ||
<|b> | |||
ruoso | maybe I could change the match in a closure after that... | 18:53 | |
moritz_ | matches are immutable, notionally | 18:54 | |
18:54
pmurias left
18:58
Kisu left
|
|||
pmichaud | azawawi: perhaps you could do a "make realclean" and let us know which files are getting left behind...? | 18:59 | |
azawawi | pmichaud: sure... but im new to git; how do i get a list of ignored files? | 19:02 | |
pmichaud | from a built copy of rakudo, just do 'make realclean' and then let us know which files are in the directory. | 19:05 | |
There are only six that are part of the repository. | |||
mutablevar.pmc p6invocation.pmc perl6scalar.pmc | |||
objectref_pmc.template perl6multisub.pmc perl6str.pmc | |||
so any files outside of those six ought to be removed by 'make realclean' | |||
Infinoid | That realclean issue sounds like rt.perl.org/rt3/Public/Bug/Display.html?id=65006 | 19:07 | |
Does the patch attached to that ticket help? | |||
19:08
r0bby joined
|
|||
ruoso | does rakudo support slurpy named arguments? | 19:08 | |
pmichaud | yes. | ||
(slurpy named arguments: yes.) | |||
(patch attached to ticket: probably yes.) | |||
I'll apply the patch in 65006, just a sec. | 19:09 | ||
Infinoid | LylePerl++ for providing the patch | ||
I had initially balked at how some lines had double-backslashes but others don't, but it turns out it's only needed for wildcards | |||
pmichaud | same here. | 19:10 | |
azawawi | pmichaud: it seems that it is the issue im talking about. i am seeing *.o all over rakudo src/... | ||
pmichaud | azawawi: agreed. | ||
ruoso | pmichaud, what about mixing explicit named args with |%named? | ||
pmichaud | ruoso: I'm pretty sure that works. | ||
ruoso: it might not work if there are duplicate named args, though. | |||
19:11
mizioumt joined
|
|||
ruoso | not the case... althought still not working... | 19:11 | |
moritz_ | rakudo: sub a(:$b){say $x }; my %h = b => 5; say a(|%h) | ||
p6eval | rakudo ee7d45: OUTPUT«Scope not found for PAST::Var '$x' in acurrent instr.: 'parrot;PCT;HLLCompiler;panic' pc 146 (src/PCT/HLLCompiler.pir:105)» | ||
moritz_ | rakudo: sub a(:$b){say $b }; my %h = b => 5; say a(|%h) | ||
p6eval | rakudo ee7d45: OUTPUT«51» | ||
pmichaud | looks like it works :) | ||
ruoso | rakudo: sub a(*%_) { say %_<a> }; my %h = a => 5; say a(|%h); | 19:12 | |
p6eval | rakudo ee7d45: OUTPUT«51» | ||
ruoso | rakudo: sub a(*@_, *%_) { say %_<a>; say @_[2]; }; my @a = 1,2,3; my %h = a => 5; say a(|@a, |%h); | ||
p6eval | rakudo ee7d45: OUTPUT«531» | 19:13 | |
ruoso | hmm.... | ||
rakudo: class A { method a(*@_, *%_) { say %_<a>; say @_[2]; } }; my $o = A.new; my @a = 1,2,3; my %h = a => 5; $o.a(|@a, |%h); | 19:15 | ||
p6eval | rakudo ee7d45: OUTPUT«53» | ||
ruoso | rakudo: class A { method a($b, *@_, *%_) { say %_<a>; say @_[2]; } }; my $o = A.new; my @a = 1,2,3; my %h = a => 5; $o.a(9, |@a, |%h); | 19:16 | |
p6eval | rakudo ee7d45: OUTPUT«53» | ||
ruoso | I don't get it... it looks very much like this in the code I'm trying... | ||
azawawi | ruoso: hi | ||
ruoso pushing to github | |||
azawawi, hi | |||
azawawi | ruoso: is development on mildew on github or something since im not seeing any activity here in pugs repo... | 19:17 | |
ruoso | azawawi, there has been a stall this week... but it's still in the pugs repo | ||
pmichaud, github.com/ruoso/faz/blob/14156c09b...patcher.pm | |||
about line 66 | 19:18 | ||
azawawi | ruoso: cool :) | ||
19:18
nihiliad left
|
|||
pmichaud | maybe try it with a binding for %named and @pos (instead of assignment) ? | 19:18 | |
jnthn takes a break from the -Opain task of refactoring p6object | |||
ruoso | pmichaud, changing to assignment was already me trying something else ;) | 19:19 | |
most importantly... | |||
the hash is there | |||
in the say before the call | |||
but is empty in the say inside the method | |||
19:20
donaldh left,
donaldh joined
|
|||
pmichaud | did you try defining run-action without the explicit *%_ ? | 19:20 | |
(since it gets one implicitly) | 19:21 | ||
ruoso will try now | |||
no deal | |||
pmichaud | are the positionals appearing as expected? | ||
and just the named arguments missing? | |||
ruoso | the @pos array is empty | ||
both sides | |||
but the explicit positional arg is there | 19:22 | ||
let me add a positional capture in the outermost token | |||
positionals failing too | 19:24 | ||
I think the problem is with the slurpy | 19:25 | ||
getting the expected items in the run-action signature gets the value | |||
both named and positional... | 19:26 | ||
pmichaud | checking... I think I might know what the problem is. | ||
ruoso | hah | ||
got it | |||
if I use the slurpy with a name different than @_ and %_ it works | 19:27 | ||
pmichaud | I think that rakudo currently thinks that any block with @_ and %_ gets those as arguments. | ||
which is wrong -- it should be only blocks that otherwise have placeholder vars. | 19:29 | ||
19:30
desertm4x left
|
|||
pmichaud | yes, looks like rakudo puts @_ or %_ as parameters to any block. | 19:30 | |
(in which they are used) | |||
TimToady: is it only blocks containing placeholders that get the implicit @_/%_ when used? | 19:32 | ||
for example: | |||
sub foo($x) { say @_.perl; } # does sub foo get a *@_ parameter? | |||
clearly: sub foo { say $^a.perl, @_.perl; } # sub foo($a, *@_) { ... } | 19:33 | ||
ruoso | pmichaud, yes... this issue was raised before once... | 19:34 | |
hmmm... just got into an unexpected issue... | 19:36 | ||
my action class has an "end" method | |||
and in order to allow customization via composition | 19:37 | ||
I call it by doing $action.*end | |||
it turns out that Any seems to have an "end" method as well (apparently from the list api) | |||
so it fails as it tries to call end there as well | |||
baest | pmichaud: hello, in the tests in parrot/t/compilers/pge/perl6regex/rx*, is it possible to test for exceptions, like parse errors (thrown exceptions) | 19:38 | |
pmichaud | baest: yes -- see rx_syntax for some examples | ||
ruoso | why does Any has a end method? | ||
pmichaud | we look for a pattern instead of 'y' or 'n' | ||
baest | pmichaud: cool, thanks | ||
pmichaud | ruoso: are you asking why it's defined in S32? | 19:39 | |
ruoso | pmichaud, no... I'm asking why rakudo implements it | 19:40 | |
pmichaud | ...because it's specced in S32. :-) | ||
ruoso | is it? | ||
where? | |||
19:40
desertm4x joined
|
|||
pmichaud | item end | 19:40 | |
our Any method end (@array: ) is export | |||
Returns the final subscript of the first dimension; for a one-dimensional | |||
array this simply the index of the final element. | |||
ruoso | er... that is in the Array section... | 19:41 | |
pmichaud | (Containers.pod) | ||
so is .elems, which we know is defined on Any. | |||
19:41
mizioumt1 joined
|
|||
pmichaud | as are .keys, .values, .kv, .pairs, etc. | 19:41 | |
ruoso | I strongly feel we should rethink that | 19:42 | |
pmichaud, but really... in Containers.pod it mention as part of the Array API, not Any | |||
pmichaud | Yes, but we already know that some things mentioned as part of Array/List/Str/Num are really defined on Any. | 19:43 | |
so Containers.pod is known to be wrong in a few areas already. | 19:44 | ||
ruoso | pardon me for my memory... but why do we know that? | ||
moritz_ | ruoso: you can't rely on type information in S29 and S32* | ||
pmichaud | Because TimToady has declared it so | ||
ruoso | TimToady, around? | ||
pmichaud | specific known cases are .grep, .elems, and .join | ||
1.join(' ') # "1" | 19:45 | ||
19:45
goksie joined
|
|||
pmichaud | 3.elems # 1 | 19:45 | |
ruoso | btw... Faz works nwo | ||
baest | pmichaud: I'll send the quote word literal patch for pge to you tomorrow. I have some time in the weekend, do you have any other stuff in the pipeline that I could do? | 19:46 | |
ruoso | it does the action processing completely... there are some issues that need to be solved in rakudo yet... (mostly contextual variables) | ||
pmichaud | I'm not arguing that .end _should_ remain part of Any; I'm just saying that that's how Rakudo has been consistently interpreting the spec, except in places where it obviously makes little sense | ||
19:46
ungluecksfee joined
|
|||
pmichaud | I started working on contextuals this morning... should have it done on Friday. | 19:46 | |
19:46
mizioumt left
|
|||
pmichaud | (Would be done sooner but $otherjob commands my time today/tomorrow) | 19:46 | |
ruoso | pmichaud, I see... but I've just got at this point in a behavior that really scared me out | 19:47 | |
$foo.*bar is a good way of implementing plugins by composition | |||
moritz_ | I know one more (small) PGE bug... ~ reports nonsense in the error message if the terminator is not a literal | ||
19:47
hercynium joined
|
|||
moritz_ | rakudo: 'a' ~~ /~ a [b]/ | 19:47 | |
p6eval | rakudo ee7d45: ( no output ) | ||
moritz_ | rakudo: 'a' ~~ /~ a [b]/ || say $! | 19:48 | |
p6eval | rakudo ee7d45: OUTPUT«Use of uninitialized value» | ||
moritz_ | uhm, where can I find the error message? | ||
ruoso | I realised we've been too tolerant on what should be part of the Any API... | 19:49 | |
and $foo.*bar will suffer a lot from that | |||
pmichaud | ruoso: I'm open for changes or clarifications to the spec, that's for sure. | ||
ruoso | I think that's something we weren't taking into perspective | ||
pmichaud | more particularly, we really ought to start updating S32 with the things we do "know" already. | 19:50 | |
like eliminating type constraints when they really shouldn't be there. | |||
moritz_ is also scared by the shear number of methods in Any | |||
ruoso renaming end to finalize in Faz in the meanwhile | |||
ruoso s/finalize/finish/ | 19:51 | ||
baest | moritz_: looks something I should be able to do, but I'm not sure that I understand what the problem is | 19:54 | |
ruoso | it's cool how Perl 6 makes some things so damn easy... | ||
pmichaud | baest: I don't know of many tasks off the top of my head | ||
ruoso | Faz almost reimplements the core of the Catalyst framework | ||
moritz_ | baest: and I can't demonstrate it because I don't see how the error message can be made available | ||
19:54
nihiliad joined
|
|||
pmichaud | moritz_: you're seeing an error message somewhere, yes? | 19:55 | |
so a sample rakudo program would demonstrate it, even if p6eval won't show it. | |||
baest | pmichaud: ok, it might be you had something. I'll find something | ||
moritz_ | pmichaud: no. The point of ~ in regexes is that it should provide some good error messages... | ||
pmichaud: since it doesn't throw an exception anymore, I don't know how to access that error message | 19:56 | ||
pmichaud | baest: I'll be eager to look at/apply the double-quote patch. | ||
moritz_: oh, I thought you were referring to a parsing error in the regex. | |||
moritz_ | pmichaud: iirc TimToady said it should be in $!, if it's not a thrown exception | ||
baest | pmichaud: cool, you have it, right? | ||
pmichaud | rakudo: 'a' ~~ /~ a [b] [c]/ | ||
p6eval | rakudo ee7d45: ( no output ) | ||
pmichaud | rakudo: 'ab' ~~ /~ a [b] [c]/ | ||
p6eval | rakudo ee7d45: OUTPUT«Unable to parse , couldn't find final acurrent instr.: 'parrot;PGE;Match;FAILGOAL' pc 3008 (compilers/pge/PGE/Regex.pir:477)» | ||
moritz_ | ah | 19:57 | |
I got that wrong somhow | |||
pmichaud | it needed a 'b' to match. | ||
moritz_ | rakudo: 'ab' ~~ / ~ [a] b c / | ||
pmichaud | it's easier to see with | 19:58 | |
p6eval | rakudo ee7d45: OUTPUT«Unable to parse , couldn't find final [current instr.: 'parrot;PGE;Match;FAILGOAL' pc 3008 (compilers/pge/PGE/Regex.pir:477)» | ||
pmichaud | rakudo: 'abc' ~~ / a ~ c b / | ||
p6eval | rakudo ee7d45: ( no output ) | ||
pmichaud | rakudo: 'ab' ~~ / a ~ c b / | ||
moritz_ | baest: that's the error message I mean | ||
p6eval | rakudo ee7d45: OUTPUT«Unable to parse , couldn't find final ccurrent instr.: 'parrot;PGE;Match;FAILGOAL' pc 3008 (compilers/pge/PGE/Regex.pir:477)» | ||
moritz_ | baest: it says couldn't find final [ | ||
baest | pmichaud: the double-quote patch. I think I did send it to you, but I'm not sure | ||
pmichaud | baest: oh yes, you did. I meant to say I'm eager to see the quote word literal patch (sorry!) | 19:59 | |
moritz_ | ie the first character of the regex to be matched, even if it's not a literal | ||
19:59
azawawi left
|
|||
pmichaud | yes, we ought to be able to fix that error message somehow. | 19:59 | |
moritz_ | if it's not easy to extract a good target for the error message, it would be nicer to just say "couldn't find delimiter" | 20:00 | |
or so | |||
baest | pmichaud: oh, yes that was more difficult (and fun) :) | ||
pmichaud | rakudo: 'ab' ~~ / a ~ 'c' b / | ||
TimToady | phone | ||
p6eval | rakudo ee7d45: OUTPUT«Unable to parse , couldn't find final 'c'current instr.: 'parrot;PGE;Match;FAILGOAL' pc 3008 (compilers/pge/PGE/Regex.pir:477)» | ||
pmichaud | I'm guessing that [b] doesn't set its .to and .from properly. | ||
baest | moritz_: ah, the wrong char is reported | 20:01 | |
moritz_ | baest: exactly | ||
ruoso | pmichaud, is there some way to Dump a regex in rakudo? | ||
pmichaud | ideally I'd expect it to say "...couldn't find final [b]..." | ||
ruoso: _dumper($/) | |||
baest | but shouldn't [b] just be 'b', that should be the same | ||
pmichaud | oh wait | ||
you said regex | |||
no. | |||
a regex is just a sub. | |||
at execution time, it's already been turned into code. | 20:02 | ||
ruoso | right... | ||
TimToady | nick and I are getting lonely | ||
pmichaud | on my way | ||
having to locate telephone apparti | |||
apparati | |||
moritz_ | rakudo: 'ab' ~~ / ~ 'b' a c / | 20:03 | |
p6eval | rakudo ee7d45: OUTPUT«Unable to parse , couldn't find final 'b'current instr.: 'parrot;PGE;Match;FAILGOAL' pc 3008 (compilers/pge/PGE/Regex.pir:477)» | ||
moritz_ | rakudo: 'ab' ~~ / ~ (b) a c / | ||
p6eval | rakudo ee7d45: OUTPUT«Unable to parse , couldn't find final (current instr.: 'parrot;PGE;Match;FAILGOAL' pc 3008 (compilers/pge/PGE/Regex.pir:477)» | ||
baest | weird it says final. It wonder if it know it is the last one | 20:04 | |
s/I/It/ | |||
20:04
LadyLunacy left
|
|||
pugs_svn | r26708 | lwall++ | [STD] better error message for 'for lines {...}' | 20:05 | |
20:05
mizioumt1 left
20:08
masak joined
|
|||
masak | I won't stay long. | 20:10 | |
jnthn | oh noes! | 20:11 | |
masak | just thought I'd update Rakudo to chase the spec changes I introduced today. | ||
jnthn | yay :-) | ||
masak | (change the signature of .comb, implement .words) | ||
in fact, I did this already. :) | |||
took just under a minute. | |||
running spectests now. | |||
20:13
ejs joined,
kaether joined
|
|||
masak | ok, t/spec/S32-str/comb.t is going to break badly. | 20:13 | |
maybe I should just rename it words.t :P | |||
jnthn -> nom, bbs | |||
baest | moritz_: it looks like the ~ actually upsets the PGE parsing of the regex. I'll be happy to take a look at it in the weekend if nobody beats me to it | 20:14 | |
20:14
mizioumt joined
|
|||
baest is off | 20:15 | ||
ruoso | masak, hmm... you're not on #november-wiki... | 20:20 | |
I just sent you a message there ;) | 20:21 | ||
20:21
pmurias joined
|
|||
masak | ruoso: I'm only partially here, that's why... | 20:21 | |
pmurias | ruoso: do you use a debugger when working on smop? | 20:22 | |
ruoso | pmurias, ddd | ||
or gdb if the problem is not so hard | |||
Tene | pmichaud: will i be stepping on any toes if i work on refactoring rakudo's trait handling to get it up to spec? or did you do that already? | 20:31 | |
Tene git log | |||
moritz_ | Tene: more likely jnthn will do | 20:32 | |
Tene nods. | |||
20:35
goksie left
20:38
Jedai joined
|
|||
pmichaud | Tene: I think it's not too far away from spec now. We have to consider how we want things like 'readonly', 'rw', etc. to work. | 20:40 | |
but I'm fine with aiming to bring it closer to spec. | |||
pugs_svn | r26709 | masak++ | [S32-str] | 20:41 | |
r26709 | masak++ | * changed comb.t to new specced signature | |||
r26709 | masak++ | * added words.t which partially takes comb's place | |||
jnthn | We need some parsing improvements to be able to parse multi trait_auxiliary:is | ||
pmichaud | that may actually happen soonish (like, within ~10 days) | ||
jnthn | I wasn't planning to hack on traits stuff for a copule of weeks myself... | ||
pmichaud | I'm rapidly wanting to define builtins in p6. | ||
jnthn | Sure. | ||
That'd be nice. :-) | |||
pmichaud | and parsing things like "trait_auxiliary:is" would be part of that. | ||
20:42
bacek left
|
|||
moritz_ | rakudo: multi trait:auxiliary:<is> { }; say "alive"; | 20:43 | |
p6eval | rakudo ee7d45: OUTPUT«Malformed routine definition at line 1, near "trait:auxi"current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:86)» | ||
dalek | kudo: a40974a | jnthn++ | src/ (2 files): Use getinterp instead of new ParrotInterpreter to improve performance. |
||
kudo: 45ddf59 | jnthn++ | src/builtins/ (2 files): Use getinterp instead of new ParrotInterpreter to improve performance (part 2...missed some!) |
|||
moritz_ | rakudo: multi trait_auxiliary:<is> { }; say "alive"; | ||
p6eval | rakudo ee7d45: OUTPUT«Malformed routine definition at line 1, near "trait_auxi"current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:86)» | ||
moritz_ | masak: it's nice to write builtins in Perl 6, no? ;-) | 20:44 | |
masak | moritz_: surprisingly painless. :) | 20:45 | |
moritz_ | aye ;-) | ||
pmichaud squirrels away that quote for future use. :-) | |||
ruoso | writing everything in Perl 6 is surprisingly painless | ||
pmichaud | painless for *some* :-) | 20:46 | |
ruoso | I'm still surprised how easy it was to get Faz running from some sketches... | ||
masak | ruoso: but it takes some time to write everything. | ||
std: macro f { '1 + 1' }; say f() | |||
p6eval | std 26709: OUTPUT«ok 00:02 36m» | ||
literal | Faz? | ||
ruoso | github.com/ruoso/faz/tree/master | 20:47 | |
masak | std: quasi { say "foo" }; | ||
p6eval | std 26709: ( no output ) | ||
masak | TimToady: ^ | 20:48 | |
why didn't it say "ok"? | |||
mberends grabs the proto pumpkin while masak's not looking | |||
masak | mberends: just make sure to pull, 's all. | ||
Su-Shee | how do I say perl 5's wantarray in perl 6? | ||
jnthn | You don't. | 20:49 | |
masak | mberends: I made a commit minutes ago. | ||
dalek | kudo: 35c6746 | masak++ | src/setting/Any-str.pm: [setting/Any-str] implemented .words |
||
kudo: 6b962c2 | masak++ | src/setting/Any-str.pm: [setting/Any-str] changed signature of .comb |
|||
TimToady | std: ; | ||
kudo: 615936e | masak++ | t/spectest.data: [spectest.data] added S32-str/words.t |
|||
p6eval | std 26709: OUTPUT«ok 00:02 34m» | ||
masak | my work here is done. | ||
good night, peeps. | |||
pmichaud | masak++ | ||
jnthn | Su-Shee: There's no wantarray kinda thing in Perl 6. | ||
Su-Shee: Instead, you return something that behaves the right way in different contexts. | |||
masak | dalek reports commits out of order! | ||
dalek-- | |||
20:50
masak left
|
|||
TimToady | hmm, works okay here | 20:50 | |
20:50
desertm4x left
|
|||
jnthn brb | 20:50 | ||
TimToady | std: quasi { say "foo" }; | 20:51 | |
p6eval | std 26709: OUTPUT«ok 00:04 40m» | ||
TimToady | must've been recompiling or something | ||
ruoso | TimToady, I've just (about an hour ago) hit a design issue in the API | 20:52 | |
moritz_ | TimToady: it did report it as a pass | ||
TimToady: just obscured by dalek | |||
TimToady | no, that was me | ||
his explicitly said (no output) | 20:53 | ||
moritz_ | ah | ||
before the ; | |||
ruoso | TimToady, basically... the Any API is too big, and causing unexpected effects when using $foo.*bar (backlog for more details) | ||
ruoso throws the issue in the airs and throws himself out of the chair in order to go home... | 20:54 | ||
pmichaud | start of relevant backlog: item end | ||
our Any method end (@array: ) is export | |||
Returns the final subscript of the first dimension; for a one-dimensional | |||
argggh | |||
sorry | |||
start of relevant backlog: irclog.perlgeek.de/perl6/2009-05-06#i_1123715 | 20:55 | ||
TimToady | I think C<hides> was invented to stop .* propagation | ||
ruoso | hmmm... that's a new one to me | ||
TimToady | classes intended to be used with .* have to be specially written anyway | 20:56 | |
ruoso | so all methods in Any have this "hides" thing? | 20:58 | |
pmichaud | I would think that a derived class would use <hides> to obscure the ones in Any. (Haven't read the spec... reading now.) | ||
TimToady | or Any is marked "is Hidden" | 20:59 | |
20:59
iblechbot left
|
|||
TimToady | afk & | 21:00 | |
ruoso | class Action hides Any ? | ||
pmichaud | Yes. | ||
ruoso | but what if Action is a Role | ||
is role Action hides Any still valid? | |||
21:01
km2 left
|
|||
ruoso really decommute & | 21:01 | ||
21:01
ruoso left
21:08
ungluecksfee left
21:15
Whiteknight joined
21:20
skids left
21:22
donaldh_ joined
21:23
pmurias left
21:33
ejs left
21:39
hercynium left
21:40
Su-Shee left
|
|||
TimToady | in any case the base class for a .* method should probably use 'lastcall' in that final method, which would prevent propagation into Any | 21:41 | |
(it's possible that should be "is lastcall" as a trait on the method so it can return normally) | |||
jnthn | TimToady: Did you see my question earlier about .* and an explicit candidate list? | 21:42 | |
TimToady | it just calls them all till "lastcall" suppresses the rest | 21:47 | |
jnthn | OK, but suppose I have | 21:49 | |
class A { method m { } }; class B is A { method m { nextsame } } | |||
my $x = B.new; my @cands = $x.WALK(:name<m>); | 21:50 | ||
$x.*@cands(); | |||
How many times is m in class A called? | |||
That is, does the "nextsame" in B's method m consume one of the candidaets in the "iterator" | |||
And thus when we fall back into the .* dispatcher it sees that there is nothing left? | 21:51 | ||
TimToady | it's erroneous to mix .* and "next" | 21:52 | |
jnthn | Oh? | ||
OK. | |||
TimToady | as I said earlier, you have to write your methods specially to use .* | 21:53 | |
it's not transparent | |||
jnthn | OK, so .* does not give nextsame etc a candidate list to work with, so it's an error. | ||
TimToady | it could still mean something | 21:54 | |
but it would mean "skip this iteration and don't return a value in the list" | |||
next means "I'm not here" | |||
jnthn | Hmm. | ||
TimToady | so it's not erroneous in that sense, I guess | 21:55 | |
jnthn | That's a tad trickier to handle, but do-able I guess. | ||
What about if I do | |||
$x.m() | |||
TimToady | it's just a different dispatcher loop without a last | ||
jnthn | In the above example. | ||
I didn't say there was a list of candidates to call here. | 21:56 | ||
TimToady | has a last in the dispatcher's loop after first success | ||
there's always potentially a list of candidates for a method call | |||
if there are parent classes | |||
jnthn | OK, that's what I'm getting at | ||
So with class A { method m { } }; class B is A { method m { nextsame } } | |||
TimToady | .@foo overrides that list | ||
jnthn | my $x = B.new; $x.m; | ||
Then the nextsame will call m in A? | 21:57 | ||
Or rather, defer to... | |||
TimToady | yes | ||
jnthn | OK, I understand that bit then. :-) | ||
TimToady | but if you call it .@foo, it defs to the next one in @foo | ||
jnthn | Yes. | ||
TimToady | whatever dispatcher it's in the middle of, that's the one it iterates | 21:58 | |
jnthn | And .$foo (where $foo is a Callable) just calls that, and a nextsame in that is an error because there's no next candidate? | ||
TimToady | likely | ||
jnthn | OK. | 21:59 | |
TimToady | arguably it's just a function call written as single dispatch | ||
but ."$foo" is symbolic, so calls A | |||
jnthn | That just interpolates $foo as a string, right? | ||
TimToady | yes | ||
pmichaud | open question from scrollback, before I close my window where I was working on it.... | 22:00 | |
19:32 <pmichaud> TimToady: is it only blocks containing placeholders that get the implicit @_/%_ when used? | |||
TimToady | which would you rather? | 22:03 | |
pmichaud | from a rakudo implementation perspective, it's -slightly- easier if we allow it for any signatured block. | 22:04 | |
22:04
mikehh_ joined
|
|||
pmichaud | but only very slightly. User-level concerns would weigh stronger. | 22:04 | |
TimToady | I can see that { @_ } might be surprising occasionally, but it seems more consistent | 22:05 | |
so I think I'm okay with that | |||
pmichaud | well, I'm presuming the block has to have a signature of some sort before we get the magical @_ | ||
otherwise it's a simple lexical | |||
TimToady | but does it autogen a sig like a placeholder? | ||
pmichaud | I hope not. | 22:06 | |
Otherwise we end up with an inability to get to a sub's @_ from a nested block. | |||
TimToady | that's what I meant when I said "surprising" | ||
pmichaud | Oh. | ||
My original question was presuming the block had some sort of other signature generator already in place. | |||
TimToady | well, only placeholders do that so far, right? | 22:07 | |
pmichaud | Correct. | ||
TimToady | but we could automatically allow autoslurpy of @_ and %_ on any existing sig | 22:08 | |
if there isn't already a slurpy there | |||
-> { @_ } would work then | |||
but it still seems a bit chancey | |||
*@_ = OUTER::<@_> maybe | 22:09 | ||
pmichaud | actually, I think that's the case that decides it for me (more) | ||
moritz_ doesn't like -> { @_ } | |||
pmichaud | -> $a, $b { @_ } | ||
TimToady | wait, you can't default a slurpy :) | ||
pmichaud | I'd expect the @_ to be the OUTER @_, and not an implicit *@_ on the pointy block. | ||
TimToady | well, I guess we can restrict it to placeholders then | 22:10 | |
pmichaud | because then the pointy block would slurp up all of the values of the loop | ||
if we had | |||
for @list -> $a, $b { @_ } | |||
we'd only get one iteration. | |||
oh, maybe not. | |||
but you kinda get the idea. | |||
@_ becomes a bit too magical in that case. | |||
lambdabot | Maybe you meant: . ? @ v | ||
TimToady | given our other talks about $a, $b, $c? I'd think it'd slurp all the args | 22:11 | |
pmichaud | right | ||
TimToady | well, I gotto run away for a while | ||
pmichaud | I'm wondering if a sub with a slurpy positional ends up with .count == Inf | ||
moritz_ | if I explicitly write I signature, I wouldn't like the idea of it getting messed with by some internal magic | ||
TimToady | anything else hanging fire? | ||
moritz_: agreed | |||
pmichaud | no, I just needed to know that one so I can add the correct fix to Rakudo. | ||
TimToady | probably be back online later tonight | ||
pmichaud | any other fires from me will have to wait until Friday, I suspect. | 22:12 | |
TimToady | driving to Santa Rosa & | 22:13 | |
jnthn | pmichaud: We have a test that looks like this: | 22:14 | |
(for P6object) | |||
obj = proto.'new'() | |||
isa_nok(obj, 'P6Protoobject', objname) | |||
22:14
exodist left
|
|||
jnthn | Oh, hmm, let me think how to ask this... :-) | 22:15 | |
pmichaud | okay to deprecate/change. | ||
jnthn | Ok. | ||
I mean, everything is an instance of the Protoobject PMC now. | |||
pmichaud | I don't think anything depends on that. But it is nice to have some way to ask "are you a protoobject" | ||
jnthn | $thingy === $thing.WHAT | ||
pmichaud | that's not exactly the same. | 22:16 | |
jnthn | or $thingy =:= $thing.WHAT | ||
No, true. | |||
pmichaud | there's not ever just one protoobject | ||
Dog{ :name<fido> } is still a "protoobject" | |||
jnthn | Yeah, of course. | ||
pmichaud | but it's not =:= Dog. | ||
jnthn | True. | 22:17 | |
moritz_ | uhm, =:= only queries containers, not types? | ||
jnthn | I mean, I know how to make the information available. | ||
erm, rephrase | |||
pmichaud | That's fine. As long as there's a way to determine protoobject-ness, I'm happy. | ||
jnthn | I know how to determine it cheaply (in the PMC) | ||
I just don't know the best way to make it available. | |||
pmichaud | presumably we could expose it as a method or via some obscure vtable. | 22:18 | |
jnthn | not as a method, but as a vtable perhaps, yes. | ||
inspect_str is the obvious one. | |||
pmichaud | yes, except "inspect" really worries me at times. | ||
jnthn | Or get_pointer. You can do anything with get_pointer. ;-) | ||
pmichaud | because of its putative "cloning semantics". | ||
jnthn | That might be something we choose to fix in Protoobject. | 22:19 | |
pmichaud | Also, if what we have *isn't* a protoobject, I'd be a bit worried about running inspect_str on it. | ||
jnthn | True. | ||
That may not work out so well. | |||
Hmm. | |||
22:19
mikehh left
|
|||
jnthn | It needs to be some vtable thing I guess rather than a method. | 22:20 | |
pmichaud | So, is the Protoobject PMC analogous to P6protoobject or to P6opaque ? | ||
jnthn | p6opaque | ||
There is no p6protoobject as such after this though. | |||
pmichaud | I think I'd prefer it to _not_ be named Protoobject, then. | ||
because Protoobject really meant something else. | |||
jnthn | parrotopaque made most sense to me. | 22:21 | |
pmichaud | I hadn't quite made the connection that the PMC replacing P6protoobject would be the base class for all objects. | ||
I like Parrotopaque | |||
you can even capitalize the 'O' in that case, if you want. | |||
jnthn | :-P | ||
pmichaud | Parr0t0paque. | ||
jnthn | Yeah, there's no separate proto-object thingy any more. | ||
There's just one thingy that is a proto by virtue of having no instance storage. | 22:22 | ||
pmichaud | so how do we implement .ACCEPTS on proto-object thingies, then? | ||
same way we do .defines and .Str ? | |||
that feels.... messy. | |||
jnthn | I can only see that we'd be able to intercept them. | 22:23 | |
pmichaud | I don't quite grok "intercept" in this case. | ||
jnthn | It is, but I guess it's a dispatcher decision. | ||
Currently in the defined vtable method I do | |||
pmichaud | You mean on every method dispatch to every object we'd be looking for special instances of protoobject thingies? | ||
jnthn | Well, we'd be saying "is this a proto" first and only then doing it. | 22:24 | |
pmichaud | what would be saying that? | ||
jnthn | The dispatcher in the meta-class probably should be. I'm fully expecting we'll cheat in the common case. | 22:25 | |
pmichaud | I'm having trouble seeing even the cheat. | ||
But essentially you're saying the dispatcher has to be aware of all proto-object specific methods? | |||
jnthn | Yeah. I'm not entirely sure I like that, but I don't see another way. | 22:26 | |
Of course | |||
pmichaud | I definitely don't like it. | ||
jnthn | We don't have to look at the method name. | ||
It looks more like how I have defined. | |||
Parrot_Protoobject_attributes *po = (Parrot_Protoobject_attributes*)PMC_data(SELF); | |||
if (!PMC_IS_NULL(po->attrib_store)) | |||
return SUPER(); | |||
else | |||
return 0; | 22:27 | ||
22:27
AzureStone left
|
|||
jnthn | That is, if we have storage allocated, we're an instance, do whatever an Object would do. | 22:27 | |
pmichaud | I understand it at the vtable level, yes. | ||
But I'm asking specifically about .ACCEPTS | |||
jnthn | Otherwise, we're undefined. | ||
OK, in this case our find_method would looke like the above. | |||
pmichaud | except we wouldn't return 0 | 22:28 | |
jnthn | Apart from instead of "return 0" we'd say something like "look in this set of proto-specific methods" | ||
Plus in p6opaque we won't call SUPER() but instead we'll have the Perl 6 dispatcher right there (in the p6opaque/default metaclass version). | |||
pmichaud | could those methods come from a Role or something like that? | ||
jnthn | We could have a way of saying "use the methods from this role" | 22:29 | |
(as the proto-fallback ones) | |||
pmichaud | I'm a bit more comfortable with that. | ||
jnthn | And it'd basically steal the role's methods hash. | ||
Essentially it comes the "proto-overrides" list. | |||
pmichaud | Does Perl 6 have a way to ask an object "are you a type object"? | ||
other than simply checking it for definedness? | 22:30 | ||
jnthn | It's hand-wavey. There's the Abstraction role. | ||
pmichaud | oh, type objects do Abstraction, yes? | ||
jnthn | But sicne the proto-object is just meant to be, well, a not-so-defined normal object... | ||
pmichaud | well, clearly the normal objects don't "do Abstraction" | ||
jnthn | How exactly Abstraction fits in isn't so clear to me. | 22:31 | |
pmichaud | I still think that type objects (protoobjects) differ by a role of some sort. | ||
Abstraction being the obvious case. | |||
jnthn | They can lie about doing the Abstraction role easy enough. And that's probably the easiest way. | ||
We can't just go in-place mixing in to a proto-object though. | 22:32 | ||
The proto-object and the real objects today are different types so far as Parrot is concerned, and I don't think that's really the way things should be. | |||
22:33
mberends left
|
|||
jnthn | (where real object = the instance of) | 22:33 | |
pmichaud | it sounds to me like a type object is ultimately something that .does(Abstraction) -- no matter how we internally cheat to get it that way. | ||
jnthn | Not least because S12 says otherwise, but because even in writing the meta-class extra bits recently I've seen places where we're going to have to cheat elsewhere if we don'thave it like that. | 22:34 | |
Yes, I agree. | |||
.does(Abstraction) being true is The Way. | |||
pmichaud | it doesn't bother me that they're different types -- since they actually respond differently. | ||
jnthn | It does bother me. | ||
I think it's going to cause us problems. | |||
pmichaud | in the Parrot version of this, I think it should be .does("abstraction") | 22:35 | |
jnthn | I can make it that way. | ||
pmichaud | in the same sense that Parrot currently has a "scalar" type | ||
jnthn | *nod* | ||
pmichaud | (and "array" and "hash") | ||
then in the Rakudo version, we promote to checking for the Abstraction role | 22:36 | ||
jnthn | *nod* | ||
pmichaud | and the Abstraction/abstraction role(s) can then do the cheating to say "okay, are you _really_ an abstract object?" and provide the alternate method definitions. | ||
s/abstract object/type object/ | |||
jnthn | Yes. | 22:37 | |
pmichaud | because we have to overload not only .ACCEPTS, but also various postcircumfixes and lots of other things that are type-object-dependent | ||
jnthn | Right. | ||
As you can imagine, this isn't the most -Ofun refactor. I'd not be doing this if I didn't think we really needed to. | 22:38 | ||
pmichaud | anyway, for now I'm happy with $I0 = does $P0, "abstraction" as being the "are you a type object" test. | ||
jnthn | OK, great. | ||
pmichaud | for backwards compatibility, we might temporarily overload VTABLE_isa to explicitly check for "P6protoobject" until we can get through a deprecation cycle. | 22:39 | |
(since non-protoobjects would obviously return false in that case.) | |||
i.e., we can have a false P6protoobject class that hangs around for backwards compability until we can fully deprecate it. | |||
I _hope_ not too many people have installed methods in P6protoobject. | |||
(if they have, we could have our dispatcher check for those also for a while) | 22:40 | ||
jnthn | I find it quite unlikely. | ||
Heh, we could go look up the methods in P6protoobject and use them as our abstraction ones... | |||
pmichaud | Right | ||
That might be a nice intermediate. | |||
But deprecate it in favor of some other better-named role for the future. | 22:41 | ||
(or alias it somehow) | |||
jnthn | OK | 22:43 | |
22:56
AzureStone joined
|
|||
mizioumt | help /me | 22:56 | |
oops, sorry | 22:58 | ||
22:59
ruoso joined
23:01
frew|work joined
23:03
frew|wor1 left
|
|||
jnthn | rakudo: say Int === Int | 23:03 | |
p6eval | rakudo 615936: OUTPUT«1» | ||
jnthn | rakudo: say Int{ :Int(42) } === Int | 23:04 | |
p6eval | rakudo 615936: OUTPUT«1» | ||
jnthn | Hmm. | ||
rakudo: say Int{ :Int(42) } =:= Int | |||
pmichaud | I'm gone for the rest of the evening and most of tomorrow -- gotta finish my $otherjob stuff. | ||
p6eval | rakudo 615936: OUTPUT«0» | ||
pmichaud | See you all late tomorrow night, or Friday. | 23:05 | |
jnthn | pmichaud: OK, hope it goes smoothly. | ||
pmichaud | Me too, although I think it will all go fine. | ||
jnthn | :-) | ||
pmichaud | later | ||
jnthn | cu | ||
rakudo: say Int{ :Int(42) }.WHAT =:= Int.WHAT | |||
p6eval | rakudo 615936: OUTPUT«1» | ||
23:08
donaldh_ left
23:15
samlh joined,
payload joined
|
|||
Infinoid | aa | 23:16 | |
(oops) | |||
meppl | good night | 23:17 | |
23:19
meppl left
23:20
donaldh left,
donaldh joined
23:26
hercynium joined
23:30
Kyosuke_Kiryu joined
23:33
Kyosuke_Kiryu left
23:36
DemoFreak left
|
|||
ruoso | jnthn, btw... the idea for the object to lie about .does(Abstraction) is interesting... I'm still unsure on how that relates to uninitialized values and autovivifiable objects... | 23:53 | |
23:54
skids joined
|
|||
ruoso | since an uninitialized object is a type of Failure, and failures are undefined as well | 23:54 | |
which mean they don't have instance storage | |||
jnthn | ruoso: definedness is not just about "doesn't have instane storage" | 23:55 | |
ruoso | what else is it about? | ||
jnthn | It's up to the HOW how it chooses to dispatch .defined (if I remember my S12 correctly) | 23:56 | |
Though at a more basic level I guess you can write a .defined method. | |||
ruoso | yes... Object implements .defiend | ||
.defined | |||
jnthn | Sure, but you can override it to do what you like. | ||
But this means .defined isn't a way really to say "is this a proto-object or not". | 23:57 | ||
ruoso | that's my point... | ||
how do you say that? | |||
23:57
justatheory left
|
|||
jnthn | Well, that's what the discussion was about. But I'm guessing "says is does the Abstraction" role could be an answer... | 23:57 | |
ruoso | right... you're just moving the question to someone else ;) | 23:58 | |
jnthn | Since type-y things are meant to. | ||
ruoso | how do a object knows if it is a type object or not | ||
how does it decide to say true to .does(Abstraction) | |||
jnthn | Oh, for *that* I'm just going off "does it have instance storage" for type objects. | ||
ruoso | heh... | 23:59 | |
jnthn | I'm curious though how in smop you plan to handle methods that dispatch differently in the type object? | ||
e.g. 42 ~~ Int is very different from 42 ~~ 1 |