On Oct 2, 2006, at 10:26 AM, jerry gay wrote:
On 10/2/06, Jonathan Lang <[EMAIL PROTECTED]> wrote:
I'm not used to programming styles where a programmer intentionally
and explicitly forbids the use of otherwise perfectly legal code. Is
there really a market for this sort of thing?
use strict
If PDL-like threading syntax is adopted, this is trivial. In PDL:
$a = pdl(1,2);
$b = pdl(3,4);
$c = $a->(*1) * $b;
print $c;
yields the output:
[
[3 4]
[6 8]
]
The '(*1)' inserts a dummy dimension into $a, making it a 1x2-array
rather than a 2-array. Then
th
I vote for double-precision floating-point. Since double precision
is good to 10^-15, that allows times to be specified to a precision
of about 3 microseconds for the next century, and to a precision of
30 microseconds for the next millennium. Anyone who wants more
precision than that is l
Quoth Craig DeForest on Tuesday 05 July 2005 04:59 pm,
> ...This is important
> because, without proper maintenance of the leap-second table, all of our
> perl6 calendar programs will run an hour late a mere 500 years from now.
Uh, sorry -- "...an hour fast a mere 500 years from now."
Quoth Darren Duncan on Tuesday 05 July 2005 04:20 pm,
> I believe that at its core [the time/date] object should simply store a
count of
> rigorously defined time units relative to a rigorously defined epoch.
> What the epoch is and what the time unit is will need to be
> officially defined (eg,
My perspective from PDL is that "(1)[0][0][0]"..."[0]" should evaluate
to 1. The artificial distinction between a scalar and an array of
length 1 (in each dimension) is the source of endless hassles, and it's
a pretty simple DWIM to allow indexing of element 0 of any unused
dimension. That ma
The problem with using the units(1) database is that it only deals with
multiplicative relations -- so, e.g., it won't handle temperature.
Units resolvers are not so hard to come by -- the strategy is to try to break
each compound unit out into a collection of fundamental quantities that
are int
Yow -- units would be extra cool for perl6: I know of no other language that
has units support built in. It would go a long way toward making perl6 the
language of choice for students in the physical sciences...
The perl5 CPAN modules already have a pretty good unit system that could be
ported
Hmmm... It seems that this way does lie madness -- there's a fundamental
ambiguity between autothreading happening inside or outside the declared
loop, and there's no "least surprising" way to implement it. Certainly
inside the loop is the easiest and most natural to implement, but that acts
s
On Tuesday 01 February 2005 01:18 am, Markus Laire wrote:
> Luke Palmer writes:
> > Yeah, the sigils do get in the way for small placeholder variables like
> > these:
> > Â @C[ $i; $j; $k; $l ] = @A[ $i; $j ] * @B[ $k; $l ] Â
>...
> Would placeholder variables be used often enough to varrant th
Quoth Luke Palmer on Monday 31 January 2005 03:46 pm,
> C_{ijkl} = A_{ij} * B_{kl}
>
> You write either of:
>
> Â @C[$^i; $^j; $^k; $^l] = @A[$^i; $^j] * @B[$^k; $^l] Â
> @C = Â @A[$^i; $^j] * @B[$^k; $^l] Â
Hmm... This is both insanely great and also greatly insane.
The issue is th
Hmmm... David, you seem to have covered all the issues with that rather
lucid screed [attached at bottom]. I have a couple of dragon-nits to pick,
one involving infrastructure and one involving syntax.
First: it seems strange to me to add yet another property ("but
used_to_be_scalar") to t
On Tuesday 11 January 2005 10:06 pm, Dave Whipp wrote:
> We know that
>
> @a = (1, 2, 3);
> $b = @a[1];
>
> Loses the dimension as a DWIM.
>
> So perhaps we could say that assigning to a lower dimension always gets
> rid of a dimension of size 1 -- or error if it can't:
>
> @c = ( 1,2,3 ; 4,5,6 );
nally empty.
(Of course, substitute your favorite postfix unary character instead of '!';
'*' would work just as well...)
Quoth Craig DeForest on Monday 10 January 2005 03:56 pm,
> H... It would be easy to distinguish the slicing cases if it were
> easier to distingu
s to ]] (<== [0..10], [42], [EMAIL
PROTECTED] );
Then the default behavior is consistent (semicolons denote lists of lists)
but there is an "escape hatch" that lets you make a list of scalars-and-lists.
Quoth Larry Wall on Monday 10 January 2005 11:04 am,
> On Sat, Jan 08,
Sorry, too terse :-)
I meant "...a two dimensional array with 1x6 elements (probably correct)? Or
a one dimensional array with 6 elements (probably not correct)?"
Cheers,
Craig
Quoth David Storrs on Monday 10 January 2005 08:33 am,
> On Sat, Jan 08, 2005 at 11:37:06AM -0700, C
I just re-read Synopsis 9, which covers PDL-related actions and array slicing,
and came to the conclusion that either (A) there's a hole in the syntax as it
is lain out, (B) I lack sufficient understanding of what has been thought
out so far, or (C) that part of the language definition isn't fi
17 matches
Mail list logo