Re: [sage-devel] Re: How does the ECL+Maxima combination work ?

2015-01-21 Thread Nils Bruin
On Wednesday, January 21, 2015 at 2:39:52 AM UTC-8, Snark wrote:


 Ah, ha! That helps. But, let's take the following code (extracted from 
 src/sage/interfaces/maxima_lib.py) : 

 from sage.libs.ecl import * 

 ecl_eval((require 'maxima)) 
 ecl_eval((in-package :maxima)) 
 ecl_eval(#$load(abs_integrate)$) 

 it gives me: 
 RuntimeError: ECL says: THROW: The catch MACSYMA-QUIT is undefined. 


And obviously, maxima_lib.py doesn't suffer from this problem, because the 
code there executes quite frequently without this error. Apparently there 
is something different between what you do and what happens in 
maxima_lib.py. Indeed, there is more code in maxima_lib.py. Right below the 
(in-package :maxima) we have:

(defvar *MAXIMA-LANG-SUBDIR* NIL)
(set-locale-subdir)
(set-pathnames)

 and then load works. Maxima needs more initialization than requiring the 
package. A large part of maxima was already written before the CL standard 
was made and before packages were introduced, so it has a lot of archaic 
bits to the code. It certainly was never designed to be used as a lisp 
library, so you need to jump through odd hoops to get it to work as such. 
It may also be possible that maxima does have a better initialization 
routine that has everything packaged in, but I wasn't able to find it (and 
reverse engineering what WAS needed took quite a bit of trial and error).

Concerning the THROW: Maxima has its own error signalling mechanism that 
requires a guard on the stack to CATCH the THROWs. 

To put an appropriate catch in place, maxima_lib defines maxima-eval, which 
is hugely improved in:

http://trac.sagemath.org/ticket/14308

I was fully expecting that ticket to be merged already, but apparently 
no-one cares about the issue there. It's still worth merging the much 
simpler implementation of maxima-eval, though.

-- 
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] German help needed at trac #17556

2015-01-21 Thread Michael Orlitzky
Hello, I've got a ticket at,

  http://trac.sagemath.org/ticket/17556

that affects one test in,

  doc/de/thematische_anleitungen/sage_gymnasium.rst

I don't speak German, and the fix is going to require a sentence or two
of new/removed text. I offered one good fix and one lazy fix on the
ticket, but other suggestions would also be appreciated.

-- 
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: 10 year anniversary of Sage

2015-01-21 Thread Pedro Cruz
Dear William and developers,

I was just using Sage to help the (re-)creation of problems for my classes 
at this time Sage is making 10 years. 

Congratulations for the concept and working persistence that kept this 
project growing for the last 10 years.

Thanks to all developers and contributors for making sage as it is now.

Pedro



On Tuesday, January 20, 2015 at 7:48:09 PM UTC, William wrote:

 Hi, 

 If you look at http://wstein.org/sage_old/ you'll find the first few 
 tarballs of Sage I ever released.  The first one [1] has a README that 
 starts: 

 -- 
  SAGE -- Software for Algebra and Geomtry 
  Copyright (C) 2004 William Stein w...@math.harvard.edu javascript: 


  Distributed under the terms of the GNU General Public License (GPL) 
  See http://www.gnu.org/licenses/ 
 -- 

 This is the README.txt file for the source distribution of SAGE, 
 version 0.1, 2005-01-23. 

 ... 

 I think this was the first-ever public release of Sage.   I made it 
 inspired by a conversation at the 2005 JMM with David Joyner, who saw 
 me working on my private code there. 

 Based on that date, we could say that Sage will be 10 years old this 
 Friday.Alternatively, it seems the first tarball I posted has the 
 date Feb 28, 2005. 



 [1] http://wstein.org/sage_old/sage-2005-02-28-2112-src-0.1.tar 


 -- 

 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] Re: How does the ECL+Maxima combination work ?

2015-01-21 Thread Julien Puydt

Hi,

Le 19/01/2015 17:38, Nils Bruin a écrit :

On Monday, January 19, 2015 at 8:22:15 AM UTC-8, Dima Pasechnik wrote:


On 2015-01-19, Julien Puydt julien...@laposte.net javascript: wrote:

Hi,

I wanted to play with maxima-in-ecl to understand how it works, but
failed: from reading sage's sources I thought I was supposed to use a
MEVAL function, but it failed. Here is what I did:

jpuydt@cauchy:~/sage-6.4.1$ ./sage -ecl
ECL (Embeddable Common-Lisp) 13.5.1 (git:UNKNOWN)
Copyright (C) 1984 Taiichi Yuasa and Masami Hagiya
Copyright (C) 1993 Giuseppe Attardi
Copyright (C) 2000 Juan J. Garcia-Ripoll
ECL is free software, and you are welcome to redistribute it
under certain conditions; see file 'Copyright' for details.
Type :h for Help.
Top level.

(require 'maxima)


;;; Loading #P/home/jpuydt/sage-6.4.1/local/lib/ecl/maxima.fas
;;; Loading #P/home/jpuydt/sage-6.4.1/local/lib/ecl/sb-bsd-sockets.fas
;;; Loading #P/home/jpuydt/sage-6.4.1/local/lib/ecl/sockets.fas
(SB-BSD-SOCKETS SOCKETS MAXIMA)


here you need to go into the right namespace, or whatever it is called:


(in-package :maxima)



(meval 2+2)


but I don't know how to compute 2+2, still :-))



The maxima parser is available via the reader macro. Normally it will
produce a form that evaluates too, but if you quote it, you can prevent
that from happening:


(require `maxima)

[...]

(in-package :maxima)

MAXIMA #$2+2$

4
MAXIMA '#$x+5$

(MEVAL* '((MPLUS) $X 5))
MAXIMA (meval '((mplus) 2 2))

4



Ah, ha! That helps. But, let's take the following code (extracted from 
src/sage/interfaces/maxima_lib.py) :


from sage.libs.ecl import *

ecl_eval((require 'maxima))
ecl_eval((in-package :maxima))
ecl_eval(#$load(abs_integrate)$)

it gives me:
RuntimeError: ECL says: THROW: The catch MACSYMA-QUIT is undefined.

and if I type the same in sage -ecl:
(require 'maxima)
(in-package :maxima)
#$load(abs_integrate)$

it also gives me the same error...

So there's still something that eludes me in the ECL+Maxima pair...

Snark in #sagemath

--
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.