HDTenEightyP/NetNews huggingface dataset:
From: fn00@gte.com (Farshad Nayeri)
Newsgroups: comp.lang.modula3
Subject: Re: debugger?
Date: 26 Jan 93 19:41:54 GMT
Organization: GTE Laboratories, Waltham, Massachusetts, USA
In-reply-to: marc@ecrc.de's message of 26 Jan 93 14:13:36 GMT

In article <1993Jan26.141336.13273@ecrc.de> marc@ecrc.de (Marc Bourgois) 
  writes:

   with the release come tools like replayheap and showthread.  From their
   names I suppose they are debugging tools, is there any doc on how to
   use them?  Are they graphical?

   Any info on how you debug multithreaded m3 programs is useful -- thanks

If you've installed the tools distribution, you can get man pages on
showthread(1) and showheap(1) for some information.

I would say that they are "somewhat" graphical. They don't have much
of a GUI, but they do show the information about your running program
graphically.  The "showheap" tool may be great, for example, if you
have a lot (10+) of threads running and you want to see if any of them
is blocking. I have never used "showthread" and "showheap" for
debugging myself, but they are great for showing off to other people
(the average programmer-types get pretty amazed when you show them
that you have 20 threads running in a little program.  ;-)

A neat experiment to try is to run a VBT-intensive modula-3 program
and use showthread to show all the threads running.

Try displaying the tools on color screens. It is kind of hard to
figure out things on black and white screens.

I use gdb for debugging multi-threaded programs. It is not great (you
can't switch from one thread to another), but it works. In case you
missed it, there is a little section about debugging in the SRC
Modula-3 documentation.

I remember hearing people talk about a multi-threaded Modula-3
debugger this past summer. Anyone has any "vaporware" info to report?

--farshad

--
Farshad Nayeri                Intelligent Database Systems
fn00@gte.com                  Computer and Intelligent Systems Laboratory
(617)466-2473                 GTE Laboratories, Waltham, MA

  "To see is to forget the name of the thing one sees." -- Paul Valery
Newsgroups: comp.lang.modula3
From: mjordan@src.dec.com (Mick Jordan)
Subject: m3tk update (missing chartool doc)
Organization: DEC Systems Research Center
Date: Mon, 25 Jan 93 22:16:43 GMT

Regrettably I had omitted to include the advertised "doc" subdirectory
in the CHAR analysis tool. I have now updated the archive to include it,
plus a couple of late breaking bug fixes.  The updated files alone
can be acquired by getting the update archive "m3tk-2.11.tar.p2.Z".

Mick Jordan
From: dagenais@vlsi (Michel Dagenais)
Newsgroups: comp.lang.modula3
Subject: Re: debugger?
Date: 27 Jan 93 14:59:24 GMT
Organization: Ecole Polytechnique


>>      Any info on how you debug multithreaded m3 programs is useful -- thanks
...
>   I remember hearing people talk about a multi-threaded Modula-3
>   debugger this past summer. Anyone has any "vaporware" info to report?

The goodies i remember from last summer were:

- Zeus/mentor
- native compiler
- Modula 3 aware debugger with thread support
- network objects
- incremental garbage collector

Zeus/Mentor and the incremental collector are there. The weakref are
somewhat a bonus although they are strongly related to network objects
which are probably close to ready (they are mentioned in the weakref
interface). Let see when the compiler/debugger appear... probably in a few
months. I suppose it is better not to ask because these things are usually
ready when they are ready. Moreover, DEC SRC has done an excellent job of
sparing us from buggy releases. Admittedly though it is more difficult to
write buggy programs in Modula 3 :-).

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

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

---------------------------------------------------------------------
Newsgroups: comp.lang.modula3
From: pbh@sbcs.sunysb.edu (Peter B. Henderson)
Subject: Courses using Modula-3
Organization: SUNY at Stony Brook
Distribution: na
Date: Thu, 28 Jan 1993 15:33:11 GMT

I would be interested in hearing from anyone who has experience using
Modula-3 for instructional purposes.  This semester I plan to use Modula-3
for our CS-II (Data Structures and Algorithms) course on a network of
Hewlet-Packard workstations.  Am using "Modula-3" by Harbison, and
we have Modula-3 installed/running, currently with minimal library
support and tools.  My first experience using Modula-3 for teaching.

Specifically I am seeking helpful hints, features/tools you have found
useful for instruction, and material for students (brief user manuals or
guidelines, useful scripts, examples, sample assignments, etc.).  Anything
you wish to share, including ideas for improving instruction using 
Modula-3 which we may be able to work on as a group.

Thank you.

Peter B. Henderson
spbh@sbcs.sunysb.edu

Dept of Computer Science
SUNY at Stony Brook
Stony Brook, N.Y.  11794
516 - 632 - 8463
From: fn00@gte.com (Farshad Nayeri)
Newsgroups: comp.lang.modula3
Subject: Re: references, objects & m3
Date: 25 Jan 93 23:22:49 GMT
	<MOSS.93Jan24164146@CRAFTY.cs.cmu.edu>
	<C1E30F.vx@undergrad.math.waterloo.edu>
	<FN00.93Jan25085601@tahoe.gte.com> <24699@alice.att.com>
Organization: GTE Laboratories, Waltham, Massachusetts, USA
In-reply-to: ark@alice.att.com's message of 25 Jan 93 19:35:20 GMT

In article <24699@alice.att.com> ark@alice.att.com (Andrew Koenig) writes:

   In article <FN00.93Jan25085601@tahoe.gte.com> fn00@gte.com (Farshad Nayeri) writes:

   > - Because of garbage collection, destructors are not as crucial in
   >   Modula-3 programming. (What do you usually do in a destructor in
   >   C++?)

   If C++ had garbage collection, destructors would sometimes still be
   useful.  For example, if I have an object that represents a window in
   my window system, I really do want the window to go away as soon as
   the object is no longer in use, rather than waiting around for the
   next garbage collection.  A similar argument applies to flushing the
   buffer of an I/O library structure as soon as possible.

That's why I said "not as crucial" and "usually". Much like other
things in Modula-3, I think of it as an application of 80%-20% rule.
Personally, I wouldn't mind trading in constructors and destructors in
return of a good garbage collector.

--farshad
--
Farshad Nayeri                Intelligent Database Systems
fn00@gte.com                  Computer and Intelligent Systems Laboratory
(617)466-2473                 GTE Laboratories, Waltham, MA

  "To see is to forget the name of the thing one sees." -- Paul Valery
From: fn00@gte.com (Farshad Nayeri)
Newsgroups: comp.lang.modula3
Subject: Re: What is the representation of Text?
Date: 27 Jan 93 16:59:29 GMT
	<FN00.93Jan26072103@tahoe.gte.com>
	<MOSS.93Jan26224045@CRAFTY.cs.cmu.edu>
Organization: GTE Laboratories, Waltham, Massachusetts, USA
In-reply-to: moss@cs.cmu.edu's message of 27 Jan 93 03:40:45 GMT


In article <MOSS.93Jan26224045@CRAFTY.cs.cmu.edu> moss@cs.cmu.edu (Eliot Moss) writes:

   I believe that SRC uses C-like strings (probably even null
   terminated), and I am sure that GNU Modula-3 will. However, we can
   always go to something more sophisticated, such as the Modula-2+
   implementation, which uses a tree of string fragments, which may
   tend to reduce the allocation overhead and the cost of certain
   operations.

Eliot's comment brought up some questions in my mind. I have always
been assuming that Texts in Modula-3 are not null-terminated (you can
certainly insert '\000' in the middle of a "TEXT" without a problem.

Looking at the libm3 source, I can see that "Text"s _are_
null-terminated, but I can't find any part of the code that _uses_ the
null-termination (instead, a combination of memcpy and NUMBER is used).

So, _why_ are "Text"s null-terminated?

I can think of two possiblities: 

a) it makes debugging easier in a c-oriented debugger.
b) some of the lower layers of the code (like the compiler) uses this
   assumption. These layers are hidden from the user, so the user
   never needs to worry about the null characters.  [I assume that
   libm3 code for "Text" is not really the code that the compiler
   executes, and "Text"s are probably embedded in the compiler.]

Unfortunately I don't have the source release, so I can't examine the
source for the compiler.

--farshad
--
Farshad Nayeri                Intelligent Database Systems
fn00@gte.com                  Computer and Intelligent Systems Laboratory
(617)466-2473                 GTE Laboratories, Waltham, MA

  "To see is to forget the name of the thing one sees." -- Paul Valery
Newsgroups: comp.lang.modula3
From: mgrice@athena.mit.edu (Matthew Grice)
Subject: Modula 3 with OS/2 API
Organization: Massachusetts Institute of Technology
Date: Wed, 27 Jan 1993 16:08:43 GMT

Programming is kind of my hobby, but I to make more of it.
I like what I see of Modula-3, and want to use it to develop
os/2 programs with the Presentation Manager interface.

I wondered if there is an M3 comiler (pref share or free) that I
could get that would support the os/2 api.

I'm not quite sure how these things work, because I am used to dealing
with much less complex operating systems when programming.

If there is a person reading this that could kind of guide me to 
a compiler or solution, could you send me mail?

One more thing.  I have the GNU emx 0.8 c/c++ development system.
Do I just need a m3->c translator?

Thanks,
Matt
From: dsims@don.ece.uc.edu (David Sims)
Newsgroups: comp.lang.modula3
Subject: Why are M3 executables so big?
Date: 27 Jan 93 01:50:08 GMT
Article-I.D.: babbage.C1Hp3L.3z7
Distribution: usa
Organization: University of Cincinnati

Why does the following hello-world program create a 400K stripped
executable on my Sparc box?  The .mo file is a mere 399 bytes, but the
executable balloons to 400K.  Are the Wr, Stdio, and other run-time
libraries really that large?

Or maybe I installed M3 wrong?

MODULE Main;

IMPORT Wr,Stdio;

BEGIN
  Wr.PutText(Stdio.stdout,"Hello, world.\n");
END Main.

-- 
David Sims                    Dept. of Electrical and Computer Engineering
david.sims@uc.edu             University of Cincinnati
(513) 556-2499                Cincinnati OH  45221-0030
RIPEM mail accepted.          USA
From: grenzelm@slate.mines.colorado.edu (RENZELMAN GREGORY DO)
Newsgroups: comp.lang.modula3
Subject: What is the representation of Text?
Date: 25 Jan 93 23:02:39 GMT
Organization: Colorado School of Mines

I am taking a computer course at the Colorado School of Mines, which is using
modula3 as the programming language.  I'm interested in how the computer
represents the data type TEXT.  Is it similar to C where there is a null
terminator?  This information would be helpful because I will have to write 
code that parses TEXT.  Thankyou for your time.

Greg Renzelman
From: moss@cs.cmu.edu (Eliot Moss)
Newsgroups: comp.lang.modula3
Subject: Re: What is the representation of Text?
Date: 27 Jan 93 03:40:45 GMT
Article-I.D.: CRAFTY.MOSS.93Jan26224045
	<FN00.93Jan26072103@tahoe.gte.com>
Reply-To: moss@cs.cmu.edu
Organization: Dept of Comp and Info Sci, Univ of Mass (Amherst)

Farshad is entirely right that the implementation is hidden so that programs
cannot bypass it and depend on it in that way. Still, it can be useful to
understand the relative costs of various operations, which tends to vary
depending on the implementation. I believe that SRC uses C-like strings
(probably even null terminated), and I am sure that GNU Modula-3 will.
However, we can always go to something more sophisticated, such as the
Modula-2+ implementation, which uses a tree of string fragments, which may
tend to reduce the allocation overhead and the cost of certain operations.

Cheers --							Eliot
--

J. Eliot B. Moss, Associate Professor	Visiting Associate Professor
Department of Computer Science		School of Computer Science
Lederle Graduate Research Center	Carnegie Mellon University
University of Massachusetts		5000 Forbes Avenue
Amherst, MA  01003			Pittsburgh, PA  15213-3891
(413) 545-4206, 545-1249 (fax)		(412) 268-6767, 681-5739 (fax)
Moss@cs.umass.edu			Moss@cs.cmu.edu
From: ark@alice.att.com (Andrew Koenig)
Newsgroups: comp.lang.modula3
Subject: Re: references, objects & m3
Date: 25 Jan 93 19:35:20 GMT
Article-I.D.: alice.24699
Reply-To: ark@alice.UUCP ()
Organization: AT&T Bell Laboratories, Murray Hill NJ

In article <FN00.93Jan25085601@tahoe.gte.com> fn00@gte.com (Farshad Nayeri) writes:

> - Because of garbage collection, destructors are not as crucial in
>   Modula-3 programming. (What do you usually do in a destructor in
>   C++?)

If C++ had garbage collection, destructors would sometimes still be
useful.  For example, if I have an object that represents a window in
my window system, I really do want the window to go away as soon as
the object is no longer in use, rather than waiting around for the
next garbage collection.  A similar argument applies to flushing the
buffer of an I/O library structure as soon as possible.
-- 
				--Andrew Koenig
				  ark@europa.att.com
Newsgroups: comp.lang.modula3
From: rhoover@watson.ibm.com (Roger Hoover)
Subject: generics that use generics
Date: Mon, 25 Jan 1993 14:28:56 GMT
Disclaimer: This posting represents the poster's views, not necessarily those of IBM
Organization: IBM T.J. Watson Research Center


I'd like to write a generic that extends another generic.  For
example, consider the generic List:

--
GENERIC INTERFACE List(El);

TYPE T <: REFANY;

PROCEDURE RemoveFirst(VAR l: T): El.T;
PROCEDURE InsertFirst(VAR l: T, x: El.T);

END List.

--
GENERIC MODULE List(El);

REVEAL
  T = BRANDED OBJECT
    el: El.T;
    next: T := NIL;
  END;

PROCEDURE RemoveFirst(VAR l: T): El.T =
VAR r: El.T;
BEGIN
  <*ASSERT l # NIL*>
  r := l.el
  l := l.next;
  RETURN r
END RemoveFirst;

PROCEDURE InsertFirst(VAR l: T, x: El.T) =
BEGIN
  l := NEW(T, el := x, next := l)
END InsertFirst;

END List.

--
I'd like to create a generic Stack that uses List:
GENERIC INTERFACE Stack(El);

TYPE T <: REFANY;

PROCEDURE Pop(VAR l: T): El.T;
PROCEDURE Push(VAR l: T, x: El.T);

END Stack.

Is there any way to write GENERIC MODULE Stack(El) using the
List.RemoveFirst procedure for Pop and ListInsertFirst for
Push?

roger
rhoover@watson.ibm.com
Newsgroups: comp.lang.modula3
From: papresco@undergrad.math.waterloo.edu (Paul Prescod)
Subject: Re: references, objects & m3
Organization: University of Waterloo
Date: Mon, 25 Jan 1993 03:00:07 GMT

In article <MOSS.93Jan24164146@CRAFTY.cs.cmu.edu> moss@cs.cmu.edu writes:
>I don't understand why you're using REF OBJECT ... END instead of just OBJECT
>... END. The latter is implementation essentially as REF RECORD ... END, but
>with the additional semantics of OBJECT method invocation, subtyping, etc. You
>should probably just delete the level of REF in your binary tree stuff. Maybe
>you want somehting like this:

Thanks for your help.  Someone else pointed out to me that objects ARE
references.

I'm not sure if I like that.  For instance, how do I copy an object?
The copy will point to the same data fields, right?  

Also is there anyway to auto-initialize/auto-destroy objects as in C++
with constructors and destructors?
From: shiji@msr.mei.co.jp
Newsgroups: comp.lang.perl
Subject: Re: How to convert string to hex?
Date: 27 Jan 93 04:31:15 GMT
Organization: Matsushita Soft-Research,Inc.,Osaka, Japan

In article <C1FnMG.AMB@ibeam.intel.com> gweil@ibeam.intel.com (Garry Weil) writes:

     $@!U(JHow do I convert "Test" to 0x54 0x65 0x73 0x74 ?

 Something like as follows ? 

#! /usr/local/bin/perl
while (<>) {
    chop;
    split(//);
    for $c (@_) {
        $c = sprintf("0x%02x", ord $c);
    }
    print "@_\n";
}


---
 Toshiaki Shiji
 Software Development Department 5
 Matsushita Soft-Research, Inc.			Email: shiji@msr.mei.co.jp
---------------------------------------------------------------------------
Newsgroups: comp.lang.perl
From: stevedav@netcom.com (Steve Davidson)
Subject: perl/ms-dos bugs
Organization: Netcom - Online Communication Services  (408 241-9760 guest) 
Date: Mon, 25 Jan 1993 03:16:29 GMT

Environment: Perl4.19 MS-DOS

I have a simple problem:
I want to list the files in my current directory.

The following programs work in Unix and fail in DOS:
print join(' ', @ARGV) ;    # Execute as: perl -n ls *.*

-- and --

while (<*.*>) {
        print ;
}

Neither worked under DOS (no MKS toolkit).  Can anyone help?

Ultimately, I'd like to write a series of Unix tools in Perl under DOS.
My first goal is to simulate 'rm -r' in DOS.
Any suggestions?

Steve Davidson   Email: steved@cfcl.com
From: matthew@sunpix.East.Sun.COM (Matthew Stier - Sun NC Development Center)
Newsgroups: comp.lang.perl
Subject: Re: Sockets on Solaris
Date: 22 Jan 1993 21:29:01 GMT
Organization: Sun Microsystems, Research Triangle Park, NC
NNTP-Posting-Host: klondike.east.sun.com

In article <C180qw.8A8@HQ.Ileaf.COM> ross@HQ.Ileaf.COM (Ross Knights) writes:
}The Berkeley IPC functions (socket(), bind(), getservbyname(), et al.)
}appear to be unavailable in Perl under Solaris, which is System V.  
}(I have Perl version 4.0, patch level 19.)
}
}However, since /usr/lib/libsocket.so on Solaris provides these 
}functions, is there a straightforward way to include them and enable 
}IPC?
}
}-- 
}Ross Knights	Interleaf, Inc.  Waltham, Mass.  (617) 290-4990
}ross@ileaf.com	

I've got no problems using sockets under Solaris 2.X.

First, upgrade your version of Perl to the latest patchlevel (4.035)

Second, Use the Solaris 2 hint while compiling.

Third, Don't hardcode arguments.  They value of SOCK_STREAM changes from 
1 to 2 between Solaris 1.x and 2.x


-- 
Matthew Lee Stier                          |
Sun Microsystems ---  RTP, NC  27709-3447  |     "Wisconsin   Escapee"
Email: matthew.stier@East.Sun.COM          |
Phone: (919) 469-8300 fax: (919) 460-8355  | 
Newsgroups: comp.lang.perl
From: huober_j@oracle.rz.uni-ulm.de (Joachim Huober)
Subject: problems using System V IPC on a sparc-10
Organization: Universitaet Ulm
Date: Tue, 26 Jan 1993 15:40:24 GMT

Hi,
I wrote the following small program to test, if the System V IPC work
on my Sparc-10. It works fine on an Ultrix4-mashine

require "ipc.ph";
require "msg.ph";

$KEY = 9876;
$PERMS = 0666;

#MAIN
        unless (defined($msgid = msgget($KEY+$i,$PERMS | &IPC_CREAT)))
        {
                print STDERR "Can't create message queue\n\$! $!";
        }
        print STDOUT "msgid = $msgid\n";
        msgsnd($msgid,pack("L a*",3,"Hallo dies ist ein Test"),0);
        $var = ' ' x 256;
        msgrcv($msgid,$var,256,3,0);
        @var = unpa        @var = unpack("L a*",$var);
        print STDOUT "var\[$var[0]\] = '$var[1]'\n";
        unless (msgctl($msgid, &IPC_RMID, 0))
        {
                print STDERR "Can't remove message queue\n\$! $!";
        }
#END

I've got the following errormessage

System V IPC is not implemented on this machine at ./xxxx line xx.

Now my Question:
Which #defines do I have to make in the file config.h, so that
perl compiles using the System V IPCs.

In the config.h file 
#define HAS_MSGCTL              /**/
#define HAS_MSGGET              /**/
#define HAS_MSGRCV              /**/
#define HAS_MSGSND              /**/
are defined

I'm using a Sparc-10 with SunOS 4.1.3
From: hdnea@usho88.hou281.chevron.com (David Neal)
Newsgroups: comp.lang.perl
Subject: multiplying text by a number
Date: 26 Jan 93 20:30:47 GMT
Organization: Chevron


In playing with sybperl, I wondered what would happen
if a string containing a sybase null (NULL) were multiplied
with a number. Not having to check each field to see if
it's NULL would save a little code...

#!/bin/perl

$a = "NULL";

$a *= 10;

print $a, "\n";


On this version of perl....
This is perl, version 4.0

$RCSfile: perl.c,v $$Revision: 4.0.1.7 $$Date: 92/06/08 14:50:39 $
Patch level: 35

Copyright (c) 1989, 1990, 1991, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 4.0 source kit.


The program generates "0D\n"



But on THIS version of perl...
This is perl, version 4.0

$RCSfile: perl.c,v $$Revision: 4.0.1.6 $$Date: 91/11/11 16:38:45 $
Patch level: 19

Copyright (c) 1989, 1990, 1991, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 4.0 source kit.


It generates "0\n" as expected.

What gives?

P.S. Neither of the above versions have the sybperl patches
applied.


-- 
David Neal -- hdnea@hou281.chevron.com 

My processes aren't dead! They're only resource impaired!
Computationally challenged!
From: mark@coombs.anu.edu.au (Mark)
Newsgroups: comp.lang.perl
Subject: Re: Perl for the Mac-Where do I find it?
Date: 26 Jan 93 15:56:55 GMT
Organization: Australian National University
NNTP-Posting-Host: 150.203.76.2
Organisation: Wassat?!

riskit@x400gate.bnr.ca (Reg Foulkes) writes:

>Okay I'm sold on perl for unix. Know I want to try it for the mac. Where 
>do I find it? Thanks.

From the file /pub/perl/misc/perl.code.sources on coombs.anu.edu.au:

----------------------------------------------------------------------------
Apple Macintosh Perl

Basically, there are two versions, both of them for Patchlevel 35 but for
different compilers:

Mac_Perl_405_{tool,appl}.sit.bin is at the following sites:

a) MPW C: nic.switch.ch, /software/mac/src/mpw_c/...
          ftp.eunet.ch,  /software/mac/perl/...
          sol.cs.ruu.nl  /PERL/mac-perl/...

b) Think C: ftp.maths.tcd.ie, /pub/Mac/...
----------------------------------------------------------------------------

Other machines in the same file.

Mark
mark@coombs.anu.edu.au
Newsgroups: comp.lang.perl
From: eric@cray.com (Eric Markwardt)
Subject: building Perl on Solaris 2.1 (again)
Organization: Cray Research, Inc.
Date: 22 Jan 93 12:54:36 CST

Sheesh.. you 'catchup' a newsgroup for a few days, miss a few articles, and
then need stuff that was recently discussed. :-(

Anyway, can someone email me the hints/library combinations/etc. needed
to build Perl 4.035 on Solaris 2.1 with Sun C 2.0.1?  I have access to
gcc 2.3.3, too, if need be.

I've managed to get it to build with Sun C, but it core dumps in fdopen() 
when it tries to run the first test.

Thanks a bunch in advance.

   -Eric
Newsgroups: comp.lang.perl
From: martinher@urvax.urich.edu
Subject: Re: Macintosh (MPW) Perl: Release 4.0.6, New Mailing List
Reply-To: martinher@urvax.urich.edu
Organization: University of Richmond
Distribution: comp
Date: Thu, 28 Jan 1993 04:22:57 GMT

Two questions please:

1) MPWPerl has a 411 info help file but I did not get any index nor
can I find an 'indexer' program on my ETO CD-ROM.  Does anyone know
how to make the index or where it can be obtained?

2) I am a serious AWK programmer of some years.  I am having a 
little difficulty getting into Perl (mostly due to time constraints)
but I have this belief that Perl is AWK only (a whole lot?) better.

Is this about right?  Will I be disappointed?  Or is this so an
incredibly naive question that impugns Perl?

Herb Martin
martinher@urvax.urich.edu



Newsgroups: comp.lang.perl