Re: [hackers] st][PATCH - proper escape sequence for CTRL+HOME

From: Laslo Hunhold <dev_AT_frign.de>
Date: Thu, 3 Mar 2022 00:21:31 +0100

On Mon, 28 Feb 2022 21:27:22 -0600
Dave Blanchard <dave_AT_killthe.net> wrote:

> This patch for 'st' causes CTRL+HOME to send the ANSI sequence \033[J
> and \033[1;5H , which signals the user program to scroll to the top
> of the document, same as in Xterm.
>
> I have absolutely no idea what the 'appkey' and 'appcursor' fields
> do, as there are almost no comments anywhere to be found in the
> source code, and I haven't yet reverse engineered the code enough to
> figure out what the hell it's actually doing with those values. The
> provided values seem to work fine, though they may need to be changed
> if they're wrong.
>
> On that note, regrettably it will be necessary for me to fork this
> project, if for no other reason than to properly comment it, so that
> its functionality can be understood and easily modified. It's a shame
> that such a nice little program is marred by its total lack of
> commentation, along with poorly chosen function and variable names.
> The use of tabs in the source code isn't particularly desirable
> either, IMO.
>
> Overall, I like the 'suckless' initiative. I'm sick of all the bloat
> in the Linux world. My distro is built to be light weight, simple,
> and fast. 'st' is proving to be a nice addition, and a good starting
> point for building something even better. Looking forward to
> integrating more of your code into my system as I spend more time
> exploring your different projects, and the useful patches you've
> provided. Thanks for your work.

Wow, this thread definitely blew up and I'm a bit late to the party.
That's what happens when I, for the first time in a few months, leave
my basement-man-cave to restock on energy drinks and frozen fast food.

In my opinion the original motivation has a certain merit regarding
comments. I used to think differently about it, but I like to write
well-documented code. I can attest first-hand from the slcon in Budapest
to Roberto being able to keep every minute detail of vt100-specifics in
his mind, but I sadly will probably never achieve this level of
consciousness, so regarding appkey/appcursor and other aspects a little
bit of contextual comments might make sense. They neither change SLOC
nor the final binary, but provide context for the source-code-reader.
In the ideal case, you wouldn't even need a vt100 manual to understand
what is happening, but this all depends on how knowledgeable you assume
your reader to be.
Anyway, the original criticism though was, in my opinion, not
constructive at all. It wasn't expected that you present every case in
the code, but give a single example with a suggestion for a fix.
Otherwise it's just rambling and a waste of time.

It's a pity the thread escalated so quickly, though. This might be yet
another example where textual communication leads to misunderstandings.
95% of communication is non-verbal, and all this information is lost in
text. To each his own, but I benefitted from assuming a good rather
than a bad intent in most ambiguous cases. What is there to lose?

Anyway, no matter what anyone here thinks about how much st needs to be
commented, it's Hiltjo's call as maintainer to decide. If anyone
disagrees with him, he is free to fork it. That's how open source
works, and it's funny how often people push demands for something they
didn't pay for and which is developed in someone's free time.

With best regards

Laslo
Received on Thu Mar 03 2022 - 00:21:31 CET

This archive was generated by hypermail 2.3.0 : Thu Mar 03 2022 - 00:24:38 CET