[comp.lang.perl] Super Macho Hackers!

merlyn@iwarp.intel.com (Randal Schwartz) (02/07/90)

In article <14678@fluke.COM>, inc@tc (Gary Benson) writes:
| One person wrote that PERL was "created by Super Macho Hackers to keep their
| Maniac Power Urges under control". I don't know about that, but I am certain
| that this person's next statement is right on the mark: PERL is *not* a
| trivial language.

Larry?  A "Super Macho Hacker"?

I've never heard *that* applied to him before. :-)

I can see it now:  the book will be titled:

	"PERL III: Super Macho Hackers strike back!"

I guess that's better than Teenage Mutant Ninja Hackers, or something
like that.  (Maybe that would fit me... hmmm...)

print grep(s/^\d+(.*)/$1 /, sort(split(/ /,"8hacker, 4Perl 1Just 2another")));
(ok, so I didn't get the trailing space out... :-)
-- 
/=Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095 ==========\
| on contract to Intel's iWarp project, Beaverton, Oregon, USA, Sol III      |
| merlyn@iwarp.intel.com ...!any-MX-mailer-like-uunet!iwarp.intel.com!merlyn |
\=Cute Quote: "Welcome to Portland, Oregon, home of the California Raisins!"=/

ccplumb@lion.waterloo.edu (Colin Plumb) (02/07/90)

In article <1990Feb6.223117.16428@iwarp.intel.com> merlyn@iwarp.intel.com (Randal Schwartz) writes:
>In article <14678@fluke.COM>, inc@tc (Gary Benson) writes:
>| One person wrote that PERL was "created by Super Macho Hackers to keep their
>| Maniac Power Urges under control". I don't know about that, but I am certain
>| that this person's next statement is right on the mark: PERL is *not* a
>| trivial language.
>
> Larry?  A "Super Macho Hacker"?
>
> I've never heard *that* applied to him before. :-)

I confess; 'twas me who said it.  I just felt that anyone who
puts socket calls in a script language is revealing a subconsious
desire to write a newer and more feature-laden sendmail in said
language, just to prove It Can Be Done.

I wonder if anyone's set the sticky bit on their Perl yet.

BTW, given a truly arbitrary filename in $file (e.g.
'>>/new
line/back\slash/Caller*ID/huh?/a pipe looks like this: |'),
what's the best way to open it in various modes?
=-- 
	-Colin

tneff@bfmny0.UU.NET (Tom Neff) (02/07/90)

In article <20620@watdragon.waterloo.edu> ccplumb@lion.waterloo.edu (Colin Plumb) writes:
>I wonder if anyone's set the sticky bit on their Perl yet.

You better believe it!  I rebuilt the kernel with a larger cache just
for the purpose, too.  Perl has a horrific latency on AT386 UNIX boxes
in general, which is the biggest drawback to using it as a common tool
here.  Keeping it loaded works wonders!  

I strongly recommend setting the sticky bit for all Perl lovers on
UNIX/386 platforms.

allbery@NCoast.ORG (Brandon S. Allbery) (02/08/90)

As quoted from <20620@watdragon.waterloo.edu> by ccplumb@lion.waterloo.edu (Colin Plumb):
+---------------
| I confess; 'twas me who said it.  I just felt that anyone who
| puts socket calls in a script language is revealing a subconsious
| desire to write a newer and more feature-laden sendmail in said
| language, just to prove It Can Be Done.
+---------------

Actually, Larry's writing a newer and more feature-laden rrn in said language.
Although I must agree with you:  anyone who wants to rewrite sendmail in perl
probably needs the services of a psychiatrist.  ;-)

++Brandon
-- 
Brandon S. Allbery    allbery@NCoast.ORG, BALLBERY (MCI Mail), ALLBERY (Delphi)
      uunet!cwjcc.cwru.edu!ncoast!allbery ncoast!allbery@cwjcc.cwru.edu

lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) (02/08/90)

In article <20620@watdragon.waterloo.edu> ccplumb@lion.waterloo.edu (Colin Plumb) writes:
: In article <1990Feb6.223117.16428@iwarp.intel.com> merlyn@iwarp.intel.com (Randal Schwartz) writes:
: >In article <14678@fluke.COM>, inc@tc (Gary Benson) writes:
: >| One person wrote that PERL was "created by Super Macho Hackers to keep their
: >| Maniac Power Urges under control". I don't know about that, but I am certain
: >| that this person's next statement is right on the mark: PERL is *not* a
: >| trivial language.
: >
: > Larry?  A "Super Macho Hacker"?
: >
: > I've never heard *that* applied to him before. :-)
: 
: I confess; 'twas me who said it.  I just felt that anyone who
: puts socket calls in a script language is revealing a subconsious
: desire to write a newer and more feature-laden sendmail in said
: language, just to prove It Can Be Done.

Actually, I was thinking about what I'd need to write the new rn in perl.
I don't want to rewrite sendmail.  (Not consciously, anyway.  :-)

: I wonder if anyone's set the sticky bit on their Perl yet.

No point on my system--there's always a perl script of some sort executing...

: BTW, given a truly arbitrary filename in $file (e.g.
: '>>/new
: line/back\slash/Caller*ID/huh?/a pipe looks like this: |'),
: what's the best way to open it in various modes?

A fairly general way would be:
	
	$file =~ s#^(\s)#./$1#;		# protect leading whitespace
	open(FOO, "< $file") || die "Can't open $file: $!\n";

Substitute any other mode for < as necessary.  The only thing this won't
work on is files with trailing whitespace.  I'd have to change one
line in doio.c, and then you could say

	open(FOO, "< $file\0") || die "Can't open $file: $!\n";

since Unix will ignore the trailing null.  Unfortunately, I have a strlen
in the open routine where I should just use the current length of the
string, so it would chop the null too early.  I'll change it in patch 9.

I'm presuming you are expecting the slashes to be interpreted as subdirectory
delimiters in your arbitrary filename.  Perl can't ordinarily create
files with slashes in the filename.  The other hash-n-trash is no problem.

Larry

merlyn@iwarp.intel.com (Randal Schwartz) (02/09/90)

In article <1990Feb8.000357.20206@NCoast.ORG>, allbery@NCoast (Brandon S. Allbery) writes:
| Although I must agree with you:  anyone who wants to rewrite sendmail in perl
| probably needs the services of a psychiatrist.  ;-)

Arrgh.  Can you recommend a good one in my area?

#include <foot-in-mouth> :-)

Just another crazy hacker,
-- 
/=Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095 ==========\
| on contract to Intel's iWarp project, Beaverton, Oregon, USA, Sol III      |
| merlyn@iwarp.intel.com ...!any-MX-mailer-like-uunet!iwarp.intel.com!merlyn |
\=Cute Quote: "Welcome to Portland, Oregon, home of the California Raisins!"=/

pcg@aber-cs.UUCP (Piercarlo Grandi) (02/11/90)

In article <1990Feb8.174817.9909@iwarp.intel.com> merlyn@iwarp.intel.com (Randal Schwartz) writes:
    In article <1990Feb8.000357.20206@NCoast.ORG>, allbery@NCoast (Brandon S. Allbery) writes:
    | Although I must agree with you:  anyone who wants to rewrite sendmail in perl
    | probably needs the services of a psychiatrist.  ;-)
    
    Arrgh.  Can you recommend a good one in my area?

You may go to the same one that Saint Larry goes to. I have
read him saying (or maybe it's me that should go to one) that
he is considering writing a newsreader in Perl. Not a bad idea
actually. After all there are two written in GNU Emacs Lisp
(and I use one of them :->).

On the other hand I would really love to have two "modest
additions" to rn; the ability to sort articles, with a full
screen index mode...
-- 
Piercarlo "Peter" Grandi           | ARPA: pcg%cs.aber.ac.uk@nsfnet-relay.ac.uk
Dept of CS, UCW Aberystwyth        | UUCP: ...!mcvax!ukc!aber-cs!pcg
Penglais, Aberystwyth SY23 3BZ, UK | INET: pcg@cs.aber.ac.uk