Re: [racket-dev] cross-phase syntax constants

2012-07-06 Thread Matthew Flatt
I find the example too abstract to understand why the computation happens at the wrong phase when you adjust the code with `begin-for-syntax'. Can you explain a little more, maybe with a more concrete example? Just in case, here's the code that I think you have in mind for wrong phase: #lang

Re: [racket-dev] cross-phase syntax constants

2012-07-06 Thread Sam Tobin-Hochstadt
On Fri, Jul 6, 2012 at 11:00 AM, Matthew Flatt mfl...@cs.utah.edu wrote: I find the example too abstract to understand why the computation happens at the wrong phase when you adjust the code with `begin-for-syntax'. Can you explain a little more, maybe with a more concrete example? Just in

Re: [racket-dev] cross-phase syntax constants

2012-07-06 Thread Matthew Flatt
At Fri, 6 Jul 2012 11:13:44 -0400, Sam Tobin-Hochstadt wrote: I had not realized that I could sensibly wrap a module in a `begin-for-syntax`. What is the semantic difference between that and a plain submodule (other than my example working)? For `(module* _name #f )', `begin-for-syntax'

Re: [racket-dev] A very listy Typed Racket Integer

2012-07-06 Thread Sam Tobin-Hochstadt
On Fri, Jul 6, 2012 at 11:59 AM, Neil Toronto neil.toro...@gmail.com wrote: On 07/05/2012 05:54 PM, Sam Tobin-Hochstadt wrote: On Jul 5, 2012 8:50 PM, Neil Toronto neil.toro...@gmail.com mailto:neil.toro...@gmail.com wrote: (define-predicate boxof-integer? (Boxof Integer)) This is the

Re: [racket-dev] A very listy Typed Racket Integer

2012-07-06 Thread Neil Toronto
On 07/06/2012 09:11 AM, Sam Tobin-Hochstadt wrote: On Fri, Jul 6, 2012 at 11:59 AM, Neil Toronto neil.toro...@gmail.com wrote: Anticipating a bug fix, I've started converting my recent TR code so that it doesn't define predicates for mutable container types. Instead of using `define-predicate',

[racket-dev] Uninterned symbols in compiled code

2012-07-06 Thread Carl Eastlund
The documentation for generate-temporaries[1] ends with, The generated identifiers are built with interned symbols (not gensyms), so the limitations described with current-compile do not apply. However, I cannot find any limitations described in the documentation for current-compile[2]. If I

[racket-dev] Redex site down?

2012-07-06 Thread Jonathan Schuster
Has anyone noticed that the Redex website appears to be down? When I go to http://redex.racket-lang.org/ , all I get is an index page listing a bunch of Racket/Scheme source files. _ Racket Developers list: http://lists.racket-lang.org/dev

Re: [racket-dev] Uninterned symbols in compiled code

2012-07-06 Thread Carl Eastlund
On Fri, Jul 6, 2012 at 3:06 PM, Matthew Flatt mfl...@cs.utah.edu wrote: At Fri, 6 Jul 2012 12:59:34 -0600, Matthew Flatt wrote: As I try to make an example illustrating problems, I see that Racket is more resistant to problems created by `gensym' than I expected. Ah --- one more level of

Re: [racket-dev] Uninterned symbols in compiled code

2012-07-06 Thread Carl Eastlund
On Fri, Jul 6, 2012 at 3:11 PM, Carl Eastlund c...@ccs.neu.edu wrote: On Fri, Jul 6, 2012 at 3:06 PM, Matthew Flatt mfl...@cs.utah.edu wrote: At Fri, 6 Jul 2012 12:59:34 -0600, Matthew Flatt wrote: As I try to make an example illustrating problems, I see that Racket is more resistant to

[racket-dev] promise vs polym contracts

2012-07-06 Thread Matthias Felleisen
I just realized that Racket already suffers from the problem that polymorphic contracts introduce. As Stephen is working out right now, Racketeers want to introduce laziness to speed up programs on occasion. We have been told for decades that delay and force are our friends. In a sense, this

Re: [racket-dev] Redex site down?

2012-07-06 Thread Eli Barzilay
50 minutes ago, Jonathan Schuster wrote: Has anyone noticed that the Redex website appears to be down? When I go to http://redex.racket-lang.org/ , all I get is an index page listing a bunch of Racket/Scheme source files. Yeah, that was a server misconfiguration -- thanks for reporting it.

Re: [racket-dev] promise vs polym contracts

2012-07-06 Thread Robby Findler
What do you do if you have a function that accepts either promises or lists? Then, you might want total predicates. Robby On Fri, Jul 6, 2012 at 2:22 PM, Matthias Felleisen matth...@ccs.neu.edu wrote: I just realized that Racket already suffers from the problem that polymorphic contracts

Re: [racket-dev] promise vs polym contracts

2012-07-06 Thread Matthias Felleisen
I can't think of such a primitive other than force, for which it is okay. Can you be concrete? On Jul 6, 2012, at 5:16 PM, Robby Findler wrote: What do you do if you have a function that accepts either promises or lists? Then, you might want total predicates. Robby On Fri, Jul 6,

Re: [racket-dev] promise vs polym contracts

2012-07-06 Thread Sam Tobin-Hochstadt
On Fri, Jul 6, 2012 at 5:53 PM, Matthias Felleisen matth...@ccs.neu.edu wrote: I can't think of such a primitive other than force, for which it is okay. Can you be concrete? Here's a type definition; (define-type LTree (U (Promise Integer) (Cons LTree LTree))) This is just a tree of

Re: [racket-dev] promise vs polym contracts

2012-07-06 Thread Carl Eastlund
On Fri, Jul 6, 2012 at 6:53 PM, Matthias Felleisen matth...@ccs.neu.edu wrote: I don't care about typed definitions. Sam didn't have a typed definition, just a type definition, note the significant d suffix. And yes, in an untyped world, you'd write (define (sum lt) (cond [(promise?

Re: [racket-dev] promise vs polym contracts

2012-07-06 Thread Robby Findler
Lets say I have a function that gets a list of promises or lists. It is going to print out the state of some ongoing computation (that is producing these lists). It will print the list, if there's a list, and it will print pending if it is a promise; it doesn't want to force it, since it is just a