Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: Question and comment about randomizing a block of values

From: whip:cs:unm at: 20-Jun-2001 9:22

Howdy, Joel:
> Stupid Question #1: > > How were we supposed to know about it?
Huh, I could have sworn one of the changes docs listed at least RANDOM/only. I know that I also posted that to the list because we were originally spurred on to add RANDOM/only when Andrew Martin sent in some block randomizing mezzanines. So I asked my "stupid question" because I was barging into a long thread, and I hadn't looked real closely to see if there was some reason why RANDOM block wasn't used. I just didn't realize people didn't know about it. :-)
> > Don't mean to lecture (-:, just think this is an important and > > powerful concept found in series that sometimes gets > > overlooked. Recognizing this dual nature of REBOL series is very > > helpful in so many different problem domains. > > > > WADR, understanding the difference between series-as-value and > series-as-container-of-values is fairly well-established for many of > us.
Sure, Joel, I was putting my remarks about that for others. I'm sure you've got all that. :-)
> Stupid Question #2: > > How are we to figure out the sense of potentially ambiguous > refinements (or short verbal descriptions) without resorting to > trial and error?
I'm not sure. What would you suggest? Extending built-in help? Hopefully, the list of refinements you don't have direct experience with should be getting shorter every day. Perhaps make a script to spit out all functions with refinements, see which one's you haven't played with, post to the list weird ones, email feedback, get the president on the line. :-)
> random blockval > > is an abbreviation of > > foreach item blockval [append [] random item] > > which "distributes" RANDOM across the elements of the block and > produces a block of results (by direct analogy with the result for > tuple values) where each element is chosen at random within a range > set by the corresponding element of the original block.
No, because the above isn't guaranteed to be equally distributed across the blocks contents. You could have duplicates.
> Stupid Question #3: > > Is there any more effective way to find out what's going on with > REBOL (and especially with new releases) other than trial and error?
See stupid answer to stupid question #2. :-) Hopefully RT will do a better job of keeping people informed of new stuff.
> Every now and then, I get this nagging feeling that I'm stumbling > around blindfolded in a dark room full of neat goodies, which I'll > only find if I happen to stumble over each of them by accident. Or > by asking stupid questions.
:-) The only stupid question is the one never asked. Sorry for any confusion or feelings of annoyance. (-: RANDOM [have a good day] -jeff