[32497] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 3762 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Aug 20 00:09:16 2012

Date: Sun, 19 Aug 2012 21:09:02 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Sun, 19 Aug 2012     Volume: 11 Number: 3762

Today's topics:
    Re: number of starting tabs <rweikusat@mssgmbh.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Sun, 19 Aug 2012 12:04:39 +0100
From: Rainer Weikusat <rweikusat@mssgmbh.com>
Subject: Re: number of starting tabs
Message-Id: <87vcgfi1mg.fsf@sapphire.mobileactivedefense.com>

Ben Morrow <ben@morrow.me.uk> writes:
> Quoth Rainer Weikusat <rweikusat@mssgmbh.com>:

[...]

>> -----
>> $tabs = $ARGV[0] =~ /^\t*/ && $+[0];
>> -----
>> 
>> -----
>> ($tabs) = $ARGV[0] =~ /^(\t*)/;
>> $tabs = length($tabs);
>> -----
>> 
>> But they utilize different methods of calculating this value and while
>> the first requires perl (5.10.1) to perform nine basic operations, the
>> second needs fourteen, not the least because it reimplements a feature
>> the perl regex engine already provides

[...]

> As I have said many times before, if you are concerned about that level
> of efficiency Perl is almost certainly the wrong language to be using in
> the first place.

The statement "If you are concerned about the way perl executes
Perl-code, you shouldn't be using Perl" doesn't seem to make much
sense to me: I'm concerned about this precisely because I use Perl and
I'm (for hopefully obvious reasons) interested in being able to use it
for anything where technical concerns, execution speed of the code
being among them, don't require taking a much more time-consuming
'other route'. The perl VM is a tool I'm employing to solve technical
problems and the more I know about this tool the more effectively can
I use it.

> The first rule of optimisation is 'Don't'.

'Optimization' is a mathematical term and it means 'finding an optimal
solution to a certain problem'. It doesn't really have a clearly
defined meaning when being applied to programming. Chances are that I
agree with your opinion for the definition of 'optimization' you
happen to have in mind. But that would be a different question.

>> The 'matter of taste' doesn't matter here because this is not a work
>> of art. It is a set of instructions supposed to cause a computer to
>> perform a calculation, or, more correctly, it matters only of
>> aesthetic preferences trump technical considerations.
>
> All forms of writing, in natural or artificial languages, should be
> considered a work of art at some level. (Incidentally, this is the
> principle upon which the idea of copyright in computer programs is
> based.)

The principle upon which the idea of 'copyright' (or 'patentability
of') computer programs is based is "There's serious money to be made
here and competion in the marketplact is bad for maximizing ROI." Pro
forma, it rests on the assumption that code would be overwhelmingly
the result of 'individual creative expression'. Expressions like the
first one quoted above rightfully cast some doubt on this
concept. They're more akin to mathematical formulas which can't be
copyrighted (or patented, at least in theory), because they are
discovered and not invented.

> While material technical considerations are more important than
> questions of aesthetics, in this case, unless the code in question is
> part of an inner loop you have previously determined is causing a
> significant performance problem, there is no *material* technical
> difference between the two.

Unless the Titanic sank, there's no reason to assume it ever would.


------------------------------

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

Back issues are available via anonymous ftp from
ftp://cil-www.oce.orst.edu/pub/perl/old-digests. 

#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V11 Issue 3762
***************************************


home help back first fref pref prev next nref lref last post