[racket] This is not a solution! Re: A puzzle

From: Mark Engelberg (mark.engelberg at gmail.com)
Date: Thu Jan 20 03:37:06 EST 2011

On Wed, Jan 19, 2011 at 5:29 PM, Hendrik Boom <hendrik at topoi.pooq.com> wrote:
> I see a lot of code, but what's the puzzle.  Presumably there's some
> kind of question that has to be answered about it?
>
> -- hendrik

The program is a multithreaded program that crashes unless the
executions of the threads are interleaved in a very specific way.  So
you can't just run the program, because most likely, it will crash.
For example, computing (* a (first a)) only makes sense if another
thread changes the value of a from a number to a list in the midst of
the evaluation of that statement (and in fact, there is an instruction
in one of the other threads that does exactly that).  So there is a
way the program could conceivably execute if the timing of everything
happens in a certain way, but it is unlikely to occur in practice.
The puzzle appears to be to find the interleaving that works, and
simulate the execution of the program.  Presumably, the program prints
out a series of numbers and/or characters which will give a message,
possibly encoded in some further way, that leads to the solution
(probably a word).


Posted on the users mailing list.