A recent rakudo commit [1] is a quick fix for #78896 [2] to allow
exponentiation of Duration's.
I'm uneasy with allowing this and I think the spec probably meant not
to but is badly worded [3]:
Durations allow additive operations with other durations, and allow
any numeric operation with a
Am 17.11.2010 10:31, schrieb Kris Shannon:
A recent rakudo commit [1] is a quick fix for #78896 [2] to allow
exponentiation of Duration's.
And it did so with a real world use case in mind.
I'm uneasy with allowing this and I think the spec probably meant not
to but is badly worded [3]:
On 11/17/10 14:03, Moritz Lenz wrote:
Am 17.11.2010 10:31, schrieb Kris Shannon:
$duration * $duration# WRONG, durations aren't geometric
$duration * 2# ok, a duration twice as long
2 * $duration# same
What are your thoughts?
I've summarized my
Am 17.11.2010 12:55, schrieb Richard Hainsworth:
On 11/17/10 14:03, Moritz Lenz wrote:
Am 17.11.2010 10:31, schrieb Kris Shannon:
$duration * $duration # WRONG, durations aren't geometric
$duration * 2 # ok, a duration twice as long
2 * $duration # same
What are your thoughts?
I've
Branch: refs/heads/master
Home: https://github.com/perl6/specs
Commit: 6cd1df9b2e2b80d63713d6ffb24003762cc30d97
https://github.com/perl6/specs/commit/6cd1df9b2e2b80d63713d6ffb24003762cc30d97
Author: Carl Masak cma...@gmail.com
Date: 2010-11-17 (Wed, 17 Nov 2010)
Changed paths:
M
On 11/17/2010 01:46 PM, Moritz Lenz wrote:
Just as a data point, in physics duration squared does exist.
On the other hand, i can see why an Instant can't be used as a linear
value: it does not have a clear origin (or zero value).
Therefore the multiplication of two Instant may results in
Am 17.11.2010 14:02, schrieb Oha:
On 11/17/2010 01:46 PM, Moritz Lenz wrote:
Just as a data point, in physics duration squared does exist.
On the other hand, i can see why an Instant can't be used as a linear
value: it does not have a clear origin (or zero value).
That's correct, and the
I'm not convinced that the type system shouldn't be helping with
dimensional analysis, but at least it shouldn't hurt. By all means,
let the programmer raise a Duration to a power - but the type of the
result should not also be Duration. In the absence of automatic
dimension tracking, just
Mark ():
I'm not convinced that the type system shouldn't be helping with
dimensional analysis, but at least it shouldn't hurt. By all means,
let the programmer raise a Duration to a power - but the type of the
result should not also be Duration. In the absence of automatic
dimension
I still have uses for Durations.
For instance, I want to dispatch a different .Stringy method to Durations than
to Nums. It's convenient to me that the difference between two Instants has a
different type than the difference between 1654321681.123 and 1654321021.65438.
I just think
On 11/17/2010 02:56 PM, Carl Mäsak wrote:
Or, by Ockham, since Duration is now deprived of its only task --
making life harder for the programmer -- remove it altogether from the
language and just put a number type in its place, representing number
of seconds.
I could be wrong but this
On Wed, Nov 17, 2010 at 2:20 PM, Oha o...@oha.it wrote:
I could be wrong but this reminds me that a Duration could not be only based
in seconds, but also in other units (which may automagically be converted to
seconds) and also those seconds may be leap or not.
Maybe the point is that really
Am 17.11.2010 15:20, schrieb Oha:
On 11/17/2010 02:56 PM, Carl Mäsak wrote:
Or, by Ockham, since Duration is now deprived of its only task --
making life harder for the programmer -- remove it altogether from the
language and just put a number type in its place, representing number
of seconds.
If I'm following this correctly, shouldn't we just say that Duration
does Num? That way, a Duration can be used exactly like a Num is
(with units measured in seconds); but it could also have special
capabilities above and beyond what a Num can do, if such capabilities
are needed.
More generally,
Am 17.11.2010 17:50, schrieb Jon Lang:
If I'm following this correctly, shouldn't we just say that Duration
does Num?
Num is a class (think floating point number).
The role you're looking for is probably either Numeric or Real.
If we say that Duration inherits from Rat or FatRat, it
Branch: refs/heads/master
Home: https://github.com/perl6/specs
Commit: 3104c5be96261230257d6f5855262dc71923e24f
https://github.com/perl6/specs/commit/3104c5be96261230257d6f5855262dc71923e24f
Author: TimToady la...@wall.org
Date: 2010-11-17 (Wed, 17 Nov 2010)
Changed paths:
M
Moritz Lenz wrote:
Am 17.11.2010 17:50, schrieb Jon Lang:
More generally, I wonder if maybe we _should_ provide a tool to help
I think this question can only be answered in a meaningful way if somebody
actually implements such a thing as a module (which should be entirely
possible in Rakudo
Branch: refs/heads/master
Home: https://github.com/perl6/specs
Commit: 7846594ee4e931718ca221be554c2967eebac49d
https://github.com/perl6/specs/commit/7846594ee4e931718ca221be554c2967eebac49d
Author: TimToady la...@wall.org
Date: 2010-11-17 (Wed, 17 Nov 2010)
Changed paths:
M
On behalf of the Parrot team, I'm proud to announce Parrot 2.10.1
(bugfix release). Parrot (http://parrot.org/) is a virtual machine
aimed at running all dynamic languages.
Parrot 2.10.1 is available on Parrot's FTP site, or by following the
download instructions at http://parrot.org/download.
19 matches
Mail list logo