Racket Environment

Setup

Build Environment

Install one dependency.

apt-get -qq update
apt-get install --no-install-recommends \
  libzmq5

apt-get clean
rm -r /var/lib/apt/lists/* # Clear package list so it isn't stale

Install Racket from downloaded installer in the Appendix.

bash 
racket-7.3-x86_64-linux.sh
--unix-style --dest /usr/ --create-dir

Use the package manager to install iracket and deps, then install the Jupyter kernel.

raco pkg install --deps search-auto iracket
racket -l iracket/install

Print info.

racket -V
jupyter kernelspec list
cat /root/.local/share/jupyter/kernels/racket/kernel.json
mkdir -p /root/.local/share/jupyter/kernels/racket-debug/
echo '{
 "argv": ["racket", "-O", "debug", "-W", "debug", "-t", "/root/.racket/7.3/pkgs/iracket/./iracket.rkt", "-m", "{connection_file}"],
 "display_name": "Racket Debug",
 "language": "racket"
}' > /root/.local/share/jupyter/kernels/racket-debug/kernel.json

Test

(+ 1 2)

Racket Debug

Jupyter Runtime Language

Racket

Jupyter Runtime Language
racket-getting-started.ipynb
jupyter run --kernel=racket --debug 
racket-getting-started.ipynb
jupyter --help kernel
pip install --upgrade jupyter_client
racket -t /root/.racket/7.3/pkgs/iracket/./iracket.rkt -m /kernel_connection.json
{
 "ip": "0.0.0.0",
 "transport": "tcp",
 "stdin_port": 55555,
 "control_port": 55556,
 "hb_port": 55557,
 "shell_port": 55558,
 "iopub_port": 55559,
 "signature_scheme": "hmac-sha256",
 "key": ""
}
kernel_connection.json
JSON
ls -al /root/.local/share/jupyter/runtime/kernel-628dbbab-8640-40ca-8cde-3de5c8b9159e.json
touch 
racket -t /root/.racket/7.3/pkgs/iracket/./iracket.rkt \
  -m /root/.local/share/jupyter/runtime/kernel-764.json
racket --help
cat /root/.racket/7.3/pkgs/iracket/./iracket.rkt
cat /root/.local/share/jupyter/kernels/racket/kernel.json
(letrec ([is-even? (lambda (n)
                       (or (zero? n)
                           (is-odd? (sub1 n))))]
           [is-odd? (lambda (n)
                      (and (not (zero? n))
                           (is-even? (sub1 n))))])
    (is-odd? 11))