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

[ Feature request ] move (correction)

 [1/5] from: Rebolinth::nodep::dds::nl at: 13-Aug-2003 12:21


* CORRECT VERSION !!!!!! (previous one was only copy :-) Quoting A J Martin Hello Andrew, Well yes ofcaurse, i was building a function that was moving series between different blocks when i though it might even be quicker having it as a native? i dont know.. (currenlty im using remove and copy or anyother possible solution, which is fine with me..) example like: a: [ a b c d e f g h ... ] b: [ 1 2 3 4 5 6 ]
>>move/part a b 3
== [ d e f g h ... ] == [ a b c 1 2 3 4 5 6] c: [ [ a b ] [ c d ] [ e f ] [ g [ h ] ] ] d: [ [ 1 2 ] [ 3 4 ] [ 5 6 ] [ 7 [ 8] ] ]
>>move/deep c d 4 1
== [ [ a b ] [ c d ] [ e f ] [ g ] ] == [ [ h ] [ 1 2 ] [ 3 4 ] [ 5 6 ] [ 7 [ 8] ] ] e: [ [now/time] [now/date] [ hello ] ] f: [ [ "this is a string" ] [ now ] ]
>>move/only e f 2
== [ [now/time] [ hello ] ] == [ [13-Aug-2003] [ "this is a string" ] [ now ] ] and so on... I think its usefull but its up to RT :-) (R)egards, Norman. -> -> Norman wrote: -> > Its seems not to be native ( i probably missed it again ), -> > perhpas an option for enhancement? -> > -> > command: move -> > -> > moves values between series -> > -> > Description -> > move /only /part source destination value -> > -> > /only { moves as series } -> > /part { moves to a given length or position } -> > /deep { moves series values within the block } -> -> Can you give an example or two?

 [2/5] from: AJMartin:orcon at: 13-Aug-2003 22:46


Norman wrote:
> I was building a function that was moving series between different blocks
when i though it might even be quicker having it as a native? i dont know.. (currenlty im using remove and copy or anyother possible solution, which is fine with me..) Probably best to write 'move like a Rebol mezzanine function (like 'append or 'for), and email it to the list, then (after any changes are made) submit it to the library and to feedback. If Rebol HQ like it, they might put it (or something like it) in future Rebol versions, like 'random on series! or 'build-tag. Andrew J Martin ICQ: 26227169 http://www.rebol.it/Valley/ http://valley.orcon.net.nz/ http://Valley.150m.com/

 [3/5] from: petr:krenzelok:trz:cz at: 13-Aug-2003 13:11


A J Martin wrote:
>Norman wrote: >>I was building a function that was moving series between different blocks
<<quoted lines omitted: 8>>
>(or something like it) in future Rebol versions, like 'random on series! or >'build-tag.
yes, but in native mode, not mezzanine ... ve need fast series handling functions ... -pekr-

 [4/5] from: antonr:iinet:au at: 14-Aug-2003 11:48


The point Andrew is trying to make is that it's best to test it out first, to see how useful it is, see if there are any bugs - basically to review it properly before requesting it to be implemented natively. Each native we add increases the size and slows down the overall engine, so we should be careful what we add. Ladislav shows that only an insert was needed in two out of the three examples given, and that it was not much extra typing. Only the third example needed an extra function (reduce). So it's a bit unclear why it is needed that much - as a native, anyway. Anton.

 [5/5] from: andrew:martin:colenso:school at: 14-Aug-2003 14:07


Anton says it so well. :) Andrew J Martin Attendance Officer & Information Systems Trouble Shooter Colenso High School Arnold Street, Napier. Tel: 64-6-8310180 ext 826 Fax: 64-6-8336759 http://colenso.net/scripts/Wiki.r?AJM http://www.colenso.school.nz/

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted