• Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

AltME groups: search

Help · search scripts · search articles · search mailing list

results summary

worldhits
r4wp237
r3wp1294
total:1531

results window for this page: [start: 501 end: 600]

world-name: r3wp

Group: All ... except covered in other channels [web-public]
yeksoon:
9-Jun-2005
target the Series handphones. eg Series 60, from Nokia.


isn't that the key idea for those 'Series' handphones from Nokia. 
..so that developers can have single API to develop on and easily 
 deploy on a large enough 'market share'
Group: !AltME ... Discussion about AltME [web-public]
Brock:
24-Mar-2009
The way I see it.  If your IP is trying to register, the AltME world 
server checks to see what port to use.  If 5400 is in use (your other 
world running), then it would decide to use the next available port. 
 Maybe however it's using a random port in the series of 5400 - 5409 
(not my experience).  Maybe open them all and try again.
Sunanda:
2-Jun-2010
Glad it's close enough for your current purpose.

If you need better searches for a specific research project, consider 
writing a few lines of REBOL and scanning your own local copy of 
/altme/worlds/rebol3/

The users.set file is simply a text file from which you can map group 
numbers and poster-ids/poster names
/chat/*.set is a series of text files, one per chat group.
It is pretty easy to do.

Or take a look at modifying this:
   http://www.rebol.org/view-script.r?script=skimp-my-altme.r
Group: Core ... Discuss core issues [web-public]
Ladislav:
14-Dec-2005
my Series article: http://en.wikibooks.org/wiki/REBOL_Programming/Language_Features/Series
mentions this for quite some time
Graham:
27-Mar-2006
this was in my response to my suggestion that we adopt a python type 
syntax for parts of series

substring "abcd" [2 .. 3]
Gregg:
28-Mar-2006
Fore example In the case of "substring", that's a bad name IMO, because 
you can use the same concept on any series, not just strings. Is 
"subseries" a good name? Does it read well? Not so much. It could 
mean different things to different people (e.g. are you looking for 
nested series values?). What about "extract", ah, that's used already, 
and what are the implied semantics if we do override it and add behavior? 
I like EXCERPT myself, but it's not a nice short word that's easy 
to guess if you're not sure what it might be called. Whatever the 
name, should there be a /REMOVE refinement, or should there be a 
separate function for that?


OK, so let's assume we have a good name now, how do you define the 
bounds? There is no range! or bounds! type in REBOL. Do you just 
use lower and upper bounds, or should it take an offset and length? 
Should we define a dialect for this? If so, how flexibile should 
it be? Can you get multiple "pieces" all at once? Can you handle 
2D extractions easily and clearly? Should you? Can you specify reverse 
extractions (e.g. from the tail)? Should it return the elements in 
reverse in that case, or should it throw an error if the lower bound 
is higher than the upper bound? etc.
[unknown: 10]:
28-Mar-2006
What is the quickest routine  in rebol to compare 2 series of values 
based on position of the value against data of the value.. i.e. a: 
[ 1 2 3 4 5 ]  b:[ 5 6 7 8 9 ]
Gregg:
12-Apr-2006
Well, you can write your own; if just prototyping, the speed isn't 
critical (we did 160 bit math for Maarten, using bitsets, at one 
point). That said, if you can use a version with rebcode, just wrap 
a mezzanine around the ops. 


That said, I wouldn't mind having standard SHIFT and ROTATE funcs 
that can operate on integer, or series values. Bit ops are also necessary 
for implementing certain algorithms.
Gregg:
12-Apr-2006
; used in SHIFT below
    dup: func [value len [integer!] /local type] [

        type: either series? value [value] [either char? value [""] [[]]]
		head insert/only/dup make type len value len
    ]

    ; used in SHIFT below
    make-blank-value: func [type] [
        any [
            attempt [make type 0]
            attempt [make type ""]
            attempt [make type []]
            attempt [make type none]
        ]
    ]


    ; The new PAD/JUSTIFY func might be used to implement this as well.
    shift: func [
        "Shift values in a series; length doesn't change."
        series [series!]
        /left   "Shift left (the default)"
        /right  "Shift right"

        /part range [number!] "Shift this many positions"  ; TBD series! 
        support?
        /with fill "Fill vacated slots with this value"
        /local pad
    ][
        range: any [range 1]
        if any [empty? series  0 = range] [return series]
        pad: dup any [fill  make-blank-value last series] range
        either right [

            head insert head clear skip tail series negate range pad
        ][
            append remove/part series range pad
        ]
    ]

    rotate: func [
        "Rotate values in a series."
        series [series!]
        /left   "Rotate left (the default)"
        /right  "Rotate right"

        /part range [number!] "Rotate this many positions"  ; TBD series! 
        support?
        /local offset pad
    ][
        range: any [all [range  range // length? series] 1]
        if any [empty? series  zero? range] [return series]
        either right [
            offset: does [skip tail series negate range]
            pad: copy offset
            head insert head clear offset pad
        ][
            pad: copy/part series range
            append remove/part series range pad
        ]
    ]
Graham:
24-Apr-2006
Anyone got a way of operating on each element of a series except 
the last ?
Anton:
4-Jun-2006
This is a frequent stumbling block with beginners - using more words 
than necessary. Words are really good at expressing distinct concepts 
(ie. variables). If you have lots of similar data, then that really 
just calls for a series.
Robert:
16-Jun-2006
This is IMO inconsistent and should be changed:

>> ? for
USAGE:
    FOR 'word start end bump body

DESCRIPTION:
     Repeats a block over a range of values.
     FOR is a function value.

ARGUMENTS:
     word -- Variable to hold current value (Type: word)

     start -- Starting value (Type: number series money time date char)

     end -- Ending value (Type: number series money time date char)

     bump -- Amount to skip each time (Type: number money time char)
     body -- Block to evaluate (Type: block)

(SPECIAL ATTRIBUTES)
     catch
     throw
>> a: 2.0
== 2.0
>> for test 1 a 1 [print test]
** Script Error: for expected end argument of type: integer
** Near: for test 1 a 1
>> number? a
== true


It should be possible to use decimal! as well. The interpreter should 
implicitly convert it to an integer!
Ladislav:
22-Aug-2006
FOR should be able to work for series too according to its spec
Pekr:
22-Aug-2006
interesting, that series working for 'for I mean - is that anyhow 
usefull? :-)
Ladislav:
22-Aug-2006
it is the spec, so one "cure" may of course be to disallow series
Ladislav:
22-Aug-2006
so my understanding is, that according to you it is not OK and you 
would suggest to disallow series as starting and ending value
JaimeVargas:
22-Aug-2006
;; This example illustrates a bit better the behaviour of FOR with 
series

>> series: [a b c d e f g h i j k]  

== [a b c d e f g h i j k]

>> start: skip series 0

== [a b c d e f g h i j k]

>> stop: skip series 6

== [g h i j k]

>> for b start stop 1 [print mold b]

[a b c d e f g h i j k]

[b c d e f g h i j k]

[c d e f g h i j k]

[d e f g h i j k]

[e f g h i j k]

[f g h i j k]

[g h i j k]
>> for b start stop 2 [print mold b]

[a b c d e f g h i j k]

[c d e f g h i j k
]
[e f g h i j k]

[g h i j k]
>> for b start stop 6 [print mold b]

[a b c d e f g h i j k]

[g h i j k]

>> for b start stop 7 [print mold b]

[a b c d e f g h i j k]
JaimeVargas:
22-Aug-2006
Just a small typo, replace b with series for the examples of FOR 
usage.
JaimeVargas:
22-Aug-2006
From the behavior it looks like FOR looks very similar to FORSKIP. 
Only that breaking when the series index is greater than stop.
JaimeVargas:
22-Aug-2006
;So a similar result can behaviour can be  accomplished  with FORSKIP, 
ie:


>> forskip series 2 [print mold series if 6 < index? series [break]]

[a b c d e f g h i j k]

[c d e f g h i j k]

[e f g h i j k]

[g h i j k]

is equivalent to

>> for b start stop 2 [print mold b]

[a b c d e f g h i j k]

[c d e f g h i j k]

[e f g h i j k]

[g h i j k]


I believe we should have only one form for acommplishing the this 
type of series traversal. FORSKIP seems like the better choice than 
FOR. I support  removing series support from FOR. If series support 
is maintained with FOR the infinite loop race condition should be 
removed.
BrianW:
6-Sep-2006
I've been using the following approach for using a series like a 
stack, and I was wondering if there was a better way I'd missed:

	insert my-list item ;; "pop"
	item: my-list/first ;; "push" part 1
	remove/part my-list 1 ;; "push" part 2


I know it's working on the beginning of the series rather than the 
end, but I had trouble remembering if there is a '"pop" (remove  
last item from series and return item to caller) sort of function 
for Rebol.
Group: View ... discuss view related issues [web-public]
Ashley:
8-May-2005
>> help stats
USAGE:
    STATS /pools /types /series /frames /recycle /evals /clear

DESCRIPTION:
     System statistics.  Default is to return total memory used.
     STATS is a native value.

REFINEMENTS:

     /pools -- Returns: width units free-units units-per-alloc segments 
     mem-in-use
     /types -- Returns: Datatype count

     /series -- Returns: total blocks strings other avail free expansions
     /frames -- Returns: total used unused free values-total

     /recycle -- Returns: count series-total series-last frames-total 
     frames-last ballast
     /evals -- Returns: values functions blocks
     /clear -- Clears the evals counters
Geomol:
26-Jun-2005
I noticed a change in image! type offsets in view 1.3 compared to 
e.g. the rwdraw57e.exe version. In rwdraw57e offset 1x0 was in the 
corner, now it's offset 0x0. Example:

>> bitmap: make image! 100x100
>> change/dup at bitmap 1x0 red 8x8
>> view layout [image bitmap]


That piece of code would put a red square in the corner of the bitmap 
in the rwdraw57e version of View. In View 1.3, the second line should 
be:

>> change/dup at bitmap 0x0 red 8x8


and I think, it's a good change. You could argue, that the offset 
should be 1x1 in the corner, like series are indexed from 1, and 
not zero. What do you think?
Group: I'm new ... Ask any question, and a helpful person will try to answer. [web-public]
BrianH:
15-May-2009
>> source array
array: func [
    "Makes and initializes a series of a given size."

    size [integer! block!] "Size or block of sizes for each dimension"
    /initial "Specify an initial value for all elements"
    value "Initial value"
    /local block rest
][
    if block? size [
        rest: next size
        if tail? rest [rest: none]
        size: first size

        if not integer? size [make error! "Integer size required"]
    ]
    block: make block! size
    case [
        block? rest [

            loop size [block: insert/only block array/initial rest :value]
        ]
        series? :value [
            loop size [block: insert/only block copy/deep value]
        ]
        any-function? :value [
            loop size [block: insert/only block value]
        ]
        insert/dup block value size
    ]
    head block
]
BrianH:
15-May-2009
Note it only only does copy/deep of series. Objects are still referenced, 
so you still need the does [make proto []].
BrianH:
15-May-2009
No, I can see the value of only copying series. You don't usually 
want to copy objects - it's not as safe.
BrianH:
5-Jun-2009
Unfortunately, the installer hasn't worked at all in the 2.7 series. 
In the 2.6 series it was broken, and in prior releases even more 
so.
Paul:
13-Jun-2009
Hi mhinson, a couple things at first glance.  Beware setting a word 
to series data.  One of the big pitfalls newcomers have is that if 
they intend to reuse a function that contains a series being set 
that it can result in the series getting recursively populated.  
To avoid that we often use the 'copy word when setting series.  Although, 
by design sometimes we want the previous behavior.  The other thing 
is to get rid of the return at the end.  Just end your statement 
with allmasks.  You should really only need the 'return if you intend 
to pre-empt the full execution of the body block of the function.
Paul:
13-Jun-2009
Another tip while I'm here.  If you ever use the series pickers such 
as first, second etc.., then try to use them as the last item in 
logic functions.  For example:
series: [1 2 3]
if first series = 1 [true]
if 1 = first series [true]


The first logical expression will give you an error and the second 
will work correctly.
mhinson:
13-Jun-2009
Hi guys, thanks for the tips, it is looking neater allready.

About setting the words to series data, is this us in my gode a bad 
example would you say?  I intended that the function would only ever 
need to calculate the values once, but perhaps my method is not secure?

Thanks for the tip about series pickers, that way looks a bit reversed 
so I would have probably got it wrong.
Izkata:
13-Jun-2009
I wouldn't call it a bad example of storing series data, exactly, 
just unusual.  Look at this:
>> foo: func [/local bar][
[    bar: []
[    if empty? bar [
[        print {Generating..}
[        insert bar 1
[        ]
[    return bar
[    ]
>> foo
Generating..
== [1]
>> foo
== [1]

If the function needs to be called multiple times, the data is stored 
and doesn't need to be re-created each call, getting a pretty good 
speedup.  This is what foo now looks like:
>> source foo
foo: func [/local bar][
    bar: [1] 
    if empty? bar [
        print "Generating.." 
        insert bar 1
    ] 
    return bar
]
Paul:
14-Jun-2009
Because the argument to index? is supposed to be a series and 'none 
is not a series.
mhinson:
14-Jun-2009
Then should FIND return an empty series if the target is not found? 
rather than none?  I thought none was a special case & might be handled 
differently by some functions that expect specific types.
Paul:
14-Jun-2009
But see Find returns none BASED on a series argument.  You were suppling 
'none as the argument.
Group: Parse ... Discussion of PARSE dialect [web-public]
Geomol:
5-Feb-2008
Or I should just stick with /at, because that's the word, we usually 
use to position ourselves within a series. (And the ram can be seen 
as a series.)
Chris:
5-Nov-2008
Re. 'start - could use 'head for the same purpose, it's consistent 
too with the series accessors...
BrianH:
5-Nov-2008
HEAD would be a better name for a directive to reset the position 
to the beginning of the data. That behavior would be more consistent 
with the series accessors :)
BrianH:
5-Nov-2008
At the beginning of the rule you are already at the head of the series, 
unless the data was already offset. Would you need HEAD? in the middle 
of the rule to determine if anything was matched already?
BrianH:
6-Nov-2008
Ports don't work like series in R3. If anything, port PARSE would 
simplify port handling by making seekable ports act more like series.
BrianH:
8-Nov-2008
Unicode changes. A binary is a series of bytes, a string is a series 
of codepoints.
Steeve:
8-Nov-2008
not the subject, but speaking of consuming operations, what about 
the old idea to have subset of serie (range) without the need to 
copy/part series ?
BrianH:
14-Nov-2008
CHANGE basically needs the same information that the CHANGE REBOL 
function needs:
- A start series/position
- An end position or length
- A value to replace with
- Some options, if you need them

The CHANGE proposal has all those, and there isn't much more we can 
simplify it :)
Maxim:
24-Dec-2008
but, in R2,  I'm not using it for some reason I don't remember... 
I actually use the change/part within a paren and manually set the 
series using the :here trick.
Oldes:
31-Jan-2009
>> ? complement
USAGE:
    COMPLEMENT value

DESCRIPTION:
     Returns the one's complement value.
     COMPLEMENT is an action value.

ARGUMENTS:

     value -- (Type: logic number char tuple binary string bitset image)
>> ? union
USAGE:
    UNION set1 set2 /case /skip size

DESCRIPTION:
     Creates a new set that is the union of the two arguments.
     UNION is a native value.

ARGUMENTS:
     set1 -- first set (Type: series bitset)
     set2 -- second set (Type: series bitset)

REFINEMENTS:
     /case -- Use case-sensitive comparison
     /skip -- Treat the series as records of fixed size
         size -- (Type: integer)
>>
Maxim:
17-May-2009
remark v1: uses series handling, funcs, and a lot of code to get 
it to work.  

prbably about 200 lines.

remark v2:   20 line parse rule + 5line stack context object.


v2 is 50 times faster, and does twice as more, while being much more 
flexible in many api aspects.


parse is powerfull, but it took me 4 years to understand parse well 
enough in order to rewrite remark.
Maxim:
16-Jun-2009
but brian, skipping past the end, still puts you at the end of the 
series, but the parser know you tried to go beyond the end... ITs 
the thru wich is failing, cause it knows you are trying to go beyond 
the end.
Carl:
28-Sep-2009
So... does such a function take an argument, such as the current 
index for the series being parsed?
BrianH:
28-Sep-2009
Yeah. If you pass a function as the replacement value, that function 
will be called with the series at the replacement position as a parameter, 
and its return value is used. ARRAY does something similar too. My 
changes.
BrianH:
28-Sep-2009
Say that the series position parameter is passed with APPLY rules. 
If the function takes a parameter it sees it; if not it doesn't.
Pekr:
2-Oct-2009
/part -- Limits the amount to change to a given length or position.
         range -- (Type: number series port pair)
Henrik:
24-Dec-2009
Looking at the new WHILE keyword and I was quite baffled by Carl's 
use of it in his latest blog example. Then I read the docs and it 
didn't get much better:

- WHILE is a variant of ANY
- ANY stops, if input does not change
- WHILE doesn't stop, even if input does not change

What does "input does not change" mean?

Is it about changing the parse series length during parse?

Is it actively moving the parse index back or forth using special 
commands?

Is it normal progression of parse index with each cycle of WHILE 
or ANY?

Is it alteration of the parse series content while maintaining length 
during parse?
Fork:
28-Dec-2009
?? not initialized after first match?  And secondly, how do I match 
thru a series of things (e.g. integer! integer!, but just wondering 
about the thte.  ?? problem before the first match?)
Pekr:
28-Dec-2009
what do you mean by "match thru a series of things"?
Maxim:
13-Apr-2010
ladislav, Remark changes the input on the fly to implement function 
html unfolding, and using that improved speed by 50 times, when compared 
with traditional series manipulations.

so yes its seriously usable   ;-P
Ladislav:
13-Apr-2010
Nevertheless, I pointed him to http://en.wikibooks.org/wiki/REBOL_Programming/Language_Features/Parse#Modifying_the_input_series
Gregg:
15-Apr-2010
Petr, it may be more than fast enough for small cases, or where you 
don't need maximum performance (which is most of the time). The inefficiency 
comes from REBOL having to move things around when you insert things 
into a series (list! being a possible exception).
Gabriele:
17-Apr-2010
i think, it might make more sense to actually implement the often 
talked about series-range! type. Or, have copy-on-write semantics 
for the results of COPY. (the latter would also help multithreading 
IMHO)
Maxim:
17-Apr-2010
Gab  YESSS!!!


it would also be nice if we could actually just set a soft-range 
to ANY series, removing the need for a specific datatype.
Ladislav:
17-Apr-2010
Re the series-range! type: did Carl already say he would like to 
have it?
Maxim:
17-Apr-2010
and extra speed consideration of having to allocate/copy/destroy 
a series
BrianH:
1-Dec-2010
Originally, only position was reset, not series reference. I would 
welcome tests that show what the current behavior is. Ladislav?
BrianH:
1-Dec-2010
So, half of the request succeeds: You can set the position to another 
series. I wonder if you can change series types from string to block.
BrianH:
1-Dec-2010
It is not a simple problem though, as not only would you have to 
add a series reference to the fallback state but you would need to 
make those series references visible to the garbage collector so 
they won't be freed; backtracking to a freed series would be bad.
Steeve:
1-Dec-2010
I mean, Parse must use a sort of stack to keep the backtracking references. 
The series will not be freed until parse destroy his stack
BrianH:
1-Dec-2010
Right now it is a stack of integers (position) and a single pointer 
(series reference). To do this it would need to be a stack of series 
references too, and the collector would need to be informed of its 
exdistence so it could scan it for references.
Ladislav:
1-Dec-2010
aha, so, now the get-words can set parse to a different series (INTO 
does that as well!), but, what is restored, is just the index, not 
the series... (except for the return from INTO, when the series is 
restored as well
BrianH:
1-Dec-2010
One interesting thing is that you can switch from string to block 
parsing and back mid-rule using series switching :)
Group: !RebGUI ... A lightweight alternative to VID [web-public]
Graham:
30-Apr-2006
* Script Error: max expected value1 argument of type: number pair 
char money date time tuple series
** Where: action
** Near: system/view/caret:
offset-to-caret parent-face
Graham:
8-May-2006
I'm getting this error now occasionally with the changes to area


** Script Error: max expected value1 argument of type: number pair 
char money date time tuple series
** Where: action
** Near: system/view/caret: offset-to-caret parent-face min max
** Press enter to quit...
Anton:
30-Jun-2006
That's right. This is not a RebGUI or RebDB issue, it is a Rebol 
issue that everyone needs to be aware of. If you don't copy series 
(ie. strings) then they are by reference. Use COPY a few times and 
you'll be right.
Graham:
11-Jul-2006
** Script Error: max expected value1 argument of type: number pair 
char money date time tuple series
** Where: action
** Near: view*/caret: offset-to-caret parent-face min max
** Press enter to quit...
Graham:
24-Aug-2006
One I hadn't seen before ... 
** Script Error: foreach expected data argument of type: series
** Where: next-field

** Near: foreach sibling siblings [if target: any [tabbed? sibling 
into-widget/forwards sibling] [
return target]] all
** Press enter to quit...
Graham:
12-Sep-2006
** Script Error: foreach expected data argument of type: series
** Where: next-field

** Near: foreach sibling siblings [if target: any [tabbed? sibling 
into-widget/forwards sibling] [return target]] al
Graham:
12-Sep-2006
not series I mean
Graham:
10-Nov-2006
Don't know if this is in the current table widget .. but if you click 
on the header of an empty table

make object! [
    code: 303
    type: 'script
    id: 'expect-arg
    arg1: 'index?
    arg2: 'series
    arg3: [series! port!]
    near: [index? find parent-face/data last-selected]
    where: 'action
]
Graham:
11-Nov-2006
I would like to see an enhancement to tables so that /selected/block 
returns series of blocks.
Graham:
5-Feb-2007
make object! [
    code: 303
    type: 'script
    id: 'expect-arg
    arg1: 'find
    arg2: 'series
    arg3: [series! port! bitset!]

    near: [s: any [all [s: find/reverse str s next s] head str] set [ns]]
    where: 'current-word
]
Graham:
17-Feb-2007
Trying to figure out the tabbing issue and came across this

rebol []

do %rebgui.r

display "" [
^-label "field has action" field [ print face/text ] return
^-label "also has action" field [ print face/text ] return
^-label "no action" field return
^-button "Quit" [ unview/all halt ]^-
]

do-events}

Script: "Untitled" (none)
Script: "Untitled" (none)

** Script Error: find expected series argument of type: series port 
bitset
** Where: switch

** Near: if all [view*/focal-face find view*/focal-face/options 'input-grid-item 
get in view*/focal-face/parent-face '
cell-action...

after clicking in the first field.
Graham:
17-Feb-2007
Reproduced the earlier error .. some type of interaction with the 
Rebol editor.

>> change-dir %/e/rebgui4
== %/e/rebgui4/
>> editor %debug-rg.r
>> do %debug-rg.r
Script: "Untitled" (none)
Script: "Untitled" (none)

** Script Error: find expected series argument of type: series port 
bitset
** Where: switch

** Near: if all [view*/focal-face find view*/focal-face/options 'input-grid-item 
get in view*/focal-face/parent-face '
cell-action...


in the above I brought up the editor and then closed it again without 
doing any editing.
Group: Rebol School ... Rebol School [web-public]
Geomol:
23-Feb-2009
Well, array just give a block. Maybe you didn't want a string but 
an issue:
>> to issue! array/initial 5 "abc"
== #abcabcabcabcabc

or something else. Strings are just one form of series.
Geomol:
24-Feb-2009
And since we don't have a 16 bit datatype (or maybe we do with a 
string or other series somehow!?), we have to make 8 times random 
256 (and subtract 1).
Geomol:
25-Feb-2009
and it also is a series, like strings are series:
>> second <abc>
== #"b"
Brock:
5-Mar-2009
Can the two Series blocks not be combined into one list on the right 
side of the page?
PatrickP61:
7-Apr-2009
Does anyone know of a way to have a rebol script continue to execute 
even after it recieves an error?


I have a script VERSION-TESTER, that will gather code examples and 
create another script VT-SCRIPT that will test them all out against 
the newest version of R3 alpha.


VT-SCRIPT is extremely simple, capturing all console results into 
an ECHO file, but I need a way to have the script continue even when 
it finds an error.
Any ideas?  See this simple example:

Rebol [script: %VT-Script.r   will verify R3 documented examples]
echo  %VT-Results.txt
print {Results below generated from %VT-Script.r}
print {---------------------------------------TIME examples			}
print {var: now														}
       var: now
print {print var													}
       print var
print {7-Apr-2009/11:53:26-6:00             	<-- same?			}
print {}
print {---------------------------------------WRITE examples		}
print {write %junkme.txt "This is a junk file."						}
       write %junkme.txt "This is a junk file."
print {print read %junkme.txt										}
       print read %junkme.txt
print {This is a junk file.                 	<-- same?			}
print {}
print {write/binary %data compress "this is compressed data"		}
       write/binary %data compress "this is compressed data"
print {print decompress read %data									}
print {this is compressed data              	<-- same?			}
print {}
print {---------------------------------------PROTECT examples		}
print {test: "text"													}
       test: "text"
print {protect test													}
       protect test
print {append test "a"												}

print {** Script error: protected value or series - cannot modify	}
print {** Where: append												}
print {** Near: append test "a"										}
print {}
print {** Note: use WHY? for more about this error					}
print {}
print {----------------------------------------OTHER examples		}
print {unset [var]													}
       unset [var]
print {print var													}
       print var
print {** Script error: var has no value    	<-- same?			}
print {}
print {** Note: use WHY? for more about this error					}
print {}
print {---------------------------------------TEST COMPLETED		}

print {See results stored in %VT-Results.txt file}
echo off
BrianH:
8-Mar-2010
And profile them to see which is better:


>> dp [to-date map-each x reverse parse head insert copy/part at 
"*[YY-MM-DD=03-06-30]*" 12 8 "20" "-" [to-integer x]]
== make object! [
    timer: 0:00:00.000023
    evals: 43
    eval-natives: 14
    eval-functions: 5
    series-made: 11
    series-freed: 0
    series-expanded: 0
    series-bytes: 731
    series-recycled: 0
    made-blocks: 6
    made-objects: 0
    recycles: 0
]


>> dp [to-date replace/all form reverse parse copy/part at "*[YY-MM-DD=03-06-30]*" 
12 8 "-" " " "-"]
== make object! [
    timer: 0:00:00.00004
    evals: 103
    eval-natives: 30
    eval-functions: 5
    series-made: 8
    series-freed: 0
    series-expanded: 0
    series-bytes: 530
    series-recycled: 0
    made-blocks: 2
    made-objects: 0
    recycles: 0
]
Henrik:
10-Mar-2010
with this, you can provide some interesting tricks to building series 
without assigning them to words:

loop 10 [append "a" "b"]
== "abbbbbbbbbb"
Henrik:
10-Mar-2010
beware of this when making objects with series or just series that 
are copied. if you find that your series are changing in funny ways, 
it may be that you forgot to copy them.
Henrik:
10-Mar-2010
as a rule of thumb, REBOL tries to reuse series as much as it can.
Henrik:
10-Mar-2010
use SAME? to detect whether two series are the same one:

>> a: ""
>> b: a
>> same? a b
== true

>> b: copy a
>> same? a b
== false
florin:
29-May-2010
Any good example of using "range"? I cannot find a single example. 
For instance, the copy function can take a range [number port series 
pair]. I don't know how to specify the range. In the Core tutorial, 
to copy a range, we need to move to the particular position first 
and then do the copy. Fine. What is this 'range' about and how do 
we say it? The following don't work: 3-5, [35], 35, 3:5, 3x5. Thanks.
Henrik:
29-May-2010
yes, range is always from the current index of a series to the specified 
index
Henrik:
29-May-2010
start positions are usually the current position in a series, when 
using series functions in REBOL.
florin:
29-May-2010
Yes, and this is where the Word Browser makes sense when it says 
that the 'range' can take number, series, port, pair etc. How does 
it work with a pair? When the copy value is a pair itself?
florin:
29-May-2010
I'm reading the Series chapter for the second time. I made progress! 
I find the parsing very attractive as well as r3 replacing the command 
prompt.
BrianH:
23-Sep-2010
>> dp [first transcode/next to-binary a]
== make object! [
    timer: 0:00:00.000013
    evals: 15
    eval-natives: 6
    eval-functions: 2
    series-made: 4
    series-freed: 1
    series-expanded: 1
    series-bytes: 570
    series-recycled: 0
    made-blocks: 2
    made-objects: 0
    recycles: 0
]

>> dp [to-word parse a [return to " "]]
== make object! [
    timer: 0:00:00.000012
    evals: 17
    eval-natives: 5
    eval-functions: 2
    series-made: 2
    series-freed: 0
    series-expanded: 0
    series-bytes: 435
    series-recycled: 0
    made-blocks: 1
    made-objects: 0
    recycles: 0
]

>> b: to-binary a
== #{
3F3F20202020202020202020202020202020202020204465627567207072696E
74206120776F72642C20706174682C206F7220626C6F2E2E2E
}

>> dp [first transcode/next b]
== make object! [
    timer: 0:00:00.00001
    evals: 11
    eval-natives: 5
    eval-functions: 1
    series-made: 3
    series-freed: 1
    series-expanded: 1
    series-bytes: 512
    series-recycled: 0
    made-blocks: 2
    made-objects: 0
    recycles: 0
]
PatrickP61:
15-Dec-2010
I don't understand this situation:
>> help same?
USAGE:
        SAME? value1 value2

DESCRIPTION:
        Returns TRUE if the values are identical.
        SAME? is a native value.

ARGUMENTS:
        value1 (any-type!)
        value2 (any-type!)

s1: "series"
s2: copy s1
same? s1 s2
== false


The two values are two separate yet identical values.  Does identical 
mean the same reference ie the same memory location in rebol or am 
I not understanding what identical means?
Gregg:
11-Aug-2011
; A dialected version of this could be very flexible; allowing more
    ; than just fixed size groupings.

    ; This could also be done by adding a /SKIP refinement to INSERT.
    delimit: func [
        ;[throw catch]
        "Insert a delimiter between series values."
        series [series!] "Series to delimit. Will be modified."
        value            "The delimiter to insert between items."

        /skip   ;<-- be sure to use system/words/skip in this func

            size [integer!] "The number of items between delimiters. Default 
            is 1."
    ][

        ; Hmmm, I wonder if we could extend the function spec dialect

        ; to include constraints like this declaratively? And should

        ; we trap the arg like this, or just use MAX to make sure we

        ; have a positive value? I think I'll do the latter for now,
        ; but leave this here as a comment.
        ;if all [size not positive? size] [
        ;    throw make error! join [script invalid-arg] size
        ;]
        ; By default, delimiters go between each item.
        ; MAX catches zero and negative sizes.
        size: max 1 any [size 1]

        ; If we aren't going to insert any delimiters, just return the series.

        ; This check means FORSKIP should always give us a series result,
        ; rather than NONE, so we can safely inline HEAD with it.
        if size + 1 > length? series [return series]
        ; We don't want a delimiter at the beginning.
        series: system/words/skip series size

        ; Use size+n because we're inserting a delimiter on each pass,

        ; and need to skip over that as well. If we're inserting a

        ; series into a string, we have to skip the length of that

        ; series. i.e. the delimiter value is more than a single item
        ; we need to skip.
        size: size + any [

            all [list? series  0] ; lists behave differently; no need to skip 
            dlm.

            all [any-string? series  series? value  length? value]
            all [any-string? series  length? form value]
            1
        ]
        head forskip series size [insert/only series value]
    ]
todun:
6-Oct-2011
>> do %circular_series.r
** Script Error: btn has no value
** Where: forever
** Near: show-one: btn "Show answer" [
    one-position: ++ current-position 
    line: pick lines one-position 
    result/text:...
Geomol:
6-Oct-2011
Things like INDEX? will tell you, where you are in a series. And 
you can easily save rebol code/values to disc using the SAVE function, 
and load them again with the LOAD function.
todun:
6-Oct-2011
@Geomol, INDEX? will tell me its position, but the circular series 
link I sent you talks about how to always go around and around the 
series. I want to do the same with the lines of a file, but I'm not 
sure how to do it without using REPEAT
501 / 153112345[6] 78...1213141516