From 66c4616241749ce8950c0a48a529c303d430eb99 Mon Sep 17 00:00:00 2001 From: bnewbold Date: Thu, 22 Jan 2009 18:36:59 -0500 Subject: added next entry links; screenshot; sage tweaks (still not very good); amd64 instructions --- other/mit-scheme-etch-amd64-howto.txt | 78 +++++++++++++++++++++++++++++++++++ other/mitscheme.py | 2 +- other/scm.py | 5 ++- 3 files changed, 82 insertions(+), 3 deletions(-) create mode 100644 other/mit-scheme-etch-amd64-howto.txt (limited to 'other') diff --git a/other/mit-scheme-etch-amd64-howto.txt b/other/mit-scheme-etch-amd64-howto.txt new file mode 100644 index 0000000..0bc5405 --- /dev/null +++ b/other/mit-scheme-etch-amd64-howto.txt @@ -0,0 +1,78 @@ +Getting scmutils/mit-scheme rolling on amd64 Linux (Debian-based) +======================================================================== + +(you'll have to do a lot of this as root or sudo along) + +First download and install regular 32bit binaries for your debian-like system. + +For mit-scheme, the generic linux binaries are for debian 3.1 and have some +crusty library dependancies, but the .deb files won't install by default. You +can either make them install or unpack the .debs and install by hand +(sidestepping regular package management, kind of a faux pas, meh): + + $ ar -x mit-scheme_7.7.90+20060906-3_i386.deb + $ tar xvf control.tar.gz + $ cp -a usr/* /usr/ + +For scmutils just follow the directions for unpacking the .tar.gz. + +Then try to run the binary: + + $ /usr/bin/mit-scheme + +or: + + $ /usr/local/bin/mechanics + +Uh oh, missing file or some such message? Got some bad 32bit library mojo! +Luckily we can install regular 32bit libraries in parallel. First, + + $ apt-get install ia32-libs + +The binary still won't work, we're missing some libraries, so double check: + + $ ldd mit-scheme-native + linux-gate.so.1 => (0xffffe000) + libgdbm.so.3 => not found + libmhash.so.2 => not found + libcrypto.so.0.9.8 => not found + libncurses.so.5 => /lib32/libncurses.so.5 (0xf7f9c000) + libm.so.6 => /lib32/libm.so.6 (0xf7f78000) + libX11.so.6 => /usr/lib32/libX11.so.6 (0xf7e8c000) + libc.so.6 => /lib32/libc.so.6 (0xf7d61000) + /lib/ld-linux.so.2 (0xf7fe6000) + libXau.so.6 => /usr/lib32/libXau.so.6 (0xf7d5e000) + libXdmcp.so.6 => /usr/lib32/libXdmcp.so.6 (0xf7d58000) + libdl.so.2 => /lib32/libdl.so.2 (0xf7d54000) + +Installing regular versions didn't help, need to go get the 32 bit versions and +install manually: + + $ wget http://debian.lcs.mit.edu/debian/pool/main/o/openssl/libcrypto0.9.8-udeb_0.9.8c-4etch3_i386.udeb + $ wget http://debian.lcs.mit.edu/debian/pool/main/g/gdbm/libgdbm3_1.8.3-3_i386.deb + $ wget http://debian.lcs.mit.edu/debian/pool/main/m/mhash/libmhash2_0.9.7-1_i386.deb + $ dpkg -X libmhash2_0.9.7-1_i386.deb /emul/ia32-linux/ + $ dpkg -X libgdbm3_1.8.3-3_i386.deb /emul/ia32-linux/ + $ dpkg -X libcrypto0.9.8-udeb_0.9.8c-4etch3_i386.udeb /emul/ia32-linux/ + $ ldconfig + +And voila: + + $ uname -a + Linux eta 2.6.18-6-xen-amd64 #1 SMP Fri Dec 12 07:02:03 UTC 2008 x86_64 GNU/Linux + $ mechanics & + Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, + 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, + 2006, 2007, 2008 Massachusetts Institute of Technology + This is free software; see the source for copying conditions. There is NO + warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + + Image saved on Wednesday October 29, 2008 at 8:08:07 PM + Release 7.7.90.+ || Microcode 15.1 || Runtime 15.7 + SF 4.41 || LIAR/i386 4.118 || Edwin 3.116 + ScmUtils Mechanics . Summer 2008 + +See also: + + * http://www.debian-administration.org/articles/531 + * https://alioth.debian.org/docman/view.php/30192/21/debian-amd64-howto.html#id292233 diff --git a/other/mitscheme.py b/other/mitscheme.py index 826f26e..8a20641 100644 --- a/other/mitscheme.py +++ b/other/mitscheme.py @@ -118,7 +118,7 @@ class MitScheme(Expect): try: with gc_disabled(): - return self._strip_prompt(self._eval_line(code, **kwds)) + return self._strip_prompt(self._eval_line(code.replace('\n',' ').replace('\r',' '), **kwds)) except KeyboardInterrupt: # DO NOT CATCH KeyboardInterrupt, as it is being caught # by _eval_line diff --git a/other/scm.py b/other/scm.py index 0152f9f..5d0d4d5 100644 --- a/other/scm.py +++ b/other/scm.py @@ -114,7 +114,9 @@ class SCM(Expect): try: with gc_disabled(): - return self._eval_line(code, **kwds) + + #return '\n'.join([self._eval_line(L, **kwds) for L in code.split('\n') if L != '']) + return self._eval_line(code.replace('\n',''), **kwds) except KeyboardInterrupt: # DO NOT CATCH KeyboardInterrupt, as it is being caught # by _eval_line @@ -338,7 +340,6 @@ def scm_console(): # This will only spawn local processes os.system('scm') - def scm_version(): """ EXAMPLES: -- cgit v1.2.3