Re: A Mandelbrot set generator in HG LISP

Liste des GroupesRevenir à cl lisp 
Sujet : Re: A Mandelbrot set generator in HG LISP
De : 643-408-1753 (at) *nospam* kylheku.com (Kaz Kylheku)
Groupes : comp.lang.lisp
Date : 16. Apr 2025, 02:55:11
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <20250415184155.278@kylheku.com>
References : 1 2 3 4 5
User-Agent : slrn/pre1.0.4-9 (Linux)
On 2025-04-16, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
Turns out it’s a bit strange: you have to position the cursor *on* an
opening parenthesis in order for it to highlight the corresponding closer,
but *after* the closing parenthesis for it to highlight the corresponding
opener.
>
Actually, "point" is never "on" a character, it's always between characters.
So in both cases "point" needs to be outside of the parenthesis.
It's perfectly symmetrical.
>
It's just that the cursor by default is a block drawn on the character
that follows the actual placement of "point".  Try to switch to a bar
cursor and that should be more clear.

Indeed, on terminals, you have an vertical bar cursor, or a block
cursor. It may be hard-coded, but on some modern software-based
terminal emulators it is configurable. (As well as other attributes
like whether it blinks.)

This is something purely local to the terminal emulator, not having
any semantics outside of it, but it influences the perception of the
semantics of positioning.

In particular: selection.

In the TXR Lisp listenter, you can set or clear this special Boolean:

  1> *listener-sel-inclusive-p*
  t

"selection inclusive" being enabled means that the visual selection
(Ctrl-S) includes the character that is under the cursor, when the
cursor is considered to be a block. When the cursor is at the leftmost
endpoint of the selection, the selection begins to the left of the
cursor.  When the cursor is at the right endpoint of the selection, the
selection ends to the right of the cursor. This semantics implies that
the selection can never be empty. When the start and end position
coincide, one character under the block is selected.

When you disable this flag, the selection always begins or ends to
the left of a block cursor. This works great when the cursor is
a vertical bar that goes down the left side of the character cell.
This is the semantics you are describing.  Many people are used to this
semantics, because it's similar to how cursors and selections look
and work in most graphical user interfaces.

(The variable's default used to be nil, but I switched it to t, because
it seems that block cursors, or block cursors by default, are more
prevalent; as you note above.)

The wretched Vim editor to only supports block semantics. I looked at
the code to see what it would take to support a similar configuration. I
will not be looking at that code again in hopes that my mind will one
day unsee it.

--
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca

Date Sujet#  Auteur
12 Apr 25 * A Mandelbrot set generator in HG LISP7Stefan Ram
13 Apr 25 `* Re: A Mandelbrot set generator in HG LISP6Lawrence D'Oliveiro
14 Apr 25  `* Re: A Mandelbrot set generator in HG LISP5Stefan Monnier
16 Apr 25   `* Re: A Mandelbrot set generator in HG LISP4Lawrence D'Oliveiro
16 Apr 25    `* Re: A Mandelbrot set generator in HG LISP3Stefan Monnier
16 Apr 25     +- Re: A Mandelbrot set generator in HG LISP1Kaz Kylheku
16 Apr 25     `- Re: A Mandelbrot set generator in HG LISP1Lawrence D'Oliveiro

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal