======================================================================= 1 === Date: 01 May 1995 17:04:46 GMT From: nayeri@gte.com (Farshad Nayeri) Subject: Gatekeeper too slow (was Re: Does anyone know where.. COMPLETE src for Linux? m3) In article <9739@merlin.ukc.ac.uk> pjt2@ukc.ac.uk (Paul Teasdel) writes: Yep. Found that but gatekeeper is reaaaaly slow. Does anyone know any mirrors or other places I can get the source? Yes, the link to gatekeeper is very slow. FYI, I asked one of the gatekeepers about this yesterday. He said: > We're having a problem with our Internet connection. We're working > on getting it fixed, but I can't tell you when that will be. -- Farshad -- Farshad Nayeri nayeri@gte.com ======================================================================= 2 === Date: 2 May 1995 13:06:39 GMT From: Michel Dagenais Subject: Modula-3 Frequently Asked Questions (FAQ) Archive-name: Modula-3-faq MODULA-3 FAQ Michel Dagenais, dagenais@vlsi.polymtl.ca v2.5, 14 February 1995 Contents * Contents * What is new? * The language + What is Modula-3? + Is Modula-3 a superset of Modula-2? * The documentation + Where can I get a description of Modula-3? + Where can I get other information on Modula-3? * The implementations + Where can I get an implementation? + What is SRC Modula-3? + What is m3pc? * Some specific questions + Meeting with other Modula-3 users + Why is "Hello World" so large? + Why objects and interfaces? + Comparisons between Modula-3 and other languages? + What is the story with Trestle and OpenWindows? + Linking with C++ code + Flushing writers to see the output immediately + Problems with threads and VTALARM + What is the purpose of BRANDED and REVEAL + Why uppercase keywords + M3build versus Make or why m3 does not work + Missing RTHooks or similar messages + The program receives a SEGV signal under the debugger + What is M3-lite, MS-Windows support + Global Offset Table overflow on SPARC + Exceptions raised by X or Network Objects applications + X libraries not found * FTP + How To Obtain Pre-Compiled Binaries + What if I don't have ftp access? * Contributing + Can I contribute Modula-3 software? + ILU, an object-oriented multi-lingual RPC-capable module system * Modula-3 for teaching * Modula-3 In Industry * Work In Progress + The SRC Compiler + Integrated Development Environment + Windowing And User Interfaces o Rotated Text o Postscript VBTs + Persistence through reachability + Abstract Syntax Tree Tools (M3 Parser) + Computer Assisted Learning Tools (Algorithm Animation) + Presentations, Tutorials And Teaching Material + Reports And Books + Parallel Programming * Wish List + M3Build + Coverage And Performance Analysis + More VBTs + Distributed Computing (Network Objects) + Interfaces To Other Libraries And Programs (Tcl, Dps...) * Who's Who ABSTRACT: This document contains references to most of the material available on the Modula-3 language, compiler, tools and libraries. It should answer all the most frequently asked questions about Modula-3. The FAQ was originally written by Eric Muller. Send corrections, suggestions, additions to the current maintainer, Michel Dagenais dagenais@vlsi.polymtl.ca. The postscript version is available on ftp.vlsi.polymtl.ca:pub/m3/m3-faq.ps. An hypertext WWW version is found on http://www.vlsi.polymtl.ca/m3/m3-faq.html. WHAT IS NEW? The SRC Modula-3 3.4 and 3.5 releases came out. Here is a list of the new features: * new ports to IRIX 5.2, FreeBSD, and Windows/NT(w/o Trestle) * a single top-level, build-everything m3makefile * faster compilation (merged driver and pass0) * runtime error message that include file and line number * m3browser, an HTTP server that provides virtual Modula-3 space * better shared library support for SOLsun and SPARC * more robust type encodings for the debugger (but not Peter Klein's changes) * ParseParams and SLisp are back * a floating-point version of the geometry package * an untested Linux/ELF bootstrap * a backend, m3cc, based on gcc 2.6.3 * a persistent objects library, stable, and stub generator, stablegen. * a simple drawing editor for Windows/NT. THE LANGUAGE 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, they studied the features of the Modula family of languages that have proven themselves in practice and tried to simplify them into a harmonious language. They 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. 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. THE DOCUMENTATION Where can I get a description of Modula-3? The language definition and most electronically available Modula-3 information can be accessed on http://www.research.digital.com/SRC/modula-3/html/home.html. Modula-3 Home Postscript versions of some of these documents, including the language definition, are available from http://www.vlsi.polymtl.ca/m3/Doc. Postscript Modula-3 documents 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 table of contents is as follows: 1. Introduction 2. Declarations 3. Statements 4. Basic Types 5. Structured Types 6. Procedures 7. Exceptions 8. Interfaces and Modules 9. Generics 10. Dynamic Programming 11. Objects 12. Threads 13. Low-Level Programming 14. Programming Conventions 15. SRC Modula-3 16. Modula-3 Syntax 17. Answers to Selected Exercises The errata sheet is available via anonymous ftp from gatekeeper.dec.com in pub/DEC/Modula-3/errata. Errata If you cannot find these books at your favorite bookstore, here are bookstores connected to the net known to carry them: UCI carries both books: UCI Bookstore While Roswell is known to at least carry the language definition (SPwM3): Roswell Electronic Computer Bookstore (rjames@fox.nstn.ns.ca) Roswell Bookstore 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. Comp.lang.modula3 archive There are a couple high-level overview articles available: * ``Introducing Modula-3'', Geoff Wyant, Linux Journal, December 1994. Paper in ftp.gte.com/pub/m3/linux-journal.html * ``Safe Programming with Modula-3'', Sam Harbison, Dr. Dobb's Journal, Vol. 17, No. 10, October 1992, pp 88+. * ``Modula-3'', Sam Harbison, Byte, Vol. 15, No. 12, November 1990, pp 385+. 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, no.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 via anonymous FTP from gatekeeper.dec.com in pub/DEC/SRC/research-reports/SRC-113.ps.Z Libm3 * ``Pickles: a system for automatic serialization of typed values'', Andrew Birrell, Greg Nelson, Susan Owicki, Edward Wobber, Systems Research Center, Digital Equipment Corp., in preparation. 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. (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. VBTKit * ``The FormsVBT Reference Manual'', Marc H. Brown and James R. Meehan, (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. VBTKit library VBTKit applications * ``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. Zeus * ``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. Color and Sound * ``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. Animation Festival Network objects are described in the following reports: * ``Network Objects'', Andrew Birrell, Greg Nelson, Susan Owicki, and Edward Wobber, SRC Research Report 115, February 28, 1994. Available via anonymous FTP from gatekeeper.dec.com in pub/DEC/SRC/research-reports/SRC-115*.ps.Z. Network Objects * ``Distributed garbage collection for Network Objects'', Andrew Birrell, David Evers, Greg Nelson, Susan Owicki, and Edward Wobber, SRC Research Report 116, December 1993. Available via anonymous FTP from gatekeeper.dec.com in pub/DEC/SRC/research-reports/SRC-116*.ps.Z. Distributed GC While the Obliq embeddable interpreter is documented in: * ``Obliq: A lightweight language for network objects'', Luca Cardelli, User's Manual, Systems Research Center, Digital Equipment Corp., 1994. Available via anonymous FTP from gatekeeper.dec.com in pub/DEC/Modula-3/contrib/Obliq.ps. Obliq 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. SRC research reports Sedgewick's classic text on computer algorithms is presented in Modula-3 in: * Algorithms in Modula-3 Robert Sedgewick Addison-Wesley, 1993 ISBN 0-201-53351-0 THE IMPLEMENTATIONS Where can I get an implementation? Two implementations are available, SRC Modula-3 and a PC version of it (m3pc). As far as we know, implementations are not available for VMS, Macintosh. What is SRC Modula-3? SRC Modula-3 was built by the DEC Systems Research Center and is available via anonymous ftp from gatekeeper.dec.com in pub/DEC/Modula-3. In Europe it is also available from ftp-i3.informatik.rwth-aachen.de in pub/Modula-3. The most recent version is release 3.5. Recent releases are known to work on at least on the DS3100 (m3-request@src.dec.com), FreeBSD (Olaf Wagner olaf@logware.de), (HPPA (laverman@cs.rug.nl), LINUX (dagenais@vlsi.polymtl.ca), NeXT 68000 (tom@smart.ruhr.de), (nayeri@gte.com) SPARC architectures. Work is under way to port to OS/2 (Hendrik Boom hendrick@CAM.ORG and Craig Andrew Kingston ckingsto@undergrad.math.uwaterloo.ca), AIX 3.2.5 for RISC/6000 (Bob Barton barton@chopin.eche.ualberta.ca). The SPARC release notes may be found on ftp.gte.com:pub/m3 while the LINUX ones are available on ftp.vlsi.polymtl.ca:pub/m3/linux/README, the HPPA notes are in ftp.vlsi.polymtl.ca:pub/m3/hppa/README, the FreeBSD notes are in ftp.vlsi.polymtl.ca:pub/m3/freebsd/README. SRC-Modula-3 SPARC release notes LINUX release notes HPPA release notes FreeBSD release notes The compiler implements the language defined in SPwM3. There are versions for the architectures listed below. While SRC can test on DS3100, ALPHA/OSF, Windows NT and LINUX, it can only rely on what users on other platforms tell them to integrate all the platform specific code. Because of the improved portability of the 3.* release, ports to non Unix platforms are easier. The Windows NT port, in progress, uses native threads. This should be a good model for other implementations of Thread using native threads. * AIX386: IBM PC running AIX/PS2, * AOSF: DEC Alpha AXP running OSF/1 * 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 9000/700, 9000/800 running HP-UX 8.0 * IBMR2: IBM R6000 running AIX 3.1, * IBMRT: IBM RT running IBM/4.3, * LINUX: Intel 386 running LINUX * NEXT: NeXT running ?? * NT386: Intel 386 running Windows NT * OKI: Okidata 7300 (i860) running UNIX SVR4.0 * SEQUENT: Sequent computers running ?? * SOL2: Sparc running Solaris 2.x * 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 The new native compiler is based on GCC 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. The DEC SRC Modula-3 release 3.5 contains the following: * A native code compiler: uses the GCC backend; on machines/operating systems that have self-describing stacks, an optimized exception handling mechanism is provided, on other architectures, setjmp/longjmp is used. The compilation system provides for minimal recompilation. Only those units that depend on the modified interface item will be recompiled. * m3utils/m3build: tool that performs dependency analysis and builds the Modula-3 programs and libraries. * A large standard library (libm3) providing + A multithread, incremental, generational, conservative garbage collector + Text manipulation. + Generic Containers: Lists, Sequences, Tables, SortedLists, SortedTables + Atoms and Symbolic expressions (Lisp like lists) + An extensible stream IO system + Typesafe binary object transcription (persistent objects) + Operating system interfaces + Portable interfaces to the language runtime All standard libraries are thread-friendly. Modula-3 can readily link with existing C libraries; many libraries including X11R4 and various UNIX libraries are available as part of libm3. * m3gdb: a Modula-3 aware version of GDB. * trestle: a multi-threaded window system interface that sits on top of X windows. It is not unlike InterViews and comes with several sample programs. * trestle/tcp: a library for simplified access to TCP/IP. * vbtkit: a higher level toolkit on top of Trestle. It offers buttons, menus, editors, file choosers... and has a Motif-like look and feel. * formsvbt: an interactive user interface builder. A symbolic expression representing the user interface is edited and the graphical view is immediately produced. * tools/coverage: tool to determine the number of times each statement is executed. * tools/pp: pretty printer for Modula-3 programs. * tools/gnuemacs: emacs lisp files to help editing and debugging Modula-3 programs in emacs. * tools/m3bundle: tool to bundle data files into an executable to produce standalone programs. * tools/m3totex: extract TeX documentation from Modula-3 programs for a form of literate programming. * tools/showheap: tool to graphically see the behavior of the garbage collector. * tools/shownew: tool to graphically see the allocation behavior of a running program. * tools/showthread: tool to see the activation of threads in a running program. * zeus: framework to develop graphical animations of algorithms (heapsort, quicksort, LRU cache replacement, network protocols...) for visualization and teaching purposes. * mentor: a dozen of animations developed using Zeus. * netobj: network objects that allow the transparent execution of methods across process and machine boundaries. A simple yet very effective way to build distributed applications. * obliq: simple, interpreted, lexically scoped, object oriented, distributed programming language that can be embedded in Modula-3 programs and call/be-called by Modula-3 procedures. The Obliq object model is based on prototypes and delegation. * A framework for parsing and analyzing Modula-3 programs. This is a complete AST toolkit for Modula-3. This can parse arbitrary Modula-3 sources (input isn't required to be a complete unit) and produce detailed ASTs representing the input. The ASTs can be used to do a variety of semantic analysis tasks, or program generation tasks similar to Lisp environments. (m3tk). * pkgtools/smalldb: library to store objects on disk with logging and recovery capabilities. * pkgtools: distribution tool that insures that several copies of a package (software, document...) are updated simultaneously. * postcard: mail and news reading environment. * visualobliq: a graphical user interface builder coupled with a simple yet powerful interpreted language, Obliq, for rapid development of interactive distributed applications. This is a rather new component and is undergoing a fair amount of evolution; however, it is still very useful and exciting. Visual Obliq provides an application builder similiar in nature to Visual Basic. However, it uses Obliq as its scripting language. This makes it easy to build and prototype interesting distributed and groupware applications. It can be used for building non-distributed applications as well. * misc/tcl: interface to access the Tcl language from Modula-3. * misc/dps: interface to access Display Postscript from Modula-3. * games: more sample Trestle applications. What is m3pc? A newer version of m3pc, code named EX32 in the README file, is available via anonymous ftp from gatekeeper.dec.com in pub/DEC/Modula-3/contrib/M3forDOS. PC Modula-3 From the README, written by Klaus Preschern: EX32 ("A 32-bit Extension of DOS") is a environment for the developement and execution of 32-bit applications with DOS. EX32 is a collection of DOS programs (drivers + kernel). It provides services for applications executed in protected mode. It does process management, virtual memory management, interprocess communication via pipes and it offers a file system with 32 character filenames. EX32 runs on MS-DOS 5.00, 6.00 and 6.02. You need a i386/i387 (coprocessor required) or upward (i486, Pentium). EX32 supports DOS XMS memory (but not EMS, VCPI or DPMI). No support for the i286. You should have at least 4 MB memory (8 MB or more recommended). The whole package occupies unzipped and untared approximately 44 MB of disk space. EX32 comes with GNU C++ (version 2.4.5), SRC Modula-3 (version 3.1, including threads), two C libraries, a graphics library for VGA and a number of commands (i.e. ls, cp, rm, mkdir, make, ...). Note: This is a system for experienced programmers! They should be familiar with Unix and DOS. SOME SPECIFIC QUESTIONS Meeting with other Modula-3 users Modula-3 users meetings are held informally from time to time. A report from the last meeting is available from ftp://ftp.gte.com/pub/m3/m3ug/m3ug.html. Modula-3 users meeting 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 more sophisticated compiler. 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. Comparisons between Modula-3 and other languages? From: laszlo@post.ifi.uni-klu.ac.at (Laszlo BOESZOERMENYI) "A Comparison of Modula-3 and Oberon-2" by myself in "Structured Programming" 1993, 14:15-22 From: nayeri@gte.com Robert Henderson, Benjamin Zorn, A Comparison of Object-Oriented Programming in Four Modern Languages, Department of Computer Science, University of Colorado, Boulder, Colorado, Technical Report CU-CS-641-93. Available by anonymous FTP and e-mail from ftp.cs.colorado.edu in the file pub/cs/techreports/zorn/CU-CS-641-93.ps.Z The paper evaluates Oberon, Modula-3, Sather, and Self in the context of object-oriented programming. While each of these programming languages provide support for classes with inheritance, dynamic dispatch, code reuse, and information hiding, they do so in very different ways and with varying levels of efficiency and simplicity. A single application was coded in each language and the experience gained forms the foundation on which the subjective critique is based. 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. Linking with C++ code Apparently there is no problem to call C++ functions declared as extern "C". From: gwyant@cloyd.East.Sun.COM (Geoffrey Wyant - Sun Microsystems Labs BOS) You must use your C++ compiler as the linker, rather than /bin/cc or /bin/ld. You need to call the function '_main'. The easiest way to do this is to have the following set of interfaces and implementations: INTERFACE CXXMain; <*EXTERN "_main"*> CxxMain; END CXXMain; MODULE CXXMain; BEGIN CxxMain(); END; and then import CXXMain into your M3 main module. This will ensure that the C++ function "_main" gets called. Flushing writers to see the output immediately Modula-3 Writers are buffered. Thus, you need to issue a Wr.Flush when the output should appear immediately, for instance to prompt the user for some input. Since this can become annoying, libraries in other languages sometimes offer the option of unbuffered writes. In Modula-3, an equivalent behavior is obtained with AutoFlushWr which gets a background thread to flush a writer at a specified interval. Problems with threads and VTALARM The threads are implemented using the virtual timer interrupt. Normally, the run time environment will catch the interrupt and determine if thread switching is appropriate. However, if a new process is created with fork, it will have the virtual timer activated and no interrupt handler to receive it, resulting in a core dump. If you use the standard procedure Process.Create to fork new processes, this will be handled automatically for you. If you insist on using fork, you need to disable the timer, fork and then reenable the timer. What is the purpose of BRANDED and REVEAL Allan Heydon writes: These two keywords are necessary because of two quite different features of the language. REVEAL is necessary because Modula-3 has opaque types and partial revelations. BRANDED is necessary because the Modula-3 type system uses structural equivalence instead of name equivalence. In Modula-3, the concrete structure of a type can be hidden from clients in an interface. A common idiom is: INTERFACE I; TYPE T <: TPublic; TPublic = OBJECT (* fields *) METHODS (* methods *) END; END I. The line "T <: TPublic" introduces the type "I.T" as an opaque subtype of the type "I.TPublic". It does not reveal any of the other details of the concrete structure of "I.T" to clients. Hence, "I.T" is said to be an opaque type. Put another way, the structure of "I.T" is only partially revealed to clients. In addition, it is possible to reveal more of "I.T"'s structure in other interfaces, like this: INTERFACE IRep; IMPORT I; TYPE TPrivate = I.TPublic OBJECT (* more fields *) METHODS (* more methods *) END; REVEAL I.T <: TPrivate; END IRep. This interface declares a type "IRep.TPrivate" that is a subtype of "I.TPublic". It also asserts that "I.T" is also a subtype of "IRep.TPrivate". A client that imports only the interface "I" has access only to the fields and methods in "I.TPublic" when accessing an object of type "I.T", but a client that imports both "I" and "IRep" also has access to the fields and methods in "IRep.TPrivate" when accessing an object of type "I.T". The "REVEAL" statement in this module simply asserts a subtype relation. Unlike type declarations, revelations introduce no new names. Hence, we could not have used the "TYPE" keyword in this case because the type "I.T" has already been declared once (albeit opaquely) in interface "I". Every opaque type must have a complete revelation. A complete revelation has the form: REVEAL T = TConcrete; The revelation specifies that "TConcrete" is the concrete type for the opaque type "T". The Modula-3 type system uses structural equivalence instead of name equivalence. This means that two types are equal iff they have the same structure. One consequence of this rule is that two types you might intend to be distinct may actually be equal. This can have unintended effects on the run-time behavior of your program. For example, if both types that you expect to be distinct are actually structurally equivalent and the two types guard two arms of a TYPECASE statement, the arm for the second type will never be taken. If you want to avoid accidental equalities between two types, you can brand one (or both) of them with the BRANDED keyword. A branded type is equivalent to no other type, even if it is structurally equivalent to some other type. In essence, the BRANDED keyword adds a bit of virtual structure to the type that guarantees it will be distinct from every other type. The Modula-3 syntax allows you to supply a text constant as a name for the brand. If you don't supply an explicit brand, the compiler will make one up; however, the implicit brand invented by the compiler is not guaranteed to be chosen deterministically. Hence, explicit brands are useful if you are communicating types from one process to another and if you want to be sure that the branded type written by one process matches the branded type read in by the other. Any two opaque types in a program must be distinct. Otherwise, it would be too easy for clients to accidentally trip over type collisions like the TYPECASE example mentioned above. To enforce the restriction that all opaque types are distinct, the language requires that the type "TConcrete" in the complete revelation above must be a branded type. Why uppercase keywords Some people prefer uppercase keywords others hate them. Another possibility is to accept both forms for keywords. This topic has been discussed at length and there is no solution that will completely satisfy everyone's tastes. Fortunately this is a very minor issue and you can easily have lowercase keywords automatically converted for you using a macro package like m3su (pion.lcs.mit.edu:/pub/m3su) for emacs. lowercase keywords macro M3build versus Make or why m3 does not work The Modula-3 compiler m3 does a much finer grained dependency analysis than possible with make. For this reason, a very flexible front end, m3build, reads the program description files, m3makefile, and generates the commands required to compile and link Modula-3 programs and libraries. The m3makefile content is documented in the m3build documentation. Calling the m3 compiler directly is difficult and thus not recommended. Missing RTHooks or similar messages The standard library, libm3, is not included by default. You need in your m3makefiles to import(``libm3'') or to import a library which imports libm3. Otherwise, messages about run time procedures such as RTHooks not being available are produced. m3build The program receives a SEGV signal under the debugger The garbage collector on some platforms uses the SEGV (segmentation violation) signal to detect modified portions of the dynamically allocated space. It is possible to disable this feature or to inform the debugger to let these signals propagate. See the tips on how to use the debugger. debugging What is M3-lite, MS-Windows support M3-lite is a research project at DEC SRC to see how fast Modula-3 programs could be compiled and linked. It uses an integrated m3build, m3 compiler and code generator (based on Burs) and is targeted at Win32 (Windows NT or Windows Chicago). Research projects, by definition, do not have release dates. Part of this work, when ready, may also serve on other platforms, especially LINUX and FreeBSD since they are intel based. Global Offset Table overflow on SPARC From Sam Kendall (kendall@mv.mv.com): The problem: when I tried to m3build/m3ship netobj/stubgen I got the following error during the linking process: -> linking stubgen ld: GLOBAL_OFFSET_TABLE overflown: need to use -PIC Fatal Error: program "/bin/cc" failed, exit status = 1024 *** error code 1 (ignored) The solution: modify boot-SPARC/m3build/templates/SPARC to change two occurrences of "pic" to "PIC". Also find the file m3utils/m3build/templates/SPARC and change the following lines to have "PIC" instead of "pic": "-Y1@/bin/cc@-pic@", "-Y6@" & LIB_USE & "/m3cgc1@-quiet@-fpic@", Exceptions raised by X or Network Objects applications Graphical applications (based on Trestle/X Windows) raise the TrestleComm.Failure exception when the DISPLAY environment variable is incorrect or the X server is refusing the connection. They raise MachineIDPosix.Failure if the network configuration files are incorrectly set up, especially on LINUX; /etc/hosts must contain at least a loopback address (127.0.0.1) and the /etc/rc scripts an appropriate ifconfig command (/etc/ifconfig lo 127.0.0.1; /etc/route add 127.0.0.1). Applications with Network Objects may also raise exceptions or consume all the CPU time available when the network configuration files are incorrect. X libraries not found The position of X libraries is stored in, for instance for pre-compiled LINUX binaries, the template file m3build/templates/LINUX as well as in X11R4/LINUX/.M3EXPORTS. Thus you may want to edit these files if your X libraries are located in an uncommon place. FTP How To Obtain Pre-Compiled Binaries The following binaries are available for FTP. If you are willing to provide binaries for other architectures, please contact dagenais@vlsi.polymtl.ca; they may be put on his FTP server or links to your server can be included in the FAQ. The full exploded source code tree is available along with the SPARC binaries. * Release 3.4 SPARC binaries. Contains most of the 3.4 release and comes with static and shared libraries. If you have problems building the 3.4 release for SPARC, you may want to look at the lude/modula3-3.4/src/poly directory as it contains all the locally modified files. The original source code is available in lude/modula3-3.4/src/orig and may be browsed to see examples of m3makefiles amd Modula-3 code. Requesting a directory with .tar.Z added to its name will automatically generate the corresponding compressed tar file. It can be retrieved from ftp.vlsi.polymtl.ca:lude/modula3-3.4/run/poly.tar.Z and should be placed in /usr/local/soft/modula3-3.4/run/poly... Then, /usr/local/soft/modula3-3.4/run/poly/sun4.1_sparc/bin must be added to your path. Compiled by Michel Dagenais. SPARC Modula3-3.4 * Release 3.4 LINUX binaries. It can be retrieved from ftp.vlsi.polymtl.ca:pub/m3/linux/src-m3-3.4l0.tar.gz and should be placed in /usr/local/soft/modula3-3.4... Then, /usr/local/soft/modula3-3.4/run/bin must be added to your path. Compiled by Michel Dagenais. LINUX Modula3-3.4 * Release 3.3 HPPA binaries. It can be retrieved from ftp.vlsi.polymtl.ca:pub/m3/hppa. Compiled by Bert Laverman. HPPA Modula3-3.3 * Release 3.3 68000 NeXT binaries. It can be retrieved from ftp.vlsi.polymtl.ca:pub/m3/next. Compiled by Thomas Neumann. NeXT Modula3-3.3 * Release 3.3 68000 FreeBSD binaries. It can be retrieved from ftp.vlsi.polymtl.ca:pub/m3/freebsd. Compiled by Olaf Wagner. FreeBSD Modula3-3.3 What if I don't have ftp access? Unfortunately, DEC SRC 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 CONTRIBUTING Can I contribute Modula-3 software? Certainly. Send to m3-request@src.dec.com what you are willing to share, be it programs, libraries or other things. They will be put in the distribution. Right now, the pub/DEC/Modula-3/contrib directory contains: Contrib * m3rpc a Sun RPC system from Xerox Parc * M2toM3 a translator from Modula-2 to Modula-3 * m3pc an implementation of Modula-3 for PCs. You will also find on ftp.vlsi.polymtl.ca in pub/m3: Modula-3 contributions * present-src-m3 slides for presenting the Modula-3 tools and libraries. * cache-anim a zeus graphical animation of the computer memory hierarchy. * realgeometry a floating point geometry package. * sequences sequences allowing insertions in the middle. And on ftp-i3.informatik.rwth-aachen.de: Modula-3 contributions * m23gdb a newer version of m3gdb with important fixes for most platforms. Peter Klein writes: It is based on gdb 4.13 with enhancements from Cygnus, the Modula-3 support from the Modula-3 3.3 release, and several patches by Oliver Meyer. It should work now with EPC Modula-2 2.0x and SRC Modula-3 3.3, at least on SPARC/SunOS 4.1.3. The Modula-3 support still isn't perfect, but a big improvement over SRC's distributed version. See the README.m23gdb file for details. * m2tom3. Peter Klein writes: m2tom3 is a system to port Modula-2 programs to Modula-3. It consists of two parts: A conversion program which tries to create a Modula-3 source text with the same semantics as the Modula-2 input while retaining the original look and feel as good as possible. A base library which tries to emulate the Modula-2 standard library using the Modula-3 standard library. * Peter Klein writes: A demo version of the development environment we are working on in the ADT (Analysis and Development Tool) project is now available on our ftp server in pub/Modula-3-Contrib/adt. ILU, an object-oriented multi-lingual RPC-capable module system The following was recently announced by Xerox PARC: Version 1.6.4 of the Xerox PARC Inter-Language Unification (ILU) system is now available for general use. WHAT'S ILU? ILU (pronounced eye'-loo) is a system that promotes software interoperability via interfaces. Interfaces between what? Whatever units of program structure are desired; we call them by the generic term "modules". They could be parts of one process, all written in the same language; they could be parts written in different languages, sharing runtime support in one memory image; they could be parts running in different memory images on different machines (on different sides of the planet). A module could even be a distributed system implemented by many programs on many machines. Calls across ILU interfaces involve only as much mechanism as necessary for the calling and called modules to interact. In particular, when the two modules are in the same memory image and use the same data representations, the calls are direct local procedure calls - no stubs or other RPC mechanisms are involved. ILU modules are known by their interfaces. A module interface is specified once in ILU's object-oriented Interface Specification Language (called, simply, ISL). For each of the particular programming languages supported by ILU (currently Common Lisp, ANSI C, C++, and Modula-3; Python, Tcl, and GNU Emacs-Lisp are in the works), a version of the interface in that particular programming language can be generated. The ILU kernel library provides services which may be used by the language-specific interface to overcome intermodule language or address space differences. GETTING THE RELEASE The release is only available via FTP from the PARC ftp server. Perhaps the simplest way is to go through our World Wide Web home page, ILU CONTRIBUTORS Antony Courtney, Doug Cutting, Bill Janssen, Denis Severson, Mike Spreitzer, Mark Stefik, Farrell Wymore MODULA-3 FOR TEACHING Modula-3 is very well suited for teaching: simple yet powerful, and safe. It avoids the complexity of legacy languages. It can be used to demonstrate modules and interfaces, object oriented programming, multi-threading (concurrency issues), graphical user interfaces (Trestle, VBTKit, FormsVBT) and even distributed programming (Network Objects, Obliq). Since less time is spent by students and teaching assistants chasing dangling pointers and corrupted data, more time is available for learning the important concepts. It is used for teaching in a number of universities. This list is far from complete, send corrections and additions to dagenais@vlsi.polymtl.ca. From: Carsten Whimster (bcrwhims@undergrad.math.uwaterloo.ca) University of Waterloo: CS246 - Third introductory course in computer science. Software engineering and software systems. Medium size projects. Uses Modula-3 to demonstrate proper OO programming, as well as general programming practices. CS241 - Fourth and final intro course to CS. Focuses mainly on compilers and languages. Various assignments has students create most of the different parts of a compiler. Also introduces Scheme (lisp). From: Peter.Robinson@cl.cam.ac.uk University of Cambridge, England. The Computer Science course at the University of Cambridge teaches ML as an introductory language at the beginning of the freshman year, and then uses Modula-3 to develop imperative programming at the end of that year. Further lectures on advanced features of the language are given early in the second year, together with separate lectures on other, specialised languages. The course has been given to about 70 students each year since 1990, and has developed with the language. It ties in with other lectures on data structures and algorithms, software engineering and concurrency. Modula-3 is used for student group projects in the second year and for about a quarter of individual projects in the final year (where, interestingly, students using Modula-3 tend to earn higher grades than those using C/C++). Modula-3 is also used in the Computer Laboratory at Cambridge for a number of research projects on distributed computing, human-computer interaction and electronic CAD. From: Matthew.Huntbach@dcs.qmw.ac.uk We have used it for three years here at Queen Mary and Westfield College, London. The main problem I find with the language is the slow compilation speed on our teaching machines (Macs running A/UX), otherwise it's a nice language to teach with. From: laszlo@ifi.uni-klu.ac.at (Laszlo BOESZOERMENYI) University Klagenfurt Modula-3 is used at the following courses: Undergraduate: Softwaretechnology-1 (actually an introduction into programming) (on PCs) Softwaretechnology-2 (data structures and algorithms) (on PCs) Graduate: Computer Networks (on a network of DECs and SUNs) Parallel Programming (on an DEC-Alpha Farm) Modula-3 has been in use since ca. one year, with very good experiences. From: pk@i3.informatik.rwth-aachen.de (Peter Klein) Lehrstuhl fuer Informatik III, RWTH Aachen, Germany: Software Development Projects, now held for the second time using Modula-3. Aim of these projects is to introduce different aspects of software development to graduate students. This includes project planning, supervision, design, and cooperative implementation of small but usable software systems. Central ideas of software design and object-oriented implementation are presented and discussed with the concepts of Modula-3, which is also the implementation language. Future plans: Maybe Modula-3 will replace Modula-2 in some undergraduate programming lectures in the future. From: viggo@nada.kth.se Royal Institute of Technology. Several courses at the computer science department use Modula-3. The courses contain programming projects, and many students choose to use Trestle. (Dr. Viggo Kann, viggo@nada.kth.se) From: "Dave Snelling" (snelling@cs.man.ac.uk) Department of Computer Science, University of Manchester, Manchester U.K. We have a small, interdisciplinary collection of people using Modula-3 for a variety of activities. Our major production code is a hardware architecture simulator (about 120 modules). Smaller projects include a Lattice Gass model and a Shallow Water model. At: University of Massachusetts at Amherst Modula-3 is used as an input language for the Computer Science course on Compilation techniques. The professor is Eliot Moss. From: Michel Dagenais (dagenais@vlsi.polymtl.ca) Modula-3 is used as the main example in an undergraduate course on object oriented programming and in a graduate course on ``Algorithmic Aspects of CAD'', which includes a large portion on OO programming and databases. From: pbh@cs.sunysb.edu (Peter Henderson) Modula-3 is currently used for teaching Computer Science I and Computer Science II at SUNY at Stony Brook. We are currently developing a sequence of laboratory assignments and case studies introducing OO techniques and software reuse in these two courses. The first course for computer science majors at Stony Brook is "Foundations of Computer Science" which emphasizes general problem solving, mathematics and the relationships between mathematics and computer science. There is an extensive laboratory component using theorem provers, Prolog and Standard ML. MODULA-3 IN INDUSTRY A number of programming teams in industry selected Modula-3 for their project. It encourages good programming practices and comes with excellent libraries for distributed programming and graphical user interfaces. From: gwyant@cloyd.East.Sun.COM (Geoffrey Wyant - Sun Microsystems Labs BOS) Sun Microsystems Laboratories, Inc. (East) is using Modula-3 (Network Objects, FormsVBT) as the basis for its research in large scale distributed object systems. From: Farshad Nayeri (nayeri@gte.com) Distributed Object Computing, GTE Labs, Waltham, Massachusetts USA Modula-3 (FormsVBT, Sx, Netobj libraries) is used to prototype distributed object management. (Farshad Nayeri nayeri@gte.com). Report WORK IN PROGRESS The purpose of this section is to let everyone know what is being worked on. This is not a commitment to a quick release or even to completion. However it may enable parties interested in the same topics to pool their efforts, avoid duplication or better integrate their packages. To find more information about the names mentioned, see the Who's Who section. The SRC Compiler The compiler already implements the full language and runs on several platforms. Speed enhancements and support for some popular non-Unix platforms may be expected. 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. See the paper entitled ``Designing Software with Modula-3'', it describes a software architecture description language based on Modula-3. Report ftp.informatik.rwth-aachen.de/pub/reports/1994/94-16.ps.gz Klaus Preschern, Carsten Weich, Laszlo Boszormenyi have made the port of Modula-3 to the PC. The M3-PC environment will be enhanced, especially with threads and graphics, including a student-friendly environment. David N. Gray of Lucid Inc. has been experimenting with connecting the Modula-3 compiler with the Lucid Energize Programming System (currently sold as a development environment for C and C++ on Sun SPARCstations). The modified compiler is available as an unsupported as-is hack, to accompany the new Energize release that it works with. Energize Modula-3 Geoff Wyant is experimenting with FormsVBT/VBTKit to build a simple friendly development environment. Windowing And User Interfaces 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. 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). Persistence through reachability Tony Hosking and Eliot Moss are working on persistent Modula-3 objects. The main features are persistence through reachability, load on demand and a very low overhead for using persistent objects. The high performance is obtained by modifying the compiler and run-time. Initially a modified version of GCC, GNU M3, was being worked on. However, with the release of the SRC native compiler, the modifications are being moved to the SRC compiler instead. Persistency 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, un-handled exceptions), build source code browser and analysis tools, stubs generators for network or persistent objects... Mick Jordan is working on the documentation, in his spare time. From: hudson@yough.ucs.umass.edu (Rick Hudson) If anyone is interested we have developed a Bison grammar that parses the Modula-3 language input. If interested please feel free to contact me hudson@cs.umass.edu. 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. From: "Arnulf Mester" (mester@ls4.informatik.uni-dortmund.de) As part of a studental project advised by a college of mine and me a Mentor-like collection of Zeus-based animations of typical distributed algorithms and communication protocols (termed ZADA) has been compiled. Hopefully I'll get to include more information and access during the next weeks into our ZADA WWW home page ZADA 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. Geoff Wyant has prepared a tutorial on Modula-3 for OOPSLA. Reports And Books Sam Harbison is preparing a revised version of his existing book on Modula-3. He may include more material on the new libraries. Laszlo Boszormenyi, Roland Mittermeir and Carsten Weich are working on a book (it will be published in German and in English) with the work-title: "Programming in Style - An Introduction into Programming with Modula-3" The book will be published at Springer (in German in October 1994, in English maybe or December, or January 1995). For the book, the M3-PC environment will be enhanced, especially with threads and graphics, including a student-friendly environment. From: BERGINF@PACEVM.DAC.PACE.EDU (Joseph Bergin) I am also at work on a Modula-3 college level textbook. It will cover the data structures course and will stress data abstraction. It will be similar to my current book: Data Abstraction: The Object-Oriented Approach using C++, published by McGraw Hill. Status: The software has been built and I am currently writing the text itself. Joe Bergin, berginf@pacevm.dac.pace.edu, Pace University Parallel Programming From: Ernst A. Heinz, University of Karlsruhe, F.R. Germany (email: heinze@ira.uka.de) I would like to inform you about our ongoing Modula-3* project here at the University of Karlsruhe. At the moment, we are actively involved in adding sophisticated dependence and data flow analysis to DEC's Modula-3 compiler (release 3.x!). The Modula-3* compiler will be able to generate code for real parallel machines, for networks of workstations, and for standard sequential execution. (Our new IPD Modula-2* system available by anonymous ftp from ftp.ira.uka.de in "pub/programming/modula2star" may give you an initial feeling about it!) For all interested folks I have made my JSPP'93 paper publicly available by anonymous ftp. The title of the paper reads as follows: "Modula-3*: An Efficiently Compilable Extension of Modula-3 for Problem-Oriented Explicitly Parallel Programming". Paper More recent work includes E.A. Heinz. Sequential and parallel exception handling in Modula-3*: A unifying semantics specification. In P. Schulthess (editor). Advances in Modular Languages: Proceedings of the Joint Modular Languages Conference, pages 31-49, Ulm, Germany, September 28-30, 1994. Paper 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 section is to help contributors determine what additions would be helpful to others. It 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 or team with you for their development. 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 (Michel Dagenais). Although makefiles cannot perform the same consistency checks as m3build and are more cumbersome to use, it may be useful to be able to drive the compiler through makefiles for training purposes (i.e. learn Modula-3 and Makefiles at the same time) (bwbecker@watdragon.uwaterloo.ca). 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 (Michel Dagenais). More VBTs An editor widget with multiple fonts (fixed and proportional character spacing) perhaps even with direct support for HTML (item lists, centered headings...) (Geoff Wyant, Farshad Nayeri). A diagram editor widget (Farshad Nayeri). A split VBT that positions NxM childs in aligned rows and columns (Geoff Wyant). A Graph VBT that displays arbitrary graphs (such as call trees, cross references...). This could be implemented adding a placement module (to determine the vertex positions) to work on the existing GraphVBT module (Geoff Wyant). Some of the VBTs implemented in miscellaneous libraries (such as GraphVBT in Mentor/Zeus) could be placed in a more visible location such as VBTKit (Michel Dagenais). MIME extensions to Postcard (Farshad Nayeri). Submit Trestle to a graphical designer (Farshad Nayeri). Distributed Computing (Network Objects) Network objects are an 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 (Michel Dagenais). 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. An automatic tool to produce such stubs from .h C files would be very useful (Geoff Wyant). Stubs to access the Motif X Windows library would be useful (Geoff Wyant). 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) (Geoff Wyant). WHO'S WHO Modula-3 enthusiasts, users or contributors. Please notify me for additions, corrections or removals. * Robert Ayers, Adobe, (ayers@Mv.Us.Adobe.Com), the Display Postscript to Modula-3 interface * Andrew Birrell, DEC SRC, (birrell@src.dec.com), Network objects. * Laszlo Boeszoermenyi, Universitaet Klagenfurt, Austria, (laszlo@ifi.uni-klu.ac.at), PC port (m3pc), Programming in style book. * Marc H. Brown, DEC SRC, (mhb@src.dec.com), VBTKit, FormsVBT, Zeus. * Luca Cardelli, DEC SRC, (luca@src.dec.com), Modula-3 definition, Obliq. * Michel Dagenais, Ecole Polytechnique de Montreal, (dagenais@vlsi.polymtl.ca), LINUX and SPARC M3 binaries, M3 FAQ. * John D. DeTreville, DEC SRC, (jdd@src.dec.com), Incremental garbage collector. * David N. Gray, Lucid Inc., Menlo Park, (gray@Lucid.Com), interface between the Lucid environment and the M3 compiler. * Sam Harbison, Tartan, harbison@tartan.com, Modula-3 book. * Ernst A. Heinz, University of Karlsruhe, F.R. Germany (heinze@ira.uka.de) * Allan Heydon, DEC SRC, (heydon@src.dec.com), IP, Lex, Fmt, PQueue, DblBufferVBT modules. * Jim Horning, DEC SRC, (horning@src.dec.com), Useful Modula-3 interfaces. * Tony Hosking, Purdue University, (hosking@cs.purdue.edu), Persistent Modula-3. * Rick Hudson, University of Massachusetts at Amherst, (hudson@cs.umass.edu), GNU Modula-3. * Mick Jordan, Sunlabs near Palo Alto, mick.jordan@eng.sun.com, Modula-3 definition, M3TK and related tools. * Bill Kalsow, DEC SRC, (kalsow@src.dec.com), Modula-3 definition, M3 compiler and run-time. * Peter Klein, Lehrstuhl fuer Informatik III, (pk@i3.informatik.rwth-aachen.de). Modula-2 to Modula-3 converter, m3gdb improvements. * Bert Laverman, Groningen University, (laverman@cs.rug.nl), HPPA support. * Mark S. Manasse, DEC SRC, (msm@src.dec.com), Trestle. * Paul McJones, DEC SRC, (mcjones@src.dec.com), Useful Modula-3 interfaces. * James R. Meehan, Adobe (jmeehan@mv.us.adobe.com), VBTKit, FormsVBT. * Roland Mittermeir, Universitaet Klagenfurt, Austria, (mittermeir@ifi.uni-klu.ac.at), Programming in style book. * Eliot Moss, University Of Massachusetts At Amherst, (moss@Cs.Umass.Edu), GNU Modula-3. * Eric Muller, DEC SRC (moved?), (muller@src.dec.com), M3 compiler and run-time. * Marc Najork, DEC SRC, (najork@src.dec.com), 3D animation. * Greg Nelson, DEC SRC, (gnelson@src.dec.com), Modula-3 definition, Systems Programming with Modula-3 book editor, Trestle, Network objects. * Farshad Nayeri, GTE Labs Near Boston, (nayeri@Gte.Com), m3-sparc mailing list. * Frode Odegard, (frode@Odegard.Com), commercial Modula-3 support. * Susan Owicki, Stanford University, (owicki@mojave.stanford.edu), Network objects. * Klaus Preschern, Universitaet Klagenfurt, Austria, (preschern@ifi.uni-klu.ac.at), PC port (m3pc). * Robert Sedgewick, Princeton University, Algorithms in Modula-3 book. * Jorge Stolfi, University of Campinas, Brazil, (stolfi@dcc.unicamp.br), Computational geometry procedures. * Carsten Weich, Universitaet Klagenfurt, Austria, (weich@ifi.uni-klu.ac.at), PC port (m3pc), Programming in style book. * Edward Wobber, DEC SRC, (wobber@src.dec.com), Network objects. * Geoff Wyant, Sunlabs Near Boston, (gwyant@East.Sun.COM), SPARC port. _________________________________________________________________ Michel Dagenais, dagenais@vlsi.polymtl.ca, Mon Feb 13 14:20:30 EST 1995 -- Prof. Michel Dagenais http://www.vlsi.polymtl.ca/dagenais/home/home.html Dept of EE and Computer Eng. dagenais@vlsi.polymtl.ca Ecole Polytechnique de Montreal tel: (514) 340-4029 ======================================================================= 3 === Date: 2 May 95 08:49:09 From: dagenais@notung.vlsi.polymtl.ca (Michel Dagenais) Subject: Re: Help Mod-3 (Linux) Is anyone using Modula-3 on Linux. I can't figure out how to compile and Of course many people are :-). run a 'Hello World' program. I've generated a m3 makefile but can't seem to get past this point. I would greatly appreciate it if someone could send me instructions on a simple compile under Linux. It is no different on LINUX than on other platforms. Check the FAQ, it contains an example as well as pointers to the World Wide Web documentation for all of Modula-3 (including m3makefile). -- Prof. Michel Dagenais http://www.vlsi.polymtl.ca/dagenais/home/home.html Dept of EE and Computer Eng. dagenais@vlsi.polymtl.ca Ecole Polytechnique de Montreal tel: (514) 340-4029 ======================================================================= 4 === Date: 1 May 1995 10:31:54 GMT From: mlw2374@omega (Tai West) Subject: Help Mod-3 (Linux) Is anyone using Modula-3 on Linux. I can't figure out how to compile and run a 'Hello World' program. I've generated a m3 makefile but can't seem to get past this point. I would greatly appreciate it if someone could send me instructions on a simple compile under Linux. Thanks, -- @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ @ When one has good wine, @ @ Tai West @ A graceful schooner, @ @ mlw2374@omega.uta.edu @ And a maiden's love, @ @ @ Why envy the immortal gods? @ @ @ -LI T'SI PO (A.D. 705-762) @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ======================================================================= 5 === Date: 2 May 1995 17:47:45 GMT From: norman@flaubert.bellcore.com (Norman Ramsey) Subject: Re: Problem using m3build with netobj In article , Russell Mok wrote: >(* m3makefile begins *) >import(libm3) >import(netobj) > >module (NameTable) >interface (NameServerImpl) >interface (NameServerT) >implementation (NameServer) > >netobj(NameServerT,T) >implementation (Main) > >program(a.out) >(* m3makefile ends *) My first act in trying to diagnose this problem would be to quote all names of libraries, programs, and interfaces: import("libm3") import("netobj") module ("NameTable") interface ("NameServerImpl") interface ("NameServerT") implementation ("NameServer") netobj("NameServerT","T") implementation ("Main") program("a.out") Just to make sure nothing weird is happening with the name netobj. ======================================================================= 6 === Date: 1 May 1995 12:06:35 GMT From: rrw1000@cus.cam.ac.uk (Richard Watts) Subject: Re: Does anyone know where.. COMPLETE src for Linux? m3 In article <9739@merlin.ukc.ac.uk>, Paul Teasdel wrote: >In article , >Fraser M Campbell wrote: >>drake@PROBLEM_WITH_INEWS_DOMAIN_FILE (Joshua Drake) writes: >> >>>I am looking for the complete src tree for modula-3, for linux. The one on >>>sunsite seems to be missing some very important things.. (like the makefile) . >>>If anyone can direct me please let me know via e-mail. >>> drake@transport.com >> >>Source code is available at gatekeeper.dec.com in >>/pub/DEC/Modula-3/release-3.3 > >Yep. Found that but gatekeeper is reaaaaly slow. Does anyone know any >mirrors or other places I can get the source? ftp://src.doc.ic.ac.uk/computing/programming/languages/modula-3/DEC has a mirror. Richard. -- `The past tempts us; the present confuses us; the future frightens us - and our lives slip away moment by moment - lost in that vast, terrible inbetween' (Babylon 5) The University of Cambridge can't have these opinions even if it wants them. ======================================================================= 7 === Date: Mon, 01 May 95 10:47:46 GMT From: pjt2@ukc.ac.uk (Paul Teasdel) Subject: Re: Does anyone know where.. COMPLETE src for Linux? m3 In article , Fraser M Campbell wrote: >drake@PROBLEM_WITH_INEWS_DOMAIN_FILE (Joshua Drake) writes: > >>I am looking for the complete src tree for modula-3, for linux. The one on >>sunsite seems to be missing some very important things.. (like the makefile). >>If anyone can direct me please let me know via e-mail. >> drake@transport.com > >Source code is available at gatekeeper.dec.com in >/pub/DEC/Modula-3/release-3.3 Yep. Found that but gatekeeper is reaaaaly slow. Does anyone know any mirrors or other places I can get the source? Cheers Paul ======================================================================= 8 === Date: 2 May 1995 21:41:39 GMT From: aps17@cus.cam.ac.uk (A.P. Shepherd) Subject: Problem with Path.T in an OffsetVBT Running on a solaris 2, Modula3 version 3.3 (can't use a machine with 3.5 on it). I have got a segmantation violation in several different programs when I put a Path.T in an OffsetVBT.T. The code below is a minimum program reproducing the bug. The program works fine if the VBT.Stroke is replaced with a suitable VBT.Line command, or if the OffsetVBT.T filter is removed. MODULE Bug EXPORTS Main; IMPORT VBT, OffsetVBT, FlexVBT, PaintOp, Trestle, Point, Path, Region; TYPE Drawer = VBT.Leaf OBJECT OVERRIDES repaint := Repaint END; PROCEDURE Repaint(v: Drawer; READONLY rgn: Region.T) = BEGIN VBT.PaintRegion(v, rgn, PaintOp.Bg); VBT.Stroke(v, rgn.r, path); END Repaint; VAR path := NEW(Path.T); main := NEW(OffsetVBT.T).init(NEW(FlexVBT.T).init(NEW(Drawer), FlexVBT.Rigid(50.0, 50.0)), 10.0, 10.0); BEGIN Path.MoveTo(path, Point.FromCoords(10,10)); Path.LineTo(path, Point.FromCoords(190,10)); Path.LineTo(path, Point.FromCoords(10,190)); Path.Close(path); Trestle.Install(main); Trestle.AwaitDelete(main); END Bug. Output from backtrace under m3gdb: #0 16_73234 in Path__Copy (Cannot resolve type with uid cb9bb6eb ) at Path.m3:214 #1 16_72b84 in Path__Translate (Cannot resolve type with uid cb9bb6eb ) at Path.m3:160 #2 16_e4648 in XPaint__ExtensionCom (Cannot resolve type with uid e7dcfb75 ) at XPaint.m3:370 #3 16_e2c68 in XPaint__PaintBatch (Cannot resolve type with uid af88f37c ) at XPaint.m3:74 #4 16_a9768 in VBTRep__ForceBatch (Cannot resolve type with uid 3b6c825d ) at VBTRep.m3:386 #5 16_a1314 in VBTClass__Reshape (Cannot resolve type with uid 3b6c825d ) at VBTClass.m3:156 #6 16_f0d1c in XClientF__Reshape (Cannot resolve type with uid 3b6c825d ) at XClientF.m3:390 #7 16_de894 in XMessenger__HandleEvent (Cannot resolve type with uid 3b6c825d ) at XMessenger.m3:207 #8 16_ddad8 in XMessenger__Messenger (Cannot resolve type with uid ed74313e ) at XMessenger.m3:110 #9 16_3f294 in ThreadPosix__DetermineContext (M3_08402063_oldSP=16_161fb0) at ThreadPosix.m3:1092 #10 16_3eef8 in ThreadPosix__InitTopContext (Cannot resolve type with uid b17dc8ad ) at ThreadPosix.m3:1043 ======================================================================= 9 === Date: Wed, 3 May 1995 01:15:39 GMT From: groener@vt.edu (Markus K. Groener) Subject: Reading INTEGER from file? How? Hi, I am new to programming in Modula-3 and I have run into a problem that is most likely easy to solve? I would like to be able to read a single integer value from a text file. I am using FileRd and Rd to get single characters from a file. I tried to use Lex to read an integer but have not yet been successful. If anyone could help out with a small example I would appreciate it. Please send response to: groener@vt.edu Thanks, Markus ======================================================================= 10 === Date: 2 May 1995 20:19:38 -0600 From: stempel@schubert.cs.colostate.edu (wolter stempel) Subject: Running unix utilities from m3 Does anyone know if it is possible to run unix utilities from m3? Specifically, I want to write a modula3 program that runs uudecode with a given file. The program would start by reading in a file, doing some stuff to it, running uudecode on the modified file, and then go back to the program to finish up. Is this possible? I assume it probably is, so a better question would be, how do I do this, or can someone point me to a reference manual or some related document where I can find out myself? I have looked every where, and have found nothing relevant. Any help would be greatly appreciated. -- 'I was born not knowing and have only had a little time to change that here and there.' - Richard Feynman ======================================================================= 11 === Date: Tue, 2 May 1995 03:35:07 GMT From: wyrmok@plg.uwaterloo.ca (Russell Mok) Subject: Problem using m3build with netobj I wrote the following m3makefile for a very simple program using netobj: (* m3makefile begins *) import(libm3) import(netobj) module (NameTable) interface (NameServerImpl) interface (NameServerT) implementation (NameServer) netobj(NameServerT,T) implementation (Main) program(a.out) (* m3makefile ends *) When I invoke m3build, I have the following messages: --- building in ../SOLgnu --- "/usr/local/llib/m3/pkg/m3build/templates/COMMON", line 1: cannot import packag e into itself: "netobj" *** call stack *** "/usr/local/llib/m3/pkg/m3build/templates/COMMON", line 1: call to built-in err or "/usr/local/llib/m3/pkg/m3build/templates/COMMON", line 614: call to procedure import_version "/u2/wyrmok/research/m3/netobj/src/m3makefile", line 2: call to procedure impor t m3build: /usr/local/bin/quake failed (status = 256) The system even failed to start compiling. What could possibly be the problem here? Is it related the local environment? Thanks. Russell -- Russell Mok Dept of Computer Science, University of Waterloo Waterloo, Ontario, Canada N2L 3G1 email: wyrmok@neumann.uwaterloo.ca ======================================================================= 12 === Date: 02 May 1995 13:11:08 GMT From: nayeri@gte.com (Farshad Nayeri) Subject: Re: Problem using m3build with netobj In article wyrmok@plg.uwaterloo.ca (Ru ssell Mok) writes: "/usr/local/llib/m3/pkg/m3build/templates/COMMON", line 1: cannot import package into itself: "netobj" [...] "/u2/wyrmok/research/m3/netobj/src/m3makefile", line 2: call to procedure import The system even failed to start compiling. What could possibly be the problem here? Is it related the local environment? Thanks. Russell, My guess is that the package you are building is called "netobj" as m3build picks up the pacakge name from the parent of the "src" directory. And it is telling you that you are importing "netobj" to build "netobj". You happen to mean to import the public netobj, but m3build doesn't know this. Try naming the parent of "src" directory "nameserver" or whatever you'd like that is different from the name of any package that you are importing (directly or indirectly, I suppose.) -- Farshad -- Farshad Nayeri nayeri@gte.com ======================================================================= 13 === Date: Wed, 03 May 95 13:32:59 -0700 From: heydon@pa.dec.com Subject: Re: Reading INTEGER from file? How? Markus, > I would like to be able to read a single integer value from a text > file. I am using FileRd and Rd to get single characters from a file. > I tried to use Lex to read an integer but have not yet been > successful. The easiest way to read an integer from a file is to use the "IO" interface. If "nm: TEXT" is the name of the file, then you can open the file and read an integer "i" from it like this: VAR rd := IO.OpenRead(nm); i: INTEGER; BEGIN IF rd = NIL THEN Wr.PutText(Stdio.stderr, "Error: unable to open file \""); Wr.PutText(Stdio.stderr, nm); Wr.PutText(Stdio.stderr, "\" for reading\n") ELSE TRY i := IO.GetInt(rd) EXCEPT IO.Error => Wr.PutText(Stdio.stderr, "Error: expected integer\n") END END END As you mention, you can also use the "Rd", "FileRd", and "Lex" interfaces directly: <* FATAL Rd.Failure, Thread.Alerted *> TRY VAR rd := FileRd.Open(nm); i: INTEGER; BEGIN i := Lex.Int(rd) END EXCEPT OSError.E => Wr.PutText(Stdio.stderr, "Error: unable to open file \""); Wr.PutText(Stdio.stderr, nm); Wr.PutText(Stdio.stderr, "\" for reading\n") Lex.Error, FloatMode.Trap => Wr.PutText(Stdio.stderr, "Error: expected integer\n") END Here, I've declared "Rd.Failure" and "Thread.Alerted" to be fatal exceptions, but you could handle them with "TRY...EXCEPT...END" instead, just as the other exceptions have been handled. You could also print different error messages for the two different exceptions "Lex.Error" and "FloatMode.Trap". If you look at the implementation of "IO.GetInt", you'll see that the two exceptions have been folded into one: PROCEDURE GetInt(rd: Rd.T := NIL): INTEGER RAISES {Error}= BEGIN IF rd = NIL THEN rd := Stdio.stdin END; TRY RETURN Lex.Int(rd) EXCEPT Lex.Error, FloatMode.Trap => RAISE Error END END GetInt; I hope that helps, - Allan -------------------------------------------------------------------- Allan Heydon Digital Equipment Corporation heydon@pa.dec.com Systems Research Center (415) 853-2142 130 Lytton Avenue (415) 853-2104 (FAX) Palo Alto, CA 94301 ======================================================================= 14 === Date: 3 May 95 09:01:49 From: dagenais@notung.vlsi.polymtl.ca (Michel Dagenais) Subject: Re: Running unix utilities from m3 Does anyone know if it is possible to run unix utilities from m3? Specifically, I want to write a modula3 program that runs uudecode with a given file. The program would start by reading in a file, doing some stuff to it, running uudecode on the modified file, and then go back to the program to finish up. Is this possible? I The Process interface in libm3 should be what you are looking for. Process.Create, Process.Wait... -- Prof. Michel Dagenais http://www.vlsi.polymtl.ca/dagenais/home/home.html Dept of EE and Computer Eng. dagenais@vlsi.polymtl.ca Ecole Polytechnique de Montreal tel: (514) 340-4029 ======================================================================= 15 === Date: Thu, 04 May 95 08:48:31 -0700 From: mcjones@pa.dec.com Subject: Re: Running unix utilities from m3 Wolter, Michel Dagenais's reply gives you the important clue: use the Process interface. You'll find a fairly complete example at the end of that interface showing how to run a filter process like uudecode. Be careful to stick closely to that example: it avoids the common error of forgetting to close the pipes at the appropriate times, and thus have the parent process hang. Paul McJones mcjones@pa.dec.com Digital Equipment Corp. Systems Research Center ======================================================================= 16 === Date: Thu, 04 May 1995 15:22:50 GMT From: wharold@mcimail.com (Ward K. Harold) Subject: M3 for SVR4.2 (UnixWare 2.0) I know there are no UnixWare 2.0 M3 binaries. Which of the Unix ports would be the best starting place for a UnixWare port? ... WkH Ward K. Harold wharold@mcicmail.com MCI Consumer Markets (512) 339-5354 9001 N IH-35 Austin, TX 78753 ======================================================================= 17 === Date: 3 May 1995 13:58:09 GMT From: Subject: Re: Modula3 and Oberon2 L. Boszormenyi: A Comparison of Modula-3 and Oberon-2 Structured Programming (1993) 14:15-22 ======================================================================= 18 === Date: 3 May 1995 13:54:12 GMT From: Peter Klein Subject: Re: Does anyone know where.. COMPLETE src for Linux? m3 >Yep. Found that but gatekeeper is reaaaaly slow. Does anyone know any >mirrors or other places I can get the source? > ftp://ftp-i3.informatik.rwth-aachen.de/pub/Modula-3 Peter --- Peter Klein E-Mail: pk@i3.informatik.rwth-aachen.de Lehrstuhl fuer Informatik III Tel.: +49/241/80-21316 Ahornstrasse 55 Fax.: +49/241/8888-218 52074 Aachen, Germany ======================================================================= 19 === Date: Thu, 4 May 1995 12:57:59 GMT From: ctkierst@undergrad.math.uwaterloo.ca (Caroline Kierstead) Subject: m3gdb display of variables Our version of Modula 3 has been recently updated, and I'm encountering problems in updating our GDB tutorial. I've used m3gdb to examine the code, and the program has compiled cleanly. The problem I'm encountering is that I can print my program's variables, but not display them. Also, when I run the program, I get the message "Junk after end of expression" cropping up. Can someone tell me what I'm doing wrong? I've included a copy of the script at the end of this message. Thanks for your help. ----------------------------8<---------------------8<---------------- Script started on Thu May 4 08:30:16 1995 cayley [51] [8:30am] [/u1/ctkierstead/m3/basic/src] m3gdb a.out GDB is free software and you are welcome to distribute copies of it under certain conditions; type "show copying" to see the conditions. There is absolutely no warranty for GDB; type "show warranty" for details. GDB 4.11 (sparc-sun-sunos4.1), Copyright 1993 Free Software Foundation, Inc... (gdb) set language m3 (gdb) break _INITM_gdb_basic Breakpoint 1 at 16_2410: file gdb_basic.m3, line 24. (gdb) run Starting program: /u1/ctkierstead/m3/basic/src/a.out Junk after end of expression. Junk after end of expression. Junk after end of expression. Junk after end of expression. Junk after end of expression. Breakpoint 1, gdb_basic.m3.MAIN () at gdb_basic.m3:24 24 r := Mary( x ); (gdb) print r $1 = 0 (gdb) print x $2 = 1 (gdb) disp r 1: Invalid expression Disabling display 1 to avoid infinite recursion. (gdb) quit The program is running. Quit anyway (and kill it)? (y or n) y cayley [52] [8:31am] [/u1/ctkierstead/m3/basic/src] cat gdb_basic.m3 MODULE gdb_basic EXPORTS Main; PROCEDURE Fred( x : INTEGER ) : INTEGER = BEGIN FOR i := 1 TO 5 DO x := x + 1; END; RETURN x; END Fred; PROCEDURE Mary( x : INTEGER ) : INTEGER = VAR r : INTEGER; BEGIN x := x + 1; r := Fred( x ); RETURN r; END Mary; VAR r : INTEGER; x : INTEGER := 1; BEGIN r := Mary( x ); END gdb_basic. cayley [53] [8:31am] [/u1/ctkierstead/m3/basic/src] cat m3makefile override ("libm3_uw", "/u/cssystems/m3") import ("libm3") import ("libm3_uw") implementation ("gdb_basic") program ("../src/a.out") cayley [54] [8:31am] [/u1/ctkierstead/m3/basic/src] exit exit script done on Thu May 4 08:31:22 1995 -- -- Caroline Kierstead CS 200 Level Lab Coordinator ======================================================================= 20 === Date: 9 May 1995 00:06:45 GMT From: ess@daimi.aau.dk (Elmer Sandvad) Subject: ECOOP'95 Exhibition ECOOP'95 Exhibition - Reminder ------------------------------ ECOOP'95 (European Conference on Object-Oriented Programming) Aarhus, Denmark, August 7-11, 1995, will be accompanied by a three-day commercial exhibition on August 9, 10 and 11. Vendors of object-oriented products and services should contact me at the earliest convenience to ensure their inclusion. The deadline for reduced booth rental fee is June 1. Elmer Sandvad Exhibition Chair Computer Science Department University of Aarhus Ny Munkegade 116, Bldg 540 DK-8000 Aarhus C, Denmark Telephone: +45 8942 3188 Fax: +45 8942 3255 E-mail: ess@daimi.aau.dk ======================================================================= 21 === Date: Tue, 9 May 95 10:43:29 EDT From: nayeri@gte.com (Farshad Nayeri) Subject: Re: Why no M3 for Mac? In article <3om1o6$k12@newdelph.cig.mot.com> gabrius@riker.cig.mot.com (David M . Gabrius) writes: Okay, I know that this question gets asked about one a month, but why is there no M3 compiler for the Macintosh? Is it due to the lack of a good GCC? Thanks. The reason why I'm asking is that this may influence a machine purchase in the near future. Lack of direct GCC support doesn't help, but there are other problems, like how to make threads work well; and how to make M3's garbage collection work well with Mac's memory manager. All of these are probably doable, but they require good knowledge of Mac internals and the will to put in much work. And then there is the integration into the Mac environment, which is another issue. Practically for SRC Modula-3 you will have to also deal with making "m3build" integrated with a development environment, or make a new development environment. Perhaps after Modula-3/Lite is out, it is a good time to start on looking at what it takes to do a Mac port. (Sounds like a good masters project!) Anyway, I think if someone is going to port to the Mac, they may be better off bypassing GNU C backend all together. Sadly, if you are going to do serious development with M3 right now you can't do it on Mac hardware (at least until Linux on a Mac is more than vapor.) -- Farshad ======================================================================= 22 === Date: Tue, 09 May 1995 15:27:06 -0400 From: emon@gte.com (Emon Mortazavi) Subject: m3tomif--a text typesetting utility m3tomif is a utility to typeset Modula-3 code into Maker Interchange Format (MIF). m3tomif is based on m3totex, and follows the same gudelines for formatting text. It is a useful utility for those who use FrameMaker for documentation and would like to insert pieces of Modula-3 code in their Frame files. m3tomif allows you to map basic TeX styles into Frame styles. It can also be configured to use styles already defined in your Frame files in its conversion. See its man page for more detailes. m3tomif can be downloaded from our server ftp://ftp.gte.com/pub/m3/m3tomif, or via http://info.gte.com/ftp/doc/software/m3tomif.html. --Emon _________________________________________________________________ Emon Mortazavi Distributed Systems Technology Tel: +1-617-466-2951 GTE Laboratories Incorporated FAX: +1-617-466-2439 40 Sylvan Road, MS-62 Internet: emon@gte.com Waltham, MA 02254 USA ======================================================================= 23 === Date: Wed, 10 May 1995 14:26:42 -0500 From: douglm@rpi.edu (Mike Douglass) Subject: Just testing - delete Recieved no reposting since May5 ======================================================================= 24 === Date: 05 MAY 95 16:05:16 AST From: "Qusay H. Mahmoud" Subject: Would M3 be the best for this?? Hi, I am working on a project and I am wondering if someone here would beable to make a suggestion. First of all let me say that Idon't know much about Modula-3. Ok, the project I am working on is to allow 2 researchers to communiate together by opening up 2 windows on the workstation they are using and then load the research paper "assume it is an ascii" paper they are working on and of course each one will have a mouse to point to some whereon the screen and be able to write few lines of explanation for the other researcher......etc......I hope I am making any sense here. :-) Would M3 be ideal for this project ?? Can I use Tcl/Tk interface with M3 ?? Or do I have to call the binary files from Tcl/Tk?? Any comments are welcome....and thank you for your input. Please e-mail me directly for any comments/suggestions you have to either: k3is@unb.ca OR k3is@jupiter.csd.unb.ca Thanks alot. Best regards... Qusay H. Mahmoud The University of New Brunswick -=((--------------------------------------------------))=- -==(((Your computer is the best. However, mine is better)))==- -=((--------------------------------------------------))=- ======================================================================= 25 === Date: 10 May 1995 08:35:17 GMT From: tlh20@thor.cam.ac.uk (T.L. Harris) Subject: Re: Help Mod-3 (Linux) Tai West (mlw2374@omega) wrote: : Is anyone using Modula-3 on Linux. I can't figure out how to compile and : run a 'Hello World' program. I've generated a m3 makefile but can't seem : to get past this point. (Assuming you're using SRC Modula-3) You should have a tree something like myhomedirectory | |----helloworldprogram----src | .. The source for the program should go in src along with the m3makefile. If you have source called hello.m3 then the m3makefile should say import("libm3") implementation("hello") program("hello") In the helloworldprogram directory run m3build and it should create a new directory LINUX off that one and in there should be the executable hello. tim -- ---------- Tim Harris | --'There's three sides to every story, yours and mine 46k Churchill College | ------------and the cold hard truth', Don Henley ---- ----Cambridge CB3 0DS | http://www.chu.cam.ac.uk/home/tlh20/home.html ------- ======================================================================= 26 === Date: 11 May 95 09:01:42 From: dagenais@notung.vlsi.polymtl.ca (Michel Dagenais) Subject: Re: Why no M3 for Mac? What's Modula-3/Lite (I can't remember anything about it in the FAQ), and when is it expected to be available? Actually most pieces of it are already available. The main missing piece is the Trestle port to Win32, which is well under way. From the FAQ: What is M3-lite, MS-Windows support M3-lite is a research project at DEC SRC to see how fast Modula-3 programs could be compiled and linked. It uses an integrated m3build, m3 compiler and code generator (based on Burs) and is targeted at Win32 (Windows NT or Windows Chicago). Research projects, by definition, do not have release dates. Part of this work, when ready, may also serve on other platforms, especially LINUX and FreeBSD since they are intel based. -- Prof. Michel Dagenais http://www.vlsi.polymtl.ca/dagenais/home/home.html Dept of EE and Computer Eng. dagenais@vlsi.polymtl.ca Ecole Polytechnique de Montreal tel: (514) 340-4029 ======================================================================= 27 === Date: 05 May 1995 13:59:00 GMT From: jojo@strawinsky.informatik.rwth-aachen.de (Joachim Bausch) Subject: generic netobjects Hi, I have a problem when trying to generate stubs for generic instances. stubgen will crash with the following message when applied to an instance of a generic subtype of NetObj.T: *** runtime error: *** NARROW failed *** file "../src/sem/M3CConcTypeSpec.m3", line 431 *** I cannot really make sense of what is going on here. Thanks for your help Jo -- email: jojo@i3.informatik.rwth-aachen.de smail: Joachim Bausch, Lehrstuhl f. Informatik III Ahornstr. 55, 52074 Aachen, Germany phone: +49/241/80-21320 fax: +49/241/8888-218 ======================================================================= 28 === Date: Fri, 12 May 1995 22:51:29 GMT From: bruce@newton.apple.com (Bruce Thompson) Subject: Re: Does anyone know where.. COMPLETE src for Linux? m3 In article <3o81u4$b1n@news.rwth-aachen.de>, Peter Klein wrote: > >Yep. Found that but gatekeeper is reaaaaly slow. Does anyone know any > >mirrors or other places I can get the source? > > > > ftp://ftp-i3.informatik.rwth-aachen.de/pub/Modula-3 > > Peter > --- > Peter Klein E-Mail: pk@i3.informatik.rwth-aachen.de > Lehrstuhl fuer Informatik III Tel.: +49/241/80-21316 > Ahornstrasse 55 Fax.: +49/241/8888-218 > 52074 Aachen, Germany You can also find it at: ftp://vlsi.polymtl.ca/pub/m3(?) I'm not sure about the path, but I am sure about the machine name. Cheers, Bruce. -- -------------------------------------------------------------------- Bruce Thompson | "Never put off till tomorrow what PIE Developer Information Group | you can comfortably put off till Apple Computer Inc. | next week." | -- Unknown Usual Disclaimers Apply | ======================================================================= 29 === Date: Tue, 9 May 95 10:43:29 EDT From: nayeri@gte.com (Farshad Nayeri) Subject: Re: Why no M3 for Mac? In article <3om1o6$k12@newdelph.cig.mot.com> gabrius@riker.cig.mot.com (David M . Gabrius) writes: Okay, I know that this question gets asked about one a month, but why is there no M3 compiler for the Macintosh? Is it due to the lack of a good GCC? Thanks. The reason why I'm asking is that this may influence a machine purchase in the near future. Lack of direct GCC support doesn't help, but there are other problems, like how to make threads work well; and how to make M3's garbage collection work well with Mac's memory manager. All of these are probably doable, but they require good knowledge of Mac internals and the will to put in much work. And then there is the integration into the Mac environment, which is another issue. Practically for SRC Modula-3 you will have to also deal with making "m3build" integrated with a development environment, or make a new development environment. Perhaps after Modula-3/Lite is out, it is a good time to start on looking at what it takes to do a Mac port. (Sounds like a good masters project!) Anyway, I think if someone is going to port to the Mac, they may be better off bypassing GNU C backend all together. Sadly, if you are going to do serious development with M3 right now you can't do it on Mac hardware (at least until Linux on a Mac is more than vapor.) -- Farshad ======================================================================= 30 === Date: Wed, 10 May 1995 11:15:15 GMT From: cwr@crash.cts.com (Will Rose) Subject: Re: Why no M3 for Mac? Farshad Nayeri (nayeri@gte.com) wrote: [..] : Perhaps after Modula-3/Lite is out, it is a good time to start on : looking at what it takes to do a Mac port. (Sounds like a good masters : project!) Anyway, I think if someone is going to port to the Mac, they : may be better off bypassing GNU C backend all together. : Sadly, if you are going to do serious development with M3 right now : you can't do it on Mac hardware (at least until Linux on a Mac is more : than vapor.) One of the (few) ideas in the back of my mind is porting M3 to OS/2, not as a PM app but as a command-line program. OS/2 has threads, and a fairly standard and high-quality compiler as well as ports of GNU; however, people better qualified than I have tried this before and (apparently) got nowhere. What's Modula-3/Lite (I can't remember anything about it in the FAQ), and when is it expected to be available? Thanks - Will cwr@crash.cts.com ======================================================================= 31 === Date: 10 May 1995 14:14:37 GMT From: rrw1000@cus.cam.ac.uk (Richard Watts) Subject: Re: Why no M3 for Mac? In article <9505091443.AA08621@tahoe.dom>, Farshad Nayeri wrote: >In article <3om1o6$k12@newdelph.cig.mot.com> gabrius@riker.cig.mot.com (David M. Gabrius) writes: > [snip] > >Sadly, if you are going to do serious development with M3 right now >you can't do it on Mac hardware (at least until Linux on a Mac is more >than vapor.) Even then, you'll need to modify the runtime (altering the M3 definition of a jmp_buf and removing the INC(bp,[whatever]) in the i386 version at least). Richard. -- `The past tempts us; the present confuses us; the future frightens us - and our lives slip away moment by moment - lost in that vast, terrible inbetween' (Babylon 5) The University of Cambridge can't have these opinions even if it wants them. ======================================================================= 32 === Date: Wed, 17 May 1995 10:27:13 METDST From: rudy@cs.rug.nl Subject: Language Definition (constructors) At this moment I find Modula-3 one of the best programming languages. Working with Modula-3 I still find minor points where the language (definition) could be improved. Therefore I will propose some minor changes to the language definition. I hope to initiate a fruitful discussion about the language definition. I will collect the reactions and write a final report. At this moment I am trying to implement the patches to adapt the compiler to the modified (improved?) language definition. For most modifications of the language definition these patches contain a few additions or changes. Proposal 4: Constructors ======================== We distinguish 1) Set constructors 2) Array constructors 3) Record constructors 4) Reference type constructors 5) Copy constructors (the unchanged part, see language definition) A set constructor has the form : S{e_1, ..., e_n} where "S " is a set type and "e"'s are expressions of the form "lo..hi". The constructor denotes a value of type "S" containing the listed values and the values in the listed ranges. The "e"'s, "lo"'s, and "hi"'s must be assignable to the element type of "S". An array constructor has the form: A{e_1, ..., e_n} where "A" is an array type and the "e"'s are expressions. The constructor denotes a value of type "A" containing the listed elements in the listed order. The "e"'s must be assignable to the element type of "A". This means that if "A" is a multi-dimensional array, the "e"'s must themselves be array-valued expressions. If "A" is a fixed array type and "n" is at least "1", then "e_n" can be followed by ", .." to indicate that the value of "e_n" will be replicated as many times as necessary to fill out the array. It is a static error to provide too many or too few elements for a fixed array type. A record constructor has the form: R{b_1, ..., b_n} where "R" is a record type and "b_1, ..., b_n" is a list of keyword or positional bindings, exactly as in a procedure call. The list of bindings is rewritten to fit the list of fields and defaults of "R", exactly as for a procedure call; the record field names play the role of the procedure formal parameters. The expression denotes a value of type "R" whose field values are specific by the rewritten binding. The rewritten binding must be only field names and must bind each field name exactly once. Each expression in the binding must be assignable to the type of the corresponding record field. (the additions) A reference type constructor has the form: T{e_1, ..., e_n} where "T" is a reference type other than an object type, "REFANY", "ADDRESS", or "NULL". The constructor returns the address of a newly-allocated variable of "T"'s referent type. The reference returned by the allocator is distinct from all existing references. The allocated type of the new reference is "T". The allocated variable is initialized by the constructor U{e_1, ..., e_n} where "U" is the referent type of "T". It is a static error if "T"'s referent type is empty. If "T" is declared as an opaque type, the constructor is legal only in scopes where "T"'s concrete type is known completely. It is illegal if the type "T" is an (opaque) object. A copy constructor has the form: C{e_1} The constructor returns "e_1" after checking that "e_1" is assignable to the type "C". Syntax ====== No changes Example ======= Assume the declarations: TYPE complex = RECORD Re,Im: REAL; END; refComplex = REF complex; In the old situation the declaration of an initialized pointer is rather troublesome. VAR y:refComplex; BEGIN y:=NEW(refComplex); y^:=complex{1.0,2.0}; END; This can now be replaced by VAR y:=refComplex{1.0,2.0}; This becomes really a shorthand notation. This addition to the language seems to be syntactic sugar because it seems not to add something essentially new to the language. This proposed modification becomes essential in combination with generics. GENERIC MODULE Vector(V); VAR v:=V.T{0.0,0.0,0.0}; BEGIN END Vector; Possible implementations of "T" are: 1) T = ARRAY [0..2] OF REAL 2) T = ARRAY OF REAL 3) T = REF ARRAY [0..2] OF REAL 4) T = REF ARRAY OF REAL Now, independent of the type of "V.T", the generic module produces the correct implementation of an all zero vector with three elements. In the old situation only the implementations 1) and 2) were possible. Notice that in case of reference types an implicit "NEW" is generated. These implicit memory allocations enables the mapping of the "ARRAY" and "REF ARRAY" implementations on the same generic module. Discussion ========== From my point of view a constructor is a powerful language element, especially in case of generic implementations. Using a constructor, the typical type dependent implementation of the initialization (and if necessary the allocation) can be moved from the generic implementation to the imported implementations. This enables the construction of generics where the choice between a dynamic or a static implementation in case of arrays and records will be made by selection the appropriate instantiation. By using constructors you are hiding some aspects (allocation) of the type for the generic module. If the constructor is capable of allocating memory then the "NEW" in the language becomes almost superfluous. You will only use "NEW" for allocation of uninitialized referent types. If we extend the definition to constructors without parameters for default (or no) initialization "NEW(REFTYPE)" can be replaced by the constructor "REFTYPE{}". For creating more powerful generics this is a superfluous addition to the language. On the other hand we want to modify the definition on minor points, so we have rejected this change. Do we need a constructor for object types? In fact is the current definition of "NEW" for object types a constructor. Only for clarity and esthetic reasons we can replace the old definition with "NEW" by a real constructor. For compatibility we have rejected this change. The copy constructor seems to be useless, but this definition is essential because "REF REAL{0.5}" allocates a referent type "REF REAL" and initializes this referent type with the copy constructor "REAL{0.5}". Notice that the copy constructor has many aspects in common with the built-in function "NARROW". We have chosen for a copy constructor where the argument is assignable to the type of the constructor. We could also define a constructor which is capable of narrowing. Notice that with the recursive definition of the referent type constructor the constructor "REF REF REAL{0.5}" allocates and initializes both referent types "REF REF REAL" and "REF REAL". ======================================================================= 33 === Date: 17 May 1995 15:27:53 GMT From: ken.seefried@bridge.bls.bst.com (K.J. Seefried III) Subject: Modula-3 and mixed language kernel coding ----- I am interested in the possibility of using Modula-3 to code parts of a Linux kernel. Assuming an ELF format Linux kernel, what exactly would be required to integrate a bit of Modula-3 code (say, a device driver) into the kernel? I ask because I've been fairly agressively advocating Modula-3 in some of the Linux groups as a systems programming language, and have been told to put-up-or-shut-up. I'm working on an application in M3 for Linux, but I should be able to put any doubts about M3 to rest if I can successfully produce kernel code. Is the source to Topaz availible...? :-) ----- K.J. Seefried III ken.seefried@bridge.bst.bls.com ken@seefried.atlanta.com, http://seefried.atlanta.com ======================================================================= 34 === Date: 11 May 1995 22:38:18 GMT From: srs1002@cl.cam.ac.uk (S.R. Samani) Subject: Re: Problem using m3build with netobj In article , wyrmok@plg.uwaterloo.ca (R ussell Mok) writes: > I wrote the following m3makefile for a very simple program using > netobj: > > (* m3makefile begins *) > import(libm3) > import(netobj) > > module (NameTable) > interface (NameServerImpl) > interface (NameServerT) > implementation (NameServer) > > netobj(NameServerT,T) > implementation (Main) > > program(a.out) > (* m3makefile ends *) > The compiler says the problem is with the line "import(netobj)". I suspect the problem is with the fact that part of the Network Objects package is a function "netobj" used in m3makefiles to generate stubs etc. Its getting confused between the two things with the same name. Norman Ramsey's suggestion that you quote everything in brackets, ie, have import ("netobj") should help it avoid the confusion. The DEC SRC help on the Web suggests that you should always use quotes in the m3makefile to avoid it getting confused. Sanj ======================================================================= 35 === Date: 17 May 1995 16:13:26 -0400 From: larryrau@aol.com (Larry Rau) Subject: Obliq ?? Is Obliq the Modula-3 derived "scripting language" (or embedded language, or whatever you want to call it?). Where can I find more information on it. I need to develop some kind of scripting language to allow a person to write tests for a communications network. The idea is to be able to simulate users conversing with various backend "hosts" (in a nutshell). I've been "thinking" about what the language should do and look like and was basing it on Modula-3, etc, Is this something Obliq may be able to solve? I want a small easy to use/learn language that I can tailor for our needs. It does not need to have the kitchen sink. .......................larry ======================================================================= 36 === Date: Thu, 18 May 1995 14:23:19 METDST From: rudy@cs.rug.nl Subject: Language Definition (assert pragma) ======================================================================= 37 === Date: 12 May 1995 17:44:27 GMT From: chase@centerline.com (David Chase) Subject: Puzzling behavior from standard input with simple IO. This is running m3-3.5.2 on Solaris 2.4. I'm writing a simple test program with a command loop along the lines of: Lex.Skip(Stdio.stdin); WHILE NOT Rd.EOF(Stdio.stdin) DO TRY action := Lex.Scan(Stdio.stdin); ... FINALLY Wr.Flush(Stdio.stdout); Lex.Skip(Stdio.stdin); END; END; For reasons that I don't quite understand, in order to get the call to Rd.EOF to return true, I must type ^D twice, not once. Is EOF from the keyboard not sticky, or what? If, by-the-way, you were trying to introduce someone to Modula-3, this is not the best way to impress them. It would also be most nice if there were an option to have a line-buffered Writer (this does not appear to be the case from reading Some Useful Modula-3 Interfaces). speaking for myself, David Chase ======================================================================= 38 === Date: Thu, 18 May 1995 19:08:46 +0200 From: franz@inf.ethz.ch (Michael Franz) Subject: Repost: Oberon Track at GI-SI-95 The First Joint Conference of GI and SI will have a major track dedicated to Oberon. There will be an Oberon tutorial, four talks, and a plenary discussion. Members of ETH's Oberon team will be present for personal discussions. Coffee and Gipfeli will be served during the breaks. The conference language will be German, but the proceedings (to be published by Springer-Verlag) will contain English versions of the papers. All this will happen on Monday, September 18th, 1995. Here are the abstracts of the talks: --- The Smart Document or How to Integrate Global Services Juerg Gutknecht Institut fuer Computersysteme ETH Zurich, CH-8092 Zurich gutknecht@inf.ethz.ch Driven by a foreseeable significant increase of global services (cable and wireless) in the near future, client/server environments will progressively replace systems that operate a single computer or workstation in isolation. Modern operating systems will not merely be expected to access but to integrate global services as smoothly as possible, because it is unreasonable to require users to learn a different interface for every single service that they want to use. Services should be presented uniformly and called implicitly, i.e. service-specific technical details should be handled by the system unconspicuously and behind the scenes. We believe that the document-oriented approach is best suited to this purpose. We present and demonstrate a versatile document-oriented interface for Oberon that - currently - integrates local documents, visual objects, symbolic computation servers, Web and Teletext. --- Integrating Oberon Resources into the World-Wide Web Ralph Sommerer Institut fuer Computersysteme ETH Zurich, CH-8092 Zurich sommerer@inf.ethz.ch The World-Wide Web (WWW) is currently one of the most popular network information systems on the Internet. The range of items that may be accessed within the WWW includes hypertext documents, images, sound patterns and video sequences. To identify these items, their location and the method to acquire them, a generic naming scheme is provided. Besides the identification of these items it allows to specify and parametrize activities that construct items "on-the-fly". Hence, aspects of interaction may be introduced to the information system. In our paper we discuss this interactive potential power of the WWW, especially how to obtain this power from the Oberon operating system. Our attention is directed to aspects of information provision, i.e. we explore the suitability of the Oberon system for a WWW information server. The objective is the integration of interactive Oberon applications and services in the global WWW document space. Hence, we allow remotely to invoke Oberon activities which produce textual or graphical data from any location in the world. The integration is based on a simple server framework that allows to attach Oberon services to the WWW with minimal implementation effort. --- A Comparison of C++, FORTRAN 90 and Oberon-2 for Scientific Programming Bernd Moesli ARITHMETICA CH-8307 Effretikon, Switzerland moesli@arithmetica.ch In the past decade, the programming languages C++, FORTRAN 90 and Oberon-2 all evolved from their ancestors. This invites to reflect upon the suitability of these modern programming languages for scientific and engineering computing. In the first part, we compare their primary language features, as needed by scientists and engineers. In the second part, we list some useful features missing in Oberon-2. The report concludes by a personal assessment of the three languages with respect to the numerical context. The reader's experience in scientific programming in C or FORTRAN would be advantageous. --- Oberon Dialogs: A User Interface for End Users Markus Knasmueller Institute for Computer Science (Systemsoftware) Johannes Kepler Universitaet, Altenbergerstrasse 69, A-4040 Linz knasmueller@ssw.uni-linz.ac.at This paper describes the Dialogs package which allows a user to create and use dialog viewers with buttons, check boxes, text fields and other user interface elements. Dialogs fit smoothly into the Oberon system. Existing tools can be equipped with a graphical user interface without modifications. The object-oriented nature of Dialogs allows adding new user interface items and new commands even by third party programmers and end users. --- Conference Program: Monday, September 18th, 1995. 08.30-11.30 Oberon-Tutorial (J. Gutknecht, M. Reiser) 13.45-14.30 J. Gutknecht: Smart Documents 14.30-15.00 R. Sommerer: World-Wide-Web 15.00-15.15 Coffee Break 15.15-15.45 B. Moesli: Scientific Programming 15.45-16.15 M. Knasmueller: Oberon Dialogs 16.15-16.55 Plenary Discussion (N. Wirth and others) --- For general questions about GISI'95, please contact gisi95@inf.ethz.ch or look up http://www.inf.ethz.ch/GISI95/GISI95.html . ======================================================================= 39 === Date: Fri, 19 May 1995 8:11:15 METDST From: rudy@cs.rug.nl Subject: Language Definition (assert pragma) ======================================================================= 40 === Date: Fri, 19 May 1995 11:50:33 -0500 From: douglm@rpi.edu (Mike Douglass) Subject: FileSys I came across FileSys via the WWW source index and didn't realise for some time that it's embedded in pkgobj. Is there any reason why it isn't in some more 'public' place, that is as part of the standard m3 library. The routines provided all seem useful. ======================================================================= 41 === Date: Fri, 19 May 1995 11:48:41 -0500 From: douglm@rpi.edu (Mike Douglass) Subject: m3 3.4.2 and Solaris I have (almost) succesfully installed v3.2.5 on Solaris 2.4. No major obstacle presented itself. What I did come across were: The problem building a stand-alone bootstrap version. Having to set LD_LIBRARY_PATH I'm still not sure that build_standalone works correctly pkgobj/FileSysPosix refers to getdirentries which doesn't exist on Solaris and is obsolete anyway. I changed it to getdents and it seems OK. m3gdb doesn't work correctly. It doesn't find any of the symbols for dynamically loaded libraries (which for some of my stuff is most of the application.) I built gdb and that does find the libraries but of course is not m3'ised. I tried rebuilding one of my applications with build_standalone, hoping that with one big module I'd get all the symbols. However it didn't seem to make any difference which leads me to believe that something is wrong with the build_standalone stuff. However, it could be me. ======================================================================= 42 === Date: Fri, 19 May 95 09:50:03 -0700 From: heydon@pa.dec.com Subject: Re: Obliq ?? Larry Rau asks: > Is Obliq the Modula-3 derived "scripting language" (or embedded language, > or whatever you want to call it?). Where can I find more information on > it. Obliq is an interpreted language written by Luca Cardelli. The language is lexically scoped and untyped. One of its main features is its support of distributed, object-oriented computation. The language is easy to use and learn. The complete Obliq interpreter is available as part of the SRC Modula-3 distribution. For more information about Obliq, see the Obliq home page on the web: http://www.research.digital.com/SRC/Obliq/Obliq.html SRC Research Report 122, "Obliq: A Language with Distributed Scope", describes the Obliq language and its semantics: http://gatekeeper.dec.com/pub/DEC/SRC/research-reports/ abstracts/src-rr-122.html Appendix A of this report is a language reference manual, Appendix B describes the Obliq system and built-in libraries, and Appendix C describes how Obliq can be integrated with Modula-3 programs. - Allan -------------------------------------------------------------------- Allan Heydon Digital Equipment Corporation heydon@pa.dec.com Systems Research Center (415) 853-2142 130 Lytton Avenue (415) 853-2104 (FAX) Palo Alto, CA 94301 ======================================================================= 43 === Date: Fri, 19 May 95 17:14:03 -0700 From: heydon@pa.dec.com Subject: Re: Puzzling behavior from standard input with simple IO. David, > For reasons that I don't quite understand, in order to get the call > to Rd.EOF to return true, I must type ^D twice, not once. Is EOF > from the keyboard not sticky, or what? The Modula-3 "File" interface says: The meaning of a subsequent read after end of file has been reached is undefined for a "File.T" but may be define for a particular subtype. In particular, a "Terminal.T" is a subtype of a "File.T", and the "Terminal" interface explicitly says that more characters can be read from a "Terminal.T" after end-of-file has been reported. The behavior you observe is a property of the design of the interfaces, not a bug in the implementation. The interfaces were actually designed to be consistent with Unix. For example, if you compile the following C program, you'll notice that you have to type control-D twice to indicate end-of-file to it as well. #include #include void skipwhite(FILE *fp) { int c; while ((c = getc(fp)) != EOF && isspace(c)) /* SKIP */ ; if (c != EOF) ungetc(c, fp); } void main() { int c; skipwhite(stdin); while ((c = getc(stdin)) != EOF) { while (c != EOF && !isspace(c)) { putc(c, stdout); c = getc(stdin); } if (c != EOF) ungetc(c, stdin); putc('\n', stdout); skipwhite(stdin); } } I've tried to model this program after your simple test program. The "skipwhite" function is analogous to "Lex.Skip". The first control-D causes "skipwhite" to exit; the second control-D is then required to exit the main "while" loop. For completeness, here's the equivalent Modula-3 program: MODULE RdEOF EXPORTS Main; IMPORT Lex, Rd, Wr, Thread; FROM Stdio IMPORT stdin, stdout; <* FATAL Rd.Failure, Wr.Failure, Thread.Alerted *> BEGIN Lex.Skip(stdin); WHILE NOT Rd.EOF(stdin) DO Wr.PutText(stdout, Lex.Scan(stdin)); Wr.PutChar(stdout, '\n'); Wr.Flush(stdout); Lex.Skip(stdin) END END RdEOF. Your example points out an "infelicity" in the design of the Modula-3 interfaces. There are at least two possible ways to fix the problem. One would be for the "Lex" procedures not to silently consume end-of-file. But that would fix the problem only if the user called a "Lex" procedure just before testing for EOF; it doesn't address the problem if the user wrote their own procedure that happened to silently read end-of-file. Another solution would be to change the implementation of file readers ("FileRd.T"'s) so they make EOF sticky. > It would also be most nice if there were an option to have a > line-buffered Writer (this does not appear to be the case from > reading Some Useful Modula-3 Interfaces). Regarding buffered writers, let me first say that the writers "Stdio.stdout" and "Stdio.bufferedStderr" are both buffered, while "Stdio.stderr" is unbuffered. I presume by a "line-buffered Writer" you mean a buffered writer that automatically gets flushed whenever a newline character is written. It's true that the standard Modula-3 library doesn't provide such a writer; it only provides unbuffered writers or writers with a fixed sized (fairly large) buffer. It's probably possible to implement a line-buffered writer, but it would be non-trivial. It would certainly be an interesting exercise. Any takers? - Allan -------------------------------------------------------------------- Allan Heydon Digital Equipment Corporation heydon@pa.dec.com Systems Research Center (415) 853-2142 130 Lytton Avenue (415) 853-2104 (FAX) Palo Alto, CA 94301 ======================================================================= 44 === Date: Mon, 15 May 1995 10:37:36 GMT From: acourtny@cs.tcd.ie (Antony Courtney) Subject: Announcing: Phantom language, home page, alpha release Announcing: Phantom, an Interpreted Language for Distributed Programming This message is an announcement for the Phantom home page, mailing list, and prototype interpreter for the centralised language core. ------------------------------------------------------------------------------- From the Phantom home page: What is Phantom? Phantom is a new interpreted language designed to address some of the problems presented by large-scale, interactive, distributed applications such as distributed conferencing systems, multi-player games, and collaborative work tools. Phantom combines the distributed lexical scoping semantics of Obliq with a substantial language core. The language core is based on a safe, extended subset of Modula-3, and supports a number of modern programming features, including: * static structural-equivalence typing * objects * modules and interfaces * lightweight threads * exceptions * garbage collection * higher-order functions and lambda expressions * a keyword binding mechanism * dynamically sized lists and slice indexing notation * type-safe implicit declarations The Phantom interpreter is implemented entirely in ANSI C, and provides a binding to the Tk GUI toolkit. Phantom has similar goals to Java, but was developed independently. ------------------------------------------------------------------------------ Information about Phantom, the mailing lists, differences from Java, documentation on the language, and the current status and availability of the interpreter can be found on the Phantom home page: http://www.cs.tcd.ie/acourtny/phantom/phantom.html (in Europe) or http://www.apocalypse.org/pub/u/antony/phantom/phantom.html (US mirror) Please feel free to drop by and have a look! Antony Courtney Trinity College Dublin Ireland ======================================================================= 45 === Date: 21 May 1995 12:59:01 -0400 From: rdavis4@umbc.edu (R. D. Davis) Subject: Re: Modula-3 and mixed language kernel coding In article <3pd4lp$ki2@atglab10.atglab.bls.com>, K.J. Seefried III wrote: >I am interested in the possibility of using Modula-3 to code parts of >a Linux kernel. Assuming an ELF format Linux kernel, what exactly >would be required to integrate a bit of Modula-3 code (say, a device >driver) into the kernel? That sounds like a nice idea. :-) Note that I've never used Linux, but have used other flavors of UNIX on lots of different types of hardware, and done lots of programming in C. However, back when I used to use an IBM type PC, Modula-2 was my language of choice. I also had a compiler for it on my AT&T 3B1 UNIX box, but as far as using it to write applications portable to other UNIX sytems, I was at a dead end, not being able to find a good, inexpensive, Modula-2 compiler for UNIX systems... I guess I should look into using Modula-3 or Oberon. Icon also looks nice... time will tell. >I ask because I've been fairly agressively advocating Modula-3 in >some of the Linux groups as a systems programming language, >and have been told to put-up-or-shut-up. I'm working on an application Oooohhhhhh! Someone telling me that would make me all the more determined to do something such as what you're thinking of doing! >in M3 for Linux, but I should be able to put any doubts about M3 to >rest if I can successfully produce kernel code. Best of luck with this! If Pascal can be as a systems programming language, there's no reason why one can't use Modula-3... for example, the POS (single user, no multitasking) and Accent (single user, multitaking, graphical user interface and lots of other nice features) operating systems were written in Pascal (of course, some microcode was used as well). -- R. D. Davis * Eccentrics have more fun! :-) * rdavis4@umbc.edu, rdd@mystica.uucp > Home telephone: 1-410-744-7964 > Vintage computer fanatic and http://www.access.digex.net/~rdd > preservationist. ======================================================================= 46 === Date: 21 May 1995 16:35:42 GMT From: bm@tune.cs.columbia.edu (Blair MacIntyre) Subject: small change to pp package I made a small change to the pp package to support multiple .afm file directories via an AFMPATH environment variable. I did this because I had some afm files in my home directory I wanted to use. Simply set the AFMPATH to point to the directories you want to be searched, as you would set any other PATH variable. For example, mine is: /u/fonic/bm/afm:/u/fonic/bm/AFMFiles:/usr/local/lib/ps All the changes are in FBEPostScript.m3, which I've put in ftp.cs.columbia.edu:/pub/bm/m3/FBEPostScript.m3 -- Blair MacIntyre (bm@cs.columbia.edu), Graduate Student (Graphics and UI Lab) smail: Dept. of Computer Science, 450 Computer Science Building, 500 W 120 St. Columbia University, New York, NY 10027 ======================================================================= 47 === Date: 22 May 1995 03:40:48 GMT From: myoung@calon.com Subject: Re: Announcing: Phantom language, home page, alpha release In , acourtny@tcd.ie (Antony Courtney) writes: >A few brave souls are making the effort to port to other problems, and >uncovering the usual round of minor configuration problems and bugs which >didn't show up on the development platform. I'm updating the code base >to correct these problems as they are reported; we'll hopefully have a wider >coverage of platforms in the next major release. Antony, I missed the original post, can you give us a short description in this newsgroup? Thanks. Matt > >Hope this helps, > > -antony > >-- >****************************************************************************** * >* Antony Courtney Email: Antony.Courtney@cs.tcd.ie * >* final year undergad, Computer Science * >* Trinity College, Dublin, Ireland * ======================================================================= 48 === Date: Fri, 19 May 1995 11:45:11 GMT From: acourtny@tcd.ie (Antony Courtney) Subject: Re: Announcing: Phantom language, home page, alpha release In mspjoerg@swansea.ac.uk (Joerg Wegener) writes: >In article , acourtny@cs.tcd.ie (Antony Courtney) say s: >> Phantom, an Interpreted Language for Distributed Programming >> >>This message is an announcement for the Phantom home page, mailing list, >>and prototype interpreter for the centralised language core. >>[...] > >Well, I had a look at the homepage, and went to the implementation >(ftp-connection). However, I couldn't find a clue as to what >platform the interpreter is running on, and I'm not going to download >more that 2 MB of data to find out I can't use it. > >Can someone enlighten me, please? Thanks a lot! There is a page reachable from the "Current Status" section of the home page (http://www.cs.tcd.ie/acourtny/phantom/phi.html on the Irish server) which gives details about the current status of the implementation, and what you should/shouldn't expect from the current release. It also states: The interpreter was developed on a Dell Dimension XPS 90 running Linux 1.2.7. It is known to work on Linux and SunOS 4.1.3. A few brave souls are making the effort to port to other problems, and uncovering the usual round of minor configuration problems and bugs which didn't show up on the development platform. I'm updating the code base to correct these problems as they are reported; we'll hopefully have a wider coverage of platforms in the next major release. Hope this helps, -antony -- ******************************************************************************* * Antony Courtney Email: Antony.Courtney@cs.tcd.ie * * final year undergad, Computer Science * * Trinity College, Dublin, Ireland * ======================================================================= 49 === Date: Mon, 22 May 1995 8:14:28 METDST From: rudy@cs.rug.nl Subject: Language Definition (assert pragma) Sorry, I have tried to mail this message twice, but both times something went wrong. May be the third time everything goes alright. =============================================================================== At this moment I find Modula-3 one of the best programming languages. Working with Modula-3 I still find minor points where the language (definition) could be improved. Therefore I will propose some minor changes to the language definition. I hope to initiate a fruitful discussion about the language definition. I will collect the reactions and write a final report. Introduction ============ A pragma is a special directive to the Modula-3 system. Only two pragmas are "recommended" in the definition of Modula-3, "INLINE" and "EXTERNAL", but implementations are free to define others and SRC Modula-3 has done so. We believe that the "ASSERT" pragma should also be a recommended pragma. In SRC Modula-3, the pragma "<* ASSERT exp1 *>", where "exp1" is an arbitrary Boolean expression, may appear anywhere that a statement can appear. It is a checked run-time error if the expression's value is "FALSE" when the pragma is encountered. A compiler option can be used to turn of all assertions to speed up the program. The turning on and off of the assert pragma is not very selective. You have several assertion levels: 1) Assertions which are used to check whether the modules are used in the way the programmer has mend to. In fact these assertions are mainly used to formulate preconditions to procedures. 2) Assertions for safe execution. These assertions have more or less the status of bound checking in case of arrays. These assertions are not strictly necessary for secure execution of programs, but turning them on makes the detection of possible bugs in the program more probable. 3) Assertions which are used for debugging purposes only. The are normally turned off, but in case of program development or modification they are turned on. For speeding up the programs you will turn of all assertion; level 0. For safe use of libraries you will also check the preconditions; level 1 turn on assertions of type 1). A fairly level of internal consistency checking can be reached at level 2; turn on assertions of type 1) and 2). If bugs are probable you want a fully controlled execution of the program; level 3 turn on all assertions. Without changing the program you want to manipulate the number of assertions to be checked. Therefore we propose to introduce assertion levels. Proposal 10: modification of recommended pragmas ================================================ The "ASSERT" pragma should also be a recommended pragma. The pragma "<* ASSERT exp1 *>" or "<* ASSERT exp1, exp2 >*", where "exp1" is an arbitrary Boolean expression and where "exp2" is an arbitrary constant Integer subrange expression where "1 <= exp2 <= 3", may appear anywhere that a statement can appear. If "exp2" is omitted, the value "1" is assumed. It is a checked run-time error if the expression's value of "exp1 OR exp2 > level" is "FALSE" when the pragma is encountered. A compiler option can be used to turn on or off the assertions by selecting the value of "level". Syntax ====== No changes Discussion ========== With the redefined "ASSERT" pragma, the program remains unchanged with respect to the pragmas during the development of the program. A large number of superfluous checks can remain part of the program source without loss of execution speed. Therefore "exp2" should be a constant expression, so it can be evaluated at compile time. If the program has to be debugged or changed, all assertions which were used during the development stage are still available and can be activated by simply turning them on. The default value of "exp2" is chosen to be "1" so that at the default level 1 all old style pragmas of the SRC Modula-3 compiler are evaluated correctly. Of course the number of levels can be increased. The choice of 3 levels is arbitrary. This number seems to be a good compromise between a small number of levels and a sufficient number of levels to distinguish between different types of assertions. Note ==== The necessary patches to the SRC Modula-3 compiler are implemented. ======================================================================= 50 === Date: 22 May 1995 10:43:51 GMT From: Chris Lilley Subject: Re: Announcing: Phantom language, home page, alpha release mspjoerg@swansea.ac.uk (Joerg Wegener) wrote: >Well, I had a look at the homepage, and went to the implementation >(ftp-connection). However, I couldn't find a clue as to what >platform the interpreter is running on, and I'm not going to download >more that 2 MB of data to find out I can't use it. Now, how do you know it is 2Mb? Presumably by reading this text from the Web page about the interpreter: The interpreter was developed on a Dell Dimension XPS 90 running Linux 1.2.7. It is known to work on Linux and SunOS 4.1.3. The alpha release is a 2 MB gzip'ed tar file which expands to 10 MB. You will need about 20 MB of disk space to build the interpreter.[etc] Seems clear enough to me. And since the interpreter is ANSI C, I guess you could get it running on most Unix boxes. >Joerg -- Chris Lilley, Technical Author +-------------------------------------------------------------------+ | Manchester and North HPC Training & Education Centre | +-------------------------------------------------------------------+ | Computer Graphics Unit, Email: Chris.Lilley@mcc.ac.uk | | Manchester Computing Centre, Voice: +44 61 275 6045 | | Oxford Road, Manchester, UK. Fax: +44 61 275 6040 | | M13 9PL BioMOO: ChrisL | | URI: http://info.mcc.ac.uk/CGU/staff/lilley/lilley.html | +-------------------------------------------------------------------+ | "The first W in WWW will not wait." Fran=E7ois Yergeau | +-------------------------------------------------------------------+ ======================================================================= 51 === Date: 22 May 1995 11:32:55 GMT From: rrw1000@cus.cam.ac.uk (Richard Watts) Subject: Re: Modula-3 and mixed language kernel coding In article <3pnrgl$hnt@umbc8.umbc.edu>, R. D. Davis wrote: >In article <3pd4lp$ki2@atglab10.atglab.bls.com>, >K.J. Seefried III wrote: [sorry I'm following up to the wrong article : the original isn't available on our server] > >>I am interested in the possibility of using Modula-3 to code parts of >>a Linux kernel. Assuming an ELF format Linux kernel, what exactly >>would be required to integrate a bit of Modula-3 code (say, a device >>driver) into the kernel? Disclaimer: I've never written a device driver in Linux, and my copies of the kernel docs are very old. This depends on how much of the Modula-3 runtime you're prepared to live without. If you're prepared to do without garbage collection and threads, I suspect it wouldn't be too hard in principal. However, my feeling is that unless your device driver is called upon to do some fairly tricky processing, you might well be better off writing a stub device driver in C and do the actual processing at user level (though I concede that this may be impossible in some cases - network cards and storage devices to name two). You're also liable to hit some practical problems : interrupt latency, you'll have to replace libm3 with a cut-down runtime, I believe there are constraints on initialised data structures in the kernel, and speed (especially with bit-twiddling operations). Nothing insurmountable (and all of it reusable), but it might take some time. If you want GC and threads, on the other hand, the first thing to do is reimplement the Linux kernel with preemptive multithreading (or convert it to a microkernel).. :-)). > [snip] > >>I ask because I've been fairly agressively advocating Modula-3 in >>some of the Linux groups as a systems programming language, >>and have been told to put-up-or-shut-up. I'm working on an application > >Oooohhhhhh! Someone telling me that would make me all the more >determined to do something such as what you're thinking of doing! > >>in M3 for Linux, but I should be able to put any doubts about M3 to >>rest if I can successfully produce kernel code. > >Best of luck with this! Indeed. :-). [snip] Richard. -- `The past tempts us; the present confuses us; the future frightens us - and our lives slip away moment by moment - lost in that vast, terrible inbetween' (Babylon 5) The University of Cambridge can't have these opinions even if it wants them. ======================================================================= 52 === Date: Mon, 22 May 1995 13:04:51 GMT From: Subject: Re: Modula-3 and mixed language kernel coding ken.seefried@bridge.bls.bst.com (K.J. Seefried III) wrote: >Assuming an ELF format Linux kernel, what exactly >would be required to integrate a bit of Modula-3 code (say, a device >driver) into the kernel? This is a wonderful goal, but it's gonna be some work. You'll probably end up using a no-GC, no-threads subset; another reply to your posting talked about this. You'll also have to solve the problem of getting C to call M3. This problem is much, much easier if C only has to call the untraced subset. (At a previous job I designed a general C-calling-M3 package; it was fearsomely complicated, mostly due to the need to allow C to manipulate traced references.) But M3 as-is uses a linkage convention that C has trouble tapping into. If you or someone else want to work on this, let me know and I'll post or mail more info. --Sam Kendall ======================================================================= 53 === Date: Mon, 22 May 1995 19:52:19 GMT From: spencer@ERA.COM (Spencer Allain) Subject: generics mechanism After having to suffer with the intolerable syntax of C++ templates, I have encountered something that is "easy" to do in C++ that may not even be possible in Modula-3. I'll use the C++ syntax first, and then attempt to make my point concerning the Modula-3 mechanism. ------------------------------------------------------------------------------ template class Sequence { } ; ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ #include "Sequence.hh" class Stack : public Sequence { } ; and if you prefer to do it without inheritance template class Stack { Sequence internal_sequence ; } ------------------------------------------------------------------------------ I'll be the first one to say that I despise typing out Sequence or Sequence or Class, but it does allow me to "nest" generics. ------------------------------------------------------------------------------ In Modula-3 ------------------------------------------------------------------------------ GENERIC INTERFACE Sequence(Elem) ; END Sequence. ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ GENERIC INTERFACE Stack(Elem) ; IMPORT ElemSeq ; (* ?? Not possible even if there were standard naming conventions *) (* Ok, so this belongs in the MODULE portion of the code, but *) (* I think the stumbling block has been made clear *) END Stack. ------------------------------------------------------------------------------ I don't know of any mechanism that allows me to do what I want to do. -Spencer Allain Engineering Research Associates Vienna, VA 22182 ======================================================================= 54 === Date: 23 May 1995 18:03:21 +0200 From: kubla@Uni-Mainz.DE (Dominik Kubla) Subject: Re: Modula-3 and mixed language kernel coding >>>>> "K.J" == K J Seefried writes: K.J> ----- I am interested in the possibility of using Modula-3 to K.J> code parts of a Linux kernel. Assuming an ELF format Linux K.J> kernel, what exactly would be required to integrate a bit of K.J> Modula-3 code (say, a device driver) into the kernel? Great idea. I thought of converting the linux-kernel to Oberon-2 some time back, just to prove a point. K.J> I ask because I've been fairly agressively advocating K.J> Modula-3 in some of the Linux groups as a systems programming K.J> language, and have been told to put-up-or-shut-up. I know how this feels, happend to me: I tried to convince the Kernel Hackers that: - proper encapsulation of Assembler parts is req. (instead of using _asm_ ) - use off almost all GCC warnings is necessary to be pretty sure about your code (instead of only -Wall) - it is a fault to rely on the optimization strategies of GCC (that point has proven itself with the release of GCC 2.6.0, which broke several drivers due to additional optimization when called with -O2) I started to create a strict ANSI-C version of the kernel, but gave up when my mailbox got flooded with flames ... i have better things to do than to convince some fanatic C coders. So if you want to push this project, good luck and don't expect ANY help from the kernel folks. The simply hate people who do not love C like they do! Dominik -- eMail: Dominik.Kubla@Uni-Mainz.DE sMail: Dominik Kubla, Lannerstrasse 53, D-55270 Ober-Olm, European Union PGP key: http://www.uni-mainz.de/~kubla/pgp.asc WLAF W3-site: http://www.uni-mainz.de/~kubla/WLAF/Welcome.html ======================================================================= 55 === Date: Tue, 23 May 95 17:38:02 -0700 From: heydon@pa.dec.com Subject: Re: generics mechanism Spencer Allain asks how to define a generic interface and/or implementation in Modula-3 that depends on other generic interfaces. The solution is to pass the required generic interfaces as extra "arguments" to the generic interface or module in question. The "PQueueRep.ig", "SortedTable.ig", "TableList.ig" interfaces, and the "PQueue.mg", "SortedTable.mg", "TableList.mg" implementations give examples of this. As another example, consider Spencer's example: the definition of a generic stack interface that is implemented in terms of a generic sequence. A simple interface "Stack.ig" is: GENERIC INTERFACE Stack(Elem); (* Where "Elem.T" is the stack's element type. *) TYPE T <: Public; Public = ROOT OBJECT METHODS init(sizeHint: CARDINAL := 5): T; push(e: Elem.T); pop(): Elem.T; isEmpty(): BOOLEAN; END; END Stack. The generic module must take the "Elem" interface as well as the instantiated sequence interface as arguments: GENERIC MODULE Stack(Elem, ElemSeq); (* Where "Elem.T" is the stack's element type, and "ElemSeq" is "Sequence(Elem)". *) REVEAL T = Public BRANDED OBJECT seq: ElemSeq.T; OVERRIDES init := Init; push := Push; pop := Pop; isEmpty := IsEmpty; END; PROCEDURE Init(self: T; sizeHint: CARDINAL := 5): T = BEGIN IF self.seq = NIL THEN self.seq := NEW(ElemSeq.T) END; EVAL self.seq.init(sizeHint); RETURN self END Init; PROCEDURE Push(self: T; e: Elem.T) = BEGIN self.seq.addhi(e) END Push; PROCEDURE Pop(self: T): Elem.T = BEGIN RETURN self.seq.remhi() END Pop; PROCEDURE IsEmpty(self: T): BOOLEAN = BEGIN RETURN self.seq.size() = 0 END IsEmpty; BEGIN END Stack. Notice how the second argument to this generic module is required itself to be "Sequence(Elem)", that is, an instantiation of another generic interface by the same element interface "Elem" supplied as the first argument. In this way, the module has access to the type "ElemSeq.T", which is a sequence of "Elem.T"'s. Here is a simple program "StackTest" to test the interface: MODULE StackTest EXPORTS Main; IMPORT IntStack, IO, Fmt; VAR s := NEW(IntStack.T).init(); BEGIN FOR i := 1 TO 10 DO s.push(i) END; WHILE NOT s.isEmpty() DO IO.Put("Pop: " & Fmt.Int(s.pop()) & "\n") END END StackTest. This program imports the "IntStack" interface, which will be the "Stack" interface instantiated with the "Integer" interface. We can use the predefined quake procedures "build_generic_intf" and "build_generic_impl" in our m3makefile to automatically instantiate the generic interface and module: import ("libm3") generic_module ("Stack") build_generic_intf ("IntStack", "Stack", [Integer], HIDDEN) build_generic_impl ("IntStack", "Stack", [Integer, IntSeq]) implementation ("StackTest") program ("StackTest") This causes the files "IntStack.i3" and "IntStack.m3" to be automatically generated in the derived directory. Here they are: (*generated by m3build*) INTERFACE IntStack = Stack (Integer) END IntStack. (*generated by m3build*) MODULE IntStack = Stack (Integer, IntSeq) END IntStack. Notice how the interface named "IntSeq" is passed as the second argument in the instantiation of the generic module. This design still requires clients to write unsightly calls to the "build_generic" quake procedures in their m3makefiles. However, the implementer of the generic package can also write a quake template to define simple wrapper procedures that don't expose those implementation details. Here's what a quake template "stack.tmpl" for the stack package might look like: readonly proc _build_stack(nm, elt, seq, vis) is local stackNm = nm & "Stack" build_generic_intf (stackNm, "Stack", [elt], vis) build_generic_impl (stackNm, "Stack", [elt, seq]) end % In the following procedures, "nm" is the prefix for the name of the % instantiated interface/module, "elt" is the name of the stack % element interface, and "seq" is the name of the instantiated % interface "Sequence(elt)" readonly proc stack (nm, elt, seq) is _build_stack(nm, elt, seq, HIDDEN) end readonly proc Stack (nm, elt, seq) is _build_stack(nm, elt, seq, VISIBLE) end The new m3makefile becomes: template ("stack") import ("libm3") generic_module ("Stack") stack ("Int", "Integer", "IntSeq") implementation ("StackTest") program ("StackTest") Notice how the two calls to the "build_generic" procedures have been replaced by a single call to the "stack" wrapper procedure. As before, the files "IntStack.i3" and "IntStack.m3" are automatically generated in the derived directory. The only remaining problem is that some aspects of the generic implementation are exposed to clients. In this example, the client must supply the "IntSeq" argument to instantiate the generic correctly, which is somewhat undesirable. - Allan -------------------------------------------------------------------- Allan Heydon Digital Equipment Corporation heydon@pa.dec.com Systems Research Center (415) 853-2142 130 Lytton Avenue (415) 853-2104 (FAX) Palo Alto, CA 94301 ======================================================================= 56 === Date: 24 May 1995 12:47:50 GMT From: pbm1001@cam.ac.uk (Paul Menage) Subject: Re: Language Definition (constructors) In article <9505170825.AA02142@inet-gw-1.pa.dec.com>, rudy@cs.rug.nl writes: > >Example >======= > >Assume the declarations: > >TYPE complex = RECORD > Re,Im: REAL; > END; > refComplex = REF complex; > >In the old situation the declaration of an initialized pointer is rather >troublesome. > >VAR y:refComplex; > >BEGIN > y:=NEW(refComplex); > y^:=complex{1.0,2.0}; >END; What's wrong with: VAR y:=NEW(refComplex,Re:=1.0,Im:=2.0); ? > >This can now be replaced by > >VAR y:=refComplex{1.0,2.0}; Paul -- Paul Menage Magdalene College, Cambridge pbm1001@cam.ac.uk 'One of its satellites, a green and insignificant planet, is now dead' ======================================================================= 57 === Date: Wed, 24 May 1995 16:16:05 GMT From: joel@bris.ac.uk (Joel Crisp) Subject: Re: Obliq ?? Larry Rau (larryrau@aol.com) wrote: : Is Obliq the Modula-3 derived "scripting language" (or embedded language, : or whatever you want to call it?). Where can I find more information on : it. : I need to develop some kind of scripting language to allow a person to : write tests for a communications network. The idea is to be able to : simulate users conversing with various backend "hosts" (in a nutshell). You probably want a package called 'expect', which is a TCL extension. Obliq is overkill for what you want, and expect has been used for several similar tasks already. [ BTW, I do like obliq, but it is not the right tool for the job ] : I've been "thinking" about what the language should do and look like and : was basing it on Modula-3, etc, Is this something Obliq may be able to : solve? : I want a small easy to use/learn language that I can tailor for our needs. : It does not need to have the kitchen sink. : .......................larry Joel ---- Joel.Crisp@bris.ac.uk ======================================================================= 58 === Date: 24 May 95 16:33:16 GMT From: omalley@jasmin.ICS.UCI.EDU ("T. Owen O'Malley") Subject: Abstract syntax tree The old distribution of modula-3 had an abstract syntax tree package. Is that package still available for the current version of the compiler? Is the syntax tree generated by the compiler savable? Owen O'Malley Department of ICS | omalley@ics.uci.edu (ARPA) UC Irvine | http://www.ics.uci.edu/~omalley/ (WWW) Irvine, CA 92717 | ucbvax!ucivax!omalley (UUCP) ======================================================================= 59 === Date: 24 May 1995 16:52:19 GMT From: ken.seefried@bridge.bls.bst.com (K.J. Seefried III) Subject: Re: Modula-3 and mixed language kernel coding ----- Thank you all for taking the time to answer. Perhaps I should have confined the domain of the problem a bit. I suppose I really should have asked, how can I build a minimum Modula-3 run time that makes sense for the Linux environment. Obviously, things such as threads are right out. GC would likely be difficult, though not impossible; I could likely live without it. From: Sam Kendall >You'll also have to solve the problem of getting C to call M3. This problem i s >much, much easier if C only has to call the untraced subset. (At a previous >job I designed a general C-calling-M3 package; it was fearsomely complicated, >mostly due to the need to allow C to manipulate traced references.) But M3 >as-is uses a linkage convention that C has trouble tapping into. If you or >someone else want to work on this, let me know and I'll post or mail more info . Yes...I had thought a bit about this, but hadn't pursued it lately. Would this not present a delema to someone who wanted to, say, write an operating system in Modula-3, and be able to run exsisting code on top of it? ----- K.J. Seefried III ken.seefried@bridge.bst.bls.com ken@seefried.atlanta.com, http://seefried.atlanta.com ======================================================================= 60 === Date: Wed, 24 May 1995 20:44:49 GMT From: shang@corp.mot.com (David L. Shang) Subject: Re: generics mechanism Transframe offers a much more powerful generic class. Suppose we have a super class: class Sequence < type EleT: any >; A subclass stack can be: class Stack is Sequence; where Stack inherites the class parameter EleT. Or, class Stack < type StackEleT: any > is Sequence ; where Stack has its own class parameter which is used to substitute the class parameter of a Sequence. Or, you can have: class Stack is Sequence < type EleT: Scalar >; where class parameter Elet is refined to Scalar; Or, class Stack is Sequence ; where class parameter is bound to integer; Or, class Stack < type Elet: any > declare elements: Sequence ; ... end; where inheritance is not used: Stack is not a subclass of Sequence; Or, class FixedStack is Sequence , Array ; where multiple inheritance is used. FixedStack is a subclass of both a Sequence and a Array; Or, class Collection is super Sequence , Array, Queue; where Collection is superclass of Sequence, Array, and Queue. Here new class is not a subclass, instead, a superclass. Besides all of the above flexible structures, Transframe's generic class offers more: 1. A generic class is a real class. You can consider the subclass relationship between generic classes. Therefore, the following is possible: col: ^Collection; ... col := new Sequence; ... col := new Array; ... when (typeof(col).EleT=float) do col^.put (2.34) end; No other language can support the above code, because Coolection is generic class, which is not a real class in other languages and cannot be used to specify a variable. 2. A class can be derived at run time, which offers dynamic typing. A simple example is dynamic array: arr: ^Array := new Array; where the size of the array is obtained from a user's input at run-time. Another example: obj: ^any := GetObject(); col := new Sequence < typeof(obj^) >; where the element type of Sequence is obtained at run-time. Generic classes are static syntax expansion feature in other languages. They do not supprt dynamic typing. 3. Type dependency. Suppose we have a matrix class which is parameterized by rows and columns: class Matrix declare elements: float[rows][columns]; ... end; We wnat to define a Matrix multiplication. By Transframe, we can define the dependency: function infix"*" [ type M1: Matrix; type M2: Matrix ] ( m1: M1; m2: M2 ): Matrix; with this interface, compiler can check whether the two matrixes for a multiplication are in correct size. No other languages can describe such dependency and take the advantage of static type checking. David Shang ======================================================================= 61 === Date: 23 May 1995 13:57:45 GMT From: s_berger@cellar.rz.uni-ulm.de (Holger 'hobel' Berger) Subject: src-m3 for Linux Hi I'm lloking for a compiled version of src-m3 for LINUX. I'm looking for the native Version with the gcc-backend. It's a bit difficult for me to transport those very large src-distribs and to comiple them on my permanent filled harddisk ;) I would be happy to find a FTP-site in germany thanx ! -- ^ ^ "hobel", Holger Berger, University of Ulm, Germany (+ +) student of Computer Science ( V ) e-mail: holger.berger@student.uni-ulm.de internet ( _ ) S=berger;G=holger;OU=student;P=uni-ulm;A=d400;C=de X.400 -"-"- <, Holger 'hobel' Berger wrote: >Hi > >I'm lloking for a compiled version of src-m3 for LINUX. >I'm looking for the native Version with the gcc-backend. > >It's a bit difficult for me to transport those very large >src-distribs and to comiple them on my permanent filled >harddisk ;) > >I would be happy to find a FTP-site in germany Michel Dagenais has one (ELF, I believe) on ftp://vlsi.polymtl.ca/, and I maintain a COFF version under http://www.cl.cam.ac.uk/m3doc/linux (I'm afraid we don't have anonymous ftp access). [snip] Richard. -- `The past tempts us; the present confuses us; the future frightens us - and our lives slip away moment by moment - lost in that vast, terrible inbetween' (Babylon 5) The University of Cambridge can't have these opinions even if it wants them. ======================================================================= 63 === Date: Wed, 24 May 1995 16:16:05 GMT From: joel@bris.ac.uk (Joel Crisp) Subject: Re: Obliq ?? Larry Rau (larryrau@aol.com) wrote: : Is Obliq the Modula-3 derived "scripting language" (or embedded language, : or whatever you want to call it?). Where can I find more information on : it. : I need to develop some kind of scripting language to allow a person to : write tests for a communications network. The idea is to be able to : simulate users conversing with various backend "hosts" (in a nutshell). You probably want a package called 'expect', which is a TCL extension. Obliq is overkill for what you want, and expect has been used for several similar tasks already. [ BTW, I do like obliq, but it is not the right tool for the job ] : I've been "thinking" about what the language should do and look like and : was basing it on Modula-3, etc, Is this something Obliq may be able to : solve? : I want a small easy to use/learn language that I can tailor for our needs. : It does not need to have the kitchen sink. : .......................larry Joel ---- Joel.Crisp@bris.ac.uk ======================================================================= 64 === Date: Wed, 24 May 1995 20:44:49 GMT From: shang@corp.mot.com (David L. Shang) Subject: Re: generics mechanism Transframe offers a much more powerful generic class. Suppose we have a super class: class Sequence < type EleT: any >; A subclass stack can be: class Stack is Sequence; where Stack inherites the class parameter EleT. Or, class Stack < type StackEleT: any > is Sequence ; where Stack has its own class parameter which is used to substitute the class parameter of a Sequence. Or, you can have: class Stack is Sequence < type EleT: Scalar >; where class parameter Elet is refined to Scalar; Or, class Stack is Sequence ; where class parameter is bound to integer; Or, class Stack < type Elet: any > declare elements: Sequence ; ... end; where inheritance is not used: Stack is not a subclass of Sequence; Or, class FixedStack is Sequence , Array ; where multiple inheritance is used. FixedStack is a subclass of both a Sequence and a Array; Or, class Collection is super Sequence , Array, Queue; where Collection is superclass of Sequence, Array, and Queue. Here new class is not a subclass, instead, a superclass. Besides all of the above flexible structures, Transframe's generic class offers more: 1. A generic class is a real class. You can consider the subclass relationship between generic classes. Therefore, the following is possible: col: ^Collection; ... col := new Sequence; ... col := new Array; ... when (typeof(col).EleT=float) do col^.put (2.34) end; No other language can support the above code, because Coolection is generic class, which is not a real class in other languages and cannot be used to specify a variable. 2. A class can be derived at run time, which offers dynamic typing. A simple example is dynamic array: arr: ^Array := new Array; where the size of the array is obtained from a user's input at run-time. Another example: obj: ^any := GetObject(); col := new Sequence < typeof(obj^) >; where the element type of Sequence is obtained at run-time. Generic classes are static syntax expansion feature in other languages. They do not supprt dynamic typing. 3. Type dependency. Suppose we have a matrix class which is parameterized by rows and columns: class Matrix declare elements: float[rows][columns]; ... end; We wnat to define a Matrix multiplication. By Transframe, we can define the dependency: function infix"*" [ type M1: Matrix; type M2: Matrix ] ( m1: M1; m2: M2 ): Matrix; with this interface, compiler can check whether the two matrixes for a multiplication are in correct size. No other languages can describe such dependency and take the advantage of static type checking. David Shang ======================================================================= 65 === Date: 24 May 1995 16:52:19 GMT From: ken.seefried@bridge.bls.bst.com (K.J. Seefried III) Subject: Re: Modula-3 and mixed language kernel coding ----- Thank you all for taking the time to answer. Perhaps I should have confined the domain of the problem a bit. I suppose I really should have asked, how can I build a minimum Modula-3 run time that makes sense for the Linux environment. Obviously, things such as threads are right out. GC would likely be difficult, though not impossible; I could likely live without it. From: Sam Kendall >You'll also have to solve the problem of getting C to call M3. This problem i s >much, much easier if C only has to call the untraced subset. (At a previous >job I designed a general C-calling-M3 package; it was fearsomely complicated, >mostly due to the need to allow C to manipulate traced references.) But M3 >as-is uses a linkage convention that C has trouble tapping into. If you or >someone else want to work on this, let me know and I'll post or mail more info . Yes...I had thought a bit about this, but hadn't pursued it lately. Would this not present a delema to someone who wanted to, say, write an operating system in Modula-3, and be able to run exsisting code on top of it? ----- K.J. Seefried III ken.seefried@bridge.bst.bls.com ken@seefried.atlanta.com, http://seefried.atlanta.com ======================================================================= 66 === Date: 25 May 1995 09:12:30 GMT From: rrw1000@cus.cam.ac.uk (Richard Watts) Subject: Re: src-m3 for Linux In article <3pspkp$ru4@waage.rz.uni-ulm.de>, Holger 'hobel' Berger wrote: >Hi > >I'm lloking for a compiled version of src-m3 for LINUX. >I'm looking for the native Version with the gcc-backend. > >It's a bit difficult for me to transport those very large >src-distribs and to comiple them on my permanent filled >harddisk ;) > >I would be happy to find a FTP-site in germany Michel Dagenais has one (ELF, I believe) on ftp://vlsi.polymtl.ca/, and I maintain a COFF version under http://www.cl.cam.ac.uk/m3doc/linux (I'm afraid we don't have anonymous ftp access). [snip] Richard. -- `The past tempts us; the present confuses us; the future frightens us - and our lives slip away moment by moment - lost in that vast, terrible inbetween' (Babylon 5) The University of Cambridge can't have these opinions even if it wants them. ======================================================================= 67 === Date: 24 May 1995 12:47:50 GMT From: pbm1001@cam.ac.uk (Paul Menage) Subject: Re: Language Definition (constructors) In article <9505170825.AA02142@inet-gw-1.pa.dec.com>, rudy@cs.rug.nl writes: > >Example >======= > >Assume the declarations: > >TYPE complex = RECORD > Re,Im: REAL; > END; > refComplex = REF complex; > >In the old situation the declaration of an initialized pointer is rather >troublesome. > >VAR y:refComplex; > >BEGIN > y:=NEW(refComplex); > y^:=complex{1.0,2.0}; >END; What's wrong with: VAR y:=NEW(refComplex,Re:=1.0,Im:=2.0); ? > >This can now be replaced by > >VAR y:=refComplex{1.0,2.0}; Paul -- Paul Menage Magdalene College, Cambridge pbm1001@cam.ac.uk 'One of its satellites, a green and insignificant planet, is now dead' ======================================================================= 68 === Date: 24 May 95 16:33:16 GMT From: omalley@jasmin.ICS.UCI.EDU ("T. Owen O'Malley") Subject: Abstract syntax tree The old distribution of modula-3 had an abstract syntax tree package. Is that package still available for the current version of the compiler? Is the syntax tree generated by the compiler savable? Owen O'Malley Department of ICS | omalley@ics.uci.edu (ARPA) UC Irvine | http://www.ics.uci.edu/~omalley/ (WWW) Irvine, CA 92717 | ucbvax!ucivax!omalley (UUCP) ======================================================================= 69 === Date: 23 May 1995 13:57:45 GMT From: s_berger@cellar.rz.uni-ulm.de (Holger 'hobel' Berger) Subject: src-m3 for Linux Hi I'm lloking for a compiled version of src-m3 for LINUX. I'm looking for the native Version with the gcc-backend. It's a bit difficult for me to transport those very large src-distribs and to comiple them on my permanent filled harddisk ;) I would be happy to find a FTP-site in germany thanx ! -- ^ ^ "hobel", Holger Berger, University of Ulm, Germany (+ +) student of Computer Science ( V ) e-mail: holger.berger@student.uni-ulm.de internet ( _ ) S=berger;G=holger;OU=student;P=uni-ulm;A=d400;C=de X.400 -"-"- < <3pvo83$qsf@atglab10.atglab.bls.com>Cc: m3@src.dec.com In-Reply-To: <3pvo83$qsf@atglab10.atglab.bls.com> Distribution: world X-Received: from suneast.East.Sun.COM by East.Sun.COM (5.x/SMI-5.3) X-Received: by src-mail.pa.dec.com; id AA11369; Thu, 25 May 95 18:10:34 -0700 X-Newsgroups: comp.lang.modula3 X-Received: from cloyd.East.Sun.COM by suneast.East.Sun.COM (5.0/SMI-4.1-900117 ) X-Received: from Sun.COM by inet-gw-2.pa.dec.com (5.65/24Feb95) X-Received: by cloyd.East.Sun.COM (5.x/SMI-SVR4) X-Received: from East.Sun.COM (eastmail1.East.Sun.COM) by Sun.COM (sun-barr.Sun .COM) X-Received: by src-news.pa.dec.com; id AA13981; Thu, 25 May 95 18:10:35 -0700 K. J. Seefried, III writes: > ----- > > Thank you all for taking the time to answer. Perhaps I should have confined > the domain of the problem a bit. I suppose I really should have asked, how > can I build a minimum Modula-3 run time that makes sense for the Linux > environment. Obviously, things such as threads are right out. GC would lik ely > be difficult, though not impossible; I could likely live without it. > Ah, given that definition, then things become easier. You wouldn't need to give up GC entirely, but you would need to life with the non-incremental stop© collector. Thread would be out the window, unless you wanted to map them on to Linux kernel processes. The hard issue is getting the type information initiali zed. This gets done early on in the startup of an M3 process; you'd have to ensure t hat it gets done at the appropriate point in the kernel. > From: Sam Kendall > >You'll also have to solve the problem of getting C to call M3. This proble m is > >much, much easier if C only has to call the untraced subset. (At a previou s > >job I designed a general C-calling-M3 package; it was fearsomely complicate d, > >mostly due to the need to allow C to manipulate traced references.) But M3 > >as-is uses a linkage convention that C has trouble tapping into. If you or > >someone else want to work on this, let me know and I'll post or mail more i nfo. > > Yes...I had thought a bit about this, but hadn't pursued it lately. > > Would this not present a delema to someone who wanted to, say, write an > operating system in Modula-3, and be able to run exsisting code on top of > it? Depending on how the OS was constructed, it may not. If it is constructed in the traditional manner where OS services are accessed by traps, then it is perfectly feasible to run existing code on top of it as the application and the OS are effectively in two different address spaces. If you were writing a singl e- address space OS (say for a 64 bit architecture) then things might take more effort. Brian Bershad at University of Washington has an extensible OS kernel written (and running) in Modula-3. > > ----- > > K.J. Seefried III > ken.seefried@bridge.bst.bls.com > ken@seefried.atlanta.com, http://seefried.atlanta.com > --geoff Geoff Wyant Geoff.Wyant@east.sun.com Sun Microsystems Laboratories, Inc. 2 Elizabeth Drive Chelmsford, Ma. 01824 ======================================================================= 71 === Date: Fri, 26 May 1995 07:50:45 -0400 From: gwyant@cloyd.East.Sun.COM (Geoffrey Wyant - Sun Microsystems Labs BOS) Subject: Abstract syntax tree From: omalley@jasmin.ICS.UCI.EDU ("T. Owen O'Malley") Newsgroups: comp.lang.modula3 Reply-To: omalley@ics.uci.edu Date: 24 May 95 16:33:16 GMT The old distribution of modula-3 had an abstract syntax tree package. Is that package still available for the current version of the compiler? Is the syntax tree generated by the compiler savable? Owen O'Malley Department of ICS | omalley@ics.uci.edu (ARPA) UC Irvine | http://www.ics.uci.edu/~omalley/ (WWW) Irvine, CA 92717 | ucbvax!ucivax!omalley (UUCP) It is still available, it is the 'm3tk' package. In fact tools such as 'stubgen ' and 'stablegen' are implemented on top of it. The AST generated by M3TK can be pick led out to disk. The AST pickling package takes some pains to minimize the size of the pickles. I've poked around in the AST toolkit (m3tk) quite a bit. If you need any help, I might be able to answer questions. --geoff Geoff Wyant Geoff.Wyant@east.sun.com Sun Microsystems Laboratories, Inc. 2 Elizabeth Drive Chelmsford, Ma. 01824 ======================================================================= 72 === Date: 26 May 1995 07:27:31 GMT From: bscott@europa.com (Benjamin J. Scott) Subject: Linux and 'dll' question I have downloaded the dource for m3 3.5.2 and can't get the core libraries to compile. The README file mentions patching something called 'dll-tool' but doesn't say how. It also doesn't say what the thing does. So, my question is: where does one get the source for 'dll' and how is it patched. Also, what is it's purpose. I can find nothing about it anywhere (I have looked)! Also, the install.html at gatekeeper seems to be missing. I have GCC version 2.6.3 installed. Any help will be much appreciated. Thanx. \ It's always something! / bscott@europa.com | -Gilda Radner | A Suppressive Person | | PGP on request | Linux Now | And Proud Of It! ======================================================================= 73 === Date: 26 May 1995 14:02:13 +0200 From: kubla@goofy.zdv.Uni-Mainz.DE (Dominik Kubla) Subject: Re: Linux and 'dll' question In article <3q3vt3$bj5@atheria.europa.com> bscott@europa.com (Benjamin J. Scott ) writes: I have downloaded the dource for m3 3.5.2 and can't get the core libraries to compile. The README file mentions patching something called 'dll-tool' but doesn't say how. It also doesn't say what the thing does. To patch any sources, use the patch(1) utility. The dll-tools are linux-spcific tools to create Dynamic Linked Libraries, the old a.out shared-libs. SInce we are now moving to the ELF format you will not need them any longer. If your libc version is 4.x.y with x<8, then you are still using A.OUT libraries. If your libc version is >4.8.0, the actual release is 5.0.9, the you are using ELF libraries. So, my question is: where does one get the source for 'dll' and how is it patched. Also, what is it's purpose. I can find nothing about it anywhere (I have looked)! Also, the install.html at gatekeeper seems to be missing. I have GCC version 2.6.3 installed. You can find the dll-tools as well as the latest public releases of libc, gcc, ld.so and binutils at sunsite: sunsite.unc.edu:/pub/Linux/GCC/ I would recommend that you first read the release notes and the paper titled 'move_to_elf' before downloading any files. Any help will be much appreciated. Thanx. Your welcome. Dominik -- eMail: Dominik.Kubla@Uni-Mainz.DE sMail: Dominik Kubla, Lannerstrasse 53, D-55270 Ober-Olm, European Union PGP key: http://www.uni-mainz.de/~kubla/pgp.asc WLAF W3-site: http://www.uni-mainz.de/~kubla/WLAF/Welcome.html ======================================================================= 74 === Date: Fri, 26 May 95 09:57:53 GMT From: pda1@ukc.ac.uk (P.D.Austin) Subject: EXCEPTIONS / Initialising Open Dynamic arrays Hi, a couple of quick questions. Does anyone know of a way using exceptions to test to see whether the program is trying to access an element outside the bounds of an array. I tried the following code and it did not work. Is it possible? VAR intArray = ARRAY [1..10] OF INTEGER; TRY FOR i := 1 TO 11 DO intArray[i] := i; END; EXCEPT ELSE END; The other thing I would like to know is, is it possible to set the contents of a dynamic open array to a particular value (after creating with NEW). I know that you can initialise a normal array using, intArray := ARRAY [1..10] OF INTEGER{0,..}; is there anyway I can do this with an array which has the definition TYPE MyArray = ARRAY OF INTEGER; VAR intArray = MyArray; intArray:=NEW(MyArray, 10); (* initilise bit in here *) If you know the answers to these questions I would appriciate it. Paul Austin Computer Science undergraduate University Of Kent England ======================================================================= 75 === Date: 28 May 1995 10:31:08 GMT From: torki@file01.mpfpi-muenchen.mpg.de (Torsten R. Kirschner) Subject: Re: src-m3 for Linux Holger 'hobel' Berger (s_berger@cellar.rz.uni-ulm.de) wrote: :> I'm lloking for a compiled version of src-m3 for LINUX. :> I'm looking for the native Version with the gcc-backend. :> It's a bit difficult for me to transport those very large :> src-distribs and to comiple them on my permanent filled :> harddisk ;) :> I would be happy to find a FTP-site in germany Hi, as far as the SRC source destribution is concerned, the closest FTP mirror of gatekeeper.dec.com to Ulm in Germany might be ftp.informatik.tu-muenchen.de or ftp.leo.org/pub/comp/programming/languages/Modula-3. WWW access to the archive is http:/www.leo.org/archiv/start.html, I think. Yours T. -- Torsten R. Kirschner (EDV) Kirschner@mpipf-muenchen.mpg.de MPI f. Psychologische Forschung tel: ++49 89 38602258 Leopoldstr. 24 fax: ++49 89 342473 80802 Muenchen, Germany X.400: no longer available [PGP 2.3A 35AABD 1993/12/15 Torsten R. Kirschner ] ======================================================================= 76 === Date: 28 May 1995 18:28:36 GMT From: Ian T Zimmerman Subject: Re: Modula-3 and mixed language kernel coding In article <3pnrgl$hnt@umbc8.umbc.edu>, R. D. Davis wrote: >In article <3pd4lp$ki2@atglab10.atglab.bls.com>, >K.J. Seefried III wrote: > >>I am interested in the possibility of using Modula-3 to code parts of >>a Linux kernel. Assuming an ELF format Linux kernel, what exactly >>would be required to integrate a bit of Modula-3 code (say, a device >>driver) into the kernel? Hmmm. I am not sure this is such a great idea. I don't want to start a language religious war, but the point is, if you want your code to be a part of the official Linux kernel tree, that would force people to install a Modula-3 compiler if they wanted to compile their own kernels. Now I sincerely wanted to try SRC Modula 3 on my Linux box, but I had to give up the idea because of the system resources it reqires (disk space primarily). So based on the (limited) evidence of this site, there are more people who build their kernels than people who can afford SRC. -- Ian T Zimmerman +-------------------------------------------+ P.O. Box 13445 I With so many executioners available, I Berkeley, California 94712 I suicide is a really foolish thing to do. I USA +-------------------------------------------+ ======================================================================= 77 === Date: Mon, 29 May 1995 8:37:44 METDST From: rudy@cs.rug.nl Subject: Re: Language Definition (constructors) Reaction on the suggestion of Paul Menage: >> >>Example >>======= >> >>Assume the declarations: >> >>TYPE complex = RECORD >> Re,Im: REAL; >> END; >> refComplex = REF complex; >> >>In the old situation the declaration of an initialized pointer is rather >>troublesome. >> >>VAR y:refComplex; >> >>BEGIN >> y:=NEW(refComplex); >> y^:=complex{1.0,2.0}; >>END; > >What's wrong with: > >VAR y:=NEW(refComplex,Re:=1.0,Im:=2.0); > The problem is that "NEW" with more than one argument is not defined for referent types other than objects. So only the following construction is allowed: TYPE objComplex = OBJECT Re,Im: REAL; END; VAR y:=NEW(objComplex,Re:=1.0,Im:=2.0); The construction you suggest is illegal with the present langage definition. The construction I suggest for a modified language definition is: VAR y:=refComplex{1.0,2.0}; This construction has as advantages: 1) it is a short construction (syntactic sugar) and 2) it hides the structure of "refComplex" You benefit from point 2) in case of generics. The same generic implementation can be used for handling datastructures of the types "Complex" and "refComplex". If you address a field of a reference to a record, no explicit dereferencing operator ("^") is needed. You can use the assignment y.Re := 1.0; for "y" of type "Complex" or "refComplex". Besides the automatic dereferencing I want to introduce an automatic allocation in case of constructors. The construction with "NEW" which you suggest, can never be used in generics where the difference between normal and pointer types is hidden. As a result, you need some pre-processing to change all occurrences of "Complex{...}" into "NEW(refComplex,...)". I believe that generics are introduced in the language definition to avoid pre-processing; the usage of generics is in fact a form of pre-processing. Rudy Moddemeijer ======================================================================= 78 === Date: Mon, 29 May 95 10:46:36 -0700 From: heydon@pa.dec.com Subject: Re: Language Definition (constructors) Rudy Moddemeijer writes: > The problem is that "NEW" with more than one argument is not defined for > referent types other than objects. Actually, the language definition says (on page 53 of SPwM3): If "T" is an object type or a reference to a record, the "NEW" operation has the form: ^^^^^^^^^^^^^^^^^^^^^^^^^^ NEW(T, Bindings) where "Bindings" is a list of keyword bindings used to initialize the new fields. Positional bindings are not allowed. So, the following code is in fact legal: TYPE Complex = RECORD re, im: REAL END; VAR c := NEW(REF Complex, re := 1.0, im := 2.0); The primary motivation for the original proposal was to make it possible for generic modules to allow argument interfaces that defined either reference or non-reference types: > This proposed modification becomes essential in combination with > generics. > > GENERIC MODULE Vector(V); > VAR v:=V.T{0.0,0.0,0.0}; > BEGIN END Vector; I don't find this argument very compelling. Although Modula-3 provides some syntactic sugar for hiding the distinction between reference and non-reference types (for example, "r.field" is allowed instead of "r^.field" even if "r" is a reference to a record), the distinction is not hidden completely. So it seems doubtful that many useful generic modules could be defined that were truly ``ref blind''. One solution to the problem alluded to in this example is to simply require the interface "V" to define a procedure that returns a zero vector: GENERIC MODULE Vector(V); (* Where "V.T" is the vector type, and "V.Zero" returns a new all-zero vector. *) VAR zero := V.Zero(); BEGIN END Vector. - Allan -------------------------------------------------------------------- Allan Heydon Digital Equipment Corporation heydon@pa.dec.com Systems Research Center (415) 853-2142 130 Lytton Avenue (415) 853-2104 (FAX) Palo Alto, CA 94301 ======================================================================= 79 === Date: 29 May 1995 17:17:17 GMT From: "David J. Orme" Subject: Re: Educational M3 html Web pbh@cs.sunysb.edu (Peter B. Henderson) wrote: > Would appreciate it if someone could point me to the posting, or send > a copy to me. We mirror it here at Columbia University. The easiest way to get it via the web... http://www.cs.columbia.edu/graphics/modula3/tutorial/.index.html I'm not sure of the original address from which we originally obtained our copy and am not in the lab to look. Hope this helps! Dave Orme Columbia University ======================================================================= 80 === Date: Mon, 29 May 1995 17:17:26 GMT From: hgeorge@eskimo.com (Harry George) Subject: M3 on WinNT -- Hello World? Is there a sample "Hello, World" package for WinNT? I have coded up the HELLOWIN sample from Petzold's Progromamming Windows, and it complies to exe. It comes up briefly with a window, then dies. Presumably I don't have everything in place. E.g., what is needed in the m3makefile to do rc? Is a .def file needed, and if so, what is in it? I'd appreciate pointers to sample code. Background: I have M3 3.5.2 working on WinNT for a couple of commandline apps ported from SunOS. Now I'd like to try GUI apps, using Win32, opengl, dialogs, etc. I didn't see anything in Modula-3 www home page. Did I miss a link? I have MS Visual C++ 2.0, and have looked at the makefiles for those samples, but I don't see the transition from C++ to Modula-3. [Of course, it could be that the samples are in the 3.5.2 release. In which case I'd appreciate a clue as to where. Scanning the tar tvf hasn't turned up a likely candidate.] -- -------------------- Harry George email: hgeorge@eskimo.com smail: 22608 90th Ave W / Edmonds WA 98026 quote: ======================================================================= 81 === Date: 30 May 1995 15:52:05 GMT From: kalsow@src.dec.com (Bill Kalsow) Subject: Re: M3 on WinNT -- Hello World? In article , hgeorge@eskimo.com (Harry George) writes: > Is there a sample "Hello, World" package for WinNT? I have coded up the > HELLOWIN sample from Petzold's Progromamming Windows, and it complies > to exe. It comes up briefly with a window, then dies. Presumably I > don't have everything in place. E.g., what is needed in the m3makefile > to do rc? Is a .def file needed, and if so, what is in it? > > I'd appreciate pointers to sample code. The only non-trivial example of Windows GUI code in the Modula-3 release is SIL, a simple drawing program. Its m3makefile includes some quake code to compile resources. See m3/sil/* in m3.tar.gz. - Bill Kalsow ======================================================================= 82 === Date: Mon, 29 May 1995 18:09:28 GMT From: bwbecker@dragon.uwaterloo.ca (Byron Weber Becker) Subject: Help with WWW documentation of M3 sources This is really a WWW question, but it arises from M3 documentation, so... We have copied the WWW documentation source to a local machine to ease the network traffic. 1. When I view that copy using Netscape 1.0 under XWindows, it is displayed just fine. 2. If I view that copy using Netscape 1.1 from a Mac, all the HTML markup codes are displayed. Looks ugly; not usable. 3. If I view the documentation at http://www.research.digital.com/SRC/m3sources/html/INDEX.html using Nescape 1.1 for the Mac it looks just fine. I'm mystified by these differences. Any pointers? Byron -- Byron Weber Becker Voice: (519)888-4567 x4661 Lecturer/Advisor Fax: (519)885-1208 Department of Computer Science e-mail:bwbecker@dragon.uwaterloo.ca University of Waterloo Waterloo, ONT N2L 3G1 CANADA ======================================================================= 83 === Date: 29 May 1995 15:24:39 GMT From: pbh@cs.sunysb.edu (Peter B. Henderson) Subject: Educational M3 html Web Earlier this year there was a posting regarding information on Modula-3 web pages for a course/class, posted by Stephen Schaub I believe. I can't seem to find it in the comp.lang.modula3 archives. Would appreciate it if someone could point me to the posting, or send a copy to me. Thanks -- Peter B. Henderson pbh@sbcs.sunysb.edu Department of Computer Science, SUNY at Stony Brook Stony Brook, N.Y. 11794-4400 ======================================================================= 84 === Date: Tue, 30 May 1995 09:57:25 -0500 From: douglm@rpi.edu (Mike Douglass) Subject: Re: Modula-3 and mixed language kernel coding > ... that would force people to >install a Modula-3 compiler if they wanted to compile their own >kernels. > >Now I sincerely wanted to try SRC Modula 3 on my Linux box, but I had >to give up the idea because of the system resources it reqires (disk >space primarily)... Building new releases of m3 is a problem even for those of us in an institutional environment. I have found that to reliably install it I had better have in the region of 200M or over. For some time now I've wondered whether it wouldn't be possible to distribute m3 as binaries. It seems to me that the only reason for rebuilding it is to embed various paths in a few components. Would it be possible to modify m3 and friends so that an such information could be extracted from a configuration file at runtime? That way, installation of m3 might become a matter of shipping files, unpacking and editing a file. To deal with the problem of those with limited space, a distribution of binaries only, with none of the sources would result presumably in a requirement of <20M disk. ======================================================================= 85 === Date: 30 May 95 13:50:15 From: dagenais@gutrune.vlsi.polymtl.ca (Michel Dagenais) Subject: Re: Help with WWW documentation of M3 sources 2. If I view that copy using Netscape 1.1 from a Mac, all the HTML markup codes are displayed. Looks ugly; not usable. It thinks that it is ascii. Usually the type is inferred from the file name extension (beware of .html truncated to .htm which on some machines will be accepted but on others not) or from information sent by the server. -- Prof. Michel Dagenais http://www.vlsi.polymtl.ca/dagenais/home/home.html Dept of EE and Computer Eng. dagenais@vlsi.polymtl.ca Ecole Polytechnique de Montreal tel: (514) 340-4029 ======================================================================= 86 === Date: 30 May 95 16:40:04 From: nayeri@gte.com (Farshad Nayeri) Subject: Re: M3 on WinNT -- Hello World? In article hgeorge@eskimo.com (Harry George) writes: Is there a sample "Hello, World" package for WinNT? I have coded up the HELLOWIN sample from Petzold's Progromamming Windows, and it complies to exe. It comes up briefly with a window, then dies. Presumably I don't have everything in place. E.g., what is needed in the m3makefile to do rc? Is a .def file needed, and if so, what is in it? Harry, I don't know about a "Hello World" program for NT, but there is "sil" which is a text editor for Windows. It includes a resource file and a way of getting to "rc" in the m3makefile. I don't know what package it is under, but here is one way to get it: ftp.vlsi.polymtl.edu:/lude/modula3-3.5.1/src/orig.2/m3/sil (The ftp server does automatic tar'ing, which is very handy.) -- Farshad -- Farshad Nayeri nayeri@gte.com ======================================================================= 87 === Date: Wed, 31 May 95 13:50:41 -0400 From: nayeri@gte.com (Farshad Nayeri) Subject: Re: m3build question: how to iterate thru sources in a package > An alternative is to define new versions of interface, module, ... > that do what you want: > > proc doc_interface(x) is > interface(x) make_doc(x & ".i3") > end > proc doc_implementation(x) is > implementation(x) make_doc(x &".m3") > end > proc doc_module(x) is > doc_interface(x) doc_implementation(x) > end > ... > That's true: this will work well and it will be straight-forward to do. However, What I would ultimately like to see is a way of "hooking into" calls such as "interface", "implementation" to supply additional semantics (like what to do about the documentation). I tend to think of "interface(x)" or "module(x)" more like a declarative statement that says "I have an interface or a module in my package" within an m3build "language". Perhaps I should change the way I think about m3build. -- Farshad ======================================================================= 88 === Date: Wed, 31 May 95 09:24:22 -0700 From: kalsow@pa.dec.com Subject: Re: m3build question: how to iterate thru sources in a package I don't know of anything short of "install_sources" that will do what you want. An alternative is to define new versions of interface, module, ... that do what you want: proc doc_interface(x) is interface(x) make_doc(x & ".i3") end proc doc_implementation(x) is implementation(x) make_doc(x &".m3") end proc doc_module(x) is doc_interface(x) doc_implementation(x) end ... - Bill ======================================================================= 89 === Date: Wed, 31 May 95 10:13:42 -0400 From: nayeri@gte.com (Farshad Nayeri) Subject: m3build question: how to iterate thru sources in a package I would like to quickly generate a TeX or FrameMaker typeset document from sources in a package. Is there a quick quake/m3build script that can be written to do this? I noticed that I can do something like install_sources in COMMON m3build script, but I wonder if there is a simpler way. I know that m3totex creates a Makefile but for various reasons, I'd like to do it via m3build. Also, I know there is various .M3??? files of which I can extract this information, but I was hoping that there is a more straigh-forward way of doing this. For example, is there an m3build variable that holds the name of all interfaces and modules in a package? Thanks, -- Farshad -- Farshad Nayeri nayeri@gte.com ``Obviously, in each of these cases design decisions have been made, but unfortunately they were wrong.'' --Victor Papanek, Design for the Real World ======================================================================= 90 === Date: Wed, 31 May 1995 12:29:17 GMT From: bwbecker@dragon.uwaterloo.ca (Byron Weber Becker) Subject: Re: Help with WWW documentation of M3 sources In article , dagenais@gutrune.vlsi.polymtl.ca (Michel Dagenais) wrote: > 2. If I view that copy using Netscape 1.1 from a Mac, all > the HTML markup codes are displayed. Looks ugly; not > usable. > > It thinks that it is ascii. Usually the type is inferred from the file > name extension (beware of .html truncated to .htm which on some machines > will be accepted but on others not) or from information sent by the > server. So what do I do about it? Any why doesn't it treat the same files coming from the DEC server as ASCII? What's the DEC server doing that ours isn't? What's the X version of Netscape doing that the Mac version isn't? Byron -- Byron Weber Becker Voice: (519)888-4567 x4661 Lecturer/Advisor Fax: (519)885-1208 Department of Computer Science e-mail:bwbecker@dragon.uwaterloo.ca University of Waterloo Waterloo, ONT N2L 3G1 CANADA ======================================================================= 91 === Date: 31 May 1995 14:34:35 GMT From: hudson@cs.umass.edu (Rick Hudson) Subject: Re: Help with WWW documentation of M3 sources I looked into a similar problem a few weeks ago and their seems to be a bug in some versions of Netscape tickled when you have a trailing / on your URL. - Rick -- Richard L. Hudson - Hudson@cs.umass.edu; (413) 545-1220; Advanced Languages Project - University Computing Services Lederle Graduate Research Center University of Massachusetts Amherst, MA 01003 ======================================================================= 92 === Date: 31 May 95 09:02:23 From: dagenais@notung.vlsi.polymtl.ca (Michel Dagenais) Subject: Re: Modula-3 and mixed language kernel coding Building new releases of m3 is a problem even for those of us in an institutional environment. I have found that to reliably install it I had better have in the region of 200M or over. Things may have improved since packages are built and cleaned one after another instead of building everything and then cleaning. In any case 200MB costs about 100$, slightly more expensive than a book. For some time now I've wondered whether it wouldn't be possible to distribute m3 as binaries. ... To deal with the problem of those with limited space, a distribution of binaries only, with none of the sources would result presumably in a requirement of <20M disk. As mentioned in the FAQ, I have been offering for some time binaries for LINUX, LINUXELF, SPARC, HPPA, FreeBSD, NeXT on ftp.vlsi.polymtl.ca in pub/m3. -- Prof. Michel Dagenais http://www.vlsi.polymtl.ca/dagenais/home/home.html Dept of EE and Computer Eng. dagenais@vlsi.polymtl.ca Ecole Polytechnique de Montreal tel: (514) 340-4029 ======================================================================= 93 === Date: 31 May 1995 17:39:33 GMT From: norman@flaubert.bellcore.com (Norman Ramsey) Subject: Re: Help with WWW documentation of M3 sources In article , Byron Weber Becker wrote: >So what do I do about it? Any why doesn't it treat the same >files coming from the DEC server as ASCII? What's the DEC >server doing that ours isn't? What's the X version of Netscape >doing that the Mac version isn't? Sounds like a server problem. Suggest you telnet directly to the server (port 80 is standard for http), type GET absolute-pathname, and check the Content-Type of what comes back. If it's text/plain instead of text/html, there's your answer. Norman P.S. I had a similar problem once with .i3 and .m3 files that were read as ASCII despite being HTML. I couldn't figure out how to fix the server. http servers are too damn complicated.