rugby and importing function
[1/3] from: olivier::flauzac::univ-reims::fr at: 3-Jul-2002 17:35
Hello
I ask myself a question about importing a rebol function with rugby : I
have a server providing a function foo if on the client I do a
get-rugby-service I can use the function foo as it was on the client
but, as I've seen, it always executes on the server. So if the server
fall down, the client can no more "execute the foo function. Does it
exist a trick to really import the function to the client side ? In
that case I would have just to get the function from the server and,
when the function is arrived on the client side, server is not needed
anymore.
Thanks
Olivier Flauzac
[2/3] from: g:santilli:tiscalinet:it at: 3-Jul-2002 19:20
Hi Olivier,
On Wednesday, July 03, 2002, 5:35:55 PM, you wrote:
OF> fall down, the client can no more "execute the foo function. Does it
OF> exist a trick to really import the function to the client side ? In
OF> that case I would have just to get the function from the server and,
OF> when the function is arrived on the client side, server is not needed
OF> anymore.
If that is what you want, then why not doing something like this:
you place your function in a file served by a web server; let's
say it's accessible as http://my.server.com/my-func.r. Now on the
client you just do that file:
do http://my.server.com/my-func.r
to "get" the function. Does not require any other code...
Regards,
Gabriele.
--
Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer
Amigan -- AGI L'Aquila -- REB: http://web.tiscali.it/rebol/index.r
[3/3] from: maarten:koopmans:surfnet:nl at: 3-Jul-2002 22:46
Hi,
Using Rugby you can create function that return parameterized or composed
code.
It is simple:
coder: func [][ return [ func [in][probe in]]]
on the client side you just do:
get-rugby-service
my-func: do coder
my-func 10
>>10
You just return a block of code on the server that you 'do on the
client and that then returns a function.
HTH,
Maarten
On Wed, 3 Jul 2002, Gabriele Santilli wrote: