Main Page

From Corehackers

Jump to: navigation, search

Contents

Corehackers

The Concept

The corehackers project was conceived by Chip Salzenberg at YAPC10 as a way to get more people involved in hacking the perl5 core and improving the perl5 from the inside. sungo volunteered to help and, after talking to lots of folks, realized that many perl-only type people want to get involved in the core too. We have one goal: get people excited about the perl5 core. We have two (at least) focuses: a) enable and encourage new very-green people to work on the core. b) enable and encourage experienced p5 core hackers to extend and improve the perl5 core.

Get Involved

  • IRC: #corehackers on irc.perl.org.
  • Source Code: Get it by cloning the Perl 5 repository:
   git clone git://perl5.git.perl.org/perl.git

Feel free to hack away and send us pull requests. (If you're new to git, the official git tutorial might help, at least until we write our own.)

  • If you would like to help out by working on the wiki, you need to create a user account first.

New Hacker Support - Todo List

  • It appears that some of Configure's flags, particularly -D, are completely undocumented. A proper manpage of Configure would be very nice.
  • There are a lot of XS primers out there. Like many Perl intros, some of them suck and some of them are pretty good. Let's document which ones are useful (and possibly offer to host them).
  • For the ultra newbies, I'd like a link to (or a new) C primer. (See Steve Summit's Introductory C Programming Class Notes from C-FAQ.com: [1])
  • We need a proper list of exactly what OSes and compilers Perl supports. And an official definition of what "supported" means. This came out of a p5p conversation so it's wise to coordinate with them.

Testing

  • Creating failing tests is one of the most important things you can do to help the experts to focus. From IRC, Adam Kennedy reports his equivalent situation...
 <Alias> I get a bazillion tickets for PPI
 <Alias> Most I have to ignore, just don't have time to follow up.
 <Alias> But the Perl::Critic guys have commit to the repository.
 <Alias> And what they do instead... sigh... a lot, is commit failing tests.
 <Alias> It's kind of annoying but turning bug reports into failing tests is a huge way
         to make a contribution.
 <Alias> Shit Gets Done after you have them, because the hardcore people with no time can
         jump straight to the problem without all those slow learning, discovery and
         replication phases.

Documentation

  • Pick something at random and see if you can understand it with existing docs (perlguts, perlapi, C comments, etc.)
  • Everything should be documented enough so a person who knows C and Perl can understand it
  • If you can't understand it, then find somebody who does, and write what they tell you :-)
  • Articles about internals - collection of blog posts, articles or any other documents that describe anything related to perl internals and/or XS programming
  • Contribute to the perlapiglossary.pod as you go along!

FAQ's and cookbooks

  • How do I add a new keyword?
  • How do I add a new API function?
  • How do I detect a memory leak?

Bugtracker

There will be a corehackers bugtracker that mashes up rt.perl.org and provides needed functionality for managing the bounties. See the bugtracker spec for more info.

perl5 Core Development Ideas

Language Hacks

  • Perl 6 grammars for parsing whole source files
  • Perl 6 grammar callouts for subsections
  • Good precompilation (commonly called "bytecode")
    • Could be an AST
    • Could be bytecode
    • Could be a nice block of OP structures
    • Simple mmap() for load would be ideal; fixups after loading also possible
    • Integration with @Storable@ would make a better @Storable@ and, probably, an easier implementation
    • Should be compilable and optimisable by a JIT compiler (LLVM)
  • Subroutine signatures (finally!!!)
  • Aliasing, a.k.a. binding (":=" operator - Chip working on this)
  • Read-only aliases (SVt_VIEW - Chip working on this)
  • Methods on non-references
  • use strict 'indirect'
  • default strictures

Performance Hacks

  • Local CPU adaptations a la Atlas
    • Precursor: Write a comprehensive benchmark suite for perl (Hint: Task that doesn't require a master C programmer)
  • Raw C arrays from Perl, e.g. my Integer @array -> I32* inside
  • Cheaper short strings, i.e. SvANY() == SvPVX()
  • C code compilation
    • Conversion of pp_xx functions into inline C for use in Perl->C compilation (but see Faster.pm)
    • Jit (kinda simple dynamic B::CC) http://search.cpan.org/dist/Jit/
  • Improve the performance of split in scalar context
  • oplines: Move cop_line from COP to BASEOP, and save ~90% nextstate ops. http://use.perl.org/~rurban/journal/37504
  • local-op: Do not use a global PL_op at run-time, pass it as stack local. http://github.com/rurban/perl/tree/local-op
  • Switch back from the heap to the C stack as with perl4 for pp (and so XS) arguments. Direct linking, faster access, destruction for free.

Performance+Language Hacks

  • Type inference -> cheaper ops
  • Proper inline functions

Code Cleanup

  • "some parts deep in the regexp engine which do assume a trailing '\0'. I consider these as bugs that need fixing. I suspect that every use of string comparison macros and functions (as distinct from memory comparison functions) needs auditing, to see if they should be converted to memcmp() or similar. Which, unfortunately is a big job. But fortunately is an incremental job." -- Nicholas Clark, p5p
  • remove the dump() function (including making the keyword available for new programs)

New/Improved Features

  • Remove the long deprecated feature where split in scalar context writes to @_
  • Make split in void context a warning

Debated Ideas

Discussion on individual pages below

Cool Ideas

Lots of fun potential ideas are kicking around. They may or may not be explicitly related to the perl5 codebase.

  • scrottie suggested an annual workshop/hackathon for the p5 core.
  • theorbtwo noticed Test::Valgrind, which might be useful for tracking down "this causes a segfault" bugs.

Bug Tracking System

For a brief look at what is inspiring this system take a look at the original post here:

bodybuilding supplements Pre workout supplements /Vegan sports nutrition my-family-lineage

Personal tools