Pugs 6.2.9 released | pugscode.org | pugs.kwiki.org | paste: sial.org/pbot/perl6 | www.geeksunite.net
Set by autrijus on 4 August 2005.
wilx Hehe. 00:03
brentdax Does Pugs's CGI.pm support POST yet? 00:19
nothingmuch hello 00:26
svnbot6 r6089 | Stevan++ | Perl6::MetaModel - (p5) 03:12
r6089 | Stevan++ | * Methods are now all created through the closure factory (even submethods)
r6089 | Stevan++ | - fixed some tests and misc. code to accomidate this
meppl lalala 03:17
svnbot6 r6090 | fglock++ | * new class "Iter::Range" - A lazy range iterator, 04:15
r6090 | fglock++ | like "1..Inf" or "-Inf..0" or "1..10000000"
r6090 | fglock++ | * Array::Lazy implements slice,push,pop,shift,unshift.
r6090 | fglock++ | * more tests
r6091 | Stevan++ | Perl6::MetaModel - (p5) 05:51
r6091 | Stevan++ | * updates to the 10,000 ft view
r6091 | Stevan++ | - added BOOTSTRAPPING section
r6091 | Stevan++ | - fixed diagram
r6091 | Stevan++ | * added a ::create_P6opaque function to centralize
r6091 | Stevan++ | the creation of instance structures
r6091 | Stevan++ | * added an object ID to that P6opaque structure
r6091 | Stevan++ | * $obj->id now returns unique id for each instance
r6091 | Stevan++ | - added new test file for this
r6091 | Stevan++ | * ::Class object are now more useful, however they
r6091 | Stevan++ | are not yet where I want them to be
r6091 | Stevan++ | - misc. work moving towards seperating class creation
r6091 | Stevan++ | and applying classes to the object env.
r6091 | Stevan++ | - you can now call class Methods on Class objects
r6091 | Stevan++ | (which I think might be wrong)
r6091 | Stevan++ | - added test file for class objects
brentdax Hmm...possible issue in patterns with the sequence "\<-"... 06:30
GeJ hello all 07:13
brentdax Is there a maximum size for a rule, beyond which it's no longer parsed properly? 07:15
Aankhen`` Morning.
brentdax I seem to be in a situation in which adding anything more to a rule makes it silently fail all matches, even ones which shouldn't be affected by it. 07:16
(In this case, a 186 byte regex seems to work, while a 187 byte one fails. Even spaces change it.) 07:19
Interestingly, spacing earlier in the program affects it as well. Could I be hitting the end of a buffer or something? 07:21
Aankhen`` The rule is in a Perl 6 file run by Pugs? 07:22
brentdax Yeah.
Aankhen`` Could you try running it directly under Parrot? 07:23
brentdax How do you suggest I do that? 07:25
Aankhen`` Uh, that would probably entail writing it out in PIR.
Dang.
brentdax Is there a way to see what it's trying to feed to Parrot? 07:26
Aankhen`` I'm not very familiar with the interaction between Pugs and Parrot, so I can't say. 07:27
brentdax Kay...
wolverian use the -C flag instead of -B
that should only compile the PIR
humm, unless I totally misunderstood the problem. :)
brentdax I'm not using -B--I'm just concerned with how Parrot is seeing a rule PGE's being handed. 07:28
Aankhen`` Hmm.
-C PIR would add a lot of other stuff... but you could probably find the rule in it. 07:29
brentdax In any case, I have a workaround, even if it's "screw with spacing until it works". Less nasty than the workaround for the method-chaning bug (namely, "use lots of intermediate variables").
Aankhen: I'll see what I get from that.
Aankhen`` wanders off to shoot Terrorists. CZ, ho! 07:35
Hmm, that sounded wrong.
Ah well.
gaal is it correct for the interactive shell to prepare a new Env every time you do :e/:E ? 08:06
08:28 Aankh|Clone is now known as Aankhen``
nothingmuch seen autrijus 09:03
jabbot nothingmuch: autrijus was seen 12 hours 28 minutes 28 seconds ago
autrijus rehi \camels 09:08
pugscode.org/images/simple-compilation.png # first sketch
Aankhen`` Hi autrijus. 09:09
autrijus hey Aankhen``.
ods15 nothingmuch: speak of the devil :P
(the seen thing)
Aankhen`` Reading the last post in a flamewar is like listening to the punchline without the joke. 09:10
Ooh, pretty graphic.
nothingmuch ods15: =)
i actually managed without autrijus 09:11
but hola autrijus, anyway
autrijus nice to hear
hola nothingmuch. I feel like drawing pictures today
ods15 blah, i hate wine
nothingmuch autrijus: why only one code generartor? 09:12
Aankhen`` Hey! The Emitter for PIR doesn't have any blue in it! DISCRIMINATION!!!
Aankhen`` coughs.
Sorry.
Evil alter-ego took over there for a sec.
nothingmuch Aankhen``: beat it with a stick when it does that 09:13
NO DON"
T DO THAT!! AJHSTR
SHUTUP!
sorry, mine too
Aankhen`` nothingmuch: I tried that and ended up hurting myself.
autrijus nothingmuch: right that shoul be plural
Aankhen`` (it ducked and left me to bear the brunt of the stick)
nothingmuch autrijus: also disambiguate "Evaluator" to "pugs evaluator in haskell" or something like that 09:14
we're also going to have a PIL parser, right? so that you can compile to PIL and evaluate it with pugs
autrijus nothingmuch: the PI 09:16
nothingmuch: the PIL parser is called Prelude.read
or SerTH.read
but some kind of read.
(or YAML.load) 09:17
nothingmuch autrijus: overall pretty drawing 09:18
i like your somewhat arbitrary choice of symbols =)
in that case add a loop: PIL code -> Disk
autrijus hm? there is a underlying theme :)
nothingmuch and then Disk -> PIL Loader
Aankh|Clone nothingmuch: Sorry sir, I already used "pretty". I'm going to have to ask you to step away from my space.
nothingmuch beats up Aankh|Clone 09:19
GIVE US BACK OUR HACKER!
autrijus nothingmuch: note that the PIL code already imply on-disk file.
Aankh|Clone Ow! Ouch! Oh! Ow!
autrijus all square symbols are on disk
nothingmuch unless, ofcourse, despite being evil you hack better than him
Aankh|Clone Maybe I do, and maybe I don't. Guess you'll never know. >:-D
`fail` is preferred over `die`, right? 09:20
nothingmuch autrijus: make a note of that
or add a little disk icon on the lower right corner of each of these
Aankh|Clone Or a safety pin. I'm sure that'd make the meaning clear. :-D 09:21
nothingmuch Aankh|Clone: fail == die under use fatal, or 'undef but error ...' under 'no fatal'
so yes, prefer it
Aankh|Clone Indeed.
OK.
Thanks.
nothingmuch errors should be 'tainty' under my proposal that everyone ignored 09:22
if you have a data structure that touched any error you should be able to recover the error from the top level
Aankh|Clone How does a data structure touch an error? 09:23
autrijus updated: pugscode.org/images/simple-compilation.png 09:28
brb... 09:31
nothingmuch autrijus: nice =) 09:32
coral nothingmuch: so any data structure modified within a transaction that errors out would be hinted with a link back to the error thrown during the transaction? 09:45
nothingmuch even more general
coral where transaction is probably block in perl lingo
nothingmuch i have given a 'fail "moose"' to a module taht doesn't 'use fatal' 09:46
it used the value
to generate another
but threw the value away
so it's no longer 'undef'
the 'but error "moose"' part leaks into structures it made that touched the undef 09:47
so eventually i get an "ok" structure
but it has a 'but error "moose"' attached to it
i can use it
and nothing will happen
but if I fail in relation to that structure, the user can see the error that may have started it all
the first and third references to first body are unique 09:48
i mean: the first and second I aren't the same code author
sorry for being confusing
integral hmm, does PGE support cuts, or have some docs? 10:20
10:50 Maddingue__ is now known as Maddingue 11:50 Aankh|Clone is now known as Aankhen`` 15:39 Aankh|Clone is now known as Aankhen``
autrijus rehi 15:56
another picture! pugscode.org/images/container.png 15:57
stevan horray for visual thinking!! 15:59
autrijus :) 16:00
actually I think symbolically
stevan me too
autrijus those are transliterated from Container.hs :)
I hope this will make explaining to people easier
stevan: saw pugscode.org/images/simple-compilation.png too?
stevan yes, I saw this this morning 16:01
very nice as well
autrijus stevan: as I move forward with the metamodel I'll do one for that too
stevan cool
autrijus also for the value types
stevan so Id's are refs to other Scalars? 16:02
the =:= part
autrijus er no 16:03
all the links read "has-a"
and Id is just a simple unique id
stevan ah
ok
so each scalar has-a Id (shown as a big 4)
autrijus yes. 16:04
rather
each cell has Id
stevan yes, cell
BTW - did you see I added $obj.id into the metamodel
autrijus yes, cool
I still see two potential problems with my container model drawing 16:05
one is that "my $a is constant" would be rebindable to something nonconstant
gaal so, how much of Prelude.pm can be compiled to PIL presently? that's the most appropriate target for precompilation, isn't it? (or a binary representation of PIL)
autrijus so we may want to have a "Constant Container" variant that has a read-only link to a constant cell only
gaal hi btw
autrijus yo gaal
gaal nice pics :)
stevan if you have a moment, can you review the Bootstapping section in the 10,00ft view to make sure it fits with your understanding 16:06
autrijus stevan: I have, and it does :)
stevan autrijus: excellent, it is so nice to have some meta-company over here :)
autrijus: so "my $a is constant" means you cannot rebind $a? 16:07
autrijus stevan: I don't know at all
I think this is a p6c question
I'll p6c it.
(hm, maybe it's a p6l question. I have no idea)
autrijus thinks about cc'ing both.
stevan cc both 16:08
autrijus anyway, another problem is that
gaal naive Q about the container diagram: are there only pads? where are "our" vars stored?
stevan on one hand it makes sense that $a is not rebindable, since it is a constant
autrijus gaal: a pad, of course.
stevan but being a variable, it seems it should be re-bindable
autrijus another problem is that "my $a is SomehowTiedScalar"
will be untie()able
stevan otherwise the name $a is useless in the rest of the program
autrijus like, always untieable 16:09
and I'm not sure whether that's correct.
gaal: pad is something that maps names to containers :)
gaal autrijus, that isn't the way it was in p5, is it? i said it was a naive question <g> but i seem to remember only lexicals are stored in pads there, with dynamic vars stored... elsewhere? :) 16:10
autrijus gaal: dynamic vars are stored in hashes :) 16:12
gaal the namespace hash, yes? eg %main:: 16:13
autrijus hm, you are right.
under that drawing
you can't remove names from a pad
while under package vars
we can do sick things like
our $x; delete %OUR::<$x>; 16:14
or can we?
gaal in p5 we certainly can :)
autrijus %OUR::<$x> = 9;
right. :)
but in p5 we handled it with globs 16:15
I guess that means we use container refs in p6.
on the other hand, I can argue that Pad is always read only 16:16
gaal oh, i had something to ask about 'use fatal'... but i don't want to interrupt you guys so i'll pop by later?
autrijus and the package symtable is a mutable hash
and all it does is it reads up the readonly pad, augment it, and store it back
I'll get there when I get there :)
gaal: no, just ask :)
gaal well, the provisional internals support for fail_ in Prim uses a magical $?FAIL_SHOULD_DIE 16:17
thing is, every scope should be able to mask the previous version of that var
and every fail should die/return undef according to the nearest scope's var. 16:18
wolverian isn't it hte caller's scope's?
s,hte,the,
gaal yes.
wolverian right. carry on, then :)
gaal so the question is how should use fatal create a lexical in the caller's scope? can it be done at all without internals support? 16:19
%CALLER::<%MY::<$?FAIL_SHOULD_DIE>> = bool::true wont' work :) 16:20
autrijus gaal: look at the "self.pm" thread.
gaal: larry said all exports are lexical by default now
gaal p6l?
autrijus so you just do mandatory exports
yeah, p6l I think
gaal ok, i'll read up on that then. thanks. 16:21
autrijus picture links sent to p6[cl]. 16:22
gaal returns from looking up that thread and some MJD lexical pragmas, funked out. 16:40
'punctuation' is particularly sick. 16:41
autrijus hm, url? 16:43
I've looked at mjd lexical pragmas but I don't remember 'punctuation'
integral search.cpan.org/~mjd/punctuation-0....tuation.pm
gaal search.cpan.org/src/MJD/punctuation...tuation.pm
note no "sub import" 16:44
actually, it isn't a lexical pragma, is it? 16:45
(as it works on the calling package.)
what pragmas were you looking at when you mentioned them, autrijus? 16:46
autrijus gaal: perl.plover.com/TPF/Pragmas/PROPOSAL 16:55
I'm not sure whether it's merged to 5.9 or not 16:56
check with rgs and friends
gaal v. interesting!
autrijus he's got a working patch
anyway, you can chase from the pointers :)
integral curiously lexical pragmas were mentioned in passing in the last few days on p5p 17:01
ah, by jhi in bug #969 17:02
nothingmuch evening 17:05
autrijus nothingmuch: new pretty pictures up :) 17:06
s/s//
nothingmuch i don't see the diff 17:07
autrijus er, I mean, : 17:08
pugscode.org/images/container.png
nothingmuch ah
i see you're in a graphical mood today =)
autrijus yup :)
nothingmuch explain not tiability please 17:09
mutable cell contains a scalar value
and also has a propertie? 17:10
and that propertie may contain the object it's tied to?
s/ie/y/
autrijus nothingmuch: www.nntp.perl.org/group/perl.perl6.compiler/1030
nothingmuch Mutable cells has-a mutable scalar value <-- scalar value is immutable, isn't it? 17:12
it gets replaced, not changed
autrijus right. the formal way to say it is
data Cell = Mut Id (TVar Value) | Con Id Value 17:13
which is immediately obvious.
nothingmuch tying a cell is basically replacing it's implementation, right?
autrijus (this is oversimplified as it ignores tiedness etc, but you get the point)
yes.
when a cell is tied, its value part cease to matter
nothingmuch what about it's ID?
autrijus that preserves.
nothingmuch sounds sane 17:14
autrijus you can't have a tied class to lie about the id.
well, that's what p5 does
not seeing a reason to change that :)
nothingmuch can I create arbitrary cells, and play with them?
like my $var = new Scalar::Cell::Mutable;
autrijus that's just my $var :)
nothingmuch my $container = $?PAD->new('$name');
autrijus but you're asking about full reflection, and I have no idea. 17:15
that's a p6l question.
nothingmuch $container->bind($var);
fair enough
wait, no
if i post no one will pay attention except the people who want to know
can you please think about this, and slyly sneak it in? 17:16
the interface really won't matter
autrijus I think the high level interface
that is := tie etc
makes sense
and since reflection is runtime dependent
we'll get there when we actually have two PIL runtimes.
nothingmuch uh, i don't get that
runtime dependant == different on parrot and pugs? 17:17
or happens at runtime?
autrijus different on parrot and js and p5.
nothingmuch that's not a good thing =)
autrijus no, but neccessary, as there are foreign objects.
and foreign containers, and foreign references.
nothingmuch i don't see why 17:18
autrijus for the pure-perl part, reflection hardly gets you anything beyond what the languange already have
nothingmuch the reflection interface can be just a set of proxy objects
autrijus oh. that.
in that case you can write it in userland.
there's no need for direct builtin runtime support.
nothingmuch it lets you introspect more accurately
well, yes there is 17:19
= is a sepcial construct, not an infix operatorf
it's not strictly necessary
but I can see how it may be desirable
whatever happenned to this: perl.plover.com/TPF/DEBUGGER/PROPOSAL ? 17:20
autrijus ::MY.container_named('$name').cell.assign(3);
you mean things like that, right?
nothingmuch yes
autrijus and my response is that while the pugs's PIL runtime implement things this way, eg. PIR implements it entirely differently. 17:21
nothingmuch i'd like a function I could pass by value that some other function can use to change the value of something that doesn't belong to them, that i've given them permission to change
autrijus but they manage to present the same interface of := and = etc
nothingmuch right
autrijus so the introspection is likely to be either runtime dependent (not good) 17:22
nothingmuch and my point is that there could be a thin api provided by each runtime
autrijus or emulated somehow (not sure how)
nothingmuch so that the dependant code could be given a uniform interface, just for introspection
and a runtime that doesn't support it will have that api, filled with 'fail'
autrijus and we can't know how until we actually have this container interface working on more than one runtimes.
so we'll get there when we get there.
bduf doesn't work in this case :) 17:23
nothingmuch bduf?
autrijus big design, up front.
nothingmuch ah, big design up front
heh
yeah, that's why i didn't want to poist it =)
autrijus good, then we agree (again)
nothingmuch what I meant is: when we're done with it, let's propse that this is the one true interface
and force the other runtimes to emulate it 17:24
autrijus oh ok. sure.
buu Hey. anyone happen to know how large the parrot binary/runtime is? 17:31
integral buu: try #parrot on magnet/irc.perl.org 17:32
stevan nothingmuch, autrijus: a think introspection layer atop the runtime sounds good 17:34
I am thinking the metamodel needs something similar
nothingmuch yes, i will do it tomorrow
uh, i mean, in 3 months
or never. 17:35
nothingmuch ducks
stevan waits for nothingmuch to poke his head up again
svnbot6 r6092 | Stevan++ | Perl6::MetaModel - (p5)
r6092 | Stevan++ | * Perl6::MetaClass now has a proper ::Class object,.. whoops
r6092 | Stevan++ | * Perl6::Class now stores all classes created in %ALL_CLASSES
r6092 | Stevan++ | - this is a prelude to allowing name based lookup, which
r6092 | Stevan++ | I will use to bootstrap while I am getting rid of the
r6092 | Stevan++ | current Perl 5 package based name lookup :)
r6092 | Stevan++ | - added some tests to check if classes are being stored properly
nothingmuch slowly pokes head up 17:36
nothingmuch leaps up with Buddhist Palm Kung Fu
and smashes the shit out of stevan
stevan falls over, blood streaming from his nose
hey WTF!
17:37 nothingmuch is now known as stevan__, stevan is now known as nothingmuch
stevan__ picks his nose in Colorful Tiger style 17:37
nothingmuch is really a girl
17:37 nothingmuch is now known as stevan
stevan__ holy lotus, we have swapped bodies (imagine mouth moving independantly of sound) 17:37
now we are one! 17:38
17:38 stevan__ is now known as nothingmuch
stevan :P 17:38
nothingmuch feels his braw is not in the right place
jdv79 geoffb, around?
stevan feels the pain of seperation as nothingmuch tears free
jdv79: I have not seen him in a few days,.. 17:39
jdv79 oh
what literature would you recommend on the metamodel stuff? 17:40
stevan jdv79: his article just came out on perl.com, so I imagine he was busy recently (damn $work, how I lothe thee)
jdv79 geoffb and i were supposed to be compiling and cleaning up that book list a while ago
stevan ahh
jdv79: The Art of the MetaObject Protocol is my new bible 17:41
jdv79 cool
stevan is all about CLOS, so you have to get used to lots of parens, but otherwise it is a very good read
jdv79: did you see the 10,000 ft view I wrote up yesterday 17:42
jdv79 parens - how untasty!
stevan jdv79: the code is quite readable though, very well written 17:43
autrijus: do you think ::Foo and Foo should be interchangable? 17:45
so that given: class Foo { method bar (Class $c:) { 'bar' }}
(not sure if that is correct, but I mean bar to be a class method) 17:46
Foo.bar() and ::Foo.bar() are the same thing
autrijus stevan: Foo sometimes mean &Foo 17:47
and sometimes ::Foo
depending on which is in scope
stevan why &Foo?
autrijus and the function one wins
stevan you mean sub Foo {}
ok
autrijus er I mean %Foo()
bah, &Foo()
consider
say Foo;
where there is a &Foo in scope.
stevan hmmm 17:48
but if there is not a &Foo in scope, then Foo means ::Foo
autrijus I think there's a lot to be said about Haskell's forced uppercase=class, lowercase=function convention, but as we know perl is not a B&D language :)
stevan: if there is neither in scope, Foo is I think an error(!)
the synopses said there's no barewords anymore.
stevan and if I want ::Foo and there is a &Foo in scope, then I need to disambiguate with ::Foo
autrijus yes. 17:49
stevan ok, so Foo and ::Foo are interchangeable given the right circumstances
autrijus Foo means ::Foo when the compiler knows about ::Foo
_and_ there's no &Foo in scope.
Aankh|Clone ?eval sub foo () { fail "This is supposed to happen" }; foo()
evalbot6 Error: No compatible subroutine found: "&fail"
17:49 Aankh|Clone is now known as Aankhen``
stevan so class(Foo) aka ::Foo needs to respond to class methods 17:50
autrijus nod.
stevan autrijus: ok, cool, that is how I current have it working :)
autrijus sadly I need to wake up for family union tomorrow early
cool :)
stevan autrijus: I aim to have all p5 magic removed by end of weekend 17:51
and it should then align with the Haskell version
autrijus woot!
stevan++
stevan :) 17:52
ok, go to sleep, I need to go spend time with my family now too &
autrijus waves & 17:53
nothingmuch ciao
nothingmuch goes to eat dinner 19:22
brentdax goes to eat lunch. 19:32
svnbot6 r6093 | Stevan++ | Perl6::MetaModel - ::Class now uses the ::create_P6opaque to create the instance (first step towards maybe bootstrapping this too)
buu ?eval $obj.$meth 19:38
evalbot6 Error: unexpected "." expecting word character, "::", term postfix, operator, postfix conditional, postfix loop, postfix iteration, ";" or end of input
gugod win 22 19:41
putter autrijus: what is the pugs policy wrt PGE? I started to suggest someone write a test, but we already have a bunch of tests which were disabled because "pge wasnt working at the moment". so I wasnt sure whether to suggest it or not. 19:42
autrijus putter: the policy is that t_disabled should be verified again on parrot 0.2.3 and if that works, move back to t/. 19:43
putter brentdax: its fairly easy to directly test rules/grammars under pge. see parrot t/p6rules/.
autrijus: ok. (ooo, 0.2.3 is out?:) 19:44
autrijus yeah. 19:45
Parrot 0.2.3 "Serenity"
putter: actually I think a better way is to data-driven the test 19:46
that way the same set of tests can be reused for PGE and Pugs and other implementations 19:47
putter for completeness I'll mention that one can also test pge with ./parrot compilers/pge/demo.pir and PCRE with ./pcretest in the pcre distribution.
autrijus I think that'd be genuinely helpful.
putter autrijus: agreed. 19:48
autrijus so, if you're up to it, do it? after all pmichaud said that he needs to be driven by tests :)
cf. use.perl.org/comments.pl?sid=27914&cid=42390 19:49
pasteling "putter" at 66.30.119.55 pasted "brentdax: another pge test example" (63 lines, 2.7K) at sial.org/pbot/12284 19:50
putter autrijus: ah, neat. I'll... at least ponder it. 19:55
autrijus sure :)
Ovid++ # excellent AI::Prolog tutorial! 19:56
putter swi?
autrijus # use.perl.org/~Ovid/journal/ 19:58
putter: no, AI::Prolog, as in AI::Prolog
putter hasn't been thinking about targeting prolog as a backend. no siree. that would simply insane.
autrijus maybe. however, Curry is an interesting target 19:59
ods15 perl6 is simply insane...
autrijus that's true.
clkao autrijus: you are sleeping! 20:00
go away!
putter ah, I was thinking of Language::Prolog::Yaswi.
clkao: lol 20:01
re integrating prolog, on the syntactic end, p6 provides more than enough ammo. underneath... it would be really neat if we could do hybrid runtimes, so a wam is integrated with the rest of a backend. 20:08
autrijus notes we _are_ already using hybrid runtimes.
20:08 Aankh|Clone is now known as Aankhen``
autrijus in the sense that OO core is a distinct part 20:09
putter re, curry, there is also the Alice/Oz model... but while I like big state-space collapse games, what I'd really really like is a non-commited choice engine. "spreadsheet"-like constraint propagation.
re already/oo core, hmm... without a control-flow metamodel, I guess the compiler really needs to be the one to say "ok, this section of things will be handed off to wam"... 20:11
autrijus why don't we have a control flow metamodel again? 20:12
I'd like to play with trampolines too ;)
putter :)
add to the todo list? ;)
autrijus sadly, to express bounces and stuff in Haskell is straightforward, so it's no fun 20:13
now, to build it on perl5, that's getting interesting
putter re constraint propagation, I think that's a biggie. proceedural is great, and declarative is great, but for really hairy problems you need to create a big ball o hair that maintains invariants and otherwise updates itself as you proceedurally poke it. 20:14
autrijus (I mean, if Java can host Kawa, Perl5 can surely host Perl6.) 20:15
putter (the question is always, what does the speed vs conformance tradeoff curve look like)
autrijus putter: how exactly does this differ from any OO/RDBMS model with a builtin DBD::AnyData? 20:16
I mean, that's what most perl folks would imagine when you talk about embedded alternate runtimes. 20:17
putter ohhhh, the alternate runtimes... I was consing up a description of what one wants in constraint propagation... 20:18
autrijus go ahead and finish it. I hope you hashed your consing :)
putter :)
well, the only perhaps non-obvious part is, say you have $a $b $c and $a = $b ~ $c, you want to be able to set any of those variables and have the right thing happen, but large scale, you want them to maintain histories tagged with motivations you declare. so you can then later retract motivations, which disables those elements of the history, adjusting values if appropriate. 20:22
otherwise you can't backtrack. 20:23
autrijus yes. 20:24
perl6 does provide an extremely primitive form of backtracking, that is let-hypothesis 20:25
but in itself it does nothing interesting
putter re alternate runtimes, I guess just having enough of the runtime exposed as a C api that a separate library can "take control" of the runtime. so if some other than usual engine is more appropriate for some section of code, control can be handed off for a time.
autrijus it's supposed to be coupled with a backtracking runtime.
(that can call back to p6)
putter: well, yes, and PGE is upposed to be such a runtime.
putter ah, good point. 20:26
(Am I distracting you from sleep...:?)
Hmm... a backtracking runtime... I do like the sound of that. Though I'm sure I don't understand the implications... 20:28
autrijus looks at this code from Success.curry and smiles
choose (x:xs) = choosep x xs
where choosep x [] = x
choosep x (_:_) = x
choosep _ (x:xs) = choosep x xs
do you see the bottom two cases that are fully overlapping?
it chooses nondeterministically! 20:29
putter ah. :)
putter tries to picture how to add probabilities...
autrijus well, a backtracking runtime is just a fancy term for a runtime that supports full call/cc.
putter: maybe by writing some case twice :) 20:30
putter ;)
autrijus however, I believe the idea is like junctions; you keep using it; it silently discards non-Success elements 20:31
pretending it never chose them
putter how do temps and call/cc interact? (no pressing need to know, just musing) 20:32
autrijus and when you inspect, the surviving one surfaces
putter: how do temps and return() interact?
oh, you mean the other direction, entering temp.
I suspect nothing happens
i.e. whatever old value was there, was there 20:33
putter k
stevan putter: the first version of Erlang was an interpreter built on top of Prolog
I bet you could do it for Perl 6 :)
putter yes
err, yes Erlang, eeep for p6. 20:34
prolog even has a portable object system at this point...
stevan PIL -> Erlang would be cool 20:35
putter Just guessing, but once PIL settles down, and as backends accumulate to use as prototypes, I kind of expect a not-small number of backends to suddenly appear. 20:36
stevan How to write a Perl 6 backend in 24 hours - by putter
I would buy that book :P
autrijus putter: I suspect such backends can only run the core imperative calculus -- well if the runtime is lucky, closures too 20:37
but that's okay, as we plan to port everything else to p6 ;)
putter It's just that once you have a working backend for language x, all the (invariably many) other languages with similar characteristics to x, can be backended with basically only transliteration - no great thought required.
autrijus true.
just look at Scheme.
but I wouldn't use Perl6 to replace the source language in SICP ;) 20:38
putter was just this morning thinking in the shower that we need Cons and ConsProper roles...
integral chapters 4&5 would be a wee bit tricky with perl6 ;-) 20:41
putter I suspect we are reaaaally going to need, even more than p5 did, a cannonical/reference form of p6. or perhaps instead java-like syntax/semantic policy checkers. because p6 seems likely to be so very mutable, what is p6 seems likely to be a bit fuzzy.
4&5? my ancient SICP is in a box... somewhere. 20:42
autrijus putter: a canonical surface syntax you mean? 20:43
i.e. PIL prettyprinter?
integral (online at mitpress.mit.edu/sicp) chapters 4&5 are the ones where a metacircular interpreter and then a compiler are written
putter btw, the structure and interpretation of classical mechanics is also a fun read.
autrijus integral: ah, but you see, we are writing them gradually... 20:44
it's just it may take 10x more pages
but wait, the camel book is already like that.
integral part of the beauty though is the conciseness of SICP
autrijus indeed.
integral in the camel it'd be chapters 50 through 60!
autrijus beauty does not carry whipuptitude with it though :-/ 20:45
putter integral: and scheme's dirty little secret is it is sooo oft repeated very easy to write a metacircular interpreter, that no-one, in what, over 20 years? a human generation? has gotten around to writing a full one. very frustrating. I've a draft, SchemeOn, so you port a small core and a transliterator to, say (hypothetically you understand... not:) p6, and the rest of implementation is written in scheme. but it required cobling toge 20:47
ther pieces for all over the place. scheme48++
integral heh 20:48
putter PIL will end up with very scheme-ish properties. p6, ruby, cpan, etc, just end up being surface syntax and libraries. ;) 20:50
autrijus the binding semantics though is rich and not scheme, I think
also, the type tags and constraints. 20:51
to translate them into scheme is certainly fine but requires a partial runtime to handle that.
and hence not neccessarily easily reuable by native scheme programs 20:52
putter re prettyprinter, p5 already has the problem that everyone uses their own language-subset dialects, often mutually incomprehensible. just as java punted macros to maintain the socially desirable property that people chould read other folks code, I think p6 will need anti-entropic tools less it gain a reputation for being even more unmaintainable than p5.
autrijus ah, p6tidy? 20:53
putter yes! :)
autrijus how is it different from a customizable deparser?
putter some of the java tools of this flavor are very customizable and powerful.
(names escape me at the moment)
autrijus I think java's machine-readability is a very good thing. 20:54
as a result it's not very human-readable without machine support.
but _everyone_ is using machine support, so that's fine.
putter custom deparsers are a big part of it. and probably sufficient. theres also measuring the "distance" between some surface form and a reference (deparsed) form. 20:55
autrijus nod.
autrijus is looking forward to refactoring browsers for p6 in p6.
putter p6 meets intentional programming, now there's a slightly scare thought. 20:56
putter too
stevan ooohhh intentional programming... Lucid++
putter though a backend for emacs (to handle refactoring and tagging) would make me even happier. 20:57
a refactoring engine for p6.
generates taged text in a form which can be efficiently sucked into emacs, which then makes requests out to the engine, and repeat. 20:58
I had a multilingual programming environment where one could tell emacs, ok, make this ruby instead (of perl)... called out, code regenerated, emacs buffers renamed and updated, and zap, all the code changed form. most fun. 20:59
merd.sourceforge.net/pixel/language...languages/ pixel++ 21:00
couple of other pages like it too, if anyone is interested. 21:01
svnbot6 r6094 | Stevan++ | Perl6::MetaModel - (p5) 21:06
r6094 | Stevan++ | * $?CLASS now returns the ::Class object
r6094 | Stevan++ | * all methods and attributes are now associated with the ::Class object
r6094 | Stevan++ | instead of just the class name
r6094 | Stevan++ | * improved the name of ::get_obj_id to ::get_P6opaque_instance_id so that
r6094 | Stevan++ | no one will try to use it :P
r6094 | Stevan++ | * also added ::get_P6opaque_instance_class to peek into the class slot
r6094 | Stevan++ | (needed this for submethods)
putter mugwump: did you see my note about Scriptalicious failing to install out of CPAN. is it something you think will be fixed, or should we back it out of crude_repl? 21:07
sigh. parrot 0.2.3 has been released, but has parrotcode.org been updated? you're joking, right? </end negitivity> 21:12
integral someone should just allow leo to edit the site :-/ 21:13
putter (anarchistic development)++ 21:14
autrijus or, do what pugscode.org doe 21:15
does
and contain minimal information from the homepage :)
Khisanth hmm
integral: it should update itself using the ML :)
putter yes. far better to have no info than wrong info. (classical argument against source code comments;)
autrijus and I think people are better subscribing to any of the ML's RSS, or CPAN's, or even the Kwiki's 21:16
(or the commit log)
putter pity the web never developed a pervasive annotation mechanism. 21:17
autrijus than periodically checking the homepage.
you mean like annozilla and annotea?
it's W3C standard and all that
so the "developed" one is check. now, "pervasive" ;) 21:18
putter annozilla and annotea? ? I'm afraid I have no idea what exists now... been a while since I looked at it.
;)
autrijus but annotea is 2001 :)
putter "been a while" == mid to late '90's. ;) 21:19
autrijus oh wow.
putter sigh.
autrijus suspects putter is older than appeared
putter suddenly feels very very old.
coral wow, annotea 21:22
coral wakes up briefly
autrijus , however, goes to sleep &
g'nite :)
putter timbl was next door (had to walk through my office to get to his) when he first came to MIT LCS. cautionary tale - get things you care about right in "the beginning". as viscosity sets it, things defered just dont happen, even on a timescale of decades. 21:23
g'night.
autrijus mumbles something about metaprogramming oneself and goes back to sleep & 21:25
putter lol
(for quite a while;)
what things do we want p6 to have that might "just not happen"... runtime flexibility more like ruby than p5... real ML/haskell-like typesystem... ...? 21:27
autrijus sigh. I should've closed this window already. I think both will most likely happen :) 21:28
putter :) 21:29
autrijus what will not happen are mostly arbitary restrictions.
even for the user's own good.
putter ;)
putter tiptoes quietly away from computer. good night autrijus... 21:30
Aankhen`` goes to sleep. 21:38
G'night.
putter & 21:41
What's a good definition for PIL... pugs.kwiki.org/?Perl6Nomenclature doesnt have one yet... 21:45
It might be worth upgrading to PCRE 6.1 (my fuzzy impression is we are still at 5.0?) for the \w and windows nl fixes. 22:02
coral perl5 -> perl6; perl6 -> js; js -> greasemonkey 22:03
putter Yipes. my Compiling Pugs.Run is up to 20 cpu minutes. was hovering around 5 recently.
"up to" as in still running... 22:04
coral is there a perl implementation of ccache?
or shell
putter ;)
autrijus putter: Pugs Intermediate Language.
coral ship it with the build system along with a directory of precompiled hints for the popular OS
autrijus well, so much for sleeping.
autrijus decides sleep is overrated anyway
putter erg. that better have been typing in your sleep!!! ;-) 22:05
sleep == clock speed
Khisanth so much for being a cyborg :)
autrijus riight.
coral autrijus: dream well
autrijus counts electric sheeps
but seriously, it's past 6am, and I need to be up at 9, so skipping sleep is looking more attractive 22:06
autrijus decides to 1)find food and 2)hack
wilx Huh, even 3 hours of sleep are better than nothing. 22:07
At least for me it works.
autrijus the precondition is that you are 1)actually sleepy and 2)not hungry 22:08
sadly I'm neither currently
putter coral: a standard perl caching system would also address one of the primary problems with Inline:: for compiled langauges.
autrijus food &
putter & 22:09
coral++ # building caching build system ;)
coral i am very bad at implementing things still 22:14
the ADD is yet unfocused in this one
"ADD" of course 22:15
coral searches for a pugs web proxy
hello ascii art on startup. very nice. 22:21
putter so, my search was brief, but I didn't turn up a non-C/C++ compiler cache system. IMHO, one would be very useful. 22:25
There are a couple of C/C++ ones it could be modeled on... 22:26
coral: no pressure. just thought I'd flag this as a very neat idea. coral++
coral heh, no worries 22:27
ship a diff between the distributed file and a hash of the configure.cache equivalent 22:29
compression will eat that up
it does require updating the cache file as more platform hashes are accepted
or pregenerate a set and do new releases 22:30
iBlech++ # POE 22:38
autrijus chip talked about a new ruling forming. 22:47
multi f (Int $x) {} 22:48
multi f (Num $x) {}
then:
chip plural. "variants"
autrijus &f.variants(Num);
chip yesah
autrijus which may still return a multisub
which is in alignment with both pugs and parrot.
chip thing is, Larry still ponders the possibility of:
a present participle instead
autrijus anyway. it doesn't replace &f:(Num) in signatures 22:49
and it doesn't respect return types.
so, more clarification needed.
but I think as a selector/narrower it's very good.
I propose that we keep the &f:(Num) form in signatures. either that, or have a "takes" trait. 22:50
chip Larry is saying roughly the same here. :() is gone as a multisub limiter, but remains as a more precise code type declaration
autrijus sub f (Code &g takes (Num, Int) returns (Int, Num)) 22:51
(&g:(Num, Int) returns (Int, Num)) is fine with me too.
note that all this, like .variants, treats return types as distinct from parameter types, which may be a problem if you want to talk about an abstract type that is Int->Int. 22:52
so I propose stealing the type operator ->.... &g:((Num, Int) -> (Int, Num)) 22:53
but other ways are acceptable too.
chip Larry is suggesting --> for a similar purpose
I think IRC typed by a person who doesn't understand the whole history (i.e. me) is not the best way to communicate this. Grr 22:54
autrijus get larry to #perl6 :)
I'm fine with --> if only because we use -> as the prefix sub constructor instead of the separator between params and body.
chip Damian's about to write on the whiteboard. Stand by
autrijus k.
do I get a skype feed? 22:55
nvm if it's too much trouble.
I wonder if damian will be around after YAPC::AU and whether I can work with him for a few days. 22:57
svnbot6 r6095 | putter++ | Undisabled a number of rules tests. Moved t_disabled/rules/from_perl6_rules/temp_moved_here_because_pge_doesnt_work_atm/ back to t/rules/from_perl6_rules/, and modified the tests to all be well behaved with parrot-0.2.3.
autrijus putter++ # yay PGE reunified with pugs tests
brentdax Cabal meeting right now? 22:59
autrijus looks like so. not sure who is present
brentdax Nifty. 23:00
chip Larry, Damian, Allison, chromatic, lucs, pmichaud, Dan Kogai, and yours truly
knewt 'lo chip
chip hosdy
Not a ruling now but a discussion
autrijus ah, kogan-san is there. nice
kogai, even.
chip sub f (Int) returns Str {...} # NO TYPE INFERENCE
then someday, maybe possibly, maybe maybe: 23:01
sub f (Int --> Str) { ... } # Type Inference
autrijus er, sure, you wrote out types, then surely no inference.
chip autrijus: hey, I'm with you
autrijus wait!
no type inference means
f(3) + 4;
compiler is not allowed to warn Str+Int mismatch? 23:02
that's insanity.
it'll be like perl5 ;)
(where "strings used as numbers" is hard coded to literals)
in the opcode themselves.
and you can't have that behaviour to user defined subs
so I hope I misunderstood the "no inference" thing there.
chip Damian and I are both arguing this 23:04
autrijus perl5 does inferencing, just very badly.
to wit: 23:05
$ perl -wce '$_ = 0 + "x"."y"' 23:06
Argument "x" isn't numeric in addition (+) at -e line 1.
$ perl -wce '$_ = 0 + reverse("x")'
-e syntax OK
chip back.
autrijus $ perl -wce '$_ = 0 + ("x"x3)'
-e syntax OK
clearly either all of them should warn
or none of them should.
autrijus waits for the other end of the world to type back 23:07
chip OK. consensus. 23:08
autrijus good.
chip is forming.
autrijus waits some more.
chip syntax #1: sub foo (Int) returns Str
syntax #2: sub foo (Int --> Str)
syntax #3: my Str sub foo (Int) 23:09
syntax #1 does not enable inference; it says "the return(s) in this subroutine will all accept Str values". It's a private note, like "is cached".
autrijus so it does typecheck inside function body's return() 23:10
but not propagate outside the function
chip syntaxes #2 & #3 are equivalent and enable inference. They make the Str return part of the signature.
correct
autrijus good. very nice.
the "returns" then is more like specifying the parameter type of &return.
do we get named returns? 23:11
sub foo (Int $x --> Str $y) {...}
my $y := foo(1);
more precisely, that will unify the return side Cxt form and the param side Param form in Binding.
sub f (() --> Int $x, Int $y); my ($x, $y) := f(); 23:12
it's a promise to return properly named pairs.
so that &return can have a signature that resemblesnormal functions. 23:13
(I already unified them in PIL2, so the question is whether I should hide this from user.) 23:14
chip Larry: "If it happens to fall out of the implementation easily, then I'm sure Damian will find a use for it. But let's not document it."
autrijus okay.
chip Personally, I like it, but Larry seems to be at the extent of his orthogonality tolerance for the afternoon 23:15
autrijus *nod* just that it's not frowned against is good enough. 23:16
chip ok
autrijus it's not high priority, but I'd like to know whether this is legal: 23:18
sub f ($x) { my $y; $x := $y; }
that is, whether you are allowed to rebind an "is constant" container.
my intuition is no, but that doesn't seem to be documented. 23:19
on the other hand, I expect this to be okay: (my $x := 3; $x := 4;)
svnbot6 r6096 | putter++ | lib/pugs/hack.pod: Added notes on testing regexp engines.
brentdax autrijus: I *seem* to remember it was yes, but that was probably a long time ago. 23:20
autrijus brentdax: yes, as in "is constant" doesn't prevent rebinding?
brentdax: pugscode.org/images/container.png # context picture 23:21
brentdax Right, last I heard you can rebind an 'is constant'.
chip My opinion: $x is an alias through which writing is not permitted. The target of the alias cannot be modified through $x, but $x belongs to the scope, and I see no reason why you couldn't change what $x is a front for.
autrijus chip: then your view coincides with the container.png. 23:23
it also means that annotations can't really be trusted by the compiler as a userspace rebind can wreck all havoc :)
coral heh, that sounds like the kind of thing i usually support 23:24
autrijus and p5 does allow it to the fullest extent 23:25
especially if you consider Data::Swap.
my $x is constant = 4; my $y; $x := $y; $x = 5; # works
that's fine with me if that's fine with you.
that however means no constant folding for $x. 23:26
not in sight of potential := and eval, at least.
brentdax So it's an eval-dependent optimization. The compiler can figure out if it can optimize it by checking for an explicit rebind or the use of `eval` or other dangerous stuff. Perl has always had a lot of features like that.
(And the user can presumably use a pragma to tell it to optimize anyway.) 23:27
autrijus very true. 23:29
anyway, if "is constant" is rebindable, then I don't need to do much about my container implementation :)
I was worrying whether it's a flaw. 23:30
(and when it's rebound, then all its previous traits are lost, and it assume the newly bound container's traits)
brentdax Scary thought: `eval "multi sub postcircumfix:<( )> (&code : *@_) { die 'fnord' }"` 23:31
autrijus brentdax: you realize that it does not affect any existing code?
only things that is subsequently eval""'ed in that package scope 23:32
so the damage is much smaller
brentdax True, I suppose.
(hmm...imagine wrapping *postcircumfix:<( )> at BEGIN time to get a free call-tracing mechanism...) 23:34
autrijus still only for your current module. 23:35
autrijus praises the separate compilation doctrine.
i.e. by "use CGI" you are using a precompile CGI that starts from nothing 23:36
"require CGI" too. the only way to avoid it is to read it in and eval and etc.
brentdax Can you export it to the including module to implement a `use trace`?
chip 'userspace rebind wreaking havoc' ... hm. that's bad.
autrijus chip: in the synopsis:
my $pi = 3;
er
my $pi is constant = 3;
but that only means it can't be assigned to
nothing prevents
$pi := 4;
although that can be contrued as feature 23:37
chip quite. pity
nothing is really unchangeable
autrijus (and if := is intended to be a preservation of glob semantic, then that's certainly true.)
*pi = \3; *pi = \4; # sure why not
oh btw 23:39
my $pi is constant = 3;
this is very very special form, right?
chip We briefly discussed the problem of Pairs appearing anywhere, that named arguments have no zone. However, no improvements arose that seemed worth the trouble.
autrijus my $pi := 3; # special form for this
chip Nobody seemed happy with that, though.
autrijus my $pi is constant(3); # or this?
chip ew 23:40
autrijus (the synopsis has the assignment form which can't possibly work.)
(except by declaring it as a special form.)
chip especially considering $a = { :x(1), :y(2) }; somefunc(*$a); 23:41
chip didn't realize that *$a was legal, but in retrospect it seems obvious
autrijus I thought *$a was only legal if $a isa Pair, but obviously it can now be a Hash or Array too 23:43
chip well, actually, that could be my error
autrijus ok.
chip what's $a = :x(1); foo(*$a) mean?
autrijus supposedly, same as foo(:x(1)). 23:44
at least that's my impression at the hackathon.
chip and how is that idfferent from foo($a)?
autrijus that is different if the function is expecting Any or Pair.
chip _sign_ 23:45
_sigh_ even
autrijus oh. in my PIL formulation I have Pair's key as a value not a container -- i.e. you can never use $pair.key as lvalue
sane?
chip I'll ask when they're changing subjects. Right now, Larry & Dan Kogai are talking Unicode 23:46
autrijus oh, good
did Kogai look at Dan's unicode string design for parrot from way back? 23:47
chip they're much more abstract now, about policies etc.
autrijus ah. unicode support levels?
non-unicode context?
chip "Do we need to be careful about which Unicode chars we can use for sigils?"
"How about decomposition for string comparison?"
autrijus I thought sigils are a fixed set and you can't introduce more sigils :) 23:48
chip I figured there was a sigil:<> thing I hadn't heard about
autrijus eh.
chip don't worry about it, Larry seemed to think the question was unworrying 23:49
autrijus I can't start to imagine what it does ;)
brentdax Drives the implementor bat-*** insane, obviously.
chip Mixing Hebrew with English. $YHWH = 'almighty'; but if YHWH are Hebrew, should they be right-to-left?
autrijus I thought that's what RTL markers and the display layer is for. 23:50
chip Larry seems to have just remembered that. :-)
autrijus good. a very bad thing is unicode language tags.
I suggest we pretend they don't exist.
chip I won't mention them if you don't. 23:51
autrijus (it's a block of character that let you write down "en-us")
and then declare the text afterward as english.
oh, no, I want it mentioned, and then ruled as ignorable :)
(j/k... doesn't really need to bring that up.) 23:52
autrijus ponders what's the associativity of -->. 23:53
sub f ($x --> $y --> $z)
nonassoc seems like prudent. 23:54
chip mm
autrijus either that, or rightassoc.
rightassoc will then enable combinator style programs ;)
"everything is curried"
chip Don't do that. I'll have to get medieval on your, um, pugs. 23:55
autrijus heh, it's occasionally useful and more handy than .assuming :)
plus, it likely runs much faster than .assuming on parrot.
chip time's up here 23:56
autrijus *nod*
chip we'll be back at 9am or so, US/Pacific
autrijus I'll have it at right assoc for now.
what's your localtime?
chip 17:00
autrijus okay. have fun :)
chip a-firmative :-)
brentdax We now return to your regularly scheduled hacking... 23:58
brentdax continues working on WWW::Kontent::Class::Setting.