Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

jmcnamara (659)

jmcnamara
  (email not shown publicly)
http://search.cpan.org/author/jmcnamara/


'ere I am, J.M.! The ghost in the machine:

perl -MCPAN -e 'install jmcnamara & _ x ord $ ;' | tail -1

Journal of jmcnamara (659)

Wednesday February 23, 2005
06:27 AM

make what I mean

I was aware that make has implicit rules and that if you have a simple C program without a makefile, you can still do the following:

$ make hello
cc     hello.c   -o hello

And you end up with an executable.

However, I was surprised when I tried the following for a yacc grammar (again there is no makefile):

$ make foo
yacc  foo.y
mv -f y.tab.c foo.c
cc     foo.c   -o foo

Handy.

Also, in relation to Yacc, here is a footnote from the O'Reilly Lex & Yacc book:

Yacc's use of dot to show where you are in the rule can get confusing if you have rules with dots in them. Some versions of yacc use an underscore rather than a dot, which can be equally confusing if you have rules with underscores in them.

I have a feeling that you could keep going on like this.

Tuesday February 15, 2005
03:59 AM

Doogle (for Father Ted fans)

Doogle, the feckin' search engine of Ireland.
Monday January 03, 2005
08:13 PM

Uncrossing the Rubicon

To be updated.

Monday November 22, 2004
06:53 PM

Shareef does like it. Rock al Cashbah.

I heard this today on my cockpit radio blare.

Rachid Taha. You know it's not kosher.

Sunday October 10, 2004
06:11 PM

Dinner with Larry

Well not quite with Larry. He was at the next table with his family.

I dined with Dave Cross, Casey West and some of the Italian Perl mongers. But we chatted afterwards and I even got a photo.

This was after the Italian Code Jam. It was a great day. I really enjoyed Larry's talk which (I think) was entitled "What I have learned in my 50 years" although it had at least 10 other titles as well (including The Perl of Perl). It went on a windy path through ballistics, computer science, Perl culture and Lord of the Rings (eagles were Tolkien's exception handlers) to a destination of Perl 6.

I have been luke warm on Perl 6 up to now but the new syntax and functionality look great.

Needless to say he was asked the million LOC question; When will Perl 6 be out. Larry's answer paraphrased: alpha code next summer hopefully.

Tuesday September 21, 2004
05:37 PM

Perl and Excel

I've uploaded the slides for the Perl and Excel talk that I did at YAPC::Eu.

There was a little time before the talk so as a diversion I asked people to run the following one-liner from the first slide:

perl -MCPAN -e 'install jmcnamara & _ x ord $ ;' | tail -1

Try it! You'll need to have CPAN.pm configured and it will probably take a little while the first time it runs. The explanation is here.

Wednesday September 15, 2004
08:25 AM

YAPC::Eu

I'm at YAPC::Eu. And I'll be talking in a little while.

If you are here and you read this, say hello.

Thursday September 09, 2004
07:34 AM

Abhaile

I am going back to Ireland for 10 days. In amongst that time I'm going up to Belfact for YAPC::Eu. I'm even doing a talk this time.

If you are there I'll see you in the bar.

Tuesday August 24, 2004
05:51 PM

Bellinis

White peaches are in season here in Italy. Which means that it is Bellini time!

Che bellino.

Friday August 20, 2004
06:01 PM

Charts in Spreadsheet::WriteExcel

A first look at charting with Spreadsheet::WriteExcel.

#!/usr/bin/perl -w

use strict;
use Spreadsheet::WriteExcel;

my $workbook  = Spreadsheet::WriteExcel->new("demo02.xls");
my $worksheet = $workbook->add_worksheet();
my $chart     = $workbook->add_chart_ext('chart200.bin', 'Chart1');

$chart->activate();

$worksheet->store_formula('=Sheet1!A1');
$ worksheet->set_column('A:A', 20);

$workbook->add_format(color => 1);
$workbook->add_format(color => 2, bold => 1);
$workbook->add_format(color => 3);

my @data = (

            ['BIFFwriter.pm',   275],
            ['Big.pm',           99],
            ['Chart.pm',        269],
            ['Format.pm',       724],
            ['Formula.pm',     1410],
            ['OLEwriter.pm',    447],
            ['Utility.pm',      884],
            ['Workbook.pm',    1925],
            ['WorkbookBig.pm',  112],
            ['Worksheet.pm',   3945],
        );

$worksheet->write_col('A1', \@data);

__END__

And the result. Hurrah!

The chart was produced in Excel with some spurious data, extracted from Excel and then added to a Spreadsheet::WriteExcel file with new input data.

For now this is hackery and a little fragile but it is promising and surprising satisfying.