[6639] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 264 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Apr 10 00:17:17 1997

Date: Wed, 9 Apr 97 21:00:21 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Wed, 9 Apr 1997     Volume: 8 Number: 264

Today's topics:
     Re: Holy Wars! (was: Perl vs C++, Unix vx MS, etc) <davidw@efn.org>
     Re: How do you Parse a string? (Tad McClellan)
     how to use \@ in a sub prototype and body (answered!) <psrc@exmachina.com>
     Re: HTML parsing (Tad McClellan)
     Re: interpolate (David Alan Black)
     Re: Is there a problem with rindex in 5.003? (R Bradley)
     libnet-1.0502 <forster@hq.rnp.br>
     Re: Need info on Larry, Tom, Randy, etc. <seay@absyss.fr>
     Re: No GUI environment for Perl? ()
     Re: Ousterhout and Tcl lost the plot with latest paper (Donn Cave)
     Pop Up Windows on Several Platforms <bstarr@mentor.com>
     Re: Radius, a perl for your thoughts (Jeff Weisberg)
     Re: Reply to Ousterhout's reply (was Re: Ousterhout and <Smi@4mate.hr>
     Re: Reply to Ousterhout's reply (was Re: Ousterhout and (John Ousterhout)
     Re: Reply to Ousterhout's reply (was Re: Ousterhout and <erik@naggum.no>
     Re: Reply to Ousterhout's reply (was Re: Ousterhout and (Henry Baker)
     system LIST && die   NOT   system LIST || die ?? <anderson@necsys.gsfc.nasa.gov>
     Re: Unix and ease of use  (WAS: Who makes more ...) (Peter Seebach)
     Re: Who makes more $$ - Windows vs. Unix programmers? <clfranck@worldnet.att.net>
     Re: Who makes more $$ - Windows vs. Unix programmers? <jnb@thunderstorm.com>
     Re: Why are no elements returned from split(/X/,'')? (Dave Thomas)
     Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: 09 Apr 1997 12:33:45 -0700
From: David Welton <davidw@efn.org>
Subject: Re: Holy Wars! (was: Perl vs C++, Unix vx MS, etc)
Message-Id: <87bu7oj8iu.fsf@efn.org>

I saw a *great* quote somewhere here from Larry Wall, along the lines
of 'The reason the internet is what it is today is that no one has
invented a remote strangulation protocol' :-)

Anyone have the real one?

Ciao,
-- 
David Welton   
davidw@efn.org  davidw@freenet.hut.fi  http://www.efn.org/~davidw 
Se quest'email e` in Italiano, mi dispiace per gli errori:-) FORZA PANTANI!
				--Linuxista--


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

Date: Wed, 9 Apr 1997 19:52:34 -0500
From: tadmc@flash.net (Tad McClellan)
Subject: Re: How do you Parse a string?
Message-Id: <ikdhi5.30i.ln@localhost>

john.la@wrs.com wrote:
: Hi,

: I'm writing a script in perl and I need to parse out a 5 number substring
: from a large string.  I can use the function substr() but first I need to
: find out where the 5 numbers begin.  I've tried using index() but it tries
: to find an exact match to the substring and I need to find any 5 digit
: number.  Any Suggestions? Please reply!


$_ = 'john wants to find five digits (12345) somewhere in this string (67890)';

$digit5 = $1 if /(\d{5})/;

print "$digit5\n";


--
    Tad McClellan                          SGML Consulting
    Tag And Document Consulting            Perl programming
    tadmc@flash.net


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

Date: Wed, 09 Apr 1997 21:28:07 -0400
From: Paul S R Chisholm <psrc@exmachina.com>
Subject: how to use \@ in a sub prototype and body (answered!)
Message-Id: <334C4227.5FF3@exmachina.com>

Having read pp. 118-121 with great joy (I'm a recovering C++
programmer:-), I recently wondered what the *body* of a subroutine that
used a \@ prototype argument would look like. After a while, I came up
with:

sub mypush(\@@)
{
    my ($array_ref, @list);
    print "DEBUG: mypush(", join(",", @_), "\n";
    print "DEBUG: \@array=(", join(",", @{$_[0]}), ")\n";
    $array_ref = shift;
    @list = @_;  # the other arguments
    push @{$array_ref}, @list;
    print "DEBUG: \@{array_ref}=(", join(",", @{$array_ref}), ")\n";
    scalar(@{$array_ref});  # return
}

my @friends = ('Sherry', 'Mike', 'Jason');
push @friends, 'Bob', 'Darlene', 'Chris', 'Shane';
mypush @friends, 'Dusty', 'Shadow';
print join(', ', @friends), "\n";

In other words, while the "backslashed prototype character ...
represents an actual argument ... that absolutely must start with that
character", the *formal* argument is a scalar, specifically a reference
to an array for a \@ argument.

It appears the sub prototype must appear (I'm sure I'm being imprecise
here) before the invocation. That is, saying:

# ...
mypush @friends, 'Dusty', 'Shadow';
#...
sub mypush(\@@)
{
    #...
}

will lead to @friends being passed by value. However:

sub mypush(\@@);
#...
mypush @friends, 'Dusty', 'Shadow';
#...
sub mypush(\@@)
{
    #...
}

appears to be okay.
--
Paul S. R. Chisholm, AirMedia, Inc. (formerly Ex Machina)
mailto:psrc@exmachina.com  http://www.exmachina.com/~psrc
I'm not speaking for the company, I'm just speaking my mind


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

Date: Wed, 9 Apr 1997 19:49:33 -0500
From: tadmc@flash.net (Tad McClellan)
Subject: Re: HTML parsing
Message-Id: <tedhi5.30i.ln@localhost>

Ron Watkins (ron@argus.lpl.Arizona.EDU) wrote:
: I need to find a way to parse out multiple META tags from an HTML document.
: The meta tag information is stored as follows:
: <Meta Name="aaa" Content="bbb">
: and I need to generate an associative array of name=content pairs.

: So far, I have been able to read in the HTML document into a perl variable,
: $html, with the newline characters stripped out.

: Can anyone give me some hints on how I might parse these name=content pairs
: out of the HTML content?

: I have tried the following but it's not doing what I need. I just don't know
: how to proceed? 

: What am I looking for?


This? ;-)


 ------------------------------
#! /usr/bin/perl -w

$html=<<ENDHTML;
<Meta Name="Ron Watkins" Content="perl programming problem">

<META NAME = "keywords"
      CONTENT
=
      "buy stuff from me send money nothing for free"
>
ENDHTML



while ( $html =~  /<meta        # start of <META tag
                   \s*          # optional spaces allowed here
                   name         # attribute name 'name'
                   \s*          # optional spaces allowed here
                   =            # equals sign
                   \s*          # optional spaces allowed here
                   "([^"]+)"    # the value for 'name' attribute     ($1)
                   \s*          # optional spaces allowed here
                   content      # attribute name 'content'
                   \s*          # optional spaces allowed here
                   =            # equals sign
                   \s*          # optional spaces allowed here
                   "([^"]+)"    # the value for 'content' attribute  ($2)
                   [^>]*        # anything that is not an '>'
                   >            # the '>' ends this meta tag
                  /gix          # g: global i: ignore case x: allow these
                                #                             comments in regex
       ) {

   $pairs{$1} = $2;
}


foreach (sort keys %pairs) {
   print "$_ = $pairs{$_}\n";
}
 ------------------------------


: ($name,$content) = ($html =~ s/.*<Meta\s+Name="(\w+)"\s+Content="(\w*)">.*/$1 $2/g);

You want s///i  # i ignores case

You don't want \w  ( won't match: <meta name="Ron Watkins" content="stuff">
                     because space is not a word character...)

You want to allow zero or more spaces in a bunch more places


Hope this helps!


--
    Tad McClellan                          SGML Consulting
    Tag And Document Consulting            Perl programming
    tadmc@flash.net


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

Date: 9 Apr 1997 16:42:32 GMT
From: dblack@icarus.shu.edu (David Alan Black)
Subject: Re: interpolate
Message-Id: <5iggto$sf5@pirate.shu.edu>

Hello -

Greg Hassan <gwhassan@prodigy.net> writes:

>Bart Lateur wrote:
>> 
>> It would be nice if Perl had a built-in function to interpolate
>> variables in strings, on user demand, so that
>> 
>>         $orig = 'The file has $num lines.';
>>         $string = interpolate($orig);
>> 
>> would have the same effect as
>> 
>>         $string = "The file has $num lines.";
>> 

>can't you put a place holder like: $orig = 'The file has <num> lines.';

>then maybe something like so:

>sub interpolate
>{
>return s/<([^>]+)>/${$1}/g;
>}

or just replace $vars with their values:

sub interpolate {
   my $string = shift;  # You do need something like this :-)
   $string =~ s/\$([\S]+)/$$1/g;
   $string;
}

except replace the regex with something which more intelligently
distinguishes among different $ expressions which might be
in your data.

David Black
dblack@icarus.shu.edu



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

Date: 9 Apr 1997 19:51:39 GMT
From: rick@rentec.com (R Bradley)
Subject: Re: Is there a problem with rindex in 5.003?
Message-Id: <5igs0b$c9t@puma.rentec.com>

Scott Brehm (sbrehm@jaycor.com) wrote:
> I am working on a routine that needs to parse a string, and the
> appropriate way to do it is with rindex.  But I keep getting -1 (not
> found) for characters that are in the string, i.e:
> abc-1.2-3.i386.rpm       (yes, it is a RedHat linux package name)
> or
> abc-new-2.3.1-6.i386.rpm
> I need to pull off the .i386.rpm from the end, but in attempting to use
> rindex($name,".",2) I get -1 as the result.  Alpha characters don't work
> either.
> What am I doing wrong?

The position argument for the rindex function specifies "the rightmost
position that may be returned" (Camel book).  This differs significantly
from "the n'th occurence from the right".  You can march your way backwards
from the end of the string using rindex, but this is probably less 
efficient than you want.

You can also (depending upon the exact nature of your problem) do 
(amongst many other things) something like this:

$x = "abc-new-2.3.1-6.i386.rpm";
$x =~ s/^(.*)(\..*?\..*?)$/$1/;
$ending = $2;

Rick Bradley



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

Date: Tue, 8 Apr 1997 10:45:35 -0300
From: Antonio Paulo Salgado Forster <forster@hq.rnp.br>
Subject: libnet-1.0502
Message-Id: <Pine.SOL.3.95.970408103317.3127A-100000@colibri.hq.rnp.br>


Hello Gurus!

I've been having some problems installing libnet-1.0502 and would like
some help :)

I got the following error message everytime I try to run Makefile.PL:

Can't locate IO/File.pm in @INC at Makefile.PL line 70.
BEGIN failed--compilation aborted at Makefile.PL line 70.

that line is:

use IO::File;


I have looked for File.pm in all directories in @INC, but I can't find
it... Could someone give me a hint? In libnet....readme, it says nothing
about requiring some previous module, but only Perl version 5.002 or
better...
Should I install Perl again?

TIA

--
Antonio Paulo Salgado Forster  
Operacoes em Redes - RNP




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

Date: Wed, 09 Apr 1997 18:59:10 +0100
From: Douglas Seay <seay@absyss.fr>
To: Kimberly Spence <kspence@pike.modes.tc.faa.gov>
Subject: Re: Need info on Larry, Tom, Randy, etc.
Message-Id: <334BD8EE.5425@absyss.fr>

Kimberly Spence wrote:
> 
> Help -- I am writing a paper about the
> maintainers/creator of PERL. The material
> is going to be interesting/historical, not all technical.
> 
> Can anyone tell me where Larry and the gang work?
> How they began working together on PERL?
> What type of education they had?
> 
> Maybe people can even send testamonials about
> what PERL has meant to them .
> 
> Thanks!
> 
> Kim Spence

The Second Book of the Camel, Chapter 8, "History Made Practical" has
some of this for Larry.  Tom and Randall both have home pages that you
could look at.

- doug


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

Date: 9 Apr 1997 16:33:23 GMT
From: scott@lighthouse.softbase.com ()
Subject: Re: No GUI environment for Perl?
Message-Id: <5iggcj$afs$4@mainsrv.main.nc.us>

Nathan V. Patwardhan (nvp@shore.net) wrote:
: elarishy@aol.com wrote:

: : Here what I am doing NOW, running under win95 .. I go to dos then edit
: : then perl then reedit then perl then reedit .. get the picture ... can
: : you help in making it easy for me to test and debug so I can enjoy perl

: What's wrong with keeping one MS-DOS window open with your editor buffer,
: and another for your command-line, from which you will run your Perl
: programs?  :-)

Or just use Emacs and open a shell window and the source code.

Scott



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

Date: 9 Apr 1997 17:33:27 GMT
From: donn@u.washington.edu (Donn Cave)
Subject: Re: Ousterhout and Tcl lost the plot with latest paper
Message-Id: <5igjt7$o74@nntp1.u.washington.edu>

asah@CS.Berkeley.EDU (Adam Sah) writes:
 ...
| - regexps in Perl, traces in Tcl, etc. are all examples of advanced language
|   features.  In this vein, Java provides garbage collection, exceptions,
|   objects, safety, convenient concurrency primitives, etc.  I think it's
|   pretty hard to (objectively) toss Java into the "systems language" camp,
|   at least without more rigorous definitions.  A really useful chart would
|   be one that said what kinds of features are found in scripting languages.
|   For example, portability of scripts is probably very important.

a.) For me, it's not at all clear why you think those features of Java
  disqualify it from being a ``systems language''.  While the ``scripting
  languages'' have been bringing in some features from more formal
  languages, the point of that paper seemed to be that in general
  you don't need those features to script and glue.

  In a sense this only proves your point - without more rigorous
  definitions, we only end up arguing about semantics and lose the
  point (if there is one.)  I'd go farther, though:  the notion of
  using four or five computer languages (C, C++, Java, Tcl and VB)
  to define a language taxonomy of ``scripting'' vs. ``systems''
  needs rethinking.  Even among these five we start to see some
  strange bedfellows, as you point out.

b.) Portability is the last thing I'd worry about in a scripting language.
  Contrary to apparently widespread belief, ``as we approach the year
  2000'' scripting languages have been a mainstay of computing technology
  pretty much all along, but the need to port old scripts hasn't been a
  big issue.  Occasionally you will hear from people who wish they could
  port their DCL/REXX/Bourne shell/who knows what scripts, but this is
  usually a sign of their own confusion.  Scripting languages are so
  profoundly dependent on their environment - the things they're gluing -
  that it's pointless to port only the glue, you have to bring along the
  whole environment.  Time to reimplement, rather than port.

  Again, this probably goes back to confusion over what we're talking
  about.  Further drafts of this paper may help to clarify the subject
  of discussion.  A system that hopes to implement applications all by
  itself might indeed want to be portable.  If a scripting language is
  one of the components of such a system, then the language has to be
  as portable as the other components.  What's as likely to happen,
  though, is that the other components (e.g., graphics) are going to
  much harder to port with satisfactory results, and you'll get better
  results if you can replace those components with their natural equivalent
  in the destination environment.  With luck, you may have designed it so
  that major wholescale rewriting isn't necessary ... and that turns out
  to be the point of all the abstractions provided by the formal languages,
  for example, OOP:  to improve your luck in these situations.

	Donn Cave, University Computing Services, University of Washington
	donn@u.washington.edu


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

Date: Wed, 09 Apr 1997 10:45:05 -0700
From: Brian Starr <bstarr@mentor.com>
Subject: Pop Up Windows on Several Platforms
Message-Id: <334BD5A1.6237@mentor.com>

Peoples,

I'm looking at re-writing an existing program that uses pop-up menus to
alert the user to certain events.  I have heard that perl/tk can perform
this sort of thing
but I was wondering if anyone knows of an easy way to create a pop up
window in perl alone.

The program needs to be able to pop up windows with text on them (no
buttons or any of that fancy stuff needed besides a way to close the
window) on several platforms (xwindows, pcs, etc.).

If you have any suggestions please write.
Brian Starr
brian_starr@mentor.com
http://www.engr.orst.edu/~starr


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

Date: 9 Apr 1997 23:32:12 -0400
From: jaw@op.net (Jeff Weisberg)
Subject: Re: Radius, a perl for your thoughts
Message-Id: <5ihmvs$gjc@monet.op.net>
Keywords: steatocyst upthread virginia silvia nickle


abrigham@foxnet.net said:
| Got a problem parsing radius logs... script below
| 
| in other words total per day....
| does anybody have nice simple code...???
| I have something started for my totals below... its somewhat ugly but it
| works..

FWIW:
Once upon a time, I too wanted to parse radius acct data, and spew forth
nice useful summary data. Much like you, I started coding up some perl
to parse the acct log data. I got about 83% [1] of the way to completion,
when I jumped from my seat realizing "Holy doing things the hard way Net
man!" and spent the next six[2] minutes modifying my radius server to
save the data in a much simpler to deal with format (one line of space
separated fields per acct record). They are trivial to parse, use far less
disk space, and you can use standard unix utilities on them (sort, grep,
and, of course, perl).

	--jeff

[1] this number may not be exact
[2] six[1] minutes modifying the code, seventeen[1] minutes thinking
about how to modify the code, and 9[1] minutes reading news.

----------------------------------------------+-------------------------------
OpNet provides high quality, high reliability | Shell, SLIP/PPP, WWW services, 
Internet services in the Philadelphia area    | dedicated connections, custom
                                              | solutions, consulting, etc...
http://www.op.net or call us at 610-520-2880  +-------------------------------




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

Date: Wed, 09 Apr 1997 18:47:05 +0200
From: Smiljan Grmek <Smi@4mate.hr>
Subject: Re: Reply to Ousterhout's reply (was Re: Ousterhout and Tcl ...)
Message-Id: <334BC809.6EFF@4mate.hr>

Michael Sperber [Mr. Preprocessor] wrote:

> 
> Anyone who has to read and write production code in Perl or Tcl or C++
> within the same period as, say, Scheme, can testify to that.
[ie Scheme is better]
> 

*Anyone* is a fairly large concept - please go find an average
programmer without experience in Tcl and Scheme, present him/her with
appropriate manuals and have h/h read/write code ...

Even a thought experiment gives correct results (if one bears in mind
the Gaussian distribution of human attributes - necessary for the
definition of *average* programmer)

Talk to a pschologist friend about averages and you will find out where
those who meet at the Net stand. I tested a friend's contention that you
cannot talk to an IQ 100 - he was mostly right and it was a saddening
experience.

Smi


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

Date: 9 Apr 1997 17:00:42 GMT
From: ouster@tcl.eng.sun.com (John Ousterhout)
Subject: Re: Reply to Ousterhout's reply (was Re: Ousterhout and Tcl ...)
Message-Id: <5ighvq$etn@engnews2.Eng.Sun.COM>

In article <334B68EC.3F66@maths.anu.edu.au>, Graham Matthews <graham.matthews@maths.anu.edu.au> writes:
|> 
|> There is a much simpler reason why all these ugly languages about -- its
|> called intertia. There was a lot of code written in the 70s in ugly
|> languages -- written before we knew how to make good languages. All that
|> code has to be supported, interfaced to, etc, so all the ugly languges
|> it is written in are now the standard. Simple.

Sorry, but this doesn't really make sense.  For example, if "ugly languages"
refers to Tcl or Perl or C++, none of these languages even existed in the
1970s.  In contrast, various flavors of Lisp have been around since at least
the early 60's and Smalltalk first appeared in the late 60's.  Every single
programmer who ever wrote a program in Tcl, Perl, C++, Visual Basic, or even
C could have chosen Lisp, Scheme, or Smalltalk.  But they didn't.  If you
want to know the truth, I think you need to stop making superficial excuses
and ask deeper semantic questions.  There really is something better about
each of these "ugly languages" that gives them an advantage over the "good"
languages;  I'll leave it up to you to figure out what it is.


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

Date: 09 Apr 1997 17:51:52 +0000
From: Erik Naggum <erik@naggum.no>
Subject: Re: Reply to Ousterhout's reply (was Re: Ousterhout and Tcl ...)
Message-Id: <3069597112430286@naggum.no>

* Smiljan Grmek
| This can easily be verified if you look at job offerings on the Net with
| Smalltalk as keyword.

ahem.  job markets have weird and counter-intuitive dynamics.  let's say
you want to find cheap labor and the ability to fire people at will.  it
would be smart to offer the job to a lot of people, all competing with each
other to drive their asking price down.  mass marketing of jobs has very
significant benefits for employers, and almost only negative consequences
for employees.  if there are many who could take your place, you're only as
well paid as your best competitor, and you can't plan very far ahead due to
the high probability of being replaced.  assembly-line programmers are not
expected to add any significant value to the programming process, either,
just get the damn thing to work.  therefore, you need lots of them, and it
is a good idea if lots of people could take these jobs.  consequence: a
vibrant jobs market with mostly incompetent people who hire and get hired.

Smalltalk, Ada, and Lisp jobs are not advertised in the mass media.  to get
at highly qualified personnell, employers must expect them to have a good
education, be able to and want to plan fairly far ahead, and have a sense
of quality that is incompatible with today's software.  it would also be
silly to advertise such a job in the mass market for another reason: it
tells other programmers and companies that the hiring company is unable to
attract qualified programmers in niche markets.  thus, they would not get
any useful responses, as well as getting negative publicity.

consider TV ads as another example.  those who advertise on TV seek
customers who are easily manipulated by TV ads.  that's why you see a lot
of religious groups, lawyers who speak of how much money they got their
clients, and car dealers advertise amidst the toilet and hygiene articles
and the detergents.  some restaurants advertise on the TV, but invariably
those that attract mass market customers, such as burger and pizza joints
and the like.  a gourmet restaurant should _not_ advertise on TV because
that would associate them with the restaurants that do.

the mass market is largely uninteresting if you're offering or after
anything of high quality.  this applies to jobs, too.

| Seriously, languages must be designed for average, garden variety of
| programmers, not CS graduates.

you forgot to state the primary requirement of those languages this applies
to: that you want to advertise the language itself in the mass media and
likewise with programmer positions, and that you want to pay chicken feed
to those you hire.  if you have somewhat higher aspirations, you design a
language so that average, garden variety programmers don't understand it,
or won't flock to it.

| US DOD stated that conversion to parallel processing is not advisable
| because only 1/3 of their programmers could program in appropriate
| languages.

precisely.  note the converse: if you would like to retain the best third
of your programmers, convert to parallel processing.

those who argue for quantity over quality have yet to demonstrate that the
lower prices carry smaller costs in terms of reduced quality than it saves.

#\Erik
-- 
I'm no longer young enough to know everything.


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

Date: Wed, 9 Apr 1997 20:53:29 GMT
From: hbaker@netcom.com (Henry Baker)
Subject: Re: Reply to Ousterhout's reply (was Re: Ousterhout and Tcl ...)
Message-Id: <hbaker-0904971253290001@10.0.2.1>

In article <5ighvq$etn@engnews2.Eng.Sun.COM>, ouster@tcl.eng.sun.com (John
Ousterhout) wrote:

> Sorry, but this doesn't really make sense.  For example, if "ugly languages"
> refers to Tcl or Perl or C++, none of these languages even existed in the
> 1970s.  In contrast, various flavors of Lisp have been around since at least
> the early 60's and Smalltalk first appeared in the late 60's.  Every single
> programmer who ever wrote a program in Tcl, Perl, C++, Visual Basic, or even
> C could have chosen Lisp, Scheme, or Smalltalk.  But they didn't.  If you
> want to know the truth, I think you need to stop making superficial excuses
> and ask deeper semantic questions.  There really is something better about
> each of these "ugly languages" that gives them an advantage over the "good"
> languages;  I'll leave it up to you to figure out what it is.

Strong hyping ??


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

Date: 09 Apr 1997 13:08:53 -0400
From: Ken Anderson <anderson@necsys.gsfc.nasa.gov>
Subject: system LIST && die   NOT   system LIST || die ??
Message-Id: <y7x7micw2ca.fsf@necsys.gsfc.nasa.gov>


page 154 of the llama book indicates that 

system LIST

works "backwards from normal Perl operator convention"
in that the example shown indicates it should be used like
this:

	system LIST && die LIST;

as opposed to a "normal" construct:

	perl-operator LIST || die LIST;


This is, i'm sure, the source of my current problem,
but i still don't quite "get it".  Can anyone explain?

Thanks!!


Ken


-- 

	The earth is spinning madly through space and I
	sit in front of a TV screen all bloody day.
--------------------------------------------------------------------
Kenneth Anderson                |    Code631 Astrophysics Data Facility
Hughes STX                      |    email: anderson@ssvs.gsfc.nasa.gov
Goddard Space Flight Center     |    ph:    301 286 1375
Greenbelt, MD                   |
--------------------------------------------------------------------


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

Date: 9 Apr 1997 12:27:20 -0500
From: seebs@solutions.solon.com (Peter Seebach)
Subject: Re: Unix and ease of use  (WAS: Who makes more ...)
Message-Id: <5igjho$2e5@solutions.solon.com>

In article <01bc4477$bfb15c40$87ee6fce@timpent.a-sis.com>,
Tim Behrendsen <tim@a-sis.com> wrote:
>Peter Seebach <seebs@solutions.solon.com> wrote in article
><5idpbv$kdf@solutions.solon.com>...
>> This is an assertion you have made frequently, but it contradicts the best
>> information we have about himan motivation.

>I would say it's perfectly in line with the information we have
>about human motivation.  It's why Capitalism succeeds where Socialism
>fails.  If humans were more motivated by abstractions such as "wanting
>to do a good job", Socialism would succeed.

Several logical flaws:

1.  You cannot correctly assume that human motivations are a global constant.
There are differences.  Some people are more motivated by money, some more
motivated by a desire to do the right thing.
2.  I posit that there is a general trend in these motivations, that
brilliance and complicated motivation are correlated.  The best work is done
by brilliant people, not by mediocre people.

Would you lie to get $50?  How about to get $500,000?  Would you kill someone
for $1,000,000?  Would you kill someone for $50?

There are people who will kill for $50, and there are people who will not lie
for any amount of money the world has seen fit to offer them.  Clearly,
motivation is *not* constant...

Also, motivation varies with context.  People who are starving will do nearly
anything to get food.  People who are not starving will not see the food as a
great motivator.  As people progress through their goals, they become more
principled, and more interested in more abstract things.

If I can have a house and a car on my current income, more money may not be
enough to make me work harder.  More glory may.  More sense of accomplishment
may.

>But I don't even need to go there.  Name one freely available
>*significant* product that is *clearly* better than *any* commercial
>product, regardless of price.  There are some good programs of limited
>size that are not worth a commercial entity rewriting (some may
>say Emacs, but I wouldn't...), but I mean products of significant
>size and complexity.

Tim, you're smarter than that.

Name one *commercial* product that is "*clearly* better than *any* commercial
product, regardless of price." (assume "any other ...)

You can't.  There's too much variance.

Can you name *any* commercial compiler which is clearly better than gcc?  Can
you even name a commercial compiler which is clearly *as good as* gcc?  I
can't.  I've been stuck with vendor compilers which, no matter what
options you select, will *NEVERN* warn you that you are calling an undeclared
function.  I've seen vendor compilers with code generation bugs that never get
fixed.  I've seen vendor compilers which dump core and go into infinite loops.
I have gotten gcc to dump core perhaps twice in the last ten years, once
because I was using a corrupted binary, and once because of a bogus NFS read
or similar network burp.  (At least, restarting the compile made everything
work.)  I've never gotten gcc to hang.  I have seen it consistently and
reliably outperform all of the compilers I've compared it with in size and
speed of output code, and I've used lints that didn't give as many helpful
diagnostics and warnings.

How many *C* compilers can you name that will automatically inline smallish
functions?  Ever wonder why there are still compilers that never do tail
recursion elimination?

I believe that some of the serious vendors (SGI, DEC) are probably at least
comparable to gcc.  Some of them may, occasionally, have features it doesn't.
None of them have anything like the range of supported platforms, nor the
development commitment, I've seen from gcc.

When was the last time you got a patch for a reported bug in less than an
hour?  It's happened to me.

>Second, you can't judge average human behavior by specific examples
>of anecdotal evidence.  Historically, financial success as a goal 
>to a comfortable and safe life for you and your family has been the
>most powerful incentive.

Historically, eating regularly has been a goal most people have not attained.

*average* human behavior is not a driving force in the best of the best.
We're talking about what makes the *best* software, not what makes vaguely
acceptable software.

To get vaguely acceptable software, you hire managers and people with N years
of experience using proven tools for a well known target platform.  You do
*not* make progress, you just try to carve out a niche in a target market you
think has room.  Innovation is done by individuals and visionaries, and is not
done primarily for money.

>They don't always do it because of the money, and don't often do it
>*only* for money, but on a societal average, most people have a goal
>of making a lot of money *along with* doing what they love.

Yes.  And, on a societal average, most people don't create anything surprising
or new.

I'd rather flip burgers and program in my spare time than earn more money and
not program at all.

For another comparison:  Can you name a commercial system which supports as
many platforms as NetBSD?  Can you name a commercial system which had 64-bit
file sizes as early as 4.4BSD did?  Which commercial systems not made by Sun
had Java implementations before Linux?  Which commercial systems had Java
implementations not based entirely on Sun's work before the free software
community did?  What commercial CGI tools are as effective or widely used as
perl and one of the several free CGI modules used with perl?  What commercial
CGI tools have the flexibility and database access and support that perl does?

Free software is only starting to migrate towards applications.  However, I
can tell you that I've used a freeware X-based CD player that was better than
the crappy one that came with Windows, and I've seen freeware X-based editors
that outperformed *any* windowing text editor I've ever seen elsewhere.

-s
-- 
Copyright 1997 Peter Seebach - seebs at solon.com - C/Unix Wizard
I am not actually gladys@nancynet.com but junk mail is accepted there.
The *other* C FAQ, the hacker FAQ, et al.  http://www.solon.com/~seebs
Unsolicited email (junk mail and ads) is unwelcome, and will be billed for.


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

Date: 10 Apr 1997 02:03:38 GMT
From: Craig Franck <clfranck@worldnet.att.net>
Subject: Re: Who makes more $$ - Windows vs. Unix programmers?
Message-Id: <5ihhpq$pfq@mtinsc05.worldnet.att.net>

abigail@ny.fnx.com (Abigail) wrote:
>On Tue, 8 Apr 1997 15:20:33 GMT, H.P.Heidinger wrote in many groups
><URL: news:E8BryA.6Fq@hphbbs.ruhr.de>:
>++ In article <860344556snz@genesis.demon.co.uk>,
>++ 	fred@genesis.demon.co.uk (Lawrence Kirby) writes:
>++ # In article <E844tC.I6p@hphbbs.ruhr.de> hph@hphbbs.ruhr.de
>++ "H.P.Heidinger" writes:
>++ # 
>++ >>  `Unix' stands for `UNIfied eXecutive' and is nothing but a
>++ >>  philosophy for a unified executive
>++ # 
>++ # False - Unix doesn't stand for anything. It is a pun on the name of OS
>++ from
>++ # which it was derived - Multics. Check the relevant FAQs.
>++ 
>++   Come on -- gimme a break with that urban legend ... this was far
>++   before V7 and is dark history nowadays. The foundation of X/Open
>++   has set other pointers.
>++ 
>
>"UNIX is a trademark of Bell Laboratories. `UNIX' is *not* an acronym,
> but a weak pun on MULTICS, the operating system that Thompson and
> Ritchie worked on before UNIX."

I wouldn't call it a weak pun. :-) Anyway, AT&T sold its UNIX 
System Laboratories (USL) to Novell in 1993. Later that year, 
the UNIX trademark was transferred from Novell to X/Open; 
Novell, I believe, still holds the source code license.

>That is the footnote on the first page of the prefeace of
>"The UNIX programming environment" by Brian W. Kernighan
>and Rob Pike. [ISBN 0-13-937699-2]
>
>You think you know better?

At the time the statement was made I am sure it was true.
Things change fast in the computer industry...

-- 
Craig
clfranck@worldnet.att.net
Manchester, NH
Man is the only animal for whom his own existence is
a problem which he has to solve. -- Erich Fromm




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

Date: Wed, 09 Apr 1997 10:13:00 -0700
From: Jacob Bailly <jnb@thunderstorm.com>
Subject: Re: Who makes more $$ - Windows vs. Unix programmers?
Message-Id: <334BCE1C.52A6@thunderstorm.com>

Kaz Kylheku wrote:
> 
> In article <E8BryA.6Fq@hphbbs.ruhr.de>,
> H.P.Heidinger <hph@hphbbs.ruhr.de> wrote:

> >  Unix is what it is ... a ``UNIfied eXecutive'' -- an so it should
> >  be understood ... Amen! But if you wish, go fondeling your FAQ ...
, your silly insistence that UNIX stands for ``UNIfied eXecutive'' (ha
ha)
> doesn't make it so.
> 
> The fact that UNIX is a pun on Multics is no urban legend, but a simple
> historic fact. If you don't believe Lawrence Kirby, please write mail to
> Brian Kernighan.

Agreed.
To me the phrase "Unified Executive" doesn't really even mean
anything.... It certainly doesn't make me think "Oh!  Of course!  A
logical name to describe an operating system by!"  On the contrary, I
can't quite understand what "unified executive" means in relation to
operating systems....  But the real point is that it is indeed fact that
the name UNIX WAS derived from Multics.  Historical fact.


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

Date: 10 Apr 1997 03:38:49 GMT
From: dave@fast.thomases.com (Dave Thomas)
Subject: Re: Why are no elements returned from split(/X/,'')?
Message-Id: <slrn5koo66.rid.dave@fast.thomases.com>

On 09 Apr 1997 14:35:09 -0500, Kent S. Gordon wrote:
>  Why are no elements returned from split(/X/,'')?
> given the below perl script 
> $blank_string='';
> $non_blank_string=' ';
> @foo= ( '' );
> print "NUMBER of FOO's: ",$#foo, "\n";

But what does $#foo mean?

Its the subscript of the last elements -- one less than the number of
entries for zero-based arrays...

Dave

-- 

 _________________________________________________________________________
| Dave Thomas - Dave@Thomases.com - Unix and systems consultancy - Dallas |
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


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

Date: 8 Mar 97 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 8 Mar 97)
Message-Id: <null>


Administrivia:

The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc.  For subscription or unsubscription requests, send
the single line:

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.

The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.

The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.

For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V8 Issue 264
*************************************

home help back first fref pref prev next nref lref last post