Is it possible to study the Wizard Book in Julia?


I would love to study SICP (and even HtDP) one day. It would be magnificent if it was possible to do it all in the Julia REPL, Pluto and/or Jupyter. I wonder if it’s possible to write Scheme code in Julia.

Would it be possible to write Scheme code directly in the Julia REPL, in Pluto and/or in Jupyter?
…or, should I try to write it all in “plain” Julia instead? Is that even possible?

Any thoughts? Has anyone tried to pursue this?


What’s the value of writing Scheme inside of Julia rather in a separate process? Does it manipulate Julia data structures like here? Or is just a separate Schema process inside of Julia?

Thank you for your swift reply!

Basically, to try out the examples and do the exercises in Pluto.

Pluto does not support other languages in any pleasant to use way. There are libraries that let you access some of Python and R through Julia, but none for scheme.

Your best bet is probably using a scheme kernel for Jupyter. This is the only one I could find (no idea how supported it is) GitHub - Calysto/calysto_scheme: A Scheme kernel for Jupyter that can use Python libraries

Julia itself is inspired by lisp and it suports macros. If you are happy with a non-lisp-syntax lisp, then doing these books directly in Julia might be a fun endeavor.


You could try and just adapt the code. SICP does use recursion a lot and julia doesn’t have TCO so there might be issues with this. So stuff that is represented by recursion might need to be adapted. But some concepts for sure are shared.


This sounds like a decent excuse to run julia --lisp but you will get a very rudimentary REPL.

$ julia --lisp
;  _
; |_ _ _ |_ _ |  . _ _
; | (-||||_(_)|__|_)|_)

> (+ 3 5)

I think I am going to try to do both. Write both in Scheme and in Julia (i.e. an adaptation), side by side. As a learning experience. Would be nice to use Jupiter for that if possible.

By the way, MIT Press published this year (2022) a JS adaptation of SICP! Sounds both wildly crazy and interesting. In a good way. Something to try out after the original (2nd) edition