[racket-users] do loops

2016-02-14 Thread JJ
I try to fill a binary tree with 5 random numbers, avoiding duplicates. Is there a more elegant way than this (using "Iterations and Comprehensions")? (define tree4 (do ([x (random 10) (random 10)] [c #f (contains? tree x)] [tree null (if c tree (insert tree x))] [i 0 (if

[racket-users] Re: how to transform syntax post-expansion?

2016-02-14 Thread Nota Poin
On Monday, February 15, 2016 at 4:07:53 AM UTC, Nota Poin wrote: > (define-syntax (transform-post-expansion stx) > (syntax-case (expand stx) () > (...))) Right, expand the syntax to expand the syntax... that'll work out great... -- You received this message because you are subscribed to

[racket-users] Re: how to transform syntax post-expansion?

2016-02-14 Thread Nota Poin
I suppose I could do something like this: (define-syntax (transform-post-expansion stx) (syntax-case (expand stx) () (...))) -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from

[racket-users] how to transform syntax post-expansion?

2016-02-14 Thread Nota Poin
I was trying to transform the syntax produced by an (include/...) statement, specifically (include/text) from scribble/text. But when I did this: (transform (include "somefile.scribble")) it transformed the syntax #'(include "somefile.scribble"), not the syntax produced from its expansion. I'm

Re: [racket-users] DrRacket Coverage

2016-02-14 Thread Gustavo Massaccesi
I guess painting everything black is more confusing, because black is used to mark the uncovered parts. The students will think that everything is wrong. I think that a better possibility is to add a backcolor (and forecolor) to the code covered by the test. I vote for very light green, #C0FFC0,

Re: [racket-users] DrRacket Coverage

2016-02-14 Thread Robby Findler
Can you explain the use case a little bit more, please? This is the *SL languages? They run their program, they see black/orange, they add tests, they no longer see black/orange, and they are confused? Did they not understand what black/orange means or were they expecting entirely black? Robby

Re: [racket-users] DrRacket Coverage

2016-02-14 Thread Robby Findler
Since in that context test coverage is an opt-in kind of a thing, maybe it makes sense to just make the whole thing turn black? Do you think that would also solve the problem? Robby On Sun, Feb 14, 2016 at 4:10 PM, Eli Barzilay wrote: > On Sun, Feb 14, 2016 at 5:06 PM, Robby

Re: [racket-users] DrRacket Coverage

2016-02-14 Thread Eli Barzilay
On Sun, Feb 14, 2016 at 5:06 PM, Robby Findler wrote: > Can you explain the use case a little bit more, please? This is the > *SL languages? No, a plain #lang with the syntactic code coverage enabled. > They run their program, they see black/orange, they add tests,

RE: [racket-users] Re: (eqv? Racket-land Wonderland) -> #t

2016-02-14 Thread Jos Koot
I am a Racket-using hobbyist. It surprises me that, according to the observation, not many hobbyists are using Racket. I did programming in a lot of languages, assemblers included, often creating my own languages, even long before I met Scheme or Racket or other Lisp like languages in which it is

Re: [racket-users] (eqv? Racket-land Wonderland) -> #t

2016-02-14 Thread Richard Cleis
> So, at the end I just wonder how is it that such Wonderland is not > discovered by much more people? (My perspective is from working in the same place for 32 years) - To claim progress, most people want to make only minimum changes to their way of doing things. - To claim progress, most

[racket-users] Re: (eqv? Racket-land Wonderland) -> #t

2016-02-14 Thread Saša Janiška
Neil Van Dyke writes: > Being non-mainstream for practitioners, Racket is most popular with > people who have the freedom to choose any tools they want, not forced > into a mainstream set of options. Most often this means individual > alpha techies, researchers, etc.

[racket-users] using ryanc's oauth2 package with Google?

2016-02-14 Thread Fred Martin
Hi all, I am trying to get oauth working with Google so I can write some Google Drive code in Racket. I set up an "installed application" in a project in my Google dev console, and copied its ID to my Racket code. When I try to get a token, it seems like everything is working -- I log into my

Re: [racket-users] Re: (eqv? Racket-land Wonderland) -> #t

2016-02-14 Thread Neil Van Dyke
Saša Janiška wrote on 02/14/2016 07:10 AM: Neil Van Dyke writes: Being non-mainstream for practitioners, Racket is most popular with people who have the freedom to choose any tools they want, not forced into a mainstream set of options. Most often this means individual

[racket-users] Re: using ryanc's oauth2 package with Google?

2016-02-14 Thread Fred Martin
So... even though I chose "Other" as the client type, my API credentials were created with a secret. I had to copy the secret into my client constructor request. >From my reading of the oauth 2 API docs, I thought "installed app" clients >weren't supposed to have secrets? Anyway at this

[racket-users] DrRacket Coverage

2016-02-14 Thread Eli Barzilay
Every semester there are always students that think that DrRacket is broken when they add tests and the coverage colors go away. I now tell them about it in advance (in class and in text), but it's still confusing people. So in the spirit of phone apps which teach you about themselves, how about

Re: [racket-users] Chaperone of immutable hash

2016-02-14 Thread Gustavo Massaccesi
Thanks to both. I searched by mistake "make-chaperone-hash" instead of "chaperone-hash", so I didn't find it. Gustavo On Sat, Feb 13, 2016 at 7:11 PM, Stephen Chang wrote: > I added similar basic tests here. > >