[Melbourne-pm] Three Projects

Brad Bowman list at bereft.net
Thu Apr 12 19:19:12 PDT 2012

On 13/04/12 11:19, Toby Corkindale wrote:
> On 12/04/12 10:13, Scott Penrose wrote:
> As far as the Perl library goes.. I was wondering if a blessed object is
> actually appropriate, or not?
> Since you only have one instance of the device available to a program,
> wouldn't a singleton object be a closer match to the hardware?
> I mean, it's not like you can do this:
> use PerlBone;
> my $bone = PerlBone->new(...);
> my $otherbone = PerlBone->new(...);
> In which case, how about class methods?
> use PerlBone qw(:DEFINES)
> PerlBone->digitalWrite(13, PB_HIGH);
> Or perhaps optionally export non-class variants even, which would make it
> easier for people used to Arduino, or just lazy people :)
> use PerlBone qw(digitalWrite :DEFINES);
> digitalWrite(13, PB_HIGH);

I had a similar interface issue for Audio::Ecasound.  Generally,
you are controlling one default instance, so either functions or
a singleton make sense, but you might want to have multiple instances
and they should be independent objects.  So I decided by not deciding
and threw them all in:


The import, _shift_self and AUTOLOAD subs might be useful.

( It wasn't a maintenance problem because there's only one guy who
uses it :) )

>> Julia vs PDL
>> Anyone use PDL?
> No, but it's one of those things I keep thinking I should learn.
> Also "R".

I've done some PDL:


Don't most of these higher level numerics languages just end up
wrapping C or Fortran anyway?  Julia looks like it uses Intel MKL
which would be most of the benchmark difference, is that a reasonable

The benchmarks don't look too tricky, if you get them to
agree to host the results, I'll have a go at writing the code
and keep the list posted.


More information about the Melbourne-pm mailing list