how do you write a program that writes a program?

Discussion in 'Programming General' started by pvtrades, Nov 7, 2007.

Thread Status:
Not open for further replies.
how do you write a program that writes a program?
  1. Unread #1 - Nov 7, 2007 at 2:31 PM
  2. pvtrades
    Referrals:
    0

    pvtrades Guest

    how do you write a program that writes a program?

    title says it all
     
  3. Unread #2 - Nov 13, 2007 at 8:06 PM
  4. rogue poser
    Joined:
    Jul 10, 2005
    Posts:
    51
    Referrals:
    0
    Sythe Gold:
    0

    rogue poser Member

    how do you write a program that writes a program?

    you would need to...... know what you want the program to do.... it would be much easier to just write the program....
     
  5. Unread #3 - Nov 14, 2007 at 9:51 PM
  6. IRockJoo
    Referrals:
    0

    IRockJoo Guest

    how do you write a program that writes a program?

    TO INJECT A KEYLOGGER, DUH?
     
  7. Unread #4 - Nov 15, 2007 at 1:51 PM
  8. Govind
    Joined:
    Apr 22, 2005
    Posts:
    7,825
    Referrals:
    13
    Sythe Gold:
    23
    Prove it! Trole Tier 1 Prizebox Tortoise Penis Le Monkey UWotM8? Wait, do you not have an Archer rank? Potamus

    Govind The One Musketeer
    Mudkips Highly Respected Retired Administrator

    how do you write a program that writes a program?

    Not easy.
     
  9. Unread #5 - Nov 16, 2007 at 11:32 AM
  10. Terrankiller
    Joined:
    May 7, 2005
    Posts:
    1,286
    Referrals:
    1
    Sythe Gold:
    1

    Terrankiller Ex-Administrator
    Retired Administrator Visual Basic Programmers

    how do you write a program that writes a program?

    If you want to develop an IDE, then you will need to learn a programming language for one, so you can program the IDE.
     
  11. Unread #6 - Nov 16, 2007 at 6:29 PM
  12. speedster239
    Joined:
    Jan 21, 2007
    Posts:
    313
    Referrals:
    0
    Sythe Gold:
    0

    speedster239 Forum Addict
    Java Programmers

    how do you write a program that writes a program?

    I'm not sure what your getting at here but I get the idea that you want to actually write a computer programming language.

    In that case I have two words:
    You won't.
     
  13. Unread #7 - Nov 23, 2007 at 6:59 PM
  14. Varreon
    Joined:
    Nov 23, 2007
    Posts:
    59
    Referrals:
    0
    Sythe Gold:
    0

    Varreon Member

    how do you write a program that writes a program?

    I hope im not too late. You could have your program write to a .c file, then distribute it with a compiler to compile it.
    ie:
    #include <stdio.h>
    int main(){
    FILE *f;
    f=fopen("file.c");
    fprintf(f,code here);
    fclose(f);
    system("gcc -c file.c");
    }

    don't criticize my code, its just an example of how you might do this.
     
  15. Unread #8 - Dec 4, 2007 at 7:29 PM
  16. KANEL
    Joined:
    Aug 10, 2005
    Posts:
    163
    Referrals:
    0
    Sythe Gold:
    0

    KANEL Active Member

    how do you write a program that writes a program?

    Wow, you guys (except varreon, who helped more than anyone else) are a bit pessimistic ><
    -First write the code that gets out the basics of every program.
    -Create commands that will create functions. Have open and close brackets. Make it so anything written into this function will be written right before the close bracket. Do the same for if-then/case-switch statements, loops, blah, blah.
    -Write a code that can read input and turn them into commands (these commands will write specific code to a file). You can do that with simple string functions and case statements.

    None of those steps should be hard, tedious at most.
    If you want, you can save functions to recycle into other programs (save them in a separate file, have your program read and rewrite them into new programs).
     
  17. Unread #9 - Jan 5, 2008 at 2:34 AM
  18. Shlorine
    Referrals:
    0

    Shlorine Guest

    how do you write a program that writes a program?

    Simplifyed, You'il have to make commands connected to the real commands as shortcuts. Hard and takes a while...
     
  19. Unread #10 - Jan 8, 2008 at 1:25 AM
  20. moork
    Joined:
    Feb 12, 2007
    Posts:
    83
    Referrals:
    0
    Sythe Gold:
    0

    moork Member
    Banned

    how do you write a program that writes a program?

    Write a program that writes a program?
    Simple, just include the program to a resource and then extract the resource =p
    If you want sources just Pm me.
     
  21. Unread #11 - Jan 8, 2008 at 5:18 AM
  22. Swan
    Joined:
    Jan 23, 2007
    Posts:
    4,957
    Referrals:
    0
    Sythe Gold:
    0
    Sythe's 10th Anniversary Member of the Month Winner

    Swan When They Cry...
    Retired Global Moderator

    how do you write a program that writes a program?

    Well, I believe you are talking about a compiler there, son.

    There are already many out.
     
  23. Unread #12 - Jan 8, 2008 at 12:41 PM
  24. Faskist
    Joined:
    Apr 25, 2005
    Posts:
    1,869
    Referrals:
    0
    Sythe Gold:
    0

    Faskist Tuxhead
    Banned

    how do you write a program that writes a program?

    If he's talking about compilers, then SICP is a good book to read, although it's a different language.
     
  25. Unread #13 - Feb 3, 2008 at 7:39 PM
  26. Olan14
    Joined:
    Jan 26, 2007
    Posts:
    581
    Referrals:
    0
    Sythe Gold:
    0

    Olan14 Forum Addict

    how do you write a program that writes a program?

    C-o-m-p-i-l-e-rrrrrrrrrrrrr
     
  27. Unread #14 - Feb 12, 2008 at 3:43 AM
  28. Michael3455
    Joined:
    Sep 11, 2005
    Posts:
    134
    Referrals:
    0
    Sythe Gold:
    0

    Michael3455 Active Member

    how do you write a program that writes a program?

    Old, yes.. but some added input might be nice. A program that writes a program? Easy, write a Lisp Macro :D
     
  29. Unread #15 - Feb 17, 2008 at 3:19 PM
  30. [OneWhoSighs]
    Referrals:
    0

    [OneWhoSighs] Guest

    how do you write a program that writes a program?

    Code:
    unsigned char binary[] = {0xEB,0xFF,0x bla bla the entire code};
    
    /* Do file open - write binary - save */
    
    Ofcourse if you wanna write binary to a file, if it's an executable you would have to set up the import table and everything, which can be tricky if your a newcomer. If it's a dynamic link library or anything else, you can just write the binary.

    You can retrieve the binary through ollydbg or any hex editor.
     
  31. Unread #16 - Jul 19, 2008 at 6:17 PM
  32. thepieman1
    Joined:
    Mar 30, 2008
    Posts:
    140
    Referrals:
    0
    Sythe Gold:
    0

    thepieman1 Active Member

    how do you write a program that writes a program?

    Well there are thinks called CASE*tools which aid in the development of a program, and some of the more modern ones can write some of the source code for you as well.
     
  33. Unread #17 - Jul 19, 2008 at 9:40 PM
  34. cp
    Joined:
    Jan 30, 2007
    Posts:
    3,278
    Referrals:
    6
    Sythe Gold:
    0

    cp an cat
    Banned

    how do you write a program that writes a program?

    Don't grave dig.
     
< Java Basics | looking for someone to help me improve my vb abilty >

Users viewing this thread
1 guest
Thread Status:
Not open for further replies.


 
 
Adblock breaks this site