Updated: 11/5/2005; 6:05:39 PM.
Chris Double's Radio Weblog
        

Friday, March 19, 2004

The Learning Seaside blog has an example of how 'Halos' work in Seaside 2.5. It looks great! The in-browser development capabilities of Seaside are pretty amazing.

9:55:05 AM      

Patrick's postings about Kali Scheme inspired me to start experimenting with sending continuations across the network using Sisc Scheme. My test code is in remote-send.scm. This should load and run in Sisc Scheme v1.8.7.

Sisc only allows serialisation to file currently so I added routines to serialize to a binary buffer in memory. Then send this buffer across the network. You can try it out by running two Sisc sessions, either on the same machine, or different machines. One node runs the function 'message-listener' passing it the tcp port to listen on. The other node runs 'send' passing it the host name and port of the listener. The remaining arguments are a function to execute and the arguments to that function.

The function passed is serialized by Sisc, sent across the network, deserialized on the other end and executed. For example:

  (send "localhost" 9000 display "test")

This will display the work 'test' on the other machine. You can also send functions that don't currently exist in the target machine. For example, a continuation:

  (define a #f)
  (define (test1)
    (display "one\n")
    (call/cc (lambda (k) (set! a k)))
    (display "two\n"))

  (test1)
  (send "localhost" 9000 a)

This displays "two" on the target machine. In this example the continuation is 4,180 bytes.

9:17:51 AM      

© Copyright 2005 Chris Double.
 
March 2004
Sun Mon Tue Wed Thu Fri Sat
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      
Feb   Apr



Click here to visit the Radio UserLand website.

Listed on BlogShares

Click to see the XML version of this web page.

Click here to send an email to the editor of this weblog.