Re: [racket] DrRacket custom color schemes?

2010-07-18 Thread Robby Findler
There is not right now. There are really only the white-on-black and vice versa. And, sadly, the way the code is organized there is only a Boolean preference (ie there is not a table of colors in a single place). Robby On Saturday, July 17, 2010, Byron Gibson wrote: > Hi all, is it possible to a

[racket] hash-ref

2010-07-18 Thread Jos Koot
(hash-ref a-hash a-key a-value) In the past a-value was required to be a procedure. Now it can be anything. Nice. Two caveats though. 1. If the value of a-value happens to be a procedure to be stored, it may unintentionally be called. 2. a-value may be an expresssion that takes much computation.

Re: [racket] hash-ref

2010-07-18 Thread Robby Findler
It is for performance reasons. Specifically you can avoid creating the procedure over and over (if you're calling hash-ref over and over). Robby On Sunday, July 18, 2010, Jos Koot wrote: > > > > > > (hash-ref > a-hash a-key a-value) > In the past > a-value was required to be a procedure. > Now i

Re: [racket] DrRacket custom color schemes?

2010-07-18 Thread Byron Gibson
Thanks Robby. I actually just discovered a nice feature in Compiz: [Super]-[n]. It inverts the colors of the focused window. Using it on DrRacket gives it a nice dark-background color scheme with readable syntax highlighting. Problem solved :) Byron On Sun, Jul 18, 2010 at 2:41 AM, Robby Find

Re: [racket] DrRacket custom color schemes?

2010-07-18 Thread Laurent
On Sun, Jul 18, 2010 at 19:45, Byron Gibson wrote: > Thanks Robby. I actually just discovered a nice feature in Compiz: > [Super]-[n]. It inverts the colors of the focused window. Using it > on DrRacket gives it a nice dark-background color scheme with readable > syntax highlighting. Problem

Re: [racket] DrRacket custom color schemes?

2010-07-18 Thread Robby Findler
Well, there is a white on black color scheme already in drracket. I'm not sure how it compares with what you've done, but if you open the preferences dialog and go to the colors tab, you'll find a button that sets the color scheme. Robby On Sun, Jul 18, 2010 at 12:45 PM, Byron Gibson wrote: > Th

Re: [racket] DrRacket custom color schemes?

2010-07-18 Thread Neil Van Dyke
> On Saturday, July 17, 2010, Byron Gibson > wrote: >> Hi all, is it possible to add custom syntax highlighting color schemes >> to DrRacket? For example, the popular zenburn theme? I played with this briefly last night. You can indeed implement something like zenburn

[racket] dumping or forking racket processes

2010-07-18 Thread Neil Van Dyke
Thinking about long-running servers... Has anyone looked into core-dumping a Racket process image so that it can be loaded as a new process quickly (a la Emacs)? Or looked into forking a pool of Racket processes (a la Apache) to use process isolation to be resilient in case of problems like me

Re: [racket] DrRacket custom color schemes?

2010-07-18 Thread Robby Findler
On Sun, Jul 18, 2010 at 1:37 PM, Neil Van Dyke wrote: >> On Saturday, July 17, 2010, Byron Gibson wrote: >>> Hi all, is it possible to add custom syntax highlighting color schemes >>> to DrRacket?  For example, the popular zenburn theme? > > I played with this briefly last night.  You can indeed

Re: [racket] DrRacket custom color schemes?

2010-07-18 Thread Byron Gibson
Thanks Neil, Robby, and Laurent. Those several good options to play with. The default white on black is good enough that I don't need something specialized like zenburn, but will revisit this after I've worked through HTDP and know Scheme and the environment better. Much appreciated. Byron On S

[racket] HTDP.org solutions access?

2010-07-18 Thread Byron Gibson
Does anyone know if it's possible for someone who is not a teacher (nor an enrolled student) to get access to the HTDP.org solution website? http://htdp.org/2003-09-26/Solutions/ It's only available to teachers, but I'm a web developer working my way through HTDP.org in my spare time. Several ti

Re: [racket] dumping or forking racket processes

2010-07-18 Thread Matthew Flatt
At Sun, 18 Jul 2010 14:43:58 -0400, Neil Van Dyke wrote: > Thinking about long-running servers... Has anyone looked into > core-dumping a Racket process image so that it can be loaded as a new > process quickly (a la Emacs)? Long ago. I gave up after a while, but maybe someone who knows more co

Re: [racket] hash-ref

2010-07-18 Thread Jos Koot
Ha, that makes sense. I had the (apparently wrong) idea that a thunk would be compiled to a ready to use procedure and would be immediately available at run time. Thanks. Jos > -Original Message- > From: robby.find...@gmail.com > [mailto:robby.find...@gmail.com] On Behalf Of Robby Findle

Re: [racket] hash-ref

2010-07-18 Thread Matthew Flatt
Actually, you're right. A `lambda' form like (lambda () #f) that doesn't close over anything will compile to a constant. There is some function-call overhead when crossing the boundary from the run-time system back to the JIT-code world, and that was partly the motivation for special-casing non

Re: [racket] hash-ref

2010-07-18 Thread Jos Koot
Now consider: (let ((var ...)) ... (hash-ref hash key (lambda () var)) Do I understand well that this thunk is not cq cannot be compiled to a constant? When compiling the thunk, the location of var relative to the top of the stack is known, is it not? Thanks, Jos > -Original Message-

Re: [racket] HTDP.org solutions access?

2010-07-18 Thread Matthias Felleisen
The solutions are available for teachers who dont have time to make up new exercises every year. If you are unsure about a solution, it is acceptable to ask questions on this list. It is a bad idea, though, to post a (guess at a) solution and to ask "is this it." -- Matthias On Jul 18,

Re: [racket] hash-ref

2010-07-18 Thread Robby Findler
With a sufficiently clever compiler, that could be turned into (hash-ref hash key var) but I don't think that we have that clever a compiler. Without the ability to pass an explicit key like that at all, I think you'd be stuck, regardless. Robby On Sun, Jul 18, 2010 at 3:55 PM, Jos Koot wrote: >

Re: [racket] hash-ref

2010-07-18 Thread Matthew Flatt
At Sun, 18 Jul 2010 22:55:44 +0200, "Jos Koot" wrote: > Now consider: > > (let ((var ...)) > ... > (hash-ref hash key (lambda () var)) > > Do I understand well that this thunk is not cq cannot be compiled to a > constant? Correct. > When compiling the thunk, the location of var relative to th

Re: [racket] hash-ref

2010-07-18 Thread Jos Koot
Robby and Matthew, Thanks, I understand, I think. Jos _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/users

Re: [racket] hash-ref

2010-07-18 Thread Neil Van Dyke
Jos Koot wrote at 07/18/2010 09:26 AM: (hash-ref a-hash a-key a-value) In the past a-value was required to be a procedure. Now it can be anything. [...] In short, I do not well understand the reason to relax the contract of hash-ref and hash-ref!. This behavior seems a little on the uncomfo

Re: [racket] hash-ref

2010-07-18 Thread Jos Koot
I am not sure it is a good idea to add many almost-synonyms in a language. I just was a little bit curious. The change is backward compatible and I have no objections against it. Indeed values to be inserted for missing keys often are #f or 0 or '( ). It types nicely not having to wrap these basic

Re: [racket] hash-ref

2010-07-18 Thread Robby Findler
I believe that each syntactic occurrence of the identity function is created separately, but maybe there is a special case for that one. (You can always use 'values' if you want them to be identical.) But I believe that only thunks are treated specially, not functions of one argument. Robby On S

Re: [racket] HTDP.org solutions access?

2010-07-18 Thread Byron Gibson
Thanks Mattais, I certainly appreciate this list being so responsive and helpful. And I definitely wouldn't post guesses asking for the answer, since I'm spending my own time to really learn the material, not just pass a course. It's just a less efficient workflow to post my solutions to the list

Re: [racket] HTDP.org solutions access?

2010-07-18 Thread Todd O'Bryan
What you discover as you get farther through the book is that the answers sometimes aren't there, because the only people who've taught those sections don't need them. :-) If you're stuck or want feedback on a bunch of functions at once, post a note to the list and often someone will offer to look