How programs can produce programs?
A program, be it a script or a binary, is just a series of bytes in a file. It's not that hard to output a certain series of bytes, although the escaping can get mind bending.
A program is a file, programs can produce files, programs therefore produce programs . that is somewhat logical .
So, Internet Explorer is just a set of instructions in a file? @rsmith6559
Many files (dll & exe mostly), yes. Probably about a million instructions.
This made me think of genetic programming: http://geneticprogramming.com/Tutorial/
That genetic programming looks interesting! I wonder how close to AI it is?
Here's a little Python program that writes a littler Python program and runs it (on Unix, but should work on Windows): ``` #!/usr/bin/python import os PROGFILE = "program.py" #### write a program file of = open( PROGFILE, "wb" ) of.write( "#!/usr/bin/python\n\n" ) of.write( "print \"Hello World!\"\n" ) of.close() #### make the program file executable and execute it os.system( "chmod 0755 " + PROGFILE ) os.system( "./" + PROGFILE ) ``` I need to get a life.
Maybe you need research about erp software. That category is a fully functional set of options for create a kind de new programs. Or compilers that's a other category of software for create a new programs from code or scripts.
A program is a specific set of instructions. We can accept that one of the instructions can be a set of another instructions e.g. Functions, which are basically programs generated from a parent program to execute a specific task.
Join our real-time social learning platform and learn together with your friends!