• New Abstraction Layer

    From deon@1:103/705 to Digital Man on Sun Sep 28 09:26:52 2025
    Hey Rob,

    I've been out of the scene for a while (busy on life), but at some time a few months ago, I updated Sync to 3.21 - which if I recall from the chatter that it has a new output layer (aka abstraction layer)?

    (I'm thinking that the problem below is related to that, because I worked on my viewdata.js for a year or more, but I did upgrade from 3.19 a few months ago.)

    Today, I connected to my viewdata port (port 516) to see how its working, and I've noticed that the page is completly messed up - I think because of two reasons.

    (In my viewdata processing, I've been using write_raw() to send data to the terminal. I'm assuming this will sent data as is to the terminal?)

    1) There is extra output sent to the screen with the page data (looks like 13 x spaces 0x20). This normally wouldnt be an issue, because a HOME command would get me to the top left corner and I would overwrite it anyway.

    (At some point I'd like to figure out this extra data and surpress it.)

    2) It seems my 0x1e is not being sent (viewdata home).

    This is a tcpdump packet dump (IPv6 packet) - where I wrapped the HOME command around "[" and "] HOME" text.

    I expected to see (at 0x0063) 0x5b 0x1e 0x5d 0x20 0x48 0x4f 0x4d 0x45, however the 0x1e is missing... (so the screen is not homed, and the page is written from the current cursor position, which isnt 0,0).

    0x0000: dc2c 6e22 1123 bc24 1175 0bcd 86dd 6026 .,n".#.$.u....`&
    0x0010: 6672 03e4 063f 2406 3400 0314 2497 0d0c fr...?$.4...$...
    0x0020: f105 0000 000f 2406 3400 0314 2491 f544 ......$.4...$..D
    0x0030: fc2f a969 6f17 0204 eb85 196d dbe1 b1f8 ./.io......m....
    0x0040: 8a16 8018 01f7 0b5e 0000 0101 080a 74fa .......^......t.
    0x0050: 1b65 e711 51b7 2020 2020 2020 2020 2020 .e..Q...........
    0x0060: 2020 205b 5d20 484f 4d45 2020 2020 2020 ...[].HOME......
    0x0070: 2020 2020 2020 2020 2020 2020 2020 2020 ................

    The code that writes the home is:

    const VIEWDATA_HOME = '\x1e';
    ...

    this.gotoxy = function(x,y) {
    log(LOG_DEBUG,'- Moving cursor to y:'+y+', x:'+x);

    write_raw('[');
    write_raw(VIEWDATA_HOME);
    write_raw('] HOME');

    if (x > 0)
    write_raw(VIEWDATA_RIGHT.repeat(x-1));

    if (y > 0)
    write_raw(VIEWDATA_DOWN.repeat(y-1));
    }

    So could this be a cause of the new abstraction layer work?

    Is write_raw() the right method to bypass any internal processing and send binary data to the terminal?


    ...ëîåï

    ---
    þ Synchronet þ AnsiTEX bringing back videotex but with ANSI
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Digital Man@1:103/705 to deon on Sun Sep 28 01:58:52 2025
    Re: New Abstraction Layer
    By: deon to Digital Man on Sun Sep 28 2025 09:26 am

    Hey Rob,

    I've been out of the scene for a while (busy on life), but at some time a few months ago, I updated Sync to 3.21 - which if I recall from the chatter that it has a new output layer (aka abstraction layer)?

    Deuce rewrote the terminal emulation code, abstracting it to support more terminal types.

    (I'm thinking that the problem below is related to that, because I worked on my viewdata.js for a year or more, but I did upgrade from 3.19 a few months ago.)

    Unfortunately, Deuce doesn't read DOVE-Net, but you can reach him usually (recently) in #synchronet at irc.synchro.net.

    Today, I connected to my viewdata port (port 516) to see how its working, and I've noticed that the page is completly messed up - I think because of two reasons.

    (In my viewdata processing, I've been using write_raw() to send data to the terminal. I'm assuming this will sent data as is to the terminal?)

    Yes, but write_raw() also performs Telnet escaping when appropriate.

    1) There is extra output sent to the screen with the page data (looks like 13 x spaces 0x20). This normally wouldnt be an issue, because a HOME command would get me to the top left corner and I would overwrite it anyway.

    (At some point I'd like to figure out this extra data and surpress it.)

    Deuce changed js_write_raw() to call some new high level "term_out" function rather than "putcom" as it used to. I'll commit a change back to the old behavior but Deuce might object for some reason. Please test it out and see if that fixes the issue you're having.

    2) It seems my 0x1e is not being sent (viewdata home).

    Let me know if that recent commit fixes this issue too.

    So could this be a cause of the new abstraction layer work?

    Yes.

    Is write_raw() the right method to bypass any internal processing and send binary data to the terminal?

    Yes.
    https://wiki.synchro.net/custom:javascript#output
    --
    digital man (rob)

    Rush quote #63:
    He's got a problem with his poisons, but you know he'll find a cure
    Norco, CA WX: 64.1øF, 85.0% humidity, 0 mph NW wind, 0.00 inches rain/24hrs
    --- SBBSecho 3.29-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From deon@1:103/705 to Digital Man on Sun Sep 28 22:04:34 2025
    Re: New Abstraction Layer
    By: Digital Man to deon on Sun Sep 28 2025 01:58 am

    Howdy,

    Yes, but write_raw() also performs Telnet escaping when appropriate.

    Yup, thanks - I think that'll be OK (and right).

    Deuce changed js_write_raw() to call some new high level "term_out" function rather than "putcom" as it used to. I'll commit a change back to the old behavior but Deuce might object for some reason. Please test it out and see if that fixes the issue you're having.

    It does fix it, thank you.

    Happy to diagnose/validate stuff as Deuce does his magic.


    ...ëîåï

    ---
    þ Synchronet þ AnsiTEX bringing back videotex but with ANSI
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)