Re: [racket] Web server: Disable timeout?

2012-03-29 Thread Tom McNulty
Michael, perhaps you're interested in Web Sockets. They're a better fit for what you're trying to accomplish. http://docs.racket-lang.org/net/websocket.html?q=websocket Alternatively, you might try to implement a COMET service, and use long-polling. This is a hack to emulate web socket style

[racket] Web server: Disable timeout?

2012-03-29 Thread Michael W
So is it possible to disable the timeout on the web server? Or is this a /very bad idea/? Right now I'm constructing my own dispatcher chain with the low-level server API. My intent is to build a streaming HTTP service similar to the Twitter streaming API that will send a short one-line message to

Re: [racket] structures question

2012-03-29 Thread Danny Yoo
On Thu, Mar 29, 2012 at 11:15 AM, Roelof Wobben wrote: > Op 29-3-2012 16:37, David Van Horn schreef: > >> ;; Posn -> Number. >> ;; A programm for calculating the distance is Manhatten >> (check-expect (manhatten (make-posn 7 3 )) 10) >> (check-expect (manhatten (make-posn 1 1 )) 2) >> >> (define (

Re: [racket] structures question

2012-03-29 Thread Roelof Wobben
Op 29-3-2012 16:37, David Van Horn schreef: ;; Posn -> Number. ;; A programm for calculating the distance is Manhatten (check-expect (manhatten (make-posn 7 3 )) 10) (check-expect (manhatten (make-posn 1 1 )) 2) (define (manhatten pos-manhatten) (+ (posn-y pos-manhatten) (posn-x pos-manhatten))

Re: [racket] structures question

2012-03-29 Thread Danny Yoo
> ;; Posn -> Number. > ;; A programm for calculating the distance is Manhatten > (check-expect ( manhatten (make-posn 7 3 ) 10)) > (check-expect ( manhatten (make-posn 1 1 ) 2)) > > Hi Roelof, As the code is currently written, it looks like it is passing two arguments to manhatten, rather than on

Re: [racket] structures question

2012-03-29 Thread David Van Horn
On 3/29/12 10:20 AM, Roelof Wobben wrote: ;; Posn -> Number. ;; A programm for calculating the distance is Manhatten (check-expect ( manhatten (make-posn 7 3 ) 10)) (check-expect ( manhatten (make-posn 1 1 ) 2)) (define (manhatten pos-manhatten) ( + (pos-y posmanhetten) (pos-x manhetten)))

Re: [racket] structures question

2012-03-29 Thread Eduardo Bellani
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 The error you are getting is about your use of the check-expect function. - From the docs, the function signature: (check-expect expression expected-expression) So you have to provide what you expect the call to manhatten to return, along with your

[racket] structures question

2012-03-29 Thread Roelof Wobben
Hello, Im trying to make a programm which use structures and calculates the distance between a point and another point. The first point has coordinates (0,0). So I made this : ;; Posn -> Number. ;; A programm for calculating the distance is Manhatten (check-expect ( manhatten (make-posn 7 3 )