• Slyedit

    From deon@1:103/705 to Nightfox on Thu Jan 21 12:54:56 2021
    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.

    ...ëîåï

    ... Be an individualist. He who follows another is always behind.

    ---
    þ Synchronet þ Alterant | an SBBS in Docker on Pi!
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Mortifis@1:103/705 to deon on Thu Jan 21 00:35:17 2021
    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?


    ~Ephram

    ---
    þ Synchronet þ The Realm of Dispair telnet ephram.synchro.net 2323 ssh 2222 web 82
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From deon@1:103/705 to Mortifis on Thu Jan 21 21:46:20 2021
    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).

    ...ëîåï

    ... If you've seen one REDWOOD tree, you've seen 'em all.

    ---
    þ Synchronet þ Alterant | an SBBS in Docker on Pi!
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Nightfox@1:103/705 to deon on Thu Jan 21 08:35:15 2021
    Re: Slyedit
    By: deon to Nightfox on Thu Jan 21 2021 12:54 pm

    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.

    I don't know if there are any special key sequences SlyEdit isn't trapping.. I also don't have any Apple devices to test with. I suppose I could try to find some special key sequences and try to have SlyEdit handle them.

    Nightfox

    ---
    þ Synchronet þ Digital Distortion: digitaldistortionbbs.com
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Digital Man@1:103/705 to deon on Thu Jan 21 12:06:13 2021
    Re: Re: Slyedit
    By: deon to Mortifis on Thu Jan 21 2021 09:46 pm

    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?
    --
    digital man

    Rush quote #76:
    His reserve a quiet defense, riding out the day's events, the river..Tom Sawyer Norco, CA WX: 67.3øF, 44.0% humidity, 5 mph E wind, 0.00 inches rain/24hrs
    --- SBBSecho 3.12-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From deon@1:103/705 to Digital Man on Fri Jan 22 09:33:45 2021
    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?

    ...ëîåï

    ... Marriage is a great institution - no family should be without it.

    ---
    þ Synchronet þ Alterant | an SBBS in Docker on Pi!
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Digital Man@1:103/705 to deon on Thu Jan 21 18:05:41 2021
    Re: Re: Slyedit
    By: deon to Digital Man on Fri Jan 22 2021 09:33 am

    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().
    --
    digital man

    Rush quote #62:
    He's a restless young romantic, wants to run the big machine .. New World Man Norco, CA WX: 60.6øF, 59.0% humidity, 7 mph NNE wind, 0.00 inches rain/24hrs --- SBBSecho 3.12-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From deon@1:103/705 to Digital Man on Fri Jan 22 14:11:18 2021
    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 :)

    ...ëîåï

    ... If you've seen one city slum, you've seen them all.

    ---
    þ Synchronet þ Alterant | an SBBS in Docker on Pi!
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Digital Man@1:103/705 to deon on Thu Jan 21 21:39:10 2021
    Re: Re: Slyedit
    By: deon to Digital Man on Fri Jan 22 2021 02:11 pm

    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:
    // If userInput is blank, then the input timeout was probably
    // reached, so abort.
    else if (userInput == "")
    {
    returnCode = 1; // Aborted
    continueOn = false;
    console.crlf();
    console.print("\1n\1h\1r" + EDITOR_PROGRAM_NAME + ": Input timeout reached.");
    continue;
    }
    --
    digital man

    Sling Blade quote #16:
    Karl Childers (to Doyle, re: lawn mower blade): I aim to kill you with it. Mmm. Norco, CA WX: 55.2øF, 70.0% humidity, 0 mph S wind, 0.00 inches rain/24hrs
    --- SBBSecho 3.12-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From deon@1:103/705 to Digital Man on Fri Jan 22 22:34:42 2021
    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 only good government.is a bad one in a hell of a fright.

    ---
    þ Synchronet þ Alterant | an SBBS in Docker on Pi!
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Digital Man@1:103/705 to deon on Fri Jan 22 11:30:01 2021
    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()).

    SlyEdit uses inkey() in SlyEdit_Misc.js -> getUserKey():
    // Input a key from the user
    userKey = console.inkey(pMode, inputTimeoutMS);

    return userKey;
    --
    digital man

    Sling Blade quote #22:
    Karl: I don't reckon you have to go with women to be a good father to a boy. Norco, CA WX: 61.6øF, 61.0% humidity, 3 mph NE wind, 0.00 inches rain/24hrs
    --- SBBSecho 3.12-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Digital Man@1:103/705 to deon on Fri Jan 22 11:31:24 2021
    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?
    --
    digital man

    Sling Blade quote #26:
    Karl: kaiser blade, ax handle with long blade on it shaped kinda like a banana. Norco, CA WX: 61.6øF, 61.0% humidity, 3 mph NE wind, 0.00 inches rain/24hrs
    --- SBBSecho 3.12-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Digital Man@1:103/705 to deon on Fri Jan 22 12:02:58 2021
    Re: Re: Slyedit
    By: Digital Man to deon on Fri Jan 22 2021 11:31 am

    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?

    And here's th script I used to test it:
    load("sbbsdefs.js");
    var result = console.inkey(K_NUL, 5000);
    print(typeof result);
    print(result);

    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.
    --
    digital man

    Sling Blade quote #6:
    Karl: he should've had a chance to grow up. He would had fun some time.
    Norco, CA WX: 63.9øF, 57.0% humidity, 1 mph W wind, 0.00 inches rain/24hrs
    --- SBBSecho 3.12-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From deon@1:103/705 to Digital Man on Sat Jan 23 09:55:35 2021
    Re: Re: Slyedit
    By: Digital Man to deon on Fri Jan 22 2021 11:31 am

    Hi

    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 did - running master/8b8ed2159

    ...ëîåï

    ... I want to be what I was when I started to be what I am now.

    ---
    þ Synchronet þ Alterant | an SBBS in Docker on Pi!
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From deon@1:103/705 to Digital Man on Sat Jan 23 10:04:19 2021
    Re: Re: Slyedit
    By: Digital Man to deon on Fri Jan 22 2021 11:30 am

    SlyEdit uses inkey() in SlyEdit_Misc.js -> getUserKey():

    Ahh, so it does. I was confused by the comments that talk about parameters to getkey - didnt actually read the code :( My bad.

    ...ëîåï

    ... For certain people, after fifty, litigation takes the place of sex.

    ---
    þ Synchronet þ Alterant | an SBBS in Docker on Pi!
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From deon@1:103/705 to Digital Man on Sat Jan 23 10:15:44 2021
    Re: Re: Slyedit
    By: Digital Man to deon on Fri Jan 22 2021 12:02 pm

    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.

    Ahh, OK, we are testing different things.

    On *timeout*, yes I see the difference. I was testing what was received by ctrl-space, which is an empty string that passes the userInput == "".

    OK, I know what to play with now.

    ...ëîåï

    ... What is the Latin for office automation?

    ---
    þ Synchronet þ Alterant | an SBBS in Docker on Pi!
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From deon@1:103/705 to Digital Man on Sat Jan 23 10:26:19 2021
    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.

    ...ëîåï

    ... Never try to out-stubborn a cat.

    ---
    þ Synchronet þ Alterant | an SBBS in Docker on Pi!
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Digital Man@1:103/705 to deon on Fri Jan 22 17:01:00 2021
    Re: Re: Slyedit
    By: deon to Digital Man on Sat Jan 23 2021 10:26 am

    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.

    Awesome. That's what I was intending/hoping-for. :-)
    --
    digital man

    Rush quote #7:
    Cities full of hatred fear and lies, withered hearts and cruel, tormented eyes Norco, CA WX: 53.6øF, 69.0% humidity, 1 mph NNW wind, 0.00 inches rain/24hrs --- SBBSecho 3.12-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)