RedHat Linux Free Tutorial

Web based School

Red Hat Linux rhl31

Previous Page TOC Next Page



31


Other Compilers and Languages Ported to Linux


This chapter gives you a brief introduction to some languages other than those that have been assigned whole chapters in this guide. 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

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 enthused 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 March 1996. The Ada95 standard of the Ada language is covered in this release. The Ada for Linux package comes in the following files:

  • gnat-3.03-src.tar.gz

  • gnat-3.03-i486-linux-elf-bin.tar.gz

  • gnat-3.01-linuxaout.tar.gz

  • gnat-3.01-linuxaout.README

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.

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 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 multi-processor 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.eduarchives 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, what 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: tsx-11.mit.edu in the /pub/linux/packages/modula-3 directory.

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, with a neural network trainer (NN) also in the package. 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.

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 guide for Eiffel is Dr. Meyer's guide 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 guide 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.twr.com. 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 http://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 Red Hat 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 guide 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 slib.tar.gz: The SCM package by Aubrey Jaffer(jaffer@ai.mit.edu) contains sockets, I/O, POSIX interfaces, and a curses screen-management library
stk-bin.tar.gz: The Tk compatible library

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 Fortran, LISP, Scheme 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.

Previous Page Page Top TOC Next Page