> "DC" == Damian Conway <[EMAIL PROTECTED]> writes:
DC> A practical argument in its favour is that it makes
DC> circular-lists-via-modulo:
DC> @list[++nextidx%7] = $nextval;
DC> $day_name = <>[$day%7];
DC> both work correctly.
not to defend 1 based arrays but all you have to
Leo --
Here's a Jako snippet:
var int x = 5;
{
var int x = 3;
print x;
}
print x
A naiive translation to imcc might be:
.sub _foo
.local int x
x = 5
.local int x
x = 3
print x
print x
.end
but (of course) that leads to an "x already defined" error.
I was hoping
Damian Conway:
# > Also, can I return superpositions (sorry, junctions), to provide
# > multiple classifications? Or would I return an array for that?
#
# A (dis)junction ought to work there.
That sounds horribly scary...
--Brent Dax <[EMAIL PROTECTED]>
@roles=map {"Parrot $_"} qw(embedding reg
Michael Lazzaro wrote:
How would you do something like:
(@foo,@bar,@zap) := classify { /foo/ ;; /bar/ ;; /zap/ } @source;
Since I don't understand what that's supposed to do, I probably *wouldn't*
do something like it. What effect are you trying to achieve?
Damian
Dave Whipp wrote:
I notice everyone still want Int context for eval of the block:
Pease don't forget about hashes. Is there such a thing as
'hashkey context'?
I doubt it. Unless you count Str context.
Perl6 is much better than Perl5 for naming parameters. Could
we make the following work?
Nicholas Clark mused:
I just had this thought - can I interpolate in there?
Something like
"\c[$(call_a_func())]"
Why not just:
"$(chr call_a_func()]"
???
Damian
ralph wrote:
I worry that C sounds too much like
something class-related
'Classify' also seems wrong if some items are
thrown away. I like 'part':
(@foo,@bar) := part { ... } @source;
ralph and I don't often agree, but I certainly do in this case.
I like C very much as a name for this buil
Larry wrote:
: Explain how having indexes (arrays, substr, etc...) in Perl 6 start at 0
: will benefit most users. Do not invoke legacy. [1]
How about, because I like it? You may, of course, see that as a
legacy argument, depending on our relative ages... :-)
A practical argument in its fav
On Thu, Dec 05, 2002 at 02:45:39AM -0800, Michael G Schwern wrote:
: 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:
[Fri, Dec 06, 2002 at 05:01:21PM -0500: Dan Sugalski]
> At 5:47 PM -0500 12/3/02, David Robins wrote:
> >On Tue, 3 Dec 2002, Dan Sugalski wrote:
> >- create immutable "true" and "false" PMCs
>
> That's fine.
>
> >- have not P0, P1 set P0 to $1->get_bool ? true : false
>
> Sure, that works.
Sean O'Rourke writes:
> On Thu, 5 Dec 2002, Sean O'Rourke wrote:
> > how 'bout "tang" for "Tog's A Negated Grep"?
>
> Gah. s/Tog/Tang/.
Wouldn't that mean we had to rename grep to 'gnat'? ("Gnat's Not A Tang",
presumably, never mind rot13 and reversal...)
--
Aaron Crane * GBdirect Ltd.
http:/
At 5:47 PM -0500 12/3/02, David Robins wrote:
On Tue, 3 Dec 2002, Dan Sugalski wrote:
At 4:29 PM -0500 12/3/02, David Robins wrote:
>Enlightenment appreciated as always.
This is something that'll come up with perl 6 reasonably soon as
well. The solution for us is to have truth and falsehood
Damien Neil wrote:
On Thu, Dec 05, 2002 at 02:45:39AM -0800, Michael G Schwern wrote:
Explain how having indexes (arrays, substr, etc...) in Perl 6 start at 0
will benefit most users. Do not invoke legacy. [1]
Answer 1: Ignoring legacy, it won't.
Bingo.
Answer 2: Because C uses 0-based i
On Thu, 5 Dec 2002, Sean O'Rourke wrote:
> On 5 Dec 2002, Rafael Garcia-Suarez wrote:
> > John Williams wrote in perl.perl6.language :
> > 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) :
> >
On 12/6/02 4:41 PM, Michael Lazzaro wrote:
> my PersonName $name = .new(...);
> my FormalStr $s = $name;# "Dr. William P. Smith"
> my InformalStr $s = $name;# "Bill"
>
> Whether that is good, bad, or indifferent I leave to the OO Police.
I'm not even deputized, but I call foul: exces
On Fri, Dec 06, 2002 at 03:24:44PM +1100, Damian Conway wrote:
> Larry was certainly in favour of it when he wrote A5
> (see under http://search.cpan.org/perl6/apo/A05.pod#Backslash_Reform).
> Except the separators he suggests are semicolons:
>
> Perl 5 Perl 6
> \x0a\x0d
On Friday, December 6, 2002, at 01:08 PM, Piers Cawley wrote:
He notes that VisualWorks Smalltalk makes the distinction between
'displayString', for the user oriented stringification and
'printString', for the programmer oriented.
One could imagine a scenario in which a user could accomplish an
Sent to the wrong list. Ignore, please.
__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
> This is a bit of an oversimplification. $foo and @foo do not always
> behave the same, even if $foo and @foo refer to the same array object.
> In particular, $foo doesn't behave like @foo in a list context.
> Scalars must continue to behave like scalars in list context, even
> if they're interna
> This is a bit of an oversimplification. $foo and @foo do not always
> behave the same, even if $foo and @foo refer to the same array object.
> In particular, $foo doesn't behave like @foo in a list context.
> Scalars must continue to behave like scalars in list context, even
> if they're interna
> This is a bit of an oversimplification. $foo and @foo do not always
> behave the same, even if $foo and @foo refer to the same array object.
> In particular, $foo doesn't behave like @foo in a list context.
> Scalars must continue to behave like scalars in list context, even
> if they're interna
Michael Lazzaro <[EMAIL PROTECTED]> writes:
> On Friday, December 6, 2002, at 01:28 AM, Joseph F. Ryan wrote:
>>> Array(0x1245AB)
>>>
>>> Personally, I like this format. It's succinct, informative, and tells
>>> you enough to do identity testing.
>>
>> I like it too, but I thought everyone el
=head1 Perl 6 and Set Theory
This document will introduce a new way of thinking about some Perl 6
constructs. In addition, it proposes some minor changes that would
help this way of thinking be more consistent. These changes may make
Perl 6 a better language in general, as a side effect.
Even i
On 5 Dec 2002, Rafael Garcia-Suarez wrote:
> John Williams wrote in perl.perl6.language :
> 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
Or, to follow the spirit r
> 2002-12-05 10:45:39, Michael G Schwern <[EMAIL PROTECTED]> wrote:
> 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:
On Thu, Dec 05, 2002 at 02:45:39AM -0800, Michael G Schwern wrote:
> Explain how having indexes (arrays, substr, etc...) in Perl 6 start at 0
> will benefit most users. Do not invoke legacy. [1]
Answer 1: Ignoring legacy, it won't.
Answer 2: Because C uses 0-based indexes, Parrot is written in C
On Fri, Dec 06, 2002 at 12:27:31PM -0700, Luke Palmer wrote:
: > Date: Fri, 06 Dec 2002 11:15:20 -0800
: > From: Larry Wall <[EMAIL PROTECTED]>
: >
: > As for constructor syntax, I suppose we might make use of the $. notation
: > like this:
: >
: > method new($.name, $.age) {
: > return $
> Date: Fri, 06 Dec 2002 11:15:20 -0800
> From: Larry Wall <[EMAIL PROTECTED]>
>
> As for constructor syntax, I suppose we might make use of the $. notation
> like this:
>
> method new($.name, $.age) {
> return $class.bless;
> }
Come to think of it, new is a class method, not an ob
Michael said:
> I worry that C sounds too much like
> something class-related
'Classify' also seems wrong if some items are
thrown away. I like 'part':
(@foo,@bar) := part { ... } @source;
Headed off in another direction, having a sub
distribute its results like this reminds me of:
... -> .
On Fri, Dec 06, 2002 at 08:44:23AM -0700, Luke Palmer wrote:
: > Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
: > Sender: [EMAIL PROTECTED]
: > From: Simon Cozens <[EMAIL PROTECTED]>
: > Date: 06 Dec 2002 14:54:43 +
: > Organization: Bethnal Green is PEOPLE!
: > X-Posted-By: 217.204.17
Michael Lazzaro wrote:
I worry that C sounds too much like something class-related,
and would confuse people. What about C or something? Decent
thesaurus entries for include:
assign, classify, comb, compartmentalize, discriminate, distribute,
group, order, segregate, sift, winnow, amputate, c
On Fri, Dec 06, 2002 at 10:16:20AM -0700, John Williams wrote:
: On Fri, 6 Dec 2002, Joseph F. Ryan wrote:
: >
: > What's wrong with single quoted here-docs?
:
: What's wrong is that the documentation team is trying to allow \qq[]
: there too, contradicting their own assertion that backslashes are
"Michael Lazzaro" <[EMAIL PROTECTED]> wrote
>
> Some of those might be appropriate (or just amusing). :-)
I still like partition (or simply C). Segregate (c)
might also work
I notice everyone still want Int context for eval of the block:
Pease don't forget about hashes. Is there such a thing as
On Fri, Dec 06, 2002 at 10:40:18AM -0500, Dan Sugalski wrote:
: If an aggregate and a reference to an aggregate are going to behave
: the same, which is what Larry's indicated in the past, then
: stringifying a reference should be the same as stringifying its
: referent.
This is a bit of an ove
On Friday, December 6, 2002, at 09:46 AM, Luke Palmer wrote:
3) allowing \qq[] in single-quoted here-docs.
PRO: it's consistent with single-quotes
CON: it contradicts the assertion that backslashes are not special
in single quoted here-docs
The problem is, as Larry said, that heredocs ar
Gopal V wrote:
If memory serves me right, Leopold Toetsch wrote:
WOuld it help to split imcc.y into main/parser/parser_utils or are you
doing this anyway?
yes pushing some code from imcc.y into a seperate file is what I had in
mind ... But have not got to that yet ...
Ok, than I'll separa
On Friday, December 6, 2002, at 01:28 AM, Joseph F. Ryan wrote:
Array(0x1245AB)
Personally, I like this format. It's succinct, informative, and tells
you enough to do identity testing.
I like it too, but I thought everyone else hated it :)
I think people like it fine, but many people don't
At 6:36 PM -0500 12/5/02, Joseph F. Ryan wrote:
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 is this handy, but also prevents
problems with circular referencing data str
> Date: Fri, 6 Dec 2002 10:16:20 -0700 (MST)
> From: John Williams <[EMAIL PROTECTED]>
>
> 2) requiring balanced delimiters to be escaped,
>PRO: it's consistent with non-balanced delimiter requirements
>CON: you already can; don't force it those who don't want it
I'll say no, agreeing with
On Thursday, December 5, 2002, at 07:55 PM, Damian Conway wrote:
equally. The built-in would actually be doing classification of the
elements of the list, so it ought to be called C.
I worry that C sounds too much like something class-related,
and would confuse people. What about C or someth
Joseph F. Ryan:
# Brent Dax wrote
#
# >To tell you the truth, I don't consider arrayrefs references
# anymore.
# >They're just Array objects that don't happen to be in @whatever
# >symbols. I don't know if this is the official view, but that fits my
# >brain better.
# >
#
# So you're saying t
On Friday, December 6, 2002, at 04:28 AM, Joseph F. Ryan wrote:
Brent Dax wrote
To tell you the truth, I don't consider arrayrefs references anymore.
They're just Array objects that don't happen to be in @whatever
symbols.
I don't know if this is the official view, but that fits my brain
bette
On Fri, 6 Dec 2002, Joseph F. Ryan wrote:
>
> What's wrong with single quoted here-docs?
What's wrong is that the documentation team is trying to allow \qq[]
there too, contradicting their own assertion that backslashes are not
special in that context.
> Don't forget that the backslash is already
If memory serves me right, Leopold Toetsch wrote:
> WOuld it help to split imcc.y into main/parser/parser_utils or are you
> doing this anyway?
yes pushing some code from imcc.y into a seperate file is what I had in
mind ... But have not got to that yet ...
Was curious about the following lines
[EMAIL PROTECTED] wrote:
Leo --
Here is a simple Jako test program, which exercises the assignment syntax:
Here it is compiled to IMC:
[ Q/A intersparsed in imcc code for clearness ]
.sub __MODULE__
.local int a # var int a;
Aaron Sherman wrote:
On Fri, 2002-12-06 at 10:40, [EMAIL PROTECTED] wrote:
Looks like the first stages of constant-folding to me, no?
No, but constant folding is done anyway. Both "3.14" are one constant
loation.
The constant folding may simply not deal with integers yet
No, integ
[EMAIL PROTECTED] wrote:
Leo --
If .sub ... .end bracket not a subroutine, but a unit of compilation
(module?), then
shouldn't we make the name reflect the purpose?
A thing compiled in one piece ist mostly a subroutine.
I disagree. A think what is most often compiled in one piece is a f
Leo --
> > If .sub ... .end bracket not a subroutine, but a unit of compilation
> > (module?), then
> > shouldn't we make the name reflect the purpose?
> A thing compiled in one piece ist mostly a subroutine.
I disagree. A think what is most often compiled in one piece is a file,
with a combina
On Fri, 2002-12-06 at 10:40, [EMAIL PROTECTED] wrote:
> set N0, 3.14
> set N0, 3.14
> set N0, 3.14
> I don't understand how d and e both become N0, nor how both f and g become
> S0. a, b, and c all seem to get their own registers. Is there some
>
On Fri, Dec 06, 2002 at 09:33:14AM -0500, Miko O'Sullivan wrote:
> For example, suppose I want to separate a list of people into people who
> have never donated money and those who have. Assuming that each person
> object has a donations property which is an array reference, I would want
> to clas
> Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
> Sender: [EMAIL PROTECTED]
> From: Simon Cozens <[EMAIL PROTECTED]>
> Date: 06 Dec 2002 14:54:43 +
> Organization: Bethnal Green is PEOPLE!
> X-Posted-By: 217.204.174.162
>
>
> Is it clear how attributes accessors on objects are going t
Leo --
Here is a simple Jako test program, which exercises the assignment syntax:
var int a, b, c;
var num d, e;
var str f, g;
a = 5;
a = b = c = 5;
d = 3.14;
d = e = 3.14;
f = "Howdy";
f = g = "Howdy";
a = b;
a = b = c;
Here it is compiled to IMC:
.sub __MODULE__
[EMAIL PROTECTED] wrote:
Leo --
If .sub ... .end bracket not a subroutine, but a unit of compilation
(module?), then
shouldn't we make the name reflect the purpose?
A thing compiled in one piece ist mostly a subroutine.
BTW, what is the difference between .sym and .local?
UTSL ;-) no
Gopal V wrote:
iANY("add", R3(r0,r1,r2))
Better use INS (the public interface of above functions)
Thanks, a shared library implementation of such a thing is what I'm
looking for ... I'll take a look at doing that ...
WOuld it help to split imcc.y into main/parser/parser_utils or are you
Is it clear how attributes accessors on objects are going to work yet?
I need to say something along the lines of:
sub new {
my $class = shift;
my ($name, $age) = @_;
bless {
name => $name,
age => $age
}, $class;
}
sub age { my $self=shift; $self->
On Fri, 6 Dec 2002, Damian Conway wrote:
> The selector block/closure would, naturally, be called in C context
> each time, so (again, as Larry pointed out) a boolean function would
> naturally classify into two arrays. Though it might at first be a little
> counterintuitive to have to write:
OK,
On 12/05/2002 12:18 PM, 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 \x, meaning the same thing? I
Leo --
OK. I'll have a look at a single outer .sub ... .end, and implementing
subs with
regular labels along with the .param stuff.
If .sub ... .end bracket not a subroutine, but a unit of compilation
(module?), then
shouldn't we make the name reflect the purpose?
BTW, what is the difference b
Brent Dax wrote
To tell you the truth, I don't consider arrayrefs references anymore.
They're just Array objects that don't happen to be in @whatever symbols.
I don't know if this is the official view, but that fits my brain
better.
So you're saying that classes should stringify to a pretty-pr
Joseph F. Ryan:
# >Why? Isn't the pretty form more generally useful?
# >
#
# I don't think so; I'd think it to be annoying to have type
# more code in order to specify a more cocise form; if I need
# to dump a structure, I'd prefer to do it manually.
I think it's useful to be able to say @arra
On 05/12/02 02:45 -0800, Michael G Schwern wrote:
> 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
61 matches
Mail list logo