»ö« | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, alpha:, pugs:, std:, or /msg p6eval perl6: ... | irclog: irc.pugscode.org/ | UTF-8 is our friend!
Set by moritz_ on 25 June 2010.
masak sorear: which Rakudo doesn't have. :/ 00:00
jnthn alpha: say $*CWD 00:06
p6eval alpha 30e0ed: OUTPUT«/home/p6eval/rakudo-alpha␤»
00:06 cono left
jnthn rakudo: say $*CWD 00:06
p6eval rakudo d27eb3: OUTPUT«Null PMC access in isa_pmc()␤current instr.: 'parrot;P6protoobject;ACCEPTS' pc 1376 (runtime/parrot/library/P6object.pir:803)␤»
00:23 bjarneh left, takadonet joined
takadonet is anyone here going to ISMB? 00:24
00:24 supernovus joined, lkk- joined
lue ohai 00:26
00:26 tylercurtis left
jnthn hellue! 00:27
masak well hellue.
lue if you remember my PIR error, it's really bugging me what's causing it. 00:28
masak has no idea which error that was
00:28 supernovus left
lue Method 'set_candidates' not found for invocant of class 'MultiSub' 00:29
current instr.: '' pc 306226 (src/gen/perl6-actions.pir:20664) (CORE.setting:0)
called from Sub 'perl6;Perl6;Compiler;main' pc 290826 (src/gen/perl6-actions.pir:15425)
...after adding a Q:PIR block to the := operator in the setting.
cognominal ISMB? 00:30
takadonet cognominal: www.iscb.org/ismb2010
lue I was happy when the error was in a gen/ file. I was overjoyed when pmichaud told me PIR line numbers aren't always true. :) 00:31
jnthn lue: What was in the Q:PIR block? 00:34
lue (one of these days I ought to try compiling rakudo on my computer again)
jnthn Yes, getting latest Rakudo may be advisable.
It improves day by day ;-)
pmichaud "It's a trap!"
oh, sorry.
jnthn :P 00:35
lue (just a sec, pasting)
jnthn pmichaud: I kinda just discovered that writing Perl 6 modules is kinda fun. ;-)
pmichaud jnthn: I'm looking forward to the same.
I already know what sekrit Perl 6 project I'm going to work on in August. :-)
(actually I have several)
jnthn pmichaud: It's odd having spent a couple of years working on Perl 6 compiler stuff, but not really having actually written much Perl 6 outside of the compiler. :-) 00:36
lue erm, apparently it was an outdated copy of 楽土 that's to blame. oops. *_*
pmichaud jnthn: yes, I agree.
jnthn Anyway, today I pushed Test::Mock. :-) 00:37
I only hit upon a closures bug when writing it. ;-)
Other than that it Just Worked. \o/
pmichaud heh
I'M WORKING ON IT!
jnthn WORK FASTER!
;-0
pmichaud IT WOULD BE FASTER IF I DIDN"T HAVE TO REFACTOR SO MUCH CODE! 00:38
:-D
jnthn Sorry for writing so much of it. :-)
cognominal reading S06, what is a multi-invocant?
jnthn Something the multi-dispatcher cares about when sorting candidates.
takadonet anyone else having trouble creating PIR files from .pm?
masak pmichaud: speaking of which, when's the closures refactor going to land? :) 00:39
masak hides
pmichaud masak: I'm hoping tonight.
Seriously.
masak \o/
Seriously.
takadonet pmichaud: sweet!
pmichaud I think it's actually much closer than it might sounds.
*sound
lue good news, := doesn't die. Bad news, it doesn't work. :D
jnthn lue: Progress!
lue maybe it's the parameter definition: (Mu $a, Mu $b) 00:40
pmichaud they definitely need to be parcels
otherwise the containers get stripped
jnthn Mu \$a, Mu \$b 00:41
It's the anti-Depeche Mode modifier
"Let me see you un-stripped"
pmichaud tells his wife about things being stripped in Perl 6. She was already amused by the .nude method. :-) 00:42
lue There's also the part where there is no type/rw checking yet, but I prefer not to have a giant Q:PIR block. :)
.oO(Every language needs swearing and things kids don't need hearing.)
00:44 cotto joined
lue > my $a = 1; my $b := $a; $b = 99; say $a 00:47
99
\o/ Now to add type-checking and the like :P
00:49 tylercurtis joined, dduncan joined
lue perl6: my $a = 3; say $a.VAR.rw 00:54
p6eval rakudo d27eb3: OUTPUT«Null PMC access in isa_pmc()␤current instr.: 'parrot;P6protoobject;ACCEPTS' pc 1376 (runtime/parrot/library/P6object.pir:803)␤»
..pugs: OUTPUT«*** No such method in class Int: "&rw"␤ at /tmp/WT1xmBFLKF line 1, column 16 - line 2, column 1␤»
..elf 31539: OUTPUT«Can't call method "VAR" without a package or object reference at (eval 124) line 4.␤ at ./elf_h line 5881␤»
lue I can't check for rw-ness yet, can I? 00:55
pmichaud you can from PIR
!pir::isnull(pir::getprop__PsP('rw', $target)) 00:56
lue I know. Ah well, I'll be sure to un-PIR it when I can. :)
and if that returns 0, it's ro? 00:57
pmichaud if it returns false, yes. 00:59
or 0.
(I normally just check for boolean-ness, not for a specific integer value)
lue Yeah, if it's T/F I usually say 1 or 0. 01:00
01:00 dduncan left
pmichaud except some values of true are not 1. :-) 01:01
masak pmichaud: so, with jnthn++'s guidance I did a little experiment this evening: I added a &prefix:<?> opcall for the expression in if/elsif/unless/while/repeat. this causes `if 5 but False { say "OH NOES" } else { "as expected" }` to work as expected, but it causes things like `if "this string is true" -> $a { say $a }` to fail. 01:02
lue I know, it's from ye olde days when computers could afford defining a separate Bool type :)
[and the fact that TI-84+SE's still do that, instead of Bools...]
pmichaud once again types "make", somewhat less optimistically than last time. 01:03
masak pmichaud: so the good news is that it broke really few test files. but in retrospect, it's probably not the right approach. right now it feels like there needs to be a way to boolify the expression and leave it unchanged at the same time.
pmichaud it's not the right approach. 01:04
&prefix:<?> should always return True/False, while testing for boolean should allow other values.
masak right.
pmichaud we need to get the get_boolean vtable to understand the but-ness 01:05
masak ah.
pmichaud because that's what is used to test boolean-ness in an if statement.
(and other boolean contexts)
01:06 meppl joined
jnthn So prefix:<?> needs to call .Bool? 01:07
pmichaud I think it already does that.
get_bool needs to call .Bool
jnthn Oh!
I see
pmichaud the opcode that gets generated is 01:08
if $P0 label
jnthn aha
pmichaud which uses the get_bool vtable
if you change that to
jnthn OK, so we need a v-table override in Mu
pmichaud right.
jnthn k
Rozumiem
pmichaud that might break other stuff... but hopefully not. 01:10
should be able to follow whatever pattern exists for get_string, get_integer, etc. 01:11
hmmmm, it's already there. 01:12
rakudo: say (5 but False).Bool
p6eval rakudo d27eb3: OUTPUT«Null PMC access in isa_pmc()␤current instr.: 'parrot;P6protoobject;ACCEPTS' pc 1376 (runtime/parrot/library/P6object.pir:803)␤»
pmichaud rakudo: say (5 but False).WHAT
p6eval rakudo d27eb3: OUTPUT«Null PMC access in isa_pmc()␤current instr.: 'parrot;P6protoobject;ACCEPTS' pc 1376 (runtime/parrot/library/P6object.pir:803)␤»
tylercurtis that appears to give the right result. 01:15
sorear How does signature equality work?
I.e. &[+]:(Num,Num)
sorear hopes "intensional" 01:16
pmichaud we discriminate against everyone equally. :-)
lue apparently, this doesn't work:
> my @a = 1,2,3; @a[3] := @a[0]; @a[3] = 4; say @a 01:17
You cannot bind a variable of type Int() to a variable of type Proxy().
jnthn sorear: If only it were spec'd. ;-)
pmichaud shouldn't be any typing there at all, I think.
jnthn No, there shouldn't. 01:18
That shoudl work.
lue It works if I change @a[3] to @a[2].
pmichaud I suspect some over-eager type checking.
oh
that's actually a not good example to try right now.
does it work if you rebind an element that exists? 01:19
as opposed to something that will give you a proxy?
lue > my @a = 1,2,3; @a[2] := @a[0]; @a[2] = 4; say @a.perl
[4, 2, 4]
pmichaud Proxy is going away.
as soon as I get autoviv updates installed
which is currently blocking on closures
lue I just need to unfudge the appropriate tests (all of which I hope to be in t/spec/S03-operators) and make sure nothing special happens. 01:20
01:23 wmiksss1 left
pmichaud jnthn: initial testing with new code looks pretty good. A lot of my previous failz have gone. 01:26
as in, a *lot*
time for dog walk
bbiaw
jnthn Awesome :-)
rakudo: say \(1) eqv \(1) 01:27
p6eval rakudo d27eb3: OUTPUT«Null PMC access in isa_pmc()␤current instr.: 'parrot;P6protoobject;ACCEPTS' pc 1376 (runtime/parrot/library/P6object.pir:803)␤»
jnthn oh schiese es ist kaput
masak loliblogged! use.perl.org/~masak/journal/40434 01:29
lue Nein! Das kanst du nich sagen! (excuse my spelling, It's been a while :) )
jnthn Excuse mein too ;-) 01:30
lue wonders what language the arguments will be in the pls module installer 01:33
sorear I hope English will be an option
lue [ pls update all or pls updayt all :) ] 01:34
01:34 ashleydev left
masak it'll be 'update' :) 01:34
jnthn pls canhaz web kthnxbai 01:35
01:35 masak left
lue time for someone to start coding the lolspeak language pack then :) 01:35
01:36 redicaps joined, redicaps left
lue
.oO(pls --am-in-ur="/dev" --updaytin-ur=$PERL6_MODULES)
01:37
pugssvn r31540 | jnthn++ | After persuasion from masak++, I add a VICTUALS entry. 01:42
jnthn sleeptime o/ 01:44
lue goodnight
01:50 eternaleye joined 01:51 eternaleye_ left 01:58 meppl left 02:05 hercynium joined 02:11 plobsing left 02:20 orafu joined
sorear What was the rationale, again, for changing infix:('+') to infix:['+']? 02:21
diakopter to standardize signature 02:27
I think
02:30 tylerni8 joined 02:31 tylerni8 is now known as tylerni7, tylerni7 left, tylerni7 joined
lue afk 02:39
02:41 tylerni7 left 02:45 supernovus joined
supernovus Well, finally learned how to use 'git rebase'. A patch for the Temporal/Date changes is coming up once the relevant spectests passes 100% 02:46
02:51 supernovus left 02:54 tylerni7 joined, tylerni7 left, tylerni7 joined 03:06 supernovus joined
supernovus Well, my Temporal patch has been submitted. I have updated spectests to go along with it, but I don't think I should commit those until the patch has been applied as it would break a few tests in the DateTime.t 03:08
03:17 supernovus left
tylercurtis Is evalbot still broken for rakudo? 03:18
rakudo: say 5;
p6eval rakudo d27eb3: OUTPUT«Null PMC access in isa_pmc()␤current instr.: 'parrot;P6protoobject;ACCEPTS' pc 1376 (runtime/parrot/library/P6object.pir:803)␤»
tylercurtis Can someone take a look at nopaste.snit.ch/21796?hl=on&sub...Format+it! and tell me why it's only matching the "a"? 03:24
03:31 TiMBuS joined 03:32 azert0x left
sorear because it's in a rule 03:41
in a rule, the ' ' after <alpha> eats whitespace
this includes the \n 03:42
since rules don't backtrack, there's no \n available to act as a separator
tylercurtis That's what I get for simplifying my example... 03:45
sorear: but you managed to answer my question without even seeing anything close to the actual code. Thanks! 03:52
03:57 takadonet left 03:59 lestrrat is now known as lest_away 04:01 lest_away is now known as lestrrat 04:03 lestrrat is now known as lest_away 04:10 rv2733 joined 04:17 ashleydev joined 04:54 alexbobP joined 04:56 plobsing joined
tylercurtis has his super-secret project at the point where it works for a very generous definition of "works". 05:02
05:04 envi^home joined
sorear my super-secret spying skills have found paperwork indicating that you are working on a "PAST Optimization Framewok for Parrot" 05:04
for monkey even!!!
(wow, nice typo) 05:05
tylercurtis That's my not at all secret project. 05:07
05:10 Transformer joined 05:11 Transformer left 05:23 tedv left
sorear I am thinking that Str.comb, Str.split, and Str.trans are all special cases of a yet-to-be-specced Str.nibble 05:29
05:38 clintongormley left 05:45 envi^home left 05:48 envi^home joined 06:00 ash_ joined 06:36 ashleydev left 06:39 ash_ left 07:18 lkk- left 07:26 masak joined
masak lol awake 07:26
07:35 plobsing left
cxreg sorear: is there a Str.fry yet? 07:36
07:36 eternaleye left
tylercurtis masak: my super-secret project is almost ready to be put on Github(as soon as I decide on a license). 07:39
masak tylercurtis: exciting times.
tylercurtis Artistic License seems like the obvious one for a Perl project, but the part that reads "provided that you clearly document how it differs from the Standard Version, including, but not limited to, documenting any non-standard features, executables, or modules," regarding distributing modified versions makes me a little hesitant. 07:43
masak why? 07:45
07:48 Ross joined
tylercurtis Because I'm not sure what qualifies as "clearly document"ing it. Is the set of diffs and commit history provided by a git repo sufficient? Or does it need to be explicitly written out?(if the latter, that could make forking for minor fixes on github less convenient, especially since if you merge the fork, you wouldn't want to include a file that says "This differs from the standard version of project Foo in the following ways:"). 07:50
masak I'm pretty sure that section was written without Github in mind. 07:52
you could go with a dual BSD/D&R license. :P github.com/indeyets/syck/blob/master/COPYING 07:53
tylercurtis heh. I'm either going to go with the Artistic License or GPL with LGPL for the bits for which that feels appropriate(or just GPL with extra permissions as feels appropriate), I think. 07:59
masak: github.com/ekiru/Bennu behold. 08:12
masak beholds 08:13
whoa.
heh -- a SIC grammar :P 08:14
tylercurtis It doesn't do anything with the environment from the SIC yet(mostly because I was focusing on the SIC output of "say 42;" initially and that didn't require that. 08:15
masak it looks way cool. tylercurtis++ 08:16
tylercurtis I'm now tempted to comment on Moritz's old blog post about fake-cutables that you can now have a real executable if you're willing to restrict yourself to a very small subset of Perl 6. 08:21
masak :)
tylercurtis just glanced at Yapsi and noticed that it also doesn't support negative numbers yet. 08:22
tylercurtis is glad he doesn't have to add that yet.
masak well, it doesn't support negative literals. :)
it does support negative numbers.
tylercurtis True.
masak I'm thinking I now should provide a delta of SIC changes each month in a file, so that the downstream consumers of it don't go mad from unannounced changes. 08:23
tylercurtis That would be helpful. But it's not something that would be particularly painful to not have(unless you start working on Yapsi much much more often than you seem to so far). 08:26
masak :)
I seem to work in monthly bursts so far. 08:27
but I'd recomment targeting monthly releases anyway.
pmichaud I appear to be down to three failing test files. 08:31
masak \o/ 08:32
08:34 cuppe_ left, cuppe left
pmichaud actually, down to five failing tests. 08:35
...and one I'm willing to regress on.
sorear If you're willing to restrict your self to a different tiny subset of Perl 6, and can tolerate the completely insane build system, you can also use Niecza to generate "native" executables 08:43
* You get a .exe which is double-clickable on Win7; Users of other OSen will need an interpreter
tylercurtis sorear: my build system isn't sane either. 08:44
sorear luckily, I have a GSoC student working to improve my build system. 08:46
masak pmichaud: what counts as a closure when it comes to the closure-cloning bug? the test I had to regress on for App::Pls didn't involve any actual Block objects, only the blocks associated with for/given/when/if constructs. 08:49
tylercurtis is a GSoC student, but isn't working to improve his own build system yet.
pmichaud masak: hmmmm. I wouldn't expect those to have closure issues.
do you have a somewhat golfed example? 08:50
masak pmichaud: I could try and produce one.
08:52 pmurias joined
sorear phenny: ask TimToady what's the motivation separating sublongname and longname? 08:53
phenny sorear: I'll pass that on when TimToady is around.
pmurias sorear: am i the GSoC student who is supposed to be improving your build system?
sorear masak: the blocks in a for are real Block objects
pmurias: only insofar as I'm suffering from many of the same issues as mildew 08:54
pmichaud sorear: they aren't quite yet real Block closures in Rakudo. (they will be very soon, t hough.) 08:55
sorear pmichaud: what are they then? raw parrot Subs?
pmichaud fairly close to that, yes.
08:55 sorear sets mode: +ooo tylercurtis masak pmurias
pmichaud they still understand rakudo's signature handling 08:56
so they're not completely Parrot-ish
pmurias sorear: did the Perl6:: prefix get approval?
08:58 pmurias left, pmurias joined
pmichaud afk, sleep 08:58
pmurias looks at niecza
sorear pmurias: it's still in the phenny queue, afaik 09:00
09:00 sorear sets mode: +o pmurias
sorear if it /does/ get approved, I'm going to add File::ShareDir support to Cursor, change make dist to spit out an actual Dist::Zilla dist, and throw the whole thing on CPAN 09:01
which will make both of our lives much easier
tylercurtis sorear++
09:02 ive joined
sorear if it doesn't get approved I'll have to do something clever, which I haven't figured out yet 09:02
pmurias sorear: why do you want to generate a Dist::Zilla dist? 09:05
sorear because it's a good tool, I'm familiar with it, and it's designed to automatically maintain dists 09:06
if it screws up, I can blame rjbs
pmurias what i meant shouldn't you write one and make Dist::Zilla do all the generating of files 09:07
sorear the STD build system is moderately insane in its own right
I don't understand Dist::Zilla at this time well enough to merge them 09:08
also I'm not sure how I'd handle our weird targets
pmurias did some pretty insane things while making SMOP use Dist::Zilla
09:09 orafu left
sorear I'll have to look at that at some point 09:09
to be fair I haven't done a very good job of understanding SMOP
pmurias didn't look at niecza closely too 09:10
09:11 orafu joined
sorear niecza hasn't existed for nearly as long, and isn't huge and mysterious to me 09:11
(one of these is an objective fact)
09:11 Trashlord left 09:12 tadzik joined
pmurias sorear: re Perl6:: prefix what are the disadvantages of that? 09:13
09:14 Ross left
sorear API naming issues mostly 09:14
STD is the module's canonical name as mentioned in S05
STD is the name programmers with a Perl 6 background expect
programmers with a stronger Perl 5 background, and CPAN, will expect Perl6::STD 09:15
pmurias could we get away with taking STD on cpan?
pragma_ I like bacon.
pmurias ?
sorear Maaaayybe 09:16
09:16 Ross joined
pmurias sorear: as the Perl6:: namespace seems to contain dodgy modules trying to emulate perl6 features in perl5 09:17
sorear hmm. 'Cursor' on CPAN is already taken, sort of 09:18
there are a few modules on CPAN that horribly violate naming procedures 09:19
Juerd sorear: There's hardly anything such as a naming procedure
The few guidelines were rendered worthless a long time ago. If it was important, "they" should have enforced it. 09:20
09:21 Ross left
sorear There's no enforcement that .tar.gz files should have relative paths, but everybody does it 09:21
Juerd In part because tar strips leading slashes b y default :)
And "everybody does it" usually doesn't apply on CPAN, where everyone does something else :) 09:22
sorear 99% of CPAN dists use long, descriptive, hierarchal module names like Parse::RecDescent
releasing modules with names like Parse seems to be treated as bad form 09:23
09:23 Ross joined
masak aye. 09:23
that was one of the criticisms against the module name Web
sorear maybe I should go ask the #toolchain people for advice
Juerd masak: I intended Web as a new root namespace, as CGI and HTTP are often very inappropriate 09:25
masak aye.
sorear contemplates "accepted" root namespaces
DBI comes to mind
Juerd Big frameworks, in general. 09:26
sorear it's a not-descriptive name for something that has multiple valid conceptions
Juerd And anything with a non-generic name
sorear: But who'd put diseases on cpan? :)
pmurias Juerd: i plan to put mildew on cpan ;) 09:27
09:28 sawyer_ left
sorear I'm definitely going to move CursorBase, DEBUG, LazyMap, RE_* to Cursor::* and NAME, Stash, Actions to STD::* 09:28
using 30 root namespaces is unacceptable
Cursor is my biggest concern here... 09:29
it's non-descriptive, it's short, it's ambiguous 09:30
Perl6::Cursor conveys the proper meaning - a Perl 5 implementation of the Perl 6 grammar engine
jnthn morning o/ 09:31
pmurias sorear: does using Cursor make sense outside STD?
sorear pmurias: yes 09:32
there are still quite a few things in Cursor that really only make sense in the context of STD (the pad saving infrastructure, etc) 09:33
but they can be dead code
it's possible to translate grammars other than STD and run them without STD.pmc loaded 09:34
pugssvn r31541 | pmurias++ | [mildew] rename SSA to Mildew::SSA 09:35
pmurias sorear: would it be ok if viv added an "generated code" warning to it's output files 09:37
09:37 Su-Shee joined
sorear yes 09:38
09:38 lest_away is now known as lestrrat
sorear although really the complete lack of indentation and comments should be a clear tell... 09:38
pmurias sorear: i had a few moments of doubt when looking at some files, and i saw someone edit generated PIR so it's better to be save
* safe
sorear I might also add a compatibility interlock of some kind 09:39
die "Version skew - please recompile" if $Perl6::Cursor::VERSION != 32768;
will need to see if that's workable with our bootstrapping
pmurias what is 32768 here? 09:40
sorear no, that won't work, nevermind 09:41
a placeholder for a svn rev
09:41 sawyer_ joined
sorear is now very convinced that Perl6::STD::* and Perl6::Cursor::* is correct, awaiting final confirmation from TimToady 09:41
pmurias Perl6::STD::* or just STD::* 09:43
sorear Perl6::STD::*
09:44 meppl joined
masak mixins are *awesome* for debugging, too. 09:48
pmurias masak: mixins? you mean the poor man's roles ruby has? ;) 09:52
sorear masak: What if I told you that 1 + failure is completely legal? 09:53
sorear is campaigning to get this "feature" removed from the spec 09:55
pmurias sorear: what's the result of 1 + failure?
sorear pmurias: 2
masak pmurias: I mean doing $object does SomeRole, where SomeRole contains methods with 'callsame' in them.
jnthn pmurias: role + does (or but) = mix-in
;-)
sorear Perl 6 enums are treated as subtypes of Int by default 09:56
masak pmurias: that way, I can capture the return value on the way back from the original method, print it, and return it from the wrapper.
sorear and are usable anywhere an Int is
masak sorear: aye.
sorear I would really like to see the coercion become by-explicit-request-only
jnthn sorear: It is for int
Just not for Int
pmurias masak: so you can see how a particular object is used? 09:57
sorear in Haskell, Char is treated as a 0x10FFFF-valued enumeration, and the enum <-> Int functions are 'ord' and 'chr'
masak pmurias: yes. basically, it gives arbitrary control over the calls to and return values from methods.
sorear this is possibly a model worth emulating
tylercurtis Is it possible for a parameterized role to determine the name of the method the role declares based on the parameter? If so, masak, I have an idea for a wonderful debugging helper mixin: LogResult["method_name"] 09:58
masak tylercurtis: dunno. jnthn++ would. :)
jnthn tylercurtis: Easier is just to build up a role for that using the meta-model. 09:59
masak tylercurtis: I've had the same idea, for what it's worth. it seemed to abstracted for what I needed.
jnthn tylercurtis: You could then build a role that logs calls to all methods on an object. :-)
(by introspecting it and then building a matching role) 10:00
pmurias sorear: where is the adding + 1 to failure thing specced? 10:01
tylercurtis Anyway, good night, folks. Happy fourth to those others in the US. 10:03
10:04 tylercurtis left
sorear S12:1689, S12:1739 10:05
pmurias are failures enums? 10:07
sorear 'failure' is an enum defined in masak's code
'Failure' is a completely unrelated standard type which is not an enum 10:08
enum Result < success failure >;
well, I haven't actually seen the definition 10:09
but it completely fits masak to think of success first :)
masak actually, < failure success forced-success > nowadays.
which motivates it not being just a Bool.
10:12 Ross left
sorear rakudo: say [1].WHAT 10:17
p6eval rakudo d27eb3: OUTPUT«Null PMC access in isa_pmc()␤current instr.: 'parrot;P6protoobject;ACCEPTS' pc 1376 (runtime/parrot/library/P6object.pir:803)␤»
masak TimToady: State of the Onion 4, on 2000-07-19, is listed on Wikipedia as the announcement date of Perl 6. 15 days from now, that's 10 years ago. 10:19
TimToady: but when were Jon Orwant's cups thrown? and what happened in the time between that and up to your talk?
s/cups/mugs/ 10:20
masak wants to celebrate the 10-year anniversary by throwing a mug
not necessarily one of jnthn's, though :)
sorear out. 10:21
jnthn masak: That's OK, you won't be here on the 19th :P
masak jnthn: :) true.
but it might be the mug-throwing occurred the day before, or several days before. 10:22
jnthn oh noes my mugs! 10:25
masak looks at the mug of tea he just finished 10:26
jnthn
.oO( if masak smashes a mug do I have to start working on Perl 7? )
masak I'm going to pop out and... refill my mug. :P
jnthn :P
jnthn watches nervously
masak perhaps the release of Rakudo Star should be celebrated with the careful gluing-together of a smashed mug. 10:28
"Look! It's leaking a bit, and you must handle it carefully... but you can actually drink from it!" 10:29
jnthn Ooh...can I drink beer from it? 10:30
;-)
masak jnthn: there was a toy constructed language where the noun 'beer' was derived from the verb 'to be'. :) I think you would have liked that. 10:31
std: sub foo(*@a1, *@a1) {} 10:32
p6eval std 31541: OUTPUT«Potential difficulties:␤ Useless redeclaration of variable @a1 (see line 1) at /tmp/Op8pLCUWqA line 1:␤------> sub foo(*@a1, *⏏@a1) {}␤ok 00:01 112m␤»
masak std: sub foo(*@a1, *@a2) {}
p6eval std 31541: OUTPUT«ok 00:01 109m␤»
masak std: sub foo(*%h1, *%h2) {}
p6eval std 31541: OUTPUT«ok 00:01 109m␤» 10:33
masak std: sub foo(*@a!) {}
p6eval std 31541: OUTPUT«===SORRY!===␤Unable to parse signature at /tmp/QwdHCNmQz5 line 1:␤------> sub foo⏏(*@a!) {}␤Couldn't find final ')'; gave up at /tmp/QwdHCNmQz5 line 1:␤------> sub foo(*@a⏏!) {}␤ expecting any of:␤ constraint␤
..param_sep␤ tr…
masak ...a bit LTA... 10:34
jnthn masak: I am the beer of an amused look. :P 10:36
masak .oO( "I am Jack's smirking revenge." ) 10:37
10:41 rv2733 left, pmurias left
Juerd This terminal displays the NL codepoint as a grid of dots. Much cleaner and nicer to read. 10:55
masak seems only Days 10 and 21 of the Perl 6 Advent Calendar have yet to manifest as test files in the spectest suite. 10:56
by the way, are the Advent entries kept up-to-date with the changing syntax of Perl 6, based on test failures in the spectest suite? 11:01
masak guesses "no"
11:11 ruoso joined
pugssvn r31542 | masak++ | [S16-filehandles/open.t] removed stale tests 11:18
r31542 |
r31542 | I doubt very much that the syntax proposed will ever be spec. Nowadays we
r31542 | "redirect" the $*IN, $*OUT and $*ERR streams using binding.
masak wow -- this talk from 2007 is still mostly up-to-date: www252.pair.com/~comdog/Talks/Learn...PW2007.pdf 11:33
and it looks like a good intro to Perl 6.
(I only found the prefix:<=> to be a fossil.) 11:34
LOL: "Over the coming months, we'll see the rest of the Apocalypses, backed up by Exegeses from Damian, and hopefully, eventually, code from Dan and the rest of the team." -- from www.perl.com/lpt/a/571 11:40
11:41 pmurias joined
dalek kudo: 3894c4a | jonathan++ | src/ (2 files):
Move rebless to P6metaclass additions so we can rebless metaclasses, and give

  $other-bug. :-/
11:45
kudo: 5c25692 | jonathan++ | src/core/IO.pm:
Implement mkdir, chdir and dir (like slurp, but gets list of files).
11:46 Ross joined
masak looking at both S16-filehandles/open.t and S16-filehandles/io.t, it seems to me the former should be either incorporated into the latter or removed completely. 11:46
11:54 pmurias left 12:02 szbalint joined 12:21 ive left 12:22 clintongormley joined 12:39 mj41 left 12:41 dual left
masak why does IO::Writeable.write take an Int $bytes as a parameter? 12:46
isn't it enough to pass a Buf? 12:48
12:49 sawyer_ left 12:57 houghton joined
houghton could I make a suggestion to the Rakudo Star developers? 12:58
not sure there's anyone listening
well, here it is: for a while now say hasn't been working in roles
jnthn At least a couple of us are listening. ;-) 12:59
houghton ok!
jnthn houghton: Yes, that's a must fix for Rakudo *.
houghton it seems like it's among the first things someone's going to try out
ok
figure it's going to be part of a lot of "hello, world" test programs
jnthn Quite
It needs fixing, it's a bad bug.
houghton alright, I won't beat the dead horse, then 13:00
jnthn :-)
13:02 sawyer_ joined
pugssvn r31543 | masak++ | [S32/IO] changed API for C<.read> and C<.write> 13:05
r31543 |
r31543 | The API looked unnatural and non-Perly, so I changed it to something that made
r31543 | sense. Rather than sending in an Int to indicate how much to write, just let
r31543 | the length of the Buf determine that. (If you want to send a prefix of a Buf,
r31543 | just make a slice -- a more general operation.)
r31543 |
r31543 | Similarly, rather than having to send in an existing Buf for overwriting in
r31543 | the read method, just return a new Buf. Don't need to return an Int; if we
r31543 | are truly interested in the number of bytes read, we can do $buf.elems.
masak houghton: here's the ticket number: rt.perl.org/rt3/Ticket/Display.html?id=74078 13:06
houghton: I heard a rumour that the fixes pmichaud are almost done with might actually fix the say-in-role thingy too.
jnthn masak: I know pmichaud might feel plural, but... :P 13:08
masak heh :) 13:09
grammar fail.
I meant "the fixes pmichaud *be* almost done with". arrr!
13:11 isBEKaml joined
isBEKaml OHHAI, #perl6! 13:12
masak isBEKaml: \o
isBEKaml masak: :) 13:13
I wanted to ask you about the SIC instruction set. :P
masak go ahead.
isBEKaml do you have any defined set of instructions for SIC. Well, about that design flaw you pointed out, the SIC code dump showed nowhere that we have new lexpad initialisation. Maybe I could rework the code to redraw the block afresh if we are inside a loop or so. 13:15
masak I have a hunch that the SIC code needn't change for the blocks to work right.
well, except for one thing, probably.
isBEKaml me too. I would just like to make sure. 13:16
masak you know how we have 'main', 'main_1', 'main_1_1' blocks right now?
isBEKaml yes.
masak and the parent-child relationship is actually determined by adding and removing individual _\d suffixes.
isBEKaml I was thinking I could rework the cheats in block-relationships if we don't have to make SIC changes. 13:17
the "cheats" :D
masak yes.
that probably needs to change, and instead be represented in SIC as 'this block is called 'block_\d\d\d', and its parent is 'block_\d\d\d'.
with some appropriate syntax.
the rest of the changes needed are probably restricted to the Yapsi::Runtime. 13:18
isBEKaml right. I was going over how we sicify $/ against various matches, and thought "Well, maybe if we have something definite in the form of SIC instruction set, we could use that. " 13:19
Now, it looks like we don't have to do it.
or come up with new SIC instruction set. :P 13:20
Btw, who's using SIC?
masak the SIC standard changes gradually all the time. it's not really stable.
the only real "normative" document of it is the switch statement in Yapsi::Runtime. 13:21
isBEKaml: tylercurtis++ uses it in github.com/ekiru/Bennu, released earlier today.
isBEKaml "switch" given -when ?
masak isBEKaml: it's a SIC->LLVM compiler. 13:22
yes, given/when are switch statements. :)
isBEKaml great scott! LLVM? We have gone that far? :)
masak I was positively surprised too.
isBEKaml tylercurtis++
Now we need to worry about stabilising SIC. :P 13:23
Pleasant headache. :)
masak indeed. 13:27
isBEKaml [backloggin] jnthn added VICTUALS, one of them's Chicken JalFreizi? (Now that's something I recognise - not that I'm vegetarian) :) 13:28
masak he guessed it wouldn't be much of a problem.
13:28 dual joined
isBEKaml masak: Yes, I guess so. 13:29
13:30 xinming left, xinming joined
pugssvn r31544 | masak++ | [t/spec/S16-filehandles/io.t] a few :bin tests for &open 13:33
isBEKaml masak++ # For forcing jnthn++ to pen down his gastric favourites. :) 13:39
masak isBEKaml: so, when are you putting yourself in VICTUALS? 13:40
isBEKaml masak: Err, I haven't done much. ;) 13:41
masak we all need to eat.
isBEKaml besides, no one enjoys being on the food plate. :P
masak isBEKaml: this is about being able to assist a fellow Perl 6 hacker in a crisis. it's serious business. :) 13:42
13:44 Ross left
isBEKaml masak: Alright, granted you know how to persuade. I have yet to hack all day and all night. ;) 13:44
masak it's about being proactive, and not waiting until that happens. :) 13:45
I hesitated for far too long before putting myself on that list. in retrospect, I should have done it earlier. 13:46
isBEKaml Alright, I'll add my entry later tonight. :)
masak \o/ 13:47
13:47 Ross joined
isBEKaml masak sure knows how to persuade people! 13:47
masak when I snap my fingers, you'll regain consciousness. you won't remember anything from this session. 13:48
erm. I mean.
masak snaps fingers
so, anyway. Perl 6 rocks, eh?
isBEKaml woke from a deep slumber. Well, what happened? 13:49
masak isBEKaml: you missed the Rakudo Star release! o.O
jnthn It was awesome! 13:50
masak man, yeah.
let's do that again!
jnthn The Reddit folks LOVED it! Not a single negative comment!
isBEKaml masak: Rakudo Star?
masak isBEKaml: how long have you been asleep?
isBEKaml masak: Don't know. You tell me. :D 13:51
masak gets slightly worried
isBEKaml: ok, so in the year 2000, the Perl 6 effort was started...
www.perl6themovie.com 13:52
isBEKaml ooh, I remember Jon Orwant's epic move of smashing mugs!
masak isBEKaml: right. so, what happened then was that a number of increasingly descriptive documents were authored. RFCs, Apocalypses, Exigeses and Synopses. 13:53
the Synopses are still being filled in.
isBEKaml wait, what's the date today?
2056? :O
masak don't worry, it's only 2016.
erm, 2010. 2010!
isBEKaml No, wait. It must be 2013 or so.. 13:54
ah, right. 2010. 2010. # I must remember that..
masak shouldn't be borrowing lue's time machine. far too confusing.
13:54 snuff_ left
isBEKaml thinks if he accidentally stepped into tardis for such disorientation. 13:54
isBEKaml vaguely remembers a movie depicting this disorientation too - Now, what was that? Pandora? No - Pandorum! 13:55
13:57 Trashlord joined
isBEKaml #Perl6 rocks! 13:58
masak :) 13:59
a bit addictive, too.
isBEKaml yes. addictively addictive. :) #Don't know if that's right, I think it sums up everything meta. :) 14:00
14:00 timbunce joined 14:01 houghton left
masak isBEKaml: if you want to help, you could take the ./proof-of-concept script in the 'pls' branch of github.com/masak/proto for a spin. see if it works on your box. 14:03
isBEKaml masak: I already have proto cloned in my box. (I think I have commit access to proto, not sure) 14:04
masak you do.
isBEKaml masak: how do I switch branches? My gitfu failed me when I typed in `git checkout proto/pls` 14:05
masak 'git checkout pls' 14:07
14:07 sawyer_ left
isBEKaml masak: no, didn't work. tried that too. 14:07
masak oh wait.
right.
'git checkout -t origin/pls'
jnthn git checkout -t origin/pls
masak :)
jnthn ('great minds', 'all fools').pick.say ;-) 14:08
masak jnthn: we're lucky p6eval is broke :P
isBEKaml :)
broke? as in "no money" ? :P 14:09
masak no, "broke" as in "masak should speak better English".
isBEKaml :D 14:10
14:10 sawyer_ joined
masak strangely, the expression is "If it ain't broke, don't fix it". 14:10
isBEKaml masak: I see from the source that it used JSON::Tiny and App::Pls. Where do I get them from?
ah, lib folder. 14:11
nm
masak isBEKaml: 'export PERL6LIB=`pwd`/lib'
isBEKaml masak: yes. did that.
masak isBEKaml: one thing you're welcome to do if you want is to create a 'pls' script in Perl 5, that just delegates (cmdline args and all) to ./proof-of-concept. 14:13
when that works, we can put in an "is Rakudo installed?" check, and give nice installation instructions if it ain't, er, isn't. 14:14
14:15 sawyer_ left, sawyer_ joined
isBEKaml masak: only way I could think of doing it is a system() call. I usually avoid that. 14:15
delegating to p-o-c, I mean.
masak that's fine here. 14:16
can even be an &exec call.
isBEKaml ok. 14:17
masak I'm also interested in what surprising situations you run into when actually installing projects from the ecosystem. this part is still greatly under-tested. 14:19
isBEKaml masak: we aren't using the p5 proto.pl anymore? the p6installer is now about to be written in p6? 14:47
isBEKaml likes how everything is neatly arranged in namespaces. :) 14:48
masak no, the script that the user actually calls will still be in Perl 5, I think. 14:50
this is so that a user without Rakudo installed will get the error message we decide.
arnsholt In NQP, isn't :foo<bar> and :foo('bar') supposed to be equivalent? 14:51
masak however, the 'proto.pl' was overly complicated; it tried to install its own Parrot/Rakudo, and it did stuff in several steps with config files. most of that will simply not be re-used for pls.
arnsholt Eh. Never mind. I figured out my own stupidity as I asked the question >.<
isBEKaml err, I'm thinking along the lines of cpan. it would work only if the user had perl available and installed.
masak isBEKaml: I understand. I still prefer a Perl 5 wrapper, for the above reason. 14:52
isBEKaml masak: I think we are trying to do too many things here. Application installation is OS dependent and among Linux distros along, it varies from distro to distro. 14:55
s/along/alone/
masak right. we seem to be in agreement, though.
isBEKaml I think you're aware of that.
masak proto tried to install Parrot/Rakudo, pls won't.
it will just print a cute error message if 'perl6' isn't in the $PATH. 14:56
isBEKaml oh, we are in agreement then. 14:57
masak yeah. pls actually holds back in a few places where proto tried to be a bit too helpful. :) 15:04
15:10 mberends left
isBEKaml yeah, leave all decision making to the user. Stupid computer never decides. :) 15:10
masak walk & 15:19
moritz_ back 15:23
15:24 timbunce left 15:33 tadzik left
pmichaud good morning, #perl6 15:45
moritz_ good morning pmichaud 15:52
15:52 pmurias joined 15:55 cono joined 15:59 tedv joined 16:05 timbunce joined 16:08 supernovus joined 16:12 ruoso left 16:15 envi^home left 16:20 ashleydev joined
pugssvn r31545 | moritz++ | [t/spec] rakudo unfudges 16:28
16:28 rv2733 joined
moritz_ so, what's up in the Perl 6 world? 16:29
16:29 ashleydev left 16:33 ashleydev joined
pmichaud I'm still struggling to make Rakudo understand closures. 16:33
Right now everything basically works except for methods.
16:33 eternaleye joined
pmichaud oh wait 16:33
maybe even more than that works now 16:34
(running a new spectest right now)
moritz_ sounds like an improvement :-)
16:34 ashleydev left
pmichaud yes. Surprisingly, my latest change seems to have resolved all of the S12 and S14 problems. 16:34
16:34 jedai_ joined
pmichaud I've also added a "make quicktest" target in my branch that doesn't run test files marked "#long" (such as S32-trig and S05-mass/rx.t) 16:35
that helps a fair bit :)
16:36 supernovus_ joined
moritz_ we could also move those to the 'stresstest' target 16:36
pmichaud I like that 'spectest' includes the trig tests
moritz_ I'm kinda worried about having too many confusing targets
pmichaud and I didn't want to have to maintain yet another spectest.data file with a separate list
16:37 supernovus left, supernovus_ is now known as supernovus
moritz_ well, you're the boss :-) 16:37
pmichaud I could make the stresstest target also use a '#stress' marker in spectest.data 16:38
moritz_ +1 to that
pmichaud then at least all of the test files would still be in spectest.data, and we'd have a consistent mechanism for selecting sets
moritz_ right, I'd prefer that over our current situation 16:39
16:39 Ross left, Ross joined 16:45 ruoso joined 16:48 hercynium left
pmichaud stresstest refactor: github.com/rakudo/rakudo/commit/0ba...cb935bf5b6 16:59
timbunce It's odd, and somewhat unhelpful, that "perl6 --version" reports the parrot version not the perl6 version. Is there an easy way to get the perl6 verdsion? 17:02
or version, even.
pmichaud timbunce: not yet, although I hope to add that in the next few days.
timbunce pmichaud: ok, thanks
pmichaud istr we had a patch that improved this quite a bit.
anyway, I'm going to have it report the version + github modification information
s/github/git/ 17:03
17:08 pmurias left 17:13 eternaleye left 17:22 supernovus left 17:31 timbunce left 17:32 timbunce joined
frew rakudo: sub foo($a) { say $a }; foo('frew') 17:39
p6eval rakudo 5c2569: OUTPUT«Null PMC access in isa_pmc()␤current instr.: 'parrot;P6protoobject;ACCEPTS' pc 1376 (runtime/parrot/library/P6object.pir:803)␤»
pmichaud p6eval broken, I think.
frew apparently!
well, I was curious if one could do something like...: sub foo: * * 2; 17:40
pmichaud that doesn't look like valid syntax, no.
(if you're trying to define foo)
frew right
pmichaud but you can do my &foo := * * 2;
which basically has the same effect. 17:41
frew neat
pmichaud := nyi
frew oh right
pmichaud so you might need my &foo = * * 2;
frew still neat
pmichaud > my &foo = * * 2; say foo(5);
10
frew very cool
17:42 timbunce left
frew awesome, and it works as I expect with multiple stars 17:42
17:42 rv2733 left 17:44 whiteknight joined 17:46 patrickas joined 17:49 chee joined
chee is it safe? 17:58
17:58 eternaleye joined 17:59 nbrown04 joined, nbrown04 left
jnthn back 18:24
cxreg is there an "is gd" attribute yet? :) 18:27
jnthn gd? 18:28
dalek kudo: 067b67f | jonathan++ | src/binder/bind.c:
Make sure if we have a sub foo(Foo $x?) { } then $x default to a Foo type
kudo: 6e0cb64 | jonathan++ | src/builtins/Role.pir:
Role type objects need to be undefined (d'oh...)
kudo: 4be0c42 | jonathan++ | src/ (2 files):
Do type check the invocant of a method.
kudo: c4b7cf4 | jonathan++ | src/Perl6/Compiler/Signature.pm:
Default parameter type should be passed on to sub-signatures.
kudo: edade8a | jonathan++ | src/ (2 files):
Parametric variants of roles should also be undefined since they serve as type
cxreg jnthn: is.gd/
i think it's pronounced "is good" 18:29
jnthn our multi trait_mod:<is>($thingy, :$gd!) { ... } # there is now ;-)
cxreg lol
18:30 TiMBuS left
jnthn o/ pmichaud :-) 18:30
masak chee: yes. 18:32
chee: P.S. is what safe? :)
chee p6!
masak chee: ok, so your question is "what are the security aspects of Perl 6 compared to other languages?" 18:33
or something.
chee: sorry for rewriting your question, just trying to arrive at what you want to ask. :) 18:34
ooh! audreyt++ # twitter.com/audreyt/status/17729663670
chee really I was asking how usable the implementations currently are
masak chee: Rakudo is the most far along in terms of breadth. 18:35
chee: but there will be glitches, so be prepared to submit the odd bug report or so.
cxreg makes a camelia t-shirt for his 3 year old 18:36
chee :D 18:37
18:42 whiteknight left
pmichaud jnthn: ping 18:45
jnthn pmichaud: pong 18:46
pmichaud for roles, does !add_variant expect the static code object or a dynamic (closure) one? 18:47
i.e., what needs to be held in !$selector ?
er, $!selector
(overall: I'm working on getting 'trait_mod:<of>' to work on subs.)
jnthn pmichaud: It needs to have closure semantics 18:48
Because it's signautre contains stuff that the methods inside the role would refer to 18:49
And need to be unique per parameterization of the role.
pmichaud so to confirm: when we invoke !add_variant, we're passing whatever the current outer lexical pad happens to be at that point
jnthn Right
pmichaud okay. 18:50
jnthn In
role Foo[::T] { method foo(T $x) { } }
Taht's really compiling do something more like
multi Foo(::T) { ...stuff... $r.^add_method('foo', method (T $x) { }); ...stuff... } 18:51
And that multi candidateis what is being passed to add_variant
*candidate is
*to
pmichaud okay, I've switched to pass the dynamic code object, let's see if it works :) 18:52
oh, fail.
just a sec
(it didn't fail, because I aborted before it was going to :)
lue ohai o/ 18:53
here's an example of me missing the obvious: instead of using ACCEPTS for typechecking, I just compared the WHATs of the objects :) 18:54
masak phenny: ask TimToady could you have a look at this case of the new semantics for multies in an OO hierarchy? jnthn and I have an un-consensus about it.
phenny masak: I'll pass that on when TimToady is around.
masak lue: yeah, use infix:<~~>
pmichaud masak: ...which case? 18:55
masak phenny: tell TimToady -- oh and here's the link gist.github.com/463655 :)
phenny masak: I'll pass that on when TimToady is around.
jnthn pmichaud: yes, yes, I'm just teasing him about that in meatspace. ;-)
masak is teased :)
"Don't tease me, bro!"
bus & 18:56
18:56 masak left
jnthn Making sure masak gets the bus :-) & 18:57
lue I used $target.WHAT !~~ $source.WHAT . I found why this isn't good here:
> my $a = 3; my $b := $a;
You cannot bind a variable of type Int() to a variable of type Any().
pmichaud jnthn: okay, switching it to grab a closure didn't work. 18:58
I don't quite follow the logic, so let me walk through it again.
!add_variant gets invoked when we create a new role?
sorear good morning #perl6 19:02
pmichaud oh, I think I might see the problem. Callable isn't defined in the core. 19:03
(so it's probably not being set up properly)
tracing
19:04 cono left
perl6 good morning, sorear 19:05
19:06 cono joined 19:08 pmurias joined 19:10 tylercurtis joined
pmichaud jnthn: ping 19:10
lue now, that I changed the typecheck comparison to ACCEPTS, this obvious flaw happens! 19:12
> my @a = <a b c>; my $var = 'd'; @a[1] := $var; say @a[1]
You cannot bind a variable of type Str() to a variable of type Str().
pmichaud what are you using for the invocant of .ACCEPTS ?
moritz_ you need to use the type object 19:13
not the actual object
pmichaud the type of the container
moritz_ because 'a' !~~ 'b'
pmichaud getprop 'type'
lue if !$target.ACCEPTS($source)
moritz_ but 'a' ~~ Int'
pmichaud that won't work.
$target is the _value_ that's currently in the container, not the type of the container
pir::getprop__PsP('type', $target)
lue $target.WHAT.ACCEPTS won't, work, eh? 19:14
pmichaud no
because if $target currently contains a '3', then $target.WHAT is Str
which has absolutely nothing to do with the typeconstraint on the container itself
if we had VAR() implemented, it would be VAR($target).type.ACCEPTS or something like that 19:15
lue so would I use that PIR code and compare it to the $source type aswell, or can I attach an ACCEPTS to that?
pmichaud no 19:16
in the case of $source, you're wanting to verify that the value is of the correct type
you're not wanting to compare the type of $source's container.
lue pir::getprop__PsP('type', $target) ~~ $source then?
pmichaud yes, but I would use .ACCEPTS
pir::getprop__PsP('type', $target).ACCEPTS($source) 19:17
and you also need to check for the case where 'type' is null
(which implies that no typecheck is needed)
lue which would only require pir::getprop__PsP('type', $target) ~~ null , correct? 19:18
pmichaud pir::isnull(pir::getprop__PsP... ) 19:19
there is no "null" defined in Perl 6.
lue ah, the wonderful world of PIR :)
pmichaud at some level, the primitives have to be non-p6.
and binding is definitely a "primitive"
lue I know, and all this is making me want to help with VAR next :) 19:20
.oO(curse you, chain reaction!)
sorear isBEKaml: "git checkout pls" works in git 1.6. you really should upgrade 19:22
pmichaud tries something semi-radical. 19:23
lue Interest Level: 50% :) 19:26
pmichaud I'm seeing if I can move the Callable role out of PIR and into the core setting. :) 19:30
jnthn pmichaud: back :-) 19:32
pmichaud jnthn: see previous line. :) 19:33
lue you madman! Ah well, at least the Norweigan Blue is guarding all our PIR... ;)
jnthn pmichaud: That's probably do-able.
pmichaud so far it seems to work. 19:34
jnthn pmichaud: Yes, I imagine it will these days.
pmichaud it doesn't solve my problem yet, but afaik Callable is the last PIR-based role that we have.
jnthn Once upon a time, it woulda been awkward. :-)
19:34 timbunce joined, masak joined
masak lol wifi in a moving vehicle 19:34
pmichaud I had that on the way back from yapc::na :-)
the airplane had wifi
arnsholt masak: Wifi-enabled bus?
masak aye.
jnthn masak: Happily on your way to Malmö? :-) 19:35
You should almost be there already :-)
masak jnthn: by dose is clogged, but I thidk I'll be fide.
jnthn Aww
lue "Let's see if I can land this thing in Excel!" 19:36
pmurias sorear: any progress on the prefix?
19:36 masak` joined
jnthn I hope your Skånecold doesn't last too long. :-) 19:36
masak` thanks again for a pleasant stay.
pmichaud tries to wipe the spec of dirt above the "a" off, fails.
masak` (spicy food)++
the cold actually started back in Uppsala, though.
it was a consequence of the horridly unnatural rectification of the sleeping cycle. 19:37
sorear pmurias: no
jnthn ...which we've no managed to derectify. :-)
*now
Ah, so it was a scary Northern cold. Got it.
pmichaud: :P 19:38
19:38 masak`` joined
sorear What exactly *is* Callable? 19:38
pmichaud it's the role for things that can be invoked.
the things that bind to a &-sigil
sorear but &postcircumfix:<( )> isn't a method
pmichaud doesn't have to be
masak`` bus change &
moritz_ but &foo still has an implicit type constraint
19:38 masak`` left
pmichaud it's primarily a type constraint, and it provides the 'of' and 'returns' methods. 19:39
sorear ah.
what's the difference?
pmichaud just like I'm expecting that postcircumfix:<[ ]> will move out of Positional and into Any.
19:39 masak left
jnthn If you write sub foo(&bar) { ... } then you can only pass things that does Callable. 19:40
pmichaud (and the same for postcircumfix:<{ }> and Associative)
sorear so generally speaking you should implement a postcircumfix:<[ ]> multi if and only if you also does Positional, but there's no actual connection between these two things.
pmichaud actually, you'll likely implement the 'at_pos' method. 19:41
jnthn ?
pmichaud trying to use multidispatch to resolve postcircumfix:<[ ]> across classes and types ends up being very painful.
19:42 masak` left
sorear where is at_pos specced? 19:42
pmichaud sorear: it's not, I just added it to rakudo (and discussed it with TimToady++ at YAPC)
but it falls along the lines that most operators ought to have a named method equivalent.
anyway, at_pos (tentatively named) ends up being the method that means "give me a single element out of the aggregate" 19:43
and postcircumfix:<[ ]> ends up making appropriate at_pos requests depending on its arguments
sorear Excellent 19:45
This might be applicable to another of my problemishes 19:46
pmichaud the underlying problem was that defining method postcircumfix:<[ ]>($x) in a subclass hid all of the other versions of postcircumfix from the role and superclasses
sorear namely how to resolve the infinite regress of &postcircumfix:<( )>(&postcircumfix:<( )>, ...)
pmichaud jnthn: moving Callable to setting ends up doing no further damage than what I already have. :-) 19:47
pmichaud commits it.
jnthn \o/
pmichaud I think that means we have no more PIR-based roles.
jnthn \o/
Wow! 19:48
lue \o\ \o/ /o/
jnthn That's come around sooner than I expected
jnthn is happy
lue .u happy
phenny lue: Sorry, no results for 'happy'.
lue .u smile
phenny U+2323 SMILE (⌣)
lue close enough *⌣*
moritz_ .u smiling 19:49
phenny U+263A WHITE SMILING FACE (☺)
pmichaud as I said, it still doesn't solve my problem, but it at least eliminates a possible source of them. :0
sorear complains that the "better than Rakudo" bar keeps being moved 19:50
pmichaud apparently I'm wrong.
sorear: get used to moving bars. :-)
sorear: I've been dealing with a moving target for nearly six years now :)
ohhhh, one left! 19:51
Abstraction.
jnthn
.oO( It helps that I know a lot about bars... )
pmichaud my phone never has enough of them. 19:52
lue what bars?
pmichaud moves Abstraction.
sorear doesn't understand Abstraction
pmichaud Abstraction is the role for types. 19:53
(packages, classes, etc.)
lue after a spectest w/ latest rakudo, I will post the := code!
sorear what types? 19:54
metaobjects or protoobjects?
or something else entirely?
pmichaud that was a while ago -- look in the spec for Abstraction and I think it's clearer.
sorear Abstraction 19:55
role Abstraction {...}
that is the totality of the spec for Abstraction.
pmichaud S02
This C<Abstraction> role implies the
ability to do various symbol table and/or typological manipulations which
may or may not be supported by any given abstraction. Mostly though it
just means that you want to give some abstraction an official name that
you can then use later in the compilation without any sigil.
tylercurtis Examples given include "package, module, class, role, grammar, or any other type object, or any immutable value object that can be used as a type" 19:56
sorear but type objects have exactly the same type as their instances
which means that 1 is also .^does(Abstraction) 19:57
moritz_ not quite
pmichaud type objects might have Abstraction mixed-in.
moritz_ 1 is Int:d
and Int type object is Int:u
jnthn moritz_: D and U iirc
moritz_ uc then :-) 19:58
sorear pmichaud: so Int === 1.WHAT but Abstraction ?
pmichaud Abstraction might also end up being a subset
sorear that confuses me
pmichaud jnthn: 19:59
pmichaud@plum:~/rakudo$ ack does_role src/builtins
pmichaud@plum:~/rakudo$
jnthn is a tad hazy on Abstraction these days, tbh
pmurias sorear: if we stopped using Storable how big would the performace penalty be? 20:01
jnthn pmichaud: ?
pmichaud no more roles defined in PIR. :-)
lue \o/ 20:02
pmichaud no more base-types needing the "does_role" parameter
lue (one of those moments I wish I wasn't restriced to one-line ASCII)
jnthn pmichaud: src\metamodel\ClassHOW.pir(817)
Is where you can rip it out from
;-)
pmichaud I'll let you do that. :)
jnthn OK
pmichaud besides, whenever I enter "vi src\metamodel\ClassHOW.pir" into my shell it gives me the wrong file. 20:03
:-P
sorear pmurias: er, what do we even use Storable for anymore?
pmurias .syml.store files 20:04
which cache .syml files
lue pmichaud: your slashes are wrong.
sorear hmm. tias
pmichaud lue: they aren't *my* slashes!! :)
pmurias sorear: as $ALL is getting corupted
jnthn pmichaud: Clearly you need an OS upgrade
:P
lue why did you put in \ when it should be / (according to your shell prompt)?
sorear for benchmarking this stuff I usually use time ./std -e '2+2' ten times and average 20:05
pmichaud lue: I was making a snide remark about jnthn++'s choice of OS, which he deftly ju-jitsued into a comment about mine. :)
sorear pmurias: you'll need to go to TimToady, I only barely understand $ALL
pmurias as doing $ALL->{'UNIT'} = 4 changes it in stange ways
(sets other keys)
pmichaud okay, getting rid of all of this role stuff was nice, but I'm still left with my "of" bug. 20:06
hmmm.
lue I'm missing the obvious today. :P
jnthn pmichaud: Details?
pmichaud: or branch name? ;-)
20:06 silug left
pmichaud jnthn: llsig 20:06
it may still be that I'm not sending a cloned method 20:07
(but I couldn't see that before because Callable wasn't going through the Role.pm code anyway :-)
testing that now. 20:08
the test that I'm working on is t/spec/S12-introspection/methods.t
but I think I've just about got it now. 20:09
jnthn ok 20:10
pmichaud ...nope. :-( 20:11
nopasting my test file.
moritz_
.oO( we had an 'llsig' branch once, last year iir )
20:12
jnthn Yes :-)
lue when I'm done with spectesting, should I (paste patch|new branch|fork)?
pmichaud gist.github.com/463718
lue: patch, please.
lue alright.
(I personally wish to avoid forking if at all possible) 20:13
moritz_ git format-patch # and send per e-mail to [email@hidden.address]
pmichaud if you nopaste the patch, I'll review it quickly here.
lue yeah, I'm just letting the spectest run, making sure nothing has fallen out of existence :) 20:14
jnthn pmichaud: building llsig 20:15
moritz_ is that the branch for fixing closures? 20:16
pmichaud ...and a few other things, as it turns out.
but yes.
moritz_ ...as usual :-)
uhm, llsig won't build Test.pir 20:17
is that known/expected?
pmichaud it builds on my system.
lue lemme guess... something about MultiSub and set_candidates [?]
pmichaud perhaps you have a too-new parrot?
moritz_ /home/moritz/rakudo/parrot_install/bin/parrot perl6.pbc --target=pir --output=Test.pir Test.pm
Null PMC access in isa_pmc()
current instr.: 'parrot;P6protoobject;ACCEPTS' pc 1379 (runtime/parrot/library/P6object.pir:804)
pmichaud: it's pretty new, yes 20:18
r47972
pmichaud PARROT_REVISION got bumped since I started the branch, I'm not sure if llsig will work with the new Parrot
seems like it shouldn't make a difference
I'll try bumping here and see what I get
jnthn oh gah, yes
I guess I need to downgrade my Parrot
moritz_ Author: jonathan <jonathan@d31e2699-5ff4-0310-a27c-f18f2fbe73fe> 20:19
Date: Sat Jul 3 13:26:41 2010 +0000
[p6object] Fix a bug so that Foo.HOW.WHAT returns the proto-object for the metaclass as it should, not Foo.
pmichaud it should've been just the change to p6object, yes?
I'm surprised if that causes Rakudo to not-build.
jnthn pmichaud: It does.
pmichaud oh, because you had that workaround.
jnthn pmichaud: Right.
pmichaud yes, that's why then.
I could try merging trunk into the branch. 20:20
jnthn And the workaround worked around the thing I fixed in P6object. But workaround + fix = kaboom.
pmichaud: Oh, OK - I'll wait then
:-)
pmurias sorear: niecza goes directly from VAST to CIL?
moritz_ at least the merge is conflict free
no idea if the result makes sense...
pmichaud I get a conflict in Signature.pm 20:21
lue rakudo: my $a = 3; say $a.HOW.WHAT
p6eval rakudo edade8: OUTPUT«ClassHOW()␤»
tylercurtis rakudo: use MONKEY_TYPING; augment class Int { method kilo { self * 1000; } } say 5.kilo; say 5.kilo.kilo; 20:22
p6eval rakudo edade8: OUTPUT«===SORRY!===␤Confused at line 11, near "augment cl"␤»
tylercurtis rakudo: use MONKEY_TYPING; augment class Int { method kilo { self * 1000; } }; say 5.kilo; say 5.kilo.kilo; 20:23
p6eval rakudo edade8: OUTPUT«5000␤Method 'kilo' not found for invocant of class 'Integer'␤ in main program body at line 11:/tmp/xef2uQmjw9␤»
lue what is MONKEY_TYPING?
pmichaud augmenting built-in-types after the setting is loaded doesn't get the methods to Parrot native types.
rakudo: say PARROT(5);
p6eval rakudo edade8: OUTPUT«Int␤»
pmichaud but that shouldn't matter here, I guess.
afk for a moment 20:24
tylercurtis rakudo: use MONKEY_TYPING; augment class Int { method kilo { self * 1000; } }; say 5.WHAT; say 5.kilo.WHAT; say 5.WHAT =:= 5.kilo.WHAT;
p6eval rakudo edade8: OUTPUT«Int()␤Int()␤1␤»
sorear pmurias: no
jnthn pmichaud: Yes, but that can cause us issues in other places 20:25
pmichaud rakudo: use MONKEY_TYPING; augment class Int { method kilo { self * 1000; } }; say PARROT(5.kilo);
p6eval rakudo edade8: OUTPUT«Integer␤»
pmichaud there ya go.
sorear pmurias: niecza doesn't use VAST at all; it has a custom set of action methods which are called instead of the VAST-builting ones
moritz_ when I merge master into llsig, rakudo builds, but loading Test.pm blows up horribly (with IMCC syntax errors) 20:26
pmichaud I had to fix some stuff in Signature.pm
tylercurtis lue: You have to "use MONKEY_TYPING;" if you want to augment/supersede global classes.
pmichaud there may be more.
tylercurtis See perlcabal.org/syn/S12.html#Open_vs_...ed_Classes
lue ah, thank you. 20:27
sorear pmurias: these action methods build a compiler-specific syntax tree; I use action methods because VAST has lousy support for scope handling
pmichaud afk, short errand.
moritz_ goes to bed
sorear by running at compile time I have full access to STD's scope control functions and variables
lue goodnight mortiz_ o/ 20:28
sorear pmurias: the syntax tree (no name yet, but built from Unit, Body, and Op objects) is then walked to produce something kind of like CIL
moritz_ wonders if the order of 'i' and 't' in his name is *really* so hard to rememeber or type
sorear pmurias: 'CodeGen' provides a bunch of higher level functions which act to produce CIL with proper closure handling, also, convenient shortcuts for a lot of Niecza metamodel operations 20:30
pmurias: 'NIL' is a concrete representation of the CodeGen API
pmurias: for debugging CodeGen is currently set to generate C#, not CIL directly 20:31
pmichaud moritz_: I always get ti wrong. :-)
(sigh, git merge conflicts happen so rarely that I always forget what to do to resolve them. :-) 20:32
lue gah! I thought I typed it right. Feel free to blame either fast typing or backwards key response time. 20:33
tylercurtis By the way, pmichaud, here are two relevant RT tickets: rt.perl.org/rt3/Public/Bug/Display.html?id=75114 and rt.perl.org/rt3/Public/Bug/Display.html?id=76104
pmichaud okay, pushed merged trunk to llsig
jnthn: ^^^
tylercurtis is now off to a familial event. 20:34
pmichaud the fact that Hash can't be augmented is because it's not really a class (yet)
I'm thinking it probably wants to be one.
I'm not sure how I feel about augmenting Int. 20:35
20:36 skangas joined
sorear I thought Hash was a role 20:37
pmichaud it is a Role, currently.
tylercurtis Augmenting Int kinda works. 20:38
pmichaud it will work until you run into an Int that is in fact a Parrot Integer and not a Rakudo Int
then the Parrot Integer doesn't know about the augmented methods
tylercurtis Anyway, as I was saying, off to a familial event. Bye!
pmichaud bye, tylercurtis 20:39
20:39 tylercurtis left
lue on S32-trig/sech.t right now... 20:43
Tene fwiw, I really hate monkey patching bullshittery. I don't really have anything positive to contribute here, just wanted to nonspecifically complain.
pmichaud in the llsig branch, there's now a "make quicktest" target that skips the long-running tests 20:44
(like the trig tests)
lue I'd like to post the results of the spectest, incase anyone knows when something's more broken. That's the only reason I'm suffering myself :) 20:45
sorear augment is fine when it's being used like a C# "partial class Foo { ... } partial class Foo { ... }" 20:48
rakudo and niecza both use augment in that capacity, to mix low-level and high-level code in a single class 20:49
jnthn pmichaud: Did you merge? 20:50
pmichaud jnthn: yes.
I'm pretty sure I pushed, too. 20:51
jnthn pulled, trying make again :-)
pmichaud
wait, I have one more change.
pushed.
jnthn aborts
thanks, got it 20:52
20:53 Su-Shee left
jnthn pmichaud: 20:53
block_code vs block_closure? 20:54
pmichaud block_code returns the static code object
jnthn Also, Perl6::Actions::block_ref?
pmichaud block_closure returns a closure
blockref returns a PAST::Val node that references the block (to prevent generating it again)
there are still a few things that need cleaning up, yes. 20:56
ingy greetings
jnthn yay I has a build
pmichaud the old create_code_object essentially does the same as block_closure
jnthn OK, I think I follow them :-) 20:57
pmichaud yeah. essentially, block_code says "give me the Code object for the static, compile-time version of the block"
ingy TimToady: as a new P6 dev, is there a good place to list my annoyances with the language? :D
pmichaud ingy: perl6-language
ingy a mailing list? 20:58
PerlJam good afternoon #perl6
pmichaud block_closure says "give me a Code object that captures the current lexical state"
ingy not in this lifetime ;)
pmichaud ingy: then you can complain here, I guess.
jnthn pmichaud: gist.github.com/463718 is still your most golfed version of the bug? 20:59
ingy AotD (Annoyance of the Day): error messages with a line # but no file name.
pmichaud jnthn: yes.
PerlJam ingy: that sounds more like an implementation annoyance than a language annoyance
pmichaud ingy: that sounds like an annoyance with Rakudo, not with the language. :)
jnthn pmichaud: OK, let's golf further. :-)
ingy :D
so I am a rakudo dev? 21:00
pmichaud just keep in mind that "Rakudo" and "Perl 6" are separate things. :)
jnthn pmichaud: oh, weird
pmichaud Rakudo is an implementation of Perl 6. It's not a reference implementation of Perl 6.
jnthn sub foo($param) of Num { }
say &foo.returns;
pmichaud: That works.
pmichaud jnthn: yes, I think it's a problem in the method initialization code. 21:01
lue spectest results: gist.github.com/463757 I don't think anything went wrong though.
(posting patch in a second)
ingy just keep in mind that I'm a P6 customer trying to do actual good work :)
pmichaud lue: the arith.t failure is the only one I don't recognize.
ingy anyway, I got you.
21:02 plobsing joined
pmichaud ingy: just keep in mind that we're highly paid^W^W volunteers for this. :-) 21:02
jnthn pmichaud: oh nasty
pmichaud: Add "my" before the class
ingy pmichaud: I am we too :P
jnthn To make it a lexical class.
pmichaud oh, it works there. 21:03
ingy I'm trying to get a few ggod modules prepped for the upcoming release
jnthn pmichaud: Right.
pmichaud jnthn: so, what distinguishes a lexicalclass from others?
I suspect something needs to be closured or coded that isn't now. 21:04
jnthn pmichaud: our classes get their metaclass stuff run from within a :load :init
(the actually thing isn't :load :init itself, but it's called from one)
pmichaud sure, that makes sense.
jnthn I'll bet that's at the heart of the problem.
lemme check one more thing 21:05
pmichaud: OK, here's probably what's significant between the two. 21:06
The trait mod is set up in a :load :init
In the "our" case the code that builds the metaclass also runs from a :load :init but *before* the :load :init that sets up the traits. 21:07
In the "my" case it's the other way around - because we don't do the metaclass building at :load :init time
(rightly or wrongly...) 21:08
$P70 = $P67."!get_code"($P68, $P69)
set trait_subject, $P70
ingy I just skimmed S16 and S32 IO. Is there an easy way to read a file's contents into a string variable?
jnthn slurp
pmichaud ingy: my $contents = 'file'.slurp;
jnthn my $stuff = slurp('file.txt.');
21:09 supernovus joined
ingy k, thx 21:09
is all this simple stuff in a tutorial?
pmichaud maybe the book?
ingy url?
pmichaud github.com/perl6/book/
also perl6.org :-)
lue hrm, I can't remember how to make a darn patch :/ 21:11
jnthn pmichaud: The traits certainly want to be applied to the static thing - which I guess they are being above?
PerlJam ingy: what are you making?
pmichaud yes.
get_code is always the static thing.
jnthn $P68 = $P65."!get_closure"($P66, $P67, 0)
meta."add_method"(obj, "foo", $P68)
pmichaud get_closure always builds its Code capture object by cloning the static Code object
jnthn Ah
OK, so the problem is that ATM we're running that !get_closure and doing add_method before we run the !get_code 21:12
(in the trait application)
pmichaud is there a reason why class initialization occurs early there?
jnthn iiuc, somehow we need to stop that
Mostly because the :load :init for the enclosing block is what calls the class init. 21:13
pmichaud I think class init likely needs two parts
jnthn Well, that's the direct reason anyway
pmichaud one part for creating the class
another part for composing it
jnthn Where would adding the methods come?
Because that's the significant part.
pmichaud in the composing part
jnthn oK 21:14
Well
Those are all just method calls on the metaclass
pmichaud I think we need it that the methods get added after their static parts have been initialized
or....
perhaps the class really wants to be getting the static method objects
jnthn I guess that's what it gets today.
pmichaud right now it's getting closures
$P72 = $P69."!get_closure"($P70, $P71, 0) 21:15
meta."add_method"(obj, "foo", $P72)
jnthn Sorry
s/today/in master/
pmichaud oh, you meant in m.... right
right, master only has static code objects
jnthn Right, but if giving those to the methods works...
pmichaud (which it then clones in response to 'clone')
jnthn OTOH roles probably need to closure one
pmichaud let me see if I can get a static code object to work.
jnthn Anonymous classes...hazy. ;-)
21:16 supernovus left
pmichaud a-ha 21:16
looking 21:17
:name('add_method'), 21:18
$meta_reg, $obj_reg, ~$_, %methods{~$_}<code_ref>
(in Package.pm)
lue I got git commit, but I can't seem to create the actual patch :/ ....
pmichaud I've switched that so that <code_ref> is now the static code object instead of a closure
sorear lue: missing the command? 21:19
lue yeah, I don't know what to type next.
sorear git format-patch -1
jnthn pmichaud: :-)
pmichaud: Looks like you found the important bit
lue ah, I forgot the -1. 21:20
pmichaud well, I think I might have had it as a closure because of something in roles.
jnthn pmichaud: At the moment Package.pm and Role.pm have too much dupe
pmichaud so, fixing that might break something else. We'll see.
21:20 timbunce left
pmichaud jnthn: and there's now a lot of duplication with "our sub" handling as well. 21:20
jnthn But it does mean you can tweak them to emit methods differently for roles and classes
I plan to refactor that lots to be neater 21:21
pmichaud I noticed that install_method now looks a whole lot like what I put in place for our subs.
jnthn I dates back to when I was first playing with metamodel stuff in ng... :-)
*It
pmichaud Num()Num()
\o/
...and now t/spec/S12-introspection/methods.t fails only 5 tests instead of 44. 21:22
(because it doesn't abort on the 6th test)
cool
I'll do a "make quicktest" to be sure nothing else broke, then look at those.
jnthn++
afk for a moment 21:23
jnthn kk 21:24
21:26 timbunce joined
lue gist.github.com/463775 binding patch! 21:26
afk 21:31
ingy pmichaud: did you write Test.pm? 21:34
sorear ingy: Test.pm is taken from pugs 21:36
it was probably written by audreyt half a decade ago
ingy pmichaud: I'm writing a test framework around it, and I can't seem to call Test::plan() (or whatever function) directly
rakudo: say 42
p6eval rakudo edade8: OUTPUT«Null PMC access in isa_pmc()␤current instr.: 'parrot;P6protoobject;ACCEPTS' pc 1376 (runtime/parrot/library/P6object.pir:803)␤»
ingy rakudo: use Test; Test::plan(42); 21:37
p6eval rakudo edade8: OUTPUT«Null PMC access in isa_pmc()␤current instr.: 'parrot;P6protoobject;ACCEPTS' pc 1376 (runtime/parrot/library/P6object.pir:803)␤»
jnthn ingy: use Test; to import the test subs into your scope 21:38
ingy: or import Test if it's already use'd.
ingy: Subs are lexically scoped by default
So unless they are marked "our" you can't actually get at them through the namespace.
phenny: tell lue patch looks quite sane; I suspect that wob of Q:PIR may be expressable as just pir::copy__pp($target, pir::new__ppp('ObjectRef', $source))
phenny jnthn: I'll pass that on when lue is around.
jnthn lue: d'oh...pir::copy__vvpp($target, pir::new__ppp('ObjectRef', $source)) 21:39
phennty: tell lue d'oh, I meant... pir::copy__vvpp($target, pir::new__ppp('ObjectRef', $source))
phenny: tell lue d'oh, I meant... pir::copy__vvpp($target, pir::new__ppp('ObjectRef', $source))
phenny jnthn: I'll pass that on when lue is around.
jnthn fail
phenny: tell lue oh, and you'll need a final $target to make that the return value 21:40
phenny jnthn: I'll pass that on when lue is around.
ingy jnthn: I really didn't want to import the test functions. I want to extend Test.pm, but it seems unextendable. 21:41
I really wanted a Test::Builder ala P5
but that don't exist
pmurias sorear: have you looked at how mildew works?
s/works/is designed/
pmichaud jnthn: okay, after switching the code to use a static code object, that section passes, but now lots of other tests fail 21:42
ingy well fuck it. I'll try importing for now, and doing it right some other time
pmichaud ingy: the point of the current Test.pm is to be fairly simplistic.
i.e., we wanted something that fledgling Perl 6 implementations can use even if they don't have all Perl 6 features present
so, creating a class-based Test framework significantly raises the bar for many new P6 implementations 21:43
sorear pmurias: not long
pugssvn r31546 | pmurias++ | [CursorBase] do the Storable hack in one more place
pmichaud jnthn: I think that %methods{$_}<code_ref> may be too simplistic for the various cases in which it is used.
ingy pmichaud: but isn't it written in PIR?
pmichaud ingy: Test.pm? 21:44
pmurias would i'm thinking about is if it would be feasible to merge nieczas and mildew
ingy what is Test.pir?
pmichaud that's the post-compiled version of Test.pm
the original source is Test.pm
ingy I see
jnthn pmichaud: Maybe
21:44 dju left
jnthn pmichaud: It was written ont he assumptiong that Perl6::Compiler::Role could emit code to clone it to handle the closure case 21:44
timbunce S14 says "A role may not inherit from a class, but may be composed of other roles." but doesn't give an example. Is it just "role r does X does Y { ... }"? 21:45
21:45 dju joined
jnthn pmichaud: Not that there'd be different methods to call 21:45
ingy pmichaud: I think it would be easy to do a few things to Test.pm that make it extendable, without sacrificing your simplicity
pmichaud jnthn: I'm thinking that maybe <code_ref> needs to be <block>, and then P::C::* can code or closure it as appropriate.
jnthn timbunce: Yes
pmichaud: That also works.
PerlJam jnthn, pmichaud: Will a fix for RT#74078 fall out of the some of the recent changes, or is something more required?
pmichaud ingy: I'll be happy to consider patches. :)
jnthn PerlJam: Not sure yet.
timbunce jnthn: thanks
pmichaud PerlJam: I think so, yes.
jnthn PerlJam: I hope so.
ingy pmichaud: commit bit? :) 21:46
jnthn I'll believe it when we have it.
pmichaud ingy: for a rakudo commit bit, we need a CLA.
jnthn <== project pessimist
;-)
ingy pmichaud: I sent it in but it was returned by the postal service
jnthn pmichaud: Well, maybe 21:47
21:47 mberends joined
ingy pmichaud: what's your address? I'll send it to you 21:47
jnthn pmichaud: Only if the other needed stuff is available, if any...
sorear ingy: you can also e-mail scanned CLAs
jnthn Guess it could be made to work anyway.
pmichaud jnthn: I think it can work. 21:48
jnthn mberends: o/
pmichaud there aren't that many places that code_ref is used.
jnthn No :-)
That's the way it's meant to be. :-)
pmichaud right
sorear tries to figure out how this is at all secure; I can copy-and-paste rectangular areas of B&W images and no-one will ever notice
ingy sorear: I think I have a scanner. where do I email to?
pmichaud ingy: you can email to me
[email@hidden.address]
or look at the address in the README file 21:49
mberends o/ jnthn # from Ireland, with two Guiness under the belt. And free Wifi. Dublin++
sorear Please complete and send a PDF of the signed CLA to [email@hidden.address] or fax a copy of the 21:50
signed CLA to +1-206-299-3492, or send an original signed CLA to:
pmichaud it still says parrot.org?!?
jnthn mberends: Nice!
21:50 timbunce left
sorear pmichaud: what should it say? 21:50
jnthn mberends: With masak++ I found a pizzeria nearby with Starobrno today \o/
sorear I'm looking at the CLA PDF from parrot.org... 21:51
did rakudo get its own CLA in the last month?
jnthn mberends: Glad we've both had beer win days
mberends jnthn: Starobrnno++ as well :-)
pmichaud rakudo has always had its own CLA
it's Parrot that changed.
21:52 rv2733 joined
pmichaud i.e., rakudo's cla is an agreement with TPF 21:52
pmurias ingy: ping 21:54
pmichaud www.perlfoundation.org/attachment/legal/cla.pdf
21:54 rgrau_ joined
dalek ecza: 15a77fd | sorear++ | (3 files):
Implement infix operators (harder than it sounded)
21:54
pmichaud it's no longer the same CLA that Parrot uses. When Parrot split off from the rakudo repo ;-) they grandfathered in the existing TPF CLA holders. 21:55
at least for a short while, until people could complete new Parrot Foundation CLAs
pmurias ingy: is it possible that YAML::XS is returning broken hashes that behave strangely when changed?
pmichaud jnthn: okay, so why is it that classes want to have code objects while roles want closure objects? 21:56
jnthn pmichaud: Well...
pmurias found that bug rt.cpan.org/Public/Bug/Display.html?id=53278
jnthn pmichaud: We're kinda working around initialization order in a sense here
pmichaud I should rephrase my question the other way round then 21:57
jnthn pmichaud: But the answer really is that a class will always be, well, a class.
pmichaud why is it that roles want closure objects?
jnthn When you write role Foo { } you aren't really declaring a role under the hood
You're declaring a role factoring
In this case it can just make the one role but role Foo[::T] { } can make many
We don't actually make a role until we need one though 21:58
That is, until something does the role
We could still hit the problem anyway though
So...we probably need to fathom the init order bug really.
:(
And then just give both closures 21:59
pmichaud okay.
actually, I think we want the other way around.
jnthn Otherwise we're only putting off the bug until later
pmichaud it's trivial to create a closure from a code object
it's less easy (but still doable) to go the other way
jnthn Well
Unless we give both the static one
And the role thingy does the closure-izing.
pmichaud right 22:00
jnthn That'd also work and it's what happens today
pmichaud I think I'm going to do that.
jnthn (the clone in Role.pm is explicit, iirc)
pmichaud it was, I took it out (it was causing failz)
but I can put it back in now.
pugssvn r31547 | pmurias++ | [CursorBase] it turned out YAML::XS is broken - work around that
pmichaud basically, method clone() { $!do."!get_closure"() }
jnthn Dunno if clone is quite what you want in the new model but maybe :-)
oh
in that case yes :-) 22:01
mberends jnthn: pivo.jnthn.net already has Dublin and Guinness: "Liquid loaf of bread. Mmmm". Someone was quicker than me :-/ Just had the same in a boat-restaurant moored on the Liffey. Tomorrow after $work I'll have to experience a more original entry :)
pmichaud (the other reason I wanted things to be attached to the actual subs :-)
22:01 rv2733 left
jnthn mberends: :-) 22:01
jnthn has managed to turn the Perl 6 community into a beer research team o/ 22:02
ooh, the map is starting to get interesting :-D
mberends the data gathering is even more fun than submitting it :) 22:03
jnthn The problem is remembering to submit the data after gathering it. ;-) 22:04
bwaha
"Baltika
Fine but number 7 tastes like sweetcorn"
mberends :) 22:05
22:05 zorgnax joined
jnthn
.oO( wonder when I can re-do travel.jnthn.net in Perl 6 :-) )
22:06
mberends btw, booked an excellent flight Eindhoven <-> Pisa. I'll be at yapc::eu 2-8 August, with @family too :-) 22:07
jnthn ooh, flight
I should remember to do that
oh unless...
22:08 Ross left
pmichaud 22:07 <jnthn> ooh, flight 22:08
oops, wrong line
sorear There are enough unpleasant corner cases here that I'm inclined to disallow augment methods from closing over variant lexical scopes
i.e. augment scopes like a BEGIN
always sees the protopad
pmichaud maps.google.com/maps/ms?ie=UTF8&...6060944e49 # my travels map 22:09
jnthn pmichaud: WHOA!
pmichaud: You've had more years than me to work on yours though. :-P
pmichaud jnthn: true, but I also didn't really start travelling until I was in my late 20s 22:10
jnthn Ah
Ooh, you never went to Sweden.
pmichaud correct, not been to .se yet 22:11
and these just list places that were specific target destinations, not generally "places I happened to be while in transit"
so, even though I've been to London airports many times, London isn't listed :)
(same goes for Amsterdam and Frankfurt) 22:12
I'm looking forward to adding more markers in the next few weeks :)
jnthn Aye, if I did mine that way I could list two locations in Texas too. :-)
(I only ever connected at Texas airports.) 22:13
I think it was DFW that had a bar serving Newcastle Brown Ale.
pmichaud I'm disappointed I didn't get to add a Moscow pin, though.
jnthn Yeah :-(
22:14 silug joined
jnthn Maybe we can arrange to hackathon in Moscow at next YAPC::Russia. 22:14
I'll be there, masak++ is interested too.
pmichaud oooh, yes.
jnthn (next spring)
mberends me too :)
pmichaud is nordic perl workshop still on for early august? 22:15
jnthn No
Until I looked at your Hawaii pins, I hadn't appreciated just how far it is from mainland US
pmichaud: It was too close to YAPC::Europe 22:16
pmichaud yes, that's what I thought also.
I get to do that Hawaii flight again in about five days :)
(and add another pin :-)
jnthn How long is it, ooc? 22:17
pmichaud well, we stop over in phoenix
so, we leave here around noonish, and arrive in Maui around 5pm, and there's a 4-hour time difference
so 9 hours, I think.
jnthn Uff!
pmichaud with six kids. :-) 22:18
jnthn ooh, I could come to YAPC::EU by train but I'd arrive Monday evening
(but in time for the Tuesday)
oh, no I can't 22:19
sleeper train sold out
mberends :(
jnthn Back to the flying plan.
ingy rakudo: class Foo; my $class = 'Foo'; say $class.new; 22:20
p6eval rakudo edade8: OUTPUT«Null PMC access in isa_pmc()␤current instr.: 'parrot;P6protoobject;ACCEPTS' pc 1376 (runtime/parrot/library/P6object.pir:803)␤»
jnthn mberends: I'm doing the train back, via a break in Switzerland
ingy how do I do that? ^^
jnthn rakudo: class Foo { }; eval('Foo').new
p6eval rakudo edade8: OUTPUT«Null PMC access in isa_pmc()␤current instr.: 'parrot;P6protoobject;ACCEPTS' pc 1376 (runtime/parrot/library/P6object.pir:803)␤»
pmichaud rakudo: class Foo; my $class = Foo; say $class.new; 22:21
jnthn oh
p6eval rakudo edade8: OUTPUT«Null PMC access in isa_pmc()␤current instr.: 'parrot;P6protoobject;ACCEPTS' pc 1376 (runtime/parrot/library/P6object.pir:803)␤»
jnthn eval bot is broken.
Oh, like that too
22:21 Ross joined
jnthn I thought ingy++ specifically wanted to do it from a string 22:21
pmichaud rakudo: class Foo { }; my $class = Foo; say $class.new;
p6eval rakudo edade8: OUTPUT«Null PMC access in isa_pmc()␤current instr.: 'parrot;P6protoobject;ACCEPTS' pc 1376 (runtime/parrot/library/P6object.pir:803)␤»
ingy jnthn: correct
pmichaud from a string one would need to eval, I think.
jnthn mberends: 8:30am flight O_O
mberends jnthn: on Monday, or Tuesday? 22:22
jnthn mberends: Monday
mberends \o/
jnthn It's to Bologna
So then I'll take the train to Pisa
mberends nvm, trains++
jnthn There's no direct Copenhagen => Pisa iirc
jnthn checks
Wow 22:23
I can fly with 2 changes from Malmo to Pisa
It only costs £1283 22:24
jnthn thinks he'll stick with the Bologna plan :-)
szbalint heheh. I paid 138EUR for my flight Budapest -> Pisa
pmichaud so far flights from here have never been low 22:25
jnthn szbalint: Yeah, the one to Bologna from here is in that region.
(Too bad that from Bratislava I used to have cheap direct flights to Pisa.) 22:26
Though crappy Ryanair
This time I get SAS. :-)
So, we hackathon on the 3rd, yes? 22:27
pmichaud Yes.
jnthn Excellent
So I'll be there from prob mid-afternoon on the 2nd.
szbalint Yeah, I'll fly wizzair, but that's the only connection from BUD to Pisa sadly...
pmichaud oh wow, flights on the 3rd are seriously cheap, though.
jnthn lol...wizz...
pmichaud: Hm 22:28
pmichaud: Thing is I can't stay around after YAPC (e.g. gotta leave on the Sat)
pmichaud 3rd is too late for me anyway
jnthn ah yes
lag
pmichaud if I depart here on the 3rd I don't arrive there until the 4th
jnthn oh
Then yes, suggest leaving before that ;-) 22:29
pmichaud there's a cheap fare on the 29th of July, though. :)
szbalint Pisa and Firenze is fun
do some touristy stuff :)
pmichaud ugh, none of these flights look good. 22:30
jnthn I'd lean towards spending time in Pisa rather than Florence. 22:31
;-)
mberends (-;
pmichaud wow, flying back on the 7th seems to be very difficult also. 22:32
maybe I should look for other nearby airports :-)
jnthn pmichaud: To Pisa? 22:33
pmichaud yeah.
jnthn pmichaud: Yeah, trouble is the airport is mainly, afaict, served by European budget airlines
pmichaud right.
jnthn Florence and Bologna are near. 22:34
Well
Near-ish.
szbalint yeah, 1.5h by train
nothing terrible
jnthn mberends: Booked mine to Bologna now \o/
pmichaud 1.5h by train is definitely better than overnight in London
jnthn It's Italy, the train is probably retardo ;-)
But yes, for sure. :-)
mberends jnthn: \o/ 22:35
jnthn mberends: Probably I'll be in Pisa by around 2pm
22:36 patrickas left
mberends jnthn: my flight arrives PSA 13:45 22:38
jnthn mberends: Staying at $venue?
If so, we may even run into each other at the check-in. ;-) 22:39
mberends jnthn: no, Hotel Villa Primavera about 2km away. An easy stroll.
jnthn ah, ok
pmichaud: BTW, sadly we seem to have got a factor of 2 or 3 slower compared to maybe a month or so ago 22:41
(in master, not just your branch)
According to tools/benchmark.pl
pmichaud jnthn: chromatic++ noticed that as well 22:42
jnthn pmichaud: Could be good to bisect.
If it was one thing that did it, anyways.
pmichaud I'd say it's either the list stuff or else it's something fundamental 22:43
but I think it was slow before lists.
jnthn pmichaud: I'm reluctant to pin it on the lists because we have also slipped heavily on startup time
And I can't imagine lists would do that to us.
mberends otoh, the memory footprint on x86 is agreeably under 100MB for most test scripts. It used to be nearer 200MB. 22:44
22:45 eternaleye left
jnthn Taht's a good thing 22:45
pmichaud chromatic++ speculated it was a lot of isa type checking again.
jnthn Could be. 22:46
pmichaud he and I discussed that we could take the current O(n**2) algorithm and make it O(n) if we just checked the vtable for matches. 22:47
jnthn "just checked the vtable"?
pmichaud matches on VTABLE_isa, that is.
currently VTABLE_isa does a VTABLE_isa call on all of the classes listed in the mro list 22:48
that ends up adding lots of redundant checks for deeply nested classes
but if we checked to see that a class has the same VTABLE_isa as the one we're currently running, we could skip calling its VTABLE_isa because we know its mro is going to be handled by the current one anyway 22:49
22:49 cotto left
pmichaud and that would convert what is currently O(n**2) to O(n) 22:49
22:50 skids left
jnthn Aha, OK 22:51
22:54 rgrau_ left 22:55 mberends left 23:01 skids joined
pmichaud argggggggh 23:02
sometimes <code_ref> is a Perl6MultiSub
and it doesn't really know how to clone its children
jnthn Yes, for multi-methods
Ah
I guess at least you know all the candidates going into it. 23:03
23:03 pmurias left
pmichaud I now have a new mantra: "cloning and copying are evil in Perl 6" 23:04
Tene augment is specced as lexically-scoped, yes? 23:05
Or am I misremembering again?
pmichaud Tene: no.
in fact, augment is specifically denying lexical scope. 23:06
augment means you're modifying the thing in-place.
Tene 'k
23:06 lestrrat is now known as lest_away
Tene Is there a lexically-scoped way to wrap a class with a modified class? 23:06
pmichaud my class New is OUTER::New { ... } 23:07
maybe.
jnthn std: my class New is OUTER::New { ... }
p6eval std 31547: OUTPUT«ok 00:01 111m␤»
pmichaud (definitely nyi in rakudo :-)
jnthn Yeah
Tene 'k
jnthn pmichaud: I thought multi-sub did clone its candidates. 23:08
pmichaud it calls VTABLE_clone on the RPA
(the unsorted RPA)
which, of course, isn't a deep-copy clone 23:09
jnthn Oh.
Yeah, you're right.
pmichaud so, it never did "cloning". 23:10
anyway, cloning is bad, evil.
Perl 6 has taught me the value of immutable data structures more strongly than any other situation I can think of.
so...... crud. :-) 23:12
so, back to my earlier question.... 23:14
why is it that roles want closure objects? 1/2 ;-)
jnthn If it's fine to get the static thing and clone it and that gives a closure, I expect it's fine if it has the static one. I've actually read more of the code now. :-) 23:16
23:16 Ross left
jnthn Or put another way 23:17
pmichaud could the role variant store code objects, and then we clone them when the role gets composed into something else?
jnthn I think we always want to give the closure, or we always want to give the static one.
pmichaud I think we always want to give the static one.
jnthn Taht's not the problem.
That's too much cloning
pmichaud ?
too much cloning?
jnthn The times we care about it are when we generate a new variant of the role.
role Foo[::T] { ... } 23:18
pmichaud okay, so perhaps add_variant should do it?
jnthn class A does Foo[Int] { ... } # we generate a role
class A does Foo[Str] { ... } # we generate another role
er, s/A/B/ there
class C does Foo[Int] { ... } # we use the role we made for A
pmichaud right
so, at the point that we generate a role then
jnthn No 23:19
(no to add_variant)
add_variant is adding a multi candidate
pmichaud right
jnthn Not a role
The place it wants to go is when we generate the new role
23:19 eternaleye joined
pmichaud add_variant is when we have role XYZ[...] and another role XYZ[some other] 23:19
jnthn Which is probably where the .^add_method
pmichaud those are "variants"
jnthn Correct.
pmichaud okay, got that.
jnthn Multi-candidates at the end of the day
pmichaud then it's !select that creates an actual role (iiuc)? 23:20
jnthn Right
pmichaud i.e., Foo[Int] is actually calling Foo.selector(Int)
jnthn Not quite that
It
1) Checks if we already have a role with the parameter Int and just hands that back if so 23:21
23:21 skids left
jnthn 2) Otherwise, does the multi-dispatch to something which generates one and stashes it in its created list 23:21
There's an $!created (or @!created) that keeps track of those
If you want to think of it a bit differently, the call is memoized.
pmichaud well, let's break this down into code 23:22
lue ohaio o/
phenny lue: 21:38Z <jnthn> tell lue patch looks quite sane; I suspect that wob of Q:PIR may be expressable as just pir::copy__pp($target, pir::new__ppp('ObjectRef', $source))
lue: 21:39Z <jnthn> tell lue d'oh, I meant... pir::copy__vvpp($target, pir::new__ppp('ObjectRef', $source))
lue: 21:40Z <jnthn> tell lue oh, and you'll need a final $target to make that the return value
pmichaud we want the method to be closured at the point a role is generated
jnthn pmichaud: $!selector holds a Perl6MultiSub
pmichaud: Correct 23:23
pmichaud: And the code that generates a role is what is emitted by src/Perl6/Compiler/Role.pm
All that is in src/builtins/Role.pir is not role generations as such, it's more management and memo-ization.
It's the code in the multi-candidate that we run that is building the role 23:24
(through RoleHOW meta-model calls)
selector = getattribute self, '$!selector' 23:25
result = selector(pos_args :flat, name_args :flat :named)
pmichaud yeah, got that already
jnthn Are the key lines in src/builtins/Role.pir
OK, so that calls something that'll build a role
pmichaud and then the selector ends up being a function that we generate at compile time
(a multisub of functions that...)
jnthn pmichaud: No, in !add_variant 23:26
We generate the functions at compile time yes
And emit a call to !add_variant which does push selector, variant
And those functions are generated by src/Perl6/Compiler/Role.pm
And have the role's signature as their signature, etc
Essentially, we're just building a Perl6MultiSub of role factories 23:27
pmichaud it feels like the role factory building code is fairly complex for what is described. What's the source of the complexity? 23:28
jnthn Which bit seems complex?
What's in src/builtins/Role.pir?
pmichaud the stuff in src/Perl6/Compiler/Role.pm
jnthn Oh
But that's muchly copy-paste from src/Perl6/Compiler/Package.pm 23:29
pmichaud that also, then :-)
jnthn That's the "I want to tidy this up" from earlier
All it's doing is generating a series of calls on the metaclass
But it also has some "fun" because the distinctions between our/my/anonymous
*of the
pmichaud sure, so why does Actions.pm need to be aware of Perl6MultiSubs ?
it feels like we could get the package / class / role to manage those 23:30
and we just provide a list of methods to be added
jnthn Because Package.pm and Role.pm are ignorant of them.
Yeah, but it felt to me more like doing it in Actions.pm's method_def would be a better factoring (do it in one place)
At the end of the day, either of them could be made to do it. 23:31
It's just the factoring I picked.
pmichaud except that Actions.pm apparently doesn't have all of the knowledge about closure cloning
jnthn Well, the overall principle I had been operating on is that multi-dispatch and the object model are things that needn't know anything about each other really 23:33
Apart from the dispatchers need to play together a bit
But that's mostly just a case of delegation.
So far, once we're past the Actions, it really is just a case in [Package|Role].pm and the metamodel that it's "just throw in a Method for a Perl6MultiSub of Methods and it's just an opaque invokable thingy" 23:34
*the case
*or a
grr
pmichaud I'm brainstorming a somewhat different factoring 23:35
jnthn We have to care a bit in role composition too I guess, but overall the two are not too muddled at the moment. Sadly, that may well have to change.
Well
Trouble is
The spec went and changed
:-(
So after a couple of years effort of developing a good mental model of the whole thing and pushing things that way...we're down to needing to re-work a load of stuff. 23:36
pmichaud what I'm thinking of is that I'd like Actions to handle making sure that someone hasn't declared multiple 'only' subs
jnthn <rant>I'm deeply irritated that I thought I'd got a final call one way and after I implemented it all, it went the other.</rant> 23:37
pmichaud was I the one that made that call, ooc?
jnthn No
pmichaud okay.
if I was (or did), then I apologize for that :) 23:38
jnthn I went through how multi-method dispatch worked with TimToady and it was agreed one way
pmichaud I sympathize, though -- I had the same problem with lists, iterators and arrays. About five times over. :-)
jnthn Yeah :|
pmichaud anyway, sorry, got called away for a moment
anyway, I'd like Actions to handle making sure that someone hasn't declared multiple 'only' subs 23:39
jnthn Anyway, the message under this is that we *will* have to change the way things are curerntly set up somewhat
pmichaud and that protos force multis, and stuff like that
23:39 skids joined
pmichaud but delegate a lot of the multisub creation and management to glue routines 23:39
(by series of "add whatever" calls) 23:40
jnthn We could do that.
Do compile-time glue routines?
*To
pmichaud not sure yet.
23:40 f00li5h left, f00li5h joined
pmichaud it's still pretty nebulous in my head. 23:40
jnthn ooc, is there any reason !get_code and !get_closure couldn't, at some level, be implemented on Perl6MultiSub? 23:41
pmichaud but having seen what had to happen for package-scoped multisubs, and now seeing similar issues for roles/classes, it feels like the current formulation isn't quite right
jnthn If you want to wrap Perl6MultiSub so it matches the approach for other code objects, I'm very fine with that. 23:42
pmichaud so, '!get_code' on a Perl6MultiSub returns a multi of code objects
?
and !get_closure' on a Perl6MultiSub returns a multi of closures?
jnthn Essentially yes.
So that we can then treat them no differently to other code objects
pmichaud that might work.
jnthn I'm quite keen to keep the "just an invokable thingy" abstraction or even extend it where we can. 23:43
pmichaud yes, I fully agree with that.
it's just their construction that is posing issues.
jnthn At the end of the day, even when we have the proto-in-control refactor, there's still one thing to talk about. 23:44
That thing may be magical but it's still one thing that knows how to manage the dispatch.
pmichaud so, what's the proto-in-control refactor? I'm way out of date on the spec there.
jnthn You know how in proto regexes, you always call the proto and then it delegates to the chosen proto-regex? 23:45
pmichaud yeah
jnthn Same
pmichaud so, the proto is really the multisub, in effect.
jnthn We always call the proto and it delegates to the chosen candidate
Yeah
That isn't the part I dislike fwiw.
I quite like that unification.
The nasty part is that for multi-methods, the proto has to go looking at the MRO to learn about the other candidates. 23:46
That is, we lose our delegational model, or at least it loses a lot of its simplicity.
Anyway, that's not really relevant here. 23:47
pmichaud I don't quite understand "the proto has to go looking..."
jnthn At the moment, in the methods table we have something we invoke to do a dispatch.
And it is just a collection of candidates from that calss 23:48
*class
If nothing matches, we then go one step up the inheritance hierarchy and try there
pmichaud oh.
I do understand then.
it really is just like protoregexes
jnthn The change is that instead it should go and find other things in the inheritance hierarchy.
pmichaud right, which protoregexes have to do. 23:49
jnthn Yeah which I guess is why TimToady wants to unify it.
pmichaud I suspect there's a slightly deeper reason than simply "make it all the same"
jnthn Perhaps
No matter how you look at it though, it changes a one-way delegation into a two way relationship.
pmichaud but at least for protoregexes it's not all that bad -- on first invocation of the protoregex for any given class, we do the scan and cache the methods 23:50
jnthn Well, nextsame is nasty under this
as masak++ and I discussed today
Without contortions, you'll perhaps visit the same method multiple times.
pmichaud doesn't it just end up being masak++'s interpretation? 23:51
jnthn If multiple visits is fine with the spec, well, great.
I can't imagine that being the case though.
pmichaud multiple visits?
jnthn Yes
pmichaud I thought masak's interpretation was just one visit of each multisub
jnthn Because you nextsame through all the multi candidates the proto knows about
No
Well
OK
That's what he wants
OTOH, I want a beer pump in my kitchen. :-) 23:52
Doesn't mean it's easy to make it happen.
:-)
pmichaud but doesn't this behavior give that result?
jnthn When you nextsame, you go first through all of the candidates the proto knows about
When they are exhausted you go up a step in the inehritance hierarchy
pmichaud I think the "go up a step" disappears in this model (more) 23:53
jnthn But then the proto at that level knows about some of the methods that the level below also knows about
pmichaud because the proto already knows about that.
at least, that's what happens if we follow the protoregex model
in protoregexes, it's not that the protoregex is a multi of multis 23:54
it's *the* multi
and there's one per class
jnthn If we're willing to say that nextsame from an only goes walking the inheritance hierarchy since that's the dispatcher you're in, and nextsame in a multi walks the candidates known to the proto, we an go that way.
pmichaud not one for each time it's defined in the class
one for each class
23:54 Psyche^ joined
jnthn Sure 23:55
Well if the last nextsame after you run out of candidates that the proto knows about just fails rather than goes walking the inehritance hierarchy, I guess things get simpler.
pmichaud since the proto should've have already grabbed all of the candidates, then yes. 23:56
jnthn Yes, but what if there's an only candidate somewhere up the inheritance chain?
The proto probably shoudln't incorporate that 23:57
pmichaud thinks
jnthn But equally, a model like we're describing means you can't nextsame to it.
I guess if folks have multis and onlys of the same in the same object hierarchy, you could say they're just asking for it. :-)
:-) 23:58
pmichaud what does "only" mean in this instance?
23:58 Patterner left, Psyche^ is now known as Patterner
jnthn I'd seen it as "we stop our search for multi candidates when we see an only a step" 23:58
s/ a step//
Just like in nested lexical scopes
pmichaud in nested lexical scopes, how would I get from the only sub to the one it's hiding? 23:59
I'd have to use "OUTER::", I guess.