From: Ron Blaschke
Just for fun, I tried to build and run perl1 on Windows XP and Cygwin (gcc
3.4.4). There were some simple tweaks necessary (patch attached), but the
result is not bad. Only 1 test is failing, but I haven't checked why.
C:\usr\src\perl-1.0_16\t>..\perl TEST
base.cond...ok
base.if...ok
base.lex...ok
base.pat...ok
base.term...ok
comp.cmdopt...ok
comp.cpp...ok
comp.decl...ok
comp.multiline...ok
comp.term...ok
cmd.elsif...ok
cmd.for...ok
cmd.mod...ok
cmd.subval...ok
cmd.while...ok
io.argv...ok
io.fs...ok
io.inplace...cat: .a: No such file or directory
cat: .b: No such file or directory
cat: .c: No such file or directory
FAILED on test 1
io.print...ok
io.tell...ok
op.append...ok
op.auto...ok
op.chop...ok
op.cond...ok
op.crypt...ok
op.do...ok
op.each...ok
op.eval...ok
op.exec...ok
op.exp...ok
op.flip...ok
op.fork...ok
op.goto...ok
op.int...ok
op.join...ok
op.list...ok
op.magic...ok
op.oct...ok
op.ord...ok
op.pat...ok
op.push...ok
op.repeat...ok
op.sleep...ok
op.split...ok
op.sprintf...ok
op.stat...ok
op.subst...ok
op.time...ok
op.unshift...ok
Failed 1 test.
Ron
From: Nicholas Clark
On Thu, Mar 17, 2005 at 09:30:54PM +0530, Sapna Jain wrote:
>
> Hello,
>
> I m working in optimizing compilers, So, i want to study the perl
> compiler, how it compiles the program, and generate c code, and nay
> opportunities to improve the compilation process.
You probably wanted to ask your question on the perl5-porters list, rather
than the perl1-porters list. The perl1 list is for things relating to keeping
the first version of perl compiling, mainly for curiosity.
The main perl interpreter doesn't generate C code. Instead it compiles down
to an internal tree of opcodes for the internal stack based virtual machine.
I believe that there were some experiments in outputting C code using the B
extension, but that work has been mostly abandoned now. You might want to
look in ext/B/B/C.pm and ext/B/B/CC.pm in the perl5 source distribution.
The documentation in CC.pm (search for =head1) suggests that it never did
any real optimisation, so even this is probably not of interest to you.
parrot, the virtual machine for Perl 6 currently under development, can
output native executables, but it does that using its JIT compiler
directly on its bytecode. I'm not sure if it has had a backend to output
C code. You could ask about parrot on perl6-internals@perl.org.
Nicholas Clark
From: Sapna Jain
Hello,
I m working in optimizing compilers, So, i want to study the perl
compiler, how it compiles the program, and generate c code, and nay
opportunities to improve the compilation process.
But i could not find the files of perl source code, that usually do the
compilation part.
So, if you know about the source files, used for compilation please let me
know, also if you have any documentation related to it.
Thanks,
sapna
-----------------------------------------------------------------------------
Only when you believe in your dreams...
you can make them come true !
------------------------------------------------------------------------------
Sapna Jain
Mtech 1 CSE
IITB
------------------------------------------------------------------------------
From: Rafael Garcia-Suarez
Michael G Schwern wrote:
> The latest release of Perl is missing from perlhist. ;)
> http://archive.develooper.com/perl1-porters@perl.org/msg00036.html
>
> --- pod/perlhist.pod 2003/03/24 08:44:49 1.1
> +++ pod/perlhist.pod 2003/03/24 08:49:56
Thanks, applied as #19058 ;-)
> @@ -73,6 +73,7 @@
>
> 1.001..10 1988-Jan-30
> 1.011..14 1988-Feb-02
> + Schwern 1.0.15 2002-Dec-18 Modernization
From: Michael G Schwern
The latest release of Perl is missing from perlhist. ;)
http://archive.develooper.com/perl1-porters@perl.org/msg00036.html
--- pod/perlhist.pod 2003/03/24 08:44:49 1.1
+++ pod/perlhist.pod 2003/03/24 08:49:56
@@ -73,6 +73,7 @@
1.001..10 1988-Jan-30
1.011..14 1988-Feb-02
+ Schwern 1.0.15 2002-Dec-18 Modernization
Larry 2.000 1988-Jun-05
--
Beer still cheaper than crack!
From: Richard Clamp
On Thu, Dec 19, 2002 at 02:10:44AM +0100, St?phane Payrard wrote:
> % ./Configure -des
> %make
> make: *** No rule to make target `<built-in>', needed by `arg.o'.Stop.
Nick Clark gave me a pointer - it's down to gcc 3.x's cpp giving extra
information in it's output. Here's a patch slightly cargo-culted from
bleadperls makedepend.SH to make it exclude some of these.
--- makedepend.SH 2002-12-18 23:44:13.000000000 +0000
+++ makedepend.SH.new 2002-12-19 12:11:12.000000000 +0000
@@ -88,6 +88,10 @@
-e '}'
$cpp -I/usr/local/include -I. $file.c | \
$sed \
+ -e '/^#.*<stdin>/d' \
+ -e '/^#.*<builtin>/d' \
+ -e '/^#.*<built-in>/d' \
+ -e '/^#.*<command line>/d' \
-e '/^# *[0-9]/!d' \
-e 's/^.*"\(.*\)".*$/'$filebase'.o: \1/' \
-e 's|: \./|: |' \
--
Richard Clamp <richardc@unixbeard.net>
From: Stéphane Payrard
On (18/12/02 15:55), Michael G Schwern wrote:
> Date: Wed, 18 Dec 2002 15:55:32 -0800
> From: Michael G Schwern <schwern@pobox.com>
> To: perl5-porters@perl.org, perl1-porters@perl.org
> Subject: Perl 1.0.15 released
[snipped]
>
> As a birthday present to Perl and Larry, through the work of the
> perl1-porters, in particular Richard Clamp, resurrected here is Perl 1.0
> with minimal patches for modern machines.
>
> http://www.pobox.com/~schwern/src/perl-1.0_15.tar.gz
>
That was much need to shut up the nay-sayer who refuse one liners
because perl is soooo big and propose in the same breath horrors
like: cat foobar | sed -e ...
^
| sic!
who fork and pipe at nauseam.
In my Mandrake cooker box (dev version post mdk 9.0), I do :
% ./Configure -des
%make
make: *** No rule to make target `<built-in>', needed by `arg.o'.Stop.
I did not investigate it cuz I want my bed. :)
> --
>
> Michael G. Schwern <schwern@pobox.com> http://www.pobox.com/~schwern/
> Perl Quality Assurance <perl-qa@perl.org> Kwalitee Is Job One
> Cottleston, Cottleston, Cottleston Pie.
> Why does a chicken, I don't know why.
> Ask me a riddle and I reply:
> "Cottleston, Cottleston, Cottleston Pie."
--
stef
From: Dave Mitchell
On Wed, Dec 18, 2002 at 03:55:32PM -0800, Michael G Schwern wrote:
> As a birthday present to Perl and Larry, through the work of the
> perl1-porters, in particular Richard Clamp, resurrected here is Perl 1.0
> with minimal patches for modern machines.
>
> http://www.pobox.com/~schwern/src/perl-1.0_15.tar.gz
Way to go !!! (or some other such Americanish expression of pleasure).
If only bleedperl would configure and compile as quickly.
(I notice that perl1's entire src has about the same number of lines as
sv.c. That's progress ;-)
--
In England there is a special word which means the last sunshine
of the summer. That word is "spring".
From: John Porter
Hey, thanks to everyone for getting this distro out,
especially in time for perl's birthday.
Now, when I 'make depend', it brings my linux box to its knees.
I mean it absolutely slammed my machine. No mouse movement,
screen clock didn't tick for almost an hour. Just disk grinding.
At one point, I got a glimpse of 'top' and it showed a huge
number of 'make depend's running. I had to hit the big red
button.
I'm no expert, but something tells me that this is not normal. :-)
Is anyone else experiencing this?
Thanks,
John Douglas Porter
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
From: Michael G Schwern
"...I was within there, and all I viewed,
the chambered treasure, when chance allowed me
(and my path was made in no pleasant wise)
under the earth-wall. Eager, I seized
such heap from the hoard as hands could bear
and hurriedly carried it hither back
to my liege and lord. Alive was he still,
still wielding his wits. The wise old man
spake much in his sorrow, and sent you greetings
and bade that ye build, when he breathed no more,
on the place of his balefire a barrow high,
memorial mighty. Of men was he
worthiest warrior wide earth o'er
the while he had joy of his jewels and burg.
Let us set out in haste now, the second time
to see and search this store of treasure,
these wall-hid wonders, -- the way I show you, --
where, gathered near, ye may gaze your fill
at broad-gold and rings. Let the bier, soon made,
be all in order when out we come,
our king and captain to carry thither
-- man beloved -- where long he shall bide
safe in the shelter of sovran God."
-- Wiglaf, son of Weohstan
As a birthday present to Perl and Larry, through the work of the
perl1-porters, in particular Richard Clamp, resurrected here is Perl 1.0
with minimal patches for modern machines.
http://www.pobox.com/~schwern/src/perl-1.0_15.tar.gz
--
Michael G. Schwern <schwern@pobox.com> http://www.pobox.com/~schwern/
Perl Quality Assurance <perl-qa@perl.org> Kwalitee Is Job One
Cottleston, Cottleston, Cottleston Pie.
Why does a chicken, I don't know why.
Ask me a riddle and I reply:
"Cottleston, Cottleston, Cottleston Pie."
From: Richard Clamp
On Tue, Aug 13, 2002 at 08:46:31PM +0100, Richard Clamp wrote:
> This leaves me with one failing test on my local boxes - t/comp.decl,
> which currently exits after 5 tests, and throws a big wobbly under
> valgrind[0]. I hope to trap this one later this evening.
I lied, there were two failing tests. op.unshift was also not happy
on Linux/powerpc - valgrind later showed this to be reading outside of
where was malloced, which this I tracked to this in array.c.
if (key > ar->ary_max) {
- int newmax = key + ar->ary_max / 5;
+ int newmax = key + ar->ary_max;
ar->ary_array = (STR**)saferealloc((char*)ar->ary_array,
(newmax+1) * sizeof(STR*));
It feels like the right solution as I can't really see why it was / 5
before, can anyone correct/enlighten me?
I've badly papered over a crack in stab.c, maybe someone wiser can
debug this:
case '~':
- safefree(curoutstab->stab_io->fmt_name);
+ /* FIXME: investigate more carefully. When the following
+ * safefree is allowed to happen the subsequent stabent call
+ * results in a segfault. Commenting it out is a cheap band-aid
+ * and probably a memory leak rolled into one
+ * -- richardc 2002-08-14
+ */
+ /* safefree(curoutstab->stab_io->fmt_name); */
curoutstab->stab_io->fmt_name = str_get(str);
curoutstab->stab_io->fmt_stab = stabent(str_get(str),TRUE);
break;
I can now dubiously claim test passes on Linux and Mac OS X 10.1.5 on
powerpc, Linux and OpenBSD-3.1 on x86.
There are 2 current valgrind errors[0], and a whole bunch of memory
leaks, but I'm calling it progress. Please could folks with other
architectures grab a version from my repository[1] and email me if it
works. Thanks.
[0] http://unixbeard.net/~richardc/lab/grinder/errors.html
[1] http://mirth.unixbeard.net/cgi-bin/viewcvs.cgi/perl1/perl1.tar.gz?tarball=1
--
Richard Clamp <richardc@unixbeard.net>
From: Richard Clamp
The attached patch prevents the double-free that t/op.each was
provoking.
This leaves me with one failing test on my local boxes - t/comp.decl,
which currently exits after 5 tests, and throws a big wobbly under
valgrind[0]. I hope to trap this one later this evening.
Are there any more obvious failures that I'm not seeing on my
dev architectures?
[0] http://unixbeard.net/~richardc/lab/grinder/system-malloc/comp.decl.txt
--
Richard Clamp <richardc@unixbeard.net>
From: John Porter
Richard Clamp wrote:
> My laziness is kicking in ...
Laziness is not a virtue in an engineer, Larry's cute aphorism
not withstanding.
> ...to say surely that's what the list archives are for?
Seems to me going back through the archives to try to make sense
out of what all was done is considerably more work than logging
the important bits in a journal as they happen. Particularly
considering not every interesting thing that happens gets
mentioned on the wire.
Now maybe I'm being presumptuous about what the pumpking is or
isn't already doing; but I would just hope that, as lead
engineer, he's doing at least this.
On the other hand, if it is firmly believed that the sort of
things we're now doing on perl1 have never been done before
and will never be done again, then, sure, screw the log.
--
JohnDouglasPorter
__________________________________________________
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com
From: Richard Clamp
On Mon, Aug 05, 2002 at 12:00:55PM -0400, Andy Dougherty wrote:
> On Sun, 4 Aug 2002, Richard Clamp wrote:
> > On Sat, Aug 03, 2002 at 04:01:58PM -0400, Garth Sainio wrote:
> > > If you pass the -fwritable-strings to gcc that seems to solve the
> >
> > Excellent news. I think I was kicking an inverse solution by using
> > strdup to make a locally writable copy. I didn't realise I could have
> > the compiler do it for me, but now I do I much refer your solution
> > since it's a much smaller change.
>
> Without looking at the code in question, I suspect that the strdup() fix
> is the right one. Not everyone has gcc.
But do things !gcc have string constants as being unwritable? I'm not
quibbling, I'll make the patch anyway, it's just my curiosity about
other ccs showing itself.
> If you take a modern metaconfig and just point it at perl1, it'll
> automatically generate a modern Configure that will understand hints.
Wow, yes. That was nifty. I've nabbed all the hints from 5.8.0 and
added them to my repository.
> None of this would add to perl1 "bloat" -- just ease the Configure and
> build process. Some changes to perl1 source would be required to use the
> "new" symbol names/conventions introduced to Configure over the past
> decade or so, but it'd probably be worth it.
The only one that I encountered was HAS_CRYPT changing from CRYPT, it
did suggest that I should update some symbols (see attached) but I
didn't yet.
--
Richard Clamp <richardc@unixbeard.net>
From: Richard Clamp
On Mon, Aug 05, 2002 at 12:10:29PM -0400, Andy Dougherty wrote:
> On Sun, 4 Aug 2002, Michael G Schwern wrote:
> > Small scale portability, modernization and bug fixes preferred.
>
> lots of perl1 bug fixes can be found already implemented in the perl2
> sources.
Top tip. Thanks.
> I recognize that perl2 doesn't have the same marketing appeal as perl1,
> and that may ultimately be more important, but it's worth a moment's
> thought.
My moments thought (after getting my first compile of perl1) was
"right! let's get cracking on perls 2-4". The idea still has a lot of
appeal to me, but my aim is currently to get a perl1 that passes all
its tests on as many systems as I can find, then go from there.
--
Richard Clamp <richardc@unixbeard.net>
From: Richard Clamp
On Mon, Aug 05, 2002 at 01:00:32PM -0700, John Porter wrote:
> /me dons Software Engineer cap.
>
> I suggest that someone (preferrably, but not necessarily, the
> pumpking) maintain an engineering notebook (blog) in which to
> record all the things that it took to bring perl1 to the goal
> state. I would think this knowledge could be useful for
> other projects of a similar nature. E.g. the metaconfig mods
> would be *very* interesting.
My laziness is kicking in to say surely that's what the list archives
are for? For example, this was when I used metaconfig to make a new
../Configure: http://nntp.x.perl.org/group/perl.perl1.porters/5
So far that's been enough to get it compiling on osx and two
architectures of linux for me.
I'm still interested in looking through the perl5 metaconfig units to
see what else is worth stealing, but I'm currently fostering the hunch
that we'll need a lot less Configure magic to bootstrap perl1 than 5.
--
Richard Clamp <richardc@unixbeard.net>
From: John Porter
Andy Dougherty wrote:
> . . .
> Alas, the metaconfig used to generate perl is maintained in the
> perforce repository.
> I'm currently checking those units out and revising some of the
> instructions to hand back to Hugo for 5.9.0. When that's done, I
> can also make those units available if people would be interested.
> ...
/me dons Software Engineer cap.
I suggest that someone (preferrably, but not necessarily, the
pumpking) maintain an engineering notebook (blog) in which to
record all the things that it took to bring perl1 to the goal
state. I would think this knowledge could be useful for
other projects of a similar nature. E.g. the metaconfig mods
would be *very* interesting.
--
JohnDouglasPorter
__________________________________________________
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com
From: Brian Ingerson
On 05/08/02 12:10 -0400, Andy Dougherty wrote:
> On Sun, 4 Aug 2002, Michael G Schwern wrote:
>
> > I'm currently travelling around and won't be ready to organize this show for
> > a week or two yet. I've already put the wheels in motion to set up the
> > necessary infrastructure, so that should all be ready to go once I've
> > settled down.
>
> One question before you go too far: Would you consider doing
> perl2 instead of perl1? I ask because the perl2/Changes file lists
> the following two items that I think are particularly relevant:
I have considered land grabbing the pumpking job for Perl2 or Perl3.
(It's only a matter of time, right?) But right now I have more important
things to do, like backporting Inline and YAML support into Perl1. Oh,
and of course into the Korn Shell as well.
Cheers, Brian
From: Andy Dougherty
On Sun, 4 Aug 2002, Michael G Schwern wrote:
> I'm currently travelling around and won't be ready to organize this show for
> a week or two yet. I've already put the wheels in motion to set up the
> necessary infrastructure, so that should all be ready to go once I've
> settled down.
One question before you go too far: Would you consider doing
perl2 instead of perl1? I ask because the perl2/Changes file lists
the following two items that I think are particularly relevant:
New regexp routines derived from Henry Spencer's.
Support for /(foo|bar)/.
Support for /(foo)*/ and /(foo)+/.
\s for whitespace, \S nonwhitespace
\d for digit, \D nondigit
The manual is now not lying when it says that perl is generally faster
than sed. I hope.
There's lots of other stuff too, but having the same basic regex
engine as later perls might be useful for benchmarking. Also,
> Small scale portability, modernization and bug fixes preferred.
lots of perl1 bug fixes can be found already implemented in the perl2
sources.
I recognize that perl2 doesn't have the same marketing appeal as perl1,
and that may ultimately be more important, but it's worth a moment's
thought.
--
Andy Dougherty doughera@lafayette.edu
Dept. of Physics
Lafayette College, Easton PA 18042
From: Andy Dougherty
On Sun, 4 Aug 2002, Richard Clamp wrote:
> On Sat, Aug 03, 2002 at 04:01:58PM -0400, Garth Sainio wrote:
> > On Sat, 3 Aug 2002, Richard Clamp wrote:
> >
> > > More progress. perl -e is still segfaulting, but that's just
> > > happening within the call to mktemp that the -e causes so I think
> > > that's an easy thing to fix.
> >
> > If you pass the -fwritable-strings to gcc that seems to solve the
>
> Excellent news. I think I was kicking an inverse solution by using
> strdup to make a locally writable copy. I didn't realise I could have
> the compiler do it for me, but now I do I much refer your solution
> since it's a much smaller change.
Without looking at the code in question, I suspect that the strdup() fix
is the right one. Not everyone has gcc.
> This does raise a side issue, backporting some of the perl5 hints
> system would help with this in a "it's linux, so it must be gcc and
> -fwritable-strings" way. I'll take a look at this tomorrow if people
> think this is worthwhile (or don't object too loudly).
If you take a modern metaconfig and just point it at perl1, it'll
automatically generate a modern Configure that will understand hints.
None of this would add to perl1 "bloat" -- just ease the Configure and
build process. Some changes to perl1 source would be required to use the
"new" symbol names/conventions introduced to Configure over the past
decade or so, but it'd probably be worth it.
Alas, the metaconfig used to generate perl is maintained in the perforce
repository. I'm currently checking those units out and revising some of
the instructions to hand back to Hugo for 5.9.0. When that's done, I can
also make those units available if people would be interested.
For now, the latest units you can get from CPAN are probably the ones in
my CPAN directory. See Porting/pumpkin.pod in any recent perl5 for how to
obtain metaconfig units.
--
Andy Dougherty doughera@lafayette.edu
Dept. of Physics
Lafayette College, Easton PA 18042
From: Glenn King
Its not a matter of which way I want to go. We're still waiting to hear
from our pumpking exactly where he wants to go, which is what matters.
----- Original Message -----
From: "Michael Stevens" <mstevens@etla.org>
To: <perl1-porters@perl.org>
Sent: Sunday, August 04, 2002 10:20 AM
Subject: Re: Patch for keys(), each(), and values()
> On Sun, Aug 04, 2002 at 10:13:37AM -0500, Glenn King wrote:
> > Just for my own sanity. Makes them act perl perl5ish.
> > ex
> > keys(%ENV)
> > instead of
> > keys(ENV) # YUCK
> > t/op.each was updated accordingly
>
> If you really want to go that way I have a 47mb patch which
> solves ALL issues with perl 1 not acting perl5ish.
>
> Michael
>
> (it might, err, change the version number, too)
>