poke-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC] New JSON representation for Poke values in MI


From: Jose E. Marchesi
Subject: Re: [RFC] New JSON representation for Poke values in MI
Date: Wed, 25 Aug 2021 14:43:22 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)


>> I am a bit worried that this new schema, while more conceptually
>> correct, is actually more verbose for simple values like integrals,
>> offsets and strings.  Maybe that is not a problem in practice... it all
>> depends on what kind of values will be most often used in the MI.
>
> Sorry but I can’t see how it's more verbose.

{
    "PokeValue" : {
        "type" : "UnsignedInteger",
        "value" : 3500,
        "size" : 32
    }
}

vs.

{
    "PokeType": {
        "code": "Integral",
        "info": {
            "size": 32,
            "signed_p": false
        }
    },
    "PokeValue": {
        "value": 3500
    }
}

> However, even if it is more verbose for simple values, I believe this
> is acceptable because its a lot less verbose for structs and arrays
> which might contain lots of elements, which will cause a lot of
> duplicate information being transmitted.

Yet, it all depends on what kind of values will be transmitted most
often by typical usage, and that in turn depends on the design of the
protocol itself.  No big deal: we can revisit this once the rest of the
protocol takes shape.

>> Also, I would suggest s/PokeType/type, s/PokeValue/value.
>
> OK.
>
>> Other than that, this certainly looks better to me than the previous
>> design.
>
> I suggest we move on with the implementation then, if Mohammad also agrees.

Sure.

Right now I am very busy with other stuff (work) and I can't spend lots
of time in poke right now.  But please don't let that detain your
efforts.  I am sure you and Mohammad can figure out what is best for the
MI.  Please feel free to update master with MI-related stuff provided
Mohammad gives his OK.

Thanks!

PS: will be back in full poke hacking power soon :)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]