Re: [racket] Rounding

2013-03-17 Thread Neil Toronto
On 03/16/2013 08:47 PM, Eric Nadeau wrote: I'm ditching Scheme altogether based on this... In case you're not trolling: changing languages won't help. This is standard behavior. And for goodness sake, you can always write your own function! Neil ⊥ Racket Users list:

Re: [racket] Rounding

2013-03-17 Thread Stephen Bloch
On Mar 16, 2013, at 11:47 PM, Eric Nadeau wrote: > The point of rounding is coming up with the best possible integer > approximation for a decimal and this nearest even number rule does not > qualify. Why not? In these cases there is no "the" best possible integer approximation, but two equ

Re: [racket] Rounding

2013-03-17 Thread Danny Yoo
> The point of rounding is coming up with the best possible integer > approximation for a decimal and this nearest even number rule does not > qualify. This "logic" was used by my grandparents' generation because odd > numbers were seen as less pure than even ones. This is a strawman argument.

Re: [racket] plot-frame does not wait at end of process

2013-03-17 Thread Eli Barzilay
Four hours ago, Laurent wrote: > Thank you Robby, yes it helps. > > Based on this, I gave a try at writing a small example that > describes some particularities of using yield or sync or creating a > new eventspace with or without a thread: [...] I think that like Robby said, `yield' should be t

Re: [racket] Rounding

2013-03-17 Thread Robby Findler
Racket is not Scheme. Please do not let our decisions influence your opinion of other languages. Go try Scheme for real. Robby On Sat, Mar 16, 2013 at 10:47 PM, Eric Nadeau wrote: > > The point of rounding is coming up with the best possible integer > approximation for a decimal and this near

Re: [racket] Rounding

2013-03-17 Thread Eric Nadeau
The point of rounding is coming up with the best possible integer approximation for a decimal and this nearest even number rule does not qualify. This "logic" was used by my grandparents' generation because odd numbers were seen as less pure than even ones. I'm ditching Scheme altogether based

[racket] Yield (was: plot-frame does not wait at end of process)

2013-03-17 Thread Laurent
Thank you Robby, yes it helps. Based on this, I gave a try at writing a small example that describes some particularities of using yield or sync or creating a new eventspace with or without a thread: https://gist.github.com/Metaxal/5182719#file-gistfile1-rkt The comments at the bottom describe th

Re: [racket] plot-frame does not wait at end of process

2013-03-17 Thread Robby Findler
For this specific program, it would behave the same way. In general what yield means is "block on this evt, but while you're blocked handle GUI events". So you call it from the eventspace handler thread of some eventspace, then that eventspace can still handle events while the evt passed to yield i

Re: [racket] plot-frame does not wait at end of process

2013-03-17 Thread Laurent
In his second version (see below), Matthew was basically encapsulating what you have written inside (yield ...). Would you mind to explain what differences that makes? I've read the docs but I'm still confused about `yield'. >> >> > #lang at-exp racket >> >> > (require plot >> >> >

Re: [racket] plot-frame does not wait at end of process

2013-03-17 Thread Robby Findler
That way has the property that each plot window has its own thread of execution, which is probably not necessary (I don't know if plot windows communicate or if that matters), but if it were me, I'd probably just make one extra thread, not N, and I'd put the reading into the extra thread not the GU

Re: [racket] plot-frame does not wait at end of process

2013-03-17 Thread Robby Findler
On Sun, Mar 17, 2013 at 1:15 AM, Eli Barzilay wrote: > On Thursday, Robby Findler wrote: > > Also: I don't think that you need a parameter for this default. the > > current-eventspace parameter would already do this job. > > IOW, Robby wants no keyword or parameter, just the default behavior, > a

Re: [racket] plot-frame does not wait at end of process

2013-03-17 Thread Laurent
So, does this means that Deren's program from http://lists.racket-lang.org/users/archive/2012-April/051490.html would then look like that: #lang racket (require plot) (plot-new-window? #t) (let loop () (let ((dummy (read))) (if (and (number? dummy) (zero? dummy)) (void) (begi