|
Perl 6 Cookbook
Thu Jan 1 12:03:10 2009
Tags: Perl, Perl 6, cookbook
In my I decided to prepare a one day training class for Perl 6.
Part of the plan will be to implement the relevant parts of the 414 recipes found
in the 2nd edition of the Perl 5 Cookbook
by Nathan Torkington and Tom Christiansen.
I know there was an effort in the
Pugs repository
to do so along the
PLEAC - Programming Language Examples Alike Cookbook
project but I think it will be fun to try to write all the examples
by myself reading again the Perl 5 Cookbook and trying to write everything using
Padre::Plugin::Perl6 and running over the latest version of
Rakudo.
In general I plan to write one recipe a day but I am sure some of
them will be either trivial or irrelevant for Perl 6. Others might not yet be
available in the Rakudo implementation of Perl 6.
Part of the real cookbook can be read online on
Google books
Trackbacks will show up only after manual approval.
New Year's Resolutions
Thu Jan 1 12:02:03 2009
Tags: 2009, new year, perl, testing
I already had one a couple of month ago Shana Tova - New Year's resolution
so now a few other items.
- Keep writing Padre, the perl IDE.
- Offer the Test Automation using Perl 5 training class in Europe.
- Send more articles to the Test Automation Tips.
- Prepare a one-day training class for Perl 6 and start offering it.
- But most urgently, help preparing the annual accounting papers on time
Trackbacks will show up only after manual approval.
PPI based Syntax highlighting for Perl 5
Tue Dec 30 21:45:25 2008
Tags: Padre, PPI, Perl
Yesterday Padre got a
Portuguese (BR) translation of it GUI.
Today a Spanish translation arrived.
In the morning Adam Kennedy reported a
Massive GDI object leakages
in Padre that would make it basically unusable on Windows.
By the evening Ahmad Zawawi fixed it.
He also fixed a crash I reported earlier.
In the meantime I moved several features from experimental mode to
the regular menu options so more people will start to use them and
give us feedback and error reports. Among these are
- Incremental search with Firefox-like GUI embedded in the main window
- Lexically replace variable which I think works only partially
- PPI based syntax highlighting for Perl 5
The first one has been around for some time just noone promoted it to be
a blessed feature of Padre.
The second one is I think not yet working well but I hope by making it
available to more people someone will come forward and finish it.
The last one, the PPI based syntax highlighting had to be allowed only
to relatively small files as it is still quite slow. So for now I limit
it to files which are less than 10,000 charcters long.
This is actually the most important step for my beginner friendly plans.
Once I can make sure I always have the full PPI structure of the current
document in memory I can start to provide help on the specific elements
of the document.
I also asked the Perl Monks about
The most common errors and warnings in Perl
so I can further encourage people to translate the most important entries
of perldiag.
Trackbacks will show up only after manual approval.
Syntax highlighting for Perl 6
Mon Dec 29 17:17:39 2008
Tags: Perl 6, Padre, TPF, smartlinks
Following the Grant accepted for Integrating Padre with Parrot and Rakudo and Plans for Integrating Padre with Parrot and Rakudo I can
already let you know that the first steps has been made.
Padre is already capable
to provide correct albeit slow syntax highlighting for Perl 6.
Actually it was implemented by Ahmad M. Zawawi,
a neighbor of mine, who is also the maintainer of Syntax::Highlight::Perl6.
That's good news. I have not been playing with Perl 6 in many months
now as some time ago I decided that I'll start to write Perl 6 again
when I can get syntax highlighting in Padre and when I can run my
Perl 6 scripts from within Padre.
That time has come so I've started to write some Perl 6 code but I need the
documentation to be handy. So we are now discussing it on the #padre IRC
channel on how to intgerate Padre with the existing Perl 6 documentation
and how to provide a real-world use case.
I would like to be able to press on F1 and get an explanation of the
element where my cursor is currently located. I'd like to get the
calltips directly from the Perl 6 documentation. As the Perl 6
documentation can be linked to the tests implementing the specific
elements using the smartlinks in the test files we could open
the specific test files for editing right from the documentation.
Trackbacks will show up only after manual approval.
Plans for Integrating Padre with Parrot and Rakudo
Thu Dec 11 23:51:45 2008
Tags: Perl, Padre, Parrot, Rakudo, TPF
As I have just received the notification that my grant request for
Integrating Padre with Parrot and Rakudo was accepted
I'd better start making plans on how to achive this.
This can then be reused by the grant coordinator, whoever that will be
to write up the reports for TPF and Vienna.pm.
I am sure there will be several tasks I need to do in parallel as some of
them (ok, all of them) needs the help of other people to make sure their
side provides what is needed.
The first think I'd like to achive is to integrated the Perl 6 syntax
highlighter that is written in Perl 5. STD_syntax_highlight currently lives
in the Pugs SVN repository as STD_syntax_highlighter in the
perl6 directory
but I have heared from Ahmad M. Zawawi (azawawi) that he is planning on
releasing it to CPAN. That would be awesome as that can make
my dependency definition easier.
Fix the Parrot Plugin of Padre as I think it got out of sync lately.
Probably that Plugin should add the PIR and PASM suppport to Padre, so
those two will need to move out to the Parrot plugin. That will
probably require some changes to Padre as AFAIK it still does
not support the addition of languages via the plugin system.
(Though I have not looked at what Adam Kennedy did lately).
Make sure Parrot::Embed can be loaded and that I can load
the available languages from the Parrot sources. Once this is
done allow developers to write plug-ins in the languaes that
are already supported by Parrot.
The above step might need several iteration as Parrot::Embed might
go through several steps of supporting more and more of the
availiable languages. Most notably Perl 6.
This is going to be a major milestone for Padre as this means Padre
can be extended using Perl 6 running on top of Rakudo.
Then comes the hard part. I'll need to understand how can I get
parsing information back from Parrot. I don't really know what
do I need for this but I hope by this time several of the Parrot,
Perl 6 and Rakudo hackers will be playing with Padre and thus will
be able to help me more.
Once I have the parsing information adding the syntax highlighting
is easy as we already know how to do that in Padre. The question will
be how fast it is going to be and if Parrot can do partial parsing of
a document.
Currently our (as in the Padre developers) biggest trouble with Perl 5
and specifically with PPI is that it is too slow to be useful for syntax
highlighting for anyting bigger than 100 lines. If we could tell PPI to
process the file only from the place where it changed we could save a
lot of time. We'll have to see how this works out with Parrot.
At some point I'll start creating call-tips for Perl 6 based on some
hard coded keywords. For this first I'll have to see if there is already
anything ready that I can reuse and if not where should I create the
content of the calltips. This version of the call-tips will be probably
based on simple keyword recognition. Once the format is defined and the
naive way of showing calltips is working I can let others - more knowledgable
about Perl 6 - fill in the actual text of the call-tips.
Once we have the result from parsing the document we can probably change
the call-tips to use that information better recognizing the part of the
document the cursor is located.
The last part is then to connect to the Perl 6 documentation. For this
I'll have to see what is already available and how can I access and display
it.
I've probably missed some of the steps and I might have not evaluated the
level of difficulty of each one of them. Besides, both in December and
in January I give lots of training classes that will make my progress
slow.
Anyway I am really looking forward this develeopment as that would
turn into Padre a really interesting tool and hopefull will
help the adoption of both Parrot and Perl 6.
Trackbacks will show up only after manual approval.
Grant accepted for Integrating Padre with Parrot and Rakudo
Wed Dec 10 10:37:38 2008
Tags: Padre, Perl, Rakudo, Perl 6, TPF
Shortly before I finished writing about my Plans for the next month or two I received the
news that my grant request for
Perl debugger integration in Padre
was postponed but the grant request to
Integrating Padre with Parrot and Rakudo was
accepted.
So while I was quite disappointed that the Debugger grant was postponed I am glad
at least one of my proposals got accepted and I'd like to thank the people in
Vienna.pm as it turns out they
are financing it and not TPF.
Actually I am quite surprised and disappointed that TPF did not have
the money to finance the quarterly 10,000 USD of grants and that
AFAIK they did not say anything about this earlier.
While they have improved TPF still lacks enough transparency.
For example why is there no public mailing list with all the
TPF officials subscribed where outsiders like me could
initiate project publicly?
Anyway, I think TPF should start a fund raising drive similar to
that of Wikipedia does. Of course they don't need 6,000,000 USD.
They could aim at 100,000 USD.
Wait, if they only raised 40,000 USD that would cover the regular grants
for the next year. We have plenty fo web real estate to promote the fund
drive and I belive there are plenty of Perl users who would chip in with
USD 10-20 or maybe even more. Or are we afraid that they
are all
dead?
TPF only needs to decide on it, setup the accounting,
write up the list of achivements from the previous grants
and create an image we can put on our web sites.
I would be glad to put it on
CPAN::Forum and I am quite sure
some of the bigger Perl related sites would be readdy to do the same.
I would even volunteer to contact all the site maintainers
personally and ask them to promote the fund drive.
Trackbacks will show up only after manual approval.
Plans for the next month or two
Wed Dec 10 10:00:47 2008
Tags: Padre, Perl IDE, Perl
In the last 5 months I have been developing
Padre quite
in an ad-hoc manner. Whatever came up as interesting I started to work on.
I added many proof-of concept features that were sort-of working.
One of my first aims was to make Padre usable and interesting enough
to attract a few other developers who can carry on the development,
fix and expanded the features I added. This worked quite well as now
there are over 10 people wokring on Padre on and off.
Some of the people took Padre in directions I thought will happen
much later. Its awesome to see others getting enthusiastic about
the potential in the project.
Most of the people who are currently developing Padre are hard-core
Perl developers who already had their own development environment.
They would switch to Padre for the advanced features. So I believe
they will further develop the advanced features attracting more
high-end users who can further add nice features to Padre.
In the meantime I would want to turn my attention to issues that
are more important to beginners.
Download, installation and start-up on Windows.
In the last week I introduced Padre to two classes I am teaching.
In one of the classes I downloaded the
Portable Strawberry Perl with Padre
in the other I let the students download. The latter had trouble
finding what to download that indicates it was not clear what
they need to download and install.
I already started to clean up the web site but I further
need to work on driving the interested users directly
to the download link.
The installation procedure isn't friendly either but
as Adam Kennedy will certainly improve the installation
of Portable Strawberry I'll wait and try to reuse his work.
The latest version of Padre came with the Vi plug-in
which confuses the users. One of them went and turned on
all the plug-ins, including the Vi plug-in which turned
Padre to be totally unusable for him.
Actually the initial pop-up that Padre found several new
plug-ins was already confusing. Several people thought
it to be an error message. Did something go wrong?
they asked.
I already removed the Vi plug-in from core Padre. I'll
have to get rid of the others as well keeping only
My plug-in. Then the version of Padre that is installed
in Portable Strawberry should already know about this plug-in.
Actually probably when Padre first runs we should not give
any pop-up at all. It should just work.
After the pop-up the users got to the editor and stared at
the white screen. Now what?. Remember some of these people
never wrote any Perl code and never used an IDE either so
they don't even expect the F5 - run this script functionality.
Besides, currently Padre does not support reading from STDIN when
runing scripts from within the IDE so effectlively its
run this script feature is unusable for anything but
the simplies scripts (or for GUI applications).
So when a new user launches Padre for the first time it already
should have a simple script in the editor and it probably
should say in its comment press F5 to run this script.
Padre should also support full interaction with the running
scripts including reading from STDIN. Some editors provid this
by running the script in a real shell. This might be a temporary
solution for Padre as well, till we can add support for
reading from STDIN. This has to work at least on Windows.
There are already many features in Padre that beginners
writing simple scripts don't need. E.g. the ack integration,
New ... Perl Distribution just to pick two.
We have discussed the possibility to have a standard set of
features and then to allow more features for advanced users.
I might need to implement this separation or move the advanced
features out to plugins that even if they are installed,
are not turned on by default.
As at one point I'd like to make Padre a bit more general user
friendly as well we might need to be able to support several
default installations or several first-time start up options.
For one, someone who wants to learn Python does not need to see
a Perl script as the first encounter with Padre or he might
mistakenly learn Perl instead of Python.
Trackbacks will show up only after manual approval.
Perlshere
Fri Dec 5 22:39:28 2008
Tags: perl, blog
Perlsphere got several new sources. Including my blog!
Trackbacks will show up only after manual approval.
Portable Padre 0.19 for Windows
Sun Nov 30 17:31:47 2008
Tags: Padre, Perl IDE, Windows
Version 0.19 of Padre
was released two days ago.
Today I finally uploaded a new version of Portable Strawberry Perl that includes Padre.
It is based on the same Beta 1 version of
Portable Strawberry Perl as was the
previous version but this time it includes Padre 0.19.
For instruction on how to download
visit here
Trackbacks will show up only after manual approval.
10-fold grows in Padre user base
Thu Nov 27 17:49:46 2008
Tags: perl, IDE, Padre, Ohloh
It was just a month ago that I wrote Compare Languages by usage.
That was the time when I opened
my Ohloh account
and registered the Padre project.
I listed myself as the first user of Padre.
Today, just a month later there are already 10 users.
As anyone dealing with marketing knows this a good oppotunity to show how
well the project does.
A 10-fold monthly growth rate means that in a year we'll have
exactly 1,000,000,000,000 users. (=10**12).
Dislaimer: I barely passed my Marketing exam when I studied for MBA.
The only course I got worse marks was, you guess, statistics.
Trackbacks will show up only after manual approval.
|