Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Re: Programs that write programs

by moritz (Cardinal)
on Oct 28, 2011 at 10:20 UTC ( #934361=note: print w/replies, xml ) Need Help??

in reply to Programs that write programs

Sure. For example a "quine" is a program that produces its own source code as output. Running that output again as a Perl program of course yields the same output again.

There are also nice multi-language quines, for example Perl code that output shell code, which then again produces the original Perl code etc. See for example and

A less obscure example is a compiler: A compiler produces working code, and if it is written in the language it compiles, then it can compile itself, and the result can again compile itself etc. This is called "bootstrapping".

Another example would be Acme::EyeDrops, which you can probably use on itself.

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (9)
As of 2021-06-21 10:46 GMT
Find Nodes?
    Voting Booth?
    What does the "s" stand for in "perls"? (Whence perls)

    Results (98 votes). Check out past polls.