Loading ...
Sorry, an error occurred while loading the content.

Randomizer [was Re: [peditors] Setting a timer in BugMe]

Expand Messages
  • Steven Hill
    ... When I read this I thought no way, you need arithmetic for that . Then I got stuck in a traffic jam on the way home and an idea came to me. Say you had a
    Message 1 of 17 , Jun 1, 2001
    • 0 Attachment
      On 31/5/01 16:49, "The White Crow" <whytcrow@...> wrote:

      > 1. A randomizer function of some sort.

      When I read this I thought 'no way, you need arithmetic for that'. Then I
      got stuck in a traffic jam on the way home and an idea came to me. Say you
      had a list of 60 different actions that you want to choose from randomly.
      Put them into a series of 60 pMacros with names:

      #pm00
      #pm01
      .
      .
      .
      #pm59

      Then you could have a sort of ramdomizer like this

      {random::
      /0x03 /*enter globalMacroMode*/
      `M /*go to scriptPad*/
      `jh`fdorand::`f /*jump to the top and find the dorand script*/
      `jf6c`sf2c /*jump forward 6 chars then select the next 2 chars
      (the macro id#)*/
      /dS /*replace the macro id# with the current seconds, a
      sort of random number!*/
      `. /*exit script pad*/
      /0x04 /*exit globalMacroMode*/
      `&dorand: /*run the dorand script*/
      }
      {dorand::#PM#pmxx} //The dorand script just runs whichever macros is
      currently selected

      OK, so its not strictly random, but nearly as good as.

      With best wishes

      Steven
      -------------------------------------------------------------
      Dr Steven Hill | Tel.: +44 (0)1865 275137
      Department of Plant Sciences | Fax.: +44 (0)1865 275074
      South Parks Road | Mobile: +44 (0)7710 461545
      Oxford OX1 3RB,UK | http://www.plants.ox.ac.uk
    • Paolo Amoroso
      ... Could you elaborate on this? Paolo -- EncyCMUCLopedia * Extensive collection of CMU Common Lisp documentation
      Message 2 of 17 , Jun 1, 2001
      • 0 Attachment
        On Thu, 31 May 2001 11:49:43 -0400, The White Crow <whytcrow@...> wrote:

        > 1. A randomizer function of some sort.

        Could you elaborate on this?


        Paolo
        --
        EncyCMUCLopedia * Extensive collection of CMU Common Lisp documentation
        http://cvs2.cons.org:8000/cmucl/doc/EncyCMUCLopedia/
      • The White Crow
        ... Can I just say wow? Wow...I might be able to use this, Thanks! Jennifer -- The White Crow Author: The Deryni Roleplaying Game (Coming Nov. 2001, Grey
        Message 3 of 17 , Jun 1, 2001
        • 0 Attachment
          >
          >OK, so its not strictly random, but nearly as good as.

          Can I just say wow? Wow...I might be able to use this, Thanks!

          Jennifer
          --
          The White Crow
          Author: The Deryni Roleplaying Game (Coming Nov. 2001, Grey Ghost Press)
          My RPG pages: http://www.io.com/~whytcrow/
          Living Writing: A Column at http://www.free-epress.com/columns/index.htm
          Peditress since 7/5/00
        • The White Crow
          ... Um...the ability to generate a random number. Steven s example is just amazing, although I was thinking more along the lines of entering a range, and then
          Message 4 of 17 , Jun 1, 2001
          • 0 Attachment
            At 10:50 AM 6/1/2001 +0200, you wrote:
            >On Thu, 31 May 2001 11:49:43 -0400, The White Crow <whytcrow@...> wrote:
            >
            > > 1. A randomizer function of some sort.
            >
            >Could you elaborate on this?

            Um...the ability to generate a random number. Steven's example is just
            amazing, although I was thinking more along the lines of entering a range,
            and then getting a random number from there back.

            I have lots of writing ideas in a category in p04. Sometimes, when I'm
            stuck on something else, I pull up one of those by doing a semi-random tap
            on the list and then playing with the idea for a while. But why do by hand
            what you can do with a pScript? ;)

            So if I could randomize the number, then I could plug that into the go to
            memo function. Using Steven's example, I could use the seconds as a random
            number, although I'd be stuck to 1-60, but that's hardly a major
            problem. If it had a range, I could go for any memo in the category. I
            suppose if I think about it after I wake up more, then I can use the
            seconds along with the number of memos to work something out...

            (I also like the sixty different options thing...that's pretty darn neat!)

            Jennifer
            --
            The White Crow
            Author: The Deryni Roleplaying Game (Coming Nov. 2001, Grey Ghost Press)
            My RPG pages: http://www.io.com/~whytcrow/
            Living Writing: A Column at http://www.free-epress.com/columns/index.htm
            Peditress since 7/5/00
          • Steven Hill
            ... Thanks - I was pretty pleased with it although I should really credit the malfunctioning traffic signal that was staying on green for a short and seemingly
            Message 5 of 17 , Jun 1, 2001
            • 0 Attachment
              On 1/6/01 13:15, "The White Crow" <whytcrow@...> wrote:

              > Steven's example is just
              > amazing,

              Thanks - I was pretty pleased with it although I should really credit the
              malfunctioning traffic signal that was staying on green for a short and
              seemingly random length of time. It extended my drive home (more thinking
              time), and gave me the idea of using /dS to generate the random number

              > So if I could randomize the number, then I could plug that into the go to
              > memo function. Using Steven's example, I could use the seconds as a random
              > number, although I'd be stuck to 1-60, but that's hardly a major
              > problem. If it had a range, I could go for any memo in the category. I
              > suppose if I think about it after I wake up more, then I can use the
              > seconds along with the number of memos to work something out...

              You could also use it to get a random number between 1-30, 1-20, 1-15, 1-12
              1-10, 1-6, 1-5, 1-4, 1-3, 1-2 (i.e. Any number that divides exactly into
              sixty), just by putting the same thing into groups of the macros. You could
              probably even automate this with a script...

              With best wishes

              Steven
              -------------------------------------------------------------
              Dr Steven Hill | Tel.: +44 (0)1865 275137
              Department of Plant Sciences | Fax.: +44 (0)1865 275074
              South Parks Road | Mobile: +44 (0)7710 461545
              Oxford OX1 3RB,UK | http://www.plants.ox.ac.uk
            Your message has been successfully submitted and would be delivered to recipients shortly.