[sage-devel] Re: deprecating calling of symbolic expressions without variable names

2009-03-16 Thread kcrisman
> Sorry for the self reply, amend that second example to clarify my intent: > sage: f=1 > sage: # many lines of code > sage: integrate(f)  # what does this mean? > ... > sage: integrate(f,x) > x > > Perhaps I should also say that I actually found the original versions of plot > outright confusing

[sage-devel] Re: deprecating calling of symbolic expressions without variable names

2009-03-16 Thread Robert Bradshaw
On Mar 15, 2009, at 7:29 PM, Ronan Paixão wrote: > Em Dom, 2009-03-15 às 17:11 -0700, kcrisman escreveu: >> >>> Wouldn't it be clearer if the error message read >>> >>> NameError: name 't' is not defined, try var('t') beforehand >>> >>> or something similar? >>> >>> Perhaps as Carl deprecates c

[sage-devel] Re: deprecating calling of symbolic expressions without variable names

2009-03-16 Thread Carl Witty
On Mon, Mar 16, 2009 at 11:51 AM, Joel B. Mohler wrote: > > On Monday 16 March 2009 12:27:10 pm kcrisman wrote: >> sage: integrate(y^2) >> --- >> TypeError                                 Traceback (most recent call >> last)

[sage-devel] Re: deprecating calling of symbolic expressions without variable names

2009-03-16 Thread William Stein
On Mon, Mar 16, 2009 at 12:03 PM, Joel B. Mohler wrote: > > On Monday 16 March 2009 02:51:30 pm Joel B. Mohler wrote: >> On Monday 16 March 2009 12:27:10 pm kcrisman wrote: >> > sage: integrate(y^2) >> > - >> >-- TypeError  

[sage-devel] Re: deprecating calling of symbolic expressions without variable names

2009-03-16 Thread Joel B. Mohler
On Monday 16 March 2009 02:51:30 pm Joel B. Mohler wrote: > On Monday 16 March 2009 12:27:10 pm kcrisman wrote: > > sage: integrate(y^2) > > - > >-- TypeError                                 Traceback (most recent call > > las

[sage-devel] Re: deprecating calling of symbolic expressions without variable names

2009-03-16 Thread Joel B. Mohler
On Monday 16 March 2009 12:27:10 pm kcrisman wrote: > sage: integrate(y^2) > --- > TypeError                                 Traceback (most recent call > last) > TypeError: cannot coerce type ' 'sage.symbolic.expression.Expre

[sage-devel] Re: deprecating calling of symbolic expressions without variable names

2009-03-16 Thread Jason Grout
kcrisman wrote: > >>> I agree. As a member of the non-math-teacher part of this list, I must >>> agree that plot(some_single_var_function_or_expression, 0, 1) should be >>> considered as valid input. >> The original proposal by Carl said this would work (see point 3). >> (well, he had parentheses

[sage-devel] Re: deprecating calling of symbolic expressions without variable names

2009-03-16 Thread kcrisman
> > I agree. As a member of the non-math-teacher part of this list, I must > > agree that plot(some_single_var_function_or_expression, 0, 1) should be > > considered as valid input. > > The original proposal by Carl said this would work (see point 3). > (well, he had parentheses around the range,

[sage-devel] Re: deprecating calling of symbolic expressions without variable names

2009-03-16 Thread Jason Grout
Ronan Paixão wrote: > > I agree. As a member of the non-math-teacher part of this list, I must > agree that plot(some_single_var_function_or_expression, 0, 1) should be > considered as valid input. The original proposal by Carl said this would work (see point 3). (well, he had parentheses arou

[sage-devel] Re: deprecating calling of symbolic expressions without variable names

2009-03-15 Thread Ronan Paixão
Em Dom, 2009-03-15 às 17:11 -0700, kcrisman escreveu: > > > Wouldn't it be clearer if the error message read > > > > NameError: name 't' is not defined, try var('t') beforehand > > > > or something similar? > > > > Perhaps as Carl deprecates common anticipated behaviors he'd be open > > to havi

[sage-devel] Re: deprecating calling of symbolic expressions without variable names

2009-03-15 Thread kcrisman
> Wouldn't it be clearer if the error message read > > NameError: name 't' is not defined, try  var('t')  beforehand > > or something similar? > > Perhaps as Carl deprecates common anticipated behaviors he'd be open > to having his patch adjust the permanent error messages (not just the > depreca

[sage-devel] Re: deprecating calling of symbolic expressions without variable names

2009-03-15 Thread Burcin Erocal
On Sat, 14 Mar 2009 14:10:32 -0500 Jason Grout wrote: > > Burcin Erocal wrote: > > On Sat, 14 Mar 2009 11:45:13 -0700 > > William Stein wrote: > > > > > It is a similar situation for the plot commands. Many people have > > complained about the inconsistencies in Sage's plotting interface. >

[sage-devel] Re: deprecating calling of symbolic expressions without variable names

2009-03-14 Thread Rob Beezer
I would vote for consistency over convenience every time. I am forever forgetting the * for multiplication, but I'm glad the implicit- multiplication feature has to be consciously turned on - and I don't plan on ever turning it on. ;-) I don't want to reopen the debate over the variable 'x' bei

[sage-devel] Re: deprecating calling of symbolic expressions without variable names

2009-03-14 Thread kcrisman
> > Looking at MMA's plot commands, only this syntax is accepted: > > > Plot[Sin[x], {x, 0, Pi}] > > > Note the explicit variable name. > > > I think we should try to make the syntax uniform for all the plot > > functions, and ask the user to specify the variable in every case. > > (This means d

[sage-devel] Re: deprecating calling of symbolic expressions without variable names

2009-03-14 Thread Nick Alexander
> Looking at MMA's plot commands, only this syntax is accepted: > > Plot[Sin[x], {x, 0, Pi}] > > Note the explicit variable name. > > I think we should try to make the syntax uniform for all the plot > functions, and ask the user to specify the variable in every case. > (This means deprecating the

[sage-devel] Re: deprecating calling of symbolic expressions without variable names

2009-03-14 Thread Jason Grout
Burcin Erocal wrote: > On Sat, 14 Mar 2009 11:45:13 -0700 > William Stein wrote: > > It is a similar situation for the plot commands. Many people have > complained about the inconsistencies in Sage's plotting interface. > > Looking at MMA's plot commands, only this syntax is accepted: > > Plo

[sage-devel] Re: deprecating calling of symbolic expressions without variable names

2009-03-14 Thread William Stein
On Sat, Mar 14, 2009 at 12:10 PM, Joel B. Mohler wrote: > > On Saturday 14 March 2009 02:45:13 pm William Stein wrote: >> > William, shall we treat the case where the only variables in the >> > expression is x and y specially, and allow not specifying the variables >> > for the axis then? I think

[sage-devel] Re: deprecating calling of symbolic expressions without variable names

2009-03-14 Thread Joel B. Mohler
On Saturday 14 March 2009 02:45:13 pm William Stein wrote: > > William, shall we treat the case where the only variables in the > > expression is x and y specially, and allow not specifying the variables > > for the axis then? I think this makes the notation confusing and > > inconsistent. > > I h

[sage-devel] Re: deprecating calling of symbolic expressions without variable names

2009-03-14 Thread William Stein
On Sat, Mar 14, 2009 at 12:07 PM, Jason Grout wrote: > > Jason Grout wrote: >> William Stein wrote: >>> On Sat, Mar 14, 2009 at 11:37 AM, Burcin Erocal wrote: On Sat, 14 Mar 2009 13:18:40 -0500 Jason Grout wrote: > William Stein wrote: >> On Sat, Mar 14, 2009 at 11:09 AM,

[sage-devel] Re: deprecating calling of symbolic expressions without variable names

2009-03-14 Thread Jaap Spies
William Stein wrote: > In particular, xmin/xmax also would have to be deprecated and replaced by > Mathematica's plot_ranges... > As a *former* Maple user I would prefer the syntax plot(expr, var = a..b) Just joking, I can live with the proposal als long as it is (var, a, b) and not {var, a, b

[sage-devel] Re: deprecating calling of symbolic expressions without variable names

2009-03-14 Thread Jason Grout
Jason Grout wrote: > William Stein wrote: >> On Sat, Mar 14, 2009 at 11:37 AM, Burcin Erocal wrote: >>> On Sat, 14 Mar 2009 13:18:40 -0500 >>> Jason Grout wrote: >>> William Stein wrote: > On Sat, Mar 14, 2009 at 11:09 AM, Jason Grout > wrote: >> William Stein wrote: >>> On

[sage-devel] Re: deprecating calling of symbolic expressions without variable names

2009-03-14 Thread William Stein
On Sat, Mar 14, 2009 at 11:52 AM, Jason Grout wrote: > > William Stein wrote: >> On Sat, Mar 14, 2009 at 11:37 AM, Burcin Erocal wrote: >>> On Sat, 14 Mar 2009 13:18:40 -0500 >>> Jason Grout wrote: >>> William Stein wrote: > On Sat, Mar 14, 2009 at 11:09 AM, Jason Grout > wrote: >

[sage-devel] Re: deprecating calling of symbolic expressions without variable names

2009-03-14 Thread Burcin Erocal
On Sat, 14 Mar 2009 11:45:13 -0700 William Stein wrote: > > On Sat, Mar 14, 2009 at 11:37 AM, Burcin Erocal > wrote: > > > > On Sat, 14 Mar 2009 13:18:40 -0500 > > Jason Grout wrote: > > > >> > >> William Stein wrote: > >> > On Sat, Mar 14, 2009 at 11:09 AM, Jason Grout > >> > wrote: > >> >>

[sage-devel] Re: deprecating calling of symbolic expressions without variable names

2009-03-14 Thread Jason Grout
William Stein wrote: > On Sat, Mar 14, 2009 at 11:37 AM, Burcin Erocal wrote: >> On Sat, 14 Mar 2009 13:18:40 -0500 >> Jason Grout wrote: >> >>> William Stein wrote: On Sat, Mar 14, 2009 at 11:09 AM, Jason Grout wrote: > William Stein wrote: >> On Sat, Mar 14, 2009 at 10:29 AM

[sage-devel] Re: deprecating calling of symbolic expressions without variable names

2009-03-14 Thread William Stein
On Sat, Mar 14, 2009 at 11:37 AM, Burcin Erocal wrote: > > On Sat, 14 Mar 2009 13:18:40 -0500 > Jason Grout wrote: > >> >> William Stein wrote: >> > On Sat, Mar 14, 2009 at 11:09 AM, Jason Grout >> > wrote: >> >> William Stein wrote: >> >>> On Sat, Mar 14, 2009 at 10:29 AM, Carl Witty >> >>> w

[sage-devel] Re: deprecating calling of symbolic expressions without variable names

2009-03-14 Thread Jason Grout
Carl Witty wrote: > On Sat, Mar 14, 2009 at 11:18 AM, Jason Grout > wrote: >> William Stein wrote: >>> Well then we disagree. There is a very standard convention in math to >>> have the x axis in one spot, then the y-axis. >> What happens when you have variables u and v? Or a and b? Or t and s

[sage-devel] Re: deprecating calling of symbolic expressions without variable names

2009-03-14 Thread Burcin Erocal
On Sat, 14 Mar 2009 13:18:40 -0500 Jason Grout wrote: > > William Stein wrote: > > On Sat, Mar 14, 2009 at 11:09 AM, Jason Grout > > wrote: > >> William Stein wrote: > >>> On Sat, Mar 14, 2009 at 10:29 AM, Carl Witty > >>> wrote: > 2) plotting > A lot of the plotting code is willing

[sage-devel] Re: deprecating calling of symbolic expressions without variable names

2009-03-14 Thread William Stein
On Sat, Mar 14, 2009 at 11:27 AM, Carl Witty wrote: > > On Sat, Mar 14, 2009 at 10:49 AM, William Stein wrote: >> On Sat, Mar 14, 2009 at 10:29 AM, Carl Witty wrote: >>> 1) Piecewise functions: >>> With my initial patch, >>>  sage: f = Piecewise([[(-1,1),1/2+x-x^3]]) >>> doesn't work (that is,

[sage-devel] Re: deprecating calling of symbolic expressions without variable names

2009-03-14 Thread Carl Witty
On Sat, Mar 14, 2009 at 11:18 AM, Jason Grout wrote: > William Stein wrote: >> Well then we disagree.  There is a very standard convention in math to >> have the x axis in one spot, then the y-axis. > > What happens when you have variables u and v?  Or a and b?  Or t and s > (oops, I mean s and t

[sage-devel] Re: deprecating calling of symbolic expressions without variable names

2009-03-14 Thread William Stein
On Sat, Mar 14, 2009 at 11:18 AM, Jason Grout wrote: > > William Stein wrote: >> On Sat, Mar 14, 2009 at 11:09 AM, Jason Grout >> wrote: >>> William Stein wrote: On Sat, Mar 14, 2009 at 10:29 AM, Carl Witty wrote: > 2) plotting > A lot of the plotting code is willing to pick variab

[sage-devel] Re: deprecating calling of symbolic expressions without variable names

2009-03-14 Thread Carl Witty
On Sat, Mar 14, 2009 at 10:49 AM, William Stein wrote: > On Sat, Mar 14, 2009 at 10:29 AM, Carl Witty wrote: >> 1) Piecewise functions: >> With my initial patch, >>  sage: f = Piecewise([[(-1,1),1/2+x-x^3]]) >> doesn't work (that is, you get deprecation errors when you call f); >> Burcin suggest

[sage-devel] Re: deprecating calling of symbolic expressions without variable names

2009-03-14 Thread Jason Grout
William Stein wrote: > On Sat, Mar 14, 2009 at 11:09 AM, Jason Grout > wrote: >> William Stein wrote: >>> On Sat, Mar 14, 2009 at 10:29 AM, Carl Witty wrote: 2) plotting A lot of the plotting code is willing to pick variable names (in alphabetical order) if names aren't given in t

[sage-devel] Re: deprecating calling of symbolic expressions without variable names

2009-03-14 Thread William Stein
On Sat, Mar 14, 2009 at 11:09 AM, Jason Grout wrote: > > William Stein wrote: >> On Sat, Mar 14, 2009 at 10:29 AM, Carl Witty wrote: > >>> 2) plotting >>> A lot of the plotting code is willing to pick variable names (in >>> alphabetical order) if names aren't given in the plot ranges. >>> For in

[sage-devel] Re: deprecating calling of symbolic expressions without variable names

2009-03-14 Thread Jason Grout
William Stein wrote: > On Sat, Mar 14, 2009 at 10:29 AM, Carl Witty wrote: >> 2) plotting >> A lot of the plotting code is willing to pick variable names (in >> alphabetical order) if names aren't given in the plot ranges. >> For instance, this is a doctest in plot.py: >>sage: f = sin(x^2 +

[sage-devel] Re: deprecating calling of symbolic expressions without variable names

2009-03-14 Thread William Stein
On Sat, Mar 14, 2009 at 10:29 AM, Carl Witty wrote: > > As discussed at > http://groups.google.com/group/sage-devel/browse_thread/thread/b1a03f8fc8ae8fcd/553773d7ba600ae7#553773d7ba600ae7 > , I'm writing a patch to deprecate calling symbolic expressions > without variable names. > > In the course