Tue, 02 Nov 2010
Marpa's Sudden Portability Adventure
I've made bold claims for the portability of
Marpa is a general BNF parser generator -- it parses from any grammar that you can write in BNF.
If the grammar is of one of the kinds currently in practical use
(yacc, LR(k), LALR, LL, recursive descent, etc.), this parsing is in linear
The boldness of my claims evinced
no ambition to test them under fire.
But, when my main development box (a 2-year Dell laptop running Ubuntu)
my only other choice for a development platform was a MacBook G4 running
Mac OS Tiger.
So test my portability claims is what I had to do.
Not that my brags about portability had been without foundation.
I upload development versions for cpantesters regularly.
(By the way, to all of you at cpantesters: a big "thank you".)
As far as the configuration, build and runtime environments went,
I had a lot of reason to be confident.
The problem is that
I am now working on the XS version of Marpa.
When I was working on
the Pure Perl version of
my maintenance and development environments were not separate from
the configuration, build and runtime environments.
Development was also in Pure Perl,
with no additional tools required.
But for the XS version of Marpa,
maintenance and development require GNU autotools,
as well as Don Knuth's TeX and Cweb.
Let me emphasize that you can, now and in the future,
configure, build and run Marpa::XS on boxes without GNU autotools
It's just that
you can't properly work on or patch the source code
Also, it is worth emphasizing that, in the open source spirit,
Marpa::XS ships with all the files necessary for maintainance
So you always have the "source" in the fullest sense,
and all the tools you need to develop are available free
But part of making Marpa::XS as portable as possible is ensuring that
it will configure, build and run happily
in environments which don't have all
the development tools it requires.
Which brings me back to my crisis.
I could be confident about configuring, building and running my development
version of Marpa::XS on a wide variety of platforms.
The cpantesters had proved this for me.
Less certain was whether my
development environment could be recreated.
The sudden switch involved a sudden change of chips (Intel to PPC),
and operating systems
(the latest Ubuntu to a Mac OS that is two major releases out of date).
More dramatic changes are possible (both are POSIX systems),
but for a port suddenly forced on me, this was more than
change enough, thank you.
I hoped everything I needed was on MacPorts.
That was assuming that vintage 2005 systems, running
a Mac OS version two major
were a priority with the helpful folks at MacPorts.
In the event, I was back developing with 24 hours.
The only change I had to make to my codebase was to three lines
in Build.PL, which specified module versions.
Most of the 24 hours was taken up with compiles.
The Macbook G4 was never considered a fire-breather,
even back in 2005 when it was new.
posted at: 22:24 |
direct link to this entry