STk FAQ.

From: <Marc.Furrer_at_di.epfl.ch>
Date: Tue, 24 Jan 95 14:26:41 +0100

Hello Dear STk users,

I've put up a small FAQ about STk. It is not finished, but I need your
help to "beta test" it. Comments are welcome, FAQ and FAQ+answer too.

enjoy,

Marc.

PS: latest version is available from http://ltiwww.epfl.ch/~furrer/STk/FAQ.htm
l
PS2: anyone aware of a good FAQ->Html converter ?

     -*- mode: outline ; outline-regexp: "^\\(\\*\\*\\*\\|Subject: \\)" -*-
;;; ****************************************************************
;;; Answers to Frequently Asked Questions about STk *************
;;; ****************************************************************
;;; Written by Marc Furrer
;;; with the extensive support from Erick Gallesio
;;; FAQ-STk

This is the STk FAQ.

If you think of questions that are appropriate for this FAQ, or would
like to improve an answer, please send e-mail to me at
Marc.Furrer_at_di.epfl.ch.

*** Copyright:

Copyright (c) 1995 by Marc Furrer and Erick Gallesio
All rights reserved.

This FAQ may be freely redistributed in its entirety without
modification provided that this copyright notice is not removed. It
may not be sold for profit or incorporated in commercial documents
(e.g., published for sale on CD-ROM, floppy disks, books, magazines,
or other print form) without the prior written permission of the
copyright holder. Permission is expressly granted for this document
to be made available for file transfer from installations offering
unrestricted anonymous file transfer on the Internet.

This article is provided AS IS without any express or implied warranty.

*** Table of Contents:

  [1.-] Generalities about STk
  [1.0] What is STk
  [1.1] Where do I get STk from
  [1.2] The STk Mailing List
  [1.3] Reporting a Bug
  [1.4] Getting more information about Scheme
  [1.5] Getting more information about Tk

  [2.-] What's making STk the Scheme interpreter you need
  [2.0] Differences with R4RS
  [2.1] Added Features
  [2.2] Contributed Packages

  [3.-] Why & How ? ... Trick and Treat with STk
  [3.x] --- these topic are not listed in the ToC

  [4.-] STklos, the STk object oriented extension to Scheme
  [4.0] Principle
  [4.1] Common traps

Search for \[#\] to get to question number # quickly.

*** Introduction:

STk is a scheme interpreter, with embedded support for the Tk graphical
package. It is as GUI friendly as Tk/Tcl, with the programming beauty of
Scheme ;-).

This file tries to answer most frequently asked question about
STk. It isn't a Scheme course nor a Tk course.

If you don't find an answer that should be here, please drop an e-mail
to Marc.Furrer_at_di.epfl.ch, with your question and, if possible, the
answer.

------------------------------

Subject: [1.0] What is STk

STk is a R4RS Scheme interpreter which can access to the Tk graphical package.
Concretely it can be seen as the John Ousterhout's Tk package where
the Tcl language has been replaced by Scheme.

STk also, provides an efficient object oriented system called STklos.
STklos is a full OO system with multi-inheritance, generic functions,
multi-methods and a true meta object protocol). STklos can be dynamically
loaded on systems which support this feature.

------------------------------

Subject: [1.1] Where do I get STk from

STk distribution is available on various sites. The original
distribution site is kaolin.unice.fr (193.48.229.225). Files are
available through anonymous ftp and are located in the /pub
directory. Distribution file names have the form STk-x.y.tar.gz, where
x and y represent the version and the release of the package. You can
also find interim releases of STk. Intermediate releases are stored in
file whose name have the form STk-x.y.z.tar.gz where z is the
intermediate release number.

------------------------------

Subject: [1.2] The STk Mailing List

There is a mailing list for STk located on kaolin.unice.fr. The
intent of this mailing list is to permit to STk users to share
experiences, expose problems, submit ideas and everything which you
find interesting (and which is related to STk).

To subscribe to the mailing list, simply send a message with the word
subscribe in the Subject: field of you mail. Mail must be sent to the
following address: stk-request_at_kaolin.unice.fr

To unsubscribe from the mailing list, send a mail at previous email
address with the word unsubscribe in the Subject: field.

For more information on the mailing list management send a message
with the word help in the Subject: field of your mail. In particular,
it is possible to find all the messages which have already been sent
on the STk mailing list.

Subscription/un-subscription/information requests are processed
automatically without human intervention. If you something goes wrong,
send a mail to eg_at_unice.fr.

Once you have properly subscribe to the mailing list,

        + you can send your messages about {\stk} to stk_at_kaolin.unice.fr,
        + you will receive all the messages of the mailing list to the email
          address you used when you subscribed to the list.

The mailing list is archived at:
         http://kaolin.unice.fr:/pub/Mailing-list/Hypermail/index.html

------------------------------

Subject: [1.3] Reporting a Bug

When you find a bug in STk, please send its description to the
following address stk-bugs_at_kaolin.unice.fr. Don't forget to indicate
the version you use and the architecture the system is compiled on.
Stk version and architecture can be found by using the version and
machine-type Scheme primitives. If possible, try to find a small
program which exhibit the bug.

------------------------------

Subject: [1.4] Getting more information about Scheme

 ++++ The R4RS document

R4RS is the document which fully describe the Scheme Programming
Language, it can be found in the Scheme repository in the directory:

        ftp://ftp.cs.indiana.edu/pub/scheme-repository/doc

Aubrey Jaffer has also translated this document in HTML. A version of this
document is available at

        file://swiss-ftp.ai.mit.edu/pub/scm/HTML/r4rs\_toc.html

 ++++ The Scheme Repository

The main site where you can find (many) informations about Scheme is
located in the University of Indiana. The Scheme repository is
maintained by David Eby. The repository currently consists of the
following areas:

        + Lots of scheme code meant for benchmarking, library/support,
          research, education, and fun.
        + On-line documents: Machine readable standards documents, standards
          proposals, various Scheme-related tech reports, conference
          papers, mail
          archives, etc.
        + Most of the publicly available Scheme Implementations.
        + Material designed primarily for instruction.
        + Freely-distributable promotional or demonstration material for
          Scheme-related products.
        + Utilities (e.g., Schemeweb, SLaTeX).
        + Extraneous stuff, extensions, etc.

You can access the Scheme repository at:

        ftp://ftp.cs.indiana.edu/pub/scheme-repository
        http://www.cs.indiana.edu/scheme-repository/SRhome.html

The Scheme Repository is mirrored in Europe at:

        + ftp.inria.fr:/lang/Scheme
        + faui80.informatik.uni-erlangen.de:/pub/scheme/yorku
        + ftp.informatik.uni-muenchen.de:/pub/comp/programming/languages/scheme
          /scheme-repository

 ++++ Usenet newsgroup and other addresses

There is a usenet newsgroup about the Scheme Programming language:

        comp.lang.scheme

Following addresses contains also material about the Scheme language

        + The Scheme FAQ
        http://www.cs.cmu.edu:8001/Web/Groups/AI/html/faqs/lang/scheme/top.html
        
        + The Scheme Home Page at at MIT
        http://www-swiss.ai.mit.edu/scheme-home.html

        + The Scheme Underground web page
        http://www.ai.mit.edu/projects/su/su.html

------------------------------

Subject: [1.5] Getting more information about Tk

The reference about Tk is probably Ousterhout's book :

        "Tcl and the Tk Toolkit"

of course, you better not read the chapters about Tcl ;-)


------------------------------

Subject: [2.0] Differences with R4RS

 +++ Symbols

STk symbol syntax has been augmented to allow case significant symbols.

many global symbols have been added to the global environment, see
Appendix B of the STk Reference Manual.

 +++ Types

STk implements all the types defined as mandatory in R4RS. However, complex
numbers and rational numbers (which are defined but not required in R4RS) are
not implemented. The lack of these types implies that some functions of
R4RS are not defined.

Some types which are not defined in R4RS are implemented in STk. Those
types are listed below:

        + input string port type
        + output string port type
        + keyword type
        + Tk command type
        + environment type
        + macro type
        + address type
        + hash table type

 +++ Procedures

The following procedures are required by R4RS and are not implemented in the
STk interpreter.

        + char-ready?
        + transcript-off
        + transcript-on

Procedure char-ready? will be implemented in a future version.
Transcript-off and transcript-on can be simulated with various Unix
tools such as script or fep.

The following procedures are not implemented in the STk interpreter whereas
they are defined in R4RS (but not required). They are all
related to complex or rational numbers.

        + numerator
        + denominator
        + rationalize
        + make-rectangular
        + make-polar
        + real-part
        + magnitude
        + angle

This is more detailed in the Appendix B of the STk Reference Manual.

------------------------------

Subject: [2.1] Added Features

feature you will probably not find elsewhere.

        + dynamic loading of C module
        + ease of making C extension
        + ...

------------------------------

Subject: [2.2] Contributed Packages

among the package coming with STk we shall mention :

        + socket package
          allow access to the UNIX systems sockets

        + regexp package
          give access to the regular expression of Tk/Tcl
        
        + time package
          give access to the time function of an Unix box

you also have access to the SLIB package developed by Aubrey Jaffer.

------------------------------

Subject: [3.0] Using STk from Emacs

There are several ways to call stk from Emacs. One simple way consists to add
the following lines in your file $HOME/.emacs

(setq-default auto-mode-alist (append auto-mode-alist
                                      ("\\.stk$" . scheme-mode)
                                      ("\\.stklos$" . scheme-mode)))

;; Use cmu-scheme rather than xscheme (xscheme is wired with CScheme)
(autoload 'run-scheme "cmuscheme" "Run an inferior Scheme" t)
(setq scheme-program-name "stk")

(setq scheme-mode-hook
      '(lambda()
         (autoload 'run-scheme "cmuscheme" "Run an inferior Scheme" t)
         (setq scheme-program-name "stk")
         ;; Comment the two following lines if you don't want Font-locking
         (setq font-lock-keywords '(":[-a-zA-Z0-9]*"))
         (turn-on-font-lock))

(setq inferior-scheme-mode-hook '(lambda() (split-window)))

Another way consists to use a special purpose STk mode. You can find two
such modes in the /pub/Contrib directory of kaolin.unice.fr.


------------------------------

Subject: [3.1] Using the SLIB package with STk

Aubrey Jaffer maintains a package called SLIB which is a portable
Scheme library which provides compatibility and utility functions for
all standard scheme implementations. To use this package, you have
just to type :

        (require "slib")

and follow the instructions given in the SLIB library to use a
particular package.

------------------------------

Subject: [3.2] the -geometry flag doesn't work

the -geometry flag just put the geometry parameter in *geometry* you
have to use it yourself, for instance with:

 (wm 'geometry "." *geometry*)

NB: in fact this is a bug that shall be corrected in 2.1.6

------------------------------

Subject: [4.0] Principle

------------------------------

Subject: [4.1] Common traps

------------------------------

Comment to be directed to Marc.Furrer_at_di.epfl.ch.


--
Furrer Marc 		    EPFL DI-LTI, 1015 Lausanne, Suisse
Marc.Furrer_at_di.epfl.ch      +41 21 693 29 07 / 66 00 (Fax)
                            http://ltiwww.epfl.ch/~furrer
--
You are a wise man my friend.
Not yet sir. But with your help, I am learning.
    -- Riker and Data, "The Measure of a Man", stardate 42523.7
--
PGP 2.6 encrypted mail are welcomed, public key on nearest server
Received on Tue Jan 24 1995 - 14:28:00 CET

This archive was generated by hypermail 2.3.0 : Mon Jul 21 2014 - 19:38:59 CEST