[comp.lang.perl] reverse foo

rbj@uunet.UU.NET (Root Boy Jim) (01/22/91)

In ALMOST EVERY article  tchrist@convex.COM (Tom Christiansen) writes:
>"Hey, did you hear Stallman has replaced /vmunix with /vmunix.el?  Now
> he can finally have the whole O/S built-in to his editor like he
> always wanted!" --me (Tom Christiansen <tchrist@convex.com>)

I hope these jabs are with affection. As I see it, perl and emacs
are quite similar; they are kitchen sinks, able to do everything.

Hell, perl is already half as big as emacs.

As I see it, people who use either are bold adventurers,
not merely content to use what software they've been handed.
Half the code I carry from place to place is Larry's,
the other half is GNU.

Interpreted environments are superior to compiled ones
in everything but speed.

Hey, didja hear Wallman has replaced /vmunix with vmunix.pl?
Hey Larry, when are you gonna start the WNU project?
-- 

	Root Boy Jim Cottrell <rbj@uunet.uu.net>
	Close the gap of the dark year in between

phil@ux1.cso.uiuc.edu (Phil Howard KA9WGN) (01/22/91)

rbj@uunet.UU.NET (Root Boy Jim) writes:

>Hell, perl is already half as big as emacs.

I don't know if I would say that.

-rwxr-xr-x  1 root      1706316 Jan 26  1990 /usr/local/bin/emacs
-rwxr-xr-x  2 root       319265 Jan 16 06:20 /usr/local/bin/perl

The above are on a Sequent S81.

>Interpreted environments are superior to compiled ones
>in everything but speed.

Especially in portability.
-- 

--Phil Howard, KA9WGN-- | Individual CHOICE is fundamental to a free society
<phil@ux1.cso.uiuc.edu> | no matter what the particular issue is all about.

rbj@uunet.UU.NET (Root Boy Jim) (01/22/91)

In article <1991Jan22.001456.24237@ux1.cso.uiuc.edu> phil@ux1.cso.uiuc.edu (Phil Howard KA9WGN) writes:
>rbj@uunet.UU.NET (Root Boy Jim) writes:
>
>>Hell, perl is already half as big as emacs.
>
>I don't know if I would say that.
>
>-rwxr-xr-x  1 root      1706316 Jan 26  1990 /usr/local/bin/emacs
>-rwxr-xr-x  2 root       319265 Jan 16 06:20 /usr/local/bin/perl
>
>The above are on a Sequent S81.

I just installed 18.56 today. Perhaps your emacs is not stripped
and/or perhaps you built yours for X11 or suntools? Or you loaded more?

Our perl is 3.044. Our S81 runs Dynix 3.0.17.9. My stats are:

ls -lsg /usr/local/bin/{emacs,perl}
640 -rwxr-xr-x  1 rbj      sysadm     643072 Jan 22 00:15 /usr/local/bin/emacs
368 -rwxr-xr-x  1 root     sysadm     365075 Dec  4 14:27 /usr/local/bin/perl

For comparison:

ls -lsg /dynix
668 -rwxr-xr-x  1 root     wheel      677285 Jan  7 14:34 /dynix

-- 

	Root Boy Jim Cottrell <rbj@uunet.uu.net>
	Close the gap of the dark year in between

allbery@NCoast.ORG (Brandon S. Allbery KB8JRR) (01/23/91)

As quoted from <1991Jan22.001456.24237@ux1.cso.uiuc.edu> by phil@ux1.cso.uiuc.edu (Phil Howard KA9WGN):
+---------------
| rbj@uunet.UU.NET (Root Boy Jim) writes:
| >Hell, perl is already half as big as emacs.
| 
| -rwxr-xr-x  1 root      1706316 Jan 26  1990 /usr/local/bin/emacs
| -rwxr-xr-x  2 root       319265 Jan 16 06:20 /usr/local/bin/perl
| 
| The above are on a Sequent S81.
+---------------

Under System V, strip(1)'ing xemacs shrinks it by over half --- and you might
as well do it if gdb doesn't work on your system, because sdb can't handle it.
(An artifact of unexec, I believe --- COFF auxents are dumped incorrectly.)
In any case, on telotech xemacs is indeed slightly over twice the size of perl,
although I admit that while xemacs is stripped, perl is not.

(Quick note for those who wonder:  "xemacs" is not emacs for X, it is the name
of the dumped emacs with pre-loaded Lisp code.  The "bare" emacs without Lisp
code in it is "temacs".)

++Brandon
-- 
Me: Brandon S. Allbery			    VHF/UHF: KB8JRR on 220, 2m, 440
Internet: allbery@NCoast.ORG		    Packet: KB8JRR @ WA8BXN
America OnLine: KB8JRR			    AMPR: KB8JRR.AmPR.ORG [44.70.4.88]
uunet!usenet.ins.cwru.edu!ncoast!allbery    Delphi: ALLBERY

mike@thor.acc.stolaf.edu (Mike Haertel) (01/23/91)

In article <119431@uunet.UU.NET> rbj@uunet.UU.NET (Root Boy Jim) writes:
>Hell, perl is already half as big as emacs.

Bigger than that even, if you compare perl to the 'temacs' program
containing no dumped lisp code.  I wonder if some people with undumped
perl executables would care to comment on their size? :-)

And frankly, I'm just waiting to see someone take advantage of the
usub stuff and write 'pmacs'... (or would that be 'eperl'? :-)

>Hey, didja hear Wallman has replaced /vmunix with vmunix.pl?
>Hey Larry, when are you gonna start the WNU project?

Maybe it's time to put uperl.o in the shared library? :-)
--
Mike Haertel <mike@stolaf.edu>
"He's a tie with the ambition to become a full-blown suit." -- Jon Westbrock

hansm@cs.kun.nl (Hans Mulder) (01/23/91)

In article <1991Jan21.194252.19124@convex.com> tchrist@convex.COM (Tom Christiansen) writes:
>
>    print reverse foo('bar');
>
>says "bar", whereas 
>
>    print foo('bar');
>
>says syntax error, as it (to my understanding) rightly should.
>Why should the reverse make a difference?

All list operators take an optional extra argument, separated from
the list by optional whitespace.  Print interprets this argument as a
filehandle, sort takes it to be the sorting function.  Reverse doesn't
really know what to do with it, but doesn't complain either.

Other list operators that ignore the optional extra argument are
chmod, chown, kill, unlink, utime, die and return.

Maybe the parser should be informed that list operators come in two
kinds: those that use the extra argument, and those that don't.

--
sub s { return Not yet, another, perl, hacker; } @s=&s; print "@s,\n";

Hans Mulder	hansm@cs.kun.nl