[racket] define-struct/contract

2010-09-06 Thread Stephen Bloch
I'm not sure if this is a bug or if I'm just misunderstanding something. (define-struct/contract myposn ((x number?) (y number?)) #:transparent) (make-myposn 3 4) ; works as I would expect (make-myposn 3 "hello") complains #%htdp: '#%htdp broke the contract (-> number? number? symbol? any

Re: [racket] prompts and aborts

2010-09-06 Thread Matthew Flatt
The default prompt handler is (lambda (abort-thunk) (call-with-continuation-prompt abort-thunk prompt-tag #f)) When the `abort-thunk' is `(lambda () (f2))', as in `f2', then the prompts stack up, because `f2' installs a prompt as well. Here's an infinite loop that uses the default prompt ha

Re: [racket] Northwestern link to download windows version of DrRacket broken

2010-09-06 Thread Todd O'Bryan
np Just wanted to make you aware of it if you weren't already. On Mon, Sep 6, 2010 at 3:03 PM, Robby Findler wrote: > There are some fixes to the power this weekend in the building at > Northwestern where this machine is so things will not be working > properly until tomorrow earliest. Sorry. >

[racket] prompts and aborts

2010-09-06 Thread Danny Yoo
I'm a little confused by the tail behavior I'm seeing in call-with-continuation-prompt and abort-current-continuation. Here's my test code: ; #lang racket (provide (all-defined-out)) (define (f) (call-

Re: [racket] Northwestern link to download windows version of DrRacket broken

2010-09-06 Thread Robby Findler
There are some fixes to the power this weekend in the building at Northwestern where this machine is so things will not be working properly until tomorrow earliest. Sorry. Robby On Mon, Sep 6, 2010 at 12:23 PM, Todd O'Bryan wrote: > I get a 404 error with this link from the download page: > > ht

[racket] Northwestern link to download windows version of DrRacket broken

2010-09-06 Thread Todd O'Bryan
I get a 404 error with this link from the download page: http://www.eecs.northwestern.edu/racket/5.0.1/racket/racket-5.0.1-bin-i386-win32.exe _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/users

Re: [racket] ssl-tcp-unit.rkt restrictions

2010-09-06 Thread Neil Van Dyke
Thanks, Jay. I haven't looked thoroughly yet, but I suspect that simply moving the SSL client context object from a hidden variable to a public parameter would be a small change that's a lot more flexible. I'm working with the old PLT 4.2.5 "openssl" code early this week, so I might soon be

Re: [racket] ssl-tcp-unit.rkt restrictions

2010-09-06 Thread Jay McCarthy
I doubt there is a good reason for these restrictions. I imagine that it works this way because it is only used by a few people and this is all they needed. IIRC, only the hand-in server uses it in the tree. I'm happy to work with you to improve it, if I understood what exactly you wanted. Jay O

Re: [racket] A VAT calculator using Racket web server

2010-09-06 Thread Jay McCarthy
I agree with Noel. As far as make-url, send/suspend/dispatch captures a continuation, but unless you create a request handler that returns to it (via make-url), it is not stored or bound to any URL. Jay On Mon, Sep 6, 2010 at 6:05 AM, Noel Welsh wrote: > I made some brief notes, which I reprodu

Re: [racket] users Digest, Vol 61, Issue 13

2010-09-06 Thread Todd O'Bryan
On Sun, Sep 5, 2010 at 7:01 AM, Eli Barzilay wrote: > On Sep  4, Todd O'Bryan wrote: >> >> After the script finishes, >> >> $ gksudo gedit /etc/environment >> >> and add /opt/plt/bin to the PATH variable defined there. Separate it >> from the other paths with a colon. >> >> When you log out and lo

Re: [racket] A VAT calculator using Racket web server

2010-09-06 Thread Noel Welsh
I made some brief notes, which I reproduce below ('cause I'm too lazy to write them out again): ;; NHW ;; This function is odd. Its type is ;; (U Number String) -> (U Number String) ;; which is almost certainly not what you want. (define (as-number x) (if (number? x) x (safely (string-

[racket] Help Latin 1 please

2010-09-06 Thread jmhufflen
Please, does someoe know how to use the program "plt-r5rs" with only Latin 1 (ISO-8859-1) encoding? That's quite old, I know, but I need to do so... Many thanks in advance, J.-M. Hufflen _ For list-related administrative tasks: http:

[racket] A VAT calculator using Racket web server

2010-09-06 Thread Mark Carter
So, I'm learning the ropes of using Racket as a webserver. I'm building a simple VAT (tax) calculator. I present my code at the end of this post (which you can also download via google code). I think it would be helpful to me if you could critique it a little. The idea is that you point your