Re: [racket] reader.html: documentation for complex number reading

2013-03-28 Thread Matthew Flatt
Let's fix the docs. My current attempt is ‹exact-rationaln›::= [‹sign›] ‹unsigned-rationaln› ‹unsigned-rationaln› ::= ‹unsigned-integern› | ‹unsigned-integern› / ‹unsigned-integern› ‹exact-integern› ::= [‹sign›] ‹unsigned-integern› ‹unsigned-integern› ::= ‹di

Re: [racket] Help generating PDF documents with Scribble

2013-03-28 Thread George Rudolph
Matt, Yes to both items: (1) texlive on CentOS complies your ex.tex as-is. (2)Miktex in Windows 7 hangs on the as-is version of ex.tex, but compiles fine if the bigtabular use is removed from the bibliography, as in \Autocolbibnumber{[1]} \label{t:x28autobib_x22AlphaA2013x22x29}\Autocolbibentry{A

Re: [racket] Bug in TR for/sum: ??

2013-03-28 Thread Sam Tobin-Hochstadt
Then your program would change semantics depending on your type annotations (and potentially be different than the untyped Racket version). I don't think that's a road we want to go down. It would be better if `for/sum` let you supply the base case. On Thu, Mar 28, 2013 at 4:52 PM, Matthias Fell

Re: [racket] Bug in TR for/sum: ??

2013-03-28 Thread Matthias Felleisen
Perhaps for/sum should adapt its base case answer to the return type? On Mar 28, 2013, at 4:03 PM, Sam Tobin-Hochstadt wrote: > I'm not sure what you're referring to. This program doesn't typecheck, > because if both vectors were empty, the result is exact 0, which isn't > a `Float`. > > Sa

Re: [racket] Bug in TR for/sum: ??

2013-03-28 Thread Sam Tobin-Hochstadt
On Thu, Mar 28, 2013 at 4:03 PM, Sam Tobin-Hochstadt wrote: > I'm not sure what you're referring to. This program doesn't typecheck, > because if both vectors were empty, the result is exact 0, which isn't > a `Float`. Oh, and here's a working version using `for/fold:`: #lang typed/racket/base

Re: [racket] Bug in TR for/sum: ??

2013-03-28 Thread Sam Tobin-Hochstadt
I'm not sure what you're referring to. This program doesn't typecheck, because if both vectors were empty, the result is exact 0, which isn't a `Float`. Sam On Thu, Mar 28, 2013 at 3:56 PM, Ray Racine wrote: > Is this a bug? > > #lang typed/racket/base > > (define: βns : (Vectorof Float) '#(1.0

[racket] Bug in TR for/sum: ??

2013-03-28 Thread Ray Racine
Is this a bug? #lang typed/racket/base (define: βns : (Vectorof Float) '#(1.0 2.0 3.0)) (define: χns : (Vectorof Float) '#(4.0 5.0 6.0)) (for/sum: : Float ([βn : Float (in-vector βns)] [χn : Float (in-vector χns)]) (* βn χn)) Racket Users list: http://lists.racket

Re: [racket] Nesting evt handlers

2013-03-28 Thread Matthew Flatt
The intent of `handle-evt' is that the handling procedure is called in tail position with respect to `sync'. That tail guarantee is not consistent with nesting. We could tail that the handler is called in tail position only if it's not nested, but we normally use `handle-evt' in cases where tail b

Re: [racket] Nesting evt handlers

2013-03-28 Thread Tobias Hammer
Thanks, that's clear now. Another question regarding events: Why is it forbidden to put a handle-evt inside another handle- or wrap-evt? I couldn't come up with a situation where this could cause trouble. Especially as it is allowed to nest handle-evts if i put a guard-evt or a struct with

Re: [racket] Trouble with nack-guard-evt

2013-03-28 Thread Matthew Flatt
Sometimes, `sync' picks the first evt that it is given before even trying the second evt enough to call the evt-generating function. That is, `sync' looks far enough to see all arguments are `evt?', but calling the evt-generator part of a guard evt is part of the attempt to choose the specific guar

[racket] Trouble with nack-guard-evt

2013-03-28 Thread Tobias Hammer
Hi, i am trying to understand how nack-guard-evt works. Therefore i created the appended test program. Sometimes it stops with the error message and sometimes it prints the three values. It is clear to me what the error means and why it is raised. What i am not understanding is, why the nac

Re: [racket] Racket/GUI

2013-03-28 Thread Stephen De Gabrielle
Brilliant thanks. Stephen On Thursday, March 28, 2013, Diogo F. S. Ramos wrote: > Stephen De Gabrielle > writes: > > > You can use the FFI to pull in more Gtk, Win32, or Cocoa widgets > > on the > > corresponding platform. The `get-handle' and `get-client-handle' > > methods of a