exec sbbslist.js 1.54 1.55
Update of /cvsroot/sbbs/exec
In directory cvs:/tmp/cvs-serv3190
Modified Files:
sbbslist.js
Log Message:
More efficient screen updates (i.e., when using the up & down arrows, only move the lightbar on the 2 affected rows, don't redraw the whole list unless going to the next/previous page)
6. If there are any other bugs with this enhancement, it would be nice to allow a sysop to "opt-out" (e.g. via a modopts.ini setting) rather than having to go back to a previous revision if there's an issue. I have no idea how well the script was tested with your changes.
Cool that you took the time to do this. I do have some comments however:
1. Introduces a cosmetic bug, as you can see here, the last character of the inversed/selection line remains after moving the selection down one: https://1drv.ms/u/s!ApZPvWcrEaRQvMcp2zTjElCRGYN_Zw?e=htqMfv
2. This commit includes an arbitray style change, e.g.:
/* Column headings */
to:
// Column headings
If you want to make style changes unrelated to your change, do that in a separate commit.
3. With just a few minor tweaks, this optimization works for PETSCII terminals too (you can easily use SyncTERM in PETSCII, e.g. C128 mode, to test PETSCII).
4. Could we minimize the number of "redraw_whole_list = true" statements by defaulting this value to true rather than false? It seems there's a whole lot of them.
5. You added 2 new function definitions *after* main(), inconsistent with the style used in this source file prior to your touching it. Maybe you just didn't notice, but all other function definitions in this file occurred *prior* to the main() definition.
6. If there are any other bugs with this enhancement, it would be nice to allow a sysop to "opt-out" (e.g. via a modopts.ini setting) rather than having to go back to a previous revision if there's an issue. I have no idea how well the script was tested with your changes.
6. If there are any other bugs with this enhancement, it would be nice
to allow a sysop to "opt-out" (e.g. via a modopts.ini setting) rather
than having to go back to a previous revision if there's an issue. I
have no idea how well the script was tested with your changes.
Here's another cosmetic bug newly introduced with your changes: https://1drv.ms/u/s!ApZPvWcrEaRQvMcqKm0mDhi3M2qlqg?e=TtWm9L
This happens when the user presses the END key to go to the list.
3. With just a few minor tweaks, this optimization works for PETSCII terminals too (you can easily use SyncTERM in PETSCII, e.g. C128 mode, to test PETSCII).
Re: exec/sbbslist.js
By: Digital Man to nightfox on Sat Nov 16 2019 03:20 pm
6. If there are any other bugs with this enhancement, it would be nice
to allow a sysop to "opt-out" (e.g. via a modopts.ini setting) rather
than having to go back to a previous revision if there's an issue. I
have no idea how well the script was tested with your changes.
Here's another cosmetic bug newly introduced with your changes: https://1drv.ms/u/s!ApZPvWcrEaRQvMcqKm0mDhi3M2qlqg?e=TtWm9L
This happens when the user presses the END key to go to the list.
Where's the cosmetic bug? I'm not sure I'm seeing an issue in that screenshot..
Re: exec/sbbslist.js
By: Digital Man to nightfox on Sat Nov 16 2019 03:15 pm
3. With just a few minor tweaks, this optimization works for PETSCII terminals too (you can easily use SyncTERM in PETSCII, e.g. C128 mode, to test PETSCII).
I tried logging into my BBS using C128 80-column and 40-colum modes, and even the previous version (1.54) didn't look good or behave very well - For instance, when pressing the up & down arrows, I didn't notice any change on the screen, and viewing the selected BBS always viewed the first one on the screen. Should sbbslist.js already works with PETSCII?
5. You added 2 new function definitions *after* main(), inconsistent with the style used in this source file prior to your touching it. Maybe you just didn't notice, but all other function definitions in this file occurred *prior* to the main() definition.
I'll change that. I didn't really notice and didn't think that would really be an issue.
Yeah, works great in PETSCII mode. Maybe you're using an old or weird (not the latest and not v1.0) version of SyncTERM?
Re: exec/sbbslist.js
By: Digital Man to Nightfox on Sat Nov 16 2019 09:39 pm
Yeah, works great in PETSCII mode. Maybe you're using an old or weird (not the latest and not v1.0) version of SyncTERM?
I was using a v1.1b build from June of this year. I tried downloading the latest build, but it looked the same.
Using the 1.54 version of sbbslist.js, this is a screenshot of what I see using the C128 80-column mode - After I ran the SBBS list, I pressed the right arrow. One thing I noticed is that in the word "sYNCHRONET", the 's' starts at the last column in the first row: http://www.digitaldistortionbbs.com:81/sbbslist-petscii/sl154-p80-rarrow.png
And this is what I see in C128 40-column mode - It looks like it's not wrapping properly, and the 2 header lines don't show up: http://www.digitaldistortionbbs.com:81/sbbslist-petscii/sl154-p40.png
That's why I was wondering if sbbslist.js was currently working with PETSCII or not.
Whatever BBS you're connected to doesn't appear to be setup to accept PETSCII users.
That's my BBS. :P What option do I need to enable to accept PETSCII users?
Re: exec/sbbslist.js
By: Nightfox to Digital Man on Sun Nov 17 2019 06:28 pm
That's my BBS. :P What option do I need to enable to accept PETSCII users?
I see the option now - I see there are options in sbbs.ini for the ports for PETSCII 40-column and 80-column. I tried connecting to my BBS at those ports but I couldn't connect - I'll have to look into that.
I wrote up a how-to:
http://wiki.synchro.net/howto:petscii
Hopefully that helps.
Re: exec/sbbslist.js
By: Digital Man to Nightfox on Sun Nov 17 2019 07:03 pm
I wrote up a how-to:
http://wiki.synchro.net/howto:petscii
Hopefully that helps.
Thanks. I figured it out from an example in a newer sbbs.ini, to specify additional addresses & ports to listen to on the telnet server.
For the screen refresh update with sbbslist.js, to get rid of the UI glitch where it was leaving a blue character at the end of the lines, I added these 2 lines to the list_bbs_entry() function:
console_color(color, selected);
console.cleartoeol();
That seems to work okay for an ANSI client, but for PETSCII, I still see a similar weird glitch for the first BBS entry on a page. For example, the following 4 screenshots are for PETSCII using the up & down arrows:
http://www.digitaldistortionbbs.com:81/sbbslist-petscii/1.png http://www.digitaldistortionbbs.com:81/sbbslist-petscii/2.png http://www.digitaldistortionbbs.com:81/sbbslist-petscii/3.png http://www.digitaldistortionbbs.com:81/sbbslist-petscii/4.png
I'm not sure what might be causing the glitch on the first entry, and only for PETSCII..
I'm not sure what might be causing the glitch on the first entry, and only
for PETSCII..
It's not obvious to me what would cause that. I see that the BBS Location field for that line seems to be displayed one-char to the right too. These problems don't appear in revisions of sbbslist.js before your changes, so it must be something new. <shrug>
There is a difference in how ANSI cleartoeol() and non-ANSI (e.g. PETSCII) cleartoeol() works, but it certainly seems to work in all other use-cases. I use it a lot in Minesweeper as well, no problems in PETSCII mode.
You tried different versions of SyncTERM too?
exec sbbslist.js 1.57 1.58
Update of /cvsroot/sbbs/exec
In directory cvs:/tmp/cvs-serv16161
Modified Files:
sbbslist.js
Log Message:
Improved the optimized screen drawing behavior for PETSCII. There's still a glitch in refreshing the last character on the row when moving the lightbar with the up/down arrow keys, but it's more well-behaved now for PETSCII.
if(console.terminal.toUpperCase() === 'PETSCII') var line_screen_len = (strip_ctrl(txt).length - 1) else var line_screen_len = strip_ctrl(txt).length
???
exec sbbslist.js 1.57 1.58
Update of /cvsroot/sbbs/exec
In directory cvs:/tmp/cvs-serv16161
Modified Files:
sbbslist.js
Log Message:
Improved the optimized screen drawing behavior for PETSCII. There's still a glitch in refreshing the last character on the row when moving the lightbar with the up/down arrow keys, but it's more well-behaved now for PETSCII.
Looking at your changes, I have a question:
var txt = format("%-*s%c", lib.max_len.name, bbs.name, selected ? '<' : ' '); console.print(txt);
var line_screen_len = strip_ctrl(txt).length; // To help clearing to EOL for PETSCII
What control characters or sequences in 'txt' would you expect to be stripping at this point? There shouldn't be any in bbs.name and '<' and ' ' aren't control characters, so I'm confused by this logic. It looks like maybe you copy/pasted this design pattern into a few places and some where it's not applicable.
Also, the correct way to measure the number of columns that would be represented by a printed string (accounting for control characters/sequences) is via console.strlen().
Re: exec/sbbslist.js
By: Digital Man to nightfox on Sat Dec 07 2019 05:26 pm
Looking at your changes, I have a question:
var txt = format("%-*s%c", lib.max_len.name, bbs.name, selected ? '<' : ' '); console.print(txt);
var line_screen_len = strip_ctrl(txt).length; // To help clearing to EOL for PETSCII
What control characters or sequences in 'txt' would you expect to be stripping at this point? There shouldn't be any in bbs.name and '<' and ' ' aren't control characters, so I'm confused by this logic. It looks like maybe you copy/pasted this design pattern into a few places and some where it's not applicable.
Also, the correct way to measure the number of columns that would be represented by a printed string (accounting for control characters/sequences) is via console.strlen().
The intent was to get the length of the string as printed on the screen.
I've just committed an update changing those to use console.strlen().
The documentation says console.strlen() returns the length of the string excluding Ctrl-A codes. So it seems it's functionally equivalent to strip_ctrl(txt).length - Is that correct? Or are there other differences?
The intent was to get the length of the string as printed on the
screen.
I guessed that was the intent, but how would txt.length be any different than strip_ctrl(txt).length in the code I pasted above?
The documentation says console.strlen() returns the length of the
string excluding Ctrl-A codes. So it seems it's functionally
equivalent to strip_ctrl(txt).length - Is that correct? Or are there
other differences?
strip_ctrl() actually modifies a string while console.strlen() calculates the displayed-length without modifying the string. There are other minor differences (e.g. Ctrl-AZ handling), but that's the main one.
exec sbbslist.js 1.57 1.58
Update of /cvsroot/sbbs/exec
In directory cvs:/tmp/cvs-serv16161
Modified Files:
sbbslist.js
Log Message:
Improved the optimized screen drawing behavior for PETSCII. There's still a glitch in refreshing the last character on the row when moving the lightbar with the up/down arrow keys, but it's more well-behaved now for PETSCII.
Improved the optimized screen drawing behavior for PETSCII. There's
still a glitch in refreshing the last character on the row when moving
the lightbar with the up/down arrow keys, but it's more well-behaved
now for PETSCII.
There is a PETSCII issue where a console.cleartoeol() cannot actually clear the last character of the line because: 1. We don't know for sure what line/row the cursor is currently on 2. If we write to the last cell of the last line/row, the terminal will scroll
This isn't a problem with ANSI because there's an actual escape sequence for clear-to-end-of-line which we use when the terminal supports ANSI, but for non-ANSI (including PETSCII), we instead overwrite all the characters in the current row (except the last) with space and then backspace/left-cursor back to the original cursor position.
This is likely the PETSCII issue now observed with your modification.
Now, sbbslist.js is pretty sure it knows the current line/row and could possibly indicate to console.cleartoeol() when it's on the last row, but that would also require a change to the console.cleartoeol() implementation (e.g. to accept an additional parameter or whatever). So... it's probably better to just avoid writing to that last character cell. I'll look into it more when I have some time/motivation. I just wanted to make a note of the difference in behavior of console.cleartoeol() for ANSI vs. non-ANSI.
So... it's probably better to just avoid writing to that last character cell. I'll look into it more when I have some time/motivation. I just wanted to make a note of the difference in behavior of console.cleartoeol() for ANSI vs. non-ANSI.
I wasn't sure what to do about this, but if it's a PETSCII issue, perhaps there isn't much to do besides work around it / deal with it?
exec sbbslist.js 1.56 1.57
Update of /cvsroot/sbbs/exec
In directory cvs:/tmp/cvs-serv9335
Modified Files:
sbbslist.js
Log Message:
Resolution for the issue of there sometimes being a few empty lines between the end of the BBS list and the prompt text - For example, on the last page if the BBS entries don't fill the whole screen.
sbbslist.js
Your modifications to the sbbslist.js still have issues with the 'End' key:
Before your modifications (rev 1.54), hitting the End key would fill the screen with the last scree-full of BBS entires. Since rev 1.55 (and later), hitting 'End' will now put the last BBS entry at the top of the screen and fill the remaining rows with nothingness. :-(
exec sbbslist.js 1.62 1.63
Update of /cvsroot/sbbs/exec
In directory cvs:/tmp/cvs-serv8354
Modified Files:
sbbslist.js
Log Message:
The 'End' key will now show the last full screen of BBS entries, as before.
One somewhat odd behavior now is that when going up with the up-arrow key, if you go up past the first entry on the last page, it shows only a few entries back instead of a whole page back as I would expect per the new screen refresh optimizations (though it does highlight the correct BBS entry). When going up another page with the up-arrow key, it does refresh the whole page of entries as expected.
Still no good:
https://1drv.ms/u/s!ApZPvWcrEaRQvNJ_D95Ihb5oSZdXUA?e=DbiXZN
This happens if go to the end and then scroll back up (like you described) and then back down again. It's definitely wonky.
Re: exec/sbbslist.js
By: Digital Man to nightfox on Wed Mar 25 2020 06:54 pm
Still no good: https://1drv.ms/u/s!ApZPvWcrEaRQvNJ_D95Ihb5oSZdXUA?e=DbiXZN
This happens if go to the end and then scroll back up (like you described) and then back down again. It's definitely wonky.
What exactly should I be seeing here? That doesn't look that bad to me. Is it that there are empty lines at the bottom and it doesn't fill the page?
How are you expecting it to behave?
exec sbbslist.js 1.63 1.64
Update of /cvsroot/sbbs/exec
In directory cvs:/tmp/cvs-serv681
Modified Files:
sbbslist.js
Log Message:
When using navigation keys such as HOME, END, PageUp, PageDown, and the up & down arrow keys, the BBS entries will now fill the whole screen, even when you scroll to the end of the BBS list.
Scrolling is still not behaving as it did before you started modifying it. Now, when you arrow up while at the top of the a page-full or arrow down while at the bottom fo a page-full, rather than scroll by one (and leave the selection bar at the top or bottom), the list is scrolled by a full page full (as if page up or page down was struck) and the selection bar moves to the opposite side of the screen (i.e if it was at the top, it moves to the bottom, or vice versa).
Re: exec/sbbslist.js
By: Digital Man to nightfox on Sat Mar 28 2020 05:29 pm
Scrolling is still not behaving as it did before you started modifying it. Now, when you arrow up while at the top of the a page-full or arrow down while at the bottom fo a page-full, rather than scroll by one (and leave the selection bar at the top or bottom), the list is scrolled by a full page full (as if page up or page down was struck) and the selection bar moves to the opposite side of the screen (i.e if it was at the top, it moves to the bottom, or vice versa).
That was intentional, for screen refresh optimizations. Rather than re-draw the whole list every time you scroll one item, I thought it would be more efficient to draw a whole page once, and then when you move up or down, to only re-draw the lightbar for 2 items each time (until you go to the next page). Do you think this behavior is undesirable?
That was intentional, for screen refresh optimizations. Rather than
re-draw the whole list every time you scroll one item, I thought it
would be more efficient to draw a whole page once, and then when you
move up or down, to only re-draw the lightbar for 2 items each time
It's surprising behavior (to me) for the arrow keys and I don't care for surpringing behavior. If the user wants to move a page at a time, they use the page up/down keys. If they're using the arrow keys, they're expecting to move a single item at a time. The previous/expected behavior is consistent with most applications, even web browsers. I can't recall any other application that behaves in the manner that you've changed sbbslist to behave.
Re: exec/sbbslist.js
By: Digital Man to Nightfox on Sat Mar 28 2020 07:02 pm
That was intentional, for screen refresh optimizations. Rather than
re-draw the whole list every time you scroll one item, I thought it
would be more efficient to draw a whole page once, and then when you
move up or down, to only re-draw the lightbar for 2 items each time
It's surprising behavior (to me) for the arrow keys and I don't care for surpringing behavior. If the user wants to move a page at a time, they use the page up/down keys. If they're using the arrow keys, they're expecting to move a single item at a time. The previous/expected behavior is consistent with most applications, even web browsers. I can't recall any other application that behaves in the manner that you've changed sbbslist to behave.
True, I suppose.. Though at that point, it almost seems like it might as well be reverted back to 1.54. I'm sorry I didn't talk to you about changing it first, as I probably should have.
exec sbbslist.js 1.64 1.65
Update of /cvsroot/sbbs/exec
In directory cvs:/tmp/cvs-serv15321
Modified Files:
sbbslist.js
Log Message:
When using the up arrow at the top of the page to scroll up one, or the bottom arrow at the bottom of the page to scroll down one, sbbslist now scrolls the list up/down one entry rather than the whole page of entries, to be consistent with earlier behavior (1.54 and earlier).
Sysop: | KrAAB |
---|---|
Location: | Donna, TX |
Users: | 4 |
Nodes: | 20 (0 / 20) |
Uptime: | 33:34:01 |
Calls: | 494 |
Files: | 2,467 |
D/L today: |
52 files (10,000K bytes) |
Messages: | 44,344 |