Re: [racket-dev] Speeding up `in-directory`

2013-09-04 Thread Matthew Flatt
At Wed, 4 Sep 2013 12:05:47 -0400, Sam Tobin-Hochstadt wrote: > That's very nice -- and faster, to boot. One thing I'm confused about > -- why is the `parameterize` around the second call to > `directory-list` needed? Does it query `current-directory` > internally? Yes: `(car l)` will be a path t

Re: [racket-dev] hex decoding?

2013-09-04 Thread David Vanderson
Sorry it took so long, but I've submitted a pull request to make this function public in file/sha1: https://github.com/plt/racket/pull/426 Let me know if I screwed up, it's my first pull request. Thanks, Dave On 06/11/2013 05:11 PM, Robby Findler wrote: Yes, I think file/sha1 is the right pl

[racket-dev] tests not being run?

2013-09-04 Thread David Vanderson
It looks to me like most of the tests in racket/pkgs/racket-pkgs/racket-test/tests/file/* are not being run by DrDr. I think DrDr is running them with 'raco test _' while the files mostly need to be run as 'racket _'. Am I missing something? If not, should I fix the files to be run with 'ra

Re: [racket-dev] Speeding up `in-directory`

2013-09-04 Thread Sam Tobin-Hochstadt
That's very nice -- and faster, to boot. One thing I'm confused about -- why is the `parameterize` around the second call to `directory-list` needed? Does it query `current-directory` internally? Oh, and a `define-sequence-syntax` version is even a little faster. I'll push all of this soon. Sam

[racket-dev] Speeding up `in-directory`

2013-09-04 Thread Sam Tobin-Hochstadt
Inspired by a post about a faster directory iteration in Haskell [1], I decided to try doing the same for Racket. The results are here: https://gist.github.com/samth/6437192 The current implementation uses continuations, which are pretty slow. The fastest solution would fuse the traversal and pro

Re: [racket-dev] net/http-client

2013-09-04 Thread Jay McCarthy
On Wed, Aug 28, 2013 at 3:30 PM, Greg Hendershott wrote: > This looks great!! > > A couple suggestions: > > 1. Support for "Expect: 100-continue" request headers would be > helpful, and I think not too messy to add. > > The big use case I'm aware of is Amazon S3. If you make a PUT or POST > reque

Re: [racket-dev] Speeding up `in-directory`

2013-09-04 Thread Matthew Flatt
When continuations are too expensive, consider representing the continuation explicitly. In this case, I think a list of paths represents the continuation easily enough. (define (in-directory5 [orig-dir #f]) (define init-dir (or orig-dir (current-directory))) ;; current state of the sequen

Re: [racket-dev] tests not being run?

2013-09-04 Thread Robby Findler
I think it makes more sense to change those 'main' modules into 'test' modules, but I'm not positive. Robby On Wed, Sep 4, 2013 at 12:26 PM, David Vanderson wrote: > It looks to me like most of the tests in > racket/pkgs/racket-pkgs/**racket-test/tests/file/* > are not being run by DrDr. I th

Re: [racket-dev] Speeding up `in-directory`

2013-09-04 Thread Sam Tobin-Hochstadt
On Wed, Sep 4, 2013 at 12:29 PM, Matthew Flatt wrote: > > (directory-list > (path->complete-path d init-dir)))]) I'm pretty sure this is wrong, but I'm not sure how to fix it. In particular, there's no reason that `init-dir` sho

Re: [racket-dev] Speeding up `in-directory`

2013-09-04 Thread Matthew Flatt
At Wed, 4 Sep 2013 15:13:31 -0400, Sam Tobin-Hochstadt wrote: > On Wed, Sep 4, 2013 at 12:29 PM, Matthew Flatt wrote: > > > > (directory-list > > (path->complete-path d init-dir)))]) > > > I'm pretty sure this is wrong, but I'm n

Re: [racket-dev] Speeding up `in-directory`

2013-09-04 Thread Sam Tobin-Hochstadt
On Wed, Sep 4, 2013 at 3:23 PM, Matthew Flatt wrote: > At Wed, 4 Sep 2013 15:13:31 -0400, Sam Tobin-Hochstadt wrote: >> On Wed, Sep 4, 2013 at 12:29 PM, Matthew Flatt wrote: >> > >> > (directory-list >> > (path->complete-path d in

Re: [racket-dev] Speeding up `in-directory`

2013-09-04 Thread Matthew Flatt
One more try, to fix problems with adding relative paths and for a starting path that isn't an existing directory: (define (in-directory6 [orig-dir #f]) (define init-dir (current-directory)) ;; current state of the sequence is a list of paths to produce; when ;; incrementing past a directory

Re: [racket-dev] Speeding up `in-directory`

2013-09-04 Thread Matthew Flatt
At Wed, 4 Sep 2013 15:44:41 -0400, Sam Tobin-Hochstadt wrote: > On Wed, Sep 4, 2013 at 3:23 PM, Matthew Flatt wrote: > > At Wed, 4 Sep 2013 15:13:31 -0400, Sam Tobin-Hochstadt wrote: > >> On Wed, Sep 4, 2013 at 12:29 PM, Matthew Flatt wrote: > >> > > >> > (directo

Re: [racket-dev] tests not being run?

2013-09-04 Thread David Vanderson
I totally missed pkgs/racket-pkgs/racket-test/tests/run-automated-tests.rkt, but it looks like DrDr is running that with 'mzc -k _' - doesn't that just compile it? There is also a file/main.rkt that runs all the file/ tests, but that file doesn't show up in DrDr. I'm more confused now. Does