Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[PATCH] My first patch, for builtins.*

4 views
Skip to first unread message

Andy Lester

unread,
Apr 3, 2006, 12:17:29 AM4/3/06
to Perl 6 Internals
I've been spending a lot of time the past 6 months (more?) doing source
code cleanup on the Perl 5 source code.

I'd like to spend some time doing the same for Parrot, too. I hope that
doing the kind of maintenance I'm interested in makes things easier for
the core Parrot developers do their jobs.

Here's my first patch. Let me know if y'all see this sort of work as
useful, or if I shouldn't bother.

xoxo,
Andy

--
Andy Lester => an...@petdance.com => www.petdance.com => AIM:petdance

builtins.patch

Leopold Toetsch

unread,
Apr 3, 2006, 8:34:18 AM4/3/06
to Andy Lester, Perl 6 Internals
Andy Lester wrote:
> I've been spending a lot of time the past 6 months (more?) doing source
> code cleanup on the Perl 5 source code.

Welcome @ parrot, Andy.

> I'd like to spend some time doing the same for Parrot, too. I hope that
> doing the kind of maintenance I'm interested in makes things easier for
> the core Parrot developers do their jobs.
>
> Here's my first patch. Let me know if y'all see this sort of work as
> useful, or if I shouldn't bother.

Useful and very welcome, thanks, applied - r12096. (I've slightly
modified it, used N_BUILTINS once more).

> xoxo,
> Andy

leo


Chromatic

unread,
Apr 3, 2006, 8:11:28 PM4/3/06
to perl6-i...@perl.org, Andy Lester
On Sunday 02 April 2006 21:17, Andy Lester wrote:

> Here's my first patch. Let me know if y'all see this sort of work as
> useful, or if I shouldn't bother.

Please continue.

In the next round of their scans, Coverity may add Parrot to the list of
projects.

For various annoying reasons, I can't do it, but running CPD over the code
could reveal a lot of interesting information:

http://xrl.us/hq45

-- c

Sean Sieger

unread,
Apr 6, 2006, 11:52:11 PM4/6/06
to perl6-i...@perl.org
chromatic <chro...@wgz.org> writes:
> For various annoying reasons, I can't do it, but running CPD over the code
> could reveal a lot of interesting information:

Done. May I submit the duplications a dupe at a time?

Andy Lester

unread,
Apr 7, 2006, 12:21:06 AM4/7/06
to Sean Sieger, perl6-i...@perl.org

How many are there? I think I'd prefer to see a whole list.

Chromatic

unread,
Apr 7, 2006, 3:14:42 AM4/7/06
to perl6-i...@perl.org, Andy Lester, Sean Sieger
On Thursday 06 April 2006 21:21, Andy Lester wrote:

> On Apr 6, 2006, at 10:52 PM, Sean Sieger wrote:

> > Done. May I submit the duplications a dupe at a time?

> How many are there? I think I'd prefer to see a whole list.

Depending on the size of the list, I agree -- it might be easier to see
patterns of duplication with the whole list.

If it's really big, we can find a website to host it for a while.

-- c

Sean Sieger

unread,
Apr 8, 2006, 10:00:05 AM4/8/06
to perl6-i...@perl.org
chromatic <chro...@wgz.org> writes:
> If it's really big, we can find a website to host it for a while.

I put the result of doing cpd on parrot/src/*.c:

http://mysite.verizon.net/sean.sieger/cpd_12139.txt

Andy Lester

unread,
Apr 8, 2006, 10:12:57 AM4/8/06
to Sean Sieger, perl6-i...@perl.org
On Sat, Apr 08, 2006 at 10:00:05AM -0400, Sean Sieger (sean....@gmail.com) wrote:
> I put the result of doing cpd on parrot/src/*.c:
>
> http://mysite.verizon.net/sean.sieger/cpd_12139.txt

This is cool! Thanks for doing it.

Can you rerun it without the files that are apparently intentionally
dupes of each other? For example, there's jit_cpu.c and exec_cpu.c, and
apparently are exact clones of each other.

xoa

Sean Sieger

unread,
Apr 8, 2006, 11:40:33 AM4/8/06
to perl6-i...@perl.org
an...@petdance.com (Andy Lester) writes:
> This is cool! Thanks for doing it.

My pleasure -- I am looking for a way to contribute.

> Can you rerun it without the files that are apparently intentionally
> dupes of each other? For example, there's jit_cpu.c and exec_cpu.c, and
> apparently are exact clones of each other.

Certainly; but I have a question -- originating in my first view of cpd
results, those of httpd hosted at pmd.sourceforge.net -- are the dupes
that are 'waste' only the ones found in one file? Or, maybe better for
me, how do I discern what you discerned? (I wanna discern!!)

Andy Lester

unread,
Apr 8, 2006, 1:13:27 PM4/8/06
to Sean Sieger, perl6-i...@perl.org
On Sat, Apr 08, 2006 at 11:40:33AM -0400, Sean Sieger (sean....@gmail.com) wrote:
> Certainly; but I have a question -- originating in my first view of cpd
> results, those of httpd hosted at pmd.sourceforge.net -- are the dupes
> that are 'waste' only the ones found in one file? Or, maybe better for
> me, how do I discern what you discerned? (I wanna discern!!)

Look at the tops of the files that have dupes. A couple that I looked
at have "Generated by xxx/xxx/xxx.pl" at the top.

Nicholas Clark

unread,
Apr 8, 2006, 1:26:50 PM4/8/06
to Andy Lester, Sean Sieger, perl6-i...@perl.org
On Sat, Apr 08, 2006 at 12:13:27PM -0500, Andy Lester wrote:
> On Sat, Apr 08, 2006 at 11:40:33AM -0400, Sean Sieger (sean....@gmail.com) wrote:
> > Certainly; but I have a question -- originating in my first view of cpd
> > results, those of httpd hosted at pmd.sourceforge.net -- are the dupes
> > that are 'waste' only the ones found in one file? Or, maybe better for
> > me, how do I discern what you discerned? (I wanna discern!!)
>
> Look at the tops of the files that have dupes. A couple that I looked
> at have "Generated by xxx/xxx/xxx.pl" at the top.

Maybe it's better to run it on a fresh checkout of the parrot source code,
rather than a built tree.

Nicholas Clark

Sean Sieger

unread,
Apr 8, 2006, 2:14:34 PM4/8/06
to perl6-i...@perl.org
Nicholas Clark <ni...@ccl4.org> writes:
> Maybe it's better to run it on a fresh checkout of the parrot source code,
> rather than a built tree.

And this is that result:

http://mysite.verizon.net/sean.sieger/cpd_12143.txt

Andy Lester

unread,
Apr 8, 2006, 6:45:34 PM4/8/06
to Sean Sieger, perl6-i...@perl.org

Thanks for doing this. Can you do it without the autogenerated files
in there? Those, I expect to have duplicated code.

Sean Sieger

unread,
Apr 8, 2006, 7:43:15 PM4/8/06
to perl6-i...@perl.org
Andy Lester <an...@petdance.com> writes:
> Thanks for doing this. Can you do it without the autogenerated files
> in there? Those, I expect to have duplicated code.

As soon as I found the autogenerated files, I thought, 'aren't these

( http://mysite.verizon.net/sean.sieger/12143.txt )

the ones that are not autogenerated?' That's what stopped me earlier.

Sean Sieger

unread,
Apr 8, 2006, 7:45:23 PM4/8/06
to perl6-i...@perl.org
0 new messages