You can format your code examples here so that they look all pretty.
count: 0 parse file-str [some [thru goal-str (count: count + 1)]]
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 ]]]