G
Giles Bowkett
http://pastie.caboo.se/102022
Greg Brown and I wrote this at Ruby East. It uses a continuation. The
thing is, the purpose of this code is to allow you to pop out of irb
into vi (or emacs, or TextMate, etc.) so you can edit your code, and
then pop back into irb to evaluate it. We use a continuation because
if there's a syntax error in the code, you want to be able to get back
to vi and rework the code without having to do a lot of work.
The final version (or at least most up-to-date version) uses a
different method. But the question here is - is this a real
continuation? And also, we looked at switching it to use callcc(), but
it looked like there wouldn't be any real difference. What is the
difference there? Would this code be better with callcc?
--
Giles Bowkett
Blog: http://gilesbowkett.blogspot.com
Portfolio: http://www.gilesgoatboy.org
Tumblelog: http://giles.tumblr.com/
Greg Brown and I wrote this at Ruby East. It uses a continuation. The
thing is, the purpose of this code is to allow you to pop out of irb
into vi (or emacs, or TextMate, etc.) so you can edit your code, and
then pop back into irb to evaluate it. We use a continuation because
if there's a syntax error in the code, you want to be able to get back
to vi and rework the code without having to do a lot of work.
The final version (or at least most up-to-date version) uses a
different method. But the question here is - is this a real
continuation? And also, we looked at switching it to use callcc(), but
it looked like there wouldn't be any real difference. What is the
difference there? Would this code be better with callcc?
--
Giles Bowkett
Blog: http://gilesbowkett.blogspot.com
Portfolio: http://www.gilesgoatboy.org
Tumblelog: http://giles.tumblr.com/