Page 1 of 1

Quirk with IRP-Variations, repeats and IrpTransmogrifier

Posted: Tue Apr 20, 2021 12:40 pm
by Barf
Sean Young recently discovered a quirk with Variations and IrpTransmogrifier, reported here. Basically, a Variation without (infinite) repeat in the enclosing IrStream is senseless, but IrpTransmogrifier happily accepted it. :oops: My proposed solution is to basically to prohibit it (throw Exception), and fix the involved protocol-IRPs. Details in the quoted issue.

Anyone would like to comment? (If you do not have or want a Github account, you can write here.)

Posted: Wed Apr 21, 2021 4:48 am
by mathdon
@Barf

Although I wrote the IRP Specification document based on John Fine's work, I defer to you for any improvements, fixes and so on. I never expected anyone to actually implement it in the way you have and am amazed that it was actually possible to do so with only the modest additions you have made. If you, or anyone else, cares to revise the specification document to incorporate your and any other changes, I am very happy for them to do so. I can't remember if I have posted it as a .doc as well as a .pdf, but if not then I am happy to post the .doc file to make it easier to work on. As for the present issue, I have no views to contribute.

Posted: Wed Apr 21, 2021 8:57 am
by mathdon
On second thoughts I do have a view. All that seems to be wrong is that IrpProtocols has one meaningless IRP, namely that for RCA(Old) since a variation without an infinite repeat, as you say, is meaningless. That IRP needs to be corrected. I don't think there is anything wrong with the IRP Spec in this regard. Also, I doubt if there are many software applications that catch every conceivable piece of meaningless input so I don't see why IrpTransmogrifier needs to be amended to catch this one.

Posted: Thu Apr 22, 2021 3:35 am
by Barf
mathdon wrote:All that seems to be wrong is that IrpProtocols has one meaningless IRP, namely that for RCA(Old) since a variation without an infinite repeat, as you say, is meaningless. That IRP needs to be corrected.
The protocols Direct_TV_P*, OrtekMCE_relaxed, RCA-38(Old), RCA(Old), Velodyne. XMP*, Zaptor-* have been fixed in the branch.
I don't think there is anything wrong with the IRP Spec in this regard.
Agreed; your sentence
a variation is a permitted type of irstream item that operates in conjunction with a repeat marker for the irstream that contains it.
"prohibits" variations in repeat marker-less IrStream.
Also, I doubt if there are many software applications that catch every conceivable piece of meaningless input so I don't see why IrpTransmogrifier needs to be amended to catch this one.
It is not about prohibiting everything that is silly, it is about having a behaviour that is logical, consistent, easy to understand and document. The behaviour demonstrated by Sean was not really acceptable. In this case, I considered it the simplest solution just to prohibit the ambigous/contradictory construct.

I am definitely against "prohibiting everything silly".