Re: [sage-devel] numerical_integral(x*y,0,1,[pi]) or numerical_integral(x*y,0,1,y=pi) ?

2015-01-15 Thread William Stein
On Thu, Jan 15, 2015 at 10:51 PM, William Stein  wrote:
> On Thu, Jan 15, 2015 at 10:44 PM, Nathann Cohen  
> wrote:
>> Hello,
>>
>>> I would recommend looking up what Maple and Mathematica (and Matlab)
>>> do regarding their numerical integration API and summarizing each here
>>> before making any decisions.
>>
>> If this is what it takes to fix this code as you think it should, then
>> I must step back. While reviewing #17507 I wondered about this
>> problem, but I am scared by the amount of time it would take me to
>> learn about symbolics and integrations in Sage, and even more to
>> compare our interface with softwares I never used (and for which I do
>> not have a licence). Perhaps others, more versed in these domains,
>> will know how to act.
>
> Given the enormous amount of energy, focus and talent you have, I'm
> surprised that you don't want to look at how other people solve these
> API problems, e.g., [1] and [2].  I'm sorry if my suggestion to look
> at them discouraged you.  It's definitely *only* a suggestion -- you
> can certainly ignore it.It's just been my experience that learning
> from other resources and constantly fighting "not invented here
> syndrome" is generally very beneficial to the Sage project.Anyway,
> I'm sure somebody else will pipe up soon.
>
> [1] http://reference.wolfram.com/language/ref/NIntegrate.html
> [2] http://www.maplesoft.com/support/help/Maple/view.aspx?path=evalf/Int
>
> Actually, I just looked at [1], and it's almost exactly consistent
> with our "integrate" command, so we really should rewrite
> numerical_integral to have an API that is as close to [1] as
> possible...

(Amusingly, I've spent all evening staring at and modifying code you
wrote Nathann, which is saving me a lot of time :-).  Thanks!)

>
> William
>
>>
>> Nathann
>>
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "sage-devel" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to sage-devel+unsubscr...@googlegroups.com.
>> To post to this group, send email to sage-devel@googlegroups.com.
>> Visit this group at http://groups.google.com/group/sage-devel.
>> For more options, visit https://groups.google.com/d/optout.
>
>
>
> --
> William Stein
> Professor of Mathematics
> University of Washington
> http://wstein.org



-- 
William Stein
Professor of Mathematics
University of Washington
http://wstein.org

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] numerical_integral(x*y,0,1,[pi]) or numerical_integral(x*y,0,1,y=pi) ?

2015-01-15 Thread William Stein
On Thu, Jan 15, 2015 at 10:44 PM, Nathann Cohen  wrote:
> Hello,
>
>> I would recommend looking up what Maple and Mathematica (and Matlab)
>> do regarding their numerical integration API and summarizing each here
>> before making any decisions.
>
> If this is what it takes to fix this code as you think it should, then
> I must step back. While reviewing #17507 I wondered about this
> problem, but I am scared by the amount of time it would take me to
> learn about symbolics and integrations in Sage, and even more to
> compare our interface with softwares I never used (and for which I do
> not have a licence). Perhaps others, more versed in these domains,
> will know how to act.

Given the enormous amount of energy, focus and talent you have, I'm
surprised that you don't want to look at how other people solve these
API problems, e.g., [1] and [2].  I'm sorry if my suggestion to look
at them discouraged you.  It's definitely *only* a suggestion -- you
can certainly ignore it.It's just been my experience that learning
from other resources and constantly fighting "not invented here
syndrome" is generally very beneficial to the Sage project.Anyway,
I'm sure somebody else will pipe up soon.

[1] http://reference.wolfram.com/language/ref/NIntegrate.html
[2] http://www.maplesoft.com/support/help/Maple/view.aspx?path=evalf/Int

Actually, I just looked at [1], and it's almost exactly consistent
with our "integrate" command, so we really should rewrite
numerical_integral to have an API that is as close to [1] as
possible...

William

>
> Nathann
>
> --
> You received this message because you are subscribed to the Google Groups 
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to sage-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to sage-devel@googlegroups.com.
> Visit this group at http://groups.google.com/group/sage-devel.
> For more options, visit https://groups.google.com/d/optout.



-- 
William Stein
Professor of Mathematics
University of Washington
http://wstein.org

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] numerical_integral(x*y,0,1,[pi]) or numerical_integral(x*y,0,1,y=pi) ?

2015-01-15 Thread Nathann Cohen
Hello,

> I would recommend looking up what Maple and Mathematica (and Matlab)
> do regarding their numerical integration API and summarizing each here
> before making any decisions.

If this is what it takes to fix this code as you think it should, then
I must step back. While reviewing #17507 I wondered about this
problem, but I am scared by the amount of time it would take me to
learn about symbolics and integrations in Sage, and even more to
compare our interface with softwares I never used (and for which I do
not have a licence). Perhaps others, more versed in these domains,
will know how to act.

Nathann

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] numerical_integral(x*y,0,1,[pi]) or numerical_integral(x*y,0,1,y=pi) ?

2015-01-15 Thread William Stein
On Thu, Jan 15, 2015 at 9:19 PM, Nathann Cohen  wrote:
> Hello everybody,
>
> The function numerical_integral is meant to compute an integral in one
> dimension.
>
> It takes as mandatory arguments:
> - A function (dependin on any number of variables)
> - The bounds of the integration domain
>
> As you can see, the integration variable is not given explicitly. As
> the function must be numerical, all other symbolic variables involved
> in f must be given a numerical value: this is done with the 'params'
> parameter:
>
> numerical_integral(a+b+c+d+e+f+g+h, 0,1,[3,4,5,6,7,8,9])
>
> This will replace the values of variables "b,c,d,e,f,g,h" with the
> values [3,4,5,6,7,8,9] before any actual integration, but it never
> appears explicitly WHICH of the variables will receive each value.
>
> This 'params' argument is confusing and can lead to mistakes (see
> comments from #17507), but how should it be changed ?
>
> 1) We remove it, making it mandatory for f to depend on one variable
> only (not very cool for newcomers?)
> 2) We request params to be a dictionary ({b:3,c:9,...}) instead of a list
> 3) We use **args for that numerical_integral(x*y,0,1,y=pi)
>
> What would be best according to you ? I also ask this question because
> I know nothing of how symbolics work in Sage, and I do not know if
> similar functions have similar standards.

We (probably me and *Josh Kantor*?  it was a while ago) wrote
numerical_integral in Sage before we had symbolics, and barely touched
it since. I was writing an example for the new SMC button bar to
illustrate numerical_integral yesterday and was struck by how archaic
it felt, in precisely some of the ways you mention above.  Even having
it return a list of two numbers, rather than an interval (?) or just a
number and having an option to get the error, feels funny to me.   But
of course we wrote numerical_integral before Sage had interval
arithmetic too.

I would recommend looking up what Maple and Mathematica (and Matlab)
do regarding their numerical integration API and summarizing each here
before making any decisions.  All their docs are easily available
online, and I tend to thing that doing something consistent with
Mathematica (say), if it is *reasonably* sensible in Sage, is often
the best approach for this sort of thing, because it makes it easier
for people who are used to using Mathematica.  I definitely don't
recommend just coming up for some completely new API for numerical
integration without even looking at what Mathematica does, though I
think that's probably what Josh Kantor and I did long ago to Sage...

William


-- 
William Stein
Professor of Mathematics
University of Washington
http://wstein.org

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] numerical_integral(x*y,0,1,[pi]) or numerical_integral(x*y,0,1,y=pi) ?

2015-01-15 Thread Nathann Cohen
Hello everybody,

The function numerical_integral is meant to compute an integral in one
dimension.

It takes as mandatory arguments:
- A function (dependin on any number of variables)
- The bounds of the integration domain

As you can see, the integration variable is not given explicitly. As
the function must be numerical, all other symbolic variables involved
in f must be given a numerical value: this is done with the 'params'
parameter:

numerical_integral(a+b+c+d+e+f+g+h, 0,1,[3,4,5,6,7,8,9])

This will replace the values of variables "b,c,d,e,f,g,h" with the
values [3,4,5,6,7,8,9] before any actual integration, but it never
appears explicitly WHICH of the variables will receive each value.

This 'params' argument is confusing and can lead to mistakes (see
comments from #17507), but how should it be changed ?

1) We remove it, making it mandatory for f to depend on one variable
only (not very cool for newcomers?)
2) We request params to be a dictionary ({b:3,c:9,...}) instead of a list
3) We use **args for that numerical_integral(x*y,0,1,y=pi)

What would be best according to you ? I also ask this question because
I know nothing of how symbolics work in Sage, and I do not know if
similar functions have similar standards.

Nathann

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Re: Bug Days?

2015-01-15 Thread Sébastien Labbé
Hi,

I organize Sage Days 66 at the University of Liege (Belgium) from March 30 
to April 2nd 2015 (Monday to Thursday). Monday and Tuesday will be made of 
Introduction talks. Wednesday and Thursday will be for Sage development. I 
you want, I can make the Wednesday a "Sage Bug Day" where development of 
new features will be prohibited. I was going to send an announcement soon. 
If you agree, I can add a link where people can ask funding to you to come 
to Liège. What do you think?

http://wiki.sagemath.org/days66

Sébastien

On Thursday, January 8, 2015 at 10:34:22 AM UTC-5, William wrote:
>
> Hi, 
>
> Would anybody be interested in helping me to organize a bug days 
> workshop sometime in the next few months? 
> I have plenty of funding for this for US people and can scrounge up 
> some funds for some non-US people. 
>
> William 
>
> -- 
> William Stein 
> Professor of Mathematics 
> University of Washington 
> http://wstein.org 
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Fraction field with local orderings

2015-01-15 Thread Enrique Artal
Hello,
I recently sent this message

https://groups.google.com/forum/#!topic/sage-support/2ixMoSTzz20

 to the support list. Following the advice of Miguel Marco I opened ticket 
#17638. Best, Enrique

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Re: Should we consider an unmaintained upstream package as upstream?

2015-01-15 Thread Dima Pasechnik
On 2015-01-15, mmarco  wrote:
> I have been working on patching a program that computes the homfly 
> polynomial of knots and links, in order to use it as a shared library. I 
> would like to include it as an optional sage package in the mid term, so we 
> could use it in the knot theory module that is being worked on (by the way, 
> ticket #17030 needs review).
>
> The program is available here:
>
> [1] http://burtleburtle.net/bob/knot/homfly.html
>
> The last version was writen in 2010, and i haven't heard any news about it 
> since then.
>
> I have my patched version in 
>
> [2] https://github.com/miguelmarco/libhomfly.
>
> So, considering all this, which would be the best way to go?
>
> 1) Include the tarball from [1] in the package and patch it in installation 
> time.
> 2) Create a tarball from [2] and treat it as upstream.

IMHO 2) is better. Upstream in the form of a black hole does not make
sense...

With csdp experimental package, all I did was to import the history to
git and make it use autoconf and friends, and used my result as the upstream.
In this case upstream is alive and kicking, but the source was not
updated for 6 or 7 years...

Dima

>
> I know that the standard way to go is 1), but in this case, it is not 
> maintained at all. Of course, in the option 2), there isn't really a 
> maintainer right now (i just dug into the code enough to patch the 
> input/output, strimmed the printf commands, and changed memory allocation 
> to boehm to prevent memory leaks; but i didn't look into the internals of 
> how the computations are actually done)... but i think we would be slightly 
> closer to it than in option 1).
>
> Thoughts?
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Re: Dashes in software name or version number

2015-01-15 Thread Dima Pasechnik
On 2015-01-15, Jean-Pierre Flori  wrote:
> Dear all,
>
> Is this still a problem?
it still was a problem in http://trac.sagemath.org/ticket/17529

Dima

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Dashes in software name or version number

2015-01-15 Thread Jean-Pierre Flori
Dear all,

Is this still a problem?

Best,
JP

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Should we consider an unmaintained upstream package as upstream?

2015-01-15 Thread mmarco
The imput that the library takes is basically the oriented Gauss code 
(slightly modified). Converting from the format that we use for the 
oriented Gauss code is straightforward.

El jueves, 15 de enero de 2015, 14:17:02 (UTC+1), Amit Jamadagni escribió:
>
> Hello Miguel,
>  I have few queries, not related to the questions though :
> 1. I have read through the readme and as I understand the input that the 
> package uses is a bit different. So it would be really helpful to know how 
> all of this will fit together with the current input ??
> 2. Given, if the input is different, we do have an algorithm which uses 
> the Dowker notation to compute the polynomial. So would it not be better to 
> write something from scratch than to package something which is not 
> maintained ?? 
> ᐧ
>
> On Thu, Jan 15, 2015 at 5:47 PM, mmarco > 
> wrote:
>
>> I have been working on patching a program that computes the homfly 
>> polynomial of knots and links, in order to use it as a shared library. I 
>> would like to include it as an optional sage package in the mid term, so we 
>> could use it in the knot theory module that is being worked on (by the way, 
>> ticket #17030 needs review).
>>
>> The program is available here:
>>
>> [1] http://burtleburtle.net/bob/knot/homfly.html
>>
>> The last version was writen in 2010, and i haven't heard any news about 
>> it since then.
>>
>> I have my patched version in 
>>
>> [2] https://github.com/miguelmarco/libhomfly.
>>
>> So, considering all this, which would be the best way to go?
>>
>> 1) Include the tarball from [1] in the package and patch it in 
>> installation time.
>> 2) Create a tarball from [2] and treat it as upstream.
>>
>> I know that the standard way to go is 1), but in this case, it is not 
>> maintained at all. Of course, in the option 2), there isn't really a 
>> maintainer right now (i just dug into the code enough to patch the 
>> input/output, strimmed the printf commands, and changed memory allocation 
>> to boehm to prevent memory leaks; but i didn't look into the internals of 
>> how the computations are actually done)... but i think we would be slightly 
>> closer to it than in option 1).
>>
>> Thoughts?
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "sage-devel" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to sage-devel+...@googlegroups.com .
>> To post to this group, send email to sage-...@googlegroups.com 
>> .
>> Visit this group at http://groups.google.com/group/sage-devel.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


Re: [sage-devel] Should we consider an unmaintained upstream package as upstream?

2015-01-15 Thread Amit Jamadagni
Hello Miguel,
 I have few queries, not related to the questions though :
1. I have read through the readme and as I understand the input that the
package uses is a bit different. So it would be really helpful to know how
all of this will fit together with the current input ??
2. Given, if the input is different, we do have an algorithm which uses the
Dowker notation to compute the polynomial. So would it not be better to
write something from scratch than to package something which is not
maintained ??
ᐧ

On Thu, Jan 15, 2015 at 5:47 PM, mmarco  wrote:

> I have been working on patching a program that computes the homfly
> polynomial of knots and links, in order to use it as a shared library. I
> would like to include it as an optional sage package in the mid term, so we
> could use it in the knot theory module that is being worked on (by the way,
> ticket #17030 needs review).
>
> The program is available here:
>
> [1] http://burtleburtle.net/bob/knot/homfly.html
>
> The last version was writen in 2010, and i haven't heard any news about it
> since then.
>
> I have my patched version in
>
> [2] https://github.com/miguelmarco/libhomfly.
>
> So, considering all this, which would be the best way to go?
>
> 1) Include the tarball from [1] in the package and patch it in
> installation time.
> 2) Create a tarball from [2] and treat it as upstream.
>
> I know that the standard way to go is 1), but in this case, it is not
> maintained at all. Of course, in the option 2), there isn't really a
> maintainer right now (i just dug into the code enough to patch the
> input/output, strimmed the printf commands, and changed memory allocation
> to boehm to prevent memory leaks; but i didn't look into the internals of
> how the computations are actually done)... but i think we would be slightly
> closer to it than in option 1).
>
> Thoughts?
>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-devel+unsubscr...@googlegroups.com.
> To post to this group, send email to sage-devel@googlegroups.com.
> Visit this group at http://groups.google.com/group/sage-devel.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.


[sage-devel] Should we consider an unmaintained upstream package as upstream?

2015-01-15 Thread mmarco
I have been working on patching a program that computes the homfly 
polynomial of knots and links, in order to use it as a shared library. I 
would like to include it as an optional sage package in the mid term, so we 
could use it in the knot theory module that is being worked on (by the way, 
ticket #17030 needs review).

The program is available here:

[1] http://burtleburtle.net/bob/knot/homfly.html

The last version was writen in 2010, and i haven't heard any news about it 
since then.

I have my patched version in 

[2] https://github.com/miguelmarco/libhomfly.

So, considering all this, which would be the best way to go?

1) Include the tarball from [1] in the package and patch it in installation 
time.
2) Create a tarball from [2] and treat it as upstream.

I know that the standard way to go is 1), but in this case, it is not 
maintained at all. Of course, in the option 2), there isn't really a 
maintainer right now (i just dug into the code enough to patch the 
input/output, strimmed the printf commands, and changed memory allocation 
to boehm to prevent memory leaks; but i didn't look into the internals of 
how the computations are actually done)... but i think we would be slightly 
closer to it than in option 1).

Thoughts?

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.