Re: s/true/better name/

2005-03-15 Thread David Storrs
On Tue, Mar 15, 2005 at 08:23:19AM -0800, Larry Wall wrote: > On Tue, Mar 15, 2005 at 10:51:57AM +0100, Juerd wrote: > : Autrijus suggested "indeed" or "id", of which I like "indeed" better, > : because I'd like to continue using "id" with databases. > > "id" is too heavily overloaded with identif

Re: lists in string context

2005-03-15 Thread David Storrs
On Sat, Mar 12, 2005 at 09:36:24PM +0100, Juerd wrote: > Larry Wall skribis 2005-03-12 12:26 (-0800): > > And arguably, the current structure of join is that the delimiter is > > the invocant, so cat should be defined as > > ''.join(@foo) > > This is what Python does. It does not make any sen

Re: The S29 Functions Project

2005-03-15 Thread Rod Adams
Larry Wall wrote: On Tue, Mar 15, 2005 at 02:25:01PM -0600, Rod Adams wrote: : In Perl 6, all builtin functions belong to a named package. Not all : functions are guaranteed to be imported into the global package : C<::*>. In addition, the list of functions imported into C<::*> will be : subject to

Re: reset() and S29 -- obsoleted?

2005-03-15 Thread Larry Wall
On Tue, Mar 15, 2005 at 05:44:07PM -0500, Uri Guttman wrote: : > "LW" == Larry Wall <[EMAIL PROTECTED]> writes: : : LW> On Tue, Mar 15, 2005 at 02:39:06PM -0600, Steve Peters wrote: : : LW> : One function I noticed on the S29 list was reset(). With lexically scoped : LW> : variables,

Re: The S29 Functions Project

2005-03-15 Thread Larry Wall
On Tue, Mar 15, 2005 at 02:25:01PM -0600, Rod Adams wrote: : In Perl 6, all builtin functions belong to a named package. Not all : functions are guaranteed to be imported into the global package : C<::*>. In addition, the list of functions imported into C<::*> will be : subject to change with each

Re: reset() and S29 -- obsoleted?

2005-03-15 Thread Rod Adams
Larry Wall wrote: On Tue, Mar 15, 2005 at 02:39:06PM -0600, Steve Peters wrote: : One function I noticed on the S29 list was reset(). With lexically scoped : variables, reset is almost useless. "Perl in a Nutshell" calls it "vaguely : deprecated". Can we remove the vagueness and deprcate it comp

Re: reset() and S29 -- obsoleted?

2005-03-15 Thread Uri Guttman
> "LW" == Larry Wall <[EMAIL PROTECTED]> writes: LW> On Tue, Mar 15, 2005 at 02:39:06PM -0600, Steve Peters wrote: LW> : One function I noticed on the S29 list was reset(). With lexically scoped LW> : variables, reset is almost useless. "Perl in a Nutshell" calls it "vaguely LW> :

Re: reset() and S29 -- obsoleted?

2005-03-15 Thread Larry Wall
On Tue, Mar 15, 2005 at 02:39:06PM -0600, Steve Peters wrote: : One function I noticed on the S29 list was reset(). With lexically scoped : variables, reset is almost useless. "Perl in a Nutshell" calls it "vaguely : deprecated". Can we remove the vagueness and deprcate it completely? Yes, plea

reset() and S29 -- obsoleted?

2005-03-15 Thread Steve Peters
One function I noticed on the S29 list was reset(). With lexically scoped variables, reset is almost useless. "Perl in a Nutshell" calls it "vaguely deprecated". Can we remove the vagueness and deprcate it completely? Steve Peters [EMAIL PROTECTED]

Re: The S29 Functions Project

2005-03-15 Thread Rod Adams
At 07:59 PM 3/15/2005 +, you wrote: On Mon, Mar 14, 2005 at 08:59:32AM -0800, Larry Wall wrote: > On Mon, Mar 14, 2005 at 08:10:15AM -0600, Patrick R. Michaud wrote: > : I ran into this problem while creating a mini-list of S29 functions > : (which Rod's work supercedes, I suspect, and I'm very

Re: The S29 Functions Project

2005-03-15 Thread Nicholas Clark
On Mon, Mar 14, 2005 at 08:59:32AM -0800, Larry Wall wrote: > On Mon, Mar 14, 2005 at 08:10:15AM -0600, Patrick R. Michaud wrote: > : I ran into this problem while creating a mini-list of S29 functions > : (which Rod's work supercedes, I suspect, and I'm very glad he's taking > : this on). What ar

Re: Exists and Delete

2005-03-15 Thread Juerd
Larry Wall skribis 2005-03-15 11:20 (-0800): > On Tue, Mar 15, 2005 at 07:47:58PM +0100, Juerd wrote: > : Rod Adams skribis 2005-03-15 12:44 (-0600): > : > %x.delete('foo'); > : > if %x.exists('foo') { ... } > : Would renaming exists to has or hasa be a good idea, if it does indeed > : exist only i

Re: Exists and Delete

2005-03-15 Thread Larry Wall
On Tue, Mar 15, 2005 at 07:47:58PM +0100, Juerd wrote: : Rod Adams skribis 2005-03-15 12:44 (-0600): : > %x.delete('foo'); : > if %x.exists('foo') { ... } : : Would renaming exists to has or hasa be a good idea, if it does indeed : exist only in method form? I'd think that would be asking if the

Re: Exists and Delete

2005-03-15 Thread Larry Wall
On Tue, Mar 15, 2005 at 12:44:06PM -0600, Rod Adams wrote: : What I'm asking is if we are going to continue allowing: : : delete %x; : if exists %x { ... } : : or make it where you instead have to say : : %x.delete('foo'); : if %x.exists('foo') { ... } They can always just be macros that tran

Re: [Fwd: Re: [RFC] A more extensible/flexible POD (ROUGH-DRAFT)]

2005-03-15 Thread Brian Ingerson
Aaron, Upon reading this, it is unclear to me whether you have read about the Kwid format or you are simply guessing that Kwid is the same syntax used by Kwiki. It is not the same format at all. Kwid is merely /inspired/ by Kwiki, which in turn is inspired by the (more usenix) features of modern

Re: Exists and Delete

2005-03-15 Thread Juerd
Rod Adams skribis 2005-03-15 12:44 (-0600): > %x.delete('foo'); > if %x.exists('foo') { ... } Would renaming exists to has or hasa be a good idea, if it does indeed exist only in method form? Juerd -- http://convolution.nl/maak_juerd_blij.html http://convolution.nl/make_juerd_happy.html http:/

Re: Exists and Delete

2005-03-15 Thread Rod Adams
Thomas Sandlaß wrote: Rod Adams wrote: How am I supposed to define a signature that says "A scalar that refers to a hash or array element, but do not evaluate or autovivify the element"? I'll make a guess: Ref of Int of Array. This assumes Int has a polymorphic subtype that allows pointing into

Re: s/true/better name/

2005-03-15 Thread Rod Adams
Larry Wall wrote: On Tue, Mar 15, 2005 at 12:13:52PM +0200, Yuval Kogman wrote: : On Tue, Mar 15, 2005 at 10:51:57 +0100, Juerd wrote: : : > Autrijus suggested "indeed" or "id", of which I like "indeed" better, : > because I'd like to continue using "id" with databases. : : whether? That's an in

Re: [Fwd: Re: [RFC] A more extensible/flexible POD (ROUGH-DRAFT)]

2005-03-15 Thread Juerd
Aaron Sherman skribis 2005-03-15 11:46 (-0500): > = heading level 1 > == heading level 2 > =begin list I see this going wrong with =heading level 1 already. I like the numbers in =headN too, by the way, as it makes inconsistencies easier to spot. > And then replaced [...] and [=

Re: [RFC] A more extensible/flexible POD (ROUGH-DRAFT)

2005-03-15 Thread Nigel Hamilton
I agree. I think the biggest mistake Perl 6's documentation system could make is to make it Javadoc-style automatic. This is one of those weird, backwards, cultural decisions, where we actually want to make the programmer's life a little harder. When I (seldomly) progam in Java, I find it very ha

Re: Exists and Delete

2005-03-15 Thread Thomas Sandlaß
Rod Adams wrote: How am I supposed to define a signature that says "A scalar that refers to a hash or array element, but do not evaluate or autovivify the element"? I'll make a guess: Ref of Int of Array. This assumes Int has a polymorphic subtype that allows pointing into arrays. But unfortunatel

Re: s/true/better name/

2005-03-15 Thread Juerd
Nicholas Clark skribis 2005-03-15 17:53 (+): > On Tue, Mar 15, 2005 at 05:57:57PM +0100, Juerd wrote: > > And re its spelling, that's a very good feature, because it'll slowly > > teach me how to spell this word. And when I know how to spell it, I can > > use it on IRC without dict(1)ing to see

Re: s/true/better name/

2005-03-15 Thread Nicholas Clark
On Tue, Mar 15, 2005 at 05:57:57PM +0100, Juerd wrote: > And re its spelling, that's a very good feature, because it'll slowly > teach me how to spell this word. And when I know how to spell it, I can > use it on IRC without dict(1)ing to see if I remembered correctly. This > will eventually save

Markup language-like features in Perl6?

2005-03-15 Thread Michele Dondi
I am aware of at least one program that adopts XML for (customizable/"skinnable") GUI descriptions. This has a sense for markup languages are typically "descriptive", i.e. they say how something IS as opposed to, say, procedural languages that let one implement something that DOES something[1].

Re: [Pugs] Closing a file handle surprised the heck out of me

2005-03-15 Thread Autrijus Tang
On Tue, Mar 15, 2005 at 08:52:07AM -0800, Larry Wall wrote: > : That is fine because the three thunks are registered to the fh > : in evaluation order. What will be more fun is if they are all > : part of some other lazy lists, which may be accessed in some > : unpredictable order. > > You could

Re: s/true/better name/

2005-03-15 Thread Juerd
Larry Wall skribis 2005-03-15 8:41 (-0800): > On Tue, Mar 15, 2005 at 12:13:52PM +0200, Yuval Kogman wrote: > : On Tue, Mar 15, 2005 at 10:51:57 +0100, Juerd wrote: > : > Autrijus suggested "indeed" or "id", of which I like "indeed" better, > : > because I'd like to continue using "id" with databa

Re: [Pugs] Closing a file handle surprised the heck out of me

2005-03-15 Thread Larry Wall
On Tue, Mar 15, 2005 at 12:46:49AM +0800, Autrijus Tang wrote: : On Mon, Mar 14, 2005 at 05:28:29PM +0100, Miroslav Silovic wrote: : > But it gets worse. : > : > my $lines = [ =$fh ]; : > seek($fh, 0); : > my $lines2 = [ =$fh ]; : > close $fh; : > : > $lines2 must somehow remember that seek has h

[Fwd: Re: [RFC] A more extensible/flexible POD (ROUGH-DRAFT)]

2005-03-15 Thread Aaron Sherman
Wherein I propose (to the wrong list, sigh) a re-envisioning of Kwid in a more POD-like form. I did leave out some POD markup forms. Assume that, if I did not mention them, then I think they should keep the same prefix character (e.g. X<>) --- Begin Message --- On Tue, 2005-03-15 at 09:37, Stevan

Re: s/true/better name/

2005-03-15 Thread Larry Wall
On Tue, Mar 15, 2005 at 12:13:52PM +0200, Yuval Kogman wrote: : On Tue, Mar 15, 2005 at 10:51:57 +0100, Juerd wrote: : : > Autrijus suggested "indeed" or "id", of which I like "indeed" better, : > because I'd like to continue using "id" with databases. : : whether? That's an interesting possibil

Re: s/true/better name/

2005-03-15 Thread Juerd
Autrijus Tang skribis 2005-03-16 0:25 (+0800): > On Tue, Mar 15, 2005 at 08:23:19AM -0800, Larry Wall wrote: > > I'd go with either "istrue" or "so". "ok" is another possibility, > > though that seems to connote definedness more than truth. > Hmm, "so" is so good. So can we make it so? :) So is

Re: s/true/better name/

2005-03-15 Thread Autrijus Tang
On Tue, Mar 15, 2005 at 08:23:19AM -0800, Larry Wall wrote: > I'd go with either "istrue" or "so". "ok" is another possibility, > though that seems to connote definedness more than truth. Hmm, "so" is so good. So can we make it so? :) Thanks, /Autrijus/ pgpVnDqeuQFYm.pgp Description: PGP signa

Re: s/true/better name/

2005-03-15 Thread Larry Wall
On Tue, Mar 15, 2005 at 10:51:57AM +0100, Juerd wrote: : Autrijus suggested "indeed" or "id", of which I like "indeed" better, : because I'd like to continue using "id" with databases. "id" is too heavily overloaded with identifiers and identities and such. But "indeed" doesn't work right in conte

Re: [Pugs] Closing a file handle surprised the heck out of me

2005-03-15 Thread Miroslav Silovic
[EMAIL PROTECTED] wrote: On the other hand, we can alternatively specify that closing a file handle must force all thunks associated to it, i.e. in this case fill @lines with real data. Pugs can do that just fine, but I have no idea how parrot is to achieve that... But it gets worse. my $lines

Re: s/true/better name/

2005-03-15 Thread Yuval Kogman
On Tue, Mar 15, 2005 at 10:51:57 +0100, Juerd wrote: > Autrijus suggested "indeed" or "id", of which I like "indeed" better, > because I'd like to continue using "id" with databases. whether? -- () Yuval Kogman <[EMAIL PROTECTED]> 0xEBD27418 perl hacker & /\ kung foo master: /me beats up s

s/true/better name/

2005-03-15 Thread Juerd
In #perl6, Freenode, after again having to explain that "true" is the opposite of "not" and NOT the value for "true", and that "false" doesn't exist, and that the real true value is "bool::true" and shouldn't be used much, and that no, it isn't "true", and no, "true" doesn't always return "bool::tr

Re: Auto generated methods (was Re:The S29 Functions Project)

2005-03-15 Thread Rod Adams
Leopold Toetsch wrote: No. The above "lowlevel" C isn't aware of C nor of C<$_> and nothing is autogenerated in Parrot. The C is something like: class __parrot_core::Float { multi sub cos(Float x) returns Float ... } This is presumably inherited by C (the Parrot PMC) and bound to: multi sub *

Re: Auto generated methods (was Re:The S29 Functions Project)

2005-03-15 Thread Leopold Toetsch
Rod Adams <[EMAIL PROTECTED]> wrote: > Leopold Toetsch wrote: >>the method call in PIR can be written as: >> >> d = x."cos"() # normal method call >> d = Float."cos"(x) # class method, argument shifted down >> d = P6Num."cos"(x) # same >> d = cos x # PIR opcode s

perl6-language@perl.org

2005-03-15 Thread Rod Adams
I'm trying to define zip(), but can't come up with a signature for a function that returns a lazy list of lvalues, but the list itself is not lazy? As a second matter, can you declare a type for the elements of a slurpy array? So far I have: multi sub zip (Array [EMAIL PROTECTED]) returns List

pop, push, reverse, sort, and splice on a multidimensional array

2005-03-15 Thread Rod Adams
my int @a is shape(Int ; Int) = (1..10 ; 2..100 :by(2) ; 4); $x = pop @a push @a, $x; @b = sort @a; # etc I see two views to take with these cases. 1) flatten the array to one dimension, and act accordingly. or 2) assume my int @a is shape(Int ; Int); my @a is Array of Array of int; Mean exactly