From b00bae3f32ebc3427ed7933a2fda4b830c094497 Mon Sep 17 00:00:00 2001 From: bnewbold Date: Thu, 22 Jan 2009 03:46:57 -0500 Subject: journal edit, notes, mitscheme in sage --- other/sage-scheme-notes.txt | 37 +++++++++++++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 4 deletions(-) (limited to 'other/sage-scheme-notes.txt') diff --git a/other/sage-scheme-notes.txt b/other/sage-scheme-notes.txt index 0b88a90..b366683 100644 --- a/other/sage-scheme-notes.txt +++ b/other/sage-scheme-notes.txt @@ -1,9 +1,38 @@ +scm or MIT/GNU Scheme in Sage +======================================= -in sage-###/devel/sage/sage/interfaces/, copy template.py to mitscheme.py -edit all.py and add appropriate objects, strings +First install scm, MIT/GNU Scheme, or scmutils on your system. If you're doing +scmutils do it in /usr/local/ as recommended. -then compile everything: -./sage -b +Then copy mitscheme.py and/or scm.py to SAGE_ROOT/devel/sage/sage/interfaces/ +and edit all.py to include the lines: + from mitscheme import mitscheme, mitscheme_console, MitScheme + from scm import scm, scm_console, SCM +and edit the list of interfaces to include 'scm' and 'mitscheme'. For notebook +cell use, edit SAGE_ROOT/devel/sage/server/notebook/notebook.py and add +'scm (optional)' and 'scmutils (optional)' to the list of interfaces. +If you want plain mit-scheme instead of all the scmutils packages, edit +mitscheme.py and replace the long 'command' declaration near the top with the +short commented out declaration. + +Then return to your root sage directory (SAGE_ROOT) and do: + + $ ./sage -b + +See if it works, eg: + + sage: m = MitScheme() + Starting MIT/GNU Scheme Interpreter + sage: m.eval('(+ 1 1)') + '2' + sage: one = mitscheme(1) + '1' + sage: two = mitscheme(2) + '2' + sage: one + two + '3' + +Much to do! -- cgit v1.2.3