home *** CD-ROM | disk | FTP | other *** search
/ Dream 49 / Amiga_Dream_49.iso / amiga / programmation / langages-ppc / ppcsiod.readme < prev    next >
Text File  |  1998-02-11  |  2KB  |  56 lines

  1. Short:    Scheme (Lisp-like language) interpreter, powerUP (TM)
  2. Author:   Scaglione Ermanno, based on the original code from Paradigm Inc., Andreas R. Kleinert (port)
  3. Uploader: Andreas_Kleinert@t-online.de
  4. Version:  2.6
  5. Type:     dev/lang
  6. Source:   Fish collection, Aminet
  7.  
  8. An interpreter for the algoritmic language Scheme, a dialect of LISP
  9. developed at MIT.  Siod is a C implementation that covers a large part
  10. of the standard and can be run with a small amount of memory.
  11. It is the ideal tool to learn the language or for experimenting with
  12. functional languages.
  13.  
  14. You are a student/teacher and want to run SCHEME on your powerUP (TM)
  15. board ? Now you can do it... 8-)
  16.  
  17. I just did this port (original source and 68k version:
  18. dev/lang/siod.lha) mainly for fun, but it actually does
  19. make some sense, too. For example, if you like to calc the
  20. Ackermann() function you'd better use the PPC... ;-)
  21.  
  22. Get Abelson/Sussmanns "Structure and Interpretation of Computer Programs"
  23. and learn implementing lists, streams, stacks, register machines, ...
  24.  
  25. An example for the power of Scheme ?
  26.  
  27. Here's a short merge sort (taken from the samples directory):
  28.  
  29.  
  30. (define (merge-list x y)
  31.         (cond ((null? x) y)
  32.               ((null? y) x)
  33.               (else (if (test (car x) (car y))
  34.                         (cons (car x) (merge-list (cdr x) y))
  35.                         (cons (car y) (merge-list x (cdr y)))))))
  36.  
  37. (define (merge-sort x)
  38.         (if (null? x)
  39.             nil
  40.             (do ((ptr1 x (cdr ptr1))
  41.                  (ptr2 (cdr x) (cdr ptr2)))
  42.                 ((or (null? ptr2)
  43.                      (not (test (car x) (car ptr2))))
  44.                  (set-cdr! ptr1 nil)
  45.                  (merge-list x (merge-sort ptr2))))))
  46.  
  47.  
  48.  
  49. Call "start.bat" from inside this directory to start the
  50. interpreter and set up its initial environment.
  51.  
  52. Enjoy playing around with it.
  53.  
  54. --
  55. ARK, 8/Feb/98
  56.