4 ms·
This is interesting but when I think AI programming language I'm envisioning a .AI file where I lay out various functions and describe what they do in natural l
by ryanjshaw 3y ago
This is interesting but when I think AI programming language I'm envisioning a .AI file where I lay out various functions and describe what they do in natural language. Markdown would be a good starting point.
How this might then work is that I first choose a traditional language I'm familiar with e.g. C#. An intelligent compiler generates underlying traditional code for each of those natural language functions by figuring out what context is necessary and supplying that to an LLM for code generation.
This could be done by parsing just the top-level function names (could use simple markdown headings for this) and supplying the current function details to an LLM, then asking what additional context is required. This would be repeated until the LLM is satisfied with the input.
For stability, once a generated function is accepted by the developer, it is cached and not regenerated unless the description changes. For additional stability there could also be some accompanying tests in the function definition, also generating code via the same process.
If the LLM generates code that fails to compile, it could be provided with additional context until the issue is resolved, transparently.
If you find a bug, you update the function description to exclude the bug scenario, the compiler sees you've changed that part of the input and and re-runs the LLM to do codegen.
Once LLMs are sufficiently advanced, you might not even need to review the traditional underlying code any more.