[racket-dev] check syntax now more likely to work on std libs

2010-10-19 Thread Robby Findler
I've just pushed a change that makes check syntax more likely to run
on files in the plt tree. Specifically, the namespace that check
syntax creates no longer shares the GUI libraries which means it pulls
in a far smaller set of libraries overall. (Of course, run still pulls
those in, so running those files will continue to not work.)

This kind of change can lead to surprising bugs so if you see check
syntax failing in strange ways, please let me know.

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


[racket-dev] internal definitions stepper

2010-10-19 Thread Robby Findler
How recently did the change come in that allows internal definitions
all over the place? And how broken did this make the stepper?

(Ie is it feasible to wait for the next release? and should we?)

Robby

On Tue, Oct 19, 2010 at 5:03 AM,  sper...@racket-lang.org wrote:
 sperber has updated `master' from ddca8cd29b to fd5e9d4d63.
  http://git.racket-lang.org/plt/ddca8cd29b..fd5e9d4d63

 =[ 1 Commits ]==

 Directory summary:
  100.0% collects/test-engine/

 ~~

 fd5e9d4 Mike Sperber sper...@deinprogramm.de 2010-10-19 11:56:24 +0200
 :
 | Unbreak the stepper on `check-expect'.
 |
 | All kinds of things expand into (let () ...), so all kinds of things
 | break.
 :
  M collects/test-engine/racket-tests.rkt |    2 +-

 =[ Overall Diff ]===

 collects/test-engine/racket-tests.rkt
 ~
 --- OLD/collects/test-engine/racket-tests.rkt
 +++ NEW/collects/test-engine/racket-tests.rkt
 @@ -106,7 +106,7 @@
                                            #'test-engine
              'stepper-skipto
              (append skipto/third ;; let
 -                     skipto/third skipto/second ;; unless (it expands into a 
 begin)
 +                     skipto/third skipto/third ;; unless (it expands into 
 (if (let-values () ...))
                      skipto/cdr skipto/third ;; application of insert-test
                      '(syntax-e cdr cdr syntax-e car) ;; lambda
                      )))

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

Re: [racket-dev] expected timing difference between fft-complex-forward and fft-complex-radix2-forward?

2010-10-19 Thread Doug Williams
On my laptop:

#lang racket

(require fft.rkt)

(define v (build-vector 16384 (lambda (i) (random

(define v1 (vector-copy v))

(collect-garbage)
(collect-garbage)
(collect-garbage)
(time (fft-complex-radix2-forward v1))

(define v2 (vector-copy v))

(collect-garbage)
(collect-garbage)
(collect-garbage)
(time (fft-complex-forward v2))

(for/and ([i (in-range (vector-length v))])
 ( (magnitude (- (vector-ref v1 i) (vector-ref v2 i))) 1e-4))

==

cpu time: 94 real time: 94 gc time: 0
cpu time: 79 real time: 78 gc time: 0
#t

I'll look at the rsound/fft implementation and see if I see the problem.

On Mon, Oct 18, 2010 at 10:32 PM, John Clements
cleme...@brinckerhoff.orgwrote:


 On Oct 18, 2010, at 9:25 AM, Doug Williams wrote:

  When I first ran with vectors of 8192, I got exactly the opposite - the
 radix-2 version was much slower (although still  500ms). But, when I
 looked, the longer time was almost exclusively GC - it just happen to hit
 that particular call. When I put a (collect-garbage) before each call, they
 were all  50ms on my machine. So, the GC penalty is likely what you're
 seeing.
 
  The other thing is to make sure you aren't calling one of the dft
 routines instead of the fft routines. Those are the only ones that get
 anywhere near 24s on my machine - they are about 20s on my machine. The dft
 routines are the 'straight' mathematical discrete Fourier transform and do
 not use the FFT algorithms at all. [They're really only useful for a sanity
 check on results.]

 Right, got it. No, the times I'm seeing are not GC.  I bumped it up to an
 8192-point fft, and now the radix-2 version is about 400x faster.

 Here's my code:

 #lang racket

 (require (planet clements/rsound/fft))

 (define v (build-vector 16384 (lambda (i) (random

 (define v1 (vector-copy v))

 (collect-garbage)
 (collect-garbage)
 (collect-garbage)
 (time (fft-complex-radix2-forward v1))

 (define v2 (vector-copy v))

 (collect-garbage)
 (collect-garbage)
 (collect-garbage)
 (time (fft-complex-forward v2))

 (for/and ([i (in-range (vector-length v))])
  ( (magnitude (- (vector-ref v1 i) (vector-ref v2 i))) 1e-4))

 =

 cpu time: 208 real time: 211 gc time: 0
 cpu time: 81357 real time: 82502 gc time: 8337
 #t

 John Clements

  On Thu, Oct 14, 2010 at 4:34 PM, John Clements 
 cleme...@brinckerhoff.org wrote:
  On a vector of length 8192 (a power of 2, natch),
 fft-complex-radix2-forward takes about 1/8 of a second (lost in the noise,
 essentially), but fft-complex-forward takes more than 24 seconds, a
 difference of about 200x.  They do produce the same answers, up to
 differences of 1e-4 in the magnitude (didn't check the phase).
 
  1) Is this expected? I thought the non-radix2 one was still fairly clever
 about subdividing when the number of points is divisible by 2.
  2) If so, would it make sense to test for powers of 2?
 
  John Clements
 
 


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

Re: [racket-dev] internal definitions stepper

2010-10-19 Thread Michael Sperber

Robby Findler ro...@eecs.northwestern.edu writes:

 How recently did the change come in that allows internal definitions
 all over the place? And how broken did this make the stepper?

Pretty broken: There are now (let () ...)s all over the place.

(I've sent separate e-mail to John and Matthew.)

-- 
Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev


Re: [racket-dev] expected timing difference between fft-complex-forward and fft-complex-radix2-forward?

2010-10-19 Thread John Clements

On Oct 19, 2010, at 5:17 AM, Doug Williams wrote:

 On my laptop:
 
 #lang racket
 
 (require fft.rkt)
 
 (define v (build-vector 16384 (lambda (i) (random
 
 (define v1 (vector-copy v))
 
 (collect-garbage)
 (collect-garbage)
 (collect-garbage)
 (time (fft-complex-radix2-forward v1))
 
 (define v2 (vector-copy v))
 
 (collect-garbage)
 (collect-garbage)
 (collect-garbage)
 (time (fft-complex-forward v2))
 
 (for/and ([i (in-range (vector-length v))])
  ( (magnitude (- (vector-ref v1 i) (vector-ref v2 i))) 1e-4))
 
 ==
 
 cpu time: 94 real time: 94 gc time: 0
 cpu time: 79 real time: 78 gc time: 0
 #t
 
 I'll look at the rsound/fft implementation and see if I see the problem.

It certainly sounds as though I broke it, or it changed after I got it.  Has 
the source changed since you sent it to me last year?

John



smime.p7s
Description: S/MIME cryptographic signature
_
  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


[racket-dev] shared and names

2010-10-19 Thread Shriram Krishnamurthi
Is there any way for shared to check for whether a name was originally
assigned to an LHS and, if so, to re-use it?  If I define

(define cities (shared ([PVD (make-city ... (list BOS ORD))] [BOS ...]
[ORD ...]) PVD))

and it prints as


(shared ((-0- (make-city Providence (list -3- -7-)))
 (-11- (make-city Boston (list -3- -7- -16- -31-)))
 ...

it's really pretty hard to read!  (What's worse is that changes to the
program change the assignment of -1-, -2-, etc., so even if I spent
some time memorizing that -1- is PVD, -11- is ORD, etc., after I make
a small change to my program, that memorized map is useless.)

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


Re: [racket-dev] shared and names

2010-10-19 Thread Robby Findler
I think that we'd have to add names to structs to do that. Seems
expensive. But maybe there is a better way?

Robby

On Tue, Oct 19, 2010 at 2:38 PM, Shriram Krishnamurthi s...@cs.brown.edu 
wrote:
 Is there any way for shared to check for whether a name was originally
 assigned to an LHS and, if so, to re-use it?  If I define

 (define cities (shared ([PVD (make-city ... (list BOS ORD))] [BOS ...]
 [ORD ...]) PVD))

 and it prints as


 (shared ((-0- (make-city Providence (list -3- -7-)))
         (-11- (make-city Boston (list -3- -7- -16- -31-)))
  ...

 it's really pretty hard to read!  (What's worse is that changes to the
 program change the assignment of -1-, -2-, etc., so even if I spent
 some time memorizing that -1- is PVD, -11- is ORD, etc., after I make
 a small change to my program, that memorized map is useless.)

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

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

[racket-dev] fuzz testing the bytecode reader

2010-10-19 Thread Sam Tobin-Hochstadt
Earlier today, I wrote a simple fuzz tester for bytecode reading and
evaluation. The code is attached.  It takes an existing zo file, reads
it in as bytes, randomly flips some small portion of the bits (0.1%),
and then `read's and `eval's the results.  This extremely quickly
finds segfaults in Racket.  Here's a deterministic segfault with git
HEAD:

[sa...@hermes:~/tmp] racket fuzz.rkt -s  1046626898 -f
~/sw/plt/collects/redex/tests/compiled/lw-test-util_rkt.zo
DrDr Ignore! random-seed 1046626898
name: /home/samth/sw/plt/collects/redex/tests/compiled/lw-test-util_rkt.zo
SIGSEGV MAPERR si_code 1 fault on addr 0x616ec898
Aborted

Here's how to traverse a bunch of files to find a segfault:
 racket fuzz.rkt -d ~/sw/plt/collects/redex/

I'll be adding this to the tree in the stress tests soon.

Thanks to Robby for advice on the code, and to Lars Hansen for the idea.
-- 
sam th
sa...@ccs.neu.edu


fuzz.rkt
Description: Binary data
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

Re: [racket-dev] fuzz testing the bytecode reader

2010-10-19 Thread Carl Eastlund
Caveat Emptor: be wary of running code designed to produce random,
unsafe results if the computer you are running it on has any data you
really care about.  Chances of catastrophic failure *should* be low,
but they may not be, and sometimes lightning does strike anyway.

Carl Eastlund

On Tue, Oct 19, 2010 at 4:42 PM, Sam Tobin-Hochstadt sa...@ccs.neu.edu wrote:
 Earlier today, I wrote a simple fuzz tester for bytecode reading and
 evaluation. The code is attached.  It takes an existing zo file, reads
 it in as bytes, randomly flips some small portion of the bits (0.1%),
 and then `read's and `eval's the results.  This extremely quickly
 finds segfaults in Racket.  Here's a deterministic segfault with git
 HEAD:

 [sa...@hermes:~/tmp] racket fuzz.rkt -s  1046626898 -f
 ~/sw/plt/collects/redex/tests/compiled/lw-test-util_rkt.zo
 DrDr Ignore! random-seed 1046626898
 name: /home/samth/sw/plt/collects/redex/tests/compiled/lw-test-util_rkt.zo
 SIGSEGV MAPERR si_code 1 fault on addr 0x616ec898
 Aborted

 Here's how to traverse a bunch of files to find a segfault:
 racket fuzz.rkt -d ~/sw/plt/collects/redex/

 I'll be adding this to the tree in the stress tests soon.

 Thanks to Robby for advice on the code, and to Lars Hansen for the idea.
 --
 sam th
 sa...@ccs.neu.edu
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev


Re: [racket-dev] internal definitions stepper

2010-10-19 Thread John Clements

On Oct 19, 2010, at 10:02 AM, John Clements wrote:

 
 2) The interactive tests fail like this:
 
   given: #(struct:error-result namespace-variable-value: test~object is not 
 defined)
 
 I haven't worked on this one yet... but it looks like this is also something 
 that was added this month.

Per a discussion with Robby, it turns out to be *apparently* sufficient to 
define a binding in the 
testing namespace that associates test~object with #f. 

Kathy, can you confirm that the test-engine code is always happy with a value 
of #f for test~object?

John



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

[racket-dev] Grr... why can't I pull?

2010-10-19 Thread John Clements
Okay, this just sounds stupid: my 'git fetch' is failing on the PLT tree.  I 
can ssh to the pltgit machine just fine:

john-clementss-macbook-pro:~/git-clements clements$ ssh git
PTY allocation request failed on channel 0
hello clements, the gitolite version here is v1.4-14-g36317c4
the gitolite config gives you the following access:
 C  CREATER/.*
   R W  iplt
   R W  play
   R W  plt
   @ @  testing
Connection to git.racket-lang.org closed.

... but git pull just hangs. I get no useful info, even with a git fetch -v.

Actually, I just tried it from a remote linode (li21-127.members.linode.com), 
and it seems to be hanging there, as well.

Am I doing something stupid, here?

John



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

Re: [racket-dev] fuzz testing the bytecode reader

2010-10-19 Thread Jay McCarthy
I hope it doesn't delete DrDr's hard drive.

Jay

On Tue, Oct 19, 2010 at 1:51 PM, Carl Eastlund c...@ccs.neu.edu wrote:
 Caveat Emptor: be wary of running code designed to produce random,
 unsafe results if the computer you are running it on has any data you
 really care about.  Chances of catastrophic failure *should* be low,
 but they may not be, and sometimes lightning does strike anyway.

 Carl Eastlund

 On Tue, Oct 19, 2010 at 4:42 PM, Sam Tobin-Hochstadt sa...@ccs.neu.edu 
 wrote:
 Earlier today, I wrote a simple fuzz tester for bytecode reading and
 evaluation. The code is attached.  It takes an existing zo file, reads
 it in as bytes, randomly flips some small portion of the bits (0.1%),
 and then `read's and `eval's the results.  This extremely quickly
 finds segfaults in Racket.  Here's a deterministic segfault with git
 HEAD:

 [sa...@hermes:~/tmp] racket fuzz.rkt -s  1046626898 -f
 ~/sw/plt/collects/redex/tests/compiled/lw-test-util_rkt.zo
 DrDr Ignore! random-seed 1046626898
 name: /home/samth/sw/plt/collects/redex/tests/compiled/lw-test-util_rkt.zo
 SIGSEGV MAPERR si_code 1 fault on addr 0x616ec898
 Aborted

 Here's how to traverse a bunch of files to find a segfault:
 racket fuzz.rkt -d ~/sw/plt/collects/redex/

 I'll be adding this to the tree in the stress tests soon.

 Thanks to Robby for advice on the code, and to Lars Hansen for the idea.
 --
 sam th
 sa...@ccs.neu.edu
 _
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev




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

The glory of God is Intelligence - DC 93
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

Re: [racket-dev] Grr... why can't I pull?

2010-10-19 Thread Sam Tobin-Hochstadt
On Tue, Oct 19, 2010 at 2:28 PM, John Clements
cleme...@brinckerhoff.org wrote:
 Am I doing something stupid, here?

I'm having the same problem, and I'm at the same conference as John,
so I suspect that's the issue.  I can pull fine from my machine at
Northeastern.
-- 
sam th
sa...@ccs.neu.edu
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev


Re: [racket-dev] internal definitions stepper

2010-10-19 Thread John Clements
Okay, here's what seems to be broken:

1) cond, as Mike observed. This is related to the different expansion of cond.
2) make-foo, where foo is a user-defined structure.  There's a mysterious extra 
false that's showing up.
3) reduction of (cons 1 (cons 2 empty)) in beginner only.
4) local structures.

Apparently, all of this (except for #4) changed in the last week :).

John



smime.p7s
Description: S/MIME cryptographic signature
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev

Re: [racket-dev] Grr... why can't I pull?

2010-10-19 Thread Eli Barzilay
Four hours ago, John Clements wrote:
 Okay, this just sounds stupid: my 'git fetch' is failing on the PLT tree.  I 
 can ssh to the pltgit machine just fine:
 
 john-clementss-macbook-pro:~/git-clements clements$ ssh git
 PTY allocation request failed on channel 0
 hello clements, the gitolite version here is v1.4-14-g36317c4
 the gitolite config gives you the following access:
  CCREATER/.*
R Wiplt
R Wplay
R Wplt
@ @testing
 Connection to git.racket-lang.org closed.
 
 ... but git pull just hangs. I get no useful info, even with a git fetch -v.

I forgot to say that the first thing is small enough that you get
everything happenning withing a negligible delta of the ssh handshake
step.  But a pull is where it starts talking, and that would be much
more sensitive to timouts etc.

-- 
  ((lambda (x) (x x)) (lambda (x) (x x)))  Eli Barzilay:
http://barzilay.org/   Maze is Life!
_
  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] --enable-macprefix gone?

2010-10-19 Thread Eli Barzilay
Four minutes ago, David Van Horn wrote:
 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?

I just tried it, and it worked fine:

  $ ./configure --enable-macprefix --prefix=/foo/bar
  ...

What's the command line that you're using?

-- 
  ((lambda (x) (x x)) (lambda (x) (x x)))  Eli Barzilay:
http://barzilay.org/   Maze is Life!
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev


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

2010-10-19 Thread Eli Barzilay
About a minute ago, David Van Horn wrote:
 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?

All options are passed to sub-configure script calls -- you'll see
similar warnings with other flags.  I don't know if there's a way to
disable passing specific arguments this way.

-- 
  ((lambda (x) (x x)) (lambda (x) (x x)))  Eli Barzilay:
http://barzilay.org/   Maze is Life!
_
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/dev