2008Q4 Grant Proposal: Integrating Padre with Parrot and Rakudo
Sun, 02-Nov-2008 by
Alberto Simões
edit post
* **Name:** Gabor Szabo
* **Project Title:** Integrating Padre with Parrot and Rakudo
* **Synopsis:** Embedding Parrot to be used by Padre for syntax highlighting Perl 6 or any other language defined over Parrot or Perl 6.
**Name:**
Gabor Szabo
**Project Title:**
Integrating Padre with Parrot and Rakudo
**Synopsis:**
Embedding Parrot to be used by Padre for syntax highlighting Perl 6 or any other language defined over Parrot or Perl 6.
**Benefits to the Perl Community:**
Provide a text editor with syntax highlighting of Perl 6 that can be tweaked in Perl 6.
Having a text editor that can be extended in any of the languages that run on Parrot, including Perl 6 will allow call-tips, auto-completion and introspection to be supplied by the respective languages.
Sam Vilain wrote in his blog: ( http://vilain.net/index.php?q=node/69 by ) Allow support syntax highlighting, by attaching highlighting hints to a TGE grammar, effectively allowing you to write a parsing grammar at the same time as a highlighting mode
Effectively Padre will become a text editor and IDE that "runs on Parrot".
It can become one of the first customer facing applications running partially on Rakudo Perl 6.
**Deliverables:**
* Embedding Parrot in Padre using Parrot::Embed that lives in the ext/ directory of Parrot.
* Simple Padre plug-in running on PIR and on Perl 6.
* Syntax highlighting for PIR and Perl 6 using Parrot.
* Call-tips showing optional parameters of a subroutines.
* Integrated help for Perl 6 displaying help relevant to the code currently under the cursor.
**Project Details:**
There is a Perl 6 syntax highlighter in the Pugs directory in pugs/src/perl6/STD_syntax_highlight written in Perl 5. First I'll attempt to create an add-on for Padre using this as syntax highlighter. As this code depends on perl 5.10 and I don't want to make 5.10 a dependency of Padre yet I'll write this as a plug-in of Padre so people can install if they already have 5.10.
As I was writing this proposal I have just managed to embed Parrot in Padre and write a simple plug-in in PIR, that runs on the embedded Parrot engine. This gives a good base to start off with the rest of the project.
A large part of the work will require help from the Parrot and Perl 6 design and development teams. For example Parrot::Embed will have to be further extended to support multiple namespaces and better interaction between the host Perl 5 and Parrot.
The call-tips for Perl 5 were added as a yaml file so they can easily decoupled from Padre and used by other projects. For Perl 6 this needs to be either a yaml file or integrated into Perl 6 making sure that we can have call-tips in several languages.
**Project Schedule:**
I plan to begin the project immediately and finish it within 3 months.
**Bio:**
Gabor Szabo has been programming Perl since 1995 and teaching it since 2000. He has several modules on CPAN and has contributed to many other modules. Gabor is the primary author of Padre.
See also http://szabgab.com/
**Amount Requested:**
USD 1500
Comments (5)
I've been watching Padre out of curiosity but with no intention of switching my editor (vi) since I'm so familiar with it. But I think targeting Perl6/Parrot is an excellent idea since it will allow integration on a level not really seen with an IDE and a dynamic language. Plus any work put into embedding Parrot into a real project like this will almost certainly be beneficial to Parrot on the whole and help other projects to embed it in the future.
This would be very very useful for making Perl 6 "real" for more people.
I don't understand Adam's comment. I don't see how a fledgling just-for-Perl editor targeting Perl 6 will convince anyone any further than the existing Perl 6 tech. Perl 6 modes for existing popular editors, which would actually Perl 6 and PIR tweaks into the tools that people already use seem more likely to draw people to pay attention -- but either way, I don't see a clear benefit to anyone here.
Let me address the main concern mentioned in both of my Padre related proposals.
Padre is NOT limited to editing Perl. While it is mainly targeting the Perl developers, it also provides features for other languages.
As a minimum Padre already provide syntax highlighting to all the major languages (we got this free by using Scintilla).
In addition Padre can be extended. Currently you can write plug-ins in Perl 5 but with the integration of Parrot you'll be able to use any language running on Parrot to write plug-ins.
As a proof-of-concept Padre 0.15 already includes a plug-in that is written in PIR runs on Parrot. If you have it configured.
One of the goals of perl 6 is to make the language be more tool friendly (method extraction, method/sub renaming, auto-completion/type ahead, argument hinting).
Building this will allow users and tool developers to provide feedback to the design team while the language is still evolving rapidly.