Re: [racket] TR: scope of universally quantified type variables is ... very strange?

2012-01-06 Thread Sam Tobin-Hochstadt
On Jan 7, 2012 2:24 AM, "John Clements" wrote: > > > On Jan 5, 2012, at 5:32 PM, Sam Tobin-Hochstadt wrote: > > > On Thu, Jan 5, 2012 at 11:56 PM, John Clements > > wrote: > >> I wrote a piece of code like this without thinking: > >> > >> #lang typed/racket > >> > >> (: f (All (T) (Number -> T ->

Re: [racket] mime/multipart parsing

2012-01-06 Thread Neil Van Dyke
While the example input here is not precise about newlines, if someone finds a real-world example that does not use CRLF properly, then Racket might want to be more liberal in what it accepts here. Matthew Flatt wrote at 01/07/2012 12:12 AM: I think the main problem is that the input string ha

Re: [racket] mime/multipart parsing

2012-01-06 Thread Matthew Flatt
I think the main problem is that the input string has LF newlines, and it needs to have CRLF newlines. You'll also want a terminating CRLF. With those changes, then `(message-fields inner-message)' instead of `(entity-fields inner-entity)' will get you the headers that include "X-Riak-Vclock: ..."

[racket] mime/multipart parsing

2012-01-06 Thread Jordan Schatz
I'm having difficulties parsing mime multipart messages (probably I missed something in the docs again). I have this code: -- #lang racket (require net/mime) (define ip (open-input-string "--9nbsYRvJBLRyuL4VOuuejw9LcAy Cont

Re: [racket] Teach yourself Racket in Fixnum Days?

2012-01-06 Thread Giuseppe Paleologo
My applications are mostly in Statistics/Data Analysis. Rather than dealing with a single, massive data set, I often have many medium-sized ones. I find myself applying in R or Python large amounts of maps, reduces, filters and other list manipulations that I believe Racket can perform more express

Re: [racket] TR: scope of universally quantified type variables is ... very strange?

2012-01-06 Thread John Clements
On Jan 5, 2012, at 5:32 PM, Sam Tobin-Hochstadt wrote: > On Thu, Jan 5, 2012 at 11:56 PM, John Clements > wrote: >> I wrote a piece of code like this without thinking: >> >> #lang typed/racket >> >> (: f (All (T) (Number -> T -> T))) >> (define ((f x) y) >> (ann y T)) >> >> ... and then, aft

Re: [racket] TR: predicate for a Float ?

2012-01-06 Thread Vincent St-Amour
At Fri, 6 Jan 2012 14:09:48 -0800, John Clements wrote: > > They should be. Which one was unbound? That sounds like a bug. > > Your commit message suggests that you figured this out already? I did find something along the way. Is it the same you noticed? > >> 3) What would be *really* awesome wo

Re: [racket] Teach yourself Racket in Fixnum Days?

2012-01-06 Thread John Clements
On Jan 6, 2012, at 2:07 PM, Giuseppe Paleologo wrote: > Yes to the quick tutorial, no to the other two, as they're not my intended > application. I'm hoping I can ask this question without committing myself to anything :): Can you describe a simple example project that could be the focus of th

Re: [racket] TR: predicate for a Float ?

2012-01-06 Thread John Clements
On Jan 6, 2012, at 9:19 AM, Vincent St-Amour wrote: > At Fri, 6 Jan 2012 08:47:39 -0800, > John Clements wrote: >> 1) Not all of the types printed in (:print-type Foo) are necessarily >> bound in the user code, right? I tried at one point substituting the >> result of (:print-type something-or-ot

Re: [racket] Teach yourself Racket in Fixnum Days?

2012-01-06 Thread Giuseppe Paleologo
Yes to the quick tutorial, no to the other two, as they're not my intended application. -gappy On Jan 6, 2012, at 1:46 AM, Richard Cleis wrote: > Have you seen the tutorials? ... > > Quick:An Introduction to Racket with Pictures > Continue: Web Applications in Racket > More: Syste

Re: [racket] Calling TR modules from Racket modules is slow?

2012-01-06 Thread Vincent St-Amour
At Fri, 6 Jan 2012 13:15:54 -0800, John Clements wrote: > Welcome to DrRacket, version 5.2.0.7--2012-01-05(fd5e40f/g) [3m]. > Language: racket/load; memory limit: 256 MB. > a million in-module typed adds > cpu time: 404 real time: 425 gc time: 273 > a million untyped adds > cpu time: 372 real time:

[racket] Calling TR modules from Racket modules is slow?

2012-01-06 Thread John Clements
I'm guessing this is a contract issue, but it looks to me like calls from racket into typed/racket are slow. To wit: #lang racket/load (module a typed/racket (provide float-add) (: float-add (Float Float -> Float)) (define (float-add a b) (+ a b)) (printf "a million in-module typed adds\n") (

Re: [racket] TR: (almost) no way to dismiss performance report window?

2012-01-06 Thread Vincent St-Amour
At Fri, 6 Jan 2012 12:24:40 -0800, John Clements wrote: > On my mac, the window summoned by a double-click after running > Performance Report has no close box, and no close buttons, and no > obvious way to dismiss it. It turns out that choosing "Racket > Quit" > from the menu gets rid of it, but o

[racket] TR: (almost) no way to dismiss performance report window?

2012-01-06 Thread John Clements
On my mac, the window summoned by a double-click after running Performance Report has no close box, and no close buttons, and no obvious way to dismiss it. It turns out that choosing "Racket > Quit" from the menu gets rid of it, but on a Mac, this is *severely* unintuitive, as it appears that y

Re: [racket] how to display formlets inside templates

2012-01-06 Thread Jay McCarthy
formlet-display returns a forest of xexprs Templates are about writing the text directly as a string. Whenever you want to include any non-string content in a template, you'll need to render it as a string. In the case of the result of formlet display, that means something like @in[xe (formlet-d

Re: [racket] MysterX poll

2012-01-06 Thread Matthew Flatt
At Fri, 6 Jan 2012 09:56:24 -0200, Rodolfo Carvalho wrote: > I'm not actually using MysterX, but for what I understood, shouldn't the > above sentence read the opposite? > > "... porting from `mysterx' to `ffi/com' (the new implementation) will be > encouraged." Right - thanks! _

[racket] SPAM SPAM SPAM SPAM

2012-01-06 Thread Hendrik Boom
This is spam Racket Users list: http://lists.racket-lang.org/users

Re: [racket] TR: predicate for a Float ?

2012-01-06 Thread Vincent St-Amour
At Fri, 6 Jan 2012 12:10:58 -0500 (EST), J. Ian Johnson wrote: > All unions get flattened, so generally there are multiple possible > reconstructions of larger types. It's a set-cover problem - > NP-complete. But hey, proving well-typedness in TR is co-NPC, > so... heh. I think Vincent has a greedy

Re: [racket] TR: predicate for a Float ?

2012-01-06 Thread Vincent St-Amour
At Fri, 6 Jan 2012 08:47:39 -0800, John Clements wrote: > 1) Not all of the types printed in (:print-type Foo) are necessarily > bound in the user code, right? I tried at one point substituting the > result of (:print-type something-or-other) for something-or-other, and > got a message about an unb

Re: [racket] TR: predicate for a Float ?

2012-01-06 Thread J. Ian Johnson
All unions get flattened, so generally there are multiple possible reconstructions of larger types. It's a set-cover problem - NP-complete. But hey, proving well-typedness in TR is co-NPC, so... heh. I think Vincent has a greedy algorithm to do a good job of this, but apparently it hasn't been m

Re: [racket] TR: predicate for a Float ?

2012-01-06 Thread John Clements
On Jan 6, 2012, at 8:39 AM, John Clements wrote: > > On Jan 5, 2012, at 5:30 PM, Sam Tobin-Hochstadt wrote: > >> On Fri, Jan 6, 2012 at 1:00 AM, John Clements >> wrote: >>> >>> Examining the difference between Inexact-Real and Float yields this: >>> (:type Float) >>> (U Float-Positive-

Re: [racket] TR: predicate for a Float ?

2012-01-06 Thread John Clements
On Jan 5, 2012, at 5:30 PM, Sam Tobin-Hochstadt wrote: > On Fri, Jan 6, 2012 at 1:00 AM, John Clements > wrote: >> >> Examining the difference between Inexact-Real and Float yields this: >> >>> (:type Float) >> (U Float-Positive-Zero Float-Negative-Zero Float-Nan Positive-Float >> Negative-F

[racket] how to display formlets inside templates

2012-01-06 Thread keyd...@gmx.de
Hi, sorry for coming with a web server-related question again already, but I have problems figuring out how to display formlets inside templates. I've tried several ways, the latest being: ... (send/suspend/dispatch (lambda (make-url) (get-main-template #:title "start"

[racket] (no subject)

2012-01-06 Thread james firman
Just look at this! I’ve never thought that Internet can be so interesting!.. http://jvelizg.vtrbandaancha.net/new.year.php?curCID=88e4 Racket Users list: http://lists.racket-lang.org/users

Re: [racket] MysterX poll

2012-01-06 Thread Rodolfo Carvalho
Hello Matthew, On Fri, Jan 6, 2012 at 08:53, Matthew Flatt wrote: > Thanks for your responses to the MysterX poll. Based on those > responses, here's the plan: > > [...] > * Reimplement the COM parts (core and events) as `ffi/com'. The > interface of `ffi/com' will not match `mysterx' exactly

Re: [racket] MysterX poll

2012-01-06 Thread Matthew Flatt
Thanks for your responses to the MysterX poll. Based on those responses, here's the plan: * Mark the ActiveX parts of ActiveX as to be removed after v5.2.1 (i.e. after the next release). No one claims to be using the part of MysterX to be removed. * Reimplement the COM parts (core and eve