Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 12 Online
OpenStudy (adeetya):

How programs can produce programs?

OpenStudy (rsmith6559):

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.

OpenStudy (chukadean):

A program is a file, programs can produce files, programs therefore produce programs . that is somewhat logical .

OpenStudy (kikuo):

So, Internet Explorer is just a set of instructions in a file? @rsmith6559

OpenStudy (rsmith6559):

Many files (dll & exe mostly), yes. Probably about a million instructions.

OpenStudy (cruffo):

This made me think of genetic programming: http://geneticprogramming.com/Tutorial/

OpenStudy (rsmith6559):

That genetic programming looks interesting! I wonder how close to AI it is?

OpenStudy (rsmith6559):

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.

OpenStudy (nox99):

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.

OpenStudy (bishop):

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.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!