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
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
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, Jan
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.
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 makes
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
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
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
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 their own
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 that,
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
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, Craig DeForest
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, 2005 at 11:37:06AM -0700, Craig DeForest wrote:
: I just re-read Synopsis 9, which covers PDL-related
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 distinguish between a number and a list containing just [In
fact, that is more or less how
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
16 matches
Mail list logo