[racket] Am I Missing Something? [HtDP 31.3.1]

2011-01-03 Thread Luke Jordan
When I run the plain recursive vs. the accumulator version of sum with g-series, I get the same result, which the text says isn't supposed to happen. Code attached. What am I missing? Luke 31.3.1.rkt Description: Binary data _ For list-related

Re: [racket] clean up after stateless servlets

2011-01-03 Thread Jay McCarthy
The */forget functions delete continuations from the server table. There is no server table for stateless servlets[*], so those functions don't do anything extra. You could use server state on your own to do something similar. Jay [*] Actually they do, but that's just for the native components, e

[racket] clean up after stateless servlets

2011-01-03 Thread Stefan Schmiedl
Final question for today: Are stateless servlets supposed to be "forgettable"? Using stateful servlets I can use e.g. redirect/get/forget to render a concluded "session" (relatively) inaccessible. Is there a similar mechanism for stateless servlets that I am just not seeing? Thanks, s. _

Re: [racket] Key Shortcuts

2011-01-03 Thread Stephen Chang
In Windows, esc-ctrl-; comments and esc-ctrl-= uncomments This is for emacs keybindings mode. I dont know if it works when emacs keybindings are off. On Mon, Jan 3, 2011 at 10:30 AM, Greg Hendershott wrote: > In other words there aren't shortcut keys ("accelerators") per se > bound to thes

Re: [racket] to local or not to local

2011-01-03 Thread Stefan Schmiedl
On Mon, 3 Jan 2011 12:20:51 -0500 Matthias Felleisen wrote: > > On Jan 3, 2011, at 12:18 PM, Stefan Schmiedl wrote: > > > Is there a coding style guideline for racket? A place where > > questions like this one are answered already? > > > I have had five pages for two months now ... Next time

Re: [racket] to local or not to local

2011-01-03 Thread Matthias Felleisen
On Jan 3, 2011, at 12:18 PM, Stefan Schmiedl wrote: > Is there a coding style guideline for racket? A place where > questions like this one are answered already? I have had five pages for two months now ... Next time I come up for air I'll air it on 'dev' _

Re: [racket] stateless servlets problem

2011-01-03 Thread Stefan Schmiedl
On Mon, 3 Jan 2011 16:14:01 + Noel Welsh wrote: > On Mon, Jan 3, 2011 at 3:13 PM, Stefan Schmiedl wrote: > > Is there a public (readonly) repository somewhere > > that I could tap into? > > https://github.com/plt/racket > Thanks, s. _ For

Re: [racket] to local or not to local

2011-01-03 Thread Stefan Schmiedl
On Mon, 3 Jan 2011 11:33:19 -0500 Matthias Felleisen wrote: > There is. An experienced programmer (*) should go with the second form. > > (*) someone who can handle error messages and subtle changes to them. hehe ... sounds like a challenge :-) I'll be a good boy then, and use local from now

Re: [racket] to local or not to local

2011-01-03 Thread Robby Findler
FWIW, there have been some (somewhat) recent changes to the way internal definitions work that make them behave much better. In particular, if you have a bunch of internal definitions with expressions interspersed, then they all go in the same (recursive) scope. Robby On Mon, Jan 3, 2011 at 10:33

Re: [racket] to local or not to local

2011-01-03 Thread Matthias Felleisen
On Jan 3, 2011, at 11:31 AM, Stefan Schmiedl wrote: > Hi. > > In the web-server related documentation, I see the preferred way to > create local procedures as > > (define (start request) >(local ((define (response-generator...)) >(define (some-handler...))) > (do-something

[racket] to local or not to local

2011-01-03 Thread Stefan Schmiedl
Hi. In the web-server related documentation, I see the preferred way to create local procedures as (define (start request) (local ((define (response-generator...)) (define (some-handler...))) (do-something-with-these))) Another way to create local procedures is (define

Re: [racket] stateless servlets problem

2011-01-03 Thread Noel Welsh
On Mon, Jan 3, 2011 at 3:13 PM, Stefan Schmiedl wrote: > Is there a public (readonly) repository somewhere > that I could tap into? https://github.com/plt/racket N. _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/

Re: [racket] Key Shortcuts

2011-01-03 Thread Greg Hendershott
In other words there aren't shortcut keys ("accelerators") per se bound to these commands. But you can use the keyboard to choose an item from a menu, as usual in Windows. (This is the one biggest thing I miss when I'm using OS X. (No, pressing C+F2 arrow arrow arrow arrow ... isn't the same :) )).

Re: [racket] stateless servlets problem

2011-01-03 Thread Stefan Schmiedl
On Mon, 3 Jan 2011 07:04:23 -0700 Jay McCarthy wrote: > I've dug into this deeper and it turns out that it is an error in the > Web Server. Yay, I've still got it :-) I am good at stumbling upon errors whenever I try something new ... > The code that sets up servlets abuses the fact that the

Re: [racket] CGC embedding on win64

2011-01-03 Thread Matthew Flatt
At Mon, 03 Jan 2011 10:25:25 +0100, ugo wrote: > Thanks a lot! > > I was able to make the racket embedding code work... > > ...but now I have another problem: When I try to call scheme_basic_env() > the program crashes with an access violation error (reading location 0x0 > so it's probably due

Re: [racket] stateless servlets problem

2011-01-03 Thread Jay McCarthy
I've dug into this deeper and it turns out that it is an error in the Web Server. The code that sets up servlets abuses the fact that the servlet dispatcher sets the exit-handler in a particular way (that is actually a violation of its unchecked contract.) I've made a fix and will push it shortly.

Re: [racket] stateless servlets problem

2011-01-03 Thread Jay McCarthy
Ya, this is the suggested way to do it. Jay 2011/1/2 Stefan Schmiedl : > On Sun, 2 Jan 2011 19:23:42 +0100 > Stefan Schmiedl wrote: > > For now I'm content with having a web server that can serve >> static files, call functions to handle requests or dispatch to different >> (kinds of) servlets.

Re: [racket] CGC embedding on win64

2011-01-03 Thread ugo
Thanks a lot! I was able to make the racket embedding code work... ...but now I have another problem: When I try to call scheme_basic_env() the program crashes with an access violation error (reading location 0x0 so it's probably due to a NULL pointer). I cannot perform any further debugging b

Re: [racket] Running in browser "counter.rkt"

2011-01-03 Thread Juan J . Carreón G .
Thanks! 2011/1/2 Danny Yoo > > > Mont requires exactly Racket > > Darn the android keyboard autocorrect... that's "Moby", not Mont. Sorry! > _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/users