Blog

Blog entries
2009 Jul 02

Why am I writing Padre?.
2009 Jul 01

Test Reporting system: Smolder wish-list.
2009 Jun 30

The Ubuntu Business model and Perl.
2009 Jun 28

Perl 5 Personal Service.
2009 Jun 25

Padre 0.37 released.
2009 Jun 23

Things I am missing from Iron Man.
2009 Jun 22

When is the next release of Perl?.
2009 Jun 20

Live Help - IRC channels.
2009 Jun 17

Perl 5 to Perl 6 - Arrays.
2009 Jun 16

Perl 5 to Perl 6 - Scalars.
2009 Jun 15

Introduction to PHPUnit.
2009 Jun 13

Comparing the Eclipse Foundation with The Perl Foundation and EPO.
2009 Jun 10

Help your vendor packaging CPAN modules.
2009 Jun 08

Plans for the next 2-3 months.
2009 Jun 05

If you change the code of an open source application no one will support you.
2009 Jun 03

I hate Net::SSH::Perl.
2009 Jun 02

Why www is (un)necessary in the web addresses.
2009 May 31

Planning an SQL or DBI plugin for Padre.
2009 May 30

The importance of frequent binary releases.
2009 May 30

Padre 0.36 released.
2009 May 25

The Corporate CPAN.
2009 May 22

Perl 6 training in Lisbon in August.
2009 May 18

Perl Programming.
2009 May 09

CPAN Dependency browser.
2009 May 05

Ideas for Padre plugins.
2009 Apr 30

If you can read this then you don't need this.
2009 Apr 28

Padre 0.34 Released.
2009 Apr 27

SmartLinks on CPAN now.
2009 Apr 26

Syntax::Highlight::Engine::Kate anyone seen Hans Jeuken?.
2009 Apr 23

Iron Man Blogging contest.
2009 Apr 14

Padre and Catalyst.
2009 Apr 10

You show them mine, I show them yours.
2009 Apr 09

The Perl 5 - Perl 6 divide.
2009 Apr 08

Reporting Test Results.
2009 Apr 06

What is the last element of an infinite list or how to get started with Perl 6 ?.
2009 Mar 30

Perl 6 subroutines.
2009 Mar 26

Testing a (Perl) Web application without a lot of setup.
2009 Mar 23

Embedding Perl 6 in Perl 5.
2009 Mar 21

Padre and Google Summer of Code 2009.
2009 Mar 20

Perl 6: Looping over a list of values one at a time, two at a time and more.
2009 Mar 17

Perl 6: Is a value IN a given list of values?.
2009 Mar 15

Testing PHP Applications.
2009 Mar 13

Perl 6: Scalar, Array and Hash interpolation.
2009 Mar 12

Perl 6: Arrays with unique values.
2009 Mar 11

Testing PHP code with SimpleTest.
2009 Mar 09

Ending the Padre and Parrot integration grant.
2009 Mar 08

Spine, the Perl CMS (Content Management System).
2009 Mar 07

Better Than Grep.
2009 Mar 07

Vim as Perl IDE.
2009 Mar 05

No cookies for me.
2009 Mar 02

German Perl Workshop.
2009 Mar 01

Hands on Perl 6 training in Oslo.
2009 Feb 24

No good Perl for Win32 ?.
2009 Feb 20

Moaning Goat Meter.
2009 Feb 19

Experimental Perl 6 training / workshop in Frankfurt.
2009 Feb 18

Twitter.
2009 Feb 18

Prices.
2009 Feb 18

More Padre blogs.
2009 Feb 16

Methods and Messages: Randal Schwartz on Smalltalk.
2009 Feb 16

What is Modern Perl?.
2009 Feb 15

Padre blogs.
2009 Feb 15

TOP 100 CPAN packages.
2009 Feb 10

The Five Forces in the Language Wars.
2009 Feb 08

Shimming for testing Perl 6 code released to CPAN.
2009 Feb 04

Writing Perl 6 can be frustrating.
2009 Feb 02

Padre 0.26 released.
2009 Jan 21

Mocking real world to test a wrapper.
2009 Jan 18

Test Automation Training in Oslo, Norway.
2009 Jan 18

Operation on a Series of Integers in Perl 6.
2009 Jan 16

Embedding Parrot in Perl 5.
2009 Jan 13

Test Automation using Perl Training in Frankfurt, Germany.
2009 Jan 12

Getting Started with Perl 6.
2009 Jan 10

Perl 6 syntax highlighting.
2009 Jan 01

Perl 6 Cookbook.
2009 Jan 01

New Year's Resolutions.
2008 Dec 30

PPI based Syntax highlighting for Perl 5.
2008 Dec 29

Syntax highlighting for Perl 6.
2008 Dec 11

Plans for Integrating Padre with Parrot and Rakudo.
2008 Dec 10

Grant accepted for Integrating Padre with Parrot and Rakudo.
2008 Dec 10

Plans for the next month or two.
2008 Dec 05

Perlsphere.
2008 Nov 30

Portable Padre 0.19 for Windows.
2008 Nov 27

10-fold grows in Padre user base.
2008 Nov 26

How many test harnesses are too many?.
2008 Nov 25

Licenses on CPAN. Again.
2008 Nov 20

Padre talk in Haifa, reality check.
2008 Nov 17

Padre 0.17 was released.
2008 Nov 12

Talking about Padre and wxPerl in Haifa.
2008 Nov 11

Backlinks or links back to your site.
2008 Nov 10

Building your resume.
2008 Nov 09

How to run an Open Source Project.
2008 Nov 06

Syntax highlighting nightmare.
2008 Nov 04

2008Q4 TPF Grant Proposals.
2008 Nov 02

Subversion committer statistics.
2008 Oct 28

Perl Application Development and Distribution Platform.
2008 Oct 28

Compare Languages by usage.
2008 Oct 23

Yak shaving.
2008 Oct 21

Recursive development that leads nowhere.
2008 Oct 18

Licenses in META.yml on CPAN.
2008 Oct 17

Shall I enable some form of trackback or commenting?.
2008 Oct 15

Shana Tova - New Year's resolution.
2008 Oct 15

Perl needs is_number and similar functions (nearly built in).
2008 Sep 22

The Quest for the Perfect Editor.
2008 Sep 04

Living on the border.
2008 Sep 02

TAP - Test Anything Protocol.
2008 Aug 31

Padre - the journey I..
2008 Aug 21

Who needs an IDE for Perl anyway?.
2008 Aug 09

Padre project web site.
2008 Jul 27

Padre.
2008 Jul 23

White Camel.
2008 Jul 18

Name a Perl IDE - get a Perl book or YAPC ticket.
2008 Jul 09

QA Hackathon in Israel.
2008 Jul 01

OSDC Israel 2009 - Call for organizers.
2008 Jun 11

Selenium on Ubuntu 8.04 (Hardy).
2008 Jun 09

Testing Hello World.
2008 Jun 08

Wifi is working again!.
2008 Jun 07

CPANTS update.
2008 Jun 04

Frequent Internet blackouts.
2008 Jun 03

Upgrading to Ubuntu 8.04 Hardy on Compaq (HP) nc6400. .
2008 May 24

Test Automation Tips.
2008 May 22

Open Source IDE for Perl.
2008 May 21

This week in Ruby.
2008 May 21

Being included on Planet Perl.
2008 May 14

Adding tag cloud to the blog.
2008 May 14

Ubuntu 7.04 (beta) Feisty Fawn on Compaq (HP) nc6400.
2008 May 13

Test automation using Perl master class in Chicago.
2008 May 13

Adding tags to the blog.
2008 May 09

Automated Testing in PHP, Python, Ruby and Perl.
2008 Apr 03

Strawberry Perl for Windows.
2008 Apr 01

Oslo Hackathon day -4.
2008 Mar 28

Blogging about Perl outside the community?.
2008 Mar 27

OSCON Proposals rejected.
2008 Mar 26

Preparing for the QA Hackathon in Oslo.
2008 Mar 25

Missing licenses on CPAN modules?.
2008 Mar 24

License of Perl Modules on CPAN.
2007 Dec 24

Joining Technorati?.
2007 Dec 24

Regular Expressions in Perl 5.10.
2007 Dec 24

Switching in Perl 5.10.
2007 Dec 24

Smart Matching in Perl 5.10.
2007 Dec 24

What's new in Perl 5.10? say, //, state.
2007 Dec 23

The Zulo interview was published.
2007 Dec 08

Frequency of programming languages on LinkedIn.
2007 Dec 06

Interview in Zulo.
2007 Dec 06

Sun Startup Essentials Launch.
2007 Aug 25

Testing PostgresSQL.
2007 Aug 25

Testing Pugs and Perl 6.
2007 Aug 22

Testing Ruby.
2007 Aug 22

Testing GHC, the Glasgow Haskell Compiler.
2007 Aug 22

Testing NUT, the Network UPS Tools.
2007 Aug 21

Testing SQLite .
2007 Aug 20

Smoked Parrot.
2007 Aug 20

Quality Assurance of Perl 5.
2007 Jul 09

Using mod_perl for szabgab.com.
2007 Jul 07

Quality Assurance and Automated Testing in Open Source Software.
2007 Jul 07

Add tags to CPAN modules via CPAN::Forum .
2007 Jun 15

Windows on VMware.
2007 Jun 13

Reducing the social gap of the information age.
2007 May 25

Moving to a new server.
2007 May 04

Preparing an application for distribution.
2007 May 01

Spreadsheet::ParseExcel is looking for a maintainer.
2007 Apr 28

CPAN Modules in Linux Distributions.
2007 Apr 18

Version control of single files using Subversion.
2007 Apr 13

Testing results, Perl and CPAN module availability.
2006 Aug 05

Perltraining.org split into two.
2006 Jul 23

Upgrading Ubuntu to 6.06, (Dapper Drake).
2006 Jul 22

Ginger Spam Salad.
2006 Jul 20

Automating the blog.
2006 Jul 19

Wish list: search engine for Perl related sites.
2006 Jul 19

Perltraining.org .
2006 Jul 19

More blog related issues.
2006 Jul 19

Starting a blog.

Upcoming training classes

Lisbon, PortugalTesting PHP Applications July, 2009
Lisbon, PortugalTest Automation Using Perl July, 2009
Lisbon, PortugalHands-on Perl 6 training 1-2 August, 2009

Why am I writing Padre?

Thu Jul 2 09:24:31 2009

Tags: Padre, Perl, Perl 5, Perl 6, IDE, Rakudo, Parrot

It is probably not that interesting for most of the people but I have my excuses. What is more interesting - at least to me - is why others are involved.

After all there were already more than 40 people who made some contribution to Padre.

So I asked them to start writing down why are they involved. Some of them have already added themselves to the developers page and we started a separate page for translators though that one is new and has no been filled yet.

So why do I write Padre?

There is a short explanation on that page but let me bore you with a longer one here.

I have been teaching Perl 5 for almost 10 years now. Both beginner level and advanced courses. In the beginner courses the majority of the people use Windows with about 20-30 percent using Linux. Most of the Windows users use Notepad++ or a similar editor. Some of them can configure their editor to run the perl script right from the editor, others don't even know how to enable syntax highlighting for Perl 5. Some of the people on Windows don't know what the command line is but even those who know how to open the command prompt are either afraid of it or just dislike it.

Mind you these are not stupid people or anything like that. Some of them have many years of hardware design behind them. They are just used to some kind of IDEs.

Others might use Linux/Unix but many not by choice. In many cases the company they are working for gives them telnet access to an oldish Unix machine and tell them to code in Perl. They hardly know vi, they don't know how to configure syntax highlighting and they don't know how to install any other editor.

I have been using vim for many years and I can testify that it is a superb editor. Emacs is similary strong but I have not used it since university. The problem with both of them is that they are totally different from the editors most people are used to and their learning curve is long and steep. It takes several months or even years to become familiar with them. Most of the people don't want to invest that energy and I certainly don't have the time for that in a 4 days long Perl 5 course.

So I usually tell them to use whatever they are familiar with. I think I never had a student who picked Eclipse or Emacs. There were a few using vi/vim but most of the people used Notepad++ or a similar Windows based editor.

I don't think my students are too different from the average people learning and using Perl. Most of them will never write a full blown web application. Heck most of them won't have a need for object oriented coding as they write only 100-200 line long scripts in Perl.

They never get really familiar with Perl and they will always have to deal with strange code written by others. With all the other tasks they are required to do in their primary language or tool they will keep wondering what is $_ when they see it and will be surprised when they don't.

They will wonder what is the relationship between $_ and $_[0].

So my first objective was to provide a simple Notepad++ like editor with strong support for beginners or people with relatively little experience with Perl.

For example I'd like to make sure that Padre users will be able to highlight $_, press F1 and get an explanation. In case they highlight $_ from a $_[0] expression Padre should be clever enough to point this out and give an explanation on @_ and @_[0].

I knew it is a big task though I did not think it is soo big. In any case I knew I cannot handle this alone, especially as I am not such a good programmer. So from the very beginning I tried to make it interesting, accessible to experienced Perl 5 developers and in turn they made it fun and hackable.

Unfortunatelly most of the experienced Perl developers are also hard-core vim or emacs users and it is nearly impossible to move them away from their editor. Luckily there were a few who got interested by the idea of having a lot of control over their editor and that made the difference between a failing one man project to a project with a lot of potential.

Then at one point came the idea to integrate Parrot and Rakudo and try to provide a platform for Perl 6 development as well. With the awesome work of Ahmad M. Zawawi Padre has a lot to offer to anyone who wants to write Perl 6 code. With some more work we'll be able to integrate Parrot even better and then Padre will be able to handle any language running on top of Parrot.

While there are still lots of problems with Padre and installation can still be difficult it already more or less has the same power as Notepad++ on both Windows and Linux and probably on Mac too and it has some extra features that even vim people started to steal.

see comments

Test Reporting system: Smolder wish-list

Wed Jul 1 10:24:40 2009

Tags: TAP, testing, Perl, test reporting, PostgreSQL, PHP, Smolder, TODO

I'd like to have a system that can hold all the artifacts of a test execution and that also knows a lot about TAP. Smolder is a good start as it knows about TAP but there are tons of other things I'd like to have in it.

Some of them are hard to add, others are harder.

Anyway, earlier I wrote about Reporting Test Results. Now let me write about my wish-list:

1) I'd like Smolder to collect all the artifacts of a test run. Look at the data Buildbot collects or what is collected by the PostgreSQL test farm! Each run has several stages and the actual test run is only one of them. In a Test Reporting system I'd like to have access to all the output and error files of all the stages.

2) The tests might create some additional log files, I'd like to be able to include those too.

3) One major issue we have is test counting. TAP encourages you to have a plan - the number of test units you are going to execute in a test run - so that it can check the number of actually executed test to that number. Keeping the plan up to date is annoying, people don't like it so many use no plan. Some TAP producers don't even let you plan ahead (e.g. the ones I saw in PHP) but I think generally those that are more xUnit like won't have a test plan.

In larger settings this plan does not even help as it does not provide any tools to avoid reducing the test plan accidentally along with a shortcut in the test script: A developer can comment out several tests temporarily and adjust the plan for the time while he is trying to fix a bug forgetting to revert these changes after he is done.

Smolder could help a bit here: On the first result report the administrator of the project should look at the reports and mark them as having the correct number of tests. Then if Smolder notices a test report with a different number of test for the same test file it should raise an alert. The project administrator can examine the change and decided if that is the new correct number of tests setting the new expected number to this or if it was changed by mistake.

4) History of unit tests. If we would like to be able to provide a history based on the actual test units (calls to an ok() function) then we need to have some unique identifier for each test as we cannot assume that the test number or the test name will remain the same. After all people sometimes insert new tests or remove old test at the beginning of the test scripts and the names can change.

Smolder could also help here too. It could track the test numbers and test names. If it sees a change it can alert the project administrator who can then use some GUI to connect the old test units to the new ones.

Both involves some manual work but I think large organizations will be ready to invest that work in order to get the benefit of greater control and better reports.

What would you like to have in your test reporting system?

see comments

The Ubuntu Business model and Perl

Tue Jun 30 09:58:29 2009

Tags: Perl, Ubuntu, business, economy, Canonical, training, certificate

After my little research into the Eclipse foundation (Comparing the Eclipse Foundation with The Perl Foundation and EPO) I was told to take a look at the success of Ubuntu. While I know there is a huge difference as Ubuntu is an operating system while Perl is just a language but I got interested and here are the results.

Ubuntu does not have a foundation. It has a strong and very enthusiastic community and it is backed by Canonical, the company of Mark Shuttleworth.

That means the Perl community probably cannot learn much from the way Ubuntu and Canonical are connected but we can still look at the larger picture of how Ubuntu succeeded so far?

First I'll look at the business model of Canonical and later on the elements that helped Ubuntu become one of the leading GNU/Linux distributions in only a few years.

The Ubuntu Business model

So if we look closer I think we can safely say that Ubuntu is a product Canonical is sponsoring in order to make money somehow. I would not say by selling added value service as I am not exactly sure what is their business model. I noticed a few areas where Canonical might be making money:

  • Selling wearables and accessories.
  • Providing support contracts at nice sums.
  • Providing Training and Certification.
  • Distribution mechanism for software.

Selling T-shirts can bring in nice revenue to a small company but for Canonical it is more part of the marketing mix than the revenue mix.

Providing support can be an interesting business model, IBM makes a lot of money on it. I guess Canonical does too. This will just increase as Ubuntu invades the corporate infrastructure.

Training and Certification can be a lucrative business if executed well and I trust them to do it well. If they can convince companies that they need Ubuntu Certified Engineers to run Ubuntu smoothly then will see a huge number of people attending their classes and taking their certificate exams.

Still the biggest business opportunity I think is the one that is not even listed in the Canonical Store but only under Services. That is, they offer to be a distribution channel for ISVs.

In the Microsoft world people are used to download software and click-click-click install it. In the GNU/Linux world almost all the important software is packaged and distributed by the Linux distributor. It is especially true for Debian/Ubuntu but I think it is increasingly so with Fedora and Mandriva as well. That means the most common installation mode in these versions of Linux is via a mechanism similar to the "Add/Remove Software" on Windows.

So if you have a software which you'd like to distribute to Linux users, one of the best ways is to make sure each one of the Linux distributors will package your software. Otherwise you'll need to build .deb and .rpm files for each distribution or a stand-alone executable which is frowned upon by most of the Linux system administrators.

If your software is not open source you don't have much chance that any of the Linux distributors will add that package to their repository making it almost impossible to penetrate the Linux Desktop market.

If Canonical manages to get a large chunk of the market share in the Linux desktop market it effectively can open or close the distribution channel of ISVs making them pay well for the right to use Ubuntu as their distribution platform.

So what will happen to Ubuntu in 5 years?

I don't know.

If you look at the background of Mark Shuttleworth, he built Thawte and more or less at the peak of the dot.com bubble he sold it to VeriSign the only competitor in the digital certificates market. So he is a clever guy who won't be afraid to sell Canonical to the market leader with a near monopoly in the desktop business or to the competitor with the most money making a few billions of dollars. The sky isn't the limit

The Perl aspect

Perl is not an operating system and it is not the open source arm of a company. It cannot be sold but it can provide nice revenue streams to individuals or companies offering service with Perl. There might be other revenue sources as well but lets look at the 4 revenue streams that Canonical has:

  • Selling wearables - on Perl conferences some stuff is auctioned which generates some revenue to organize the next conference. This could be further expanded but the income is very limited.
  • Providing support: ActiveState does it as do a number of other small companies mostly in the local markets or in specialized fields (e.g. Shadowcat providing web development services using Catalyst or Summersault providing web development services using Titanium.) This could be exploited further providing similar services in other fields as well, not only web application development.
  • Offering Perl training provides nice income to several people in the Perl community including myself. This does not seem to turn any of us rich but provides us with a reasonable income stream to support ourselves. Certification is a sour point in the Perl community. Some people say that they don't want to have any certification systems for Perl others see it as the Holy Grail to make Perl more accepted by corporations. In any case this could be a revenue stream but I don't think it will happen any time soon.
  • Unlike an Operating system Perl does not control any distribution channel but it could be used in a related way. Actually it could be used similar to how the JVM provides a platform of application development. I am sure one day we will have a binary package of Perl with tons of CPAN modules already installed. Something like Strawberry Perl but with many more modules that can be installed on all major OS-es. That thing could be used as a development and distribution platform for all kinds of software.

    I am not sure this can directly generate revenue but it will help enlarge the Perl user base and it could provide more opportunities for development, support and training services for more people in the Perl community.

I'll write about the success of Ubuntu in a separate post. for the meantime you can read the Ubuntu Story between 2004 and 2006. They don't keep their history up to date either.

see comments

Perl 5 Personal Service

Sun Jun 28 12:34:05 2009

Tags: Perl, Perl 5, TODO

I thought about this on and off for some time but have not done anything with it yet. Maybe someone else with better ideas can do something like this.

I was sondering if it would be interesting to create a web application that on one hand would allow people using Perl to get some personalized services on the other hand it would allow the ongoing collection of some statistical data about the Perl community and about the usage of Perl.

The services that would be offered could include alert when one of the modules used by the person gets a new version. It could include a Google-alert like service when the modules are mentioned in one of the perl related sources.

It could allow the notification about Perl related events in their city/country/continent.

It could allow people to mark their favorite modules. It could allow to follow other people whose judgement they trust for modules which in turn would provide a better way to search for modules on CPAN for everyone.

It would allow an on-going survey similar to the one that was a year or two ago but that would allow people to change the data they provide and allow the site maintainers to provide information regarding the changes as well.

see comments

Padre 0.37 released

Thu Jun 25 10:31:17 2009

Tags: Perl, Padre, IDE

Without fanfare, v0.37 of Padre has been released.

The list of changes based on the Changes file:

  • "Introduce Temporary Variable" refactoring tool (SMUELLER)
  • Added a friendly icon on the toolbar to toggle comments (GARU)
  • Crazy Win32::API AllowSetForegroundWindow hack to allow the Single Instance Server to correctly foreground itself (ADAMK)
  • Added Padre::Search search and replace API (ADAMK)
  • Switching to last edited file is now Ctrl-Shift-p (SZABGAB)
  • Be compatible with older version of File::Path (RYAN52)
  • Links to Mibbit were replaced by links to our irc.html (SZABGAB)
  • Merged the code of Padre::Plugin::Encode into Padre (SZABGAB)
  • Update directory only when switching to new editor (SZABGAB)

Soon it should arrive to a CPAN mirror near you.

Enjoy and thanks to all the people who put effort in Padre!

see comments

Things I am missing from Iron Man

Tue Jun 23 23:26:46 2009

Tags: ironman, Perl

The main objective of the Iron Man Blogging Challenge is to encourage more people within the Perl community to promote the language to the world outside the Perl echo-chamber

There are nice things in Perl but I think it is hard to promote the language itself. Indeed, most posts were not about how awesome you can write a foreach loop in Perl...

There were posts about Moose which is ok as it shows to the outside world that Perl has a nice object system - even if it is an add-on but not many people will start using Perl because it has an nice object system.

There were posts about various little modules that can do interesting things. Things that can be interesting to people not yet using Perl. E.g. about Curses::Toolkit and Politics::AU::Geo ). The former while not on CPAN yet had nice demos, the latter pointed to the actual result page.

There were also lots of posts about Catalyst that can be interesting as a reason to learn Perl.

So while I enjoy reading the posts what I am missing is more posts on subjects that can be intersting for people who do not yet know Perl. I am missing both things that need some perl knowledge to actually use (such as the above 3 examples) but it would be nice to see posts about projects/products that do not require knowledge of Perl to start using. Projects that are written in Perl and that for advanced usage might require Perl knowledge. These would be reasons to start learning Perl.

So for example I'd like to see posts about

Bioperl, POE, PDL, Bricolage, Krang, SpamAssassin, Ack, WebGUI, RT, Gantry, Webmin, and even Bugzilla

just to name a few.

What are you missing?

see comments

When is the next release of Perl?

Mon Jun 22 16:25:22 2009

Tags: Perl, Perl 5, release, testing

In an open source project - especially one that involves Perl - most of the people just want to write code. Nearly no one wants to do PR. It even has a bad reputation among many open source developers.

In Padre I constantly struggle if I should spend my time adding a new feature or trying to recruite more developers. The former works better in the short term, the latter works better in the long term. Eventually there is a ballance I try to keep.

One of the things I really miss from the perl 5 porters - the people who maintain and improve perl itself - is the communication.

In the last couple of weeks we saw lots of blog-posts and mailing lists posts - sometimes not in the nicest way - why there is no regular release of perl 5 and how a speed related bug that was fixed 18 months ago was not released in an intermediate version. In these discussions several of the p5p people got involved but unfortunatelly this is mostly deffensive talk. Not good PR.

I also got fed-up with the lack of release and asked on the p5p list what is stopping them from releasing the next version of perl and what is so hard in the release process that they cannot do it more regulary?

I got several related replies. One of the them on the mailing list others on IRC.

According to those the next perl 5 release is within a small number of weeks. That is certainly good news. I would prefer to see a Release Candidate already that people can take for a ride but in the meantime I can point you at the three major issues around the release that need to be done:

  1. Fix a bunch of outstanding issues.
  2. The release must be stable.
  3. The actual release process should be automatic.

For item no. 1 you need to talk to the perl porters or look at the topic on the #p5p IRC channel where they point you at the list of outstanding issues

Item no. 2 was addressed in an e-mail of David Golden and the thread following it. That should be summarized in a document and the test automation system should be implemented.

For item no. 3 we first need to have a written document of what needs to be done and then we can attempt to automate it. The document can be based on the e-mail of Nicholas Clark. Actually I already created a pod version of that file that I hope soon will be added to the source tree of perl and then it can be fine tuned and implemented.

The interesting issue is that 2. and 3. need to be implemented only once and they can be reused for every future release of perl 5. So if you'd like to see more frequent releases that's where you need to help.

Luckily those, especially no. 2, are issues that any perl hacker can get involved easily. They only need perl coding.

I know I am not a good PR person and I hardly know anything about what's going on in the perl 5 porters but I hope this post helped a bit. At least it might trigger someone to write a better explanation of the situation.

Oh and a last note, if you'd like to get involved, the description on how to deal with the Git repository can be found here

see comments

Live Help - IRC channels

Sat Jun 20 14:28:15 2009

Tags: Perl, Perl 5, IRC, Padre, Mibbit, Freenode, Strawberry Perl, win32

In the last month or two some of us got really enthusiastic about the Mibbit service and how it can be a relatively easy way to direct more people to the IRC channels where we can provide quick help. I got so enhusiastic that I wrote a blog post ( What is the last element of an infinite list or how to get started with Perl 6 ? ) trying to direct people interested in Perl 6 to use that service. Adam Kennedy wrote about how we added "Live support" to Padre. Two days ago I even added a icon the Strawberry Perl distribution that will open a browser to Mibbit to join the #win32 IRC channel.

Then yesterday Freenode has shut down the access to its service using the Mibbit web IRC client and offered their own webchat.

That's bad. Not only do I have to fix my blog entry - which is easy but disturbing - but it also means all the current users of Padre 0.35 have a broken "Live Service" link in their application. Luckyly, there are not many such people.

So we have to fix the link in Padre and release a new version. that of course is not enough as I would like to avoid another such event so instead of pointing to an external service we are going to point to a web page on our site that will do the redirection automatically. It can even provide us with another chance to explain what is waiting for the unexpecting user. That way if the URLs change or services get shut down we only need to update a page on our web site and the users won't need to know about the change.

So I started to build a page in JavaScript that will redirect the users to the relevant web based IRC channel. I added a few channels that were listed on irc.perl.org and a few that were not. I am sure there are lots of other Perl related channels out there that could be added to the list. Especially I am interested in locale specific channels so we will be able to direct the Italian speaking users to the Italian IRC channel.

Please check out this page that I now call the Perl IRC Jumper. By looking at the source you can see the list of all the channels we currently have. If you know about other channels that you'd like to see there, either post a response here or drop by the #padre channel and let me know what else to add.

see comments

Perl 5 to Perl 6 - Arrays

Wed Jun 17 11:50:25 2009

Tags: Perl, Perl 6, newsletter, arrays

Abstract

Continuing the Perl 6 Tricks and Treats newsletter to help people switch from Perl 5 to Perl 6. Looking at arrays.


This entry was first sent out as part of the Perl 6 Tricks and Treats. Visit here to subscribe.

Welcome back to the Perl 6 Tricks and Treats

It was interesting to see the responses to the previous posting. There were several comments regarding the Object Oriented part or the lack of it.

On one hand I believe there are many Perl programmers who don't write classes and they only use Object Oriented Perl when they use a module from CPAN that is implemented that way. Even then it is only a matter of different syntax and they don't use any of the actual features of OOP such as inheritance. For them saying that everything is an object in Perl 6 and you write $name.lc might be strange and discouraging.

On the other hand there are many people in the Perl community who are very familiar with OOP and then there are those coming from Java/.NET/Python/Ruby who might only use Object Oriented and would be disappointed if they saw the procedural nature of Perl 6.

So we have to be careful when we introduce Perl 6 to make it clear that both ways are working. You can keep writing in procedural style

    say(substr($str, 3, 2));

or use Object Oriented style:

    $str.substr(3, 2).say;

or you can mix them if you really want:

    say $str.substr(3, 2);

but probably I should not show that in class.

That's for teaching.

As for the language itself, maybe there should be a way to enforce the Object Oriented style so organization can decide they want everything to be written in OOP and then enforce it by writing something similar to this at the top of every file:

    use oop;

Food for thought.

Perl 5 to Perl 6 : arrays

In the previous posting I wrote about scalars. Remember there is a lot more you can do with scalars, I just listed the things that seemed to be the most important in Perl 5 and how do they translate to Perl 6 !

This time I'll write about arrays.

Creating arrays, Data::Dumper, debug prints

Creating an array in Perl 6 can be the same as in Perl 5 For debugging prints one will use the .perl method instead of some Data::Dumper.

    use v6;
    my @numbers = ("one", "two", "three");
    @numbers.perl.say;   # ["one", "two", "three"]


In Perl 6 there is no need for the parentheses around lists:

    use v6;
    
    my @digits = 1, 3, 6;
    @digits.perl.say;  # [1, 3, 6]

quote word qw() is no longer used

The Perl 5 qw() operator is replaced by the angle brackets:

    use v6;
    my @names = <foo bar baz>;
    @names.perl.say;  # ["foo", "bar", "baz"]


Array interpolation in strings

Arrays do NOT interpolate any more in double quoted strings:

    use v6;
    my @names = <foo bar baz>;
    say "@names";                        # @names


So you can safely write the following without escaping the at mark:

    use v6;
    my @names = <foo bar baz>;
    say "joe@names.org";                 # joe@names.org


If you do want to interpolate the values of an array you have to put it inside curly braces:

    use v6;
    my @names = <foo bar baz>;
    say "names: {@names}";               # names: foo bar baz


Elements of an array, sigil invariance

When accessing elements of an array in Perl 6 the sigil does NOT change! This will be very strange for Perl 5 programmers but it has some advantages in the long run.

    use v6;
    my @names = <foo bar baz>;
    say @names[0];                       # foo


Number of elements in an array

Instead of the quite ugly $#array notation used in Perl 5 (that returns the highest index in the array) fetching the number of elements of array is done in Perl 6 by the elems() function. Actually I think the object oriented writing is much nicer here:

    use v6;
    my @names = <foo bar baz>;
    say elems @names;                   # 3
    say @names.elems;                   # 3


Ranges

Ranges are available in Perl 6 just as in Perl 5:

    use v6;
    my @d = 1..11;
    @d.perl.say;    # [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]

It works with characters as well

    use v6;
    my @chars = ('a' .. 'd');
    @chars.perl.say;    # ["a", "b", "c", "d"]


for and foreach loop

The C-style version of the Perl 5 "for" loop is now called "loop" but I won't show it here as it is way better to use the the iterator style for loop that most people in Perl 5 write as "foreach". In Perl 6 it is spelled as "for" and looks like this:

    use v6;
    for 1..3 -> $i {
        say $i;       # 1   # 2    # 3     (on 3 lines) 
    }

The same works on arrays as well:

    use v6;
    my @names = <foo bar baz>;
    for @names -> $n {
        say $n;        # foo  # bar # baz    (on 3 lines)
    }

This is one of the cases where you don't need to declare a variable using "my". The looping variable is automatically declared for you and scoped to the block of the for loop.

Iterating over the indexes of an array

If you need to iterate over the indexes of an array then you could write

    use v6;
    my @names = <foo bar baz>;
    for 0..@names.elems -1 -> $i {
        say "$i {@names[$i]}"; # 0 foo   # 1 bar  # 2 baz  (on 3 lines)
    }

Or you can pick one of the suggestions I got from Moritz Lenz on #perl6 (Thanks Moritz!):

    use v6;
    my @names = <foo bar baz>;
    for @names.keys -> $i {
        say "$i {@names[$i]}"; # 0 foo   # 1 bar   # 2 baz    (on 3 lines)
    }

The keys() method borrowed from the hashes will return all the indexes of an array. Even if your array has "holes" in it, elements with undef as value, keys() will still include the indexes of such elements.

split

split() acts similar to its Perl 5 version but the defaults do not apply any more and you should read the spec anyway. See S32-setting-library/Str.pod for more details.

    use v6;
    "a,b,c".split(',').perl.say;    # ["a", "b", "c"]


Conclusion

That's it for today. There are more things to say about arrays but as I also have two chapters in my regular Perl 5 training for arrays I figure I can split that into two here as well.

Stay tuned for arrays, hashes, files, control structure and the more advanced stuff.


This entry was first sent out as part of the Perl 6 Tricks and Treats. Visit here to subscribe.

see comments

Perl 5 to Perl 6 - Scalars

Tue Jun 16 18:04:56 2009

Tags: Perl, Perl 5, Perl 6, newsletter, scalars

Abstract

The first entry of the Perl 6 Tricks and Treats newsletter in our quest to switch from Perl 5 to Perl 6. Looking at the scalars.


This entry was first sent out as part of the Perl 6 Tricks and Treats. Visit here to subscribe.

Welcome back to the Perl 6 Tricks and Treats

I have to apologize as it has been more than 2 months since I sent out the last newsletter. After I came back from Oslo, where I gave a Perl 6 training class a client contacted with an urgent project that had a tight schedule. That meant that up till yesterday I have been working quite intensively at the client. That did not leave time for writing either the Test Automation Tips or the Perl 6 Tricks and Treats.

Anyway, the dead-line is now over and they are moving into a calmer period in which I only visit them once or twice a week.

Perl 5 to Perl 6 : scalars

So today I wanted to start writing about Perl 6 again but I was not really sure what to write about next. Hence I decided to go over the Perl 6 training material and clean up parts that were incorrect or that were lacking during the training in Oslo.

Actually there was a part that was quite neglected since I wrote the first version a few years ago and it might be an easier approach for me to clean that up first.

So I am looking at the Perl 5 to Perl 6 chapter and will go over its sections and send them out. That might be less clear to people who don't know Perl 5. I apologize in advance. It also means I am going to send a number of short postings in the next few days.

I wonder if I should also write similar chapters for people coming from other languages as well and which languages would be the most important?

I start with scalars including the functions that seems to be the most important to me. If you think differently, please tell me so I can include those examples too.

print Hello World

In Perl 5 you normally use print() or starting from 5.10 you can use say() to print to the screen. The latter will append a newline to whatever you had to say.

In Perl 6 they work the same.

    use v6;
    
    print "Hello World\n";
    say "Hello World";

Variable declaration using "my"

In Perl 6 you (almost) always need to declare your variables "my". Think as if you had always added "use strict". There are exceptions such as one-liners and certain constructs that auto-declare the scoped variables for you.

    use v6;

    my $name = "Moose";

Scalar variable interpolation

In Perl 6 scalar variables still interpolate in double quoted strings:

    use v6;
    
    my $name = "Foobar";
    say "Hello $name";     # Hello Foobar

In order to make the Object Oriented people happy Perl 6 also allows this:

    use v6;
    
    my $name = "Foobar";
    "Hello $name".say;     # Hello Foobar

Reading from standard input

In Perl 5 you would use <STDIN>.

As reading a single line from standard input is usually preceded by a print statement the keyword to do that in Perl 6 is called prompt().

    use v6;
    
    my $line = prompt('Please type in your name: ');
    say "Hi $line, how are you?";        # Hi Foobar, how are you?

If you try this you will see that it chomps the newline off automatically. Repeated reading without a prompt will be explained later.

Getting part of a string (substr)

The substr() function of Perl 5 is the same except that there is no 4 parameter version. As all the other functions it can also work in the object oriented way.

    use v6;

    my $line = "The brown cat climbed the green tree";
    say substr $line, 4, 3;   # bro
    $line.substr(4, 3).say;   # bro


Length of a string

In Perl 5 we used the length() function.

In order to avoid ambiguity in Perl 6 there is no length() function. Instead there are several functions with more precise meaning of the type of unit you are asking for. So bytes() will return the number of bytes in the string while, chars() will return the number of characters. Of course in my example you won't see any difference as the string is written in ascii where each character is one byte long.

    use v6;

    my $a = "This is a string";
    say chars $a;  # 16
    say bytes $a;  # 16


There are also the graphs() and codes() functions but they are not yet implemented in Rakudo. See S32-setting-library/Str.pod for more details ( http://perlcabal.org/syn/S32/Str.html )

chomp

In Perl 5 there is a chomp() function to remove a trailing newline after reading a line from the standard input or from a file.

In Perl 6 this function will be almost never used as reading from the standard input or from files will automatically chomp off the newlines. In any case, in Perl 6 chomp behaves differently as it returns the chomped string and does NOT change the original string.

    use v6;
    my $a = "abcd\n";
    my $b = chomp $a;  # $b is now "abcd"


defined

The defined() function is the same in Perl 6 as in Perl 5 checking if a scalar value has any value different from undef.

String concatenation using dot (.)

In Perl 5 dot (.) is used for string concatenation. I think it is a lot less used than one would think as in many cases we use string interpolation. Maybe one of the most frequent use-cases is actually the short-cut string concatenation.

In Perl 6 the string concatenation is done using the ~ operator. I think it will be even less used than in Perl 5 as the variable and code interpolation in Perl 6 is much stronger. Anyway here is the example:

    use v6;
    my $str = "Foo" ~ "Bar";
    $str.say;      # FooBar

I think the only place where it will be used a lot is the short-cut version that looks like this ~=

    $str ~= " and Moo";
    say $str;      # FooBar and Moo

This can of course lead to some confusion but =~ is not the regular expression operator in Perl 6 and the user will be told so if he gets it wrong.

String repetition (x)

String repetition that was the x operator stayed the same:

    use v6;
    say "abc" x 3;   # abcabcabc

index, rindex

The index() and rindex() functions of Perl 5 that can locate a substring stayed the same in Perl 6 as well.

    use v6;
    my $s = "The brown cat climbed the green tree";
    say index $s, "b";    # 4

lc, uc

lc() and uc() turning strings to all lower case and all upper case are the same in Perl 6 as in Perl 5.

    use v6;
    say lc "Hello World";    # hello world
    say uc "Hello World";    # HELLO WORLD

Conclusion

I know these are no big tricks here just plain code but I hope this will help some people in learning Perl 6.

Stay tuned for arrays, hashes, files, control structure and the more advanced stuff.


This entry was first sent out as part of the Perl 6 Tricks and Treats. Visit here to subscribe.

see comments

Upcoming training classes

Lisbon, PortugalTesting PHP Applications July, 2009
Lisbon, PortugalTest Automation Using Perl July, 2009
Lisbon, PortugalHands-on Perl 6 training 1-2 August, 2009
Tags
Perl (116)
Perl 5 (91)
testing (35)
Padre (31)
Perl 6 (27)
CPAN (21)
newsletter (20)
IDE (17)
training (11)
TODO (11)
PHP (11)
Parrot (11)
open source (10)
Ubuntu (8)
Rakudo (8)
TPF (8)
Ruby (8)
blog (8)
Python (7)
blogs (7)
TAP (6)
Oslo (6)
Windows (5)
Israel (5)
YAPC (5)
5.10 (4)
OSDC (4)
test automation (4)
IRC (3)
Java (3)
SQL (3)
Smolder (3)
editor (3)
Linux (3)
tags (3)
community (3)
Perl IDE (3)
automated testing (3)
business (2)
Catalyst (2)
distribution (2)
new year (2)
interview (2)
smoke testing (2)
LinkedIn (2)
Strawberry Perl (2)
wifi (2)
arrays (2)
Germany (2)
Selenium (2)
Mandriva (2)
JavaScript (2)
license (2)
SimpleTest (2)
Fedora (2)
grants (2)
software license (2)
QA (2)
Debian (2)
wrappers (2)
Google (2)
Haifa (2)
Subversion (2)
PPI (2)
Norway (2)
PostgreSQL (2)
Frankfurt (2)
application (2)
scalar (1)
Haskell (1)
ironman (1)
Chicago (1)
Matlab (1)
ack (1)
subroutines (1)
Perl ecosystem (1)
DBI (1)
unique (1)
vim (1)
NPW (1)
hash (1)
commit (1)
marketing (1)
German (1)
Pugs (1)
social gap (1)
Win32 (1)
Sun (1)
Ohloh (1)
harness (1)
smartlinks (1)
Firefox (1)
ISP (1)
project management (1)
C (1)
CentOS (1)
smart match (1)
2009 (1)
quality (1)
Canonical (1)
perl (1)
Languages (1)
Apache (1)
Economy (1)
windows (1)
Build Bot (1)
Freenode (1)
PDL (1)
economy (1)
comments (1)
grep (1)
Modern Perl (1)
beginners (1)
translation (1)
SQLite (1)
links (1)
OSCON (1)
debugger (1)
Hebrew (1)
zip (1)
development (1)
scalars (1)
PAR (1)
Workshop (1)
mocking (1)
CPAN::Forum (1)
foreach (1)
resume (1)
GUI (1)
web sites (1)
pastebot (1)
cm (1)
Smalltalk (1)
programming languages (1)
perl blog (1)
Linux installation (1)
uniq (1)
Modules (1)
Eclipse (1)
WxWidgets (1)
loops (1)
map (1)
popularity (1)
mod_perl (1)
vi (1)
GHC (1)
Etoys (1)
EPO (1)
Gmail (1)
Excel (1)
Modiin (1)
Gtk (1)
number (1)
web (1)
array (1)
plans (1)
Perl blog (1)
virtual machine (1)
FreeBSD (1)
Planet (1)
release (1)
Darcs (1)
Internet (1)
promotion (1)
regular expressions (1)
junctions (1)
switch (1)
UPS (1)
Javascript (1)
Perl Mongers (1)
given (1)
search (1)
VMware (1)
cookbook (1)
wxWidgets (1)
version control (1)
for (1)
DNS (1)
kwalitee (1)
search engine (1)
Deutsch (1)
blogging (1)
shim (1)
COBOL (1)
certificate (1)
trackback (1)
Altavista (1)
test reporting (1)
win32 (1)
spam (1)
syntax highlighting (1)
say (1)
USA (1)
hackathon (1)
PHPUnit (1)
databases (1)
Mibbit (1)
Lua (1)
CMS (1)
integers (1)
Visual Basic (1)
Last Update: Tue Sep 25 17:06:26 2007