Re: [racket] universe program using 100% cpu on Mac (also poor Raspberry Pi performance)

2014-12-29 Thread Darren Cruse
Hi Matthias just saw your reply. Regarding the tests I like what you said about "for a large function -- a reader quickly gets the idea of how the function works from reading some tests". But if I'm honest the example that you gave is the kind of example that bothers me - in that it's *not* a lar

Re: [racket] at-exp: is there any way to make it turn @list{A @"string" escape} into (list "A " "string" " escape") ?

2014-12-29 Thread Alexander D. Knauth
On Dec 29, 2014, at 9:36 PM, Eli Barzilay wrote: > On Tue, Dec 30, 2014 at 3:24 AM, Alexander D. Knauth > wrote: >> That's part of it, but I also want to be able to have string arguments >> print as values with the ""s, and also be able to do stuff like: >> @my-format{some stuff >> <~

Re: [racket] at-exp: is there any way to make it turn @list{A @"string" escape} into (list "A " "string" " escape") ?

2014-12-29 Thread Eli Barzilay
On Tue, Dec 30, 2014 at 3:24 AM, Alexander D. Knauth wrote: > > My code don't actually do any format-string parsing, it does (format > str) inside a with-handlers and if it succeeds it knows it takes 0 > arguments, and if it fails it looks at the error message. (Well, yes, that's robust, but...)

Re: [racket] web server stopped responding to TCP connections

2014-12-29 Thread George Neuner
On 12/29/2014 6:52 PM, Tony Garnock-Jones wrote: On 12/29/2014 06:30 PM, Neil Van Dyke wrote: > Maybe someone who has the problem could use JMeter (or "ab", or similar) > to pound the server and reproduce the failure quickly, under debugging > conditions? I've tried ab on it: - many-requests

Re: [racket] universe program using 100% cpu on Mac (also poor Raspberry Pi performance)

2014-12-29 Thread Matthias Felleisen
TESTS: Say I want to eliminate a common pattern from your handle-key-down function. If it comes with some tests, four to be precise, a simple run -- without playing -- assures me of basic qualities. If you express tests like those below and you formulate them first, you get an idea of how to co

Re: [racket] at-exp: is there any way to make it turn @list{A @"string" escape} into (list "A " "string" " escape") ?

2014-12-29 Thread Alexander D. Knauth
On Dec 29, 2014, at 7:44 PM, Eli Barzilay wrote: > On Tue, Dec 30, 2014 at 1:55 AM, Alexander D. Knauth > wrote: >> >>> @~a{x is @x and y is @y}) >> >> But this doesn't work for values like images, syntax-objects, >> mixed-numbers, etc. that can't be converted to strings properly, > > Yes -

Re: [racket] at-exp: is there any way to make it turn @list{A @"string" escape} into (list "A " "string" " escape") ?

2014-12-29 Thread Alexander D. Knauth
On Dec 29, 2014, at 7:43 PM, Eli Barzilay wrote: > On Tue, Dec 30, 2014 at 1:01 AM, Alexander D. Knauth > wrote: >> >> On Dec 29, 2014, at 4:53 PM, Eli Barzilay wrote: >> >>> And you can probably also run into surprises when some argument >>> evaluates to a string that has ~s in it. >> >> N

Re: [racket] web server stopped responding to TCP connections

2014-12-29 Thread George Neuner
Hi Tony, On 12/29/2014 6:21 PM, Tony Garnock-Jones wrote: On 12/29/2014 04:09 PM, George Neuner wrote: > Over the weekend my webserver application suddenly stopped responding to > TCP connections. It was following a large spate of broken connections > caused by debugging an issue on the browser

Re: [racket] at-exp: is there any way to make it turn @list{A @"string" escape} into (list "A " "string" " escape") ?

2014-12-29 Thread Eli Barzilay
On Tue, Dec 30, 2014 at 1:03 AM, Greg Hendershott wrote: >> But most of all, IMO it sounds like a bad idea since it tries to fight >> the natural mixed-text-and-expressions and bend it into a >> format-string-like thing. I'd go with something that avoids that and >> uses @-expressions more natura

Re: [racket] at-exp: is there any way to make it turn @list{A @"string" escape} into (list "A " "string" " escape") ?

2014-12-29 Thread Eli Barzilay
On Tue, Dec 30, 2014 at 1:01 AM, Alexander D. Knauth wrote: > > On Dec 29, 2014, at 4:53 PM, Eli Barzilay wrote: > >>@my-error['x]{blah blah >>blah blah ~v >>@|"something"|} > > Yes this would be bad, but part of the whole point of this is that I > want

Re: [racket] at-exp: is there any way to make it turn @list{A @"string" escape} into (list "A " "string" " escape") ?

2014-12-29 Thread Alexander D. Knauth
On Dec 29, 2014, at 6:03 PM, Greg Hendershott wrote: >> But most of all, IMO it sounds like a bad idea since it tries to fight >> the natural mixed-text-and-expressions and bend it into a >> format-string-like thing. I'd go with something that avoids that and >> uses @-expressions more naturall

Re: [racket] web server stopped responding to TCP connections

2014-12-29 Thread Tony Garnock-Jones
On 12/29/2014 06:30 PM, Neil Van Dyke wrote: > Maybe someone who has the problem could use JMeter (or "ab", or similar) > to pound the server and reproduce the failure quickly, under debugging > conditions? I've tried ab on it: - many-requests doesn't seem to provoke the fault; - rapid-requests

Re: [racket] web server stopped responding to TCP connections

2014-12-29 Thread Neil Van Dyke
Hopefully others who've had this or related problems speak up too! Maybe someone who has the problem could use JMeter (or "ab", or similar) to pound the server and reproduce the failure quickly, under debugging conditions? Neil V. Racket Users list: http://lists.rac

Re: [racket] web server stopped responding to TCP connections

2014-12-29 Thread Tony Garnock-Jones
On 12/29/2014 04:09 PM, George Neuner wrote: > Over the weekend my webserver application suddenly stopped responding to > TCP connections. It was following a large spate of broken connections > caused by debugging an issue on the browser side. Great! I, too, have spotted this problem in at least

Re: [racket] Cannot reproduce example in "Getting Started with Documentation"

2014-12-29 Thread Matthew Flatt
At Mon, 29 Dec 2014 22:56:36 +, Stuart McLuckie wrote: > I can't to reproduce the Scribble example in section 4.1.4 of "Getting > Started with Documentation". The procedure 'my-helper' is undefined in > the html output: > " > Examples: > >(my-helper'()) > my-helper: undefined;

Re: [racket] at-exp: is there any way to make it turn @list{A @"string" escape} into (list "A " "string" " escape") ?

2014-12-29 Thread Greg Hendershott
> But most of all, IMO it sounds like a bad idea since it tries to fight > the natural mixed-text-and-expressions and bend it into a > format-string-like thing. I'd go with something that avoids that and > uses @-expressions more naturally, as in: > > @my-error['f]{message >

Re: [racket] at-exp: is there any way to make it turn @list{A @"string" escape} into (list "A " "string" " escape") ?

2014-12-29 Thread Alexander D. Knauth
On Dec 29, 2014, at 4:53 PM, Eli Barzilay wrote: > On Mon, Dec 29, 2014 at 3:03 AM, Alexander D. Knauth > wrote: >>> ... this is generally a bad idea. What do you do when you want the >>> @"..." escapes? How do you find out which parts of the input are >>> arguments and which are part of the

[racket] Cannot reproduce example in "Getting Started with Documentation"

2014-12-29 Thread Stuart McLuckie
I can't to reproduce the Scribble example in section 4.1.4 of "Getting Started with Documentation". The procedure 'my-helper' is undefined in the html output: " Examples: (my-helper'()) my-helper: undefined; cannot reference undefined identifier >(my-helper'(cowssuchremarkabl

Re: [racket] at-exp: is there any way to make it turn @list{A @"string" escape} into (list "A " "string" " escape") ?

2014-12-29 Thread Eli Barzilay
On Mon, Dec 29, 2014 at 3:03 AM, Alexander D. Knauth wrote: > > (But DrRacket colors the second one red, is that a bug?) (It uses a different parses, so it might not parse that part right.) > > ... this is generally a bad idea. What do you do when you want the > > @"..." escapes? How do you f

[racket] web server stopped responding to TCP connections

2014-12-29 Thread George Neuner
Hi all, Using 6.0.1. Over the weekend my webserver application suddenly stopped responding to TCP connections. It was following a large spate of broken connections caused by debugging an issue on the browser side. In mucking with the browser JS code I was repeatedly interrupting handling a

Re: [racket] universe program using 100% cpu on Mac (also poor Raspberry Pi performance)

2014-12-29 Thread Darren Cruse
Thanks Matthias and it will be quite fun to tell the others at my next meetup who code reviewed this for me! :) I'll make the changes you suggested though (forgive me) I'll have to think about what constitutes useful tests for this. Somehow I've never fully bought into TDD though I know I'm one o

Re: [racket] universe program using 100% cpu on Mac (also poor Raspberry Pi performance)

2014-12-29 Thread Matthias Felleisen
Hi Darren, thanks for the link to the repo. I cloned it, successfully played with and without sound on a mac book -- inside of drracket and from the command line-- and never observed a load over 60% for drracket and ditto for plain racket. That doesn't mean that your 100% problem doesn't exist,

Re: [racket] universe program using 100% cpu on Mac (also poor Raspberry Pi performance)

2014-12-29 Thread Darren Cruse
Re: > Could you post the code somewhere so we can experiment with it? Here it is it's all in one file: pong-world.rkt On Mon, Dec 29, 2014 at 8:05 AM, Matthias Felleisen wrote: > > On Dec 28, 2014, at 9:51 PM, Darre

Re: [racket] universe program using 100% cpu on Mac (also poor Raspberry Pi performance)

2014-12-29 Thread Matthias Felleisen
On Dec 28, 2014, at 9:51 PM, Darren Cruse wrote: > One thing I can see is that on-draw is called for every on-tick on all three > platforms btw. > > And even in cases where the program is idling and on-tick has simply returned > the world state it was given unmodified. > > Is that normal I