Re: [racket-users] DrRacket Coverage

2016-02-15 Thread 'John Clements' via Racket Users
> On Feb 15, 2016, at 7:49 PM, Robby Findler > wrote: > > I feel like a bar in the drracket window is a better choice than a > printout in the REPL and I've half implemented it, but it feels like > the message is a bit too far away. What do you think of these > screenshots? > > http://www.eecs

Re: [racket-users] DrRacket Coverage

2016-02-15 Thread Robby Findler
Oh and I should add that I plan to add a "show next time" checkbox to the bar, if the bar seems worth continuing with. Robby On Monday, February 15, 2016, Robby Findler wrote: > I feel like a bar in the drracket window is a better choice than a > printout in the REPL and I've half implemented i

Re: [racket-users] DrRacket Coverage

2016-02-15 Thread Robby Findler
I feel like a bar in the drracket window is a better choice than a printout in the REPL and I've half implemented it, but it feels like the message is a bit too far away. What do you think of these screenshots? http://www.eecs.northwestern.edu/~robby/tmp/a.png http://www.eecs.northwestern.edu/~ro

[racket-users] if you want to do a startup

2016-02-15 Thread Neil Van Dyke
CS students and other Racketeers planning to do a startup... You're probably familiar with what Paul Graham, of Y Combinator fame, has said about the merits of using Lisp (ahem, Racket) for the initial system. And sometimes you can also use Racket for the eventual system. So, you're consideri

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

2016-02-15 Thread Fred Martin
hahah! I finished my "interacting with Google Drive via Racket" experiment. Basically, it recursively collects subfolders, and then lets you issue a search query over all of them at once. If anyone wants to check it out, the code is here: https://github.com/fgmart/google-drive-racket. I remov

Re: [racket-users] DrRacket Coverage

2016-02-15 Thread 'John Clements' via Racket Users
> On Feb 15, 2016, at 2:00 PM, Robby Findler > wrote: > > I mean (c). I think (b) means "nothing ran" (right?). And I'm asking > if (c) is preferable to adding a "congrats!" note to the current > behavior. > > And I'm asking this as two questions, one about "the racket language" > and one abou

Re: [racket-users] DrRacket Coverage

2016-02-15 Thread Jens Axel Søgaard
2016-02-14 19:09 GMT+01:00 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 p

Re: [racket-users] DrRacket Coverage

2016-02-15 Thread Robby Findler
I mean (c). I think (b) means "nothing ran" (right?). And I'm asking if (c) is preferable to adding a "congrats!" note to the current behavior. And I'm asking this as two questions, one about "the racket language" and one about the HtDP languages. Robby On Mon, Feb 15, 2016 at 3:50 PM, 'John Cle

Re: [racket-users] DrRacket Coverage

2016-02-15 Thread 'John Clements' via Racket Users
> On Feb 15, 2016, at 1:24 PM, Robby Findler > wrote: > > Do you also prefer that to just showing everything colored? To make sure I understand you (or the reverse); I’m suggesting that for a correctly covered program, the resulting program would be colored in the same way that it currently

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

2016-02-15 Thread Neil Van Dyke
Nota Poin wrote on 02/15/2016 03:57 PM: java bytecode is anything but inscrutable. There have even been decompilers written for it, as much as developers have tried to push them out of existence. It's basically assembly language, It already literally was in the '90s. http://www.neilvandyke.

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

2016-02-15 Thread Saša Janiška
Gustavo Massaccesi writes: > One advantage of JS is tht you can run it in every browser in every > computer in the word. Right, but, isn't it that Racket's GUI work in, at least, every major platform (Linux/BSD, Mac, Windows) using platform's native toolkit, which is quite sufficient for me? S

Re: [racket-users] DrRacket Coverage

2016-02-15 Thread Robby Findler
Do you also prefer that to just showing everything colored? Robby On Mon, Feb 15, 2016 at 3:06 PM, 'John Clements' via Racket Users wrote: >> >> I think that by the time they work hard to cover everything and the >> coverage colors disappear they quickly jump to a conclusion that >> something i

Re: [racket-users] DrRacket Coverage

2016-02-15 Thread 'John Clements' via Racket Users
> > I think that by the time they work hard to cover everything and the > coverage colors disappear they quickly jump to a conclusion that > something is wrong. -- I even have the server report to them about > uncovered code, but even that doesn't help. > > In case it wasn't clear -- this is not

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

2016-02-15 Thread Nota Poin
On Monday, February 15, 2016 at 5:43:38 PM UTC, Ryan Culpepper wrote: > The macro should use `local-expand` rather than `expand`. See the docs > for `local-expand`, since it takes more arguments. I would guess you > probably want to pass along `(syntax-local-context)` and use an empty > stop lis

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

2016-02-15 Thread Nota Poin
On Monday, February 15, 2016 at 8:50:31 PM UTC, Matthew Butterick wrote: > https://en.wikipedia.org/wiki/Blue_Flame_(automobile) Oh, that's beautiful. -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop recei

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

2016-02-15 Thread Gustavo Massaccesi
On Mon, Feb 15, 2016 at 6:26 AM, Saša Janiška wrote: > "Jos Koot" writes: > > Hello Jos, > >> I am a Racket-using hobbyist. It surprises me that, according to the >> observation, not many hobbyists are using Racket. > > Seeing so much proliferation of JS crap it looks like people are really > goi

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

2016-02-15 Thread Nota Poin
On Monday, February 15, 2016 at 3:29:23 PM UTC, Neil Van Dyke wrote: > Nota Poin wrote on 02/15/2016 05:40 AM: > You seem to be itemizing complaints that come to your mind, Sorry, I shouldn't have been complaining. > but I don't > see how all of them are responding to the question you quoted, of

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

2016-02-15 Thread Matthew Butterick
It's a question of perspective. A rocket-powered tricycle held the land speed record for 13 years. https://en.wikipedia.org/wiki/Blue_Flame_(automobile) On Feb 15, 2016, at 12:32 PM, Robby Findler wrote: > On Mon, Feb 15, 2016 at 2:29 PM, Matthew Butterick wrote: >> On Monday, February 15, 2

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

2016-02-15 Thread Robby Findler
On Mon, Feb 15, 2016 at 2:29 PM, Matthew Butterick wrote: > On Monday, February 15, 2016 at 2:40:29 AM UTC-8, Nota Poin wrote: > >> Too powerful. It's a language that can define new languages from whole >> cloth. It's a compiler of compilers. It's like trying to use a jet engine to >> propel you

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

2016-02-15 Thread Matthew Butterick
On Monday, February 15, 2016 at 2:40:29 AM UTC-8, Nota Poin wrote: > Too powerful. It's a language that can define new languages from whole cloth. > It's a compiler of compilers. It's like trying to use a jet engine to propel > your tricycle. I would rather have a jet engine for my tricycle tha

Re: [racket-users] preserve objects created in REPL after adding/changing proc definitions?

2016-02-15 Thread Neil Van Dyke
Fred Martin wrote on 02/15/2016 12:21 PM: https://docs.racket-lang.org/reference/serialization.html, which allowed me to save my object in my definitions buffer along Neil's suggestion. :) Be aware that the serialize format is Racket-version-specific, so implications for serialized values pas

Re: [racket-users] Re: Debug help with Unix Write

2016-02-15 Thread Ryan Culpepper
On 02/12/2016 07:33 PM, Ty Coghlan wrote: Both of you were correct, I had to flush my output and newline terminate it. The final result looks like: (define (broadcast source destination type message port) (let ([h (hash 'source source 'dest destination 'type type 'message me

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

2016-02-15 Thread Ryan Culpepper
On 02/14/2016 12:02 PM, Fred Martin wrote: 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 supp

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

2016-02-15 Thread Ryan Culpepper
On 02/14/2016 11:07 PM, Nota Poin wrote: I suppose I could do something like this: (define-syntax (transform-post-expansion stx) (syntax-case (expand stx) () (...))) The macro should use `local-expand` rather than `expand`. See the docs for `local-expand`, since it takes more argumen

Re: [racket-users] preserve objects created in REPL after adding/changing proc definitions?

2016-02-15 Thread Fred Martin
Matt Jadud pointed me at https://docs.racket-lang.org/reference/serialization.html, which allowed me to save my object in my definitions buffer along Neil's suggestion. :) Greg, I tried un-checking the "enforce constant definitions" box and after restarting DrRacket, it now allows me to copy-pa

Re: [racket-users] preserve objects created in REPL after adding/changing proc definitions?

2016-02-15 Thread Greg Hendershott
p.s. Actually DrRacket probably won't give you that redef error if in the Language dialog you un-check "Enforce constant definitions (enables some inlining)". So then you could copy and paste the new function def from definitions to interactions. On Mon, Feb 15, 2016 at 11:48 AM, Greg Hendershott

Re: [racket-users] preserve objects created in REPL after adding/changing proc definitions?

2016-02-15 Thread Greg Hendershott
Well, racket-mode embraces the DrRacket approach that a Run will reset the REPL environment to match your source files. I love the sanity provided by this, plus having real modules, not just "load". When I write Emacs Lisp or Clojure, eventually I need to restart or do an external byte-compile, t

Re: [racket-users] preserve objects created in REPL after adding/changing proc definitions?

2016-02-15 Thread Matthias Felleisen
On Feb 15, 2016, at 11:25 AM, Fred Martin wrote: > Hi Neil, thanks. > > In my case presently, "long-computation" is gathering up results from a bunch > of net queries, and the result is a list of hash objects. > > I don't think your suggestion will work for this? > > Also the nature of your

Re: [racket-users] preserve objects created in REPL after adding/changing proc definitions?

2016-02-15 Thread Neil Van Dyke
Fred Martin wrote on 02/15/2016 11:25 AM: In my case presently, "long-computation" is gathering up results from a bunch of net queries, and the result is a list of hash objects. Does this (either one) do what you want? (define important-object (list (make-hash '((a . 1) (b

Re: [racket-users] preserve objects created in REPL after adding/changing proc definitions?

2016-02-15 Thread Fred Martin
Hi Neil, thanks. In my case presently, "long-computation" is gathering up results from a bunch of net queries, and the result is a list of hash objects. I don't think your suggestion will work for this? Also the nature of your suggestion is making me nervous that I'm asking for something that'

Re: [racket-users] preserve objects created in REPL after adding/changing proc definitions?

2016-02-15 Thread Neil Van Dyke
If the pertinent value of `important-object` can be represented in Racket space without performing `long-computation` (such as in `read`-able structures, or with constructors and hard-earned constants), sometimes I run `long-computation` once, copy&paste the result to a variable assignment in t

[racket-users] preserve objects created in REPL after adding/changing proc definitions?

2016-02-15 Thread Fred Martin
This may be a silly question. Suppose I do something in the REPL that takes a while to compute: (define important-object (long-computation)) and now I want to write new procedures (or modify existing ones) that will work with important-object. Is there any way to do this? If I change code in

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

2016-02-15 Thread Neil Van Dyke
Nota Poin wrote on 02/15/2016 05:40 AM: > [...] You seem to be itemizing complaints that come to your mind, but I don't see how all of them are responding to the question you quoted, of "how is it that such Wonderland is not discovered by much more people?" For example, this sounds like you'r

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

2016-02-15 Thread Matthias Felleisen
Dear Nota Poin, thanks for your thoughts. If Racket is such a mess for you, why do you bother to participate here? Do you find anything attractive about it or is someone putting a "gun to your head" and says "use it"? As for your specific pain points, some are right on, some show an understa

Re: [racket-users] do loops

2016-02-15 Thread JJ
> it only requires O(log n) on a (balanced) search tree: sorry, O(log n) for conttains? and O(n log n) in total -- 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 it, send an email to

Re: [racket-users] do loops

2016-02-15 Thread JJ
Right, but evaluating tree-size is O(n), even with a binary search tree. Doing this on each insertion is slow. The following is a possible solution without "do", and it only requires O(log n) on a (balanced) search tree: (define tree5 (let loop ([tree null] [n 5]) (define x (random 10))

Re: [racket-users] do loops

2016-02-15 Thread Robby Findler
Or if you know that there are only 10 candidates, you can just iterate over (a prefix of) this list: (shuffle (build-list 10 values)) Robby On Mon, Feb 15, 2016 at 8:37 AM, Tony Garnock-Jones wrote: > If your "insert" is idempotent, and you have some means of measuring > tree size, you can el

Re: [racket-users] do loops

2016-02-15 Thread Tony Garnock-Jones
If your "insert" is idempotent, and you have some means of measuring tree size, you can eliminate i, c and x: (define tree4 (do ([tree null (insert tree (random 10))]) [(>= (tree-size tree) 5) tree])) I arrived at this by considering doing something similar for sets: (define tree4 (do ([

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

2016-02-15 Thread Nota Poin
On Saturday, February 13, 2016 at 5:35:09 PM UTC, Saša Janiška wrote: > So, at the end I just wonder how is it that such Wonderland is not > discovered by much more people? Startup is slow. Intractable problem, JIT compiling just takes time, and can't be cached beforehand. Like with pypy vs cpyth

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

2016-02-15 Thread Saša Janiška
Richard Cleis writes: > - To claim progress, most people want to make only minimum changes to > their way of doing things. > > - To claim progress, most people do not want to make any change at all > to their way of *thinking* about things. So true - obstacle to the change! > I enjoy the freedo

[racket-users] Generic dipatch and multi-methods options in DrRacket

2016-02-15 Thread Alexey Cherkaev
Hi all, I have seen (and used) generic interfaces for structures in Racket. However, they are limited to the same degree as message-passing OOP is limited: the dispatch is based on one argument only. I know there is Swindle (is it still active?) and I could find GLS in packages for DrRacket. I

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

2016-02-15 Thread Saša Janiška
"Jos Koot" writes: Hello Jos, > I am a Racket-using hobbyist. It surprises me that, according to the > observation, not many hobbyists are using Racket. Seeing so much proliferation of JS crap it looks like people are really going insane. :-) > I did programming in a lot of languages, assemble