3 ms·
How easy would it be to make it output programs in a functional language, such as Haskell? it would be nice if it could be made to produce functions that are gu
by cabalamat 3y ago
How easy would it be to make it output programs in a functional language, such as Haskell? it would be nice if it could be made to produce functions that are guaranteed to be free from side effects.
In the long term I can imagine that the output languages of code generators like this might be ones specially designed to work well with AI code generators.
- ISV_Damocles 3y agoSo, targeting other languages is on our roadmap, and we have found higher reliability when we stick to a functional style with Marsha, so I think Haskell will be one of the "good ones" amongst target languages, eventually. But we are focusing on Python first because it's one of the most popular languages on the planet and many LLMs out there are able to generate high quality code for it, while less-used languages tend to produce worse results. Haskell may or may not need a manually-tuned LLM to generate solid results.
- cabalamat 3y ago> I think Haskell will be one of the "good ones" amongst target languages, eventually Another advantage of Haskell is that its side-effect-free nature makes it harder for a rogue AI to put in malicious code, thus helping to solve the alignment problem. It may be that languages and OSes will be specifically designed to put everything in a sandbox (or multiple layers of sandboxing), which will also be helpful when humans write code. > while less-used languages tend to produce worse results I figured that might be the case. > Haskell may or may not need a manually-tuned LLM to generate solid results. One possibility would be to write some Haskell programs, that illustrate paradigms in the language and train the LLM on them. Then get the LLM to solve similar problems, and automatically test how good its solutions are on grounds of solving the problem (passing test cases), performance (time and space used) and how easy it is for humans to understand the programs. Then use those solution to train the LLM to be better at Haskell, and give it another set of slightly harder problems to solve. In this way it would learn programming pretty much as humans do, by solving incrementally harder problems.