🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.next.announce
Article #143

NeXT-FAQ.languages: Questions about programming languages on the NeXT

#143
From: Nathan F. Janette
Date: Fri, 13 Nov 1992 20:22
289 lines
9231 bytes
NeXT-FAQ.languages:  Questions about programming languages on the NeXT


*** Subject: L1. What Fortran compilers are available for the NeXT?

There is a fortran to c translator called f2c available via anonymous ftp from
the archives.  Check the sources directory.

Absoft FORTRAN 77 Object Oriented FORTRAN compiler; fully compatible w/
NeXT's Interface Builder toolkit, allows programmers to add a  graphical i/f
to any FORTRAN program. FxP a screen oriented source level debugger designed
by and for FORTRAN programmers. IMSL FORTRAN Libraries  

	313-853-0050

Numerical Algorithms Group (NAG) FORTRAN 90 for NeXT Modern Fortran fully
compliant with ISO/IEC 1539:1991 and ANSI X3.198-1991 standards.  

	(708) 971-2337

OASYS OASYS Native Compilers, OASYS Optimizing 680x0 Cross Compilers, OASYS
Optimizing 88000 Cross Compilers (C, C++, Fortran, Pascal available for
each) Highly optimized Fortran, Pascal.,  C and C++ compilers and cross
compilers.  

	617-862-2002.

Diab Data

	(415) 571-1700

____________________________________________________________________________

*** Subject: L2. What Lisps are there for the NeXT?

Scheme is available from altdorf.ai.mit.edu.  A quick tutorial on how to
install it on the NeXTs is in the works.  Schematik is a NeXT front end app
available on the archive servers.

There is also a commercial Scheme implementation that supposedly conforms to
an IEEE Scheme standard.  

	Cadence Research Systems
	812-333-9269

Xlisp is available from bikini.cis.ufl.edu.  Changes To make it work on the
NeXT:  

	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)

AKCL is available from sonata.cc.purdue.edu.

Scheme->C Compiler is available from sonata.cc.purdue.edu and
gatekeeper.dec.com.

ACL (allegro common lisp) used to be bundled with 1.0, now it is available
directly from: 

	Franz Inc.
	1995 University Avenue
	Berkeley, CA 94704
	Voice: (510) 548-3600,
	FAX: (510) 548-8252
	email info@franz.com. 

____________________________________________________________________________

*** Subject: L3. What Pascal compilers are available for the NeXT?

uvapc/NeXT is an ISO standard Pascal compiler developed by the University of
Virginia's Academic Computing Center and the Department of Computer
Science.  uvapc/NeXT passes the ISO standard Pascal validation suite.  The
compiler is written in C and has been ported to several other Unix platforms. 
uvapc/NeXT can generate the necessary information so that the GNU
source-level symbolic debugger, gdb, can be used (see Caveats below). It also
supports obtaining gprof type profiles.  

Contact is:

	Mr. Jack Davidson
	University of Virginia
	Department of Computer Science, Thornton Hall
	Charlottesville CA 22903
	(804) 982-2209
	(804) 982-2214 FAX
	jwd@virginia.edu


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

It translates many dialects of Pascal including Turbo, VAX, Sun/Berkeley.

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]  

____________________________________________________________________________

*** Subject: L4. What should I know about c++ shipped with the NeXT?

cc++ 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 cc++ 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.  

____________________________________________________________________________

*** Subject: L5. What Ada compilers are available for the NeXT?

Meridian Software offers a NeXT Ada compiler.  

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

____________________________________________________________________________

*** Subject: L6. Is Perl available for the NeXT?

Take most of the features of C, csh, awk, and add a sprinkling 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. 

Current version: 4.035 

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.


*** Subject: L7.  Where can I get 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.  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


*** Subject: L8.  Where can I get Eiffel?

A port of the Eiffel language and development environment is available  for the
NeXT. 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. 

A free eiffel-like language called Sather is available via ftp from
icsi-ftp.berkeley.edu  


____________________________________________________________________________

NeXT-FAQ Editor:
Nathan Janette nathan@laplace.csb.yale.edu


--
Nathan Janette		"I'm a NeXTstep man,
Dept MB&B, Yale Univ	 I'm a NeXTcube guy"
New Haven, CT
nathan@laplace.biology.yale.edu (NeXT)
Technical Details
Message-ID: <1992Nov13.202216.15026@cs.yale.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!gumby!yale!cs.yale.edu!news

Show Full Headers
Complete Article Headers
Newsgroups: comp.sys.next.announce
Path: arc1-ca.pugleaf.net!sparky!uunet!gumby!yale!cs.yale.edu!news
From: nathan@laplace.biology.yale.edu (Nathan F. Janette)
Subject: NeXT-FAQ.languages:  Questions about programming languages on the NeXT
Message-ID: <1992Nov13.202216.15026@cs.yale.edu>
Sender: news@cs.yale.edu (Usenet News)
Nntp-Posting-Host: jacobi.biology.yale.edu
Reply-To: nathan@laplace.biology.yale.edu
Organization: Yale University, Department of Computer Science, New Haven, CT
Date: Fri, 13 Nov 1992 20:22:16 GMT
Approved: nathan@laplace.csb.yale.edu
Lines: 290