Compilers for the Future
Hi, this is interesting, thanks for this :-)<p>I am interested in the future of computing too.<p>I especially enjoyed what you said about genetic programming for instruction sets.<p>I recently wrote a program that uses the A* graph search algorithm to generate assembly code. I call it program synthesis. In ChatGPT you can get ChatGPT to generate code, so this kind of already exists.<p>My program synthesis&#x2F;codegeneration is for searching through state space of a program to allocate variables to values and arrange state for function calls. It is meant to automate the boring part of programming which is boilerplate and moving things into place. It learns the hidden states - the function calls to get the register and memory to be what they should be.<p>My program takes two states: a beginning state and and end state, including memory locations and infers the instructions used to reach the end state. Functional programmers love types, I use the idea of types but value tracing.<p><pre><code>  start_state = {
    &quot;memory&quot;: [0, 0, 0, 0],
    &quot;rax&quot;: 0,
    &quot;rbx&quot;: 1,
    &quot;rcx&quot;: 2,
    &quot;rdx&quot;: 3,
    &quot;rsp&quot;: -1,
    &quot;rdi&quot;: -1,
    &quot;rbp&quot;: -1
  }

  end_state = {
    &quot;memory&quot;: [3, 1, 2, -1],
    &quot;rax&quot;: 3,
    &quot;rbx&quot;: 2,
    &quot;rcx&quot;: 1,
    &quot;rdx&quot;: 0,
    &quot;rsp&quot;: 6,
    &quot;rdi&quot;: -1,
    &quot;rbp&quot;: -1
  }
  # These functions take in an argument of value type given by that number and return a value type given by the second paramter.
  minus_1_to_four = Function(&quot;minus1&quot;, -1, 4)
  four_to_five = Function(&quot;fourtofive&quot;, 4, 5)
  five_to_six = Function(&quot;fivetosix&quot;, 5, 6)


</code></pre>
This generates the following sequence of instructions.<p>[start, mov %rax, (%rdx), mov %rbx, (%rbx), mov %rcx, (%rcx), mov %rdx, (%rsp), mov %rax, %rsp, mov %rdx, %rax, mov %rsp, %rdx, mov %rcx, %rsp, mov %rbx, %rcx, mov %rsp, %rbx, call minus1(rdi=-1) -&gt; rsp=4, call fourtofive(rsp=4) -&gt; rsp=5, call fivetosix(rsp=5) -&gt; rsp=6]<p>Code is here:<p><a href="https:&#x2F;&#x2F;replit.com&#x2F;@Chronological&#x2F;SlidingPuzzle3">https:&#x2F;&#x2F;replit.com&#x2F;@Chronological&#x2F;SlidingPuzzle3</a><p>Please take this with love but I notice the theme of the Bible and God in this post, if you have not studied God, I recommend studying God it shall transform for your mind and you will no longer be conformed to the pattern of this world. I would stay away from the occult though (some of the text in the diagrams in your article resemble spirit texts)