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

perl6-all@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

Re: [PROPOSAL] MMD: multi sub syntax

2005-03-15 Thread Leopold Toetsch
Bob Rogers <[EMAIL PROTECTED]> wrote: > What if one wants the first and third arguments to be the invocants? > Then the first syntax gives >.sub foo @MULTI > .invocant Integer a > .param pmc b > .invocant String c That should better be >.sub foo @MULTI

Re: [perl #34373] [PATCH] Parrot 0.1.2 with MinGW32

2005-03-15 Thread Leopold Toetsch
François" PERRAD <[EMAIL PROTECTED]> wrote: > -win32-mingw > +win32-mingw-gcc3.2.3 YYY - - YY/7 20050307 Just 7 failing can't be quite right, when all tests are failing that used dynamic loading. leo

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

Re: Calling PIR from a PMC

2005-03-15 Thread Leopold Toetsch
William Coleda <[EMAIL PROTECTED]> wrote: > If only the first character is the return value, how does one deal > with subroutines that return multiple values? Well, you can't access multiple return values from within the C function, where you are calling the PIR code. OTOH, if the PIR code did r

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 *

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: [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: named subroutine parameters

2005-03-15 Thread Nathan Gray
Thank you Luke and Autrijus, and Jesse Vincent for the test case. -kolibrie On Mon, Mar 14, 2005 at 11:29:58PM +0800, Autrijus Tang wrote: > On Mon, Mar 14, 2005 at 10:15:25AM -0500, Nathan Gray wrote: > > But unfortunately, this did not: > > pugs> sub formalize($text, +$case) { say $text } f

Re: bad file line breaks (was Re: Call for p6ification: Algorithm::Dependency)

2005-03-15 Thread Adam Kennedy
You are right, they _SHOULD_ have been Unix line-breaks. I'm not sure how or why they ended up going in as Win32. But I'll look into it. Thanks. Adam Darren Duncan wrote: At 1:09 AM +1100 3/14/05, Adam Kennedy wrote: At the request of Autrijus, I've just checked the P5 current version of Algorit

Behavior of PAST compiler

2005-03-15 Thread Bernhard Schmalhofer
Hi, I have been adding a PIR implementation and three 'Hello World' tests to 'languages/parrot_compiler'. Code is taken from STDIN, compiled by a builtin compiler, and the resulting Eval PMC is invoked. This works as expected for PASM and PIR. For PAST, Parrot abstract syntax tree as simple text,

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

Re: [perl #34430] [PATCH] MRO breaks Tcl

2005-03-15 Thread Leopold Toetsch
Will Coleda <[EMAIL PROTECTED]> wrote: > Attached is a patch that allows "(cd languages/tcl && make test)" to work > again. Looks like an unguarded access in MRO. Didn't self apply so Leo could > poke at it, in case the tcl pmcs are exploiting a hole in pmc2c2.pl. The C is defined as an abstract

Re: Namespaces

2005-03-15 Thread Leopold Toetsch
Leopold Toetsch <[EMAIL PROTECTED]> wrote: > t/pmc/namespace.t > Please have a look at the supported syntax constructs. Are these > sufficient for HLL writers? Some more thoughts WRT namespaces. We can define a namespace, where a function or method is stored: .namespace ["Foo"] .sub bar

Re: Parrot 0.1.2 with MinGW32 (some experimets)

2005-03-15 Thread Leopold Toetsch
Michal Jurosz <[EMAIL PROTECTED]> wrote: > TortoiseCVS patch file attached. > SKIP: { [ ... ] > -} Please always test your patches. Thanks, applied. leo

Re: Parrot 0.1.2 with MinGW32 (some experimets)

2005-03-15 Thread François PERRAD
> # --- Some other ideas: --- > $ perl -e "print $^O" > msys > --- config\init\hints.pl > sub runstep { > + my $O = lc($^O); > + $O = 'mswin32' if $O =~ /^(msys|mingw)/; > - my $hints = "config/init/hints/" . lc($^O) . ".pl"; > + my $hints = "config/init/hints/" . $O . ".pl"; This would make M

Parrot_Exec_OS_Command interface ?

2005-03-15 Thread François PERRAD
When I analyse the failure of t/pmc/sys.t with MinGW32, I see that this script generates a command depending of the OS on MSWin32, cmd = ".\parrot temp.imc" on *nix, cmd = "./parrot temp.imc" (So with MinGw, the generation of Makefile needs /, and the execution needs \) The bug can

test logging

2005-03-15 Thread Nathan Gray
I think it would be really nice for failed, todo, and skipped tests to log their $expected and $got values, with any $desc or $context information to a log file (probably test.log). I also think it would be very nice to be able to use other operators, such as gt, lt, or isa. is($got, $expected,

Re: test logging

2005-03-15 Thread Stevan Little
On Mar 15, 2005, at 6:45 AM, Nathan Gray wrote: I think it would be really nice for failed, todo, and skipped tests to log their $expected and $got values, with any $desc or $context information to a log file (probably test.log). I also think it would be very nice to be able to use other operators,

Re: Parrot 0.1.2 with MinGW32 (some experimets)

2005-03-15 Thread Michal Jurosz
François PERRAD wrote: When I follow the instructions what I've published in parrot/README.win32, the builded perl program gives : $ perl -e "print $^O" MSWin32 For me, mingw is not a platform (MSWin32 and cygwin are a platform), just the GCC compiler under MSWin32. $mingw

[RFC] Test::Plan

2005-03-15 Thread Geoffrey Young
hi all :) following up on the discussion from a few months ago but renewed over the weekend, here is Test::Plan. basically all it does is carry over the exact syntax and helper functions we are already using in Apache-Test land to the greater community. I'm still working up additional tests, but

Re: Behavior of PAST compiler

2005-03-15 Thread Leopold Toetsch
Bernhard Schmalhofer <[EMAIL PROTECTED]> wrote: > Hi, > ./parrot languages/parrot_compiler/parrot_compiler.pbc --language=PAST < > languages/parrot_compiler/t/basic/hello_3.code > Calling 'parrot_compiler.pbc' seems to print the generated PASM code Yes. When you run the .imc version of the pro

Re: Parrot 0.1.2 with MinGW32 (some experimets)

2005-03-15 Thread Leopold Toetsch
François PERRAD <[EMAIL PROTECTED]> wrote: > For me, mingw is not a platform (MSWin32 and cygwin are a platform), just > the GCC compiler under MSWin32. > $mingw = ($^O eq 'MSWin32' and $Config{cc} eq 'gcc') > So, the case $is_mingw in config/init/hints/mswin32.pl is the good way to > ha

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

2005-03-15 Thread Stevan Little
On Mar 15, 2005, at 12:54 AM, Nigel Hamilton wrote: Hi Steven, Hello Nigel, I think one of the great features of JavaDoc is the ability to generate hyperlinked documentation - so someone can walk the inheritance/interface hierarchy within their browser. It also provides consistency across all J

Re: Module popularity

2005-03-15 Thread Robert
cpanratings.perl.org? Ian Langworth wrote: Fair enough. On Tue, 15 Mar 2005 00:37:26 -0600, Andy Lester <[EMAIL PROTECTED]> wrote: I'd rather it didn't. What people think of as "popularity" is not what Phalanx measures. Let's not stir the mud.

Re: [RFC] Test::Plan

2005-03-15 Thread Ian Langworth
Rock! First, just a nitpicky thing -- You could simplify Makefile.PL to not need File::*: WriteMakefile( ... test => { TESTS => join ' ', map { glob } qw( t/*/*.t t/*/*/*.t ) }, ... ); Also, I agree that the use-Test-Plan-after-Test-More caveat is icky. How about modifying Test::Plan::impo

int("0x123") == int(0x123) ?

2005-03-15 Thread Autrijus Tang
Currently Pugs numifies hexadecimal and octal strings as if they are literals; that means "0x123" and "0o456" all work as expected. Is that an acceptable treatment? What about "Inf" and "NaN" in numeric context? Thanks, /Autrijus/ pgp11vtHJMLL9.pgp Description: PGP signature

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

2005-03-15 Thread Luke Palmer
Stevan Little writes: > Introspection is nice, but I disagree that documentation should be that > transparent. One of the nice things I have found about perl and CPAN in > particular is that many people tend to document their modules very > well. Which not only includes information about method/

Re: test logging

2005-03-15 Thread Luke Palmer
Stevan Little writes: > > On Mar 15, 2005, at 6:45 AM, Nathan Gray wrote: > > >I think it would be really nice for failed, todo, and skipped tests to > >log their $expected and $got values, with any $desc or $context > >information to a log file (probably test.log). > > > >I also think it would b

Re: [RFC] Test::Plan

2005-03-15 Thread Geoffrey Young
> test => { TESTS => join ' ', map { glob } qw( t/*/*.t t/*/*/*.t ) }, but slashes aren't portable, right? I don't think you can get rid of File::Spec. > Also, I agree that the use-Test-Plan-after-Test-More caveat is icky. well, it's a caveat, not a requirement :) the way it works now is t

Re: int("0x123") == int(0x123) ?

2005-03-15 Thread Luke Palmer
Autrijus Tang writes: > Currently Pugs numifies hexadecimal and octal strings as if they > are literals; that means "0x123" and "0o456" all work as expected. > Is that an acceptable treatment? What about "Inf" and "NaN" in > numeric context? If we follow Perl 5's lead, they all numify to zero (gen

Re: int("0x123") == int(0x123) ?

2005-03-15 Thread Aaron Sherman
On Tue, 2005-03-15 at 10:09, Autrijus Tang wrote: > Currently Pugs numifies hexadecimal and octal strings as if they > are literals; that means "0x123" and "0o456" all work as expected. > Is that an acceptable treatment? What about "Inf" and "NaN" in > numeric context? This has long been a point o

Re: test logging

2005-03-15 Thread Stevan Little
On Mar 15, 2005, at 10:32 AM, Luke Palmer wrote: Stevan Little writes: On Mar 15, 2005, at 6:45 AM, Nathan Gray wrote: I think it would be really nice for failed, todo, and skipped tests to log their $expected and $got values, with any $desc or $context information to a log file (probably test.log

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

2005-03-15 Thread Nigel Hamilton
All that said I think a per-module perldoc documentation reader is still very important too ... maybe your design could allow for traversable HTML conversion in the future? Well my idea is to not dictate the eventual output. But to create a system which allows the most meta-data/contextual-info

Re: test logging

2005-03-15 Thread Luke Palmer
Stevan Little writes: > So if I understand you correctly, then the implementation code would > look something like this right? > > sub cmp_ok (Str $got, Code $comparison_func, Str $expected, Str ?$desc) > returns Bool is export { > my $test := $comparison_func($got, $expected); > ...

Re: int("0x123") == int(0x123) ?

2005-03-15 Thread Patrick R. Michaud
On Tue, Mar 15, 2005 at 08:35:54AM -0700, Luke Palmer wrote: > Autrijus Tang writes: > > Currently Pugs numifies hexadecimal and octal strings as if they > > are literals; that means "0x123" and "0o456" all work as expected. > > Is that an acceptable treatment? What about "Inf" and "NaN" in > > num

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

2005-03-15 Thread Patrick R. Michaud
Without commenting on the merits of any of the proposals, I'll note that discussions about changing POD are probably design-level discussions that belong on p6l instead of p6c (which are implementation decisions). I don't mind if it's discussed here, but p6c is really the forum for "how do we impl

Re: [Pugs] short-circuit operators

2005-03-15 Thread Ingo Blechschmidt
Hi, Andrew Savige wrote: > The following program: > > my $x = 1; > my $y = 2; > $x == 1 or $y = 42; ^ typo? > print"x='$x' y='$y'\n"; > > prints x='1' y='2' in perl5, but prints x='1' y='42' in pugs. using r763, it works correctly: $ ./pugs -we 'my $x = 1; my $y = 2; $x == 1 o

Re: test logging

2005-03-15 Thread Nathan Gray
On Tue, Mar 15, 2005 at 08:27:32AM -0500, Stevan Little wrote: > On Mar 15, 2005, at 6:45 AM, Nathan Gray wrote: > >I also think it would be very nice to be able to use other operators, > >such as gt, lt, or isa. > > > > is($got, $expected, $desc, operator => 'gt'); > > Personally, I think a more

Re: int("0x123") == int(0x123) ?

2005-03-15 Thread Jonathan Scott Duff
On Tue, Mar 15, 2005 at 10:34:04AM -0500, Aaron Sherman wrote: > On Tue, 2005-03-15 at 10:09, Autrijus Tang wrote: > > Currently Pugs numifies hexadecimal and octal strings as if they > > are literals; that means "0x123" and "0o456" all work as expected. > > Is that an acceptable treatment? What ab

Re: test logging

2005-03-15 Thread Stevan Little
On Mar 15, 2005, at 10:53 AM, Nathan Gray wrote: On Tue, Mar 15, 2005 at 08:27:32AM -0500, Stevan Little wrote: On Mar 15, 2005, at 6:45 AM, Nathan Gray wrote: I also think it would be very nice to be able to use other operators, such as gt, lt, or isa. is($got, $expected, $desc, operator => 'gt')

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

2005-03-15 Thread Stevan Little
On Mar 15, 2005, at 10:58 AM, Patrick R. Michaud wrote: Without commenting on the merits of any of the proposals, I'll note that discussions about changing POD are probably design-level discussions that belong on p6l instead of p6c (which are implementation decisions). You are absolutely correct. I

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: 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/ pgpB1Zkr9MgHy.pgp Description: PGP signa

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 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: [RFC] A more extensible/flexible POD (ROUGH-DRAFT)

2005-03-15 Thread Aaron Sherman
On Tue, 2005-03-15 at 09:37, Stevan Little wrote: > On Mar 15, 2005, at 12:54 AM, Nigel Hamilton wrote: > > There is a need for a higher level 'structural' documentation that > > hypertext is well suited to cover - something that spans more than one > > module. This will be especially import

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

2005-03-15 Thread Aaron Sherman
On Tue, 2005-03-15 at 11:38, Stevan Little wrote: > On Mar 15, 2005, at 10:58 AM, Patrick R. Michaud wrote: > > Without commenting on the merits of any of the proposals, I'll > > note that discussions about changing POD are probably design-level > > discussions that belong on p6l instead of p6c (wh

[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: [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

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 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

[Pugs] Test for localtime and gmtime builtins

2005-03-15 Thread Matthew Campbell
Hi All, Started looking at porting modules to pugs and Time::namespace seemed like a simple place to begin. These modules need the builtins localtime and gmtime to run, so I've written my first attempt at a perl6 test for these builtins. Its based on t/op/test.t from current perl5. Obv it barf

Re: Analysis of operator "?? ::"

2005-03-15 Thread Autrijus Tang
On Tue, Mar 08, 2005 at 11:02:23AM +0800, Shu-chun Weng wrote: > Hello, this mail is an analysis of implementing operator ternary > operator "?? ::" in pugs. Greetings. Thanks for your extensive survey, which helped a lot on pruning dead ends in my attempt in getting this implemented. The key in

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: 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

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: [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: [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: Module popularity

2005-03-15 Thread Michael G Schwern
Greetings and OOK, Jarkko. Ian asked the musical question http://www.nntp.perl.org/group/perl.qa/3850 The CPAN Search FAQ at http://search.cpan.org/faq.html reads: Q: Do you keep statistics on which modules are most popular? A: Not right now. But there are plans to add some kind of p

Re: [RFC] Test::Plan

2005-03-15 Thread Michael G Schwern
On Tue, Mar 15, 2005 at 10:33:25AM -0500, Geoffrey Young wrote: > > > test => { TESTS => join ' ', map { glob } qw( t/*/*.t t/*/*/*.t ) }, > > but slashes aren't portable, right? I don't think you can get rid of > File::Spec. In this case they should be portable. Windows will understand them

Re: [Pugs] Test for localtime and gmtime builtins

2005-03-15 Thread Matthew Campbell
Umm, my attached test was stripped off. Who can I send it to for review? Cheers mattc On Tue, 2005-03-15 at 17:28 +, Matthew Campbell wrote: > Hi All, > > Started looking at porting modules to pugs and Time::namespace seemed > like a simple place to begin. These modules need the builtins

Re: [Pugs] Test for localtime and gmtime builtins

2005-03-15 Thread Autrijus Tang
On Tue, Mar 15, 2005 at 05:28:51PM +, Matthew Campbell wrote: > Started looking at porting modules to pugs and Time::namespace seemed > like a simple place to begin. These modules need the builtins localtime > and gmtime to run, so I've written my first attempt at a perl6 test for > these buil

Re: int("0x123") == int(0x123) ?

2005-03-15 Thread Larry Wall
On Tue, Mar 15, 2005 at 11:09:11PM +0800, Autrijus Tang wrote: : Currently Pugs numifies hexadecimal and octal strings as if they : are literals; that means "0x123" and "0o456" all work as expected. : Is that an acceptable treatment? It's okay by me. The restriction on not autoconverting hex and

Re: Analysis of operator "?? ::"

2005-03-15 Thread Larry Wall
On Wed, Mar 16, 2005 at 01:35:12AM +0800, Autrijus Tang wrote: : that is, it reads everything between ?? and ::, allowing only : tight operators That is correct. Larry

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: 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: [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: int("0x123") == int(0x123) ?

2005-03-15 Thread Autrijus Tang
On Tue, Mar 15, 2005 at 10:43:07AM -0800, Larry Wall wrote: > On Tue, Mar 15, 2005 at 11:09:11PM +0800, Autrijus Tang wrote: > : Currently Pugs numifies hexadecimal and octal strings as if they > : are literals; that means "0x123" and "0o456" all work as expected. > : Is that an acceptable treatmen

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: 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: int("0x123") == int(0x123) ?

2005-03-15 Thread Larry Wall
On Wed, Mar 16, 2005 at 02:57:36AM +0800, Autrijus Tang wrote: : So, between the two consistencies, do you think that the more DWIMmy : one of parsing "0o123" is more helpful? I'll implement it tomorrow : if that's the case. :) Yes, I do. That was one of the main reasons for switching to the les

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 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: 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: 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

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]

[perl #34441] [TODO] Clean up 'imcc' targets from main Makefile?

2005-03-15 Thread via RT
# New Ticket Created by Bernhard Schmalhofer # Please include the string: [perl #34441] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/rt3/Ticket/Display.html?id=34441 > Hi, there are a lot of potentially confusing targets in the main Makefile. In

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

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 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

[perl #34442] [TODO] *BooleanArray PMCs should use single bit per bool

2005-03-15 Thread via RT
# New Ticket Created by Bernhard Schmalhofer # Please include the string: [perl #34442] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/rt3/Ticket/Display.html?id=34442 > This was mentioned by Leo in Ticket 34934 and 30230: > Oh well, while at it, t

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 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 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: [Pugs] short-circuit operators

2005-03-15 Thread Andrew Savige
--- Ingo Blechschmidt wrote: > Andrew Savige wrote: >> The following program: >> >> my $x = 1; >> my $y = 2; >> $x == 1 or $y = 42; > ^ typo? No, it's not a typo. I was (perhaps not very clearly) trying to demonstrate that the short-circuiting operators, namely: or and && |

Re: [Pugs] short-circuit operators

2005-03-15 Thread Andrew Savige
Ferreting around in the #perl6 logs I noticed an acknowledgement that short-circuiting is "borken" as at 15 Maart. Oh well, time for the "mad golfer" to dust off his trusty sand iron and hack his way out of this punishing Pugs sand trap. :-) /-\ Find local movie times and trailers on Yahoo! Movi

Re: [perl #34430] [PATCH] MRO breaks Tcl

2005-03-15 Thread William Coleda
Switching tclobject seems to work fine here. I suspect you might have something else going on. Committed the change to tclobject, removed my local hack to src/pmc.c, passes 100% now. Regards. Leopold Toetsch wrote: Will Coleda <[EMAIL PROTECTED]> wrote: Attached is a patch that allows "(cd langu

Re: [PROPOSAL] MMD: multi sub syntax

2005-03-15 Thread Bob Rogers
From: Leopold Toetsch <[EMAIL PROTECTED]> Date: Tue, 15 Mar 2005 08:52:38 +0100 Bob Rogers <[EMAIL PROTECTED]> wrote: > What if one wants the first and third arguments to be the invocants? > Then the first syntax gives >.sub foo @MULTI > .invocant Integer a

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: 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: [Pugs] short-circuit operators

2005-03-15 Thread Autrijus Tang
On Wed, Mar 16, 2005 at 12:31:05PM +1100, Andrew Savige wrote: > Ferreting around in the #perl6 logs I noticed an acknowledgement > that short-circuiting is "borken" as at 15 Maart. Oh well, time > for the "mad golfer" to dust off his trusty sand iron and hack > his way out of this punishing Pugs s

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

2005-03-15 Thread John van Krieken
On Mon, 14 Mar 2005 20:54:20 -0500 Stevan Little <[EMAIL PROTECTED]> wrote: Did any of you look at the excelent work Mark Overmeer did on OOdoc? > Gang, > > My proposal is for an extensible version of POD. Basically what XML is > > to HTML/SGML, this will be for POD. This is a very very very ro

Re: [Pugs] short-circuit operators

2005-03-15 Thread Larry Wall
On Wed, Mar 16, 2005 at 01:30:10PM +0800, Autrijus Tang wrote: : On Wed, Mar 16, 2005 at 12:31:05PM +1100, Andrew Savige wrote: : > Ferreting around in the #perl6 logs I noticed an acknowledgement : > that short-circuiting is "borken" as at 15 Maart. Oh well, time : > for the "mad golfer" to dust o

Re: [perl #34441] [TODO] Clean up 'imcc' targets from main Makefile?

2005-03-15 Thread Leopold Toetsch
Bernhard Schmalhofer (via RT) wrote: there are a lot of potentially confusing targets in the main Makefile. In order to simply the Makefile, I propose to remove the 'imcc' targets. Does anybody care for these targets? I don't test_imcc: Run the test suite only for IMCC tests. tes

Re: [PROPOSAL] MMD: multi sub syntax

2005-03-15 Thread Leopold Toetsch
Leopold Toetsch <[EMAIL PROTECTED]> wrote: > Leopold Toetsch <[EMAIL PROTECTED]> wrote: >> Syntax proposal: >>.sub foo @MULTI >> .invocant Integer a >> .invocant Float b >> .param pmc c >> ... > Alternate syntax: > .sub foo multi(Integer, Float) > .param pmc a >

Re: [perl #34442] [TODO] *BooleanArray PMCs should use single bit per bool

2005-03-15 Thread Leopold Toetsch
Bernhard Schmalhofer (via RT) wrote: This was mentioned by Leo in Ticket 34934 and 30230: Oh well, while at it, the *BooleanArray should just use one bit per item not an INTVAL. I'll tackle that. First I'll propable take a look at Bit::Vector in Perl5, as there are propably a lot of interesting m

Re: [PROPOSAL] MMD: multi sub syntax

2005-03-15 Thread Leopold Toetsch
Bob Rogers <[EMAIL PROTECTED]> wrote: >From: Leopold Toetsch <[EMAIL PROTECTED]> >.sub foo multi(Integer, pmc: String) > .param pmc a > .param pmc b > .param pmc c >- try to dispatch on the first two types in the first place >- if there is a tie,

  1   2   >