upvote
> You cannot teach AI a new programming language with prompts

Incorrect. I built my own programming language [0] and agents just look up the docs and write it with great success. It helps to have static linting/analysis of course, but they always do just fine writing Rad despite it being very small.

[0] https://github.com/amterp/rad

reply
They already have been trained, on other languages that provide similar-enough constructs to translate over to the new language. Same principle as how a C++ developer can write Rust after looking at a few syntax examples.

For instance:

  contract ReplaceElement {
       function replace(words: &mutable Slice<UInt64>, index: UInt64, value: UInt64) -> UInt64
           requires index < words.len
           ensures result == old(words[index])
               and snapshot(words) == update(old(snapshot(words)), index, value)
           terminates
           effects { read(words), write(words) }
   }
This is _extremely_ similar to JS/Rust/Java style syntax mixed with common forms from general ALGOL descendant languages. LLMs should have no trouble writing this whatsoever.
reply
you don't want anything thats extremely close; you want something that is dissimilar and users very cogent keywords.

Similarity shits up context very quickly.

reply