Posts tagged with "control-structures"

Large

Stateless Tests in a Stateful Protocol

January 25th, 2010

Lets suppose you want to test the correctness of a protocol. I know I do, all the time; get me that input fuzzer. A typical way to start might be a minor variation on how I learned to test my code in CSE 142 and hadn’t really thought too much about since: plug in some “representative” values and see if it does the right thing. But let’s suppose someone came over with a pile of documentation and said “Here. Some genius in the back room made this insanely complex server that apparently speaks this protocol, and somehow managed to do it without so much as a single unit test. Can you test it? By the way, we want some guarantees about security.”

Large

Gems in Scheme (Part 3)

October 19th, 2009

In my last post I described the use of call-with-current-continuation to implement coroutines, thus inverting for-each-style iterations into cursor-style iterations. I noted that this looks very similar to using threads.

This is part 3 of our Gems in Scheme series.

Large

Gems in Scheme (part 2)

August 17th, 2009

In my last post I described some of the use of call-with-current continuation for non-local or other sorts of dynamic exits. These uses of call/cc are similar to exceptions in many other languages, or a catch/throw mechanism.

This is part 2 in our Gems in Scheme series.

Large

Gems in Scheme

July 27th, 2009

One sometimes hears that call-with-current-continuation is useless or pointless. Such things have come from the Python developers, and while Ruby 1.8 had a call/cc method, it’s not clear if it will survive in the next major release, allegedly because it’s “useless” or “too expensive”.

In fact, I tend to think that in fact, these developers simply don’t understand what call/cc is about or why it is valuable. So I’ll show some examples.

This Part 1 of our Gems in Scheme series