An Alphabet of Computer Languages: Dylan
by Gary L. Ratliff, Sr. (eronstuc)
In 1992, Apple Computers had a group of engineers working in Cambridge whose main task was to develop a new language for use on the Apple Newton PDA. The name of the language was Dylan (pronounced dill-un), and its meaning was dynamic language. Originally, the syntax of the language was based on Lisp. However, over time the infix notation of more conventional languages was adopted. The language project was abandoned by Apple in 1995 and the only useful feature was that a system of this language will function on a Macintosh on the 68k older operating system.
The language was also worked on at Carnegie Mellon University and Harlequin, as they inherited the abandoned code. Later, when the Harlequin firm ceased to want the project, the code rights were acquired by the engineers working on the project. Soon, both of these projects became open source. A version is available for X-86 Linux from http://www.opendylan.org/downloading.phtml. From here, click the link to download 1.0 beta 5, and then request the file: opendylan-1.0beta5-x86-linux.tar.bz2. At this same setup, you will see an exe version for Windows and another tar.bz2 file for the 64 bit Linux architecture. The program should appear on your desktop shortly.
Setting up to use the system
Now the package must be uncompressed and then extracted from the tarball. Some of these steps may be done by root, and some must be done by the user. Therefore, the steps performed by root will have # while those which must be done by the user will be indicated by $.
$ bunzip2 opendylan-1.0beta5-x86.linux.tar.bz2 $ su <enter root password> # mv opendylan-1.0beta5-x86.linux.tar /usr/local/ # cd /usr/local # tar -xvf opendylan-1.0beta5-x86.linux.tar # cd /home/<username> # exit $ export PATH=/usr/local/opendylan-1.0beta5/bin:$PATH $ opendylan -build hello-world cd Open-Dylan/bin ./hello-world
Your screen should now contain the the text message: "Hello there!" The process was to unzip the archive and become root to have it placed into the default location: /user/local/opendylan.... From this location the programs may be constructed, and all the proper libraries and functions found by the language system. Now you return and become the normal user. Then you set it so that the path to the Dylan compiler is established. Now here you may wish to issue a history command and note what the number of the command to export the environment is, as this will not be kept on a permanent basis. On my main system, the history shows this to be 171. So if issuing the command: "Echo $PATH" shows that you are not attached to the compiler, a simple !171 will restore the path for you.
When the compiler is set up, issuing the -build command will compile the system for you. I saved the compiler output into a text file and this runs just over 38k. It seems that every one's first program in a new language is the hello world app. Last month we discussed the C/C++ languages. These would be compiled with:
gcc -o hello helloworld.c g++ -o hello helloword.cpp
These would compile the respective C or C++ versions of the hello world programs which are given below:
c version #include <stdio.h> int main() { printf("Hello World\n"); return(0); }
c++ version #include <iostream> using namespace std; int main(int argc, char *arg[v]) { cout << "Hello World" << endl; return(0); }
Now to compare the amount of memory taken by the compiled applications: The C language program required 6751 bytes; the C++ program required 8368 bytes; and the Dylan application took 9870 bytes.
Learning to Use Dylan
The site mentioned for obtaining the 1.0beta5 release of Dylan will also be able to allow you to find several books for you to read to learn the features of the Dylan language. There is a reference manual for the language, and also a tutorial on using the language. They are on the website and they are navigated much in the same way as the text of APL: An Interactive Approach. The applications which may be built are found in the /usr/local/opendylan..../source/app directory. Under this, you will find a directory for hello-world, dylan-playground, djam, and several other systems. By examining the files, you will see how a Dylan system is setup. Unfortunately, the gtk+-2.0 program does not seem to be in the repository for PCLinuxOS at the present. And most of the applications will want a GUI interface. The material suggests that the DUIM system has been implemented for Windows. However, when the exe version was downlaoded and installed on my Windows XP system, which required 389 MB for a full installation, not a single app could function. All reported a missing "tr" program. From reading the material, it seems as if a DUIM for the Linux version is under development. I know that there is GNOME version of PCLinuxOS, but I do not have this installed on my system.
The goals envisioned by Apple for this new language were noble. There is still some effort by opendylan.org to create a fully functional system, but for now it is not able to be of much use.