Sorry about that. I was trying to warn people ahead of time about bugs so they could fix them, but I didn’t run sophisticated enough tests to catch that.
Oh well. I don’t think I would have won anyway. The problem seems to be that the REPL behaves very differently to non-REPL contexts, which I certainly wasn’t expecting. Actually, it looks like eval in the REPL uses the REPL namespace as a default (so for example you can type (eval '(define a 2)) (write a) and see a 2 printed out) which seems rather unconscionable to me¹, especially since the REPL namespace includes a boatload of miscellaneous modules such as racket/pretty and racket/function and probably others as well.
Possibly next time it would be useful to publish a “test harness” ahead of time which runs contestants against each other in a clean (or at least well-specified) namespace, and make it clear that the actual contest would be run using this code.
¹ Actually, now that I’ve noticed this, it looks like you could use this to write a bot that corrupts the global (REPL) namespace, and therefore the namespace of anyone trying to simulate it, maybe even forcing the opponent to cooperate by rewriting if or something. Ha!
Actually, now that I’ve noticed this, it looks like you could use this to write a bot that corrupts the global (REPL) namespace, and therefore the namespace of anyone trying to simulate it, maybe even forcing the opponent to cooperate by rewriting if or something. Ha!
I did look briefly for ways of forcing a bot running my program as a simulation to cooperate, but that sort of thing needs way too much knowledge of the programming environment for me to have a hope of succeeding.
An early attempt I had for a bot tried to save state between simulations inside the RNG seed, but that didn’t work out either...
Sorry about that. I was trying to warn people ahead of time about bugs so they could fix them, but I didn’t run sophisticated enough tests to catch that.
Oh well. I don’t think I would have won anyway. The problem seems to be that the REPL behaves very differently to non-REPL contexts, which I certainly wasn’t expecting. Actually, it looks like
eval
in the REPL uses the REPL namespace as a default (so for example you can type(eval '(define a 2)) (write a)
and see a2
printed out) which seems rather unconscionable to me¹, especially since the REPL namespace includes a boatload of miscellaneous modules such asracket/pretty
andracket/function
and probably others as well.Possibly next time it would be useful to publish a “test harness” ahead of time which runs contestants against each other in a clean (or at least well-specified) namespace, and make it clear that the actual contest would be run using this code.
¹ Actually, now that I’ve noticed this, it looks like you could use this to write a bot that corrupts the global (REPL) namespace, and therefore the namespace of anyone trying to simulate it, maybe even forcing the opponent to cooperate by rewriting
if
or something. Ha!I did look briefly for ways of forcing a bot running my program as a simulation to cooperate, but that sort of thing needs way too much knowledge of the programming environment for me to have a hope of succeeding.
An early attempt I had for a bot tried to save state between simulations inside the RNG seed, but that didn’t work out either...