s c h e m a t i c s : c o o k b o o k

/ WebHome / AuthorGuide / Cookbook.BeingPltSpecific

This Web


WebHome 
WebChanges 
TOC (with recipes)
NewRecipe 
WebTopicList 
WebStatistics 

Other Webs


Chicken
Cookbook
Erlang
Know
Main
Plugins
Sandbox
Scm
TWiki  

Schematics


Schematics Home
Sourceforge Page
SchemeWiki.org
Original Cookbook
RSS

Scheme Links


Schemers.org
Scheme FAQ
R5RS
SRFIs
Scheme Cross Reference
PLT Scheme SISC
Scheme48 SCM
MIT Scheme scsh
JScheme Kawa
Chicken Guile
Bigloo Tiny
Gambit LispMe
GaucheChez

Lambda the Ultimate
TWiki.org

Being PLT Specific

The reality of Scheme today is that many of the kinds of tasks which the Cookbook is intended to address cannot easily be implemented in a way that is portable across multiple Scheme implementations. Although it is quite feasible to write portable Scheme code to perform primarily algorithmic tasks with basic I/O capabilities, the details of support for practical requirements such as GUIs, network communication, threading, database access, and foreign function interfaces are largely specific to each Scheme implementation. These non-portable requirements are a big part of what the Cookbook is intended to address.

The Cookbook is not just an ordinary wiki consisting of a more or less ad-hoc collection of pages. It is organized in a book-like form based on classification information associated with individual entries, with one of its goal being the eventual production of a printed book. Supporting multiple Scheme implementations in this context, while ensuring that the result is usable and manageable, poses some technical challenges.

As a result, the Cookbook currently focuses on the use of PLT Scheme in those cases where portable code is not practical. Where possible and appropriate, portable techniques, in particular SRFIs, are used.

Future Plans for Multiple Implementations

We would like the Cookbook to be able to better support other Scheme implementations. Some technical support for this already exists. For example, code snippets included in the Cookbook are kept in a separate area, the Scm web, and included in the Cookbook topics. It would be possible to provide different code snippets for different implementations, and include the appropriate versions in a given topic automatically, based on a user's choice of implementation.

However, work will be needed to implement such capabilities in a usable way, without placing an undue burden on contributors and editors. Anyone interested in working on the Cookbook's implementation, whether to make it more implementation-independent or anything else, should contact AntonVanStraaten, or join the schematics-development mailing list.

-- AntonVanStraaten - 08 Sep 2004

Author Recommendations

Here are a few suggestions for a PLT-specific cookbook, in which our primary goal is to provide information to users of PLT Scheme. However, we also want the reader to be aware of what is PLT-specific, so that they can converse in the broader Scheme community and avoid unnecessary nonportability in their code; and I think we have a secondary goal of helping the reader to use other Schemes, since one of the benefits of Scheme is that you can retarget to any of a wealth of good implementations if you need to.

  1. Avoid totally gratuitous PLT-isms. For example, I wouldn't use match simply to get the first element of the list in an example (unless the example were intended to illustrate match, or there were symmetry with other uses of match in the example). However, use PLTisms with impunity wherever they help.
  2. When introducing a non-R5RS-ism in a discussion, a subtle reference to PLT-ismness (e.g., "The PLT match syntax can be used...") would be helpful. Likewise, we could say "The Scheme do syntax..." or "The R5RS do syntax..." when introducing a Scheme concept that isn't PLT-specific.
  3. Some convention similar in intent to a sidebar or a box could be used to say whether and how you can do the same thing in particular other popular Scheme implementations. For example, "This works in R5RS implementations with SRFI-6," "R5RS syntax-rules is similar but does not use PLT syntax objects, so...," "Other Scheme implementations have different module systems. Bigloo's module system is documented in...," and "An equivalent but more verbose R5RS procedure that doesn't use match is..." [ SiteToDo: we currently don't have any way of doing sidebars or boxes ]

-- NeilVanDyke - 11 May 2004

Comments

I suppose this is only a small step from a multiple-implementation cookbook. But, as a reader interested mainly in PLT, I'd hate to wade through piles of examples employing non-PLT object systems and such. (At least that would be a problem in print, though fancy hypertext could ellide irrelevant implementations in a convenient way, if someone wanted to volunteer Anton to invent that. :)

-- NeilVanDyke - 11 May 2004

The above all sounds fine to me, except for the part where I have to invent stuff. :) We probably could do something fancy with hypertext, but I'll be happy just to get a decent automatic table of contents capability!

-- AntonVanStraaten - 19 May 2004

CookbookForm
TopicType: Recipe
ParentTopic: AuthorRecipes
TopicOrder: 050

 
 
Copyright © 2004 by the contributing authors. All material on the Schematics Cookbook web site is the property of the contributing authors.
The copyright for certain compilations of material taken from this website is held by the SchematicsEditorsGroup - see ContributorAgreement & LGPL.
Other than such compilations, this material can be redistributed and/or modified under the terms of the GNU Lesser General Public License (LGPL), version 2.1, as published by the Free Software Foundation.
Ideas, requests, problems regarding Schematics Cookbook? Send feedback.
/ You are Main.guest