Developer.com Logo Click here to support our advertisers
Click here to support our advertisers
SHOPPING
JOB BANK
CLASSIFIEDS
DIRECTORIES
REFERENCE
Online Library
LEARNING CENTER
JOURNAL
NEWS CENTRAL
DOWNLOADS
COMMUNITY
CALENDAR
ABOUT US

Journal:

Get the weekly email highlights from the most popular journal for developers!
Current issue
developer.com
developerdirect.com
htmlgoodies.com
javagoodies.com
jars.com
intranetjournal.com
javascripts.com

All Categories : Linux

developer.com - Reference
Developer.com Logo Click here to support our advertisers
Click here to support our advertisers
SHOPPING
JOB BANK
CLASSIFIEDS
DIRECTORIES
REFERENCE
Online Library
LEARNING CENTER
JOURNAL
NEWS CENTRAL
DOWNLOADS
COMMUNITY
CALENDAR
ABOUT US

Journal:

Get the weekly email highlights from the most popular journal for developers!
Current issue
developer.com
developerdirect.com
htmlgoodies.com
javagoodies.com
jars.com
intranetjournal.com
javascripts.com

Linux


- 31 -

Other Compilers

by Kamran Husain

IN THIS CHAPTER

  • Ada

  • FORTRAN

  • Digital Signal Processing

  • Modula-3

  • OGI

  • Eiffel

  • COBOL

  • LISP

  • Scheme

  • REXX


This chapter gives you a brief introduction to some languages other than those that have been assigned whole chapters in this book. You will learn details about the following languages and how to get packages for them:

  • Ada

  • FORTRAN

  • Digital Signal Processing

  • Modula-3

  • OGI

  • Eiffel

  • COBOL

  • LISP

  • Scheme

  • REXX

All the packages here have accompanying documentation and "how-to-use" instructions for them.

The list of programming languages covered here is not complete. As Linux becomes more and more acceptable in the programming community, you will see more languages being ported to Linux.

Ada

The Ada programming language was named after Ms. Ada Lovelace, a member of the original Ada software development team. Ada is the choice of many real-time system software developers and has been enhanced significantly for this purpose. Needless to say, some greatly enthusiastic individuals have ported this language over to Linux. The Ada package is referred to as the GNAT (for GNu Ada Translator). The authors therefore appropriately belong to the GNAT project at New York University.

The latest update at the time of this writing was in September 1994. The Ada83 and Ada90 standards of the Ada language are covered in this release. The Ada for Linux package comes in the following files:

  • gcc-drv-2.4.5.tar.gz

  • gnat-1.83-bin-disk1.tar.gz

  • gnat-1.83-bin-disk2.tar.gz

  • gnat-2.0-linux-1.tar.gz

  • gnat-2.0-linux-2.tar.gz

  • gnat-2.0-linux-bin.tgz

  • gnat-2.0-linux-lib.tgz

  • gnat-2.0-linux.lsm

  • gnat-1.83.lsm

For more information, you can contact the support folks via e-mail at gnat-request@cs.nyu.edu. The FTP site at tsx-11.mit.edu has the latest information and release of this software in the directory /pub/linux/packages/Ada.

To compile the source files, you need gcc 2.6.0 or higher. The compiler can be found in the gnat-2.0.tar file. Altogether, this package chews up about 5MB of your hard disk space.

FORTRAN

The FORTRAN programming language is also ported to Linux. Only versions up to FORTRAN 77 have been ported over. There are only commercial ports of FORTRAN 90 as of this publication. The package in the tsx-11.mit.edu archives under the /pub/linux/packages/fortran directory contains the following files:

  • ftnchek-2.7.lsm

  • ftnchek-2.7.tgz

  • libf2c-0.9.lsm

  • libf2c-0.9.tar.gz

  • mpfun-1.0.lsm

  • mpfun-1.0.tar.gz

  • toolpack-1.2.lsm

  • toolpack-1.2.tar.gz

For a more up-to-date description of the files, check the INDEX file in the same directory as the above files. The libf2c-0.9.tar.gz file contains the functions for converting FORTRAN code to C. Actually, the program f2c does a pretty decent job on all my class assignments at the university. The output is not idiot-proof, but it does the major portion of the job of translation.

The toolpack files are tools for FORTRAN programmers. Functions include printing aids for clean output listings and some sort of lint checker. Tools in this package include those for portability testing and dynamic programming analysis. All the script files in the toolpack are written for the C shell, so you will need to have the tcsh program installed on your system.

You will use at least 5-10MB of your disk space depending on which package you install.

The mpfun package is a multiple precision (FORTRAN MP) library and translator. This package performs multiprecision floating-point arithmetic with up to 16 million decimal digits, using advanced, recent algorithms and automatic translation from FORTRAN 77 code to FORTRAN multiprocessor code. The translation is done via directives within comment fields.

Digital Signal Processing

The ObjectProDSP package is an X Window system, object-oriented tool for Digital Signal Processing design development and implementation. The package contains the basics for building interactive scientific and engineering applications. The package was developed by Paul P. Budnik, Jr. (mtnmath@mtnmath.com). The amount of disk space required is about 5MB. You can get it from tsx-11.mit.edu archives in the /pub/linux/packages/dsp directory.

Modula-3

The Modula-3 language is available from Digital Equipment Corporation's research center SRC. Modula-3 is an object-oriented language designed for multiprocess, distributed application development. Modula-3 resembles PASCAL in many ways but is more suited for building large applications.

The key features of the Modula-3 package include a full-blown GUI interface, runtime typing, support for multithreaded applications, garbage collection, and exception handling. The garbage collection and storage reallocation features of the language are of keen interest to object-oriented programmers. After all, who frees an object--the portion of the code that created it, or the portion to which the object was passed? The garbage collector for removing a large number of these problems is built into the language.

Modula-3 uses threads to process its incoming messages. Unlike other X-based applications, where one event queue has to be managed between several listening applications, Modula-3 allows the invocation of threads to perform message handling. A good example of the usage of this feature is the Trestle package--the interface package to X. With Trestle you can create threads to run in the background while you're doing other processing.

You can get Modula-3 from the Internet from the FTP site at gatekeeper.dec.com: /pub/DEC/Modula-3/release-3.5.3. Prebuilt binaries exist in ftp.vlsi.polymtl.ca:/pub/m3/binaries/LINUX/m3-3.4. There is a home page on the Web at http://www.research.digital.com/SRC/.

OGI

The OGI Speech Tools Version 1.0.1 for Linux are speech data manipulation research tools. These tools are primarily used for signal manipulation, phonetic, phonemic, and word analysis. This package has the capability to build audio databases that can be used to train neural networks. The OGI speech tools were developed at the Center for Spoken Language Understanding (CSLU-OGI). You can get more information about them from tools@cse.ogi.edu.

The FTP site for this package is sunsite.unc.edu in the file /pub/Linux/apps/sound/ogi-speech.tar.gz or in tsx-11.mit.edu in the directory /pub/linux/packages/ogi.

You need some sort of sound card that is capable of digitizing sound under Linux. A good package for digitizing sound would be the Sox package.

In order to compile the package, you need the following X libraries (or later versions): libXaw.so.3.1, libXt.so.3.1, libX11.so.3.1, libc.so.4.4.4, and libm.so.4.4.4.

If you are into computational linguistics or are interested in speech compression, recognition, or applications of neural networks, this is one great research package to check out. The documentation in this package consists of man pages and TeX source. Check ogi-doc-PS.tar.gz for TeX documentation in Postscript format. For the document in DVI format, try using the file ogi-doc-dvi.tar.gz.

Eiffel

Eiffel is a nonproprietary object-oriented language developed by Dr. Bertrand Meyer and his colleagues. An excellent reference book for Eiffel is Dr. Meyer's book Object-Oriented Software Construction, Prentice Hall, 1988. In 1994, Dr. Meyer's company ported Eiffel to Linux.

The most advertised feature of Eiffel is its capability to reuse code without modifications. In conventional C++ and some other object-oriented languages, code reuse is still in its infancy. Eiffel is a new language primarily written with reuse in mind. Polymorphism, garbage collection, dynamic binding, multiple inheritance, and templates are built into the language. Even so, Eiffel code is interoperable with C and C++.

The design of Eiffel has been placed in the public domain. The Eiffel trademark is owned by the Nonprofit International Consortium for Eiffel (NICE). You should really have no fear using this trademark because NICE is quite nice about using the Eiffel trademark. The official language description is Eiffel: The Language, by Dr. Meyers, Prentice Hall, 1992. The formal syntax is included in the 600-plus page book along with examples, source code, and application guidelines.

Tower Technologies Corporation is promoting its commercial release of Eiffel, called TowerEiffel. Visit the Web site at http://www.cm.cf.ac.uk/Tower. This site is a bit slow to get access to at times.

COBOL

Though not the preferred choice of "real" systems programmers, COBOL is a very widely used language in the business community. Naturally, there are ports to Linux in this database- oriented language. A good commercial port worth looking into is the ACUCOBOL-85 port by the Acucobol, Inc., company. Check the Web site at www.acucobol.com for more information about COBOL.

The ACUCOBOL-85 version of COBOL offers programmable hot keys, advanced windows capabilities (not X), its own file system, and a source-level debugger. Acucobol, Inc., also offers more than 600 tools to work with the Linux compiler. The COBOL code on Linux is portable to other platforms running COBOL-85.

LISP

LISP stands for LISt Processing. LISP was developed around 1958 and has been used in all areas of computer science research (for example, in artificial intelligence), as well as being the basis for products, such as emacs and AutoCAD. (Actually, AutoCAD uses AutoLISP, an enhanced version of LISP.)

The Common LISP language interpreter and compiler (clisp) package is in the Slackware Linux distribution. As the name suggests, the package contains both an interpreter and a compiler for generating machine-executable code. Invoked without arguments, clisp executes a read-eval-print loop, in which expressions are read from standard input, evaluated by the LISP interpreter, and their results output to standard output. When invoked with the -c option, the specified LISP files are compiled to a machine-readable code that can be executed more efficiently.

To get more information about the clisp package, type clisp -h at the prompt. If you are short of RAM on your machine, specify the amount of memory that clisp will use with the -m XXXK option, where XXX is the amount of memory to use in kilobytes. The clisp package has support for three languages: English, German, and French.

If you are an emacs user, you will want to use the -I option to make clisp ILISP compatible. ILISP is the LISP interface for the emacs editor.

The language implemented conforms to the book by Guy L. Steele Jr., Common LISP--The Language, Digital Press, First Edition, 1984.

Scheme

Another language closely related to LISP is the Scheme language. A Scheme programmer has at his or her disposal the power of C and LISP. Scheme allows free data-typing of variables by offering lists, arrays of lists, associative lists, and arrays, in addition to the numeric and string data types.

Scheme, like clisp, is available in compiled or interpreted form. You can create output files from Scheme using two of three types of options: fast, cheap, and algorithmically correct. The fast option produces a large executable, the "correct" version has more error checking, and the cheap version produces a smaller, though (maybe) slower version of the program.

The interpreted environment produces a rapid development front end because there is no edit-compile-run cycle. You simply edit what you have changed and reexecute, just like in LISP.

Several versions of Scheme are available on various sites on the Internet:

  • bigloo-bin.tar.gz: The Bigloo version, which is the de facto standard for Scheme

  • bigloo-ELF-bin.tar.gz: The ELF version of the Bigloo version

  • scheme2c-bin.tar.gz: The Scheme to C converter libraries for converting Scheme code to C code

  • scm-bin.tar.gz and The SCM package by Aubrey Jaffer (jaffer@ai.mit.edu) slib.tar.gz: contains sockets, I/O, POSIX interfaces, and a curses screen-management library

  • stk-bin.tar.gz: The Tk compatible library

REXX

IBM has released a port of its version of the object-oriented language REXX. The REXX language is a scripting language available on most IBM platforms and is now ported to Windows. Object REXX extends the standard REXX language with classes, objects, and methods. It also supports messaging, polymorphism, and multiple inheritance. Object REXX is a trademark of IBM.

Check out the IBM Web site at http://www.ibm.com for more information.

Summary

The number of languages and software packages available for Linux continues to grow with Linux's popularity. This chapter has given you a snapshot of some of the languages available for Linux. Time and space have limited us to introducing in detail only a few of the more common languages, such as C, C++, Smalltalk, and so on. There are, however, many more languages which may be ideal for your project. It might be worth your while to check out some of these languages and get that ideal fit. Ruler image
Contact
reference@developer.com with questions or comments.
Copyright 1998 EarthWeb Inc., All rights reserved.
PLEASE READ THE ACCEPTABLE USAGE STATEMENT.
Copyright 1998 Macmillan Computer Publishing. All rights reserved.

Click here for more info

Click here for more info