newRPL: persistent comments in RPL code
|
06-05-2015, 03:58 PM
Post: #3
|
|||
|
|||
RE: newRPL: persistent comments in RPL code
(06-04-2015 11:42 PM)BruceH Wrote: What would happen with program checksums? Should the checksum be affected by the persistent comments or not? (I can imagine that it would be useful to be able to include additional comments for my own understanding but still keep the author's original checksum so I know that I haven't inadvertently changed the program).Didn't even cross my mind. I don't see much utility in the old checksums so it is not implemented yet. But of course, throwing in a command to calculate a CRC32 of an object would be almost trivial. The way I see it: yes, it will change. A checksum should include all bytes in the program and that will include comments as well. You may not want to include the comments, but other people might be interested in seeing ANY changes, including comments. To do a checksum without comments you could simply strip the comments and run the checksum afterwards. Programs should match after stripping comments if they weren't modified. (06-04-2015 11:42 PM)BruceH Wrote: Also, some people (not many I suspect) may keep a library of programs on a PC with comments that they then expect to be stripped when loaded on the calc. So perhaps the @ character can retain this stripping behaviour and @@ (or similar) used to indicate persistent comments? Do you mean @ comments may be stripped and @@ will persist even after stripping comments? It could be done almost trivially, using 2 different object types (the "stripper" code would only remove one type). The only real use I see for this would be to include a permanent copyright string at the beginning of a program, which cannot be stripped automatically, but the user can always edit the code, delete the copyright and recompile (which would indicate malice). I like this idea. When you open a binary file on another device with a text editor, you'd see 8 bytes of garbled characters and then your nice copyright message in UTF8, followed by more garbled text. |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
newRPL: persistent comments in RPL code - Claudio L. - 06-04-2015, 04:38 PM
RE: newRPL: persistent comments in RPL code - BruceH - 06-04-2015, 11:42 PM
RE: newRPL: persistent comments in RPL code - Claudio L. - 06-05-2015 03:58 PM
|
User(s) browsing this thread: 1 Guest(s)