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

[REBOL] Rebol Core bits and pieces

From: al::bri::xtra::co::nz at: 23-Nov-2000 22:45

Jeff kindly wrote:
> Thanks for pointing out the bugs, Andrew. There's always more stuff
to do. :-) Have you tried playing with those infamous "hidden object" values yet? Not yet, maybe later. Where's my Rebol/C/C++ sizeof when I need it? :-)
> By the way, this isn't any kind of formal recognition, but I would like
to point out that a couple things in the new experimental were prompted and/or inspired by some things Andrew Martin was kind enough to send into the REBOL contrib system. Thanks Andrew! Yes. I've noticed their influence in the new core, random on series! is a nice addition along with the added /skip refinements. I'd still like the ability to 'shuffle a series, just like we can 'sort a series. I've also got a few more things I'd like to stuff in there as well. Here's one:
>> ChangeRule: func [Search [string!] Replacement [string!]] [
[ reduce [ [ to set-word! 'Start Search to set-word! 'Stop [ to paren! reduce [ [ 'change/part 'Start Replacement 'Stop [ ] [ (length? Replacement) - (length? Search) [ 'skip [ ] [ ]
>> s: "&" parse s ChangeRule "&" "&"
== true
>> s
== "&" I've just got to expand it cover a block of search and replacements. Here's a better shuffle than my earlier one: Shuffle: function [ {Shuffles a series, basically undoes 'sort.} [catch] Series [series!] ][ Pool Index S ][ throw-on-error [ Pool: copy S: Series forall S [ Index: random length? Pool insert/only remove S pick Pool Index remove at Pool Index ; Don't repeat anything. ] Series ] ] I've also got to change my Enhancements and Patches system to cover the different core and view versions. Andrew Martin ICQ: 26227169 http://members.nbci.com/AndrewMartin/