Pugs 6.2.8 released! | pugscode.org | pugs.kwiki.org | paste: sial.org/pbot/perl6 | www.geeksunite.net Set by autrijus on 13 July 2005. |
|||
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 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? | ||
excellent | |||
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 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; | |||
vs | |||
$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 | ||
$x.STORE($x.FETCH) | |||
vs | |||
$x.STORE(1) | |||
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 | ||
yes | |||
autrijus | with the coercion rule that promotes Int into a fresh container Int | ||
I mean, container of Int | |||
but! | |||
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. | |||
but! | |||
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. | ||
Heh. | |||
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? :) | |||
stevan | ok | ||
hmm, thats a problem | |||
autrijus | what I'm saying is whether we can describe an array as a container of a list | 14:03 | |
stevan | what about: my @b = (1, 2, 3).push(4, 5, 6); | ||
autrijus | in exactly the same way a scalar as a container of a value. | ||
you mean | |||
(my @b = (1, 2, 3)).push(4, 5, 6); | |||
stevan | no | ||
I mean what I typed. | |||
autrijus | if the rhs is an error then the expression as a whole is an error | ||
stevan | what I am thinking is that maybe (1, 2, 3) can be autopromoted | 14:04 | |
integral | you shouldn't be able to mutate a "value", right? | ||
autrijus | integral: right. | ||
I'm using "value" in the functional programming sense | |||
stevan | yes | ||
autrijus | so | ||
(1,2,3).push(4) | |||
is just like saying | |||
stevan | but is perl really that strict? | ||
autrijus | 5++ | ||
integral | yes, definately, imo | 14:05 | |
autrijus | both are a mutable action levelled to a nonmutable value | ||
stevan | what about (1, 2, 3).shift | ||
same thing? | |||
autrijus | $ perl | ||
shift(1,2,3) | |||
Type of arg 1 to shift must be array (not list) | |||
I think perl5 agrees with me :) | |||
stevan | ok | ||
integral | push/shift should just be taking the list from the box, making a new list, and putting it back | ||
autrijus | integral: good. | 14:06 | |
then there's two questions remaining. | |||
$a = (1,2,3); $a.push(4); | |||
this always works, because Scalar cannot ever contain a List object. correct? | |||
integral | "yes" | ||
autrijus | and | 14:07 | |
$a := (1,2,3); | |||
is promoted to | |||
$a := \(1,2,3); | |||
exactly as lwall described. | |||
and (@a := 1) is an error. | |||
integral | what's \()? And why not $a := [1,2,3] ? | 14:08 | |
autrijus | $a := [1,2,3]; # $a is Scalar of Array of Int | ||
$a := \(1,2,3); # $a is Scalar of List of Int | |||
in the latter form you can't push into $a. | 14:09 | ||
but the first form is just fine. | |||
the thing is [] allocates mutable storage | |||
integral | I don't understand $a = (1,2,3) then :-/ | ||
autrijus | integral: oh, it's easy. infix:<,> in scalar context allocates mutable storage. | ||
but I'm thinking about let it not do that for binding. | 14:10 | ||
otoh, maybe it should always allocate mutable storage just for consistency's sake. not sure | |||
integral | owww, that's my head hurting level reached ;-) | ||
autrijus | let's elide it for now; I'll QuickCheck it later | 14:11 | |
another question is, what is Hash containing. | |||
I'd say it contains a Map. | |||
integral | List of Pair? | ||
autrijus | but another thought is List of Pair, yeah. | ||
so in that view, Hash is a constrained type of Array | 14:12 | ||
integral | otherwise you've can only contruct Maps by magic from Lists of Pairs | ||
autrijus | where elements are always pairs | ||
and further constained to guarantee fst uniqueness | |||
that is, key uniqueness | |||
integral | but not with an ordering | ||
autrijus | oh? (%x)[3] | 14:13 | |
hm. | |||
integral | ordered hashes by default? isn't that a bad performance thing? | ||
autrijus | no, I mean unordered | ||
but have that return a pair | |||
ah. I'm confusing levels | |||
stevan | which pair? | ||
autrijus | any pair | ||
stevan | the 3rd one added? | 14:14 | |
autrijus | but no, .[] is a list op, surely it doesn't work on hash | ||
integral | but the same pair under the constraints of keys/values in p5? | ||
stevan | no it shouldnt (IMO that is) | ||
Adam_ | autrijus, talk to me about this thing of larry | 14:15 | |
14:15
Adam_ is now known as Alias_
|
|||
autrijus | Alias_: ? | 14:15 | |
integral: the value part of hash is still a mystery to me. | |||
Alias_ | the perl 5 to perl 6 thing he was working on at the hackathon | 14:16 | |
madskills? | |||
autrijus | Alias_: yeah, perl-parse-dependent | ||
aka ppd | |||
Alias_ | is there any information on it anywhere? | ||
autrijus | it re-adds everything folded away at compile time, serialize the op tree into xml and prints it. | ||
Alias_ | or just the source | 14:17 | |
Need to add some information to my talk | |||
(in addition to this loverly photo www.spidereyeballs.com/os5/set1/sma...1625.html) | |||
autrijus | ok. you can safely say 1)it works less well than perlcc currently and 2)it's larry's repentance for toke.c. | 14:18 | |
(i.e. developing ppd is a lot of suffering and pain and I'm not sure he'll carry it through.) | |||
wolverian | is it a christian thing? :) | 14:19 | |
Alias_ | But it's going to be good enough for a first cut at Perl 6 ports of things? | ||
autrijus | Alias_: not currently, I doubt ever. | ||
Alias_ | oh yuck | ||
I thought that was the point? | 14:20 | ||
autrijus | o/~ Larry walked this onesome valley / He had to walk it by himself o/~ | ||
s/one/lone/ | |||
Alias_: that was the point, but I think @Larry seriously underestimated the efforts involved. | |||
Alias_ chuckles | |||
wolverian | do you guys have recommendations for a Linux laptop? | ||
Alias_ | it is indeed a long and ugly road | ||
wolverian | ack, maybe I should ask in a better channel, sorry. | 14:21 | |
autrijus | Alias_: I know you don't want PPI to be mistaken as a source parser, but really, a "regular form" of perl5 that can make both PPI and PerlTidy happy, may fare batter. | ||
I mean, better. | |||
Alias_ | sure | 14:22 | |
And if anyone else can get around the whole "impossible" problem, I'll be happy | |||
s/else// | |||
(since I cheated) | |||
autrijus | also we can take two stages | ||
a better, more-loseless more-regular B::Deparse for example. but it's still very tricky | 14:23 | ||
Alias_ | B::Deparse is a CODE serializer though | ||
(in the CODE reference) sense | 14:24 | ||
autrijus | I'm sure we both understand the huge gap involved :) | ||
Alias_ | right | ||
autrijus | in comparison, ponie is relatively easy, and pugs-compiled-to-perl5 is downright trivial. | ||
Alias_ | But I think it does have a lot of value as a CODEref serializer | ||
autrijus | (but just in comparison; individually they are large tasks.) | ||
Alias_ | Not so sure trying to push it to a full blown thing is worthwhile | 14:25 | |
But then I'm willing to cut @Larry a lot of slack on the subject, since I don't know any internals | |||
autrijus | really the only one who knows that much about toke.c is $Larry. | ||
$*Larry, that is. | |||
you can ping him again on p6c if you like | 14:26 | ||
or mail him privately to get a more uptodate status | |||
Alias_ | That's ok | 14:27 | |
Might hunt him down today... | |||
I've got a few days yet to update (er... finish) the talk | |||
autrijus | integral: you still there? I'm thinking about @x as Data.Array.IO, %x as Data.HashTable and $x as Data.IORef. | 14:28 | |
Alias_: nod, please mail him to get the recent status; I'm only updated up to the hackathon | |||
mjl69 | autrijus, I made sure I was using gcc 3.3 and did make clean and got the same errors. | 14:29 | |
autrijus | integral: modulo the fact that Data.Array.IO is not resizable, suppose it does | ||
integral | autrijus: I'm here, but let me check my haskell docs | ||
autrijus | integral: and the two fundamental value types are Obj and [Obj]. | ||
mjl69 busy working at his pesky day job, will peek back in in a few... | |||
autrijus | integral: and very strangely, you can't store [Obj] into $x directly. | 14:30 | |
mjl69: you using any embedded flags? | |||
integral: the evaluation rule has that STORE on $x will promote [a] into (Array of a), recursively | |||
so | |||
$x = (1, (2, 3), 4); | |||
er | |||
integral | bother, I'd forgotten nested lists were darn weird | 14:31 | |
autrijus | bummer, I can't even write nested lists. | ||
that is a good sign actually | 14:32 | ||
[Obj] never gets promoted to Obj; it's always (Ref of Array of Obj) | |||
so if I write | |||
$x = (1, (scalar(2, 3)), 4); | |||
then it first turns the inner (2,3) into mutable [2,3] | 14:33 | ||
then store [1,[2,3],4] (all mutable) into $x. | |||
integral | yeah, that makes sense | 14:34 | |
autrijus | so the moral of story is, to put [Obj] into Scalar, it's promoted to (Ref of Array of Obj); to put Obj into Array or Hash, it's promoted into [Obj] with one element | ||
but then, what does | |||
sub f (%x is constant) { } | |||
means, really? | |||
does it mean %x is a List of Pair that happens to be viewed as a hash? | 14:35 | ||
integral | autrijus: I think it should be a ConstantHash does Hash, and it's just an implementation detail if there's really no container | ||
autrijus | List of (Pair of (Str, Scalar)) | ||
integral: then why not ConstantArray does Array, why list? | 14:36 | ||
and why not ConstantScalar does Scalar, why value? | |||
or is hash really second-class here? | |||
integral | oh, I was thinking it should be same for the other two | ||
autrijus | oy, but there is an important difference. a ref to ConstScalar is not the same as a ref to rvalue | 14:37 | |
${\3}++ # compile time error | |||
${\(my $x is constant)}++ # not really detectable | |||
(if we adopt the ConstScalar view) | 14:38 | ||
let's try this simple experiment | |||
my $x is constant = 3; my $y = 4; $x := $y; $x = 5; | |||
legal? | |||
integral | umm, no? | 14:39 | |
autrijus | why not? "is constant" is just a normal tie-like layer | ||
surely you can destroy the association that ties you to ConstScalar via rebind? | |||
(I say 'no' too, because I think $x is as good as a rvalue, and binding should be disallowed) | 14:40 | ||
it's like saying (3 := $y) to me. | |||
integral | yeah, it should. But then from a maintenance standpoint "is constant" is upfront, and shouldn't change | ||
but "is constant" isn't a normal tie if it means the container is a ConstScalar not a Scalar | |||
ugh, that didn't help | 14:41 | ||
autrijus | didn't help. | ||
?eval my $a := 3; my $b; $a := $b; $a = 5 | 14:42 | ||
evalbot6 | \5 | ||
autrijus | I'd like that behaviour to die | ||
?eval my $a is constant := 3; my $b; $a := $b; $a = 5 | |||
evalbot6 | \5 | ||
autrijus | er, sorry. | ||
integral | hmm, I was about to say that is constant restricts the type allowed in the binding for the container | 14:43 | |
autrijus | hm. | 14:45 | |
that is a valid view. that says the pad always maps symbols to containers, never to values. | |||
({return 3}.()) := 4; # but this is patently absurd? | 14:46 | ||
integral | yes, must be | 14:47 | |
autrijus | note that (my $pi is constant = 3) is a special form already | ||
unless we take "constant" to mean single-assignment. | 14:48 | ||
mmm that's an even more interesting view. | |||
integral | hmm, what exactly is the LHS to := ? Is it a container, or is it a binding? | ||
autrijus | the LHS to := is a container. | ||
or rather, a signature that contains containers. | |||
integral | so, if $a := $b; And then I do $b := $c, then $a =:= $c too? | 14:49 | |
autrijus | for sure. | ||
integral | oh, so it's more like it mutates the LHS container into a proxy for the RHS container... | 14:50 | |
autrijus | no... not so | ||
see PIL.hs :) | 14:51 | ||
it overwrites the LHS container with the Box of the RHS. | |||
Box being the content of the container | |||
which includes Id, Value, and maybe tiedness. | |||
integral | oh, a Box has a *pointer* to the storage, not the storage itself | ||
autrijus | aye. | ||
three layers. | |||
four if you count symbol table. | |||
value -> box -> container -> name | 14:52 | ||
integral | hmm, well isn't the constness thing ok then? | ||
autrijus | how so? I'm saying that name may map to either value or container | ||
integral | my $a is constant; $a := $b; # oh, but then you can't update via $a, so you shouldn't be able to update via $b | ||
autrijus | right but that allows | ||
oh wait | 14:53 | ||
who decides that you can't update via $a? | |||
what you said describes ($b := $a) | |||
not the other way around. | |||
integral | but $a has "is constant" up front, so $a = 5 should be always disallowed, no? | ||
autrijus | so you mean "is constant" is annotating the symbol table? | 14:54 | |
integral | yes | ||
autrijus | hm. | ||
integral | but then that's why I showed that action-at-a-distance := use ($a := $b; $b := $c; $a =:= $c) | 14:55 | |
autrijus | ok, I think we are converging | ||
what you are saying is that | |||
instead of | |||
value -> box -> container -> name | |||
we have | |||
1. (value -> box -> container) -> name | |||
2. (value) -> name | |||
and "is constant" is not a "tie" in box anymore | 14:56 | ||
i.e. no ConstScalar | |||
it's directly changing the shape of the thing the name points to. | |||
integral | hmm | 14:57 | |
yes | |||
autrijus | hm | 14:58 | |
my $x is constant is Tieable = 3; tie($x...) | |||
allowed? | |||
if allowed, that means (box) -> name | |||
instead of (value) -> name | |||
integral | hmm, if it is allowed STORE will never be called, and if FETCH is called, you can't get any constant optimizations | ||
autrijus | that's fine, Tieable defeats optimization anyway | 14:59 | |
I'm just talking about the usefulness of FETCH. | |||
I think we should keep that. | |||
integral | with the semantic that FETCH is called for every mention of $x ? | 15:00 | |
autrijus | whenever $x occurs that demands a rvalue. | 15:01 | |
note that perl, like C and Java etc, adds implicit FETCH and STORE depends on context | |||
and unlike ML etc. | |||
integral | ok | ||
mjl69 | autrijus: sorry to ask a question and disappear. Were should I look for embedded flags? | 15:02 | |
autrijus | mjl69: if you didn't modify your environment, then you didn't add embedded flags | ||
gaal | @papers.push("Threads cannot be implemented as a library" => portal.acm.org/citation.cfm?id=1064978.1065042) | ||
mjl69 | oh yeah. I did set various environment variables as directed in the directions. Let me check which ones.. | 15:03 | |
autrijus | mjl69: try disabling all embed first and slowly add more... | 15:13 | |
dudley | mjl69: Those errors are usually caused by gcc 4.0 pollution somewhere. | 15:27 | |
svnbot6 | r5975 | autrijus++ | * New formulation of containers, taking into account the | ||
r5975 | autrijus++ | four combination of "tieable" and "constant" traits. | |||
r5976 | autrijus++ | * $CALLER::_ is now again usable in defaults. | |||
autrijus | I'm running out of names. ;) | 15:28 | |
dudley | mjl69: For example, if you've build parrot with gcc 4.0, you'll get those errors when you try to embed it into pugs | ||
autrijus | a Pad maps Symbol to Container; Container is a Cell typed with Scalar/Array/Hash; a Cell is either mutable or a constant Box; a Box is either a tieable box or a nontieable box. | 15:29 | |
the only mutable point here is the Cell; everything else is statically bound. | |||
QtPlatypus | Any problem in computer scince can be solved by an extra leval of indirection. | 15:30 | |
autrijus | (and if it's constant, there's no way of changing the value except by introducing a new symbol with the same name in an inner scope) | ||
QtPlatypus: how very sadly true | |||
better names welcome though. | |||
mjl69 | dudley: maybe that's it. It could be the parrot compilation. | 15:36 | |
svnbot6 | r5977 | autrijus++ | * reformat and todoify splat_rw.t | ||
dudley | I just confirmed that definitely causes it. Maybe that should be documented somewhere... :-) | 15:37 | |
rafl | Hm, my svk eats up 80% of 512MB RAM. :-/ | 15:39 | |
mjl69 | speaking of parrot... should PARROT_PATH be set to the path of where the source files are (the ones I downloaded) or to where the installation of parrot is? I installed parrot to the default location, but set PARROT_PATH to the directory of source files. | ||
dudley | mjl69: The source dir | 15:40 | |
clkao | rafl: what are you doing? | ||
mjl69 | dudley: that's what I thought. Just wanted to be sure. Thanks! I am going to start over with everything when I get a few more free minutes. | 15:41 | |
dudley | np | ||
rafl | clkao: A simple pull. | ||
clkao | rafl: eek. how simple? large repository? many changes? | 15:44 | |
rafl: or it's the first time you run pull. it's probably building some cache | |||
and you are using 1.00 rather than 1.01, right? | |||
rafl | clkao: the pugs repository, small changes to 3 files. Not the first pull. v1.00 (debian) | 15:45 | |
clkao | rafl: hmm. do you see 'auto-merge... ' message ? where does it hang? | 15:48 | |
rafl | clkao: I don't see such a message. It doesn't really hang. It just uses a huge amount of memory which makes the system swaping. This occurs before any output is made. | 15:51 | |
svnbot6 | r5978 | dudley++ | *Document link failures on MacOS due to inadvertent linking of gcc 4.0 objects. *Add me to AUTHORS. | ||
clkao | rafl: ya, that's a known problem for 1.00 when building copy cache. | 15:52 | |
rafl | Hm. The Debian wishlist bug for 1.01 is already filed 11 days with no reaction from the maintainer.. | 15:56 | |
clkao | eek | 15:57 | |
Aankhen`` | Yay! I managed to build SVK 1.01! | 17:00 | |
autrijus | woot! | 17:01 | |
Aankhen`` | Though only 84% of the tests pass... | ||
Then again, that's not as bad as I expected. :-D | |||
clkao | Aankhen``: huh? 84% of svk tests? how come? | 17:04 | |
GeJ | Aankhen``: on which platform if i may ask? | 17:06 | |
Aankhen`` | I have no idea. | ||
I just followed the instructions on the Wiki. | |||
(clkao) | |||
GeJ: Win32. | |||
GeJ | hum, ok so it's not related on the problem I'm thinking of on FreeBSD. | ||
17:11
brentdax_ is now known as brentdax
|
|||
svnbot6 | r5979 | autrijus++ | * change PIL from ST monad to STM monad. | 17:22 | |
mjl69 | dudley++ # you were right, had to make clean parrot and do all over. no link errors this time. | 17:24 | |
dudley | mjl69: cool :-) | 17:30 | |
gaal | autrijus, ping | 17:46 | |
autrijus | hm, treacherous perl5 | 17:57 | |
gaal: pong | |||
$ perl -e '$_++ for 1,2' | |||
Modification of a read-only value attempted at -e line 1. | |||
$ perl -e '$_++ for 1..2' | |||
# ok | 17:58 | ||
gaal | autrijus, i'm assuming more or less (trecherous) perl5 semantics in use/import | ||
wow | |||
one's a list and one's a... list? :) | |||
autrijus | .. apparently promotes values into containers | ||
gaal | is it because of ..'s special iterator magic added sometime in 5.00x? | ||
autrijus | I have no idea. | 17:59 | |
I'm so happy I'm not reimplementing perl5. | |||
gaal | so i'm adding to EvalStyle a Bool evalInit member: if true, opEval attempts to run the function &import in the evalled code | ||
problems: | |||
1. how do i know the namespace to look in? | 18:00 | ||
2. when we introduce finer export controls, we'll have to pass information to the parser, since that's where importation takes place now | |||
autrijus | the parser currently calls &import | 18:01 | |
gaal | oh! | ||
really? | |||
autrijus | yeah. | ||
l586 | |||
gaal | i'm talking about init actually, not symbol importation | ||
autrijus | Parser.hs | ||
gaal | looking | ||
autrijus | init too. | ||
gaal | cool! | ||
autrijus | :) | ||
gaal | does this get called in "require" too? or does dumpEnv control that? | 18:02 | |
ah, it's directly on &use, i see | |||
does use Foo; use Foo call Foo::import twice? (it should) | 18:03 | ||
anyway: i'm adding &no. | 18:05 | ||
autrijus | cool | 18:06 | |
gaal | i'm not sure why Prim has op1 "use" at all though if the parser reduces this? | ||
l255 | |||
autrijus | to give it a different form than "require"? | ||
I have no idea either | |||
gaal | ah, i think they share the responsibility. if i'm reading this correctly, l583 in Parser does 'App (Var "&use")...' which delegates some of the work to the prim (and eventually to Prim.Eval) | 18:08 | |
autrijus | nod. | 18:10 | |
svnbot6 | r5980 | autrijus++ | * lift up the "Id" from Container so that each container's Id | 18:16 | |
r5980 | autrijus++ | remains mutable even if the content is immutable. | |||
gaal | i don't understand the hack in Parser:588 | 18:23 | |
it's supposed to tell whether the module defines &import | 18:24 | ||
autrijus | gaal: the hack is to check for &Foo::import.name | ||
because there's no .defined yet | |||
and autovivified Code has empty names. | |||
gaal | but what does .name mean? | ||
aaahah! | |||
i didn't know that existed. :) | |||
autrijus | :) | 18:25 | |
?eval &say.name | |||
evalbot6 | '&*say' | ||
gaal | well, &no is almost exactly the same as &use | ||
autrijus | ?eval &say::goodbye.name | ||
evalbot6 | '' | ||
gaal | ~/o say my name, say my name ~/o | ||
ahem. | |||
except that the hook it calls is unimport instead of import, and that it doesn't eval. | |||
i'll see if i figure out how to factor this out. | 18:26 | ||
mjl69 | I hope that 'make test' finishes before I have to pack up and go home... can't wait to finish install and start playing. | 18:27 | |
gaal | oh: what's val doing in line 589? why does App sub need it? | ||
mjl69: you can start playing already, you have a pugs :) | |||
stevan | autrijus: any thoughts on the metamodel? should I continue along this direction? | ||
autrijus | stevan: yes, I think it's sanity | ||
mjl69 | gaal: that's what I mean, play pugs :-) | 18:28 | |
autrijus | and I already has some good ideas of how to integrate it to PIL.hs runcore | ||
stevan | autrijus: I will take it that sanity is a good thing in this situation :) | ||
gaal | mjl69, i know. but if you're already testing then you already have an executable and you don't need for make test to complete to start playing :) | 18:29 | |
svnbot6 | r5981 | iblech++ | * INSTALL: Wrap dudley++'s new paragraph. | ||
r5981 | iblech++ | * ext/Algorithm-TokenBucket/t/test.t: Skip test which depends on low system load. | |||
r5981 | iblech++ | * PIL2JS: s:g/GET/FETCH/ to align to PIL.Internals and Perl 5. | |||
autrijus | gaal: I think it's a typo. supposedly import's invocant is the caller package | ||
stevan: yes. :) | |||
gaal | good. :) | ||
mjl69 | gaal: oh. good point. didn't think of that. Time to cmd-n a new terminal window... | 18:30 | |
dudley | doh. Damn soft wrap. | ||
mjl69 | you know how we Mac users are. They want to take are terminals away because we are like a bunch of dangerous babies. | 18:31 | |
s/are/our | |||
autrijus parsed "degenerate barbies" | 18:32 | ||
obviously I need to sleep | |||
mjl69 | same thing :-) | 18:33 | |
EEEh! it's true, pugs is already there! | |||
gaal | unregenerate babbies? | ||
mjl69 | hello, worldbool::true | 18:35 | |
the output of my first pugs program | |||
autrijus | ?eval "Hello, world" | ||
evalbot6 | 'Hello, world' | ||
autrijus | ?eval say "Hello, world" | ||
evalbot6 | Hello, world bool::true | ||
gaal | (i have the feeling the vast majority of people living in babbie, alabama are christians, though.) | ||
autrijus waves. sleep - bbl | |||
mjl69 | autrijus++ | 18:36 | |
svnbot6 | r5982 | iblech++ | PIL2JS: Step 1 of renaming PIL::Nodes to PIL and PIL::Papp, PIL::PLit, etc. | 18:58 | |
r5983 | iblech++ | PIL2JS: Step 2/3 of renaming. | |||
r5984 | iblech++ | PIL2JS: Step 3/3 of renaming, PIL2JS works again now. | |||
Aankhen`` | G'night. | 19:23 | |
svnbot6 | r5985 | gaal++ | have &use call &import with the caller package as first arg | 19:36 | |
integral | hmm, &import is a sub rather than some kind of "package method" | 19:40 | |
iblech | autrijus: Will the PIL2 for { my $a; { say $a } } look like { my $a; { say $OUTER::a } }? If so, implementing lexicals in PIL2JS without having to rely on JS's "lexicals" would be a bit easier :) | 19:45 | |
autrijus: (But it's not a problem if the answer is no :)) | 19:46 | ||
xinming | anyone here can do a prediction of perl 6 release time? :-) | 19:49 | |
integral | Christmas ;-) | ||
dudley | xinming: This is the part where you say, "Which Christmas?" ;-) | 19:50 | |
Limbic_Region | integral - that has been long proven to be misrepresented truth - it is no mystery why p6 will have a built in way to count the number of days till Easter - it must be better than PHP in all ways afterall | ||
integral | heh | ||
Limbic_Region | the count does indeed start from Christmas though which is where the rumor got started | 19:51 | |
Limbic_Region ducks | |||
xinming | In fact, I ever heard that there might be a rc of perl 6 relase this year. No sure. | 19:52 | |
integral had the impressive pm was still being optimistic | |||
Limbic_Region | xinming - there was a FAQ stating that there might be something out by the 3rd quarter of this year - it has been removed | 19:53 | |
no one knows for sure when it will be out - hence the joke about "Christmas" with no year | 19:54 | ||
Pugs happens to be the furthest along (and AFAIK the only actively developed) p6 compiler | |||
you can write an impressive amount of p6 code today | 19:55 | ||
integral | the problem comes when you encounter an area that was made up on the spot ... | ||
iblech | And you can even compile 62.68% to JavaScript :) | ||
integral | iblech++ | ||
Limbic_Region | iblech++ | 19:57 | |
iblech | Thanks, thanks :) | ||
Limbic_Region | but only 62.68% of the X% of p6 that Pugs currently supports (and has tests for I would imagine) | ||
or rather - what exactly does that 62.68% represent? | 19:58 | ||
iblech | Oh, right. 62.68% of Pugs' testsuite | ||
(36 unexpected success :) -- But many tests (t/oo, t/packages) don't even compile to PIL) | 19:59 | ||
Limbic_Region | so it is 62.68% of the Pugs' test suite that compiles to PIL, which represents some percentage of p6 implemented by Pugs (hopefully we have 100% code coverage but I am not sure), which represents some percentage of how much of the p6 specification that has been completed (my guess is around 85%) which represents some portion of the entire spec (as in it hasn't been written down yet), which is more likely around 40% | 20:01 | |
iblech | Right. | 20:02 | |
Limbic_Region | still quite impressive | ||
autrijus | iblech: the answer is "yes". | 20:15 | |
svnbot6 | r5986 | autrijus++ | * thoroughly decouple Tieable and "is rw"; if a container is neither, | ||
r5986 | autrijus++ | then it is a pure value. This means constant containers cannot | |||
r5986 | autrijus++ | ever be rebound. | |||
autrijus | Limbic_Region: instead of 85% I'd say 25%. | 20:16 | |
but the other numbers agree with my gut feeling | |||
iblech | autrijus: Great :) | ||
szabgab | hi nothingmuch ! | 20:17 | |
autrijus | iblech: the idea is to enable all lexicals always addressable by absolute number anywhere. | ||
iblech: you still need to provide closures | |||
but at least that invariant makes closures far easier to simulate. | |||
(this is also so we can avoid the completely broken parrot lexical pad.) | 20:18 | ||
iblech | autrijus: Makes perfect sense | ||
autrijus | iblech: good. I hope my r5986 also makes perfect sense to you. | 20:19 | |
iblech | Looking | ||
autrijus | the basic premise is that anything marked "is constant" is indeed constant and is always inlinable. | ||
if it is constant and tieable, then you need to point to the mutable cell that represents the tiedness | 20:20 | ||
some obvious consequences are: | 20:21 | ||
sub f ($x, $y) { $x := $y } # error | |||
sub f ($x is rw, $y) { $x := $y } # fine | |||
iblech | Makes perfetct sense. :) | ||
autrijus | yay. :) | ||
also, suppose %ENV is constant is tied | 20:22 | ||
(which it wasn't in the current example) | |||
Limbic_Region | autrijus - of the known specifications available - you think only 1/4 has been implemented? | ||
autrijus | Limbic_Region: aye | ||
iblech: then you can freely tie/untie it | |||
Limbic_Region | from the synopses - or from decisions made on the list that aren't reflected in the docs or both? | 20:23 | |
autrijus | iblech: but it's =:= stays invariant. | ||
so if you have a constant but tied scalar, it is conceivable that you can still assign to it whilst it is tied. | |||
iblech | Right, makes sense. | 20:24 | |
autrijus | and all these information are made upfront at compile time | ||
and never changeable, so reduction rule is straightforward. | |||
Limbic_Region: both | |||
Limbic_Region: but the delta is insignificant | 20:25 | ||
Limbic_Region: see, we don't even have roles :) | |||
and the container types are quite bogus, as anyone using "is rw" and references can attest | |||
etc. | |||
but we're fixing it faster than before. :) | 20:26 | ||
Limbic_Region | hmmm - I think we are looking at this from two different perspectives - but that's the great thing about statistics - you can twist them to lie how ever you want | 20:28 | |
I was thinking of objects as 1 defined unit though that 1 unit likely represents a much larger portion of the language then I was previously giving it credit for | 20:29 | ||
nothingmuch | evening | ||
Limbic_Region | salutations | ||
nothingmuch | szabgab: ping | 20:31 | |
svnbot6 | r5987 | autrijus++ | * Remove the old vtable-based tie interface. | 20:37 | |
r5987 | autrijus++ | * Make all container contents generatable via Arbitrary. | |||
iblech | sub foo (?$a = $a) # ok? i.e., does the second $a refer to the first $a? | 20:41 | |
Hm, I think so. | |||
autrijus | yes. that line is as good as saying ?$a. | 20:46 | |
my $a = $a; | |||
hm. perl does not ever have list of lists as a value, right? | 20:48 | ||
integral | hmm, so this rule means you can do stuff like my &bottom = { &bottom.() } | ||
autrijus | it's always list of array references. | ||
integral: yes. | |||
20:48
moan is now known as moan_
|
|||
autrijus | ?eval my &bot = { &bot() }; bot | 20:48 | |
evalbot6 | (no output) | 20:49 | |
autrijus | good. | ||
Khisanth | that is not infinitely recursive? | ||
autrijus | that is. | ||
integral | pity _|_ isn't a word | ||
iblech | autrijus: re LoL, right, I think. | ||
20:51
moan_ is now known as moan
|
|||
autrijus | integral: _L | 20:52 | |
?eval my &_L = { _L }; _L | |||
evalbot6 | (no output) | ||
integral | is that the time out, or some really cool bottom detection? | ||
autrijus | timeout. | 20:53 | |
integral | hmm, I suppose the hard bit of really good detection would be signals | 20:54 | |
21:01
brentdax_ is now known as brentdax
|
|||
moan | Kind of a faq, i guess, but nevertheless: Are the synopses in sync with the language pugs is currently implementing? | 21:01 | |
mugwump | that's the idea, moan, but pugs doesn't cover all the synopses specified behaviour | 21:05 | |
nor do the synopses cover certain more 'out there' features aiui, like continuations. tests for those features are in t/unspecced/ | 21:06 | ||
moan | thanks. Finally, I got something fresh to read, then... and to type, afterwards | 21:07 | |
autrijus | iblech: still there? | 21:10 | |
iblech | autrijus: Yep | ||
autrijus | ok. r5988 | 21:11 | |
finally gave a reasonable (to me) semantics to evaluation results | |||
-- | Any PIL expression can only evaluate to one of three value results. | |||
svnbot6 | r5988 | autrijus++ | * formalizing the evaluation results domain | ||
autrijus | Void | Item Item | List [Item] | ||
integral | hmm, is ./pugs -I ext/Test/lib t/unspecced/cont.t the best way to run a test file manually? | ||
autrijus | integral: or "prove" | ||
integral | prove doesn't seem to work for uninstalled pugs | 21:12 | |
autrijus | iblech: the definition of "Item" is from S02 | ||
integral: right. | |||
iblech: then there's the fact that Ref always point to a container. | |||
the last bit I'm less sure of; conceivable we can distinguish between container refs and value refs. | |||
or we can elect to promot values to constant containers and ref them. | 21:13 | ||
the delta seems to be on Void; do we have a way to obtain a reference to Void? | |||
(no container can contain Void directly) | |||
in perl5, \() is the same as () | |||
iblech | I'd take option #2, promoting values to constant containers | 21:14 | |
autrijus | that means | ||
\(Foo.new) | |||
is actually | |||
my $temp is constant = Foo.new; \$temp; | |||
and \(1,2,3,4) would be | 21:15 | ||
my @temp is constant = (1,2,3,4); \@temp; | |||
(disregarding the fact that \ is a listop for now, suppose it isn't) | |||
that sounds sane to you? | |||
iblech | Right, makes sense. | ||
Khisanth | so it is no longer \1,\2,\3,\4 ? | ||
autrijus | Khisanth: I don't know, I'm assuming it still is | 21:16 | |
?eval \(1,2,3,4) | |||
evalbot6 | [1, 2, 3, 4] | ||
autrijus | heh. | ||
I'm defeated by pugs :) | |||
I don't know, I can argue bothways | |||
Khisanth | ah to be defeated by you own creation ... isn't that always a goal? :) | 21:17 | |
autrijus | :) | ||
iblech: do you think Void/Item/List is comprehensive enough? I'm a bit uncertain about whether Junc is also a fundamental val type. | 21:18 | ||
otoh, I can argue that Junc is always an Item | |||
but there is still the question whether it's a Obj or a intrinsic. | |||
s/or a/or also a/ | 21:19 | ||
i.e. whether it makes sense to talk about (1|2) as an unboxed intrinsic. | |||
iblech | Hm, I'd probably see Junc as an Item. | ||
autrijus | but what about Pair? | 21:20 | |
where does the madness end? | |||
:) | |||
iblech | :) | ||
Hm, the pair thing | |||
I'd take this to Item, and specialcase only in the binding code | |||
autrijus | so you mean both are intrinsic? | ||
iblech | I.e. treat Pair as an otherwise normal object | ||
autrijus | nono, normal objects are Obj | 21:21 | |
I shouldn't confuse you with the Item terminology | |||
let's call it something else. | |||
iblech | :) | ||
autrijus | data Val = Void | Single Single | Plural [Single] | 21:22 | |
data Single = Bit Bit | Int Int | Num Num | Str Str | Ref Ref | Obj Obj | |||
a bit better? | |||
iblech | Ok. | ||
Yep. | |||
autrijus | ok. the question is whether Junc and Pair are Single variants. | ||
i.e. whether they can exist in an unboxed form. | 21:23 | ||
iblech | I'd place Pair and Junc on the same level as Bit, Int, etc., i.e. make them Singles | ||
autrijus | i.e. non-object values | ||
anything else that come to mind? | |||
type? | |||
iblech | I'd make Type a Single, too. | 21:24 | |
autrijus | do note that each Single has its lowercase types :) | ||
my pair $x = (1=>2); | |||
iblech | Even my obj $x? | 21:25 | |
autrijus | no, that is the assumed form | ||
you always get Obj unless you declare one of the other forms. | |||
iblech | Ok. | 21:26 | |
autrijus | ok. so we have pair, junc and type as the non-object intrinsics. | ||
dare I suggest Code? | |||
iblech | Yes. | 21:27 | |
autrijus | ok, I'm out of madness bits :) | ||
mugwump | I thought function application was the only intrinsic! | ||
iblech | :) | ||
autrijus beats mugwump with church numbers | |||
handles and rules can survive without being intrinsics. | 21:28 | ||
ok. I think I can argue that pair, junc, type and code fits in the "compact storage" mental model | 21:30 | ||
while everything else can't | 21:31 | ||
so, is Pair just two containers | 21:32 | ||
or two singles? | |||
two singles, I'd argue. | 21:33 | ||
hm, not neccessarily. they mean different things | |||
two containers feel less broken. | 21:34 | ||
iblech | Right, and that's the way pairs are handles in PIL2JS, too. | ||
Consider $pair.key = ... | |||
autrijus | nod. | 21:35 | |
but junctions are Singles | |||
as lvalue junction is doomed | |||
ok, the new Val is in. I can rest in peace for a bit... the new Eval would be fun. | 21:45 | ||
svnbot6 | r5989 | autrijus++ | * Completed first cut at the Val domain of new PIL runcore. | ||
r5989 | autrijus++ | iblech++ for joining my madness in adding four apocryphal | |||
r5989 | autrijus++ | unboxed types: Pair, Junc, Type, Code. | |||
autrijus | & | ||
QtPlatypus | autrijus: Shouldn't the unboxed types be called pair, junc, type, code ? I thought the convention was caps for objects and boxed types, no caps for unboxed types. | 21:58 | |
iblech | Right. But Haskell demands that constructors are ucfirst. | 22:00 | |
Of course, the unboxed types as seen from Perl 6 will be lowercase. | |||
QtPlatypus nods. | 22:12 | ||
buu | perlbot: karma autrijus | 22:16 | |
jabbot | buu: autrijus has neutral karma | ||
perlbot | Karma for autrijus: 11 | ||
nothingmuch | perlbot: karma iblech | 22:17 | |
jabbot | nothingmuch: iblech has neutral karma | ||
perlbot | Karma for iblech: 27 | ||
svnbot6 | r5990 | iblech++ | * t/var/var.t: Added 25 more tests. | ||
r5990 | iblech++ | * PIL2JS: Real lexicals. $OUTER::. Tree traversing is fun :) | |||
r5990 | iblech++ | * Previously, PIL2JS relied on JavaScript's broken "lexical" semantics (i.e. | |||
r5990 | iblech++ | "alert(foo); var foo" works). Now, PIL/PIL2JS handles lexicals. | |||
r5990 | iblech++ | * Thus, "say $a; my $a" is now illegal, and the $sub in | |||
nothingmuch | that's not making any sense | ||
svnbot6 | r5990 | iblech++ | my $a = 3; my $sub = { $a++ }; { my $a = 9; say $a; say $sub() } | ||
r5990 | iblech++ | captures the correct $a. The downside is that 05-sub.t stopped to pass, but | |||
r5990 | iblech++ | that problem will go away as soon as PIL2 enters the world. :) (Other tests | |||
r5990 | iblech++ | still work.) | |||
r5990 | iblech++ | * Because PIL2JS handles part of the lexical allocation thing, we got | |||
r5990 | iblech++ | $OUTER:: for free. :) | |||
iblech | nothingmuch: Probably the database was reset or so | 22:18 | |
perlbot: karma iblech | |||
jabbot | iblech: iblech has karma of 337 | ||
perlbot | Karma for iblech: 27 | ||
iblech | hrm | ||
nothingmuch | jabbot: you need to stop drinking | ||
jabbot | nothingmuch: Oh, I need to stop drinking? | ||
svnbot6 | r5991 | iblech++ | * t/magicals/dollar_underscore.t: s/eval/try/. | 22:55 | |
r5991 | iblech++ | * t/builtins/arrays_and_hashes/pick.t: Very minor comment fix. | |||
r5991 | iblech++ | * PIL2JS: | |||
r5991 | iblech++ | * PIL::PVal: Fix compilation of VBools (I accidently broke it with the | |||
r5991 | iblech++ | ->fixup commit r5990). | |||
r5991 | iblech++ | * Prelude::JS::ControlFlow: &statement_control:<loop> should respect Perl's | |||
r5991 | iblech++ | idea of booleaness. Pro: Some more tests should pass (resmoking), con: | |||
r5991 | iblech++ | additional slowness... but "I can get wrong results fast, too" :) | |||
brentdax | Is postfix:<++> (Str) still magical in Perl 6, and if so, is that implemented in Pugs? | 23:35 | |
iblech | Both yes: | 23:36 | |
?eval my $a = "a"; $a++; $a++; $a++; $a | 23:37 | ||
evalbot6 | \'d' | ||
buu | ?eval my $a = "d"; $a--; | ||
evalbot6 | 'd' | ||
buu | awhh | ||
ayrnieu | ?eval my $a = "d"; $a--; $a | 23:40 | |
evalbot6 | \-1.0 | ||
wolverian | haha. | ||
ayrnieu | similar to perl 5. perl -le '$a = "a"; $a--; print $a' | ||
postfix ++ hath magic. | 23:41 |