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

2012-05-10 Thread Kevin Tew

On 05/10/2012 05:38 PM, Eli Barzilay wrote:

Two hours ago, t...@racket-lang.org wrote:

   A collects/racket/place/distributed/RMPI.rkt

Can we avoid having capitals in public api modules and CamelCase names
like `RMPI-AllReduce'?


I'll fix it.
_
 Racket Developers list:
 http://lists.racket-lang.org/dev


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

2012-05-10 Thread Eli Barzilay
Two hours ago, t...@racket-lang.org wrote:
>   A collects/racket/place/distributed/RMPI.rkt

Can we avoid having capitals in public api modules and CamelCase names
like `RMPI-AllReduce'?

-- 
  ((lambda (x) (x x)) (lambda (x) (x x)))  Eli Barzilay:
http://barzilay.org/   Maze is Life!
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] Generics and data structures

2012-05-10 Thread Vincent St-Amour
At Wed, 9 May 2012 18:13:55 -0400,
Asumu Takikawa wrote:
> Ideally, we would provide similar interfaces for the other generic APIs
> in the tree, such as streams and sequences. However, the existing APIs
> rely on different representations for method tables from the one used by
> unstable/generics, specifically a vector of methods. This makes
> backwards compatibility complicated and we're not sure how to proceed.

We followed Ryan's recommendation, and now have a design (on Github)
that allows backwards compatibility with existing representations.

However, it turns out that the generic interfaces we mentioned present
additional complications that we didn't foresee.

For the gory details, read on.

>   * `prop:sequence`: Instead of a vector of methods, this struct
> property takes a procedure which takes a struct instance and
> produces a sequence (not a vector of methods).

Just like `prop:stream', it is used in the implementation of
`racket/base', so we can't redefine it to use the generics library.
(Our backwards compatibility story depends on the generics library being
the one defining the struct property.) We can think of two solutions:
 - Write the generics library in `#%kernel' and make it part of
   `racket/base'. (Which would be premature, given how new the generics
   library is.)
 - Move `for' from `racket/base' to `racket/for' so that streams and
   sequences can depend on the generics library.
Neither of these sound desirable. Can anyone think of other solutions?

>   * `prop:equal+hash-code` uses a list of methods instead of a vector.

That one is defined in the C code, so we can't redefine it. However, if
the property's guard and its clients (`equal?', `hash') are changed to
accept both lists of methods (as they currently do) and vectors of
methods (as the generics library would produce), we could make it work.
Would this be a reasonable solution?

>   * `prop:dict/contract` is given both a method vector and a vector
> of sub-contracts that are used to assemble the method contracts.
> The generics library currently uses a single vector.

We have a general design for contracting generic interfaces, which would
cover this case. We're working on implementing it.

Thanks for your feedback!

Vincent
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


[racket-dev] race setup tests gives wrong error message, best way to fix?

2012-05-10 Thread John Clements
Apologies in advance if this is a known or fixed issue. 

Running 

raco setup tests

gives the following error message:

raco setup: given collection path: "tests" is not in canonical form (e.g., 
wrong case on a case-insensitive filesystem)

 === context ===
/Users/clements/plt/collects/setup/setup-unit.rkt:493:9
/Users/clements/plt/collects/setup/setup-go.rkt: [running body]
/Users/clements/plt/collects/setup/main.rkt: [running body]
/Users/clements/plt/collects/raco/main.rkt: [running body]

This seemed crazy, so I grepped for the error message, and sure enough, I got 
this :

 (define top-level-plt-collects
(if no-specific-collections?
  all-collections
  (check-against-all
   (apply
append
(map
 (lambda (c)
   (define elems (append-map (lambda (s) 
   (map string->path
(regexp-split #rx"/" s)))
 c))
   (define ccs
 (collection->ccs elems))
   (when (null? ccs)
 ;; let `collection-path' complain about the name, if that's the 
problem:
 (apply collection-path elems)
 ;; otherwise, it must be an issue with different ways to
 ;; spell the name
 (error name-sym
(error name-sym
 "given collection path: \"~a\" is not in canonical form 
(e.g., wrong case on a case-insensitive filesystem)"
 (string-join c "/"
   ccs)
 x-specific-collections)

… Note that the error message I saw is a fall-through case, when the given 
names don't appear in the hash table.  I'm guessing that "tests" is explicitly 
excluded from this table some where (though it doesn't seem to be in this 
file). I see a couple of possible fixes.

1) Add a new table representing collections that aren't normally compiled but 
can be explicitly chosen,
2) provide a better error message by special-casing it here,
3) go back to automatically compiling "tests" :)

John



smime.p7s
Description: S/MIME cryptographic signature
_
  Racket Developers list:
  http://lists.racket-lang.org/dev