• Random File Display

    From StackFault@21:1/172 to All on Wed Nov 21 16:48:24 2018
    Hi All,

    I am playing with the Random File Display feature in Mystic (ie file.ans, file.an1, etc) and I found no matter how many files I put, it's always the
    same two that shows.

    I've tried with the numbers and the letters (as it appears it is now supported), same result.

    Is there something special that must be done? Seems pretty straightforward
    but the random is not so random according to my tests.

    Any toughts, been experiencing the same, found a workaround?

    Cheers,

    ß Þ
    úúúÄÄÄÄÄúÄÄúúÄÄÄÄúÄú Ý ßúÄúÄÄÄúÄÄÄÄÄÄúúÄÄÄÄÄúÄÄÄÄúÄÄÄÄÄÄúúÄÄÄÄÄÄÄÄÄúÄÄÄÄúúú
    Dave aka Stackfault ß Ýß bbs.bottomlessabyss.net (telnet/2023 þ ssh/2222)
    Bottomless Abyss BBS ÜßÞ https://bbs.bottomlessabyss.net for info
    -úúú --- - - --- -- ú-úú ú úúú úúú ú- -úúú -ú-- úúú úúú -úúú -úúú úúú

    --- Mystic BBS v1.12 A39 2018/04/21 (Linux/64)
    * Origin: The Bottomless Abyss BBS (21:1/172)
  • From Avon@21:1/101 to StackFault on Thu Nov 22 20:00:30 2018
    On 11/21/18, StackFault pondered and said...

    I am playing with the Random File Display feature in Mystic (ie file.ans, file.an1, etc) and I found no matter how many files I put, it's always
    the same two that shows.

    Where are you trying to display them and how are they being called?

    --- Mystic BBS v1.12 A39 2018/04/21 (Windows/32)
    * Origin: Agency BBS | Dunedin, New Zealand | agency.bbs.nz (21:1/101)
  • From StackFault@21:1/172 to Avon on Thu Nov 22 07:04:14 2018
    I am playing with the Random File Display feature in Mystic (ie file. file.an1, etc) and I found no matter how many files I put, it's alway the same two that shows.

    Where are you trying to display them and how are they being called?

    I am just testing with it at the moment, but tried using the (PIPE)DF call, it works but only randomize 2 files and never show the others.

    So I know the feature is called properly but seems to be limited in the amount of files it display... Was thinking about stracing the calls to the
    filesystem to see what it actually tries to read, I might find something more interesting there...

    Cheers,

    ß Þ
    úúúÄÄÄÄÄúÄÄúúÄÄÄÄúÄú Ý ßúÄúÄÄÄúÄÄÄÄÄÄúúÄÄÄÄÄúÄÄÄÄúÄÄÄÄÄÄúúÄÄÄÄÄÄÄÄÄúÄÄÄÄúúú
    Dave aka Stackfault ß Ýß bbs.bottomlessabyss.net (telnet/2023 þ ssh/2222)
    Bottomless Abyss BBS ÜßÞ https://bbs.bottomlessabyss.net for info
    -úúú --- - - --- -- ú-úú ú úúú úúú ú- -úúú -ú-- úúú úúú -úúú -úúú úúú

    --- Mystic BBS v1.12 A39 2018/04/21 (Linux/64)
    * Origin: The Bottomless Abyss BBS (21:1/172)
  • From StackFault@21:1/172 to Avon on Thu Nov 22 08:11:54 2018
    I am playing with the Random File Display feature in Mystic (ie file. file.an1, etc) and I found no matter how many files I put, it's alway the same two that shows.

    Where are you trying to display them and how are they being called?

    Ok, did an strace and I see it access the two files it displays, obviously
    :), but never look for any other. I guess something in that routine is missing...

    Here we can see the syscall it makes:

    <snip>

    gettimeofday({tv_sec=1542891610, tv_usec=992133}, NULL) = 0 access("/bbs/themes/default/text/randomtest1.ans", F_OK) = 0 access("/bbs/themes/default/text/randomtest1.an1", F_OK) = 0 access("/bbs/themes/default/text/randomtest1.ans", F_OK) = 0 open("/bbs/themes/default/text/randomtest1.ans", O_RDWR|O_LARGEFILE) =
    8 clock_gettime(CLOCK_MONOTONIC, {tv_sec=988298,
    tv_nsec=890853991}) = 0

    </snip>

    And it loops between these two files without even looking for any others.
    I also have .an2 to .an5 in the same directory for my test.

    Here we should see it trying to access more than just these two files (the access calls) to build it's internal list, then the open call should open one of the list. But since it does not try to access more than these 2 files
    (.ans and .an1) it just play with these two.

    Let me know if someone managed to get this to work, maybe in a previous release? Maybe it works on Windows but not in Linux?

    Cheers,

    ß Þ
    úúúÄÄÄÄÄúÄÄúúÄÄÄÄúÄú Ý ßúÄúÄÄÄúÄÄÄÄÄÄúúÄÄÄÄÄúÄÄÄÄúÄÄÄÄÄÄúúÄÄÄÄÄÄÄÄÄúÄÄÄÄúúú
    Dave aka Stackfault ß Ýß bbs.bottomlessabyss.net (telnet/2023 þ ssh/2222)
    Bottomless Abyss BBS ÜßÞ https://bbs.bottomlessabyss.net for info
    -úúú --- - - --- -- ú-úú ú úúú úúú ú- -úúú -ú-- úúú úúú -úúú -úúú úúú

    --- Mystic BBS v1.12 A39 2018/04/21 (Linux/64)
    * Origin: The Bottomless Abyss BBS (21:1/172)
  • From Avon@21:1/101 to StackFault on Sat Nov 24 12:43:56 2018
    On 11/22/18, StackFault pondered and said...

    Where are you trying to display them and how are they being called?

    I am just testing with it at the moment, but tried using the (PIPE)DF call, it works but only randomize 2 files and never show the others.

    OK but just so I am clear how you're doing this... how are you doing this? :)

    Do you have a menu command your calling or what are you exactly doing to call the files you're trying to display randomly? It's just I want to try and
    repro your steps to see what's happening when I try :)

    --- Mystic BBS v1.12 A39 2018/04/21 (Windows/32)
    * Origin: Agency BBS | Dunedin, New Zealand | agency.bbs.nz (21:1/101)
  • From StackFault@21:1/172 to Avon on Fri Nov 23 22:49:36 2018
    On 11/22/18, StackFault pondered and said...

    Where are you trying to display them and how are they being call

    I am just testing with it at the moment, but tried using the (PIPE)DF call, it works but only randomize 2 files and never show the others.

    OK but just so I am clear how you're doing this... how are you doing
    this? :)

    Do you have a menu command your calling or what are you exactly doing to call the files you're trying to display randomly? It's just I want to
    try and repro your steps to see what's happening when I try :)

    Well, I tried in a menu command (both in a Display Line of Text with DF and also in a Display File)

    It was always alternating between only 2, the .ans and the .an1

    After that, I stopped looking after that and moves along... I created another theme and then it started alternating between more files where I feel it's
    more random across all the files.

    Not too sure yet what it was... but for now it appears to be working in
    another theme...

    Cheers

    ß Þ
    úúúÄÄÄÄÄúÄÄúúÄÄÄÄúÄú Ý ßúÄúÄÄÄúÄÄÄÄÄÄúúÄÄÄÄÄúÄÄÄÄúÄÄÄÄÄÄúúÄÄÄÄÄÄÄÄÄúÄÄÄÄúúú
    Dave aka Stackfault ß Ýß bbs.bottomlessabyss.net (telnet/2023 þ ssh/2222)
    Bottomless Abyss BBS ÜßÞ https://bbs.bottomlessabyss.net for info
    -úúú --- - - --- -- ú-úú ú úúú úúú ú- -úúú -ú-- úúú úúú -úúú -úúú úúú

    --- Mystic BBS v1.12 A39 2018/04/21 (Linux/64)
    * Origin: The Bottomless Abyss BBS (21:1/172)
  • From Gryphon@21:1/120 to StackFault on Sat Nov 24 13:09:58 2018
    On 11/22/18, StackFault said the following...

    I am playing with the Random File Display feature in Mystic (ie file.an1, etc) and I found no matter how many files I put, it's the same two that shows.

    Where are you trying to display them and how are they being called?

    I am just testing with it at the moment, but tried using the (PIPE)DF call, it works but only randomize 2 files and never show the others.

    One thing to note with the DF command, is that it has special formatting and
    is different than most other MCI commands. The format is: <pipe>DFfilename.ans<pipe>

    --- Mystic BBS v1.12 A39 2018/04/21 (Linux/64)
    * Origin: Cyberia BBS | cyberiabbs.zapto.org | San Jose, CA (21:1/120)
  • From Gryphon@21:1/120 to StackFault on Sat Nov 24 13:14:32 2018
    On 11/24/18, Gryphon said the following...

    On 11/22/18, StackFault said the following...

    I am playing with the Random File Display feature in Mystic file.an1, etc) and I found no matter how many files I put, the same two that shows.

    Where are you trying to display them and how are they being call

    I am just testing with it at the moment, but tried using the (PIPE)DF call, it works but only randomize 2 files and never show the others.

    One thing to note with the DF command, is that it has special formatting and is different than most other MCI commands. The format is: <pipe>DFfilename.ans<pipe>

    Another thing to note is that if you add the .ans to the file name in the DF command, then it will only ever just display that one file. It really should be <pipe>DFfilename<pipe>

    --- Mystic BBS v1.12 A39 2018/04/21 (Linux/64)
    * Origin: Cyberia BBS | cyberiabbs.zapto.org | San Jose, CA (21:1/120)
  • From StackFault@21:1/172 to Gryphon on Sat Nov 24 18:18:20 2018
    One thing to note with the DF command, is that it has special formatt and is different than most other MCI commands. The format is: <pipe>DFfilename.ans<pipe>

    Another thing to note is that if you add the .ans to the file name in
    the DF command, then it will only ever just display that one file. It really should be <pipe>DFfilename<pipe>

    Hi,

    Yes, both are clearly understood. Also, I went a little bit farther by
    stracing the process, I can see it goes from one to the other but never got
    to anything else.

    However, I add another theme and now, in that new theme it "randomize" properly. I will continue to experiment on this but so now i found a work-around, if we can call it that way.

    Thanks for your input.

    Cheers,

    ß Þ
    úúúÄÄÄÄÄúÄÄúúÄÄÄÄúÄú Ý ßúÄúÄÄÄúÄÄÄÄÄÄúúÄÄÄÄÄúÄÄÄÄúÄÄÄÄÄÄúúÄÄÄÄÄÄÄÄÄúÄÄÄÄúúú
    Dave aka Stackfault ß Ýß bbs.bottomlessabyss.net (telnet/2023 þ ssh/2222)
    Bottomless Abyss BBS ÜßÞ https://bbs.bottomlessabyss.net for info
    -úúú --- - - --- -- ú-úú ú úúú úúú ú- -úúú -ú-- úúú úúú -úúú -úúú úúú

    --- Mystic BBS v1.12 A39 2018/04/21 (Linux/64)
    * Origin: The Bottomless Abyss BBS (21:1/172)
  • From bcw142@21:1/145 to StackFault on Wed Nov 28 09:10:10 2018
    On 11/22/18, StackFault said the following...

    I am playing with the Random File Display feature in Mystic (ie file.an1, etc) and I found no matter how many files I put, it's the same two that shows.

    I see your strace and it shows it shouldn't call all of them, but I've tested it on the Raspberry Pi and it does work. I have it up and running at bcw142.zapto.org (telnet 23, ssh 22) using the GD command and no extension on the filename. Whatsnew shows:
    + Mystic's random display file system now also will include letters a-z,
    allowing up to 36 randomly selected display files per filename, up from
    11. It works the same as before. If myansi.an1 exists, then Mystic
    will randomly select any file that exists in the myansi.an0-myansi.an9
    range or myansi.ana-myansi.anz range. For OSes with case sensitive
    filenames, the extensions are always lowercased. They do not have to be
    in any order, just .an1 has to exist to "trigger" the random system:

    myansi.ans
    myansi.an1
    myansi.anz
    myansi.an5

    I've tested 'logoff' with logoff.ans-logoff.an6 in text as random targets.
    I had some issues with it flashing by too fast for multi-screen ANSIs, I had to add a GT |PA after the GD text/logoff to make it work right most of the time. I haven't tried it on Linux64 yet, but it works on the Pi which is Linux32. I likely need to open it up with more than 7 ANSIs, but it does work under A39.

    --- Mystic BBS v1.12 A39 2018/04/21 (Raspberry Pi/32)
    * Origin: Mystic Pi BBS bcw142.zapto.org (21:1/145)