Posting: Survey of Toolkit Langauges 
Author Message
 Posting: Survey of Toolkit Langauges

Info file:,    -*-Text-*-
produced by texinfo-format-buffer
from file: Toolkit.texinfo

This file documents Toolkit languages

Authored by Terrence Brannon

File:  Node: Top, Prev: (DIR), Up: (DIR), Next: Overview

Toolkit Languages FAQ: Introduction

The purpose of this FAQ is to expose people to several languages which
can cutdown/eliminate shell programming and C programming.

All of these languages are quick interpreted languages which can do
things in a few lines which might take hundreds of lines of C/shell

I tried to be objective but I have not learned Perl. I looked into Perl
but gave it up - it seemed very odd to me.

* Menu:

* Overview::

* Power::
* Graphics::
* String Handling::
* Process Control::
* Extensions::

* Documentation::

* Ease of Use::

* Extensibility::

* Test Suite::

File:  Node: Overview, Prev: Top, Up: Top, Next: Power


Emacs Lisp
Anything Emacs does is done in Lisp, so you can do it to. But you can
only do it inside of Emacs Lisp for the most part. The two work arounds
are: (1) use emacs-server.el which allows Emacs to send/receive on
sockets (2) use emacs server mode. Both are rather hairy.

Cant call from C and cant call from the shell.

Combines the best features of awk, sed, and shell programming. The
latest version can be embedded in C programs. It is also easy to call
from the shell.

An object-oriented interpreted language. Callable from C as well as the
shell. Interpretation may be sidestepped through the use of the
byte-compiler on files. python played a major role in testing Amoeba, a
distributed operating system developed at CWI.

Extremely strong in X-windows. It can do a 5 page x-windows program in
*2* lines and more. Callable from C and from the shell.

File:  Node: Power, Prev: Overview, Up: Top, Next: Graphics


All of the systems will be evaluated in terms of their capabilities in
graphics, string handling, and process control. They will also be
evaluated in terms of their extensions.

File:  Node: Graphics, Prev: Power, Up: Top, Next: String Handling


Emacs Lisp
None internally, but the ability to spawn inferior unix
processes and issue shell commands allows it to use tcl's WAFE or fire
up a Python process and control it with ease.

Again none interally, but it might take the same route os Emacs Lisp but
my feeling is it would be a harder task than in Emacs Lisp.

Through the use of the STDWIN paradigm, the same source code
can do graphics in the following systems:

  1. X-windows
  2. Macintosh
  3. Atari ST
  4. DOS
  5. Silicon Graphics SGI workstations

This approach allows flexibility but means that no one graphics system's
potential is maximized.

Overloaded with all types of very very easy to do attractive
graphics in X-Windows only. Easy to learn, and has many nice widgets
added to it such as a photo widget for display of scanned PBM images,
a bar graph widget, an editable text widget and much more.
Powerful tcl-based graphics systems come to mind:

  1. VOGLE - 3D rendering, fonts
  2. BYO Interface Builder. A snap to use.
  3. WAFE . Send text string from anywhere (C language, Emacs, shell) to
     a server and have the graphics done for you.
  4. BOS - An object oriented extension for Tcl which also has some
     widgets added to it.

File:  Node: String Handling, Prev: Graphics, Up: Top, Next: Process Control

String Handling

Emacs Lisp
Strong. Many good string handling functions for operation on buffers as
well as string. Search replace backward and forward with regexps. Many
good string handling functions are found in tree-dired.el in gmhist*.el.
As well as in ange-ftp.el.

Well, its a language optimized for this so it is good, but in some cases
the lack of complex data structures is a problem. For example, even
though Perl is becoming the tool of choice among system administrators,
Tom Christiansen, an expert Perl programmer makes note of how the lack
of complex data structures in Perl made a program to format the output
of du in a tree format exceedingly difficult. This same program was done
in Python in 50 lines.

It has a string module and regexp module. It has all the string
*search* capabilities of Emacs, but since strings are immutable in
Python, it understandably does not have Emacs Lisp's string replace power.

Everything in Tcl is a string. It is very easy to map certain
string-intensive applications to Tcl. For example, I wrote a program to
do parallel library database searches in Tcl in about two weeks. Ranking
the 4 languages in terms of how easy it would have been: Tcl, Python,
Emacs, and I cant say about Perl because I gave up on Perl quickly after
buying the book and seeing all those registers and the confusing
context-intensive syntax.

File:  Node: Process Control, Prev: String Handling, Up: Top, Next: Extensions

Process Control

Emacs Lisp
Has specialized modes for controlling Common and other lisps to
facilitate debugging, execution, and programming. Has shell modes with
command history. Has an excellent ftp program (ange-ftp). Can
asynchronously or synchronously call the shell and store the output in a
buffer or string. Can filter output from a process. However, the
filtering is somewhat hairy because you cannot be sure of the packet
size that the data will arrive in. In other words, it is easy to open a
pipe with Perl/Python/Tcl and just read lines at a time but you have to
write an accumulator function to do this in Emacs Lisp. However, the
interactor mode for GNU Smalltalk has an excellent accumulator function
that you could use in your own code.

---- .. I dont know

You would use pipes to do this in Python. It would be as easy as Emacs,
however, so much is already written for Emacs. Python is a young
language with far less supporters.

Even stronger than Emacs. A package by Don Libes called Expect allows
the programmer to specify a set of expected regexps from the process and
what to do upon the receipt of the process output. Several of his papers
including Expect: Programs for Controlling Interactive Processes are
available in postscript format for anonymous ftp from durer.cme.nist.giv
in pub/expect.

File:  Node: Extensions, Prev: Process Control, Up: Top, Next: Documentation


An important feature of these languages is how much is already there for
you to use.

Emacs Lisp
Emacs is light years ahead of any of these other languages in this respect.
  1. 4 mail readers (rmail, vm, mh-e, elm interface)
  2. 2 Usenet news readers (gnus, rnews+)
  3. Ange-FTP -- An excellent ftp utility which allows transparent
     file access/modification with the ease of a few keystrokes.
  4. Countless interfaces for everything from Archie to MUD.
  5. AUC-TeX allows you to do anything you would want to do with
     TeX/LaTeX from an Emacs buffer quickly and easily.
  6. Calc is a poor man's Mathematica
  7. VIP -- vi emulation for emacs
  8. Calendar/Diary -- calendar manager within Emacs
  9. Tree Dired -- better directory editor for Emacs
 10. Hyperbole -- extensible hypertext management system within Emacs
 11. Ispell -- spell checker in C with interface for Emacs
 12. Patch -- program to apply "diffs" for updating files

Emacs' use of switchable modes allows for easy creation of new packages
with their own set of keyboard macros or they can simply use a
predefined mode.

  1. chat2pl --

  1. ?? -- Multimedia interface.
  2. ?? -- Remote Procedure Call de{*filter*}
  3. texfix -- Crude convert{*filter*}to texinfo
  4. throughput -- measure tcp throughput
  5. dutree -- format du(1) output at a tree sorted by size
  6. findlinks -- recursively find links to a given path prefix
  7. lpwatch -- watch BSD line printer queues
  8. suff -- sort a list of files by suffix

  1. Basic Object System -- adds object oriented capabilities to Tcl. It is
     not class-based but prototype-based whatever that means.
  2. CD Rom Interface
  3. MXEdit -- Text editor
  4. tclTCP/rawTCP -- tcp/ip for tcl remote procedure calls and connect
  5. VOGLE -- awesome full-color 3-D rendering package with a ton of
     fonts, both american and foreign.

* Menu:

* Documentation::
* Top::

File:  Node: Documentation, Prev: Extensions, Up: Top, Next: Ease of Use


Emacs Lisp
Excellent. Both for using Emacs and programming Emacs Lisp.

Excellent. A book is out by Larry Wall called Programming in Perl. The
50-page man page is not bad.

Good. Covers everything but how to extend Python through C.

Good. The author of Tcl, John Ousterhout, will mail you the manual

File:  Node: Ease of Use, Prev: Documentation, Up: Top, Next: Extensibility

Ease of Use

Emacs Lisp
The best. Has a de{*filter*}. Since you are in Emacs, you can immediately
test whatever you are writing. Documentation on every function and
variable in memory is available in 2 keypresses. The tags system allows
you to jump to functions and global variable declarations without
knowing which file they are in.

Ok. There is a Perl mode for Emacs.

Good. You can send a buffer to a python interpreter by using Emacs.

Ok. The language itself is straightforward. There is a tcl mode for
Emacs but nothing written to
allow you to send a buffer of code to the tcl interpreter. Development
is still pretty fast.

File:  Node: Extensibility, Prev: Ease of Use, Up: Top, Next: Test Suite


Emacs Lisp
Writing new lisp functions is only feasible by using the
already-available lisp functions. To write new lisp functions in C would mean
re-compiling Emacs every time.

Very difficult.

Its possible in Python and C. How to do it in C is not well documented.

Its possible in Tcl and well-docuemented and has been down well by many
people in C.

File:  Node: Test Suite, Prev: Top, Up: Top, Next: Top

Test Suite

Emacs Lisp
Well, if you compile Emacs then Emacs Lisp will run. This is
irrelevant criteria for Emacs Lisp.

Assorted programs here and there.

Exhaustive test suite

Exhaustive test suite

terrence brannon

Wed, 21 Dec 1994 02:01:20 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Posting: Survey of Tcl, Perl, Python, Emacs Lisp

2. Modern langauges

3. Advert: PostDoc Fellowship in Concurrent Functional Langauges

4. Modern langauges

5. Scripting Langauges

6. Scripting Langauges

7. Langauges written from right to left

8. computers: programming: langauges: lisp?

9. Posting guidelines -- bi-weekly posting

10. Posting guidelines -- bi-weekly posting

11. Posting guidelines -- bi-weekly posting


Powered by phpBB® Forum Software