From: asd@sage.cc.purdue.edu (Kareth)
Newsgroups: comp.sys.next.misc,comp.sys.next.programmer
Subject: NEW language list, with 100% more than the FAQ sheet!
Date: 7 Sep 92 06:11:25 GMT
Organization: Purdue University

This is basically a summary of my query for languages that people were
using on their NeXTs.  After a week of searching for and trying to
compile tons of different things, I'm done (at least to my
satisfaction).

Anyways, this is a new language list, a more complete one, of
languages available for the NeXT.  Hopefully, if I don't have to
rewrite this much from mistakes, I'll try and get it to be used as the
new FAQ sheet for languages.

A number of these I can not really fully check out because I have no
working knowledge of the language.  I just tested those to see if they
compiled, and didn't immediately crash upon invocation.  So, all the
programs in this list do, apparently, work., or at least load.  More
testing is need to confirm those that I couldn't test out.

Also everything in this list is Public Domain, unless otherwise
denoted by company names that you have to get it from (ADA, CraftMan,
Eiffel, etc).

Several of languages explictily support NeXTs.  Denoted by "NeXT support".

Some of  the descriptions have been stolen from FAQ.languages.

Disclaimer: This list is NOT intended to be a full list of what
languages work or are supported for the NeXT.  These are just the
languages I could find, or was told about.  I would love to find out
if the ones that I said I couldn't test actually do or don't work on
the NeXT.  And I wouldn't mind finding out about other languages that
folks might be using, that I don't have listed, like Modula, PL/I,
COBOL, etc.  I have tried to be as accurate as possible with the
information, and supply hosts for where the source could be found, and
directories where they could be found, however I can't guarantee that
I've not made mistakes, ommissions, or supplied just downright bogus
information.

Here's the brief summary of what's include:

Ada, APL/J, BASIC, C++, CraftMan, Eiffel & Sather, Forth, FORTRAN, FP,
gawk, ICON, Intercal, Lisps (ACL, AKCL, Elk, Scheme, Xlisp), Logo,
ML(CAML, SML), Pascal, PCN, Perl, Prolog, and TCL.

also for those who consider these as languages:

SHELLS - ksh, bash, zsh, rc
and also gawk and perl

Some that *maybe* should be included, but I did not are:  C, Objective
C, PostScript, and Mathematica.  This list is more of "What else can
I work with on a NeXT?" list, accounting for the first 3, and
Mathematica I consider more of a software package, than a language.

Anyways, here it is!


**** ADA

At NeXT Fed-Expo Meridian Software demonstrated a NeXT Ada compiler.

	Meridian Software
	Voice: (800)221-2522
	FAX: (714)727-3583


**** APL / J	- NeXT support

There is no strict APL compiler/interpreter that I could find.  J
however is the successor to APL, and sources for that CAN be found.
Current version is 5.1.

obtained from watserv1.waterloo.edu
languages/apl/j


**** BASIC

This basic is called Chipmunk Basic.  It's fairly lame, interpreted,
and looks somewhat like Applesoft BASIC.  It is included in the
p2c-1.20 distribution.  It compiles up and seems to work fairly well.
I've not tested it out except for a few basic functions.  Give it a
whirl if you need to have BASIC.  Oh, you do need to compile p2c in
order to compile the basic program.  Read the information about p2c
below.

p2c, David Gillespie's Pascal to C translator, can be
obtained from csvax.cs.caltech.edu in
pub/p2c-1.20.tar.Z


**** C++

C++ shipped with the NeXT 2.0 is actually: NeXT Release 2.0 (v31.1) --
GNU version 1.36.4 (based on GCC 1.36) libg++ is not provided, you
need to compile it (GNU software is available from prep.ai.mit.edu).

Two things to note about the C++ on NeXT.  Any C include files have to
be specified as below:

	extern "C"
	{
	#include <libc.h>
	#include <stdio.h>
	#include <stdlib.h>
	#include <math.h>
	}

This tells that the code is C, so you won't have problems with the
standard libraries thinking your program is Objective C.

Also the /usr/include/stdio.h in line 75 has a variable "new" that
conflicts with a g++ keyword. You can redefine it using

	#define new __new__
	#include "stdio.h"
	#undef new

After the above two fixes, g++ programs that do not use the g++ class
library (and therefore do not need libg++ to be available) work.


**** CRAFTMAN

CraftMan, from what I gather, is a scripting language that allows one
to use lots of graphical interface objects.  It probably could be
called the HyperCard for NeXT.  There is a demo of it sitting on
sonata.cc.purdue.edu I do believe.

obtained from:
	Xanthus International AB
	Kungstensgatan 14
	S-113 57 Stockholm, Sweden
	46-8-612-89-95
or possibly from NeXTconnection by now


**** EIFFEL & SATHER	- NeXT support

Of the various response I got back about my questions on what
programming languages folks were using, Eiffel by far was the #1
mentioned.  Eiffel is supposedly a fairly powerful Object Oriented
language, which is, as one person put it, "the best commercially
available OOP language bar none"!  Similar claims seem to be popping
up about their next (not NeXT) revision of the software and it's
development environment.  Various claims about it being as good as
NeXT's Interface Builder.

A port of the Eiffel language and development environment is available
for the NeXT.  A new version of Eiffel is in the works and is new
version sounds like it's going to be extremely nice.  The company is:

	Interactive Software Engineering, Inc.
	Voice: (805)685-1006
	FAX: (805)685-6869
	eiffel@eiffel.com

The port is for Eiffel version 2.3 and includes their standard class
libraries as well as some additional NeXT-specific classes and
facilities for integration with the Interface Builder.  This may not
be the latest version out though.

A free Eiffel-like language called Sather is also available.  Sather
is a subset of Eiffel, eliminating some of the complexity, and
simplifing it.  Sather code is supposed to be very quick, and has NeXT
support.

Sather is obtained from icsi-ftp.berkeley.edu 


**** FORTH	- unable to test

A PD-implementation of a figFORTH interpreter is available.  It
compiles, and seems to run.  It claims to be mostly true to the
implementation of figFORTH.  As I don't know the language, I was
unable to test it out.

obtained from wuarchive.wustl.edu
mirrors2/unix-c/languages/c-forth.tar-z


**** FORTRAN

There is a Fortran to C translator called f2c available.  There is a
current version of it avaible on the archives.

obtained from sonata.cc.purdue.edu
 
There are also commercially available Fortrans.  I've heard not so
great comments about these programs, their speed, and their high
costs.

	Absoft (313) 853-0095
	Diab Data (415) 571-1700
	

**** FP		- unable to test

FP is a Functional Programming language.  There were actually two
programs that I found, both which compiled.  One was an interpreter,
and the other is a FP->C converter.  The FP interpreter did not seem
to function, although I might have gone about it all wrong.  The FPC
converter however did generate C code that I could compile.  However
not understanding what any of the examples did, I had no clue as how
to test the resultant binaries.

obtained from any Usenet archive
comp.sources.unix/Volume20: fpc translates FP programs to C.
comp.sources.unix/volume13: FP by Andy Valencia


**** GAWK

Gawk, as with all FSF GNU software is available in source form from
prep.ai.mit.edu

Gawk is the Gnu version of Awk.  Like most of the other GNU programs
Gawk has more features than does awk.  Indeed, the NeXT awk is a very
old version of awk with many missing features of the newer versions.
Further unlike the wretched man page for awk that comes with the Next,
Gawk comes with a 140 page manual/tutorial.

Gawk is a text processing language.  In this respect it is similar to
sed.  However Gawk adds to sed conditional execution (if) subroutines,
and the ability to execute a block of instructions before and after
the file itself is processed.

gawk is not the only public-code awk.  Mawk version 1.1, published
through comp.sources.reviewed in February, 1992, by Mike Brennan
<brennan@boeing.com>, should be mentioned as an alternative.

References for Gawk/awk:
	Sed & Awk, Dale Dougherty,  
	O'Reilly & Associates

	The Awk Programming Language
	Alfred V. Aho, Brian W. Kernighan, &
	Peter J. Weinberger
	Addison-Wesley Publishing Co.
	ISBN 0-201-07981-X


**** ICON	

ICON is special purpose language, resembling PASCAL, which special
string scanning features.  The only things I've seen it used for were
indexing a large file and providing a lookup for the file, sorta like
a command line Librarian.  Although it looks a lot like PASCAL, it is
not PASCAL.

obtained from cs.arizona.edu


**** INTERCAL

Probably THE single grossest language invented, other than working in
binary!  The only thing I can think of using Intercal for is making
really disgusting source code for very simple programs.  I only
include this because I know someone out there told me he was using it.

obtained from ftp.white.toronto.edu


**** LISPs	- some NeXT support

There are many forms of LISPs available, either of the Scheme (Elk,
Scheme) variety or the Common Lisp (akcl/kcl/pcl, ACL) variety.

AKCL/KCL/PCL are all sorta one and the same, at least the version
available for the NeXT.  A version of akcl-619 is available for the
NeXTs.  It is basically kcl (Kyoto Common Lisp), with the akcl
extensions, plus the CLOS (Common Lisp Object System) all patched up
into one binary.

obtained from sonata.cc.purdue.edu
pub/next/submissions/akcl-615-pcl-image.tar.Z
pub/next/2.0-release/AKCL-1-599* (this version I don't know
				  if it has the CLOS stuff included)

ACL is Franz Inc's Allegro Common Lisp, which used to be bundled with
NeXTs.  ACL obtained from:
	Franz Inc.
	1995 University Avenue
	Berkeley, CA 94704
	Voice: (510) 548-3600,
	FAX: (510) 548-8252
	email info@franz.com. 

ELK is a Scheme interpreter with NeXT support.  I don' t know if it's
a subset, or a superset of the actual Scheme.

obtained from export.lcs.mit.edu
contrib/elk-1.5a.tar.Z

The MIT Scheme with NeXT support is also available, pre-compiled and
ready to run.

obtained from altdorf.ai.mit.edu
archive/scheme-7.1

There is also a Scheme->C converter which works.

schemetoc obtained from sonata.cc.purdue.edu

There is also Xlisp.  I don't know if it's a Common or a Scheme type
lisp.  Some changes are needed to make it work, according to the last
FAQ notes.

obtained from bikini.cis.ufl.edu

changes:
	in unixstuf.c:
		#define BSD
	in function init_tty:
		declare extern char xltoplevel()
	in function read_keybd:
		change     char buf[1]   to   char buf[100]
		change     sizeof(buf)   to   sizeof(char)


**** LOGO	- NeXT support

There is a NeXT version of Logo available currently.  It is based on
the a UNIX Logo that is out there.  Read the instructions.  Installing
it is a little tricky since there are various libraries that it can
only find in certain directories, or via what it reads from defaults
database.  It can be recompiled so it will look in certain places for
the libraries.  Look in logo.h for three #defines: LIBLOGO, DOCLOGO,
HELPFILE.  Changing these will allow you to setup a app wrapper, and
put all the files in it.

obtained from cs.orst.edu


**** ML		- NeXT support

ML stands for MetaLanguage, and from what little I was taught about it
in a class long time ago, it's object oriented in at least the sense
that it has operator overloading.  Beyond that I don't know much about
it.  There are two versions, CAML-light which is a subset of CAML, and
Standard ML of New Jersey which run on the NeXT.

CAML-light obtained from sonata.cc.purdue.edu, or cs.orst.edu

SML/NJ obtained from research.att.com or princeton.edu


**** PASCAL

p2c is David Gillespie's Pascal to C translator.  It translates many
dialects of Pascal including Turbo, VAX, Sun/Berkeley.

obtained from csvax.cs.caltech.edu
pub/p2c-1.20.tar.Z.

But there is a very serious problem in that %g and %lg are used to
read reals in the translated code, and these formats are not supported
by NeXT in scanf.

Gillespie maintains that this is a bug in NeXT's compiler.  A fix is
to make the following change in funcs.c:

[Old code]
	case TK_REAL:
	if (var->val.type == tp_longreal)
		ex = makeexpr_string("%lg");
	else
		ex = makeexpr_string("%g");
	break;

[New code]
	case TK_REAL:
	if (var->val.type == tp_longreal)
		ex = makeexpr_string("%lf");
	else
		ex = makeexpr_string("%f");
 	break;
   
Here is a very disturbing example.  %lg gives garbage, and %lf even
gives garbage when it follows %lg:

	ariel% more test.c
	main()
	{
	double x, y, z;
	scanf("%lf%lg%lf%*[^\n]", &x, &y, &z);
	getchar();
	printf("% .5E  % .5E  % .5E\n", x, y, z);
	}

	ariel% cc test.c
	ariel% a.out
	3.14 3.14 3.14
	3.14000E+00   6.36599E-314   1.40000E-01
	ariel% 

[this seems to be a good task for a compiler wizard to look at...
-pasc]


**** PCN

PCN (Program Composition Notation) is available on the NeXT.  PCN is a
portable parallel programming language that is being developed here at
Argonne and at Caltech.  It runs on a wide variety of workstations
(including NeXTs), networks of workstations (i.e., use your network of
workstations as a parallel computer), shared memory multiprocessors
(i.e., Sequent Symmetry), and distributed memory multiprocessors
(i.e., Intel iPSC/860 and Touchstone Delta).  It has been, (and still
is being) used (in conjunction with C and Fortran) to develop a number
of large scientific applications, including climate modelling,
computational fluid dynamics, computational chemistry, computational
biology, etc.

obtained from info.mcs.anl.gov
pub/pcn


**** PERL

Take most of the features of C, csh, awk, and add a sprinking from
sed, and you get Perl.

Practical Extraction & Reporting Language.  Perl is very much of a
kitchen sink language, in that it has almost all the features of
everything.  This results in it being easy to write programs in perl
(because all your favorite constructs are there) but difficult to read
perl. (Because other people have used their favorite constructs, not
yours)

Perl's strength is in scripting.  Anything that would take more than
20 lines in a csh script is a candidate.  Anything that isn't a
straight pass through, chew on each line, program for awk is a
candidate.

Perl is available from:
	jpl-devvax.jpl.nasa.gov		128.148.1.143
	tut.cis.ohio-state.edu		128.146.8.60
	uunet.uu.net				192.48.96.2

While Perl does come with a 70 page man-book, an easier way to learn
the language is from "Programming Perl" Larry Wall & Randal Schwartz.
	O'Reilly & Associates
	632 Petaluma Ave
	Sebastopol CA 95472
	Voice: 800-338-6887
	Voice: (707) 829-0515
	uunet!ora!nuts.
	

**** PROLOG	- NeXT support

There are a number of Prolog's out there.  A Prolog that's supposed to
work with Elk (but didn't), Stony Brook Prolog, C-Prolog (not PD), and
a few others.  There is a file on the archives, c-prolog.Z (?), that
lists changes that can be made to various Prolog's to get them to
work, but I think that document was made in the 1.0 days, and it sure
didn't work for me.  There was only one that I found that did indeed
work, and that was BinProlog.

obtained from clement.info.umoncton.ca


**** SHELLS

There are a number of shells out there in the world: Bourne shell,
csh, tcsh, Korn shell, bash (the GNU shell), zsh (a csh, sh, ksh
combo), and rc (a ATT plan 9 shell implementation).  Bourne sh, and
csh of course come with the NeXT.  Tcsh, bash, zsh, and rc will work
on the NeXT.  I have them all except tcsh currently.  All of these
shells can be found ither on sonata.cc.purdue.edu, or on various
archives.  (sorry, but just finding everything else has been a bit
much for one just starting his last semester of school)

Korn Shell, which is seeming to becoming the rising star among shells
(I've seen quite a number of KSH books popping up as *required* course
reading for classes here), is unfortunately, NOT PD, coming from ATT
and costing a pretty penny.  There *is* a PD version of KSH floating
around on the archives.  I have never managed to get it to compile on
my NeXT however.

The NeXT version of csh does have emacs line editing features similar
to what ksh has though.  To use those features, just:

	set editmode = emacs


**** TCL

TCL is an embeddable tool command language.  It's pretty slick, but
I've not worked with it much.  To find out more (like current version,
and where it's at), contact:

	John Ousterhout (ouster@sprite.berkeley.edu)

----------

That's it.  I hope this helps anybody who might have been looking for
some of these