From: Peter Olcott on 28 May 2010 13:49 On 5/28/2010 12:37 PM, Liviu wrote: > "Peter Olcott"<NoSpam(a)OCR4Screen.com> wrote... >> On 5/28/2010 11:52 AM, Liviu wrote: >>> "Peter Olcott"<NoSpam(a)OCR4Screen.com> wrote... >>>> On 5/28/2010 11:22 AM, Liviu wrote: >>>>> "Peter Olcott"<NoSpam(a)OCR4Screen.com> wrote... >>>>>> >>>>>> http://www.ocr4screen.com/UTF8.cpp >>>>> >>>>> Now maybe if you tried to actually test it, you'd find the next >>>>> obvious error, painfully obvious to anyone even remotely fluent in >>>>> C/C++. Which is even more odd since I thought you were writing >>>>> code so perfectly designed that it needed virtually no debugging. >>>> >>>> You are referring to the fact that I don't bother to invoke it in >>>> main()? That was not an error. The only reason that included main() >>>> was so that the compiler would not complain. It is intended to be >>>> used as a header file. >>> >>> No, not that. Why do you have to _guess_ anyway? Just lower yourself >>> to actually try and test it with any non-ASCII input. >> >> I have other priorities right now. I will exhaustively test it once I >> derive the UTF32toUTF8 function. I need this function to generate >> my test data. > > You really mean to generate test data using another (untested) function > of yours? Brilliant. > > Liviu > > This process has worked very efficiently and effectively for many years.
From: Pete Delgado on 28 May 2010 13:52 "Peter Olcott" <NoSpam(a)OCR4Screen.com> wrote in message news:foqdnW0auoazn53RnZ2dnUVZ_gadnZ2d(a)giganews.com... > On 5/28/2010 12:37 PM, Liviu wrote: >> "Peter Olcott"<NoSpam(a)OCR4Screen.com> wrote... >>> On 5/28/2010 11:52 AM, Liviu wrote: >>>> "Peter Olcott"<NoSpam(a)OCR4Screen.com> wrote... >>>>> On 5/28/2010 11:22 AM, Liviu wrote: >>>>>> "Peter Olcott"<NoSpam(a)OCR4Screen.com> wrote... >>>>>>> >>>>>>> http://www.ocr4screen.com/UTF8.cpp >>>>>> >>>>>> Now maybe if you tried to actually test it, you'd find the next >>>>>> obvious error, painfully obvious to anyone even remotely fluent in >>>>>> C/C++. Which is even more odd since I thought you were writing >>>>>> code so perfectly designed that it needed virtually no debugging. >>>>> >>>>> You are referring to the fact that I don't bother to invoke it in >>>>> main()? That was not an error. The only reason that included main() >>>>> was so that the compiler would not complain. It is intended to be >>>>> used as a header file. >>>> >>>> No, not that. Why do you have to _guess_ anyway? Just lower yourself >>>> to actually try and test it with any non-ASCII input. >>> >>> I have other priorities right now. I will exhaustively test it once I >>> derive the UTF32toUTF8 function. I need this function to generate >>> my test data. >> >> You really mean to generate test data using another (untested) function >> of yours? Brilliant. >> >> Liviu >> >> > > This process has worked very efficiently and effectively for many years. ROTFL! -Pete
From: Peter Olcott on 28 May 2010 13:52 On 5/28/2010 12:37 PM, Liviu wrote: > "Peter Olcott"<NoSpam(a)OCR4Screen.com> wrote... >> On 5/28/2010 11:52 AM, Liviu wrote: >>> "Peter Olcott"<NoSpam(a)OCR4Screen.com> wrote... >>>> On 5/28/2010 11:22 AM, Liviu wrote: >>>>> "Peter Olcott"<NoSpam(a)OCR4Screen.com> wrote... >>>>>> >>>>>> http://www.ocr4screen.com/UTF8.cpp >>>>> >>>>> Now maybe if you tried to actually test it, you'd find the next >>>>> obvious error, painfully obvious to anyone even remotely fluent in >>>>> C/C++. Which is even more odd since I thought you were writing >>>>> code so perfectly designed that it needed virtually no debugging. >>>> >>>> You are referring to the fact that I don't bother to invoke it in >>>> main()? That was not an error. The only reason that included main() >>>> was so that the compiler would not complain. It is intended to be >>>> used as a header file. >>> >>> No, not that. Why do you have to _guess_ anyway? Just lower yourself >>> to actually try and test it with any non-ASCII input. >> >> I have other priorities right now. I will exhaustively test it once I >> derive the UTF32toUTF8 function. I need this function to generate >> my test data. > > You really mean to generate test data using another (untested) function > of yours? Brilliant. > > Liviu > > If I generate every possible valid CodePoint and translate to and from UTF-8 and get the same value that I send in back out this will prove with very high reliability that both functions are correct.
From: Peter Olcott on 28 May 2010 14:14 On 5/28/2010 12:52 PM, Pete Delgado wrote: > "Peter Olcott"<NoSpam(a)OCR4Screen.com> wrote in message > news:foqdnW0auoazn53RnZ2dnUVZ_gadnZ2d(a)giganews.com... >> On 5/28/2010 12:37 PM, Liviu wrote: >>> "Peter Olcott"<NoSpam(a)OCR4Screen.com> wrote... >>>> On 5/28/2010 11:52 AM, Liviu wrote: >>>>> "Peter Olcott"<NoSpam(a)OCR4Screen.com> wrote... >>>>>> On 5/28/2010 11:22 AM, Liviu wrote: >>>>>>> "Peter Olcott"<NoSpam(a)OCR4Screen.com> wrote... >>>>>>>> >>>>>>>> http://www.ocr4screen.com/UTF8.cpp >>>>>>> >>>>>>> Now maybe if you tried to actually test it, you'd find the next >>>>>>> obvious error, painfully obvious to anyone even remotely fluent in >>>>>>> C/C++. Which is even more odd since I thought you were writing >>>>>>> code so perfectly designed that it needed virtually no debugging. >>>>>> >>>>>> You are referring to the fact that I don't bother to invoke it in >>>>>> main()? That was not an error. The only reason that included main() >>>>>> was so that the compiler would not complain. It is intended to be >>>>>> used as a header file. >>>>> >>>>> No, not that. Why do you have to _guess_ anyway? Just lower yourself >>>>> to actually try and test it with any non-ASCII input. >>>> >>>> I have other priorities right now. I will exhaustively test it once I >>>> derive the UTF32toUTF8 function. I need this function to generate >>>> my test data. >>> >>> You really mean to generate test data using another (untested) function >>> of yours? Brilliant. >>> >>> Liviu >>> >>> >> >> This process has worked very efficiently and effectively for many years. > > ROTFL! > > -Pete > > If I generate every possible valid CodePoint and translate to and from UTF-8 and get the same value that I send in back out this will prove with very high reliability that both functions are correct.
From: Liviu on 28 May 2010 14:22
"Peter Olcott" <NoSpam(a)OCR4Screen.com> wrote... > On 5/28/2010 12:37 PM, Liviu wrote: >> "Peter Olcott"<NoSpam(a)OCR4Screen.com> wrote... >>> On 5/28/2010 11:52 AM, Liviu wrote: >>>> "Peter Olcott"<NoSpam(a)OCR4Screen.com> wrote... >>>>> >>>>> You are referring to the fact that I don't bother to invoke it in >>>>> main()? That was not an error. >>>> >>>> No, not that. Why do you have to _guess_ anyway? Just lower >>>> yourself to actually try and test it with any non-ASCII input. >>> >>> I have other priorities right now. I will exhaustively test it once >>> I derive the UTF32toUTF8 function. I need this function to generate >>> my test data. >> >> You really mean to generate test data using another (untested) >> function of yours? Brilliant. > > If I generate every possible valid CodePoint and translate to and from > UTF-8 and get the same value that I send in back out this will prove > with very high reliability that both functions are correct. ....and the following code demonstrates my novel implementation of the increment/decrement arithmetic, provably faster than all prior art, and which I deem to be correct "with very high reliability" ;-) inline int inc(int n) { return n; } inline int dec(int n) { return n; } int main(void) { for(int n = 0; ++n; ) if(n != inc(dec(n)) || n != dec(inc(n))) return -1; // failed return 0; // verified ok } Liviu |