[racket-dev] sequence syntax for (mlist #t #f …) ?

2012-06-21 Thread John Clements
Reality check before I do something dumb and re-invent the wheel: I often want to write a for loop where the first element is treated specially. In such cases, it would be nice to have a sequence that had a #t and then an infinite number of #f's, so I could write (for ([s my-sequence] [first?

Re: [racket-dev] sequence syntax for (mlist #t #f …) ?

2012-06-21 Thread Eli Barzilay
An hour and a half ago, John Clements wrote: Reality check before I do something dumb and re-invent the wheel: I often want to write a for loop where the first element is treated specially. In such cases, it would be nice to have a sequence that had a #t and then an infinite number of #f's,

Re: [racket-dev] sequence syntax for (mlist #t #f …) ?

2012-06-21 Thread Robby Findler
I usually in-naturals and zero? to do this. I see that one example (that I didn't write is in base-render.rkt (define/public (render-nested-flow i part ri starting-item?) (for/list ([b (in-list (nested-flow-blocks i))] [pos (in-naturals)]) (render-block b part

Re: [racket-dev] sequence syntax for (mlist #t #f …) ?

2012-06-21 Thread Eli Barzilay
A few minutes ago, Robby Findler wrote: I usually in-naturals and zero? to do this. (Ah, I forgot to include this, with the observation that worrying about bignums is not relevant...) I see that one example (that I didn't write is in base-render.rkt (define/public (render-nested-flow i

Re: [racket-dev] Error message proposal

2012-06-21 Thread Eli Barzilay
Three hours ago, Matthew Flatt wrote: I think you're asking for two changes to the error-message syntax: * Move srcloc back to the front of error messages. * Support multi-line messages: the first line is supposed to be useful on its own, but extra lines act as a kind of detail field

Re: [racket-dev] Error message proposal

2012-06-21 Thread Robby Findler
On Thu, Jun 21, 2012 at 4:21 AM, Eli Barzilay e...@barzilay.org wrote: Three hours ago, Matthew Flatt wrote: I think you're asking for two changes to the error-message syntax:  * Move srcloc back to the front of error messages.  * Support multi-line messages: the first line is supposed to be

[racket-dev] `regexp-replaces'

2012-06-21 Thread Eli Barzilay
While scanning code for a minor incompatible in a commit, I ran into this function which is the ffi collection of all places. (See the docs for what it does.) Given that this comes up often, maybe it's time to add this to `racket/string'? (Or maybe `racket/private/string' next to the other

Re: [racket-dev] Error message proposal

2012-06-21 Thread Eli Barzilay
Four hours ago, Robby Findler wrote: I think Matthew is concerned with the code that constructs the error messages and being able to build strings from parts coming from different places.. I understood this as the continuation of the current style of error messages, not as a technical

Re: [racket-dev] `regexp-replaces'

2012-06-21 Thread Laurent
add1 I also use such a function from time to time, and I'd be happy to have it in the string or regexp libs. Laurent On Thu, Jun 21, 2012 at 1:56 PM, Eli Barzilay e...@barzilay.org wrote: While scanning code for a minor incompatible in a commit, I ran into this function which is the ffi

Re: [racket-dev] syntax/syntax proposal

2012-06-21 Thread Eli Barzilay
On Friday, Ryan Culpepper wrote: On 06/15/2012 01:12 PM, Asumu Takikawa wrote: Hi all, Recently I was using the `stx-car` function from `syntax/stx`. At some point, I had called it on a non-syntax pair and the error message came from `car`, which is used inside the implementation of

Re: [racket-dev] Comparison functions and the `data' collection

2012-06-21 Thread Eli Barzilay
More than a week ago, Ryan Culpepper wrote: On 06/11/2012 02:36 PM, Eli Barzilay wrote: Yesterday, Danny Yoo wrote: It's a little unfortunate that there's a slight impedance mismatch between what datum-order provides and what sort expects; the my-less-than function in the example adapts

Re: [racket-dev] syntax/syntax proposal

2012-06-21 Thread Matthias Felleisen
On Jun 21, 2012, at 11:26 AM, Eli Barzilay wrote: I don't see how that would help -- you'll still get the same errors. Ouch. That's again a misunderstanding of contracts. The idea is that contracts specify in interfaces what is expected, not deep inside some code.

Re: [racket-dev] syntax/syntax proposal

2012-06-21 Thread Eli Barzilay
A few minutes ago, Matthias Felleisen wrote: On Jun 21, 2012, at 11:26 AM, Eli Barzilay wrote: I don't see how that would help -- you'll still get the same errors. Ouch. That's again a misunderstanding of contracts. The idea is that contracts specify in interfaces what is expected,

Re: [racket-dev] sequence syntax for (mlist #t #f …) ?

2012-06-21 Thread John Clements
On Jun 21, 2012, at 1:24 AM, Eli Barzilay wrote: An hour and a half ago, John Clements wrote: Yes, of course I can do it the ugly way: [...] (define p1 (mcons #f 'bogus)) (set-mcdr! p1 p1) (define true-then-falses (mcons #t p1)) What about (shared ([fs (cons #f fs)]) (cons #t

Re: [racket-dev] check-syntax hack: patch to show how many uses an identifier has

2012-06-21 Thread John Clements
On Jun 21, 2012, at 8:58 AM, Matthias Felleisen wrote: +a lot; I'd like that Robby, what's the nastiness threshold for getting something like this into the distribution? - is it okay to have a menu item with no action? - is it okay to just say how many arrows--lines, really--radiate from

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

2012-06-21 Thread Eli Barzilay
A week ago, as...@racket-lang.org wrote: 5d232f3 Asumu Takikawa as...@racket-lang.org 2012-06-13 16:32 : | racket/control: add aliases and update %/fcontrol | | Added alises for call-with-continuation-prompt, | abort-current-continuation, and call-with-composable-continuation. | Also

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

2012-06-21 Thread Eli Barzilay
About a month ago, as...@racket-lang.org wrote: cfe1711 Asumu Takikawa as...@racket-lang.org 2012-05-26 11:10 : | Convert all uses of mzlib/class100 to racket/class : Nice. How about adding a big deprecated to the class100 docs, and make a note to remove it in a year? (Eg, add this to the

Re: [racket-dev] check-syntax hack: patch to show how many uses an identifier has

2012-06-21 Thread Robby Findler
I'll try to do something along these lines. It shouldn't be hard to make it a tooltip. Robby On Thu, Jun 21, 2012 at 11:03 AM, John Clements cleme...@brinckerhoff.org wrote: On Jun 21, 2012, at 8:58 AM, Matthias Felleisen wrote: +a lot; I'd like that Robby, what's the nastiness threshold

Re: [racket-dev] Redex for abstract machines / analysis prototypes

2012-06-21 Thread Matthias Felleisen
FWIW, Jonathan Schuster's encoding of NetCore (the Princeton-Cornell theory for routing, last popl) encountered a similar problem. The original paper uses the ChemAM and he encoded it with Redex with propagated parts of patterns. So in general, models based on the Chem AM would be easier to

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

2012-06-21 Thread Asumu Takikawa
On 2012-06-21 13:03:18 -0400, Eli Barzilay wrote: Nice. How about adding a big deprecated to the class100 docs, and make a note to remove it in a year? That trick is neat, but would it be a problem to just remove it now? Tony had the idea that we could just put it on PLaneT and tell people to

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

2012-06-21 Thread Sam Tobin-Hochstadt
On Thu, Jun 21, 2012 at 1:58 PM, Asumu Takikawa as...@ccs.neu.edu wrote: On 2012-06-21 13:03:18 -0400, Eli Barzilay wrote: Nice.  How about adding a big deprecated to the class100 docs, and make a note to remove it in a year? That trick is neat, but would it be a problem to just remove it

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

2012-06-21 Thread Robby Findler
I think we should give people warnings; we cannot just remove stuff. Robby On Thu, Jun 21, 2012 at 12:58 PM, Asumu Takikawa as...@ccs.neu.edu wrote: On 2012-06-21 13:03:18 -0400, Eli Barzilay wrote: Nice.  How about adding a big deprecated to the class100 docs, and make a note to remove it in

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

2012-06-21 Thread Matthias Felleisen
Agreed. Deprecate now, remove next+ or next++ release -- Matthias On Jun 21, 2012, at 2:56 PM, Robby Findler wrote: I think we should give people warnings; we cannot just remove stuff. Robby On Thu, Jun 21, 2012 at 12:58 PM, Asumu Takikawa as...@ccs.neu.edu wrote: On 2012-06-21

[racket-dev] weird module: identifier is already imported error

2012-06-21 Thread Christos Dimoulas
Hi, I ran into an error that I can't explain. Do you have any hints about what is going on or any suggestions on how to fix it? In the following code, macros provides alternative forms for require and provide, dubbed accept and provide/dispute. They are doing the same job as provide and

Re: [racket-dev] syntax/syntax proposal

2012-06-21 Thread Ryan Culpepper
On 06/21/2012 09:53 AM, Eli Barzilay wrote: A few minutes ago, Matthias Felleisen wrote: On Jun 21, 2012, at 11:26 AM, Eli Barzilay wrote: I don't see how that would help -- you'll still get the same errors. Ouch. That's again a misunderstanding of contracts. The idea is that contracts

Re: [racket-dev] weird module: identifier is already imported error

2012-06-21 Thread Ryan Culpepper
I can reproduce this error in DrRacket (both with and without debuggging enabled) but not in racket. So maybe DrRacket is doing something odd, or perhaps there's a bug in module-namespace or something like that. Ryan On 06/21/2012 01:52 PM, Christos Dimoulas wrote: Hi, I ran into an error

Re: [racket-dev] syntax/syntax proposal

2012-06-21 Thread Matthias Felleisen
On Jun 21, 2012, at 4:23 PM, Ryan Culpepper wrote: The reorganization would discourage people from trying to add contracts to modules in the racket/pre-contracts subcollection. It's apparent from the name, as opposed to being discoverable by running the compiler. It would also encourage

Re: [racket-dev] weird module: identifier is already imported error

2012-06-21 Thread Matthias Felleisen
Christos, time to file a bug report (with code snippets). -- Matthias On Jun 21, 2012, at 4:41 PM, Ryan Culpepper wrote: I can reproduce this error in DrRacket (both with and without debuggging enabled) but not in racket. So maybe DrRacket is doing something odd, or perhaps there's a bug

Re: [racket-dev] Comparison functions and the `data' collection

2012-06-21 Thread Ryan Culpepper
On 06/21/2012 09:38 AM, Eli Barzilay wrote: More than a week ago, Ryan Culpepper wrote: On 06/11/2012 02:36 PM, Eli Barzilay wrote: Yesterday, Danny Yoo wrote: It's a little unfortunate that there's a slight impedance mismatch between what datum-order provides and what sort expects; the

Re: [racket-dev] Comparison functions and the `data' collection

2012-06-21 Thread David Van Horn
On 6/21/12 6:04 PM, Ryan Culpepper wrote: On 06/21/2012 09:38 AM, Eli Barzilay wrote: More than a week ago, Ryan Culpepper wrote: On 06/11/2012 02:36 PM, Eli Barzilay wrote: Yesterday, Danny Yoo wrote: It's a little unfortunate that there's a slight impedance mismatch between what

Re: [racket-dev] Error message proposal

2012-06-21 Thread Matthew Flatt
At Thu, 21 Jun 2012 05:21:38 -0400, Eli Barzilay wrote: To translate the errors you've written (as would be shown by the default display handler, when showing all fields too): (+ 1 'a) +: contract violation `+' expected a number in its 2nd argument; given 'a expected: number?

Re: [racket-dev] Bug in Racket's I/O?

2012-06-21 Thread Matthew Flatt
Thanks --- I've pushed a repair. At Wed, 20 Jun 2012 20:25:35 -0400, Tony Garnock-Jones wrote: Sorry, I should have filed a bug report instead of mailing the list. I'm filing the report now. On 2012-06-20 8:22 PM, Tony Garnock-Jones wrote: Hi all, I think I've found a bug in Racket's

Re: [racket-dev] impersonate-struct with only impersonator properties

2012-06-21 Thread Matthew Flatt
At Tue, 19 Jun 2012 23:25:47 -0700, Eric Dobson wrote: The documentation for impersonate-struct and chaperone-struct differ in the fact that chaperone-struct explicitly says that only impersonator properties are not allowed. But the implementation doesn't allow it for either of them. Either