Re: [racket] Using syntax/parse, how to accept keyword arguments in any order yet not allow duplicates?

2013-04-07 Thread Scott Klarenbach
Thanks, that's perfect! I knew it couldn't have been overlooked :) On Sun, Apr 7, 2013 at 5:31 PM, J. Ian Johnson wrote: > The ~in-between pattern and its specializations ~once and ~optional are > great for this purpose. Anything matching this pattern must appear in the > range given in ~in-be

Re: [racket] Using syntax/parse, how to accept keyword arguments in any order yet not allow duplicates?

2013-04-07 Thread Eric Dobson
You want ~once. See http://docs.racket-lang.org/syntax/stxparse-patterns.html?q=syntax-parse#%28form._%28%28lib._syntax%2Fparse..rkt%29._~7eonce%29%29 and http://docs.racket-lang.org/syntax/More_Keyword_Arguments.html?q=syntax-parse. On Sun, Apr 7, 2013 at 5:23 PM, Scott Klarenbach wrote: > Hi t

Re: [racket] Using syntax/parse, how to accept keyword arguments in any order yet not allow duplicates?

2013-04-07 Thread J. Ian Johnson
The ~in-between pattern and its specializations ~once and ~optional are great for this purpose. Anything matching this pattern must appear in the range given in ~in-between, even in ellipsis'd contexts. (a:id b:id (~or (~once (~seq #:key1 c:id)) (~once (~seq #:key2 d:id))) ...) -Ian - Origi

[racket] Using syntax/parse, how to accept keyword arguments in any order yet not allow duplicates?

2013-04-07 Thread Scott Klarenbach
Hi there, I'd like to create a macro that accepts non-optional keyword arguments in any order. It should however, ensure that all the arguments are provided. Finally, it should not allow duplicates. So far I've only been able to solve for my first criteria. As a test, I have this: (syntax-par

Re: [racket] Typed Racket generalization and inference for containers

2013-04-07 Thread Eric Dobson
This is already fixed at HEAD, https://github.com/plt/racket/commit/1334e8dcc77854ac826306d3f6a36150cb0bf0c1 has the fix. On Sun, Apr 7, 2013 at 7:47 AM, Sam Tobin-Hochstadt wrote: > On Sun, Apr 7, 2013 at 10:18 AM, Andrey Larionov wrote: >> Hello, Racket community. >> I'm a newbie and just star

Re: [racket] Testing macro helpers

2013-04-07 Thread Eric Dobson
I have already done that in the example, the issue is testing the syntax it produces when called at phase 0. On Sun, Apr 7, 2013 at 5:04 AM, Robby Findler wrote: > You can put your helper code in a submodule that you require from the test > module at phase 0 but from the actual module at phase 1.

Re: [racket] Typed Racket generalization and inference for containers

2013-04-07 Thread Sam Tobin-Hochstadt
On Sun, Apr 7, 2013 at 10:18 AM, Andrey Larionov wrote: > Hello, Racket community. > I'm a newbie and just started study Racket and Typed Racket and a little > confused with generalization and inference. > I found what inference works different for different containers type. For > example: > Set:

[racket] full path in #

2013-04-07 Thread Tom Schouten
Hello, Is there a way to get the full path displayed when an anonymous procedure object is pretty-printed? By default it seems to add ellipsis in front like this: # Cheers, Tom Racket Users list: http://lists.racket-lang.org/users

Re: [racket] Misleading label when registering with pkg.racket-lang.org

2013-04-07 Thread Jens Axel Søgaard
> "Typed Racket" is not valid because it contains a space. Let me rephrase the question. A package has a two names. One is used informally among people to refer to a package. This could be Typed-Racket. The other is the name used in the package system this could be typed-racket. Is it clear from

[racket] Typed Racket generalization and inference for containers

2013-04-07 Thread Andrey Larionov
Hello, Racket community. I'm a newbie and just started study Racket and Typed Racket and a little confused with generalization and inference. I found what inference works different for different containers type. For example: Set: > (set 0 195 196) - : (Setof Byte) (set 0 195 196) List: > '((195 . 1

Re: [racket] Misleading label when registering with pkg.racket-lang.org

2013-04-07 Thread Jay McCarthy
On Sun, Apr 7, 2013 at 7:51 AM, Jens Axel Søgaard wrote: > Let's say I want to submit Typed Racket as a package. > Is the package name "Typed Racket" or typed-racket ? "Typed Racket" is not valid because it contains a space. > I just got a 503 from pkg.racket-lang.org, so I check whether > it is

Re: [racket] Misleading label when registering with pkg.racket-lang.org

2013-04-07 Thread Jens Axel Søgaard
Let's say I want to submit Typed Racket as a package. Is the package name "Typed Racket" or typed-racket ? I just got a 503 from pkg.racket-lang.org, so I check whether it is clear from the context what is meant. /Jens Axel 2013/4/6 Robby Findler > I just tried clicking thru this too and I

Re: [racket] Misleading label when registering with pkg.racket-lang.org

2013-04-07 Thread Tony Garnock-Jones
On 2013-04-06 4:54 PM, Jay McCarthy wrote: > If you'd like, I can make the patch myself, but I think it may be more > productive to figure out the deeper reason why it is hard to tell that > "Contribute a Package" goes to a package information form and fix > that, rather than just changing a text s

Re: [racket] Testing macro helpers

2013-04-07 Thread Robby Findler
You can put your helper code in a submodule that you require from the test module at phase 0 but from the actual module at phase 1. Robby On Sun, Apr 7, 2013 at 1:47 AM, Eric Dobson wrote: > The issue with that is that it runs the code (compute) at phase1, when > I need to run that code at pha