Re: Do slurpy parameters auto-flatten arrays?

2005-07-27 Thread TSa (Thomas Sandlaß)
Ingo Blechschmidt wrote: Hi, ReHi, are the following assumptions correct? I don't know in general. But see my assumptions below for comparison. They are derived from my type theoretic approach and as such might collide with Perl6's referential semantics. In particular with the

block owner, topic and the referential environment

2005-07-27 Thread TSa (Thomas Sandlaß)
This is another spin-off from the 'Exposing the Garbage Collector' thread. Here is an enhanced version. I wonder how the generic, lexically scoped invocant/owner is called. I propose to call it $/ (other option is to call it $)and let the former topicalizer become block owners and $_ the block

Re: Do slurpy parameters auto-flatten arrays?

2005-07-27 Thread Luke Palmer
On 7/26/05, Ingo Blechschmidt [EMAIL PROTECTED] wrote: Hi, are the following assumptions correct? sub foo ([EMAIL PROTECTED]) { @args[0] } say ~foo(a, b, c); # a Yep. my @array = a b c d; say ~foo(@array);# a b c d (or a?) say ~foo(@array, z); # a b c

Re: Exposing the Garbage Collector (Iterating the live set)

2005-07-27 Thread Luke Palmer
On 7/26/05, TSa (Thomas Sandlaß) [EMAIL PROTECTED] wrote: Piers Cawley wrote: I would like to be able to iterate over all the objects in the live set. My Idea actually is to embedd that into the namespace syntax. The idea is that of looking up non-negativ integer literals with 0 beeing

Re: Exposing the Garbage Collector (Iterating the live set)

2005-07-27 Thread TSa (Thomas Sandlaß)
Luke Palmer wrote: On 7/26/05, TSa (Thomas Sandlaß) [EMAIL PROTECTED] wrote: Piers Cawley wrote: I would like to be able to iterate over all the objects in the live set. My Idea actually is to embedd that into the namespace syntax. The idea is that of looking up non-negativ integer

Messing with the type heirarchy

2005-07-27 Thread Luke Palmer
http://repetae.net/john/recent/out/supertyping.html This was a passing proposal to allow supertype declarations in Haskell. I'm referencing it here because it's something that I've had in the back of my mind for a while for Perl 6. I'm glad somebody else has thought of it. Something that is

Re: The Use and Abuse of Liskov

2005-07-27 Thread Luke Palmer
On 7/19/05, Damian Conway [EMAIL PROTECTED] wrote: And now maybe you see why I am so disgusted by this metric. You see, I'm thinking of a class simply as the set of all of its possible instances. There's your problem. Classes are not isomorphic to sets of instances and derived classes

Elimination of Item|Pair and Any|Junction

2005-07-27 Thread Autrijus Tang
On Fri, Jul 22, 2005 at 03:40:34PM -0700, Larry Wall wrote: I dunno. I'm inclined to say that it should default to Item|Pair, and let people say Any explicitly if they really want to suppress autothreading. Otherwise conditionals and switches are going to behave oddly in the presence of

Re: The Use and Abuse of Liskov (was: Type::Class::Haskell does Role)

2005-07-27 Thread Luke Palmer
I just realized something that may be very important to my side of the story. It appears that I was skimming over your example when I should have been playing closer attention: On 7/18/05, Damian Conway [EMAIL PROTECTED] wrote: Consider the following classes: class A {...}

Re: Messing with the type heirarchy

2005-07-27 Thread Aankhen
[sorry Luke, I hit Send too soon] On 7/27/05, Luke Palmer [EMAIL PROTECTED] wrote: There is probably a better word than contains. I was thinking set theory when I came up with that one. What about derives? Aankhen

Re: Messing with the type heirarchy

2005-07-27 Thread Ingo Blechschmidt
Hi, Luke Palmer wrote: http://repetae.net/john/recent/out/supertyping.html This was a passing proposal to allow supertype declarations in Haskell. I'm referencing it here because it's something that I've had in the back of my mind for a while for Perl 6. I'm glad somebody else has

execution platform object? gestalt?

2005-07-27 Thread Randal L. Schwartz
With the recent realization of the beginnings of a PIL-Javascript emitter, it appears that my Perl6 program can run in a bizarre mix of execution environments. Forgive me if I missed this while trying to skim through the unearthly number of perl6 messages so far, but... It'd be nice if there

Re: Messing with the type heirarchy

2005-07-27 Thread Luke Palmer
On 7/27/05, Ingo Blechschmidt [EMAIL PROTECTED] wrote: Luke Palmer wrote: role Complex does Object contains Num {...} I've probably misunderstood you, but...: role Complex does Object {...} Num does Complex; # That should work and DWYM, right?

Re: Messing with the type heirarchy

2005-07-27 Thread TSa (Thomas Sandlaß)
HaloO, Ingo Blechschmidt wrote: I've probably misunderstood you, but...: role Complex does Object {...} Num does Complex; # That should work and DWYM, right? My 0.02: Complex should provide e.g. a + that, when called with two Nums, doesn't bother the return value to carry on a

Re: execution platform object? gestalt?

2005-07-27 Thread TSa (Thomas Sandlaß)
Randal L. Schwartz wrote: This is similar to the OS-9's gestalt tables, which got smarter as the operating system had more features, but was a consistent way to ask do we have a color monitor here?. Is something like this already planned? From my bubble in the Perl6 Universe this thing is an

[perl #36647] 'make languages' should continue after building a language failed

2005-07-27 Thread Jerry Gay via RT
leo's fix (r8695) works just fine on windows :) but what is all this .dummy business? tcl: tcl.dummy tcl.dummy: - $(MAKE_C) tcl tcl.test: - $(MAKE_C) tcl test tcl.clean: - $(MAKE_C) tcl clean can't that just be tcl: - $(MAKE_C) tcl etc. ~jerry

Re: [perl #36647] 'make languages' should continue after building a language failed

2005-07-27 Thread Will Coleda
This is because there's a directory called tcl. Since the directly already exists, there'd be nothing to make. Picking a dummy target like this is a way to force the target to always be built, regardless. On Jul 27, 2005, at 10:00 AM, Jerry Gay via RT wrote: leo's fix (r8695) works just

Re: [perl #36647] 'make languages' should continue after building a language failed

2005-07-27 Thread Matt Fowles
Will~ Doesn't make have something called PHONY to handle that exact case? Matt On 7/27/05, Will Coleda [EMAIL PROTECTED] wrote: This is because there's a directory called tcl. Since the directly already exists, there'd be nothing to make. Picking a dummy target like this is a way to force

Re: [perl #36647] 'make languages' should continue after building a language failed

2005-07-27 Thread Will Coleda
I believe that .PHONY is a gnu-make ism, and for now, we at least have to support nmake, and Solaris's /usr/ccs/bin/make, etc. According to http://www.bell-labs.com/project/nmake/faq/gmake.html nmake has something similar called .VIRTUAL - someone could abstract out the makefile-specifics

Re: execution platform object? gestalt?

2005-07-27 Thread Larry Wall
On Wed, Jul 27, 2005 at 07:09:41AM -0700, Randal L. Schwartz wrote: : With the recent realization of the beginnings of a PIL-Javascript : emitter, it appears that my Perl6 program can run in a bizarre mix of : execution environments. : : Forgive me if I missed this while trying to skim through

Re: Elimination of Item|Pair and Any|Junction

2005-07-27 Thread Larry Wall
On Wed, Jul 27, 2005 at 08:01:25PM +0800, Autrijus Tang wrote: : On Fri, Jul 22, 2005 at 03:40:34PM -0700, Larry Wall wrote: : I dunno. I'm inclined to say that it should default to Item|Pair, and : let people say Any explicitly if they really want to suppress autothreading. : Otherwise

Re: Elimination of Item|Pair and Any|Junction

2005-07-27 Thread Matt Fowles
Larry~ On 7/27/05, Larry Wall [EMAIL PROTECTED] wrote: On Wed, Jul 27, 2005 at 08:01:25PM +0800, Autrijus Tang wrote: : On Fri, Jul 22, 2005 at 03:40:34PM -0700, Larry Wall wrote: : I dunno. I'm inclined to say that it should default to Item|Pair, and : let people say Any explicitly if

Re: Elimination of Item|Pair and Any|Junction

2005-07-27 Thread Autrijus Tang
On Wed, Jul 27, 2005 at 12:19:10PM -0400, Matt Fowles wrote: While we are talking about words... I dislike having Object encompass Juction. I get the feeling that some people will write functions that take Objects and not expect Junctions to slip in. I suppose that could be one of those

Re: Elimination of Item|Pair and Any|Junction

2005-07-27 Thread TSa (Thomas Sandlaß)
HaloO, Larry Wall wrote: Yes. The only thing I don't like about it is that any() isn't an Any. Maybe we should rename Any to Atom. Then maybe swap Item with Atom, since in colloquial English you can say that pair of people are an item. Since we are in type hierachies these days, here's my

Re: Messing with the type heirarchy

2005-07-27 Thread Larry Wall
On Wed, Jul 27, 2005 at 11:00:20AM +, Luke Palmer wrote: : Let's say that Perl 6 does not provide a complex number class by : default. How would you go about writing one? Well, let's do the : standard Perl practice of making words that your users are supposed to : say in their code roles. :

Re: Elimination of Item|Pair and Any|Junction

2005-07-27 Thread Larry Wall
On Wed, Jul 27, 2005 at 06:28:22PM +0200, TSa (Thomas Sandlaß) wrote: : Since we are in type hierachies these days, here's my from ::Any : towards ::All version. That's pretty, but if you don't move Junction upward, you haven't really addressed the question Autrijus is asking. We're looking for

Re: Elimination of Item|Pair and Any|Junction

2005-07-27 Thread Mark A. Biggar
Larry Wall wrote: On Wed, Jul 27, 2005 at 06:28:22PM +0200, TSa (Thomas Sandlaß) wrote: : Since we are in type hierachies these days, here's my from ::Any : towards ::All version. That's pretty, but if you don't move Junction upward, you haven't really addressed the question Autrijus is asking.

Re: Elimination of Item|Pair and Any|Junction

2005-07-27 Thread Autrijus Tang
On Wed, Jul 27, 2005 at 09:12:00AM -0700, Larry Wall wrote: Yes. The only thing I don't like about it is that any() isn't an Any. snip - Object - Mumble - Item - ...pretty much everything - Pair - Junction - num, int, str... Hrm. I

pmc syntax

2005-07-27 Thread Klaas-Jan Stol
hi, Is there any documentation about the complete syntax for pmc files when writing PMCs (this time in C)? I found genclass.pl and pmc2c.pl, but I couldn't find anything about all keywords that can be used. In particular, I wrote down some scenarios. Maybe there are some more cases than

Re: [perl #36647] 'make languages' should continue after building a language failed

2005-07-27 Thread Leopold Toetsch
On Jul 27, 2005, at 16:00, Jerry Gay via RT wrote: leo's fix (r8695) works just fine on windows :) IIRC bernhard's and ... but what is all this .dummy business? that is a thing I thought too several times. leo

Re: pmc syntax

2005-07-27 Thread Will Coleda
On Jul 27, 2005, at 4:00 PM, Klaas-Jan Stol wrote: hi, Is there any documentation about the complete syntax for pmc files when writing PMCs (this time in C)? I think that's technically the only way to write PMCs. (things written in PIR are Objects). And, as you've seen, pmc2c.pl is

Re: Elimination of Item|Pair and Any|Junction

2005-07-27 Thread Darren Duncan
At 9:12 AM -0700 7/27/05, Larry Wall wrote: Yes. The only thing I don't like about it is that any() isn't an Any. Maybe we should rename Any to Atom. Then maybe swap Item with Atom, since in colloquial English you can say that pair of people are an item. That would give us: - Object

Re: Elimination of Item|Pair and Any|Junction

2005-07-27 Thread Larry Wall
On Wed, Jul 27, 2005 at 12:19:10PM -0400, Matt Fowles wrote: : While we are talking about words... I dislike having Object encompass : Juction. I get the feeling that some people will write functions that : take Objects and not expect Junctions to slip in. I suppose that : could be one of those

Re: execution platform object? gestalt?

2005-07-27 Thread Uri Guttman
LW == Larry Wall [EMAIL PROTECTED] writes: LW Yes, but we just need to be careful not to recreate The Registry. LW We're looking more for a place for everything and everything in LW its place, but we're still trying to understand what that means. LW As you say, whatever we end up with

The meaning of returns

2005-07-27 Thread Autrijus Tang
Consider this: sub id (Any $x) returns Any { return($x) } sub length (Str $y) returns Int { ... } length(id(abc)); Under standard static subtyping rules, this call will perform three different typechecks: 1) abc.does(Any) # (abc as Str) === (Any $x) in id 2) $x.does(Any)

Re: Elimination of Item|Pair and Any|Junction

2005-07-27 Thread Autrijus Tang
On Thu, Jul 28, 2005 at 03:55:55AM +0800, Autrijus Tang wrote: Hrm. I thought the original motivation of forcing people to write Any|Junction was precisely to discourage people from accidentally write sub foo (Any $x) and have $x accept a Junction. In other words, any()

Re: [PATCH] recreatable shuffled tests for prove

2005-07-27 Thread demerphq
On 7/26/05, Michael G Schwern [EMAIL PROTECTED] wrote: On Tue, Jul 26, 2005 at 08:51:01AM -0300, Adriano Ferreira wrote: Instead of giving the seed for shuffling, the list can be predetermined with the Clist argument. $ prove -b -D -d -s --list=1,2,0,3,4 0 1 2 3 4 will run the same

Re: The meaning of returns

2005-07-27 Thread Autrijus Tang
On Thu, Jul 28, 2005 at 05:03:05AM +0800, Autrijus Tang wrote: Hence, it seems to me that there are only four ways out: Some annotations copied from discussion in #perl6: A) Omit the #3 check from compile time; at runtime, use the actual type of $x. The returns type annotation will

Re: execution platform object? gestalt?

2005-07-27 Thread Larry Wall
On Wed, Jul 27, 2005 at 04:27:15PM -0400, Uri Guttman wrote: : then why not name it something like *?ENV (not to be confused with the : shell/exec env which is still %ENV i assume)? Of course, the fact that you have to say not to be confused with can be taken as indicating that people will in

Re: execution platform object? gestalt?

2005-07-27 Thread Uri Guttman
LW == Larry Wall [EMAIL PROTECTED] writes: LW On Wed, Jul 27, 2005 at 04:27:15PM -0400, Uri Guttman wrote: LW : then why not name it something like *?ENV (not to be confused with the LW : shell/exec env which is still %ENV i assume)? LW Of course, the fact that you have to say not to be

Re: The meaning of returns

2005-07-27 Thread Autrijus Tang
On Thu, Jul 28, 2005 at 05:57:28AM +0800, Autrijus Tang wrote: On Thu, Jul 28, 2005 at 05:03:05AM +0800, Autrijus Tang wrote: Hence, it seems to me that there are only four ways out: Some annotations copied from discussion in #perl6: Last time I reply to myself on this thread, hopefully.

Re: execution platform object? gestalt?

2005-07-27 Thread David Storrs
On Jul 27, 2005, at 6:18 PM, Uri Guttman wrote: this thingy should encompass all about this perl and the world it is in and the shell env is part of that. How about *?PERL ? if ( *?PERL.COMPILED_OS eq 'Unix') {...} if ( *?PERL.CURRENT_OS eq 'Unix') {...} *?PERL.Grammars{Regex} =

lazy list syntax?

2005-07-27 Thread Flavio S. Glock
How can I create a lazy list from an object? I have an object representing the sequence 1..Inf. I tried creating a Coroutine, and then assigning the Coroutine to an Array, but it only yielded 1: my @a = $span.lazy; # 1 The coroutine worked fine in a while loop, but it didn't work in a for

An idea for doing pack.

2005-07-27 Thread David Formosa \(aka ? the Platypus\)
Last night I had an idea about a possable pack API. Most likely when Pugs gets signifigently powerfull I will attempt to implement it. However I would like everyones input, below is a draft of its POD. =head1 NAME Pack - (un)pack structures as defined by a Template =head1 SYNOPSIS my Pack

Re: Elimination of Item|Pair and Any|Junction

2005-07-27 Thread David Formosa \(aka ? the Platypus\)
On Wed, 27 Jul 2005 12:17:52 -0700, Mark A. Biggar [EMAIL PROTECTED] wrote: Larry Wall wrote: [...] Whatever we call it, this type/class/role/subtype has to admit Item and Pair objects but not Junctions. (And if that's the wrong way to think about it, please tell us why.) Suggestions:

Inferring (Foo of Int).does(Foo of Any)

2005-07-27 Thread Autrijus Tang
As Perl 6's aggregate types are generics (Role that takes type parameters), the problem of type variancy naturally arises. The basic premise is that: 1. (Array of Item).does(Array of Int); # false 2. (Array of Int).does(Array of Item); # also false! Intuitively, while an

Re: [PATCH] recreatable shuffled tests for prove

2005-07-27 Thread Michael G Schwern
On Wed, Jul 27, 2005 at 05:51:25PM -0400, demerphq wrote: prove is a command line utility. Use the command line. Whose command line? Mine doesnt by default come with xargs. IE, put the logic into prove, and dont assume the user is running on your favorite *nix flavour. xargs is

Re: Elimination of Item|Pair and Any|Junction

2005-07-27 Thread Darren Duncan
At 10:32 PM + 7/27/05, David Formosa \(aka ? the Platypus\) wrote: On Wed, 27 Jul 2005 12:17:52 -0700, Mark A. Biggar [EMAIL PROTECTED] wrote: Larry Wall wrote: [...] Whatever we call it, this type/class/role/subtype has to admit Item and Pair objects but not Junctions. (And if

Re: [perl #36647] 'make languages' should continue after building a language failed

2005-07-27 Thread Jonathan Worthington
Leopold Toetsch [EMAIL PROTECTED] wrote: On Jul 27, 2005, at 16:00, Jerry Gay via RT wrote: but what is all this .dummy business? that is a thing I thought too several times. Now we know, it'd probably be a Good Thing if the makefiles actually had a comment in that explained this to anyone

embedding ParTcl

2005-07-27 Thread Thilo Planz
Hi, I have a few beginner's question about ParTcl. I am trying to embed ParTcl into a PIR application, which seems to work quite nicely, except that I have not yet figured out how to do certain things. = 1) Is there a way to reset the Tcl interpreter between invocations? .sub _main

Re: execution platform object? gestalt?

2005-07-27 Thread Uri Guttman
DS == David Storrs [EMAIL PROTECTED] writes: DS On Jul 27, 2005, at 6:18 PM, Uri Guttman wrote: this thingy should encompass all about this perl and the world it is in and the shell env is part of that. DS How about *?PERL ? DS if ( *?PERL.COMPILED_OS eq 'Unix') {...} DS if (