[racket] Using future and touch
I created a "place farm" for just those occasions when I had more
processors than mathematical insight on Project Euler.
I submitted a bug (long since fixed) a while back, using the place farm
code; where sync failed under stress. And I stopped using it a while ago.
It's rough... old... and poor "style" (I see plenty of scope for inner
defines and matches and the likes); but it works for me.
I've just committed a tested, but poorly documented version to GitHub:
https://github.com/tim-brown/place-farm
YMMV (a lot).
Tim
PS Please could you try to obfuscate your PE solutions if you post them to
the list. It de-funs it for others if the solution is there to read (even
a sub-optimal one).
On 25/07/13 05:46, Robby Findler wrote:
> You might try places. Writing your own gcd seems straightforward. I'm not
> sure about integer-sqrt?, tho. Maybe you could make a table or something if
> you know there are not that many numbers.
>
> Or maybe someone will adjust the runtime to make those future safe!
>
> Robby
>
>
> On Wed, Jul 24, 2013 at 11:34 PM, Joe Gilray <jgilray at gmail.com
> <mailto:jgilray at gmail.com>> wrote:
>
> So I should write my own (gcd ) and (square? ) functions?
>
> I can try that, but isn't there a simple way to use threads?
>
> Thanks,
> -Joe
--
Tim Brown <tim.brown at cityc.co.uk> | City Computing Limited |
T: +44 20 8770 2110 | City House, Sutton Park Road |
F: +44 20 8770 2130 | Sutton, Surrey, SM1 2AE, GB |
-----------------------------------------------------------------------|
BEAUTY: What's in your eye when you have a bee in your hand |
-----------------------------------------------------------------------'
City Computing Limited registered in London No. 1767817.
Registered Office: City House, Sutton Park Road, Sutton, Surrey, SM1 2AE
VAT number 372 8290 34.