Re: [racket] Using future and touch

2013-07-24 Thread Robby Findler
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

Re: [racket] Using future and touch

2013-07-24 Thread Joe Gilray
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 On Wed, Jul 24, 2013 at 7:47 PM, Robby Findler wrote: > When I run this, the future visualizer shows that gcd and square-number? > block the futures. square

Re: [racket] Using future and touch

2013-07-24 Thread Robby Findler
When I run this, the future visualizer shows that gcd and square-number? block the futures. square-number? is implemented in TR and if you take it, you find that integer-sqrt also blocks the futures. I'm not sure if those functions can be made to run safely in futures or not. Robby On Wed, Jul 2

Re: [racket] Where to learn advanced programming skills?

2013-07-24 Thread Ben Duan
Thank you all for your valuable suggestions. I will try to be social and practice more. Thanks again, Ben On Thu, Jul 25, 2013 at 1:29 AM, Joe Gilray wrote: > Hi Ben, > > If you want to practice and need some fun problems to work on, I recommend > going to projecteuler.net and solving problem

Re: [racket] Why can't `Alt' be used as the Meta key in Windows?

2013-07-24 Thread Ben Duan
Thank you, Pierpaolo. I have done this setting. But Esc is still the only choice for some key bindings, like `remove-sexp’. The document [1] says that: On Windows and Mac OS X, Meta is only available through the Escape key. I don’t know why. [1]: http://docs.racket-lang.org/drracket/Keyboar

[racket] Using future and touch

2013-07-24 Thread Joe Gilray
I have a ProjectEuler problem that I wanted to speed up so I thought I would try to speed it up with future / touch. I tried the following: ; function that searches for progressive numbers for a given range of b values (define (find-progressive-num b-start b-end b-incr lim) (for/sum ([b (in-ran

Re: [racket] How to read custom editor-snip% from WXME file

2013-07-24 Thread Nick Main
Thanks for the suggestion. I did think about using a surrogate to wrap the existing "wxmedia" object - but that would not help me instantiate the custom snip. I have a cut-n-paste version working, although it seems that editor-snip-class% has access to hidden methods of editor-stream-in% and edit

Re: [racket] How to read custom editor-snip% from WXME file

2013-07-24 Thread Matthew Flatt
At Wed, 24 Jul 2013 15:03:01 -0700, Nick Main wrote: > I created an extended editor-snip% class (also using the graph-snip-mixin) > and put an instance of this on a pasteboard% (altered > via graph-pasteboard-mixin) and then saved the pasteboard to a file. > > Reading this file back into the paste

[racket] How to read custom editor-snip% from WXME file

2013-07-24 Thread Nick Main
I created an extended editor-snip% class (also using the graph-snip-mixin) and put an instance of this on a pasteboard% (altered via graph-pasteboard-mixin) and then saved the pasteboard to a file. Reading this file back into the pasteboard fails (no visible errors either). Doing the same with a n

Re: [racket] Where to learn advanced programming skills?

2013-07-24 Thread Joe Gilray
Hi Ben, If you want to practice and need some fun problems to work on, I recommend going to projecteuler.net and solving problem #1. Then read the forum to see how others solved it. Solve problem #2... rinse and repeat. By the time you get to problem #60 you will have built a little toolbox of

[racket] RacketCon Signup

2013-07-24 Thread Asumu Takikawa
*** Action Item: sign up for RacketCon http://bit.ly/racketconsignup2013 *** RacketCon 2013 will be taking place at Northeastern University on September 29. Please sign up at the link above if you plan on attending. If you are interested in giving a 10 minute talk on something you've built in

Re: [racket] Why can't `Alt' be used as the Meta key in Windows?

2013-07-24 Thread Pierpaolo Bernardi
On Wed, Jul 24, 2013 at 5:28 PM, Ben Duan wrote: > I have a question here. `esc' is used as the Meta key for key bindings in > Windows, for example key `esc;c:k' for `M-C-k'. Why not use `Alt' key > instead? Is it because Windows captured these keys? In the default configuration, the Alt key is

[racket] Why can't `Alt' be used as the Meta key in Windows?

2013-07-24 Thread Ben Duan
Dear all, Thank you for your fantastic support for Windows. It's an important reason for me to choose Racket. Although I don't have a preference for Windows, I have to work on Window. Many popular languages are quite unfriendly to Windows. I have a question here. `esc' is used as the Meta key for