From 823441e43dd007d4e8931fb236ffbeada12eabd2 Mon Sep 17 00:00:00 2001 From: bnewbold Date: Wed, 14 Jan 2009 16:24:34 -0500 Subject: bunch of new --- software/scheme | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 software/scheme (limited to 'software/scheme') diff --git a/software/scheme b/software/scheme new file mode 100644 index 0000000..ad2c5b5 --- /dev/null +++ b/software/scheme @@ -0,0 +1,61 @@ +================== +Scheme +================== + +``mit-scheme`` with the ``scmutils`` package is assumed; the command +``mechanics`` starts in interactive edwin prompt. + +See also notes on `The Little Schemer `__. + +Scheme Implementations +----------------------- + +Very partial list, mostly just the ones which are interesting to me. + +MIT/GNU Scheme + The 7.9.0 release (last stable as of 01/01/2009) is not R5RS compatible, + and is generally a pain in the ass to compile on new systems. The 9.0 + release should be easier to compile and distribute because it will use + a C compiler to bootstrap (true?). + +SCM + SCM is a fairly minimal, very small footprint R5RS-compatible + implementation. Apparently very portable and easy to compile. Includes + the Hobbit compiler. Part of the GNU project, maintained at MIT? + +SIOD + SIOD (scheme in one day) is a super small (75k binary?) Scheme + implementation. + +Coding in ``edwin`` +----------------------- + +..note: this section should be spun off as emacs. edwin is essentially a + scheme version of emacs. See this + `http://static.bryannewbold.com/mirror/sheets/emacs.pdf`:emacs cheatsheet: + +Common keyboard commands (usually 'M' is alt button, 'C' is ctrl, and 'S' is +meta/super/"windows"): + +========= ==================================================================== +C-x C-f Open a file, or create a new one +C-x C-s Save the file +C-x k Kill (close) a buffer +C-x C-c Exit the editor +C-g Abort a command +C-x C-e Evaluate the previous expression +M-z Evaluate the surrounding expression +M-o Evaluate the entire buffer (everything) +C-c C-c Kill evaluation after an error +C-y Paste (yank) +C-x 2 Split screen vertically +C-x 5 Split screen horizontally +C-x o Switch to next buffer window +C-x 1 Return to non-split screen +M-x Enter a command by name in minibuffer (use tab to complete) +C-x C-b Show buffer menu +C-x b Select buffer +C-x u Undo +C-y Paste +========= ==================================================================== + -- cgit v1.2.3 From ce9e1069c11223190ac264c586ebe8aff21c3735 Mon Sep 17 00:00:00 2001 From: bnewbold Date: Fri, 16 Jan 2009 05:14:20 -0500 Subject: added seasoned so far, minor changes --- books/Little Schemer | 3 +++ books/Seasoned Schemer | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++ software/scheme | 6 ++++++ 3 files changed, 62 insertions(+) create mode 100644 books/Seasoned Schemer (limited to 'software/scheme') diff --git a/books/Little Schemer b/books/Little Schemer index ccca2a7..394de5b 100644 --- a/books/Little Schemer +++ b/books/Little Schemer @@ -17,6 +17,9 @@ The first 7 chapters were very straight forward, the end of chapter 8 took some more thought and I'm not sure how happy I am with the description of collectors and continuations. +For a better description of the Y-combinator, see these `course notes +`__. + This book is followed by `The Seasoned Schemer `__ and The Reasoned Schemer. diff --git a/books/Seasoned Schemer b/books/Seasoned Schemer new file mode 100644 index 0000000..ed2a3fb --- /dev/null +++ b/books/Seasoned Schemer @@ -0,0 +1,53 @@ +============================ +The Seasoned Schemer +============================ + +:by: Daniel Friedman and Matthias Felleisen +:Edition: First (1st) + +See also `Scheme `__. + +This book is a sequel `The Little Schemer`_; +The Reasoned Schemer is a paralel exploration of logical programming. + +.. _The Little Schemer: /k/books/littleschemer/ + +Issues/Omissions +-------------------------- +The Y combinator function is never defined in this book, I had to copy it out of +`The Little Schemer`_; + + (define Y + (lambda (thing) + ((lambda (le) + ((lambda (f) (f f)) + (lambda (f) (le (lambda (x) ((f f) x)))))) + thing))) + +MIT/GNU Scheme doesn't seem to have ``letcc`` or ``try``; I stuck with +``call-with-current-continuation``: + + (call-with-current-continuation (lambda (hook) ...) + ; is the same as + (letcc hook (...)) + + ; as noted in the book (p. 89) + (try x a b) + ; is the same as + (letcc success + (letcc x + (success a)) + b) + ; is the same as + (call-with-current-continuation + (lambda (success) + (begin + (call-with-current-continuation + (lambda (x) + (success a))) + b))) + + +The Next 10 Commandments +-------------------------- +TODO diff --git a/software/scheme b/software/scheme index ad2c5b5..258343b 100644 --- a/software/scheme +++ b/software/scheme @@ -59,3 +59,9 @@ C-x u Undo C-y Paste ========= ==================================================================== +Scope +-------------- + +``set!`` looks up a symbol name and permanently changes the first value it comes +across. ``let`` (and ``letrec``) create a new symbol with the given value. +But wait, you need a ``lambda`` block to make everything work? -- cgit v1.2.3