News for hackers. Stuff that matters.
Re:Programming with Natural Language Is Going to Work (2010) by wizofaus on Wednesday May 24, 2023 @06:11PM (#36064498)
I'm perfectly aware of what the difference is, thank you. The function you gave to ChatGPT explicitly requests a stream to format integers as decimals, separated by newlines. The version it gave as being 'unit-testable' did not, and hence wasn't a 'factually correct' answer. In some cases that may be perfectly fine, but in others it most definitely isn't.
Re:Programming with Natural Language Is Going to Work (2010) by byby on Wednesday May 24, 2023 @06:46PM (#36064820)
This is the function I gave chatGPT:

   ME:
   def (x: int):
      for i in range(x):
         print(i)
It takes an int. Are you trolling now or did you get mixed up with something else?
Re:Programming with Natural Language Is Going to Work (2010) by wizofaus on Thursday May 25, 2023 @01:18AM (#36067269)
The point is the "print" function means "format this integer as a decimal and follow it with a newline". The "testable" version ChatGPT gave you loses that key part of what your original function does. Sorry, I don't see we're achieving anything productive with this conversation.