The Return of the Journal : pugs.blogs.com/ | pugscode.org | pugs.kwiki.org | paste: paste.lisp.org/new/perl6 or sial.org/pbot/perl6 Set by GammaRay on 31 December 2005. |
|||
00:13
putter joined
|
|||
putter | ping? anyone about? | 00:13 | |
00:14
cdpruden joined
|
|||
scrottie raises an eyebrow | 00:15 | ||
putter | :) If we define both multi f(Num $n){$n+1} and multi f(Num $n){$n+2} in the same file, f(10) will call the first one defined. But if they are defined in separate files and use()ed, the same one gets picked regardless of use() order. I'd very much like a way to get the order-dependence with separate files. Thoughts? | 00:20 | |
rent | is now known as _brentp | 00:21 | |
putter | Basically, between S29, PIL2JS, PILn etal, Prelude.pm, Prim.hs, and some PILRun, we have most of the pieces to create a unified p6 defined mostly in p6, with backend specific bits. | 00:23 | |
But to pull it together, one needs to be able to override multis. | |||
scrottie | Subclass? | ||
Interesting. I should have you tell me about S29, PIL2JS, PILn etal, Preclude.pm, Prim.hs, and PILRun. | 00:24 | ||
putter | good thought, but since the objective is to make, say, Array::splice be something specific, the best we could do with subclasses is to have an "upside-down" tree of implementation choices above Array, and then use a single point macro switch to choose between say ArrayOnJS and ArrayOnHs. | 00:26 | |
scrottie | I haven't been following Pugs. Guess I should go back and read the blog, so "RTFM" is a valid reply. Granting that, what's PILRun? | 00:28 | |
putter | or even just JS.pm: macro Array () { "ArrayOnJS" } . hmm... there's something to be said for that... but one really wants selective import with renaming... | ||
scrottie | I personally like to live by the rule that if two things should be interchangable, they should present the same interface and inherit from the same abstract root class. | 00:30 | |
If you can take shortcuts to achieve that, great. Otherwise, do it the long way. What might start as a lot of reptition gives flexibility in the future as the implemenations diverge. | 00:31 | ||
putter | S29 is docs/AES/S29draft.pod which has signatures and some code. PIL2JS is the JavaScript backend, which has perl5/PIL2JS/lib6/Prelude/JS/ , PILn is src/PIL/Native/Bootstrap/ and some of the other stuff stevan and audreyt have been doing, PILRun is the currently inactive P5 backend, for which | 00:34 | |
I have some p6 code which got posted and discussed, but I don't think ever got checked in. | |||
scrottie nods | 00:36 | ||
thank you. intersting. | |||
putter | You know, a class/role-based system might just work. On say the JS backend, Foo is FooOnJS (eg, Array is ArrayOnJS). ArrayOnJS is ArrayGeneric, ArrayJSMods; With roles, the role body would need a bunch of method stubs pointing to Mods, as roles are less tolerant of conflicts than classes. But that should be fine... | 00:42 | |
The rationale for ArrayOnJS, rather than simply calling it Array on the JS backend, is... hmm... the thought was it would be more easy to do mutant implementations, eg, JS backend prime, Array is ArrayOnJSprime; ArrayOnJSprime is ArrayOnJS { prime mods... }. This argument is weakened by having a good mop, but... | 00:46 | ||
00:50
cdpruden joined
|
|||
putter | But no, one would just want a set of rules, sucked in to classes. Unfortunately, to have use a role with method m_variant1 and m_variant2, and the class says multi m() { m_variant2() }, you would also need a companion "blocker" role, with stubs for m_variant1/2, for the sole purpose of | 00:50 | |
creating a conflict so m_variant1/2 are _not_ inherited into the class. I don't think we currently have a mechanism of otherwise blocking inheritance. Do able, but a bit ugly. | 00:51 | ||
00:52
daja77_ joined
|
|||
scrottie | It's fine to create subclasses that implement operations as a no-op. It doesn't hold up to OO modeling to willy nilly add or remove methods (unless you get the P6/SmallTalk behavior of black-holing unknown methods without raising an error). | 00:53 | |
putter | And it doesnt work so well when you want to touch multiple classes with a single decision. Eg, role do_things_way_1 { class A { m_variant1 } class B { m_variant1 } } It would be *really* nice to have a set algebra over methods, but we currently dont... | 00:54 | |
scrottie | Planning implementation is NP-complete. Do it badly then improve the implementation steadily. Refactor. Get to work. | 00:58 | |
putter | re no-op, the challenge is one wants to select and merge sets of methods across multiple classes. currently it seems one can't do that (?). if overriding stayed order dependent in use(), then packages/modules could be used as the "sets". The algebra would be a bit weak, but I think we could live with | 00:59 | |
01:00
scook0 joined
|
|||
putter | that, at least for now. Oh, not so weak if use() permitted selective import(). | 01:01 | |
so use ArrayGeneric; use ArrayOnJS :limited-memory-version; use ArrayRandomTweaks; | 01:02 | ||
each one overriding some of the methods defined by the previous. | |||
oh, better use ContainersGeneric; use ContainersOnJS :limited-memory; use ContainerTweaks13; | 01:04 | ||
scrottie | Eh? Select and merge sets of methods? That's an inheritance tree. If you have two JavaScript backends, put the common logic in one class, then subclass it twice, each subclass containing the specifics of the particular JavaScript backend. | ||
putter | while one might manage the Array version with subclassing, the container version would seem to require mondo hoop jumpage. | ||
scrottie | putter: here's a really good book you might enjoy: _Object Oriented Design Heuristics_ | 01:05 | |
stevan | putter: I am having trouble following what you mean | ||
do you want to have a p6 Array, which can have multiple "backends"? | 01:06 | ||
one for JS, for p5, etc etc etc | |||
putter peers blearily at the screen, trying to marshal thoughts... brain.yaml |> grep... | |||
stevan | Array should be a role | ||
which will define the implementation as completely as possible | |||
if need be in a circular way | |||
then the runtime will implement the ^Array class and install it into the global scope/package | 01:07 | ||
but 9/10th off what is Array can be defined in the Array role | |||
every runtime will end up having a slightly tweaked version of the post Metamodel bootstrap | 01:08 | ||
to address each models particular issues/concerns | |||
however, we /might/ be able to put all this into PIL^N, in which case this is all a moot point since the runtime will only need to implement PIL^N and everything else Just Works | 01:09 | ||
thats the whole point behind using the DSL, is that it increases portability by decreasing the amount of duplicated code needed | |||
putter | ok. so role rArray does rArrayGeneric, rArrayOnJS, rArrayTweaks {}; rArrayGeneric defines most everything, so most everything in the other roles generate conflicts, which have to be explicity resolved in rArray. I suppose a macro could help. So... | 01:10 | |
stevan | this was the leason learned from yours and flgocks effort with PILRun and iblech's PILJS | ||
no | 01:11 | ||
putter: role Array {} | |||
it does nothing | |||
(maybe List, but I am not sure) | |||
putter | re piln, hmm... | ||
01:11
oylenshpeegul joined
|
|||
stevan | in the JS runtime, the missing bits of the Array role are implemented in the Array class itself | 01:11 | |
theorbtwo | DSL? | 01:12 | |
stevan | but again, ideally this all lives in PIL^N and JS runtime need never know about it cause the JS implements PIL^N | ||
theorbtwo | We need a dictionary, or a bot. | ||
stevan | Domain Specific Language :) | ||
putter: my guess is that Array can be completely defined in PIL^N | 01:13 | ||
maybe not as efficiently as we would like | |||
putter | re "does nothing", huh? role rAx { multi pop{...defined assuming splice...} multi splice {...defined assuming pop...}, role rAJS { multi splice {...defined using inline_js...} }. How do rArray and Array get defined? | 01:14 | |
stevan | but then the next step would be to move the implementation down to the PIL^N runtime | ||
putter: in the bootstrap | |||
lets take a simpler example | |||
role Eq { method infix:<==> (Eq $left, Eq $right) { !($left != $right) } method infix:<!=> (Eq $left, Eq $right) { !($left == $right) } } | 01:16 | ||
so == is obviously the inverse of != and vice versa | |||
putter | I don't by "Array can be completely defined in PIL^N". I'm using Array as a strawman proxy for the entire Prelude. So that sentence becomes "the entire Prelude could be completely defined in PIL'N". so... yes, but that would be nuts. ;) | ||
stevan | this is a complete role, albeit one you should never "just use" since it will loop infinitly | ||
putter: why can't Array be done in PIL^N? have you looked at the code ? | 01:17 | ||
it is about 60-70% complete, although it currently is waiting on some p6l information | |||
putter: my point is that with a circular prelude, you need only fill in the peices needed to prevent the infinite meta-circular spiral of death | 01:18 | ||
putter | yes, but take a look at perl5/PIL2JS/lib6/Prelude/JS/Array.pm... do you really want to write all of that by hand in PIL'N? | ||
stevan | putter: have you looked at the PIL^N version of Arrary? | 01:19 | |
putter | yes | ||
err, src/PIL/Native/Bootstrap/Container/Array.pil, yes? | |||
stevan | yes | ||
ok, so a good portion of Array is implemented, but not all | 01:20 | ||
putter wonders if we are having a "violent agreement" | |||
stevan | so in the Perl 6 prelude, you do this: | ||
^Array.meta.add_method('missing-method', method { ... }); | |||
and fill in the parts we are missing | |||
putter: we may be,... however we are speaking different languages/dialects so hard to tell :) | 01:21 | ||
putter | I agree the objective is a "circular prelude", though that term doesnt quite capture it. The question is how to manage the mixin-ing. If method overriding under use() was order sensitive, I'd be all set, and already writing it, sucking bits in from the previously mentioned sources. It wouldnt be ideal, but it would be fine for now. | 01:22 | |
stevan | putter: thinks less of multis, and more about classes/roles | 01:23 | |
putter | But it isnt order sensitive, so I dont know how to cleanly manage the assembly of conflicting sets of bits into a Prelude-de-jure. | ||
theorbtwo | ...by making it order-sensitive? | 01:24 | |
putter | :) yeah... | ||
stevan | putter: the old prelude was a collection of multi subs, which would have this problem | ||
it you move many of those "built-ins" into classes and roles, the problem becomes much smaller if not elimnated entierly | |||
putter: also understand that with the MOP, we don't have to "finish" the class, it is not a one-shot-all-or-nothing thing | 01:26 | ||
putter | how eliminated? conflicts in roles have to be explicitly resolved. thus the "role rAx { multi pop{...defined assuming splice...} multi splice {...defined assuming pop...}, role rAJS { multi splice {...defined using inline_js...} }." example. Perhaps I dont understand your response of "no does, instead done by bootstrap" | ||
stevan | it can be built incrementally | ||
where is this rAJS coming from? | 01:27 | ||
putter | They are both part of the great P6 on everything common code base. | ||
stevan | there should be no AJS, it should be either written in PIL^N or Perl6 | 01:28 | |
the JS runtime will just run the compiled PIL^N | |||
Perl6 compiles to PIL2, then PIL2 is compiled to PIL^N, then PIL^N is run on the VM | 01:29 | ||
(or possibly PIL^N is compiled to PIR and run on Parrot) | |||
of if someone writes the equivelent of all the PIL^N code in PIR, then PIL2 can be compiled to PIR directly | 01:30 | ||
role Array { method pop { ... slice ... } method slice { ... pop ... }} can be defined in PIL^N | |||
or Perl 6 | 01:31 | ||
then create the Array class in PIL^N, and then tie the knot (implement pop or slice) | |||
putter | the "only p6 or piln", ok, I don't currently buy that, so let me figure out why... | ||
stevan writes a larger example,.. it is hard to communicate these ideas over IRC | 01:32 | ||
putter | basically you're saying the p6 would should be allowed to talk directly to the backend. anything they might ever want to talk about should be pushed into piln. That seems a recipe for a bloated piln... and unlikely to work. no? | 01:35 | |
s//not be allowed/ | |||
stevan | putter: why does that bloat PILN? | 01:36 | |
theorbtwo | The idea is that PIL^N is an unbloating filter. P6 is a big scary langauage. PIL^N should be a small simple language, easy to write an interpreter for or a compiler from. | 01:38 | |
stevan | theorbtwo: exactly | ||
theorbtwo | Now, from the sample of pil^n I've seen I rather wonder if that's the case, but that's another question. | ||
putter | How about this... on backend 1, you want to use technique 1, on backend 2, tech 2. say preextending arrays is essential on 1, but contraindicated on 2. how do you deal? | 01:40 | |
no inline_foo vs piln issue. but you want above-piln p6 algo 1 on backend 1, and 2 on 2. | 01:41 | ||
stevan | putter: I dont understand | ||
this is a problem for the PIL^N interpreter | 01:42 | ||
pasteling | "stevan" at 67.186.136.119 pasted "PIL^N & Perl 6" (30 lines, 814B) at sial.org/pbot/15402 | ||
putter | one possible argument is 1-that's very unlikely, so 2-use mop if/when it comes up. | ||
stevan | putter please look at this paste | ||
putter | looking... | 01:43 | |
stevan | the role defintion is circular since &wave_hands uses pop :) | ||
the Array class then does the role Array | |||
and defines the bit to break the cycle | |||
it defines it using the PIL^N method `splice() | 01:44 | ||
cycle broken | |||
if it is faster in your PIL^N runtime to implement `pop than `splice | |||
then do that and break the cycle there | |||
then in Perl 6, we can add other methods as we like | |||
make sense? | 01:45 | ||
putter | can one do if $variant == 1 { ...add_method... } else { ...add_method... } ? | ||
stevan | why? | ||
in which language? | |||
putter | the language of your paste | ||
stevan | there are two languages there,.. PIL^N and Perl 6 | 01:46 | |
putter | either | ||
stevan | why? | ||
where is the win? | |||
putter | lol | ||
stevan | what defines $variant | ||
I understand the idea of a better algo in runtimeA so better to implement &pop there,.. | 01:47 | ||
but why should that be in the same file for runtimeB where it is faster to implement &splice | |||
01:47
jroc joined
|
|||
stevan | each runtime might need a runtime specific bootstrap file | 01:48 | |
which does this kind of stuff | |||
01:48
luqui joined
|
|||
stevan | but it makes no sense to mix that all in one,.. you will very quickly get a lot of spaghetti | 01:48 | |
putter | hmm... maybe this is the conceptual divergence: if everything was a simple cycle, and one just needed to define a little tidbit to break the cycle, then things would be simple. if the "simple cycle" model is too simple, and one really needs more general mixins, then... one needs richer control over how methods get defined. | ||
stevan | putter: everything in that paste can be spread out over multiple files if you want | ||
luqui | paste? | 01:49 | |
stevan | sial.org/pbot/paste | ||
putter | is there a .replace_method to go with the .add_method? | ||
luqui | no, I mean the one you are talking about | ||
putter | or .remove_method? | ||
stevan | putter: no, just add_method again | ||
yes | |||
remove_method exists | 01:50 | ||
luqui: sorry sial.org/pbot/15402 | |||
putter | ok, that will do it. | ||
stevan | luqui: we are discussing the circular prelude idea | ||
putter: is that all you needed :) | |||
luqui | ahh... | ||
putter | wish there was a way to just write it in p6 multi f(Num $x) :replace { $x + 13 }. but maybe the mop cruft can be macro'ed away. | 01:51 | |
stevan | luqui: note that wave_hands uses pop,.. so it is cicular,.. I should have put that in the paste | ||
luqui | okay | ||
stevan | putter: the multi approach gets really messy after a while | ||
better to organize into classes and roles first,..anda bare multis as a last resort | 01:52 | ||
luqui | Haskell does this with typeclasses | ||
theorbtwo | I'm worried by how complex pil^n seems to be. | ||
luqui | many times the methods in the class are defined in terms of each other | ||
stevan | luqui: exactly,.. | ||
luqui | I've been caught off guard by that sometimes; it would be nice if it would tell me that there's still a circular definition | ||
stevan | theorbtwo: why do you think PILN is complex? | ||
luqui: yes, that can be tricky I think | |||
luqui | it's undecidable in general :-( | 01:53 | |
you'd have to have some way to declare it | |||
theorbtwo | svn.openfoundry.org/pugs/src/PIL/Na.../Array.pil does not make it look like a terribly simple language. | 01:54 | |
I was expecting something closer to an assembley language. | |||
luqui | theorbtwo, it's very close to lambda calculus, not assembly | ||
putter | so basically what using the mop buys you is that when you use() two files, the expressions in the first file are run before the second, whereas the multi definitions in the second (or the first) may preempt the other, independently of use() order. | ||
what a zoo. | 01:55 | ||
stevan | theorbtwo: it is a very simple language,. thats why things look so complex :) | ||
putter: there is no need to bring use() into this | 01:56 | ||
it is not relevant in this case | |||
the MOP has nothing to do with the order of files loaded either | |||
theorbtwo | stevan: How do you put together the generic prelude with the specific bits for your runtime, then? | ||
stevan | theorbtwo: right now we have #include in PIL^N, its nothing fancy, but it works | 01:57 | |
putter: you need to get away from the multi defintion thing I think | |||
putter | the concrete motivation for this discussion is that a good task for this evening is to pour PIL2JS's and S29's and Prelude.pm, and other's p6 "Prelude" code into one big pile, grouped by pure-p6, p6-on-js-specific, etc. further partitioned by say different strategies for structuring the pure-p6. | 01:58 | |
and then use magic mixin method foo to pull backends, or at least their preludes, out of it. | |||
stevan | putter: the old PIL runtimes were hampered by the old PIL design, I saw you frustrated by it many times | 01:59 | |
I think some of that code is useful, but I am not sure all of it will be | 02:00 | ||
luqui | putter, see my recent blog on use.perl. It is not unrelated... | ||
stevan | but you are welcome to figure this out,.. I dont want to stop you on this | ||
it will be useful i think | |||
putter | stevan points out "with piln, from the prelude's stand point, there is only one backend - the piln vm". I wonder if one will still need a way for p6 and underlying backend to chat, and more generally, whether a one-size fits all p6 prelude will actually fly. will one need per-underlying-backend prelude mods. | ||
stevan | putter: if perl 6 has a need to talk to the backend,.. the PILN/PIL2 design is broken | 02:01 | |
putter | if so, will need some mod mixin mechanism. how much it gets used in part determines how (in)convenient we can get away with it being. | ||
luqui | stevan, it will for optimization purposes at least | ||
putter resyncs with stream, backlogging... | |||
luqui | it's a good idea to allow communication between different modules | 02:02 | |
stevan | luqui: well that is the compiler problem (theoretically of course) | ||
luqui | even when they're supposed to be independent | ||
yep, theoretically | |||
stevan | remember,.. the plan is to first compile Perl 6 to PIL2 | ||
luqui | oh, before I go further, what is pil^n's role? | ||
stevan | at which point there is no more perl 6,.. only PIL2 | 02:03 | |
then PIL2 gets compiled to PIL^N, at which point there is no more PIL2, only PIL^N | |||
then the VM runs the PIL^N | |||
clean seperation | |||
luqui | ahh right | ||
stevan | ideal world,.. sure it is | ||
luqui | misunderstanding things | ||
putter | p6->pil2->piln. piln is a vm. | ||
stevan | but this is all for -Ofun | ||
luqui | what is the difference between PIL2 and PIL^n? | ||
stevan | PIL^N is the language of the VM | 02:04 | |
luqui | putter, pil^n is still a repr language | ||
you could have multiple different VMs that all run pil^n | |||
stevan | luqui: PIL2 has all the stuff Perl 6 needs that PIL^N does not provide ;) | ||
luqui | stevan, i.e. nothing | ||
pil^n is lambda calculus, which is turing complete | |||
putter | pil2 is desugared p6. the "p6" compiler proper then chews on the pil2, emitting piln. i believe. | ||
luqui | as a repr language, it suffices for anything | ||
02:05
revdiablo joined
|
|||
stevan | luqui: I really dunno,.. I havent seen PIL2 yet | 02:05 | |
luqui | putter, okay, that seems to work for me | ||
it's just another intermediate language to make things easier | |||
stevan | luqui: also PIL^N can be compiled down further | ||
putter | i wasnt around when the pil2/piln distinction came into existence, so I'm not entirely clear on motivation. one posiblity is that pil2 looks to be more flexibly tied to "what the compiler feels like dealing with today", whereas piln will get less flexible as n vm implementations get created. | 02:06 | |
stevan | putter: you need to talk to audreyt for details on PIL2 | 02:07 | |
past what I have already said that is | |||
luqui | To me it seems like: perl6 -> pil2 -> piln. pil2 is there to make the arrows simple | ||
because a perl6 -> piln transformer would be complicated | |||
stevan | PIL^N should be complete at this point | ||
luqui: exactly | 02:08 | ||
luqui | so suppose that I'm feeling crazy and hubristic and want to write a C backend to PIL^n | ||
where would I start? | |||
stevan | the Haskell source ;) | 02:09 | |
luqui | for example, where is the AST stored? | ||
stevan | luqui: what does <: mean in your use.perl post? | ||
luqui | subtype | ||
stevan | luqui: it is all in src/PIL/Native/* | ||
luqui | Dog <: Animal | ||
stevan | although the Repr types for the new objects are in PIL/Repr/* but we are not using those pending a response on p6l | 02:10 | |
luqui | and what would you use instead? | 02:11 | |
luqui saw the p6l message, and wasn't quite sure how to respond | |||
or even what kind of answer you would be looking for | 02:12 | ||
stevan | luqui: what is the $repr argument to CREATE for? | ||
that is the crux of the question | |||
luqui | oh, about the use.perl post, most of the details were not related to the above discussion | ||
just the "composable modules" bit | |||
stevan | is it for alternate implementation of an opaque type, all which do the same thing | ||
luqui | I expect that most of that is up to you guys | 02:13 | |
er, us guys | |||
stevan | luqui: and gals :P | ||
luqui | I'm using the default masculine | 02:14 | |
putter | stevan: so, just to cross-check my understanding. your model is there are conceptually just two files, Prelude.piln, and Prelude.p6, plus a couple of piln-vm-on-platform-x backends, and that's what p6 is made of. | ||
luqui | which, as far as I know, is still in English (despite fights to the contrary) | ||
stevan | luqui: your offending my feminine side :P | ||
luqui | putter, for a proper definition of "file", it seems so | ||
yeah, females like to get offended by that one in the US | 02:15 | ||
stevan | putter: yeah, for the most part | ||
luqui | for some reason it doesn't bother spanish females | ||
stevan slaps luqui with his purse | |||
luqui | hey, no fair having keys in your purse! Those hurt! | ||
stevan | :P | 02:16 | |
putter: as I have stated many times before,.. this *might* work, it *might not* work | |||
putter | ok, well that's simple. finish yanking the code from S29, add in code from PIL2JS et al, create big Prelude.p6. Bits of which can be commented out as they get/are defined by "Prelude.piln". | 02:17 | |
stevan | it feels sane in my head,.. but thats not saying much :P | ||
putter | ;) | ||
luqui | putter, barring modularization | ||
stevan | putter: yes, as I said,.. it is a worthwhile pursuit :) | ||
luqui | which Larry says he wants (hooray). | ||
putter wonders if there is a "church of the simple" | |||
luqui | that is, you have modules of related functions, a certain set of which are imported by default | ||
putter | stevan: it's simple, and thus the Right Thing absent clear argument to the contrary. | 02:18 | |
luqui | occam's razor? | ||
stevan | luqui: so, re: $repr,... if you cant answer, then I need Larry too :) | 02:20 | |
I dont think it is for us guys/girls to decide | |||
luqui | why? | 02:21 | |
putter | hmm... especially if you have an Aristotelian model of software... "our task is to search out the perfect form of program x. that is naturally the simplest possible form. thus we apply occam..." | ||
luqui | to me, that seems like API design rather than language design | ||
stevan | luqui: let me explain the issue | ||
luqui | and for API design, we make it and double check its sanity with Larry, not ask Larry how to do it | ||
stevan, explain away. maybe I don't understand fully | |||
stevan | if $repr is meant to be an storage type for the opaque object type | 02:22 | |
then a class which uses p6array will act the same, and be totally compatible with one which uses p6hash | |||
the differences will be hidden by the opauqe type | |||
BUT | |||
if $repr is meant to provide something more akin to blessing different reference types in p5 | 02:23 | ||
then we have issues | |||
luqui | by more akin? | ||
luqui goes over stevan's p6l message again | 02:24 | ||
stevan | package MyObjectArray; sub new { bless [] => $class } sub head { pop(@{shift}) | ||
package MyObjectHash; use base 'MyObjectArray'; sub new { bless {} => $class } | |||
that wont work | |||
cause they are incompatible repr types | |||
luqui | ah right | 02:25 | |
stevan | :) | ||
luqui | back in a moment | ||
stevan dances the opaque repr dance around luqui, every so often smacking him in the head with a lambda | 02:26 | ||
02:26
robkinyon joined
|
|||
stevan | hey robkinyon | 02:26 | |
robkinyon | heyla, stevan | ||
luqui doesn't think that's a very cheerful dance | |||
stevan stops dancing and gives the lambda to luqui so he can dance it this time | 02:27 | ||
02:30
Cryptic_K joined
|
|||
svnbot6 | r8643 | putter++ | S29draft.pod: typo correction | 02:30 | |
luqui | stevan, I'm stumpted on the $repr issue | 02:43 | |
stevan | luqui: me too :) | 02:44 | |
luqui | I don't think Larry has any idea what he's talking about there (he probably has some specific capability in his head, and tried to document a way to carry that out without telling us what the capability was... he does that) | ||
stevan | hence my asking p6l :P | ||
luqui: thats what I figured too,.. and why I asked | |||
I can only read and re-read s12 so many times before I hit myself over the head with lambdas | 02:45 | ||
luqui | hit yourself in the monads with a lambda | 02:46 | |
robkinyon | is the issue just "How do I know the repr in order to interact with it?" | 02:47 | |
stevan has decided Perl is a waste of time and is switching to LISP | |||
robkinyon seconds that notion and wonders if $CLIENT will go for it | |||
dduncan | took you long enough | ||
robkinyon starts to read up on mod_lisp | |||
stevan | robkinyon: no, we can know the $repr, the issue is "is that what we want to do" | ||
robkinyon | huh? | 02:48 | |
stevan | [21:23] stevanpackage MyObjectArray; sub new { bless [] => $class } sub head { pop(@{shift}) | ||
[21:23] stevanpackage MyObjectHash; use base 'MyObjectArray'; sub new { bless {} => $class } | |||
robkinyon | isn't that just promoting the same problem from p5 into p6? | 02:49 | |
stevan | so the question is, are different $repr types in CREATE just alternate storage? or more like the p5 example above | ||
robkinyon | more importantly, doesn't YAGNI apply? | 02:50 | |
stevan | robkinyon: yes, but I can't figure out what larry wants exactly,.. so I am stuck | ||
S12 is not clear enough :) | |||
luqui thinks the specific thing Larry had in mind might be interacting with p5 classes | |||
robkinyon | more specifically, you mean the interacting with a hashref that happens to be blessed as a hashref and not an object? | 02:51 | |
stevan | luqui: yes, I think that too,.. which means we have alternate storage with the same low level access API | ||
robkinyon has been thinking about releasing Ruby-style interfaces to Array and Hash by doing just that | 02:52 | ||
luqui | what are Ruby-style interfaces? | 02:53 | |
and how do they differ from Java-style interfaces, or how do they differ from mixins? | |||
stevan | interfaces in the style of Ruby :P | ||
robkinyon | no | ||
stevan | I think he means API,. | ||
robkinyon | my $array = Array->new; | ||
$array->[3] | |||
$array->flatten; | |||
luqui | yeah, what about that? | 02:54 | |
robkinyon | the ruby API is damn useful | ||
luqui | you mean the methods that arrays provide by default? | ||
robkinyon | yeah | ||
luqui | okay, now I'm not sure what you mean by "releasing" | 02:55 | |
robkinyon | of course, Perl won't let me do syntactically-sugared blocks like Ruby | ||
release to CPAN | |||
Ruby::Array | |||
Ruby::Hash | |||
Ruby::File | |||
luqui | oh oh oh! | ||
got it | |||
robkinyon | it's an object AND an array and you're supposed to treat it as such | ||
luqui | you're talking about perl 5 | ||
robkinyon | yeah | ||
luqui | now it makes sense | ||
robkinyon | but, i think the idea bears on this discussion | 02:56 | |
stevan | *cough* this is #perl6 :P | ||
luqui | uh... not really | ||
robkinyon | because it's something that I think may be causing Larry to want alternate $repr | ||
luqui | probably not | ||
robkinyon | maybe not that specifically, but ... | ||
luqui | in perl 6, arrays already have methods | ||
robkinyon | yes | ||
luqui | everything can have methods | ||
robkinyon | because P6 arrays are self-aware | ||
stevan | luqui: and what is their $repr :) | ||
luqui | opaque | 02:57 | |
they're just things | |||
stevan | p6opaque? | ||
robkinyon | but, one of the methods they have is [] | ||
right? | |||
stevan ducks to avoid luqui's wildly waving hands | |||
luqui | okay, it seems that I'm arguing that $repr doesn't make sense from an interface POV | 02:58 | |
02:58
vel__ joined
|
|||
luqui | it doesn't have any impact whatsoever | 02:58 | |
robkinyon | i'm curious - does this mean that, in P6, I can define a class that implements both [] and {}? | ||
luqui | it's all just methods. That's what I meant by "opaque" and "just things" | ||
robkinyon, you mean like Match? :-) | |||
robkinyon | Fair nuff | ||
luqui | robkinyon, you can in Perl 5 too | ||
stevan | luqui: right, that is ideal,.. but then why does it need to be in the perl6 level? isnt that an implementation detail? | 02:59 | |
robkinyon | Contextual::Return, yes | ||
luqui | or more simply, "overload" | ||
robkinyon | The point is, luqui, that why does any $repr exist other than p6opaque? | ||
If, as you say, everything is "just methods" | |||
luqui | I think we're trying to figure out what $repr is, rather than why multiple can exist | ||
robkinyon | it's a black box | 03:00 | |
stevan | I think the questions are related | ||
luqui | stevan, and yes, I think it's kind of an implementation detail | ||
stevan | I can see the reason for multiple ones | ||
luqui | I think it's an API question | ||
stevan | but its an imple detail :) | ||
luqui | which is why I think it's still up to us to decide what it means | ||
robkinyon | one sec - i'm confused | ||
Can I create a P5 hash that has no OO semantics in P6? | |||
stevan | luqui: how is it an API question,.. please expand | ||
luqui | robkinyon, by "OO semantics" you mean? | 03:01 | |
stevan | he cant call methods on it | ||
robkinyon | Or, does the very act of creating a hash in P6 automatically mean that I can call methods on it? | ||
luqui | stevan, it's one of those things that is not fundamental about how the language works, but not entirely hidden from the language user's view | ||
robkinyon | If EVERY SINGLE hash in p6 has methods, then there is only the p6opaque $repr | ||
luqui | kind of a hook into however it is OO is implemented | ||
robkinyon, I don't understand the reasoning for that conditional | 03:02 | ||
$repr isn't about whether you can call methods on something | |||
robkinyon | no, it is | ||
luqui | I think it's about what the methods do inside themselves | ||
stevan | luqui: yes :) | ||
luqui | i.e. it doesn't matter in perl 5 whether something is a blessed hash or a blessed array | ||
you can call methods on them both in the same way | 03:03 | ||
robkinyon | luqui: Where do I get the hashref for the alternate $repr? | ||
luqui | it's about how those methods interact with the innards of the object where $repr matters | ||
robkinyon, I think I see what you're saying | |||
but that means that all reprs are "built on" some p6opaque | |||
see, I'm unclear on what exactly a repr is and how it differs from some other kind of object | 03:04 | ||
(I think that's one of the big issues. The other big issue is everything else.) | |||
stevan | luqu: see doc/notes/something-with-repr-in-the-filename.pod | ||
svnbot6 | r8644 | putter++ | src/PIL/misc/S29code.pl - Created. | ||
r8644 | putter++ | Extraction/definition of p6 code from/for S29draft.pod. | |||
r8644 | putter++ | Some may be useful for fleshing out the new PILn backend. | |||
r8644 | putter++ | perl5/PIL2JS/lib6/Prelude/JS/ is another such resource. | |||
r8644 | putter++ | To contribute, just scroll down until pod lines start appearing, then continue the conversion to p6 code. | |||
r8643 | putter++ | S29draft.pod: typo correction | |||
luqui | hmm..... it's not CREATE's decision | ||
if you're using an array as a repr, the compiler better know that so it can translate $.foo into appropriate accesses into that array | 03:05 | ||
stevan | luqui: no, you tell CREATE which one you want,.. CREATE defaults to p6opaque | ||
robkinyon | That's why I've been babbling about the P5 Array impl. | ||
luqui | stevan, I know, but I don't think it should be | ||
robkinyon | because it all comes down to where the non-p6opaque thingies come from | ||
because, it doesn't make any sense to bless an object into another class | |||
luqui | robkinyon, bootstrapping. you have to start somewhere. | ||
robkinyon, it doesn't? | 03:06 | ||
stevan | ah,.. i see what robkinyon is saying | ||
luqui | explain | ||
stevan | if Array is an object,.. why use it as a $repr for opaque | ||
p6array | |||
it is already an object | |||
luqui | yeah, I gathered that | 03:07 | |
stevan | which itself is a p6opaque | ||
luqui | and it's a bootstrapping issue | ||
stevan spins around a few times to make the point | |||
luqui | what's Array's repr? | ||
robkinyon | p6opaque | ||
stevan | you said p6opaque | ||
robkinyon | that's the bootstrap | ||
so, why am i using an object as the repr for another object? | |||
luqui | hmm.. right | ||
stevan spins some more,.. it makes more sense when you are dizzy | |||
robkinyon | LOL | 03:08 | |
luqui | robkinyon, maybe for alternate metaclass stuffs | ||
robkinyon | no | ||
stevan | luqui: no, alternate metaclass is handled in the MOP | ||
robkinyon | there is no reason because it comes down to "Why am I using an object to represent my object?" | ||
stevan | not releated | ||
luqui | robkinyon, because it's useful to do that sometimes? | 03:09 | |
robkinyon | YAGNI | ||
luqui | I'm just thinking about the metaclass stuff | ||
robkinyon | YAGNI | ||
putter contemplates the potential for an Eliza program to participate in #perl6 oo discussions... ;) | |||
luqui | maybe I'm using the wrong word | ||
robkinyon, stop saying that! | |||
robkinyon | LOL | ||
stevan tells me that on a daily basis | |||
stevan | luqui: metaclass stuff is just subclassing ^Class | ||
robkinyon | luqui: The point is that if you cannot come up with a counterexample, then YAGNI applies | 03:10 | |
stevan | luqui: best thing is to yell YAGNI back at him,.. but other than that there is no cure | ||
robkinyon | it's put into the MAYBE_LATER section | ||
luqui | robkinyon, but as language designers, we must take a lot of time to try to come up with a counterexample | ||
robkinyon | Absolutely | ||
i'm not saying that the idea has no merit | |||
stevan | YAGNI! | ||
luqui | and by yelling YAGNI, you're not really allowing that time | ||
:-) | |||
robkinyon | No, I'm allowing that time to not interfere with moving forward | 03:11 | |
luqui | robkinyon, but it's specced! | ||
YAGNI doesn't apply unless we get Larry to agree | |||
stevan squints hard at the spec,.. but its still fuzzy | |||
robkinyon | and three very intelligent people talking for almost 30min cannot come up with a reason for the spec | ||
luqui | we're interpreting the spec, like christians interpreting the bible, or supreme court justices interpreting the constitution | ||
stevan wonders where those people are,.. and why they arent talking to us | |||
robkinyon | Unless the four very intelligent people that constitute @Larry can give us a reason, those of us implementing the spec have to say "Provide a failing testcase" | 03:12 | |
stevan | luqui: and that kind of stuff has never ever ever caused trouble :P | ||
robkinyon | and move on | ||
luqui | robkinyon, but the discussion is not going in circles! | ||
robkinyon | really? | ||
luqui | It was moving along nicely until you interrupted it | ||
I even had an insight that I was about to say | |||
robkinyon | we have all agreed that, fundamentally, everything is implemented in terms of p6opaque | ||
luqui | robkinyon, "agreed"? | ||
no, I said I see your point | 03:13 | ||
robkinyon | robkinyon: so, why am i using an object as the repr for another object? | ||
luqui: hmm.. right3. | |||
luqui | robkinyon, are you asking yourself? | ||
robkinyon | no - i'm quoting | ||
luqui | okay, I guess it's a limitation of IRC | ||
it wasn't a, "oh you're right" | |||
it was a "hmm, good point" | |||
in any case, that doesn't matter | 03:14 | ||
I see your point, but I don't necessarily agree | |||
stevan wants to hear luqui's insight | |||
luqui | so let's say hypothetically that you want to build an object on top of an Array | ||
robkinyon | since all the reasons to use an alternate representation are moot in P6 given p6opaque and []/{} being methods, I fail to see what benefit there is | ||
You would build an object having an array | |||
luqui | robkinyon, no, I mean translating member accesses to array lookups | 03:15 | |
robkinyon | ok | ||
translate member access into accessing the array that you contain as your sole memeber | |||
luqui | that is, I want the user to write: class Foo { has $.bar; method baz() { return $.bar } } | ||
and I want to translate that internally into array accesses | |||
internally is the key word | |||
you have to think like a module writer for a second | 03:16 | ||
robkinyon | unless you're going to mix this in somehow due to some random serialization requirement, I can't see what the benefit is | ||
luqui | robkinyon, let's say it's interfacing with a C program | ||
robkinyon | or, you need to implement as an array in order to have sequential memory locations to do some sort of shared mem | ||
that's fine | |||
luqui | which has memory layout requirements | ||
robkinyon | are you using the boxed or unboxed array? | ||
luqui | boxed | ||
stevan | Array | ||
uppercase is boxed,.. lower is unboxed | 03:17 | ||
robkinyon | that doesn't conform to the memory layout requirements | ||
luqui | shut up | ||
i'm just trying to get the point across | |||
forget that I said Array | |||
pretend I said CStruct | |||
robkinyon | ok ... is that implemented in terms of p6opaque? | ||
luqui | the point is, I have a great idea that has to do with laying out objects differently than perl 6 does by default | ||
and yes, it is implemented in terms of p6opaque | |||
but that does *not* mean that it is identical to p6opaque | 03:18 | ||
robkinyon | you want to have direct control over how your memory is laid out | ||
now, i can see a benefit | |||
i apologize if I pissed you off. | |||
luqui | it's okay... I just felt like you were getting too detailed when I was posing a thought experiment | 03:19 | |
anyway... | |||
robkinyon | well, it's kinda like the "rebuttal of relational theory" Ovid posted to Perlmonks a few weeks ago | ||
luqui | what I was thinking eariler is that the compiler has to know what layout you're using | ||
justatheory | robkinyon: Actually, Ovid is in favor of relational theory. That post was about the fact that SQL is not relational. | 03:20 | |
03:20
[Keith] joined
|
|||
luqui | either that or member accesses have to be certain kinds of method calls (an idea that I am not entirely opposed to :-) | 03:20 | |
stevan | luqui: so you are saying that on the p6 level it makes no diff, but on the compiled level it does | ||
robkinyon | justatheory: My response was "Pick an example that's actually normalized" | ||
luqui | stevan, not exactly | ||
justatheory | robkinyon: My response is; Reate Date. | ||
luqui | If I want to implement this new object on top of CStruct, I'd like to do that all from perl | 03:21 | |
that is, it doesn't have anything to do with the writer of the class or the user of the class | |||
but the implementor of the metaclass or something like that | |||
stevan ducks the waving hands again | |||
robkinyon | luqui: May I try? | 03:22 | |
stevan | metaclasses dont handle attribute access | ||
luqui | well you seem to have a pretty strong notion of what a metaclass is | ||
stevan | in intstances | ||
luqui | and apparently mine differs from yours in there | ||
thus "or something like that" | |||
stevan | luqui: a metaclass is an instace of ^Class | ||
luqui | I thought that's what a class was | ||
stevan | luqui: it is what ^Class is an instance of | ||
robkinyon | luqui: what you're saying is that you want to be able to define a CStruct within the framework of class { ... } and have the compiler and the interpreter both grok you | ||
stevan | the "meta | ||
the "meta" part is really optional | |||
luqui | metaclass is the class of ^Class | ||
robkinyon, as long as I tell them how to grok me | 03:23 | ||
stevan | luqui: and turtles all the way down | ||
03:23
[Keith] left
|
|||
stevan | luqui: until you stop it and make something an instance of itself | 03:23 | |
robkinyon | Or, going further, you want to be able to hand something a C header file and it create a usable $repr for you | ||
luqui | stevan, what is an instance of itself in this metamodel? | ||
robkinyon | luqui: Don't even go there | ||
luqui | robkinyon, why not? | 03:24 | |
robkinyon | it's not needed for you to understand the turtles! :-) | ||
stevan | luqui: ^Class is an instance of ^Class | ||
stevan thinks robkinyon had a bad turtle experince as a child | |||
luqui | okay, so we're ruling out alternate representations | ||
by the current model | |||
robkinyon | there is much blowing of brain gaskets when you get stevan talking about how ^Object is an instance of ^Class | ||
no ... you have a good reason for why alternate representations are useful | |||
stevan | and ^Class is an instance of ^Class too :) | ||
luqui | but in any case, if my ramblings are anywhere near correct, it's an API issue, a language hacking issue, not a language issue | 03:25 | |
robkinyon | no ... i think it's a language issue | ||
luqui | robkinyon, how come? | ||
robkinyon | in part because you need your CStruct representation to not be so free-flowing in its memory usage | ||
at some point, it needs to point to the same contiguous section of RAM | |||
luqui | I think it's important to *be able* to do it; it's not very important how it's done | ||
stevan | robkinyon: thats an implementation issue I think | ||
robkinyon | well ... it's a language issue | 03:26 | |
luqui | it's one of those points where easiness doesn't matter anymore | ||
and that's what I consider an API issue | |||
robkinyon | because where do you define, in Perl, the layout of your CStruct? | ||
luqui | robkinyon, in somebody's library that knows about CStructs | ||
stevan | luqui: we have decided what make sense.. but I am still not confident that is what $Larry meant | ||
robkinyon | given that the entire language can be redefined given enough libraries, that's fair | ||
stevan | hence the p6l question :) | ||
luqui | stevan, but he hasn't responded | 03:27 | |
stevan | luqui: yes, he is busy at $work,.. dont you read you own notes :P | ||
luqui | well, I was about to give two alternatives, one of which was that one, so yes | ||
stevan | :) | ||
luqui | it's also probably the case that you gave him something to think about | 03:28 | |
unfortunately, Larry doesn't think by talking like we do | 03:29 | ||
so it's easy to get Warnockedf | |||
s/f$// | |||
stevan | oh well,.. | ||
ok, time for me to get off the computer | 03:30 | ||
luqui++ robkinyon++ # productive converstations | 03:31 | ||
putter++ too | |||
ok, night all & | |||
putter | good night stevan & | 03:38 | |
03:43
vel__ left
03:48
oylenshpeegul left
03:50
broquaint joined
03:59
jiing_mIRC joined
|
|||
brent | is now known as brentp | 04:31 | |
04:35
webmind joined
04:39
Amnesiac joined
04:42
PerlJam joined
04:44
broquaint joined
04:50
chip joined
04:57
broquaint joined
05:01
chip joined
05:06
webmind joined
05:18
broquaint joined,
chip joined
05:24
webmind joined
05:31
dduncan left,
dduncan joined
|
|||
dduncan | oops | 05:31 | |
05:39
elmex joined
05:40
justatheory joined
05:49
justatheory joined
06:35
kakos joined
|
|||
GeJ | greetings all | 06:36 | |
06:44
penk joined
06:45
PJF left
|
|||
Supaplex | elo GeJ | 07:07 | |
07:12
Alias_ joined
|
|||
Alias_ | seen audreyt | 07:12 | |
jabbot | Alias_: audreyt was seen 13 hours 35 minutes 19 seconds ago | ||
07:28
iblechbot joined
07:30
lisppaste3 joined
|
|||
gaal | $morning | 07:34 | |
dduncan | greet ings | 07:37 | |
Alias_ | $response | ||
dduncan | $response_to_response_or_next_comment | ||
07:39
kanru joined
07:41
Aankhen`` joined
|
|||
gaal | putter: a few questions on S29code: | 07:55 | |
why "package Math::Trig {}" etc.? | |||
how did you choose the precision of constants? | 07:56 | ||
any thoughts on plugging this module into the tests? | |||
and, I wonder if there isn't a way to avoid the macro use for trig_func. | 07:58 | ||
08:50
luqui joined
|
|||
gaal | hey luqui. I'm still not sure about how IMPORT is supposed to go. | 08:55 | |
luqui | by "supposed to go" you mean? | 08:56 | |
luqui thought it worked just like in perl 5 | |||
gaal | p6 provides a default mechanism for (a) exporting symbols and (b) configuring modules | ||
luqui | or do you mean the "standard" export mechanisms | ||
Alias_ | is use Foo; finally going to mean use Foo (); ? | 08:57 | |
gaal | if somebody defines an &IMPORT (or, if it's just like perl 5, &import) sub, does the standard one not get called? | ||
luqui | Alias_, I doubt it... | ||
Alias_ | crap | ||
luqui | yeah, that's a little annoying inconsistency | 08:58 | |
gaal, probably something like inheritance | |||
gaal | luqui: I want to refactor around line 855 of Parser.hs, it's getting a little insane | ||
luqui looks | |||
gaal | but I don't know what it's supposed to do | ||
luqui thinks that whenever you say "line 855", refactor is implied | 08:59 | ||
gaal | what goes on is: | ||
(now i mean_ | |||
) | |||
836: if use Foo (), nothing. | |||
838: if there's an &import or &unimport as appropriate, call them. | 09:00 | ||
846 onwards: symbol export. | |||
(of course 846 on needs to be much more finely grained; that's not my immediate concern) | |||
what I don't understand is, what is the responsibility of the implementor of &import? | 09:01 | ||
does &import need to cause symbols to be exported? | |||
scook0 | gaal: "it's getting a little insane/but I don't know what it's supposed to do" -- I've had that feeling about parts of Parser.hs more than a few times :) | 09:02 | |
gaal | can it prevent the default exporter from happening? | ||
scook0: the problem isn't with parsing now, it's with p6 semantics not being clear yet. | |||
luqui | meaning... | ||
should the implementor of IMPORT export symbols himself? | |||
luqui thinks it probably should be able to | |||
the thing is... it's not well specced AFAIK | 09:03 | ||
gaal | luqui: in that case they need a way to supress the default exporter | ||
luqui: I know :) | |||
luqui | maybe the default exporter works like Export.pm | ||
except with a nicer interface | |||
gaal | like I keep saying, the problem starts with two different things being conflated | 09:04 | |
symbol export control and module configuration. | |||
why not separate them? | 09:05 | ||
&IMPORT and &LOAD | |||
&UNIMPORT and &UNLOAD | |||
luqui | Shouldn't we separate them from the "use" interface, too, then? | ||
scook0 | one is an import-time hook, and the other is a full exportation override? | ||
luqui actually thinks that would be a splendid idea | |||
gaal | I think we should, but I don't know how that should look | ||
luqui | if it weren't for those damned sigils... | 09:06 | |
gaal | scook0: init-time hook, I guess | ||
luqui | you could use named arguments for imports and positionals for config | ||
but that probably wasn't a great idea in the first place | |||
scook0 | luqui: I was going to suggest the other way around (named/pos) | 09:07 | |
luqui | ahh, but named makes sense for imports because they're already unordered... but those damn sigils | ||
scook0 | since positionals in general tend to represent the 'real data', whereas named/adverbs specify how it is to be used | ||
luqui | I think we probably need to go haskellish (again) | 09:08 | |
gaal | luqui: I'm not seeing why sigils are a problem here? | ||
luqui | have some sensible defaults "import default, import nothing" | ||
and then provide keywords (eg. "qualified") for finer-grained control | |||
maybe not keywords though | |||
gaal | qualified+aliases is a whole different moose | ||
luqui | sigils are a problem because you can't say: use Foo :@bar | ||
well, you can, but it means something different | 09:09 | ||
scook0 | you can if &use is a macro | ||
luqui | scook0, yeah, but that's not very pretty | ||
anyway, I think configuration should have the full power of perl 6 call syntax | |||
gaal | :'@bar' :-( | 09:10 | |
luqui | I'm tempted to say "use" and "import" | ||
import Foo <@bar $baz> | |||
use Foo <vars> # config | 09:11 | ||
gaal | in what order do you need to say these, and when do they happen? | ||
luqui | but that might be too fine a distinction for the common man | ||
scook0 | use Foo("config") <@bar $baz> | ||
gaal | then need to happen at compile time | ||
and config prolly has to happen before import. | |||
luqui | oh, I was talking about two separate ways to use a module | 09:12 | |
gaal | ah. | ||
hmm. | |||
luqui | it kinda seems like they should be in the same place | 09:13 | |
because some modules would do both at once... | |||
gaal | Larry thinks there needs to be alot of control over imported scope | ||
luqui thinks so too | |||
gaal | so the import syntax needs to be more complex anyway | ||
as noted in S11 now | 09:14 | ||
luqui | that is a very terse description though | ||
gaal | luqui: I understand it though, if it doesn't need to deal at all with config. | 09:15 | |
There is a hack we could use | |||
parrot GHC's command line +RTS ... -RTS | |||
that's ugly though :) | |||
luqui | ...... use/import is looking better and better | ||
what's RTS? | 09:16 | ||
gaal | luqui: only in the cases you only need one. | ||
luqui | not necessarily | ||
you can think of import like roles and use like traits | |||
gaal | luqui: there are several "namespaces" of arguments in the GHC command line. | ||
luqui | import is for modules that are completely well-behaved, use is for modules that do funny business | ||
gaal | you can tell the runtime system things, but also some other subsystem | ||
GHC avoids clashes by letting you say | |||
ghc --make +RTS -M400 -RTS +Someothermodule -M48284 -Someothermodule | 09:17 | ||
and the -Mx args mean different things. | |||
luqui | ahh, I see | ||
that is ugly | |||
gaal | well, it solves a difficult problem. | ||
Alias_ | ugh... the pain from the techie kicking a plug out the wall continues... | 09:18 | |
gaal | luqui: I don't buy "use is for modules that do funny business"... you want to init a module tersely sometimes | ||
Alias_ | Had to derack my dev server AGAIN after the NIC was intermittently failing | ||
So that's a primary IDE controller and a NIC. | |||
Crossing fingers nothing else goes | 09:19 | ||
luqui | we could kill the use Foo () syntax though | ||
replacing it with import Foo; | |||
Alias_ | Server Room Protocol: Look twice, step once! | ||
luqui | use Foo # import default stuff, do normal stuff | ||
gaal | luqui: how do you say "import defaults from Foo" then? | ||
heh | |||
luqui | import Foo # like use Foo (), but accepts import configs | ||
enough people use "use Foo ()" that it might be worth it | 09:20 | ||
it'll take some more mulling though | |||
and probably more arguing | |||
argue away if you have more :-) | 09:21 | ||
gaal | I think there oughta only be one keyword for compiletime module loading | ||
I don't mind if it's renamed to "load" :) | |||
luqui | huh? what's wrong with "use"? | ||
gaal | nothing :) | ||
just saying, there has to be one | 09:22 | ||
09:22
Alias_ left
|
|||
luqui | is there a reason you only want one keyword | 09:22 | |
? | |||
gaal | don't forget there's also "require" | ||
luqui | which is runtime... | ||
scook0 | luqui: cargo-cult reasons? | ||
gaal | it's going to be very confusing | ||
sure it's runtime | |||
09:22
kane_ joined
|
|||
luqui | as if use Foo () isn't confusing enough already | 09:22 | |
gaal | you're going to want to use the runtime version occasionally, and want it to feel like the compiletime variant | 09:23 | |
luqui | we get rid of that inconsistency and replace it with a different kind of inconsistency... | ||
you're suggesting that require should call IMPORT? | |||
gaal | nono | ||
sec phone sorry | |||
back. I'm fine with require MyModule; MyModule.IMPORT(x); | 09:27 | ||
luqui | I'm not sure what you mean by "feel like the compiletime variant" then | 09:28 | |
gaal | it'd be great if "x" could be the same as what it would have been had I said "use MyModule x" | ||
that's what I mean. | |||
luqui | yeah... I'm not sure that has anything to do with my side of the argument | ||
import Foo x; require MyModule; MyModule.IMPORT(x) | 09:29 | ||
use Foo x; require MyModule; MyModule.USE(x) | |||
er, s/Foo/MyModule/g | |||
gaal | (also, I still think the return value of use/require should be a callable Module object, so (require MyModule).IMPORT(x) | ||
but I think we already agreed on that one | |||
) | |||
luqui | that might be nice | ||
gaal | my gripe with your idea is that sometimes you want both USE and IMPORT | 09:30 | |
luqui | and then importing that module would take two lines? | ||
which is ugly and painful? | |||
fair enough | 09:31 | ||
gaal | yeah, not only because order matters with these lines. | ||
luqui isn't sure how order would matter except in the most bizarre of circumstances | |||
i.e. the use handler populating what is to be exported (/me realizes that's not all that bizarre) | |||
gaal | any module that does things at compile time would want its config data known early | 09:32 | |
luqui | depending on what those things are | ||
gaal | there's an incidental objection that people coming from mainstream languages would be used to saying "import Foo" early up. | ||
though that's not a very strong argument :) | |||
luqui | my biggest gripe against my argument is that we now have two operations that do almost the same thing | 09:33 | |
and subtle distinctions are bad for beginners | |||
maybe some special syntax... | 09:34 | ||
use Foo config, args importing import, args | |||
gaal | well, the unclever approach is to say, importation is symbol table stuff, quote it anyway | ||
luqui | 'course, use Foo importing <bar> is a little verbose | ||
gaal | actually I like special syntax, if you can come up with a golfy one. | 09:35 | |
luqui | gaal, I'm not quite sure what you mean | ||
I don't see how quoting it helps | |||
gaal | luqui: make all importation explicit stringy args, then you only have to reserve the args for importation | ||
luqui | gaal, example? | ||
gaal | use Foo :velocity<500> :imports<&takeoff &land> | 09:36 | |
luqui | I assume s:2nd/importation/configuration/ | ||
gaal | subsume importation under configuration (like in p5) | ||
luqui | gaal, but you're really losing on the power of importation there | ||
scook0 | I suppose `use Foo <&takeoff>` could be short for `use Foo :imports<&takeoff>` | ||
gaal | maybe Foo's USE function can have a trait declaring if it takes responsibility for importation? | 09:37 | |
luqui | scook0, and require all args to be named otherwise, like .new? | ||
gaal | luqui: yes, that's why I don't like it | ||
luqui | a powerful importation mechanism kills all "namespace collision" antihuffmanism | 09:38 | |
having to worry about namespace collisions should be a programmer's last concern | |||
we do have siglists | 09:39 | ||
gaal | siglists? | ||
scook0 | luqui: what do you mean by "namespace collision" -- which namespace(s)? | ||
luqui | use Foo :imports:( :my($foo) :our($bar) ); | ||
gaal, signature objects, :(...) | |||
scook0, er, name collision | 09:40 | ||
making names long so that there's a better chance they'll be unique | |||
gaal | luqui: where's that specced? interesting | ||
luqui | S06 IIRC | ||
scook0 | luqui: i.e. two modules exporting the same short name? | ||
luqui | scook0, aye | ||
here's the one I'm working on now: two different methods named the same thing | 09:41 | ||
that's the hardest one | |||
at least with Perl's world-view it's hard. With Haskell's (and C++'s, but they didn't take advantage of it), it's easy | |||
gaal, btw, :() is actually \() | 09:42 | ||
gaal | luqui: in "Closure paramaters"? wow, that doesn't really advertise the feature very loudly :) | 09:43 | |
luqui | :() is how it's declared | ||
use Foo :imports\( :my<$foo> :our<$bar> ) | |||
geez that's a lot of special syntax for a simple thing | |||
gaal | use Foo :velocity<500> importing :my<$foo> :our<$bar>; | 09:45 | |
luqui | but that may be another good way to go: require use to take only named or only positional parameters | ||
in the positional case, just pass it as the sig to :imports\() | |||
gaal, you like the namey syntax? | |||
I agree it's not bad | |||
except for the common case | |||
scook0 | the problem is that it needs to be (a) simple in the simple cases, (b) not too complex in the complex cases, and (c) decent scaling between a & b | ||
luqui | use List::Util <reduce> | ||
shouldn't be: use List::Util importing <reduce> | 09:46 | ||
gaal | well, what's more common? export control or config control? | ||
luqui | I'd say exports | ||
but I can't back that up | |||
gaal | I agree SOMETHING needs to win the short form :) | ||
scook0 | it matters less if you make the not-quite-so-short form still pretty short | 09:47 | |
(assuming you can) | 09:48 | ||
luqui | also, what about module aliasing | ||
gaal | use List::Util importing nothing; # <- Alias won't like that... | ||
scook0 | I just wish there wasn't conflict between config-adverbs and scope-adverbs | ||
luqui | i.e. use Data.Map as Map | ||
s/use/import/ | |||
gaal | luqui: that's the whole other moose :) | 09:49 | |
luqui is beginning to think that, once again, Haskell got it right | |||
09:49
dada joined
|
|||
luqui | have a very small minilanguage for exports | 09:49 | |
that supports aliasing and fine-grained import control | |||
gaal | luqui: but then, they have no config control at all | ||
luqui | gaal, that's not true | ||
gaal | and no control over scoping of symbols | ||
luqui: how do you config a module in haskell? | 09:50 | ||
luqui | not Haskell exactly! | ||
haskell's philosophy | |||
which is essentially: use Foo::Bar::Baz config importing <baz quuz> as Baz | |||
a little englishish minilanguage | |||
(except "as" means something different, and it's too short to be put at the end like that) | 09:51 | ||
gaal | that works for me except people who want the simple case (not realizing there were a few different ones) would hate it | ||
09:51
nnunley joined
|
|||
luqui | gaal, but we have to piss off those people if we're diverging from perl5 at all | 09:51 | |
if there is any distinction between config and exports, those folks will yell | 09:52 | ||
because one's going to be longer | |||
gaal | there is one say to avoid it... | ||
luqui ponders use/imp to keep them quiet :-p | |||
gaal, what say is that? | |||
:-) | |||
gaal | let the module author provide the default one with precedence :) | ||
luqui | yeah, uh.... no | 09:53 | |
you want to make people feel like they're in control | |||
scook0 | luqui: (one's going to be longer) that's why I liked `use Foo <$symbol>` `use Foo :option` | ||
luqui thinks that's one of the most important things to do | |||
scook0 | but it interferes with export control | ||
luqui | scook0, how come? | ||
you mean powerful export control... | 09:54 | ||
okay | |||
scook0 | luqui: yes, :my() and the like | ||
gaal | yeah, quoting the symbol means no powerful excontrol | ||
luqui | no, we still have to quote symbols | ||
scook0 | unless you can put the excontrol inside the <> | ||
gaal | so I think we all agree no relegation to strings, yes? | ||
oh | 09:55 | ||
hmm | |||
we're going around in circles | |||
scook0 | i.e. use Foo < :my($symbol) > # ugly though | ||
luqui | scook0, especially from an implementation perspective | ||
gaal | scook0: and fragile too :( | ||
(export a "<" symbol...) | 09:56 | ||
luqui | gaal, oh my god! | ||
operators! | |||
gaal | or an op | ||
yeah | |||
luqui | maybe that's just: use Foo < infix:<+++> > | 09:57 | |
(IIRC <> does balancing) | |||
gaal | how does that work? oh, I forgot < > is teh smart | ||
scook0 | clever <> | ||
gaal | foresight++ | ||
luqui | not quite: | ||
scook0 | (I can see that causing pain in obscure cases though :) | ||
luqui | use Foo < circumfix:<[: :]> > # uh oh | 09:58 | |
gaal | yeah, that helps against the common case, and if someone really wants to overload '<', let them sweat | ||
hmm, why doesn't that work? | |||
scook0 | use Foo 'circumfix:<[: :]>' | ||
luqui | scook0, yeah... if people are importing circumfix operators, presumably they know what they're doing enough to use those quotes | 09:59 | |
scook0 | use Foo < circumfix:Ā«[: :]Ā» > | ||
luqui | scook0, same problem | ||
the problem isn't balancing, it's word splitting | |||
gaal | ah, right. | ||
scook0 | (I just realised that myself) | ||
gaal | use Foo q#circumfix:<[: :]># :( | 10:00 | |
luqui | but this does bring up an interesting point | ||
you are allowed to write operators infix:{'+'} | |||
or in many various ways | |||
should we really be quoting these symbols? | |||
scook0 | it seems to me that qw<> isn't really what we want | ||
we really want a quote-identifier construct | |||
gaal | can you do crazy stuff like infix:$op ? | ||
luqui | ?eval my $op; BEGIN { $op = "+" }; say infix:{$op}(3,4) | 10:01 | |
evalbot!!! | |||
gaal | my $op = <- + / *>.pick; infix:$op := { ... } | 10:02 | |
luqui: oh yeah, I was wondering what happened to it a few days ago | |||
I gotta go out and do some stuff before the stores close, bbiab | |||
I hope you guys will still be here in ~40 min? | 10:03 | ||
luqui | gaal, and for yours, $op needs to be chosen at compile time | ||
no, I'm going to bed | |||
gaal | luqui: right | ||
luqui | will continue to think about this though | ||
azuroth | does anybody in here know latin? | ||
luqui isn't even sure how to say "no" in latin | |||
gaal | luqui: ok. I was hoping to make export a little saner for the release | ||
but oh well, at least I'll have $larry cornered on Feb :-) | 10:04 | ||
luqui | is there a hackathon? | ||
azuroth | I'll tell you how to say yes: sic | ||
luqui | that's helpful. so then when somebody asks if I know latin, I can say "sic" | ||
and be lying... | |||
gaal | azuroth: port your text to perl, then use Lingua::Perligata or whateverthemoose it is | ||
luqui: osdc.org.il | |||
azuroth: "sic" isn't yes, it's "thus" | 10:05 | ||
luqui: wanna come? :) | |||
luqui | definitely | ||
gaal | audrey will be there too. | ||
luqui | but alas, I cannot | ||
$$ && $school | |||
:-( | |||
azuroth | wow, so it is | ||
gaal | azuroth: sic transit gloria mundi | 10:06 | |
gaal & | |||
azuroth | thus it travels the glorious world...? | ||
s/it/he/ | |||
luqui | geez, pugs is huge | 10:07 | |
took forever to check out | |||
evalbot should be on in about 20 minutes | |||
it has to build from scratch | |||
luqui & | 10:08 | ||
gaal | >> showstoppers for release afaik: 1. PGE/parrot integration is broken 2. multisub exports are broken | 10:10 | |
azuroth: "thus passes the glory of the world", but look it up, it has interesting cultural moose | |||
& <- for real | 10:11 | ||
azuroth | ahh, okay | ||
you'll be back | |||
10:15
r0nny joined
10:16
r0nny joined
|
|||
gaal | that took less than expected :-) | 10:24 | |
I hope Aankhen`` comes back soon, I want to hear what artists talk about when they get together :) | 10:28 | ||
azuroth | gaal: "why did you tell the story, girl?" is "cur fabulam narrabas, puella?", correct? | 10:29 | |
gaal | azuroth: haven't the foggiest :) | 10:30 | |
I do know puella is girl though! | |||
azuroth | oh. you tricked me! :-) | 10:31 | |
gaal | what's the infinitive of narrabas? | 10:33 | |
azuroth | narrare | 10:34 | |
to tell | |||
gaal knows latin like he knew haskell last march | |||
oh, so it is 1st conj. | |||
azuroth | heheh. I'm just learning both | ||
gaal | so apparently this is indicative active 2nd person sing. | 10:35 | |
imperfect | |||
and fabulam is accusative | 10:36 | ||
azuroth | yeah, so probably more like "why were you telling". but I don't know (plu?)perfect or anything yet | ||
gaal | i've no idea what pluperfect means :) "why have you been telling"? | 10:37 | |
www.math.ohio-state.edu/~econrad/lang/latin.html # latin cheat sheets, err, docs/quickref/ | |||
10:37
penk joined,
G2 joined
|
|||
gaal just noticed the domain name for that site, ha. | 10:38 | ||
azuroth | I think pluperfect is when something was done and finished a while ago. and perfect is just when something's been finished? | ||
gaal | why have you told? | 10:39 | |
okay | |||
this gets harder than monads when you reach the 3rd declension :) | |||
svnbot6 | r8645 | Darren_Duncan++ | r1927@Darren-Duncans-Computer: darrenduncan | 2006-01-13 02:40:06 -0800 | 10:41 | |
r8645 | Darren_Duncan++ | [/ext/Rosetta|/ext/Rosetta-Engine-Native|/misc/Rosetta-Incubator] : incremented versions of all modules that have a pre-rewrite equivalent on CPAN, so these post-rewrite versions are kept higher than a new CPAN retroactive release due tomorrow that uses the pre-rewrite versions | |||
dduncan | and with that, there's probably nothing else I need to commit before 6.2.11 is packaged up | 10:42 | |
azuroth | I'm up to page twelve of the first book. 5% of my way to learning latin! | 10:46 | |
11:31
iblechbot joined,
bsb joined
|
|||
theorbtwo backlogged. | 11:32 | ||
11:47
pdcawley joined
11:50
EdLin joined
11:56
elmex joined
12:16
ilogger2 joined
|
|||
ingy | seen audreyt | 12:28 | |
jabbot | ingy: audreyt was seen 18 hours 50 minutes 24 seconds ago | ||
12:48
Stoffe left,
putter joined
|
|||
putter | hi gaal, let's see... | 12:48 | |
re S29code, | 12:49 | ||
daja77_ pokes rafl | |||
putter | re ' why "package Math::Trig {}" etc.?', because it's speced as a package, rather than say as a module. inserting things directly (multi Math::Trig::mumblefrotz (...) {...}) is fine, but at some point you have to say its a package. | 12:50 | |
12:50
_ori joined
12:51
_ori left
|
|||
putter | re ' how did you choose the precision of constants?' - I cut and pasted the first line of the example section of their OEIS database entry. ;) Something more principled will be needed at some point. | 12:53 | |
rafl pokes back | |||
daja77_: What's up? | |||
daja77_ | why is your jabber timing out | 12:54 | |
12:54
calanya joined
|
|||
rafl | daja77_: I'm online and talking to someone. | 12:54 | |
putter | re ' any thoughts on plugging this module into the tests? ', not quite yet. this is still mostly just a grabbag to help with the "now the piln backend passes sanity, what about the rest of the tests?" Prim.hs port phase. | 12:55 | |
gaal | putter: I meant, why not "package Math::Trig { multi mumblefrotz }"? | 12:56 | |
putter: re precision, the danger is with infectuous overprecision | |||
BigFloats are costly etc. | 12:57 | ||
daja77_ | rafl: can you read me there? | 12:58 | |
putter | My current impression of the Right Thing is to take a finished S29code (half of it is still unmodified pod), things from Prim.hs which can be easily p6-ified, and blobs of PIL2JS/lib6, and generate a big mostly complete p6 "prelude", to complement the small piln prelude. | ||
gaal nods | 12:59 | ||
putter | second batch of questions in a sec... | ||
gaal | Is the exporter properly part of Prim or of Parser? | 13:00 | |
it doesn't parse things itself; but it does return bits of AST. | |||
hmm, maybe neither? Pugs.Exporter? | 13:01 | ||
then again, it only exports (ha) one function, which should probably only be called from Parser... | 13:02 | ||
putter | re ' and, I wonder if there isn't a way to avoid the macro use for trig_func.' - sure... you can compute them at runtime (or BEGIN{} compile time... using something like foreach <sin cos ...> -> $op { M::T::$op ::= -> (Num $n --> Num) { ... Primitive::$op... }}. or you can expand them, generating a much less maintainable blob of 10x bigger code. what's wrong with macros? ;) | 13:03 | |
13:04
chris2 joined
|
|||
gaal | :-) | 13:04 | |
"Syntax hilighting doesn't work with them!" | 13:05 | ||
putter | second batch: re why not putting them in brackets (M::T { multi mumble }), the spec has fully qualified names (multi M::T::mumble), with adjacent lines going into different packages/classes. and S29code mirrors S29draft.pod as closely as possible. | 13:06 | |
re overprecision... hmm... how do you keep both 64bit long double folks and 32bit double folks both happy? perhaps we need a precision pragma? | 13:07 | ||
re 'Is the exporter properly part of Prim or of Parser? it doesn't parse things itself; but it does return bits of AST.'... well, it sounds like an AST-flavor _macro_ to me! ;) | 13:08 | ||
gaal | :D | 13:09 | |
putter | re syntax highlighting... having anything but p6 generate the text map info looks basically a lost cause. the usual regexp approach... for p6!?!;) | 13:11 | |
gaal | putter: util/perl6.vim works nicely most of the time. Of course it isn't perfect. | 13:12 | |
13:15
kolibrie joined
|
|||
putter | ah, but that's only because I don't yet have control (complete control! lexically scoped! oh, I sooo can't wait:) over the p6 parser rules, nor AST-based macros. perl6.vim?! Ha! ;) | 13:16 | |
gaal | well, when you have THAT control you obviously will use the perl-enabled version of vim to load alternate syntax files. :) | 13:17 | |
putter | hmm... re exporter... it won't in time for next release, but once we have pil2/piln, we can have pil2/piln modifying macros! Which would actually be the Right Way to implement the pure-p6 version of the exporter. | ||
theorbtwo | The thing to do is to get pugs to produce some sort of dump with full position information, and get perl6.vim to parse that. | 13:18 | |
Viola, always-correct coloration information. | |||
gaal | theorbtwo: we're not THAT far from that, actually. | ||
theorbtwo | I know. | 13:19 | |
putter | theorbtwo++ # re position dump - agreed | ||
gaal | too bad you can't do this: | 13:20 | |
# echo ':D say "hi" if 4==4' | ./pugs - | |||
theorbtwo | The problem, BTW, with the plan I just layed out is that it won't do anything vaugely useful for things that simply don't compile. | 13:21 | |
gaal | indeed. | ||
how do clever IDEs like Eclipse's JDT do it? | 13:22 | ||
putter | actually, I'd like to see a refactoring engine rather than just a dumper. so emacs/vim can say "extract the code between lines n and m into a helper function", and Perl6::CodeEngine does the right thing, and sends back the new text and highlighting. IDEish var docs and completing. what else...? | ||
gaal | backtrack a lot I suppose... | ||
yes, that is a holy grail of sorts. | |||
putter | s//Perl6::CodeEngine::Server/ | 13:23 | |
re 'things that dont compile', hmm... maybe picky grammars should come with a companion lax grammar for highlighting?? or...? | 13:26 | ||
13:27
avar joined
|
|||
putter | I suppose one could fall back to the wizzy grammar-based equivalent of the current "bag of simple heuristics which somewhat match user expectation" approach. | 13:28 | |
theorbtwo | Some of the time, it's perfectly reasonable to put up a warning somewhere onscreen and keep using the highlight from the last time it did compile. | 13:29 | |
putter | re IDEs, tolerant parsers and bags of pattern matchers. tend to be happy with very macroy code like emacs/gnu C files (I actually dont know how well Eclipse currently deals). | 13:31 | |
s/happy/un$&/ | 13:32 | ||
re holy grail, hmm, since p6 will embed ruby and python and..., there is a chance to define the standard way to play this game. | 13:33 | ||
gaal doesn't have a recent CDT to check | 13:34 | ||
13:38
bsb joined
|
|||
putter | since there is so much in common between refactorers for different languages, and given p6's needs and the perl communities' unusual attitude of "ooo, another language! yes! let's bring it in! new CPAN module!" (rather than the usual, "we can do that better. no? well, why would you want to do it anyway."),... one might create *the* refactoring engine... ;) | 13:39 | |
putter daydreams happily... | |||
gaal | putter: maybe looking at eclipse is worthwhile, since they did want to be a metaide. | 13:40 | |
putter | indeed. | 13:41 | |
gaal: a question: ok, say once oo and rules are working, folks pump out say javascript, ruby, python, and scheme backends. so suddenly there are new implementations p6ruby, p6python, etc. what are the resulting community social dynamics? the scheme folks have so many implementations the probably wont care. though #perl6 may see some | 13:44 | ||
gaal | resulting community social dynamics? I don't know, world peace maybe? | 13:45 | |
putter | well, condescending remarks about syntactic complexity etc (I have particular people in mind;). the ruby folks will be happy as long as it's a really conforming implementation. what about the python folks? "we're not perl" has been their mantra for a decade. I don't have a feel for how that will play out. or more importantly, what we can | 13:47 | |
do to help it play out nicely. | |||
re world piece, err, peas, err, peace. I'd be ecstatic if we can just start writing "interesting" software systems. what we've got now is still soo mid-1970's. | 13:49 | ||
gaal | I honestly don't know. In any case it's not like the code generated to high-level languages is very readable; this looks to be useful in programmatic slurpage of code, where original language is sorta hidden away anyway | 13:50 | |
putter | err, huh? | 13:51 | |
gaal | hmm, you mean consuming code from cpan in other languages? | 13:52 | |
sorry my brain is being drained by it being cold and my not having eaten lunch | |||
I'll probably make more sense after I take a break :) | 13:53 | ||
putter | oh, no. use Language::JavaScripdt::OnPerl6; ... eg, misc/JavaScript-FrontEnd/ . actually, I'd like pugs to eventually do file suffixes, so pugs foo.py does the right thing. | 13:54 | |
is it a python implementation? is it p6? if you're a pythonista, do you care? | 13:55 | ||
pugs -MLanguages::AutoFileHandling foo.js bar.py hee.rb -e 'say "wow"' | 13:56 | ||
gaal | how do objects get bridged among languages? | 13:57 | |
robkinyon starts waving his hands a lot in gaal's direction | 13:58 | ||
gaal | fwiw there are a number of python implementations available | ||
13:58
Limbic_Region joined
|
|||
gaal dodges and decides this is a good time for that break | 13:59 | ||
robkinyon | gaal: Actually, there was a discussion last night between stevan and luqui about that topic | ||
well, a closely-related one, at any rate | |||
gaal | bbiab :) & | ||
theorbtwo | Gah. | 14:02 | |
Building pugs is taking approx 3 years on my system. | |||
...and it's not that weak a system, either. | |||
Limbic_Region | theorbtwo - how much free memory does it have? | 14:03 | |
putter | gaal: adapter methods? even in a pure p6 context, I'd like to be able to say "in this lexical scope, .nth($n) on Foo should result in a call to the underlying .nth with $n+1 ("baaaad silly 1-based indexing CPAN module"). or ".foo means .bar", etc. | ||
theorbtwo | Woo, done! | ||
putter wants complete control of his namespace. the ability to correct for CPAN modules with brain-dead apis. | |||
integral | ghc still seems to need >500MB on AST.Internals and the precomp prelude | ||
theorbtwo | Around half a gig. | 14:04 | |
449,948 kB of real mem free, says free. | |||
putter | non-trivial. | ||
later & | 14:05 | ||
theorbtwo | dresden-ocl.sourceforge.net/aboutproject.html | 14:06 | |
Hm, ./pugs -CPIL2-Perl5 -e 'say "this is a test"' gives only one PPos, but -CPIL2 (with no dash) has two MkPos. | 14:13 | ||
14:16
SamB joined
14:37
peacock joined
14:39
calanya joined
14:53
hcarty joined
14:58
iblechbot joined
15:05
gantrixx joined
15:26
justatheory joined
15:30
Eimi joined,
lisppaste3 joined
15:38
rantanplan_ joined
|
|||
gantrixx | do any of you guys ever talk to Larry Wall? | 15:50 | |
theorbtwo | @Larry, also known as the Cabal, has a weekly conference call, and $Larry posts to the mailing lists fairly often. | 15:52 | |
gantrixx | As a linguist, I was wondering if he thought english was the best language to base a programming language off of | 15:53 | |
I wonder if we will ever have a hindi or mandrin based programming language | 15:54 | ||
or perhaps it should be esperanto based | |||
theorbtwo | (1) I think it's more based on human languages in general then on English in specific. | ||
(2) Ruby? | |||
gantrixx | Ruby is none english? | 15:55 | |
theorbtwo | Ruby's primary author is Japanese. | ||
gantrixx | Take Perl for example, all the key words are english based | ||
theorbtwo | Oh. | ||
gantrixx | if, print, has, return | ||
theorbtwo | That's not so much a matter of it being "based on english". | ||
It's a matter of convience. | 15:57 | ||
gantrixx | the key words are based on english | ||
GeJ | considering that 99% of all the programmers in the world speak more or less english, english seems a defacto language for syntax keywords in programming languages. | ||
theorbtwo | sh does it less -- it's if...fi, case...esac. That's horrid. | ||
wolverian | GeJ, where did you get that figure? | ||
gantrixx | and yes, even the grammars are based in english | ||
theorbtwo | There used to be localized versions of visual basic. They were horrible. | ||
Some microsoftie did a great blog entry on that. | |||
gantrixx | that is chicken and the egg though | 15:58 | |
theorbtwo | Documentation would have to be even more translated. Communities would be even more fragmented. | ||
gantrixx | most programmers speak english because they have to | ||
because the majority of the programming technology is based in english | |||
theorbtwo | A hardly-insignificant number speak English because it's the most common language in the world. | ||
GeJ | wolverian: inhouse statistics... we have polish, slovak, french, german, chili(an?), american and autrian people here, and all of them grok PBP. :) | 15:59 | |
gantrixx | english is the most spoken language in the world, but it is not the most widely spoken native language | ||
english is the new latin | |||
you used to have to know latin to study any of the sciences | |||
now you need english | |||
theorbtwo | You hardly have to speak English at a native level to be able to undertand if a=1 then print "Ja" else print "Nein" | 16:00 | |
gantrixx | the language du jour basially depends on who the current world power is | ||
si a == 1 entonces escribe "Ja" | 16:01 | ||
and you hardly have to speak spanish to understand that | |||
wolverian | Lingua::Perligata :) | ||
theorbtwo | And, indeed, I can follow it just fine, even though I hardly speak Spanish. | ||
wolverian | er, s/::/::Romana::/ | ||
gantrixx | it's completely arbitrary. the question is if you wanted to make it a non-arbitrary design decision would you base it upon multiple languages, the dominant language, or a common language | 16:02 | |
if the s in s/this/that/ is based in english (substitute) | |||
theorbtwo | gantrixx: It's worth noting that Ruby was written with English keywords, even though it was written in Japan by a Japanese man. | 16:03 | |
What does the y in y/-/_/ stand for? | |||
gantrixx | I don't know y | ||
I don't think I've ever used y | |||
wolverian | it stands for tr ;) | 16:04 | |
theorbtwo | Everybody uses tr///, because y/// doesn't stand for anything. | ||
(Except when you're golfing -- trying to do a task in as few keystrokes as possible.) | |||
What does the x in " " x $indent stand for? | 16:05 | ||
gantrixx | do it that many times | ||
theorbtwo | Eh? | ||
gantrixx | print $indent number of spaces | ||
theorbtwo | Yes, but what does the "x" stand for? | ||
gantrixx | times | ||
theorbtwo | Exactly. | 16:06 | |
16:06
eric256_ joined
|
|||
gantrixx | x is commonly recognized in mathematics as times | 16:06 | |
theorbtwo | It's not the language that they come from that's important, it's that the symbols are as fimilar as possible to the target audience. | ||
Most of the time, when writing a new programming language, that audience is programmers. | |||
gantrixx | or the fact that we write our code from left to right reflects western languages | 16:07 | |
theorbtwo | ...who are already fimilar with "if", even if they aren't English. | ||
gantrixx | perhaps if the arabs had a programming language it would be right to left | ||
or the chineese top to bottom | |||
Limbic_Region | gantrixx - your original question doesn't appear to be the one you are actually asking though | ||
the programming language is not modeled from a single spoken/written language | 16:08 | ||
theorbtwo | Except left-to-right isn't as clear as you think it is. | ||
gantrixx | my original question was, in essense, is english the best language for basing a programming language off of | ||
theorbtwo | In sin(exp(2)), the sin is evaluated /last/. | ||
Limbic_Region | right - but keywords and syntax are two completely different things | ||
you appear to be concerned with keywords and not syntax | |||
theorbtwo | ...and in perl you can write for (1..$_) {print "foo"} or print "foo" for 1..$_. | 16:09 | |
integral | ((constant 2) >>> exp >>> sin) `app` _|_ | ||
theorbtwo | I'm not aware of any human languages that read bottom to top. | ||
integral: ==> became >>>? | 16:10 | ||
gantrixx | in Perl I also write "my $a;" and not "$a mi" | ||
integral | theorbtwo: haskell, but yeah, s/>>>/==>/ and you get perl6 mostly, but you can then drop the lift and the apply | ||
gantrixx | so it is based off the english grammar that posessive pronouns come before the noun | ||
although Perl does allow some flexibility with some of it's grammar, it is still based on english grammar and english key words | 16:11 | ||
theorbtwo | Yes, it is. | ||
16:11
penk left
|
|||
theorbtwo | I think that's for the best, given the current state of the world. | 16:11 | |
Not only that, but it's a "best" with /huge/ inertia. | |||
Hm, on second thought, it's a state. | |||
16:11
elmex joined
|
|||
gantrixx | you sound like you work for Microsoft | 16:12 | |
"we are the best, because we are the biggest" | |||
theorbtwo | In some cases, it's true. | ||
eric256_ | isn't english generaly the chosen langauge of science in general? (/me could be 100% wrong there but i thought i read that somehwere) | ||
gantrixx | OK, so IE is the best because more people use it than Firefox | ||
English is the language choosen because there are the most jobs in english | 16:13 | ||
eric256_ | gantrixx if you want to talk to the most people and the most people speak one langauge, then you speak that language. thats simple logic | ||
theorbtwo | If I were writing a language specificly to be taught to 4th graders in Mexico, then I would possibly spec it in spanish, and use spanish grammar and keywords. | ||
If I'm writing a language to be used by programmers, I'll do it in English. | |||
eric256_ | you are mixing uses of best. enlglish might be the 'best' because its most common, not becuase its best suited. | ||
gantrixx | exaclty, so why don't we program in language based off mandrin chineese? | ||
certainly there are more native mandrin speakers than english speakers | 16:14 | ||
theorbtwo | It might be. OTOH, I doubt you'll find a language better suited -- none of them are purticularly well suited, I'm going to guess. | ||
stevan | gantrixx: cause it's hard to get a keyboard with mandrin characters here in the US :) | ||
eric256_ | are there more native mandrin programmers though? | ||
gantrixx | so my question is, should the language be based off who ever is economically dominant at the time, or should science (and computer science) have a universal language | ||
should we all give up our native language and speak one universal science language | 16:15 | ||
theorbtwo | It does, to a large extent. | ||
gantrixx | ? | ||
theorbtwo | That language is C. | ||
eric256_ | science and programming do have a universal language, it just happens to be the most economically dominant currently ;) | ||
gantrixx | and C isn't based off of english? | ||
theorbtwo | Not terribly much. | ||
A few keywords. | |||
But that it is is independent. | 16:16 | ||
gantrixx | key words, and grammar too | ||
eric256_ | and many of those keywords don't mean the same thing to english speakers as they do to programmers ;) | ||
theorbtwo | It's not English that's the standard, it's C. | ||
gantrixx | and all the computer technologies all have english names as well | ||
rantanplan_ | Hehehe, but you can program Perl in Latin ;) | ||
theorbtwo | ...and you overestimate how much C is like English. | ||
For example, English-speakers commonly put if clauses at the end of the senence. | 16:17 | ||
That's completely illegal in C. | |||
gantrixx | I agree there is more mathematical "language" in most programming languages and mathematics tends to be a universal science language | ||
but you can't deny the fact that most programming languages were written by westerners and based off english | |||
theorbtwo | If I have seen further then others, it is by standing on the shoulders of giants. | 16:18 | |
eric256_ | why would we deny it? and why is that a bad thing? | ||
you seem to have a beef not a question | |||
gantrixx | no, it's not a beef, it was a question | 16:19 | |
I was wondering what a linguist such as Larry Wall thought | |||
theorbtwo | I think if you want to completely change all known syntax and keywords, go ahead -- perl 6 will make it easy. | ||
But nobody will use it. | |||
16:19
vel__ joined
|
|||
gantrixx | but others wanted to discount the fact that programming languages are based off english, so I just defended my assertion | 16:19 | |
theorbtwo | Programmers think in terms of function(arguments), because they've used other programming languages, and because they've used math. | 16:20 | |
gantrixx | I don't want to. My native language is english | ||
theorbtwo | Is it better then (arguments)function? Not really. Is it worse? Nope. | ||
wolverian | first_argument.function(more_arguments) # :) | ||
eric256_ | (@arguements) ==> function; | 16:21 | |
gantrixx | and most comments tend to be in english in source code | 16:22 | |
wolverian | put function applied to @arguments to @results; # yay! | ||
eric256_ | i would disagree on that, i've found plenty of code with what i assume was german commenting | ||
theorbtwo | gantrixx: That hasn't purticularly been my experince. | ||
eric256_ | and some with spanish variable names, now that can be fun to decipher ;) | ||
gantrixx | perhaps you guys work with different code bases than I | 16:23 | |
I have seen several HOW-TOs in german, but rarely do I see source code comments in anything but english | 16:24 | ||
how many people here are non-native english speakers? | 16:25 | ||
wolverian | I am. | ||
gantrixx | what is your native language? | 16:26 | |
theorbtwo | Audrey isn't here at the moment, but she is. | ||
wolverian | gantrixx, Finnish. | ||
16:32
avar joined
|
|||
ingy | seen audreyt | 16:55 | |
jabbot | ingy: audreyt was seen 23 hours 17 minutes 21 seconds ago | ||
16:57
Southen_ joined
|
|||
eric256_ | seen eric256 | 17:04 | |
jabbot | eric256_: eric256 was seen 3 days 22 hours 48 minutes 33 seconds ago | ||
eric256_ | seen eric256_ | ||
jabbot | eric256_: eric256_ was seen 5 seconds ago | ||
eric256_ wonders how he alawys ends up with that darn _ | |||
Limbic_Region | eric256 - likely your client automatically reconnects (or you do) quickly | 17:12 | |
if you have lost connection but the IRC server doesn't know it and you reconnect, your client automatically appends the _ as eric256 is still logged in as far as the server is concerned | 17:13 | ||
eric256_ | stupid computers ;) | ||
Supaplex | artifical inteligence has a funny aftertaste don't it? :) | 17:14 | |
pdcawley_ | Mmm... I spy some hard reading ahead, TaPL just arrived... | 17:15 | |
Limbic_Region | . o O ( TaPL ? ) | 17:22 | |
Types and Programming Languages | |||
pdcawley_ grins, bingo! | 17:24 | ||
eric256_ | is that a book then? | 17:25 | |
pdcawley_ | Yes. | 17:26 | |
GeJ | a painful one... | 17:28 | |
not only it is big, but reading it hurts. | |||
Well, in my case. | |||
eric256_ | hey, since p6 supports lazy lists.. could you then define a list as the function that produces it? | 17:29 | |
my @fib = iterator { $_[-2] + $_[-1] }; | |||
well with better fibonacii code than that (more specificaly code that works. ;)) | 17:30 | ||
Limbic_Region | eric256_ - my guess is that is not something that will (or should) be supported in the core language | 17:32 | |
there is just way to many things to have a sane DYMism | 17:33 | ||
OTOH, I think the core language should allow subclassing of the array class easily enough for you to roll your own and make your own DWYM | |||
eric256_ - have you read my tutorial/article on iterators? | 17:34 | ||
eric256_ | no | ||
in the pugs tree? | |||
i know i've seen code on perlmonks for lazy lists in p5...they had to be treated special....arg | 17:39 | ||
clkao | 8/win 28 | 17:42 | |
17:48
nothingmuch joined
17:53
G2 joined
|
|||
Limbic_Region | sorry - work | 17:54 | |
eric256_ see www.perl.com/pub/a/2005/06/16/iterators.html | |||
fwiw - you can change your nick by typing /nick <new handle> | 17:55 | ||
ric256 | is now known as eric256 | 17:57 | |
eric256 | work is evil ;) | 17:58 | |
17:58
Lartuv joined
18:01
broquaint left
|
|||
tewk | Is there a recommended REPL shell for Perl5? | 18:11 | |
theorbtwo | perl -de1 | 18:15 | |
kane_ | seen audreyt | 18:30 | |
jabbot | kane_: audreyt was seen 1 days 52 minutes 22 seconds ago | ||
18:30
Ovid joined
|
|||
Limbic_Region | From a reply to Guido Van Rossum's blog "Can a language be functional, declarative, procedural, OO, statically typed, late binding, uncle tom cobley and all and remain easily accessible or shall we admit that there is not one ring to bind them all" | 18:30 | |
is it possible that not everyone has heard of Perl6 yet? | 18:31 | ||
integral | Sounds like he has... | 18:34 | |
18:49
elmex joined
18:54
Qiang joined
18:59
G2 joined
19:16
hexmode joined
19:19
ycheng_ joined
|
|||
gantrixx | Actually, I don't think that many people know about Perl6 | 19:46 | |
it would be cool if /. or LugRadio started covering it | 19:47 | ||
Khisanth | no it wouldn't! | 20:03 | |
20:04
putter joined
|
|||
putter | Does anyone know off hand if invocants are automatically rw? I'm trying to reconcile Prim.hs and S29draft.pod: | 20:04 | |
\\n List pre pairs safe (rw!Array)\ | 20:05 | ||
multi Array::pairs (@array : MatchTest *@indextests --> Int|(List of Pair) ) | |||
Khisanth | would a rw invocant mean that calling a method could actually alter the invocant? as in $foo.bar(); # $foo is now a different object from before the call to bar() | 20:08 | |
putter | ? | ||
wolverian | that's how I would read it. what else can it mean? | 20:09 | |
putter | looks like PIL2JS lacks a rw for other methods (exists delete) Prim has as rw!Array. I'll leave it off and leave a comment. | ||
putter is assembling a composite Array.pm from assorted sources. | 20:10 | ||
Khisanth | wolverian: but that would be EXTREMELY suprising behavior | 20:16 | |
althought potentially "useful" in the right situation | 20:17 | ||
is there an AES for roles? | 20:23 | ||
wolverian | S12? | ||
svnbot6 | r8646 | putter++ | docs/AES/S29draft.pod - corrected typos - adverbs missing their colon. | 20:25 | |
r8645 | Darren_Duncan++ | r1927@Darren-Duncans-Computer: darrenduncan | 2006-01-13 02:40:06 -0800 | |||
r8645 | Darren_Duncan++ | [/ext/Rosetta|/ext/Rosetta-Engine-Native|/misc/Rosetta-Incubator] : incremented versions of all modules that have a pre-rewrite equivalent on CPAN, so these post-rewrite versions are kept higher than a new CPAN retroactive release due tomorrow that uses the pre-rewrite versions | |||
putter | err, what does this mean? &Array::pop<Array> := &Array::splice<Array>.assuming(... what's the <Array> thing? | 20:27 | |
S29drarft.pod, but pugs doesn't like it. alternate implentation coming up... | 20:31 | ||
gaal | rehi | 20:35 | |
20:40
eric256 left
20:41
Qiang joined
|
|||
putter | hi gaal | 20:42 | |
gaal | heya | 20:45 | |
gaal battles indent levels | |||
putter puzzles over Array.pm code | 20:47 | ||
.[] should be postcircumfix, no? PIL2JS has it as prefix. puzzlement. | 20:48 | ||
gaal | putter: maybe it's comutative, like in c :-) | 20:49 | |
putter | oh I need to borrow a clue. ok, my understanding is postcircumfix:<[ ]> is array indexing. Prim.hs defines .[] as array indexing (note the "."). PIL2JS defines a prefix:<[.[]]> as array indexing. whaaaa?!? | 20:51 | |
gaal: :) | 20:52 | ||
gaal | putter: I think that's so you can chain lookups, as in | 20:53 | |
$x = { a => b => c => d => 42 }; say [.{}] $x <a b c d e> | 20:54 | ||
putter | is it just a short form for say [postcircumfix:<{ }>] ..., or is the associativity actually different? | 20:56 | |
gaal | dunno | 20:57 | |
ingy | has guido submitted any patches? | 20:58 | |
20:58
dduncan joined
|
|||
gaal | ingy: to pugs? I think he declined the invite. | 20:58 | |
ingy | really? | ||
putter | bah. mission creep. I do not need to understand, merely cut, paste, and comment. thanks gaal ;) | ||
ingy | bummer | ||
putter | maybe once pugs is running python... | ||
gaal | putter: what primary benefit do you see for non-p6 frontends to pugs? (as opposed to, say, parrot) | 21:00 | |
(not contesting of course; it's just that I hadn't actually considered this clearly till today) | |||
putter | the world is full of code. I want to be able to run it without caring what language it is written in. I wish to escape the maze of twisty little passages which is software engineering, where when you need n components, there are always pointless constraints which | 21:03 | |
prevent you from getting more than m of them at a time. where m is always strictly less than n. and discovering the constraints requires a backtracking crawl through design space. | 21:04 | ||
putter pauses for a deep breath ;) | |||
I want our field to not be so profoundly throughly broken. | 21:05 | ||
That's all. ;) | |||
gaal | putter: okay, but there's some overlap between this and parrot's goals | 21:07 | |
putter | yes | 21:10 | |
gaal | so specifically why do it in the pugs level? | ||
putter | though with a rather lower-level feel to it. custom coding language parsers in "assembly", rather than building wizzy Arrow based grammar mutators and parser tools. | 21:11 | |
21:12
elmex joined
|
|||
gaal | ah, if you want arrows pugs is the place to find them :-) | 21:13 | |
putter | grammar Language::JavaScripdt::Grammar::FireFox is Language::JavaScripdt::Grammar::ECMA3; GAP (algebra system) "yet another language" grammar is speced in BNF variant number three hundred fourty two. and can be converted to rules by BNF::Frobnicate. ... | 21:15 | |
gaal | ahhh you want it higher up than arrows, you want it in perl 6! | 21:16 | |
21:16
luqui joined
|
|||
gaal | that's too high up for me atm but I get glimpses of the appeal | 21:17 | |
morning luqui | |||
luqui | mornin' | ||
putter | use Perl6::PILN::Transformation::CPSConvert; ... | ||
putter ok, I'll stop then... :) | 21:18 | ||
gaal slinks off to some well charted haskell :-) | |||
putter | ooo, don't slink! | ||
luqui dislikes the Cont monad | 21:19 | ||
gaal unslinks | |||
putter | any annoyance in my tone is just years of frustration at a broken field. at being a shoemaker's child with broken crippled torn bloody gangrenous shoeless feet. | ||
gaal | putter: oh, I'm not scared off by the tone (or by the purpose)! just.. too wide for my brain,57 things at a time | 21:21 | |
putter | thank you for the opportunity to vent. and the reminder that it's "not completely obvious" what's needed. the old "my thesis now written seems obvious, so why finish it?" ;) | 21:22 | |
luqui | what the heck are you guys talking about? | ||
theses, shoemakers, 57 things... | |||
putter | why run python on pugs, rather than simply on parrot. | 21:23 | |
luqui | because it's easier to compile to pil than it is to pasm? | ||
putter | yes :) and manage the compilers as well. | 21:24 | |
luqui | also because python on JS would be cool... | 21:25 | |
svnbot6 | r8647 | Darren_Duncan++ | r1931@Darren-Duncans-Computer: darrenduncan | 2006-01-13 13:24:05 -0800 | ||
r8647 | Darren_Duncan++ | deleted /misc/Rosetta-Incubator, since the remnants it contains (SQLBuilder, SQLParser, Eng/Gen, Emu/DBI) have dubious value | |||
r8646 | putter++ | docs/AES/S29draft.pod - corrected typos - adverbs missing their colon. | |||
luqui ponders writing a JS compiler to pil; then we could run JS on JS! | 21:26 | ||
gaal | luqui: I think putter is working on that :) | 21:27 | |
luqui | oh, seriously? | ||
luqui reads over S29, never having done so before | 21:28 | ||
putter | misc/JavaScript-FrontEnd/ ! the grammar is as yet untested (only root level rules currently work in pugs). one could flatten it and test! the runtime and compiler is largely an automated transform on the spec. I havent been keeping the checkedin copy in sync. interested?! | ||
;) | 21:29 | ||
luqui | wow | ||
not really. | |||
but wow, cool | |||
In addition, the list of functions imported into C<::*> will be | 21:30 | ||
subject to change with each release of Perl. | |||
is that a blessed policy? | |||
putter | ah well. the general observation is just that its very easy to do language implementations when your target environment capabilities are a strict superset of the language being implemented. | ||
it would be neat if one could do use Perl3.02; ... ;) | 21:32 | ||
stevan tosses some LISP into the room and runs out the door | |||
sial.org/pbot/15425 | |||
luqui | yeah, "neat" | ||
stevan really needs a new hobby | 21:33 | ||
putter | lol | ||
gaal notices it's been a while since stevan made a movie | 21:34 | ||
stevan wonders how got a hold of those video tapes? I thought I hid them better | 21:35 | ||
putter | fun code. I'd actually really like to have CL front and backends. | ||
stevan | I am really digging CL right now | ||
luqui | I expect that those would not be that hard to implement | ||
at least the frontend | |||
stevan | luqui: it would probably be really easy to make PIL^N VM in it too | 21:36 | |
putter | I have most of a R5RS scheme on p5 I occasionally putter on. "SchemeOn". tiny p5 kernel and a scheme->p5 transliterator written in scheme. and everything else. biggest challenge was gathering together clean scheme-written-in-scheme code fragments. it was quite a zoo. | 21:38 | |
CL might be better. hopefully much better. todo list item is to check out SBCL's code base more closely. | |||
stevan suspects putter might need another hobby even moreso than stevan :) | 21:39 | ||
putter | let's do it! well, we need piln for it to run. but the gathering CL code can be done ahead of time. | 21:40 | |
putter is engaging in job search avoidance. | |||
:( | |||
clkao | smoke still broken | 21:41 | |
pugs: *** Can't locate Test.pm in @*INC (@*INC contains: blib6/lib /usr/local/lib/perl6/mach /usr/local/lib/perl6 /usr/local/lib/perl6/site_perl/mach /usr/local/lib/perl6/site_perl /usr/local/lib/perl6/auto/pugs/perl6/lib /usr/local/lib/perl6/site_perl/auto/pugs/perl6/lib .). everywhere | |||
stevan is off to parts-unknown & | |||
putter | bye stevan & | ||
gaal | clkao: multi subs still not exported | ||
but that error shouldn't happen | |||
clkao | why isn't test.pm in lib6 | 21:42 | |
gaal | blib6/lib | ||
should be | |||
clkao | there's only blib6/lib/Test | ||
gaal | worksforme... | 21:43 | |
blib6/lib/Test.pm you mean? that's ok | |||
or do you have blib6/lib/Test/lib ? | |||
blib6/lib/Test/ is for Test::Builder, not what you need | 21:44 | ||
you ought to have a Test.pm in blib6/lib | |||
clkao | no i don't | ||
gaal | du -s blib6 | ||
I have ~4.6M | 21:45 | ||
clkao | it's mostly empty. only .exist | ||
but there is some hierarchy | 21:46 | ||
gaal | clkao: what OS are you on? | ||
clkao | freebsd. same on darwin iirc. er, there's about 3M | ||
but no Test.pm under blib6/lib | 21:47 | ||
gaal | anyway to solve your immediate problem so you can smoke, please export PERL6LIB=ext/Test/lib | ||
21:47
brentp joined
|
|||
gaal | if you have time, look for errors in make, or try a really really clean copy, etc. | 21:47 | |
find blib6 | wc -l => 545 here | 21:48 | ||
clkao | too late, made realclean | 21:50 | |
i should sleep and leave it running | |||
it seems to do it. make now copies Test.pm | |||
how stupid is it | |||
anyway, thanks gaal | 21:51 | ||
zzz & | 21:52 | ||
gaal | night :) | ||
putter | does map work on an array's values, or its indexes (regardless of whether they .exist or not)? | 21:58 | |
luqui | good question | ||
given that there's no way to test existence within the body of map, I'd say its values | 21:59 | ||
but it's tricky | |||
gaal | when does an array's index not .exist? | ||
only when it's out of bounds, but then the map doesn't reach it. no? | |||
svnbot6 | r8648 | Darren_Duncan++ | r1935@Darren-Duncans-Computer: darrenduncan | 2006-01-13 13:57:10 -0800 | ||
r8648 | Darren_Duncan++ | /ext/Rosetta : updated Copying.pod to demote 4 packages out of the defined framework core; only 4 remain | |||
luqui | I think it's a bad idea to keep that distinction... | ||
perl -le 'my @a = (1,2,3); delete $a[1]; print exists $a[1]' | 22:00 | ||
putter | gaal: when one .delete($idx)s? I've no idea. | ||
Khisanth | but that should still exists | 22:01 | |
gaal | Khisanth: unless it was the last element, IIRC | 22:02 | |
Khisanth | yes | ||
22:02
kanru joined
|
|||
Khisanth | so you are modifying the array as you iterate over it? | 22:02 | |
gaal | it makes some sense to me, but I'm perlverted. | 22:03 | |
22:05
f3l joined
|
|||
putter | ha! S29 has an implementation I overlooked (woops). and the verdict is... | 22:05 | |
luqui | nobody possibly could have thought of this issue before | 22:06 | |
plus, for a description of the crazy inter-array existence semantics, see perl 5 (my example) | |||
putter | whatever *@array yields... | 22:07 | |
sigh | |||
the delete $a[1] example? why is that odd? ;) | 22:08 | ||
luqui | because $a[0] exists, $a[2] exists, but $a[1] doesn't | 22:09 | |
I know you know putter, I was responding to gaal and Khisanth | |||
gaal | well, it surprised me but I'm not surprised to be surprised. like I said, perlverted. | 22:11 | |
svnbot6 | r8649 | luqui++ | Minor editing on S29. | 22:14 | |
22:17
wilx joined
|
|||
putter | ooo, a S29 edit. putter goes to see... | 22:18 | |
leo_ | luqui: is above array.delete semantic also confirmed for p6? It looks weird to me - I thought it's like splice (no holes) | 22:21 | |
luqui | I sure hope not, it looks very weird to me too | 22:22 | |
but I think it hasn't been confirmed or denie | 22:23 | ||
d | |||
leo_ | it's absolutely senseless in combination of native types - there isn't a 'no int' - it's kust maybe zero | 22:24 | |
just 0 even | |||
luqui | Maybe 0, Just 0, but maybe it's Nothing... | ||
hmm... Maybe 0... the type of things that might have type 0 | 22:25 | ||
luqui smacks himself in the monads with a lambda (and is getting rather accustomed to doing that) | |||
leo_ | well, native types don't have anything like nothing | 22:26 | |
luqui knows | |||
luqui was just being silly... | |||
I'll fire off a message to p6l about array holes | |||
not that we can hope to get a response from $Larry because he's busy | |||
leo_ | thanks | 22:28 | |
putter thought he had just finished with Array. luqui++ just changed the signatures. :) such is life. | |||
luqui | just cosmetic stuff though, like CALLER<$_> to $+_ | 22:29 | |
gaal | (enviroment vars)++ | ||
luqui | ditto | ||
putter | luqui: what's wrong with the Array::pairs etc signatures? | 22:33 | |
luqui | the reason I said XXX wrong is because we're not sure what's right yet | ||
but it has to do with contextual multi dispatch | 22:34 | ||
those probably suffice for descriptive purposes, but certainly not for implementation purposed | |||
s/sed/ses/ | 22:35 | ||
putter | ok. do they run? never mind. I'll have to check the whole file. another day. | ||
22:45
sproingie joined
22:46
Limbic_Region joined
|
|||
svnbot6 | r8650 | putter++ | src/PIL/misc/prelude/Array.pm - Created. The beginnings of a p6 Prelude for piln. Combines code from PIL2JS, Prim.hs, S29draft, etc. Intended to help bootstrap piln. | 22:48 | |
r8650 | putter++ | Todo: Finish up Array.pm coverage. Then test it, and write alternate implementations for anything pugs currently chokes on. Then on to List, et al. Err, "Help!". ;) | |||
putter | luqui - S29 doesnt actually say whether keys, kv, etc return List or Array. List? | 22:53 | |
no, I have that wrong. | 22:54 | ||
I guess I was just confused. tnx. | |||
gaal | I think it's Juerd that likes to point out that you can't return Arrays in Perl, just items or lists. | 22:55 | |
s/that/who/ | |||
22:57
Supaplex joined
|
|||
putter | ah. though with auto-refifying, it sure looks like you do. ;) | 22:59 | |
svnbot6 | r8651 | putter++ | misc/prelude/Array.pm - fix some return types. | ||
gaal | putter: indeed | ||
good thing at least that we no longer call it "scalar" context! | 23:00 | ||
putter | <chuckle> indeed | 23:02 | |
23:08
beppu joined
23:14
binary42 joined
23:15
bpalmer joined
23:19
dduncan left
|
|||
putter | loqui: along the lines of your removing the <Array>'s, should &join<> := &join<Str>.assuming:delimiter(' '); be &join := &join.assuming:delimiter(' '); ? | 23:24 | |
loqui: and is there a reason map and reduce use different conventions for their Code arguments? | 23:27 | ||
duh. sorry. | 23:29 | ||
luqui: two questions above, misidentified loqui. end of a long week. | 23:30 | ||
23:30
lisppaste3 joined
|
|||
luqui | re map and reduce: looks like an oversight to me. they should both be like reduce | 23:34 | |
putter, re <Array>s, the &foo<Bar> syntax is no longer correct; it is &foo:(Bar) | |||
I think... | 23:35 | ||
in any case, you shouldn't be currying the variant but the operation as a whole | |||
svnbot6 | r8652 | gaal++ | * Pugs.Prim.Yaml - very minor golfage | ||
luqui | and IMO, things like join, map, etc. shouldn't be multis in the first place | ||
but that's something I have to argue with @Larry about | |||
putter | thanks! And I assume multi Lists::zip should be multi List::zip (singular)? | 23:37 | |
svnbot6 | r8653 | gaal++ | Pugs.Parser - | 23:38 | |
r8653 | gaal++ | * Introduce Pugs.Parser.Export, because 3 is better than 7 when it comes | |||
r8653 | gaal++ | to indent levels. | |||
gaal | hmm, *2* is better than 7 even. | 23:39 | |
since I can't count, perhaps I should go to sleep. | 23:40 | ||
putter | lol :) | 23:41 | |
gaal | btw this still segfaults for me: | 23:42 | |
?eval say "mmm" if "a" ~~ /a/ | |||
(evalbot's dead?) | 23:43 | ||
putter | embedded or external parrot? | ||
gaal | anymoose, it's late. see you tomorrow in releng! | ||
zzZ & | |||
putter | good night gaal & | ||
svnbot6 | r8654 | putter++ | AES/S29draft.pod - additional tweaks. | 23:51 | |
putter | luqui: should | 23:52 | |
multi Array::grep (@values, MatchTest $test --> Lazy ) | |||
instead be | |||
multi Array::grep (@values: MatchTest $test --> Lazy ) | |||
? | |||
23:59
scook0 joined
|