Stewart Gordon wrote:
Andrei Alexandrescu wrote:
Matti Niemenmaa wrote:
Haskell has three exponentiation operators in the standard library:
^, ^^, and **. They are for non-negative integral exponents, integral
exponents, and floating-point exponents respectively.
I wonder whether that's an
On Sat, Nov 7, 2009 at 2:43 AM, Don nos...@nospam.com wrote:
Walter Bright wrote:
Don wrote:
A little while ago I said I'd create a patch for ^^ as an exponentiation.
A couple of people had requested that I make a post to the ng so they'd know
when it happens. Here it is.
This is opPow(),
Matti Niemenmaa wrote:
snip
It's essentially because Haskell has separate type classes (knda
like D interfaces... I won't go into that topic) for integers,
fractional numbers, and floating-point numbers. In D the types of those
three operators could be something like:
anyinteger
Stewart Gordon wrote:
Matti Niemenmaa wrote:
snip
It's essentially because Haskell has separate type classes (knda
like D interfaces... I won't go into that topic) for integers,
fractional numbers, and floating-point numbers. In D the types of
those three operators could be something
On Sat, Nov 7, 2009 at 17:33, Pelle Månsson pelle.mans...@gmail.com wrote:
I am all in favor of adding convenience functions sum and product to
phobos. I use them both often enough.
vote++
And also min (on a range), max (on a range). Those are simple one-liners,
though they can create some
On Sat, Nov 7, 2009 at 20:22, dsimcha dsim...@yahoo.com wrote:
== Quote from Robert Jacques (sandf...@jhu.edu)'s article
I'd recommend rolling that into a basic statistics struct containing
common single pass metrics: i.e. sum, mean, variance, min, max, etc.
I've been wondering for a while
Walter Bright wrote:
Andrei Alexandrescu wrote:
In order for everyone to air an informed opinion, a related question
is: will loop fusion be allowed with function calls?
Loop fusion currently only works with operators, and adding ^^ would
allow:
a[] = b[] ^^ 3;
But with pow you can't do
A little while ago I said I'd create a patch for ^^ as an
exponentiation. A couple of people had requested that I make a post to
the ng so they'd know when it happens. Here it is.
This is opPow(), x ^^ y
http://d.puremagic.com/issues/show_bug.cgi?id=3481
And this is opDollar!(int dim) for
Don wrote:
A little while ago I said I'd create a patch for ^^ as an
exponentiation. A couple of people had requested that I make a post to
the ng so they'd know when it happens. Here it is.
This is opPow(), x ^^ y
http://d.puremagic.com/issues/show_bug.cgi?id=3481
I don't understand the
Walter Bright wrote:
Don wrote:
A little while ago I said I'd create a patch for ^^ as an
exponentiation. A couple of people had requested that I make a post to
the ng so they'd know when it happens. Here it is.
This is opPow(), x ^^ y
http://d.puremagic.com/issues/show_bug.cgi?id=3481
Walter Bright wrote:
Don wrote:
A little while ago I said I'd create a patch for ^^ as an
exponentiation. A couple of people had requested that I make a post to
the ng so they'd know when it happens. Here it is.
This is opPow(), x ^^ y
http://d.puremagic.com/issues/show_bug.cgi?id=3481
I
the more mathematically-oriented languages use ^
And BASIC ;-)
-=mike=-
Don wrote:
Yes, ^^ hasn't been used for exponentiation before. Fortran used **
because it had such a limited character set, but it's not really a
natural choice; the more mathematically-oriented languages use ^.
Obviously C-family languages don't have that possibility.
Haskell has three
On Nov 7, 09 18:43, Don wrote:
Walter Bright wrote:
Don wrote:
A little while ago I said I'd create a patch for ^^ as an
exponentiation. A couple of people had requested that I make a post
to the ng so they'd know when it happens. Here it is.
This is opPow(), x ^^ y
Matti Niemenmaa wrote:
Don wrote:
Yes, ^^ hasn't been used for exponentiation before. Fortran used **
because it had such a limited character set, but it's not really a
natural choice; the more mathematically-oriented languages use ^.
Obviously C-family languages don't have that possibility.
On Sat, 07 Nov 2009 10:48:11 -0500, KennyTM~ kenn...@gmail.com wrote:
On Nov 7, 09 18:43, Don wrote:
Walter Bright wrote:
Don wrote:
A little while ago I said I'd create a patch for ^^ as an
exponentiation. A couple of people had requested that I make a post
to the ng so they'd know when it
== Quote from Robert Jacques (sandf...@jhu.edu)'s article
On Sat, 07 Nov 2009 10:48:11 -0500, KennyTM~ kenn...@gmail.com wrote:
On Nov 7, 09 18:43, Don wrote:
Walter Bright wrote:
Don wrote:
A little while ago I said I'd create a patch for ^^ as an
exponentiation. A couple of people had
dsimcha wrote:
== Quote from Robert Jacques (sandf...@jhu.edu)'s article
On Sat, 07 Nov 2009 10:48:11 -0500, KennyTM~ kenn...@gmail.com wrote:
On Nov 7, 09 18:43, Don wrote:
Walter Bright wrote:
Don wrote:
A little while ago I said I'd create a patch for ^^ as an
exponentiation. A couple of
On Sat, 07 Nov 2009 11:26:36 -0500, dsimcha dsim...@yahoo.com wrote:
== Quote from Robert Jacques (sandf...@jhu.edu)'s article
On Sat, 07 Nov 2009 10:48:11 -0500, KennyTM~ kenn...@gmail.com wrote:
On Nov 7, 09 18:43, Don wrote:
Walter Bright wrote:
Don wrote:
A little while ago I said I'd
dsimcha wrote:
== Quote from Robert Jacques (sandf...@jhu.edu)'s article
On Sat, 07 Nov 2009 10:48:11 -0500, KennyTM~ kenn...@gmail.com wrote:
On Nov 7, 09 18:43, Don wrote:
Walter Bright wrote:
Don wrote:
A little while ago I said I'd create a patch for ^^ as an
exponentiation. A couple of
On Nov 8, 09 00:15, Robert Jacques wrote:
On Sat, 07 Nov 2009 10:48:11 -0500, KennyTM~ kenn...@gmail.com wrote:
On Nov 7, 09 18:43, Don wrote:
Walter Bright wrote:
Don wrote:
A little while ago I said I'd create a patch for ^^ as an
exponentiation. A couple of people had requested that I
Robert Jacques wrote:
I'd recommend rolling that into a basic statistics struct containing
common single pass metrics: i.e. sum, mean, variance, min, max, etc.
Well the problem is that if you want to compute several one-pass
statistics in one pass, you'd have to invent means to combine these
KennyTM~ wrote:
Nice. Meanwhile, I'd like an opSum() operator (∑ range) as well. It's
primarily about syntax sugar: reduce!(a+b)(range) is so ugly. In
practice, the most important case is the sum from 1 to n, which is an
extremely common operation. reduce!(a+b)(iota(1,n+1)) is horribly ugly
Walter Bright wrote:
KennyTM~ wrote:
Nice. Meanwhile, I'd like an opSum() operator (∑ range) as well. It's
primarily about syntax sugar: reduce!(a+b)(range) is so ugly. In
practice, the most important case is the sum from 1 to n, which is an
extremely common operation.
Andrei Alexandrescu wrote:
Walter Bright wrote:
KennyTM~ wrote:
Nice. Meanwhile, I'd like an opSum() operator (∑ range) as well. It's
primarily about syntax sugar: reduce!(a+b)(range) is so ugly. In
practice, the most important case is the sum from 1 to n, which is an
extremely common
== Quote from Robert Jacques (sandf...@jhu.edu)'s article
I'd recommend rolling that into a basic statistics struct containing
common single pass metrics: i.e. sum, mean, variance, min, max, etc.
I've been wondering for a while if something like this is general enough for
non-statisticians and
Suppose we have a matrix library, I'd like to have two product operators,
one is for matrix product, the other is for element wise product, just like
what we do in matlab (A*B and A.*B). I'd like to save ** to that scenario.
Btw I'm no Fortran user. ^^ is fine by me.
On Sat, Nov 7, 2009 at 5:56
Walter Bright wrote:
KennyTM~ wrote:
Nice. Meanwhile, I'd like an opSum() operator (∑ range) as well. It's
primarily about syntax sugar: reduce!(a+b)(range) is so ugly. In
practice, the most important case is the sum from 1 to n, which is an
extremely common operation.
Mo Chen wrote:
Suppose we have a matrix library, I'd like to have two product
operators, one is for matrix product, the other is for element wise
product, just like what we do in matlab (A*B and A.*B). I'd like to save
** to that scenario. Btw I'm no Fortran user. ^^ is fine by me.
The D
Andrei Alexandrescu wrote:
In order for everyone to air an informed opinion, a related question is:
will loop fusion be allowed with function calls?
Loop fusion currently only works with operators, and adding ^^ would allow:
a[] = b[] ^^ 3;
But with pow you can't do that:
a[] = pow(b[], 3);
Walter Bright wrote:
Andrei Alexandrescu wrote:
In order for everyone to air an informed opinion, a related question
is: will loop fusion be allowed with function calls?
Loop fusion currently only works with operators, and adding ^^ would
allow:
a[] = b[] ^^ 3;
But with pow you can't do
On Sat, 07 Nov 2009 12:56:35 -0500, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
Robert Jacques wrote:
I'd recommend rolling that into a basic statistics struct containing
common single pass metrics: i.e. sum, mean, variance, min, max, etc.
Well the problem is that if you want
On Sat, 07 Nov 2009 14:22:01 -0500, dsimcha dsim...@yahoo.com wrote:
== Quote from Robert Jacques (sandf...@jhu.edu)'s article
I'd recommend rolling that into a basic statistics struct containing
common single pass metrics: i.e. sum, mean, variance, min, max, etc.
I've been wondering for a
On Sat, 07 Nov 2009 13:37:33 -0500, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
Walter Bright wrote:
KennyTM~ wrote:
Nice. Meanwhile, I'd like an opSum() operator (∑ range) as well. It's
primarily about syntax sugar: reduce!(a+b)(range) is so ugly. In
practice, the most
Robert Jacques wrote:
On Sat, 07 Nov 2009 12:56:35 -0500, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
Robert Jacques wrote:
I'd recommend rolling that into a basic statistics struct containing
common single pass metrics: i.e. sum, mean, variance, min, max, etc.
Well the
== Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s article
Robert Jacques wrote:
On Sat, 07 Nov 2009 12:56:35 -0500, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
Robert Jacques wrote:
I'd recommend rolling that into a basic statistics struct containing
dsimcha wrote:
== Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s article
Robert Jacques wrote:
On Sat, 07 Nov 2009 12:56:35 -0500, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
Robert Jacques wrote:
I'd recommend rolling that into a basic statistics struct
Andrei Alexandrescu wrote:
Matti Niemenmaa wrote:
Don wrote:
Yes, ^^ hasn't been used for exponentiation before. Fortran used **
because it had such a limited character set, but it's not really a
natural choice; the more mathematically-oriented languages use ^.
Obviously C-family languages
On Sat, 07 Nov 2009 13:37:33 -0500, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
In order for everyone to air an informed opinion, a related question is:
will loop fusion be allowed with function calls?
Loop fusion currently only works with operators, and adding ^^ would
On Sat, 07 Nov 2009 21:31:46 -0500, Phil Deets pjdee...@gmail.com wrote:
On Sat, 07 Nov 2009 13:37:33 -0500, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
In order for everyone to air an informed opinion, a related question
is: will loop fusion be allowed with function calls?
On Sat, 07 Nov 2009 16:53:01 -0500, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
Robert Jacques wrote:
On Sat, 07 Nov 2009 12:56:35 -0500, Andrei Alexandrescu
seewebsiteforem...@erdani.org wrote:
Robert Jacques wrote:
I'd recommend rolling that into a basic statistics struct
41 matches
Mail list logo