Howdy,
A while ago, I mentioned to you that I often hit a "SlyEdit: Input timeout reached." (and logging in as Sysop I didnt expect to be hit with any timeouts).
Lately, I've hit it a few times, which is particuarly annoying when I'm half way thorough a large messages.
I've noticed its very much random in its timing. Sometimes it would happen within seconds of composing a messages, othertimes I could leave Slyedit running for hours and it would happen. So I thought it might be a key sequence that I'm hitting.
Sure enough, I've noticed that whenever I hit CTRL-Space (I'm on a MAC - and sometimes I hit that by mistake), Slyedit aborts with "Input timeout reached".
I dont always use Syncterm - often iTerm (a MAC telnet client), and I dont think it happens in Syncterm.
So just wondering if there is a keyboard input sequence that you are not trapping that results in going to "Input timeout reached" and aborts the editor. I can pretty much do it everytime now.
...ëîåï
... if that happens in iTerm and not Syncterm (did you test other terminal clients?) perhaps it is a key binding in iTerm
that SlyEdit might be expecting as an upload attachment type thingy?
Sure enough, I've noticed that whenever I hit CTRL-Space (I'm on a MAC - and sometimes I hit that by mistake), Slyedit aborts with "Input timeout reached".
I dont always use Syncterm - often iTerm (a MAC telnet client), and I dont think it happens in Syncterm.
So just wondering if there is a keyboard input sequence that you are not trapping that results in going to "Input timeout reached" and aborts the editor. I can pretty much do it everytime now.
Re: Re: Slyedit
By: Mortifis to deon on Thu Jan 21 2021 12:35 am
... if that happens in iTerm and not Syncterm (did you test other terminal clients?) perhaps it is a key binding in iTerm
that SlyEdit might be expecting as an upload attachment type thingy?
Hmm.. it could well be - although I thought message upload was anything CTRL char (maybe it is CTRL-space? and hence why it aborts since iterm cannot upload).
It'd helpful to know the actual character value being sent when you hit Ctrl-Space. If you go into the user terminal settings, where it prompt you to hit backspace/delete, if you hit Ctrl-Space, what character value does it report?
Re: Re: Slyedit
By: Digital Man to deon on Thu Jan 21 2021 12:06 pm
It'd helpful to know the actual character value being sent when you hit Ctrl-Space. If you go into the user terminal settings, where it prompt you to hit backspace/delete, if you hit Ctrl-Space, what character value does it report?
So it appears to be sending NUL 0x00.
In the terminal settings pressing Ctrl-Space for the "delete" character, yielded nothing.
I got hold of a key scanning tool for the MAC, and it reports this for CTRL Space:
Key Down
Characters:
Unicode:0 / 0x0
Keys:^Space
Key Code: 49 / 0x31
Modifiers: 262401 / 0x40101
And for comparison, the delete key shows this.
Key Down
Characters:
Unicode:127 / 0x7f
Keys:(backspace symbol)
Key Code: 51 / 0x33
Modifiers: 256 / 0x100
So maybe ignoring a NUL character would be sufficient?
Currently, in JS, a console.inkey() timeout looks the same as the receipt of a NUL (ASCII 0) from the user.
I just committed a change so that a script can use a new mode flag (K_NUL) to differentiate between the 2 conditions and SlyEdit could make use of that. Or he could just ignore the empty string result of console.inkey().
Re: Re: Slyedit
By: Digital Man to deon on Thu Jan 21 2021 06:05 pm
Currently, in JS, a console.inkey() timeout looks the same as the receipt of a NUL (ASCII 0) from the user.
I just committed a change so that a script can use a new mode flag (K_NUL) to differentiate between the 2 conditions and SlyEdit could make use of that. Or he could just ignore the empty string result of console.inkey().
Ahh, OK, great, thanks.
I'll wait for Nightfox to make some changes (or Nightfox if you can tell me which lines to play with, I can have a go and see if this change helps - will save me having to find and learn your code :)
These appear to be the relevant lines, in SlyEdit.js:
Re: Re: Slyedit
By: Digital Man to deon on Thu Jan 21 2021 09:39 pm
These appear to be the relevant lines, in SlyEdit.js:
So I had a play and didnt get anywhere. (SlyEdit uses getkey(), not inkey()).
Re: Re: Slyedit
By: Digital Man to deon on Thu Jan 21 2021 09:39 pm
These appear to be the relevant lines, in SlyEdit.js:
So I had a play and didnt get anywhere. (SlyEdit uses getkey(), not inkey()).
require("sbbsdefs.js", "K_NOCRLF");
foo = console.getkey(K_NUL);
writeln('GETKEY (K_NULL): ['+JSON.stringify(foo)+'] ('+foo.charCodeAt(0)+')'); bar = console.getkey(K_NONE);
writeln('GETKEY (K_NONE): ['+JSON.stringify(bar)+'] ('+bar.charCodeAt(0)+')');
foo = console.inkey(K_NUL,10000);
writeln('INKEY (K_NULL): ['+JSON.stringify(foo)+'] ('+foo.charCodeAt(0)+')'); bar = console.inkey(K_NONE,10000);
writeln('INKEY (K_NONE): ['+JSON.stringify(bar)+'] ('+bar.charCodeAt(0)+')'); console.pause();
So I put together this script and ran it with ;exec ?testkey
And got this result:
GETKEY (K_NULL): ["\u000d"] (13)
GETKEY (K_NONE): ["\u000d"] (13)
INKEY (K_NULL): [""] (NaN)
INKEY (K_NONE): [""] (NaN)
The first 2 times I pressed CTRL-Space and nothing happened, so I pressed enter (hence the 0x0d).
The next two times, I only pressed CTRL-Space and they both yieled the same result.
Have I missed something?
Re: Re: Slyedit
By: deon to Digital Man on Fri Jan 22 2021 10:34 pm
Re: Re: Slyedit
By: Digital Man to deon on Thu Jan 21 2021 09:39 pm
These appear to be the relevant lines, in SlyEdit.js:
So I had a play and didnt get anywhere. (SlyEdit uses getkey(), not inkey()).
require("sbbsdefs.js", "K_NOCRLF");
foo = console.getkey(K_NUL);
writeln('GETKEY (K_NULL): ['+JSON.stringify(foo)+'] ('+foo.charCodeAt(0)+')'); bar = console.getkey(K_NONE);
writeln('GETKEY (K_NONE): ['+JSON.stringify(bar)+'] ('+bar.charCodeAt(0)+')');
foo = console.inkey(K_NUL,10000);
writeln('INKEY (K_NULL): ['+JSON.stringify(foo)+'] ('+foo.charCodeAt(0)+')'); bar = console.inkey(K_NONE,10000); writeln('INKEY (K_NONE): ['+JSON.stringify(bar)+'] ('+bar.charCodeAt(0)+')'); console.pause();
So I put together this script and ran it with ;exec ?testkey
And got this result:
GETKEY (K_NULL): ["\u000d"] (13)
GETKEY (K_NONE): ["\u000d"] (13)
INKEY (K_NULL): [""] (NaN)
INKEY (K_NONE): [""] (NaN)
The first 2 times I pressed CTRL-Space and nothing happened, so I pressed enter (hence the 0x0d).
The next two times, I only pressed CTRL-Space and they both yieled the same result.
Have I missed something?
The K_NUL optoin won't do anything different with older builds of sbbs. Did you get and build the latest sbbs code from git?
The K_NUL optoin won't do anything different with older builds of sbbs. Did you get and build the latest sbbs code from git?
I don't have a terminal handy with an obvious method of sending an ASCII NUL (0), but I certainly got different results upon timeout (as expected) when using the new K_NUL mode flag and the new sbbs.
SlyEdit uses inkey() in SlyEdit_Misc.js -> getUserKey():
I don't have a terminal handy with an obvious method of sending an ASCII NUL (0), but I certainly got different results upon timeout (as expected) when using the new K_NUL mode flag and the new sbbs.
Re: Re: Slyedit
By: Digital Man to deon on Fri Jan 22 2021 12:02 pm
Howdy,
I don't have a terminal handy with an obvious method of sending an ASCII NUL (0), but I certainly got different results upon timeout (as expected) when using the new K_NUL mode flag and the new sbbs.
So yes, the line you quoted userInput == "" can be changed to userInput == null, and I no longer suffer the ctrl-space abort issue.
I also tested a timeout, and it trapped correctly.
I've been noticing with Slyedit for sometime now, when you go to quote, it doesn't allow you to quote till the end of the message, it seems to get stuck at the end of the visable page, and repeat the same line over and over again. Is this a bug, or a buffer problem on my system. Not a big deal, as I can copy and paste the original message, but I thought I'd throw it out there in case you know of a fix.
Re: Slyedit
By: DesotoFireflite to Nightfox on Fri Jan 28 2022 02:11 pm
I've been noticing with Slyedit for sometime now, when you go to
quote, it doesn't allow you to quote till the end of the message, it
seems to get stuck at the end of the visable page, and repeat the
same line over and over again. Is this a bug, or a buffer problem on
my system. Not a big deal, as I can copy and paste the original
message, but I thought I'd throw it out there in case you know of a
fix.
I'm not sure what you mean? I'm able to quote to the end of the message. I haven't seen this behavior you're describing.
I'm not sure what you mean? I'm able to quote to the end of the message. I I'm not sure what you mean? I'm able to quote to the end of the message. I I'm not sure what you mean? I'm able to quote to the end of the message. I I'm not sure what you mean? I'm able to quote to the end of the message. I I'm not sure what you mean? I'm able to quote to the end of the message. I
haven't seen this behavior you're describing
If it's a long message, I'm not able to quote to the end. On your message for example, if it were just a few lines longer, I would not be able to quote it all, nor see it all in the quote window. It would get to a certain point, then everytime I hit enter, it just repeats the last line I can see in the quote window like this
One line for every time I hit enter, and I would have never seen
haven't seen this behavior you're describing
In the quote window. Hope this helps to explain further.
If it's a long message, I'm not able to quote to the end. On your message for example, if it were just a few lines longer, I would not be able to quote it all, nor see it all in the quote window. It would get to a
certain point, then everytime I hit enter, it just repeats the last line I can see in the quote window like this
Re: Slyedit
By: DesotoFireflite to Nightfox on Fri Jan 28 2022 04:29 pm
If it's a long message, I'm not able to quote to the end. On your
message for example, if it were just a few lines longer, I would not
be able to quote it all, nor see it all in the quote window. It
would get to a
I logged onto your BBS and tried quoting a long message. I may have been able to reproduce it with one message, but when I tried it again, I was able to quote the whole message.
I'm wondering if your JavaScript memory settings may have something to do with this. In sbbs.ini, in the [Global] section, there is a memory setting called JavaScriptMaxBytes. I suppose one thing you could do is to increase that and see if it lets you quote more of a message. Currently, mine is set to 16M (16 megabytes).
certain point, then everytime I hit enter, it just repeats the last
line I can see in the quote window like this
That's normal. Once you get to the last line of the message in the quote window, it will stop scrolling there, so if you press enter again, it will insert that line again.
Nightfox
I'm wondering if your JavaScript memory settings may have something to do with this. In sbbs.ini, in the [Global] section, there is a memory setting
called JavaScriptMaxBytes.
On 2022 Jan 28 19:05:08, you wrote to DesotoFireflite:
I'm wondering if your JavaScript memory settings may have something to do with this. In sbbs.ini, in the [Global] section, there is a memory setting
called JavaScriptMaxBytes.
this is also set in ctrl/jsexec.ini so it is read from two different places... both should be set to the same values, really...
i think the plan is to prefer jsexec.ini over the global section of sbbs.ini and to later deprecate and eventually remove the options from sbbs.ini... i could be wrong about that, though...
i do know that jsexec.ini is realtively new in the last roughly 3 years... i remember creating it on sestar when i read discussion about it on IRC i think...
this is also set in ctrl/jsexec.ini so it is read from two different places... both should be set to the same values, really...
i think the plan is to prefer jsexec.ini over the global section of
sbbs.ini
and to later deprecate and eventually remove the options from sbbs.ini... i could be wrong about that, though...
i do know that jsexec.ini is realtively new in the last roughly 3
years... i
remember creating it on sestar when i read discussion about it on IRC i think...
I'm wondering if your JavaScript memory settings may have something
to do with this. In sbbs.ini, in the [Global] section, there is a
memory setting called JavaScriptMaxBytes.
this is also set in ctrl/jsexec.ini so it is read from two different places... both should be set to the same values, really...
i think the plan is to prefer jsexec.ini over the global section of sbbs.ini and to later deprecate and eventually remove the options from sbbs.ini... i could be wrong about that, though...
Sysop: | Chris Crash |
---|---|
Location: | Huntington Beach, CA. |
Users: | 578 |
Nodes: | 8 (0 / 8) |
Uptime: | 03:51:22 |
Calls: | 10,736 |
Files: | 5 |
Messages: | 443,456 |