2 ms·
Thanks for the link. I try to write most of my code in a functional manner in c, so like, DRY, favoring functions instead of having a variable dependent on ano
by zackmorris 15y ago
Thanks for the link. I try to write most of my code in a functional manner in c, so like, DRY, favoring functions instead of having a variable dependent on another variable, stuff like that. I want to make a tool at some point that takes a block of c code and converts it to lisp so that I can try various transformations and permutations like Mathematica does, or evolve the parse tree with genetic programming:
http://www.geneticprogramming.com/Tutorial/ http://www.geneticprogramming.com/Tutorial/
Then I want to turn the lisp code back into c code and keep it readable. Off the top of my head, I might be able to represent any globals in c as a list and pass that along to the lisp functions, or better yet, ban globals for now. External library calls would probably also be banned, unless they are from a built-in library with no side effects. It's just much easier for me to proofread code than generate it so I'd really like to have a tool like this.