Darren_Duncan hiya 01:55
right now I'm in a car on the way to OSCON, in north Washington
speaking to you live over a GPRS bluetooth modem 01:56
brentdax Man, $0 -> $1 is gonna take a real long time to get used to. 03:39
(Or rather, the other way around.)
...could Undef be considered Perl 6's bottom type? It's compatible with any type, any method can be called on it with any parameter... 03:48
svnbot6 r5967 | putter++ | Copied modules/Grammars/rx_grammar.pl to rx_grammar0.pl. So PMichaud can overhaul rx_grammar.pl with abandon, while putter continues incrementally with rx_grammar0.pl. 03:55
r5968 | autrijus++ | * scope defaulting for parameters should not apply to primitives,
r5968 | autrijus++ | as they are not supposed to have a lexical scope anyway.
putter a quick release engineering note - the current failures of t/unspecced/p5 are odd. roundtrip.t and method.t fail in make test harness, but work when run individually. array.t fails in both, but in make test says 05:04
No compatible subroutine found: "&my_elems"
and by itself says 05:05
No compatible subroutine found: "&elems"
Odd. Good night.
autrijus hi stevan 05:13
how's life?
svnbot6 r5969 | autrijus++ | * "-Inf" should numify as -Inf, not 0.0.
autrijus stevan: you up for changelogging for the oscon release? if not I can do it too, but I'm still chasing testfails
hm, anyone remember if there was a ruling on mutating map/grep? 05:18
map { $_++ } @_;
according to S29 they are not mutating
svnbot6 r5970 | autrijus++ | * The `end` method on lists can't be parsed as an unary op...
r5971 | autrijus++ | * some TODOs; mutating map/grep needs a ruling
autrijus but I vaguely remember some discussion
brentdax autrijus: did you see my musing about Undef above? 05:43
autrijus sub identity (Any $x) returns Undef {}
somehow not ringing a bell
brentdax True. 05:44
autrijus also in p5, undef can't instantiate a list.
or a hash for that matter
stevan hola autrijus 05:45
autrijus and unless you want to change the semantics of (@x = undef) so @x is now a unthrown exception
I don't think using Undef as Bot will fly.
heya stevan
stevan when do you want the changelog for? I am about to get some sleep actually 05:46
brentdax Alright. It just seemed like All had magic properties, and Undef had magic properties, and maybe the magic lined up.
autrijus brentdax: it seems to me that undef is still a scalar
and not (say) an array
stevan: I don't know, in the next 36 hours
stevan autrijus: ok, I can do that :) 05:47
autrijus stevan++
stevan autrijus: one quick questions before I sleep :)
autrijus sure 05:48
stevan actually more than one question,.. but i will start with one :)
is the eventual goal to have the metamodel in pure PIL?
autrijus go ahead :)
well, pure PIL is the same as pure Perl6
so to speak
stevan but isn't PIL a subset of Perl 6? 05:49
autrijus I think it makes sense to base the reference implementation on that, yes.
well, that depends on how you define "subset"
stevan ok
autrijus Perl 6 is the external representation
PIL is the internal language
stevan ok
autrijus multiple perl 6 programs may compile to the same PIL node 05:50
(say "Hello") and (say "Hello") for example.
stevan but ideally the metamodel will be written in a way that is pretty close to pure PIL
autrijus (actually, no, they will differ in PPos, but what the heck)
stevan :)
autrijus stevan: no, any idiomatic Perl 6 that does not define new classes will do
QtPlatypus QtPlatypus asks "So Perl6 is to PIL as M-expressions are to S-expressions?" 05:51
stevan ok
autrijus QtPlatypus: yes
stevan autrijus: so what is my smallest feature set?
autrijus stevan: perl5 without AUTOLOAD
i.e. you are free to use namespaces and closures.
stevan and no bless
autrijus you can bless, you just can't do method calls :)
stevan ok
autrijus (so the bless is just tagging)
stevan excellent 05:52
autrijus that will enable the runtime to only implement the functional core
and automagically receive a OO core
stevan yes
autrijus and then it can optimize from there.
stevan autrijus++
this is what I was hoping you would say 05:53
autrijus :D next question?
stevan no more questions actually :) 05:54
I am about to check in some work from this weekend
it is kind of messy
autrijus messy is good :)
stevan but it implements a MetaClass with no AUTOLOAD, and minimal method calls (like 2 or 3 in total in the entire thing) 05:55
svnbot6 r5972 | autrijus++ | * It's now okay to use a module without &import defined in it.
autrijus oooh.
stevan it also bootstraps the MetaClass so that it isa Perl6::Object
autrijus and then you can turn them into inside-out objects
aka closure dispatch
for those 2 or 3 calls
stevan no need
autrijus and then we'll be there
stevan I just call local functions
autrijus oh? normal function calls and case-expression will do?
stevan++ 05:56
stevan :)
I am really enjoying the CLOS MOP book too
autrijus nice 05:57
stevan although I can only get a few pages along before I have to go work onthe metamodel
autrijus :)
stevan it gets my mind working :)
ok, so I am going to check in the mess, and get some sleep
autrijus okay. enjoy!
stevan I have plans to clean it up
:) 05:58
autrijus my plan is to prototype it in PIL runcore
and then use quickcheck to establish observable/provable invariants
when this thing is sound (so I can write down using scary academic notation), backport from _that_ to idiomatic perl6
meanwhile we can release 6.28.0 before that
and get people experimenting with the model/runcore 05:59
stevan I figure I can remove the rest of the AUTOLOAD (the part used by the regular classes) very easily
autrijus wonderful
I want to see the mess now :)
stevan yes yes
writing my commit message :)
autrijus :)) I'll bbiab
stevan autrijus: commited r5973 06:02
svnbot6 r5973 | Stevan++ | Perl6::MetaModel - (p5)
r5973 | Stevan++ | * MetaClass does not use AUTOLOAD anymore, everything goes through ::dispatch
r5973 | Stevan++ | * MetaClass isa Perl6::Object (once everything is bootstrapped that is)
r5973 | Stevan++ | * MetaClass test has been de-sugared
r5973 | Stevan++ | * misc. other bootstrapping things as well
stevan here is a list of a few things to look at: 06:03
MetaClass.pm - all the bootstrapping is done inside the meta() method
this is the only remaining method call for MetaClass right now
I am thinking this can be replaced by a global ::meta() function which will maybe lookup the metaclass instance in a global registry or something 06:04
(I am stealing this from CLOS, which has a find-class function)
next look in MetaModel at the ::dispatch function 06:05
it is ugly right now, but I think I can clean some stuff up.
I fall into an infinite loop if MetaClass does not have a specific dispatch() function. I know why, but I am not sure how to break that circularity, so right now it is specialized, and just avoids method calls 06:07
The bootstrapping takes place at the bottom of this file (line 291)
all it does it load the Perl6::Object module and then makes Perl6::MetaClass->isa(Perl6::Object) 06:08
oh, and the 3rd arg to dispatch is a boolean for SUPER calls
I am going to remove that, I think this is a bad way to go about it, and I also have some thoughts as the relevancy of SUPER 06:09
(but that is for p6l)
Also look at line 82 of Perl6/Class.pm
it is a special case for building the Perl6::Object metaclass 06:10
all other classes build their metaclasses normally, the new() method defined in Perl6::Object
I am going to completely overhaul Perl6::Class 06:11
it will look more like the JS version when I am done I think
autrijus ok. 06:12
stevan I also have some plans for how to treat methods
I can use closures to handle the details of submethods and private methods
autrijus I believe that's as lwall intended.
stevan by just wrapping them
yes, I think it is 06:13
autrijus i.e. they should not be distinguishable from closure factories
if it is that's a bug etc
ok. I'll consume the Diet MetaModel on my way to $client
stevan ok, enjoy
autrijus I need to run. see you tomorrow when you're up :)
stevan yes 06:14
nite :)
brentdax Is there going to be a Pugs release RSN? 06:22
QtPlatypus QtPlatypus thinks that the next release may co-incide with the new PIL. "But that is pure speculation on my part" 06:23
autrijus brentdax: yes, in time to ingy's talk 06:29
36hrs is the current plan
from now
brentdax Alright. I'll probably make sure that WWW::Kontent's first release runs with that version, even if I don't release at the same time.
autrijus cool! 06:30
brentdax (It's just a preview--no user system, parsers, or complete documentation--but I think it'll be a good demo...) 06:31
autrijus indeed
be sure to post to p6a when you're there :)
I'll bbiab
Aankhen`` ?eval $?PUGS_VERSION 06:51
evalbot6 \'Perl6 User\'s Golfing System, version 6.2.8, July 13, 2005 (r5973)'
brentdax Okay, this bug is driving me *nuts*. 07:09
It's that "call a method with the same name on an attribute" thing again, but in a different place in the code. 07:10
And with a different method name.
Although this time there are no subclasses involved...hmm.
Yes, got a test case! 07:12
pugs -e 'class A { method foo() { say "A::foo" } }; class B { has $.a; submethod CREATE() { $.a=A.new } method foo() { say "B::foo"; $.a.foo } } B.new.foo' 07:13
Should print "B::foo\nA::foo\n", but instead it repeatedly prints "B::foo\n".
...wait, argh, no. 07:15
nothingmuch stevan: ping 09:26
svnbot6 r5974 | iblech++ | t/builtins/lists/mutating_listops: Added link to p6l post. 10:29
autrijus rehi 13:07
autrijus ponders between doing some PIL2 charting and chatting and relenging 13:08
scook0 autrijus: there's some fancy stuff in src/PIL.hs that's breaking Haddock at the moment 13:17
all that %i stuff -- just so you know
autrijus hm, maybe linear implicit parameters ain't that nice after all 13:20
wolverian heh, the pizza guy looked just like Larry 13:21
autrijus oh?
3 =:= 3 # patent nonsense, right? 13:22
There is also an identity test, "=:=", which tests whether two names
are bound to the same underlying variable. "$x =:= $y" would return
true in the above example.
in that case, there need never be a tied rvalue 13:23
stevan nothingmuch: pong 13:42
good morning all 13:43
autrijus yo stevan 13:47
I'd like to discuss a weird issue with you if you have a bit time.
stevan autrijus: sure
autrijus ok. consider
$x = 1;
$x = $x;
the latter actually means
$x = FETCH($x);
(or rather fetch(tied($x)) , but I'll just write FETCH) 13:48
stevan ok
autrijus and the expression can be written as
okay so far?
stevan (tied() being the means of accessing the underlying object, correct?)
autrijus yes
ok. so we are dealing with two types 13:49
one is (Scalar of Int)
one is (Int)
stevan yes
autrijus you can assign into the first but not the second
you can add with the second but not (directly) the first
stevan correct
autrijus so, by writing
sub f (Int $x) { ... }
we are actually saying 13:50
sub f (Scalar of Int named '$x') { ... }
stevan hmmm
autrijus with the coercion rule that promotes Int into a fresh container Int
I mean, container of Int
stevan :)
autrijus we are told that the default argument is (is constant)
which seems to me that is actually _removing_ the (Scalar of) part 13:51
instead of as we assumed in hackathon, some weird readonly shim layer on it
you agree with this intuition?
stevan yes, what you say make sense
it is not good
but it makes sense
the logic is clean
autrijus cool. 13:52
so, it seems that
stevan what does that mean though?
autrijus it means that
sub f ($x is constant) { \$x }; ${f($_)} = 3
is instadeath
stevan yes, that makes sense
autrijus as we discussed in hackathon, but this time it can be detected statitcally 13:53
instead of till runtime
since it amounts to be saying
stevan cool :)
autrijus ${\3} = 3
now, this worldview is all well if we only have objects.
we also have collection :-/
if $x is (Scalar of Int) and 3 is (Int) 13:54
and if @x is (Array of Int)
what is (1,2,3,4) ?
stevan ouch
autrijus that is the core ambiguity
stevan an array of constants
autrijus an array of constants?
no, it's a constant array of constants.
stevan ok, even worse :)
autrijus but the strange thing is, if you start using it destructively 13:55
($x, $y) = (1,2);
then it magically behaves as a tuple
so, what does a constant array mean again?
integral the LHS isn't a List of Scalar of Int ?
autrijus integral: it is. 13:56
nothingmuch jp;as
hola stevan
actually it's no longer relevant
stevan hey nothingmuch
autrijus: maybe ($x, $y) = (1,2); is just sugar 13:57
autrijus integral: so can we spell "Array of" as "Scalar of List of" ?
think carefully before answering, as I was stuck right here :)
(and still am)
stevan for something like: (let (multi-value-bind ($x $y)) (1 2))
mjl69 hi! :-)
autrijus stevan: that's ($x, $y) := (1,2)
stevan: the assignment is really destructive 13:58
integral hrm, I'm thinking no, since p5 has taught me that List != Array
stevan (forgive my LISPishness)
autrijus: why is it destructive?
autrijus stevan: ($x, $y) = ();
integral hi mjl69
mjl69 could someone take a look at this when they have a second... nopaste.snit.ch:8001/3538 maybe it's a common installation problem...
integral: hi!
stevan why is ($x, $y) = (); not the same as ($x, $y) = (undef, undef);
integral autrijus: isn't that where a List is different from an Array?
autrijus mjl69: macosx? 13:59
mjl69 yeah.
autrijus mjl69: gcc_select to 3.3 already and make clean'ed?
mjl69 I definitely did gcc_select to 3.3. I did make clean one time but I could try it again.
autrijus mjl69: try doing that again, maybe you had 4.0 .o files 14:00
mjl69 autrijus: thanks, back in a few minutes...
autrijus stevan: it is, effectively. let me think about it
Yaakov What an eager guy, that mjl69.
autrijus my @a := ($x, $y); push @a, 1;
that should be error right?
mjl69 :) 14:01
autrijus my @a := [$x, $y]; push @a, 1; # and this should work?
integral if the List is not promoted to an Array, yes, imho
nothingmuch What a cynical guy, that Yaakov.
autrijus What a guy, that nothingmuch.
Yaakov I am the inverse of a cynic, it turns out.
autrijus mm very cinycal
stevan autrijus: neither of those examples make sense to me 14:02
pushing on an array ref should be no different then pushing on an array
autrijus stevan: aw. let's try another form.
stevan oh wait, sorry, didnt see the :=
autrijus ($x, $y).push(1);
better? :)