Re: [racket-dev] class implementation and make-primitive-class

2014-04-18 Thread Matthias Felleisen

If a function takes 28 arguments, you probably overlooked a dozen or so. -- 
freely paraphrasing Perlis 

And you just made the best case for Typed Racket and the documentation argument 
:-) -- freely paraphrasing my own TR talk 


On Apr 17, 2014, at 2:49 PM, dfel...@ccs.neu.edu wrote:

 For a course project I've been working on adding generators to contracts for 
 use with contract-random-generate, and I've been trying to construct classes 
 and objects from simple object/c contracts. When trying to find a way to 
 functionally create a class at runtime, I came across the 
 `make-primitive-class` function in class-internal.rkt. 
 
 This function is exported, and available at a plain racket repl, but has no 
 documentation that I have been able to find and the comments about it in 
 class-internal.rkt seem to be incorrect. 
 
 Trying to call it from the repl has problems also, for example (ignoring for 
 a moment that the arguments aren't of the expected types)
 
 - (make-primitive-class #f #f 'foo object% null #f null null null null)
 ; compose-class: arity mismatch;
 ;  the expected number of arguments does not match the given number
 ;   expected: 28
 ;   given: 27
 
 The definition is in terms of compose-class and is just missing a `null` 
 argument for the abstract-names, but even after fixing that in my local 
 branch there is a discrepancy with the comments regarding it's first argument 
 `make-struct:prim`. 
 
 ; The `make-struct:prim' function takes prop:object, a class,
  ;  a preparer, a dispatcher function, an unwrap property,
  ;  an unwrapper, and a property assoc list, and produces:
  ;* a struct constructor (must have prop:object)
  ;* a struct predicate
  ;* a struct type for derived classes (mustn't have prop:object)
  ;
  ; The supplied preparer takes a symbol and returns a num.
  ; 
  ; The supplied dispatcher takes an object and a num and returns a method.
  ;
  ; The supplied unwrap property is used for adding the unwrapper
  ;  as a property value on new objects.
  ;
  ; The supplied unwrapper takes an object and returns the unwrapped
  ;  version (or the original object).
  ;
  ; When a primitive class has a superclass, the struct:prim maker
  ;  is responsible for ensuring that the returned struct items match
  ;  the supertype predicate.
 
 This suggests that make-struct:prim should take 7 arguments, but passing a 
 function of 7 arguments to it from the repl produces:
 
 - (make-primitive-class (lambda (a b c d e f g) (values #f #f #f)) #f 'foo 
 object% null #f null null null null)
 ; #procedure: arity mismatch;
 ;  the expected number of arguments does not match the given number
 ;   expected: 7
 ;   given: 5
 
 Also as far as I can tell `make-primitive-class` is never used in the code 
 base, it is defined in class-internal.rkt, but can be commented out without 
 seeming to break anything else. Does anyone know if there is a purpose for 
 this function, or if there is documentation somewhere on the functions I need 
 to pass it in order to construct a class. I think I'm starting to get a 
 better idea of how it might work from reading more of class-internal.rkt and 
 how the class* macro expands, but any guidance would be appreciated.
 
 Thanks
 Dan
 
 _
  Racket Developers list:
  http://lists.racket-lang.org/dev


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


Re: [racket-dev] Pre-Release Checklist for v6.0.1

2014-04-18 Thread Jay McCarthy
On Thu, Apr 17, 2014 at 4:44 PM, Ryan Culpepper ry...@ccs.neu.edu wrote:
 * Jay McCarthy jay.mccar...@gmail.com
   - Web Server Tests
   - XML Tests
   - HTML Tests
   - PLAI Tests
   - Racklog tests
   - Datalog tests

All passed

-- 
Jay McCarthy j...@cs.byu.edu
Assistant Professor / Brigham Young University
http://faculty.cs.byu.edu/~jay

The glory of God is Intelligence - DC 93
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] Pre-Release Checklist for v6.0.1

2014-04-18 Thread John Clements

On Apr 17, 2014, at 3:44 PM, Ryan Culpepper ry...@ccs.neu.edu wrote:

 Checklist items for the v6.0.1 release
  (using the v6.0.0.900 release candidate build)
 
 Search for your name to find relevant items, reply when you finish an
 item (please indicate which item/s is/are done).  Also, if you have any
 commits that should have been picked, make sure that the changes are in.
 
 Important: new builds are created without announcement, usually whenever
 I pick a few commits.  If you need to commit changes, please make sure
 you tell me to pick it into the release branch.
 
 -- Release candidates are at
 --   http://pre-release.racket-lang.org/
 
 Please use these installers (or source bundles) -- don't test from
 your own git clone (don't test the `master' branch by mistake!).  To
 get the tests, you can do this:
 
  cd ...racket-root...
  ./bin/raco pkg install -i main-distribution-test
 
 
 * John Clements cleme...@brinckerhoff.org
  - Stepper Tests
  Updates:
  - Stepper Updates: update HISTORY
  (updates should show v6.0.1 as the most current version; email me
  to pick the changes when they're done, or tell me if there are no such
  changes.)

Both done, history updated with note to merge to 6.0.1.

John Clements

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


Re: [racket-dev] Pre-Release Checklist for v6.0.1

2014-04-18 Thread Neil Toronto

On 04/17/2014 04:44 PM, Ryan Culpepper wrote:

* Neil Toronto neil.toro...@gmail.com
   - Plot Tests
   - Images Tests
   - Inspect icons
   - Math tests


I found an infinite loop in Plot's new 3D engine, but I've only been 
able to replicate it using a randomized test case for a feature I 
haven't pushed yet. Even though that feature won't be in the upcoming 
release, there's definitely an error in the 3D engine that I don't want 
users stumbling into.


If the Powers That Be don't mind, I'll concentrate on finding a 
repeatable test case, and check the rest of my list at the second call.


Neil ⊥

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


Re: [racket-dev] Pre-Release Checklist for v6.0.1

2014-04-18 Thread Robby Findler
That sounds like a good plan to me. Let us know what you find out.

Robby

On Fri, Apr 18, 2014 at 3:47 PM, Neil Toronto neil.toro...@gmail.com wrote:
 On 04/17/2014 04:44 PM, Ryan Culpepper wrote:

 * Neil Toronto neil.toro...@gmail.com
- Plot Tests
- Images Tests
- Inspect icons
- Math tests


 I found an infinite loop in Plot's new 3D engine, but I've only been able to
 replicate it using a randomized test case for a feature I haven't pushed
 yet. Even though that feature won't be in the upcoming release, there's
 definitely an error in the 3D engine that I don't want users stumbling into.

 If the Powers That Be don't mind, I'll concentrate on finding a repeatable
 test case, and check the rest of my list at the second call.

 Neil ⊥


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

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