I did something like this:
; find specific number
text: read %temp.txt
while [spot: find text "10"][
count: count + 1
text: next spot
@BlairLW Hi! Please use backticks instead of single quotes to format your code. This way:
``` text: read %temp.txt count: 0 while [spot: find text "10"][ count: count + 1 text: next spot ] print count ```
You could do it with
count: 0 parse read %temp.txt [any ["10" (count: count + 1) | skip]] print count
@NjinN async is tricky in REBOL 2. There's some info here https://codereview.stackexchange.com/questions/152718/minimal-async-web-server-in-rebol-2 but nobody has ever written good docs about it. If you can find it, Romano's
atcp:// scheme may be the most complete and relatively user friendly implementation, otherwise my
async:// scheme (linked from previous link) should work but you'll have to hunt around for examples on how to use it on the server side of things.
Generally speaking though, there are so many bugs and quirks in R2's async-modes that it's pretty hard to get a server to work reliably. You may want to use an existing solution like Uniserve or Cheyenne instead.
@NjinN Also check https://www.cheyenne-server.org/ a web server written with Rebol and the author of Cheyenne is DocKimble, the author or Red as well.
It'a a full featured web server, natively support Rebol pages (RSP)
@ungaretti recently added a page about it on Helpin.red web site: http://helpin.red/AppendixII-WhilewewaitforfullCGI.html
rotateof the Draw dialect currently rotates around 0.5x0.5 pivot? I think we should change it to 0.0x0.0 (see red/red#3504).
view/tight [box draw [scale 20 20 [ box 0x0 2x2 pen red line 0x0 2x0 pen blue line 2x0 2x2 pen green line 2x2 0x2 pen yellow line 0x2 0x0 ]]]
view/tight [box draw [transform 0x0 90 20 20 50x10 [ fill-pen orange box 0x0 2x2 pen red line-cap square line 0x0 2x0 pen blue line-cap round line 2x0 2x2 pen green line-cap flat line 2x2 0x2 pen yellow line-width .5 line 0x2 0x0 ]]]
@hiiamboris I do not find this annoying.
shape draws things in all direction (e.g.
view [base draw [translate 100x100 line -2x0 -50x-55]]. It make sense that you start from 0x0 and move in any direction.
images and other series first index being
1 make sense too. I mean you want to a first element -> 1st.
ps. of course it is just my opinions. You can make (and I think you have already made) a contra-argument about 0-based indexing.