This revision should be much more thorough and consistant compared to
the last 2, and also incorporates all of the major rulings handed down
by Larry in the last few days.
Remaining Issues:
- Default Object Stringification
(I'd say that defining custom stringification should go in the OO
section
Michael G Schwern:
# You can do it with a map without much trouble:
#
# my @indexes = map { /condition/ ? $i++ : () } @stuff;
Unless I'm mistaken, that won't work, since $i only gets incremented on
matches. I think this:
my @indexes = map { $i++; /condition/ ? $i : () } @stuff;
Wil
> From: "Brent Dax" <[EMAIL PROTECTED]>
> Date: Thu, 5 Dec 2002 00:28:52 -0800
>
> Michael G Schwern:
> # You can do it with a map without much trouble:
> #
> # my @indexes = map { /condition/ ? $i++ : () } @stuff;
>
> Unless I'm mistaken, that won't work, since $i only gets incremented on
>
The content looks great. I have a few grammatical suggestions, but nothing
serious...feel free to ignore.
> =pod
>
> =head1 Strings
>
> A literal string is formed when text is enclosed by a quoting
> operator; there are two types: interpolating and non-interpolating.
Kinda confusing. How about:
One final change to my own fix:
> > with the q[] operator. The q[] operator allows strings to be made with
> > any non-space, non-letter, non-digit character as the delimeter instead
> > of '.
>
> The q[] operator allows strings to be delimited by any non-space,
> non-letter,
> non-digit charact
On Dec-04, Leopold Toetsch wrote:
> Steve Fink (via RT) wrote:
>
> >so that I can just use 'rx_pos' within my (possibly nested) namespace.
> >
> >So that's what this patch implements. A .local
> >directive now creates a variable named ::
> >(or just at the top level),
>
> Looks ok too. If no
I have checked in some missing core ops:
- defined keyed
- exists keyed
+ corrections in classes to make it work and some tests.
leo
Steve Fink wrote:
On Dec-04, Leopold Toetsch wrote:
The engine I'm referring to is the one checked into languages/regex,
although at the moment it may not work straight out of there (try a
'make test').
Ah yes - works fine.
Thanks for your explanation
leo
# New Ticket Created by Tapas Samanta
# Please include the string: [perl #18892]
# in the subject line of all future correspondence about this issue.
# http://rt.perl.org/rt2/Ticket/Display.html?id=18892 >
Dear Parrot!
I am building a JAPI for a perl aplication here.
While calling the Pe
On 12/04/2002 3:21 PM, Larry Wall wrote:
On Wed, Dec 04, 2002 at 11:38:35AM -0800, Michael Lazzaro wrote:
: We still need to verify whether we can have, in qq strings:
:
:\033 - octal (p5; deprecated but allowed in p6?)
I think it's disallowed.
Thank the many gods ... or One True
[EMAIL PROTECTED] (Miko O'Sullivan) writes:
> FWIW, I came up with "purge" because my first inclination was to spell
> "grep" backwards: "perg". :-)
For reference, Ruby uses .detect and .reject.
--
3rd Law of Computing:
Anything that can go wr
fortune: Segmentation violation -- Core dum
I'm going to ask something that's probably going to launch off into a long,
silly thread. But I'm really curious what the results will be so I'll ask
it anyway. Think of it as an experiment.
So here's your essay topic:
Explain how having indexes (arrays, substr, etc...) in Perl 6 start at 0
wil
> Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
> Date: Thu, 5 Dec 2002 02:45:39 -0800
> From: Michael G Schwern <[EMAIL PROTECTED]>
> Content-Disposition: inline
> Sender: Michael G Schwern <[EMAIL PROTECTED]>
> X-SMTPD: qpsmtpd/0.12, http://develooper.com/code/qpsmtpd/
>
> I'm going to as
On Thu 05 Dec, Michael G Schwern wrote:
> So here's your essay topic:
>
> Explain how having indexes (arrays, substr, etc...) in Perl 6 start at 0
> will benefit most users. Do not invoke legacy. [1]
>
> [1] ie. "because that's how most other languages do it" or "everyone is
> used to it by now"
Below you will find a simple Jako program along with the IMC code the
Jako compiler generates. The IMC compiler generates the following error:
error:imcc:iANY file sub.imc line 36: op not found 'set_ic_ic'
(set<2>)
on the first ".arg x" instance in the .imc file. I'm not sure why that
l
# New Ticket Created by "Venables, Robin"
# Please include the string: [perl #18897]
# in the subject line of all future correspondence about this issue.
# http://rt.perl.org/rt2/Ticket/Display.html?id=18897 >
Hi
I'm trying to make Parrot 0.0.8.1 on AIX 4.3.3. When I run 'perl
Configure.pl'
On Thu, Dec 05, 2002 at 02:59:32AM -0500, Joseph F. Ryan wrote:
> In the first string, perl will take each character in the first string
> literally and perform no special processing. However, the value of the
> variable $animal is inserted into the second string string in place of
> the text $ani
Joseph F. Ryan writes:
>
> The base form for a non-interpolating string is the single-quoted
> string: 'string'. However, non-interpolating strings can also be formed
> with the q[] operator. The q[] operator allows strings to be made with
Ithink it's actually opposite:
The basic ( user e
Larry Wall wrote:
On Mon, Dec 02, 2002 at 04:42:52PM -0500, Joseph F. Ryan wrote:
[...]
: As far as I know, *nothing* is special in a single quoted heredoc.
Here docs is where you *most* want the \qq[] ability. It is assumed that
the sequence "\qq[" will not occur by accident very often in the
On Thu, 5 Dec 2002 04:05:05 -0500, Tanton Gibbs wrote:
> > A string inside a \qq[] construct acts exactly as if it were an
> > interpolated string. Note that any end-brackets, "]", must be escaped
> > within the the \qq[] construct so that the parser can read it correctly.
>
> Note that an end-brac
Michael G Schwern writes:
> I'd love to be able to do it with a grep like thing.
>
> (@switches, @args) = seperate /^-/, @ARGV;
Yes. I've written that function in Perl 5, which isn't ideal, because you
have to return array refs, not arrays.
However, I don't think it should be called 'seper
Aaron Crane:
> However, I don't think it should be called 'seperate'. I also don't think
> it should be called 'separate', because that word seems to be commonly
> misspelled...
That seems like an excellent argument for calling it 'separate'. Perhaps it
will be the first of many spelling-improvi
Michael G Schwern wrote:
> and that's just entirely too much work. I'd love to be able to do
> it with a grep like thing.
>
> (@switches, @args) = seperate /^-/, @ARGV;
>
> seperate() simply returns two lists. One of elements which match,
> one of elements which don't. I think Perl 6 will
Angel Faus:
> Maybe the solution is to make it hash-wise:
>
> %hash = @array.sep {
> when /^[A-Z]*$/ {'uppercase'}
> when /^[a-z]*$/ {'lowercase'}
> default {'mixedcase'}
> }
I agree that general partitioning is 'better' than a fixed binary proposal,
but what is ga
> Explain how having indexes (arrays, substr, etc...) in Perl 6 start
> at 0 will benefit most users.
The languages which do not start their indices at 0 are dead or dying.
> Do not invoke legacy.
How about FUD? :-)
=Austin
--- Michael G Schwern <[EMAIL PROTECTED]> wrote:
> I'm going to ask
On Thu, Dec 05, 2002 at 12:27:16PM +, Andrew Wilson wrote:
> On Thu, Dec 05, 2002 at 02:59:32AM -0500, Joseph F. Ryan wrote:
> > Non-Interpolating constructs are strings in which expressions do not
> > interpolate or expand. The exception to this rule is that the
> > backslash character, \, wi
On Thu, Dec 05, 2002 at 09:23:09AM -0600, Jonathan Scott Duff wrote:
> On Thu, Dec 05, 2002 at 12:27:16PM +, Andrew Wilson wrote:
> > On Thu, Dec 05, 2002 at 02:59:32AM -0500, Joseph F. Ryan wrote:
> > > Non-Interpolating constructs are strings in which expressions do not
> > > interpolate or e
On Thu, Dec 05, 2002 at 03:46:25PM +, Andrew Wilson wrote:
> Except that not what it does.
Ah, indeed. It helps if you think and write in the same context. :-)
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
On Thu, Dec 05, 2002 at 03:46:25PM +, Andrew Wilson wrote:
>Non-Interpolating constructs are strings in which expressions do
>not interpolate or expand. The exception to this rule is the
>backslash character C<\>. A single backslash which is followed by
>another
Jonathan Scott Duff writes:
> Non-Interpolating constructs are strings in which expressions do
> not interpolate or expand. The exception to this rule is the
> backslash character C<\>. A single backslash which is followed
> by the current quoting delimiter, or t
On Thu, Dec 05, 2002 at 07:54:09PM +0200, arcadi shehter wrote:
> my take :
>
> non interpolating construct is a sequence of characters enclosed in
> delimiters for which perl switch off *any* perl-programm-like
> interpretation of the content. since perl have to find the end of
> this "I-am-not
On Thu, Dec 05, 2002 at 05:09:35PM +, Andrew Wilson wrote:
> > '\ \ \h\e\l\l\o\ \ '
> >
> > '\'\\\ \\\ \\\h\\\e\\\l\\\l\\\o\\\ \\\ \''
>
> This is wrong. '\ \ \h\e\l\l\o\ \ ' gives you a string with nine
> backslashes.
I should learn to read. What you said was right.
andrew
--
Virgo:
Hi,
Most of my nitpicks have been covered by other people :)
Joseph F. Ryan said:
> =head3 Embedding Interpolated Strings
>
> Note that any end-brackets, "]", must be escaped within the the
> \qq[] construct so that the parser can read it correctly.
This is true regardless of whether the
On Thursday, December 5, 2002, at 09:45 AM, Drew Folta wrote:
Hmm... should we mention the rough equivalence, or the technically
correct equivalence (which would be c<< "STRING".split(rx/\s+/) >>).
The answer to that question is the answer to this question: what is
the scope of this documen
[EMAIL PROTECTED] wrote:
error:imcc:iANY file sub.imc line 36: op not found 'set_ic_ic'
2 "mistakes" here:
- branches between subs are not subject to fixup
- x is not declared in here:
.sub __ANON_BLOCK__1
set x, 42 #
Leon Brocard sent the following bits through the ether:
> Now to get the hand of the signatures...
Ah, well, I gave up on SDL as it was a little complicated. Instead, I
played with curses. Please find attached a cute little curses life
program loading and calling curses at runtime with dlfunc.
Leo --
Thats going to be a problem for Jako.
Can't nest .sub, so I can't have a bracketing .sub for the whole script,
with my real subs' .subs inside. So, I have to choose (I think) from these
options in order to leverage IMCC:
* Bracket with one big .sub ... .end, and don't use .sub for my
I'd been looking for an option to IMCC to generate the PBC directly,
figuring from list postings that it was there, but didn't find it (-c) until
reading the recently updated ChangeLog. It's not in the syntax message IMCC
prints (with no args or -h or bad args), probably should be added.
Any answ
At 12:54 PM + 12/5/02, "Venables, Robin" (via RT) wrote:
I'm trying to make Parrot 0.0.8.1 on AIX 4.3.3. When I run 'perl
Configure.pl'
I get the following output:
Determining your minimum pointer alignment...Can't determine alignment!
Any suggestions?
Can you grab the latest semi-daily s
Drew Folta wrote:
=head3 <<>>; expanding a string as a list.
A set of braces is a special op that evaluates into the list of words
contained, using whitespace as the delimeter. It is similar to qw[]
from perl5, and can be thought of as roughly equivalent to:
C<< "STRING".split(' ') >>
Hmm
Peter Haworth wrote:
On Thu, 5 Dec 2002 04:05:05 -0500, Tanton Gibbs wrote:
A string inside a \qq[] construct acts exactly as if it were an
interpolated string. Note that any end-brackets, "]", must be escaped
within the the \qq[] construct so that the parser can read it correctly.
Note
> There are a few special cases for delimeters; specifically :, ( and #.
> : is not allowed because it might be used by custom-defined quoting
> operators to apply a attribute. ( is not allowed because it is used to
> pass arguments to attributes.
But if there is no attribute, then qw(this is not
On Thu, 5 Dec 2002, Joseph F. Ryan wrote:
> Peter Haworth wrote:
> >On Thu, 5 Dec 2002 04:05:05 -0500, Tanton Gibbs wrote:
> >>>A string inside a \qq[] construct acts exactly as if it were an
> >>>interpolated string. Note that any end-brackets, "]", must be escaped
> >>>within the the \qq[] constr
John Williams wrote:
On Thu, 5 Dec 2002, Joseph F. Ryan wrote:
Peter Haworth wrote:
On Thu, 5 Dec 2002 04:05:05 -0500, Tanton Gibbs wrote:
A string inside a \qq[] construct acts exactly as if it were an
interpolated string. Note that any end-brackets, "]", must be escaped
within th
On Thu, 5 Dec 2002, Joseph F. Ryan wrote:
> John Williams wrote:
> >On Thu, 5 Dec 2002, Joseph F. Ryan wrote:
> >>With all of the new crazy quoting shenanagains, I'm not sure that the
> >>"balenced brackets are fine" rule will still be possible; and thus end
> >>delimeters will always need to be es
> FWIW, I came up with "purge" because my first inclination was to spell
> "grep" backwards: "perg". :-)
I like "purge", although "except", "exclude", and "omit" all have their
charms.
For partition function, I like "divvy", "carve", "segment" (in that order)
and almost anything other than "sepa
On Thu, 5 Dec 2002, Dave Whipp wrote:
> Only if we apply a bit of magic (2 is a true value). The rule might be:
How about if we just have two different methods: one for boolean and one
for multiple divvies:
my(@true, @false) := @array.cull{/some test/};
my (@a, @b, @c) := @array.divvy{some co
John Williams wrote in perl.perl6.language :
>
> While "purge" is cute, it certainly is not obvious what it does. Of
> course neither is "grep" unless you are an aging unix guru...
>
> How about something which is at least obvious to someone who knows what
> grep is, such as "vgrep" or "grep:v"?
In thinking about how to write a "partition" function (or separate, or
whatever you want to call it) it occurs to me that you might want some
sort of reverse-varargs behavior, like
my (@a, @b, @c, @d) = @array.partiton { $_ % 4 };
So in this case, partition is supposed to determine, on the fly, h
On Thursday, December 5, 2002, at 02:11 AM, James Mastros wrote:
On 12/04/2002 3:21 PM, Larry Wall wrote:
\x and \o are then just shortcuts.
Can we please also have \0 as a shortcut for \0x0?
\0 in addition to \x, meaning the same thing? I think that would get
us back to where we were wit
On Wednesday, December 4, 2002, at 12:55 PM, David Whipp wrote:
How far can we go with this \c thing? How about:
print "\c[72, 101, 108, 108, 111]";
will that print "Hello"?
Huh... having a comma-separated list to represent multiple characters.
I can't think of any problems with that, and i
On Wednesday, December 4, 2002, at 09:11 PM, John Williams wrote:
On Wed, 4 Dec 2002, Miko O'Sullivan wrote:
FWIW, I came up with "purge" because my first inclination was to spell
"grep" backwards: "perg". :-)
While "purge" is cute, it certainly is not obvious what it does. Of
course neit
On Thu, Dec 05, 2002 at 09:18:21AM -0800, Michael Lazzaro wrote:
:
: On Thursday, December 5, 2002, at 02:11 AM, James Mastros wrote:
:
: >On 12/04/2002 3:21 PM, Larry Wall wrote:
: >>\x and \o are then just shortcuts.
: >Can we please also have \0 as a shortcut for \0x0?
:
: \0 in addition to
I like it except for the name, which feels too active to me (ie, if I were to
purge those elements from the array I'd expect the array to be altered, instead
of returning a new array with only those elements). But I do like the idea. I
think the name "except" would be pretty nice, though. Then a
On Wed, 4 Dec 2002, John Williams wrote:
> While "purge" is cute, it certainly is not obvious what it does. Of
> course neither is "grep" unless you are an aging unix guru...
>
> How about something which is at least obvious to someone who knows what
> grep is, such as "vgrep" or "grep:v"?
How a
>How about my original inclinaton: "perg"? It just screams out "the
>opposite of grep".
So it greps a list in reverse order?
-R (who does not see any benefit of 'perg' over grep { ! code } )
On Thu, 5 Dec 2002, Robert Spier wrote:
> -R (who does not see any benefit of 'perg' over grep { ! code } )
My problem with grep { ! code } is the same problem I have with if (!
expression): I've never developed a real trust in operator precedence.
Even looking at your pseudocode example, I itche
On Thursday, December 5, 2002, at 10:09 AM, Michael Lazzaro wrote:
What about "divvy" (or are we already using that for something else?)
my(@a,@b) = divvy { ... } @c;
Other possibilities from the ol' thesaurus: C, C,
C, C.
@$#@%*. Trying to do too many %#@%@ things at once. I meant 'di
On Thu, Dec 05, 2002 at 10:09:08AM -0800, Michael Lazzaro wrote:
: What about "divvy" (or are we already using that for something else?)
:
: my(@a,@b) = divvy { ... } @c;
Any such solution must use := rather than =. I'd go as far as to say
that divvy should be illegal in a list context.
Not
"Larry Wall" <[EMAIL PROTECTED]> wrote:
> On Thu, Dec 05, 2002 at 10:09:08AM -0800, Michael Lazzaro wrote:
> : What about "divvy" (or are we already using that for something else?)
> :
> : my(@a,@b) = divvy { ... } @c;
>
> Any such solution must use := rather than =. I'd go as far as to say
>
"Miko O'Sullivan" <[EMAIL PROTECTED]> wrote:
> On Thu, 5 Dec 2002, Dave Whipp wrote:
>
> > Only if we apply a bit of magic (2 is a true value). The rule might be:
>
> How about if we just have two different methods: one for boolean and one
> for multiple divvies:
>
> my(@true, @false) := @array.c
On Thursday, December 5, 2002, at 07:53 AM, Austin Hastings wrote:
And in general, without resorting to something hideous like scanf, is
there going to be some more-advanced want() variant that allows saying
@a, $i, $j, @b, %w, $k, @c = scramble(...);
This is a terribly important question, fo
On 5 Dec 2002, Rafael Garcia-Suarez wrote:
> If you want good'ol Unix flavor, call it "vrep". Compare the ed(1) /
> ex(1) / vi(1) commands (where 're' stands for regular expression, of
> course) :
> :g/re/p
> :v/re/p
I like it. Fits in with our Un*x heritage, and doesn't have any existin
--- Dave Whipp <[EMAIL PROTECTED]> wrote:
>
> I think that c would be an abysmal name: that implies
> "keep the false ones". I'm not sure that there is a synonym
> for "boolean partition" though. Perhaps we need some help
> from a linguist! ;)
>
What's wrong with split()?
split { f($_) }, $ite
A big issue that still remains with literals is the stringification of
objects and references. In an effort to get the behaviors hammered
down, here are a few ideas:
First off, references:
By default, references should not stringify to anything "pretty", they
should stringifiy to something usefu
Joseph F. Ryan:
# By default, references should not stringify to anything
# "pretty", they should stringifiy to something useful for
# debugging. Heck, even perl5 style should be fine. Not only
Why? Isn't the pretty form more generally useful?
# is this handy, but also prevents problems wit
Michael Lazzaro wrote:
Huh... having a comma-separated list to represent multiple characters.
I can't think of any problems with that, and it would be marginally
easier for some sequences...
Unless someone on the design team objects, I'd say let's go for it.
Larry was certainly in favour of
I would suggest that we could get away with a single n-ary built-in.
And I would strongly suggest that C isn't the right name for it,
since, apart from being a ugly, slang word, "divvy" implies dividing up
equally. The built-in would actually be doing classification of the
elements of the list, so
John Williams wrote:
On Thu, 5 Dec 2002, Joseph F. Ryan wrote:
John Williams wrote:
On Thu, 5 Dec 2002, Joseph F. Ryan wrote:
With all of the new crazy quoting shenanagains, I'm not sure that the
"balenced brackets are fine" rule will still be possible; and thus end
delimeters will
[EMAIL PROTECTED] wrote:
Leo --
* Bracket with one big .sub ... .end, and don't use .sub for my real
subs (yuck -- I want to use .param, .arg, etc for subs and calls)
You can use .param/.arg - again: "A .sub/.end delimits a unit of
compilation". Look at imcc.y .param => restore, .arg =>
Brent Dax wrote:
Joseph F. Ryan:
# By default, references should not stringify to anything
# "pretty", they should stringifiy to something useful for
# debugging. Heck, even perl5 style should be fine. Not only
Why? Isn't the pretty form more generally useful?
I don't think so; I'd think
71 matches
Mail list logo