Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^2: {Perl6} Macros and native compilation

by spurperl (Priest)
on Apr 11, 2005 at 11:30 UTC ( [id://446567]=note: print w/replies, xml ) Need Help??


in reply to Re: {Perl6} Macros and native compilation
in thread {Perl6} Macros and native compilation

What you say is correct, but it's not enough for some cases.

For example, at work we all have Windows machines and most people don't have Perl installed. From time to time, I create small Perl applications that could be useful for others, and it's a big problem to move them to other computers.

Even if Perl is installed, all the modules the program need often are not, and some computers are not connected to the network so it's not easy to distribute.

What I use is PAR, but it creates large executables (3 MB and north) and often induces a runtime penalty (even if it's only on startup - some apps are so small that a 20 second delay is unbearable)

Compiling Perl to native code would be a bliss for me. I'd wish to work in a networked Unix environment (like at my other job), with Perl installed everywhere and CPAN distribution simple, but sometimes reality hurts.

In fact this is the only downside of Perl for me, and the reason I still sometimes create pure-C++ (with Win32 API for GUI) apps - complete programs with GUIs that run autonomously on any Windows box disregarding of its application base and take only 100K of disk/memory are hard to beat.

  • Comment on Re^2: {Perl6} Macros and native compilation

Replies are listed 'Best First'.
Re^3: {Perl6} Macros and native compilation
by chip (Curate) on Apr 11, 2005 at 14:44 UTC
    Your use case is an important one, and I intend for Parrot to be easily bundled with Parrot applications -- preferably with a smaller total size than that currently necessary with Perl 5.

        -- Chip Salzenberg, Free-Floating Agent of Chaos

      I don't mind Parrot being bundled with the "natively compiled app", I realize it can be very difficult without this bundling.

      Just hopefully the whole bundle won't be too big and/or too slow.

Re^3: {Perl6} Macros and native compilation
by adrianh (Chancellor) on Apr 11, 2005 at 16:10 UTC

    What I use is PAR, but it creates large executables (3 MB and north) and often induces a runtime penalty (even if it's only on startup - some apps are so small that a 20 second delay is unbearable)

    Compiling Perl to native code would be a bliss for me. I'd wish to work in a networked Unix environment (like at my other job), with Perl installed everywhere and CPAN distribution simple, but sometimes reality hurts.

    Most of that delay will likely disappear with Parrot without the need for compilation to native code. Most of that startup delay will be loading and compiling the Perl 5 code. With Perl 6/Parrot you'll be able to just ship the Parrot bytecode with the VM and save the compilation steps.

Re^3: {Perl6} Macros and native compilation
by emazep (Priest) on Apr 12, 2005 at 13:50 UTC
    What I use is PAR, but it creates large executables (3 MB and north) and often induces a runtime penalty (even if it's only on startup - some apps are so small that a 20 second delay is unbearable)

    Such long PAR startup penalty only occurs the very first time you run a (PARred) program (unless you have used the -C or --clean switch when creating the package), because PAR must extract all the files it needs to run your program, including perl itself, the modules used by your program and anything else you've packaged (the files are extracted into your system temporary directory).
    The next time you run your program, it starts up much faster (provided that these cached files have not been deleted of course), since PAR first looks for these previously cached files, and if it finds them it cleverly avoids to extract them again.

    Ciao,
    Emanuele.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2024-04-23 18:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found