Tooling like Github Copilot allow developers to generate code within their code files. Write some functions, put a commend then hit auto-complete, and you get a somewhat working implementation of what you had in mind. While novel, it's also a useful way to automate the boring parts so developers can focus on the important parts. But what if it were more novel?
I sat on a tram on the way home one day, and started thinking about a language entirely powered by GPT prompts. What if all the programmer had to do was write type signatures and comments? What if the source file had no actual implementation code in it? Wouldn't that be novel? Not good, not useful, but definitely novel. Once I got home, I asked chatgpt for a good language name, and came up with a basic implementation in a couple of hours. So now I'm excited to present: neuro-lingo.
In neuro-lingo, there are 2 constructs: types and functions. Types are entirely up to the developer to implement - to help guide LLMs to useful code by providing structure and restrictions. Functions have two forms - first, a regular function that is composed of a type signature and a comment. This is the starting place for any neuro-lingo code. The context, types and function signatures are sent to GPT which then provides the completed implementation. The second type is a pinned function - pinned functions can be thought of as a snapshot of a particular implementation. On first run, a pinned function will behave the same as a regular function. On subsequent runs though, pinned functions will reuse the previously generated code instead of asking the LLM for new code. This allows you to have more control over the determinism of a function. Once you've generated a function the regular way and found an implementation you like, simply add the pinned keyword and lock that version down. Functions called main are run automatically on start.
Neuro-lingo has TypeScript-like syntax, as well as using TypeScript as a platform for actually running the code. There's no particular reason why it is TypeScript-like, other than it seems to be the lowest common denominator these days as a language.
An example of what neuro-lingo can do with the given source file
Which produces:
The prompt still needs a bit of work - and if you find one better than the one provided, please open a pull request! But remember this is a toy language, and not intended for production. The parser is quickly written, and not intended to be good code.
There's a couple of ideas I'd like to explore more -- what would happen if we added tests? What would happen if neuro-lingo was self-bootstrapping? I'm excited to see where the novelty will take it.
openllm.com