public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
From: "Günther Noack" <gnoack3000@gmail.com>
To: Alejandro Colomar <alx@kernel.org>
Cc: "Jared Finder" <jared@finder.org>,
	"G. Branden Robinson" <g.branden.robinson@gmail.com>,
	linux-man@vger.kernel.org, "Hanno Böck" <hanno@hboeck.de>
Subject: Re: [PATCH man v3 0/2] TIOCLINUX.2const: Document TIOCL_SETSEL selection modes
Date: Sun, 30 Mar 2025 12:58:07 +0200	[thread overview]
Message-ID: <20250330.8aeb7bdcfced@gnoack.org> (raw)
In-Reply-To: <srbsuwx4ou3wrlr7shxz5gz6qp42af3azyx6c4vfkpupboifgy@7m7dtlshxraz>

Hello!

On Wed, Mar 26, 2025 at 09:58:21AM +0100, Alejandro Colomar wrote:
> On Tue, Mar 25, 2025 at 09:48:58PM -0700, Jared Finder wrote:
> > On 2025-03-22 12:37, Alejandro Colomar wrote:
> > > Hi all,
> > > 
> > > On Mon, Mar 17, 2025 at 12:43:40PM -0500, G. Branden Robinson wrote:
> > > > [somewhat whimsical]
> > > > 
> > > > At 2025-03-17T14:23:09+0100, Alejandro Colomar wrote:
> > > > > On Sun, Mar 02, 2025 at 08:43:31PM +0100, Günther Noack wrote:
> > > > > >      +.TP
> > > > > >      +.B TIOCL_SELPOINTER
> > > > > >      +Show the pointer at position
> > > > > >     -+.RI ( xe ,\~ ye ).
> > > > > >     ++.RI ( xs ,\~ ys )
> > > > > >     ++or
> > > > > >     ++.RI ( xe ,\~ ye ),
> > > > > >     ++whichever is greater.
> > > > >
> > > > > Everything else looks good to me.  But,
> > > > >
> > > > > What's "greater" when you have two dimensions?
> > > > 
> > > > Since we can model the terminal display as an inner product space,
> > > > the terminal driver can compute an orthographic projection of the
> > > > plane onto a line and from there use routine arithmetic inequality
> > > > operators.
> > > 
> > > In any case, this is going to be confusing.  Can we get some wording
> > > that is obvious to a school student?
> > 
> > How about something like "... whichever is greater.
> 
> 
> > When the positions span
> > multiple horizontal lines (ys != ye),
> 
> 
> > characters are ordered left to right,
> > top to bottom, similar to when writing English text".
> 
> And greater is a character ordered first or last?

Thanks for your input!  You are correct that saying "bigger" is
unclear.  The alternatives are entertaining in a nerdy way ;-) but I'm
not sure that being mathematically exact here helps the purpose of
this man page. ;-)

The elephant in the room is that in the big scheme of things, this API
is pretty absurd: The API draws the mouse pointer at *one* position,
but there are *two* places where users can specify the coordinates.

Noone in their right mind would actually pass two coordinates and
would try to rely on the exact ordering semantics here.  The only
reasonable thing to do is to pass the coordinate in one of the two
places and leave the other place blank (0, 0).  The only ordering that
*actually* matters to callers is that their passed coordinate is
"bigger" than (0, 0).

These API semantics look like they happened by accident rather than by
intentional planning.  If the goal is to describe how an API *should*
get used, then spending too many words on ordering semantics here
would IMHO be distracting from the real thing that callers should do,
which I think should be *to fill one of the two coordinates and leave
the other blank*. :)

So if we describe this, I would like to make it as succinct as
possible and not draw unnecessary attention to it.

To make a constructive proposal, how about this phrasing:

  Show the pointer at position (xs, ys) or (xe, ye),
  whichever is later in text flow order.

?  Does that sound reasonable?

Thanks,
–Günther

  reply	other threads:[~2025-03-30 10:58 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-02 19:43 [PATCH man v3 0/2] TIOCLINUX.2const: Document TIOCL_SETSEL selection modes Günther Noack
2025-03-02 19:43 ` [PATCH man v3 1/2] TIOCLINUX.2const: Restructure documentation for " Günther Noack
2025-03-02 22:50   ` Jared Finder
2025-03-03  8:26     ` Alejandro Colomar
2025-03-02 19:43 ` [PATCH man v3 2/2] TIOCLINUX.2const: Document missing " Günther Noack
2025-03-02 22:49   ` Jared Finder
2025-03-17 13:23 ` [PATCH man v3 0/2] TIOCLINUX.2const: Document " Alejandro Colomar
2025-03-17 17:43   ` G. Branden Robinson
2025-03-22 19:37     ` Alejandro Colomar
2025-03-26  4:48       ` Jared Finder
2025-03-26  8:58         ` Alejandro Colomar
2025-03-30 10:58           ` Günther Noack [this message]
2025-03-30 11:07             ` Alejandro Colomar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250330.8aeb7bdcfced@gnoack.org \
    --to=gnoack3000@gmail.com \
    --cc=alx@kernel.org \
    --cc=g.branden.robinson@gmail.com \
    --cc=hanno@hboeck.de \
    --cc=jared@finder.org \
    --cc=linux-man@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox