On Mon, Mar 19, 2018 at 08:32:23AM -0700, Nils Bruin wrote:
> On Monday, March 19, 2018 at 8:04:07 AM UTC-7, Emmanuel Charpentier wrote:
> >
> >
> >
> >    - Some functions (mostly inherited from Maxima) *do* already create 
> >    new symbolic variables, but do not inject them in the relevant 
> > namespace. 
> >    In *this* case (and this case only), I'd like to have this injection 
> > done 
> >    by default, but controllable via an option. *Prima facie,* our targets 
> >    are solve and desolve + their friends. But I forget some other ones 
> > almost 
> >    surely... Hints ?
> >
> > -2. This is only possible with very comprehensive hacks: the "interactive 
> name-space" has no special status outside of IPython. The sage library 
> wouldn't have an idea where to insert this stuff. We'd basically require a 
> "scratchpad" onto which all code can scribble binding suggestions and then, 
> once control comes back to IPython, a decision could be made on iwhether to 
> nject these bindings.  
> 
> >
> >    - %(%)auto_constants : control whether Maxima-generated constants are 
> >    injected in the relevant namespace. Default : True.
> >    
> > -2 for the default; -1 in general. There's no trigger event in maxima to 
> make these bindings. If you take the sage-maxima interface (which would see 
> symbols from maxima it hasn't seen before), you could use that as a 
> trigger, but then the behaviour of the interface relies on lifetime 
> history! (and the fact that the sage-maxima interface is a memory leak for 
> its translation dictionary).
> 
> These things happen more often:
> 
> sage: matrix(2,2,[1,2,3,4]).charpoly()
> x^2 - 5*x - 2
> 
> creates a polynomial over ZZ. Should IPython rebind x to ZZ['x'].gen() ? 
> Only when x is unbound? More generally:
> 
> sage: QQ['y','z']
> Multivariate Polynomial Ring in y, z over Rational Field
> 
> should that trigger y and z being bound?

In the same vein, what about:

- d+e ?
- i+j ?
- m+n ?
- r+s ?

Shall the Euler constant, the imaginary number, the numerical
approximation and the R interpreter be locally diabled ? What about
2*i*pi*j ?

What if some user use the automatic name "plop" in her worksheet and in a
later version Sage adds "plop" into the global namspace ?

Such features might look impressive for the 5 first minutes one is using
Sage, but they are adding confusion and do not help understanding nor
teaching in the longer term ("var('y')" is another famous example).

Ciao,
Thierry

 





 
> -- 
> 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 https://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 https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to