Re: [8bpp] Graphics Replacement Project - OpenGFX
Posted: 29 Aug 2008 10:32
What Raumkraut said about HTML.
What happens when a bare real-sprite grows a defined meaning?
There is great safety in by-the-book parsing. And, with no incorrect common practices to accommodate, why encourage or reward anything other than strict conformance?
There's a reason NFO coders are called coders. They emit code. Not markup language. Markup can, to some extent, be fudged if something unknown, unexpected, or not to the users wishes is encountered. This is why <NOFRAMES> and <NOSCRIPT> were invented.
NFO code, like machine code, C, assembly, Java, and everything else in that class, cannot. If it's unexpected or unknown, you bail out.
You don't ignore the bytes 0F 0C (an undefined opcode on all known x86 processors[0]).
You don't ignore the call to malloc because the appropriate library isn't available. Nor do you assume the presence of a semicolon where one isn't.
You don't skip the pushad instruction because you're assembling for the 8086.
And you don't ignore sprites, or bytes, because you were expecting to see something else.
[0] Note that this is not UD2, the instruction that is defined to raise an undefined opcode exception, but is an opcode that is actually not defined.
What happens to this too-intelligent parser when it hits a recolor sprite and parses it as an action 0?FooBar wrote:377 Doesn't recognise legal action; does not attempt to process, does not issue error, skips to next line
378-383 (same as previous line)
What happens when a bare real-sprite grows a defined meaning?
There is great safety in by-the-book parsing. And, with no incorrect common practices to accommodate, why encourage or reward anything other than strict conformance?
And it is also fine for the Intel 386 to skip instructions it doesn't understand (such as CMOVxx) in an attempt to find instructions that it does understand?FooBar wrote:I think it's fine if it tries to skip things it doesn't understand to see if there's something else it does understand.
Invalid example. NFO is not a markup language.FooBar wrote:... html ...
There's a reason NFO coders are called coders. They emit code. Not markup language. Markup can, to some extent, be fudged if something unknown, unexpected, or not to the users wishes is encountered. This is why <NOFRAMES> and <NOSCRIPT> were invented.
NFO code, like machine code, C, assembly, Java, and everything else in that class, cannot. If it's unexpected or unknown, you bail out.
You don't ignore the bytes 0F 0C (an undefined opcode on all known x86 processors[0]).
You don't ignore the call to malloc because the appropriate library isn't available. Nor do you assume the presence of a semicolon where one isn't.
You don't skip the pushad instruction because you're assembling for the 8086.
And you don't ignore sprites, or bytes, because you were expecting to see something else.
[0] Note that this is not UD2, the instruction that is defined to raise an undefined opcode exception, but is an opcode that is actually not defined.