Newsgroups: comp.lang.lisp
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!howland.reston.ans.net!gatech!rutgers!njitgw.njit.edu!hertz.njit.edu!kxp5195
From: kxp5195@hertz.njit.edu (Krishna Padmasola)
Subject: Re: Q: is there a small lisp-like scripting language?
Message-ID: <1994Dec17.160528.19224@njitgw.njit.edu>
Sender: news@njit.edu
Nntp-Posting-Host: hertz.njit.edu
Organization: New Jersey Institute of Technology, Newark, New Jersey
References: <17084A51FS85.UPP201@ibm.rhrz.uni-bonn.de> <MIKEE.94Dec6090259@sys8.wfc.com> <170879521S85.UPP201@ibm.rhrz.uni-bonn.de> <3cs6a2$ksi@firewall.ihs.com>
Date: Sat, 17 Dec 1994 16:05:28 GMT
Lines: 211


hi,

i haven't tried it, but klone seems to be approximately what you are
looking for. it was developed in inria by a member of the koala group.
i believe it has been used in the implementation of gwm, a generic
window manager based on WOOL ( window object-oriented lisp) and the
canvas widget ( a motif widget with support for 2-d graphics). the
canvas widget source comes with some example scripts in klone,



as niels mayer mentioned, there is winterp also, which is great for
interactive user interface development; i don't have to leave emacs to
run winterp programs, it's fun playing with winterp, after you have
written some c/motif programs. for me it is a fun way to learn lisp.


/*****************************************************************************\
*                                                                             *
*                 @       @ @@                                                *
*                 @      @   @                                                *
*                 @     @    @   @@@@@   @ @@@@@    @@@@@@@                   *
*                 @@@@@@     @  @     @  @@     @  @       @                  *
*                 @     @    @ @       @ @       @ @@@@@@@@@                  *
*                 @      @   @  @     @  @       @ @                          *
*                 @       @ @@@  @@@@@   @       @  @@@@@@@                   *
*                                                                             *
*                                                                             *
*                                                                             *
*                   _/_     /) /)    _/_                            /         *
*        o __   _   /  __. // // __. /  o ______       _,  . . o __/ _        *
*       (_/) )_/_)_(__(_(_(/_(/_(_(_(__(_(_) /) )_    (_)_(_/_(_(_(_(<_       *
*                                                       /|                    *
*                                                      |/                     *
*                                                                             *
*******************************************************************************
* WARNING:                                                                    *
* I would REALLY appreciate if you download klone to just send me a mail with *
* your coordinates (an "electronic business card"). This will allow me to show*
* the use of klone and help me justify my work on it for my management, thanks*
\*****************************************************************************/

WHAT IS KLONE?
============

KLONE is a small and fast fully interpreted language intended to be embedded
into C applications to provide them with a powerful, yet fast and small
extension language. Its syntax is very inspired from Lisp (its external syntax
has been kept as close as possible to Common Lisp as possible), but its
implementation is original and efficient, to give full extensibility, intimate
interfacing to C, incremental garbage collection, and full portability on
either K&R or ANSI C.

Klone v1 has been developed in november 1987 at the Koala Project in Bull
Research center, and used in GWM, the extensible X11 window manager since
april 1988. Its success and use in other products (mainly the Motif interface
builder EGERIA) has led to the development of this new powerful version Klone
v2. Klone v1 was only 50K in code, but had many shortcomings. This new version
has grown to 250K, but is totally redesigned, taking into account our growing
experience. It has less bugs than the v1 version, and try not to introduce any
backwards incompatibility.

Klone vs other customization languages: (my own biased opinion, of course :-)
TCL: Klone is faster and more powerful (more data types), and better suited for
     coding non-toy applications. TCL shell syntax has bad scalability.
     TCL has multiple interpreters and a very nice X toolkit TK
XLISP: Klone is faster and better integrated to C
REXX: Klone has much cleaner semantics

UNPACKING a new distribution:
=============================

First, you should make a directory (for instance "/usr/local/klone/") which we
will call BUILDDIR in the following text, where you will build the klone
distribution. If you already have a BUILDDIR with old klone sources in it, just
use it: new klone files will overwrite the existing ones, but your local
configuration files (in the Make/ subdirectory) will be preserved.

The installation of klone will look like:

				BUILDDIR
				  |
				 klone
				  |
C source files     +----+----+----+
	   	   |	|    |	  |
		  tests doc  Make kl

The files will be then compiled in brother directories of "klone" (sons of
BUILDDIR) in a stand-alone installation. Source files will be referred to via
symbolic links.

If you plan to update your sources by applying distributed patches, please
do a copy of the sources just as you got them before doing any changes to
the distributed files (except the Make.xxx local configuration files). The
Make directory will contain all your configuration options, that you will be
able to re-use between different klone releases.

INSTALLATION:
=============

Old users might read the CHANGES file for a history of changes interesting
the user (REVISION contains the	full implementation changes). 

	To compile or install klone, you must, in the "klone" directory you just
	for each type of machine on which you decide to install it:

	decide which name you will give to this type of machine ("dpx1000", 
	"sun", "vax"). Suppose it is "dpx" in the following. Don't try to name
	it "klone" however!

	type: "make DIR=../dpx sdir" (or make DIR=dpx dir if you don't have
	symbolic links on your system)

	This will build a directory "../dpx", link all source files in it,
	copy the Make.TEMPLATE file to "Make.dpx" in the ../dpx
	directory, and make a link to this newly created file in "Make"
	subdirectory. If you want to create the target directory on another
	filesystem, you can use symbolic links to do so, Just say "make
	DIR=path sdir" where "path" is the complete pathname of the target
	directory, for instance "/usr/maalea/local/src/KLONE/dpx"

	go into it ("cd ../dpx"), and edit the "Make.dpx" file to adapt it
	to your local installation. 

	Then, type "make" and the klone library "libklone.a" and a "klone"
	executable, a sample toplevel shell should be built.
	In case of errors, a simple "make" should resume the
	compilation process after the first "make" command has been issued.
	If you have the message "Make:  Don't know how to make .dir.  Stop.",
	that means that you have forgotten to do "cd ../dpx".

	VERY IMPORTANT: if you encounter compilation problems, please mail me
	the problems and the patches you had to apply to make it compile
	on your system, so that I can include them in future releases!

	The thing you need to keep is the "Make" directory, which contains all
	the things you may have defined or adapted for your configuration. 
        A link to the "Make.machine" in the "Make" subdirectory was 
	automatically generated by the "make dir" command,
	so that you do not have to worry about saving it before deleting
	the "machine" directory.

	The advantage of this scheme over the "imake" approach is that your
	local modifications are kept in the Make.machines files, and
	are not overwritten by new updates, so re-compiling new
	updates of klone is just typing "make", and that is is much easier to
	have multiple versions with different compile-time options on the same
	machine. Imake is better for distributing final code, this solutions
	allows more personal flexibility.

TESTING SUITE:
==============

Launching "klone" will allow to interactiveley try commands in a standard klone.
the klone executable can be used to code scripts, just like shell, awk, sed,
etc... Klone understands the unix convention of putting the line:

#!/usr/local/bin/klone

as the first line of your scripts (change of course the path of klone depending
on where you installed it).

A mini test suite is included in tests/
To run this test, type "klone t"

MISC UTILITIES:
===============

lots of klone scripts are included in the kl/ subirectory

REPORTING BUGS:
===============

See the file doc/BUG_REPORT to mail back bugs to me

COPYRIGHT:
==========

  Copyright 1989-93 GROUPE BULL -- See license conditions in file COPYRIGHT
  See the COPYRIGHT file in the KLONE distribution
  This is the same COPYRIGHT as the rest of the X tape.

Please mail any bug reports or modifications done (with RCS version number
and .klonerc used), comments, suggestions, requests for updates or patches to
port on another machine to:

colas@mirsa.inria.fr		(INTERNET)

33 (FRANCE) 93.65.77.70		(VOICE PHONE)
33 (FRANCE) 93.65.77.66		(FAX)

Colas Nahaboo			(SURFACE MAIL)
INRIA
B.P. 93
06902 Sophia Antipoilis cedex
FRANCE

SOFTWARE USED:
==============

I use the freely distributable regexp package Written by Henry Spencer,
Copyright (c) 1986 by University of Toronto

Colas Nahaboo, colas@sa.inria.fr, Bull Research, Koala Project, GWM X11 WM
Phone:(33) 93.65.77.70(.66 Fax), INRIA, B.P.109 - 06561 Valbonne Cedex, FRANCE.
-- 
Krishna Padmasola
krishna@earth.njit.edu

