Re: [racket] DrRacket Plugins require drracket/too-lib alone seems to cause error

2013-09-09 Thread Stephen De Gabrielle
Thanks, much appreciated. s, -- Stephen De Gabrielle On Mon, Sep 9, 2013 at 2:54 PM, Robby Findler wrote: > This is a case of confusing documentation. The signatures > drracket:tool-exports^ and drracket:tool^ are exported by the drracket/tool > library,

[racket] Scheme Design Patterns

2013-09-09 Thread Chad A.
Hi, I'm wondering if someone can help me understand a design-pattern that I have noticed in the Racket code base. (I'm teaching myself, so review other people's code alot). I've seen this pattern..which is a bit contrived. (define (say-hello) (define (display-hello) (display "hello"))) S

[racket] flexpt being very slow

2013-09-09 Thread Dmitry Cherkassov
Hi. Please consider this program. Why is flexpt so slow? I get 20 ms vs 669 ms (for flexpt). >< #lang typed/racket (require racket/flonum) (define Sz 300) (define test-vec (for/flvector #:length Sz ([i (in-range Sz

Re: [racket] Expander vs Reader layer and general Macro advice

2013-09-09 Thread Scott Klarenbach
@Jay I'm not sure what you mean by "Doing a regex-match loses the original > typing information" I just meant that since I want a:"2" to parse as '(a . "2") and a:2 to parse as '(a . 2), I'm having to perform a bunch of checks on the regex match string to see if I can convert it to back to a num

Re: [racket] Syntax-e & syntax->list

2013-09-09 Thread Carl Eastlund
If you have syntax that prints as #'(1 2), the result of syntax-e might be several things: (list #'1 #'2) (cons #'1 (cons #'2 #'())) (cons #'1 #'(2)) There's no guarantee how far the conses go down the spine before you hit another syntax object, it depends on how the syntax was constructed. The

Re: [racket] Understanding GC when working with streams

2013-09-09 Thread Joe Marshall
Ever? Or for the purpose discussed earlier? On Sep 9, 2013 7:17 AM, "Matthias Felleisen" wrote: > > I wonder whether you really want lazy streams. -- Matthias > > > > On Sep 9, 2013, at 10:19 AM, Lawrence Woodman wrote: > > > On 09/09/13 07:19, Stephen Chang wrote: > >> Konrad's exactly right. Y

Re: [racket] Combining iteration and match

2013-09-09 Thread Konrad Hinsen
Stephen Chang writes: > Ah sorry. The package was missing a metadata file, which I've added. > It's working on my machine now. Would you mind trying again? > Preferably, do a remove, then install (as opposed to an update). Done, it works fine now! Thanks, Konrad Racke

[racket] Syntax-e & syntax->list

2013-09-09 Thread Roman Klochkov
In help about syntax->list:  In other words,  syntax pairs  in  ( syntax-e   stx )  are flattened. Tests: > (syntax->list #'((1 2))) '(#) > (syntax-e #'((1 2))) '(#) Result is the same. No flattening. Or I missed something? -- Roman Klochkov P.S. Racket 5.3.6, Linux R

Re: [racket] Expander vs Reader layer and general Macro advice

2013-09-09 Thread Eli Barzilay
A few minutes ago, Ryan Culpepper wrote: > On 09/09/2013 10:06 AM, Eli Barzilay wrote: > > An hour ago, Jay McCarthy wrote: > >> You can do this a complicated way and an easy way. The complicated > >> way would have to deal with stuff like (f 1):5 and the easy way > >> would just work on stuff like

Re: [racket] Expander vs Reader layer and general Macro advice

2013-09-09 Thread Ryan Culpepper
On 09/09/2013 10:06 AM, Eli Barzilay wrote: An hour ago, Jay McCarthy wrote: You can do this a complicated way and an easy way. The complicated way would have to deal with stuff like (f 1):5 and the easy way would just work on stuff like x:1. I see "string":e as being part of the complicated way

Re: [racket] Documentation site down?

2013-09-09 Thread Eli Barzilay
A few minutes ago, Ben Atkin wrote: > I'm getting a 403 at http://docs.racket-lang.org/ Just FYI! This should be fixed now -- sorry. (I'm in the process of moving services to a new machine, so if anyone sees anything broken, please let me know!) -- ((lambda (x) (x x)) (lambda (x) (x x

[racket] Documentation site down?

2013-09-09 Thread Ben Atkin
I'm getting a 403 at http://docs.racket-lang.org/ Just FYI! Thanks, Ben Racket Users list: http://lists.racket-lang.org/users

Re: [racket] Combining iteration and match

2013-09-09 Thread Stephen Chang
Ah sorry. The package was missing a metadata file, which I've added. It's working on my machine now. Would you mind trying again? Preferably, do a remove, then install (as opposed to an update). On Mon, Sep 9, 2013 at 9:52 AM, Konrad Hinsen wrote: > Stephen Chang writes: > > > I've updated the g

Re: [racket] Understanding GC when working with streams

2013-09-09 Thread Stephen Chang
> Thanks, and to Konrad too. You're mention of in-range being more > like a generator, actually makes me wonder whether a generator would > be a better choice for processing large data sets, from databases and > csv files, sequentially. What do you think? On Mon, Sep 9, 2013 at 10:17 AM, Matthia

Re: [racket] Understanding GC when working with streams

2013-09-09 Thread Matthias Felleisen
I wonder whether you really want lazy streams. -- Matthias On Sep 9, 2013, at 10:19 AM, Lawrence Woodman wrote: > On 09/09/13 07:19, Stephen Chang wrote: >> Konrad's exactly right. Your filtered-nums blows up because you named >> the stream and then traversed the entire thing. In general, if y

Re: [racket] Expander vs Reader layer and general Macro advice

2013-09-09 Thread Eli Barzilay
An hour ago, Jay McCarthy wrote: > You can do this a complicated way and an easy way. The complicated > way would have to deal with stuff like (f 1):5 and the easy way > would just work on stuff like x:1. I see "string":e as being part of > the complicated way. In my mind, the complicated way would

Re: [racket] DrRacket Plugins require drracket/too-lib alone seems to cause error

2013-09-09 Thread Robby Findler
This is a case of confusing documentation. The signatures drracket:tool-exports^ and drracket:tool^ are exported by the drracket/tool library, not the drracket/tool-lib library. I've pushed some changes that should help going forward. Just as a cautionary note, tho, the require line at the beginni

Re: [racket] Combining iteration and match

2013-09-09 Thread Konrad Hinsen
Stephen Chang writes: > I've updated the generic-bind ~for/X forms so that its performance is > the same as racket's for/X. Sounds great! > The update relies on a change to racket though. So if you want to try > it, first pull from racket git head, then update the generic-bind pkg. OK, that

Re: [racket] Expander vs Reader layer and general Macro advice

2013-09-09 Thread Jay McCarthy
You can do this a complicated way and an easy way. The complicated way would have to deal with stuff like (f 1):5 and the easy way would just work on stuff like x:1. I see "string":e as being part of the complicated way. In my mind, the complicated way would have to be done with a reader that produ

Re: [racket] removing a plugin from /collects

2013-09-09 Thread Robby Findler
You can also remove the 'define drracket-tools' line from the info.rkt file or disable the tool via the 'tools' section of the preference dialog. Robby On Mon, Sep 9, 2013 at 12:51 AM, Laurent wrote: > If you installed it as a collection with `raco link`, then you can remove > it with `raco li

Re: [racket] Understanding GC when working with streams

2013-09-09 Thread Lawrence Woodman
On 09/09/13 07:19, Stephen Chang wrote: Konrad's exactly right. Your filtered-nums blows up because you named the stream and then traversed the entire thing. In general, if you hang onto the head of the stream while traversing then the GC can't collect anything because since you have a pointer to