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

[REBOL] Re: RFC: Cross-language benchmark proposal

From: edanaii:cox at: 10-Nov-2002 10:25

Oops. This occured to me after I sent you my first response. Since I was suggesting the spec should be revised (and since it's mine) I guess I should revise it. Bear in mind the original spec was written quickly, to illustrate a point. So, new spec, based on your feedback: ====================================================================== RandomCopy * Objective: Copy a file from the source directory specified to the target directory or file. * Inputs -> Source File/Directory. If Directory, choose from all files in that directory. If File, assume the name should be matched to the source directory and return only the files matching that pattern. -> Target File/Directory. If Directory, copy the File over without changing it's name, If File, then change the name of the File chosen to the name of the Target file. * Outputs -> Target File, as specified above. * Procedure 1 Get all the files in the Source Directory. 2 Choose one file randomly. 3 Copy it to the Target File or Directory. ====================================================================== Recursion is still not specified, as I see no advantage to using it in this context. I could be convinced otherwise. Also, you'll notice I added a few things (like pattern matching) that were not in the original spec. This was more because I hadn't yet figured out how to do that in Java or REBOL, than because it didn't need to be in the spec. If any of you REBOL gurus wanna show me how, I'll gladly listen. :) -- Sincerely, | Tell me, tell me, where I'm going; I don't know Ed Dana | where I've been. Tell me, tell me. Oh won't you Software Developer | tell me, and then tell me again! My body's aching, 1Ghz Athlon Amiga | my heart is breaking and I don't know where to go! | So tell me, tell me, why don't you tell me? I just | gotta know! - Styx, Crystal Ball