So here’s my “Project” … Take a fairly big Text File without [CR][LF] to make Line-by-Line Processing easy, but it does have plenty of HTML Tags.
- Goal: Find “</” … and replace it with “<[CR][LF]/” for every instance in text.
Unfortunately, ChatGPT 4o Mini thinks that I meant:
* Given: abcdefghijklmo</TAG>xyz123
* Find: "</[a-z].*>" (paraphrased) ..... and Insert "[CR][LF]" such that:
* Output: abcdefghijklmo[CR][LF]</TAG>xyz123
I actually WANTED to “Break” the Closing HTML Tag with the Insert of [CR][LF].
Note: I did not “require” a Correctly-formed HTML-Tag … just “</” (2 chars).
- It appears that ChatGPT “knows” Code which “Preserves HTML Tag Function/Syntax” - so that’s the Code that it copies.
- I don’t use “awk” - but it looked like ChatGPT tried to read the file as ONE-HUGE-LINE (which I suppose could work).
- In the Buffer-based C Program - it looked like it would FAIL (No Insert [CR][LF]) for “<” as Last Char in Buffer, with “/” as First Char in Buffer (on read-next-block-of-text).
@leebase
I want it to give me the Right Answer on the first try. A novice could easily MISS the Logic Error, when the Code Compiles without Warnings, but “Special Cases” Fail-to-Process (as expected).
98% Correct isn’t really acceptable for most computer programs.
Aside from Programming, I still don’t think I should have to “Pry” or “Bully” to get useful (non-trivial) answers… For now, I’m treating “AI” as a Glorified Front-End to some kind of search engine.