[racket] C:\Program Files (x86)\Racket\collects\web-server\private\dispatch-server-unit.rkt:96:6: tcp-write: error writing system error: Unknown error; errno=10053

2013-03-12 Thread jo
program below does direct browser to the site requested but at same time also gives an error. How can I work around this error ?  Used this with chrome as default browser. Is there a way to select different browsers without having to change default browser setting? #lang racket (require

Re: [racket] Places and submodules

2013-03-12 Thread Harry Spier
Apologies, I see the problem now. I missed where it says in the documentation for dynamic-places. The module-path argument must not be a module path of the form (quote sym) unless the module is predefined (see module-predefined?). Harry Spier On Tue, Mar 12, 2013 at 12:33 AM, Harry Spier

Re: [racket] Places and submodules

2013-03-12 Thread Robby Findler
I think that error is for the situation where you write: (dynamic-place ''temp2 'place-main) You need the first quote to be quoted require spec and the second quote because the module's name itself has a quote in it. As to your original problem, I think you can use `submod' in the require spec

[racket] code review request for LRU code

2013-03-12 Thread Danny Yoo
Hi everyone, I coded up a quick-and-dirty implementation of an LRU cache with Typed Racket to make sure I understood the concept. I was wondering if anyone can take a look and see if it looks ok? https://github.com/dyoo/typed-lru The implemetation is in 'lru.rkt', and test cases are in

Re: [racket] code review request for LRU code

2013-03-12 Thread Sam Tobin-Hochstadt
On Tue, Mar 12, 2013 at 1:00 PM, Danny Yoo d...@hashcollision.org wrote: One thing I'm noticing is that it seems difficult to use my typed code in untyped code, because the container is polymorphic. 'untyped-client.rkt' shows what I mean: I'm hitting a Type Checker error at runtime and I

[racket] Formatting reals

2013-03-12 Thread Pierpaolo Bernardi
Hello, suppose I want to format a real number, with a fixed number of digits after the comma, rigth-padded in a given width, and I want the sign to be attached to the digits (i.e. not what ~r does). This is the usual way of printing reals in a table, and can be done trivially using standard

Re: [racket] Formatting reals

2013-03-12 Thread Stephen Chang
Does real-decimal-string do what you want? On Tue, Mar 12, 2013 at 11:25 PM, Pierpaolo Bernardi olopie...@gmail.com wrote: Hello, suppose I want to format a real number, with a fixed number of digits after the comma, rigth-padded in a given width, and I want the sign to be attached to the

Re: [racket] code review request for LRU code

2013-03-12 Thread Asumu Takikawa
On 2013-03-12 13:16:02 -0700, Danny Yoo wrote: slab:lru dyoo$ racket untyped-client.rkt untyped-client.rkt:10:0: Type Checker: The type of lru-ref cannot be converted to a contract in: (lru-ref l greeting) context...: /Applications/Racket v5.3.2/collects/racket/private/modbeg.rkt:46:4

Re: [racket] Formatting reals

2013-03-12 Thread Pierpaolo Bernardi
On Wed, Mar 13, 2013 at 4:29 AM, Stephen Chang stch...@ccs.neu.edu wrote: Does real-decimal-string do what you want? yes, except for the width. It can substitute the ~r in (~a (~r (- pi) #:precision 6) #:width 12 #:align 'right) but not the ~a. Srfi/48 still wins in convenience and

Re: [racket] code review request for LRU code

2013-03-12 Thread Eric Dobson
Why cannot that contract be checked? It seems that since the or/c is the unwrapping of the parametric contracts it should be possible, since the first order checks should differentiate them. On Tue, Mar 12, 2013 at 8:46 PM, Asumu Takikawa as...@ccs.neu.edu wrote: On 2013-03-12 13:16:02 -0700,

Re: [racket] code review request for LRU code

2013-03-12 Thread Danny Yoo
One thing I'm noticing is that it seems difficult to use my typed code in untyped code, because the container is polymorphic. 'untyped-client.rkt' shows what I mean: I'm hitting a Type Checker error at runtime and I don't know what to do to avoid it yet. What can I do here? Side comment: