Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Perl 5 Optimizing Compiler

by flexvault (Monsignor)
on Aug 13, 2012 at 13:36 UTC ( [id://987120]=note: print w/replies, xml ) Need Help??


in reply to Perl 5 Optimizing Compiler

Welcome Will_the_Chill,

From my observations, Perl gets better with each new version, and if you use Perl's strengths, you can leave many 'off-the-shelf' 'C' programs in the dust.

But, I would love to see a Perl compiler, but not for speed or concealing the code from hackers, but for code security, revision control and simplicity of deployment. ( and probably a few more. )

Before Perl, I used 'C' and 'uxbasic', a 'compiler' that mimicked the Z80 based 'oasis/theos' basic from the '80s but could run on most AIX/Unix systems. It could be run from source (BASIC), from an interpreter compiled code (BASICOBJ), and from pseudo compiled code (BASICCOM). As a developer you tested with the first 2 modes and then shipped the final version as the pseudo compiled code (think bytecode). And guess what, if the run time version of 'uxbasic' was installed, the code you shipped worked.

Now I'm not comparing this '80s code to Perl, but that concept of distributing code would improve the user experience with Perl. Why?

Since the '80s, I have sold and supported software for companies, the majority of which have 10 to 100 employees. They also have 1 or more people who have used Perl to print "Hello World". Since I started shipping Perl modules, I've had some of the funniest (maybe tragic) updates to my software. For example:

  • One site removed the rounding on invoices to make it faster. Why? "...don't need it for 2 decimal places..." So after 400+ invoices are incorrect, the president calls and says '...your lousy software screwed up, everyone told me to go with a 'C' or 'VB' or ... solution... FIX IT"
  • One site changed one screen, and then removed 'use strict' so the code would compile.
  • Another changed the copyright notice, and it stopped working. The 'expert' couldn't find the problem, and wanted us to fix it.

If you work in an environment where you control everything, then you wouldn't understand the 'user' frustrations from 'brilliant' coders.

So why can't Perl have a '-Compile' like the '-cw' compiler flags that produces a bitecode that can be shipped and run. Every one knows that someone that wants to get the code can, but the casual 'expert' would be deterred by '...It looks like 'C' to me!'

Thank you

"Well done is better than well said." - Benjamin Franklin

Replies are listed 'Best First'.
Re^2: Perl 5 Optimizing Compiler
by Anonymous Monk on Aug 13, 2012 at 13:44 UTC

    If you don't want "customers" diddling the code, you can use PerlApp/CavaPackager/PAR (with filters, crypto/whitespace, even used to be a B::Bytecode filter )

      Your reply wins the "most useless and clueless answer of 2012" prize.

      CountZero

      A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

      My blog: Imperial Deltronics

        Flexvault said

        So why can't Perl have a '-Compile' like the '-cw' compiler flags that produces a bitecode that can be shipped and run. Every one knows that someone that wants to get the code can, but the casual 'expert' would be deterred by '...It looks like 'C' to me!'

        Anonymous Monk said

        If you don't want "customers" diddling the code, you can use PerlApp/CavaPackager/PAR (with filters, crypto/whitespace, even used to be a B::Bytecode filter )

        CountZero said

        Your reply wins the "most useless and clueless answer of 2012" prize.

        You're wrong CountZero and rude.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://987120]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2024-04-23 11:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found