r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[All] except covered in other channels

Graham
26-Feb-2005
[1354x2]
what's the best way of restarting a server application each night 
?  Use something like launch/quit .. between certain hours, but without 
setting some flag on the file system, how to ensure that it only 
happens once daily?
( encapped application )
Terry
26-Feb-2005
[1356]
If it's windows, I'd use Q.
Micha
26-Feb-2005
[1357x4]
a:  "123.456.789"
find/any/with   a  "*.456.789" "123"
none
plis help
Geomol
26-Feb-2005
[1361x2]
The /with refinement allows you to use alternatives to * and ? wildchars:

>> a: "123.456.789"
== "123.456.789"
>> find/with a "x.456.789" "xy"
== "3.456.789"
>> find/with a "y.456.789" "xy"
== "123.456.789"
I'm not sure, what you're trying to accomplish.
Gregg
26-Feb-2005
[1363x2]
In some cases I've done that Graham, I've also made a special "startup" 
EXE for a script that runs, waits a bit, the DOes the script, to 
give things a chance to shut down. I've also done it where the app 
was simple and I could just DO a module to refresh it. That gets 
trickier if you have a more complex app that maintains state and 
such.
My stuff has all been manually restarted, though sometimes remote, 
and not timed, but that shouldn't be an issue. Another thing you 
could do is put a shutdown timer in your script, and then have a 
CRON job run that starts a new instance.
Graham
26-Feb-2005
[1365]
I guess a cron job that signals my application to restart would be 
the best thing then
BrianW
27-Feb-2005
[1366]
... REBOL has lots of repetition structures, doesn't it?
Sunanda
27-Feb-2005
[1367]
You mean for iterating through series? If so, yes.
BrianW
27-Feb-2005
[1368]
yeah, that's what I meant. The brain just doesn't work sometimes.
Sunanda
27-Feb-2005
[1369]
Some of them are natives, and some are mezzanine code.

That gives you a choice: use the natives for speed, or the mezzanines 
for convenience.
BrianW
27-Feb-2005
[1370]
I was just gathering a good minimum set for another introductory 
article. I think I'll leave most of the iteration bits out for this 
stage.
Sunanda
27-Feb-2005
[1371]
Or just point out the basics.
9/10 I just use 'loop or 'foreach.
Other people probably have a different preferred subset.
BrianW
27-Feb-2005
[1372]
hmm, that's a good thought. I'll keep the coverage small: 'while 
'loop 'foreach should cover most beginner needs
It might be a good idea to menation 'break as well
Anton
27-Feb-2005
[1373]
I agree, but I use REPEAT also quite often.
Micha
27-Feb-2005
[1374x2]
find string numel only
I ask about help ?
Anton
27-Feb-2005
[1376]
Micha, you want to parse   1) IP network address (eg. 205.192.0.1) 
   or  2) rebol TUPLE! datatype (eg.  11.22.33)  ???
Micha
27-Feb-2005
[1377]
IP network address
Anton
27-Feb-2005
[1378x2]
>> "" = find/any/match "123.456.789" "*.456.789"
== true
>> "" = find/any/match "123.456.789" "*.456.7"
== false
>> "" = find/any/match "123.456.789" "*.456.700"
== false
>> ip: 123.225.255
== 123.225.255
>> "" = find/any/match form ip "*.225.255"
== true
Micha
27-Feb-2005
[1380x2]
s: "testse193.194.70.123 1080iiyyyuiyiy  234.221.23.5:3380"
how do to find address ip from this stringu ?
Anton
27-Feb-2005
[1382x6]
digit: charset "0123456789"
number: [1 3 digit]
s: "testse193.194.70.123 1080iiyyyuiyiy  234.221.23.5:3380"

parse s [some [start: digit 3 [number "."] number opt [#":" 1 5 digit] 
end: (print copy/part start end) | skip]]
;193.194.70.123
;234.221.23.5:3380
;== true
>> load "193.194.70.123"
== 193.194.70.123
>> load "234.221.23.5:3380"
** Syntax Error: Invalid time -- 234.221.23.5:3380
** Near: (line 1) 234.221.23.5:3380
ips: copy []

parse/all s [some [(port: none) start: digit 3 [number "."] number 
opt [#":" port: 1 5 digit] end: (append ips reduce [load copy/part 
start any [all [port back port] end] if port [load copy/part port 
end]]) | skip]]
>> ips
== [193.194.70.123 none 234.221.23.5 3380]
Uhh.. Better not LOAD yet... I see above, the pattern match using 
FIND should be done first.
Good ?
Micha
27-Feb-2005
[1388x2]
I is thank good
I is thank good
Anton
27-Feb-2005
[1390]
:)
Micha
27-Feb-2005
[1391x3]
ips: copy []
parse s [some [start:   3 [number "."]   number opt #":" 1 5 digit 
 end: (append ips parse copy/part start end ":") | skip]
]
== ["193.194.70.123" "1080" "234.221.23.5" "3380"]
eFishAnt
27-Feb-2005
[1394]
not sure what you are trying to do, but the following is a better 
natural form once you get your string stuff INTO Rebol ... because 
REBOL will see it as its own datatypes, rather than as strings. [193.194.70.123 
1080 234.221.23.5 3380]
Micha
27-Feb-2005
[1395x3]
parse s [some [start:   3 [number "."]   number opt #":" 1 5 digit 
 end: (append ips load  replace  copy/part start end ":"
 " " ) | skip]]
[193.194.70.123 1080 234.221.23.5 3380]
>>
it is betterit
Pekr
27-Feb-2005
[1398x2]
What is correct - hilite, or hilighted? (in the case of meaning of 
mouse hilighted text)
or highlighted? :-)
[unknown: 5]
27-Feb-2005
[1400]
Anyone know if there is a private group here for religous discussion 
of any sort
Pekr
27-Feb-2005
[1401x2]
Ask Terry :-)
Or go and create one ...
[unknown: 5]
27-Feb-2005
[1403]
Yeah, I would create one if one didn't exist - otherwise i would 
see if I could get added to the current one if it existed.