[6705] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 330 Volume: 8

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Apr 21 06:07:21 1997

Date: Mon, 21 Apr 97 03:00:27 -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           Mon, 21 Apr 1997     Volume: 8 Number: 330

Today's topics:
     Re: (???) Accessing the command line from inside a scri (Andrew M. Langmead)
     -e switch <banyai@llnl.gov>
     Re: [Q] How to capitilize beginning of words (Matthew Johnson)
     Re: [Q] How to capitilize beginning of words <tchrist@mox.perl.com>
     Re: C utils for Perl (Tad McClellan)
     Re: C++Builder means Future. <thomas@evolution.bmc.uu.se>
     Re: Creating New Files (Tad McClellan)
     Expect in the history of Tcl (was: Ousterhout and Tcl l (Cameron Laird)
     Re: fork without fork? (Neil Briscoe)
     Getting it back OUT again! (R.O. (Ted) Russ)
     Re: Good editor for W95? (Ed Kear)
     Re: How do I randomly re-order the lines of a file? (Bill)
     Re: How do I randomly re-order the lines of a file? (Bill)
     Re: How to Query Whois (Scott Anguish)
     Installing Perl compiler 5.003 <dflash@netcomuk.co.uk>
     Re: Lisp is neither (was Re: Ousterhout and Tcl lost th (Henry Baker)
     Re: Lisp is neither (was Re: Ousterhout and Tcl lost th (Scott Schwartz)
     Re: Lisp is neither (was Re: Ousterhout and Tcl lost th (Alaric B. Williams)
     Re: Looking for Perl Wrapper (Andrew M. Langmead)
     MacPerl problems (binoni)
     Digest Administrivia (Last modified: 8 Mar 97) (Perl-Users-Digest Admin)

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

Date: Sun, 20 Apr 1997 18:34:45 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: (???) Accessing the command line from inside a script (Yes, I'm a newbie)
Message-Id: <E8y8xx.57n@world.std.com>

zyanya@ix.netcom.com(Zyana) writes:

>	Well, Ive got a question about opening pipes (correct term?) to
>the command line, and, essentially, the Perl Script sits on hold while
>a script is run from the command line, in the host computer.

>	There was a command I saw that did this, but I cant fully
>remember it or find it either on-line or in my reference books (Yes,
>Ive been checking and checking....,) that went along the lines of:

>(something) [| perl -e script_1.pl (options that go with it)];

>	Does anybody know which command Im referring to?  

You may be referring to the feature that open(LS_OUTPUT, "ls |") will
run the command "ls" and return its results via the filehandle
LS_OUTPUT. If the second argument to open begins with or ends with a
vertical bar, the rest of the string is taken as the name of an
executable program, and that program is opened with either its
standard input or standard output redirected to the filehandle.

The strings passed to open don't need to be constants, they can come
from the command line. Often they do in the form of the magic "<>"
filehandle which automatically opens each element on the command line
in turn.

So, 

  perl -ne print 'ls|' 

will show the output of 'ls' and 

perl -pe 'tr/a-mn-zA-MN-Z/n-za-mN-ZA-M/' \
    'lynx -dump http://random.yahoo.com/bin/ryl|' 

will rot13 a random web page.
-- 
Andrew Langmead


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

Date: Sun, 20 Apr 1997 11:47:41 -0700
From: Bill Banyai <banyai@llnl.gov>
Subject: -e switch
Message-Id: <335A64CD.7FF@llnl.gov>


I am a newby and just installed version 5.003_07 on Win95 100MHz
pentium.

When I enter: perl -e 'print("hello\n");' 
I see a blank line and then a c:\ on the next line; e.g.
c:\ perl -e 'print("hello\n");'

c:\
Wnen I save print("hello\n"); to file test.prl and run perl test.prl,
then the blank line is replaced by hello; e.g.
c:\ perl test.prl
hello
c:\

Any ideas about why -e is not working?

Another clue is that when I enter perl -e 'print "hello\n";'
then I received an error message:
"Can't find string terminator "'" anywhere before EOF at -e on line 1."
It appears to be sensitive to the space between print and "hello\n"


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

Date: Sat, 19 Apr 1997 01:08:56 GMT
From: mejohnsn@netcom.com (Matthew Johnson)
Subject: Re: [Q] How to capitilize beginning of words
Message-Id: <mejohnsnE8v1uw.Dtx@netcom.com>

Tom Christiansen <tchrist@mox.perl.com> writes:

>In comp.lang.perl.misc, brian@brie.com (Brian Lavender) writes:
>:On 15 Apr 1997 16:59:59 GMT, Tom Christiansen <tchrist@mox.perl.com>
>:wrote:
[snipped by someone else earlier]
>:
>:>You have asked a question or talked about an issue that's specifically
>:>addressed in the Perl Frequently Asked Questions list.
>:>
>:>    http://www.perl.com/perl/faq/
[snip]
>:
>:I followed Tom's advice regarding your answer to this question and I
>:have to say my search led me nowhere. When you click on this question
>:it leads you to
>:
>:http://www.perl.org/CPAN/doc/manual/html/pod/
>:
>:at the top of the page. 

Well, I can't say I'm too surprised that it lead you nowhere.  The FAQ is BADLY WRITTEN.

>:
>:Needless to say I could keep on reading, but the answer seems quite
>:buried making this faq rather useless. 

That is is.  USELESS!!

>It would be nice to see a
>:simple code example. 

As any decent FAQ would have.

>I'm really tired of doing everyone else's

>homework for them. 

As I have been telling my fellow programmers for years (the
_successful_ one listen), if you don't want to waste limitless
hours answering the same questions over and over, write a clear,
complete manual.  Index it well.  Fail to do these things and
you WILL be buried in questions.

>  Why do you think I wrote the FAQ, just
>so you don't have to read it?

Well, if you wrote it to anticipate real questions, you would not
be wasting so much time complaining about people asking the same
questions over and over.  No other FAQ author spends so much time
doing this as you do.

Learn to write before you complain about other people not reading the
garbage you author.  I have given up on using Perl5 at work because your
FAQ is so useless and your posts to this newsgroup are even worse.


Matthew Johnson
Sabaki Engineering
mejohnsn@netcom.com



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

Date: 19 Apr 1997 01:37:10 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: [Q] How to capitilize beginning of words
Message-Id: <5j97k6$sl3$1@csnews.cs.colorado.edu>

 [courtesy cc of this posting sent to cited author via email]

In comp.lang.perl.misc, 
    mejohnsn@netcom.com (Matthew Johnson) writes:
:Well, I can't say I'm too surprised that it lead you nowhere.  
:The FAQ is BADLY WRITTEN.

Then write a better one instead of being thankless whiner.

:>:Needless to say I could keep on reading, but the answer seems quite
:>:buried making this faq rather useless. 
:
:That is is.  USELESS!!

Don't know how to search a text file, eh?  There's a plain simple
text file on CPAN that you could have used.  But you were too lazy
to look.  I can't help the lazy.  


:>  Why do you think I wrote the FAQ, just
:>so you don't have to read it?
:
:Well, if you wrote it to anticipate real questions, you would not
:be wasting so much time complaining about people asking the same
:questions over and over.  No other FAQ author spends so much time
:doing this as you do.

Prove that statement, or apologize.

:Learn to write before you complain about other people not reading the
:garbage you author.  I have given up on using Perl5 at work because your
:FAQ is so useless and your posts to this newsgroup are even worse.

If you cannot or will not read my writings on Perl, then you are truly
doomed.  I'm sure we'll all be happier without your petulant ingratitude
and that you'll be happier learning to program your VCR instead of Perl.

I suspect that others here may have sterner words for you.

--tom
-- 
	Tom Christiansen	tchrist@jhereg.perl.com
    last|perl -pe '$_ x=/(..:..)...(.*)/&&"'$1'"ge$1&&"'$1'"lt$2'
    That's gonna be tough for Randal to beat...  :-)
            --Larry Wall in  <1991Apr29.072206.5621@jpl-devvax.jpl.nasa.gov>


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

Date: Fri, 18 Apr 1997 19:53:35 -0500
From: tadmc@flash.net (Tad McClellan)
Subject: Re: C utils for Perl
Message-Id: <f259j5.do7.ln@localhost>

Henry Avatar Chan (q8e192@ugrad.cs.ubc.ca) wrote:

: I was just wondering if there are any C equivalents functions for
: Perl?

Yes for some.

No for others.

grep name_of_C_equivalents_function_here *.pod

may well turn up the one you are looking for...


[ *.pod are the perl man pages that are included with the perl distribution ]


: Anyone written any subroutines?

Yes. I have written subroutines before. They are way cool man!



Here is the "C equivalents function" :-)


sub C_equivalents {
   $_[0] eq "C" ? return 1 : return 0;
}  


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


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

Date: 18 Apr 1997 10:06:28 +0200
From: Thomas Sicheritz <thomas@evolution.bmc.uu.se>
Subject: Re: C++Builder means Future.
Message-Id: <x63esozrej.fsf@evolution.bmc.uu.se>

Bob Nelson <bnelson@netcom.com> writes:

> Frank C. Earl <fearl-no-spam-@-no-spam-airmail.net-no-spam-> wrote:
> > On Wed, 16 Apr 1997 16:46:45 -0700, 34110s96@student.csi.cuny.edu
> > wrote:
> 
> > >I just got C++Builder and I have never seen a powerful RAD tool like
> > >this  one.  Forget about the Visual Crap.  C++Builder is the King of the
> > >Hill and not Marketing hype of Microsoft.  
> 
> > And if only it was on Linux, we'd be in hog-heaven.  Thing is, it's on
> > MS-Windows.  
> 
> Who needs it? We're already in "hog-heaven" with easily the most robust
> compiler around...and we have the source to it! Add gcc to a customized
> emacs environment under X! Short of having the code write itself, what
> else could one desire in a development environment?

Add g++/gcc, tcl and a huge abbreviation file
 .... and XEmacs writes your code - both for C/C++ programs and tcl scripts.

-- 
Sicheritz Ponten Thomas E.              UPPSALA UNIVERSITY 
Vangsbyvaegen 128   S-740 20 Vaenge     Biomedical Center
Home: +46 18  364358                    Department of Molecular Biology
BMC:  +46 18  174214                    BOX 590 S-751 24 UPPSALA Sweden
Fax   +46 18  557723                    http://evolution.bmc.uu.se/~thomas
 
	De Chelonian Mobile ... The Turtle Moves ...



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

Date: Fri, 18 Apr 1997 19:44:10 -0500
From: tadmc@flash.net (Tad McClellan)
Subject: Re: Creating New Files
Message-Id: <qg49j5.dn7.ln@localhost>

Kevin A. Miller (kmiller@mail.cheta.net) wrote:
: I am semi-new to Perl and am having trouble with the following task:
: 	I am trying to create a script that opens a single .dat file, which
: consists of array elements
: (some_name,some_address,phone_number,CATEGORY), 'Four fields seperated
: by commas'.  I then want the program to take whatever element is in the
: CATEGORY part and create a new .dat file with each CATEGORY as the name
: of the new file, then print the whole array in this new file.
: 	My ultimate goal is to run the program on a rather large data file, and
                                                    ^^^^^^^^^^^^

In absolutes (like hundreds of megabytes)?

Relative to the size of the physical memory you have available?

Relative to the size of the virtual memory you have available?

I would take all of these into consideration when choosing how to
write it. But I don't any of these...



So, _I_ get to choose!  ;-) 

I'll just ignore that "large" part, and give one that works if you
have enough virtual memory.


: then get many new data files with all the same categories in it, with
: the name of the CATEGORY as the name of each file.  
: 	As you can see, I pretty much know what I want to do in english, but I
: can't get the script together.  I have checked the FAQ's and some text,
: but can't pull it all together.
: 	Sorry, if this is a "stupid" question, but any help would be greatly
: appreciated.  


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

$index = 0;
while (<>) {
   push(@data, $_);                    # save all the lines in an array
   chomp;
   $category = (split /,/, $_)[3];     # find the fourth field
   if ($cats{$category})
      {$cats{$category} .= "$index:"}  # all indices for this category
                                       # w/colon separators
                                       # ... or use a 2-D array instead
   else
      {$cats{$category} = "$index:"}   # inital one for this category
   $index++;
}

foreach $cat (keys %cats) {            # create a new file
   open(OUT, ">$cat.dat") || die "could not open '$cat.dat'  $!";
   foreach $index (split /:/, $cats{$cat}) {
      print OUT $data[$index];    # write each array element for this category
   }
   close(OUT);
}
----------------------


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


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

Date: 18 Apr 1997 20:43:47 -0500
From: claird@Starbase.NeoSoft.COM (Cameron Laird)
Subject: Expect in the history of Tcl (was: Ousterhout and Tcl lost the plot with latest paper)
Message-Id: <5j980j$i8h@Starbase.NeoSoft.COM>

In article <5img9e$hvj@Masala.CC.UH.EDU>,
cosc19z5@bayou.uh.edu <cosc19z5@Bayou.UH.EDU> wrote:
			.
			.
			.
>Ok, in all fairness I do have to note this as a contribution on the
>side of Tcl.  I was quite pleased that a language existed to allow
>control of other programs, and did in fact think it was a nifty idea.
>So regardless of my feelings towards Tcl, I do admire the idea of
>Expect.
			.
			.
			.
It's a different contribution than you might
realize.  Don Libes has emphasized, at least
in the writings I've seen, that there's no
necessary connection between Expect and Tcl.
He always expected people to write Expecting
extensions for such other languages as Perl,
Rexx, ...; in fact, there was an Expect (in
C?) *before* he re-did it for Tcl.

Perhaps *that* is some sort of testimony to
Tcl's appropriateness; as straightforward as
it would be to re-do Expect in other lan-
guages, Tcl has always been good enough, and
so the migration has never been done.

I've trimmed follow-ups.
-- 

Cameron Laird           http://starbase.neosoft.com/~claird/home.html
claird@NeoSoft.com      +1 713 623 8000 #227
                        +1 713 996 8546 FAX


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

Date: 19 Apr 1997 10:20:23 GMT
From: neilb@zetnet.co.uk (Neil Briscoe)
Subject: Re: fork without fork?
Message-Id: <memo.19970419112038.39121C@skep.compulink.co.uk.cix.co.uk>

In article <5j6pjs$rcd@news.mc.net>, pkrawczy@maxx.mc.net (AlphaBeta)
wrote:

> I'm looking for a way to do my bidding in Perl.
>
> I'm writing a program where I need two filehandles open - an
> intermediary,
> of sorts.  One's <STDIN>, and the other is to a network socket.
>
> My problem comes when I want to share some variables.  The way I'm doing
> the program now is that I call fork, and it spawns the child, and
> everything
> runs well, except when I want to variable share.
>
> The while(<STDIN>) of the child doesn't share variables with the
> while(<S>) of
> the parent.  I need a way to share variables.  For example, I want to
> set one
> with the user input, and clear it when text comes across the socket,
> but I
> can't get the variable to clear.  Using subroutines didn't seem to help.
>
> I could do it with a cache file on disk, but that'd be a waste, both
> disk
> wise and resource wise.  If someone's got a good idea of how I can check
> both filehandles for use and be able to separate them, i.e. keep STDIN
> and
> S separate while checking them both, I'd appreciate it.
>

Well, if you're using Unix, whats wrong with.....

$ENV{'VARNAME'}='value';

Then do your fork.

Of course, if the parent is supposed to know that the child has modified
these values, this won't work.

In that case, you need to use some form of inter-process communication,
like shared memory semaphores for example.

There are a number of choices "Unix Network Programming" explains them
all.

Regards
Neil



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

Date: Sun, 20 Apr 1997 16:17:14 GMT
From: ted@faroc.com.au (R.O. (Ted) Russ)
Subject: Getting it back OUT again!
Message-Id: <5jdj58$1b2$1@demeter.omen.com.au>

Hi,

I made what I THINK is a HoH by doing this:

dbmopen (%hoh, "/filename");
for $name (@listofnames)
{
	$hoh{$name, "Value1"} = "first";
	.....
	$hoh{$name, "Value10} = "tenth";
}
dbmclose (%hoh);

But when I reopen it and try to read it with 

for $name (keys, %hoh)

I get a list of the names with a high-ASCII appended, and then the
second field appended to that, ie 

fred
fred|Value1
 ...
fred|Value10

What am I missing here?  I'm very new to Perl and would like to know
what concept it is that I'm missing here...  I can bruteforce filter
out the extra stuff and push that into an array but I gather there's
an easier, more perl-ish way.



--
Teddles
      _______________________________________________________
       ***  ***   ***		Intelligent Internet Services
        *    *   *   *		Support: 0417 919 912
        *    *    *		Data: 61+ 09 445 7979
        *    *      *		
        *    *   *   *		$30/month flat rate
       ***  ***   ***		$165  saver rate
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Also visit:/ FAROC ENTERPRISES, http://www.faroc.com.au/~fe /
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                HELP STOP THE TELSTRA INTERNET GRAB!
                    WRITE TO YOUR LOCAL MEMBER!
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



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

Date: Sun, 20 Apr 97 16:27:30 GMT
From: skear@albany.net (Ed Kear)
Subject: Re: Good editor for W95?
Message-Id: <5jdg5c$5pk$1@lori.albany.net>

In article <864td2r8gy.fsf@goffette.research.megasoft.com>, C Matthew Curtin <cmcurtin@research.megasoft.com> wrote:
>Benjamin Burack <rascal@inlink.com> writes:
>
>> I'm writing CGI scripts in perl on my W95 machine, and then uploading
>> them to the Unix server.  I'm looking for recommendations on good
>> editors that can easily save in a Unix format.
>
>When I somehow find myself in the strange, nasty world of Win32, I
>find that it can be made much less evil by using Emacs. :-)  I'm using
>GNU Emacs 19.34 for Win32 (NTEmacs), but wish I could get XEmacs
>19.15, like what I've got on my SGI.  (Sigh.)

I like PFE (Programmer's File Editor).
It will save in Unix format and is "C Aware"
You can find it at:
http://www.lancs.ac.uk/people/cpaap/pfe/
The current version is 0.07.001  27 March 1997

Hope this helps

Ed



Ed Kear                 |       *Round the Bend Productions* 
ed@roundthebend.com     | Online Travel Guide for Upstate New York
                        |       http://www.roundthebend.com/


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

Date: 16 Apr 1997 02:41:20 GMT
From: bill@sover.net.no.junkmail (Bill)
Subject: Re: How do I randomly re-order the lines of a file?
Message-Id: <slrn5l8f2g.7l2.bill@granite.sover.net>

In article <5j0g3a$nd@vixen.cso.uiuc.edu>, Adam H. Lewenberg wrote:
>I need to RANDOMLY re-order the lines of a small text file (between 20
>and 50 lines). Preferably, I would like to say something like 'reorder
>file' and get the re-ordered file sent to standard output. A perl
>solution would be good, but I could also use awk, sed, or any of the
>other standard UNIX tools. 
>
>Example

[SNIP]

   Well, I don't think it's truely random, but something a quick and 
dirty solution to your problem would be to add the lines into a hash and 
then get the values out using "values".  Something like this ought to do 
the trick:

  while (<>) {
      $hash{$i++} = $_;
  }
  foreach (values %hash) {
      print;
  }

   Since things are stored internally using hashing, the order they will 
come out in will be pretty random.  I wouldn't use it as the basis for 
encryption, but it seems pretty well suited for your purposes...

						Bill
-- 
Sending me unsolicited email through mass emailing about a product or
service your company sells ensures that I will never buy or recommend your
product or service.


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

Date: 16 Apr 1997 03:04:37 GMT
From: bill@sover.net.no.junkmail (Bill)
Subject: Re: How do I randomly re-order the lines of a file?
Message-Id: <slrn5l8ge5.7l2.bill@granite.sover.net>

In article <slrn5l8f2g.7l2.bill@granite.sover.net>, Bill wrote:
>
>   Well, I don't think it's truely random, but something a quick and 
>dirty solution to your problem would be to add the lines into a hash and 
>then get the values out using "values".  Something like this ought to do 
>the trick:
>
>  while (<>) {
>      $hash{$i++} = $_;
>  }
>  foreach (values %hash) {
>      print;
>  }
>

   Actually make that
  
  while (<>) {
      $hash{$_) = 1;
  }
  foreach (keys %hash) {
      print;
  }

   I guess using sequential numbers doesn't work great if you want to get 
things out of order--I tried the code as it was before and got no change.  
Sorry for the followup... :)  This version seems to work, though, barring
any restrictions on what characters can be in the lines (I tried a bunch 
of odd ones and things seemed ok).  Let me know if it works for you.

						Bill
-- 
Sending me unsolicited email through mass emailing about a product or
service your company sells ensures that I will never buy or recommend your
product or service.


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

Date: 19 Apr 1997 04:19:43 GMT
From: sanguish@digifix.com (Scott Anguish)
Subject: Re: How to Query Whois
Message-Id: <5j9h4v$akq$1@news.digifix.com>

On 04/18/97, Mike Reed wrote:
>We'll pay $$!:
>
>We have a small project that requires a skilled perl programmer to
>lookup via 'whois' the admininstrative contacts for a list of 
specific
>domains that we have, write the results to a file, then extract the
>first name, last name, and email address of that person from that 
file
>and output it in comma delimited form to a logfile.
>

	Oh, just great... I can smell the spam now...


-- 
Scott Anguish  <sanguish@digifix.com>
NEXTSTEP/OpenStep Information <URL:http://www.stepwise.com>



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

Date: Sun, 20 Apr 1997 19:59:53 +0100
From: Demon Flash <dflash@netcomuk.co.uk>
Subject: Installing Perl compiler 5.003
Message-Id: <335A67A9.1F8F@netcomuk.co.uk>

Help!!!

I am trying to install the Perl compiler version 5.003 and whenever I am
ready to make install I get an error.

I am using SCO Unix v386 (version 3.2) with the Development system &
TCP/IP installed.

The error message is as follows:

# make
install                                                                  
        cc   -o miniperl miniperlmain.o libperl.a -lintl -lnsl_s -ldbm
-lld -lm -lc -lPW
-lx                                                                    
undefined 					first referenced
symbol			                        in
file                                     
Perl_chsize                        	libperl.a 

ld fatal: Symbol referencing errors. No output written to
miniperl              
** Error code
13                                                               
#

If anyone can help could you please e-mail me at one of the addresses at
the bottom of the page.  Any advice or help would be much appreciated.

Thanks.....

-- 
Demon Flash, England.

Mailto:dflash@netcomuk.co.uk
Mailto:demon_flash@hotmail.com
http://www.netcomuk.co.uk/~jamesmc/dflash.htm
http://www.hpvca.com


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

Date: Sun, 20 Apr 1997 17:14:43 GMT
From: hbaker@netcom.com (Henry Baker)
Subject: Re: Lisp is neither (was Re: Ousterhout and Tcl lost the plot)
Message-Id: <hbaker-2004970914430001@10.0.2.1>

There are so many errors in your assertions, that it's difficult to know
where to start.

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

> One of the most common criticisms of my white paper has been that the
> distinction between scripting and system programming is artificial, and
> that it is possible for a single language to be good at both tasks.
> Lisp-like languages such as Scheme were suggested as living proof.  I
> can't prove that it's impossible for a single language to be good at
> both scripting and system programming, but I don't know of a good example
> and I doubt that it will ever happen.

Two words: 'Lisp Machine'.

> The reason for this is the
> difference in typing, as I explained in the white paper. A given language
> embodies a particular style of typing, which can range from very strongly
> typed to totally untyped.  Once that decision has been made, the language's
> position on the spectrum between system programming and scripting is set.
> I think it's possible to have a language that's in the middle, but it's
> not likely to be terrific at either task.

You've obviously never heard of Lisp declarations, or of 'soft typing'.

> Let's take Lisp as an example.  I think that Lisp falls somewhere
> between scripting and system programming.  Many of you have suggested that
> it is an ideal language for both system programming and scripting, but I
> think that it isn't really very good for either.

Two words: 'Lisp Machine'.

> In fact I suspect that
> this may be why Lisp hasn't been used much for practical programming.
> Lisp isn't a good system programming language because it's too hard to
> write efficient programs in it and it doesn't provide good low-level
> access to machine facilities.

Utter claptrap.  I've written many Lisp programs on the PDP-10 and the
68K (Mac) that run as fast as any hand-crafted assembler program.

Two more words: 'Lisp Machine'.

> On the other hand, Lisp isn't good for
> scripting either.  In order to be a good scripting language, you need
> to be able to interoperate with lots of other things, which are often
> written in other languages (the best glues are those that stick to lots
> of different materials).  But Lisp has never been very good at this.
> For example, it's hard to include C code with Lisp because they have
> very different data types and memory models.  Lisp systems are typically
> closed: you have to live entirely in the Lisp world.  Good scripting
> languages are open and friendly: they talk to and work with everything.

The Symbolics Lisp Machine also supported the C language, and an excellent
C language it was.  C on this machine wasn't particularly fast, but that was
because the Lisp Machine had better things to do than to twiddle bits.

> Just to short-circuit the discussion that will ensue...
> 
> Many of the best minds in Computer
> Science have worked on Lisp over the last 30 years, and they haven't
> been able to fix the language so that it could be widely used either
> for system programming or scripting tasks.  This says to me that there
> is something fundamentally wrong with the language, at least for these
> tasks.

I suppose that all of the excellent work in Lisp on scheduling space probe
operations, scheduling factory operations, handling your American Express
card credit ratings (in real-time, 7x24), scheduling Gulf War supplies,
demonstrating the next generation of fighter pilot cockpit aids, etc., was all
a mirage?  I guess you see what you want to see.

I'm embarrassed that a 'computer science professor' would be _so_ ignorant
of computer science that he would spout all of this nonsense.


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

Date: 20 Apr 1997 13:25:21 -0400
From: schwartz@galapagos.cse.psu.edu.NO-SPAM (Scott Schwartz)
To: wilson@cs.utexas.edu (Paul Wilson)
Subject: Re: Lisp is neither (was Re: Ousterhout and Tcl lost the plot)
Message-Id: <8genc5ip32.fsf@galapagos.cse.psu.edu>


wilson@cs.utexas.edu (Paul Wilson) writes:
| This is true of most Common Lisp implementations, but it doesn't have to be,

Yes, that's the point.

| I think that's the wrong tack to take in a discussion of scripting
| languages.  You don't have to live inside Scheme, for example.

The article I was responding to was making claims about full featured
CL compilers, not tiny scheme interpreters.  I was quoting Erik with
respect to the systems that he uses.

| If you want to make a tiny
| embeddable Scheme, you can do it just fine.  (Check out SIOD.)

Yes, yes, I know all about siod.  I like siod.



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

Date: Sun, 20 Apr 1997 17:55:47 GMT
From: alaric@abwillms.demon.co.uk (Alaric B. Williams)
Subject: Re: Lisp is neither (was Re: Ousterhout and Tcl lost the plot)
Message-Id: <335a53b4.14068008@news.demon.co.uk>


On 19 Apr 1997 21:20:53 GMT, ouster@tcl.eng.sun.com (John Ousterhout)
wrote:

>Let's take Lisp as an example.  I think that Lisp falls somewhere
>between scripting and system programming.  Many of you have suggested that
>it is an ideal language for both system programming and scripting, but I
>think that it isn't really very good for either.  In fact I suspect that
>this may be why Lisp hasn't been used much for practical programming.
>Lisp isn't a good system programming language because it's too hard to
>write efficient programs in it and it doesn't provide good low-level
>access to machine facilities.  On the other hand, Lisp isn't good for
>scripting either.  In order to be a good scripting language, you need
>to be able to interoperate with lots of other things, which are often
>written in other languages (the best glues are those that stick to lots
>of different materials).  But Lisp has never been very good at this.
>For example, it's hard to include C code with Lisp because they have
>very different data types and memory models.  Lisp systems are typically
>closed: you have to live entirely in the Lisp world.  Good scripting
>languages are open and friendly: they talk to and work with everything.

How about Dylan? I'm looking into it right now in the hope that it
will "bridge the gap". Not completely - I still think a "dummy
language" for customisation by people who don't want to spend ages
being trained is a Good Thing, but to cover both systems stuff and
VHLL gluing. But anyway, to cut a long story short, Dylan lets you
write in a dynamically typed way, which is powerful and high-level,
but where you want performance, you insert pragma-like things to tell
the compiler to restrict the types of bindings etc, so it an be
efficient at a systems level. 

ABW
--
"Plug and Play support: WfEWAD will autodetect any installed
Nuclear Arsenals, Laser Satellites, Battlefield Control Networks,
Radar Installations, Fighter Squadrons, and other WfEWAD compliant
devices, including the new Macrosoft Unnatural Keyboard, with
full support for the now-famous Big Red Buttom(tm)."

(Windows for Early Warning and Defence User's manual P26)

Alaric B. Williams Internet : alaric@abwillms.demon.co.uk
<A HREF="http://www.abwillms.demon.co.uk/">Hello :-)</A>


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

Date: Sun, 20 Apr 1997 17:03:14 GMT
From: aml@world.std.com (Andrew M. Langmead)
Subject: Re: Looking for Perl Wrapper
Message-Id: <E8y4pE.HEr@world.std.com>

dadamson@newtonline.com writes:

>Does anyone know of a "wrapper" utility that I can use to surround a Perl
>program within an exe for NT and C on a Linux box?

Take a look at
<http://www.perl.org/CPAN/modules/by-authors/John_Dallman/hbp_403.zip>
It doesn't embed a perl script into the .EXE. It acts as an .EXE
file that will execute a parallel .pl file.

-- 
Andrew Langmead


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

Date: 20 Apr 1997 18:02:39 GMT
From: binoni@mbox318.swipnet.se (binoni)
Subject: MacPerl problems
Message-Id: <binoni-2004972002150001@dialup70-5-11.swipnet.se>


Hi all!

I'm having severe problems with the latest release of MacPerl (5.1.3r2).
Those are the problems:

1. I cannot get the help function to work, even though my Internet Config
is correctly configured as per the instructions in the README.MAC.
Everytime I choose some item in the help listing that calls for something
in the pod folder, MacPerl wants to launch the Internet Config app.

2. A more serious one. When I try to compile (or build or whatever) a pm
file with the Makefile.pl file, MacPerl crashes the computor with an Error
Type 11. The last message that MacPerl gives is:
   File 'MacHD:Programs:Macperl f:lib:ExtUtils:MM_MacOS.pm; Line 281
and then the whole thing dies. I've tried to make the same thing without
using any extensions, but exactly the same thing happens.

Eh, the machine is a PowerMac 7200/90 with 56 MB of RAM, a 256 KB cache
and sufficient HD space.

Thanks in advance for any help

Bjvrn


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

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 330
*************************************

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