in reply to Re^2: RFC: Almost a Book
in thread RFC: Almost a Book

Okay, but my take is that there are already a number of well-done "write your own mini-Scheme" books out there (e.g. SICP, Lisp in Small Pieces), and countless homebrew minischeme projects on SourceForge, etc. With a built-in "read" and list-manipulating functions, it's at least as easy to parse and interpret Scheme in Scheme itself as to do it in Perl. Why recapitulate these books in Perl?

If part 2 supplied an interesting non-scheme-like language with a translation down to part 1's scheme-like one, the book might stand out more. I dunno. I'm not really the target audience for this, so maybe I don't have a good feel for what would be interesting.

Replies are listed 'Best First'.
Re^4: RFC: Almost a Book
by billh (Pilgrim) on Apr 19, 2006 at 19:27 UTC
    > there are already a number of well-done "write your own mini-Scheme" books out there

    Point taken, but a Perl implementation has an advantage over C for understanding an implementation because it's much higher level, and over Scheme because there's no incestuous metacircular evaluation to confuse things.

    Secondly, yes, you hit the nail on the head about syntax because the Parsing section would use the existing evaluator as a target with new, alternative and interesting syntax, certainly better than those "Pratt parsers" that I've seen. Syntax aesthetics is often ignored in hard CS texts.

    Finally the third section on compilation would generate Parrot, making the use of Perl in the other sections doubly relevant, but I said that already.

      Finally the third section on compilation would generate Parrot...

      There are a couple of attempts in progress to port Scheme (or something Scheme-like) to Parrot. Pheme, for example, is far enough along to have exposed a few bugs in Parrot.