Re: [racket] How to invoke a blocking foreign function without blocking whole racket?

2013-01-30 Thread Tim Brown
There are internal FFI calls: scheme_make_fd_input_port and scheme_make_fd_output_port, documented in http://docs.racket-lang.org/inside/Ports_and_the_Filesystem.html?q=to%20port#(idx._(gentag._480._(lib._scribblings/inside/inside..scrbl))) If you would normally be able to poll (or select) from th

Re: [racket] Binary heap thread-safety

2013-01-30 Thread Leslie P. Polzer
On Sat, Jan 26, 2013 at 10:37:04AM -0500, Ryan Culpepper wrote: > No, their thread-safety hasn't changed. That sentence wasn't > removed; it was added since the last release (check the version > numbers of the documentation). Thanks, I mixed them up! Leslie > > Ryan > > > On 01/26/2013 08:

Re: [racket] Beginners request for code review.

2013-01-30 Thread Carl Eastlund
Piotr, This isn't good Racket code, it's *gorgeous*. That was my impression at first glance, and the more I look, the more I like it. Your Bezier library absolutely does not read like the code of a novice Racketeer. Few enough people regularly use a combination of objects, pattern matching, map

[racket] Beginners request for code review.

2013-01-30 Thread Piotr Klibert
Hello all. TL;DR: I "want" a code review. Link to the repository at the end. This is my first post here so I think it's appropriate to introduce myself. I'm a professional programmer and I have been programming for nearly twenty years now. At work I use Python and CoffeeScript; before that I used

Re: [racket] Wildcard Macro Names?

2013-01-30 Thread Scott Klarenbach
Thanks a lot guys. As Eli pointed out, the main objective here is to use the special identifiers as macros, so I'll take a look at his suggestion. Basically, @anything is used as a macro for dsl-style variable assignments: ie, @x = something, @y = something Here '@' is the macro, and the rest of

[racket] confusing behaviour of managed-compile-zo

2013-01-30 Thread Jos Koot
When compiling with managed-compile-zo, manager-compile-notify-handler and manager-trace-handler, I see that parts of the racket directory are (re)compiled, for example: TRACE: compiling: C:\Program Files (x86)\Racket-Full-5.3.1.10\collects\racket\private\small-scheme.rkt Thìs even happens agai

Re: [racket] How to invoke a blocking foreign function without blocking whole racket?

2013-01-30 Thread Laurent
On Wed, Jan 30, 2013 at 3:06 PM, Haiwei Zhou wrote: > Cool! The open-fd-input-port is a great function. > Yes, indeed. Maybe something like this would be a useful addition to Racket. > Inotify cannot handle subtrees. I will try to make it more convenience. > FWIW, the code I gave above can ad

Re: [racket] How to invoke a blocking foreign function without blocking whole racket?

2013-01-30 Thread Haiwei Zhou
Cool! The open-fd-input-port is a great function. Inotify cannot handle subtrees. I will try to make it more convenience. I plan to make a tool like guard - https://github.com/guard/guard It's useful to run unit tests while some files are changed. Thanks, Haiwei On 30 January 2013 20:52, Laure

Re: [racket] Student having trouble running DrRacket -- suggestions?

2013-01-30 Thread Matthew Flatt
The information below says a 64-bit binary, and I think our 64-bit binary probably works only in 10.6 and up. In particular "unknown required load command" means that the OS cannot interpret the binary's format. The 32-bit version really should work, so a similar report from trying a 32-bit run wo

Re: [racket] How to invoke a blocking foreign function without blocking whole racket?

2013-01-30 Thread Laurent
For the record, Kevin Tew's function makes it easy to use: https://github.com/kazzmir/x11-racket/blob/master/fd.rkt For example, that's what I use in my own version of libinotify FFI: https://github.com/Metaxal/linux-tools/blob/master/inotify.rkt Laurent On Wed, Jan 30, 2013 at 12:28 PM, Tim Br

Re: [racket] How to invoke a blocking foreign function without blocking whole racket?

2013-01-30 Thread Tim Brown
Resend... original (and previous resend!) sent from an address not valid for the list. -- Forwarded message -- From: Tim Brown Date: 30 January 2013 10:01 Subject: Re: [racket] How to invoke a blocking foreign function without blocking whole racket? To: Haiwei Zhou Cc: users@rack

[racket] Test Post

2013-01-30 Thread Tim Brown
I don't seem to be able to post to this list. This mail is to test this address. Sorry for the inconvenience. Tim Racket Users list: http://lists.racket-lang.org/users

Re: [racket] How to invoke a blocking foreign function without blocking whole racket?

2013-01-30 Thread Haiwei Zhou
Finally, I figured out the callback from this letter: http://lists.racket-lang.org/users/archive/2010-July/040409.html . I wish I red this letter early. After realized that the foreign function blocks the caller thread, I used dynamic-place to create worker thread. The code is here : https://githu