======================================================================= 1 === Date: 25 Apr 1994 09:47:14 GMT From: pk@rwthi3.informatik.rwth-aachen.de (Peter Klein) Subject: Re: Which Modula-3 book??? >Having read the FAQ, I called up both of my favorite local bookstores, >but was dissappointed to learn that neither had either of the two >Modula-3 texts. I can order either of them, but I'd prefer some >feedback before doing so sight unseen. > The books are quite different, so my personal advice would be to have them both. Nelson's book contains the language report and is therefore a good reference manual in case of doubt. Additionally, it features some chapters on threads, streams, and the Trestle window system. My personal favourite though is the "How the language got its spots" chapter with a pseudo-dialog discussing some of the language concepts. Harbison's book is a tutorial. It gives an easy-to-follow introduction to all the language features with examples and exercises. Especially if you already know some programming language(s), you'll learn Modula-3 within a few hours with this book. If your looking for a cheap solution, it is definitely possible to learn the language just from the language report and playing with the compiler. Peter --- Peter Klein E-Mail: pk@i3.informatik.rwth-aachen.de Lehrstuhl fuer Informatik III Tel.: +49/241/80-21311 Ahornstrasse 55 Fax.: +49/241/8888-218 RWTH Aachen 52074 Aachen Germany ======================================================================= 2 === Date: 25 Apr 1994 05:00:16 GMT From: dchin@ic.sunysb.edu (David Chin) Subject: Scope for Mod-3 Is there a program that i can use with Mod-3 which allows me to follow the scope of my program step by step? if so, where can i obtain such a program? thanks in advance! ~Dave ======================================================================= 3 === Date: Mon, 25 Apr 1994 09:02:41 -0700 (PDT) From: David L Miller Subject: Re: Which Modula-3 book??? I learned Modula-3 from SPwM3 before the Harbison book came out and it went OK. I probably would have had fewer false starts with the Harbison book, but I would still want SPwM3 as a reference.... --DLM |\ | |\/| David L. Miller dlm@cac.washington.edu (206) 685-6240 |/ |_ | | Software Engineer, Pine Development Team (206) 685-4045 (FAX) University of Washington, Networks & Distributed Computing, JE-20 4545 15th Ave NE, Seattle WA 98105, USA On 23 Apr 1994, Kaelin Colclasure wrote: > Having read the FAQ, I called up both of my favorite local bookstores, > but was dissappointed to learn that neither had either of the two > Modula-3 texts. I can order either of them, but I'd prefer some > feedback before doing so sight unseen. > > Which book is more suited to an experienced programmer learning > Modula-3? Which is a better reference for using the language? Should > I have them both? > -- > // Kaelin Colclasure -------------------------------------------------------- - > // EMail: kaelin@bridge.com Mail: Bridge Information Systems, Inc. > // Voice: (314)567-8463 717 Office Parkway > // Fax: (314)432-5391 St. Louis, MO 63141 > > ======================================================================= 4 === Date: Tue, 26 Apr 94 10:48:11 -0700 From: msm@src.dec.com Subject: Re: Method overloading & overriding Andy Podgurski asks why his attempt at overriding failed. First, M3 does not support method overloading using type discrimination; you can't have two methods named p in the same object (at least not if you want them both accessible) with different signatures. I believe that the failure to override with NIL is a compiler bug, fixed in the current release. The other override failed because the signature for a procedure used as a method must have the object type as its first parameter. Thus, the following may work better (I haven't compiled it to check, but it ought to): MODULE Test EXPORTS Main; TYPE A = OBJECT METHODS p1(x: REAL) := NIL; p2(x, y: REAL) := NIL; END; TYPE B = A OBJECT OVERRIDES p1 := P1; p2 := P2; END; TYPE C = B OBJECT OVERRIDES p2 := NIL; END; PROCEDURE P1(self: B; x: REAL) = BEGIN END P1; PROCEDURE P2(self: B; x, y: REAL) = BEGIN END P2; BEGIN END Test. ======================================================================= 5 === Date: Tue, 26 Apr 1994 15:39:25 GMT From: fn00@gte.com (Farshad Nayeri) Subject: Re: Method overloading & overriding In article <9404232008.AA02993@post.ces.cwru.edu> andy@post.ces.cwru.edu (Andy Podgurski) writes: I wish to know if method names can be overloaded in Modula-3 and, if so, how overloaded methods can be overridden. Modula-3 allows for overriding methods, but not overloading. So, you can do: TYPE A = OBJECT METHODS p(i: INTEGER) := A_P END; TYPE B = OBJECT METHODS OVERRIDES p := B_P END; PROCEDURE A_P(self: A, x: INTEGER) = ... END; PROCEDURE B_P(self: B, x: INTEGER) = ... END; PROCEDURE B_P2(self: B, x: INTEGER) = ... END; VAR x = NEW (B, p := B_P2); (* override without creating a new type. *) There is no procedure overloading in Modula-3 (in contrast to C++, for example). Also, there is no method overloading within the same object type. (There is no operator overloading other than ones defined by the language, but that's beside the point.) So, you can't have a method OBJECT METHODS p(); p(x:INTEGER); END. If you use inheritance, you can have a restricted form of overloading, "single polymorphism" by the fact that the type of the first argument to the procedure that implements a method is the same as the object type within which the method is declared. (Note, for example, how B_P differs from A_P.) Also in your example, procedures "P" are defined more than once in the same scope, which is not legal in Modula-3. P can only have one definition in a module. In practice, procedure name conflicts don't happen as often as you may think in Modula-3 programming, since most modules export only one object type. Procedures implementing methods of this object can be named without tacking on a prefix denoting the type name as I did here. These suggest that methods cannot be overloaded or set to NIL. I believe methods can be overridden to NIL, since NIL <: Proc where Proc is a procedure with any possible signature. In fact, if you don't supply a procedure via "m := Proc" syntax for an object declaration, m's value will be NIL. If you call o.m(), you get a run-time nil-dereference crash. If methods can be overloaded, what should the compiler say about the declaration of type C, where the override of p is ambiguous [...] Methods can't be "overloaded" in the way that you describe, so this is not a problem in Modula-3. Hope this helps. --farshad -- /// | {@,@} | "He's so unhip that when you (...) Farshad Nayeri | say Dylan, he thinks you're " " nayeri@gte.com | talking about Dylan Thomas." ======================================================================= 6 === Date: 26 Apr 1994 19:08:16 GMT From: kaelin@bridge.com (Kaelin Colclasure) Subject: Re: Which Modula-3 book??? First of all, I thank the numerous respondants for sharing their opinions. The overwhelming majority recommended SPwM3 as the one reference book every aspiring Modula-3 programmer should have. A few recommended getting both Harbison's book and SPwM3. I opted for SPwM3 alone, as I'm reasonably comfortable with most of the concepts upon which Modula-3 is founded. Now I get to wait the enevitable "six to eight weeks" for my copy (sigh). -- // Kaelin Colclasure --------------------------------------------------------- // EMail: kaelin@bridge.com Mail: Bridge Information Systems, Inc. // Voice: (314)567-8463 717 Office Parkway // Fax: (314)432-5391 St. Louis, MO 63141 ======================================================================= 7 === Date: Tue, 26 Apr 1994 18:13:38 GMT From: franka@parcplace.com (Frank Adrian) Subject: Re: Conclusion -- Who Win the War of Co. vs. Contra? In article Marc Girod writes: >[ I post this here as a follow-up to my article, on request by David Hopwood ] > >From: m93djh@ecs.ox.ac.uk >Organization: Oxford University Computing Laboratory > >At the risk of trying to provide a definitive answer :-), the pros and cons of >various typing systems are quite easy to understand. > >Typing system used: Compiler knows: Checking needed: > >Dynamic Nothing For all objects OOPS! The compiler does know about the type of manifest constants (both type and value) as well as those objects it has already checked the type of once. This is one of the reasons why languages with good compilers (e.g., Self) can get such good execution speeds, even though they are dynamically typed. > >Dynamic with type hints Hints For objects whose exact type i s > not hinted See above. > > [...] > [Some good stuff about what current typing systems can and > cannot do] > [...] > >So the idea of typing is to get as much information as _possible_ about the >properties of an object. In general you can't get all the information. >If your compiler can't guarantee that a program is type-correct *you have to d o >it yourself*. It is perfectly possible (and a very good idea) to _prove_ that, >say, a Smalltalk program will never terminate with 'Message not found'. You bet. >If you can further narrow down those proofs by specifying your types more >precisely, eg. by using genericity or some fancy new-fangled typing method, >even better. The problem is that NO system I know of uses arbitrary properties for specified types (e.g., I can't say that the variable i is an even number, even though it would make the execution of the statement if (i mod 2) then doSomeLongHairyCalculation; much more efficient. Luckily, there are some inroads starting to happen which allows this sort of thing. E.g., Dylan and Common Lisp both allow method dispatch on singleton objects, and in Common Lisp you can at least specify an arbitrary boolean test for type checking (although compilers would find it hard to use such for type inference). > >But at the end of the day you are trying to get the compiler to prove things >about the program. Don't be such lazy sods! :-) Do it yourself, if you need to . Sure, and while you're at it, go ahead and code it in assembly language yourself - it'll run faster and you wouldn't want to be labeled (God forbid) LAZY, would you? Actually, I agree with David's conclusions, but I think that the type systems available in today's languages are are designed to make things easy for the compiler writer, not for the software specifier. -- Frank A. Adrian /|\ "Judging from both cable and franka@parcplace.com / | \ UseNet, it's not going to be an ParcPlace Systems, Inc. / | \ information superhighway, but Portland / | \ an information stuporhighway." ======================================================================= 8 === Date: Tue, 26 Apr 1994 21:07:31 GMT From: bpoirier@info.polymtl.ca (Benoit Poirier) Subject: From version 2.11 to 3.1 Question on UFileRd? Hi there, I am doing the transition from version 2.11 to v. 3.1. In my old versi on, I was using the interfaces UFileRd.i3 and UFileWr.i3 (in the libm3/rw/src). Would somebody tell me where I can find the same interfaces in version 3.1? Or is it possible to use another interface (which one) with the same feat ures? Your help will save me time, thank you. Ben. ======================================================================= 9 === Date: 26 Apr 1994 18:44:59 GMT From: chase@Think.COM (David Chase) Subject: Re: Ada m-sr0069@sparky.cs.nyu.edu (Salem Reyen) writes: |> I am doing a comparison between Modula3 and Ada 9x. Can anyone provide me |> any information on the advantage of Modula3 over Ada9X? Thanks. I don't know much about Ada 9X, so I can only make educated guesses as to its characteristics. I'd guess that Modula-3 has the following advantages: 1. smaller, more concise description. 2. already implemented. 3. somewhat less ugly baggage to carry around. I think that the two languages are likely to have roughly equivalent "semantic" feature lists (e.g., threads, exception handling, run-time type checking, garbage collection), though Ada probably will have more syntactic "features". David Chase, speaking for myself Thinking Machines Corp. ======================================================================= 10 === Date: 26 Apr 1994 11:20:04 GMT From: laszlo@post.ifi.uni-klu.ac.at (Laszlo BOESZOERMENYI) Subject: Re: Modula-3 on PC's The current version of M3-PC runs over MS-DOS. Graphics and threads have been added, this version is not announced yet (but might be soon). An interactive environment is under development, it will be available in autumn (in connection with a book, an introduction into programming with M3). A port to windows is planned at SRC, I don't know the current status. Best regards Laszlo Boszormenyi ********************************* * Prof. Laszlo Boeszoermenyi * * 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-506 (secr.) * * Fax.: * * 00-43-463-2700-505 * ********************************* ======================================================================= 11 === Date: 13 Apr 1994 11:51:21 GMT From: laszlo@post.ifi.uni-klu.ac.at (Laszlo BOESZOERMENYI) Subject: Overflow Could anybody tell me, how can I catch an exception caused e.g. by an overflow, or a range check? I don't find any remark on that in any M3-related paper. (EXCEPT ELSE does not catch them - this wouldn't be the proper solution anyhow.) Many thanks Laszlo Boszormenyi ********************************* * Prof. Laszlo Boeszoermenyi * * 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-506 (secr.) * * Fax.: * * 00-43-463-2700-505 * ********************************* ======================================================================= 12 === Date: 27 Apr 1994 15:58:05 GMT From: kalsow@src.dec.com (Bill Kalsow) Subject: Modula-3 on the web There's a Modula-3 "home page" for WWW users. It's available at URL: http://www.research.digital.com/SRC/modula-3/html/home.html The user manual, language definition, and library sources are included. I intend for this collection of web pages to become the primary documentation for SRC Modula-3. In future releases of the system I'll include a tar file that contains these pages so it should be easy for others to produce local replicas of the documentation. Please send suggestions to m3-request@src.dec.com. - Bill Kalsow ======================================================================= 13 === Date: 27 Apr 1994 15:14:55 GMT From: kalsow@src.dec.com (Bill Kalsow) Subject: Re: Overflow In article <2ogmbpINN192@fstgds15.tu-graz.ac.at>, laszlo@post.ifi.uni-klu.ac.at (Laszlo BOESZOERMENYI) writes: > Could anybody tell me, how can I catch an exception > caused e.g. by an overflow, or a range check? > I don't find any remark on that in any M3-related paper. > (EXCEPT ELSE does not catch them - this wouldn't be the > proper solution anyhow.) The language says that overflow and range check are "checked runtime errors" and that the mechanism for reporting them is implementation dependent. Programs compiled by SRC Modula-3 will crash when they encounter checked runtime errors. Errors are not converted into exceptions. - Bill Kalsow ======================================================================= 14 === Date: 27 Apr 1994 15:11:22 GMT From: kalsow@src.dec.com (Bill Kalsow) Subject: Re: From version 2.11 to 3.1 Question on UFileRd? The replacements for UFileRd and UFileWr are FileRd and FileWr respectively. - Bill Kalsow ======================================================================= 15 === Date: Wed, 27 Apr 1994 14:17:36 GMT From: dagenais@froh.vlsi.polymtl.ca (Michel Dagenais) Subject: Modula-3 used in industry? (for inclusion in the FAQ) The question "where is Modula-3 used" arises from time to time. If you are using Modula-3 in an industrial environment (apart from DEC SRC :-), please send a short paragraph for inclusion in the FAQ. Here is a *made up* sample: MoonLabs, Boston Mass. Modula-3 (FormsVBT, Netobj, M3tk libraries) is used to prototype distributed CASE applications. (John Smith smith@corp.com). -- --------------------------------------------------------------------- Prof. Michel Dagenais dagenais@vlsi.polymtl.ca Dept of Electrical and Computer Eng. Ecole Polytechnique de Montreal tel: (514) 340-4029 --------------------------------------------------------------------- ======================================================================= 16 === Date: Wed, 27 Apr 1994 14:08:40 GMT From: dagenais@froh.vlsi.polymtl.ca (Michel Dagenais) Subject: Where Modula-3 is used for teaching? (for inclusion in the FAQ) Bill Kalsow and Eric Muller passed on the FAQ maintenance to me. It is a good occasion to add some useful stuff. Please send me a short paragraph if you are (or you know a place which is) using Modula-3 for teaching. The purpose is to know how Modula-3 is used and perhaps facilitate the sharing of teaching material between interested groups. Here is a sample. Ecole Polytechnique de Montreal. A graduate course on Algorithmic Aspects of CAD uses Modula-3 as the main vehicle to describe algorithms and in particular discuss object oriented techniques and CAD applications. (Michel Dagenais dagenais@vlsi.polymtl.ca). -- --------------------------------------------------------------------- Prof. Michel Dagenais dagenais@vlsi.polymtl.ca Dept of Electrical and Computer Eng. Ecole Polytechnique de Montreal tel: (514) 340-4029 --------------------------------------------------------------------- ======================================================================= 17 === Date: Thu, 28 Apr 1994 19:26:27 GMT From: bcrwhims@undergrad.math.uwaterloo.ca (Carsten Whimster) Subject: OS/2 2.x port of SRC Modula-3 attempt Hi all, I am going to attempt a port of SRC modula-3 3.1 starting with the SRC package available for Linux. I am not an experienced "porter", so I would appreciate it if anyone more familiar with OS/2 and porting could assist me. I am willing to do most of the work, but probably not knowledgeable enough to do all of it. I am starting tonight, with what little help the documentation gives, and see where that lands me. I will probably try using emx 0.8h, as I have heard that this is the best package for porting UNIX software to OS/2. Any comments/suggestions? Thanks to anyone who replies. (e-mail or news is fine). -- ---------------------------------------------------------------------- Carsten Whimster, CS241 Tutor --- EDM/2 Book Review columnist bcrwhims@cayley.uwaterloo.ca --- TEAM-OS/2 ---------------------------------------------------------------------- ======================================================================= 18 === Date: Fri, 29 Apr 1994 17:12:06 +1000 (EST) From: psde@cherax.super.csiro.au (Peter Edwards) Subject: Re: Installing 3.1 on a SPARC (still) G'day David, Thanks to your files, I found a "gnumake not found" error which was buried in the middle of some output relating to linking (stderr is unbuffered). SunOS make can't do the job (I tried), but I found a copy of gmake on another machine, and it all worked. So I'm on the road again. Thanks again for your help. Hooroo - Peter Cray Research Australia 570 St Kilda Rd, Melbourne, Vic 3004 Voice: +61-3-2822656 or 2436117 FAX: +61-3-5217050 US: psde@cray.COM or peter.edwards@cray.COM Oz: psde@dit.CSIRO.AU UUCP: ...!uunet!cray!psde Delphi: PSDE ======================================================================= 19 === Date: Fri, 29 Apr 1994 08:56:43 GMT From: R.Kerr@newcastle.ac.uk (R. Kerr) Subject: SIMULA Users Conference ASU Association of Simula Users & TIMING Prague Simulation, Optimization and Project Management cordially invite you to the 20th ASU conference 15th - 17th September 1994 Parkhotel Prague - Pruhonice Czech Republic Conference theme: Object Oriented Programming and its Application to: * Graphics & Simulation * Graphics & Information Systems * Quasi-Parallel Systems (philosophy, application and implementation) * Concurrent Engineering * Programming Environments * Project Management & Financial Control. The conference language is English. No emphasis is placed on specific programming languages. C A L L F O R P A P E R S ----------------------------------------------------------------------- All persons interested in any of the main topics are invited to submit a short abstract (one page, three copies) by post to: Jiri Weinberger, TIMING, Hermanova 30, 170 00 Prague 7, Czech Republic or by e-mail to: Henry Islo or Evzen Kindler Deadline: May 22, 1994 ----------------------------------------------------------------------- Feed-back to the authors of accepted abstracts by: June 17, 1994 ----------------------------------------------------------------------- Full English texts (camera-ready, postscript or ASCII) of accepted papers, approximately 10 pages in length, will be required by: July 22, 1994 ----------------------------------------------------------------------- Conference fee: early registration (before 1st June) 2600 Czech crowns (approx. USD 90, DM 150, SEK 700) late registration (from 1st June) 3100 Czech crowns (approx. USD 108, DM 180, SEK 840) For further information, contact any of the above persons. WELCOME TO PRAGUE IN SEPTEMBER - THE BEST MONTH OF THE YEAR ======================================================================= 20 === Date: 30 Apr 1994 14:00:34 GMT From: girod@dshp01.trs.ntc.nokia.com (Marc Girod) Subject: Re: Conclusion -- Who Win the War of Co. vs. Contra? >>>>> "Frank" == Frank Adrian writes: In article <1994Apr26.181338.6695@parcplace.com> franka@parcplace.com (Frank Ad rian) writes: Frank> Sure, and while you're at it, go ahead and code it in assembly Frank> language yourself - it'll run faster and you wouldn't want to Frank> be labeled (God forbid) LAZY, would you? Actually, I agree with Frank> David's conclusions, but I think that the type systems Frank> available in today's languages are are designed to make things Frank> easy for the compiler writer, not for the software specifier. The purpose of typing is to support the software specifier by making it possible to shift part of the responsibility to the language system. How to shift more responsibility in a reliable way? A direction is to formalize some of the behavior specification in the interfaces, e.g. by using assertions (pre- and post- conditions) that could be used at compile time. Well, now, an example of a compile time assertion is the traditional C cast: "I promise you, compiler, that this what you so far believed was an apple is actually an orange". And we all know that the result is no exactly reliable. So we would like our compiler to be able to maintain the validity of the proof of our assertions. Back to covariance: "I got that food from a virtual function that was redefined in the scope of this animal -whatever it is. It should be suitable wouldn't it?" class Animal { // ... void eat(virtual Food); static /* virtual */ Food foodPlease(); }; Food someFood = animal.foodPlease(); //ok, both static and virtual... animal.eat(someFood); Would something like that make sense? And be checkable at compile-time? -- +-----------------------------------------------------------------------------+ | Marc Girod - Nokia Telecommunications Phone: +358-0-511 7703 | | TL4E - P.O. Box 12 Fax: +358-0-511 7432 | | SF-02611 Espoo 61 - Finland Internet: marc.girod@ntc.nokia.com | | X.400: C=FI, A=Elisa, P=Nokia Telecom, UNIT=TRS, SUR=Girod, GIV=Marc | +-----------------------------------------------------------------------------+ ======================================================================= 21 === Date: Tue, 19 Apr 1994 16:24:24 GMT From: shang@corp.mot.com (David L. Shang) Subject: Conclusion -- Who Win the War of Co. vs. Contra? Who win the war, covariance or contravariance? Neither. Then, novariance? No. Simple novariance cannot get any credential from the tussle. So what? Be patient. I have a winner. But first, let me explain why neither covariance or contravariance cannot win the war. CONCLUSION 1. Covariance is unsound AND not the natual requirement. Here, covaraince is considered as the process to narrow the input domian of a method in a subclass, or by set theory, narrow the input domian in a function subset. Covariance is unsound. Everybody knows. Covariance is not the natual requirement. Somebody may protest and give examples to show the neccessity. But please wait until you read all the conclusions I made (you will find what is required is actually not the covariance I defined above). Covariance is not the natual requirement. Why? Being a subclass by natual, it should do everything that a super class can. If it cannot do something that a superclass can, it cannot be a subclass. By covariance, you will declare something that a subclass cannot do while the superclass can. Therefore, covariance is not the natual requirement. Some people may argue that covariance is an exception in subclass, and exceptions always exist in the real world, and therefore covariance is natually required. This is wrong. Our world exists exceptions, true, but exceptions cannot become a general rule. Exceptions are only the properties of a few individuals. Therefore, it is not necessary to have a general rule in language to deal with covariance. To be more intuitive, if you specify every animal is a living being that can eat ANY animal food in general, then, you have no reason to define some animals that cannot eat some animal food. If you find that almost each specific animal class in general requires its own special food, then, restricting animal food in subclass cannot be treated as exception. Otherwise, your definition of superclass is WRONG, because you find that all subclasses are exceptions of a superclass. If you find that there are only a few indivituals cannot eat some food bacuase of some temporary condition, then, you can treat this as exception. But you cannot generalize this indivitual exception into the class specification. If you find that there are only a few indivitual animal classes cannot eat some food bacuase of some specific properties of the subclass, then, you can treat this as exception too. But you have no reason to have a general class specification rule (covariance) to deal with the minor indivitual subclass exception and make the majority unsafe. In this case, you should stick to novariance and have run-time type check for the minor exceptional classes. Therefore, covariance is not the natual requirement. CONCLUSION 2. Contravariance is sound BUT not the natual requirement. I do not need to testify this conclusion. Any opposite attestation is welcomed. THE WINNER CONCLUSION 3. Novariance with covariant constraint is the winner. Remember the solution I proposed in my post that started this thread? The solution is actually not the traditionally accepted notion of covariance. In subclasses, the input type is not narrowed. What is narowed is the constarint of the input type. Therefore, it is actually the novariance with a covariant constraint. I'd like to thank Luca Cardelli here. His comments help me clarify the notions and realize the difference between covariance and novariance with a covariant constraint. The intuitive explaination of this notion is: the property of an input type in a subclass is more revealed as the property of the subclass is more revealed. But the input domain is nerver narrowed. Therefore, if we specify that each animal eat SOME TYPE of food which is a AnimalFood, then we can specify a subclass in which each animal eat SOME TYPE of food which is a PlantAnimalFood. Note that SOME TYPE is not narrowed. What is narrowed is the contraint of the SOME TYPE. In a subclass of HerbovoreAnimal, we know something more about the food type they eat. This does not mean that their food is more restricted in contrast to the animal definition. Novariance with covariant constraint is the natural requirement. If you find an example of covariance, what you actually find is an example of novariance with covariant constraint. If you don't believe, please have a try. Novariance with covariant constraint is sound. To prove its soundness, a formal method must be used. What I like to state here is that run-time type check is only necessary in case of a reverse assignment (to assign a variable of superclass to a variable of a subclass). In a environment where no reverse assignment exists (homogeneous environment), static type safe is always ensured. No run-time type check, nor system-level type check is necessary. The language Cluster is the only one that supports this notion. David Shang ======================================================================= 22 === Date: Wed, 20 Apr 1994 02:45:43 GMT From: sngmedia@world.std.com Subject: MARKET SURVEY We are a small, dedicated group of people desperately trying to get a video production company off the ground. Recently, we secured enough financial backing to produce several videos on the subject of personal computing. Because we don't have the financial resources to perform a traditional market analysis, we considered several alternatives and concluded that we should consult the people of the Internet, who are technically proficient and tend to be enthusiastic personal computer users. We would like you to indicate which three of the below described videos would appeal to you most. Please note that each video synopsis is numbered. When you are ready to send your response, please specify the numbers corresponding to your three video selections, and use commas to separate the numbers. For example, if you choose selections four, eight, and eleven, the body of your letter would simply be: 4,8,11 and nothing more. When you send back your response, please specify "MARKET SURVEY" in the subject field. Then, direct your response back to sngmedia@world.std.com. Please realize that this is not an advertisement, or solicitation. We simply would like to know your response. You will not be contacted further. Thank you in advance for your help and cooperation. Tom and Randi Fecker sngmedia@world.std.com. Please select three videos that interest you most: 1. The Internet Pilot's Guide A plain English guide to getting around on the Internet by veteran users. How to use Internet resources to send/receive e-mail, and to search for documents and files relating to a particular subject. How to use LISTSERVs, GOPHER, ARCHIE, WWW and WAIS. How to use FTP and Telnet to access remote computers for file transfers, remote logins, etc. Also, learning how to observe Internet's "netiquette." And how to access multimedia Mosaic bulletin boards. 2. How to Make Money at Home With Your PC I -- Successful PC-Based Businesses Meet five successful entrepreneurs who started their own home-based businesses using a PC. Includes businesses that provide typing services, mailing list management, horoscopes, bookkeeping, and even a software developer who does not know how to program -- he hires other people to implement his software designs. Includes ideas for two dozen home-based businesses you can start using your PC. 3. How to Make Money at Home With Your PC II: Portfolio Management. Whether you manage your own portfolio for investment gains, or you take on clients for a consulting fee, a PC can give you powerful tools for portfolio management. Meet three successful home-based portfolio managers who use their PCs to maximize profits. They'll inspire you, and share some tricks of the trade that can help you land clients and get started. We'll also show you how to determine which software applications will meet your needs, and which online services will satisfy your requirements. 4. How to Make Money at Home With Your PC III: Telecommuting Learn how to use your PC to telecommute to companies across America that are looking for specialized consultants with skills like bookkeeping, software design and programming, editorial and script writing, technical proofreading, graphic design, copywriting, and more. Includes interviews with three successful telecommuters who use their PCs, faxes, modems and phones to serve distant clients, and information about a telecommuting referral service that could help you find employers. 5. How to Upgrade Your Hard Drive, Step-By-Step >From choosing your new hard drive, through ordering, installing and testing it. This plain English video shows you how to do the job correctly, one simple step at a time. Using industry-wide standards, we'll show you what all hard drives have in common. Includes how to determine if your controller will support a particular hard drive. How to remove the old drive, and install, format and test the new drive. Includes a discussion on the differences between the various standards. 6. How to Design Your Own PC You don't have to be an engineer to design and build the PC of your dreams. This plain English video shows you how to figure out the PC design that is best for you, how to specify components, how to make sure they'll work together, and where to buy them. You'll end up with a top quality system that will save you money. 7. How to Build Your Own PC Once you've designed your PC, we'll show you how to build it. The actual process will take you only a few hours. Using an easy-to- understand method, we'll show you how to inspect, install and test components. Includes tips and tricks from computer production experts. The technical skills can be easily mastered by almost anyone, and you probably already own most of the tools you would need. 8. How to Increase Your Computer's Memory This plain English video shows you how to determine whether your computer memory can be increased, and how to do the job correctly, one step at a time. You'll learn about industry-wide standards for memory, how to configure additional RAM and cache, how and where to buy RAM chips, and three ways to eliminate low-quality RAM chips. Covers all phases of the process from opening your computer, to testing your memory. Includes discussions on how to ensure your DOS set-up is able to access all available memory, and how to use various memory management software applications. 9. How to Use MS-Windows 3.1 This powerful graphical user interface can help you work smarter and faster, but the manual and the online tutorial that come with Windows leave many questions unanswered. This plain English, step- by-step video will show you how to install Windows on your computer and set it up to get optimum performance. 10. How to Find a Job in the Information Age A PC can give you an incredible advantage when you're searching for a new job -- or even a new career. But you have to know just how it can help you. In this video, an experienced employment counselor will show you how to tap the power in your PC to find job leads, create a winning resume and customized cover letters, tap into databases and find bulletin boards that will lead you to job openings, and use online services to research potential employers. 11. How to Install a Sound Card in Your Computer Here's how to add incredible stereo sound to your computer with step-by-step help. In plain English, you'll learn how to determine if your computer can support a sound card, how and where to buy a high-quality sound card. How to open your computer, and install and test the sound card. 12. How to Install a CD-ROM Drive in Your Computer Using simple tools, this plain English video shows you how to install a CD-ROM Drive in your computer. You'll learn how to make sure your computer can support a CD-ROM drive -- and what to do if it can't. Covers internal vs. external drives, how and where to buy a high quality CD-ROM drive, what you need to know about differing industry standards, preparing the drive bay, testing and trouble-shooting. Covers SCSI and IDE. 13. How to Fix the Most Common Computer Problems Your computer serviceman may not want you to know this, but all you need is the know-how you'll get from this video, simple tools, and easily-obtainable diagnostic software -- and you can fix most common problems you'll ever encounter with a PC. 14. What to Do When a Virus Strikes Your Computer Viruses can come from almost anywhere: a colleague or friend's disks, a network, a bulletin board, even commercial software. If you ignore the first warning signs, a virus can wipe out your data and permanently damage your computer's memory. In plain English, this video will tell you how to scan disks for viruses, how to check downloaded files from bulletin boards, how to set up a virus prevention program for your home or office computer, and how and where to buy the best anti-virus software. We'll also cover the pros and cons of the antivirus software in DOS 6.X and Windows 3.X, how to use antivirus software, and more. 15. How Your PC Works: Inside the Case Here's a down-to-earth explanation of how your PC actually processes information, and what really goes on inside the case. You'll get a guided tour of the insides of a PC, learn about how the various components work and how they communicate with each other, and get a clear explanation of technical terms. A must for anyone who wants to really understand how to program, use and repair a PC. 16. How to Create Config.Sys, Autoexec.Bat and Batch Files These basic files can make it much easier to use your computer -- or cause incredible headaches if they are not written properly for your particular software and peripherals. Now you don't have to be at the mercy of murky tech manuals, because we'll show you how to create files that work for your system -- step-by-step, in plain English. You'll learn how to write, modify and test Autoexec.Bat and Config.Sys files; and how to create batch files. 17. How to Add a Modem or Faxmodem to Your Computer Here's the easy way to add a modem or faxmodem to your computer, with step-by-step guidance from this plain English video. You'll learn how to determine if your computer can support a modem or faxmodem, and what to do if it can't, how to choose and buy the best modem or faxmodem, how to open your computer, and install the modem or faxmodem, how to test it, how to quickly eliminate common problems, and how to set your modem or faxmodem correctly. 18. How to Make Money at Home With Your Computer The information age is opening up incredible new opportunities for PC owners to make undreamed of money, using skills and knowledge you may already have! Here's inside information on the ten most promising telecommuting jobs and 12 small businesses you can run right from your home, using your PC. Includes profiles of PC owners who are actually running PC-based home businesses. 19. The Super-Highway Roadmap This is your guide to where to go and what to see. You can make incredible contacts and gather powerful, valuable information on the Internet, but the problem is that most people can't begin to imagine the potential of something that seems so abstract. This plain English video will introduce you to the Internet, and make these opportunities concrete. Includes interviews with 7 people who did the impossible by gathering information and making contacts on the Internet. 20. How to Upgrade and Repair Your PC I: Basic This is the video your repairman doesn't want you to know about! Since the components of most PCs are highly modular, PC repair is easier than you think. Just pinpoint the problem component, unplug it, remove a few screws, replace it, and presto! You're in business again. This step-by-step video shows you how to pinpoint problems and replace your PC's components, using ordinary household tools. 21. How to Upgrade and Repair Your PC II: Multimedia Here's how to save big money on a PC with all the latest multimedia peripherals. You learn how to determine if your PC can be upgraded, how to upgrade your video card and bus, and how to add a CD-ROM drive, sound card, video accelerator, and more. Presented in plain English. The procedures you'll learn require ordinary household tools -- nothing fancy! 22. Plain English Guide to DOS 6+. The powerful sub-programs buried deep within DOS 6.0 and higher can help you work smarter and faster, but the manual and the online tutorial that come with DOS leave many questions unanswered. This plain English, step-by-step video will show you how to install DOS on your computer and set it up to get optimum performance. In addition to DOS commands, you'll learn how to use the shell, defragmentation, scan and antivirus programs that come with DOS. 23. Home Financial Management on a PC. Your computer can help you create and manage a budget, keep track of your credit card accounts, handle your tax deductions, and reconcile your bank accounts. But that's not all! You can also determine whether you should pay down your mortgage, finance a new car or pay cash, buy or rent your home, and how much you'll need for retirement. The financial information your computer can give you might mean the difference between just getting by and a very comfortable lifestyle -- if you ask the right questions and use your PC to develop a financial strategy. 24. The Online Bulletin Board Guide Bulletin boards can be the on-ramps to the Information Super Highway -- if you know how to access and use them. This step-by- step guide shows you how to find bulletin boards, set-up your modem, log on, find out what they have to offer, find bulletin board users who share your interests, search for information, and upload and download files. Thank you. ======================================================================= 23 === Date: 19 Apr 1994 21:38:46 GMT From: dchin@ic.sunysb.edu (David Chin) Subject: Test Ignore. Just a Test... ======================================================================= 24 === Date: Wed, 20 Apr 94 16:08:30 GMT From: buschman@slsvirt (Andreas Buschmann US/END 60/1/25 Tel.71409) Subject: Re: dynamic type Eric Muller (muller@src.dec.com) wrote: : In article <2o28i3$n9e@slinky.cs.nyu.edu>, braams@cims.nyu.edu : (Bastiaan Braams) asks for "dynamic arrays". Try: : MODULE prog EXPORTS Main; : VAR n: INTEGER; : BEGIN : n := ...; : VAR a := NEW (REF ARRAY OF INTEGER, n); : BEGIN : ... : END : END prog. That doesn't have the same semantic. Now the array is allocated on the heap, whereas Bastiaan Braams' "dynamic arrays" would have been allocated on the stack. As long as the size of a "dynamic array" doesn't change after it get's allocated, you can have it on the stack. If it does change, you will need heap anyway. > Why ist isn't in Pascal, Modula2? Niklaus Wirth takes the minimalistic approach in his languages. If it is possible to leave it out, he leaves it out. -- #include /|) Andreas Buschmann /-|) SEL Stuttgart US/END buschman@lts.sel.alcatel.de # we have a new domain address buschman@us-es.sel.de # our old domain address ======================================================================= 25 === Date: Wed, 20 Apr 1994 16:15:38 GMT From: mmeola@cahill.ecte.uswc.uswest.com (Matt Meola) Subject: version stamps... What does a "Version Stamp Mismatch" mean? -- (********************************************************) (* Matt Meola, NRA Life Member, Militiaman, Libertarian *) (* "Gun control means using two hands." *) (********************************************************) ======================================================================= 26 === Date: Wed, 20 Apr 1994 15:44:21 GMT From: dagenais@froh.vlsi.polymtl.ca (Michel Dagenais) Subject: Modula-3 compiler, tools and libraries wish list Modula-3 Compiler, Tools and Libraries Discussion and Wish List The Modula-3 development environment now contains a large number of very good tools and libraries that work nicely together. The purpose of this text is to help contributors determine what additions would be helpful to others and how it could integrate well into the existing environment. Please send comments, suggestions, proposed contribution description, wanted list to dagenais@vlsi.polymtl.ca; this may get you in contact with people that would like to use your contribution or with people that may provide some items on your wanted list. This text should act as a repository of the current status and does not replace the technical discussions that need to be conducted in a forum like comp.lang.modula3. It does not either replace the Modula-3 FAQ found on gatekeeper.dec.com:pub/DEC/Modula-3. To find more information about the names mentioned, see the who's who list at the end. Index of Topics Discussed: 1) The Compiler 1.1) Modula-2 to Modula-3 converter 2) M3Build 3) On-Line Documentation 4) The Debugger 5) Integrated Development Environment 6) Coverage and Performance Analysis 7) Basic Interfaces (run-time, I/O, system calls) 8) Useful Data Structures 9) Windowing and User Interfaces 9.1) Rotated Text 9.2) Postscript VBTs 9.3) Rich text VBT 9.4) Table VBT 9.5) Other VBTs 10) Embeddable language (Obliq) 11) Distributed Computing (Network Objects) 12) Persistent Objects and Embeddable Database 13) Abstract Syntax Tree tools (M3 parser) 14) Computer Assisted Learning Tools (Algorithm Animation) 15) Interfaces to other libraries and programs (Tcl, Dps...) 16) Presentations, Tutorials and Teaching Material 17) Reports and Books 18) Specialized Topics 18.1) Floating point geometry library ******************** 1) The Compiler The compiler already implements the full language and runs on several UN*X platforms. Speed enhancements and support for some popular non-UN*X platforms may be expected. 1.1) Modula-2 to Modula-3 converter A better Modula-2 to Modula-3 converter (99% conversion...) is in the works under the supervision of Peter Klein. ******************** 2) M3Build The descriptions of programs and libraries stored in m3makefiles are simple and efficient. It would be interesting to be able to specify different m3-options for some files (debugging, performance analysis...), and to have the dependency analysis take into account previously used options when determining modules to recompile. ******************** 3) On-Line Documentation Most library modules already contain their documentation which may be extracted with m3totex. A tool to index and browse through this documentation would be helpful. Some work has been done by Bill Kalsow to access library interfaces and modules through an hypertext World Wide Web client. Something is likely to happen in this area in the near future. ******************** 4) The Debugger Modula-3 specific code has been added to Gdb. It will be interesting to see how this integrates with Gdb front-ends such as xxgdb and emacs. ******************** 5) Integrated Development Environment A number of groups have made experiments in this area. Tools such as VBTkit for the user interface, m3tk for syntax and dependency analysis, dynamic linking... could be used to produce such an environment. It is worth noting that precompiled interfaces are much easier to achieve in M3 than in several other popular languages. Peter Klein is working on a Modula-3 development environment and associated user interface. ******************** 6) Coverage and Performance Analysis Tools already exist for coverage analysis, pretty printing, performance analysis, viewing the threads and the garbage collected heap. It would be nice to have these easily accessible through an integrated development environment. ******************** 7) Basic Interfaces (run-time, I/O, system calls) The core libm3 modules are now quite mature and offer these services. ******************** 8) Useful Data Structures A small number of flexible data structures exist in libm3 and are sufficient for most needs. For instance, a Set can be represented as a Table that does not associate anything to its keys. Michel Dagenais has insertable sequences. This is like the existing Sequences in libm3 except that the complexity is O(log n) instead of O(1) but elements can be inserted anywhere, not only at the top and bottom of the sequences. This is useful to keep childs in a tree automatically numbered or to efficiently keep words or paragraphs numbered while insertions are being made. This will be made available eventually but could be packaged in a relatively short time if there is a need. ******************** 9) Windowing and User Interfaces Trestle, VBTKit and FormsVBT can be used to develop graphical applications in a relatively short time. A fully interactive version of FormsVBT may be helpful, but in most cases editing the user interface Form source code and getting immediate graphical feedback, as currently done, is very efficient. Some VBT libraries like GraphVBT are hidden in other applications but may gain from being packaged separately, being useful in other contexts. 9.1) Rotated Text Currently, there is no VBT to show non horizontal text, because of X windows limitations. This would be desirable and can be implemented in one of the following ways: a) open a pipe to the ghostscript Postscript interpreter and use it as a font renderer, cache and display the character bitmaps produced; b) have Bezier curves for the most popular Postscript fonts, Trestle handles Bezier curves; c) use the new text facilities in X11R6 that remove previous limitations. A prototype implementation of a) has been implemented by Alain Dube (contact Michel Dagenais); the performance with the cache is good but this remains a relatively complex solution. The b) solution would be relatively easy to implement but the resulting quality may not be as good as a real font renderer. The c) solution may not be available for some time since many workstation vendors take a long time before integrating the new X windows facilities. 9.2) Postscript VBTs It is often useful to display Postscript files in a VBT, for example for an included diagram in a document editor. This can be achieved by using the ghostscript Postscript interpreter as a rasterizer. A prototype has been programmed by Alain Dube (contact Michel Dagenais) but the performance is not too good when large color bitmaps are handled. An alternative implementation is to convert Postscript files into display lists (Bezier curves and text) as a preprocessing step. Further displaying and even editing becomes very simple. A prototype implementation of this has been done by Benoit Poirier (contact Michel Dagenais). 9.3) Rich text VBT An editor widget with multiple fonts (fixed and proportional character spacing) would be useful. 9.4) Table VBT A split VBT that positions NxM childs in aligned rows and columns. 9.5) Other VBTs An HTML VBT would be useful to display World Wide Web hypertext documentation. A Graph VBT that displays arbitrary graphs (such as call trees, cross references...) would be interesting. This could be implemented adding a placement module (to determine the vertex positions) to work on the existing GraphVBT module. ******************** 10) Embeddable language (Obliq) Clean and flexible, Obliq is an exciting recent addition to the Modula 3 release. It can be used to call Modula 3 modules and can be called from Modula 3 programs. It integrates very well with networks objects. Sample applications include programming animations for the Zeus algorithm animation system. It may also prove useful for communicating executable code between distributed programs and for storing executable code in persistent objects, since it is interpreted. ******************** 11) Distributed Computing (Network Objects) Network objects are another exciting recent addition. The underlying model is very simple and effective. Authentication and access control will be required in many applications. A network object daemon that starts specific programs upon need, like inetd does using inetd.conf for most network services, would be very useful. ******************** 12) Persistent Objects and Embeddable Database With Pickles to store objects in files, the implementation of persistent objects is simplified. Furthermore, with the m3tk library it is not too difficult to read a type description and to write the needed methods to handle that type. Combined with FormsVBT, network objects and Obliq, all the ingredients are there to have a nice environment for developing graphical distributed applications with persistent state and querying facilities. Peter Klein has a specialized database for annotated graphs, GRAS, that is being reimplemented in Modula-3. Eliot Moss is working on persistent Modula-3 objects. ******************** 13) Abstract Syntax Tree tools (M3 parser) The m3tk library can be used to analyze Modula-3 source code in order to find specific constructions (use of OBSOLETE facilities, unhandled exceptions), build source code browsers and analysis tools, stubs generators for network or persistent objects... ******************** 14) Computer Assisted Learning Tools (Algorithm Animation) The Zeus Algorithm Animation package may be used to quickly develop graphical and animated teaching aids. Most of the algorithms described in Robert Sedgewick's Algorithms book have been animated at DEC SRC through the work of Marc H. Brown. Animation of compilation techniques have been produced by students at University of Illinois with the help of Marc Najork. Animation of Memory Hierarchy (Disk, RAM, Cache) has been produced by Michel Dagenais and should be released soon, after some tuning and packaging. ******************** 15) Interfaces to other libraries and programs (Tcl, Dps...) C functions are easily called from Modula 3. Thus, stubs have been produced to access John Ousterhout's Tcl and also Display Postscript from Modula 3. Similar stubs would be desirable to access databases such as Postgres or Exodus and access/provide World Wide Web information using the hypertext transfer protocol libraries (HTTP). ******************** 16) Presentations, Tutorials and Teaching Material Modula 3 is used for teaching in a number of Universities. Some Modula-3 related teaching material may be shared between interested parties. Michel Dagenais has a French presentation about the Modula 3 language that could be distributed. An English presentation about the Modula-3 environment and libraries should be available later this summer. ******************** 17) Reports and Books A number of books and technical reports related to Modula 3 are mentioned in the Modula 3 FAQ. A book about software development in Modula 3 (m3build, Debugger, Coverage and Performance analysis, FormsVBT, Obliq, network objects...) would be useful. An upcoming book by Sam Harbison may include some of this material. ******************** 18) Specialized Topics 18.1) Floating point geometry library Currently, an Integer geometry package is available in libm3. Portions of an equivalent floating point counterpart is available in other applications such as Zeus/Mentor. Michel Dagenais has packaged these and completed some. It has been contributed to m3-request@src.dec.com but may be distributed to those that simply cannot wait. ******************** 19) Who's who Modula-3 enthusiasts, users or contributors. Please notify me for additions, corrections or removals. Andrew Birrel, DEC SRC, Network objects. Marc H. Brown, DEC SRC, VBTKit, FormsVBT, Zeus. Luca Cardelli, DEC SRC, Modula-3 definition, Obliq. Michel Dagenais, Ecole Polytechnique de Montreal, , LINUX and SPARC M3 binaries, M3 wish list. John D. DeTreville, DEC SRC, Incremental garbage collector. Sam Harbison, Tartan, Modula-3 book. Jim Horning, DEC SRC, Useful Modula-3 interfaces. Mick Jordan, Sunlabs near Palo Alto, Modula-3 definition, M3TK and related tools. Bill Kalsow, DEC SRC, Modula-3 definition, M3 compiler and run-time. Peter Klein, Lehrstuhl fuer Informatik III, . Modula-2 to Modula-3 converter. Mark S. Manasse, DEC SRC, Trestle. Paul McJones, DEC SRC, Useful Modula-3 interfaces. James R. Meehan, DEC SRC, VBTKit, FormsVBT. Eliot Moss, U. of Massachusetts at Amherst, . Eric Muller, DEC SRC, M3 FAQ, M3 compiler and run-time. Marc Najork, DEC SRC, 3D animation. Greg Nelson, DEC SRC, Modula-3 definition, Systems Programming with Modula-3 book editor, Trestle, Network objects. Farshad Nayeri, GTE near Boston, , m3-sparc mailing list. Frode Odegard, , commercial Modula-3 support. Susan Owicki, DEC SRC, Network objects. Robert Sedgewick, Princeton University, Algorithms in Modula-3 book. Jorge Stolfi, Brazil, Computational geometry procedures. Edward Wobber, DEC SRC, Network objects. Geoff Wyant, Sunlabs near Boston, , SPARC port. -- --------------------------------------------------------------------- Prof. Michel Dagenais dagenais@vlsi.polymtl.ca Dept of Electrical and Computer Eng. Ecole Polytechnique de Montreal tel: (514) 340-4029 --------------------------------------------------------------------- ======================================================================= 27 === Date: Thu, 21 Apr 1994 13:47:48 GMT From: dagenais@froh.vlsi.polymtl.ca (Michel Dagenais) Subject: Re: version stamps... What does a "Version Stamp Mismatch" mean? Two or more modules linked together use the same interface but that interface changed and only some of the modules were recompiled. At worse, recompile everything and the problem will be fixed. -- --------------------------------------------------------------------- Prof. Michel Dagenais dagenais@vlsi.polymtl.ca Dept of Electrical and Computer Eng. Ecole Polytechnique de Montreal tel: (514) 340-4029 --------------------------------------------------------------------- ======================================================================= 28 === Date: Thu, 21 Apr 1994 16:44:13 GMT From: whitney@galileo.Meakins.McGill.CA () Subject: Re: dynamic type Andreas Buschmann US/END 60/1/25 Tel.71409 (buschman@slsvirt) wrote: : > Why ist isn't in Pascal, Modula2? : Niklaus Wirth takes the minimalistic approach in his languages. If it : is possible to leave it out, he leaves it out. Wirth's latest language Oberon-2 includes multi-dimensional arrays. Go figure. Whitney ======================================================================= 29 === Date: 23 Apr 1994 08:01:11 GMT From: girod@dshp01.trs.ntc.nokia.com (Marc Girod) Subject: Re: Conclusion -- Who Win the War of Co. vs. Contra? I am confused... May I try a proposal, which I believe is only a new formulation. What we (you?) would like is a notion a "virtual type", so that we could write (C++ like syntax, but sorry, I didn't try to compile...): class Animal { public: virtual class Food { /*...*/ }; void eat(virtual Food); }; class Cow: public Animal { public: virtual class Food: public Animal::Food { /*...*/ }; void eat(virtual Food); }; Cow rosy; Animal* animal = &rosy; animal->Food herbs; animal->eat(herbs); Am I close? Novariance with covariant constraints... A template like syntax could be possible too, since we are close from constrained genericity, aren't we? I don't take position here about either usefulness or feasibility. Not yet. Regards! -- +-----------------------------------------------------------------------------+ | Marc Girod - Nokia Telecommunications Phone: +358-0-511 7703 | | TL4E - P.O. Box 12 Fax: +358-0-511 7432 | | SF-02611 Espoo 61 - Finland Internet: marc.girod@ntc.nokia.com | | X.400: C=FI, A=Elisa, P=Nokia Telecom, UNIT=TRS, SUR=Girod, GIV=Marc | +-----------------------------------------------------------------------------+ ======================================================================= 30 === Date: Sat, 23 Apr 1994 16:07:14 -0400 From: andy@post.ces.cwru.edu (Andy Podgurski) Subject: Method overloading & overriding ======================================================================= 31 === Date: Sat, 23 Apr 1994 16:08:10 -0400 From: andy@post.ces.cwru.edu (Andy Podgurski) Subject: Method overloading & overriding I wish to know if method names can be overloaded in Modula-3 and, if so, how overloaded methods can be overridden. I also wish to know if methods can be set to NIL inside an object-type declaration, as the language definition implies (p. 22). I am using an old version of the SRC compiler (2.7, I believe). I tried compiling the following module: MODULE Test EXPORTS Main; TYPE A = OBJECT METHODS p(x: REAL) := NIL; p(x, y: REAL) := NIL; END; TYPE B = A OBJECT OVERRIDES p := P; p := P; END; TYPE C = B OBJECT OVERRIDES p := NIL; END; PROCEDURE P(x: REAL) = BEGIN END P; PROCEDURE P(x, y: REAL) = BEGIN END P; BEGIN END Test. The following compilation errors occurred: "Test.m3", line 25: symbol redefined (P) "Test.m3", line 7: symbol redefined (p) "Test.m3", line 7: default is not a procedure (p) "Test.m3", line 14: symbol redefined (p) "Test.m3", line 14: default is incompatible with method type (p) "Test.m3", line 20: default is not a procedure (p) 6 errors encountered These suggest that methods cannot be overloaded or set to NIL. Is this so or is there a problem with my understanding, the compiler, or the language definition? If methods can be overloaded, what should the compiler say about the declaration of type C, where the override of p is ambiguous (assuming methods can be set to NIL). Note that it may be desirable to nullify one version of an overloaded method. This can't be specified without using a signature, e.g., p(x: REAL) := NIL; However, this is not syntactically legal. Thanks for your help, Andy Podgurski Computer Eng. & Science Dept. Case Western Reserv Univ. Cleveland, Ohio 44106 andy@alpha.ces.cwru.edu ======================================================================= 32 === Date: 23 Apr 1994 17:14:12 GMT From: kaelin@bridge.com (Kaelin Colclasure) Subject: Which Modula-3 book??? Having read the FAQ, I called up both of my favorite local bookstores, but was dissappointed to learn that neither had either of the two Modula-3 texts. I can order either of them, but I'd prefer some feedback before doing so sight unseen. Which book is more suited to an experienced programmer learning Modula-3? Which is a better reference for using the language? Should I have them both? -- // Kaelin Colclasure --------------------------------------------------------- // EMail: kaelin@bridge.com Mail: Bridge Information Systems, Inc. // Voice: (314)567-8463 717 Office Parkway // Fax: (314)432-5391 St. Louis, MO 63141 ======================================================================= 33 === Date: 24 Apr 1994 11:05:06 GMT From: mw@ipx2.rz.uni-mannheim.de (Marc Wachowitz) Subject: Re: Which Modula-3 book??? Kaelin Colclasure (kaelin@bridge.com) wrote: > Which book is more suited to an experienced programmer learning > Modula-3? Which is a better reference for using the language? "Systems Programming with Modula-3", edited by Greg Nelson, contains, among many other things, the language definition. IMO it's excellent, though I've seen other opinions. For me, it would certainly be enough information about the language [as soon as I'll have upgraded my box, which currently is still a 286], but then none of the concepts of the language is in principle new to me, since programming languages are a kind of hobby. If object orientation, pointer manipulation, exception handling or separation of interface and implementation are new ideas, some other sources (not necessarily specific for Modula-3) might be a good addition. ------------------------------------------------------------------------------ * wonder everyday * nothing in particular * all is special * Marc Wachowitz ======================================================================= 34 === Date: 20 Apr 1994 13:37:56 -0500 From: johnh@david.wheaton.edu (John C. Hayward) Subject: formsedit and "Visual" windowing Dear Modula-3 People, I have done some limited experimentation with VBTkit and FormsVBT with formsedit. Many of the facilities in VBTkit are available in FormsVBT, however the one I would miss is the ListVBT. I am using the ListVBT for scrolling text lines which represent an array of records (table). While I can construct a window which has part of it from FormsVBT with another part from VBTkit I would rather be able to configure the entire window using formsedit. There is a TextEdit which looks too powerful for dealing with lines of text. It appears that Browse requires the items be listed or from a file (not from an array of Text.T). I can get Scroller to work I don't know how to get it to scroll lines of text. For my application lines of text are fine. It seems in addition that it would be useful to have "spread sheet" form. Any suggestions would be appreciated. On another point, while formsedit is much better than building windows by writing code, it seems what would make life much better would be to have a graphical tool which one could pick various forms, place them on the window expand them, change characteristics of them. The result of this tool would be the FormsVBT language which describes the window just built. Anyone working on this kind of thing? johnh... ======================================================================= 35 === Date: 24 Apr 1994 08:55:14 GMT From: girod@dshp01.trs.ntc.nokia.com (Marc Girod) Subject: Re: Conclusion -- Who Win the War of Co. vs. Contra? Let me correct my virtual code: class Animal { public: class Food { /* abstract, i.e. non-instantiable */ }; virtual void eat(virtual Food) = 0; // virtual destructor etc... }; class Cow: public Animal { public: class Food: public Animal::Food { /*...*/ }; virtual void eat(virtual Food); // ... }; Cow rosy; Animal* animal = &rosy; animal->Food herbs; animal->eat(herbs); Was it such non-sensical that our virtual compiler should have caught it at compile time? -- +-----------------------------------------------------------------------------+ | Marc Girod - Nokia Telecommunications Phone: +358-0-511 7703 | | TL4E - P.O. Box 12 Fax: +358-0-511 7432 | | SF-02611 Espoo 61 - Finland Internet: marc.girod@ntc.nokia.com | | X.400: C=FI, A=Elisa, P=Nokia Telecom, UNIT=TRS, SUR=Girod, GIV=Marc | +-----------------------------------------------------------------------------+ ======================================================================= 36 === Date: 24 Apr 94 10:47:21 From: vixie@vix.com (Paul A Vixie) Subject: Re: Which Modula-3 book??? I think that you should have both books. There is some overlap but in general the SRC book (SPwM3) is (definitionally) more accurate and takes a high-level approach, whereas the Harbison book has more tutorial text in it and is more suitable for someone who hasn't had experience with any of the languages which M3 is most directly descended from. To go from ``neophyte'' to ``expert'' in M3, you'll need to at least: (1) read Harbison's and SRC's books (each; both) from cover to cover (2) get SRC M3 from Gatekeeper, read all its documentation, build it (3) write at least one medium-sized throw away application, which will require that you read a lot of the SRC M3 library interface modules and probably more than a little of the library source code; you will also end up rereading a lot of both books from (1) (4) write a non-trivial, production application in M3, then rewrite it almost from scratch after you finish and realize how much better it would be if you'd only known "then" what you know "now" In all, this is a good deal shorter a path than the equivilent for C or C++. -- Paul Vixie Redwood City, CA decwrl!vixie!paul ======================================================================= 37 === Date: 25 Apr 1994 08:12:18 GMT From: pgs1002@esc.cam.ac.uk (Paul Sjoerdsma) Subject: M3 && Tcl-Tk Hi, Is the interface between M3 and Tcl (Tk) mature?? When I looked at M3-2.11 the last time this wasn't the case.?? I'd like to use Tk as my GUI, since I'm already familiar with this package. I'm thinking of using M3 for some numerical programs, what is the difference in speed between 2.11 and 3.0(1) Thanks Paul ======================================================================= 38 === Date: 25 Apr 1994 09:25:18 GMT From: pk@rwthi3.informatik.rwth-aachen.de (Peter Klein) Subject: Re: Method overloading & overriding >I wish to know if method names can be overloaded in Modula-3 and, if >so, how overloaded methods can be overridden. No, Modula-3 does not support method overloading. See the language report, chapter 2.2.9: "The names introduced in Fields and Methods must be distinct from one another and from the names overriden in Overrides." On the other hand, it is possible to implement some restricted cases of overloading with the help of default parameters. > I also wish to know if >methods can be set to NIL inside an object-type declaration, as the >language definition implies (p. 22). Yes, this is possible. This is how the object type declaration should denote that the method is virtual. Peter --- Peter Klein E-Mail: pk@i3.informatik.rwth-aachen.de Lehrstuhl fuer Informatik III Tel.: +49/241/80-21311 Ahornstrasse 55 Fax.: +49/241/8888-218 RWTH Aachen 52074 Aachen Germany ======================================================================= 39 === Date: Mon, 11 Apr 94 12:38:28 GMT From: Scott Martin Subject: Modula-3 on PC's I'm interested in getting hold of a Modula-3 compiler for Windows or OS/2. Does anyone know where I can get one? Is anyone writing a 'Visual' (god I hate that word) interface? I've done some work with Visual Basic (ptui) which doesn't really suit my style (being non OO) but boy, it's great for knocking up a GUI. I think a GUI development environment for Modula-3 on PC's would be fantastic, especially if it could handle VBX's - you could cash in on the VB craze. I'll settle for a non-GUI compiler for Win or OS/2 - so if anyone knows how to get one, please let me know. Thanks, Scott. ======================================================================= 40 === Date: 25 Apr 1994 05:34:10 GMT From: girod@dshp01.trs.ntc.nokia.com (Marc Girod) Subject: Re: Conclusion -- Who Win the War of Co. vs. Contra? [ I post this here as a follow-up to my article, on request by David Hopwood ] Date: Sun, 24 Apr 94 15:51:58 BST From: m93djh@ecs.ox.ac.uk Organization: Oxford University Computing Laboratory In article you (Mark Girod) write: >I am confused... >May I try a proposal, which I believe is only a new formulation. > >What we (you?) would like is a notion a "virtual type", so that we >could write (C++ like syntax, but sorry, I didn't try to compile...): > >class Animal { > public: > virtual class Food { /*...*/ }; > void eat(virtual Food); >}; > >class Cow: public Animal { > public: > virtual class Food: public Animal::Food { /*...*/ }; > void eat(virtual Food); >}; > >Cow rosy; >Animal* animal = &rosy; > >animal->Food herbs; >animal->eat(herbs); Nice try, but it isn't statically checkable. With genericity, you get the type Cow-food by applying Cow to a generic type Food. Ie. Cow-food = Food; You would be doing exactly the same here, if Food() was defined on the _type_ Cow, rather than on objects of the type cow. What you're trying to do instead is say: Animal animal; animal = aCow; // compiler doesn't know animal is a cow Cow-food = Food; So the compiler doesn't know the type of herbs, and animal->eat(herbs) cannot be checked (unless you're trying to say the compiler is very smart and can detect that you constructed the types from the same object). At the risk of trying to provide a definitive answer :-), the pros and cons of various typing systems are quite easy to understand. Typing system used: Compiler knows: Checking needed: Dynamic Nothing For all objects Dynamic with type hints Hints For objects whose exact type is not hinted Static, no genericity Most general possible type of each object Wherever covariance is required Static, with genericity Most general set of related types When covariance required _and_ for related objects objects might not be related In addition, objects coming from heterogenous containers and from untyped environments will probably require a type check before use. And of course, there are other invariants to be checked if you have to restrict input further than you can with typing. I challenge anyone to find a typing system that statically checks that, say, a number is prime (unless it has already been told at some point). So the idea of typing is to get as much information as _possible_ about the properties of an object. In general you can't get all the information. If your compiler can't guarantee that a program is type-correct *you have to do it yourself*. It is perfectly possible (and a very good idea) to _prove_ that, say, a Smalltalk program will never terminate with 'Message not found'. If you can restrict those proof obligations to methods like Animal::eat-or-vomit (AnyFood food) // excuse the C++ syntax which only occur a few times in your program, you've made life easier for yourself. If you can further narrow down those proofs by specifying your types more precisely, eg. by using genericity or some fancy new-fangled typing method, even better. But at the end of the day you are trying to get the compiler to prove things about the program. Don't be such lazy sods! :-) Do it yourself, if you need to. Just my 2p'th. David Hopwood m93djh@ecs.ox.ac.uk -- +-----------------------------------------------------------------------------+ | Marc Girod - Nokia Telecommunications Phone: +358-0-511 7703 | | TL4E - P.O. Box 12 Fax: +358-0-511 7432 | | SF-02611 Espoo 61 - Finland Internet: marc.girod@ntc.nokia.com | | X.400: C=FI, A=Elisa, P=Nokia Telecom, UNIT=TRS, SUR=Girod, GIV=Marc | +-----------------------------------------------------------------------------+ ======================================================================= 41 === Date: Thu, 14 Apr 1994 13:49:48 +1000 (EST) From: psde@cherax.super.csiro.au (Peter Edwards) Subject: Installing 3.1 on a SPARC G'day, I've struck a problem installing the boot package of version 3.1 of SRC Modula-3 on a Sun SPARC running SunOS 4.1. When I run m3boot, there are many warnings from "ar" that filenames are too long and are being truncated down to 15 characters. I think this matters, because some of those names (eg. SortedAtomAtomTbl_i.o and SortedAtomAtomTbl_m.o) are no longer unique then. In the systems I've checked, SunOS has this feature at least to 4.1.3. Does this in fact matter? If so, what do people do about it? I ignored it, and pressed on, and did the m3ship, which failed quite quickly with: cp: m3cc/SPARC-SPARC/m3cgc1: No such file or directory *** error code 1 "/blahblah/m3inst/boot-SPARC/m3build/templates/SPARC", line 196: command execute failed Is this a spinoff of the truncation problem, or another error? Thanks - Hooroo - Peter Cray Research Australia 570 St Kilda Rd, Melbourne, Vic 3004 Voice: +61-3-2822656 or 2436117 FAX: +61-3-5217050 US: psde@cray.COM or peter.edwards@cray.COM Oz: psde@dit.CSIRO.AU UUCP: ...!uunet!cray!psde Delphi: PSDE ======================================================================= 42 === Date: Thu, 14 Apr 1994 08:46:08 -0700 (PDT) From: lashley@netcom.com (Pat Lashley) Subject: Re: Installing 3.1 on a SPARC > I've struck a problem installing the boot package of version 3.1 of SRC > Modula-3 on a Sun SPARC running SunOS 4.1. > > When I run m3boot, there are many warnings from "ar" that filenames are too > long and are being truncated down to 15 characters. I think this matters, > because some of those names (eg. SortedAtomAtomTbl_i.o and > SortedAtomAtomTbl_m.o) are no longer unique then. In the systems I've > checked, SunOS has this feature at least to 4.1.3. SunOS allows rediculously long names (on the order of 1K); so it sounds like something in your environment is imposing SysVr3 restrictions. My guess would be that you've got /usr/5bin in your path before /usr/bin. My second guess would be that you're in a directory/partition which is being NFS mounted from a SysV machine; or that for some reason a local partition that is mounted as a SysV partition rather than a SunOS/BSD partition. -Pat -- My opinions are my own. For a small royalty, they can be yours as well... Pat Lashley, Senior Software Engineer, Henry Davis Consulting 1098 Lynn, Sunnyvale, CA 94087 || 408/720-9039 || lashley@netcom.com ======================================================================= 43 === Date: Thu, 14 Apr 1994 13:53:19 GMT From: dagenais@froh.vlsi.polymtl.ca (Michel Dagenais) Subject: Re: Help: Problems with installing vbtkit of Modula-3 3.1 I am trying to install vbtkit on a DEC Station (DS3100). I installed Modula- 3 3.1 compiler successfully. While doing m3build in vbtkit directory I am getting an error message saying 'sh: m3bundle: not found'. I could not find the file m3bundle anywhere. Can anybody help me with this ? The m3bundle program is in tools/m3bundle. You have to build and ship this before building vbtkit. -- --------------------------------------------------------------------- Prof. Michel Dagenais dagenais@vlsi.polymtl.ca Dept of Electrical and Computer Eng. Ecole Polytechnique de Montreal tel: (514) 340-4029 --------------------------------------------------------------------- ======================================================================= 44 === Date: Thu, 14 Apr 94 08:32:36 -0700 From: mhb@src.dec.com ("Marc H. Brown") Subject: Re: help: problems installing zeus (3.1) on DS3100 This package was inadvertently left out of the release. It will be there for 3.2. In the mean time, here's an implemetation that was posted to the news group last month: <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< From: fn00@gte.com (Farshad Nayeri) Date: Sat, 19 Mar 1994 05:54:09 GMT cc: torki@mpipf-muenchen.mpg.de (Torsten R. Kirschner) Subject: Re: Q: M3 3.1 formsvbt package / videovbt? (uuencode, 98 lines) Due to popular demand, here is a fake videovbt package for those of you who can't wait for 3.2 (for good reasons, I am sure. :-) This and other patches to bring up version 3.1 can be found in ftp.gte.com:/pub/m3/m3-sparc. Some patches are sparc-specific while others should be made in other configurations as well. --farshad begin 644 videovbt.tar.gz M'XL( *H3:BT ^U;67/;R!%6\I+2)(]YR$,>.EZ[EE2)$$'PL*EUBA )RK1Y MA:1D.>LM%@2.1,0XN#AT;*7V5^W/R,_(C\AC>@8GJ3N1:"?&E$1BNGMZCNYO M9GH&/--GU#X[]G8VGBX!0*U2 ?8-4 R_Q? [)$*E(I7*HHA_P#.U#7C")F4I M3&>1_5U'>RH?>(#]B^4JLW]5DDJ9_=>1ENQO2J;ZB9[H!GW4.IA!R^6;[2]6 MRH']2^6**%:14)3*F?W7DHAN+FS'@YROYPGI6!YU3E2-0NZ0.<;AWB1/>O;, M-Y B^S,]H*3$WIZIR_G#L6Y]0E5=_=A1G4O(11Z6)Y^[KUFZFI;P']E<#":0/HY@/4N M(9,/0P4(P 1>,P%A H.]MTIS@J2>,GDS:(T),ZENZ3BGN+;O:+0.$^5HL@L_ M^JJA>Y?;H-F&[;C;<*[/O/DVS*E^.O?JT)1'K4Y?[NZ29&/@7EK:W+$MVT?Y M$_V"SNJP-QAT%;F_"Z9+-3*@K(N]8:J[])93K.MI$0^YOXE:$K.H&?4 MJ(>]$T)J(M;3K;:CFK0WQHHBX;BZ6&R<-#(4NE)AFS5]K/]$(RW+$J>HA#'/ MM^?75H \N(:I]%MH$OR,C2<\=)*]"?\_/Z*//0S_98;_F)\1^OZ5_+'/ _C?^W9^HC+_T\W85_J$K1^5^Y5*RPB$"2,ORO)27X1^.G MX!YBZC5\7Q2$X@^AFS$'(?+&'S9(N&5F"X6.:OZQL?%+8^/W&[\)7(BO'O]$ MFK+QQXW?Q>@PD1'P_H6\%NKY;8J'Y%^5D;[+Z,E1-)/_-?[_TD'ZIA"?4)_H M&?X?&_^141_5Q>[&?ZT4X5^JLK, J-6J8H;_=:04_M,A/CI7& V'4X!8B>> MP$G(/;#.:(^"]0S_Z\7_8^[^[X%_MN[ M\-T6M.6)W%VFP]:?'W8LM_I W?PD=P9*RN5!,&5Z>.+P?]C^MB#\%\-[O^R^'\]*<-_AO]K MWO]]U!C@+OR+E5J\_Q=+_/ZODKW_NYYTC_=_4\3_^A7@#/]?,OZ%)WG]_R[\ M5VJU2GS_+XE%OOZ+&?[7DKZ!7FAS#$(MZJAL23^^!)VY A1@9H-E>T!GNOS,/; N\N>Z"J6ISW:+@T(6!TX<+JF& 1<\-)&+&FH'I&YZ. M@ )//>845.4NN*QN@].9)=1!D6XI("0(=WR'-T+.;9 MH-GF@EHN=A>UG=@.;\PV'/L>8*-8EU7C7+UTP?4UK,D]\0T!.T&:PX,IOR-] M#>.A/&JR64-I=XXPO^.[SHYA:ZI!.OTQ;I2ZTYCW/!<\XJRXA[/%:SC6+?8T M/< )@Z64R,[S''+RG!TJXNQEI;$8&1[L(5^W-,.?45S#&>$&OKD8 MZ7:87D,_9CHQ\VZOG8N1(VS$4)Z\63(6JXYSPKX5C"-11$,WF12::4?36&[Z7A[U MQ]/V8#0]Z+_K#][WI^U.5QFC%)>>[N-3HW#:X)D!SPPP\TY1AE/4/I)''64\ M'2GC0?=0:2&_B)+MKKR/*K"CTF#(7K$IG**'# :3)-?IR>^46&[\1N&=Y"US MY\PAARS+Q@RQQ4;LG<*'[!-%:67(^]0@0WD\+K(G;@DVDGDT*T,!0M\)^&+ M;S;S0;ZTDI=8GE>L.@W-\0-JF5$=U<(6!(1*+&;,&@6Y00:'RJ@K?Y@6HQ&* M"+S"@J$UR)X\5J;RB/41*?T&:_H(I7#D>IU),%@MI1T:3ZAS'^6]X'Z:HD>] MP\?(W%RF_VXOLA=6:38X*4V1 C*G-UD+ U>+1PLG*)SWIII]AK/D*15L-$V_ MV5T2(F2B](9=><),X-D+?M@G>+@=( 3GM7J=&3K:]K*"X13 ;,%8@9FY%YZ+ M4 CFX//Y);+BWN-SW&/2&DQ#A4Q;3\KS3ZXF>$0_BA\PI@NIH;(@DXP2.CYF MP@9T4P/(0*&>LT_39Y_TPF-?'@0RB$ I*LL 9++O[C-L17Q7=HN*8H3A31KE-P;4$41 @A%.FX9[&+J^4,"PKN"G7GNI*W MB*@79-.S?6U^JU (Z&N:132#JA:R=L$QH7!R78=7ZKLJ48/=S&H"6N!IN"+4Y]H7WB1!/GUTRLY[HN#$3X&,.8:": M%)YM;SV#@AWEA)4LQ3V:._V^6'CU S*P7C9C)?RMGU/2&@9)24X5;-R2?<0! M6#BZY<'?X4)U3MU@9$D\U*Q=U[1J2[#3[=@2]-7\!6L.-FASJ3V"N2)G,KD; M&K$96#D.GO!)6JC>? N$U.""H!RQH55:4[8#%$;C47/:[+62XE(PF[A;A*#M M<:E(EWZ-S000TC_1"BGIV6"%8D:4$.QA)H(NP<4KCO]&BMSJ*4\28]QY_AO= M_Y9%L5HJ<_'L]Y_K263"@C#\4^&$[38B?P ,FS[A-@?C(I7%0H9][D*;K<'H M6%$ A%4 MV X:!QC?<5#DD^*F>@DXN[ES[ &9V!CYZ<9L&QS? E/BF5W6S6@A"NCN7%\( M,$G7X] ??=VA+IG@A\=^)X^; ::S4("VZKAS=09]]9(Z.N0L_MTX]3!HMLT\ M3'SL#SV&4@F*K^JB5"^60!E/0'SUJDS6@__/[7]9RE*6/E_*[O^R\__L_O_K M31G^,_QG]_]?;\KN_S/\9_?_7V_*[O^S^__L_C^[_\_N_[/[_^S^/[O_S^[_ .OZ[[_W\#SR/$"0!@ #\ end -- /// | {@,@} | "He's so unhip that when you (...) Farshad Nayeri | say Dylan, he thinks you're " " nayeri@gte.com | talking about Dylan Thomas." <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< ======================================================================= 45 === Date: 11 Apr 1994 16:22:04 GMT From: mjj@modulac.Eng.Sun.COM (Mick Jordan) Subject: Re: trestle (et al) and zeus with 3.1 & Sun 670M I worked around this (or something very similar) by commenting out some calls in the SPARC template: readonly proc import_X11R4() is % import_lib("Xaw", X11R4_PREFIX & "/lib") % import_lib("Xmu", X11R4_PREFIX & "/lib") import_lib("Xext", X11R4_PREFIX & "/lib") % import_lib("Xt", X11R4_PREFIX & "/lib") import_lib("X11", X11R4_PREFIX & "/lib") end Evidently there is some incompatibility between the X11 headers and the Sun lib raries that causes the unresolved references. The Xtk stuff isnt needed for Trestle, b ut if its in the X11R4 library and you use any part of that, all the symbols must be resolvable. Xext is also not needed for a typical Trestle app, but there is code in the Trestle library that references it, so it also muts be included for the same reasons. Mick Jordan ======================================================================= 46 === Date: 15 Apr 1994 11:17:50 GMT From: rrw1000@cus.cam.ac.uk (Richard Watts) Subject: Re: Installing 3.1 on a SPARC In article <9404140349.AA09602@cherax.super.csiro.au>, Peter Edwards wrote: >G'day, > >I've struck a problem installing the boot package of version 3.1 of SRC >Modula-3 on a Sun SPARC running SunOS 4.1. > >When I run m3boot, there are many warnings from "ar" that filenames are too >long and are being truncated down to 15 characters. I think this matters, >because some of those names (eg. SortedAtomAtomTbl_i.o and >SortedAtomAtomTbl_m.o) are no longer unique then. In the systems I've >checked, SunOS has this feature at least to 4.1.3. Erm, actually SortedAtomAtomTbl_m.o and SortedAtomAtomTbl_i.o are distinct.. :-). My Linux machine does this as well, and it doesn't seem to have caused any problems - if 'ar' doesn't complain, I wouldn't worry about it. > >Does this in fact matter? If so, what do people do about it? > >I ignored it, and pressed on, and did the m3ship, which failed quite quickly >with: > cp: m3cc/SPARC-SPARC/m3cgc1: No such file or directory > *** error code 1 > "/blahblah/m3inst/boot-SPARC/m3build/templates/SPARC", line 196: > command execute failed > >Is this a spinoff of the truncation problem, or another error? Have you unpacked the m3cc.tar.gz archive ? It looks as if your m3ship is choking on not being able to find the gcc m3 backend code generator (m3cgc1) built by that package. m3boot should have already tried to build it by this point, I think. > >Thanks - Hooroo - Peter > >Cray Research Australia 570 St Kilda Rd, Melbourne, Vic 3004 >Voice: +61-3-2822656 or 2436117 FAX: +61-3-5217050 >US: psde@cray.COM or peter.edwards@cray.COM >Oz: psde@dit.CSIRO.AU UUCP: ...!uunet!cray!psde Delphi: PSD E Hope that helps, Richard. ======================================================================= 47 === Date: Fri, 15 Apr 1994 15:11:28 GMT From: dagenais@gutrune.vlsi.polymtl.ca (Michel Dagenais) Subject: Re: Installing 3.1 on a SPARC The file truncation reported by ar does not matter in this case. cp: m3cc/SPARC-SPARC/m3cgc1: No such file or directory *** error code 1 "/blahblah/m3inst/boot-SPARC/m3build/templates/SPARC", line 196: command execute failed Perhaps you have not retrieved m3cc that comes separately and must be untarred into boot-SPARC, if i recall correctly (see the install instructions in the doc). -- --------------------------------------------------------------------- Prof. Michel Dagenais dagenais@vlsi.polymtl.ca Dept of Electrical and Computer Eng. Ecole Polytechnique de Montreal tel: (514) 340-4029 --------------------------------------------------------------------- ======================================================================= 48 === Date: 15 Apr 1994 11:10:11 +0200 From: rb@informatik.uni-kiel.de (Ralf Behnke) Subject: Relation Modula3 and Modula2 Hello readers of the newsgroup comp.lang.modula3, I have heard about the language modula3 just a few weeks ago, so I do not know any details of this language. My question concerns the relation of modula3 to the 'old' language modula2. Especially I would like to know, if modula2 is a proper subset of modula3. So, can I use a compiler for modula3 to build executables of a modula2 program? Thanks in advance for answers. Ralf Behnke -- | Ralf Behnke, Institut fuer Informatik, Universitaet Kiel | | rb@informatik.uni-kiel.d400.de Tel.: ++49-431-560489 | ======================================================================= 49 === Date: 14 Apr 94 13:15:06 GMT From: hootons@p4.cs.man.ac.uk (Stephen Hooton) Subject: Memory leakage? I have written a large modula3 (ver 2.11) program on a SPARC computer. During the execution of the program the memory usage continually increases until either the program terminates or the machine runs out of memory. The program manipulates a complicated data strucutre containing many objects. There are a lot of small objects allocated and deallocated during the program, but the total memory usage should reach a maximum and die away. Does anyone now of a reason for this? A problem with the garbage collector maybe? Thanks in advance. Stephen Hooton. University Of Manchester. England. (hootons@cs.man.ac.uk). ======================================================================= 50 === Date: Thu, 14 Apr 1994 16:42:07 GMT From: shang@corp.mot.com (David L. Shang) Subject: Re: dynamic type In article <2o28i3$n9e@slinky.cs.nyu.edu> braams@cims.nyu.edu (Bastiaan Braams) writes: > I would be grateful if someone could educate me concerning the reason for > the absence from Modula-3 (and from Pascal and Modula-2) of dynamic > (run-time) types, more particularly of the dynamic subrange type, and > still more particularly of the dynamic array facility that I remember from > Algol-60. > > I am thinking of the following sort of code, illegal in Modula-3. > MODULE prog EXPORTS Main; > VAR n: INTEGER; > BEGIN > n := ...; > VAR a: ARRAY [0..n-1] OF INTEGER; > BEGIN > ... > END > END prog. > > Let me immediately follow up to the most obvious quick answers: > > A: Dynamic typing is unsafe. > Q: Please explain--Can't we have run-time checks for all the relevant > requirements? > Of cause dynamic typing is not statically type safe. But run-time type check is a feasible way to ensure a type-safe use of a dynamic type. > A: Dynamic types are unnecessary. > Q: This would be an objection if they would complicate the language. But > do they do that? It seems to me that the syntax would even simplify if a > dynamic subrange type were permitted--one just removes from the language > specification the requirement that the expressions defining the subrange > be constant expressions. > Whether it is necessary depends on whether there is a natual requirement. To me, dynamic types are necessary. There are many applications need dynamic typing. That is why we need dynamic languages. But is it possible to have a static language to support dynamic typing? My answer is: yes. The language Cluster supports dynamic genericity, that is, a new type can be constructed via parameters with run-time value. To be specific to your example, VAR n: INTEGER; ... VAR a: ARRAY[0,n-1,INTEGER] is possible in Cluster, where ARRAY is a generic class. Further, the array can accept a dynamic type as its element: VAR n: INTEGER; o: OBJECT; ... VAR a: ARRAY[0,n-1,typeof(o)] > > A: Because it requires run-time checks, dynamic typing is inefficient. > Q: Is that really true? What makes it so costly? Is the cost of having > dynamic types in the language worse than the cost that a conscientious > programmer would occur in connection with whatever checks he must employ > when coding around the absence of dynamic types? > It does not cost much, and you pay the cost only when you use it. To be specific to your example, checking the bound of a dynamic array can be implemented at the cost of one additional instruction. And you are not necessary to compare whether two dynamic arrays are in the same type (in fact, Cluster supposes that two dynamic types are never equivalent). You should store an object of a dynamic type in a polymorphic variable. For example: VAR p: ARRAY; p = a; However, you can check the array bounds and the element type. David Shang ======================================================================= 51 === Date: 17 Apr 1994 22:10:31 GMT From: leland@straylight.tamu.edu (Leland Ellis) Subject: building quake on Solaris 2.3 Hello, as a newbee to Modula-3, and the 3.1 source from gatekeeper.dec.com, I encountered the following error when executing m3boot on a Sun SPARC- station 2GX w/ Solaris 2.3. SUNWpro's C compiler and GNU gcc-2.5.8 and make 3.8 are installed, and cc calls Sun's compiler. Undefined symbol first referenced in file random hash.o alloca parser.o Where is it looking for and not finding these? Thanks in advance, Leland -- Leland Ellis, Ph.D. Professor of Biochemistry and Biophysics Director, W.M. Keck Center for Genome Informatics Institute of Biosciences and Technology Texas A&M University 2121 Holcombe Houston, Texas 77030 email: leland@straylight.tamu.edu URL: http://keck.tamu.edu/ibt.html ======================================================================= 52 === Date: 18 Apr 1994 01:13:19 GMT From: leland@straylight.tamu.edu (Leland Ellis) Subject: m3boot and modula-3.1 w/ Solaris 2.3 As a follow-up to the previous post: -- the error w/ alloca was remedied(?) by copying alloca.o from the ~/m3cc/SOL2-SOL2 directory into the ~/quake/SOL2 directory -- the error w/ random seems to derive from this point in hash.c: static int random_numbers[256]; for (i = 0; i < NUMBER(random_numbers); i++) random_numbers[i] = random(); random_numbers[chars[i] % NUMBER(random_numbers)]; Any feedback appreciated, Leland -- Leland Ellis, Ph.D. Professor of Biochemistry and Biophysics Director, W.M. Keck Center for Genome Informatics Institute of Biosciences and Technology Texas A&M University 2121 Holcombe Houston, Texas 77030 email: leland@straylight.tamu.edu URL: http://keck.tamu.edu/ibt.html ======================================================================= 53 === Date: Mon, 18 Apr 1994 14:35:52 GMT From: dagenais@froh.vlsi.polymtl.ca (Michel Dagenais) Subject: What else would you like to see in M3 libraries? With the 3.x SRC Modula 3 release, the standard library has been updated and serves as an example of how other libraries could be organized and documented. Many other more specialized libraries are also available in the 3.x release (Trestle, VBTKit, FormsVBT, NetObj, Obliq...). On the other hand, a number of groups outside SRC are making the transition between playing with Modula-3 and using it for relatively large projects. In doing so, they encounter pieces that could be added to the library. However, they dont know if it may be useful to others, if SRC has something equivalent in the works, or their implementation is not too mature. I believe that it would be very useful to build a list of desirable/available library modules and to offer constructive comments to contributors to help speeding up the construction of more well built libraries. Here are examples of the interaction that could take place between this "coordination" and a contributor. - i need a REAL geometry module, some description and motivation is placed in the list. Maybe someone else will do it for me or will contact me to share the development, or i will be told that something in the library can already do what i want. - the need for a geometry module is well established and i write some interfaces to exactly describe what i want. I get comments from experts and produce some very good interfaces. Maybe someone will implement this... - i have some implementation for the geometry module. I get good feedback on the interfaces and the implementation works but is far from optimal. At least it is there and works well, maybe some expert will produce a fantistic implementation, the interfaces already being very good. A world wide web server could easily be set up to store and index the list of desired modules and the documentation of available modules. The mature modules would presumably be included in the SRC distribution on gatekeeper and the less mature modules could be in a separate directory on gatekeeper or somewhere else. If i dare suggesting such a thing it is because i would be willing to coordinate it. I am pretty convinced that other people will volunteer for the real work when it comes (a geometry expert from SRC or elsewhere is unlikely to refuse commenting a proposed geometry interface :-). If just the coordination of all that becomes a daunting task it would mean that several good library modules are being added weekly... which would be highly surprising but nevetheless delightfull. I will post a sample discussion and wish list soon. -- --------------------------------------------------------------------- Prof. Michel Dagenais dagenais@vlsi.polymtl.ca Dept of Electrical and Computer Eng. Ecole Polytechnique de Montreal tel: (514) 340-4029 --------------------------------------------------------------------- ======================================================================= 54 === Date: 18 Apr 1994 05:27:08 GMT From: leland@straylight.tamu.edu (Leland Ellis) Subject: modula-3.1 and Solaris 2.3 A few updates w/ further hacking of the install: quake: Editing the ~/boot-SOL2/quake/src/makefile and changing CC from cc to gcc removed the alloca problem, and adding a number of Berkeley type libs to the LIBRARIES in addition to -lm (-lnsl -lsocket -lucb -lgen) removed the problem w/ random. ldd of the quake binary shows all of the above libs but -lgen. as: /bin/as needs to be /usr/ccs/bin/as, and was so changed in ~/boot-SOL2/ m3build/templates/SOL2, in the lines beginning "-Y7@ and BOOT_ASM=. In the same file, the above libraries were added in the line beginning "-z2@. compiler: A flurry of errors resulted during the build of the compiler, all but three of which were removed w/ the addition of the above libraries to the tail-end of ~/boot-SOL2/compiler/SOL2/make.boot in the line beginning boot_import ("-lm"). Three are left: ieee_handler sigfpe ieee_flags and I don't know at present what they are. Any suggestions welcome, Leland -- Leland Ellis, Ph.D. Professor of Biochemistry and Biophysics Director, W.M. Keck Center for Genome Informatics Institute of Biosciences and Technology Texas A&M University 2121 Holcombe Houston, Texas 77030 email: leland@straylight.tamu.edu URL: http://keck.tamu.edu/ibt.html ======================================================================= 55 === Date: 18 Apr 1994 06:35:04 GMT From: e01e@zfn.uni-bremen.de (Jan von Styp-Rekowski ) Subject: Modula-3 for NeXTSTEP 3.2 for Intel Hello readers in comp.lang.modula3 and readers in comp.lang.modula2, i am searching a modula-3 or modula-2 compiler for NeXTSTEP 3.2 on Intel-Processors. thanks for anybody who can help me. -- +---------------------------------------------------------------+ | e-mail: e01e@alf.zfn.uni-bremen.de | | jvsr@informatik.uni-bremen.de | +---------------------------------------------------------------+ ======================================================================= 56 === Date: 18 Apr 94 10:58:12 CDT From: ryan@shannon.tisl.ukans.edu (Rebecca Ryan) Subject: Re: Modula-3 literature wanted I am trying to install the modula3 compiler on DEC ALPHA 3000/300 workstations running OSF1v1.3. I have made some changes to RTExceptionC.c as follows: instead of f->sp = f->cxt.sc_sp we use: f->sp = f->cxt.sc_regs[30] Everything compiles after this change is made. It all builds, with no apparent problems. It all "ships" (via m3ship) with no apparent problems. BUT it can't compile the simple "hello" program provided in the installation no tes as a test. Why not? the errors I get are as follows: ******************************************************************************* ********* --- building in ALPHA_OSF --- m3 -w1 -why -g -verbose -o foo -T.M3IMPTAB ../src/Main.m3 ../src/A.i3 ../src/A. m3 using ../src/Main.m3 using ../src/A.i3 using ../src/A.m3 resolve: dnet_stub -> -ldnet_stub resolve: m -> -lm inhale -ldnet_stub inhale -lm checking ../src/A.i3 new source -> compiling ../src/A.i3 /usr/local/lib/m3/ALPHA_OSF/m3c -tALPHA_OSF -T.M3IMPTAB -w1 -oA.ic -xA.ix ../sr c/A.i3 "../src/A.i3", line 1: unable to find interface (RT0) "../src/A.i3", line 1: imported object is not an interface (RT0) "../src/A.i3", line 1: unable to find interface (RTHooks) "../src/A.i3", line 1: imported object is not an interface (RTHooks) 4 errors encountered rm A.ic rm A.ix rm A.ic checking ../src/Main.m3 new source -> compiling ../src/Main.m3 /usr/local/lib/m3/ALPHA_OSF/m3c -tALPHA_OSF -T.M3IMPTAB -w1 -oMain.mc -xMain.mx ../src/Main.m3 "../src/Main.m3", line 1: unable to find interface (RT0) "../src/Main.m3", line 1: imported object is not an interface (RT0) "../src/Main.m3", line 1: unable to find interface (RTHooks) "../src/Main.m3", line 1: imported object is not an interface (RTHooks) "../src/Main.m3", line 1: unable to find interface (Main) "../src/Main.m3", line 1: imported object is not an interface (Main) 6 errors encountered rm Main.mc rm Main.mx rm Main.mc checking ../src/A.m3 new source -> compiling ../src/A.m3 /usr/local/lib/m3/ALPHA_OSF/m3c -tALPHA_OSF -T.M3IMPTAB -w1 -oA.mc -xA.mx ../sr c/A.m3 "../src/A.m3", line 1: unable to find interface (RT0) "../src/A.m3", line 1: imported object is not an interface (RT0) "../src/A.m3", line 1: unable to find interface (RTHooks) "../src/A.m3", line 1: imported object is not an interface (RTHooks) "../src/A.m3", line 2: unable to find interface (Wr) "../src/A.m3", line 2: imported object is not an interface (Wr) "../src/A.m3", line 2: unable to find interface (Stdio) "../src/A.m3", line 2: imported object is not an interface (Stdio) 8 errors encountered rm A.mc rm A.mx rm A.mc compilation failed => not building program "foo" seconds #times operation 0.02 2 inhaling library link info 0.07 3 checking object timestamps 2.29 3 compiling Modula-3 -> IL 0.33 9 removing temporary files 0.02 1 garbage collection 0.02 other --------------------------------------------------- 2.75 TOTAL rm Main.ms rm A.ms rm A.is *** error code 1 (ignored) *****************************the files themselves are as follows: A.i3: INTERFACE A; PROCEDURE DoIt (); END A. A.m3: MODULE A; IMPORT Wr, Stdio; PROCEDURE DoIt () = BEGIN Wr.PutText(Stdio.stdout, "Hello world.\n"); Wr.Close(Stdio.stdout); END DoIt; BEGIN END A. Main.m3: MODULE Main; IMPORT A; BEGIN A.DoIt (); END Main. and, m3makefile: m3_option("-verbose") implementation (Main) module (A) program (foo) o ********************************* Has anyone else succeeded in doing this? I'm new to the game so spare me. Tha nks in advance. -- ************************************************************************* * Rebecca S. Ryan * * University of Kansas; EECS * * Lawrence, Kansas (913) 864-4615 * * ryan@eecs.ukans.edu * ************************************************************************* -- ************************************************************************* * Rebecca S. Ryan * * University of Kansas; EECS * * Lawrence, Kansas (913) 864-4615 * ======================================================================= 57 === Date: 18 Apr 1994 11:29:57 GMT From: akk@myhost.subdomain.domain (Ari Kautonen) Subject: Modula-3 literature wanted Wanted: Nelson, Greg: Systems programming with Modula-3 Harbison, Sam: Modula-3 Neither of these can be found from bookstores in Finland. If you have one/both and are willing to sell it/them, please drop me a mail. Ari Kautonen (akk@prosign.fi) ======================================================================= 58 === Date: 18 Apr 1994 23:54:22 GMT From: m-sr0069@sparky.cs.nyu.edu (Salem Reyen) Subject: Ada Hi, I am doing a comparison between Modula3 and Ada 9x. Can anyone provide me any information on the advantage of Modula3 over Ada9X? Thanks. -- Salem ======================================================================= 59 === Date: Tue, 19 Apr 1994 12:52:12 GMT From: vekariad@dougal.logica.co.uk Subject: Re: Relation Modula3 and Modula2 In article <2ollljINN86u@floyd.informatik.uni-kiel.de> rb@informatik.uni-kiel.d e (Ralf Behnke) writes: >Hello readers of the newsgroup comp.lang.modula3, > >I have heard about the language modula3 just a few weeks ago, so >I do not know any details of this language. >My question concerns the relation of modula3 to the 'old' >language modula2. >Especially I would like to know, if modula2 is a proper >subset of modula3. > >So, can I use a compiler for modula3 to build executables >of a modula2 program? > >Thanks in advance for answers. > >Ralf Behnke > >-- >| Ralf Behnke, Institut fuer Informatik, Universitaet Kiel | >| rb@informatik.uni-kiel.d400.de Tel.: ++49-431-560489 | Modula-2 is not entirely a subset of Modula-3: 1. Variant records (or 'unions') These are not allowed in Modula-3 - they are apparently unsafe (type-checking-wise). 2. Enumerations These have to be qualified in Modula-3, e.g. if Red was an enumeration of type Colour, then whilst Modula-2 allows colour := Red, Modula-3 requires colour := Colour.Red . This makes sense when you consider a program with many enumerations. 3. The standard libraries provided with Modula-3 differ from those provided with Modula-2 (most noticeably the I/O library). I'm not well versed on the libraries and so cannot say whether the differences are large or small. There may be other differences - I left University and Modula behind me last August (for a job and C/C++), so Modula seems a bit hazy now. Devji Vekaria (Mr) ======================================================================= 60 === Date: Wed, 20 Apr 1994 16:53:57 +1000 (EST) From: psde@cherax.super.csiro.au (Peter Edwards) Subject: Installing 3.1 on a SPARC (still) G'day, >I've struck a problem installing the boot package of version 3.1 of SRC >Modula-3 on a Sun SPARC running SunOS 4.1. Thanks to those who took the time to offer suggestions. >When I run m3boot, there are many warnings from "ar" that filenames are too >long and are being truncated down to 15 characters. I think this matters, Consensus is that these are only the names used by "ar" to edit the library, and are not the entry-points used by the linker. Good! >m3ship, which failed quite quickly >with: > cp: m3cc/SPARC-SPARC/m3cgc1: No such file or directory > *** error code 1 > "/blahblah/m3inst/boot-SPARC/m3build/templates/SPARC", line 196: > command execute failed Several people said I probably hadn't unpacked the m3cc.tar.gz properly, so I did it again, but with the same results. Checking, I see that there is no m3cgc1 file anywhere on any of boot-SPARC.tar.gz, m3cc.tar.gz or libm3.tar.gz. Should there be, or is it *created* by the m3boot and/or m3ship commands? >From my top-level (boot-SPARC) directory, I see: % ls m3cc SPARC-SPARC/ build* gcc/ src/ % ls m3cc/SPARC-SPARC Makefile config.h@ hconfig.h@ tconfig.h@ aux-output.c@ config.status* md@ tm.h@ Is this normal? One person said m3cgc1 lives in lib/m3/SPARC. I don't have a lib directory, but libm3/SPARC exists (and doesn't have m3cgc1). The instructions say to load the libm3.tar.gz *after* the m3boot and m3ship for the compiler. Is this correct? Does 3.1 require GNU C to be already installed on the system? I assumed it was *included* in the archives on Gatekeeper. Thanks - Hooroo - Peter Cray Research Australia 570 St Kilda Rd, Melbourne, Vic 3004 Voice: +61-3-2822656 or 2436117 FAX: +61-3-5217050 US: psde@cray.COM or peter.edwards@cray.COM Oz: psde@dit.CSIRO.AU UUCP: ...!uunet!cray!psde Delphi: PSDE ======================================================================= 61 === Date: Thu, 07 Apr 94 22:43:41 -0700 From: msm@src.dec.com Subject: Re: Problems using the TCP/IP modules The implementation of TCP.Accept raises FatalError only from inside InitFD, and only in the case that it appears that we haven't been successful in turning on O_NDELAY in the socket options. What operating system are you running on? Are all the constants in the Usocket interface correct for your machine (verify them against socket.h)? If you figure out what's wrong, let us know; send mail to wobber@src.dec.com and muller@src.dec.com. Mark ======================================================================= 62 === Date: 8 Apr 1994 00:29:55 GMT From: braams@cims.nyu.edu (Bastiaan Braams) Subject: dynamic type I would be grateful if someone could educate me concerning the reason for the absence from Modula-3 (and from Pascal and Modula-2) of dynamic (run-time) types, more particularly of the dynamic subrange type, and still more particularly of the dynamic array facility that I remember from Algol-60. I am thinking of the following sort of code, illegal in Modula-3. MODULE prog EXPORTS Main; VAR n: INTEGER; BEGIN n := ...; VAR a: ARRAY [0..n-1] OF INTEGER; BEGIN ... END END prog. Let me immediately follow up to the most obvious quick answers: A: Dynamic typing is unsafe. Q: Please explain--Can't we have run-time checks for all the relevant requirements? A: Dynamic types are unnecessary. Q: This would be an objection if they would complicate the language. But do they do that? It seems to me that the syntax would even simplify if a dynamic subrange type were permitted--one just removes from the language specification the requirement that the expressions defining the subrange be constant expressions. A: Just the same, they are unnecessary. Q: Yes, one can program around their absence, for instance with use of the open array type in the example above. But that can be rather cumbersome if the natural indexing of the array is not zero-based. One code of mine deals with two-dimensional arrays that are viewed as functions on a domain of nx*ny lattice points surrounded by a rim of lattice points of width b; the natural dimensioning of such arrays is [-b..nx+b-1,-b..ny+b-1], not [0..nx+2*b-1,0..ny+2*b-1] as a Modula-3 open array would have it. A: Because it requires run-time checks, dynamic typing is inefficient. Q: Is that really true? What makes it so costly? Is the cost of having dynamic types in the language worse than the cost that a conscientious programmer would occur in connection with whatever checks he must employ when coding around the absence of dynamic types? I am sure that this issue has been debated many times, and would also appreciate pointers to the literature. -- Bas Braams (braams@cims.nyu.edu) ======================================================================= 63 === Date: 8 Apr 1994 07:52:17 GMT From: gianluca@dini.iet.unipi.it (Gianluca Dini) Subject: references to modula3 Hi, I'm a neophyte of both modula3 and this news-group. I'm interested in modula3 for my research and i would like to have some referen ce to get started. all the best gianluca ======================================================================= 64 === Date: Fri, 8 Apr 1994 04:06:01 GMT From: norman@flaubert.bellcore.com (Norman Ramsey) Subject: Re: TCP programming In article , Richard Rundle wrote: >I am considering writing some software in modula 3 which makes use of TCP >connections. I am writing for an Unix environment (SunOS and later Ultrix). > >Is there a modula3 socket library (or something similar). I posted some code last year to help implement TCP servers and clients in thread-safe fashion. I repost it here. Also, there may be something in the new SRC libraries. Norman (* \section{Network interface} *) (* A [[Network.T]] is a (reader, writer) pair used for talking to another *) (* process. A [[Network.Server]] is a server that can accept connections *) (* from client processes, which call [[Network.Connect]]. The server *) (* process should have a thread that loops and calls [[Network.Accept]] *) (* over and over again. Typical servers will fork a new thread for each *) (* client connection returned by [[Network.Accept]]. Connections are *) (* specified by Internet host name and port number. *) (* *) (* The writer in a [[Network.T]] must be flushed explicitly to ensure *) (* that the pending bits are actually sent over the network. *) (* *) (* = *) INTERFACE Network; IMPORT UnixError, Rd, Thread, Wr; TYPE T = RECORD rd: Rd.T; wr: Wr.T; END; PROCEDURE Connect(hostname:TEXT; port:INTEGER):T RAISES {UnixError.E}; (* connect over the network *) TYPE Server <: REFANY; PROCEDURE Serve(port := 0):Server RAISES {UnixError.E}; (* serve named port, default any port *) PROCEDURE Accept(server: Server):T RAISES {UnixError.E, Thread.Alerted}; (* accept a connection on the server (blocks, serialized internally) *) PROCEDURE Host(server: Server):TEXT; (* return name of host served by server *) PROCEDURE Port(server: Server):INTEGER; (* return port number served by server *) END Network. (* The implementation of the [[Network]] interface is based on the C code *) (* in the BSD 4.3 IPC tutorial. *) (* *) (* <*>= *) UNSAFE MODULE Network; IMPORT Fmt, M3toC, Rd, RTScheduler, Text, Thread, UFileRdWr, Uin, Unetdb, Unix, UnixError, Usocket, Wr; (* = *) PROCEDURE Connect(host:TEXT; port:INTEGER):T RAISES {UnixError.E} = VAR hp := Unetdb.gethostbyname(M3toC.TtoS(host)); sock := Usocket.socket(Usocket.AF_INET, Usocket.SOCK_STREAM, 0); server: Uin.struct_sockaddr_in; BEGIN IF hp = NIL THEN UnixError.Fail("unknown host: " & host) END; IF sock < 0 THEN UnixError.Fail("can't create socket") END; server.sin_family := Usocket.AF_INET; bcopy(hp.h_addr_list^, ADR(server.sin_addr), hp.h_length); server.sin_port := Uin.htons(port); IF Usocket.connect(sock, ADR(server), BYTESIZE(server)) < 0 THEN UnixError.Fail(Fmt.F("Can't connect to server at %s %s", host, Fmt.Int(port ))); END; RETURN FromFD(sock); END Connect; (* When creating a (reader, writer) pair from a socket, I duplicate the *) (* socket, which makes it possible to close both the reader and writer *) (* without barfing. If such wasteful use of open file descriptors *) (* offends, the solution is to implement new reader and writer classes *) (* such that the underlying file descriptor is not closed until both the *) (* reader and writer are closed. *) (* *) (* = *) PROCEDURE FromFD(sock:INTEGER):T = VAR input := UFileRdWr.CreateFileReader(sock); output := UFileRdWr.CreateFileWriter(Unix.dup(sock), buffered := TRUE); <*FATAL Rd.Failure, Wr.Failure*> BEGIN RETURN T {input, output}; END FromFD; (* This implementation of [[bcopy]] is slightly embarrassing, but I *) (* find address arithmetic too painful to contemplate. *) (* *) (* = *) PROCEDURE bcopy(src:ADDRESS; dest:ADDRESS; n:INTEGER) = VAR s, d : UNTRACED REF ARRAY [0..1023] OF CHAR; BEGIN IF n <= 0 THEN RETURN END; s := src; d := dest; SUBARRAY(d^, 0, n) := SUBARRAY(s^, 0, n); END bcopy; (* To serialize acceptance of new connections, a [[Network.Server]] *) (* is also a mutex. *) (* *) (* = *) REVEAL Server = MUTEX BRANDED "Network.Private" OBJECT server : Uin.struct_sockaddr_in; sock: INTEGER; hostname : TEXT; port : INTEGER; END; PROCEDURE Host(server: Server):TEXT = BEGIN RETURN server.hostname END Host; PROCEDURE Port(server: Server):INTEGER = BEGIN RETURN server.port END Port; (* The code to create an accepting socket within the server *) (* is from the IPC tutorial. I've added the call to [[gethostname]] *) (* as a convenience. I call [[Usocket.listen]] with the maximum backlog, *) (* 5, because there seems no reason to make the potential backlog any *) (* smaller than the maximum. *) (* *) (* = *) PROCEDURE Serve(port := 0):Server RAISES {UnixError.E} = VAR server := NEW(Server); hostbuf : ARRAY[0..1023] OF CHAR; BEGIN server.sock := Usocket.socket(Usocket.AF_INET, Usocket.SOCK_STREAM, 0); IF server.sock < 0 THEN UnixError.Fail("creating socket") END; IF Unix.gethostname(ADR(hostbuf[0]), BYTESIZE(hostbuf)) < 0 THEN UnixError.Fail("gethostname"); END; (* It's not safe to use [[M3toC.StoT]] here because the storage holding * ) (* the host name may be re-used. * ) (* * ) (* = * ) VAR i := 0; BEGIN WHILE i < NUMBER(hostbuf) AND hostbuf[i] # '\000' DO INC(i) END; server.hostname := Text.FromChars(SUBARRAY(hostbuf, 0, i)); END; server.server.sin_family := Usocket.AF_INET; server.server.sin_addr.s_addr := Uin.INADDR_ANY; server.server.sin_port := Uin.htons(port); IF Usocket.bind(server.sock, ADR(server.server), BYTESIZE(server.server)) # 0 THEN UnixError.Fail("binding socket"); END; VAR length := BYTESIZE(server.server); BEGIN IF Usocket.getsockname(server.sock, ADR(server.server), ADR(length)) # 0 TH EN UnixError.Fail("getsockname"); END; END; server.port := Uin.ntohs(server.server.sin_port); IF Usocket.listen(server.sock, 5) # 0 THEN UnixError.Fail("listen") END; RETURN server; END Serve; (* To avoid blocking the entire address space on the [[accept]] system *) (* call, [[Accept]] calls [[select]] first. Because the socket is hidden *) (* within the [[Network.Server]], and because this code is protected by *) (* the mutex, other code can't get in and accept the connection between *) (* the time [[select]] returns and the connection is accepted. *) (* *) (* Normal usage is to fork a thread that loops and calls [[Accept]] *) (* continually. The thread can be stopped by alerting it. *) (* *) (* = *) PROCEDURE Accept(server: Server):T RAISES {UnixError.E, Thread.Alerted} = VAR sock : INTEGER; reads := Unix.FDSet { server.sock }; BEGIN LOCK server DO IF RTScheduler.IOAlertSelect(server.sock + 1, ADR(reads), NIL, NIL) < 0 THE N UnixError.Fail("select"); END; sock := Usocket.accept(server.sock, NIL, NIL); IF sock < 0 THEN UnixError.Fail("accepting socket connection") END; RETURN FromFD(sock); END; END Accept; BEGIN END Network. ======================================================================= 65 === Date: 8 Apr 1994 15:42:38 GMT From: Eric Muller Subject: Modula-3 Frequently Asked Questions (FAQ) Archive-name: Modula-3-faq Last-modified: Feb 3 1994 Modula-3 Frequently Asked Questions =================================== 1. The language 1.1 What is Modula-3? 1.2 Is Modula-3 a superset of Modula-2? 2. The documentation 2.1 Where can I get a description of Modula-3? 2.2 Where can I get other information on Modula-3? 3. The implementations 3.1 Where can I get an implementation? 3.2 What is SRC Modula-3? 3.3 What is m3pc? 3.4 What is GNU Modula-3? 4. Some specific questions 4.1 Why is "Hello World" so large? 4.2 Why objects and interfaces? 4.3 What is the story with Trestle and OpenWindows? 4.4 When is the next release of SRC Modula-3 ? 5. FTP 5.1 What if I don't have ftp access? 6. Contributing 6.1 Can I contribute Modula-3 software? 1.1. What is Modula-3? Modula-3 is a systems programming language that descends from Mesa, Modula-2, Cedar, and Modula-2+. It also resembles its cousins Object Pascal, Oberon, and Euclid. 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 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. 1.2. 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. 2.1. 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 The errata sheet is available via anonymous ftp from gatekeeper.dec.com in pub/DEC/Modula-3/errata. 2.2. 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, November 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 Modula-3 treatment of floating-point values is described in "The Design of Floating-Point Data Types", David Goldberg, ACM Letters on Programming Languages and Systems (LOPLAS), June 1992, Vol 1, #2, pp 138-151 The core library interfaces are described and indexed in "Some Useful Modula-3 Interfaces", Jim Horning, Bill Kalsow, Paul McJones, Greg Nelson, SRC Research Report 113. Available vi anonymous FTP from gatekeeper.dec.com in pub/DEC/SRC/research-reports/SRC-113.ps.Z The Trestle window system toolkit, higher-level FormsVBT toolkit, and Zeus animation system 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. "VBTkit Reference Manual: A toolkit for Trestle", edited by Marc H. Brown and James R. Meehan. (soon to be a SRC Research Report) A draft version is available via anonymous FTP from gatekeeper.dec.com in pub/DEC/Modula-3/contrib/vbtkit.25Mar93.ps.Z. "The FormsVBT Reference Manual", Marc H. Brown and James R. Meehan, (soon to be a SRC Research Report). A draft version is available via anonymous FTP from gatekeeper.dec.com in pub/DEC/Modula-3/contrib/formsvbt.25Mar93.ps.Z and pub/DEC/Modula-3/contrib/formsvbt.AppC.26Mar93.ps.Z. "Zeus: A System for Algorithm Animation and Multi-View Editing", Marc H. Brown, SRC Research Report 75, February 28, 1992. Available via anonymous FTP from gatekeeper.dec.com in pub/DEC/SRC/research-reports/SRC-075*.ps.Z. "Color and Sound in Algorithm Animation", Marc H. Brown and John Hershberger, SRC Research Report 76a, August 30, 1991. Available via anonymous FTP from gatekeeper.dec.com in pub/DEC/SRC/research-reports/SRC-076a*.ps.Z. "The 1992 SRC Algorithm Animation Festival", Marc H. Brown, SRC Research Report 98, March 27, 1993. Available via anonymous ftp from gatekeeper.dec.com in pub/DEC/SRC/research-reports/SRC-098*.ps.Z. Hardcopy versions of these reports can be ordered by e-mail; send your request including a postal mail address to src-reports@src.dec.com. Sedgewick's classic text on computer algorithms is presented in Modula-3 in: Alogorithms in Modula-3 Robert Sedgewick Addison-Wesley, 1993 ISBN 0-201-53351-0 3.1. Where can I get an implementation? Two implementations are available, SRC Modula-3 and a PC version of it (m3pc). Apparently work on GNU Modula-3 has stopped. As far as we know, implementations are not available for VMS, Macintosh, or Alpha AXP/OSF. 3.2. What is SRC Modula-3? SRC Modula-3 was built by the DEC Systems Reseach Center and is available via anonymous ftp from gatekeeper.dec.com in pub/DEC/Modula-3/release. 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. 3.3. What is m3pc? m3pc is available via anonymous ftp from gatekeeper.dec.com in pub/DEC/Modula-3/contrib/m3pc. --------- From: laszlo@post.ifi.uni-klu.ac.at (Prof.Dr.Laszlo BOESZOERMENYI) Subject: M3 pn 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). The first version was ported by Klaus Preschern. Carsten Weich rewrote the handling of long filenames for the second version. You may compile, link and run Modula-3 programs, without threads. From the library modules only those are tested which are used by the compiler. We are using the actual version for our beginners-course and we are working on "student-friendly" programming environmnents and a simple windowing graphic-library. --------- From: carsten@post.ifi.uni-klu.ac.at (Carsten WEICH) Subject: New version of Modula-3/PC Date: 28 Jan 1994 13:25:28 GMT We have built a new version of Modula-3 running on a PC. You will need a PC: * 80486 or 80386 with floatingpoint-coprocessor, * at least 4 but preferable 8 MByte of RAM, * 20 MByte discspace free at least. You can run a modified Modula-3 version 2.09 without thread- support. Our version features: * support for Unix-like long filenames * automatic compilation (to substitute the lack of m3make) * library to access DOS-files and directories. We have built a little shell which translates the long filenames you type in into DOS-filenames. It has a unix-lookalike "ls"-command. There are commands to teach the system new long filenames. You can savely move such files around through DOS-directories (which was not possible with the first version). This version accesses DOS-files significantly faster than the first version. Especially linking large Modula-3 programs is much faster now. On a 50 MHz 80486 with 16 MByte of RAM we measured a turn-around time of 2 minutes for a 5 module, 500 lines program. If you want to compile only one module you will have to wait about one minute. The necessary files are available at "gatekeeper.dec.com" in /pub/DEC/Modula-3/contrib/m3pc: Install.txt please read this first! djgpp.tar the DJGPP-gnu-C-compiler m3.tar compiler binaries m3src.tar sources of the compiler (optional) tar.exe program to unpack these files 3.4. What is GNU Modula-3? From: hudson@cs.umass.edu (Rick Hudson) Subject: Re: Where to start - GNU M3 status. Date: 02 Mar 1994 20:53:10 GMT I put in as much time as anyone on the GM3 project and have it wired up and sort of running on my desk well enough to do run experiments. Unfortunately, it is in no shape for prime time. No threads and 20% of the SRC libraries don't even compile. Work slowed in July due to me switching projects and pretty much halted when it became obvious that SRC was doing such a good job on their compiler. We are porting pieces of our backend and runtime into the SRC stuff but it is just for internal research use since that is all we really have time for. Cheers, --------- From: moss@cs.cmu.edu (Eliot Moss) Subject: GNU Modula-3 alpha release status Date: 25 Mar 93 17:53:12 GMT We said we'd try to get the initial (alpha) release of GNU Modula-3 out some time this month (March), and we're in the process of figuring out what to release and how to package it up. We expect to have something in roughly two weeks (watch this space for a notice). What would this be? First, it is a compiler for the VAX (only) under Ultrix (only), definitely without threads, and probably still failing a small number of the tests in the SRC test suite (which implies that not all of libm3 is likely to work either). The actual release information will detail more about what's working and what's not at that time. We DO currently pass all the compiler tests that the SRC compiler did when it was first released (i.e., the ones we fail are more obscure things that users uncovered over time). Second, the release itself will be a compressed tar file including sources and executables. The executables will probably work only if you put libraries, etc., in the expected places (otherwise, you'll need to rebuild from sources).The compiler is written in C and should be compiled with a recent version of gcc (so you'll need gcc installed). The system also uses gld (the GNU linker). This release should be most useful to people undertaking ports to other machines and operating systems, since it will give them a head start on understanding the compiler and getting the full system ready. It may be of some use for ordinary programming, but it really depends on whether you tend to use features that tickle the remaining bugs. We are indeed interested in alpha test reports, but only if they tell us something new (i.e., we'll provide a list of known deficiencies). When the release is made, we'll also start email discussions with the various parties who have indicated they might undertake ports, to help sort out who will do what. Regards, and thanks for your continued interest and encouragement -- EM --------- From: moss@cs.cmu.edu (Eliot Moss) Subject: GNU Modula-3 pre-release Date: Wed, 5 May 1993 23:49:33 GMT At long last, the GNU Modula-3 project has a pre-release ready, for the VAX/Ultrix platform ONLY. Various folks had notified us of their interest in doing ports or alpha testing, and they have already been sent email with particulars on how to obtain the tar file, etc. There are a number of known bugs; I'll see about making a list available by ftp or something, for interested parties. It is our opinion that the prerelease is not mature enough for general use, but we wished to give a head start to those folks attempting ports, and we will make periodic patches available. If you want to use this compiler for serious program development or need something solid with debugging support for classroom use, you should wait until we've fixed more of the problems. (But to give a sense of what we HAVE accomplished, as I recall, all but 3 of the SRC compiler tests compile (there are 137 of them).) We hope to do a more general release, and support more platforms, in the summer. If you're interested in helping and have not previously contacted us, please send email to me and/or Rick Hudson (hudson@cs.umass.edu). Thanks to Digital and SRC for supporting us, and to Rick Hudson, Amer Diwan, and Norm Walsh, the guys who do all the hard work! 4.1. Why is "Hello World" so large? Modula-3 programs are larger than C programs for the following reasons: 1) The fixed runtime is substantially larger. It contains a garbage collector, a thread runtime, and exception support. Note that "Hello World" is virtually all runtime. For larger programs the runtime is not an issue. 2) The generated code includes runtime checks for out-of-bound array references and NIL pointer. Many of these checks could be removed by a better compiler. The current compiler is only a research prototype. 3) The compiler generates C code as its intermediate language consequently the final machine code suffers. For example, the compiler is constantly storing single-precision floating point values into memory to get around C's predisposition for double precision. 4.2. Why objects and interfaces? Allan Heydon on comp.lang.modula3, May 4th 1993: Modula-3 provides two separate mechanisms for data-hiding: one for hiding details about how interfaces are implemented, and the other for hiding details about how objects are implemented. The first data-hiding mechanism is realized by the distinction between interfaces and modules. Clients can only import interfaces, so the names declared in the modules implementing those interfaces are hidden from clients. Note that this mechanism has only two levels; a name is either declared in an interface, or it isn't. If a name is only declared in a module, it can't be used by a client. The second data-hiding mechanism is realized by opaque types and revelations. A Modula-3 interface may declare an object type to be opaque, in which case only a subset of the fields and methods of that object are revealed to clients importing the interface. Furthermore, the Modula-3 revelation mechanism allows a designer to reveal successively more fields and methods of an object in a series of interfaces. The fields and methods visible to a client then depends on which interfaces the client imports. The latter mechanism is quite flexible. As opposed to the interface/module data-hiding mechanism, opaque types allow you to define an arbitrary number of levels at which more and more information about the implementation of your object is revealed. See Sections 2.2.10, 2.4.6, and 2.4.7 of "Systems Programming with Modula-3" for more information about opaque types and about partial and complete revelations. 4.3. What is the story with Trestle and OpenWindows? Mark Manasse says: I think that the OpenWindows release should be enough (no need to get the MIT X release], although there are a few things in Trestle that trigger devastating bugs in OpenWindows. But the only library we depend on is Xlib, R4 or later. The main thing I know that crashes OW 2.0 is the code where we call GrabKey specifying AnyKey. You can either loop over all of the keys, or you can just comment out the call; programs won't run exactly the same, but you probably won't notice the difference. 4.4 When is the next release of SRC Modula-3 ? The next release will be 3.1. Here are some of the new things you will find in it: 1. the compiler has a new internal interface between the front-end and the back-end, M3CG. This interface is supposed to be easy to implement. 2. the front-end can compute in the target arithmetic system; in particular it is possible to cross-compile to machines with larger integers than the host. 3. one back-end has been implemented on top of gcc. The implementation of M3CG interface generates the tree representation used internally in gcc. From the gcc point of view, this back-end looks like a new front-end. Using this back-end, we have cross-compiled solitaire for mips, alpha and 386 processors; there is no reason to believe that there would be a problem for the other architectures supported by gcc. 4. Dave Hanson wrote another implementation of the M3CG that is self-contained. He is currently working on the 386 code generation (he has done the mips code generation already). 5. gdb has been modified to understand Modula-3 debugging information produced by the back-ends. gdb can now parse Modula-3 expressions, print Modula-3 values and evaluate some of the Modula-3 built-in operations. There is also a little bit of support for multi-threaded programs (you can look at the stacks of other threads). 6. there is a replacement for m3make, m3build, that does not rely on cpp/awk/sed/make and what not, and removes some of the limitations of m3make. m3makefiles are very similar. 7. libm3 has been significantly changed by the Interface Police, mostly in the area of OS interfaces and data structures. 8. for the OS interfaces, we still have the U* interfaces, but applications are not supposed to use those. Instead they should use a new set of interfaces that are os-independent; for example, there is a Pathname interface that manipulates file names; there is a Process interface that manipulate child processes. These interfaces enabled a prototype port of the C based version to Windows NT machines. 9. for the data structures, generics have been introduced and the various data structures are more consistent. 10. because of 6 and 8, we can think about going to different os than Unix. In particular a Windows NT port will be available at some point (may not be in 3.0). 11. the runtime has been improved quite a bit. 12. new platforms: Alpha running OSF/1, 386 running Linux. We will pay more attention to the porting instructions and support. 13. I am not sure about all the changes in the libraries other than libm3. I suspect that there will be few changes in trestle, but that mentor changed quite a bit. 14. The Windows NT port uses native threads. This should be a good model for other implementations of Thread using native threads. The current status is: . the front-end is very stable . the gcc-based back-end has been stable for 4 months . the gdb extensions are brand new and need some test . the interface police work is very stable . we are working on bringing the system up on the machines we have in the building, and building the export machinery. We don't have a date for the 3.1 release. Given the amount of changes introduced by 3.1, I suspect that the first few releases will not work out of the box for any machine but the ones for which we can test (decstations [mips and alpha], linux). Consequently, I expect a high rate of releases for a while. We will try to post accurate information about the status of each machine, but we can only rely what you tell us. At this point, I would not encourage anybody to start a new port. If you have a new port, or are close to complete one, you can send us your bits, we will try to put them in 3.1. 5.1. 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 6.1. 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. ======================================================================= 66 === Date: 8 Apr 1994 15:40:49 GMT From: Eric Muller Subject: Re: dynamic type In article <2o28i3$n9e@slinky.cs.nyu.edu>, braams@cims.nyu.edu (Bastiaan Braams) asks for "dynamic arrays". Try: MODULE prog EXPORTS Main; VAR n: INTEGER; BEGIN n := ...; VAR a := NEW (REF ARRAY OF INTEGER, n); BEGIN ... END END prog. -- Eric. ======================================================================= 67 === Date: 08 Apr 1994 12:47:55 GMT From: qs101@pelican.cl.cam.ac.uk (Quentin Stafford-Fraser) Subject: Re: Problems using the TCP/IP modules I rather doubt that this is your problem, but just in case... The 3.1 distribution for SPARCs has some bugs which mean that the VM garbage collector doesn't work. Until you apply the appropriate patches, you have to run programs with @M3novm. I don't know what your architecture is, or whether this bug affects other architectures. Some programs worked without @M3novm, but whenever I tried to run anything netobj-based, it would die with a TCP.FatalError. This may, of course, be totally irrelevant to your situation :-) Regards Quentin -- ---------------------------------------------------------------------- Quentin Stafford-Fraser Cambridge University Computer Lab Rank Xerox Cambridge EuroPARC qs101@cl.cam.ac.uk fraser@europarc.xerox.com Tel: +44 223 334411 Tel: +44 223 341521 Fax: +44 223 334679 Fax: +44 223 341510 http://pelican.cl.cam.ac.uk/people/qs101/me.html ---------------------------------------------------------------------- ======================================================================= 68 === Date: Fri, 8 Apr 1994 14:50:47 GMT From: gvreugde@plg.uwaterloo.ca (Gord Vreugdenhil) Subject: trestle (et al) and zeus with 3.1 & Sun 670MP Got modula 3.1 running on our 670MP. (thanks to all for the discussion/patch lists). I am now trying to get zeus running. Step 1: trestle..... trestle compiled without a hitch, but when I try to compile any of the tutorial code pieces, I get link errors. Example (from ButtonTest): gvreugdenhil[87]% m3build --- building in SPARC --- m3 @M3novm -w1 -why -g -w3 -o ButtonTest -F/usr/tmp/aaaa19726 new source -> compiling ../src/Button.i3 new source -> compiling ../src/Button.m3 new source -> compiling ../src/ButtonTest.m3 -> linking ButtonTest ld: Undefined symbol __XtInherit _get_wmShellWidgetClass _get_applicationShellWidgetClass _XtToolkitInitialize If I try the build again, the build succeeds but the executable still fails with the following: ld.so: Undefined symbol: __XtInherit I can get a full link by doing a manual ld, but the resulting executable core dumps. Any suggestions?? Gord gvreugde@plg.uwaterloo.ca ======================================================================= 69 === Date: 9 Apr 1994 07:38:18 GMT From: stolfi@atibaia.dcc.unicamp.br (Jorge Stolfi) Subject: Re: dynamic type > [Eric Muller:] Bastiaan Braams asks for "dynamic arrays". Try: > > MODULE prog EXPORTS Main; > VAR n: INTEGER; > BEGIN > n := ...; > VAR a := NEW (REF ARRAY OF INTEGER, n); > BEGIN > ... > END > END prog. I would rather write MODULE prog EXPORTS Main; VAR n: INTEGER; BEGIN n := ...; WITH a = NEW (REF ARRAY OF INTEGER, n)^ DO ... END END prog. Note that the type of "a" here is ARRAY OF INTEGER, whereas in Eric's example it is REF ARRAY OF INTEGER. The two types are equivalent when indexing elements, but in a few places Eric must still write "a^" instead of just "a". --stolfi -------------------------------------------------------------------- Jorge Stolfi | Tel: +55 (192) 39-8442 Computer Science Dept. (DCC-IMECC) | +55 (192) 39-3115 Universidade Estadual de Campinas (UNICAMP) | Internet: stolfi@dcc.unicamp.br | Fax: +55 (192) 39-7470 -------------------------------------------------------------------- ======================================================================= 70 === Date: Sat, 9 Apr 1994 18:39:48 GMT From: chen@adi.com (Franklin Chen) Subject: Modula-3 for Mac? Does anyone know of Modula-3 compilers available for the Macintosh? In particular, has the source for the compiler at gatekeeper.dec.com been ported to the Macintosh? Please reply by email, as I have trouble getting this newsgroup. -- Franklin Chen chen@adi.com Applied Dynamics International 3800 Stone School Road Ann Arbor, MI 48108-2499 ======================================================================= 71 === Date: Sun, 10 Apr 1994 05:34:00 GMT From: sdk@c3i.com Subject: Joystick Software Developers Kit Announcement ******************************* ATTENTION: ALL GAME PROGRAMMERS ******************************* *** SOFTWARE DEVELOPER'S KIT ANNOUNCEMENT *** Available immediately: software developer's kit for a new joystick code-named 'C4'. The 'C4' joystick has the following features: o For use on all the following computers and game systems: (specific cable required) - IBM PC and compatibles - Super Nintendo/Super Famicom - Sega Genesis/Megadrive - Macintosh with Apple Desktop Bus - Amiga - CD32 - Nintendo Entertainment System 8-bit - Sega Master System - AppleIIGS - Atari - Commodore 64 o Eight-button mode available on all platforms. o Standard arcade size buttons in a compact arcade style case. o High strength steel shaft, with interchangeable handles. o LCD display for button feedback, game messages, and programming. o Five year warranty. o High precision and sensitivity. o Special sensor technologies; no contacts to wear out on primary components. o Fully programmable. - Turbo, slow, and custom modes available. - Adjustable deadzone for rock-steady precision centering. - Hundreds of presets available for the most popular games. o Selectable analog, digital, and other modes. o Retains settings in non-volatile memory; no batteries required. At product release, the 'C4' will be available for an MSRP of $99.95 and the developer's kit will be available for an MSRP of $199.95. SPECIAL SDK INTRODUCTORY PRICE FOR DEVELOPERS ----------------------------------------------------------------- A special pre-release offer is available to qualified developers. This special offer includes the SDK and beta version of the 'C4' joystick for $69.95. This price includes intermediate SDK upgrades and a joystick upgrade to the production release. To determine your eligibility for the SDK, please fill out the following application, and return the completed form to: sdk@c3i.com Please include your e-mail address: [ ] Thank you in advance, and I look forward to hearing from you. Jeremy McDonald VP of Product Development C3I Precision Instruments --------8<---- cut here ----8<---- cut here ----8<--------- ================= Software Developer Application ================ 1. Please provide a brief description of software you are currently working on, or are planning to work on through 1995. [ ] [ ] [ ] [ ] [ ] [ ] [ ] 2. Input devices supported: (please mark one or more with x) [ ] Joystick [ ] Keyboard [ ] Mouse 3. Systems supported: (please mark one or more with x) [ ] IBM PC and compatibles [ ] Super Nintendo/Super Famicom [ ] Sega Genesis/MegaDrive [ ] Macintosh with Apple Desktop Bus [ ] Amiga [ ] CD32 [ ] Nintendo Entertainment System 8-bit [ ] Sega Master System [ ] Apple IIGS [ ] Atari [ ] Commodore 64 [ ] Other (specify) --------------------------------------- 4. What is your preferred development language? (please mark one or more with x) [ ] C [ ] Assembler [ ] Other (specify) --------------------------------------- ================= Optional Personal Information ================= 5. What is your primary gaming system? (please mark with x) [ ] IBM PC and compatibles [ ] Super Nintendo/Super Famicom [ ] Sega Genesis/MegaDrive [ ] Macintosh with Apple Desktop Bus [ ] Amiga [ ] CD32 [ ] Nintendo Entertainment System 8-bit [ ] Sega Master System [ ] Apple IIGS [ ] Atari [ ] Commodore 64 [ ] Other (specify) --------------------------------------- 6. What is your secondary system, if any? (please mark with x) [ ] IBM PC and compatibles [ ] Super Nintendo/Super Famicom [ ] Sega Genesis/MegaDrive [ ] Macintosh with Apple Desktop Bus [ ] Amiga [ ] CD32 [ ] Nintendo Entertainment System 8-bit [ ] Sega Master System [ ] Apple IIGS [ ] Atari [ ] Commodore 64 [ ] Other (specify) --------------------------------------- 7. What are three favorite games that you use with your joystick? 1. [ ] 2. [ ] 3. [ ] 8. How many hours per week do you play games? (please mark with x) [ ] Less than five hours per week [ ] Between five and fifteen hours per week [ ] More than fifteen hours per week 9. Additional comments: [ ] [ ] [ ] [ ] [ ] [ ] [ ] ============================ End ================================ Trademark names are trademarks of their respective companies. Registered trademark names are registered trademarks of their respective companies. ======================================================================= 72 === Date: 11 Apr 1994 03:14:45 GMT From: elliottm@csulb.edu (Mike Elliott) Subject: Re: is anyone using M3 in industry? In article <1994Apr6.030325.50165@yuma> nate@yuma.ACNS.ColoState.EDU (Nate Samm ons) writes: I am curoius: is anyone out there actually programming in modula-3 who works for a software design company? Are there any career modula-3 programmers? I'm currently using M3 to prototype a trajectory modeler -- that is, a program which is given waypoints and maneuvers to be performed at specific times, and which will output the position, velocity, acceleration, attitude and attitude rates of a simulated aircraft at short (on the order of 10 millisecond) intervals. Later prototypes will include simulation of instruments such as intertial navigation ring gyros and such. Although the final product is to be delivered in Ada, I successfully argued the superiority of an OO approach to general modeling problems, selling them on Ada 9X. Since there isn't currently a 9X compiler around, (within my budget, at least) with the exception of GNAT, and GNAT has currently nowhere near the level of maturity of SRC's M3 compiler, I was able to do the prototyping in M3. Hopefully the SRC Commercial License, when released for the 3.X series of compilers, won't be restrictive enough to cause further development to cease in M3. I'm also hoping that once the prototype is fully functional, the burning desire to see it delivered in Ada will be substantially dimmed, perhaps even forgotten! -- ====================================================================== Mike Elliott elliottm@csulb.edu ====================================================================== ======================================================================= 73 === Date: Mon, 11 Apr 1994 14:12:07 GMT From: dagenais@froh.vlsi.polymtl.ca (Michel Dagenais) Subject: Re: is anyone using M3 in industry? Hopefully the SRC Commercial License, when released for the 3.X series of compilers, won't be restrictive enough to cause further development to cease in M3. I'm also hoping that once the prototype is fully functional, the burning desire to see it delivered in Ada will be substantially dimmed, perhaps even forgotten! The current commercial license requires that you sign something to free DEC from any liability. My understanding is that the new license will be even less restrictive (DEC is still not liable of course but you dont have to sign anything), especially for companies that would sell ready to run versions of the M3 compiler as well as support. -- --------------------------------------------------------------------- Prof. Michel Dagenais dagenais@vlsi.polymtl.ca Dept of Electrical and Computer Eng. Ecole Polytechnique de Montreal tel: (514) 340-4029 --------------------------------------------------------------------- ======================================================================= 74 === Date: Mon, 11 Apr 1994 14:34:41 GMT From: dagenais@froh.vlsi.polymtl.ca (Michel Dagenais) Subject: Re: modula-3 in LINUX I just joined this newsgroup, and there were only a few posts in it. I saw a few mentions of mod3 working in LINUX. is there a release that works with LINUX or did someone have to do a major hack to get it to work? LINUX is one of the supported platforms for the latest release (DEC SRC 3.1). However, 3.1 being a major release and the first to support LINUX, there were a few problems, most of which have been resolved (threads, shared libs). I still have not seen the final answer on the problems with the debugger though. Thus you can wait for the soon to come release 3.2, i can also tell you about the patches i have, or you can take my binaries available on ftp.vlsi.polymtl.ca:lude/modula3-3.1/run/linuxm3.tar.gz. These binaries come with shared libraries and threads work fine (including trestle applications). Be aware, however, that the addresses for the shared libraries will change and your programs will need to be relinked when i come up with binaries for the next release. -- --------------------------------------------------------------------- Prof. Michel Dagenais dagenais@vlsi.polymtl.ca Dept of Electrical and Computer Eng. Ecole Polytechnique de Montreal tel: (514) 340-4029 --------------------------------------------------------------------- ======================================================================= 75 === Date: Mon, 11 Apr 1994 20:32:46 GMT From: grantd@dcs.gla.ac.uk (Dair Grant) Subject: What's special about methods? Can anyone help me with this? I'm trying to pass an object's method into a routine, but I'm getting an incompatible type. Basically, I have a type T, with methods DoSomething and TraverseProc bound to methods pDoSomething and pTraverseProc. I have a module ActorTable, where the type ActorTable.T is a table, and ActorTable.Traverse is a routine for traversing over these tables. ActorTable.Traverse takes three parameters: The table to traverse over, a variable of ROOT type, and a procedure of type: TraverseProcType = PROCEDURE(theObject : ROOT; theActor : Actor.T); The following code compiles OK, and works fine. Note that I'm passing in pTraverseProc as pTraverseProc, and not as a method of the 'this' object. I can't reveal the type T to the ActorTable module, so I pass theObject as a ROOT. --- Works Fine -------------------------------------------- PROCEDURE pDoSomething(this : T) = VAR theTable : ActorTable.T; BEGIN . . . (* Traverse the table with our traverse proc *) ActorTable.Traverse(theTable, this, pTraverseProc); END; PROCEDURE pTraverseProc(thisObj : ROOT; theActor : Actor.T) = VAR this : T; BEGIN (* Convert the object to a T *) this := NARROW(thisObj, T); END; ----------------------------------------------------------- However, what I want to pass in is: ActorTable.Traverse(theTable, this, this.TraverseProc); this.TraverseProc should be mapped to a call to pTraverseProc(this), according to Harbison. However, it chokes with an 'incompatible types' error for the third paramater to ActorTable.Traverse if I pass it in as 'this.TraverseProc'. I _could_ just leave things as they are, but I'd like to be able to derive objects from these objects, and just override the pTraverseProc method. Otherwise I'll have to recode the pDoSomething method, and my objects won't have the advantages of inheriting things from a common parent. So what should I do? Is there any way round this? And, out of interest, why are methods treating differently from 'normal' procedures? Sorry if this is a no-brainer... -dair ---------------------+-------------------------------------------------------- Dair Grant |"And now, from the makers of EDLIN, comes: Windows NT!" grantd@dcs.gla.ac.uk | (Jon W{tte) Finger for PGP key | ---------------------+-------------------------------------------------------- ======================================================================= 76 === Date: 12 Apr 1994 07:53:32 GMT From: nike@indirect.com (Laurence Canter) Subject: Green Card Lottery- Final One? Green Card Lottery 1994 May Be The Last One! THE DEADLINE HAS BEEN ANNOUNCED. The Green Card Lottery is a completely legal program giving away a certain annual allotment of Green Cards to persons born in certain countries. The lottery program was scheduled to continue on a permanent basis. However, recently, Senator Alan J Simpson introduced a bill into the U. S. Congress which could end any future lotteries. THE 1994 LOTTERY IS SCHEDULED TO TAKE PLACE SOON, BUT IT MAY BE THE VERY LAST ONE. PERSONS BORN IN MOST COUNTRIES QUALIFY, MANY FOR FIRST TIME. The only countries NOT qualifying are: Mexico; India; P.R. China; Taiwan, Philippines, North Korea, Canada, United Kingdom (except Northern Ireland), Jamaica, Domican Republic, El Salvador and Vietnam. Lottery registration will take place soon. 55,000 Green Cards will be given to those who register correctly. NO JOB IS REQUIRED. THERE IS A STRICT JUNE DEADLINE. THE TIME TO START IS NOW!! For FREE information via Email, send request to cslaw@indirect.com -- ***************************************************************** Canter & Siegel, Immigration Attorneys 3333 E Camelback Road, Ste 250, Phoenix AZ 85018 USA cslaw@indirect.com telephone (602)661-3911 Fax (602) 451-7617 ======================================================================= 77 === Date: 13 Apr 1994 17:32:25 GMT From: qs101@pelican.cl.cam.ac.uk (Quentin Stafford-Fraser) Subject: Info on upgrading to 3.1 People contemplating (or struggling with) a move from 2.11 to 3.1 may be interested in http://pelican.cl.cam.ac.uk/groups/m3/upgrade.html This is a collection of some of the most common things I've had to tell people making the change. This is not a finished document yet, but I hope it may be useful. Comments appreciated. Quentin -- ---------------------------------------------------------------------- Quentin Stafford-Fraser ======================================================================= 78 === Date: 13 Apr 1994 11:40:37 GMT From: kasbj@alkymi.unit.no (Kjetil Asbj|rn Skotheim) Subject: Language learning effort If you know how to program in Pascal and/or C/C++ please answer the following questions. This is an examination on learning effort of the programming languages Pascal and C/C++. If you do not know Pascal, but do know Simula, Modula or Ada, just change all occurrences of Pascal with one of those. 1. What language did you learn first, Pascal or C/C++ (P/C) 2. How many other programming languages did you know before learning the first of Pascal or C/C++? (0- ) 3. Evaluate your skills in Pascal on a scale from 0 to 9. (9 is highest). 4. Evaluate your skills in C/C++ on a scale from 0 to 9. (9 is highest). 5. If you know both languages, but learned Pascal first: How hard was it to learn C/C++ compared to learning Pascal. 1-9. (9="Learning C/C++ when knowing Pascal was just as hard as learning Pascal") 6. If you know both languages, but learned C/C++ first: How hard was it to learn Pascal compared to learning C/C++. 1-9. (9="Learning Pascal when knowing C/C++ was just as hard as learning C/C++") 7. If you know Pascal, but not C/C++: How interested are you in learning C/C++. 0 (not at all) - 9("Im going to, immediately!") 8. If you know C/C++, but not Pascal: How interested are you in learning Pascal. 0 (not at all) - 9("Im going to, immediately!") 9. If you know Pascal: Evaluate your skills in object oriented programming in Pascal? 0 (uh?) - 9 (could not be better!) 10. If you know C++: Evaluate your skills in object oriented programming in C++? 0 (uh?) - 9 (could not be better!) 11. If you know both, which do you like the most (or hate the least), Pascal or C/C++ (P/C/x) 12. Any comments you might have. ([a-z ]*) Send answers to kasbj@idt.unit.no in a format like this example: 1 P 2 1 3 1 4 6 5 5 6 x 7 x 8 x 9 4 10 6 11 x 12 brb brb brb brb brb brb -- Kjetil Skotheim, University of Trondheim Norwegian Institute of Technology Email: kasbj@idt.unit.no Snailmail: Schmidtsgt. 5, 7016 Trondheim, Norway Phone: (+47) 73 51 87 88 ======================================================================= 79 === Date: 13 Apr 1994 07:44:05 GMT From: mpphilli@ic.sunysb.edu (Michael P Phillips) Subject: Where can I get m3-pc? Does anyone know of an ftp site that has modula3 for dos in a set of files no larger than 1.44mg. The system I am on won't let me save files that are very large. I have to save the files to floppy disk. Thanks -MIKE ======================================================================= 80 === Date: 13 Apr 1994 22:24:09 GMT From: siva@vtaix.cc.vt.edu (Siva Challa) Subject: Help: Problems with installing vbtkit of Modula-3 3.1 Hi I am trying to install vbtkit on a DEC Station (DS3100). I installed Modula-3 3.1 compiler successfully. While doing m3build in vbtkit directory I am getting an error message saying 'sh: m3bundle: not found'. I could not find the file m3bundle anywhere. Can anybody help me with this ? Thanks Siva Challa siva@csgrad.cs.vt.edu ======================================================================= 81 === Date: 1 Apr 1994 16:56:44 GMT From: frsg100@cus.cam.ac.uk (F.R.S. Gouget) Subject: Problems with V3.1 on LINUX Hi, I have just installed Modula3 v3.1 on my LINUX box. I must say that the installation worked just fine. So why to I post this message then ? Well, it is when I did the tests that I ran into problems. So if someone knows a solution to any of them... *** Virtual time alarm : The Hello program worked just fine. Then I tried another program that I had written in Modula3 on Suns and that I knew should work. I name the classical Producer-Consumer program, here between two threads and using a buffer. The program stopped abruptly with a : > Virtual time alarm That's not what I expected. An analyze with gdb showed that the problem arises in the Rd.GetChar function. So I removed it. It worked fine but no longer did what I wanted. So I added a Thread.Pause to replace the Rd.GetChar. The problem reappeared. I also tried to use Rd.GetChar alone (i.e. make a Rd.GetChar sandwich with two Wr.PutText), it worked ! I also tried the Trestle Hello program. It seemed to work. I resized the window once or twice and then it disappeared. xxgdb indicated that the program received a signal corresponding to Virtual time alarm and that it was no longer running ! *** AutoFlushWr : Tired to use the combination Wr.PutText,Wr.Flush, I used an AutoFlushWr.T linked to Stdio.stdout. I used the default value for the second argument which means that the "writer" should be suitable for terminals. The problem is that having done this, it never printed anything on the screen. Would this problem be related with the previous one ? (Something to do with Timers or Threads) *** Static Linking : This is not a bug. It is just that on LINUX, Modula3 uses static libraries although LINUX can use dynamic libraries (Thus producing a Hello program of about 760Kb or 260Kb once stripped). I also know that Modula3 uses dynamic libraries on the university SUNs so I thought that it would do so on LINUX. Is there something I can do to remedy to this problem or is it a limitation of the port to LINUX ? The configuration I am using : - Slackware LINUX 1.2.0 - 486Dx50 8Mb - Modula3 v3.1 : I installed boot-LINUX, m3cc, libm3, trestle GOUGET e-mail : frsg100@cus.cam.ac.uk ======================================================================= 82 === Date: Fri, 1 Apr 1994 19:00:31 GMT From: dagenais@gutrune.vlsi.polymtl.ca (Michel Dagenais) Subject: shared libs on LINUX I sent a script to build shared libs on LINUX a few days back. I also mentioned problems with the shared libs tools on LINUX. More specifically, i applied the the following patches to the 2.11 shared libs tools: *** mkimage.c Fri Apr 1 13:37:53 1994 --- mkimage.c.orig Sun Jan 23 17:43:47 1994 *************** *** 78,84 **** void main(int argc, char ** argv) { char filename[256]; ! char wrapup[250000]; int c; int force; char *cp; --- 78,84 ---- void main(int argc, char ** argv) { char filename[256]; ! char wrapup[65536]; int c; int force; char *cp; *** jumpas.c Fri Apr 1 13:40:02 1994 --- jumpas.c.orig Sun Jan 23 17:43:47 1994 *************** *** 860,867 **** /* OK, this looks legit. Now find the end of the name */ for (j = i; fpnt->text[j]; j++) if (!(isalpha(fpnt->text[j]) || isdigit(fpnt->text[j]) || ! fpnt->text[j] == '_' || fpnt->text[j] == '$' || ! fpnt->text[j] == '.')) break; strncpy(scra, &fpnt->text[i], j-i); scra[j-i] = 0; --- 860,866 ---- /* OK, this looks legit. Now find the end of the name */ for (j = i; fpnt->text[j]; j++) if (!(isalpha(fpnt->text[j]) || isdigit(fpnt->text[j]) || ! fpnt->text[j] == '_' || fpnt->text[j] == '$')) break; strncpy(scra, &fpnt->text[i], j-i); scra[j-i] = 0; -- --------------------------------------------------------------------- Prof. Michel Dagenais dagenais@vlsi.polymtl.ca Dept of Electrical and Computer Eng. Ecole Polytechnique de Montreal tel: (514) 340-4029 --------------------------------------------------------------------- ======================================================================= 83 === Date: Sat, 2 Apr 1994 14:54:41 GMT From: whitney@galileo.Meakins.McGill.CA () Subject: Re: Q: Is there a public domain modula3 compiler available? Muharem Hrnjadovic (hrnjad@spock.isar.muc.de) wrote: : Hello, : I read an article Niklaus Wirth wrote for the february/1994 issue of : the Informatik Spektrum in Germany and from that reading modula3 seems : to be a very nice language. Modula-3 is on gatekeeper.dec.com ( 16.1.0.2 ). : I am using a i486 PC driven by BSD/386 from BSDI if it matters. A linux port already exists. You might be able to use it to port the compiler to BSD. Modula-3 runs as a compiler/translator to C. : P.S.: What about Oberon? Is it available for PC's? neptune.inf.ethz.ch ======================================================================= 84 === Date: 6 Apr 94 03:03:25 GMT From: nate@yuma.ACNS.ColoState.EDU (Nate Sammons) Subject: is anyone using M3 in industry? I am curoius: is anyone out there actually programming in modula-3 who works for a software design company? Are there any career modula-3 programmers? -nate sammons -- +-----------------------------------------------------------------------+ | Nate Sammons | | Colorado State University Computer Visualization Laboratory | | Data Visualization/Interrogation, Modeling, Animation, Rendering | +-----------------------------------------------------------------------+ ======================================================================= 85 === Date: 6 Apr 1994 02:20:47 GMT From: hendrik@CAM.ORG (Hendrik Boom) Subject: 3.1 and 2.11 Does anyone know how compatible 2.11 and 3.1 are? In particular, is it possible -- perhaps with small changes -- to compile the 3.1 compiler using 2.11? I'm working on an OS/2 port of Modula 3, and have been forced to give up on bootstrapping 3.1 from the LINUX version, because I can't get LINUX up on my PC. The Yggdrasil version of LINUX crashes when I boot the installation disk, presumably because I have a Trantor 130 CD controller, and its Trantor driver is flaky (according to the docs). So I'm trying to work up from m3pc, which is based on 2.11. The current DOS version of m3pc does appear to run under the DOS in OS/2, except for a minor p[roblem with absolute file names. ======================================================================= 86 === Date: 6 Apr 94 20:52:14 From: rundle@degas.jrc.flinders.edu.au (Richard Rundle) Subject: TCP programming I am considering writing some software in modula 3 which makes use of TCP connections. I am writing for an Unix environment (SunOS and later Ultrix). Is there a modula3 socket library (or something similar). Should I save myself a lot of pain and effort and just do it in C? Thanks ------------------------------------------------------------------------------ Richard Rundle rundle@jrc.flinders.edu.au Research Assistant http://www.jrc.flinders.edu.au CSIRO / Flinders Joint Research Centre in Information Technology ======================================================================= 87 === Date: Thu, 7 Apr 94 10:11:10 EDT From: gwyant@cloyd.East.Sun.COM (Geoffrey Wyant - Sun Microsystems Labs BOS) Subject: a little chatter for this list There seems to be a change in the set of runtime exceptions that are detected and raised in 3.1. In particular, I believe that 2.11 (and before) would raise exceptions on array bounds violations and functions not returning a value. These seem to have gone away at 3.1. Is this correct ? --geoff ======================================================================= 88 === Date: Thu, 7 Apr 1994 12:32:03 GMT From: mmc@imada.ou.dk (Morten Christensen) Subject: Implementation of exceptions Implementation of Exceptions ? Where can i get information about implementation details of exceptions ? I shall use this for my graduation work. - Any info will be greatly appreciated!!! Please mail mmc@imada.ou.dk Thanks Morten M. Christensen Odense Uni., Denmark ======================================================================= 89 === Date: Thu, 7 Apr 1994 13:51:21 GMT From: skj@oasis.icl.co.uk (Simon Johnston) Subject: Problems using the TCP/IP modules Can anyone help me please? This mail is a little large but if you could read it and let me know what you think I would be grateful. I have been playing with the TCP and IP modules to try and use the Rd/Wr abstractions there, I have built a Client and Server module to access a socket using these abstractions. However both modules compile fine, the server runs and sits on the Accept waiting for a connection. Then I start the client which raises a TCP.FatalError when executing the TCP.Connect. I have included the stack trace and also the StdOut from the client which shows what was going on. Machine : 153281425 Port : 8000 Client initialising Establishing connection to server *** *** runtime error: *** Exception "TCP.FatalError" not in RAISES list *** ------------------ EXCEPTION HANDLER STACK --------------------- 0xbffff910 RAISES {IP.Error} 0xbffff984 LOCK mutex = 0x591c0 0xbffff9b0 RAISES {IP.Error, Thread.Alerted} 0xbffffa20 TRY-FINALLY proc = 0x362ec frame = 0xbffffa3c 0xbffffaa8 TRY-EXCEPT-ELSE {} ---------------------------------------------------------------- IOT trap/Abort The server process runs until the TCP.Accept and waits happily for clients to call. When the above client calls it too raises TCP.FatalError and exits immediatly. The server stack trace is below. Machine : 153281425 Port : 8000 Server initialised Accepting connection *** *** runtime error: *** Exception "TCP.FatalError" not in RAISES list *** ------------------ EXCEPTION HANDLER STACK --------------------- 0xbffffa80 RAISES {} ---------------------------------------------------------------- IOT trap/Abort I have included both Server and Client modules below. (* -------------------------------------------------------------------------- * ) MODULE Client EXPORTS Main; IMPORT TCP, IP; IMPORT Wr, Stdio, Fmt; CONST ServerHostName = "citadel"; VAR IPEndPoint : IP.Endpoint := IP.Endpoint{IP.NullAddress, 8000}; handle : TCP.T; BEGIN IF IP.GetHostByName(ServerHostName, IPEndPoint.addr) THEN Wr.PutText(Stdio.stdout, "Machine : " & Fmt.Int(IPEndPoint.addr) & " Port : " & Fmt.Int(IPEndPoint.port) & " Client initialising\n"); Wr.Flush(Stdio.stdout); TRY Wr.PutText(Stdio.stdout, "Establishing connection to server\n"); Wr.Flush(Stdio.stdout); handle := TCP.Connect(IPEndPoint); Wr.PutText(Stdio.stdout, "Established connection to server OK\n"); Wr.Flush(Stdio.stdout); EXCEPT | IP.Error => Wr.PutText(Stdio.stdout, "IP.Error\n"); ELSE Wr.PutText(Stdio.stdout, "Unknown exception\n"); END; Wr.Flush(Stdio.stdout); handle.close(); ELSE Wr.PutText(Stdio.stdout, "Could not get IP address for server " & ServerHostName & "\n"); END; END Client. (* -------------------------------------------------------------------------- * ) MODULE Server EXPORTS Main; IMPORT TCP, IP; IMPORT Wr, Stdio, Fmt; VAR IPEndPoint : IP.Endpoint := IP.Endpoint{IP.NullAddress, 8000}; Connector : TCP.Connector; handle : TCP.T; BEGIN Connector := TCP.NewConnector(IPEndPoint); IPEndPoint := TCP.GetEndPoint(Connector); Wr.PutText(Stdio.stdout, "Machine : " & Fmt.Int(IPEndPoint.addr) & " Port : " & Fmt.Int(IPEndPoint.port) & " Server initialised\n"); Wr.Flush(Stdio.stdout); handle := TCP.Accept(Connector); Wr.PutText(Stdio.stdout, "Accepting connection"); Wr.Flush(Stdio.stdout); handle.close(); TCP.CloseConnector(Connector); END Server. ======================================================================= 90 === Date: 7 Apr 1994 14:58:44 GMT From: hschechn@csws11.ic.sunysb.edu (Hal J Schechner) Subject: modula-3 in LINUX I just joined this newsgroup, and there were only a few posts in it. I saw a few mentions of mod3 working in LINUX. is there a release that works with LINUX or did someone have to do a major hack to get it to work? I joined this group in the hopes of getting mod3 set up on my own LINUX box. any help in this matter would be appreciated. Please mail me at hschechn@ic.sunysb.edu with any information on getting it to compile on LINUX, and what version of mod3 i should get. Thank you. -Hal Schechner -hschechn@ic.sunysb.edu