[racket-dev] No threads => CPS (was: Potential search improvement)
Just now, Matthias Felleisen wrote:
>
> On May 29, 2012, at 10:25 AM, Eli Barzilay wrote:
>
> > 20 minutes ago, Eli Barzilay wrote:
> >> An hour and a half ago, Sam Tobin-Hochstadt wrote:
> >>>
> >>> To stop the sort in the middle, use a custom comparison function,
> >>> a bit of state, and an exception.
> >>
> >> This might work.
> >
> > I was confused. It does work, but it's not enough to be able to throw
> > an exception -- I also need some form of a yield() call to check if it
> > should be interrupted... Is there something like that?
> >
> > (The search code started as a simple thing that I CPSed so it can be
> > killed when there's new user input -- if there's a way to do the above
> > then that code can be simplified too.)
>
> cps? Oh what a case study in expressiveness -)
It's one of my standard examples when I get there in class...
(BTW, that makes me wonder what people do with sorting and other
expensive operations in node.js.)
--
((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:
http://barzilay.org/ Maze is Life!