working with a rtl
language would ever wish to count the characters ltr. And note that we
are calling the positions start and end, not left and right.
If I'm missing something basic here, let me know.
-- Rod Adams
some more time to work on S29. I've been making
progress (slowly) on getting the string functions written up, but life
seems to be conspiring against rapid progress.
-- Rod Adams
head, a list of lists is still just a list. An array
of arrays is a different story.
So this behavior is what I meant to say in S29. If it's unclear, I'm
open to suggestions.
-- Rod Adams
(who still needs more time to work on S29. Looks like I'll have some in
a few weeks. In the meantime
($a,9,3) = girl;
$b[9..11] = girl[];
say A: $a;
say B: $b;
A: All good girls go to heaven.
B: All good girs go to heaven.
-- Rod Adams
.
Unfortunately, I don't have a solid proposal handy, which has kept me
from posting it. But since there is some interest in this, I'll throw
the concept out there, and see if anyone else has a good idea what they
should look like, and exactly how they should work.
-- Rod Adams
be left to assume that Damian is suffering
from a very long week. Poor Damian. Sadly, my recent weeks have felt as
if they were 2 months long. toastHere's to a return of the 7 day
week!/toast
-- Rod Adams
to be pointed to where methods v functions
is clarified.
Many of them will happen in S29, since there's an odd duality that class
based multi subs exist in. I don't pretend to fully understand it, but
look at http://www.nntp.perl.org/group/perl.perl6.language/19802 for
insight.
-- Rod Adams
David Wheeler wrote:
But the first person to write [a...] gets what's comin' to 'em.
Is that nothing (since '.' lt 'a'), or everything after 'a'?
-- Rod Adams
= '...'} CATCH {default};
Except that one is run-time, the other compile-time.
So one could interpret this thread as a cry for a compile-time exception
handler. I see some interesting uses for this in conjunction with
Ceval, but I doubt I'm seeing the whole story.
-- Rod Adams
S09 take care of that w/ the [ ; ; ] syntax?
-- Rod Adams
= %hash{$k}; # \(1,7)
$jv = juncture %hash{$k}; # 1|7
Am I way off base here?
What would you propose
@v[all(any(4,5),one(1,2,3),none(7,8,9))]
return?
-- Rod Adams
the place, and the ^ ties in with the $^x of parameters.
As for shortcuts to $OUTER::_, perhaps $-, if it's not put to some
better usage, but anything beyond that is getting too obscure for common
usage.
-- Rod Adams
be a normal function. You
might be able to define an infix:for, but getting to where you don't
need the {}'s on the LHS block, and getting a proper list on the RHS
gets rather abnormal.
Something that crossed my mind while writing this: Does
for { say } == @a;
Work?
-- Rod Adams
;
print Windoze\n or die Can't print: $OS_ERROR;
}
Not exactly a fair comparison, since it's common to not use English
due to the $ issue.
I suspect that if that was not the case, it would be used more.
-- Rod Adams
the evaluation turn one way or the other is _not_
something that will be readily supported.
-- Rod Adams
Luke Palmer wrote:
Rod Adams writes:
Perhaps the easiest way to explain the difficulty here is to note that
executing a relational op (i.e. returning a boolean) value on a junction
argument returns a junction of boolean values.
Is that so? Does Perl6 have some fundamental law
be more than
sufficient.
-- Rod Adams
John Macdonald wrote:
On Wed, May 04, 2005 at 03:02:41PM -0500, Rod Adams wrote:
If there are good uses for coroutines that given/take does not address,
I'll gladly change my opinion. But I'd like to see some examples.
FWIW, I believe that Patrick's example of the PGE returning matches
could
. Looking ahead, I do not see this state changing for
the better in the foreseeable future.
It's my hope that someone none(@Larry) can and will pick this effort up.
I will give whatever assistance I can to anyone choosing to do so. Drop
me a line.
-- Rod Adams
:
sub Foo { }
Is it illegal to say this?
sub Foo returns Void { }
Can't we just say :
Void =:= none(Any)
and get Void for near free?
-- Rod Adams
the [] metaop.
Unless, of course, there is some subtle difference between a 3-d hash
and a hash of hashes of hashes that invalidates this.
-- Rod Adams
to make != and !~ and ne transform themselves via not raising, or
we have to disallow negative comparisons on junctions entirely.
Opinions?
I go with option 2b: leave the syntax the way it is, but fire off a
warning, not an error when someone does this.
-- Rod Adams
Larry Wall wrote:
On Sat, May 14, 2005 at 12:51:32PM -0500, Rod Adams wrote:
: Unless, of course, there is some subtle difference between a 3-d hash
: and a hash of hashes of hashes that invalidates this.
No difference, I hope. The multidimensional notation is meant
to extend to HoH and AoA
that $x{2} is calling an array.
-- Rod Adams
by default.
$_ bound to $?SELF at start of method.
o.
O.
this.
self.
me.
^
-
_
° (an idea I just had. would likely need a 7-bit option as well)
..
As for myself, I'm unfavorable to the first option, favorable to -, °,
and me., neutral to the rest.
-- Rod Adams
Juerd wrote:
Rod Adams skribis 2005-05-14 19:21 (-0500):
o.
O.
this.
self.
me.
Not special syntax, meaning you can no longer use these identifiers for
your own class. Bad style to use single-letter identifiers, but we know
what trouble $a and $b in Perl 5 cause, and the B:: namespace.
I
an easy
optimization of including unboxed equivalents and letting MMD sort it out.
-- Rod Adams
log10() is called, the CALLER for
log() is the same as the CALLER for log10.
IMO, if this is not the case, it severely limits the utility of curried
functions. Comments from @Larry requested.
-- Rod Adams
thoughts has been that:
[op] @list
behaves something like:
eval join(op, @list)
so feeding it an empty list would return undef, regardless of op.
Similarly, if @list is just one element, it returns that element.
-- Rod Adams
mean it is that way.
But the eval join way of looking at it does seem to be consistent with
what I've seen discussed previously, and would provide a useful way to
remember the effects of edge cases.
-- Rod Adams
have to stop and wonder if wrapping
it inside a map would be more natural. If it does happen, it'd likely
need to copy the key generation style of the new sort.
-- Rod Adams
for, and that it
likely shouldn't carry the name 'uniq'.
-- Rod Adams
. There is some logic in
giving all the p5 modules an author of perl5, since they will not have
one on their own. However, I think the calling syntax would have to be
use Digest-(Any)-perl5; to force the usage of a perl5 version.
-- Rod Adams
element.
-- Rod Adams
Austin Hastings wrote:
--- Rod Adams [EMAIL PROTECTED] wrote:
TSa (Thomas Sandlaß) wrote:
You mean @a = [[1,2,3]]? Which is quite what you need for multi
dimensional arrays anyway @m = [[1,2],[3,4]] and here you use
of course @m[0][1] to pull out the 2. I'm not sure
in Perl6?
@a = 1,2,3;
You could, if you changed the precedence of , to be tighter than =.
However, by default, = has higher precedence than ,, so that you need
parens to override this decision: @a = (1,2,3);
Or use
@a == 1,2,3;
-- Rod Adams
Markus Laire wrote:
Rod Adams wrote:
TSa (Thomas Sandlaß) wrote:
You mean @a = [[1,2,3]]? Which is quite what you need for multi
dimensional arrays anyway @m = [[1,2],[3,4]] and here you use
of course @m[0][1] to pull out the 2. I'm not sure if this
automatically
makes the array multi
the new version 2)
install it, and globally update your code to match, 3) give each script
it's own libpath.
I still think auto fallback makes sense. If you don't like it, always
fully specify your use statements. See S11 for details.
-- Rod Adams
Juerd wrote:
Rod Adams skribis 2005-05-26 4:15 (-0500):
From S02: Array and hash variable names in scalar context
automatically produce references.
Since [...] produces a scalar arrayref, we end up with an arrayref one
both sides of the =.
No.
There is no scalar context on the LHS
'perl5' makes sense, and could be matched against, both positively and
negatively.
-- Rod Adams
)installation of collections.
-- Rod Adams
Nathan Gray wrote:
possibly as an strftime() pattern.
Can we please make sure that strftime() is _not_ OS dependent like the
POSIX version is now?
-- Rod Adams
like : Junction of Int|Str.
-- Rod Adams
lhs.
Unless we spell that Cerror.
-- Rod Adams
Sam Vilain wrote:
Rod Adams wrote:
How do I specify the signature of a context-sensitive function?
sub foo() returns (what?) {
return want ~~ Scalar ?? cheap_integer_result :: List_of_Sheep;
}
I suspect a typed junction would look like : Junction of Int|Str.
Not quite
the foo's currently in scope at the time the
reference is made.
Personally, I think #3 would be the most useful.
-- Rod Adams
still find that only reliable way to
do automated multi-processing is to whip out Win32::Process and start a
new interpreter with special I'm a child process arguments.
-- Rod Adams
the lexicals in the outer scope to the
current scope.
-- Rod Adams
Juerd wrote:
Still, argumentless split probably defaults to something. And ' ' is a
good thing to default to, IMO.
I like /\s+/ as a default for split better.
-- Rod Adams
that counterintuitive. A more consistent
approach might produce
13
14
14
Don't you mean:
13
4
4
?
-- Rod Adams
' is implicit. I think I like the return
of a ref better, since you're not always going to want to build the
function out and store it. But the call can be hijacked, so I guess
that's okay.
-- Rod Adams
than just AUTO.* methods, which opens the door up for
all kinds of useful perversions, especially in the age of bindings and such.
I leave the definition of something useful to others.
-- Rod Adams
Larry Wall wrote:
On Mon, Jun 20, 2005 at 07:09:42PM -0500, Rod Adams wrote:
: S10 talks about how it is AUTOSUB vs AUTOMETH (and others), but AUTOLOAD
: is still around. S10 doesn't mention it, but I think it's been said that
: AUTOLOAD only gets called as a last resort.
Really, the only
($y); # even though $y looks like a Num
$obj.foo($z); # let MMD sort it out.
It's unclear if
$obj.fooString($y);
even works, or should work, even if it does.
It be no means solves all of Yuval's problems, but it would be a handy
workaround to un-multi your calls.
-- Rod Adams
David Storrs wrote:
On Jul 8, 2005, at 4:25 PM, Dave Whipp wrote:
Rod Adams wrote:
multi method foo#bar (Num x) {...}
multi method foo#fiz (String x) {...}
$y = 42;
$obj.foo#fiz($y); # even though $y looks like a Num
$obj.foo($z); # let MMD sort it out.
Instead
-Original Message-
From: Rod Adams [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 31, 2003 12:56 PM
To: Perl 6 Language
Subject: Re: Perl 6's for() signature
At 10:05 AM 7/31/2003 -0600, Luke Palmer wrote:
Well, I don't think it's possible, actually. There's a flattening
list context at the beginning
the language to loose the internal cohesiveness that
all languages need, and am suitably scared of design by committee... but
I'd like to think that there's something that could be done to help matters.
Comments?
Suggestions?
-- Rod Adams
PS -- I'm willing to commit several hrs a week to the effort.
At 10:40 PM 11/14/2003 -0800, chromatic wrote:
I'd really like to see people start turning the existing design
documents into story cards and programmer tests for Perl 6. That'll
make it much easier to implement the thing.
So basically go back through the existing Apoc/Exeg's and break it down
At 04:40 PM 11/24/2003 -0800, Michael G Schwern wrote:
I definately agree that this is used rarely enough that it should be a word
and not a single character.
then sounds too much like if/then which is confusing. Its exactly
the opposite from what you're trying to convey.
It also doesn't convey
Luke Palmer wrote:
Joe Gottman writes:
- Original Message -
From: Jonathan Lang [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, December 20, 2003 3:41 PM
Subject: [perl] Re: Object Order of Precedence (Was: Vocabulary)
Larry Wall wrote:
If DangerousPet doesn't define a feed
PerlDiscuss - Perl Newsgroups and mailing lists wrote:
When the official release of Perl 6 is released and I start to write some
Perl 6 programs using Perl 5 modules, will I get any errors? How will this
be handled? Will all of the Perl 5 modules have to be ported over and
converted to Perl 6
Dan Sugalski wrote:
They'll live. Python and Ruby both have a single global interpreter lock
and nobody much cares.
People won't move to parrot because of signal or thread support, or
because we give them a cookie. People will move to parrot because it
runs perl 6, or because it gives them
Uri Guttman wrote:
RA == Rod Adams [EMAIL PROTECTED] writes:
that is not the only way as i have pointed out. it is just a way that is
promoted heavily (like java). events if done correctly are generaly
faster than threads and use much less ram (no stack context created for
each thread
Uri Guttman wrote:
RA == Rod Adams [EMAIL PROTECTED] writes:
Except then the client wanted it to work under Win32, where I've
never trusted any of the pseudo-forks that perl did (esp with
Network I/O going on). So I rewrote the whole thing in a language
that supported threads.
other than the fork
with),
+$verbose,
+$foo
} returns Array | undef {
# real code here
}
-- Rod Adams
to construct my own map like functions,
and have creating them with pipeline performance in mind to be easy.
Just a thought, since with the creation of == and ==, pipelining is
bound to become an even more common construct.
-- Rod Adams
Randy Sims's test case:
#!/usr/bin/perl
use strict;
use
Aaron Sherman wrote:
On Mon, 2004-08-30 at 16:34, Rod Adams wrote:
@x = @y == map lc == grep length == 4;
I would think you actually want to be able to define grep, map, et al.
in terms of the mechanism for unraveling, and just let the optimizer
collapse the entire pipeline down
Larry Wall wrote:
I'm still thinking A is the first one and Z is the last one. Someone
talk me out of it quick.
I had thought about A and Z before my previous post. I dismissed it for
two reasons:
1) Using Alphas as an index for something that should be numeric can be
very confusing.
Luke Palmer wrote:
Jonadab the Unsightly One writes:
Rod Adams [EMAIL PROTECTED] writes:
One solution I see to this would be to have a lazy return of some
kind, where you can send out what results you have so far, but not
commit that your execution is over and still allow further results
in the Impatience department.
(I need more sleep)
-- Rod Adams
in the core documentation as a learning tool, would do the job
nicely. And it doesn't need to be discussed on p6i, p6l, or p6c, at
least not for a very long time.
Or we could just burn a RE parser into everyone's brain, as you
mentioned. That'd also work.
-- Rod Adams
a simple stub was stored in a central RDBMS.
Made releases and version control much nicer.
-
By saying
#!/usr/bin/perl6
forces Perl 6, I assume you mean : The compiler sees /:i ^#! .* perl6/
on the first line.
-
-- Rod Adams
Larry Wall wrote:
On Tue, Nov 09, 2004 at 09:18:47PM -0600, Rod Adams wrote:
: Can we get an AUTOCLASS/AUTOCLASSDEF hook pair?
Considering a class is just a variable in another symbol table, seems
like an AUTOVAR in the container might cover it.
I guess I don't understand enough of how P6
sense as well. Parsing should not be
hindered since one would occur in operator context, and the other in
expression context.
-- Rod Adams
Brent 'Dax' Royal-Gordon wrote:
I like this in general. However...
Larry Wall [EMAIL PROTECTED] wrote:
* Since we already stole angles from iterators, «$fh» is not
how you make iterators iterate. Instead we use $fh.fetch (or
whatever) in scalar context, and $fh.fetch or @$fh
to stop and ask: is that ($a $b) ($c $d),
or $a ($b $c) $d. It quickly comes to the right answer, but the
question never comes up in the first line. If I wanted to use more
parens for clarity, I'd use LISP.
-- Rod Adams
== Cpop in standard implementations.
So Cenq and Cshift? yeck.
-- Rod Adams
Alexey Trofimenko wrote:
On Sat, 04 Dec 2004 11:03:03 -0600, Rod Adams [EMAIL PROTECTED] wrote:
Okay, this rant is more about the \s\s than \s=\s. To me, it is
easier to understand the grouping of line 1 than line 2 below:
if( $a$b $c$d ) {...}
if( $a $b $c $d ) {...}
In line2, my mind has
Larry Wall wrote:
On Sat, Dec 04, 2004 at 08:14:17PM -0600, Rod Adams wrote:
: In fact, unary = imposes whitespace requirements on all ops that end in =.
Not true.
I guess not all cases. But several do in certain situations.
$x ==$foo; # $x == $foo; $x = =$foo;
@x ==$foo; # @x = =$foo; @x
Larry Wall wrote:
On Sat, Dec 04, 2004 at 08:55:00PM -0600, Rod Adams wrote:
: $x ==$foo; # $x == $foo; $x = =$foo;
: @x ==$foo; # @x = =$foo; @x == $foo;
: $x//=$foo; # $x // =$foo; $x //= $foo;
: [EMAIL PROTECTED]; # $x ** [EMAIL PROTECTED]; $x **= @y;
In each of those cases the longest-token
a P5 $punct.
-- Rod Adams
Considering that proper and common usage, not to mention strictures,
dictates a heavy insistence on 'my'. I will thus assume that creation of
lexical variables with 'my' far out numbers the creation of package
space globals. Should we not then have it where it's the default
behavior, and
;
complex128 @longdoublecomplex;
Given that most of the stated reservations had to deal with explicit
declaration better defining scope, what is wrong with drooping the my in
this case?
-- Rod Adams
a different syntax makes it significantly less 'magical'. (even though
Magic is Good, imho)
I should probably stop rambling now and get some sleep.
-- Rod Adams
,
that it deletes the pair at the same time.
If we do that, I'd also want to be able to
push %x, %y;
which would mean something like:
%x{%y.keys} == %y{%y.keys};
but be much easier to read.
-- Rod Adams.
(And now I'm really off to bed.)
junctions.
-- Rod Adams
Damian Conway wrote:
Rod Adams wrote:
The overall impression I'm getting here is that we need some syntax
for saying:
$x = any(1..1000) such_that is_prime($x);
In standard Perl 6 that'd be:
$x = any(grep {is_prime $^x} 1..1000);
or, if you prefer your constraints postfixed:
$x = any( (1
Patrick R. Michaud wrote:
On Sat, Feb 12, 2005 at 03:49:02AM -0600, Jonathan Scott Duff wrote:
On Sat, Feb 12, 2005 at 01:03:26AM -0600, Rod Adams wrote:
I also find the following incredibly disturbing:
perl6 -e $x = 'cat'|'dog'; say $x;
dog
cat
Would that happen
Patrick R. Michaud wrote:
On Sat, Feb 12, 2005 at 12:41:19AM -0600, Rod Adams wrote:
Of course we'll always have Cgrep. But this is Perl, and I want YAWTDI.
After all, another way to test membership was just added, whereas before
you pretty much just had Cgrep.
...another way to test
Patrick R. Michaud wrote:
On Sat, Feb 12, 2005 at 01:18:53PM -0600, Rod Adams wrote:
My issue is less that lists and sets are radically different. It is much
more a matter of Junctions and Scalars are radically different. Getting
me to accept that a Scalar holds several different values at once
still have to do something completely different to
determine what the factors are.
Sometimes a short loop is a good thing.
btw, in my set notation, you get:
@bar * {is_factor($^a, $foo)}
-- Rod Adams
Patrick R. Michaud wrote:
Rod Adams wrote:
I would argue that this sort of relational comparison is of limited
usefulness.
Well, except junctions hold more information than the simple comparisons
I've given here. For example, a junction can have a value like:
$x = ($a $b) ^ ($c $d
values of the same type?
If evaluation of one value of a junction causes an error, is $! now a
junction as well?
-- Rod Adams
Damian Conway wrote:
Rod Adams wrote:
I also find the following incredibly disturbing:
perl6 -e $x = 'cat'|'dog'; say $x;
dog
cat
That would be disturbing if that's what happened.
Csay @what is just a shorthand for Cprint @what, \n.
So saying a junction is the same as printing it, which is a run
Arrays and Hashes over the edge
for needing their own container and sigil, whereas Junctions/Sets do not.
-- Rod Adams
Damian Conway wrote:
Rod Adams wrote:
However, what if what you're calling a non-Perl Parrot based function?
Do we disable junctions from playing with non-PurePerl functions? Or do
we autothread over them? How do we tell if a non-Perl function outputs
to determine if we should be able
At 01:04 PM 2/15/2005 -0800, chromatic wrote:
On Tue, 2005-02-15 at 14:26 -0600, Rod Adams wrote:
So I'm interested in hearing what pushes Arrays and Hashes over the edge
for needing their own container and sigil, whereas Junctions/Sets do not.
Perl isn't a pure object-oriented language
yours in almost
every respect. You put limits on unsuspectedly storing a junction in a
scalar. I made a new place to put them.
-- Rod Adams
-defined class with it's own sigil? (w/o having to modify half the
parse rules).
-- Rod Adams
Patrick R. Michaud wrote:
On Tue, Feb 15, 2005 at 03:07:53PM -0600, Rod Adams wrote:
I see it this way:
When perl sees a function call, and one of the arguments is a junction,
there are three basic options:
1) If the junction is wrapped up in some larger container, like a slurpy
list, pass
1 - 100 of 235 matches
Mail list logo