On Mon, Sep 7, 2009 at 2:40 AM, Uriel wrote: > On Mon, Sep 7, 2009 at 11:05 AM, Greg Comeau wrote: > > In article <25CF9336-C071-44A5-AB04-6BB042BC5755@kix.in>, > > Anant Narayanan wrote: > >>I understand the argument that blocks don't "feel" C-like, but the > >>argument that you can do everything with just using function pointers > >>is BS. > > > > Even one step further, even if we all agree blocks are BS, > > As I was reading this thread I kept hearing inside my head boyd's > voice screaming this at frequent intervals: > > "Blocks are bollocks!" > > uriel > > > In case anyone is interested, I've got my concurrent prime sieve working just fine now (with help from Kevin Van Vechten at apple) using libdispatch, simulating the "actor model" by hooking up blocks to pipe fds. http://paste.lisp.org/display/86549#3 It turns out I don't need the semaphore and the counter either, because I can dynamically add stuff to groups, and then wait on that stuff to leave the group for synchronizing the program. Again this advice came from my buddy Kevin at apple. Having wrestled with this stuff a little bit, and written "something". I can immediately see how one can get away from needing to "select" in code so much, and fire off blocks to handle client server interactions etc. It's kind of neat. My understanding is that Apple is going through the process to open up the source to all of this stuff soon, and another friend of mine has already done his own version of blocks that works for the iPhone and Leopard, and another person is looking to make an API compatible with libdispatch readily available. I guess we'll see what happens. Dave