[comp.sources.d] Perl 3.0 beta available

lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) (09/02/89)

Perl 3.0 beta is now available for testing.  You can get it via anonymous
FTP from jpl-devvax.jpl.nasa.gov (128.149.1.143), ~ftp/pub/perl.3.0-beta.
I'd like you guys to bang on it as much as possible in the next two weeks
because I have to deliver it to run on some real flight ops systems soon.

If you can't FTP, and are really motivated, I can mail all 23 kits to you.
But don't expect official patch type support till the real thing comes out.

If interest warrants I'll post it to alt.sources.

There, there, don't drool, it's hard on your keyboard.

Larry Wall
lwall@jpl-devvax.jpl.nasa.gov

wnp@attctc.Dallas.TX.US (Wolf Paul) (09/02/89)

In article <5948@jpl-devvax.JPL.NASA.GOV> lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) writes:
  >Perl 3.0 beta is now available for testing. ...
  > ...
  >If interest warrants I'll post it to alt.sources.
  >
  >There, there, don't drool, it's hard on your keyboard.
  >
  >Larry Wall
  >lwall@jpl-devvax.jpl.nasa.gov

Drooling under control. Here is one vote for posting it to alt.sources.

Wolf Paul
-- 
Wolf N. Paul * 3387 Sam Rayburn Run * Carrollton TX 75007 * (214) 306-9101
UUCP:   {texbell, attctc, dalsqnt}!dcs!wnp
DOMAIN: wnp@attctc.dallas.tx.us or wnp%dcs@texbell.swbt.com
        NOTICE: As of July 3, 1989, "killer" has become "attctc".

lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) (09/03/89)

In article <9209@attctc.Dallas.TX.US> wnp@attctc.Dallas.TX.US (Wolf Paul) writes:
: In article <5948@jpl-devvax.JPL.NASA.GOV> lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) writes:
:   >Perl 3.0 beta is now available for testing. ...
:   > ...
:   >If interest warrants I'll post it to alt.sources.
:   >
:   >There, there, don't drool, it's hard on your keyboard.
:   >
:   >Larry Wall
:   >lwall@jpl-devvax.jpl.nasa.gov
: 
: Drooling under control. Here is one vote for posting it to alt.sources.

Ok, one vote is enough.   :-)

I'm posting it to alt.sources.  It should dribble in over the next few days.
Bear in mind this is a beta test version, and I won't send out patches for
it.  In fact, I expect you to send patches to me.  Thanks.

Larry

Larry

darryl@lemuria.UUCP (Darryl P. Wagoner) (09/05/89)

Here is another vote for alt.sources
-- 
Darryl Wagoner		(home) dpw@lemuria.uucp 
Crosfield-Hastech; 	OS/2, Just say No!
Manchester,NH  			(w) 603-623-3330 (h) 603-465-7130
UUCP:  ubbs-nh!lemuria!dpw

blm@6sigma.UUCP (Brian Matthews) (09/06/89)

If I've missed it, I apologize, but could we persuade you, Larry, to take
a few minutes and give us a quick summary of what's new in Perl 3.0?
-- 
Brian L. Matthews			blm@6sigma.UUCP
Six Sigma CASE, Inc.			+1 206 854 6578
PO Box 40316, Bellevue, WA  98004

tpo@dde.dk (Thomas Peter Sonne Olesen) (09/06/89)

Here is another vote for alt.sources
-- 
|      |   |       |********************************************************
|    __| __| __    | Thomas P.S. Olesen 
|   /  |/  |/__>   | Dansk Data Elektronik A/S  -   Kernel development group
|   \__/\__/\__    | Email: tpo@dde.dk      or      ..!uunet!mcvax!dkuug!tpo

kebsch@nixpbe.uucp (09/08/89)

> Perl 3.0 beta is now available for testing.  You can get it via anonymous
> ...
> If interest warrants I'll post it to alt.sources.
> ..
> Larry Wall
> lwall@jpl-devvax.jpl.nasa.gov

Here my vote for posting it in comp.sources.unix, because I think,
there are more people getting this group than alt.sources?????????

Greetings

Waldemar Kebsch
--------------------------------------------------------------------------
UUCP: Europe:  {mcvax!}unido!nixpbe!kebsch.pad
     !Europe:  {uunet!philabs!}linus!nixbur!kebsch.pad
NERV ......:   kebsch.pad
Papermail .:   Waldemar Kebsch, Nixdorf Computer AG, Developement Support,
	       Pontanusstr. 55, D-4790 Paderborn, W-Germany

lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) (09/08/89)

In article <294@6sigma.UUCP> blm@6sigma.UUCP (Brian Matthews) writes:
: If I've missed it, I apologize, but could we persuade you, Larry, to take
: a few minutes and give us a quick summary of what's new in Perl 3.0?

Well, I posted it in some other newsgroup a while ago, but since it's changed
some since then, here is the current Changes file:


Changes to perl
---------------

Apart from little bug fixes, here are the new features:

Perl can now handle binary data correctly and has functions to pack and
unpack binary structures into arrays or lists.  You can now do arbitrary
ioctl functions.

You can do i/o with sockets and select.

You can now write packages with their own namespace.

You can now pass things to subroutines by reference.

The debugger now has hooks in the perl parser so it doesn't get confused.
The debugger won't interfere with stdin and stdout.  New debugger commands:
	n		Single step around subroutine call.
	l min+incr	List incr+1 lines starting at min.
	l		List incr+1 more lines.
	l subname	List subroutine.
	b subname	Set breakpoint at first line of subroutine.
	S		List subroutine names.
	D		Delete all breakpoints.
	A		List line actions.
	< command	Define command before prompt.
	> command	Define command after prompt.
	! number	Redo command (default previous command).
	! -number	Redo numberth to last command.
	h -number	Display last number commands (default all).
	p expr		Same as \"print DBout expr\".
	V package	Dump all variables in package.

The rules are more consistent about where parens are needed and
where they are not.  In particular, unary operators and list operators now
behave like functions if they're called like functions.

There are some new quoting mechanisms:
	$foo = q/"'"'"'"'"'"'"/;
	$foo = qq/"'"''$bar"''/;
	$foo = q(hi there);
	$foo = <<'EOF' x 10;
	Why, it's the old here-is mechanism!
	EOF

You can now work with array slices (note the initial @):
	@foo[1,2,3];
	@foo{'Sun','Mon','Tue','Wed','Thu','Fri','Sat'} = (1,2,3,4,5,6,7);
	@foo{split} = (1,1,1,1,1,1,1);

There's now a range operator that works in array contexts:
	for (1..15) { ...
	@foo[3..5] = ('time','for','all');
	@foo{'Sun','Mon','Tue','Wed','Thu','Fri','Sat'} = 1..7;

You can now reference associative arrays as a whole:
	%abc = %def;
	%foo = ('Sun',1,'Mon',2,'Tue',3,'Wed',4,'Thu',5,'Fri',6,'Sat',7);

Associative arrays can now be bound to a dbm or ndbm file.  Perl automatically
caches references to the dbm file for you.

An array or associative array can now be assigned to as part of a list, if
it's the last thing in the list:
	($a,$b,@rest) = split;

An array or associative array may now appear in a local() list.
	local(%assoc);
	local(@foo) = @_;

Array values may now be interpolated into strings:
	`echo @ARGV`;
	print "first three = @list[0..2]\n";
	print "@ENV{keys(ENV)}";
	($" is used as the delimiter between array elements)

Array sizes may be interpolated into strings:
	print "The last element is $#foo.\n";

Array values may now be returned from subroutines, evals, and do blocks.

Lists of values in formats may now be arbitrary expressions, separated
by commas.

Subroutine names are now distinguished by prefixing with &.  You can call
subroutines without using do, and without passing any argument list at all:
	$foo = &min($a,$b,$c);
	$num = &myrand;

You can use the new -u switch to cause perl to dump core so that you can
run undump and produce a binary executable image.  Alternately you can
use the "dump" operator after initializing any variables and such.

Perl now optimizes splits that are assigned directly to an array, or
to a list with fewer elements than the split would produce, or that
split on a constant string.

Perl now optimizes on end matches such as /foo$/;

Perl now recognizes {n,m} in patterns to match preceding item at least n times
and no more than m times.  Also recognizes {n,} and {n} to match n or more
times, or exactly n times.  If { occurs in other than this context it is
still treated as a normal character.

Perl now optimizes "next" to avoid unnecessary longjmps and subroutine calls.

Perl now optimizes appended input: $_ .= <>;

Substitutions are faster if the substituted text is constant, especially
when substituting at the beginning of a string.  This plus the previous
optimization let you run down a file comparing multiple lines more
efficiently. (Basically the equivalents of sed's N and D are faster.)

Similarly, combinations of shifts and pushes on the same array are much
faster now--it doesn't copy all the pointers every time you shift (just
every n times, where n is approximately the length of the array plus 10,
more if you pre-extend the array), so you can use an array as a shift
register much more efficiently:
	push(@ary,shift(@ary));
or
	shift(@ary); push(@ary,<>);

The shift operator used inside subroutines now defaults to shifting
the @_ array.  You can still shift ARGV explicitly, of course.

The @_ array which is passed to subroutines is a local array, but the
elements of it are passed by reference now.  This means that if you
explicitly modify $_[0], you are actually modifying the first argument
to the routine.  Assignment to another location (such as the usual
local($foo) = @_ trick) causes a copy of the value, so this will not
affect most scripts.  However, if you've modified @_ values in the
subroutine you could be in for a surprise.  I don't believe most people
will find this a problem, and the long term efficiency gain is worth
a little confusion.

Perl now detects sequences of references to the same variable and builds
switch statements internally wherever reasonable.

The substr function can take offsets from the end of the string.

The substr function can be assigned to in order to change the interior of a
string in place.

The split function can return as part of the returned array any substrings
matched as part of the delimiter:
	split(/([-,])/, '1-10,20')
returns
	(1,'-',10,',',20)

If you specify a maximum number of fields to split, the truncation of
trailing null fields is disabled.

You can now chop lists.

Perl now uses /bin/csh to do filename globbing, if available.  This means
that filenames with spaces or other strangenesses work right.

Perl can now report multiple syntax errors with a single invocation.

Perl syntax errors now give two tokens of context where reasonable.

Perl will now report the possibility of a runaway multi-line string if
such a string ends on a line with a syntax error.

The assumed assignment in a while now works in the while modifier as
well as the while statement.

Perl can now warn you if you use numeric == on non-numeric string values.

New functions:
	mkdir and rmdir
	getppid
	getpgrp and setpgrp
	getpriority and setpriority
	chroot
	ioctl and fcntl
	flock
	readlink
	lstat
	rindex			- find last occurrence of substring
	pack and unpack		- turn structures into arrays and vice versa
	read			- just what you think
	warn			- like die, only not fatal
	dbmopen and dbmclose	- bind a dbm file to an associative array
	dump			- do core dump so you can undump
	reverse			- turns an array value end for end
        defined                 - does an object exist?
        undef                   - make an object not exist
	vec			- treat string as a vector of small integers
	fileno			- return the file descriptor for a handle
	wantarray		- was subroutine called in array context?
	gethostbyname
	gethostbyaddr
	gethostent
	sethostent
	endhostent
	getnetbyname
	getnetbyaddr
	getnetent
	setnetent
	endnetent
	getprotobyname
	getprotobynumber
	getprotoent
	setprotoent
	endprotoent
	getservbyname
	getservbyport
	getservent
	setservent
	endservent

Changes to s2p
--------------

In patterns, s2p now translates \{n,m\} correctly to {n,m}.

In patterns, s2p no longer removes backslashes in front of |.

In patterns, s2p now removes backslashes in front of [a-zA-Z0-9].

S2p now makes use of the location of perl as determined by Configure.


Changes to a2p
--------------

A2p can now accurately translate the "in" operator by using perl's new
"defined" operator.

A2p can now accurately translate the passing of arrays by reference.

Larry Wall
lwall@jpl-devvax.jpl.nasa.gov

jgreely@oz.cis.ohio-state.edu (J Greely) (09/13/89)

In article <3100002@nixpbe> kebsch@nixpbe.uucp writes:
>[larry Wall said (shhh...)]
>> Perl 3.0 beta is now available for testing.  You can get it via anonymous
>> If interest warrants I'll post it to alt.sources.

>Here my vote for posting it in comp.sources.unix, because I think,
>there are more people getting this group than alt.sources?????????

Not a good idea.  The point of sending it to alt.sources was that this
is a *beta* release.  The final copy will almost certainly be posted
to c.s.u, as 1.0 and 2.0 were.  It is set up for ftp from both
jpl-devvax.jpl.nasa.gov and tut.cis.ohio-state.edu (and probably
others), and if enough UUCPish people request it, I can put it on
osu-cis for anonymous uucp access.


			Hypertext, WYSIWYG, Cyberpunk, AI.  The Four
			Horsemen of Madison Avenue.
-=-
J Greely (jgreely@cis.ohio-state.edu; osu-cis!jgreely)

jgreely@oz.cis.ohio-state.edu (J Greely) (09/14/89)

In article <JGREELY.89Sep13122153@oz.cis.ohio-state.edu>
 jgreely@oz.cis.ohio-state.edu (J Greely) writes:
>It is set up for ftp from both jpl-devvax.jpl.nasa.gov and
>tut.cis.ohio-state.edu (and probably others), and if enough UUCPish
>people request it, I can put it on osu-cis for anonymous uucp access.

Imagine my surprise when I discovered that, thanks to the
reorganization of osu-cis (now a Pyramid who speaks NFS), it already
*is* available for anonymous UUCP.


		"Who *is* this guy?"
				"You'll have to excuse him... he works
				 for the government."
-=-
J Greely (jgreely@cis.ohio-state.edu; osu-cis!jgreely)

allbery@NCoast.ORG (Brandon S. Allbery) (09/15/89)

As quoted from <3100002@nixpbe> by kebsch@nixpbe.uucp:
+---------------
| > Perl 3.0 beta is now available for testing.  You can get it via anonymous
| > ...
| > If interest warrants I'll post it to alt.sources.
| > ..
| > lwall@jpl-devvax.jpl.nasa.gov
| 
| Here my vote for posting it in comp.sources.unix, because I think,
| there are more people getting this group than alt.sources?????????
+---------------

I think not.  Larry probably doesn't want the beta copy enshrined in archives
all over the net, since it will (hopefully) soon be superseded by the *real*
3.0.  For this reason, both comp.sources.unix and c.s.misc are out of the
running.  About all that's left is comp.sources.misc.

-> Suggestion:  how about "comp.sources.beta", a (possibly moderated)
newsgroup operating along the same lines as c.s.misc, but with only temporary
archiving.  When the release version comes out (presumably in .misc or .unix),
the beta archive copies are flushed and possibly replaces with a pointer to
the released version.

++Brandon
-- 
Brandon S. Allbery, moderator of comp.sources.misc	     allbery@NCoast.ORG
uunet!hal.cwru.edu!ncoast!allbery		    ncoast!allbery@hal.cwru.edu
bsa@telotech.uucp, 161-7070 BALLBERY (MCI), ALLBERY (Delphi), B.ALLBERY (GEnie)
Is that enough addresses for you?   no?   then: allbery@uunet.UU.NET (c.s.misc)

allbery@NCoast.ORG (Brandon S. Allbery) (09/15/89)

As quoted from <1989Sep15.011030.1660@NCoast.ORG> by allbery@NCoast.ORG (Brandon S. Allbery):
+---------------
| 3.0.  For this reason, both comp.sources.unix and c.s.misc are out of the
| running.  About all that's left is comp.sources.misc.
+------------------------------------^^^^^^^^^^^^^^^^^  uh... OOPS!

WHOOPS!  Only 25 and brain-rot is setting in already.  ;-)
I meant to say, "About all that's left is alt.sources."  Sigh.

++Brandon
-- 
Brandon S. Allbery, moderator of comp.sources.misc	     allbery@NCoast.ORG
uunet!hal.cwru.edu!ncoast!allbery		    ncoast!allbery@hal.cwru.edu
bsa@telotech.uucp, 161-7070 BALLBERY (MCI), ALLBERY (Delphi), B.ALLBERY (GEnie)
Is that enough addresses for you?   no?   then: allbery@uunet.UU.NET (c.s.misc)

bill@twwells.com (T. William Wells) (09/16/89)

In article <1989Sep15.011030.1660@NCoast.ORG> allbery@ncoast.ORG (Brandon S. Allbery) writes:
: -> Suggestion:  how about "comp.sources.beta", a (possibly moderated)
: newsgroup operating along the same lines as c.s.misc, but with only temporary
: archiving.  When the release version comes out (presumably in .misc or .unix),
: the beta archive copies are flushed and possibly replaces with a pointer to
: the released version.

That's pretty much what happens with alt.sources. People post betas
there quite frequently. But I'd go along with a mainstream group.

---
Bill                    { uunet | novavax | ankh | sunvice } !twwells!bill
bill@twwells.com