Re: [racket] racket/db - query-rows: connection is permanently locked due to a terminated thread

2012-02-01 Thread Ryan Culpepper
On 02/01/2012 10:09 PM, Curtis Dutton wrote: I'm receiving this error after my webserver is running for a few days. Hosting a plt webserver on Ubuntu server, I'm using the racket/db library to access a local postgres database. After a few hundred requests, over a period of days, I eventually get

Re: [racket] macros in local namespaces?...

2012-02-01 Thread Rüdiger Asche
Thanks for the fast and on-the-spot response! Is there a way to run the preprocessor only so that I can see what code that construction expands to before being passed to the read-eval loop? - Original Message - From: "Matthias Felleisen" To: "Rüdiger Asche" Cc: Sent: Wednesday, Fe

[racket] racket/db - query-rows: connection is permanently locked due to a terminated thread

2012-02-01 Thread Curtis Dutton
I'm receiving this error after my webserver is running for a few days. Hosting a plt webserver on Ubuntu server, I'm using the racket/db library to access a local postgres database. After a few hundred requests, over a period of days, I eventually get this error message. "query-rows: connection is

Re: [racket] exercise problem

2012-02-01 Thread Matthias Felleisen
On Feb 1, 2012, at 1:55 PM, Roelof Wobben wrote: > So in my opion I can solve this at this way : > > > grosspay = hours_work * 12,5 > tax = grosspay * 0,15 > netpay = grosspay - tax. > > So I did this : > > (define (grosspay h) > (* h 12.50)) > > (define (tax grosspay) >( * grosspay 0.

[racket] exercise problem

2012-02-01 Thread Roelof Wobben
Hello, I have this problem : Utopia's tax accountants always use programs that compute income taxes even though the tax rate is a solid, never-changing 15%. Define the program tax, which determines the tax on the gross pay. Also define netpay. The program determines the net pay of an employee f

Re: [racket] macros in local namespaces?...

2012-02-01 Thread Ryan Culpepper
On 02/01/2012 09:45 AM, Rüdiger Asche wrote: Hi there, I'm trying to get a grip on macros. Here is a very simple Racket expression (1): (letrec [(a 2) (b 3) (afn (lambda (x) (+ x a))) (bfn (lambda (x) (+ x b)))] (afn (bfn 2))) Now I need a syntactic abstraction

Re: [racket] macros in local namespaces?...

2012-02-01 Thread Matthias Felleisen
Something like this might be what you want: (letrec-syntaxes+values ([(absfn) (syntax-rules () [(_ varname) (lambda (x) (+ (+ x localc) varname))])]) ([(a) 2] [(b) 3] [(localc) 4] [(afn) (absfn a)] [(bfn) (absfn b)]) (afn (bf

[racket] macros in local namespaces?...

2012-02-01 Thread Rüdiger Asche
Hi there, I'm trying to get a grip on macros. Here is a very simple Racket expression (1): (letrec [(a 2) (b 3) (afn (lambda (x) (+ x a))) (bfn (lambda (x) (+ x b)))] (afn (bfn 2))) Now I need a syntactic abstraction for afn and bfn. The following will do in

Re: [racket] POP3 client

2012-02-01 Thread Matthias Felleisen
Would this work: http://docs.racket-lang.org/net/pop3.html?q=pop3 (In general, type 'pop3' in DrRacket and hit F1. Or 'raco doc pop3' in a shell.) On Feb 1, 2012, at 9:37 AM, Stefan Schmiedl wrote: > Greetings, > > is there a POP3 client module for racket somewhere out there? > > Thanks

[racket] POP3 client

2012-02-01 Thread Stefan Schmiedl
Greetings, is there a POP3 client module for racket somewhere out there? Thanks, s. -- "This is why Science and Mathematics are still much fun: You discover things that seem impossible to be true and then get to figure out why it's impossible for them not to be." -- Vi Hart: Spiral

Re: [racket] text-field% isn't just for string input, but for output and numbers too!

2012-02-01 Thread Matthew Flatt
At Wed, 01 Feb 2012 11:04:36 +0100, Marijn wrote: > On 30-01-12 19:08, Matthew Flatt wrote: > > A note on alignment: > > > > The `text%' class supports 'right and 'center paragraph alignment, > > which more or less works when the editor has a maximum width. (The > > docs have some caveats.) > >

Re: [racket] text-field% isn't just for string input, but for output and numbers too!

2012-02-01 Thread Marijn
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 30-01-12 19:08, Matthew Flatt wrote: > A note on alignment: > > The `text%' class supports 'right and 'center paragraph alignment, > which more or less works when the editor has a maximum width. (The > docs have some caveats.) > > So, you can get