
Ask HN: How far away are self-programming computers? - TheSpiceIsLife
Say a system scans all publicly available source code and, given it&#x27;s knowledge of the compiler &#x2F; interpreter, is able to determine the function each block of code.<p>Could this system learn how to build software given human language instructions as input.<p>How far in to the future might this sort of system be?
======
stray
Far.

This would be the intersection between natural language processing, small-step
operational semantics, and structural (big-step) operational semantics.

This is something I've been trying to wrap my head around for nearly twenty
years.

It is relatively easy to rewrite terms within a single language such that very
different code is functionally equivalent (which can be an insanely useful
card to have up your sleeve).

And it's not too terribly difficult to generate equivalent code in a different
language for very small things (functions, loops, etc.). A bit more difficult
to generate equivalent idiomatic code.

But going the opposite direction -- taking some functional code and truly
understanding "oh, this section is building a graph of dependencies" is more
challenging. And the names of things rarely helps (the two most difficult
things in computer science are cache invalidation, naming things, and off by
one errors).

And then stepping back and having a system _understand_ what you _mean_ \--
what you want -- is a black squiggly squirming nightmare.

