This is the mail archive of the guile@cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Ideas


Hi everybody.

Wouldn't it be nice, if guile had a file with generic guile instructions
for applications that link guile in?  I'm thinking of a relatively small
file similar to autoconf's generic installation information or the
information about native language support which comes with a lot of
programs?

Example:

----------------------------------------------------------------------
Generic Guile Instructions.

Congratulations --- You have obtained an application using guile.
(http://www.fsf.org/software/guile/guile.html)

This provides you as a user with advanced scripting facilities to
dynamically configure and extend the application while it is running.
There are two ways how this may be visible to you, either one or both may
apply: 
* The program offers you a command line interface where you can enter
guile scripting commands, or
* the program offers some way to read guile scripting files during
startup or during program operation.

...
----------------------------------------------------------------------
There may also be reasons to include a short intro to scheme here, 
but on the other hand it may also be true that we can assume that
guile has to be installed on the system anyway.  In that case it would be
sufficient to give a link to guile's documentation as installed on the
system.

Maybe such a file already exists, and I have been blind?



Another point regarding how to make coding in scheme easier for beginners:
When I introduced a colleage of mine to guile, he was pretty impressed.
Since he did not know scheme, I had to give him a short introduction.
This appeared to be painful as soon as I had to explain pairs and lists
due to the - I had to admit it - stupid names car, cdr and so on.

What about some guile beginners mode enabled by (beginner), which
automatically enables backtracking and some other useful flags, and
additionally provides the following definitions (and probably some more):

(define first car)
(define rest cdr)
(define pair cons)
(define function lambda)

I know the topic of scheme's strange function names has been discussed to
death on comp.lang.scheme.  Still, I think for guile it may be beneficial
to have some 'beginners' mode.  Guile is not (only) aimed at scheme
purists, but rather at people who don't care about historical background
of function names, especially in the very early learning phase.  Some may
always prefer to keep the above definitions in, even if they grow up to
experts, but that is (in my opinion) not a problem.  It would also make it
easier to provide simple examples that are easily understood by people
that are totally new to scheme.

Example:

the following requires some explanation
(car (cons 1 2)) => 1
(car (list 1 2 3)) => 1
(cdr (list 1 2 3)) => (2 3)
(lambda (x) (* x x))

show this to beginners, and you can spare some words
(first (pair 1 2)) => 1
(first (list 1 2 3)) => 1
(rest (list 1 2 3)) => (2 3)
(function (x) (* x x))

In order not to get flamed by the scheme and lisp purists, I would also
suggest that when adding such a beginners mode we should also provide
some document that states what the beginners mode is and what the purist's
way of doing things is.  The link to this document should be printed
whenever someone enters (beginner) at the command line.


don't shoot me :-)
Dirk Herrmann


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]