• Bubble Boggle error

    From Va7aqd@VERT/VA7AQDS to All on Thursday, April 25, 2019 22:18:50
    This was interesting - got dumped out of the game, only log message seems to be:

    Node 1 <Va7aqd> !JavaScript /sbbs/xtrn/bublbogl/game.js line 336: InternalError: too much recursion

    Wasn't doing anything terribly interesting aside from playing.

    ---
    þ Synchronet þ VA7AQD's Tavern - bbs.isurf.ca
  • From Nightfox@VERT/DIGDIST to All on Friday, April 26, 2019 07:44:41
    Re: Bubble Boggle error
    By: Va7aqd to All on Fri Apr 26 2019 12:18 am

    This was interesting - got dumped out of the game, only log message seems to be:

    Node 1 <Va7aqd> !JavaScript /sbbs/xtrn/bublbogl/game.js line 336: InternalError: too much recursion

    Wasn't doing anything terribly interesting aside from playing.

    I've seen that once with a JavaScript door I was developing. It seems JavaScript doesn't allow as much recursion as other languages, such as C++.

    Nightfox

    ---
    þ Synchronet þ Digital Distortion: digitaldistortionbbs.com
  • From echicken@VERT/ECBBS to Va7aqd on Friday, April 26, 2019 11:25:11
    Re: Bubble Boggle error
    By: Va7aqd to All on Fri Apr 26 2019 00:18:50

    Node 1 <Va7aqd> !JavaScript /sbbs/xtrn/bublbogl/game.js line 336: InternalError: too much recursion

    Wasn't doing anything terribly interesting aside from playing.

    It was related to one of the words you entered. Seems like there must be some cases in which it's possible to throw the game's dictionary scanning function into infinite (or excessive) recursion.

    If you have any recollection of which words you'd put on the board before this happened, that might be interesting to know.

    (Stares at scanDictionary() for a while ...)

    Apparently this thing continuously narrows down on the location of a word in the dictionary file, starting at the middle of the file, then halfway between there and the start or end of the file, then halfway between *there* and the start or end of the file, and so on, until the middle line matches the word you entered. Actually seems like it could be a fairly speedy way of searching, most of the time. You may have hit some unfortunate magic number of n lines away from the middle of the dictionary file.

    Can't think of a great way to fix it at the moment, but I've shared your report with the game's author.

    ---
    echicken
    electronic chicken bbs - bbs.electronicchicken.com - 416-425-5435
    þ Synchronet þ electronic chicken bbs - bbs.electronicchicken.com
  • From Digital Man@VERT to Nightfox on Friday, April 26, 2019 10:02:11
    Re: Bubble Boggle error
    By: Nightfox to All on Fri Apr 26 2019 09:44 am

    Re: Bubble Boggle error
    By: Va7aqd to All on Fri Apr 26 2019 12:18 am

    This was interesting - got dumped out of the game, only log message seems to be:

    Node 1 <Va7aqd> !JavaScript /sbbs/xtrn/bublbogl/game.js line 336: InternalError: too much recursion

    Wasn't doing anything terribly interesting aside from playing.

    I've seen that once with a JavaScript door I was developing. It seems JavaScript doesn't allow as much recursion as other languages, such as C++.

    It's not really a language limitation as it is an implementation (SpiderMonkey) feature: it's detecting a possible infinite recursion issue with the script which *could* result in call stack corruption if gone undetected.

    digital man

    Synchronet "Real Fact" #101:
    Alternate and loadable font support was added to Synchronet in February 2018. Norco, CA WX: 71.1øF, 64.0% humidity, 3 mph E wind, 0.00 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Digital Man@VERT to echicken on Friday, April 26, 2019 10:03:26
    Re: Bubble Boggle error
    By: echicken to Va7aqd on Fri Apr 26 2019 01:25 pm

    the dictionary file, starting at the middle of the file, then halfway between there and the start or end of the file, then halfway between *there* and the start or end of the file, and so on, until the middle line matches the word you entered. Actually seems like it could be a fairly speedy way of searching, most of the time.

    https://en.wikipedia.org/wiki/Binary_search_algorithm :-)


    digital man

    Synchronet/BBS Terminology Definition #8:
    BPS = Bits Per Second
    Norco, CA WX: 71.1øF, 64.0% humidity, 3 mph E wind, 0.00 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Nightfox@VERT/DIGDIST to echicken on Friday, April 26, 2019 11:03:26
    Re: Bubble Boggle error
    By: echicken to Va7aqd on Fri Apr 26 2019 01:25 pm

    Apparently this thing continuously narrows down on the location of a word in the dictionary file, starting at the middle of the file, then halfway between there and the start or end of the file, then halfway between *there* and the start or end of the file, and so on, until the middle line matches the word you entered. Actually seems like it could be a fairly speedy way of searching, most of the time.

    It sounds like a binary search (assuming the dictionary is in proper alphabetical order).

    Nightfox

    ---
    þ Synchronet þ Digital Distortion: digitaldistortionbbs.com
  • From dmxrob@VERT/STLWEST to echicken on Friday, April 26, 2019 15:21:07
    Re: Bubble Boggle error
    By: echicken to Va7aqd on Fri Apr 26 2019 01:25 pm

    Apparently this thing continuously narrows down on the location of a word in the dictionary file, starting at the middle of the file, then halfway between
    there and the start or end of the file, then halfway between *there* and the start or end of the file, and so on, until the middle line matches the word you
    entered. Actually seems like it could be a fairly speedy way of searching,

    Sounds suspiciously like a merge sort in action.... only in this case, we aren't sorting by searching.

    ---
    þ Synchronet þ Gateway to the West [ bbs.homelabber.net ]
  • From Va7aqd@VERT/VA7AQDS to echicken on Friday, April 26, 2019 10:41:10
    Re: Bubble Boggle error
    By: echicken to Va7aqd on Fri Apr 26 2019 01:25 pm

    Can't think of a great way to fix it at the moment, but I've shared your report with the game's author.

    Very cool, thanks for looking in to it!

    ---
    þ Synchronet þ VA7AQD's Tavern - bbs.isurf.ca
  • From echicken@VERT/ECBBS to Digital Man on Friday, April 26, 2019 16:25:41
    Re: Bubble Boggle error
    By: Digital Man to echicken on Fri Apr 26 2019 12:03:26

    https://en.wikipedia.org/wiki/Binary_search_algorithm :-)

    Indeed. I don't think I've ever had a great need to do such a thing, but it's handy to know.

    Will be interesting to see where the problem is in this case. Might mess around with it later unless MCMLXXIX gets to it first.

    ---
    echicken
    electronic chicken bbs - bbs.electronicchicken.com - 416-425-5435
    þ Synchronet þ electronic chicken bbs - bbs.electronicchicken.com
  • From echicken@VERT/ECBBS to Digital Man on Friday, April 26, 2019 16:30:13
    Re: Bubble Boggle error
    By: Digital Man to echicken on Fri Apr 26 2019 12:03:26

    https://en.wikipedia.org/wiki/Binary_search_algorithm :-)

    And ... now it's coming back to me after perusing that article for a minute. I remember using this years ago; evidently I haven't had a need for it since.

    ---
    echicken
    electronic chicken bbs - bbs.electronicchicken.com - 416-425-5435
    þ Synchronet þ electronic chicken bbs - bbs.electronicchicken.com
  • From Digital Man@VERT to echicken on Friday, April 26, 2019 14:49:34
    Re: Bubble Boggle error
    By: echicken to Digital Man on Fri Apr 26 2019 06:30 pm

    Re: Bubble Boggle error
    By: Digital Man to echicken on Fri Apr 26 2019 12:03:26

    https://en.wikipedia.org/wiki/Binary_search_algorithm :-)

    And ... now it's coming back to me after perusing that article for a minute. I remember using this years ago; evidently I haven't had a need for it since.

    SMBLIB uses it when a searching message base index for a specific message number. And it's a popular "coding" interview question.

    digital man

    Synchronet "Real Fact" #41:
    Synchronet's cross-platform library is called XPDEV (named before Windows XP). Norco, CA WX: 72.0øF, 59.0% humidity, 13 mph E wind, 0.00 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From echicken@VERT/ECBBS to Digital Man on Friday, April 26, 2019 17:55:03
    Re: Bubble Boggle error
    By: Digital Man to echicken on Fri Apr 26 2019 16:49:34

    SMBLIB uses it when a searching message base index for a specific message number. And it's a popular "coding" interview question.

    I believe I used it for a similar reason to why it's being used in this game; scanning through a large text file. I tend to forget about stuff that I don't use on a regular basis, which probably wouldn't benefit me in such an interview. (Thankfully I don't go to many of those. Only one in the last ten years, and I turned down the job in the end.)

    ---
    echicken
    electronic chicken bbs - bbs.electronicchicken.com - 416-425-5435
    þ Synchronet þ electronic chicken bbs - bbs.electronicchicken.com