HDTenEightyP/NetNews huggingface dataset:
From: jgm@cs.brown.edu (Jonathan Monsarrat)
Subject: Re: perl and Post Script
Organization: Brown University Department of Computer Science
Date: Mon, 23 Nov 1992 13:09:15 GMT

> Could someone suggest a script which converts Post Script files into
> simple ASCII format, stripping the formatting characters and the
> brackets?

Doubtless some Perl God can write this with one line of /%$\/#Q$%#3'!/.
Here's it is with 23!  :)

Let me know if you want a PS->ASCII converter that retains positional
information. I have one written in PostScript. In general, because
ASCII "A" does not always print "A" on the printer (in some weirdo
fonts like Symbol), translating to ASCII from strings perfectly is not
possible. Some programs like TeX deliberately replace the double-quote
character with a non-ASCII font encoding, etc, etc.

Handling the string  (foo\))  properly is left as an exercise to the reader.

-Jon
%! Jon Monsarrat   jgm@cs.brown.edu   Brown University %! Obfuscated PostScript
0 0 moveto 15 setlinewidth(qlllll-??LHHL??llH?hH7t,7olCAHH@)1 setlinejoin{dup
10 mul rotate 80 lt{50 0 rlineto}{50 0 rmoveto}ifelse}forall stroke showpage

------------------------------ cut here ----------------------------
#! /usr/local/bin/perl -P
########################################################
# ps2ascii: look through a PostScript file for ASCII strings
#
# Usage:
#     ps2ascii <inputfile.ps>
#
########################################################

$out = "";
while(<>)
{
  $line = $_;
  while($line =~/\((.*)\)(.*)/) {
       $line = $2;
       if(length($out)+length($1) > 76) {
         print "$out\n";
         $out="";
       }
       $out=$out." ".$1;
  }
}
print "$out\n";
Newsgroups: comp.lang.perl
From: mcook@fendahl.dev.cdx.mot.com (Michael Cook)
Subject: Re: Non blocking open of FIFO: Can it be done in perl?
Keywords: O_NDELAY in open on a FIFO
Organization: Motorola Codex, Canton, Massachusetts
Distribution: usa
Date: Wed, 18 Nov 1992 15:30:24 GMT

bmarlowe@ka.reg.uci.edu (Brett Marlowe) writes:

>is the there a way to specify O_NDELAY on an open call?

No, but you can tweak the filehandle afterwards.  See fcntl.

Michael.
Newsgroups: comp.lang.perl
From: snorman@den.mmc.com ( Stephen P. Norman )
Subject: Programming Perl: Pages 55-56?
Keywords: perl, question
Reply-To: snorman@den.mmc.com
Organization: Martin Marietta Astronautics Group
Distribution: usa
Date: Thu, 19 Nov 1992 23:26:06 GMT

I have just bought Programming Perl, First edition, March 1992 printing.
On pages 55 to 56, (Chapter 1, Recursion) there is an example program on 
building and descending an associative array (Job and his decendants). 
I have carefully replicated this program on-line and it does not seem to 
work for me:

1) The routine 'do_a_begat': how does this routine dereference $parent{$name},
   which appears to be local to the routine 'load_kids'?

2) My version does not print out any results, as $parent{$name} is null
   in the routine 'do_a_begat'.

   So I tried the following:

   a) changed $parent{$name} in 'load_kids' to $tree{$name}
   b) changed $parent{$name} in 'do_a_begat' to $tree{$name}

   I now seem to get some results that make sense.
 
3) Am I missing something, or does this example really not work as written?

4) Are the example programs in this book on-line anywhere?


Thanx for any tips - I am new to perl...

Steve Norman
Martin Marietta Astronautics Group
PO Box 179
Denver CO 80201

Newsgroups: comp.lang.clos
From: peterson@sra.COM (Eric Peterson x7644)
Subject: Extending syntax/semantics of method specializers
Organization: The Ohio State University Department of Computer and Information Science
Date: Sat, 21 Nov 1992 04:25:35 GMT

>>>>> On Fri, 20 Nov 1992 22:12:51 GMT, charest@Aig.Jpl.Nasa.Gov (Len
Charest) said:
Proposal: I propose the following additions to the MOP (as described in AMOP). 
If the processing of DEFMETHOD (as described on p 149-150 in AMOP) were 
revised to include use of these functions then I'd have a portable way of 
writing satisfies-specializers.

SPECIALIZER-OBJECT (specializer-name)                       [Generic Function]
  This generic function returns the specializer object associated with
specializer-name. 
SPECIALIZER-OBJECT ((specializer-name symbol)                         [Method]
  This method calls (FIND-CLASS specializer-name).
SPECIALIZER-OBJECT ((specializer-name list))                          [Method]
  This method calls (TYPE-SPECIALIZER-OBJECT (CAR specializer-name) (CDR
specializer-name)). The value returned by TYPE-SPECIALIZER-OBJECT is the value
returned by this function.

TYPE-SPECIALIZER-OBJECT (type-specifier subsidiary-info)    [Generic Function]
  This generic function returns the specializer object associated with the
given type-specifier and its subsidiary-info.
TYPE-SPECIALIZER-OBJECT ((type-specifier (eql 'eql)) subsidiary-info  [Method]
  This method calls (INTERN-EQL-SPECIALIZER (CAR subsidiary-info)).
TYPE-SPECIALIZER-OBJECT ((type-specifier (eql 'satisfies))            [Method]
                         subsidiary-info)
  This method computes the satisfies-specializer object associated with the 
given subsidiary-info.
<<<<<<<<<[end of cite]


Hi Len;

   I think you've hit on a good area in which specialization could be
beefed up.  One thought occurred to me when wishing for more
specialization power of this sort a while back:

   Since the EQL specializer has its roots in the EQL type specifier,
why not allow specialization using any type specifier such as MEMBER,
OR, (INTEGER 5 10), etc.  EQL would become just one of many type
checking specializers which would conceivably even share the same
specializer metaobject.  This specializer might be named something
like TYPE-SPECIFIER-SPECIALIZER and would replace and subsume
EQL-SPECIALIZER.

   The implementation would simply call
(TYPEP <gen-fun-arg> <type-specifier>) during generic dispatch.  This
approach would eliminate the need for the TYPE-SPECIALIZER-OBJECT
generic function.

   Any further thoughts?  Perhaps I'm unaware of reasons for allowing
EQL-SPECIALIZER to be its own metaobject or any number of other things
;^>.


                                   Eric Peterson (speaking for myself)
                                   Systems Research and Applications
                                   2000 15th Street North
                                   Arlington, VA 22201
                                   USA
                                   peterson@sra.com
                                   (703) 558-7644
                                   Fax:  (703) 558-4723

Newsgroups: comp.lang.clos
From: rburnard@rburnard.isx.com (Robert Burnard)
Subject: please remove me
Organization: The Ohio State University Department of Computer and Information Science
Date: Mon, 23 Nov 1992 16:02:10 GMT

Please remove me from the bb.

Thank you,

Robert H. Burnard             (818)706-2020                 
ISX Corporation               (818)706-2056     (FAX)        
4353 Park Terrace Dr.         rburnard@isx.com  (internet)  
Westlake Village, CA 91361    ISX.TECH          (AppleLInk) 
-----------------------------------------------------------

Newsgroups: comp.lang.clos
From: charest@Aig.Jpl.Nasa.Gov (Len Charest)
Subject: Re: Extending syntax/semantics of method specializers
Reply-To: charest@aig.jpl.nasa.gov
Organization: NASA/Jet Propulsion Laboratory
Date: Mon, 23 Nov 1992 19:21:33 GMT

In article <1992Nov23.113551@disun47.epfl.ch>, matomira@disun47.epfl.ch (Fernando Mato Mira) writes:

|> The current implemention of CLOS does not allow for the creation of generic
|> classes, that is, classes where slot types are determined by type parameters.
|> Under the current implementation, this inhibits the creation of type 
|> specifiers in the style of "(list integer)" for user-defined classes.
[  generic classes proposal deleted]

Generic classes would go a long way towards extending the expressiveness of
DEFMETHOD. However, they would not cover all of the discrimination strategies I
mentioned in my original post--especially the one I find most attractive: method
selection based on the *value* of a variable. To wit:

(defun interesting-value-p (x)
  (eq x *interesting-value*))

(defmethod observe ((thing (satisfies interesting-value-p)))
  ...)
..................................................
                                  Len Charest, Jr.
                 JPL Artificial Intelligence Group
                          charest@aig.jpl.nasa.gov
From: matomira@disuns2.epfl.ch (Fernando Mato Mira)
Newsgroups: comp.lang.clos,comp.lang.lisp,comp.lang.eiffel
Subject: Type declarations and generic classes in CLOS - HOW??
Summary: Here we go again...
Date: 16 Nov 92 17:25:18 GMT
Reply-To: matomira@disuns2.epfl.ch (Fernando Mato Mira)
Followup-To: comp.lang.clos
Organization: Ecole Polytechnique Federale de Lausanne

Let's say you have a class:
(defclass foo () ((x :accessor x :type number)))


and you would like to be able to do something like:
(proclaim (type (foo integer) an-instance))


so a smart LISP compiler can avoid type checking when you write:
(proclaim (type integer n))
(setf n (x an-instance))

How would you go about? It seems that generic classes (and the general issue of
type declarations - see article "Declaring types by association in CLOS")
have been overlooked in the design of CLOS.

I am trying to do VR, so every declaration counts.

I remember a paper by Luca Cardelli on an implementation of ML with a
higher-order type system. Shouldn't LISP have something like that to
stay at the cutting edge?

-- 
Fernando D. Mato Mira
Computer Graphics Lab			   "I must admit it, I have learned
Swiss Federal Institute of Technology	        some things from Eiffel"
matomira@di.epfl.ch

NeXTMail : matomira@lignext.epfl.ch
FAX 	 : +41 (21) 693 - 5328
Newsgroups: comp.lang.clos
From: konstan@saturn.cs.umn.edu (Joe Konstan)
Subject: Re: Extending syntax/semantics of method specializers
Organization: Department of Computer Science, University of Minnesota
Date: Mon, 23 Nov 1992 23:10:03 GMT

In article <1992Nov23.192133.10895@jpl-devvax.jpl.nasa.gov>, charest@Aig.Jpl.Nasa.Gov (Len Charest) writes:
|> Generic classes would go a long way towards extending the expressiveness of
|> DEFMETHOD. However, they would not cover all of the discrimination strategies
|> I mentioned in my original post--especially the one I find most attractive: 
|> method selection based on the *value* of a variable. To wit:
|> 
|> (defun interesting-value-p (x)
|>   (eq x *interesting-value*))
|> 
|> (defmethod observe ((thing (satisfies interesting-value-p)))
|>   ...)

Am I missing something here, or is this exactly what "eql" method specializers
are for?  Namely:

	(defmethod observer ((thing (eql *interesting-value*)))
          ...)

In fact, these can be combined nicely with macros for slot-value methods:

	(defmacro observer (object)
          `(real-observer (a-slot object) object))

        (defmethod real-observer ((sval (eql *interesting*)) (object itsclass))
         ...)

Now, I can see that extending this to an arbitrary predicate would be useful
(as has already been suggested), but I also see how easily this would
explode into a performance nightmare.  

Joe Konstan
konstan@cs.umn.edu

[for examples of using slot-value methods, and related constructs, see
 "Developing a GUIDE using object-oriented programming" in OOPSLA '91]
From: pl2440@meibm31.cen.uiuc.edu (Paul Jay Lucas)
Newsgroups: comp.lang.c++
Subject: Re: Simple question: class objects & pointers
Date: 17 Nov 92 00:07:02 GMT
Article-I.D.: news.Bxu2zr.F1q
Distribution: usa
Organization: University of Illinois at Urbana

In <1992Nov16.162130.11475@cis.ohio-state.edu> beery@clipper.cis.ohio-state.edu (brian david beery) writes:

>I am new to C++, and have a question regarding pointers and class objects:
>The following code:
>class cl_object
>{public:
>  int value;
>}
>generic_function(cl_object *o)
>{
>  *o.value=0;
>}; 

	o->value = 0;	// shorthand for: (*o).value = 0;

	Look at the precedence of * and . (dot).  If you don't have
	one, I'd suggest a good C++ book.

	BTW, public data are considered bad by some people.
-- 
	- Paul J. Lucas				University of Illinois	
	  AT&T Bell Laboratories		at Urbana-Champaign
	  Naperville, IL			pjl@cs.uiuc.edu
Newsgroups: comp.lang.c++,comp.lang.c,comp.os.msdos.programmer,comp.windows.ms.programmer,ct
From: marty@vaneyck.portal.com (Marty Harris)
Subject: Re: Poll : Microsoft support on the Internet
Keywords: Microsoft Support
Organization: JP Getty AHIP
Date: Mon, 16 Nov 92 16:29:55 GMT

Yes! Yes! Please and thank-you. 
More soup Please.
From: bohdan.kiszczuk@rose.com (bohdan kiszczuk)
Newsgroups: comp.lang.c++
Subject: comp.lang.c++
Date: 16 Nov 92 15:27:44 GMT
Organization: Rose Media Inc, Toronto, Ontario.
X-Gated-By: Usenet <==> RoseMail Gateway (v1.70)


Date Entered: 11-16-92 10:26

H(> 
H(> rog@hpscit.sc.hp.com (Roger Haaheim) writes:
H(> : In comp.lang.c++, maxtal@extro.ucc.su.OZ.AU (John MAX Skaller) writes:
H(> : 
H(> : >         It might be appropriate to have a comp.newuser.c++
H(> :                                           ^^^^^^^^^^^^^^^^
H(> : 

    I strongly disagree. This discussion has taken place in the past 
in rec.music.synth and, I'm sure, elsewhere. The idea was quickly 
squashed in rec.music.synth. 
    The purpose of comp.lang.c++, as I see it, is for the public 
discussion of C++. I frequent this group because I am not a C++ 
expert. If I was I wouldn't be here, I'd be busy doing other things, 
like making money. If I need advice I know that someone far more 
skilled in C++ may assist me. In a "comp.newuser.c++" you'll only get 
the blind leading the blind. It serves no purpose and would quickly be 
abandoned.
    Let's end this discussion now and get on with it.
---
   RoseReader 1.70 R001028: ======== bohdan.kiszczuk@rose.com ===========
   RM 2.00 : RoseNet<=>Usenet Gateway : Rose Media 416-733-2285
Newsgroups: comp.lang.c++
From: mccauleyba@vax1.bham.ac.uk (Brian McCauley)
Subject: Re: operator overloading
Date: Fri, 20 Nov 1992 19:18:32 GMT
Organization: University of Birmingham

In article <1ehr3gINNopf@gap.caltech.edu>, iotov@ccsf.caltech.edu (Mihail Iotov) writes:
> I am trying to overload some operators this way
> set&   set::operator= (const set& s) ;
> set  set::operator* (const set& s)  {
>   set   product ;
>   [do something]
>   return product ;        /* this line is 88 */
> }
> and I get form g++ :
> 
> set.cxx: In method class set set::operator * (const class set &):
> set.cxx:88: warning: bitwise copy: `set' defines operator=()
> 
> Shouldn't the assignment method be called for the return operation ?
>
No, it should call the copy constructor. (Wow what an impressive warning to
tell you that you have a self-assignment operator but not a copy ctor.
Congrats GNU :-) :-) )

The assignment operator is only called by assignment, ie when an _existing_
object has it's value changed. When the object does not already exist 
then it is the copy-ctor that is called.

The copy ctor is needed whenever an object is passed or returned by value.
This is because the object may get moved in memory as a result of the 
change of scope. The copy ctor tells the complier what book keeping is
required to move the object. (The old object is destroyed immediately
after creating the new one.)
(Actually strictly speaking I think it _may_ be needed - the compiler is
encouraged to omit the call if it can manage it. I think in some really
strange situations it may need to call it more than once. 
(Someone please correct me if I'm wrong.))

So given;

  set a,b,c;
  a=b*c; 

The temporary `set' object that is the argument to set::operator(const set&)
is created by calling set::set(const set&). If set::set(const set&) does
not exist then a bitwise copy is used by default but this is not usually
safe for a class with a self-assignment operator.
 
> 
> Thanks, 
> 	Mihail
-- 
    \\   ( )    No Bullshit!     |  Email: B.A.McCauley@bham.ac.uk   
 .  _\\__[oo        from         |  Voice: +44 21 471 3789 (home)
.__/  \\ /\@    /~)  /~[   /\/[  |    Fax: +44 21 625 2175 (work)
.  l___\\      /~~) /~~[  /   [  |  Snail: 197 Harborne Lane,
 # ll  l\\    ~~~~ ~   ~ ~    ~  |         Birmingham, B29 6SS, UK
###LL  LL\\   (Brian McCauley)   |   ICBM: 52.5N 1.9W
Newsgroups: comp.lang.c++
From: chw@bellcore.com (Charlie Woloszynski,MRE 2J-278,8295228,,27143)
Subject: FTP sources for public domain  template code for Array handling
Reply-To: chw@bellcore.com
Organization: Bellcore
Date: Mon, 16 Nov 92 20:19:33 GMT

Can anyone help me find an anonymous FTP site which has some Array template
code?  Please respond directly to chw@bellcore.com and if enough answers
are gathered, I'll post back to the group.

Thanks,

Charlie Woloszynski
Bellcore
chw@bellcore.com



Newsgroups: comp.lang.c++
From: pl2440@meibm31.cen.uiuc.edu (Paul Jay Lucas)
Subject: Re: How to run destructors of all objects when failure exit occurs ?
Organization: University of Illinois at Urbana
Date: Mon, 16 Nov 1992 02:42:50 GMT

In <AAAsb0h8xN@inpbox.inp.nsk.su> dolgov@inpbox.inp.nsk.su (Yuri V. Dolgov) writes:

>   Often I use failure program exit when some conditions are bad.
>The trouble is: I created some objects (e.g. dialog boxes, network connections
>and so on) and I want to run destructors before program exit.
>Is there exist standard technique in C++ language to solve this problem ?

	No; only statically-allocated objects are destroyed.  Off the
	top of my head, *a* way to have auto-objects destroyed would be
	to make them register themselves with some global list of
	objects on construction and deregister themselves on
	destruction.  Now, when the global "clean-up" object gets
	destroyed, it could destroy all objects that are still
	registered.

	Actually, they can't be auto objects, but must instead be
	dynamically-allocated objects; it is illegal to delete anything
	not allocated by new (as auto objects aren't).
-- 
	- Paul J. Lucas				University of Illinois	
	  AT&T Bell Laboratories		at Urbana-Champaign
	  Naperville, IL			pjl@cs.uiuc.edu
From: isc@panix.com (David Koosis)
Newsgroups: comp.lang.c++
Subject: Re: New Employee Test
Date: 23 Nov 92 20:14:52 GMT
Organization: PANIX Public Access Unix, NYC

In <1992Nov22.134339@IASTATE.EDU> kv07@IASTATE.EDU (Warren Vonroeschlaub) writes:

>In article <1992Nov22.010912.10552@en.ecn.purdue.edu>,
>krauskop@en.ecn.purdue.edu (Curtis D Krauskopf) writes:
>>(Warren Vonroeschlaub) writes:
>>>  I thought I would mention that, at least it in New York, it is 
>>>  illegal to give
>>>a test to prospective employees before hiring them.

I'm not a lawyer, but...

I once wrote a word-processing skills test that is used at a major company
for pre-employment screening.  My understanding is that

a) you can only test things that are clearly job-relevent

b) you must measure the skills of the job candidate against
   the skills of your current employees who are performing the same job


if a job candidate performs as well on a tech test as current employees
who perform the same job, that's good enough.  In the case of the WP
skills test i mentioned, I had to perform a statistically valid  survey
of all the existing employees in the relevent job category we were testing.
The test scores were weighted against the performance of the current 
employee base.

What to do if one wishes to _improve_ the existing skill level?
(train your employees!)

What to do if the technology is new to the hiring company?
(dunno)

:wq

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Instructional Systems Company
Technical Training & Consulting Since 1973
(212) 477-8800
From: robc@rocket.sanders.lockheed.com (Rob Costantino)
Newsgroups: comp.lang.c++
Subject: g++ debugger?
Date: 23 Nov 92 17:45:03 GMT
Distribution: comp.lang.c++
Organization: Lockheed Sanders, Inc.

What do g++ users use for debuggers?

I have been developing code in C on a Sparc using gnus gcc for the
compiler and CodeCenter (CenterLine) for a debugger.  I am starting to
use c++, so naturally when to gnu g++.  I found that the object files
are not compatible with ObjectCenter (CenterLine) due to the different
name mangling schemes.  So, what do g++ users use for debuggers?

Rob Costantino		phone: 603/885-7414
			email: robc@rocket.sanders.com

Newsgroups: comp.lang.c++,comp.std.c++
From: pl2440@meibm31.cen.uiuc.edu (Paul Jay Lucas)
Subject: Re: Proposal - enhancement for switch statement.
Organization: University of Illinois at Urbana
Date: Mon, 16 Nov 1992 23:51:07 GMT

In <1992Nov16.213015.1@vax1.bham.ac.uk> mccauleyba@vax1.bham.ac.uk (Brian McCauley) writes:

>Now (as promised) why ranges would be unnecessary (following the "if you
>can do it with a class then don't extend the language" rule ;-) )

>template <class T> class Range {
>  T top,bottom; 
>public:
>  Range(t,b) : top(t),bottom(b) {} 
>  int operator==(T t) { return bottom <= t && top >= t; }
>}
>template <class T> inline operator == (T& t,Range<T>& r) {return r == t;}

>switch (i) {
>  case Range<char>('0','9') : case '-' : {/*...*/} break;
>}

*****>	Both cfront 3.0.1 and I think the above is illegal.
-- 
	- Paul J. Lucas				University of Illinois	
	  AT&T Bell Laboratories		at Urbana-Champaign
	  Naperville, IL			pjl@cs.uiuc.edu
From: philbo@arasta.UUCP (Phillip Lindsay)
Newsgroups: comp.lang.c++
Subject: Re: New Employee Test
Keywords: interview
Date: Sun, 22 Nov 92 23:24:04 PST
Distribution: world
Organization: Phillip Lindsay, Tustin CA

hartman@ulogic.UUCP (Richard M. Hartman) writes:

> A portfolio, by it's very nature, shows the candidate only
> at his/her best.
> 
> A "pop quiz" is a better measure of what they are capable of
> under "real world" conditions.
> 
> Although a portfolio might be a nice supplement.
> 
> 
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> But now I'm grasping			|
> that understanding			|	-Richard Hartman	
> is only part of love.			|	hartman@uLogic.COM

All of these don't give you a "good measure" of real world ability. In 
fact, I have worked at four companies that used tests and some sort of
portfolios to evaluate candidates...In each company individuals were 
hired who did not perform.  From experience I have found that social
interaction and verbal communication skills to be very important.  With
out these skills an individual cannot function well in a team environment.
I have also found references to be not too reliable...No one likes to hinder
a former employee's chances at employment (even when former management is
bitter!).

I feel that once you are confident of a candidates technical ability; you 
should focus on their social/communications skills.  One of the most 
effective ways of testing this is to place candidates in a room with their
future co-developers and enable an informal question and answer session.
If your developers like the individual than hire otherwise don't.

--
Phillip Lindsay "Government for the Politicians."
INTERNET: 75230,300@compuserve.com ** UUCP: uunet!zardox!dhw68k!arasta!philbo
Phone: 714-385-2311 ** USMAIL: 2955 Champion Way, #175, Tustin, Ca. 92680
Newsgroups: comp.lang.c++
From: pete@borland.com (Pete Becker)
Subject: Re: Borland address or phone number????
Originator: pete@genghis.borland.com
Organization: Borland International
Date: Mon, 16 Nov 1992 21:39:37 GMT

In article <1135@kommu.UUCP> xklaus@kommu.UUCP (Hr Klaus Neuberger) writes:
>Hello
>
>Can anybody out there give me the address or a phone nubmer of Borland in USA???
>
>Thanks in advance
>
>xklaus

	(408) 438-8400.