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

2012-07-07 Thread Matthew Flatt
At Fri, 6 Jul 2012 15:19:25 -0400, Carl Eastlund wrote: While I'm thinking about this -- since gensym in macros is a common error, is it possible we could fix it so that it works? The unique marks on generate-temporaries's output are marshalled in a way that ensures marks in one module are

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

2012-07-07 Thread Carl Eastlund
On Sat, Jul 7, 2012 at 8:38 AM, Matthew Flatt mfl...@cs.utah.edu wrote: At Fri, 6 Jul 2012 15:19:25 -0400, Carl Eastlund wrote: While I'm thinking about this -- since gensym in macros is a common error, is it possible we could fix it so that it works? The unique marks on

Re: [racket-dev] promise vs polym contracts

2012-07-07 Thread Matthias Felleisen
As Carl pointed out, I should explain more background. Stephen and I are exploring how to get laziness in Racket w/o going to Lazy Racket (in a sense). As I wrote the idea is to introduce laziness in a somewhat transparent manner, the way Sam introduces types in a mostly transparent manner

Re: [racket-dev] promise vs polym contracts

2012-07-07 Thread Matthias Felleisen
I may have made a mistake under time pressure: [else (+ (force (sum (car x))) (force (sum (cdr x] On Jul 7, 2012, at 10:19 AM, Sam Tobin-Hochstadt wrote: On Sat, Jul 7, 2012 at 10:14 AM, Matthias Felleisen matth...@ccs.neu.edu wrote: p.s. Sam's version forces too early because

Re: [racket-dev] promise vs polym contracts

2012-07-07 Thread Matthias Felleisen
On Jul 7, 2012, at 10:27 AM, Sam Tobin-Hochstadt wrote: Right, that's what I thought. This is only different in that: (define v (delay (+ 1 2))) (sum v) ; = v Which means clients of `sum` now have to handle either Integers or Promises. Is that intentional? Yes. ;; ---

[racket-dev] Custom write that pretty-prints and works well with quote?

2012-07-07 Thread Neil Toronto
I've got an array structure like so: (struct: (A) strict-array ([shape : (Listof Index)] [data : (Vectorof A)]) Say I have this value: (strict-array '(2 2) #(1 2 3 4)) I want it to print like this at the REPL: #strict-array '(2 2) '[[1 2] [3 4]] If there's

[racket-dev] math

2012-07-07 Thread Matthias Felleisen
Neil, do you intend to provide differentiat and integrate and possibly adjoin operations on operators from your math collection? -- Matthias _ Racket Developers list: http://lists.racket-lang.org/dev

Re: [racket-dev] math

2012-07-07 Thread Neil Toronto
On 07/07/2012 01:39 PM, Matthias Felleisen wrote: Neil, do you intend to provide differentiat and integrate and possibly adjoin operations on operators from your math collection? I've considered numerical differentiation and integration. If you want them, I'll make sure they

[racket-dev] Overly general types for mutable containers

2012-07-07 Thread Neil Toronto
#lang typed/racket (define: x : Index 1) (: bar ((Vectorof Index) - (Vectorof Index))) (define (bar xs) xs) (: foo (All (A) ((Vectorof Index) - (Vectorof Index (define (foo xs) xs) So we have an Index `x' and a couple of identity functions `bar' and `foo' that only differ by the fact

Re: [racket-dev] Overly general types for mutable containers

2012-07-07 Thread Sam Tobin-Hochstadt
On Sun, Jul 8, 2012 at 12:58 AM, Neil Toronto neil.toro...@gmail.com wrote: It runs directly counter to what I expect from immutable containers, which I use most of the time: This is the problem. Immutable containers are very different from mutable ones, and your expectations shouldn't be