Computer Languages From A to Z: Unicon

by Gary L. Ratliff Sr. (eronstuc)

In the March 2010 issue of this magazine, we covered the language Icon and mentioned then that there were some extensions which gave support to OOP and other features. This article will center upon the language Unicon, which was developed by Clint Jeffery. The name Unicon stands for: Unified Extended Dialect of Icon.

I asked Dr. Jeffery two questions: Why did you develop the language Unicon? And, did you work with Dr. Griswold (the developer of Icon) in the creation of the language? On August 10, of 2010 I received this reply from him in answer to these questions:

Unicon was created because we loved Icon and wanted to be able to use it in large, IO-rich complex modern software systems. "We" started out as Shamin Mohammed and myself, and has included many users, students and internet volunteers over the past decade.

To improve scalability to large programs we made various improvements to the internals of the VM, along with adding classes and packages. We also dramatically improved the scalability of its optimizing compiler, iconc. More recently we are in the process of adding concurrency and improving the interface for calling native (C language) code. To improve IO capabilities, we have added very high level networking, database, and graphics.

I discussed many of our plans with Ralph Griswold, the inventor of Icon, who was my Ph. D advisor. While he was not inclined to write the larger programs that motivate the use of classes and packages, he supported some of their early experimental development. Ralph also supported the first major component of the IO extensions, the 2D graphics that made it into Icon versions 8 and 9. He froze the Icon language prior to his death, and asked us not to call our successor Icon-2, which he felt sounded too close to Icon, but gave his blessing to the name Unicon.

Learning the Unicon Language

The best approach to learning the features and syntax of Unicon would be to read the Unicon book which is mentioned on the home page of the Unicon language: http://unicon.sourceforge.net/book/ub.pdf.

pic

This is a 470 page document, and it offers a thorough introduction to the features of the language. It moves systematically through the features and has full coverage of the language and the Icon libraries in the many appendices in the back of the book.

The book also serves as an introduction to the concepts of software engineering, as well as the use of OOP in developing large software systems.

The following are some examples of the treatment offered by the language to some of the new concepts which this language introduces, which extend the features offered by Icon:

pic

Here are examples of the 3D primitives offered by the language. In the previous Icon article, we presented some examples of the use of 2D graphics, which the language Icon provides. It is highly recommended to become very familiar with the Icon treatment of graphics as covered by the book "Graphics Programming in Icon." Alas, this doesn't seem to be available as a download from the web, but is available from Amazon for a low rate:

pic

The authors of the Unicon text recommend that in order to develop large software systems, one master the language UML. The text presents several examples of this in the development of programs and recommends the book "The Unified Modeling Language User Guide", by Grady Booch, James Rumbaugh, and Ivar Jacobson, which I found was available as a free pdf download:

pic

When downloaded, it will be named Addison Wesley.pdf, and appears in your download directory within in your home directory.

Obtaining Unicon

From the home page of the Unicon language, you will find an area called Unicon Downloads. There is a listing for several operating systems. Now I was able to successfully install the system for my Windows partition, which uses the Windows XP Media Center Edition. This will allow the user to develop and test Unicon programs using an environment available from running ui.exe.

When I followed these instructions for developing a system from source code following these instructions from the README file:

  1. Download the file, which will be a zip file.
  2. Unzip the file
  3. make Configure intel-linux
  4. make Unicon

The steps through item 3 completed successfully. At step 3, you will be instructed to make the Unicon/bin directory part of the path. Then, on step 4 there were two errors reported. Despite this fact, the unzipping will obtain a complete set of Icon programs which are usable, if you followed the instructions for installing a useful Icon system to your PCLinuxOS system. The text covers the Icon program fully in one of the appendixes. You will need to have a functional Windows system so that you may fully explore the features of the Unicon system via that route.

Dr. Jeffery mentioned that he could help users if they were having problems installing the system. As I failed to write any articles during the mourning period after my wife passed away, I no longer have a lead time of close to a year. So I will leave getting this as an exercise for the reader.

After reading the text fully, the Unicon language was found to be an intriguing language and my explorations of the system, albeit conducted from Windows, revealed that the system worked as advertised in the text.