Re: [racket] Porting Sawfish to Racket

2012-11-12 Thread Asumu Takikawa
On 2012-11-11 04:33:00 +0100, Laurent wrote: > The effort required before having anything usable would just be too > big. So I started a new project from scratch ( > [2]https://github.com/Metaxal/RWind/ ), which is currently in a > minimal but usable state (for testing purposes). Even though it

Re: [racket] Prevent racket From Closing

2012-11-12 Thread Tobias Hammer
In your initial sample, add a \n at the end of the fprintf or add (flush-output) at the end of start-server to get the message displayed. On Mon, 12 Nov 2012 15:19:50 +0100, Nathan Campos wrote: Both ways worked, but the problem is that it's still blocking my script to display things on t

Re: [racket] FFI: struct of callbacks vs. GC

2012-11-12 Thread Jon Zeppieri
Well, in the current version, all of the racket functions corresponding to the callbacks are defined at the module top-level. It's likely that in some previous version, I wasn't holding on to them. I'm now thinking that the callback issue might be a red herring. Even with the #:keep change the

Re: [racket] TR base-env typing classes/instances

2012-11-12 Thread Sam Tobin-Hochstadt
[sorry for not responding earlier] On Fri, Nov 9, 2012 at 11:32 AM, Ray Racine wrote: > I did poke around a bit at this with my morning coffee and I'd say it is not > necessarily intuitively obvious to the casual observer on how to go from the > internal "type" representation constructed via Clas

Re: [racket] Prevent racket From Closing

2012-11-12 Thread Nathan Campos
Both ways worked, but the problem is that it's still blocking my script to display things on the command-line. When I Ctrl+C to terminate the execution I get the usual "user break" message and all the things I tried to display on the command-line. On Mon, Nov 12, 2012 at 12:00 PM, Greg Hendershot

Re: [racket] Prevent racket From Closing

2012-11-12 Thread Greg Hendershott
> When I try to use do-not-return I get this error: bonsai.rkt:22:3: > do-not-return: unbound identifier in module To use it, you would need to require the module that provides it: (require web-server/web-server) (Which I found by searching the docs for `do-not-return', and getting this: http:

Re: [racket] FFI: struct of callbacks vs. GC

2012-11-12 Thread Matthew Flatt
"Converted Racket function" is meant to be the function that you're passing to the foreign function. That is, there's no distinction between "the Racket function" and "the converted Racket function". I'll work on that phrasing in the docs. So, can you say more about why you expect the Racket func

Re: [racket] Prevent racket From Closing

2012-11-12 Thread Jay McCarthy
If you searched for it, like I suggested, you'd see that you have to (require web-server/web-server) to get it: http://docs.racket-lang.org/web-server-internal/web-server.html?q=do-not-return#(def._((lib._web-server/web-server..rkt)._do-not-return)) On Mon, Nov 12, 2012 at 6:42 AM, Nathan Campos

Re: [racket] FFI: struct of callbacks vs. GC

2012-11-12 Thread Jon Zeppieri
OK, that test worked. I guess I don't really understand the #:keep documentation. For the default case of #t, it reads "#t — the callback stays in memory as long as the converted Racket function is reachable." What is the "converted Racket function"? I was ignoring "converted," I think, mainly bec

Re: [racket] Prevent racket From Closing

2012-11-12 Thread Nathan Campos
When I try to use do-not-returnI get this error: bonsai.rkt:22:3: do-not-return: unbound identifier in module Then I tried read-line

Re: [racket] FFI: struct of callbacks vs. GC

2012-11-12 Thread Matthew Flatt
Callbacks never move, and they correctly deal with movable values referenced in the closure, so the only issue should be whether the GC reclaims a cllacbk. It can be tricky to make sure that a callback is not GCed too early, though. As a test, you might try specifying `#:keep' as a function that p