From: Mikael Brockman Date: 2004-08-21T07:55:56+09:00 Subject: Re: ruby, actors, continuations, Kernel#callcc zuzu writes: > reading carl hewitt's seminal paper on the actor model: > http://www.lcs.mit.edu/publications/specpub.php?id=762 > my current impression is that actors are basically pure-OO objects > using continuations (coroutines?) instead of stack-frame > methods/subroutines. this way objects only require "promises" (in the > form of the passing of context) rather than the final value (as with > method stack-frames). (i think this important towards breaking free > from von neumann architecture, ala bachus: > http://delivery.acm.org/10.1145/360000/359579/p613-backus.pdf?key1=359579&key2=7975779801&coll=portal&dl=ACM&CFID=11111111&CFTOKEN=2222222 > > but i still can't quite seem to grok continuations, at least in terms > of interpreting it for ruby, w/r/t closures and Kernel#callcc. this > after reading dan "parrot" sugalski's weblog > [http://www.sidhe.org/~dan/blog/], jim weirich's email > [http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/78288 > ], and rubygarden/c2.com/wikipedia articles on the subject: > http://www.rubygarden.org/ruby?action=history&id=Continuations > http://rubygarden.org/ruby?ContinuationExplanation > http://www.ruby-doc.org/docs/ProgrammingRuby/html/ref_c_continuation.html > http://c2.com/cgi/wiki?ContinuationExplanation > http://en.wikipedia.org/wiki/Subroutine > http://en.wikipedia.org/wiki/Coroutine > > > any futher help is much appreciated. For me, there wasn't really an a-ha moment, at which point I immediately grasped the implications of CALL/CC. Rather, I kept playing around with it, and after I while I just found myself understanding. Nevertheless, if you want more stuff to read, you can try http://mikael.phubuh.org/Media/Writing/Continuations/. I'm not much of an educator, but at least it uses Ruby. mikael