• Error in fido-nodelist-browser.js

    From Codefenix@1:103/705 to echicken on Sunday, January 19, 2025 20:17:35
    Hey there, echicken!

    Is there a trick to getting the "new" fido-nodelist-browser.js to work?

    When I run it, I get this error:


    !JavaScript fido-nodelist-browser.js line 6940: SyntaxError: unterminated string
    literal

    !ERROR[x3] compiling C:\sbbs\exec\fido-nodelist-browser.js


    The line in question looks like a terminated string to me, so I'm puzzled as to what's causing the error.

    Using the latest js file from gitlab, running SBBS 3.20b on Windows 10 64bit.

    |15 þ ù ú codefenix ú ù ú ConstructiveChaos BBS ú ú ù þ þ
    |08 þ þ ù (https/telnet/ssh)://conchaos.synchro.net ú ù þ
    |07

    ...Activity is the politician's substitute for achievement.
    ---
    þ Synchronet þ -=[ ConstructiveChaos BBS | conchaos.synchro.net ]=-
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From nelgin@1:103/705 to Codefenix on Monday, January 20, 2025 03:11:28
    Re: Error in fido-nodelist-browser.js
    By: Codefenix to echicken on Sun Jan 19 2025 20:17:35

    !JavaScript fido-nodelist-browser.js line 6940: SyntaxError: unterminated string
    literal

    Pasting the offending line would maybe help.

    6939 case "^X":
    6940 case "^Y":
    6941 case "^Z":

    Hmm...

    ---
    þ Synchronet þ End Of The Line BBS - endofthelinebbs.com
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Digital Man@1:103/705 to Codefenix on Monday, January 20, 2025 02:59:18
    Re: Error in fido-nodelist-browser.js
    By: Codefenix to echicken on Sun Jan 19 2025 08:17 pm

    Hey there, echicken!

    Is there a trick to getting the "new" fido-nodelist-browser.js to work?

    When I run it, I get this error:


    !JavaScript fido-nodelist-browser.js line 6940: SyntaxError: unterminated string
    literal

    !ERROR[x3] compiling C:\sbbs\exec\fido-nodelist-browser.js


    The line in question looks like a terminated string to me, so I'm puzzled as to what's causing the error.

    Is it possible you have more than copy of that file and you're looking at line 6940 in the wrong one?

    I don't normally use/run this script, but I did a quick execution of it and worked fine, which I don't think it would have if there was a syntax error in it.
    --
    digital man (rob)

    Synchronet/BBS Terminology Definition #64:
    REP = QWK Reply
    Norco, CA WX: 47.7øF, 89.0% humidity, 0 mph SE wind, 0.00 inches rain/24hrs
    --- SBBSecho 3.23-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Codefenix@1:103/705 to nelgin on Monday, January 20, 2025 08:32:30
    Re: Error in fido-nodelist-browser.js
    By: nelgin to Codefenix on Mon Jan 20 2025 03:11 am

    Pasting the offending line would maybe help.

    6939 case "^X":
    6940 case "^Y":
    6941 case "^Z":

    Yeah, I didn't do that since the strings in these case statements contain nonprintables, and I don't have those committed to memory as CTRL codes. Here's how Notepad++ expresses them though (with "show all characters" enabled):

    6939: case "CAN":
    6940: case "EM": // this is the line it's complaining about
    6941: case "SUB":

    Suppose it would be the string containing the CTRL-Y.

    I tried removing lines 6940 and 6941, plus two similar lines containing the same strings on 8313 and 8314, and then it worked. Commenting out the lines didn't help and would cause syntax errors instead. Only after removing these lines I was able to run the script.

    I'll note though, having the "spinning cursor" option turned on in the default user settings messes up the display. Seems like it adds extra carriage returns in places, shifting things around.

    |15 þ ù ú codefenix ú ù ú ConstructiveChaos BBS ú ú ù þ þ
    |08 þ þ ù (https/telnet/ssh)://conchaos.synchro.net ú ù þ
    |07

    ...Blessed be he who is called a big wheel, for he goeth around in circles.
    ---
    þ Synchronet þ -=[ ConstructiveChaos BBS | conchaos.synchro.net ]=-
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Codefenix@1:103/705 to Digital Man on Monday, January 20, 2025 08:34:02
    Re: Error in fido-nodelist-browser.js
    By: Digital Man to Codefenix on Mon Jan 20 2025 02:59 am

    Is it possible you have more than copy of that file and you're looking at line 6940 in the wrong one?

    Definitely not. Removing the offending line in this file actually leads to a different outcome, so I know this is the right one.

    |15 þ ù ú codefenix ú ù ú ConstructiveChaos BBS ú ú ù þ þ
    |08 þ þ ù (https/telnet/ssh)://conchaos.synchro.net ú ù þ
    |07

    ...It works better if you plug it in.
    ---
    þ Synchronet þ -=[ ConstructiveChaos BBS | conchaos.synchro.net ]=-
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Digital Man@1:103/705 to Codefenix on Monday, January 20, 2025 11:27:26
    Re: Error in fido-nodelist-browser.js
    By: Codefenix to nelgin on Mon Jan 20 2025 08:32 am

    Re: Error in fido-nodelist-browser.js
    By: nelgin to Codefenix on Mon Jan 20 2025 03:11 am

    Pasting the offending line would maybe help.

    6939 case "^X":
    6940 case "^Y":
    6941 case "^Z":

    Yeah, I didn't do that since the strings in these case statements contain nonprintables, and I don't have those committed to memory as CTRL codes. Here's how Notepad++ expresses them though (with "show all characters" enabled):

    6939: case "CAN":
    6940: case "EM": // this is the line it's complaining about
    6941: case "SUB":

    Wow. I didn't realize there were actually control codes embedded in the file! I'm surprised that works for anyone.

    Suppose it would be the string containing the CTRL-Y.

    Apparently, yeah, but that's not how you're supposed to do that in JavaScript. I'll take a look at fixing that.
    --
    digital man (rob)

    Synchronet/BBS Terminology Definition #43:
    IBM437 = Code Page 437 (so-called IBM Extended ASCII)
    Norco, CA WX: 62.6øF, 16.0% humidity, 6 mph NNE wind, 0.01 inches rain/24hrs --- SBBSecho 3.23-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Digital Man@1:103/705 to Codefenix on Monday, January 20, 2025 11:41:33
    Re: Error in fido-nodelist-browser.js
    By: Digital Man to Codefenix on Mon Jan 20 2025 11:27 am

    Wow. I didn't realize there were actually control codes embedded in the file! I'm surprised that works for anyone.

    Suppose it would be the string containing the CTRL-Y.

    Apparently, yeah, but that's not how you're supposed to do that in JavaScript. I'll take a look at fixing that.

    That looks like it's typescript generated JS code, so echicken (or whomever hasa the source) would need to fix that I think. The usual way of embedding control characters in JS strings is via the '\' escape character, e.g. "\x01" for Ctrl-A. Pretty strange that typescript puts literal control characters in the JS source.
    --
    digital man (rob)

    Synchronet/BBS Terminology Definition #55:
    NAPLPS = North American Presentation Layer Protocol Syntax (ANSI X3.110)
    Norco, CA WX: 62.9øF, 16.0% humidity, 13 mph WNW wind, 0.01 inches rain/24hrs --- SBBSecho 3.23-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)