SICP Goodness - Orgmode + Racket + SICP = ๐Ÿ’•

How to setup orgmode to run racket code from SICP

Guowei Lv

1 minute read

Do you think Computer Science equals building websites and mobile apps?

Are you feeling that you are doing repetitive and not so intelligent work?

Are you feeling a bit sick about reading manuals and copy-pasting code and keep poking around until it works all day long?

Do you want to understand the soul of Computer Science?

If yes, read SICP!!!

Recently, I started to write down study notes in one org file. And I think why not write the scheme code from SICP in org mode too. But there is a problem: ob-scheme does not work well with mit scheme, that means C-c C-c does not execute the code block and throws some error instead.

After some research I found that I can use Racket + sicp package.

  1. install Racket.
  2. Then install sicp package through DrRacket
  3. Install ob-racket
    dotspacemacs-additional-packages '(
      ; ...
      (ob-racket :location
                (recipe :fetcher github :repo "DEADB17/ob-racket"))
  4. Configure it by adding the following code.
    (defun dotspacemacs/user-config ()
      ; ...
      (use-package ob-racket
        :after org
        :pin manual
        (append '((racket . t) (scribble . t)) org-babel-load-languages))


comments powered by Disqus