hcchien raised the following question on #perl6[1]:
If I want to loop through a nine-element array three elements at a time, I do
my @a = 1..9;
for @a - $x, $y, $z { say $x }
But what if I don't care about the elements 1,4,7? Would the following
be a sane syntax?
my @a = 1..9;
for @a - undef,
On 9/22/05, Carl Mäsak [EMAIL PROTECTED] wrote:
FWIW, to me it looks fairly intuitive. undef here means don't alias
the element, just throw it away... gaal joked about using _ instead
of undef. :)
Joked? Every other language that has pattern matching signatures that
I know of (that is, ML
Mark A. Biggar skribis 2005-09-21 17:44 (-0700):
Now for a related question: is it intended that ~$x and +$n be the same
as $x.as(Str) and $x.as(Num)? How locked in stone would this be, I.e.,
~ and + are macros that give the .as() form?
If I read everything correctly, this is the case.
Stuart Cook skribis 2005-09-22 10:39 (+1000):
If there's no (single) obvious interpretation of turn a value into a
number for a particular type, then don't struggle to come up with a
non-obvious one--I say just leave it undefined, or have it fail(), or
whatever.
Leaving it undefined is wrong
On Wed, Sep 21, 2005 at 10:28:33PM -0400, James E Keenan wrote:
David Landgren wrote:
demerphq wrote:
You miss my point. Whether the code be cross-platform or cross-version,
you need to aggregate the coverage results from all the environments
your code is designed to run on.
How is
On Wed, 21 Sep 2005, Joshua Gatcomb wrote:
I have mocked up an example of how you could do this in p5 with some ugly
looking code:
You may be interested to know that this has had an echo at
http://www.perlmonks.org/index.pl?node_id=493826
mostly misunderstood in the replies, IMHO. Basically
On Wed, 21 Sep 2005, Joshua Gatcomb wrote:
Cheers,
Joshua Gatcomb
a.k.a. Limbic~Region
Oops... I hadn't noticed that you ARE L~R...
Michele
--
Your ideas about Cantorian set theory being awful suffer from the
serious defect of having no mathematical content.
- Torkel Franzen in sci.math,
Michele Dondi wrote:
On Wed, 21 Sep 2005, Joshua Gatcomb wrote:
Cheers,
Joshua Gatcomb
a.k.a. Limbic~Region
Oops... I hadn't noticed that you ARE L~R...
In the tradition of i18n, etc., I had assumed that L~R was shorthand for
Luke Palmer. You may want to keep up the old tradition of
# New Ticket Created by Simon Glover
# Please include the string: [perl #37227]
# in the subject line of all future correspondence about this issue.
# URL: https://rt.perl.org/rt3/Ticket/Display.html?id=37227
If I run Configure using the --miniparrot option, and then run make,
then the
On Wed, Sep 21, 2005 at 11:44:17AM +0100, Jonathan Worthington wrote:
Joshua Hoblitt via RT [EMAIL PROTECTED] wrote:
[jhoblitt - Mon Sep 19 22:28:00 2005]:
[EMAIL PROTECTED] - Sun Sep 22 07:13:56 2002]:
If you're going to check the magic after the wordsize and bytecode, you
might as
I haven't touched parrot in ages at this point. Please go ahead and close
the bug.
--Josh
Eric wrote:
Since you wouldn't expect an object to stringify or numify...
You wouldn't??! I certainly would.
Object references already stringify/numerify/boolify in Perl 5. Unfortunately,
they do so with problematic default behaviours, which is why Cuse overload
allows you to overload q{},
No, please close it.
--Josh
Excuse my noobness, I really have no idea about any of the inner workings,
but am just concerned with a more elegant syntax of doing it.
How about something like:
if ($condition) {
pre;
always { # maybe uncond instead of always, or both -- always could
# mean 'ignore all conditions' and uncond
Ingo Blechschmidt asked:
my $pair = (a = 42);
say ~$pair; # a\t42? a\t42\n? a 42?
Not yet specified but I believe it should be 42 (i.e. stringifies to value).
Note that S02 does specify that pairs *interpolate* to key-tab-val-newline,
so you can still get a\t42\n by writing $pair
On 22/09/05, Shane Calimlim [EMAIL PROTECTED] wrote:
How about something like:
if ($condition) {
pre;
always { # maybe uncond instead of always, or both -- always could
# mean 'ignore all conditions' and uncond could mean
# 'ignore the current block's condition
mid_section;
}
post;
}
On Sep 22, 2005, at 3:08 AM, Luke Palmer wrote:
On 9/22/05, Carl Mäsak [EMAIL PROTECTED] wrote:
FWIW, to me it looks fairly intuitive. undef here means don't alias
the element, just throw it away... gaal joked about using _ instead
of undef. :)
Joked? Every other language that has
Both recently discussed situations with blocks can be solved by
introducing a way to leave the current block and resume it elsewhere.
I'll demonstrate it assuming there is a pause/cont combination. For
these examples to work, pause needs to take effect after the entire
statement it's in is
Damian Conway skribis 2005-09-22 8:20 (+1000):
Note that S02 does specify that pairs *interpolate* to
key-tab-val-newline, so you can still get a\t42\n by writing $pair
instead.
I think separating stringification and interpolation leads to
unpredictability, and is a very bad thing.
Juerd
--
HaloO,
Carl Mäsak wrote:
But what if I don't care about the elements 1,4,7? Would the following
be a sane syntax?
my @a = 1..9;
for @a - undef, $x, $y { say $x }
I think that, if the concept of lazy list evaluation is running
deep in Perl 6 than the obvious solution to me is:
for @a - $x,
HaloO,
Juerd wrote:
Both recently discussed situations with blocks can be solved by
introducing a way to leave the current block and resume it elsewhere.
With first class code types, _ and label beeing bound lexically
to the current instance of the sub class, the set of current control
flow
On Sep 22, 2005, at 03:46, Joshua Hoblitt via RT wrote:
[ghenriksen - Thu Feb 05 20:15:50 2004]:
Leo,
The patch is at the URL below, and I've split it into 4 for you. The
classes-include-lib patch must be applied before any of the other 3.
I've resolved the 3-4 conflicts that occurred since
As many TODOs, I'd say, one per bullet.
Thanks!
On Sep 22, 2005, at 3:31 AM, Joshua Hoblitt via RT wrote:
[leo - Mon Nov 01 06:28:21 2004]:
Will Coleda via RT [EMAIL PROTECTED] wrote:
[coke - Sat Jan 24 19:32:16 2004]:
It would be helpful if IMCC complained about duplicate .local
On 9/22/05, Paul Johnson [EMAIL PROTECTED] wrote:
On Wed, Sep 21, 2005 at 04:26:27PM +0200, demerphq wrote:
And, it doesnt help that something about DC breaks the defined
operator when dealing with overloaded objects. (yeah, he did say the
code was alpha quality :-)
Bug reports,
On Thu, Sep 22, 2005 at 07:23:06 -0400, David Storrs wrote:
On Sep 22, 2005, at 3:08 AM, Luke Palmer wrote:
On 9/22/05, Carl Mäsak [EMAIL PROTECTED] wrote:
FWIW, to me it looks fairly intuitive. undef here means don't alias
the element, just throw it away... gaal joked about using _
On Wed, Sep 21, 2005 at 13:53:20 +0200, TSa wrote:
HaloO Yuval,
you wrote:
On Mon, Aug 29, 2005 at 14:07:51 +0200, TSa wrote:
role Object does Compare[Object, =:=]
role Numdoes Compare[Num, ==]
role Strdoes Compare[Str, eq]
What is the implication of from the perspective of
Joshua Hoblitt wrote:
a) live with it
b) change the magic number to be two identical bytes so the byte
ordering doesn't matter
c) shrink the magic number to be a single byte
d) use a magic number that can also be used as the byte order indicator.
--
[EMAIL PROTECTED]
[EMAIL PROTECTED]
On Thu, Sep 22, 2005 at 08:20:42 +1000, Damian Conway wrote:
Ingo Blechschmidt asked:
my $pair = (a = 42);
say ~$pair; # a\t42? a\t42\n? a 42?
Not yet specified but I believe it should be 42 (i.e. stringifies to value).
Note that S02 does specify that pairs *interpolate* to
Yuval~
On 9/22/05, Yuval Kogman [EMAIL PROTECTED] wrote:
On Thu, Sep 22, 2005 at 08:20:42 +1000, Damian Conway wrote:
Ingo Blechschmidt asked:
my $pair = (a = 42);
say ~$pair; # a\t42? a\t42\n? a 42?
Not yet specified but I believe it should be 42 (i.e. stringifies to
Roger Browne [EMAIL PROTECTED] wrote:
If you do tweak the signature for the packfile format, I suggest you
take a leaf out of the PNG specification and ensure that the signature
will robustly detect common errors such as byte order transpositions,
CRLF-to-newline mappings (e.g. when binary files
Jonathan~
On 9/22/05, Jonathan Worthington [EMAIL PROTECTED] wrote:
Roger Browne [EMAIL PROTECTED] wrote:
If you do tweak the signature for the packfile format, I suggest you
take a leaf out of the PNG specification and ensure that the signature
will robustly detect common errors such as
HaloO,
Yuval Kogman wrote:
No, the role installs homogenious targets into the generic
binary-MMD comparator which I think is called eqv.
Err, why? We already have that with regular MMD semantics.
role Num {
multi *infix:eqv ($x:, Num $y) { $x == $y }
}
What you mean is double
This is a bug report for perl from [EMAIL PROTECTED],
generated with the help of perlbug 1.35 running under perl v5.8.6.
-
[Please enter your report here]
Attached is test case that when run under Test::Harness and
Devel::Cover will
As I was downloading the newest version of Devel::Cover this morning, I
pondered on the concept of 1 Kwalitee point for coverage = 80%, and
another for 100%, and how absolutely impossible it would be to set out
to establish these points for all the modules on CPAN. But it would be Good.
I
TSa skribis 2005-09-22 14:55 (+0200):
Why not simply:
loopbody:
Because I don't like non-block labels. It reminds me too much of
bad-goto.
This, and I fear this would have bad performance. That's based on
nothing, though.
And I hope we all agree, that goto behind the scenes is
not a
i was playing around with NCI stuff tonight and ran across a problem
in loadlib. the following code does not work:
.local pmc lib_gtk
lib_gtk = loadlib libgtk-x11-2.0
the problem is the '.' in the library name. code was added to src/
dynext.c in 8209 that gets the lib_name, the
Could we try loading it without any changes, and if that doesn't work,
strip the last .?
On Fri, 23 Sep 2005 15:51:31 +1000, Ross McFarland [EMAIL PROTECTED]
wrote:
i was playing around with NCI stuff tonight and ran across a problem in
loadlib. the following code does not work:
37 matches
Mail list logo