======================================================================= 1 ===
Date:    Mon, 1 Mar 1993 16:32:20 GMT
From:    najork@cs.uiuc.edu (Marc Najork)
Subject: Re: Recursive data structures using generics?

Well, here is one way to handle the problem Roger described.
It's not pretty, but it works ...

And I agree, it would be nice to allow for cyclic imports in
interfaces, and then just compile all the interfaces in a strongly
connected component at once. Certainly feasible, but would probably
require quite some reworking of the compiler. And of course we would
have to change the language definition ... (see SPwM3 p. 43)

-- Marc Najork


::::::::::::::
NodeStack.i3
::::::::::::::
INTERFACE NodeStack = Stack(Node) END NodeStack.

::::::::::::::
Node.i3
::::::::::::::
INTERFACE Node;

TYPE T <: ROOT;

::::::::::::::
PrivateNode.i3
::::::::::::::
INTERFACE PrivateNode;

IMPORT NodeStack;
FROM Node IMPORT T;

REVEAL
  T <: Private;

TYPE
  Private = OBJECT
    id: TEXT;
    stack: NodeStack.T;
  END;

::::::::::::::
Node.m3:
::::::::::::::
MODULE Node EXPORTS Node, PrivateNode;

REVEAL
  T = Private BRANDED OBJECT
  END;

....



======================================================================= 2 ===
Date:    1 Mar 93 20:50:15 GMT
From:    ryan@ponder.csci.unt.edu (Ryan Stansifer)
Subject: Trestle on SPARC

Has anyone compiled the example Trestle programs
in the directory
   .../trestle/apps
of the 2.11 distribution on a SPARC?

All the programs except Track worked as I expected.  I get a continual
stream of "gone" messages whenever the mouse is outside the window.  I
have the impression that you should get just one.  Is this unique to
SPARC, a bug in Trestle, ... ?

Anyone have an example program tracking the mouse outside
the window (as in xeyes)?

Also, ... does anyone have the source to the example Trestle program
Mouse Hockey described in Systems Programming with Modula-3 by Nelson?

Ryan Stansifer


======================================================================= 3 ===
Date:    2 Mar 1993 09:55:53 GMT
From:    kuschke@gefion.informatik.uni-dortmund.de (Michael Kuschke)
Subject: How to call Modual-3 procedures from C ?


Hello,

I've got to interface between a system written in C (actualy an interpreter)
and another part written in Modula-3 (the Zeus system). Now I would like to
trigger Zeus-events out of C-functions. My question now: is that possible
(only with no or simple Datatypes if that matters) and if possible how do I
declare and call Modula-3 functions in C. Another question that bothers me
is: there's no "official" interface I know to call Modula-3 procedures from
another language, what kind of interface could I use that isn't subject to
any near or future changes or that will work with other implementations of
Modula-3 ?

	Any help's appreciated,

	  -Michael
	  
--
  Michael Kuschke e-mail: kuschke@urd.informatik.
  Computer Science Department - LS4                     .uni-dortmund.de
  University of Dortmund  
  D-4600 Dortmund 50,PO-Box 500500, Germany     voice:  +49 231 755 2676


======================================================================= 4 ===
Date:    Tue, 02 Mar 93 12:49:17 -0800
From:    msm@src.dec.com
Subject: Re: Trestle on SPARC


I don't know why you should be getting a stream of Gone reports, 
unless you changed the call to set the cage to set an empty cage, 
instead of using CageFromPosition.  You might want to set a breakpoint 
at VBTClass.ForceEscape, and see if that's getting called a bunch.  
If it is, the question is why, and we can investigate that.  If not, 
then I'm mystified.

We don't have any examples of tracking a cursor outside the top-level 
window yet, because I haven't gotten around to implementing the code 
that would make that work.  The version of Card in the apps subdirectory 
of the ui library implements a version of eyes that track outside 
the domain of their VBT, but inside the top-level window.  If it's 
high-priority, I'll try to make out-of-top-level-domain tracking 
work.

The version of MouseHockey described in Greg's book never worked 
in M3, only in M2.  The newest release of Trestle includes new 
classes JoinedVBT and JoinParent that can be used to implement MouseHockey; 
I'm not sure if it's made it to gatekeeper yet.

Mark


======================================================================= 5 ===
Date:    Tue, 2 Mar 1993 17:11:17 GMT
From:    fld@informatik.uni-bremen.de (Guenter Feldmann)
Subject: M3, gcc, Solaris2.x

Has anyone tried to use Modula-3 with gcc-2.3.3 on a
SPARC Workstation with Solaris2.1? Will there be any
problem? If not, which optimisation level may I use?


======================================================================= 6 ===
Date:    Wed, 03 Mar 1993 15:36:07 GMT
From:    rro@CS.ColoState.EDU (Rod Oldehoeft)
Subject: Updated Harbison errata list

The errata list for Harbison's "Modula-3" has just been updated
(3 March 1993).  It is available on beethoven.cs.colostate.edu
(129.82.102.183) in ~ftp/pub/M3/harbison-errs.ps.Z



======================================================================= 7 ===
Date:    Wed, 3 Mar 1993 12:01:59 GMT
From:    koerbitz@Informatik.TU-Muenchen.DE ()
Subject: Re: M3, gcc, Solaris2.x



Hi out there,

	simple question from a beginner in object-oriented-etc. (:= oo-)

	please send all available info, literature and faq-file
	for follwing topics:

	1. oo-systems-analysis and -design
	2. oo-languages
	3. oo-dbms
	4. oo-analysis and design
	5. oo-modeling techniques


If anyone has info please help me out.. * any help would be appreciated.

Thanks in advance 


_____________________________________________________________________________
______
      _/    _/_/              KETA - Thomas Koerbitz
     _/   _/                  Email  koerbitz@informatik.tu-muenchen.de  
    _/  _/         _/_/_/_/   voice nat.      0 81 06 - 3 37 09 
   _/_/_/         _/     _/   int.  +49 - 81 06 - 3 37 09 
  _/   _/        _/     _/    fax             0 81 06 - 3 43 81 
 _/     _/_/    _/    _/   
__ __ __ __ __ __ __  _/_/ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __
 __ _   



======================================================================= 8 ===
Date:    Thu, 4 Mar 93 00:15:44 GMT
From:    Eric Muller <muller@src.dec.com>
Subject: Modula-3 Frequently Asked Questions (FAQ)

Archive-name: Modula-3-faq
Last-modified: Feb 04 1993


		 Modula-3 Frequently Asked Questions
		 ===================================


What is Modula-3 ?

   The goal of Modula-3 is to be as simple and safe as it can be while
   meeting the needs of modern systems programmers.  Instead of
   exploring new features, we studied the features of the Modula
   family of languages that have proven themselves in practice and
   tried to simplify them into a harmonious language.  We found that
   most of the successful features were aimed at one of two main
   goals: greater robustness, and a simpler, more systematic type
   system.

   Modula-3 descends from Mesa, Modula-2, Cedar, and Modula-2+.  It
   also resembles its cousins Object Pascal, Oberon, and Euclid.

   Modula-3 retains one of Modula-2's most successful features, the
   provision for explicit interfaces between modules.  It adds objects
   and classes, exception handling, garbage collection, lightweight
   processes (or threads), and the isolation of unsafe features.


Is Modula-3 a superset of Modula-2 ?

   No; valid Modula-2 programs are not valid Modula-3 programs.  However,
   there is a tool to help convert Modula-2 programs to Modula-3.


Where can I get a description of Modula-3 ? 
   
   The definition of Modula-3 is contained in:

        System Programming with Modula-3
        Edited by Greg Nelson
        Prentice Hall Series in Innovative Technology
        ISBN 0-13-590464-1
        L.C. QA76.66.S87 1991

   also known as SPwM3.  Here is the table of contents:

        1. Introduction
        2. Language Definition
        3. Standard Interfaces
        4. An Introduction to Programming with Threads
        5. Thread Synchronization: A Formal Specification
        6. I/O Streams: Abstract Types, Real Programs
        7. Trestle Window System Tutorial
        8. How the Language Got its Spots

   Chapters 2 and 3 have been reprinted in Sigplan Notices, Volume 27,
   Number 8, August 1992, pp 15-42.

   Sam Harbison has written a more tutorial book about Modula3:

        Modula-3
        Samuel P. Harbison
        Prentice Hall, 1992
        ISBN 0-13-596396-6

Where can I get other information on Modula-3 ?

   There is a Usenet newsgroup, comp.lang.modula3.  The archives of
   that group are available via anonymous ftp from gatekeeper.dec.com
   in pub/DEC/Modula-3/comp.lang.modula3.  If you do not have
   access to Usenet, there is a relay mailing list; send a message to
   m3-request@src.dec.com to be added to it.

   There are a couple high-level overview articles available:

        "Modula-3", Sam Harbison, Byte, Vol. 15, No. 12, October 1990,
        pp 385+.

        "Safe Programming with Modula-3", Sam Harbison, Dr. Dobb's Journal,
        Vol. 17, No. 10, October 1992, pp 88+.

   A description of the Modula-3 type system is in

        "The Modula-3 Type System", Luca Cardelli, Jim Donahue, Mick Jordan,
        Bill Kalsow, Greg Nelson, Conference Record of the Sixteenth Annual
        ACM Symposium on Principles of Programming Languages (POPL), Austin
        Texas, January 11-13 1989, pp 202-212.

   The Trestle window system toolkit and higher-level FormsVBT toolkit,
   available with Modula-3, are documented in the following reports:

        "Trestle Reference Manual", Mark S. Manasse and Greg Nelson,
        SRC Research Report 68, December 1991.

        "Trestle Tutorial", Mark S. Manasse and Greg Nelson, SRC Research
        Report 69, May 1, 1992.

        "The FormsVBT Reference Manual", Marc H. Brown and James R. Meehan,
        (soon to be SRC Research Report ??).

   These reports can be ordered by e-mail; send your request to
   src-reports@src.dec.com.

Where can I get an implementation ?

   There is only one implementation available today.  It has been built
   by SRC and is available via anonymous ftp from gatekeeper.dec.com in
   pub/DEC/Modula-3/release.  Contributed software can be found
   in pub/DEC/Modula-3/contrib.

   The current version, 2.11, implements the language defined in SPwM3.
   There are versions for the following machines:

        AIX386  IBM PC running AIX/PS2,
        AP3000  Apollo DN4500 running Domain/OS
        ARM     Acorn R260 running RISC iX 1.21
        DS3100  DECstation 3100 and 5000 running Ultrix 4.0 and 4.2
        HP300   HP 9000/300 running HP-UX 8.0
	HPPA    HP 700/800 running HP-UX 8.0
        IBMR2   IBM R6000 running AIX 3.1, 
        IBMRT   IBM RT running IBM/4.3, 
        NEXT    NeXT running ?
	OKI     Okidata 7300 (i860) running AT&T SVR4.0
        SPARC   SPARCstation running SunOS 4.1.x
        SUN3    SUN3 running SunOS
	SUN386  Sun 386i  running SunOS 4.0.1
        UMAX    Encore Multimax running UMAX 4.3 (R4.1.1)
        VAX     VAX running Ultrix 3.1

   SRC Modula-3 includes a user manual, compiler, runtime library,
   some libraries and a few other goodies (see below).

   The compiler generates C as an intermediate language and should be
   fairly easy to port.  Except for the very lowest levels of the
   thread implementation, the entire system is written in Modula-3.


What if I don't have ftp access ?

   Unfortunately, we cannot deliver Modula-3 other than by 
   anonymous ftp.  

   Fortunately, Prime Time Freeware (PTF) includes Modula-3.  PTF is
   a set of two ISO-9660 CDroms filled with 3GB of freeware, issued
   semi-annually.  The latest issue, Volume 1, Number 2, July 1992,
   contains SRC Modula-3 2.07.  PTF is distributed via bookstores and
   mail.  You can reach PTF using:

	Email:  ptf@cfcl.com
        Fax:    [1] (408) 738 2050
        Voice:  [1] (408) 738 4832
        Mail:   Prime Time Freeware
 	        415-112 N. Mary Ave., Suite 50
		Sunnyvale, CA 94086
	        USA

Can I contribute Modula-3 software ?

   Certainly.  Send us what you are willing to share, be it programs,
   libraries or other things.  We'll put them in the distribution.

   Right now, the pub/DEC/Modula-3/contrib directory contains:

      m3rpc   an rpc system from Xerox Parc
      M2toM3  a translator from Modula-2 to Modula-3
      m3pc    an implementation of Modula-3 for PCs.
   

-- 
Eric.





======================================================================= 9 ===
Date:    Thu, 4 Mar 1993 18:23:52 +0100
From:    Arnt Gulbrandsen <agulbra@pvv.unit.no>
Subject: Re: Modula-3 Frequently Asked Questions (FAQ)

In article <1993Mar4.001544.21204@src.dec.com> you write:
>Archive-name: Modula-3-faq
>Last-modified: Feb 04 1993

>		 Modula-3 Frequently Asked Questions
>		 ===================================
...
>   Sam Harbison has written a more tutorial book about Modula3:
>
>        Modula-3
>        Samuel P. Harbison
>        Prentice Hall, 1992
>        ISBN 0-13-596396-6

Please mention the errata file I fetched from somewhere.  Its address
was posted just the other day.  Gatekeeper should have the posting.

>   There is only one implementation available today.  It has been built
>   by SRC and is available via anonymous ftp from gatekeeper.dec.com in
>   pub/DEC/Modula-3/release.  Contributed software can be found
>   in pub/DEC/Modula-3/contrib.

Perhaps you could also mention that work is progressing on a
native-code GNU M3 compiler.  The best info I have on that is that an
alpha is expected sometime maybe soon, initially for VAX/Ultrix.  No
beta or other CPUs soon.  Talk to moss@cs.umass.edu for more solid
info.

--Arnt


======================================================================= 10 ===
Date:    3 Mar 93 16:23:06 GMT
From:    mingxu@cs.man.ac.uk (Ming Qiang Xu)
Subject: Building a cross compiler for a KSR1

I have been following the instructions on porting and hit a problem
when I try to build a cross compiler:

---------------------------------------------------------
% m3make cross NEW=KSR1
make: Fatal error: Don't know how to make target `cross'
---------------------------------------------------------

This is due to the fact that the makefile ".makefile" generated has no
such target.  Have I made any mistakes in installing m3?  I manage to
find the makefile which has the "cross" target and then:

% make cross NEW=KSR1 -f makefile.cross
Wed Mar 3 16:08:57 GMT 1993 ===================== cross compiler for KSR1
/home/r74/users/mingxu/ftp/Appl/m3/bin/m3 -w1 -make -why -g -times    -o
m3compiler -F.PGM_SOURCES 
new source -> compiling ../src/builtinOps/Abs.i3
Abs_i.c: 2: Can't find include file M3Runtime.h

---------------------------------------------------------

I failed to find a file called M3Runtime.h.  Sounds like I have missed
something fairly obvious.  

Your help is much appreciated,




--
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]

 Ming Q. Xu                               Centre for Novel Computing	
					  Dept. of Computer Science
 Voice:        (+44) 61-275-6135	  University of Manchester      
 FAX:          (+44) 61-275-6204	  Oxford Road                     
 Internet:     mingxu@cs.man.ac.uk	  Manchester,  M13 9PL  	  
 JANET:        mingxu@uk.ac.man.cs        United Kindom 		  

[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]
									
									


======================================================================= 11 ===
Date:    5 Mar 93 16:21:03 GMT
From:    wkh@austin.ibm.com
Subject: m3pc from gatekeeper.dec.com


Has anyone used it?  Is it worth the time and disk space
to use it on a '486 DOS/Windows box?

... WkH
-- 
Ward K Harold				(512) 838-3473 [T/L 678-3473]
IBM Personal Systems Programming	external: wkh@dce.austin.ibm.com
11400 Burnet Rd., Zip 9541		internal: wkh@duke.austin.ibm.com
Austin, TX  78758			vnet: wharrold --ausvmq


======================================================================= 12 ===
Date:    Sat, 6 Mar 1993 22:56:27 GMT
From:    fkl2ng@mobius08.math.uwaterloo.ca (Fred Ng/2)
Subject: Re: m3pc from gatekeeper.dec.com 

In article <1993Mar5.162103.20527@ibmpa.awdpa.ibm.com>, wkh@austin.ibm.com ()
 writes:
> 
> Has anyone used it?  Is it worth the time and disk space
> to use it on a '486 DOS/Windows box?
> 
> ... WkH
[.sig deleted]

     I've installed it myself, but haven't yet had too much time to explore i
t
fully.  In short, it takes more HD than I'd like, and I will try to slim it
down a bit by trimming some unwanted files like compatiblities with NeXT, AIX
,
and so on.  BTW, it can't be run in a DOS box under Windows, since it uses a
proprietary memory manager.  If you really have to use it under DOS, there's
nothing you can lose by using m3pc, but I would rather stick with the UNIX
version for now until it is better-polished and being updated to 2.11 (now it
is using 2.09 source).

_____________________________________________________________________________
___
 Fred Ng/2                  | "To crash OS/2, you have to stay up night and d
ay
 (Yes, I'm pro-OS/2!!!)     |  to build a terminator disk.  Windows comes wit
h
                            |  that built-in."
 University of Waterloo     |               IBM's James Cannavino on Microsof
t's
 fkl2ng@napier.waterloo.edu |               Terminator prog. which crashes OS
/2


======================================================================= 13 ===
Date:    Sat, 6 Mar 1993 22:55:55 GMT
From:    dsims@don.ece.uc.edu (David Sims)
Subject: M3 on a multiprocessor

I have written several multi-threaded versions of a Modula-3 object.
Basically, I'd like to run each version on a multiprocessor to find out
which version is the fastest in a parallel environment.

As far as I know, the only multiprocessor supported by SRC M3 is the
Encore Multimax.  We don't have one here, and a DOE lab I contacted has
recently shut theirs down.  Does anyone know of any Multimaxes where I
might get a guest account?

Does anyone know of any other multiprocessors that run M3?

If a multiprocessor is unavailable, is there a way to simulate one on a
uniprocessor and extract useful timing information so that I can still
determine which version is fastest?

Thanks for any help....
-- 
David Sims                    Dept. of Electrical and Computer Engineering
david.sims@uc.edu             University of Cincinnati
(513) 556-2499                Cincinnati OH  45221-0030
RIPEM mail accepted.          USA


======================================================================= 14 ===
Date:    Mon, 8 Mar 1993 01:11:19 GMT
From:    q1hl@jupiter.sun.csd.unb.ca (A Nameless CS Student)
Subject: Re: m3pc from gatekeeper.dec.com 

I installed m3pc on my 486dx2 66 over the break. The 80 meg required for the 
install is to be on the safe side, it is only about 57meg. If you delete all 
the source code with it you can get it down to a functional 18meg (less than 
BC++3.1 without OWL stuff). The only thing is that the compiler is very slow 
(must be due to 32bit protected mode conversion stuff). It took about 3 mins 
on my system to compile the Hello world example. All in all it seems to be wo
rth it and it works quite nice(alot of meaningful




 info as it is working ). I especially think it's justified due to dj's gcc p
ort that is included. Anyhow these are my two cents and if you have any other
 questions before you go ahead with it mail me.





----------------------------------------------------------------------
		Ken E. Ramey - q1hl@jupiter.sun.csd.unb.ca

	    "The Universal Programming Language is profanity... "

----------------------------------------------------------------------





======================================================================= 15 ===
Date:    8 Mar 93 10:38:45
From:    fraser@europarc.xerox.com (Quentin Stafford-Fraser)
Subject: Re: m3pc from gatekeeper.dec.com 


It's also worth pointing out that it doesn't have threads yet.
Still, many congratulations to the person who ported it for getting us
started. I'm afraid I don't have his/her name handy.

Quentin

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Quentin Stafford-Fraser         
Rank Xerox EuroPARC,            Some primal termite knocked on wood
Cambridge, UK			And tasted it, and found it good.
Tel: +44 223 341529      	And that is why your cousin May
Fax: +44 223 341510      	Fell through the parlour floor today.
Fraser@europarc.xerox.com	


======================================================================= 16 ===
Date:    8 Mar 1993 13:13:52 GMT
From:    laszlo@post.ifi.uni-klu.ac.at (Prof.Dr.Laszlo BOESZOERMENYI)
Subject: M3 pn PC

To FAQs on M3 on PC.

The Modula-3 system ported by us on the PC and available on the gatekeeper,
runs with MSDOS, gnu c compiler and djgpp memory manager
(detailed description in the read me file).

You may compile, link and run Modula-3 programs, without threads.
>From the library modules only those are tested which are used by the compile
r.
In the course of a student project a "student-friendly" environment is
in development.
It will be available at end of June (hopefully).

Cheers
Laszlo

-----------------------------------------------------------------

Prof. Laszlo Boszormenyi
Institut fuer Informatik

Universitaet Klagenfurt
Universitaetsstr. 65-67
A-9022 Klagenfurt / Austria

e-mail:
laszlo@ifi.uni-klu.ac.at
Tel.: 
00-43-463-2700-509 
00-43-463-2700-507 (secr.)
Fax.:
00-43-463-2700-505 


======================================================================= 17 ===
Date:    Mon, 8 Mar 1993 21:36:40 GMT
From:    papresco@napier.uwaterloo.ca (Paul (X) Prescod)
Subject: Re: m3pc from gatekeeper.dec.com 


>I installed m3pc on my 486dx2 66 over the break. The 80 meg required for the
 
>install is to be on the safe side, it is only about 57meg. If you delete all
 
>the source code with it you can get it down to a functional 18meg (less than
 
>BC++3.1 without OWL stuff). 

Is there any way this "stripped" version could be put on SRC?  There are alot
of people that really want M3, but don't have 80MB to spare.




======================================================================= 18 ===
Date:    9 Mar 93 12:12:33
From:    vixie@pa.dec.com (Paul A Vixie)
Subject: Re: m3pc from gatekeeper.dec.com

> Is there any way this "stripped" version could be put on SRC?  There are al
ot
> of people that really want M3, but don't have 80MB to spare.

gatekeeper.dec.com generally does not carry binaries because of the
risk of viruses.  if someone at src wants to compile up the binaries
for this and guarantee to me that it is virus-free, and then someone
contributes a cryptographic checksum utility to make sure that mirrored
copies of our binaries aren't tampered with, then i will be glad to
carry the m3pc binaries on gatekeeper.
--
Paul Vixie, DEC Network Systems Lab	
Palo Alto, California, USA         	"Don't be a rebel, or a conformist;
<vixie@pa.dec.com> decwrl!vixie		they're the same thing, anyway.  Find
<paul@vix.com>     vixie!paul		your own path, and stay on it."  -me


======================================================================= 19 ===
Date:    10 Mar 93 06:16:37 GMT
From:    blom@husc13.harvard.edu
Subject: Sample programs?

Well, I *did* look in the FAQ, but I didn't see it:

Where can I get sample Modula-3 programs?


Eric Blom
Harvard U


======================================================================= 20 ===
Date:    Wed, 10 Mar 1993 15:54:11 GMT
From:    kirschnt@informatik.uni-muenchen.de (Torsten R. Kirschner)
Subject: M3-2.11 for HPPA -- threads do not work (?)


Hello Netfellows, 

I am using M3 2.11 on both my DECstation 5000/200 under UWS 4.3 and
on our HPPA "snakes" under HP-UX 8.07. 

Basically, everything works fine under Ultrix. But the HPPA-port is unable
to handle threads properly. That could be due to HPPA/HP-UX lack of stack
frames and capabilities of handling such, as far as I've been told.

Now, has anybody got the HPPA-port working as far as threads are concerned?
If so, please let me know about the fixes/changes to the standard distri-
bution.

Anyhow, I would like to say I appreciate the HPPA-port very much and know
how difficult an upgrade to, say, HP-UX 9.x could be.

Thanks in advance for _any_ help. I will forward a compilation to this
group.

Torsten
-- 
               kirschnt@informatik.{tu|uni}-muenchen.de


======================================================================= 21 ===
Date:    Wed, 10 Mar 93 09:40:18 CST
From:    EM306965@itesmvf1.rzs.itesm.mx
Subject: Help on Installation...

Can I erase the sources of the compiler and driver after I have installed it?
As well a the  sources of other utilities/additions.
 
+Gus Cavazos


======================================================================= 22 ===
Date:    Wed, 10 Mar 1993 17:12:15 GMT
From:    barton@chopin.eche.ualberta.ca (Bob Barton System Administrator (403
)492 5160)
Subject: RS6000 m3tk build problem

The following are the error messages produced when using m3make.

new source -> compiling ../../m3oli-fs.2/src/PathName_ux.i3
"../../m3oli-fs.2/src/PathName_ux.i3", line 51: unknown qualification '.' (MA
XNAMLEN)
"../../m3oli-fs.2/src/PathName_ux.i3", line 51: value is not constant
2 errors encountered
new source -> compiling ../../m3oli-fs.2/src/DirOp_ux.m3
"../../m3oli-fs.2/src/PathName_ux.i3", line 51: unknown qualification '.' (MA
XNAMLEN)
"../../m3oli-fs.2/src/PathName_ux.i3", line 51: value is not constant
2 errors encountered
new source -> compiling ../../m3oli-fs.2/src/FileOp_ux.m3
"../../m3oli-fs.2/src/PathName_ux.i3", line 51: unknown qualification '.' (MA
XNAMLEN)
"../../m3oli-fs.2/src/PathName_ux.i3", line 51: value is not constant
2 errors encountered
new source -> compiling ../../m3oli-fs.2/src/FileStamp_ux.m3
"../../m3oli-fs.2/src/PathName_ux.i3", line 51: unknown qualification '.' (MA
XNAMLEN)
"../../m3oli-fs.2/src/PathName_ux.i3", line 51: value is not constant
2 errors encountered
new source -> compiling ../../m3oli-fs.2/src/PathName_ux.m3
"../../m3oli-fs.2/src/PathName_ux.i3", line 51: unknown qualification '.' (MA
XNAMLEN)
"../../m3oli-fs.2/src/PathName_ux.i3", line 51: value is not constant
2 errors encountered
compilation failed => not building library "libm3tk-lib.a"
make: 1254-004 The error code from the last command is -1.

Make Quitting.
make: 1254-004 The error code from the last command is 2.

Make Quitting.
--

--,,,,
 | D |  R.L. Barton                    Department of Chemical Engineering
 | A |  Tel (403) 492-5160             University of Alberta 
 | C |  Fax (403) 492-2881             Edmonton, Alberta, Canada T6G 2G6
 | S |  Internet barton@chopin.eche.ualberta.ca
--''''


======================================================================= 23 ===
Date:    Wed, 10 Mar 93 04:40:10 GMT
From:    next@kdb.snu.ac.kr (Kim Ki Hong)
Subject: I have a problem with installing mentor

I've read Marc H. Brown and John Hershberger's recent article, "Color and Sou
nd
in Algorithm Animation". 
Thanks to Marc H. Brown and John Hershberger for their contribution. The arti
cle
showed me another world.

Now, I want to run the algorithm animation demos, mentor.
I have a problem with compiling it.
Here are error messages.

/db/local/space/next/bin/m3bundle -name MentorBundle -F.RSRC_CMD
/db/local/space/next/bin/m3bundle: cannot read file: CPEventData.fv
/db/local/space/next/bin/m3bundle: cannot read file: CPTranscriptView.fv
/db/local/space/next/bin/m3bundle -name MentorBundle -F.RSRC_CMD
/db/local/space/next/bin/m3bundle: cannot read file: CPEventData.fv
/db/local/space/next/bin/m3bundle: cannot read file: CPTranscriptView.fv
/db/local/space/next/bin/m3 -w1 -make -why -g    -o mentor -F.PGM_SOURCES -lm
3mg
kit -lm3mg -lm3zeus -lm3codeview -lm3formsvbt -lm3vbtkit -lm3ui -lm3X11R4 -L/
usr
/local/lib -lX11
new source -> compiling CPViewClass.i3
fatal error: "CPViewClass.i3" does not exist.
new source -> compiling CPIE.i3
fatal error: "CPIE.i3" does not exist.
new source -> compiling CPTranscriptView.i3
fatal error: "CPTranscriptView.i3" does not exist.
new source -> compiling MentorBundle.i3
fatal error: "MentorBundle.i3" does not exist.
new source -> compiling CPViewClass.m3
fatal error: "CPViewClass.m3" does not exist.
new source -> compiling CPIE.m3
fatal error: "CPIE.m3" does not exist.
new source -> compiling CPTranscriptView.m3
fatal error: "CPTranscriptView.m3" does not exist.
new source -> compiling ../closestpoint/src/CPAlg.m3
"../closestpoint/src/CPAlg.m3", line 3: missing file
  no "CPIE.i3" on path "../dgraph/src:../euclid/src:../match/src:../logo/src:
../
maxflow/src:../zpaper/src:../hash/src:../hull/src:../closestpoint/src:../pars
e/s
rc:../stringsearch/src:../audio/src:.:../pqueue/src:../binpack/src:../sorting
/sr
c:../searchtree/src:.:/db/local/space/next/include/m3"
1 error encountered
new source -> compiling ../closestpoint/src/CPView.m3
"../closestpoint/src/CPView.m3", line 3: missing file
  no "CPViewClass.i3" on path "../dgraph/src:../euclid/src:../match/src:../lo
go/
src:../maxflow/src:../zpaper/src:../hash/src:../hull/src:../closestpoint/src:
../
parse/src:../stringsearch/src:../audio/src:.:../pqueue/src:../binpack/src:../
sor
ting/src:../searchtree/src:.:/db/local/space/next/include/m3"
1 error encountered
new source -> compiling ../src/Main.m3
"../src/Main.m3", line 9: missing file
  no "MentorBundle.i3" on path "../dgraph/src:../euclid/src:../match/src:../l
ogo
/src:../maxflow/src:../zpaper/src:../hash/src:../hull/src:../closestpoint/src
:..
/parse/src:../stringsearch/src:../audio/src:.:../pqueue/src:../binpack/src:..
/so
rting/src:../searchtree/src:.:/db/local/space/next/include/m3"
1 error encountered
new source -> compiling MentorBundle.m3
fatal error: "MentorBundle.m3" does not exist.
compilation failed => not building program "mentor"
*** Error code 255
make: Fatal error: Command failed for target `mentor'
Current working directory /db/people/next/m3/mentor/SPARC
*** Error code 1
make: Fatal error: Command failed for target `all'
Current working directory /db/people/next/m3
*** Error code 1
make: Fatal error: Command failed for target `build_install.mentor'

Here are my mentor/closestpoint/ls directory contents.

-rw-r--r--  1 next         1342 Aug 13  1992 CP.evt
-rw-r--r--  1 next           65 Aug 13  1992 CPAlg.i3
-rw-r--r--  1 next         9801 Sep 25 07:52 CPAlg.m3
-rw-r--r--  1 next          145 Aug 10  1992 CPBundle.i3
-rw-r--r--  1 next         1274 Aug  4  1992 CPCode.cc
-rw-r--r--  1 next         1408 Aug 10  1992 CPCode.m3c
-rw-r--r--  1 next         1364 Aug 10  1992 CPCode.pasc
-rw-r--r--  1 next          312 Aug  1  1992 CPVar.fv
-rw-r--r--  1 next           31 Aug 13  1992 CPView.i3
-rw-r--r--  1 next        16494 Jan  9 04:36 CPView.m3
-rw-r--r--  1 next          840 Aug 13  1992 CPinput.fv
-rw-r--r--  1 next          177 Sep 25 04:33 Main.m3
-rw-r--r--  1 next          409 Sep 25 05:29 m3makefile

I've successfully installed other parts of Modula-3 release.
Please help me.

Thanks for reading.


======================================================================= 24 ===
Date:    Wed, 10 Mar 1993 18:05:07 GMT
From:    strzelin@bnlku2.phy.bnl.gov (Robert J Strzelinski)
Subject: Modula-3 on SGI?

Our group here at BNL has quite an investment in Silicon Graphics computers
and I have become quite enamored of Modula-3 from using it on my DECstation
5000.  Naturally, I would like to use the language for some development tasks
on our SGI machines but I'm not sure I (want/have time) to tackle porting it
to a new architecture.  Actually, I have already made a few brief abortive
attempts on an Indigo R-4000 (Irix 4.05f).  So:

1) Has anyone out there ported m3 to an SGI platform?

2) Does anyone plan to port to SGI in the near future?

Thanks in advance for any info...
 
/////////////////////////////////////////////////////////////////////////////
//
// Robert J Strzelinski                 // Brookhaven National Laboratory    
//
// strzelin@sscdaq.phy.bnl.gov          // Upton, NY 11973-5000              
//
/////////////////////////////////////////////////////////////////////////////
//


======================================================================= 25 ===
Date:    10 Mar 93 18:52:20 GMT
From:    rhoover@watson.ibm.com (Roger Hoover)
Subject: Re: RS6000 m3tk build problem

Woops.  It looks like I forgot to post this fix when I found it:

% diff -c libm3/unix/src/aix-3-2/Udir.i3~ libm3/unix/src/aix-3-2/Udir.i3
*** libm3/unix/src/aix-3-2/Udir.i3~     Fri Nov 22 18:01:44 1991
--- libm3/unix/src/aix-3-2/Udir.i3      Wed Jan 27 09:16:04 1993
***************
*** 19,29 ****
  SC23-2198-00, pp 1-522 to 1-524. *)

  CONST
!   MAXNAMELEN = 255;     (* Maximum length of component of file path name. *
)
    MAXPATHLEN = 1024;    (* Maximum length of file path name. *)

  TYPE
!   D_name = ARRAY [0..MAXNAMELEN] OF CHAR;
    DIR = RECORD
      dd_fd: int;
      dd_blksize: int;
--- 19,29 ----
  SC23-2198-00, pp 1-522 to 1-524. *)

  CONST
!   MAXNAMLEN = 255;     (* Maximum length of component of file path name. *)
    MAXPATHLEN = 1024;    (* Maximum length of file path name. *)

  TYPE
!   D_name = ARRAY [0..MAXNAMLEN] OF CHAR;
    DIR = RECORD
      dd_fd: int;
      dd_blksize: int;
***************
*** 44,49 ****
--- 44,53 ----
    END;

    struct_dirent_star = UNTRACED REF struct_dirent;
+
+   direct = struct_dirent;
+   direct_star = UNTRACED REF direct;
+

  <* EXTERNAL *> PROCEDURE opendir(dir: char_star): DIR_star;
  <* EXTERNAL *> PROCEDURE readdir(dirPtr: DIR_star): struct_dirent_star;


======================================================================= 26 ===
Date:    Thu, 11 Mar 1993 20:31:07 GMT
From:    papresco@lagrange.uwaterloo.ca (Paul Prescod)
Subject: Modula-3 Interface Standards

There are a few things that I think might be useful to add to the M3 interfac
e conventions:

1. Either a .ToText or a .Print or something like that for debugging.  Why is
 there .hash but not
	.ToText?  Yes there are text coversions in other interfaces, but that
 isn't any  help
in implementing an ADT.

2. Either anything should be assignable to NUL (which might not be as hard as
 it sounds) or there
	should be a .NUL convention, for returning error messages (or just "n
othing") from 
ADTs. My RETURN NIL works fine if it's TEXT or an OBJECT, but not for INTEGER
 or RECORD.  
This is not intuitive.  So I either have to make a whole  exception structure
, or return a
value, through a VAR parameter, and a BOOLEAN, which isn't as clean.

Opinions?


======================================================================= 27 ===
Date:    12 Mar 93 13:44:18 GMT
From:    moss@cs.cmu.edu (Eliot Moss)
Subject: Re: Modula-3 Interface Standards

>>>>> On Thu, 11 Mar 1993 20:31:07 GMT, papresco@lagrange.uwaterloo.ca (Paul
>>>>> Prescod) said:

Paul> There are a few things that I think might be useful to add to the M3
Paul> interface conventions:
.....

Paul> 2. Either anything should be assignable to NUL (which might not be as
Paul> hard as it sounds) or there 	should be a .NUL convention, for
Paul> returning error messages (or just "nothing") from ADTs. My RETURN NIL
Paul> works fine if it's TEXT or an OBJECT, but not for INTEGER or RECORD.
Paul> This is not intuitive.  So I either have to make a whole exception
Paul> structure, or return a value, through a VAR parameter, and a BOOLEAN,
Paul> which isn't as clean.

I don't really understand what you're getting at. It's perfectly fine for a
procedure not to return anything at all (so long as that's what it always
does). If you're trying to indicate that something didn't work, use
exceptions! That's what they're for! I for one would feel that testing for NI
L
values on every return would be a significant step backwards.
--

J. Eliot B. Moss, Associate Professor	Visiting Associate Professor
Department of Computer Science		School of Computer Science
Lederle Graduate Research Center	Carnegie Mellon University
University of Massachusetts		5000 Forbes Avenue
Amherst, MA  01003			Pittsburgh, PA  15213-3891
(413) 545-4206, 545-1249 (fax)		(412) 268-6767, 681-5739 (fax)
Moss@cs.umass.edu			Moss@cs.cmu.edu


======================================================================= 28 ===
Date:    Fri, 12 Mar 1993 22:37:38 GMT
From:    eggert@twinsun.com (Paul Eggert)
Subject: Re: Modula-3 Interface Standards

moss@cs.cmu.edu (Eliot Moss) writes:

	I for one would feel that testing for NIL values on every return
	would be a significant step backwards.

That sounds a bit like a religious argument.
In many cases there are sound technical reasons against using exceptions.
For more on the subject, see:

	Andrew P Black
	Exception Handling: The Case Against
	Dept of Computer Science, University of Washington
	TR 82-01-02 (May 1983).

Obviously Black's conclusions were not shared by Modula-3's designers,
but his arguments have merit, and should not be dismissed casually.


======================================================================= 29 ===
Date:    Fri, 12 Mar 1993 19:23:37 GMT
From:    papresco@lagrange.uwaterloo.ca (Paul Prescod)
Subject: Re: Modula-3 Interface Standards

In article <MOSS.93Mar12084418@CRAFTY.cs.cmu.edu> moss@cs.cmu.edu writes:

>I don't really understand what you're getting at. It's perfectly fine for a
>procedure not to return anything at all (so long as that's what it always
>does). If you're trying to indicate that something didn't work, use
>exceptions! That's what they're for! I for one would feel that testing for N
IL
>values on every return would be a significant step backwards.

Let me give an example:  

I read in a file and turn it into a list of integers.  I have a command 
which returns the next integer.  How do I signal an EOF?  Isn't the
following simpler than the equivalent exception based code:

WHILE x#Integer.NUL DO
	x:=Next(stream_of_ints);
END;

Without exceptions OR integers, it looks liike this:

WHILE eof DO
	eof:=Next(stream_of_ints,x);
END;

It's not as clear whether stream_of_ints is being modified, or x, or 
neither.


My other proposal would allow things like:

PROCEDURE Print_Tree(tree:TREE)=
BEGIN
	Print_Tree(tree.left);
	Print_Tree(tree.right);
	Element.Print(tree.element);
END;

without concern for what element is.


======================================================================= 30 ===
Date:    Sat, 13 Mar 1993 10:20:54 GMT
From:    grlw1@cus.cam.ac.uk (Rich Walker)
Subject: Re: Modula-3 Interface Standards

I must admit that the idea of having a well-defined set of standard
printing methods appeals to me greatly. Having written some code using the
Sx routines recently, I spent a lot of time trying to find out exactly
_what_ the filters I wrote were being passed; I ended up with a moderately
general list printing routine, which prints the real data when it knows
about the type, and the TypeName from RTutils otherwise. Most of the
standard data types provide some sort of Print, Write or ToText method or
procedure, but the behaviour of each is not well defined enough, and they
aren't sufficiently objectified, so for debugging routines code has to be
written for each type that could be referred to. Of course, there is _some_
support for getting this information frmo the debugger, but that requires
access to a debugger that behaves sensibly with Modula-3, and gdb was only
recently put on this system.

Of course, the Print and ToText would be most useful for object datatypes,
but they'd be nice on everything else...

-- 
--- Rich! Walker (grlw1@cus.cam.ac.uk)
No Error (*)
------------
(*) yet...


======================================================================= 31 ===
Date:    Mon, 15 Mar 1993 16:31:52 GMT
From:    takuo@jaist-east.ac.jp (Takuo Watanabe)
Subject: CFP: JSSST Intl. Symp. Object Technologies for Advanced Software


Papers Due: March 25, 1993.

----------------------------------------------------------------------

                          ####################
                          #  Call for Papers #
                          ####################

                  JSSST International Symposium Series

                       International Symposium on
               Object Technologies for Advanced Software
                  Kanazawa, Japan, November 4-6, 1993

Sponsored by:
    Japan Society for Software Science and Technology (JSSST)
Supported by:
    Japan Advanced Institute of Science and Technology (JAIST)
In cooperation with (requesting):
    ACM, IEEE COMPUTER SOCIETY, IEICE, IPSJ

AIM:
    Object technologies are attracting much attention in diverse areas
    of research and development for advanced software.  Object-oriented
    (OO) programming holds a great promise in reducing the complexity of
    large scale software development, and recent research in this field
    promises to open up a new paradigm for parallel and reflective
    computing.  Object-oriented databases are expected to serve as a
    model for next generation database systems, by overcoming the
    limitations of conventional data models.  Recently, research in
    software object bases is aimed at developing a uniform approach to
    the management of software artifacts produced in the software
    development process, such as specifications, manuals, programs, and
    test data, which traditionally were managed in a very ad-hoc and
    arbitrary manner.

    Active research and experimentation on object technologies in these
    diverse areas suggest that there are some underlying, fundamental
    principles common to a wide range of software development
    activities.  The first of the JSSST international series of symposia
    focuses on this topic.  The aim of this symposium is to bring
    together leading researchers in the areas of object-oriented
    programming, object-oriented databases, and software object bases.
    We hope to promote an understanding of object technologies in a
    wider context and to make progress towards the goal of finding a
    better framework for future advanced software development.

SCOPE:
    The scope of this symposium includes advanced object technologies in
    programming, database systems, and software processes.  Specific
    aspects of such object technologies include, but are not limited to,
    the theory and practice of:

        OO programming languages
        OO database management systems
        OO database programming languages
        Object management in software processes
        OO software development and environments
        Design and development of OO software systems
        Principles and design of software object bases
        OO reflective programming
        OO concurrent/parallel programming
        OO operating systems
        Active objects
        Constraint-based object models
        Supporting views in object base systems
        Version mechanisms in object base systems
        OO user interfaces

INSTRUCTIONS:
    Original papers on the above topics are invited.  These should be no
    longer than 5,000 words in length (double-spaced type, in English,
    including abstract and keywords).  The cover page should include
    authors' names, affiliations, complete postal as well as E-mail
    addresses, and telephone/facsimile numbers.  Please submit five (5)
    copies by March 25, 1993 to:

        Prof. Shojiro NISHIO
        Department of Information Systems Engineering
        Faculty of Engineering
        Osaka University
        2-1 Yamadaoka, Suita, Osaka 565, Japan
        E-mail: nishio@ise.osaka-u.ac.jp
        Facsimile:+81-6-875-0506

    The Symposium Proceedings is planned to be published by
    Springer-Verlag in the series, Lecture Notes in Computer Science.

IMPORTANT DATES:
    Papers Due:                 March 25, 1993
    Notification to Authors:    June 20, 1993
    Camera-Ready Copy Due:      July 31, 1993

SYMPOSIUM COMMITTEE:
    Symposium Chair:
        Takuya KATAYAMA (JAIST)
    Symposium Series Committee Chair:
        Mario TOKORO (Keio University/Sony CSL)
    Program Committee Co-Chairs:
        Shojiro NISHIO (Osaka University)
        Aki YONEZAWA (University of Tokyo)
    Executive Committee Chair:
        Koichiro OCHIMIZU (JAIST)
    Finance Chair:
        Kokichi FUTATSUGI (ETL/JAIST)
    Publicity Chair:
        Takuo WATANABE (JAIST)
    Local Arrangement Chair:
        Yoichi SHINODA (JAIST)

Program Committee Members:
    Tsuneo Ajisaka (Kyoto U.)
    Mehmet Aksit (U. of Twente)
    Malcolm Atkinson (U. of Glasgow)
    Francois Bancilhon (O2 Tech.)
    Klaus R. Dittrich (U. of Zurich)
    Kokichi Futatsugi (ETL/JAIST)
    Yutaka Ishikawa (ETL)
    Hyoung-Joo Kim (Seoul N. U.)
    Roger King (U. of Colorado)
    Tok-Wang Ling (N. U. of Singapore)
    Nazim Madhavji (McGill U.)
    Ole L. Madsen (Aarhus U.)
    Oscar Nierstrasz (U. of Geneva) 
    David Notkin (U. of Washington)
    Koichiro Ochimizu (JAIST)
    Atsushi Ohori (OKI)
    Junichi Rekimoto (NEC)
    Motoshi Saeki (Tokyo Inst. Tech.)
    Edward Sciore (Boston College)
    Etsuya Shibayama (Ryukoku U.)
    Shinji Shimojo (Osaka U.)
    Yoichi Shinoda (JAIST)
    Alan Snyder (Sun Microsystems)
    Ikuo Takeuchi (NTT)
    Katsumi Tanaka (Kobe U.)
    Mario Tokoro (Keio U./Sony CSL)
    Hideyuki Tokuda (Keio U./CMU)
    Katsuyasu Toyama (NTT)
    Takuo Watanabe (JAIST)
    Grant E. Weddell (U. of Waterloo)
    Peter Wegner (Brown U.)
    Jack Wileden (Univ. of Mass.)
    Kazumasa Yokota (ICOT)
    Masatoshi Yoshikawa (Kyoto Sangyo U.)
    Roberto Zicari (J.W. Goethe U.)

All correspondence should be addressed to Local Arrangement Chair:
    Dr. Yoichi SHINODA
    School of Information Science
    Japan Advanced Institute of Science and Technology (JAIST)
    15 Asahidai, Tatsunokuchi, Ishikawa 923-12, Japan
    Phone: +81-761-51-1251
    Fax:   +81-761-51-1116
    E-mail:jssst-symp93@jaist-east.ac.jp


======================================================================= 32 ===
Date:    Tue, 16 Mar 93 18:12:35 GMT
From:    detlefs@src.dec.com (Dave Detlefs)
Subject: Object qualification


Peter --

The "find" method of "Symbol.Table" has return type "Symbol.Entry".
Therefore, the static type of the expression "self.find(f(x))" is
"Symbol.Entry".  The OBJECT type "Symbol.Entry" has no "state" field;
only the subtype you defined, "StateEntry", does.  This is not one of
the cases in which the language performs an implicit narrow (there's
not enough information present here!) so you have to use an explicit
narrow.

  x := NARROW(self.find(f(x)), StateEntry).state

Alternatively, I believe you can override the find method of the "FSM"
subtype of "Symbol.Table" so that it returns a "StateEntry" instead of
an "Entry"; this should be legal because "StateEntry" is a subtype of
"Entry".  Then "self.find" will have the right type.

I hope this helps...

Dave



======================================================================= 33 ===
Date:    16 Mar 1993 13:22:18 GMT
From:    laszlo@post.ifi.uni-klu.ac.at (Prof.Dr.Laszlo BOESZOERMENYI)
Subject: Re: m3pc from gatekeeper.dec.com

Modula-3 was ported on the PC by Klaus Preschern,
at the University of Klagenfurt.
He has also been a summer student at SRC last year.

The system does not contain threads yet.
The compiler has already compiled itself on the PC, however.
The development of a student-friendly environment is in progress.

Cheers
Laszlo

------------------------------------------------------

Prof. Laszlo Boszormenyi
Institut fuer Informatik

Universitaet Klagenfurt
Universitaetsstr. 65-67
A-9022 Klagenfurt / Austria

e-mail:
laszlo@ifi.uni-klu.ac.at
Tel.: 
00-43-463-2700-509 
00-43-463-2700-507 (secr.)
Fax.:
00-43-463-2700-505 


======================================================================= 34 ===
Date:    16 Mar 93 15:49:58 GMT
From:    pbh@sbcs.sunysb.edu (Peter B. Henderson)
Subject: Object qualification


Wondering why the following will NOT work as shown?

Here  find(..) == PROCEDURE Find(self: Table; ....) : Entry ... = ....
(from the Symbol Table example in Harbison's text, page 223),
and

TYPE
  States = TEXT;
  StateEntry = Symbol.Entry OBJECT
                 state : States := "";
               OVERRIDES
                 print := PrintStateEntry;
               END;

  FSM = Symbol.Table OBJECT
                 InitialState,
                 FinalState :   States := "";
               METHODS
                 initialize(file:TEXT):FSM := Init;
                 run() := Run; 
               END;
VAR x : States;

'self' is of type FSM, and f(x) is a simple TEXT concatenation
function (this is a simple finite state machine simulator):

       x := self.find(f(x)).state;

           OR

       x := (self.find(f(x))).state;

"./fsm.m3", line 90: unknown qualification '.' (state)
"./fsm.m3", line 90: types are not assignable

When following works with introduction of intermediate variable:

VAR temp : StateEntry;

       temp := self.find(f(x));
       x := temp.state;

Thanks, 

Peter B. Henderson
SUNY at Stony Brook
pbh@cs.sunysb.edu


======================================================================= 35 ===
Date:    17 Mar 93 03:08:16 GMT
From:    doon@equinox.unr.edu (Harry W Reed)
Subject: Modula-3 for SVR4?

Hi!
	Does anybody know if Modula-3 has been ported to the Intel 386
running SVR4?

Cheers,
Harry Reed
doon@equinox.unr.edu

-- 
-- 
Harry W. Reed, Jr., BSE, MAR	| Never ascribe to malice that which can
doon@equinox.unr.edu 	  	| adequately be explained by stupidity.
---


======================================================================= 36 ===
Date:    17 Mar 93 03:04:52 GMT
From:    doon@equinox.unr.edu (Harry W Reed)
Subject: Modula-3 for SVR4?

Hi!
	Does anybody know if Modula-3 has been ported to the Intel 386
running SVR4?

Cheers,
Harry Reed
doon@equinox.unr.edu

-- 
-- 
Harry W. Reed, Jr., BSE, MAR	| Never ascribe to malice that which can
doon@equinox.unr.edu 	  	| adequately be explained by stupidity.
---


======================================================================= 37 ===
Date:    17 Mar 93 17:40:39 GMT
From:    jonas@ipcsun5.his.se (Jonas Mellin)
Subject: Pkl interface


Hi folks, I finally found the right newsgroup. The former article I
sent to comp.lanf.modula2. Thanks to all people that replied. 

I personally curse nntp for the moment. Anyway, I have problem with
the Pkl interface. I found the following examples in the "Systems
Programming with Modula-3" edited by Greg Nelson. I changed the reader
so I could find out which exception that was raised. I also included a
trace of the execution (it does not say much). The BadVersion
exception is raised for some reason. I could sit down and debug the
Pkl interface myself, but I thought there is probably (hopefully)
someone who has encountered this problem and solved it. If I do not
catch the exception the program produces a core fil after giving the
exception trace.

I can cope, because I constructed my own interface for direct access
files that can be used with threads and uses the fingerprints to check
the type (as the Pkl does). But I prefer to use standard if at all
possible. 

The modula-3 compiler is built on a Sun SPARC-10 with SunOs 4.1.3 (or
Solaris 1.1). I do have the test library, but I have not checked it
out properly. Is there any test that anyone could recommend that might
be useful?

***************************************************

MODULE P1 EXPORTS Main;
IMPORT Pkl, FileStream, Wr;
TYPE T = REF RECORD val:INTEGER END;
VAR r:=NEW(T, val:=6);
wr := FileStream.OpenWrite("A,pickle");

BEGIN
     Pkl.Write(r,wr);
     Wr.Close(wr);


END P1.

***************************************************


MODULE P2 EXPORTS Main;
IMPORT Pkl, FileStream, Wr, Stdio, Fmt,Rd;
TYPE U = REF RECORD val:INTEGER END;
VAR r:U;

BEGIN
     TRY
     	  r:=Pkl.Read(FileStream.OpenRead("A.pickle"));
     	  Wr.PutText(Stdio.stdout,Fmt.Int(r.val) & "\n");
     EXCEPT
     | Rd.Failure(BadVersion) =>
     	  Wr.PutText(Stdio.stdout,"Badversion\n");
     END;

END P2.

***************************************************

Script started on Wed Mar 17 18:23:57 1993
ipcsun5:~/SPRAK/MODULA [51]>pkl1
ipcsun5:~/SPRAK/MODULA [52]>pkl2
Badversion
ipcsun5:~/SPRAK/MODULA [53]>

script done on Wed Mar 17 18:24:09 1993

***************************************************

--
Disclaimer: Even a blind man may know how to C.
  	    Cynic is just my second name. Nihilist is my third.
	    Bohemian my fourth.
    _____________________________________________
   /      /  /    /   /\  /    /      /| /|	|E-mail: jonas@his.se
  /      /--/	 /    \  /    /	     / |/ | 	|UUCP:   ...!sunic!his!jonas
 /      /  /	/    \/ / /  /      /     |	|Phone:  +46 500 77692
/______________________/  \_/ onas /      |ellin|Fax:    +46 500 16325
Snailmail: Jonas Mellin,Hogskolan i Skovde, Box 408, 541 28 Skovde, Sweden

			    			  


======================================================================= 38 ===
Date:    Wed, 17 Mar 1993 15:25:03 GMT
From:    kirschnt@informatik.uni-muenchen.de (Torsten R. Kirschner)
Subject: summary of answers to "M3-2.11 for HPPA -- threads do not work (?)"


Dear Netfellows,

a while ago I inquired about fixes for the HPPA port. Here is what
I found out, almost completely due to mails from other M3 users on
HPPA, namely Pierre T. Hj{lm <d90phj@csd.uu.se> and Bert Laverman
<laverman@cs.rug.nl>.

Since I lack the time for a better bug report, I did not use diff
or other utilities to document the changes. Everyone has to read
through this and apply the fixes by hand.

1. The "ASSERT failed" problem (Bert, Pierre)

In file libm3/thread/src/Thread.m3 change the line
      frameLoad := RTMisc.Align (s_first + ADRSIZE (Word.T) + SPinFrame,
                                 RTStack.StackFrameAlignment) - SPinFrame;
to
      frameLoad := RTMisc.Align (s_first + 128 * ADRSIZE (Word.T) + SPinFrame
,
                                 RTStack.StackFrameAlignment) - SPinFrame;

Pierre writes a good factor is to be 8 < factor <= 128, but
we don't no a better one yet.

Also, in file libm3/runtime/src/HPPA/RTStack.i3, set StackFrameAlignment
to 1024. It is a safe but probably exagerated value.

In file libm3/Csupport/src/HPPA/M3Machine.h, delete the line containing
HP_ALIGN.

Unfortunately, these fixes improve the port, but are insufficient to
get the window system to work 100%. Even if the Thread tests work fine
now, Trestle still crashes.

Here is a snapshot of what I get when I run the ptests:
--- p004 --- exception mechanism
8,10d7
< ccom: Warning: Main.m3, line 82: statement not reached
<        }   }  _L23:;
<       -^
--- p005 --- a simple thread program
--- p006 --- a bit more complicated
--- p007 --- a whole bunch of threads - does the memory grow ?
--- p008 --- thread alerts
So far, no problem.

2. Shared libraries (Pierre, Bert)

Apperently, I have been the only one in the world who hasn't set them
up yet. If there is on more of my kind out there, here's how to do it:

The compiler has to let the *.o and *.[mi]o files hang around, so the
linker can bind them into a shared lib.
Therefor, you use these M3OPTS: -k -X1@+Z@
If anybody wonders, the +Z is used instead +z, since at least the m3tk
package needs it. By hand, you can then go to the specific package/HPPA
directory and do a ld -b -o package.sl *.o *.[mi]o

I will supply a piece of code for toplevel.tmpl to get things done
automatically when I get it to work right. Again, Pierre has already
mailed me a very good prototype.

3. Miscelleanous stuff

- in libm3/unix/src/hpux-7-0, Uin.[mi]3 are missing. I simply linked
libm3/unix/src/sysv-4.0/Uin.[mi]3 instead of them.

- an evolutionary bug: in file libm3/unix/srchpux-7-0/Usocket.i3, line
24, append an "N" to "SOCK_DGRA". This can also be found in the ports
to aix-3-2, aix-ps2-1-2 and ibm-4-3.


Again, thanks to all those who helped to find out about these things.

I have set up a mailing list "m3-hppa@informatik.uni-muenchen.de",
in order to provide a forum for programmers working with M3 on HPPA
and especially those working on that port itself.
I think it could make sense to take away netload from c.l.m3 and
only post the results regularly. Everybody is invited to join, simply
send a message to that address.

Yours

Torsten
-- 
               kirschnt@informatik.{tu|uni}-muenchen.de


======================================================================= 39 ===
Date:    Thu, 18 Mar 93 20:30:07 GMT
From:    harrison@src.dec.com (Stephen Harrison)
Subject: Re: Pkl interface



Jonas,

I don't quite understand the problem you describe with Pkl, but I think I
spotted a typo in your program.

The program P1 writes the file ``A,pickle'' and P2 tries to read from
``A.pickle''---a different file.

You can modify P2 to

  MODULE P2 EXPORTS Main;

  IMPORT Pkl, FileStream, Wr, Stdio, Fmt, Rd, Cerrno;

  TYPE U = REF RECORD val: INTEGER END;

  VAR r: U;

  BEGIN
    TRY
      r := Pkl.Read(FileStream.OpenRead("A.pickle"));
      Wr.PutText(Stdio.stdout, Fmt.Int(r.val) & "\n");
    EXCEPT
    | Rd.Failure =>
	Wr.PutText(Stdio.stdout,
		   Fmt.F("Rd.Failure: errno = %s\n", Fmt.Int(Cerrno.errno)));
    END;
  END P2.

You'll see that Rd.Failure is being raised, and errno is set to ENOENT (= 2 o
n
my system).  Making the filenames agree allows P2 to run correctly.

Pkl.Read raises Error(BadVersion) if it cannot decode an old-version pickle,
or if the file is not a pickle at all.  Is this you problem?


/Stephen

--
Stephen Harrison              | harrison@pa.dec.com
Systems Research Center       | harrison@well.sf.ca.us
Digital Equipment Corporation | work +1 (415) 853-2140
130 Lytton Avenue             | fax  +1 (415) 853-2104
Palo Alto, CA 94301, USA      | home +1 (408) 739-7734



======================================================================= 40 ===
Date:    Fri, 19 Mar 1993 19:03:04 GMT
From:    matess@gsusgi1.gsu.edu (Eliza Strickler)
Subject: Has modula3 been ported to Solaris?

I was hoping that modula3 has been ported to Solaris.
Does anyone know if it has been or plans to be.

Any info would be helpful.

Elizabeth
-- 


\|/--_   -_-      ----           ###         _- ----------------------
-0    -_-   --       -__ %~- ____#0        _-   Elizabeth Strickler
|\     ^                 0\~     /\   /\  -     
|_(___/ \_    ||_________/     _/  |_/  \_      matess@gsusgi1.gsu.edu 


======================================================================= 41 ===
Date:    Mon, 22 Mar 1993 16:49:00 GMT
From:    rro@CS.ColoState.EDU (Rod Oldehoeft)
Subject: Revised Harbison errata list

A newly revised errata list for Harbison's "MODULA-3" is available
via anonymous ftp from beethoven.cs.colostate.edu.  The revision
date is March 22, 1993.

Directory ~ftp/pub/M3 contains .tex, .dvi, and .ps.Z files.





======================================================================= 42 ===
Date:    22 Mar 93 20:05:23 GMT
From:    jonas@ipcsun5.his.se (Jonas Mellin)
Subject: Re: Pkl interface: OOPS


I realised that I did not fully understand how to catch an exception
in Modula-3 until now. I think I got it right this time. The failure
that is raised is as far as I have understood
Rd.Failure(IOFailure.open) not Error(Code.BadVersion). As someone
politely told me that I made a typo in the filename of the first
example, but I did not read it carefully. Because of my pride (or
some other fault) I did not see it. Anyway, the examples work. 




--
Disclaimer: Even a blind man may know how to C.
  	    Cynic is just my second name. Nihilist is my third.
	    Bohemian my fourth.
    _____________________________________________
   /      /  /    /   /\  /    /      /| /|	|E-mail: jonas@his.se
  /      /--/	 /    \  /    /	     / |/ | 	|UUCP:   ...!sunic!his!jonas
 /      /  /	/    \/ / /  /      /     |	|Phone:  +46 500 77692
/______________________/  \_/ onas /      |ellin|Fax:    +46 500 16325
Snailmail: Jonas Mellin,Hogskolan i Skovde, Box 408, 541 28 Skovde, Sweden

			    			  


======================================================================= 43 ===
Date:    Mon, 22 Mar 93 15:02:32 CST
From:    EM306965@itesmvf1.rzs.itesm.mx
Subject: 1Mb Hello World...!? Is this normal?

Hello.
IXve finished installing the Modula-3 compiler (SRC) on a Sparcserver600
and I tried it out with the example Hello world program in the Doc file
and it creadted a 1Mb executable. Is this correct? Is there any way to
reduce the size?
Could someone explain the size of the file and or any way to reduce it.
 
Thanks
 
+Gus Cavazos


======================================================================= 44 ===
Date:    Tue, 23 Mar 1993 05:12:51 GMT
From:    buzy@quads.uchicago.edu (Len Buzyna)
Subject: DidYouKnow...

Today Japanese companies own the 7/11 store chain, Dunlop, Universal Pictures
, 
Columbia Pictures, Loews Theaters, MCA Home Entertainment, Tri-Star Pictures,
 
CBS Records, Columbia Records, Spencers stores, Ciniplex Odeon (a big part),
Firestone Tires and many many more very large US companies while foreigners
are prevented from owning any important Japanese concerns. Ordinary Japanese 
are kind wonderful people, but what their companies and government are doing 
is racist and wrong.
 
     To find out more about this (and get a more complete list of the above),
 
read (JAPANYES) "Does America Say Yes To Japan?";Leclerc 1992,93 which is 
available on INTERNET. (most recent edition is v031993). This thoughtfully 
written and important article has been circulating widely in many of America'
s 
biggest corporations & universities like IBM & Harvard. When you read it (it 
takes about 30 minutes), you'll see why.
 
     The essay provides a frightening yet fascinating detailed, referenced 
overview of the Japanese industrial machine at work and how Japan practices 
'business is war' strategies to target and take over strategic critical U.S. 
industries like high technology, popular media and heavy industry as well as 
influence the decisions of the US government in favor of Japan. It is a very 
moving piece and is filled with many verifiable and disturbing examples. 
You can get JAPANYES 1 of 3 ways:
 
1)FTP to monu6.cc.monash.edu.au   it's in directory: pub/nihongo   as: JAPANY
ES
2)The article has been posted in its entirety (in three sections however)
  in the misc.test & soc.culture.usa & sci.econ newsgroups. Search on the
  author 'buzy' or the title 'article' to find the posts.
3)Email a request for JAPANYES to ar12@midway.uchicago.edu
  He will email you a copy.


======================================================================= 45 ===
Date:    Tue, 23 Mar 1993 09:47:21 GMT
From:    dickman@gmd.de (Peter Dickman)
Subject: Re: DidYouKnow...

I don't for the life of me see what this has to do with any of the groups it
was posted too, but I'm going to commit a gross breach of netiquette and
respond anyway. Apologies if that annoys you.

I suggest follow-ups should go to  soc.culture.usa  or email to me
Please do NOT flood all these groups with responses.


In <1993Mar23.051251.8720@midway.uchicago.edu> buzy@quads.uchicago.edu 
(Len Buzyna) writes:

> Distribution: usa
(Interesting that the restriction to USA distribution failed - I read the
message in Germany; but perhaps it's a good thing that the rest of the world
sees the attitudes that some people in the USA are busy trying to spread)

>Today Japanese companies own the 7/11 store chain, Dunlop, Universal Picture
s,
>Columbia Pictures, Loews Theaters, MCA Home Entertainment, Tri-Star Pictures
, 
>CBS Records, Columbia Records, Spencers stores, Ciniplex Odeon (a big part),
>Firestone Tires and many many more very large US companies 

Sure, but the UK owns rather more of the USA than Japan does. Lots of the
companies you think are USA owned aren't - they belong to the British, the
Japanese, various other European countries and so on. Don't forget that
they are providing employment for US citizens, offering services and goods
to the US population, and so on. Oh, and someone in the USA made a lot of
money when they sold these companies - money that could have been used to
buy or build up equivalent assets.

(Incidentally, do you mean "US companies" above? If they are Japanese owned
surely you can't describe them as US companies. Do you mean companies that
operate in the USA, or ones that were founded there?)

> while foreigners are prevented from owning any important Japanese concerns.
 

Not "prevented", if I don't want to sell you my house that's my decision not
yours. There are no rules in Japan saying that you, an American, cannot own
a company in Japan. You may find it hard buying one though, but it's pretty
hard for anyone to buy a company in Japan (be they Japanese or not) and it 
will be difficult to build up a successful company from nothing... partly for
the reasons given in the document you cite and partly because it is very
difficult to do that anywhere.

> Ordinary Japanese are kind wonderful people, 

I'm still surprised that you aren't complaining about the British - we own 
more and we are very rude about Americans.

> but what their companies and government are doing is racist and wrong.

It isn't racist. That suggests it is related to the division of the human
species into races. A US-born US-citizen of Japanese descent would find 
themselves in exactly the same position as a US-born US-citizen of any other 
ethnic origin in this regard.
It is, however, very nationalistic. But from where I sit in Europe it looks
like the US in general, and US-citizens in particular, are every bit as
nationalistic as the Japanese in most situations. 
[The US steel industry has been subsidised for decades through defence
contracts, the European ones have also been subsidised - directly - for
as long, and to no greater an extent. Yet the US is imposing enormous tariffs
on EC steel, even though we are the only large trading block in the world
which buys more goods from the US than we sell to the US - explain that one]

It is only wrong according to your value system, not according to the Japanes
e
ones, and you'd find that their attitude to Japanese industry has a lot in
common with French and German attitudes to French and German industry.
(I don't believe in total cultural relativism, but unthinking acceptance of
ones own cultural prejudices is just as harmful as unthinking rejection)

(Please note that I have argued that the claim of racism above is invalid;
I do not claim that the Japanese either are, or are not, racist - just that
their industrial policy does not prove that they are racist)

[Advert for "Does America Say Yes to Japan?" removed. (Yes, I have read it)]

The main thrust of the article is that Japan isn't playing fair. But implicit
in the article is the assumption that the US version of the rules for "free
trade" constitute the only "fair" way to "play the game" of world trade.

It's interesting that in the US-EC trade-war (sorry, it isn't a war, 
trade-conflict; just like the Falklands War wasn't a war either), the US 
complaint about unfair subsidies uses a definition of subsidy which 
includes most forms of support offered to EC industry and agriculture but 
excludes most forms of support offered to US industry and agriculture.

No-one can deny that the long-termism inherent in current Japanese industrial
strategy has provided them with some advantages over the short-termism 
typical of recent American and British lack-of-strategy. It's hardly fair to
complain that this constitutes unfair behaviour on the part of the Japanese
though. An analogy: I'm not very good at cricket; should I demand that the
rules are changed to limit the speed of delivery, to make the ball softer,
to move the fielders further away from me etc etc, or should I attempt to
find a role for myself that suits my abilities? (scorekeeper perhaps?).

Note that I am not advocating a return to trade barriers.

I can't help feeling that if US industry spent less time complaining and more
 
time doing its job there'd be less to complain about. Of course it would help
if US companies and stockholders were more interested in long-term investment
and less interested in selling out to make a quick buck. The US government
is noticeably less interventionist than the French, German or Japanese ones;
but US business seems to object to interventionist government, surely they
can't have it both ways?

It may be interesting, finally, to note that Britain's industrial collapse is
far more severe than that in the US (our government seems to have actively
intervened to damage the manufacturing base), that there is substantial
Japanese investment in the UK (most manufacturing investment recently has
been from sources outside the UK) and that there is no sign of the blatant
anti-Japanese sentiment found in the US.

The complaint in the UK is about our own short-termism and the damaging effec
t
of pure laissez-faire economics in a society in which greed is widespread.
Perhaps there's a lesson there for the USA too?

It's nice to have a scapegoat, but it's much more useful in the long-run to
actually understand the problem.

--Peter

PS Don't forget: follow-ups by email or to soc.culture.usa would be preferred
   (Unless someone can *prove* that the Japanese just took over all the world
s
    programming languages as part of a formal programme of cultural hegemony)

-----------------------------------------------------------------------------
--
Peter.Dickman@gmd.de       ERCIM Fellow, currently at GMD St Augustin, German
y
-----------------------------------------------------------------------------
--
Only in the USA could lawyers demand that I state publicly that I think for
myself. Just for them: if this were an official point of view it would say so
.
-----------------------------------------------------------------------------
--
The UK has accountants, the USA has lawyers; others have manufacturing indust
ry
-----------------------------------------------------------------------------
--


======================================================================= 46 ===
Date:    23 Mar 93 13:35:14 GMT
From:    murray@cs.strath.ac.uk (Murray I. Wood)
Subject: Modula-3 as a Teaching Language


Here at the University of Strathclyde we are considering overhauling our
teaching of programming. The basic idea is to teach Scheme in first year
and then in second year teach an imperative language followed by the
introduction of object-orientedness.

We are currently exploring suitable languages to teach imperative
programming for the next 5 or so years. I have been given the task of
exploring Modula-3 as a candidate language. Unfortunately my knowledge of
Modula-3 consists of the contents of Harbison's 1990 Byte article.

I would therefore welcome any comments on the suitability of Modula-3 as an
introductory imperative teaching language (or pointers to relevant
literature).

Issues that we are using to assess the language include:

-	suitability as a teaching language
-	strength of type checking
-	support for modularity, abstraction and information hiding
-	applicability for later classes e.g. software engineering,
	operating systems and real time systems
-	availability on PCs and Unix based workstations (Sparcs)
-	practicalities e.g. environment/tool support, compile/run-time
	speeds and memory requirements
-	cost
-	supporting literature and software
-	subsequent marketability of students


Thanks,
Murray Wood
Dept. Computer Science


======================================================================= 47 ===
Date:    Tue, 23 Mar 1993 15:47:34 GMT
From:    mlo@dcs.qmw.ac.uk (Mike Osborne)
Subject: Re: Modula-3 as a Teaching Language

In <1on3mi$lga@baird.cs.strath.ac.uk> murray@cs.strath.ac.uk (Murray I. Wood)
 writes:

>Issues that we are using to assess the language include:

>-	suitability as a teaching language
>-	strength of type checking
>-	support for modularity, abstraction and information hiding
>-	applicability for later classes e.g. software engineering,
>	operating systems and real time systems
>-	availability on PCs and Unix based workstations (Sparcs)
>-	practicalities e.g. environment/tool support, compile/run-time
>	speeds and memory requirements
>-	cost
>-	supporting literature and software
>-	subsequent marketability of students


Well, we have been using Modula-3 as the main imperative programming language
at QMW for the past two years. My experience is from the support side.
I'll try and address the issues which I have knowledge about.

>-      support for modularity, abstraction and information hiding
M3 has extensive support for these facilities, In addition it supports object
oriented programming, and has support for concurrency (real or simulated) in 
the
form of threads, which are part of the language.

>-      applicability for later classes e.g. software engineering,
This year some of our software engineering students have used Modula-3, other
s
have used C, and even Smalltalk-80. Modula-3 has the facility to call procedu
res
written in other languages, there is an X11 interface for example, and I have
written a small interface to some of the curses library stuff. The main
complaint we seem to have from students is the 'turnaround time' for compilat
ion
which is noticably slower than for C (but this is probably because of hardwar
e
limitations, and not the m3 compiler).

>-      availability on PCs and Unix based workstations (Sparcs)
M3 is available for quite a few platforms from gatekeeper.dec.com, including
SPARCS, and PCs (m3pc) 
There is also a GNU M3 compiler in the pipeline, although I'm not sure of the
current status (maybe someone else can answer this one).

>-      practicalities e.g. environment/tool support, compile/run-time
There are a large amount of addtional tools and interfaces for Modula3 includ
ing
m3make, the trestle windowing system, the Pinecreek library, Mentor, Zeus, X1
1,
m3tk, a Sun RPC interface,  an interface to the ISIS distributed toolkit,
and a networking (BSD sockets) interface.

>       speeds and memory requirements
We are currently running M3 on Mac IIcx's and ci's with 8mb of physical memor
y
and the resulting performance is shall we say "sub-optimal" This is not reall
y
a fault of Modula-3, but I believe you would want to use something like an SL
C
for performance not to be noticably bad. 
The SRC M3 compiler targets C, so you have the additional stage of compiling 
the
C once you have compiled the Modula-3.
The m3 compiler output can be a bit of a space hog, so you would probably wan
t
to use shared libraries, and leave out the debugging information from the C 
compiler stage. The hello world program for a Mac takes up around 300k here.

>-      cost
M3 from SRC is freely distributable (as far as I am aware) It is not public
domain. (Commercial use requires you to sign something).

>-      supporting literature and software
There are two very good Modula-3 books which describe the language,

Greg Nelson's "System Programming with Modula-3" (A bit advanced for teaching
)
and Sam Harbisons "Modula-3" (This is the K&R of Modula-3!)

We used Sue Eisenbach's Modula-2 textbook, there were no Modula-3 teaching te
xts
available at the time, I believe there is at least one available now (can't
remember the title).

>-      subsequent marketability of students
I don't see too many advertisments for "Modula-3 programmers", but then on
the other hand I see a lot of adverts for "Cobol programmers". I believe that
Cambridge University use Modula-3 as their main imperative programming langua
ge.
If it's good enough for them.....

In conclusion, (if you have the time) why not download the compiler from 
gatekeeper.dec.com (version 2.11) and build it, try compiling the examples an
d
judge for yourself about the performance. 


>Thanks,
>Murray Wood
>Dept. Computer Science

Mike
-- 
Michael Osborne	                  	Internet:  mlo@dcs.qmw.ac.uk
Computer Science Department    
Queen Mary & Westfield College  
Mile End Road                   	Telephone: +44 71-975 5244/5/9


======================================================================= 48 ===
Date:    Tue, 23 Mar 1993 17:26:53 GMT
From:    robinson@EuroPARC.Xerox.COM (Peter Robinson)
Subject: Re: Modula-3 as a Teaching Language

[Second attempt at responding; this shouldbe better formatted.]

In article <1on3mi$lga@baird.cs.strath.ac.uk>, murray@cs.strath.ac.uk
(Murray I. Wood) writes:
> 
> Here at the University of Strathclyde we are considering overhauling our
> teaching of programming. The basic idea is to teach Scheme in first year
> and then in second year teach an imperative language followed by the
> introduction of object-orientedness.

Your proposal is very similar to the approach that we have taken on the
Computer Science course at the University of Cambridge for the past
three years.  We are keen to introduce the idea of strong typing early,
so we use ML rather than Scheme as the introductory language at the
beginning of the first year.  Modula-3 is used to introduce imperative
programming at the end of that year and further lectures on advanced
features of the language are given at the beginning of the second year;
objects mark the boundary between the two parts.  The programming
strand of the overall course then continues with C, Prolog and other
languages.

Modula-3 is a serious, industrial strength language with facilities for
all of type checking with explicit loopholes, modularity, abstraction
and information hiding.  It also serves to illustrate programming
language principles, compiling techniques and software engineering, and
is suitable for practical exercises on data structures and algorithms
and concurrent systems.  There are extensive libraries, including an
elegant user interface toolkit and network objects for distributed
computing.  It is often the students' chosen language for final year
projects.

There is an implementation for many Unix machines available free from
DEC SRC.  The Sparc variant has the advantage of offering shared
libraries.  A PC version has recently become available and further
developments are in hand.  Memory requirements are substantial and
speed will depend on your filing system.  We have had difficulties with
an overloaded NFS server.

My personal opinion is that Modula-3 is an excellent language for
teaching, but not as a first language, where something like ML is
better.  There are two books in print.  Systems programming with
Modula-3, edited by Greg Nelson, gives a concise description of the
language and then works through some sample code to illustrate its
features.  The concluding chapter on the language's design is brilliant
and should be compulsory (not to say compulsive) reading for all
computer scientists.  Modula-3, by Sam Harbison, is a more
straightforward text book.  Both are published by Prentice Hall.

Again, my personal opinion is that students who have learned Modula-3
will be familiar with a wide variety of modern programming techniques
and would easily be able to learn other languages and to use them in a
disciplined way.  This should make them marketable.

For what it's worth, I have taught the Modula-3 courses at Cambridge
for the past three years, and have enjoyed the experience.  I think
that the students have too (but they will probably voice their opinions
if they haven't!).  There was a paper in the 1991 Modula-2 conference
describing our approach.

- Peter Robinson.
University of Cambridge Computer Laboratory,
currently on leave working at Rank Xerox EuroPARC.


======================================================================= 49 ===
Date:    23 Mar 93 18:32:17 GMT
From:    jonas@ipcsun5.his.se (Jonas Mellin)
Subject: Seek in Rd and Wr


A while ago I posted an article about problems with pickles (on
comp.lang.modula2 no comp.lang.modula3). Now I found what the problem
is, the Seek in Wr (and I assume Rd) peform seeks in bytes not in
records. I assumed that it performed it in records first and that
resulted in a heavily corrupted file. Is this the way it is meant to
be? Or have I missed something vitally important somewhere? 

If seeks are performed in bytes, is there any other way of getting the
size of a type other than using the RT0u interface?



--
Disclaimer: Even a blind man may know how to C.
  	    Cynic is just my second name. Nihilist is my third.
	    Bohemian my fourth.
    _____________________________________________
   /      /  /    /   /\  /    /      /| /|	|E-mail: jonas@his.se
  /      /--/	 /    \  /    /	     / |/ | 	|UUCP:   ...!sunic!his!jonas
 /      /  /	/    \/ / /  /      /     |	|Phone:  +46 500 77692
/______________________/  \_/ onas /      |ellin|Fax:    +46 500 16325
Snailmail: Jonas Mellin,Hogskolan i Skovde, Box 408, 541 28 Skovde, Sweden

			    			  


======================================================================= 50 ===
Date:    Wed, 24 Mar 1993 02:03:03 GMT
From:    jmkomine@neumann.uwaterloo.ca ()
Subject: Re: Revised Harbison errata list

Does anyone know what's happened to Sam Harbison and Pine Creek Software?
He had a Modula-3 newsletter that lasted 2 issues and then vanished.
Financial problems?  Or something worse still?


John Kominek


======================================================================= 51 ===
Date:    Wed, 24 Mar 1993 07:45:56 GMT
From:    yhlee@napier.uwaterloo.ca (Yoon H. Lee)
Subject: HELP


Can any body give me some hints for the TYPECASE statement?


======================================================================= 52 ===
Date:    Wed, 24 Mar 1993 02:08:30 GMT
From:    
Subject: Looking for M3 for Hp 7xx series machines

Hi folx, I am looking for a PD, or for that matter
even one I can pay for Modula-3 compiler for the 
HP 7XX series machines.

Thanx in advance

/pgr
prich@coltrane.apple.com


======================================================================= 53 ===
Date:    Wed, 24 Mar 1993 14:34:14 GMT
From:    dagenais@alberich.vlsi.polymtl.ca (Michel Dagenais)
Subject: Re: Revised Harbison errata list


   Does anyone know what's happened to Sam Harbison and Pine Creek Software?
   He had a Modula-3 newsletter that lasted 2 issues and then vanished.
   Financial problems?  Or something worse still?

Pinecreek is, as far as i know, a "part time" company that distributed this
newsletter and got Sweat Shirts printed. Sam Harbison was pretty much a
full time Modula 3 evangelist for a number of months, writing the Modula 3
book, and the newsletter, among other things.

Last June he started at a Compiler company with a high responsability job
(Tartan if i recall correctly) and probably does not have as much time
available anymore.
--
---------------------------------------------------------------------

Prof. Michel Dagenais			    dagenais@vlsi.polymtl.ca
Dept of Electrical and Computer Eng.
Ecole Polytechnique de Montreal		    tel: (514) 340-4029

---------------------------------------------------------------------


======================================================================= 54 ===
Date:    Wed, 24 Mar 1993 18:08:59 GMT
From:    kirschnt@informatik.uni-muenchen.de (Torsten R. Kirschner)
Subject: Re: Looking for M3 for Hp 7xx series machines

(Paul Richardson) writes:
>Hi folx, I am looking for a PD, or for that matter
>even one I can pay for Modula-3 compiler for the 
>HP 7XX series machines.

>From the M3-FAQ:
[...]
Where can I get an implementation ?

   There is only one implementation available today.  It has been built
   by SRC and is available via anonymous ftp from gatekeeper.dec.com in
   pub/DEC/Modula-3/release.  Contributed software can be found
   in pub/DEC/Modula-3/contrib.

[end of quote]

Maybe the/my FAQ is not up to date (it's M3 2.07), but actually for the
current version of M3, 2.11, there's also this file:
/pub/DEC/Modula-3/release/boot.HPPA-2.11.tar.Z

It is, as you might have guessed, a M3 port to HP precesion architecture.
Known problems are an a little instable thread handler and the floating
point stuff.
However, it is free, but (c) DEC SRC. See the docs for DEC licenses.

Torsten
-- 
               kirschnt@informatik.{tu|uni}-muenchen.de


======================================================================= 55 ===
Date:    Wed, 24 Mar 93 19:58:11 GMT
From:    gkt@iitmax.iit.edu (George Thiruvathukal)
Subject: Modula-3 Availability

Can somebody point me to the exact location of the Modula-3 compiler being
distributed by DEC? Is source code included?

Does Modula-3 support the following?
 - single and multiple inheritance
 - name overloading
 - operator overloading

Thanks,
George Thiruvathukal (gkt@iitmax.acc.iit.edu)
-- 
George Thiruvathukal + IIT Computer Science + gkt@iitmax.iit.edu + 708-355-15
07


======================================================================= 56 ===
Date:    Thu, 25 Mar 1993 01:19:44 GMT
From:    najork@cs.uiuc.edu (Marc Najork)
Subject: Re: Modula-3 Availability

In article <1993Mar24.195811.4152@iitmax.iit.edu>, gkt@iitmax.iit.edu (George
 Thiruvathukal) writes:
|> Can somebody point me to the exact location of the Modula-3 compiler being
|> distributed by DEC? Is source code included?
|> 
|> Does Modula-3 support the following?
|>  - single and multiple inheritance
|>  - name overloading
|>  - operator overloading
|> 
|> Thanks,
|> George Thiruvathukal (gkt@iitmax.acc.iit.edu)
|> -- 
|> George Thiruvathukal + IIT Computer Science + gkt@iitmax.iit.edu + 708-355
-1507

Modula-3 can be obtained via anonymous ftp from gatekeeper.dec.com,
directory /pub/DEC/Modula-3/release.

The distribution contains "generic" Modula-3 sources as well as
machine-specific C sources. For a number of machines you can simply
compile the C sources, giving you the core compiler, and then use 
this compiler to compile all the assorted libraries (this works very 
well).

In theory, you should also be able to port the system to a new 
architecture by cross-compiling it for the new architecture 
on a supported architecture. I tried to do this for an SGI Iris,
but failed (then again, I didn't try too hard).

Modula-3 supports single, but not multiple inheritance.

It does not allow you to define your own operators, however, some
of the predefined operators are "overloaded" (i.e. use ad-hoc 
polymorphism).

I'm not sure what you mean by "name overloading". Modula-3 does
not allow you to define ad-hoc polymorphic functions.

In other words, you cannot write

    PROCEDURE Mult (a : INTEGER; b : INTEGER) : INTEGER = ...

    PROCEDURE Mult (a : Matrix; b : Matrix) : Matrix = ...

and expect that a call Mult (foo, bar) will magically call the
right procedure, based on the types of foo and bar.


However, Modula-3 is an object-oriented language, i.e. features 
late-bound procedure calls, which you can use for a technique 
called double dispatching, which gives you something quite similar.


So, you could define an object type, say Factor, with two subtypes
Integer (not INTEGER!) and Matrix. Then you could provide methods 
that


TYPE Factor = OBJECT
     METHODS
       mult (a, b : Factor) : Factor;
       multWithInteger (a : Factor; b : Integer) : Factor;
       multWithMatrix (a : Factor; b : Matrix) : Factor;
     END;

     Matrix = Factor OBJECT 
       m : ARRAY OF ARRAY OF INTEGER;
     OVERRIDES 
       mult := MatrixMult;
       multWithInteger := MatrixMultWithInteger;
       multWithMatrix  := MatrixMultWithMatrix;
     END;

     Integer = Factor OBJECT 
       i : INTEGER;
     OVERRIDES 
       mult := IntegerMult;
       multWithInteger := IntegerMultWithInteger;
       multWithMatrix  := IntegerMultWithMatrix;
     END;

PROCEDURE MatrixMult (a : Matrix; b : Factor) : Factor =
  BEGIN
    RETURN b.multWithMatrix (a);
  END MatrixMult;

PROCEDURE IntegerMult (a : Integer; b : Factor) : Factor =
  BEGIN
    RETURN b.multWithInteger (a);
  END IntegerMult;

PROCEDURE MatrixMultWithInteger (a : Matrix; b : Integer) : Factor =
  BEGIN
    (* here you know that a is a matrix and b is an integer,
       so you can do whatever is appropriate *)
  END MatrixMultWithInteger;

PROCEDURE MatrixMultWithMatrix (a, b : Matrix) : Factor =
  BEGIN
    (* here you know that both a and b are matrices,
       so you can do the right thing *)
  END MatrixMultWithMatrix;

...


So, the basic idea is to use the late-bound procedure call mechanism
(i.e. the run-time lookup of the right method) to figure out the types
of all arguments. For ternary functions, you need triple dispatching,
and so on ...

The catch, of course, is that things have to fit into your class 
hierarchy. For things which are not objects (like INTEGER or REAL)
or for things which are already part of some class hierarchy, it
might be necessary to create a "wrapper" class. In this example,
Integer is a "wrapper" class for INTEGER.


-- Marc


======================================================================= 57 ===
Date:    Fri, 26 Mar 1993 02:38:28 GMT
From:    najork@cs.uiuc.edu (Marc Najork)
Subject: Re: Modula-3 Availability

Jim Meehan (meehan@src.dec.com) pointed out a mistake in my previous post: 


    TYPE Factor = OBJECT
         METHODS
           mult (a, b : Factor) : Factor;
           multWithInteger (a : Factor; b : Integer) : Factor;
           multWithMatrix (a : Factor; b : Matrix) : Factor;
         END;
    
should be:

    TYPE Factor = OBJECT
         METHODS
           mult (b: Factor): Factor;
           multWithInteger (b: Integer): Factor;
           multiWithMatrix (b: Matrix): Factor
         END;


Well, that should teach me not to post anything before trying 
to compile it ... anyways, thanks Jim!


-- Marc


======================================================================= 58 ===
Date:    Thu, 25 Mar 93 23:55:38 GMT
From:    bnfb@csr.UVic.CA (Bjorn Freeman-Benson)
Subject: Know of any good demos?

As Demonstrations Chair of OOPSLA'93, I am searching for interesting,
exciting, relevant, etc. demos of object oriented technology and systems.
Not only is Modula-3 an object oriented language, thereby qualifying
many programs written it, but I also believe that there are many
interesting tools, applications, systems, and solutions written in
Modula-3 that would make fantastic technical demonstrations at OOPSLA.

So, if you have a demo, or you know someone who does, please contact me at:

    Bjorn N. Freeman-Benson
    OOPLSA'93 Demonstrations Chair
    bnfb@cs.uvic.ca
    (604) 721-6019
    (604) 721-7292 [FAX]

"But," you wonder, "will my demo get in?"  There has always been plenty of
space for demos at OOPSLAs past and there is no reason to believe otherwise
this time around -- good demos will get in.  (Note that sales pitches will
not.  Also note that it is possible to give a good technical demo of a
commercial product without giving a sales pitch.)  I encourage the
submission of demos of interesting commercial products, interesting
research efforts, interesting ... get the idea?

"But why should I bother?," you ask.  Because OOPSLA is the premier
gathering of technical people in the object oriented community, and a
fantastic, out-of-this-world demo to this crowd will do wonders for the
image of your system, framework, application, solution, ...  

Thanks for your submissions and suggestions,
Bjorn N. Freeman-Benson


======================================================================= 59 ===
Date:    Sat, 27 Mar 93 14:07:06 CST
From:    EM306965@itesmvf1.rzs.itesm.mx
Subject: M3Machine.h for SPARC

Hello...
     While tying to install the shared library patches for Sparcs, I
     accidentally erased the M3MAchine.h.
     Is this a generic file for all Sparcs, if so, could someone sen a copy
     to me.
 
Thanks,
+Gus


======================================================================= 60 ===
Date:    Sun, 28 Mar 93 14:02:08 -0800
From:    meehan@src.dec.com
Subject: Re: Debuggers


    Is there a debugger for m3 for the DECs or the SPARCs? I tried 
    to find it in the FAQ, but I didn't see one.    If there isn't, 
    is there one for ANY machine? 

There isn't a specific M3 debugger; since the released compiler generates 
C code, we use dbx or gdb. Not great, but better than nothing. Here
are some tips:

1. Keep in mind that the Modula symbol "Foo.Baz" is internally named
"Foo__Baz", which is what you have to type to the debugger. Also, the
type "Text.T" is an alias for the type "TEXT" (not the other way
around), and the type "Thread.Mutex" is an alias for the type "MUTEX",
so use the all-caps versions when you're casting in the debugger.

2. You should tell the debugger to ignore SIGSEGV and SIGVTALRM.
SIGSEGV is handled by (indeed, the basic tool of) the garbage
collector, and SIGVTARLM is the basic tool of the thread-scheduler.
You also want dbx to treat symbols with case-sensitivity. In your
~/.dbxinit, add

ignore SIGVTALRM
ignore SIGSEGV
set $casesense = 1

In your ~/.gdbinit, add

handle SIGSEGV pass noprint
handle SIGVTALRM pass noprint

3. When you start up your program, you should disable the incremental
garbage collector via "run @M3novm" (or disable the garbage collector
entirely via "run @M3nogc").

4. You might also find it handy to define debugging macros for
accessing the Modula-3 types. With the current implementation, you
could add these to your ~/.dbxinit: (close your eyes!)

alias type(r) "print (_types[(*(int *)(r-4))//2]).name"
alias text(t) "print (*(TEXT)t).elts"

Then you can type things like "text(name)" and "type(0x1014325fc)" 
in the debugger. I don't know offhand what the gdb translations of 
those aliases are, but there are some local hacks that provide an 
"m3 mode" for gdb running under gnuemacs [which is where I do virtually 
all my debugging], so that you click on an object's name or address, 
type meta-P, and it prints the value according to the object's actual 
type. (meta-R does the same for records.) [Eric, is m3-mode in the 
distribution?] Local names (e.g., procedure parameters) can be typed as 
is (e.g., "x"), but globals need the fully qualified syntax (e.g., 
"VBT__mu"). 

5. One of the least satisfactory aspects of all this is the problem of
debugging threads. You can call Thread.DumpEverybody(), i.e., "call
Thread__DumpEverybody()" in dbx or "print Thread_DumpEverybody()" in
gdb [you might want to define a macro to do that for you], and it will
print a table like this:

***************************************************************
  id   Thread.T    closure root               A* waiting for
>  5 0x101333f8 0x101333f0 FileBrowserVBT.Watcher   timer 
   4 0x10102ab4 0x10102e98 VTView.VFontCleanUpThread   condition 0x10102524
   3 0x10102ca4 0x10102eac VBTRep.MeterMaid      condition 0x101024d0
   2 0x101028cc 0x10102c9c UProcess.Wait3Forever   condition 0x101020fc
   1 0x100f4050        0x0 *main program*        condition 0x102149b4
  15 0x1011d6c0 0x1011d6b8 RTHeap.WeakCleaner    condition 0x100f4044
  10 0x10106a18 0x10106a08 XMessenger.Messenger   condition 0x1010fb54
   9 0x10106814 0x10106804 XInput.FilterXInput   condition 0x1010fb6c
   8 0x10106610 0x10106600 XInput.WaitForXInput   I/O 
***************************************************************

Note that if you interrupt your program at any old random point and do
this, you could destroy the state of the program. I think it's always
safe to do this if the program is waiting for input. If that's not
convenient for your application, try doing it at some relatively
synchronouns point. E.g., set a breakpoint at Text__Cat or something
that will be called fairly often in your program, and THEN dump the
threads.

A project just now getting underway is to make the necessary
modifications to GDB so that it *really* knows about Modula-3, its
naming conventions, the types, and threads. This is being done for the
new, "native-code" compiler, which does not produce C code as an
intermediate representation. It'll probably be a few months before
there's much to show, but stay tuned.

Jim Meehan
DEC SRC


======================================================================= 61 ===
Date:    Sun, 28 Mar 1993 19:23:28 GMT
From:    kabadkar@CS.ColoState.EDU (ashwin kabadkar)
Subject: Debuggers

Is there a debugger for m3 for the
DECs or the SPARCs? I tried to find it in the FAQ, but
I didn't see one.

If there isn't, is there one for ANY machine?

Ashwin
---
+---------------------------+------------------------------------------------
+
| Ashwin Kabadkar           | 313 USC, 601 S.Howes St., Colorado State Univ. 
|
| Grad. Student, CS Dept.   | Ph:(303)491-1140, (303)491-7773 (Off)          
|
| kabadkar@cs.colostate.edu |    (303)498-0737 (Home)                        
|
+---------------------------+------------------------------------------------
+


======================================================================= 62 ===
Date:    30 Mar 93 11:30:27 GMT
From:    tas@cs.uq.oz.au (Tasman Hayes)
Subject: Re: Modula-3 Availability

In article 4152@iitmax.iit.edu, gkt@iitmax.iit.edu (George Thiruvathukal) wri
tes:
>Can somebody point me to the exact location of the Modula-3 compiler being
>distributed by DEC?

$ mkdir m3
$ cd m3
$ ftp gatekeeper.dec.com

log in as anonymous; give email address as password

ftp> cd pub/DEC/Modula-3/release
ftp> type binary
ftp> get boot.yourarchitecture-2.11.tar.Z
ftp> get libm3-2.11.tar.Z
ftp> get ...

if you wan't:
   lang tools (e.g. pretty printer) get: tools
   m3 code to tex get: tools2
   lang checking tools get: m3tk
   X windows get: X11R4, trestle, bicycle, games, vbtkit, formsvbt, vbtapps
   visual feedback on heap, thread use: gtools
   animation, algorithm animation: codeview, mg, mgkit, zeus, mentor, zeustoo
ls
   tcl bindings: tcl
   display postscript bindings: dpskit, dpsapps

ftp> quit

$ zcat boot.yourarchitecture-2.11.tar.Z | tar xpof -

then read the README file for futher instructions.

>Is source code included?
yes

>Does Modula-3 support the following?
> - single and multiple inheritance
single - yes; multiple - no

> - name overloading
yes

> - operator overloading
no

>
>Thanks,
>George Thiruvathukal (gkt@iitmax.acc.iit.edu)
>-- 
>George Thiruvathukal + IIT Computer Science + gkt@iitmax.iit.edu + 708-355-1
507


Tasman



======================================================================= 63 ===
Date:    Tue, 30 Mar 1993 16:12:16 GMT
From:    rhoover@watson.ibm.com (Roger Hoover)
Subject: Re: 1Mb Hello World...!? Is this normal?

In article <12692@uqcspe.cs.uq.oz.au>, tas@cs.uq.oz.au (Tasman Hayes) writes:
|> In article EM306965@itesmvf1.rzs.itesm.mx,
|> EM306965@itesmvf1.rzs.itesm.mx () writes:  
|> >Hello.  
|> >IXve finished installing the Modula-3 compiler (SRC) on a Sparcserver600
|> >and I tried it out with the example Hello world program in the Doc file 
|> >and it created a 1Mb executable. Is this correct?
|> 
|> 
|> Yes it is normal, and unfortunate.
|> ...
|> 3. This is the killer: libraries are NOT dynamically loaded.
|> 
|> Why doesn't SRC Modula-3 use shared libraries?
|> 

I have ported SRC Modula-3 to use shared libraries for the SPARC
and IBMR2 implementations.  Most of this went into release 2.10,
but a few details got messed up in this release and it did not
work out of the box.  Eric Muller took the shared library stuff
out of of the 2.11 config files, but all of the hooks are there.

I posted the necessary fixes to comp.lang.modula3 in January 93
under the subject "changes to 2.11 for IBMR2 and SPARC".  Only
six or so files are affected.  Youcan find this in 93-01.Z in
pub/DEC/Modula3/comp.lang.modula3 on gatekeeper.  If you don't
have ftp access, drop me a note and I'll mail it to you.

|> 
|> I have toyed with the idea adding shared libraries to Modula-3. I
|> really don't think I will for a simple reason - if Eric Muller and Bill
|> Kalsow, who know intimately the inner workings of their compiler, and
|> are 50 times the UNIX programmer I am, haven't done it, then how long
|> will it take me? I hate to think.
|> 
I'm not sure why they have not put these things back into the release.
One reason that they did not build into the system from the start
is due to the lack of shared libraries in Ultrix (or whatever they
run out here).


======================================================================= 64 ===
Date:    Tue, 30 Mar 1993 16:28:13 GMT
From:    dagenais@alberich.vlsi.polymtl.ca (Michel Dagenais)
Subject: Re: 1Mb Hello World...!? Is this normal?


   1. The compiler cross-compiles to C, rather than assembler, giving a
   roughly linear space overhead.

This mainly affects the amount of debugging information produced,
compile and link time, i think.


   3. This is the killer: libraries are NOT dynamically loaded. The reason
   ...
   weighs in at a massive 10Mb. I am not sure, but I think the dependency
   analysis between Modules is non-existent, naive or pessimistic, as when
   a library is linked, most or all of the objects are included in the
   executable, rather than just the ones needed.

Stripping the massive applications (removing debugging information)
will reduce it by a factor of 2 to 4 easily.


   2. (a) It is time-consuming to write a dynamic linker for Modula-3.
      (b) It is hard to write a (mostly) *portable* dynamic linker for
      Modula-3.
      (c) It is too slow to dynamically link in Modules.

Well, i dont think it is that hard. Try the following on a Sun:

List the libraries

alberich> ls *.a
libm3.a          libm3codeview.a  libm3mg.a        libm3ui.a
libm3X11R4.a     libm3data.a      libm3mgkit.a     libm3vbtkit.a
libm3bicycle.a   libm3formsvbt.a  libm3tcl.a       libm3zeus.a


For each, run the mkshared script

alberich> mkshared libm3.a 2.11


Here is the magical one line script

alberich> cat mkshared

#! /bin/csh
# first argument is lib name second is version number

/bin/ld -o $1:r.so.$2 `/bin/nm -pg $1 | awk '/^[0-9a-f]* D/{printf " -u " $3 
}'` $1


Be warned however that, although you save big on disk space, the dynamic link
ing
time when you run the application is important. Easily 30 seconds and
more for a large application.

I believe that the people at DEC SRC prefer to spend their time on the native
compiler rather than to optimize dynamic linking on the current compiler/tran
slator.
We had hints earlier this week that the GNU M3 alpha version is coming out
soon and that the DEC native compiler is only a few months away.

I then presume that both groups already have compiled a number of programs wi
th
their alpha versions, perhaps they could give us the compile/link time and
executable size (versus DEC SRC M3-2.11) for one or two sample applications.
Just to give us an approximation.
--
---------------------------------------------------------------------

Prof. Michel Dagenais			    dagenais@vlsi.polymtl.ca
Dept of Electrical and Computer Eng.
Ecole Polytechnique de Montreal		    tel: (514) 340-4029

---------------------------------------------------------------------


======================================================================= 65 ===
Date:    30 Mar 93 11:02:49
From:    thewalt@canuck.ce.berkeley.edu (C. Thewalt)
Subject: efficiency of open arrays

We just looked at the execution speed of the programs shown below. We
find that version 1 (open arrays) runs at half the speed of version 2.
Furthermore, if we extend this simple example to 2D open arrays, the
open version runs 4 times as slowly.  Is this normal?  Is there anything
we can do to regain the speed? We need open arrays, but that is a heck
of a performance penalty...

Chris

------------------------ Version 1 (open arrays) ------------------------
MODULE m3_array EXPORTS Main;
IMPORT Wr, Stdio;
TYPE vector = REF ARRAY OF LONGREAL;
CONST 
	Num_iter = 1000;
	Num_size = 10000;
VAR
	i,j: INTEGER;
	sum: LONGREAL;
	a := NEW(vector, Num_size);
	b := NEW(vector, Num_size);
BEGIN
	FOR i := 0 TO Num_size-1 DO
		a[i] := 1.333D+0;
		b[i] := 1.333D+0;
	END;
	FOR j := 1 TO Num_iter DO
		sum := 0.0D+0;
		FOR i := 0 TO Num_size-1 DO
			sum := sum + a[i] * b[i];
		END;
	END;
	Wr.PutText(Stdio.stdout,"Completed\n");
END m3_array.

------------------------- Version 2 ---------------------------------
MODULE m3_array EXPORTS Main;
IMPORT Wr, Stdio;
TYPE vector = REF ARRAY [0..Num_size-1] OF LONGREAL;
CONST 
	Num_iter = 1000;
	Num_size = 10000;
VAR
	i,j: INTEGER;
	sum: LONGREAL;
	a := NEW(vector);
	b := NEW(vector);
BEGIN
	FOR i := 0 TO Num_size-1 DO
		a[i] := 1.333D+0;
		b[i] := 1.333D+0;
	END;
	FOR j := 1 TO Num_iter DO
		sum := 0.0D+0;
		FOR i := 0 TO Num_size-1 DO
			sum := sum + a[i] * b[i];
		END;
	END;
	Wr.PutText(Stdio.stdout,"Completed\n");
END m3_array.
--
Christopher Robin Thewalt               (thewalt@ce.berkeley.edu)
Dept. of Civil Engineering              These opinions are not necessarily
University of California, Berkeley      shared by my employer...


======================================================================= 66 ===
Date:    30 Mar 93 11:01:13 GMT
From:    tas@cs.uq.oz.au (Tasman Hayes)
Subject: Re: 1Mb Hello World...!? Is this normal?

In article EM306965@itesmvf1.rzs.itesm.mx,
EM306965@itesmvf1.rzs.itesm.mx () writes:  
>Hello.  
>IXve finished installing the Modula-3 compiler (SRC) on a Sparcserver600
>and I tried it out with the example Hello world program in the Doc file 
>and it created a 1Mb executable. Is this correct?


Yes it is normal, and unfortunate.


(Disclaimer: the following is only some fact and mostly educated (?)
guessing.  Hence some details could be *wrong*.)


Modula-3 executables are large for three reasons:

1. The compiler cross-compiles to C, rather than assembler, giving a
roughly linear space overhead.

2. There is a (roughly linear) overhead for code handling exceptions,
dynamic type checking (pointer, object, subrange assignments ...), type
information for the garbage collector, ...

3. This is the killer: libraries are NOT dynamically loaded. The reason
that C executables are small ("Hello world." is ~25Kb) are that the
objects (.o files) from "shared" libraries (.a files), are loaded in at
execution time by a piece of initialization code inserted by the C
compiler. Modula-3's libraries are statically linked; the runtime
system (handling threads, exceptions, garbage collection, ...) and
standard libraries are the dominant part of your 1Mb "Hello World."
executable. The situation becomes even worse when you use some of the
other libraries (like Trestle (libm3ui.a)) - the FormsEdit application
weighs in at a massive 10Mb. I am not sure, but I think the dependency
analysis between Modules is non-existent, naive or pessimistic, as when
a library is linked, most or all of the objects are included in the
executable, rather than just the ones needed.


Why doesn't SRC Modula-3 use shared libraries?

My guesses:

1. SRC Modula-3 is a research work, and shared libraries, while `nice',
are a low priority. (I think after some use that Bill Kalsow and
Eric Muller have done an excellent job with the compiler as a whole.
Perhaps shrd libs are a low priority as DEC make hard disks; the joy of 
being able to ask for another gig' of space, and not worrying where it 
has to come from ... :-) )

2. (a) It is time-consuming to write a dynamic linker for Modula-3.
   (b) It is hard to write a (mostly) *portable* dynamic linker for
   Modula-3.
   (c) It is too slow to dynamically link in Modules.
Why may a, b and/or c be true? When a C library is dynamically loaded,
the basic work that has to be done is just resolving symbols (for
example, when you use the function atan from the maths library (using
cc -lm ...
), at runtime the dynamic linker/loader (on Suns ld.so) searches
through the library libm.a to resolve the unbound symbol _atan in your
program). When a Modula-3 library is loaded, there is much more to
consider: allowing exceptions in a library object to bubble-up into
your code, type information exchange (for type checking, the garbage
collector and to ensure all opaque types are revealed), etcetera. [Thus
(a).] Using the "-times" option on the compiler shows the link time for
the "Hello World." program to be 18 seconds on my machine; when I run
it the delay is less than half a second despite its size. If it takes
18 seconds for a conceptually simple program to load, will it be used?
[Thus (c).] Writing a dynamic loader probably requires much machine
specific code. [Thus (b).]


In article EM306965@itesmvf1.rzs.itesm.mx,
EM306965@itesmvf1.rzs.itesm.mx () writes:
> Is there any way to reduce the size?

I hope you get some more helpful replies than this, but at worst you
could write a Modula-3 dynamic loader (in C) (translating borrowed
Modula-3 linking code as appropriate) and hack the compiler's C header
code to use it. Without modification, you would still have large link
times.  You could presumably make this much faster by *assuming*
modules will link correctly and proceeding as such. A further
performance improvement could be gained by tweaking the algorithm for
speed. If this is still too slow you could perhaps change the
format/information content of the link info files (.[im]x) for speed,
or develop a separate fast link format.


I have toyed with the idea adding shared libraries to Modula-3. I
really don't think I will for a simple reason - if Eric Muller and Bill
Kalsow, who know intimately the inner workings of their compiler, and
are 50 times the UNIX programmer I am, haven't done it, then how long
will it take me? I hate to think.


Possibilities

1. The University of Caimbridge uses Modula-3 as a teaching language
from first-year. Unless they have quite large disk reserves for their
undergraduates (possible, given the smaller size of English
universities and the funding it would receive due to its standing), the
will have devised some form of dynamic loading.

2. The people at DEC's SRC, keen on promoting Modula-3, will get around
to implementing shared libraries. This would be great, since SRC
Modula-3 is impractical to use at many installations because of the
executable size, and a crucial factor in its success will probably be
its *widespread* use in teaching institutions (it seemed to be rather
decisive in C's and Pascal's cases) and corporations / government
authorities. (At the moment, the only undergraduates we can afford to
let use Modula-3 are a few members of a third-year software engineering
project. If the executable size of Modula-3 was smaller, say less than
100Kb for "Hello World." we would have around 200 undergraduates using
from February 1994.)


What say the people at DEC to all this?
What is *really* involved in making Modula-3 use shared libraries?
Has anyone already done it?
Is anyone developing a commercial Modula-3 compiler (for any OS)?

Tasman Hayes
Department of Computer Science
University of Queensland



======================================================================= 67 ===
Date:    30 Mar 93 12:41:35
From:    thewalt@canuck.ce.berkeley.edu (C. Thewalt)
Subject: Re: efficiency of open arrays (MORE INFORMATION)

I forgot to mention that this is version 2.11 on a DECstation 5000/200
running Ultrix 4.3.

The actual results for the two versions are:

> m3 -o version1 version1.m3
> m3 -o version2 version2.m3
> time version1
Completed
       34.4 real        33.0 user         0.1 sys  
> time version2
Completed
       18.2 real        17.1 user         0.1 sys  
> m3 -O -o version1 version1.m3
> m3 -O -o version2 version2.m3
> time version1
Completed
       28.0 real        25.8 user         0.0 sys  
> time version2
Completed
       11.6 real        10.6 user         0.0 sys  
--
Christopher Robin Thewalt               (thewalt@ce.berkeley.edu)
Dept. of Civil Engineering              These opinions are not necessarily
University of California, Berkeley      shared by my employer...


======================================================================= 68 ===
Date:    30 Mar 93 15:26:30 GMT
From:    gram@aim1.aztec.co.za (Graham Wheeler)
Subject: native language modula-3

Hi all

Does anyone know of any company that is planning (or busy with) a Modula-3
system which generates machine code directly rather than translating to C?
I am particularly interested in the DOS/Windows domain, but UNIX too.

Graham

-- 
Graham Wheeler                     | "That which is weak conquers the strong,
Network Systems Programmer         | that which is soft conquers the hard."
Aztec Information Management       | 		Lao Tzu - Tao Te Ching Ch. 78
gram@aim1.aztec.co.za              | There's no justice, there's just us


======================================================================= 69 ===
Date:    30 Mar 93 19:56:07 GMT
From:    hahn@sunshine.labs.tek.com (Doug Hahn)
Subject: Re: 1Mb Hello World...!? Is this normal?

Remember that (at least for the sparc), shared libraries aren't simply
making an archive into a dynamically loadable object file.  Normal
object files require a fair bit of relocation which is why those
thirty seconds disappear.  This is why Sun recommends using pic
(position independent code) when compiling files for shared libraries.
This drastically decreases the number of relocations that need to be
performed  when the code is linked. 

I used the procedure outlined in the archives (was that January?) and
recompiled the emitted C files for the standard library with -pic. and
then changing into a shared library.

hello ended up 57K as before but only took 3 seconds to dynamically
link and run the first time, 1 second after that (wall time).


--
 | Doug Hahn, CRL, Tektronix, PO Box 500/MS 50-662, Beaverton, OR 97077
 | (503) 627-6419    ...!tektronix!crl.labs!hahn  hahn@crl.labs.tek.com
--


======================================================================= 70 ===
Date:    31 Mar 93 15:31:41 GMT
From:    d90phj@mamba.DoCS.UU.SE (Pierre T. Hj{lm)
Subject: Re: HPPA port of 2.11

In article <1993Mar31.144822.4540@infodev.cam.ac.uk> os102@cl.cam.ac.uk (Oliv
er Stephens) writes:

   I am trying to build Modula-3 on an HP 715/33 running HPUX-9.01 with the
   production C compiler.

   The C compiler chokes at the first derived file (M3_BUILTIN_i.c) complaini
ng
   at what looks to me like perfectly good C code.  I then tried it on a simi
lar
   machine running HPUX-8.0 and it worked fine.

   Anyone any ideas what's wrong?

   ------------------------------------------------------------------------- 
   Olly Stephens                                oliver.stephens@cl.cam.ac.uk
   Computer Laboratory
   University of Cambridge    Loved you there and then, and now like a sheep
   United Kingdom                                             - Van Morrison

Yes. In the file M3Machine.h you have to change the line

#pragma HP_ALIGN NATURAL

to

#pragma HP_ALIGN HPUX_NATURAL

This should make you able to compile it, but I doubt that it will work
without the patches for HPPA posted on this group earlier.

Mail me if you want them.

--
----
  Pierre Hjalm  Email: d90phj@csd.uu.se
  Student, Computer Science, Uppsala University Sweden


======================================================================= 71 ===
Date:    31 Mar 93 14:48:22 GMT
From:    os102@cl.cam.ac.uk (Oliver Stephens)
Subject: HPPA port of 2.11

I am trying to build Modula-3 on an HP 715/33 running HPUX-9.01 with the
production C compiler.

The C compiler chokes at the first derived file (M3_BUILTIN_i.c) complaining
at what looks to me like perfectly good C code.  I then tried it on a similar
machine running HPUX-8.0 and it worked fine.

Anyone any ideas what's wrong?

------------------------------------------------------------------------- 
Olly Stephens                                oliver.stephens@cl.cam.ac.uk
Computer Laboratory
University of Cambridge    Loved you there and then, and now like a sheep
United Kingdom                                             - Van Morrison


======================================================================= 72 ===
Date:    31 Mar 93 14:45:09 GMT
From:    os102@cl.cam.ac.uk (Oliver Stephens)
Subject: Re: 1Mb Hello World...!? Is this normal?

In article <12692@uqcspe.cs.uq.oz.au>, tas@cs.uq.oz.au (Tasman Hayes) writes:
|> 
|> 1. The University of Cambridge uses Modula-3 as a teaching language
|> from first-year. Unless they have quite large disk reserves for their
|> undergraduates (possible, given the smaller size of English
|> universities and the funding it would receive due to its standing), the
|> will have devised some form of dynamic loading.
|> 

The undergraduates use Modula-3 on DECStations.  Unfortunately, we have
no shared library stuff for this architecture, but as they only write
little programs one at a time, it is not too much of a problem.

When undergraduates start writing lots of code (eg. for their third-year
project) we tend to give them a SPARC account where we have an implementation
of dynamic libraries (I have posted the changes for SPARC dynamic libraries t
o
this newgroup a couple of times - if anyone still hasn't got them, mail me).

NOTE:  The easiest way to generate shared libraries on SPARC stations is to
       postprocess the library archives using some little one-liner script
       usually called "mkshared" of something.  This does NOT give you the
       full benefit of shared libraries - all it gives you is late binding
       so that your executable size looks good.  To get the full benefit
       you want to compile everything with position independent code.  My 
       template changes add an alternative target "SharedLibrary" to the
       m3make directives which builds shared libraries from scratch.

TIP:   To save some disk space when building a new release, bootstrap the
       compiler and driver then build a shared-library version of libm3.
       Then compile the compiler and driver from source.  Then strip them...

       ls -l for my SPARC gives:

           m3             204800
           m3compiler     950272
           formsedit      196608

------------------------------------------------------------------------- 
Olly Stephens                                oliver.stephens@cl.cam.ac.uk
Computer Laboratory
University of Cambridge    Loved you there and then, and now like a sheep
United Kingdom                                             - Van Morrison


