• Convert Simple Shell from Baja to JS

    From Thomas McCaffery@VERT to GitLab note in main/sbbs on Saturday, June 13, 2026 15:03:47
    https://gitlab.synchro.net/main/sbbs/-/merge_requests/698#note_9343

    This line is bugging me #fall through exec_bin "str_cmds %s" end_cmd I am guessing if no commands it goes here! I am not sure how to call this in JS in this shell. Other's use ; and command correct?

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From nelgin@VERT/EOTLBBS to Thomas McCaffery on Saturday, June 13, 2026 19:26:24
    On Sat, 13 Jun 2026 15:03:47 -0700
    "Thomas McCaffery" (VERT) <VERT!Thomas.McCaffery@endofthelinebbs.com>
    wrote:
    https://gitlab.synchro.net/main/sbbs/-/merge_requests/698#note_9343

    This line is bugging me #fall through exec_bin "str_cmds %s" end_cmd
    I am guessing if no commands it goes here! I am not sure how to call
    this in JS in this shell. Other's use ; and command correct?

    ---
    ­ Synchronet ­ Vertrauen ­ Home of Synchronet ­
    [vert/cvs/bbs].synchro.net
    Maybe some more context would be useful but in JS you would use // for
    a single line comment or /* whatever */ for a comment block.
    --
    End Of The Line BBS - Plano, TX
    telnet endofthelinebbs.com 23
    ---
    ­ Synchronet ­ End Of The Line BBS - endofthelinebbs.com
  • From Rob Swindell@VERT to GitLab note in main/sbbs on Saturday, June 13, 2026 18:19:15
    https://gitlab.synchro.net/main/sbbs/-/merge_requests/698#note_9350

    Other shell's use the ; prefix for string commands, yes, but not the simple shell.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to GitLab note in main/sbbs on Saturday, June 13, 2026 18:21:59
    https://gitlab.synchro.net/main/sbbs/-/merge_requests/698#note_9351

    Why is this a while() loop?

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to GitLab note in main/sbbs on Saturday, June 13, 2026 18:23:04
    https://gitlab.synchro.net/main/sbbs/-/merge_requests/698#note_9351

    Looks like a potentially infinite loop (when console.getkey() returns some unexpected value).

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to GitLab note in main/sbbs on Saturday, June 13, 2026 18:24:29
    https://gitlab.synchro.net/main/sbbs/-/merge_requests/698#note_9352

    white-space/indent issue

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to GitLab note in main/sbbs on Saturday, June 13, 2026 18:24:42
    https://gitlab.synchro.net/main/sbbs/-/merge_requests/698#note_9353

    white-space/indent issue

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to GitLab note in main/sbbs on Saturday, June 13, 2026 18:25:33
    https://gitlab.synchro.net/main/sbbs/-/merge_requests/698#note_9354

    Why is this function being reimplemented here?

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Thomas McCaffery@VERT to GitLab note in main/sbbs on Saturday, June 13, 2026 19:32:56
    https://gitlab.synchro.net/main/sbbs/-/merge_requests/698#note_9355

    I am rechecking it. It was a draft, I see a lot of mistakes.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to GitLab note in main/sbbs on Saturday, June 13, 2026 22:58:38
    https://gitlab.synchro.net/main/sbbs/-/merge_requests/698#note_9364

    This is just going to eat the CPU while waiting for keypress. Why?

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to GitLab note in main/sbbs on Saturday, June 13, 2026 22:58:48
    https://gitlab.synchro.net/main/sbbs/-/merge_requests/698#note_9364

    This while loop is just going to eat the CPU while waiting for keypress. Why?

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to GitLab note in main/sbbs on Sunday, June 14, 2026 13:30:16
    https://gitlab.synchro.net/main/sbbs/-/merge_requests/698#note_9370

    This code doesn't make any sense to me. Why are you using console.inkey() in the first place? And then you're throwing away the result?

    Any/all loops should terminate upon `(!bbs.online || js.terminated)` - but I don't understand why this loop is here in the first place.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Thomas McCaffery@VERT to GitLab note in main/sbbs on Sunday, June 14, 2026 14:09:16
    https://gitlab.synchro.net/main/sbbs/-/merge_requests/698#note_9371

    Ok give me a couple of days, I will look on why I did that.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Thomas McCaffery@VERT to GitLab note in main/sbbs on Sunday, June 14, 2026 18:40:12
    https://gitlab.synchro.net/main/sbbs/-/merge_requests/698#note_9372

    I see why I was doing this to Flush Keyboard Buffer and prevent leftover keystrokes from auto-submitting commands. However, I see your point.

    ###

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Thomas McCaffery@VERT to GitLab note in main/sbbs on Sunday, June 14, 2026 18:41:57
    https://gitlab.synchro.net/main/sbbs/-/merge_requests/698#note_9372

    The `inkey()` loop was originally intended to flush the keyboard buffer before calling `getstr()`, to prevent leftover keystrokes from auto-submitting commands. I agree the implementation wasn't ideal. I will replace it with a safer version using a timeout, CPU yield, and proper termination checks.

    ###

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to GitLab note in main/sbbs on Sunday, June 14, 2026 19:42:16
    https://gitlab.synchro.net/main/sbbs/-/merge_requests/698#note_9380

    Crazy indentation here.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to GitLab note in main/sbbs on Sunday, June 14, 2026 19:42:54
    https://gitlab.synchro.net/main/sbbs/-/merge_requests/698#note_9381

    Crazy identation.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to GitLab note in main/sbbs on Sunday, June 14, 2026 19:43:15
    https://gitlab.synchro.net/main/sbbs/-/merge_requests/698#note_9382

    Did you miss my previous comment about loops?

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net