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 --- journal/16jan2009.html | 2 + journal/19jan2009.html | 3 +- journal/21jan2009.html | 3 +- journal/22jan2009-sage-interact-screenshot.png | Bin 0 -> 71859 bytes journal/22jan2009.html | 11 ++++ other/mit-scheme-etch-amd64-howto.txt | 78 +++++++++++++++++++++++++ other/mitscheme.py | 2 +- other/scm.py | 5 +- 8 files changed, 99 insertions(+), 5 deletions(-) create mode 100644 journal/22jan2009-sage-interact-screenshot.png create mode 100644 other/mit-scheme-etch-amd64-howto.txt diff --git a/journal/16jan2009.html b/journal/16jan2009.html index 8ec2681..03dcf6b 100644 --- a/journal/16jan2009.html +++ b/journal/16jan2009.html @@ -38,6 +38,8 @@ The Little Schemer and The Seasoned Schemer. My notes on those books are notes on scheme itself are here (note: last link temporarily broken?). +

+(next entry) diff --git a/journal/19jan2009.html b/journal/19jan2009.html index 01d6b98..6b5d477 100644 --- a/journal/19jan2009.html +++ b/journal/19jan2009.html @@ -42,7 +42,8 @@ For now, i'm actually going to switch over to the "scm" scheme distribution which is much simpler and get that going well with sage, then try MIT/GNU scheme again.

-(previous entry) +(previous entry) - +(next entry) diff --git a/journal/21jan2009.html b/journal/21jan2009.html index 72ab84b..724e052 100644 --- a/journal/21jan2009.html +++ b/journal/21jan2009.html @@ -71,7 +71,8 @@ flag for mit-scheme, it needs one!

-(previous entry) +(previous entry) - +(next entry) diff --git a/journal/22jan2009-sage-interact-screenshot.png b/journal/22jan2009-sage-interact-screenshot.png new file mode 100644 index 0000000..5ceb7f0 Binary files /dev/null and b/journal/22jan2009-sage-interact-screenshot.png differ diff --git a/journal/22jan2009.html b/journal/22jan2009.html index cb73efb..68213b5 100644 --- a/journal/22jan2009.html +++ b/journal/22jan2009.html @@ -25,6 +25,17 @@ But this is super slow, should probably just use gnuplot for now... gnuplot('set terminal png; set xrange[-4:4]; set yrange[-100:100]; set output "/home/bnewbold/fromsage.png"; plot "/home/bnewbold/output";') Could fidget with style settings too. +
+

+Fiddled some more got an @interact going: see a screenshot +here. + +Still have most of yesturday's stuff to do if i'm going to pursue that... I +got scmutils working (at least partially) on a virtual machine: eta.xvm.mit.edu. It's a amd64 host so I had +to fiddle with loading extra 32bit libraries, more about that in these directions I emailed to the +mit-scheme-devel list.

(previous entry) 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