just spotted this gem on the arduino forum
you need to know better than the AI in order to know that the solution offered by the AI is wrong
just spotted this gem on the arduino forum
you need to know better than the AI in order to know that the solution offered by the AI is wrong
Warning I'm not a teacher
It makes perfectly sense!
One cannot blindly trust the machine. The replies depend very much on the prompt anyway. So, if you do not how to ask or what to ask, then you cannot expect magic to happen, right?
Ioannis
I would say, that for relatively simple coding routines, PBP knowledge of AI had been improved, but just when you ask something more complex, you'll get this:
can you create picbasic pro code which will draw a circle on a LCD screen, which uses ST7920 controller?
(I'm omitting some DEFINE's and other non-relevant stuff)
Code:' Initialize LCDLCDINIT' Main program loopMain: ' Clear display LCDOUT $01 ' Set cursor to home LCDOUT $02 ' Set display to graphics mode LCDOUT $3F ' Set start line to 0 LCDOUT $40 ' Set display start line LCDOUT $C0 ' Draw circle CIRCLE 64, 32, 20
It makes very human-like errors.
For example, I asked it how to convert the time from GPS receiver, which simply outputs digits in ASCII format to raw decimal digits, and here's the code:
It assumed that "0" is the raw value of ASCII digit "0"Code:hours = (time_data[0] - "0") * 10 + (time_data[1] - "0")minutes = (time_data[2] - "0") * 10 + (time_data[3] - "0")In ZX Spectrum Basic it would be VAL("0"), but in PBP there's not VAL...
Interesting, is there any other syntax of basic, which treats "0" as it's decimal value in ASCII table?
Minus "0" means in fact -48.
Maybe this is what is needed by the rest of the program. With just this line I am not sure if it is right or wrong.
As always, answer depends on the prompt. If you give enough and precise info you will get better response.
Ioannis
yes sure, I changed "0" to 48 and everything works fine.
The question is, from where it took "0", is there any programming language that can make ASCII to decimal conversion that way?
In every language "0" is equal to 48 dec. or "1" equal to 49, etc.
Ioannis
Bookmarks