* Re: [9front] Re: vncv(1): support for RFB 3.8
[not found] <CABJnqBR7QoJVOVkgpi-jr1-2NgJ1NsTq5ha_hsuq7oNTfiJAnA@mail.gmail.com>
@ 2020-09-22 20:46 ` ori
0 siblings, 0 replies; 6+ messages in thread
From: ori @ 2020-09-22 20:46 UTC (permalink / raw)
To: iru.muzgo, ori; +Cc: 9front
> Le mar. 22 sept. 2020 à 22:11, <ori@eigenstate.org> a écrit :
>
>> >> Hi,
>> >>
>> >> Did anyone try this? kvik?
>> >>
>> >
>> > Thanks for pinging -- I haven't tested it yet. Just wondering,
>> > does this solve any problems, or make any user-visible difference?
>>
>> To put it another way, what prompted writing the patch?
>>
>
> I did it to be able to connect to a screen shared via gnome on Linux, which
> is not currently possible.
>
> The change also makes it possible to connect to FreeBSD's bhyve vnc server.
> Thanks kvik for suggesting that test.
Sounds good to me. Will look over the RFC in the next couple of days.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [9front] Re: vncv(1): support for RFB 3.8
2020-09-22 23:10 ` Silas McCroskey
@ 2020-09-22 23:31 ` hiro
0 siblings, 0 replies; 6+ messages in thread
From: hiro @ 2020-09-22 23:31 UTC (permalink / raw)
To: 9front
i agree srvversion == 38 is clearer. clearly he has spent effort
minimizing this to achieve maximal expressiveness with least
redundency.
On 9/23/20, Silas McCroskey <inkswinc@gmail.com> wrote:
> Well beyond just the usual "avoid magic numbers" advice, with version
> numbers in particular enums let you use a format like VERS_3_8 or so
> to make the inherent separation more clear, especially to distinguish
> between something like 3.11.1 and 3.1.11.
>
> - sam-d
>
> On Tue, Sep 22, 2020 at 1:58 PM Iruatã Souza <iru.muzgo@gmail.com> wrote:
>>
>> Le mar. 22 sept. 2020 à 22:36, Silas McCroskey <inkswinc@gmail.com> a
>> écrit :
>>>
>>> > + if(strncmp(msg, "RFB 003.008\n", VerLen) == 0)
>>> > + srvversion = 38;
>>> > + else
>>> > + srvversion = 33;
>>>
>>> > + if (srvversion == 38)
>>>
>>> This kind of thing should almost certainly be using enums instead of
>>> magic numbers.
>>>
>>> - sam-d
>>
>>
>> Usually I would promptly agree with that suggestion, but it got me
>> thinking. In our specific case, is srvversion == SrvVersion38 actually
>> clearer than srvversion == 38?
>>
>> In any case, I would happily change the patch if enums are preferred.
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [9front] Re: vncv(1): support for RFB 3.8
[not found] ` <CABJnqBRGr4cjFJsnuSjEUjHWtRyvDd2Pq9xZ=2Xn3jOziWKEiw@mail.gmail.com>
@ 2020-09-22 23:10 ` Silas McCroskey
2020-09-22 23:31 ` hiro
0 siblings, 1 reply; 6+ messages in thread
From: Silas McCroskey @ 2020-09-22 23:10 UTC (permalink / raw)
To: Iruatã Souza; +Cc: 9front, ori
Well beyond just the usual "avoid magic numbers" advice, with version
numbers in particular enums let you use a format like VERS_3_8 or so
to make the inherent separation more clear, especially to distinguish
between something like 3.11.1 and 3.1.11.
- sam-d
On Tue, Sep 22, 2020 at 1:58 PM Iruatã Souza <iru.muzgo@gmail.com> wrote:
>
> Le mar. 22 sept. 2020 à 22:36, Silas McCroskey <inkswinc@gmail.com> a écrit :
>>
>> > + if(strncmp(msg, "RFB 003.008\n", VerLen) == 0)
>> > + srvversion = 38;
>> > + else
>> > + srvversion = 33;
>>
>> > + if (srvversion == 38)
>>
>> This kind of thing should almost certainly be using enums instead of
>> magic numbers.
>>
>> - sam-d
>
>
> Usually I would promptly agree with that suggestion, but it got me thinking. In our specific case, is srvversion == SrvVersion38 actually clearer than srvversion == 38?
>
> In any case, I would happily change the patch if enums are preferred.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [9front] Re: vncv(1): support for RFB 3.8
2020-09-22 20:11 ` ori
@ 2020-09-22 20:36 ` Silas McCroskey
[not found] ` <CABJnqBRGr4cjFJsnuSjEUjHWtRyvDd2Pq9xZ=2Xn3jOziWKEiw@mail.gmail.com>
0 siblings, 1 reply; 6+ messages in thread
From: Silas McCroskey @ 2020-09-22 20:36 UTC (permalink / raw)
To: 9front; +Cc: ori, iru.muzgo
> + if(strncmp(msg, "RFB 003.008\n", VerLen) == 0)
> + srvversion = 38;
> + else
> + srvversion = 33;
> + if (srvversion == 38)
This kind of thing should almost certainly be using enums instead of
magic numbers.
- sam-d
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [9front] Re: vncv(1): support for RFB 3.8
2020-09-22 20:08 ` [9front] " ori
@ 2020-09-22 20:11 ` ori
2020-09-22 20:36 ` Silas McCroskey
0 siblings, 1 reply; 6+ messages in thread
From: ori @ 2020-09-22 20:11 UTC (permalink / raw)
To: ori, iru.muzgo, 9front
>> Hi,
>>
>> Did anyone try this? kvik?
>>
>
> Thanks for pinging -- I haven't tested it yet. Just wondering,
> does this solve any problems, or make any user-visible difference?
To put it another way, what prompted writing the patch?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [9front] Re: vncv(1): support for RFB 3.8
2020-09-22 18:25 Iruatã Souza
@ 2020-09-22 20:08 ` ori
2020-09-22 20:11 ` ori
0 siblings, 1 reply; 6+ messages in thread
From: ori @ 2020-09-22 20:08 UTC (permalink / raw)
To: iru.muzgo, 9front
> Hi,
>
> Did anyone try this? kvik?
>
Thanks for pinging -- I haven't tested it yet. Just wondering,
does this solve any problems, or make any user-visible difference?
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-09-22 23:31 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CABJnqBR7QoJVOVkgpi-jr1-2NgJ1NsTq5ha_hsuq7oNTfiJAnA@mail.gmail.com>
2020-09-22 20:46 ` [9front] Re: vncv(1): support for RFB 3.8 ori
2020-09-22 18:25 Iruatã Souza
2020-09-22 20:08 ` [9front] " ori
2020-09-22 20:11 ` ori
2020-09-22 20:36 ` Silas McCroskey
[not found] ` <CABJnqBRGr4cjFJsnuSjEUjHWtRyvDd2Pq9xZ=2Xn3jOziWKEiw@mail.gmail.com>
2020-09-22 23:10 ` Silas McCroskey
2020-09-22 23:31 ` hiro
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).