Re: [racket-dev] Announcing Soft Contract Verification tool

2015-01-16 Thread David Van Horn
On 1/15/15 7:42 PM, Benjamin Greenman wrote:
 I tried writing a small program, but got stuck pretty early on. When I
 try verifying the divides? function below, the tool times out. What's
 happening?
 
 (module div racket
   (provide (contract-out [divides? (- positive? positive? boolean?)]))
 
   (define (positive? x)
 (and (integer? x) (= 0 x)))
   
   (define (divides? a b)
 (cond [(= 0 b) #t]
   [( b a) #f]
   [else (divides? a (- b a))]))
 
 )


There was a bug causing this to loop which has been fixed.  The server
verifies this program now.

Please keep the bug reports coming!

David



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


Re: [racket-dev] Announcing Soft Contract Verification tool

2015-01-16 Thread David Van Horn
On 1/15/15 2:42 PM, David Van Horn wrote:
 On 1/15/15, 2:13 PM, Asumu Takikawa wrote:
 On 2015-01-14 19:11:59 -0500, David Van Horn wrote:
 If you have questions, comments, bugs, or any other feedback, let
 us know, or just file bug reports on the GitHub source code.

 Nice tool! I like the web interface too.

 I was confused by this interaction though. Clicking verify on
 this:

 (module fact racket (define (factorial x) (if (zero? x) 1 (* x
 (factorial (sub1 x) (provide (contract-out [factorial (- (=/c
 0) (=/c 0))])))

 gives me:

 Contract violation: 'fact' violates '='. Value 0.105 violates
 predicate real? An example module that breaks it: (module user
 racket (require (submod .. fact)) (factorial 0.105)) 
 (Verification takes 0.05s)

 but the value 0.105 shouldn't violate the predicate real? I think.
 
 This is reporting that the fact module can break the contract on =
 when it uses =/c; that's a bug in our modelling of =/c, which we
 currently have as:
 
 (define (=/c n)
   (lambda (m)
 (= m n)))
 
 But should be:
 
 (define (=/c n)
   (lambda (m)
 (and (real? m)
  (= m n
 
 That said, if you change it to (and/c real? (=/c 0)), it says there's
 a counterexample of 2.0, but that's because we check contracts on
 recursive calls (and should not).


I misspoke on the issue of boundaries, which we had right, but there
was another bug that's now fixed.  We also fixed the =/c implies
real? bug.

So to summarize, Asumu's program now verifies:

  (module fact racket
(define (factorial x)
  (if (zero? x)
  1
  (* x (factorial (sub1 x)

(provide
  (contract-out
[factorial (- (=/c 0) (=/c 0))])))

A slight variant that uses unsafe contracts will generate
counterexamples causing fact to be blamed:

  (module fact racket
(define (factorial x)
  (if (zero? x)
  1
  (* x (factorial (sub1 x)

(provide
 (contract-out
  [factorial (- (λ (x) (= x 0))
 (λ (x) (= x 0)))])))

The counterexample is:

 (module user racket
   (require (submod .. fact))
   (begin (struct s₃ ()) (factorial (s₃

David


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


Re: [racket-dev] Announcing Soft Contract Verification tool

2015-01-15 Thread David Van Horn
On 1/15/15, 11:27 AM, Matthias Felleisen wrote:
 
 Argh, I wanted the other way (negative). I always get the
 directions confused. Sorry.

Right -- using (and/c real? (/c 0)) will also make this verify.

Thanks for trying it out!

David

 
 
 On Jan 15, 2015, at 11:26 AM, David Van Horn dvanh...@cs.umd.edu
 wrote:
 
 On 1/15/15, 11:17 AM, Matthias Felleisen wrote:
 
 
 On Jan 15, 2015, at 11:13 AM, David Van Horn
 dvanh...@cs.umd.edu wrote:
 
 On 1/15/15, 11:04 AM, Matthias Felleisen wrote:
 
 Well that got me all excited. So I tried to get the sample 
 module to pass the verification step -- until I realized
 how restricted the grammar is!
 
 (module f racket (provide (contract-out [f (real? . - . 
 integer?)])) (define (f n) (/ 1 (- 100 n
 
 I would love to be able to use at least (and/c real? (/c
 0)) for the domain so I can get the example done.
 
 Or am I overlooking a way to make this work here?
 
 The /c contract is there, but missing from the grammar
 (we'll fix that).
 
 But (/c 0) will not make this program verify.  You want
 this contract:
 
 ((and/c real? (lambda (x) (not (= x 100 . - . real?)
 
 Using this contract, the program verifies.
 
 
 My contract is stronger than yours. So why will it not go
 through?
 
 
 
 100 is (/c 0) but (f 100) divides by zero.
 
 David
 

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


Re: [racket-dev] Announcing Soft Contract Verification tool

2015-01-15 Thread David Van Horn
On 1/15/15, 11:04 AM, Matthias Felleisen wrote:
 
 Well that got me all excited. So I tried to get the sample module
 to pass the verification step -- until I realized how restricted
 the grammar is!
 
 (module f racket (provide (contract-out [f (real? . - .
 integer?)])) (define (f n) (/ 1 (- 100 n
 
 I would love to be able to use at least (and/c real? (/c 0)) for
 the domain so I can get the example done.
 
 Or am I overlooking a way to make this work here?

The /c contract is there, but missing from the grammar (we'll fix that).

But (/c 0) will not make this program verify.  You want this contract:

((and/c real? (lambda (x) (not (= x 100 . - . real?)

Using this contract, the program verifies.

David

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


Re: [racket-dev] Announcing Soft Contract Verification tool

2015-01-15 Thread David Van Horn
On 1/15/15, 11:17 AM, Matthias Felleisen wrote:
 
 
 On Jan 15, 2015, at 11:13 AM, David Van Horn dvanh...@cs.umd.edu
 wrote:
 
 On 1/15/15, 11:04 AM, Matthias Felleisen wrote:
 
 Well that got me all excited. So I tried to get the sample
 module to pass the verification step -- until I realized how
 restricted the grammar is!
 
 (module f racket (provide (contract-out [f (real? . - . 
 integer?)])) (define (f n) (/ 1 (- 100 n
 
 I would love to be able to use at least (and/c real? (/c 0))
 for the domain so I can get the example done.
 
 Or am I overlooking a way to make this work here?
 
 The /c contract is there, but missing from the grammar (we'll
 fix that).
 
 But (/c 0) will not make this program verify.  You want this
 contract:
 
 ((and/c real? (lambda (x) (not (= x 100 . - . real?)
 
 Using this contract, the program verifies.
 
 
 My contract is stronger than yours. So why will it not go through?
 
 

100 is (/c 0) but (f 100) divides by zero.

David

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


Re: [racket-dev] Announcing Soft Contract Verification tool

2015-01-15 Thread David Van Horn
On 1/15/15, 2:13 PM, Asumu Takikawa wrote:
 On 2015-01-14 19:11:59 -0500, David Van Horn wrote:
 If you have questions, comments, bugs, or any other feedback, let
 us know, or just file bug reports on the GitHub source code.
 
 Nice tool! I like the web interface too.
 
 I was confused by this interaction though. Clicking verify on
 this:
 
 (module fact racket (define (factorial x) (if (zero? x) 1 (* x
 (factorial (sub1 x) (provide (contract-out [factorial (- (=/c
 0) (=/c 0))])))
 
 gives me:
 
 Contract violation: 'fact' violates '='. Value 0.105 violates
 predicate real? An example module that breaks it: (module user
 racket (require (submod .. fact)) (factorial 0.105)) 
 (Verification takes 0.05s)
 
 but the value 0.105 shouldn't violate the predicate real? I think.

This is reporting that the fact module can break the contract on =
when it uses =/c; that's a bug in our modelling of =/c, which we
currently have as:

(define (=/c n)
  (lambda (m)
(= m n)))

But should be:

(define (=/c n)
  (lambda (m)
(and (real? m)
 (= m n

That said, if you change it to (and/c real? (=/c 0)), it says there's
a counterexample of 2.0, but that's because we check contracts on
recursive calls (and should not).

Thanks!

David

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


Re: [racket-dev] Announcing Soft Contract Verification tool

2015-01-15 Thread David Van Horn
On 1/15/15, 2:48 PM, Robby Findler wrote:
 Can you randomly make up programs from your grammar, get example 
 errors from the tool, and then run those programs to see if you
 find bugs in the analysis like that one?

Yes, we're planning to do this.

 That said, I don't see how the bug in =/c is coming in here. Can
 you explain more?

On further inspection, the counterexample is wrong.  (There are
counterexamples due to the model of =/c, but the one that reported is
not an actual one.)  This will be fixed shortly.

David

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


Re: [racket-dev] Pre-Release Checklist for v6.1.1, Second Call

2014-10-23 Thread David Van Horn
On 10/23/14, 12:48 PM, Ryan Culpepper wrote:
 * David Van Horn dvanh...@ccs.neu.edu
   - EoPL Tests

Done.

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


[racket-dev] requested package not available: draw-x86_64-macosx-2

2014-05-03 Thread David Van Horn
I just did a git pull and make and get the following error:

racket/bin/racket -U -G build/config racket/src/link-all.rkt ++dir pkgs
++dir native-pkgs --save main-distribution plt-services racket-lib
Linking packages:
  plt-services
  racket-lib
  main-distribution
Recording packages choice in racket/etc/link-pkgs.rktd
Finding packages
link-all: requested package not available: draw-x86_64-macosx-2
  context...:
   /Users/dvanhorn/git/racket/racket/src/link-all.rkt:155:6: for-loop
   /Users/dvanhorn/git/racket/racket/src/link-all.rkt:153:2: loop
   /Users/dvanhorn/git/racket/racket/src/link-all.rkt: [running body]
make[2]: *** [pkg-links] Error 1
make[1]: *** [plain-in-place] Error 2
make: *** [in-place] Error 2

Any ideas how to fix this?

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


Re: [racket-dev] requested package not available: draw-x86_64-macosx-2

2014-05-03 Thread David Van Horn
On 5/3/14, 3:36 PM, Robby Findler wrote:
 Just a guess but maybe git submodule update?

I always forget that step -- yes, that fixed it.  Thanks!

David


 On Saturday, May 3, 2014, David Van Horn dvanh...@cs.umd.edu wrote:
 
 I just did a git pull and make and get the following error:

 racket/bin/racket -U -G build/config racket/src/link-all.rkt ++dir pkgs
 ++dir native-pkgs --save main-distribution plt-services racket-lib
 Linking packages:
   plt-services
   racket-lib
   main-distribution
 Recording packages choice in racket/etc/link-pkgs.rktd
 Finding packages
 link-all: requested package not available: draw-x86_64-macosx-2
   context...:
/Users/dvanhorn/git/racket/racket/src/link-all.rkt:155:6: for-loop
/Users/dvanhorn/git/racket/racket/src/link-all.rkt:153:2: loop
/Users/dvanhorn/git/racket/racket/src/link-all.rkt: [running body]
 make[2]: *** [pkg-links] Error 1
 make[1]: *** [plain-in-place] Error 2
 make: *** [in-place] Error 2

 Any ideas how to fix this?

 David
 _
   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-17 Thread David Van Horn
On 4/17/14, 6:44 PM, Ryan Culpepper wrote:
 * David Van Horn dvanh...@ccs.neu.edu
   - EoPL Tests

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


Re: [racket-dev] Pre-Release Checklist for v6.0, Second Call

2013-12-30 Thread David Van Horn

On 12/29/13, 1:57 PM, Ryan Culpepper wrote:

* David Van Horn dvanh...@ccs.neu.edu
   - EoPL Tests


Done.


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


[racket-dev] Fwd: Call for satellite events for TFP 2014 in the Netherlands (May 26-28, 2014)

2013-08-23 Thread David Van Horn

In case anyone here is interested in running a TFP colocated event.

David



 Original Message 
Subject: Call for satellite events for TFP 2014 in the Netherlands (May 
26-28, 2014)

Date: Fri, 23 Aug 2013 15:39:37 +0200
From: Jurriaan Hage j.h...@uu.nl

Dear all,

At this time, TFPIE is the only satellite event of TFP (chaired by James 
Caldwell of the University of Wyoming).


However, in case any of you, or anyone you know of, is interested in 
organising an functional programming oriented
event (such as workshops, symposia and project meetings) alongside TFP, 
I am also happy to accommodate this.


An application should (at least) include the name and details of the 
contact person, the title and scope of the event,
the length (like: a day, two, an afternoon), your preference for the 
date (if any), the expected number of participants,

and details on how the event will be financed.

Upon request I can provide some further details on how much things cost, 
but as you can imagine they vary greatly

with the needs of the event.

Closing time for application (directly by e-mail to me) is October 1. 
Notification of acceptance will be before October 8.


best regards,
Jur

The TFP website is still http://www.cs.uu.nl/wiki/bin/view/TFP2014/WebHome
It also includes the above information.

PS. Feel free to communicate this information to anyone you think might 
be interested.





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


Re: [racket-dev] proposal for moving to packages

2013-05-21 Thread David Van Horn

On 5/20/13 4:42 PM, Matthew Flatt wrote:

I used to think that we'd take advantage of the package manager by
gradually pulling parts out of the Racket git repo and making them
packages.

Now, I think we should just shift directly to a small-ish Racket core,
making everything else a package immediately. Core means enough to
run `raco pkg'.

A key point to remember is that package does not mean omitted from
the distribution. Instead, we'll construct a distribution by
combining the core with a selected set of packages. Initially the
selected set of packages will cover everything in the current
distribution.

Jay and I have been lining up the pieces for this change (it's
difficult to make a meaningful proposal without trying a lot of the
work, first), and I provide a sketch of the overall plan below.

This plan has two prominent implications:

  * The current git repo's directory structure will change.


Will this directory structure change have an impact on how modules are 
referenced?


My biggest concern is the Realm of Racket book, which is about to come 
out.  It sounds like this change could potentially cause a lot of 
confusion if it alters the collects organization.


Thanks,
David


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


Re: [racket-dev] Pre-Release Checklist for v5.3.4

2013-04-17 Thread David Van Horn

On 4/17/13 10:36 PM, Ryan Culpepper wrote:

* David Van Horn dvanh...@ccs.neu.edu
   - EoPL Tests


Done.


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


Re: [racket-dev] Purpose of typed/racket/no-check

2013-04-01 Thread David Van Horn

On 4/1/13 11:16 AM, Robby Findler wrote:

You could change the ellipsis to Integer. :)


Or no-check could bind ellipsis to some type.  This would be useful for 
sketching types out in no-check and then refining them to actual types 
in TR.


David



Robby


On Mon, Apr 1, 2013 at 8:23 AM, Eli Barzilay e...@barzilay.org
mailto:e...@barzilay.org wrote:

20 minutes ago, Matthias Felleisen wrote:
 
  On Mar 31, 2013, at 9:32 PM, Sam Tobin-Hochstadt wrote:
 
   My expectation when using typed/racket/no-check is that I won't
   get any type errors.
 
  To me, the words no check mean just that: do not type-check the
  module. But I think it is okay to parse the types. I doubt people
  use this option when they wish to avoid a parse error in the type
  expressions.

As a semi-random data point, I sometime use my no-check language
(which is built on top of TR's) to show how things work in class
without getting all the types right (or when there's some problem with
the types).  In these cases I sometime use bogus type declarations
like (All (A B) ...), which IIUC wouldn't work anymore.  It's just
technically simpler and clearer to still use `:' instead of going back
to comments.  (But it's obviously a weak point.)

--
   ((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




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



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


[racket-dev] gracket on retina

2013-02-27 Thread David Van Horn
Having recently upgraded to a retina display mac, I see the problem 
pointed out in this PR:


   http://bugs.racket-lang.org/query/?cmd=viewpr=12909

Is there some way for me to help?  If pointed in the right direction, I 
can try to patch things.  Short of that, I can be a guinea pig.


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


[racket-dev] Pull request for make-base-eval

2013-02-22 Thread David Van Horn
This is a pull request to make racket/scribble make-base-eval more like 
racket/sandbox make-evaluator, which was useful to me, but I wasn't sure 
if the current design avoided this for some reason.


This should be a backwards compatible change, but I have not tested it.

   https://github.com/plt/racket/pull/256

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


Re: [racket-dev] Pull request for make-base-eval

2013-02-22 Thread David Van Horn

On 2/22/13 7:05 PM, David Van Horn wrote:

This is a pull request to make racket/scribble make-base-eval more like
racket/sandbox make-evaluator, which was useful to me, but I wasn't sure
if the current design avoided this for some reason.

This should be a backwards compatible change, but I have not tested it.

https://github.com/plt/racket/pull/256


Actually this only seems to work when run from within DrRacket.  The 
following example works fine from DrRacket, but gives an error from the 
command line using raco scribble:


namespace-attach-module: a different module with the same name is 
already in the destination namespace


#lang scribble/manual
@(require scribble/eval)
@(define the-eval
  (make-base-eval #:lang 'racket))

@examples[#:eval the-eval (add1 7)]

It's not at all clear to me how to resolve the problem.

David

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


[racket-dev] Scribble: feature request - module paths for image

2013-02-15 Thread David Van Horn
I have a scribble document that is built from two distinct locations, 
which makes using the Scribble image form nearly impossible since it 
takes a path relative to the build location.  (My work around is 
symbolic links in the file system.)


What would solve my problem is the ability to pass a module-path prefix, 
e.g. (image 'foo/bar/baz some-image.png).


Does this seem like a sensible thing to add?

(BTW, the collects option doesn't help me because I need to reference 
module locations that are not in the main collection.)


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


Re: [racket-dev] Scribble: feature request - module paths for image

2013-02-15 Thread David Van Horn

On 2/15/13 10:47 AM, Jay McCarthy wrote:

Does define-runtime-path work?


Yes, for some value of yes.

This works (specific to my context, but easy to generalize):

#lang scribble/base
@(require racket/runtime-path)
@(require (for-syntax racket/base))

@(define-runtime-module-path-index id 'book)
@(define (fig name)
  (path-string
   (resolved-module-path-name
(module-path-index-resolve
 (module-path-index-join (format figures/~a name) id)

@image[#:suffixes '(.png .pdf)]{@fig{quick-lists1}}


So for now my problem is solved, but

a) am I making this more complicated than needed?
b) if not, should it really be this complicated?

Thanks,
David


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


Re: [racket-dev] Scribble: feature request - module paths for image

2013-02-15 Thread David Van Horn

On 2/15/13 3:34 PM, Matthew Flatt wrote:

#lang scribble/base

  @(define (fig name)
 (collection-file-path name book figures))

  @image[#:suffixes '(.png .pdf) (fig quick-lists1)]


Excellent!  Thank you, this works (I figured I was making things worse 
than they had to be, but man is it intimidating when you start reading 
about paths in the docs).


David

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


Re: [racket-dev] How to avoid to modify .gitignore when pull request

2012-12-13 Thread David Van Horn

On 12/13/12 9:22 AM, Chen Xiao wrote:

I fork the codebase on my local computer. Then I .configure  make 
make install, as a result, there are many compiled things like bin or
*.o files.

To avoid add them to my commit, I modify .gitignore to ignore them all.

But I can't avoid add .gitignore at all, isn't it?

So how do you solve this problem?


I suggest building in a build/ directory as described in src/README. 
There's already a .gitignore directive to ignore that directory.


David

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


[racket-dev] Quick feedback on first planet2 experience

2012-12-03 Thread David Van Horn

- It's not clear what the red asterisk means here:
  https://plt-etc.byu.edu:9004/search
  (Sam tells me it means recently updated.)

- There's a typo (User-spcific) in the output of raco pkg show.

- The details link on the package upload page is broken:

http://pre.racket-lang.org/docs/html/planet2/Planet_2_Concepts.html#(tech._package._source)

- Searching for planet2 should also return a link to the top of
  Package Management in Racket.

- Does the documentation contain a link to:
  https://plt-etc.byu.edu:9004/search
  (I missed it if it does.)

- dependencies on thar packages in Package Metadata docs.

- This categories will in Future Plans docs.

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


Re: [racket-dev] The `var` pattern in `match`

2012-11-29 Thread David Van Horn

On 11/29/12 7:31 AM, Carl Eastlund wrote:

Having something like the var pattern can be useful for macros that
expand into uses of match, if the macro doesn't want to expose that a
bound variable will be a match pattern and therefore must not be _ or
  Granted, there are ways around this, but personally I think it
would be nice if match supported this pattern.  I would, however,
entirely support renaming this pattern to something more obscure, like
match:pattern-variable or something, so that unintentional uses stop
being a problem.


I think the real solution is to have (whatever name you give) `var' be 
something that is matched as an identifier and not a literal so that 
programmers can rename the pattern.  But I know from talking with Sam 
this would be a big change for match.


In the meantime, something more obscure than `var' would go a long way 
toward me not cursing Sam's good name every time I write an AST.


David

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


Re: [racket-dev] The `var` pattern in `match`

2012-11-29 Thread David Van Horn

On 11/29/12 1:45 PM, Sam Tobin-Hochstadt wrote:

On Thu, Nov 29, 2012 at 10:40 AM, David Van Horn dvanh...@ccs.neu.edu wrote:

On 11/29/12 7:31 AM, Carl Eastlund wrote:


Having something like the var pattern can be useful for macros that
expand into uses of match, if the macro doesn't want to expose that a
bound variable will be a match pattern and therefore must not be _ or
  Granted, there are ways around this, but personally I think it
would be nice if match supported this pattern.  I would, however,
entirely support renaming this pattern to something more obscure, like
match:pattern-variable or something, so that unintentional uses stop
being a problem.



I think the real solution is to have (whatever name you give) `var' be
something that is matched as an identifier and not a literal so that
programmers can rename the pattern.  But I know from talking with Sam this
would be a big change for match.


Making `var` specifically be matched by binding would be possible --
it would be less of a change than removing it entirely.


I would still like the default to be something other than `var'.

(BTW, it looks like `var' is not an indexed term in the docs for match.)

David

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


Re: [racket-dev] The `var` pattern in `match`

2012-11-28 Thread David Van Horn

On 11/28/12 7:53 PM, Sam Tobin-Hochstadt wrote:

Currently, `match` provides a pattern named `var`, which makes `(var
id)` equivalent to `id`, but without special cases for things like `_`
and `...`.

However, this frequently conflicts with structures that people define,
and is rarely used other than accidentally.  I'd therefore like to
remove it entirely.


+ (expt 2 (expt 2 (expt 2 (expt 2 2

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


Re: [racket-dev] check-match?

2012-11-19 Thread David Van Horn
I written things like this before, so something built-in would be useful 
to me too.


David


On 11/19/12 5:01 PM, Matthias Felleisen wrote:


That is cute. Why don't you just create a pull request and Ryan can integrate 
it into rackunit? -- Matthias





On Nov 19, 2012, at 4:22 PM, Joe Gibbs Politz wrote:


A small suggestion:

I used roughly this macro (credit Jonah Kagan) recently to help me write some 
tests for parsing code that agnostic to which source position is generated in 
the parse:

(define-syntax test/match
   (syntax-rules ()
 [(test/match actual expected pred)
  (let ([actual-val actual])
(with-check-info* (list (make-check-actual actual-val)
(make-check-expected 'expected))
  (thunk (check-true (match actual-val
 [expected pred]
 [_ false])]

 [(test/match actual expected)
  (test/match actual expected true)]))

Shriram remarked that he was surprised some sort of check-match wasn't in 
rackunit already.  Is it worth adding something like this?

I'm doing things like:

(test/match (parse 5 'foo') (s-block _ (list (s-num _ 5) (s-str _ foo

Where the structs s-block, s-num, and s-str all expect a srcloc as their first 
argument, but I don't care about it for these tests.

The actual use is at:

https://github.com/brownplt/pyret-lang/blob/master/src/tests/parse-tests.rkt#L36

That file would be much, much uglier without this macro.

Cheers,
Joe P.

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




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



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


Re: [racket-dev] check-match?

2012-11-19 Thread David Van Horn

On 11/19/12 8:20 PM, Joe Gibbs Politz wrote:

  Yeah, that is very nice! (It should begin with check not test
tho, right?)

Indeed; Jonah was writing w.r.t plai, which uses test.  Should use
check- in rackunit.

I noticed that this also violates, from the rackunit docs:

Although checks are implemented as macros, which is necessary to grab
source location, they are conceptually functions. This means, for
instance, checks always evaluate their arguments.

I suppose this should go in a separate section of additional checks or
some such?


Maybe the right thing to do is make it lightweight to write predicates 
with match so that you don't even need a separate testing form?


Something like (? P) = (lambda (x) (match x [P true] [_ false]))

David


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


Re: [racket-dev] Pre-Release Checklist for v5.3.1

2012-10-17 Thread David Van Horn

On 10/16/12 12:58 AM, Ryan Culpepper wrote:

* David Van Horn dvanh...@ccs.neu.edu
   - EoPL Tests


Done.


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


Re: [racket-dev] Racket Questions?

2012-09-15 Thread David Van Horn

On 9/14/12 3:36 PM, Becca MacKenzie wrote:

Hello!
So a friend of mine just started learning Racket and was wondering if
there's a particular reason why the modulo function in racket only takes
in integers? He wrote his own mod function to take in other things but
he was just wondering what the reasoning is behind this.


Hi Becca,

Excellent question -- I hope you don't mind that I've forwarded it to 
the Racket developers list for a more authoritative answer (and 
potentially a change to Racket).


I don't believe there's any principled reason not to extend `modulo' to 
other kinds of numbers such as rationals and (exact) complex numbers.  I 
worry that the idea of modulo may not be well defined for inexact 
numbers, but I could be wrong (inexact numbers don't obey a lot of the 
usual mathematical properties we're used to).  I see that in 
Mathematica, the arguments of Mod can be any numeric quantities, not 
necessarily integers.  Here are some examples:


   http://reference.wolfram.com/mathematica/ref/Mod.html#6881

Recently, Racket's GCD and LCM were extended to work on non-integer 
arguments, and I believe this is a similar case where the function could 
(and should?) be extended to work for more kinds of numbers.  But I'm 
interested to hear what the dev list has to say on the matter.


David

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


[racket-dev] Empty 5.3 release announcements on web

2012-08-07 Thread David Van Horn

http://download.racket-lang.org/v5.3.html

This page shows Release Announcements for Version 5.3 but no notes.

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


Re: [racket-dev] Pre-Release Checklist for v5.3

2012-07-24 Thread David Van Horn

On 7/24/12 11:03 AM, Ryan Culpepper wrote:

* David Van Horn dvanh...@ccs.neu.edu
   - EoPL Tests


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


[racket-dev] arity error with latest from git

2012-07-17 Thread David Van Horn

Hi,

I'm getting an arity mismatch error whenever I run a saved file in DrRacket.

Welcome to DrRacket, version 5.3.0.15--2012-07-17(3b5eb1da/d) [3m].
Language: racket [custom]; memory limit: 1024 MB.
. . ../../racket/collects/drracket/private/module-language.rkt:373:8: 
standard-module-name-resolver: arity mismatch;

 the expected number of arguments does not match the given number
  given: 1
  arguments...:

#resolved-module-path:/Users/dvanhorn/Documents/git/monadic-eval/tests/try.rkt

The error points to line 376 of 
collects/drracket/private/module-language.rkt, which applies 
(current-module-name-resolver) to one argument.  According to the docs, 
and procedure-arity, that's not an acceptable number of arguments.


As of this morning I had a 3 day old build that worked fine, but I don't 
see anything (from a quick glance) that could have caused this. 
Moreover, that seemingly bogus one-argument call to 
(current-module-name-resolver) has been there for a long time so I don't 
understand why this is happening now.


Any ideas?  As it is, I can't do much of anything in DrRacket.

David

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


Re: [racket-dev] arity error with latest from git

2012-07-17 Thread David Van Horn

On 7/17/12 5:33 PM, Matthew Flatt wrote:

I've pushed a correction related to a change today in the module name
resolver (missed a direct call in DrRacket).


Thanks for the quick fix!

I notice a small typo in the docs:

   A module name resolver takes one and four arguments:

Should be two and four.

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


[racket-dev] redex.racket-lang.org Index of /

2012-07-08 Thread David Van Horn

redex.racket-lang.org seems to have reverted to serving the index of /.

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


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 datum-order provides and what sort expects; the
my-less-than function in the example adapts the output of
datum-order so it can be used with sort.


Thanks for pointing it out (I didn't know about it).  When I
looked into this, I saw that in addition to `data/order' there is
also an issue with `data/heap'.  It certainly does look like a
problem worth addressing.

The thing is that are two common ways to specify comparison functions:
(a) three-valued comparison functions returning -1/0/+1, (b) a boolan
strictly-smaller-than predicate.  The first is common in several
mainsteam languages and the second is traditionally common in
lisps (which leads to its use in the sort function).

The issues are described very thoroughly in srfi-67 -- specifically,
see the first two subsections in section 6.  I highly recommend
reading that for this discussion.  They decide to go with option (a),
with an explanation for the choice of a three-valued function and for
their choice of -1/0/+1 values.


I don't remember if I discovered srfi-67 before or after I added
data/order.  In any case, I disagree with its rationale for -1/0/+1:
I dislike the idea of performing arithmetic on orderings.


(See below.)



OTOH, data/order is used primarily by the ordered dictionary types
(data/splay-tree, data/skip-list), so it's probably missing operations
and conveniences for tasks like sorting a list.


(I take it that they will be added, then...)



2. The `data/order' interface has several problems that I think is
 best to resolve.

 - Regadless of the above, it seems like a good idea to extend
   the interface with a simple boolean predicate.  Maybe
   something like `datum?' and possibly others.  This would
   address the issue that Danny raised above.


   From an order you can get the less-than and equality predicates:

(order-? datum-order)
(order-=? datum-order)


Yes, of course this is easy.  I can also do that `case' in a tiny λ.
But it should be part of the library.


On Saturday, Matthias Felleisen wrote:


This response leaves us with the impression that we whimsically
challenged established conventions in the general and the
Lisp-specific PL family. In addition it leaves us with
inconsistencies across our libraries, which I am coming to consider
more and more as a serious problem.


Yes, that was exactly why I raised it.  Since it's core-ish
functionality, having it behave well wrt expectations is IMO extremely
important.  Right now we have a sad state of two different
incompatibilities there, and I don't see any good explanation except
for the I disagree/dislike (in contrast to the srfi).  Because of
such expectations and because of existing code, I'd follow that
without thinking about what might the right choice be.

(Personally, I now think that the more lenient approach of any
numbers, negative, 0, or positive is even better -- and I can also
explain and justify why I think that, but that's irrelevant.)



Now -- I would be the last one to defend established tradition
over getting things right but at a minimum, the reasoning of why
we challenge tradition should be noted.


+7


There's an advocate of my position in the SRFI discussion archives. See
the following messages by Panu Kalliokoski:

http://srfi.schemers.org/srfi-67/mail-archive/msg00021.html
http://srfi.schemers.org/srfi-67/mail-archive/msg00023.html
http://srfi.schemers.org/srfi-67/mail-archive/msg00025.html

Of course, the SRFI still went the other way. I would be happy to add
functions to convert between the two conventions.


I think {-1,0,1} is the worst of all worlds.  I prefer the more lenient 
approach of allowing any number[*].  This follows the Lisp tradition of 
returning more than just the truth, since a comparison can also convey 
the difference between the arguments; in other words `-' is a comparison 
function, which is the trick I use to remember how to interpret the 
result of compare functions in Java, for example.


If we really want to break tradition by restricting to just the truth 
(a three-valued function), meaningful symbols is my preference over 
{-1,0,1}.


[*] Well, reals minus infinities and nans.

David

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


Re: [racket-dev] Pre-Release Checklist for v5.3

2012-04-18 Thread David Van Horn

On 4/18/12 11:00 AM, Ryan Culpepper wrote:

- EoPL Tests


Done.

David

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


Re: [racket-dev] provide specs in eopl in repository use (all-defined-out) instead of (all-defined)

2012-04-05 Thread David Van Horn

On 4/2/12 8:42 PM, Nadeem Abdul Hamid wrote:

OK, thanks. Just wanted to make sure something wasn't broken. It's
only a minor inconvenience - my students are using the version from
the download page, while I usually use one built from source, but I've
just been using the regular 5.2.1 version to run their programs. In
any event, perhaps the documentation needs to be updated: the entry:
   
http://pre.racket-lang.org/docs/html/eopl/index.html#(form._((lib._eopl/eopl..rkt)._provide))
points to the mzscheme version of provide.


(Sorry I missed this thread.)  Thanks for the report.  I filed a bug 
report and will fix soon.


David




On Mon, Apr 2, 2012 at 8:22 PM, Robby Findler
ro...@eecs.northwestern.edu  wrote:

Because it was changed to be based on #lang racket instead of the
(old) #lang mzscheme not too long ago. I think there was a post here
(or on the users's list) about this, but I'm not sure that this
particular point was mentioned there, so I can see how you'd be
surprised.

Is this causing you trouble with classes or similar? Would a #lang
eopl/mzscheme or something like that be useful for backwards
compatibility? (You'd still need to use that #lang line, tho, since
the regular eopl language is now changed for good.)

Robby

On Mon, Apr 2, 2012 at 7:09 PM, Nadeem Abdul Hamidnad...@acm.org  wrote:

How come when building Racket from the latest source of the repository
(at least as of 3 days ago), #lang eopl doesn't recognize
(all-defined) as a valid provide spec and wants (all-defined-out)
instead?
--- nadeem
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


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


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


[racket-dev] EOPL tests

2012-02-21 Thread David Van Horn
Is there a test suite for EOPL?  I didn't find anything in collects/eopl 
or collects/tests, but eopl.rkt mentions the test harness.


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


Re: [racket-dev] Google Summer of Code

2012-02-15 Thread David Van Horn

On 2/15/12 8:27 AM, Matthias Felleisen wrote:


On Feb 14, 2012, at 10:26 PM, Asumu Takikawa wrote:


On 2012-02-14 09:58:12 -0800, John Clements wrote:

I sent an e-mail to Asumu about a week ago that sneakily tried to get him to 
take responsibility, and it sounds like he might be on it. If not, I'll take 
the lead. Asumu?


I'm still up for it. The application process starts on the 27th but we
should do some preparation for it.

First of all though, are people interested in this? If we're accepted,
any students we get are paired up with mentors, so we'll need some
people to volunteer for that. Probably not too many though.


Call for names on dev and user.


I'm happy to volunteer.


The mentor's responsibility is to get their student up to speed with the
codebase/language  community, check up on progress (once or more a
week), and formally evaluate the student.

Other things we'd need:
  * an ideas list (the github page should do, with some modifications)
  * organization admin (I could do this, or anyone else more
appropriate) and backup admin.
  * people willing to review student applications



Call for ideas. Set up public code review system as for Chrome.


I'd like to have Android programs that speak the 2htdp/universe protocol 
and support World-style programming.  I have a quick mock-up of both; I 
can play simple games where one player is running a BSL client on a 
laptop and the other player is running a Java client on their phone.  I 
can make this more concrete if you'd.  Google has supported me in the 
past by supplying phones.  This seems like a good fit.


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


Re: [racket-dev] very unhelpful beginner language error message, possible fix proposed

2012-02-13 Thread David Van Horn

On 2/13/12 8:11 AM, Stephen Bloch wrote:


On Feb 13, 2012, at 5:05 AM, Marijn wrote:


... it highlighted the id list-sum-odd in what should have
been the 'else' case, and wrote:

list-sum-odd: expected a function call, but there is no open
parenthesis before this function

... which is really terrible, because there *IS* a parenthesis
right before the function name.


How about changing the message such that it complains about a shortage
of parentheses without stating that there are none?

- - expected a function call, but there is an open parenthesis missing
before this function name


Doesn't help much: as any student can see, there IS an open parenthesis before 
this function name.


Or maybe formulate it in a positive way to encourage the user to
insert parentheses?

- - expected a function call, but found a function name; to call it add
surrounding parentheses


It's GOT surrounding parentheses.



The mistake the student made was at the cond level, not at the level of this function call, so 
the right error message has to say something about cond, like

-- cond: each clause must be a question/answer pair enclosed in brackets.  You have two expressions 
that look like the question and the answer, but you need another pair of 
brackets around the two of them.

It should be possible for the cond macro to detect this situation, at least 
in BSL, because the first element of what should be a cond-clause is a function name, and 
that's not a complete expression.  In ISLL, a function name can appear as an expression 
in its own right, but it still doesn't make sense as the first element of a cond-clause 
because a function name isn't a boolean: if it's defined, then it's non-null and 
therefore true, and if it's not, the student shouldn't be mentioning it at all.  Not 
until ASL does it become possible (albeit unlikely) that a function name could make sense 
as a condition.


In BSL, you can detect when the first element of a clause is a variable 
bound to a function, but I don't follow the reasoning about ISL.  You 
can't distinguish good from bad uses without running the code because 
you can't tell if a name refers to a function or a non-function.


ISL actually gives the best error message in my opinion:

cond: question result is not true or false: (lambda (a1) ...)

But it only does this at run time (as it must).  The syntax error for 
BSL could be similar though:


cond: question is not an expression but a function name: list-sum-odd

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


Re: [racket-dev] very unhelpful beginner language error message, possible fix proposed

2012-02-13 Thread David Van Horn

On 2/13/12 4:20 PM, Stephen Bloch wrote:


On Feb 13, 2012, at 8:28 AM, David Van Horn wrote:


In BSL, you can detect when the first element of a clause is a variable bound 
to a function, but I don't follow the reasoning about ISL.  You can't 
distinguish good from bad uses without running the code because you can't tell 
if a name refers to a function or a non-function.


Not reliably, because the student COULD be using a parameter or a local 
variable in that position.  But in the COMMON case of this error, the student 
will use a predefined function or an explicitly user-defined top-level 
function, and it should be possible to recognize those at syntax-check-time.


But even if the name is a parameter, it cannot be bound to a function. 
If it's a local, it either is or isn't a function -- you can tell from 
the definition.


I think it's correct to consider this a syntax error, not a run-time 
error.  It should just have a better message.



Which leaves


cond: question result is not true or false: (lambda (a1) ...)


as a good error message to report at run time in the rare cases that don't 
match the above description.


Except you don't want to say lambda in BSL.

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


Re: [racket-dev] very unhelpful beginner language error message, possible fix proposed

2012-02-13 Thread David Van Horn

On 2/13/12 7:32 PM, Stephen Bloch wrote:

In ISL, there's an additional case: a local variable might or might not be 
bound to a function.  That's a little more hassle to check, but it should be 
doable at compile-time.  Again, if the first element of a cond-clause is an 
identifier bound to a function, trigger our clever error message at 
compile-time.


Once you go to ISL you cannot tell whether a name refers to a function 
or a non-function without running code.


ISL is higher-order; it just doesn't have lambda or the ability to 
compute functions in operator position.  Even that's a lie if you're 
willing to squint a little.


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


Re: [racket-dev] feature request: gcd, lcm for rationals

2011-12-14 Thread David Van Horn

On 12/14/11 5:11 AM, Marijn wrote:

(gcd-rational 2/3 2/3 2/3)

2/3

(lcm-rational 2/3 2/3 2/3)

4/9

is that 4/9 the intended result?


No, I must've messed up the definition.  Fortunately, Matthew did the 
right thing when he implemented lcm:


Welcome to Racket v5.2.0.6.
 (lcm 2/3 2/3 2/3)
2/3

David

_
 For list-related administrative tasks:
 http://lists.racket-lang.org/listinfo/dev


Re: [racket-dev] feature request: gcd, lcm for rationals

2011-12-10 Thread David Van Horn

On 12/10/11 9:25 AM, David Van Horn wrote:

On 12/9/11 3:31 PM, Daniel King wrote:

On Fri, Dec 9, 2011 at 15:27, Carl Eastlundc...@ccs.neu.edu wrote:

What does divides even mean in Q? I think we need David to explain
what his extension of GCD and LCM means here, in that divisors and
multiples are fairly trivial things in Q.


I took x divides y to mean x/y is an integer.


I meant: y/x is an integer.

David

_
 For list-related administrative tasks:
 http://lists.racket-lang.org/listinfo/dev


[racket-dev] Universe and Redex

2011-04-23 Thread David Van Horn
Sam and I have been teaching a first year course on programming and our 
final project is a distributed, multi-player game similar to this one:


   http://www.gamedesign.jp/flash/dice/dice.html

Students had to write clients, servers, and AI players, and during our 
final exam period, we're going to hold a tournament between all the AI 
players -- hosted on a server that Sam and I wrote.


One idea that we had, which turned out to be a good one, was to define 
the language of client to server messages as a Redex language and then 
use Redex's random term generation to stress test our server.  We 
constructed simple clients that did a rapid-fire send of random 
messages.  We tested on well-formed messages, messages that were close 
to being well-formed, and messages that were just arbitrary junk (all 
expressed in a couple lines using define-language).  We found several 
bugs in our server and running our students' clients against the server 
has not uncovered any further bugs beyond what Redex found.


David
_
 For list-related administrative tasks:
 http://lists.racket-lang.org/listinfo/dev


[racket-dev] Building docs in v5.0.99.900

2011-02-07 Thread David Van Horn
I'm seeing this error when installing a .plt file using the current 
release candidate:


...
raco setup: --- creating launchers ---
raco setup: --- building documentation ---
link: reference (phase 0) to a variable in module /Applications/Racket 
v5.0.99.900/collects/scribble/private/manual-proc.rkt that is 
uninitialized (phase level 0); reference appears in module: 
/Applications/Racket 
v5.0.99.900/collects/scribble/private/manual-unit.rkt in: *defthing


 === context ===
/Applications/Racket 
v5.0.99.900/collects/scribble/private/manual-unit.rkt: [running body]
/Applications/Racket v5.0.99.900/collects/scribble/manual.rkt: 
[traversing imports]
/Applications/Racket v5.0.99.900/collects/setup/scribble.rkt: 
[traversing imports]
/Applications/Racket v5.0.99.900/collects/setup/setup-unit.rkt:810:2: 
make-docs-step


David
_
 For list-related administrative tasks:
 http://lists.racket-lang.org/listinfo/dev


[racket-dev] secref problems

2011-01-27 Thread David Van Horn
Am I doing something wrong, or is this a bug?  The references with 
numbers or hyphens don't resolve, while the others do.


#lang scribble/manual
@secref[#:doc '(lib teachpack/teachpack.scrbl) simulations]
@secref[#:doc '(lib teachpack/teachpack.scrbl) interactive]
@secref[#:doc '(lib teachpack/teachpack.scrbl) world-example]
@secref[#:doc '(lib teachpack/teachpack.scrbl) world2]
@secref[#:doc '(lib teachpack/teachpack.scrbl) universe-server]

Welcome to DrRacket, version 5.0.99.6--2011-01-07(-/f) [3m].
Language: scribble/manual; memory limit: 1024 MB.

David
_
 For list-related administrative tasks:
 http://lists.racket-lang.org/listinfo/dev


Re: [racket-dev] Something wrong with check-within

2010-11-11 Thread David Van Horn

On 11/11/10 7:34 PM, Nadeem Abdul Hamid wrote:

The check-within in the follow program (in BSL/ISL) seems to hang.


I see DrRacket (5.0.1, 5.0.99) loop on this:

(check-within (make-posn (list 0)
 (list 0))
  (make-posn (list 0)
 (list 0))
  0.001)

David
_
 For list-related administrative tasks:
 http://lists.racket-lang.org/listinfo/dev


[racket-dev] set operations

2010-11-10 Thread David Van Horn
The set library is missing a convenient way of selecting an element from 
a set, making it hard to write recursive functions matching the 
inductive structure of a set.


Could you add this function, or something like it?

(define (set-choose s)
  (let ((x (for/first ([x (in-set s)])
 x)))
(values x (set-remove s x

David
_
 For list-related administrative tasks:
 http://lists.racket-lang.org/listinfo/dev


[racket-dev] BSL, test: bad syntax

2010-10-20 Thread David Van Horn

Are others aware of this?

   Welcome to DrRacket, version 5.0.2.1--2010-08-25(-/f) [3m].
   Language: Beginning Student; memory limit: 512 MB.
5
   5
   test: bad syntax

David
_
 For list-related administrative tasks:
 http://lists.racket-lang.org/listinfo/dev


Re: [racket-dev] BSL, test: bad syntax

2010-10-20 Thread David Van Horn

On 10/20/10 10:53 AM, David Van Horn wrote:

Are others aware of this?

Welcome to DrRacket, version 5.0.2.1--2010-08-25(-/f) [3m].
Language: Beginning Student; memory limit: 512 MB.
  5
5
test: bad syntax


Er, I just rebuilt from git, so something is wrong on my end given the 
2010-08-25 date; maybe this is just my issue.


David
_
 For list-related administrative tasks:
 http://lists.racket-lang.org/listinfo/dev


[racket-dev] --enable-macprefix gone?

2010-10-19 Thread David Van Horn
Has the --enable-macprefix option been removed from the configure 
script?  When I configure, I get:


   configure: WARNING: unrecognized options: --enable-macprefix

If so, the src/README file should be updated to reflect the change.

David
_
 For list-related administrative tasks:
 http://lists.racket-lang.org/listinfo/dev


Re: [racket-dev] --enable-macprefix gone?

2010-10-19 Thread David Van Horn

On 10/19/10 10:03 PM, Eli Barzilay wrote:

9 hours ago, David Van Horn wrote:

Has the --enable-macprefix option been removed from the configure
script?  When I configure, I get:

 configure: WARNING: unrecognized options: --enable-macprefix

If so, the src/README file should be updated to reflect the change.


You should have this code in the configure script:


Yep -- the code's there, and if I omit the option the script gives an 
error saying it's needed in order to use --prefix.  So why do I see an 
unrecognized option warning when I provide --enable-macprefix?


David


_
 For list-related administrative tasks:
 http://lists.racket-lang.org/listinfo/dev


Re: [racket-dev] =?

2010-10-06 Thread David Van Horn

On 10/6/10 2:24 PM, Shriram Krishnamurthi wrote:

It would be the same as =, ie, numeric equality.  It's not meant to be
some sort of generalized equality checker.  It's just that we teach
our students that predicates end in ?, and that's true of symbol=?,
string=?, but not =.


So shouldn't it be `number=?'?  I hear students say this in class every 
year.  `=?' seems just as much an anomaly as `='.


David
_
 For list-related administrative tasks:
 http://lists.racket-lang.org/listinfo/dev


Re: [racket-dev] for/first and multiple values

2010-08-29 Thread David Van Horn

On 8/29/10 8:33 PM, Carl Eastlund wrote:

On Sun, Aug 29, 2010 at 8:32 PM, David Van Horndvanh...@ccs.neu.edu  wrote:

On 8/29/10 8:27 PM, Carl Eastlund wrote:


What do you propose for/first should return if the set s is empty?


#f?


Which will do what in a 2-valued context?


Blow up I suppose.  I don't care; I'm not going to use for/first with an 
empty set.


David
_
 For list-related administrative tasks:
 http://lists.racket-lang.org/listinfo/dev


Re: [racket-dev] Release Announcement for v5.0.1

2010-07-27 Thread David Van Horn

On 7/27/10 11:17 PM, Eli Barzilay wrote:

The release announcement sketch that I have so far is below.  Please
send edits or (changes in order) if you see anything.



* Changes (as part of 5.0) in the `racket' language compared to the
   `scheme' language include constructor-style printing, a `struct'
   alternative to `define-struct' that fits more naturally with
   `match' and constructor-style printing, bytecode-dependency
   management via SHA-1 hashes instead of just timestamps, and a
   reorganization of `scheme/foriegn' into `ffi/unsafe' and
   associated libraries.


foriegn


* The core type system of Typed Racket has been substantially
   revised.  In particular, Typed Racket can now follow significantly
   more sophisticated reasoning about the relationships between
   predicates.  Additionally, Typed Racket now allows variable arity
   types in more places, allowing programmers to specify
   variable-arity lists.


substantially, significantly, sophisticated

Weasel words.
http://matt.might.net/articles/shell-scripts-for-passive-voice-weasel-words-duplicates/



* Typed Racket now provides a type-based optimizer that is activated
   when the code starts with `#:optimize'.  It can improve the
   performance of many operations such as list, vector and struct
   accesses and is especially useful for floating-point intensive
   programs (which can get faster by a factor of 3).  This is feature
   is still being developed, and it will become the default behavior
   in the near future.


This is feature is...


* The `generator' from `racket/generator' is requires to have this
   form: (generator () body ...), due to a planned extension where a
   generator will accept arguments.


is requires

_
 For list-related administrative tasks:
 http://lists.racket-lang.org/listinfo/dev