[racket-dev] Call for help testing course binaries written in Racket

2012-08-30 Thread Joe Gibbs Politz
Hello Racketeers!  Shriram and I are running a course this fall with a
significant online component
(http://www.cs.brown.edu/courses/cs173/2012/OnLine/).  We'll start
distributing course software to well over a thousand students next
Friday.

We're (of course) writing the course software in Racket.  We're also
distributing some binaries that students will be using during their
assignments.  I want to see how well we've done at using Racket's
build tools to set these up.  If you could help us by running them on
whatever you've got in front of you, we'd be very grateful.  We have a
particular dearth of Windows machines in our group, so if you have a
choice, pick that to test on first.  Estimated time to test: 5-10
minutes.

1. Download a binary bundle from
http://cs.brown.edu/~joe/private/cs173/bin/archive/ that matches your
architecture.

2. Download the set of tests, incomplete-suite.zip, from:
http://cs.brown.edu/~joe/private/cs173/test/

3. Unzip both the binary and the tests.

4. Locate the executable in the unpacked binary bundle.  It will be one of:

  - win32-dist/assignment1-win32.exe
  - osx-dist/bin/assignment1-osx
  - debian-dist/bin/assignment1-i386

5. Run this executable, with the --report command, on the test
directory you just unpacked.  You should see it print out some JSON.
It will not exactly match what I have here, but it should be
recognizably JSON:

$ ./debian-dist/bin/assignment1-i386 --report incomplete-suite

{results: {\for-fail-false-not-init\: false,
\pre-and-post-op-mixed\: true, \methods-self-is-zero\: false,
\while-evals-true\: false, \def-not-recursive\: false,
\reverse-args-fun-app\: true, \no-var-reassignment\: true,
\if-else-switched\: false, \eq-not-equals\: false,
\no-arity-mismatch\: true, \discard-seq-effects\: true,
\more-falsiness\: false, \recursive-let\: false,
\discard-if-test-store\: false}, ns:
39b5b31d3f53793fc0cd95e48fcadc3ae54993ab072a64744685}

If you see any errors here, please respond to me with a paste of the
output and a description of the machine you're running on.  If the
output looks similar to the above, you can stop here, and please reply
to tell me that it worked, and give me a brief description of the
machine you're running on.  If you're having fun, continue:

6.  Run the same command, but redirect the output to a file:

$ ./debian-dist/bin/assignment1-i386 --report incomplete-suite  report.txt

7.  Upload report.txt and incomplete-suite.zip as your grade report
and your test suite here: http://jotform.us/form/22408395633153.
Pick anything for your Course Pin.

Let me know if anything at all doesn't seem to be working or seems
strange.  THANK YOU!

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


Re: [racket-dev] Call for help testing course binaries written in Racket

2012-09-08 Thread Joe Gibbs Politz
A big THANK YOU to everyone who helped out testing here.  Sorry for
the long delay in responding; I've had my head down while doing the
preparations for the course.  Testing discovered three things:

1.  The binaries worked on just about everyone's machine;
2.  There are some hard to reproduce, intermittent output redirection
issues on Windows;
3.  The debian binary doesn't work on BSD.

One of our online students came up with a solution for the second
problem problem, which he made a batch script for to solve the problem
for the whole class (go community!).  We're not supporting BSD, since
there just aren't enough of us here with a machine to test quickly,
but no one in the class has complained yet.

For those interested, the assignment went out yesterday (feel free to
give it a shot!):

http://www.cs.brown.edu/courses/cs173/2012/Assignments/ParselTest/

Props to the Racket build tools for making this work so smoothly, and
thanks to you all!

On Fri, Aug 31, 2012 at 12:09 AM, Joe Gibbs Politz j...@cs.brown.edu wrote:
 Hello Racketeers!  Shriram and I are running a course this fall with a
 significant online component
 (http://www.cs.brown.edu/courses/cs173/2012/OnLine/).  We'll start
 distributing course software to well over a thousand students next
 Friday.

 We're (of course) writing the course software in Racket.  We're also
 distributing some binaries that students will be using during their
 assignments.  I want to see how well we've done at using Racket's
 build tools to set these up.  If you could help us by running them on
 whatever you've got in front of you, we'd be very grateful.  We have a
 particular dearth of Windows machines in our group, so if you have a
 choice, pick that to test on first.  Estimated time to test: 5-10
 minutes.

 1. Download a binary bundle from
 http://cs.brown.edu/~joe/private/cs173/bin/archive/ that matches your
 architecture.

 2. Download the set of tests, incomplete-suite.zip, from:
 http://cs.brown.edu/~joe/private/cs173/test/

 3. Unzip both the binary and the tests.

 4. Locate the executable in the unpacked binary bundle.  It will be one of:

   - win32-dist/assignment1-win32.exe
   - osx-dist/bin/assignment1-osx
   - debian-dist/bin/assignment1-i386

 5. Run this executable, with the --report command, on the test
 directory you just unpacked.  You should see it print out some JSON.
 It will not exactly match what I have here, but it should be
 recognizably JSON:

 $ ./debian-dist/bin/assignment1-i386 --report incomplete-suite

 {results: {\for-fail-false-not-init\: false,
 \pre-and-post-op-mixed\: true, \methods-self-is-zero\: false,
 \while-evals-true\: false, \def-not-recursive\: false,
 \reverse-args-fun-app\: true, \no-var-reassignment\: true,
 \if-else-switched\: false, \eq-not-equals\: false,
 \no-arity-mismatch\: true, \discard-seq-effects\: true,
 \more-falsiness\: false, \recursive-let\: false,
 \discard-if-test-store\: false}, ns:
 39b5b31d3f53793fc0cd95e48fcadc3ae54993ab072a64744685}

 If you see any errors here, please respond to me with a paste of the
 output and a description of the machine you're running on.  If the
 output looks similar to the above, you can stop here, and please reply
 to tell me that it worked, and give me a brief description of the
 machine you're running on.  If you're having fun, continue:

 6.  Run the same command, but redirect the output to a file:

 $ ./debian-dist/bin/assignment1-i386 --report incomplete-suite  report.txt

 7.  Upload report.txt and incomplete-suite.zip as your grade report
 and your test suite here: http://jotform.us/form/22408395633153.
 Pick anything for your Course Pin.

 Let me know if anything at all doesn't seem to be working or seems
 strange.  THANK YOU!

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


[racket-dev] check-match?

2012-11-19 Thread Joe Gibbs Politz
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


Re: [racket-dev] check-match?

2012-11-19 Thread Joe Gibbs Politz
 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?


On Mon, Nov 19, 2012 at 8:01 PM, Robby Findler
ro...@eecs.northwestern.eduwrote:

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

 Robby


 On Monday, November 19, 2012, 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


Re: [racket-dev] check-match?

2012-11-19 Thread Joe Gibbs Politz
  (? P) = (lambda (x) (match x [P true] [_ false]))

I like this quite a bit.  It wouldn't be crazy to add it as
match-pred(icate) right next to match-lambda, match-let, and friends (
http://docs.racket-lang.org/reference/match.html?q=matchq=match-pred#(form._((lib._racket/match..rkt)._match-lambda))
).

Then, for rackunit, it's just up to how much we like writing

(check-match foo P)

vs.

(check-pred (match-pred P) foo)

Both seem handy to me.
_
  Racket Developers list:
  http://lists.racket-lang.org/dev


Re: [racket-dev] check-match?

2012-11-19 Thread Joe Gibbs Politz
Gotcha.  match-pred can be a separate thing.

check-match can also let you use the identifiers bound in the match with an
optional third argument, which relies on more than match-pred anyway.
 That's what I'm doing.


On Mon, Nov 19, 2012 at 9:30 PM, Robby Findler
ro...@eecs.northwestern.eduwrote:

 I think it is better to have a check-match since that way people are
 more likely to find it.

 Robby

 On Mon, Nov 19, 2012 at 7:56 PM, Joe Gibbs Politz j...@cs.brown.edu
 wrote:
   (? P) = (lambda (x) (match x [P true] [_ false]))
 
  I like this quite a bit.  It wouldn't be crazy to add it as
  match-pred(icate) right next to match-lambda, match-let, and friends
  (
 http://docs.racket-lang.org/reference/match.html?q=matchq=match-pred#(form._((lib._racket/match..rkt)._match-lambda))
 ).
 
  Then, for rackunit, it's just up to how much we like writing
 
  (check-match foo P)
 
  vs.
 
  (check-pred (match-pred P) foo)
 
  Both seem handy to me.
 
  _
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 Joe Gibbs Politz
I think I've successfully sent a thingie to you:

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

Let me know if I Did It Wrong.  This is the first time I've clicked
the Pull Request button on Github.

On Mon, Nov 19, 2012 at 10:12 PM, Joe Gibbs Politz j...@cs.brown.edu wrote:
 Gotcha.  match-pred can be a separate thing.

 check-match can also let you use the identifiers bound in the match with an
 optional third argument, which relies on more than match-pred anyway.
 That's what I'm doing.


 On Mon, Nov 19, 2012 at 9:30 PM, Robby Findler ro...@eecs.northwestern.edu
 wrote:

 I think it is better to have a check-match since that way people are
 more likely to find it.

 Robby

 On Mon, Nov 19, 2012 at 7:56 PM, Joe Gibbs Politz j...@cs.brown.edu
 wrote:
   (? P) = (lambda (x) (match x [P true] [_ false]))
 
  I like this quite a bit.  It wouldn't be crazy to add it as
  match-pred(icate) right next to match-lambda, match-let, and friends
 
  (http://docs.racket-lang.org/reference/match.html?q=matchq=match-pred#(form._((lib._racket/match..rkt)._match-lambda))).
 
  Then, for rackunit, it's just up to how much we like writing
 
  (check-match foo P)
 
  vs.
 
  (check-pred (match-pred P) foo)
 
  Both seem handy to me.
 
  _
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-21 Thread Joe Gibbs Politz
Thanks Asumu for merging and fixing my docs bug.

Since this was my first time contributing, I figured I'd write up what
the steps were for future first-time Racket hackers before I forget:

http://jpolitz.github.com/blog/2012/11/21/racket-contributing-tutorial.html

Cheers,
Joe


On Tue, Nov 20, 2012 at 8:41 AM, Robby Findler
ro...@eecs.northwestern.edu wrote:
 I'm not sure how to find the right incantation to pull this down, but
 this commit looks good to push to our repo.

 Robby

 On Tue, Nov 20, 2012 at 12:33 AM, Joe Gibbs Politz j...@cs.brown.edu wrote:
 I think I've successfully sent a thingie to you:

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

 Let me know if I Did It Wrong.  This is the first time I've clicked
 the Pull Request button on Github.

 On Mon, Nov 19, 2012 at 10:12 PM, Joe Gibbs Politz j...@cs.brown.edu wrote:
 Gotcha.  match-pred can be a separate thing.

 check-match can also let you use the identifiers bound in the match with an
 optional third argument, which relies on more than match-pred anyway.
 That's what I'm doing.


 On Mon, Nov 19, 2012 at 9:30 PM, Robby Findler ro...@eecs.northwestern.edu
 wrote:

 I think it is better to have a check-match since that way people are
 more likely to find it.

 Robby

 On Mon, Nov 19, 2012 at 7:56 PM, Joe Gibbs Politz j...@cs.brown.edu
 wrote:
   (? P) = (lambda (x) (match x [P true] [_ false]))
 
  I like this quite a bit.  It wouldn't be crazy to add it as
  match-pred(icate) right next to match-lambda, match-let, and friends
 
  (http://docs.racket-lang.org/reference/match.html?q=matchq=match-pred#(form._((lib._racket/match..rkt)._match-lambda))).
 
  Then, for rackunit, it's just up to how much we like writing
 
  (check-match foo P)
 
  vs.
 
  (check-pred (match-pred P) foo)
 
  Both seem handy to me.
 
  _
Racket Developers list:
http://lists.racket-lang.org/dev
 


_
  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 Joe Gibbs Politz
 Unfortunately I don't have his email, so I hope he'll read this or
 perhaps someone here can forward this to him.

Got it, I'll add to the post this evening.
_
  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 Joe Gibbs Politz
 I was following your blog too, haha.

Glad to hear it was useful!  I've updated the post on the blog.
_
  Racket Developers list:
  http://lists.racket-lang.org/dev