Post 1518725 by GeoffWozniak@mastodon.club
(DIR) More posts by GeoffWozniak@mastodon.club
(DIR) Post #1518723 by GeoffWozniak@mastodon.club
2018-11-27T01:39:38Z
0 likes, 0 repeats
As much as you may want it to be, this book is not very good.https://archive.org/details/howtodebugyourpe00jimh
(DIR) Post #1518724 by GeoffWozniak@mastodon.club
2018-11-27T01:43:50Z
0 likes, 0 repeats
If you don't want to read it (and I don't blame you), the examples are mostly badly designed programs -- even for BASIC -- with a stream of consciousness describing how to fix them. As you read it, you think, "Uh, maybe the design is no good?" This is never brought up.
(DIR) Post #1518725 by GeoffWozniak@mastodon.club
2018-11-27T01:45:53Z
0 likes, 0 repeats
There is a whole chapter on patching. This is trivial in BASIC, but the examples are so contrived it's ridiculous. The argument is that you may not be able to rewrite or reload the program. But the scenarios presented are, laughably, less than 50 lines long.
(DIR) Post #1518726 by GeoffWozniak@mastodon.club
2018-11-27T01:48:29Z
0 likes, 0 repeats
One example uses a floating point number X.Y to represent two ASCII characters (!). This is "patched" to deal with two special cases by just hard coding a string in the code. But then it's revealed there are only 15 cases in total. You might as well hard code the strings anyway since the data set is so small, thus avoiding the bizarre numerical representation of characters.
(DIR) Post #1518727 by calvin@cronk.stenoweb.net
2018-11-27T01:50:51Z
0 likes, 0 repeats
@GeoffWozniak > One example uses a floating point number X.Y to represent two ASCII characters (!).Cairo's *build system* does this - it picks some specific absurd floating point number carefully constructed to determine endianness of floats.... and it does so by running strings to see how the float got representedit makes me scratch my head
(DIR) Post #1518964 by GeoffWozniak@mastodon.club
2018-11-27T01:55:52Z
0 likes, 0 repeats
@calvin Uhhh...
(DIR) Post #1518965 by GeoffWozniak@mastodon.club
2018-11-27T01:57:24Z
0 likes, 0 repeats
@calvin Can you point me to that? I'm now curious.
(DIR) Post #1518966 by calvin@cronk.stenoweb.net
2018-11-27T02:02:19Z
0 likes, 0 repeats
@GeoffWozniak eep https://cgit.freedesktop.org/cairo/tree/build/aclocal.float.m4