Re: [racket-dev] [plt] Push #20898: master branch updated

2010-09-09 Thread Sam Tobin-Hochstadt
On Mon, Aug 23, 2010 at 11:02 AM, Will M. Farr wmf...@gmail.com wrote: On Aug 23, 2010, at 7:40 AM, Matthew Flatt wrote: Maybe you want to thread the vector index through using `for/fold' instead of drawing the index from a sequence. The expansion could insert enough `#:when' clauses to

Re: [racket-dev] [plt] Push #20898: master branch updated

2010-08-23 Thread Noel Welsh
On Mon, Aug 23, 2010 at 12:26 AM, Will M. Farr wmf...@gmail.com wrote: Thanks for sharing your code, and for the comments.  Let me see if I understand this correctly: the following code should produce a total, a vector whose elements are the partial sums of elements at lower indices than

Re: [racket-dev] [plt] Push #20898: master branch updated

2010-08-23 Thread Matthew Flatt
At Sun, 22 Aug 2010 15:36:03 -0500, Will M. Farr wrote: Either choice --- error or stopping --- interacts awkwardly with `for*/vector'. If you've going to raise an exception, the natural thing to do with `for/vector' would be to stop as soon as the sequence goes too far. But `for*/vector'

Re: [racket-dev] [plt] Push #20898: master branch updated

2010-08-22 Thread Noel Welsh
On Sun, Aug 22, 2010 at 9:36 PM, Will M. Farr wmf...@gmail.com wrote: Matthew co, ... I'll make sure to throw a syntax error if I see a #:when in the for-clauses, and I think I should give up on the for*/vector #:length variant.  I was hoping that you would have some sort of neat trick to

Re: [racket-dev] [plt] Push #20898: master branch updated

2010-08-22 Thread Will M. Farr
Matthew co, On Aug 21, 2010, at 7:14 AM, Matthew Flatt wrote: I didn't think of this before, but probably you should add a check that the length expression proceduces a nonnegative exact integer: (syntax/loc stx (let ((len length-expr)) (unless

Re: [racket-dev] [plt] Push #20898: master branch updated

2010-08-21 Thread Matthew Flatt
At Fri, 20 Aug 2010 13:05:12 -0500, Will M. Farr wrote: Thanks very much for the comments. I'll get to work preparing an updated version using #:size soon, and send it to Sam for pushing. I should have suggested `#:length', since it corresponds to `vector-length'. I didn't think of this

Re: [racket-dev] [plt] Push #20898: master branch updated

2010-08-20 Thread Will M. Farr
Matthew, Thanks very much for the comments. I'll get to work preparing an updated version using #:size soon, and send it to Sam for pushing. As for the issue of a #:size that doesn't match the length of the iteration, I have been thinking about adding a check inside the loop (for sizes that