|
|
|
|
|
by vidarh
1137 days ago
|
|
Yesterday I told ChatGPT: > We're going to write a program in a "new" language that is a mix of Ruby and INTERCAL. We're going to take the "come from" statement and use it to allow "hijacking" the return of a function. Furthermore, we're going to do it conditionally. "come from <method> if <condition>" will execute the following block if <method> was executed and <condition> is true. In <condition>, "result" can be used to refer to the result of executing <method>. And that was enough to get it to understand my example code and correctly infer what it was intended to return. Given it took that little, I don't think you need much code in a new language before you have a reasonable starting point as long as you can give examples and document the differences, and then use that on a few large projects that has good test suites, and work through any breakage. |
|
If it can't find those, then because there is no training data, best case scenario is that it will hallucinate APIs that don't exist.