You memorize a number. We guess it. You tell us how many digits we got right. We get to the final answer.
We present your inputs as constraints to z3.rkt. That's about it. The solver's just 30 lines of straightforward Racket code and the web server's another 50. (Continuation-based web programming is an absolute joy.)
None that we know of. It was written over a couple of days as a fun exercise.
Here, hosted on Heroku. If you know the right incantations, you can host it yourself too.
Heroku's Cedar stack supports absolutely anything that'll run on Linux x64. All you need to do is:
- On a Linux x64 install,
raco exe
the server.rkt file andraco distribute
it to a subdirectory. I usedeploy/racket
. git init
in thedeploy
subdirectory.- Create a Heroku app with the Cedar stack and the null buildpack:
$ heroku create -s cedar --buildpack http://github.com/ryandotsmith/null-buildpack.git
- Add a file called
Procfile
to the directory with the following contents:
web: racket/bin/server
- Check everything into your newly created Git repository.
git push heroku master
.
If the web process isn't running, type in heroku ps:scale web=1
. Note that
since this is a stateful server (Z3's internal state can't really be
serialized), anything more than web=1
probably won't work.
The core code is under the Simplified BSD license, and we use a couple of frontend JavaScript libraries under MIT.