Remix.run Logo
▲ capv 2 hours ago

+1. You cannot teach AI a new programming language with prompts. In order to be efficient the language has to be in its "brain", i.e., AI's neural network has to be trained on large number of samples.

▲rfgplk 2 hours ago | parent [-]

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.
▲cyanydeez 2 hours ago | parent [-]

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.