Archive-name: NEXTSTEP-Languages-FAQ Last-modified: Fri Aug 27 01:27:51 EDT 1993 Version: 3.0 Every four weeks (depending on the phase of the moon) a number of postings are made to comp.sys.next.announce which are a compilation of answers to frequently asked questions in the comp.sys.next.* Usenet newsgroups. The FAQ list is broken into sections and posted separately. These sections focus on various aspects of NEXTSTEP and NeXT machines. Items that appear within sections are not in any particular order, and get added and removed over time. Posting the sections separately allows people to find the sections interesting to them quickly. Within each section each question will be preceded by a "Subject:" field, allowing news readers to break up the file into separate questions. Each question has its own unique number. The FAQ is kept on-line at several ftp sites, including: cs.orst.edu sonata.cc.purdue.edu srawgw.sra.co.jp [133.137.4.3] Many FAQs, including this one, are available via FTP on the archive site rtfm.mit.edu in the directory pub/usenet/news.answers. The name under which this FAQ is archived appears in the Archive-nameline above. Questions marked with a "+" are new to this issue, and questions with changes since the last issue are marked by a "!". Submissions, corrections, comments, input, etc., should be directed to Nathan Janette . Disclaimer: We are not affiliated with any of the companies mentioned in this posting. If you have any corrections, additions, questions, or answers to add to this list, please send email to: This compilation is meant primarily as a service to the comp.sys.next community. Newsletter editors wishing to excerpt from this work for publication should consider using local electronic bulletin boards to disseminate this information rather than preparing hardcopies. This allows for readers to access the most recent information, and perhaps save a couple of trees. We do not collect any royalties, charge any fees, or compensate anyone in connection with this endeavor. TABLE OF CONTENTS: ------------------ E1. What Fortran compilers are available for NEXTSTEP? E2. What Lisps are there for NEXTSTEP? E3. What Pascal compilers are available for NEXTSTEP? E4. What should I know about c++ shipped with NEXTSTEP? E5. What Ada compilers are available for NEXTSTEP? E6. Is Perl available for NEXTSTEP? E7. Where can I get gawk? E8. Where can I get Eiffel? ____________________________________________________________________________ ~Subject: E1. What Fortran compilers are available for NEXTSTEP? 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/ NEXTSTEP's Interface Builder toolkit, allows programmers to add a GUI to any FORTRAN program. They have a screen oriented source level debugger designed by and for FORTRAN programmers, and IMSL FORTRAN Libraries. They have versions for NEXTSTEP/m68k and NEXTSTEP/FIP. 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: E2. What Lisps are there for NEXTSTEP? Scheme is available from: altdorf.ai.mit.edu. Schematik is a front-end to MIT Scheme for NEXTSTEP; it comes complete with MIT Scheme, so that installing it is in fact also the simplest way to install MIT Scheme. It is available from: ftp.gac.edu ftp.informatik.uni-muenchen.de (European users). 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 with NEXTSTEP: 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. [bvrotney@ads.com (Bill Vrotney)] adds: But you can actually get a later version from: rascal.ics.utexas.edu pub/NeXT-akcl-1-615.tar.Z 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: E3. What Pascal compilers are available for NEXTSTEP? 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 [From: sanguish@digifix.com] I'm pretty sure that this pascal was dropped when 3.0 came onto the scene. Definately when hardware was dropped. I have sent e-mail to the contact, but no answer as yet. p2c, David Gillespie's Pascal to C translator, can be obtained from: csvax.cs.caltech.edu: 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% ____________________________________________________________________________ ~Subject: E4. What should I know about c++ shipped with NEXTSTEP? Two things to note about the cc++ on NeXT. Any C include files have to be specified as below: extern "C" { #include #include #include #include } 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. [From: sanguish@digifix.com] The currently available lib g++ is on ftp.next.com [From: Magnus Nordborg ] The cc++ shipped with NEXTSTEP 3.0 is a modified version of gcc-1.93. As shipped, 3.0 does not have the standard C++ headers and library functions (like iostream.h). It is therefore of no use as a C++ compiler (unless you want to write your own i/o routines, etc). There are basically two things you can do to remedy the situation. 1.) Get libg++-1.39.0 and build it using cc++ (some patches are needed, see below). 2.) Get the latest version of gcc and libg++ and build them. They (gcc-2.3.3 and libg++-2.3 that is) compile without problems (you need GNU make and bison, plus at least 40 MB of disk space to build gcc). The second alternative is clearly preferable in that you get a more stable C++ compiler that support "recent" additions to C++. This makes it much more likely that you will be able to use packages from other sources, etc There are two disadvantages: gcc takes up more than 10 MB of disk space, and the version of gdb that comes with 3.0 works less well with it. You should probably not get rid of cc even if you get gcc as the support for NeXT's Objective-C in gcc is not reliable. Here are the instructions for getting libg++-1.39.0: Create a folder, say /me/tmp. % mkdir tmp % cd tmp Get libg++-1.39.0.tar.Z via anonymous ftp from prep.ai.mit.edu from the directory pub/gnu. % ftp prep.ai.mit.edu ... Get NeXTmods-rls3.tar.Z via anonymous ftp from next242.ece.orst.edu from the directory pub. % ftp next242.ece.orst.edu ... Unpack the gnu stuff, and cd to the newly created directory. % zcat libg++-1.39.0.tar.Z | tar xf - % cd libg++-1.39.0 Unpack the mods file while in the newly created libg++-1.39.0 folder. % zcat ../NeXTmods-rls3.tar.Z | tar xf - Create /usr/gnu, and /usr/gnu/lib (writable by whoever is doing this). % mkdir /usr/gnu % mkdir /usr/gnu/lib Change Makefile line 32 to "PWD=/me/tmp/libg++-1.39.0" ^^^^^^^ may need changing Then % make src (takes a while--ignore the warnings) % make install-lib" (puts libg++.a in /usr/gnu/lib) % make install-include-files" (this puts the include files in /usr/gnu/lib/g++-include) % make tests" (this takes rather a lot of disk space). There are differences from the expected output, most likely due to finite precision effects. Make a test program, x.cc, containing: #include main() { cout << " Hello world!\n"; } Compile it. % cc++ -I/usr/gnu/lib/g++-include -O x.cc -L/usr/gnu/lib -lg++ Run it. % a.out It should print Hello world! ____________________________________________________________________________ ~Subject: E5. What Ada compilers are available for NEXTSTEP? Meridian Software offers a NEXTSTEP Ada compiler. Meridian Software Voice: (800)221-2522 FAX: (714)727-3583 Get adaed. It works like a real ada, with libraries, etc. Gopher/archie gives four pages of locations, but cs.nyu.edu is home base. There seem to be pc and amiga versions as well as unix. cs.nyu.edu:/pub/adaed/Adaed-1.11.0a.tar.Z ____________________________________________________________________________ ~Subject: E6. Is Perl available for NEXTSTEP? 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.036 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. ________________________________________________________Use of uninitialized value in concatenation (.) or string at E:\listplex\SYSTEM\SCRIPTS\filearea.cgi line 455, line 471. ____________________ ~Subject: E7. 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 NEXTSTEP, 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 , 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: E8. Where can I get Eiffel? A port of the Eiffel language and development environment is available for NEXTSTEP. 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 ____________________________________________________________________________ Editor: nathan@laplace.csb.yale.edu -- Nathan Janette Voice: 203 432 5065 Systems Manager Fax: 203 432 3923 Brunger Lab Internet: nathan@laplace.csb.yale.edu Yale Univ Dept MB&B/HHMI "I'm a NeXTstep Man, I'm a NeXTcube Guy"