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. |
|||
dduncan | fyi, Darren_Duncan is now dduncan by default, to be nicer to those on 80 character IRC clients | 00:05 | |
hobbs | nicks over 9 chars long are heretical! ;) | 00:06 | |
dduncan | well then, consider me saved! | ||
seen the light, etc ... | 00:07 | ||
autrijus, is it practical or possible to change my Pugs committer name likewise? | 00:08 | ||
or don't worry about it | |||
stevan | dduncan: the pugs commiter name is the same name as the openfoundry user. You could try to change that in the user admin, however, the solution might be to get a new user account on openfoundry. However the problem with that is that open foundry keys user accounts by email address, so you would also need to change that. In other words, it may not be a trivial task. | 00:33 | |
dduncan | okay then, no need to change anything | 00:34 | |
stevan | dudley: if you want to work on the Java version go right ahead | 00:45 | |
stevan is backlogging sorry :) | |||
dudley: I would use the Javascript version as a guide, I tried to mirror them both | |||
dudley: there is also an ANT build.xml file which runs the JUnit test suite and can do coverage with EMMA | |||
however, you need to have both the Junit and EMMA jars in your path (obvviously) | 00:46 | ||
if you want I can email the jars to you, just email me at stevan at iinteractive.com and I will send them on over | |||
dudley | stevan: What's EMMA | 00:56 | |
? | |||
dduncan: autrijus had me sign up as a new user, then just gave that new user the committer bit. So I guess I have two openfoundry names now. | 00:57 | ||
dduncan | I C | 00:58 | |
dudley | Three, if you count my daughter, who got the committer bit for her 0th birthday ;-) | ||
dduncan | how'd you swing that? | ||
dudley | I announced here that my wife was going into labor, then when we got back, someone asked if the new baby was a committer yet... | 00:59 | |
ahh, code coverage. I'll check that out. | 01:01 | ||
stevan: I'm going to port the javascript straight across at first. It makes for some ugly Java code, but I'll straighten that out eventually. | 01:02 | ||
biab | 01:03 | ||
iblech | stevan: Hm, will Perl6.MetaModel support multisubs eventually? | 01:14 | |
Or are multisubs considered not to be part of the metamodel? | |||
stevan | dudley: Java is always a little ugly :) you cannot avoid it | 01:46 | |
iblech: re: multisubs and the metamodel | |||
1) I dont really have enough knowledge of the inner workings of subroutines and MMD in particular to really do justice to the idea | 01:47 | ||
2) I assumed that multi-methods would be built upon multi-subs, which I don't see as the responsibilty of the metamodel | |||
and since p5 and JS did not have multi-subs, or formal parameters for that matter I punted | 01:48 | ||
iblech | 1) Neither do I, that's the problem :) | ||
stevan | LOL | ||
iblech | Idea...: | 01:49 | |
stevan | iblech: Punt and let autijust do it | ||
iblech | Someone writes the MMD dispatching code in Perl 6 | ||
And we can compile it to JS and P5 then :) | |||
Right :) | |||
stevan | nice | ||
iblech: have you seen luqui's Class::MultiMethods::Pure? | |||
iblech | I've read the docs, but not more | ||
stevan | 3) they havent settled on the dispatch semantics of MMD anyway | 01:50 | |
iblech: personally I like the CLOS generic function idea | |||
it is very clean | |||
but unfortunately it is not appropriate to Perl 6 OO | |||
iblech: have you implemented multi-subs? | 01:51 | ||
in PIL2JS? | |||
iblech | No. Additionally, -CPIL doesn't give my any sub definitions for multi subs | 01:52 | |
stevan | ah,.. then it's autrijus's fault anyway :) | ||
iblech | Good :) | 01:53 | |
stevan | iblech: how has the integration of methods gone? | ||
how are you handling that? | |||
iblech | method foo (Foo $self: ...) is compiled to sub foo (Foo $self, ...); PIL2JS.addmethod(::Foo, &foo) | 01:54 | |
Then the metamodel knows about the "foo" method of Foo | 01:55 | ||
And calls are dispatched accordingly then | |||
stevan | nice | ||
so are you using the Perl6.Method class still? | |||
iblech | Yep. | 01:56 | |
stevan | hmm | ||
iblech | But I could do without it | ||
stevan | then we could possible hack together multi-methods if you want | ||
iblech | oooh | ||
stevan | here is my thought | ||
iblech listens | 01:57 | ||
stevan | 1) we alter the metamodel such that if it gets a method of the same name, it checks to see if that method is a multi-method | ||
because currently it just allows it to overwrite | |||
2) we create a multi-method class | |||
and put all the glue in | |||
then as far as the dispatch is concerned | 01:58 | ||
we punt on the details | |||
and just hack together something simple for now | |||
as long as the dispatch code is in it's own method, it should be able to be replaced easily | 01:59 | ||
I can try to hack this into the JS metamodel if you want to try? | |||
iblech | Excellent. | ||
:) | 02:00 | ||
stevan | it wont be pretty :) | ||
iblech | But we won't be able to test it from PIL2JS, because of the -CPIL problem | ||
Sure :) | |||
stevan | iblech: so -CPIL does not handle it at all? | ||
iblech | Reusing the code for multisubs would be simple, too | 02:01 | |
Right, try pugs -CPIL -we 'multi foo (Str $a) {}; multi foo (Num $a) {}' | |||
(No "foo" in the output) | 02:02 | ||
But that's probably easy to fix in Pugs.Compile | |||
stevan | iblech: all I got was | 02:03 | |
PIL_Environment | |||
{ pilMain = ((PStmts PNoop PNil)) | |||
, pilGlob = ([(PSub "&*END" SubPrim [] PNil )]) | |||
} | |||
iblech | Right. | ||
No &foo. | |||
stevan | yeah, what happened? | ||
iblech | dunno, ask autrijus :) | ||
stevan | did it croak on the duplicate name? | 02:04 | |
ah | |||
I see, multi is not understood maybe? | |||
iblech | It seems so. Probably (but I haven't looked at the source), &foo is internally a list of subs, and -CPIL doesn't know how to compile a list of subs | 02:05 | |
stevan | iblech: yes,... hmmm | 02:06 | |
where is that autrijus when you need him :P | |||
iblech | :) | ||
stevan | iblech: well I will hack together a skeleton for mutlimethods anyway | 02:07 | |
however, I will caveat it with the fact I have no real idea what I am doing :) | |||
iblech | Thanks :) | 02:08 | |
We'll just ask Damian or Luke to give us appropriate JS code :D | |||
stevan | :) | ||
whoever gives us the code first, wins | 02:09 | ||
iblech | Right :) | ||
stevan | if you look at t/80_Code.t in the p5 mm there is some basic multi-sub code | ||
but it only dispatches on the number of params | 02:10 | ||
iblech | Hm, this is enough to get Test::skip working :) | 02:11 | |
stevan | ok | 02:12 | |
I should have a rough sketch of the code in a few minutes | |||
iblech | :) | 02:13 | |
stevan++ # fast :) | |||
stevan | not really fast, just porting the perl 5 code :) | ||
iblech | :) cheater :D | ||
stevan | uh oh | 02:14 | |
I need to be able to check the num of params in the function signature | 02:15 | ||
can I do that with PILJS? | |||
where should I look for that | |||
iblech | You can (&foo.arity), but the problem is: | ||
The metamodel doesn't really get the actual boxed Function object, but only methods which, when invoked, return that object | 02:16 | ||
But I could simply give you the arity as a parameter | |||
(That's because you're able to rebind &subs, and it'll be even more important when I've finished my full-continuations-in-JS patch...) | 02:18 | ||
stevan | so something like: | ||
Perl6.MultiMethod.prototype.call = function (arity, inv, args) | |||
iblech | Will work | ||
stevan | wait, that wont work with the code I am writing though | 02:19 | |
I have a list of method objects | |||
and I need to check the arity on them | |||
iblech | Oh, right. | ||
stevan | and match it against the length of args | ||
iblech | Then I'll pass the arity to new Perl6.Method(...)? | 02:20 | |
stevan | ok | ||
brentdax | Continuations in Javascript? | 02:21 | |
iblech | Right. Instead of emitting say(foo(), bar()), I emit foo(-> $a { bar(-> $b { say $a, $b }) }), basically | 02:22 | |
call/cc is then trivial | |||
stevan | so iblech will you pass the arity to the Perl6.Method constructor? | ||
iblech | And it'll allow me to add support for coroutines, gather/take, and &sleep | ||
brentdax | Awesome. Scary, but awesome. | 02:23 | |
iblech | stevan: new Perl6.Method(associated_cls, function (...) {...}, arity)? | ||
stevan | iblech: nice, that way I can test it too :) | ||
ok, give me a little more than 5 minutes on this one then :P | 02:24 | ||
iblech | stevan: Great :) | ||
:D | |||
stevan | I have to write new code | ||
iblech: is the inv included in the arity? | 02:27 | ||
iblech | It is. Should I -1? | ||
stevan | no | ||
iblech | ok | ||
stevan | I will include it in the calculations :) | 02:28 | |
ok, questions. | |||
should methods be declared multi? | |||
or should trying to add a method of the same name automagically make it multi | 02:29 | ||
iblech | It's probably to cleaner to demand a multi declaration | ||
stevan | I am leaning towards the first one right now | ||
ok | 02:30 | ||
well actually the metaclass wont care | |||
polymorphism++ | |||
Perl6.Class is the only place I have to address it | 02:31 | ||
iblech | Hmm... Seems "use YAML; warn Dump($self->[PIL::CC])" modifies $self | 02:36 | |
(WTF?) | 02:37 | ||
Seems a bare "$self;" does too | 02:38 | ||
Apparently a bug in perl5 | |||
stevan | iblech: hmmm, it seems arity is already a property of function objects, so i am renaming for now | 02:47 | |
oh wait | |||
sorry my bad,.. no need | |||
iblech | FWIW, all PIL2JS subs have a JS-arity of 1 (always "args", like Perl 5's @_) | 02:48 | |
stevan | ok, well we are future proofing it :) | 02:49 | |
for when PIL handles them correctly too | |||
autrijus | greetings. | 02:58 | |
autrijus backlogeth | 03:00 | ||
mugwump | hi there ... wow, my work queue is empty at new jobs already | ||
stevan | hola autrijus | ||
iblech | Hi :) | ||
mugwump | s/new jobs/new job/ | ||
autrijus | hey stevan, iblech. | ||
I dreamed of TSa last night. | |||
more precisely, at his seemingly completely insane reply to my container thread. | 03:01 | ||
and truth emerges: he is actually making sense. | |||
I wonder if it means I can read deeper than the surface, _or_ I'm insane. | |||
so I'd like to check with you a bit :) | 03:02 | ||
stevan | I am not sure if iblech and myself are the high watermarks of sanity | ||
mugwump either :) | |||
but go ahead and try | 03:03 | ||
autrijus | consider %h.kv and $s.method | ||
intuitively there's a difference | |||
.kv is acting on the container, and .method is acting on the object obtained by .FETCH on the container. | |||
so far so good? | |||
stevan | yes | ||
iblech | In PIL2JS, .kv is actually acting on the .FETCH of the container, too (a PIL2JS.Hash object) | ||
wolverian | oh, why can't everything just be objects! or lists! :) | ||
mugwump nods hesitantly | |||
autrijus | iblech: aha. how about @ary.end ? | 03:04 | |
is that acting on a FETCH'ed list also? | |||
iblech | Yep. | ||
autrijus | can %h contain anything else than the same Hash object? | 03:05 | |
iblech | what same Hash object? | 03:06 | |
autrijus | also, what's stopping $s from storing a Hash object, then? | ||
er, I mean | |||
iblech | PIL2JS.Box.prototype.STORE is auto-reffing such cases | ||
autrijus | my %h = (1=>2); %h = (); | ||
is %h storing the same Hash object, only with different content? | 03:07 | ||
iblech | Ah. No, in current PIL2JS, %h stores a new PIL2JS.Hash object then | ||
autrijus | you know... I like your treatment better :) | 03:08 | |
iblech++ # sanity | |||
iblech | :) | ||
autrijus | the model I was about to say | ||
is that "Scalar of Any" has an AUTHMETH that redispatches all unhandled methods to its FETCH. | |||
whilst Array and Hash does not do such thing. | 03:09 | ||
so for $s, it handles .tie, .tied, := etc | |||
but .method gets redispatched. | |||
mugwump | I'm really confused here. I know I've been out of the loop for a bit, but I don't understand why tie can't be implemented in terms of Proxy objects... | ||
autrijus | mugwump: tie %h, 'DB_File'; | 03:10 | |
mugwump: try rewrite it using proxy object? | |||
iblech: also, how do you handle (%h := %g) then | |||
iblech: does that mean they share a Box? | 03:11 | ||
iblech | %h := %g is exactly like $a := $b | ||
mugwump | can %h not get reblessed into the DB_File class? | ||
iblech | I.e. .STORE, .FETCH, and .BINDTO are copied | ||
mugwump hmms | 03:12 | ||
iblech | autrijus: Why should Array and Hash not also redispatch? | ||
autrijus | iblech: @ary.foomethod | ||
iblech: if Array does not handle foomethod | |||
what should it redispatch to? | 03:13 | ||
iblech | Ah, of course. Was mixing up Perl 6/PIL2JS | ||
autrijus | mugwump: also note that when you tie(%h), then untie(%h) , original content of %h needs to prevail. | ||
mugwump | but wasn't "tie" always a hack, anyway? I thought that the only required goal of tie-like functions was to be able to make objects that behave like instrinsic types | 03:14 | |
autrijus | mugwump: yeah, you're talking about killing tie, and I'm okay with that proposal | ||
mugwump: but the spec says tie stays, so I need to find a way to implement it. | 03:15 | ||
mugwump: the "tie should die" proposal belongs elsewhere :) | |||
iblech: so, look at pugscode.org/images/container.png for a second | 03:16 | ||
mugwump sends his comment "We're supposed to be leaving legacy behind in Perl 6" elsewhere | |||
wolverian | mugwump, that would be perl6-language | ||
I'll post my "rename 'grep' to something even vaguely resembling English" post too, then :) | |||
autrijus | iblech: my initial thought is that $s.foo is dispatched first to the Cell | ||
iblech: which is exposed as surface class Scalar and Scalar::Const | 03:17 | ||
iblech: then if it does not handle .foo, its AUTOMETH redispatch it to the "Scalar Value" slot. | |||
iblech: and in array's case, exactly the same thing applies, except there is no "array value" to dispatch to -- they are separate containers. | 03:18 | ||
"they" == "the items" | |||
iblech: your PIL2JS Box 's fetch looks like the Container-Cell fetch | |||
iblech | Sounds sane. | ||
mugwump | "Perl 6 variables are tied directly at declaration time, and for performance reasons may not be tied with a run-time tie statement unless the variable is explicitly declared with an implementation type that does the Tieable role. | ||
autrijus | not the Cell-Value fetch I was talking aboutl | ||
mugwump | - S06 | ||
iblech | Yep. | ||
autrijus | mugwump: right, that. | 03:19 | |
iblech: good. so if we hav | |||
Array does Cell; Scalar does Cell; Hash does Cell; | 03:20 | ||
(the "cell" name is throwaway temporary hypothetical device) | |||
iblech: then we can rule that Ref always hold a Cell | |||
and enreference will promost anything not a cell into an appropriate cell -- that is, plural value into Array and other values into Scalar. | 03:21 | ||
iblech | What about \%hash? | 03:22 | |
autrijus | iblech: so if you reopen the Scalar class to add new methods, it effectively intercepts its content's method. also "implementation class" are merely new Scalar Cell types beyond the default mutable and immutable cells. | ||
iblech: \%hash takes a Hash, Hash does Cell, it holds a Cell, no autoenreference happens | |||
iblech | Ok. | ||
autrijus | as a direct result, what we used to call "lvalue" now actually means "Cell" | 03:23 | |
and the reason that | |||
iblech | Right, makes sense. | ||
autrijus | 4 = 5 | ||
does not work, is because 4 does not typecheck. | |||
and I think that's what TSa was getting at. | 03:24 | ||
stevan | iblech: your JS multi-methods are in r6125 | 03:25 | |
svnbot6 | r6125 | Stevan++ | Perl6.MetaModel - (JS) | ||
r6125 | Stevan++ | * adding very very primative MultiMethods | |||
r6125 | Stevan++ | - added tests file for them | |||
r6125 | Stevan++ | * added multi-method support to Perl6.Class | |||
r6125 | Stevan++ | - added a test for this as well | |||
stevan | as promised they are not pretty :) | ||
iblech | oooh :) | ||
stevan++ | |||
autrijus | oh, what about PIL not dumping multimethods? | ||
stevan | iblech: it basically takes an array of Perl6.Method objects | ||
hobbs | so you guys are responsible for the massively inflated karma on perlbot | ||
stevan | and based on their arity, it dispatches | ||
hobbs++ # yes :) | 03:26 | ||
spinclad | well, svnbot does most of the dirty work, but yeah | ||
autrijus | iblech: Compile.hs line 152, extend it to handle non-singular list contents, that's all | ||
iblech: should be straightforward as it already allows multiple returns | 03:27 | ||
stevan | oh autrijus, I was talking to matts about doing a port of DBIx::Class to perl 6 | ||
and generating the classes with the metamodel | |||
iblech | autrijus: Simple :) Will do that tomorrow then | ||
autrijus | ooh. bridging it on perl5:DBI ? | ||
iblech++ # cool | 03:28 | ||
stevan | autrijus: probably yes | ||
I wont be able to start on it until mid-sept | |||
iblech | But I *really* need to sleep now. (05:28 AM here) | ||
autrijus | stevan: cool | ||
iblech | Night all :) | ||
autrijus | iblech: go sleep you crazy diamond | ||
iblech | :D | ||
stevan | nite iblech, I hope you dream of container types too | ||
autrijus | *wave* | ||
stevan | autrijus: I figure too that you will have the metamodel in by then | 03:29 | |
autrijus | stevan: yeah, that sounds likely | ||
I'll go out and grab some food. be back in a bit | |||
stevan | I am also working on documenting the meta object protocol (not sure if you saw the backlog) | ||
autrijus | no, will backlog further | ||
I look forward to more Visio time :) | |||
stevan | see docs/S12.5.pod in the metamodel | 03:30 | |
it is just a start | |||
however, I need to sleep soon as well, nite & | |||
spinclad | it sounds like you're extending the MM to meta-calling (MMD and such) | 03:31 | |
which i think is excellent and needed. | 03:32 | ||
dudley tries to resist the urge to give up on java and learn scala.... | 03:34 | ||
autrijus | dudley: that will do you good :) | 03:35 | |
Scala and Nice are both very nice. | |||
SamB | it would be a shame if nice was not nice | ||
dudley | yeah, but I'm working on the java port of the metamodel. Changing horses in midstream and all that. | ||
spinclad | stevan++; iblech++ # CPS in JS | ||
spinclad puts down pompoms for the night | 03:38 | ||
SamB | riding horses through rivers sounds odd enough to start with! | 03:40 | |
Khisanth | eh? | 03:42 | |
oh dudley's statement :) | |||
dudley | Ok, that's enough for one day. Goodnight all. | 03:45 | |
sleep & | |||
dduncan | for those of you interested in Perl 5 stuff that will shortly be translated ... I would like to announce that svn.utsl.gen.nz/trunk/Rosetta/ is now fully up to date with Rosetta's current state of being as of r724; however, that is a snapshot and fails a test; r724 is good to study, but r723 passes all tests ... and so, any future commits have brand new stuff | 05:49 | |
svnbot6 | r6126 | Stevan++ | Perl6::MetaModel - (p5) | ||
r6126 | Stevan++ | * added ::get_P6opaque_instance_data to centralize p6opaque information | |||
r6126 | Stevan++ | - changed all files which accessed data directly to use this function | |||
r6126 | Stevan++ | * moved some things around in Perl6::Class to facilitate the name lookup | |||
r6126 | Stevan++ | refactoring. It is getting there, but not quite done yet. | |||
geoffb | Wheeee | 10:12 | |
geoffb feels like he got run over by a conference or something | |||
. . . but I just finished the last of my OSCON blogs, so I'm happy. | |||
And maybe tomorrow I can come back to the fun here in Pugsland. | 10:13 | ||
Mighty quiet around these parts. | 10:16 | ||
Ah well, I'll come back and visit sometime when the sun is on my side of the planet again. :-) | |||
g'night, all. | |||
castaway_ | night geoff :) | 10:17 | |
autrijus purrs | 10:44 | ||
I did a lot of PIL2 design on paper today | |||
autrijus finally got network back | |||
will start hacking :) | |||
castaway_ | grats autrijus ! | 10:53 | |
10:54
castaway_ is now known as castaway
|
|||
kgftr|konobi | castaway: lo... how's it going? | 10:54 | |
jdv79 | is the "paper" available? | ||
castaway | hey | 11:03 | |
not bad, coming together, I think :) | |||
autrijus | jdv79: available as dead trees | 11:04 | |
I'm coding them down | |||
jdv79 | oh, you meant _real_ paper:) my mistake. | 11:05 | |
autrijus | :) | ||
I'm targetting a reduced set of perl6 currently | 11:06 | ||
just for experimenting with the new type-directed compilation and PIL2 | |||
castaway | .oO( people still write on paper? what a concept .) |
11:08 | |
autrijus | I went out of battery ;) | ||
ok, I'll go offline now... can't code with IRC window on | 11:09 | ||
autrijus waves & | |||
castaway | later a* | 11:10 | |
svnbot6 | r6127 | autrijus++ | * beginning of a separate PIL2 repl loop, in PIL.hs. | 11:39 | |
r6128 | autrijus++ | * oops, it now compiles. next up: "print 1" in the grand | |||
r6128 | autrijus++ | Punie tradition! | |||
coral | Punie? | ||
or dvorak | 11:40 | ||
coral & | |||
integral | coral: punie == perl1 on parrot | 11:45 | |
QtPlatypus | Punie is Perl1 on Parrot. The first test was "print 1" | ||
autrijus | right, and the only running test. | 11:50 | |
"print 10" would fail, for example :) | 11:51 | ||
Whitesocks | I want to send the command "ls -l" to the perl open command from a apache web server... but when i type "ls+-l" in the browser, the "+" doesnt get exchanged for a space..... why? | ||
integral | Whitesocks: the perl6 open command? | ||
autrijus | Whitesocks: I suggest #perl | ||
Whitesocks | Ok thanks. :) | 11:52 | |
autrijus | :) | ||
autrijus mumbles something about rm+-rf. | |||
nothingmuch | rm -rf is the roxor | 11:53 | |
QtPlatypus | Perhaps we should put something in the topic about it not being a channel for perl5 questions. | 11:54 | |
nothingmuch | it fixes all those stupid alias rm="rm -i" entries | ||
integral thought the 6 in the name was a giveaway | |||
nothingmuch | QtPlatypus: i don't think it's worth that much... we don't get them too often | ||
QtPlatypus | I've seen about one question per week. | 11:55 | |
Your right that isn't two much. | |||
svnbot6 | r6129 | autrijus++ | * the runM monad for generic monad translation | ||
11:58
xinming_xchat is now known as xinming
|
|||
autrijus | hm. | 12:01 | |
class Foo { method f (Str $x --> Int) {} ) | |||
class Bar is Foo { method f (Int $x, Int $y --> Str) {} } | |||
should such things be tolerated? | |||
also: | |||
my &f := sub (Str $x --> Int) {}; &f := sub (Int $x, Int $y --> Str) {}; | 12:02 | ||
also: | |||
my Int $f; $f := "string!"; | |||
they are similar but not exactly the same. thinking about how far we should go on those. | |||
QtPlatypus | First shouldn't be permitted unless multimethods | 12:04 | |
THe frist shouldn be permitted unless there muliti methods? | |||
On the other hand you might wish to overwrite methods, which should also be permitted. | 12:05 | ||
autrijus | the thing is that each of those disables a form of early binding. | ||
I'm pretty sure you can't say you "does" a role but does not have a compatible interface. | 12:06 | ||
that's the thing that makes | |||
role Coercable { method coerce:<as> (::t --> t) { ... } } | |||
work. | |||
QtPlatypus | Isn't that why we have "is final"? | 12:07 | |
autrijus | there is no "is final". | ||
check again? | |||
(we have "use optimize :classes<final>") | |||
but that's not the same. | |||
autrijus ponders some more. | 12:08 | ||
masak | are tests marked "todo" given as much attention as failing tests? | 12:22 | |
autrijus | no. | ||
I look at :todo<bug> from time to time | 12:23 | ||
but most :todo<feature> will probably only be fulfilled in the new runcore. | |||
masak | it was mostly the :todo<bug> ones i meant | ||
autrijus | oh. then, still not | 12:24 | |
masak | that's too bad | ||
autrijus | :todo<bug> means they are confirmed bugs | ||
failing tests are untriaged | |||
and triaging needs to happen before bugfix | |||
so it makes sense to pay more attention to them :) | |||
masak | i suddenly realised that i expect bugs to be fixed by themselves | 12:25 | |
that's an unreasonable expectation | |||
autrijus | indeed :) | ||
I mean, eventually, sure | 12:26 | ||
masak | i just wish there was more i could do to fix *my* bugs :) | ||
autrijus | but if you put any time frame on it, then it's less certain. | ||
soon, soon. :) | |||
(assuming you feel more proficient hacking perl6 than haskell) | |||
masak | i think i do | ||
autrijus | good then. | ||
masak | neither very much, but still, perl6 i sorta understand | 12:27 | |
autrijus | *nod* | 12:29 | |
scook0 | bah, in one day everything I think I know about the metamodel gets turned upside-down :( | 12:31 | |
autrijus | scook0: hmm? | 12:32 | |
scook0 | stevan's comments on p6l | ||
nothingmuch | g/qui | 12:33 | |
scook0 | I thought I understood it | ||
then he says something like "the Class object will be invocant of all the class methods", and I realise I must be totally off | 12:34 | ||
perhaps someone needs to convince stevan to draw some pretty diagrams :) | |||
autrijus | or I should draw one for you | ||
I have half-finished ones. | |||
but I'm compelled to make "print 1" work now :) | 12:35 | ||
scook0 | yeah, I heard--I shall gleefully examine your latest PIL work... | ||
autrijus | scook0: it's based on type-directed translation | 12:36 | |
for once | |||
for example, when it sees | |||
print 1 | |||
then it compiles to | |||
&print(&coerce:<as>(1 as Int, Str as Type) as Str) as Bool | |||
jdv79 | i thought what is now called Object was going to be called MetaMetaClass | ||
autrijus | scook0: and | 12:37 | |
print $_ | |||
&print(&coerce:<as>(&Scalar::FETCH($_ as Scalar of Any) as Any) as Str) as Bool | |||
the FETCH is inserted by coercing (Scalar of Any) to (Any) via a compile time binding | |||
but maybeit should be overridable as a coerce:<as> form as well. | 12:38 | ||
dependent types are so much fun. | |||
masak | that's something you don't here every day | 12:39 | |
scook0 | autrijus: I'm not sure I understood any of what you said, so I'll just peer at the code for now | ||
masak | s"here"hear" | ||
autrijus | scook0: ok :) | ||
scook0 | hmm, is there any way to tell GHC to use /less/ memory? | 12:40 | |
even 'make unoptimised' locks up my system with thrashing :( | |||
autrijus | allocate less heap? | ||
scook0: oh, you can do the easy thing | |||
edit config.yml | |||
turn off precompile prelude | 12:41 | ||
scook0 | done (thanks) | ||
not that I really run pugs much | |||
I mostly just recompile to make sure Haddock doesn't screw up | 12:42 | ||
Daniel_Nee | Hi, Autrijus: Could you come in tomorrow afternoon around 1:00 PM and we'll go to nanshan to continue the UAT ? | ||
autrijus | Daniel_Nee: hey, I already replied your mail | ||
Daniel_Nee: also if you look at the bottom of your chatzilla screen there should be a red "autrijus" button -- pressing it and you'll see a private message from me, and we can talk in that window in private, too :) | 12:43 | ||
autrijus praises the amazing protocol that is irc. | 12:44 | ||
Aankhen``: hey | 12:47 | ||
Aankhen`` | Hiya. | 12:50 | |
And bye-a. I can't stay. :-\ | |||
Will be back later. | |||
autrijus | ciao :) | ||
bbiab too & | |||
fglock | ping | 14:11 | |
autrijus | pong. | ||
fglock | ping | 14:13 | |
autrijus | pong. | ||
fglock | hi! I'm reading the metamodel - I can't find 'List' there | ||
maybe i'm in the wrong directory | 14:14 | ||
autrijus | hm? | ||
List? | |||
fglock | There is an Array.pm - is there a List.pm? | 14:15 | |
under "Container" | |||
autrijus | I don't think so, currently | ||
list is a value type | |||
not a container type | |||
and I don't think the p5 metamodel deals with value types yet | |||
fglock | i've got Lazy lists ready, i think | 14:17 | |
svnbot6 | r6130 | autrijus++ | * layout for the new stuff -- "make pil" launches into ghci | ||
r6130 | autrijus++ | for PIL.hs. This is strictly temporary. | |||
r6131 | fglock++ | * Array::Lazy - code cleanup | |||
r6132 | autrijus++ | * split into "make pil" and "pili" | |||
r6133 | autrijus++ | * preliminary checkin for literal parsing. | |||
r6134 | autrijus++ | * "print 1" is parsed... how very exciting :) | |||
autrijus | fglock: yay. porting it to p5 if you have the tuits? :D | 14:19 | |
I'll integrate it to the runtime when I get around to the Plural handling. | |||
fglock | do you mean - using coroutines? | 14:20 | |
autrijus | fglock: yes. | 14:23 | |
you can fake coros with an extra callback sub param | |||
the same way as ruby does | |||
or you can ues the more expensive Coro.pm | |||
fglock | I started implementing using callbacks - then I changed to coro. but I think it can work both ways. | 14:25 | |
even a Sub with a state variable would do | |||
how about "Perl6::List" | 14:26 | ||
autrijus | I'd prefer Perl6::Runtime::List or Perl6::Val::List | 14:28 | |
just so we don't conflict massively with other cpan things | |||
or Perl6::Pugs::List | |||
;) | |||
I think Perl6::Value::List can work. | 14:29 | ||
Arathorn crawls in from the cold | 14:30 | ||
fglock | ok - Perl6::Value::List. should it use 'shift' or 'SHIFT'? | 14:31 | |
autrijus | you mean the method? call it shift, I don't think it'd hurt | 14:32 | |
fglock | I'll work on it in the afternoon. Going for lunch now :) | 14:33 | |
autrijus | fglock++ | 14:35 | |
stevan | fglock: anything in the metamodel under ::Container should be probably ignored | 14:40 | |
svnbot6 | r6135 | autrijus++ | * beginning of compilation | ||
r6136 | autrijus++ | * rename PIL.Syn to PIL.Exp | |||
r6137 | autrijus++ | * finishing up the rename. | |||
stevan | morning all :) | ||
dudley | Morning | 14:41 | |
stevan | I am responding to TSa on p6l, I have a feeling the cyclical nature of the metamodel will not sit well in his clean Type DAG world | ||
QtPlatypus | Good evening | ||
stevan | morning dudley, evening QtPlatypus :) | ||
s/Type/Type model/ | 14:42 | ||
pasteling | "Stevan" at 67.186.136.119 pasted "MetaModel cycles" (16 lines, 328B) at sial.org/pbot/12335 | 14:43 | |
stevan | I made him a pretty picture though :) | 14:44 | |
castaway | pretty pictures++ | 14:46 | |
Arathorn | hrm, my pine mutilates the pretty pictures :( | 14:54 | |
stevan | Arathorn: see the nopaste above | 14:58 | |
Arathorn has found the H button to get pine to display rawtext sensibly :) | |||
but thanks | |||
15:03
autark is now known as jp-autark
|
|||
QtPlatypus | autrijus: Will PIL2 contain PPos infomation. And if so what do you expect it to look like? | 15:07 | |
autrijus | QtPlatypus: question 1 is yes | 15:13 | |
I think the current line/col range is good enough | 15:14 | ||
I'll probably put file into another form | |||
and you can deduce your file and line/colrange by looking outward and find first one of each kind | |||
does that sound ok? | |||
yay, the skeleton is done | |||
svnbot6 | r6138 | autrijus++ | * rather improbably, "print 1" works, so does "say 123", as well | 15:15 | |
r6138 | autrijus++ | as "say say say 123". | |||
autrijus | I can focus on type directed translation now. | ||
QtPlatypus nods | |||
autrijus continues to sail on this Heart of Gold thing | |||
QtPlatypus | So I'm guessing its a psydo funtion wrapped around the code? | 15:16 | |
autrijus | it's not pseudo function... | 15:17 | |
but rather each node can be annotated with one or more positions | 15:18 | ||
something like | |||
data PIL = Pos PIL | ... | |||
or rather | |||
data PIL = Pos Pos PIL | ... | |||
QtPlatypus | How are thouse annotations serilized? | ||
autrijus | and it has type a :: a | ||
for example, say you have | |||
Lit (Single (Int 3)) | |||
then the annotated form is | 15:19 | ||
Pos somePos (Lit (Single (Int 3))) | |||
where somePos is some position information. | |||
I think I'll move the main part on the left | |||
so it's | |||
Pos (Lit (Single (Int 3))) somePos | |||
i.e. exactly the same way current Exp and PIL handle things. | 15:20 | ||
QtPlatypus nods | |||
autrijus | an alternative is have each node carry a position optionally | ||
but then I can't easily "peel them" away | |||
so probably not. | |||
peek (Pos x _) = x | |||
er | |||
peel (Pos x _) = x | |||
peel x = x | 15:21 | ||
done | |||
QtPlatypus | thanks | ||
autrijus | and it fusions as well, so if all is in haskell, then those position slots are not filled in the first place | ||
since their evaluation never triggers | |||
so we don't get much speed penalty | |||
QtPlatypus thought that PIL2 was going to look like flattened p6? | 15:23 | ||
autrijus | the prettified form, surely. | ||
maybe it'll be littered with #line -- I mean #file -- directives if you want them. | 15:24 | ||
QtPlatypus nods and can work with that | |||
QtPlatypus beds & | 15:26 | ||
autrijus purrs | 15:27 | ||
fglock | ping | 15:37 | |
autrijus | pong | ||
fglock | hi autrijus - I need to define 'Inf' in perl5. Is Perl6::Value::Scalar a good place? | 15:38 | |
autrijus | Perl6::Value::Num actually. | 15:39 | |
Scalar is container, Num is contained | |||
but you can get inf in perl5 using 9**9**9 | |||
but otoh, you can't call .. on it. | |||
so it's up to you :) | |||
for the value type names, please follow the new PIL runcore | |||
svn.openfoundry.org/pugs/src/PIL/Val.hs | 15:40 | ||
Int Int | Num Num | Str Str | Ref Ref | Bit Bit | |||
(they should inherit from the common abstract "Single" class.) | 15:41 | ||
and List should inherif from "Plural", but you don't need to worry about that yet. | 15:42 | ||
it'll all become Visiolized :) | |||
visiolization++ | |||
fglock | where can i get the operator names (the "List API") | 15:43 | |
like "..", comma, etc | |||
i've got a solution for detecting "end of list", when the list contains "undef" | 15:45 | ||
"List" can have the "elems" operator. It returns Inf until the list finishes, and then return "0" | 15:46 | ||
autrijus | cool. | ||
that sounds nice | 15:47 | ||
I don't think there is a canonical API. | |||
you can grep List in src/Pugs/Prim.hs | |||
to get some idea of that | |||
if you come up with one and it works well | 15:48 | ||
it will likely become the canonical api. | |||
fglock | when I cast a List to a Num - is it a $list.to_num() operation or a Num.from_list( $list ) ? I hope the question makes sense | 15:52 | |
autrijus | perl6 uses coerce:<as> | ||
so it is to, not from | 15:53 | ||
otoh, you can define MMD forms from it | |||
so it can potentially be both | |||
but never only from. | |||
also, you're doing the one-level-below runtime class | 15:54 | ||
so you can use any API you like | |||
it's the job of the inferencer to pick the correct coercion form, and the code generator to call your runtime class. | |||
Aankhen`` | Hi. | ||
fglock | Hi Aankhen | ||
autrijus | but to make things tidier, to_num sounds fine certainly, although you may or may not want use overload. | 15:55 | |
Aankhen`` | Heya fglock. :-) | ||
autrijus | i.e. overload 0+ => \&to_num | ||
(hopefully I'm still making sense) | |||
Aankhen`` wonders how to create a class that functions as an array, with the right sigil, et al. | |||
fglock | sure - I'm trying to find out what is the minimum API. | 15:56 | |
Aankhen - me too :) | |||
autrijus | Aankhen``: class MyArray does Array { ... }; my @x is MyArray; | ||
Aankhen``: will work, does not yet :) | |||
Aankhen`` | autrijus: What about if I want to be able to say: my @foo = MyArray.new(); | ||
Will that work too? | |||
fglock | Aankhen: I think it should work, but you are copying the data from your new array into @foo, and throwing it away, I think | 16:00 | |
autrijus | Aankhen``: I don't think that works. := works. | ||
Aankhen`` | OK. | ||
And if I just say `class MyArray does Array { ... }`, MyArray automatically knows to return an array? | 16:01 | ||
autrijus | er, that's what does means. | 16:03 | |
if you think about it a bit :) | |||
liskov and all that. | |||
Aankhen`` | I try not to think about it; it hurts my head. | 16:04 | |
My understanding of `does` was always that it's simply a way to manage code reuse. Didn't think it would alter the `new` method. | |||
autrijus | er, "does" means | 16:05 | |
whatever you retur | |||
n | |||
you agree to conform to the Array API in full. | |||
so it's "as good as" Array. | |||
fglock | can "does" be tested with "isa"? (I think I tried it before and it didn't work) | ||
autrijus | no. "isa" manages implementation reuse | ||
"does" manages interface reuse. | |||
(broadly speaking, that is.) | 16:06 | ||
Aankhen`` | Ah, I see. | ||
"Does" that extend to other roles as well? | |||
autrijus | sure. | 16:07 | |
xinming | is the the only difference between "say" and "print" is say will add a "\n" to the result. but not print? | 16:08 | |
autrijus | xinming: yes. | 16:10 | |
in other languages it's be the different betweehn putStr and putStrLn, or print and println, or write and writeln. | |||
but @Larry reasoned that the "ln" form is actually more common | 16:11 | ||
and hence should be shorter. | |||
it's called the principle of huffman encoding | |||
er, Huffman coding. | |||
Aankhen`` | So are roles only supposed to be interfaces? | 16:12 | |
osfameron | given how much we talk about Huffman coding, should we Huffman code it to somethign shorter? | ||
autrijus | osfameron: I don't think that comes often enough nowadays, and "huffman" would suffice :) | 16:13 | |
Aankhen``: they may contain implementation code as a "default case". but it's not reuse -- it's copied straight into the "does" consumer. | 16:14 | ||
well, it's reuse, but not inheritance, sorry. | |||
so you don't get to call SUPER. | |||
Aankhen`` | Ah. | ||
autrijus | there's no SUPER for roles. | ||
Aankhen`` | Well, thanks for the explanation(s). :-) | ||
autrijus | so you can't post/pre process the super methods. | ||
if you'd like to do that, roles isn't for you. | |||
np :) | |||
Aankhen`` | class MyClass does Hash does Array { ... }; MyClass.new() # what type of object? | 16:15 | |
autrijus | MyClass of course. | ||
Aankhen`` | Er, right. | ||
autrijus | :) | ||
Aankhen`` | What sigil? | ||
autrijus | both. | ||
my @x is MyClass; (fine) | |||
my %x is MyClass; (fine too) | |||
this is not entirely unlike in perl5 you can tie hash and array to the same class. | 16:16 | ||
Aankhen`` | And `my $x is MyClass` becomes a regular opaque object? | ||
autrijus | er, no, it will complain that MyClass doesn't do Scalar, or something like that. | ||
my MyClass $x | |||
is what you want. | |||
Aankhen`` | Ah, right. | ||
autrijus | shorthand of "my $x returns MyClass" or "my $x of MyClass". | ||
Aankhen`` | That's equivalent to `my $x of MyClass`, right? | 16:17 | |
OK. | |||
autrijus | :) | ||
Aankhen`` boggles at the thought of an instant HashArray class. | |||
autrijus notes you can do that in perl5 with three ways already. | |||
Aankhen`` | In one line | ||
? | |||
autrijus | sure! | ||
Aankhen`` | That is to say, one semi-colon terminated statement? | 16:18 | |
autrijus | sure! | ||
Aankhen`` | Wow. | ||
I've never come across anything of the sort. | |||
My life has been wasted. | |||
:-\ | |||
autrijus | use overload ('@{}' => sub { [] }, '%{}' => sub { {} }); | 16:19 | |
that's one way | |||
*TIEARRAY = *TIEHASH = *FETCH = *STORE = ... = sub { ... }; | |||
that's another | |||
[{}] | |||
is the third (deprecated) way. | 16:20 | ||
perl6 doesn't really add many runtime features | |||
but it made it much more reasonable and cleaner. | |||
Aankhen`` | Looks like it. | ||
autrijus | (it does add a _lot_ of compile time features though.) | ||
Aankhen`` | my HashArray %hasharray = (a => 'b', c => 'd'); %hasharray[0] # == 'b'? | 16:22 | |
# given a `class HashArray does Hash does Array`, that is. | 16:23 | ||
autrijus | my %hasharray is HashArray | ||
Aankhen`` | Ah, right, my bad. | ||
autrijus | your form has it containing HashArray elements. | ||
Aankhen`` | That's going to come back to bite me. | ||
Again and again and again. | |||
autrijus | :) | ||
I blame it to @Larry. | |||
different things made similar. | |||
Aankhen`` | Ah, I personally blame it on my sudden bursts of thick-skull-itis. | 16:24 | |
autrijus | I contend that %hasharray[0] still won't work. :) | ||
as the sigil rules over the interface | |||
so your Array side of methods did not get recognized | |||
by the inferencer. | |||
but, if you get a p6l ruling | |||
I can think of ways to implement that :) | |||
Aankhen`` | So if I want to provide both interfaces, do I use `my $x of HashArray`? | ||
SamB | you silly person! never blame thick-skull-itis! software should be designed to relieve it! | 16:25 | |
autrijus | yes, that would work. | ||
Aankhen`` | Cool. | ||
autrijus looks SamB strangely | |||
Aankhen`` | SamB: Oh yeah. Sorry. Must have been the thick-sk-- er, nevermind. | ||
Anyway, time for din-din. | 16:26 | ||
BBIAB. | |||
& | |||
autrijus | :) | ||
autrijus starts journaling | |||
fglock | I'm writing the file Perl6/Value/List.pm - is it ok to say 'package List' instead of 'package Perl6::Value::List' ? | ||
autrijus | fglock: well, I definitely prefer the later | ||
fglock | ok | ||
autrijus | you can set up local aliases like | ||
my $List = __PACKAGE__; | 16:27 | ||
or something like that :) | |||
xinming | Perl 6 is going to confuse more people then ever. :-) | ||
autrijus | xinming: that is just following the grand tradition of perl5. | ||
PerlJam | As long as perl6 doesn't cause too much confusion about basic things (or what programmers think of as basic (like the type system)) | 16:30 | |
autrijus | indeed. | 16:32 | |
the type system is perhaps the most significant new semantics over perl5. | |||
PerlJam | new semantics == good | 16:34 | |
autrijus | just like haskell is pronounced "world's finest imperative language" after it got monads, maybe perl6 can evolve to be the world's finest static language. | ||
PerlJam | new confusing semantics == bad | ||
autrijus | verily. | ||
PerlJam | I would be shocked if perl6 became the world's finest static language. | 16:35 | |
(but in a good way) | |||
xinming | I agree with autrijus, Perl 6 will be. :-) | 16:36 | |
autrijus | it's pretty tough with grand prior arts like O'Caml, but one can certainly try :) | ||
fglock is finding it hard to write Perl5 after a month doing only Perl6 | 16:40 | ||
PerlJam | fglock: I've stopped writing perl6 for a while actually. It was affecting my ability to write perl5 for work. | 16:41 | |
fglock | i'm too slow :) | ||
PerlJam | when I went to explain something to a co-worker and wrote a perl6 solution without thinking, I realized a few things: 1) perl6 will be great once it's ready for prime time 2) a perl6 solution in a house of perl5 isn't too productive and 3) more perl6 would only make me wish for it hard enough to hurt myself :) | 16:43 | |
Aankhen`` | Heh. | 16:44 | |
I wub Perl 6. | |||
Or rather, I wub that subset of it which I can understand. | 16:45 | ||
Oh dear... the Empire Earth II demo is mad at me for not playing it since I installed it. I better go. | 16:46 | ||
xinming | while =$*IN -> $line {...} ,What does the equal sign mean here please? | ||
brentdax | Unary equals is the iteration operator. | ||
(Like the old <blah>, but more general.) | |||
fglock | it is just like 'shift' | 16:47 | |
autrijus | PerlJam: your experience is a prime example of why compiling perl6 to perl5 is The Way Forward :) | ||
fglock: actually it's like "a lot of shift" | |||
xinming: and that should read | 16:48 | ||
for =$*IN -> $line { ... } | |||
PerlJam | autrijus: "a lot of lazy shift" | ||
autrijus | PerlJam: right. | ||
"a lot of shift, lazily" | |||
fglock | "lazy list constructor" | ||
autrijus | decomposer, actually | ||
the $*IN is the constructor | 16:49 | ||
or is it called "generator / consumer" | |||
xinming | :-S | ||
hard to understand for me. :'( | |||
PerlJam | xinming: why? What's confusing? | 16:50 | |
autrijus | xinming: ok. $IN is this object that was called STDIN | ||
xinming: and prefix = replaces <> | |||
and for replaces while :) | |||
xinming: in perl5 you could also say | 16:51 | ||
for my $line (<STDIN>) {...} | |||
except it will wait until EOF | |||
but in perl6, it will eventually read one line at a time. | |||
fglock | is there a place under pugs/ for Perl6::* modules? or do they go straight to CPAN? | 16:52 | |
autrijus | "eventually" = as soon as I port fglock's implentatino over. | ||
fglock: yes, put them under perl5/ | |||
fglock: once they work coherently, they will go straight to CPAN as Perl6::Runtime or something like that. | |||
before that, put it under its own perl5/ subproject. | |||
autrijus can't wait to use Perl6::Runtime at $work. | 16:53 | ||
xinming | autrijus: go on please. | 16:54 | |
autrijus | xinming: ok... the idea is that =$IN is like <$IN> | ||
except that the list is not evaluated all at once | |||
but rather only at the time it is bound to something, like $line | 16:55 | ||
so the net effect is that it reads one extra line when the loop runs next | |||
note that this does not describe the current pugs | 16:56 | ||
which has no support for lazy arrays | |||
but we're -- actually fglock is -- working on that :) | |||
xinming | Ok, Then, for Every Array, eval qq{ my $t = (1..8); for =$*t -> $_ { $_.say }; } means the value(not values) in the anonymous list is calculated every time reached for, right? | 16:57 | |
autrijus | assuming that array does iterator | 16:58 | |
xinming | Sorry for my poor English. :-) | ||
autrijus | and assuming you wrote q{} instead of qq{} | ||
that's fine :) | 16:59 | ||
and assuming you wrote $t instead of $*t | |||
then yes, 2 is evaluated after 1 is printed. | |||
so you could have written 1..Inf | |||
and get a lot of strings on your screen | |||
instead of like in perl5 where it plain dies. | |||
but you do have to hit Ctrl-C eventually, before you run out of bits. | 17:00 | ||
(but even 32 bits takes a lot of time to run out.) | |||
xinming | my $t = (1..Inf); for $t { $_.say }; | 17:01 | |
This will print nothing, right? | |||
SamB | what do you mean, run out of bits? | ||
autrijus | SamB: never mind... I forgot Int is bigint. | ||
xinming | If so, I think I understand what = exactly means here. | ||
SamB | I thought Int wrapped around? | 17:02 | |
autrijus ponders how array references should stringify. | |||
SamB: nope. int may, but Int is big. | |||
SamB: (note I don't like this.) | |||
Khisanth | autrijus: why not stringify to same thing as perl5? | 17:03 | |
autrijus | Khisanth: ARRAY(0x1234) ? | ||
Khisanth | :) | ||
autrijus | Khisanth: I somehow doubt its usefulness. | ||
xinming: assuming $t stringifies the array it points to, then yes, it will likely die of a out of memory. | |||
Khisanth | one of those things that should be a fatal error? | 17:04 | |
autrijus | maybe, if we can detect it somehow. | 17:05 | |
but sometimes it's kind of hard. | |||
PerlJam | xinming: given $t = 1..Inf; for *$t { .say } will never output anything as it will halt executing trying to expand $t. | 17:06 | |
xinming: for **$t { .say } will do the same but halt compilation as it tries to expand $t | |||
autrijus | Khisanth: unless stringification is lazy also | ||
Khisanth: but in p6, string ne list of char | 17:07 | ||
so I doubt that can happen. | |||
PerlJam | xinming: for =$t { .say } will output a bunch of numbers. | ||
fglock | Perl6::Value::List is done - it's 30 lines | ||
autrijus | Khisanth: it's like | ||
Data.PackedString.packString (show [1..]) | |||
which is also out of memory. | |||
Khisanth | autrijus: isn't stringification lazy in p5? | ||
autrijus | Khisanth: I mean the process itself | 17:08 | |
Khisanth | oh | ||
autrijus | in haskell, show :: [Int] -> [Char] | ||
and each cons cell is processed separately | |||
so fusion happens and all's fine | |||
but in perl6 String is not [Char] | |||
so I doubt we can lazily print a stringified infinite array. | 17:09 | ||
(I like that Str is not [Char], fwiw.) | |||
svnbot6 | r6139 | fglock++ | * Perl6::Value::List - implements "List" semantics in Perl5 | 17:15 | |
fglock | autrijus: you can print "start..end", but not the whole array | ||
autrijus | fglock: right | ||
Limbic_Region | IIRC, @larry - or perhaps even $larry has ruled that if you type the parameters of a sub and you don't pass args of that type - p6 will squawk. In what ways and conditions will p6 squawk for improper type use elsewhere? | 17:17 | |
autrijus | actually, it will only squawk when it can't find the coerce:<as> form. | 17:19 | |
it will warn and insert coercion silently otherwise. | |||
Limbic_Region: typechecks is only done on bindings. function application and return involves two implicit bindings. | 17:20 | ||
svnbot6 | r6140 | fglock++ | * List.pm - added reverse() method | ||
Limbic_Region | so is there going to be a pragma or something to really squawk? | ||
autrijus | Limbic_Region: sure, I think that'd be cool. | 17:21 | |
we're talking about | |||
'1' - '2' | |||
Limbic_Region | right | ||
and 1 - '2' | |||
autrijus | yup | ||
but | 17:22 | ||
Limbic_Region | and '21asdf' - 4 | ||
autrijus | 1 - ('2' as Int) | ||
will always be fine. | |||
(because coercion typechecks by definition) | |||
Limbic_Region | right - explicit type casts required if you say you don't want implicit | ||
xinming | PerlJam: So, for **$t {...}; will be a failure at compile time. And for *$t {...}; won't be a failure, But generating the list all the time. | 17:23 | |
autrijus | Limbic_Region: use strict 'types'; | ||
Limbic_Region: I think that'd work. | |||
in fact I'll implement it in pil2 :) | |||
Limbic_Region | autrijus - b4 you do | 17:24 | |
I found the thread I was talking about | |||
autrijus | although there is a very pedantic form of coercion | ||
1 - $x | |||
which I don't think I'll ever warn. | |||
Limbic_Region | it was luke - not larry - but he agreed there would be yelling, screaming, and gnashing of teeth | ||
perhaps only in the case of no coercion though | 17:25 | ||
autrijus | my Int $x; # suppose that | ||
Limbic_Region | let me link | ||
autrijus | then I won't force user to write "1 - ($x as Int)" | ||
(because you see, $x is of type "Scalar of Int")_ | |||
xinming | thanks all for your patient explaination. :-) | 17:26 | |
autrijus | to cast it into Int is to call FETCH to it. | ||
ok, I need to run for food. bbl | |||
Limbic_Region | grrr - google groups is not playing nice | 17:32 | |
subject line was "Argument Type Checking" and the thread was started by me | 17:33 | ||
svnbot6 | r6141 | fglock++ | * List.pm - to_num(), to_str() | 17:47 | |
geoffb | *yawn* | 17:56 | |
Hey, everyone . . . . | |||
fglock | hi geoffb | ||
geoffb | Two weeks without #perl6 -- I think I'm in withdrawal, despite the sleep deprivation | 17:57 | |
Limbic_Region is rather enjoying his respite from all things geek | 17:58 | ||
geoffb starts the `svk pull` rounds . . . this is going to take a while | |||
You take pretty a pretty soft break, Limbic_Region. :-) | |||
Hey, iblech! | 17:59 | ||
iblech | Hi :) | ||
geoffb | How have you been, lo these many days? | ||
iblech | :) Implementing CPS in PIL2JS currently | ||
geoffb | ooh, very cool. | ||
iblech | Allowing me to implement coro, gather/take, &sleep, callcc, &?CALLER_CONTINUATION and many more things :) | 18:00 | |
geoffb | How is PIL2JS doing otherwise? Is the OOMM integrated? | ||
nice | |||
iblech | It is, but we've to wait for -CPIL2 to fully use it | ||
geoffb | (`svk pull` isn't finished, so I couldn't check for myself :-) | 18:01 | |
nodnod. | |||
And how is -CPIL2 coming? | |||
integral | if PIL2JS can pass t/unspecced/cont.t that'll be one up on Eval.hs | ||
iblech | geoffb: It doesn't exist yet :) | ||
geoffb | wow, I thought for sure autrijus would be mostly there by now. $work must be really interfering. Damnable need to eat. | 18:02 | |
iblech | But as the new PIL runcore (src/PIL*) will use PIL2, we'll have -CPIL2 soon, I think | ||
geoffb | fair enough | 18:03 | |
Oh, for those who didn't make it to OSCON in Portland: www.oreillynet.com/pub/au/2333 | 18:06 | ||
^ My two dozen or so OSCON posts | |||
iblech | ooh geoffb++ | 18:10 | |
geoffb | Thanks. Ended up being a lot more work than I expected! | 18:11 | |
svnbot6 | r6142 | fglock++ | * List.pm - added clone(), is_infinite(), to_bit(), to_ref(), | ||
r6142 | fglock++ | from_single(), to_ref() | |||
r6143 | fglock++ | * Lazy.pm - added concat_list(), from_range() | 18:26 | ||
r6144 | fglock++ | (forgot to save last changes) | 18:37 | ||
Arathorn | big badda boom | 18:48 | |
Limbic_Region | 5th element | ||
great movie btw | 18:49 | ||
wolverian | agreed. | 18:50 | |
autrijus | woot | 18:57 | |
role Coerceable[::to] { method coerce:<to> (--> ::to) { ... } } | 18:58 | ||
multi *coerce:<as> ((Coerceable[T] $from: Type ::T) --> T) { $from.coerce:<to> } | |||
Aankhen`` | o_O | ||
autrijus | class Array does Coerceable[Int] { method coerce:<to> () { ./elems } } | 18:59 | |
very clean. | |||
Aankhen`` | Yup. | ||
autrijus | then, (@array as Int) follows directly from that | ||
Aankhen`` | Yay. | 19:00 | |
autrijus | and hence ('foo' x @array) too. | ||
now, the tricky part is to implement the dependent types ;) | |||
(note how the ::T in coerce:<as> unifies with a _value_) | |||
Aankhen`` | What dependent types? | ||
autrijus | the (Type ::T) part. | ||
Aankhen`` | Ah, OK. | ||
autrijus summons the power of F-omega-sub. | 19:01 | ||
dependent types means you can write weird things like | |||
($x as ref($y)) | |||
or even | 19:02 | ||
($a as (rand(2)>1 ?? Int :: Str)) | |||
and expect it to work. | |||
wolverian | autrijus, wow, ::T can come after it's used in the signature? | ||
Aankhen`` | Coolness! | ||
Right, I'm taking a break. | |||
BBL, maybe. & | |||
autrijus | wolverian: yes, all :: bindings unify first into common supertype | ||
regardless of position | |||
brentdax | Is ./ back again? | ||
autrijus | then is applied to restrict the non-:: form. | ||
wolverian | autrijus, right. greatness. autrijus++ | ||
autrijus | wolverian: thank you, I do think that's kind of an innovation :) | 19:03 | |
svnbot6 | r6145 | Aankhen++ | r6175@tef-base: Aankhen | 2005-08-10 00:25:07 +051800 | ||
r6145 | Aankhen++ | HTTP::Message: | |||
r6145 | Aankhen++ | * added explicit invocant wherever appropriate. | |||
r6145 | Aankhen++ | * changed `coerce:<as>` from method to sub. | |||
r6146 | Aankhen++ | r6176@tef-base: Aankhen | 2005-08-10 00:26:43 +051800 | |||
r6146 | Aankhen++ | * changed `require` to `use` wherever classes were being imported in HTTP::Message, HTTP::Request, HTTP::Request::CGI and HTTP::Response. | |||
autrijus | brentdax: ./ is never left. | ||
brentdax | Ugh...never been a fan of it. | 19:04 | |
autrijus | right. | ||
wolverian | hm, how do you declare coercion into multiple things in one class? | ||
autrijus | but it's still staying for now, as larry said it's okay to have implicit "use self './'" before we can implement self.pm | 19:05 | |
(which is kind of hard) | |||
once that happens then you need that to use ./ | |||
good enough? | |||
wolverian: | |||
class MyClass does Coerce[Int] does Coerce[Str] { | |||
multi method coerce:<to> (--> Int) { ./as_int } | 19:06 | ||
multi method coerce:<to> (--> Str) { ./as_str } | |||
} | |||
wolverian | hm, right. that's clean. | ||
autrijus | very. | ||
and because of -->'s contravariance | |||
if you can coerce to Int without defining coerce to Num | |||
wolverian | somehow the coerce:<to> looks like I should be writing coerce:<Int> etc | ||
autrijus | then pugs picks up Int anyway. | ||
brentdax | Yeah, that's certainly alright. | ||
autrijus | wolverian: yeah, but that'd be name, sadly | 19:07 | |
(picks up Int anyway when you demand Num that is) | |||
integral | will perl6 produce chains of coercions? $a as B =====> ($a as C) as B ? | ||
brentdax | Can you say `has Int multi method coerce:<to>() { ./as_int }`? Or is there no counterpart to my/our for methods? | 19:08 | |
wolverian | autrijus, so why not just call it 'coerce'? what does the :<to> give us? | ||
autrijus | integral: I think that's generally a halting problem | ||
integral | autrijus: thank goodness :) that's one icky corner of c++ | ||
wolverian | (I'm obviously a bit confused, sorry.) | ||
autrijus | integral: right. I don't think that's worth it. | ||
wolverian: the coerce: is a grammatical category | |||
(not my invention; see A12) | |||
wolverian | right, I'll reread it now. thanks. :) | 19:09 | |
autrijus | things in that category may appear freely in infix position to add annotations. | ||
so hm | |||
wolverian | oh, so you'd write '$foo to Int'? | ||
autrijus | no, | ||
$foo as Int | |||
so coerce:<to> is bogus | |||
maybe just coerce_to then | 19:10 | ||
wolverian | now I'm even more confused. I'll just read A12 now. :) | ||
autrijus | wolverian: A12 just talk about that syntax. | ||
I can explain :) | |||
the &coerce:<as> function takes a thing and a type | |||
and cast the thing to that type | 19:11 | ||
provided that the thing does the Coerce role with that type as role parameter. | |||
wolverian | right. | ||
I'm just confused about the <as> thing. | |||
autrijus | to implement that role, we need an actual method | ||
oh, the <as> | |||
wolverian | i.e. why it's necessary. | ||
autrijus | it's just like | ||
&infix:<and> | |||
wolverian | so we can write our own coerce operators? | ||
what is the use in that? :) | |||
autrijus | actually a lot of. | 19:12 | |
I can think of "super" for one. | |||
wolverian | oh. well, that's why I'm confused, I can't think of any | ||
autrijus | return (f() super Int); | ||
wolverian | what does that do? :) | ||
autrijus | it ensures that f() returns something that can be used as Int or one of its super types | ||
not terribly useful in that position, now I think about it. | 19:13 | ||
wolverian | whoa. method int () { .. } # what happens in integer context | ||
autrijus | yeah, we could have | 19:14 | |
subtype IntDuck can int(-->Int); | |||
IntDuck does Coerce[Int] { method coerce () { ./int } } | 19:15 | ||
wolverian | A12 seems to say the int() thing is builtin | ||
autrijus | this is all hypothetical and noncanonical btw. | ||
wolverian: sure, *int is builtin, but it better croak on things that can't be intted. | 19:16 | ||
$ perl -e 'print int(qr//)' | |||
134574816 | |||
very useful, that. | |||
Limbic_Region | autrijus - so in the example I tried to link to but google gropus can't seem to find - sub foo (Int $bar) { say $bar } foo('hello'); | ||
error or no error? | |||
wolverian | right, but A12 says $foo.int is called when $foo is used in any integer context, including implicit | 19:17 | |
autrijus | Limbic_Region: depends on whether there is coerce defined bothways | ||
wolverian | unless I'm totally misreading what 'integer context' means | ||
autrijus | Limbic_Region: and whether coercion are implemented to raise warnings. | ||
Limbic_Region | and if error, would the answer change if it was foo('42answer'); | ||
ok - well, according to Luke in that thread - it is supposed to squawk | |||
autrijus | Limbic_Region: in hackathon lwall ruled that coercion will happen regardless, but '42' and 'Inf' won't raise warnings | ||
while '42answer' will | |||
Limbic_Region | ahhh | ||
wolverian | yay. that's sane. | 19:18 | |
autrijus | and those warnings can be made fatal. | ||
and you can additionally make all such coercion fatal. | |||
Limbic_Region | hackathon trumps that thread | ||
autrijus | so '42' will also croak | ||
but that's not by default. | |||
yes. | |||
wolverian: yeah, very sane and easy to implement also. | |||
wolverian | so, uh. if we have method int to define coercion into int, why do we have coerce:<as> at all? | ||
autrijus | (I should know because I pushed for the most implementable solution) | ||
wolverian | or is A12 just behind the times? | ||
autrijus | wolverian: because you still say | ||
('asd' as Int) | |||
Limbic_Region | I still want to be able to have coercion be fatal or raise warnings if I have 1 or more pragmas enabled | ||
autrijus | that form must be legal | 19:19 | |
now it may call int() behind the scene | |||
or other way around | |||
the important thing is just the user needs to have access to both. | |||
wolverian | hm. right. so A12 is just unclear here, not strictly wrong | ||
autrijus | wolverian: the "IntDuck" above gives out coerce:<as> to anything that definds .int | ||
Limbic_Region: right, you _will_ get those. | |||
I want those for the perl6 compiler written in perl6. | |||
wolverian | has there been discussion about renaming grep and/or map? I seem to remember something like that on p6l | 19:20 | |
just wondering if I should bring it up (again) | |||
autrijus | I don't think I see those confirmed | 19:21 | |
I think map is fine | |||
Limbic_Region | I (incorrectly) thought originally, there would be 3 form of declarations for each type - int = looks like an int but will gladly autoconvert, Int = int and will autoconvert but will forget it ever happened (no caching of conversion), INT - int and if you try and use it as any other type I will die | ||
wolverian | right. I don't like grep. | ||
autrijus | Limbic_Region: the INT form is archaic. | ||
and obsolete | |||
int is unboxed (i.e. not an object, but will autobox) | |||
Int is boxed (an object, can have other traits) | |||
wolverian | although even .map could be renamed to .filter or so. | ||
autrijus | that's all | ||
wolverian | I don't know if it'd be clearer though. | 19:22 | |
autrijus | wolverian: .map is not .filter. | ||
.grep is maybe .filter | |||
but not .map. | |||
wolverian | .grep is more like .collect | ||
I think. | |||
autrijus | but in haskell, filter means grep | ||
I think python too | |||
wolverian | right. okay, map isn't filter then. :) | ||
autrijus | to have filter mean map will be weird. | ||
now .for_each is fine ;) | |||
or even .each | |||
wolverian | isn't that taken already? | 19:23 | |
autrijus | eh? | ||
wolverian | oh, I was thinking of hashes | ||
autrijus | by ruby maybe | ||
wolverian | which makes me wonder if we have grep/map for hashes? | ||
%foo.map(-> $k, $v { ... }) | |||
I guess it'd be %foo.=kv.map(...)? | 19:24 | ||
does that chaining work? :) | |||
autrijus | yeah. | ||
sure does. | |||
wolverian | yay! | ||
btw - I don't like 'filter' because it's a noun as well as a verb | |||
'collect' is a verb | 19:25 | ||
but I don't know if that's much of a design rule in perl6. hm. | |||
eric256 | lol. i take a couple days off from pugscode.org to go buy a house and once agian there are like 8 posts to read. lol. the whole week before that only saw like 2 posts...guess i just have good timeing ;) | 19:34 | |
wolverian | 8 isn't much at all. there have been 40 new messages in a few hours on p6l at times. | 19:37 | |
eric256 | very true. | ||
but this are pretty big ones ;) | |||
renormalist | Hi all! Does anybody know whether there is already a (maybe preliminary) perl6-mode for (X)Emacs? | 19:54 | |
Limbic_Region | I know there is for vim | 19:55 | |
gaal_ | there's a vim mode in util/perl6.vim | ||
but i don't know of one for emacs | |||
svnbot6 | r6147 | iblech++ | * Usual svn props. | ||
r6147 | iblech++ | * PIL2JS: Continuation Passing Style landed. | |||
r6147 | iblech++ | * General idea: foo(3); bar(baz()) is rewritten as | |||
r6147 | iblech++ | foo(3, -> () { baz(-> $arg0 { bar($arg0, {}) }) }). | |||
r6147 | iblech++ | * Note: Most things (even &say) do not work yet again, will need work on the | |||
r6147 | iblech++ | JS parts of Prelude::JS. PIL2JS.js is already converted to CPS. | |||
r6147 | iblech++ | * return(...) respects scope now. | |||
r6147 | iblech++ | * But &next, &last, etc. do not work yet again. | |||
Limbic_Region | autrijus - sorry, had to step afk | ||
ingy___ | hola | ||
Limbic_Region | the incorrect memory is just that - incorrect | 19:56 | |
OTOH, it would be nice to say int, Int, and INT each with different behaviors | |||
renormalist | k | 19:57 | |
svnbot6 | r6148 | iblech++ | PIL2JS: | 20:02 | |
r6148 | iblech++ | * PIL: Removed dead code (&PIL::generic_catch). | |||
r6148 | iblech++ | * Prelude::JS: Fixed some "calls" to &JS::inline so the resulting JS parses again. | |||
autrijus | Limbic_Region: then I can't name my class C3 | 20:04 | |
stevan will be unhappy | |||
and think about those chinese class names with no upper case forms! | 20:05 | ||
:) | |||
Limbic_Region | err - I am not overly particular about the naming convention | 20:06 | |
autrijus | iblech: whoa, CPS landed. | ||
iblech: did you see my extra-sane coerce? | |||
role Coerce[::to] { | |||
method coerce (--> ::to) { ... } | |||
} | |||
multi *coerce:<as> (( | |||
Coerceable[T] $from | |||
Limbic_Region | I just mean the ability to tell the compiler I mean int and if I ever use it as something other than that - hit me hard | ||
autrijus | : Type ::T | ||
) --> T) { $from.coerce } | |||
iblech | autrijus: Yep, but absolutely nothing works, fixing :) | ||
Indeed, very sane | 20:07 | ||
Limbic_Region | or, I mostly intend to use this as an int, but please forgive me if I don't - I understand I will pay a performance penalty when you have to bail me out - and that is ok | ||
autrijus | Limbic_Region: right, in both cases you use int | ||
and choose the strictness level of coercion. | |||
Limbic_Region | and finally a mode to say - I don't know what I want or how I will use it so please bail me out and remember what you did so you can be faster about it next time | ||
autrijus | since int->Int is considered coercion. | ||
or maybe we call it boxing | 20:08 | ||
use strict 'boxing' | |||
Limbic_Region | autrijus - is the strictness level of coercion done on a per-variable declaration basis? | ||
autrijus | Limbic_Region: no, it's based on scope | ||
Limbic_Region | cause if not - I don't llike it | ||
autrijus | nod. | ||
Limbic_Region | so it is still all or none, but only for a given scope | ||
*shrug* | 20:09 | ||
autrijus | you are certainly free to declare | ||
Limbic_Region doesn't really have to like it | |||
autrijus | my int_rigid $x; | ||
and implement int_ridig.pm by augmenting the int class | |||
but disable its coercion bits. | |||
which is not unlike Tie::VariousRestrictedThings in perl5. | 20:10 | ||
except much faster. | |||
Limbic_Region | well - the only point in doing that is if it made things go faster - which is yet to be seen in p6 | ||
right | |||
autrijus | right, and if you use int then things will be faster whenever it can. | ||
and even if you use Int | |||
but without extra traits | |||
Limbic_Region | in p5 changing behavior outside of core meant performance penalties | ||
autrijus | it is possible to automagically unbox it too. | 20:11 | |
right, and in p6 the penalty is only paid in compile time. | |||
Limbic_Region | in p6 - time will tell | ||
autrijus | which hopefully isn't much. | ||
yeah, time will tell :) | |||
Limbic_Region | you are more confident then I am on that | ||
autrijus | sure, because I'm the one writing the type directed compiler :) | ||
Limbic_Region | well - it isn't just types though | 20:12 | |
in this case it is | |||
but in general, people who want to modify the behavior of how p5 works pay a penalty in performance | |||
in general, p6 aims to allow morphing behavior AND still be fast | |||
that's the part, IMO, that remains to be seen | 20:13 | ||
autrijus | sure, but currently | 20:14 | |
user-def operators, macros, itypes etc | |||
are all compile time features | |||
the runtime knows nothing about it | |||
so it's hard to imagine it will make runtime slow. | |||
journal finally up. | 20:19 | ||
g'nite! | |||
Limbic_Region | autrijus - well, I am not trying to be a pessimist here | ||
autrijus waves & | |||
Limbic_Region | TTFN | ||
but | |||
autrijus | hm? | ||
Limbic_Region | history has shown that things shoehorned in after the fact lead to original designs being comprimised | 20:20 | |
autrijus | right. | ||
so, Better is Better, this time. | |||
& | |||
Limbic_Region stands behind his "time will tell" philosophy | |||
stevan is actually enjoying responding to TSa, the man asks good questions :) | 20:57 | ||
kolibrie | stevan: you've been giving good answers | 20:59 | |
stevan | kolibrie: thanks :) | 21:00 | |
this is my sanity break for the day, I have been on conf calls all day long for $work | |||
metamodel stuff is a breath of fresh air :) | |||
kolibrie | I'm still trying to understand the whole thing | ||
I've got a paper with lots of notes that I want to digitize somehow | 21:01 | ||
and then ask you questions | |||
stevan | kolibrie: it took me about 2 months and about 5-10 prototypes (all false starts) to get it | ||
kolibrie | :0 | ||
I don't feel too bad, I've only been looking at it for a week or two | |||
stevan | but I didn't have "The Art of MOP" book either, which has been a big help | 21:02 | |
kolibrie | don't have time for another book right now :( | ||
later all | 21:06 | ||
stevan | later | ||
fglock | hi | 21:10 | |
eric256 | hola | ||
fglock | hola eric256 | 21:11 | |
eric256 tries to figure out the best way to see any new featuers in pugs that he will notice | 21:12 | ||
ingy___ | hola | ||
eric256 | seems like allot of thoeritcal work has been done. gonna have to check the svn log to see if any concrete everyday, things i'm going to notice, things have been done ;) | ||
ingy___ | has anyone here installed spidermonkey on osx? | ||
obra | hey ingy | 21:13 | |
ingy___ | hi obramatic | ||
obra | how's stl? | ||
ingy___ | just fine :) | ||
fglock | eric256: i've worked on Array-Lazy, but it is not integrated into pugs - it's just a module now | ||
eric256 | hmmm lazy arrays...anything with objects been happing on the codeing level? i know alot has been brewing | 21:14 | |
fglock | I think i've got to rename a few modules, like Array::Lazy to Perl6::Container::Array | ||
eric256: it's already implemented, but integrating into the core is hard | 21:15 | ||
eric256 | implemented in pugs? | 21:16 | |
fglock | yes, but it is just an object - you can't use "@lazy[2]" yet - only $lazy.FETCH(2) | 21:17 | |
eric256 | i think we are talking about different things. i mean the object model stuff not the Lazy stuff | 21:18 | |
though i want to look into the lazy stuff too | |||
fglock | the object model is the priority right now - but i'm interested in the lazy stuff | 21:19 | |
so I started working on it | 21:20 | ||
eric256 | i noticed ;) | ||
fglock | :) | ||
anyone knows how the file hierarchy in pugs works? i'm trying to find out where to place a file | 21:22 | ||
how do I call a sub in the main namespace, like CORE:: in Perl5? | 21:36 | ||
integral | &*global? if by "main" you mean globals | 21:37 | |
obra | fglock: is the current DateTime::Span on CPAN expected to pass all its tests? | ||
fglock | no - it depends on DateTime, which is not finished yet :( | 21:38 | |
oops - I thought you asked about perl6 version - yes, the CPAN version should pass | 21:39 | ||
obra | I ran into a circular dependency issue where installing DateTime tried to pull in DateTime::Span. which failed tests :/ | ||
ahh. ok. | |||
I'm seeing failures in 0.22 | |||
t/15time_zone.t 5 1280 14 5 35.71% 7 10 12-14 | |||
fglock | DateTime should not depend on DateTime::Span - strange | ||
obra | I bet it was some other module in a dependency chain. | 21:40 | |
What can I do to help debug those failures? | |||
fglock | i'm looking into it, just a moment | ||
obra | cool. | ||
I don't mean to derail you from what you're working on, but I saw your nick right as I saw the failures ;) | 21:41 | ||
fglock | which t/time_zone.t? does it have a number on the name? | ||
obra | t/15time_zone.t 5 1280 14 5 35.71% 7 10 12-14 | 21:43 | |
15 | |||
fglock | testing... | 21:45 | |
obra - it passed all tests with my old DateTime.pm installation. It broke when I updated it. I'll check what's happening. | 21:49 | ||
obra | Ok. cool. I'm glad to hear that it's replicatable | ||
svnbot6 | r6149 | iblech++ | PIL2JS: | 21:53 | |
r6149 | iblech++ | * pil2js.pl: Load stevan++'s new Perl6.MultiMethod. | |||
r6149 | iblech++ | * More steps towards a working PIL2JS. | |||
fglock | obra - It looks like the error is in the test itself - i think it depends on a timezone that has changed | 21:55 | |
obra | *laugh* oy. | 21:56 | |
fglock | and I can't login to sourceforge to fix it - it can't connect | 21:57 | |
it's in my list for tomorrow | 21:58 | ||
21:58
wilx` is now known as wilx
|
|||
obra | thanks much. | 21:59 | |
If we're ever in the same place, I owe you a beer or equivalent. As much for the craziness that was reefknot as this | |||
fglock | you were in reefknot? | 22:00 | |
i guess i find craziness atractive | 22:01 | ||
obra | fglock: I came in relatively late. I spent time with srl working to untangle a lot of the code so mortals could hack on it. | 22:02 | |
fglock | i tried to call global::push, but it didn't work - is there another syntax? | ||
obra: it would be nice to have the calendar server working - a lot of people have asked for one | 22:03 | ||
obra | fglock: it sure would. | ||
Right now, there are a lot of opensource efforts to create calendar servers. | |||
Sadly, there are also like six new calendar protocols out there | |||
fglock | (people complain a lot about Set::Infinite code - the perl6 version is much more readable) | 22:04 | |
obra | fglock: yeah. autrijus was showing me today. | ||
Set::Infinite is deep magic for perl 5 | |||
and part of the problem I ran into at the time was trying to do infinite recurrences stored in the database and fast | 22:05 | ||
fglock | i was able to store recurrences in the database - but it was very slow | ||
obra | *nod* | ||
fglock | it can't optimize the queries - they get exponentially slow | 22:06 | |
obra | yep. | ||
doing infinite set algebra in perl/sql is...well, I haven't seen it done. | |||
fglock | take a look at ext/Recurrence - it is pretty short for what it does | 22:07 | |
i think it is doable in perl/sql - i was trying to do it in pure sql :) | 22:08 | ||
obra | heh | 22:09 | |
doing it fast in perl/sql? | |||
fglock | the problem i got with sql is that it can't do binary searches inside a select, and this means that if i had hour,minutes,seconds it would take 24*60*60 operations | 22:10 | |
obra | I keep finding that I'm happier storing epoch time in the database | 22:11 | |
fglock | the problem with perl/sql is that it would take cpu time on the database server - people don't want that | 22:12 | |
(i think) | |||
mugwump | I use the native date format, but never rely on server-side date calc | ||
fglock | i'm still trying to find out what's the namespace for 'push()' | 22:14 | |
brentdax | I'm actually storing Perl 6's time() format in Kontent store databases--it's fairly handy. | 22:16 | |
buu | brentdax: What is a 'kontent store database' ? | ||
brentdax | (But then, I'm also avoiding complicated queries.) | ||
obra | perl6 time is still seconds since y2k? | ||
brentdax | Floating-point seconds since Y2K, yes. | 22:17 | |
buu: Kontent is the Perl 6-based CMS I'm writing for Summer of Code. A store database is where it keeps its pages. | |||
buu | brentdax: Oh. Is it any good? | ||
brentdax | Too slow to be usable, but it just needs a faster interpreter. Once it's fast enough, I think it'll be pretty nice. | 22:18 | |
buu | What are the advantages? | 22:19 | |
eric256 | your getting paid to play with Perl6? man i missed that boat | 22:21 | |
hay perl6 time and perl5 time arn't going to play togther? | |||
obra | eric256: I'm sure there will be magic to make them deal well. and enough rope to hurt yourself too | ||
brentdax | It intrinsically supports multiple page types, so you can keep (say) a wiki and a message board on the same system. It can render the same page into multiple formats. Supports multiple stores (I'm writing a DBI one) and multiple web server APIs (writing a CGI one). And it's cleaner than comparable systems, like Everything and MediaWiki. | 22:22 | |
Khisanth | obra: well Perl wouldn't be Perl if it didn't give you just enough rope to hang yourself :) | ||
obra | brentdax: how does it compare to bric? | 22:23 | |
brentdax | Somewhat different emphasis--Kontent is largely intended for open-contribution sites (wikis, message boards, Slash/Scoop news sites, PerlMonks-ish sites), where it looks like Bricolage is mainly for a restricted group of admins. I think either could do anything the other can with some work, though. | 22:28 | |
svnbot6 | r6150 | fglock++ | * Renamed Lazy::List to Perl6::Value::List | 22:29 | |
r6150 | fglock++ | * Renamed Array::Lazy to Perl6::Container::Array | |||
brentdax | I'm not sure if Bric creates static pages, but Kontent doesn't--it's all dynamic. (And no doubt I'll need to add in lots of caching.) | 22:30 | |
(Yeah, Bric creates static HTML.) | 22:31 | ||
svnbot6 | r6151 | iblech++ | PIL2JS: | 22:32 | |
r6151 | iblech++ | * PIL2JS.js, Prelude::JS{,::*}: Fixed hopefully all subs to call the cc. | |||
r6151 | iblech++ | * Good news: "say "hi"" runs again! | |||
r6151 | iblech++ | * Bad news: It produces garbled output. Fixing. | |||
buu | brentdax: So will you have to create your site in side your framework, or will it be just a couple of site types? | 22:33 | |
brentdax | It pretty much assumes you're keeping your entire site in it. | 22:34 | |
buu | brentdax: For example, how would you set up an Everything type system? | 22:35 | |
brentdax | After installing the system (for the CGI supervisor, this involves saying "Alias / /path/to/supervisor/cgi.p6"), you would arrange for new pages to have the Kompose (owned page) class, probably by creating a /pages page with that class and having all of your pages under that. You would then grant the create permission on /users and /pages to everybody, customize a few settings like the... | 22:41 | |
...template and site name, and let 'em rip. | |||
svnbot6 | r6152 | fglock++ | * Array::Lazy TODO update | ||
renormalist | stupid question (my first experiments with p6regex): Is =~ still the matching operator? | 22:44 | |
brentdax | Nope, ~~ now. | ||
renormalist | k, moment | ||
ah, ok. ~~ works | 22:45 | ||
(of course ) | 22:46 | ||
eric256 | is there a site for Kontent / | ||
? | |||
brentdax | Not yet--just the 0.01 distribution on CPAN and the Subversion repository on my server. | 22:47 | |
iblech | [PIL2JS] Yay, say "hi" works again :)) | ||
eric256 | is it still mostly production? because i've been looking for something like that for our work portal, and i'll either have to get to work rewriting mine (written when i was too green to even salvage now) or find a goood one to use ;) | 22:48 | |
brentdax | It's nowhere near production quality--the current SVN version even has a known remote-code-execution bug (which won't be closed until I implement users and security.) | 22:49 | |
And it's horribly slow because Pugs is unoptimized. | |||
eric256 | hehe.../me heads off to start his own design then. ;) | ||
mine would need less bells and whistles anyway. | 22:50 | ||
brentdax | Probably. This thing has quite a few, including its own wikiish markup language. | ||
svnbot6 | r6153 | iblech++ | PIL2JS: Made say "hi" work again (and probably most other things, too). | 23:03 | |
r6153 | iblech++ | *Problem*: PIL2JS runs into "too much recursion" errors *really fast*, as | |||
r6153 | iblech++ | PIL2JS never JS-return()s from a function, but instead simply calls the escape | |||
r6153 | iblech++ | continuation. I.e. JS thinks we're still in 1000 functions and dies... | |||
chip | Has Larry posted about sets yet? | 23:10 | |
iblech | No | 23:16 | |
renormalist | Question about p6regexes/rules: Should "subpatterns" in Pugs already work? I don't get stuff like <$subrule> to work but I'm not sure whether they already should. | 23:24 | |
I try sth. like this: | 23:25 | ||
# - Variant 1 -------------------------------------------------- | |||
my $PROGRAM = rx{^ \s* START \s* (affe|loewe|giraffe) \s* \. $}; | |||
# - Variant 2 -------------------------------------------------- | |||
#my $KEYWORD = rx{(affe|loewe|giraffe)}; | |||
#my $PROGRAM = rx{^ \s* START \s* <$keyword> \s* \. $}; | |||
# -------------------------------------------------------------- | |||
# - match ------------------------------------------------------ | |||
my $str = 'START loewe .'; | |||
say "ok" if $str ~~ $PROGRAM; | |||
variant1 works, variant 2 not. | 23:26 | ||
brentdax | I don't think they do, but even if they did, they'd be case-sensitive. | 23:28 | |
renormalist | ah, damn | ||
hm, ok, but wasn't the bug | |||
Khisanth | hmm | 23:51 |