Sunday, August 20, 2006
Wrapping Up
Well, my time for Summer of Code is up. My code isn't complete, which of course means that I'll keep working on it, but as far as Google is concerned, this is what I produced. First, a rundown of what my code does:
-My translator will take a yaml parse of a perl 5 program and at least partially translate it (unless you tell it not to translate). Some yaml files still cause problems that I haven't been able to pin down, but around 98% of yaml files parse without errors.
-The translations that are handeled:
I'm hoping that my progress is considerd good enough for Summer of Code work. I know that I haven't actually complteted my project, mostly because many things I thought were easy ended up hard, and only a few things I thought were hard ended up easy. While the translator isn't complete, I've still provided some good work to the Perl community, and I hope to continue my work, even if my project is not considered a success.
At the very least, I can say I'm proud of my work. I revised my work daily most of the time, and I've learned much more then I thought I would.
I've made every effort to make my code open to others. If anybody wants to join me hacking my translator, it should be well enough documented to make working on it a little easier.
From here, I'm planning to continue work on my translator. First priority is bug fixes and added features, but I'd also like to start work on an expanded version of http://svn.openfoundry.org/pugs/docs/other/porting_howto , since working with this file has shown me how incomplete it is.
Now that my Summer of Code project is (technically) over, I want to thank the Perl community for all the help and support. #perl6 has been particularly useful, as well as everybody I've talked to in the community. Unfortunately, the reality of college means I won't be able to keep up my current pace of development, but I'm not going to leave this code alone either. Before this project I had never been a part of an Open Source project to this degree, and the Perl community made diving into everything, from svn to ghc to anything, easy and interesting.
I'm going to make an effort to make some revisions in the remaining time before the "due" time for my Summer of Code work, but this is essentially my final post. I'll update (likely tomorrow) with any final revisions and thoughts.
-My translator will take a yaml parse of a perl 5 program and at least partially translate it (unless you tell it not to translate). Some yaml files still cause problems that I haven't been able to pin down, but around 98% of yaml files parse without errors.
-The translations that are handeled:
- Sigils are translated. This handels issues such as $hash{key} -> %hash{key} (since sigils are now invariate). Sigils are handled both in use and imbedded in text (and the AST definition of text includes regexs).
- Hash keys are adjusted, in particular for constant keys.
- Conditional expressions are translated. In effect, every ? operator becomes ?? and every : operator becomes !!.
- Regexs are now used with ~~. The =~ operator becomes ~~.
- Regex modifiers, such as //g or //i, are moved to the beginning, m:g// and m:i// (or many at the same time).
- The /e regex modifier is now default, so it's just dropped.
becomes a method call to .readline on the $fh object. - The m at the beginning of a regex in a split is removed.
- length function calls become .chars method calls.
- File handles are closed with a method call to .close
- Splitting on a static space becomes a method call to .words
- foreach loops have a new syntax, going from foreach $foo (@bar){} to foreach @bar -> $foo
- Just about everything inside regexs translates. This includes metacharacters, counts, captures, backtracking, lookahead, and all that other (?...) stuff. This is the majority of the material in http://svn.openfoundry.org/pugs/docs/other/porting_howto which I won't repost here. Regexs are one of the areas I'm most confident in (when the parser doesn't break ;) ).
- An option is included to only change captures inside regexs and just add the :perl5 modifier instead of other translations.
- Heredocs are translated.
- Calls to the scalar function are now handled by +, so scalar@foo becomes +@foo.
- ?foo? becomes m:once/foo/
- Anything exported or export_okay is now exported with the ... is export or ... is export(:MANDATORY).
- Printing to a file now uses a colon after the file handle.
- Variables no declared before use gets declerations, or, optionally, "no strict;" can be used.
I'm hoping that my progress is considerd good enough for Summer of Code work. I know that I haven't actually complteted my project, mostly because many things I thought were easy ended up hard, and only a few things I thought were hard ended up easy. While the translator isn't complete, I've still provided some good work to the Perl community, and I hope to continue my work, even if my project is not considered a success.
At the very least, I can say I'm proud of my work. I revised my work daily most of the time, and I've learned much more then I thought I would.
I've made every effort to make my code open to others. If anybody wants to join me hacking my translator, it should be well enough documented to make working on it a little easier.
From here, I'm planning to continue work on my translator. First priority is bug fixes and added features, but I'd also like to start work on an expanded version of http://svn.openfoundry.org/pugs/docs/other/porting_howto , since working with this file has shown me how incomplete it is.
Now that my Summer of Code project is (technically) over, I want to thank the Perl community for all the help and support. #perl6 has been particularly useful, as well as everybody I've talked to in the community. Unfortunately, the reality of college means I won't be able to keep up my current pace of development, but I'm not going to leave this code alone either. Before this project I had never been a part of an Open Source project to this degree, and the Perl community made diving into everything, from svn to ghc to anything, easy and interesting.
I'm going to make an effort to make some revisions in the remaining time before the "due" time for my Summer of Code work, but this is essentially my final post. I'll update (likely tomorrow) with any final revisions and thoughts.
Comments:
<< Home
Well done! Thanks for all the hard work. Now that it's time to dive back in to classes and the official googleish bit is over, what are the chances you can start sucking other folks in to help with the project?
Best,
Jesse Vincent
Post a Comment
Best,
Jesse Vincent
<< Home
