sicp icon indicating copy to clipboard operation
sicp copied to clipboard

Racket implementation and notes for SICP's video lectures.

  • Structure and Interpretation of Computer Programs Notes

    Quick links:

    • [[https://raw.githubusercontent.com/nebhrajani-a/sicp/master/video_notes/video_notes.pdf][PDF]]
    • [[https://nebhrajani-a.github.io/sicp/video_notes/][Web]]
    • [[https://github.com/nebhrajani-a/sicp/blob/master/video_notes/video_notes.org][Org]] (WIP)

#+HTML:

/Structure and Interpretation of Computer Programs/, also called the Wizard Book, is a book based on an introductory computer science course taught at MIT from 1981 to 2007. It teaches the Scheme dialect of Lisp, and is worth reading if you're a serious programmer of any sort, if only /because/ it teaches Lisp.

#+begin_quote Lisp is worth learning for the profound enlightenment experience you will have when you finally get it; that experience will make you a better programmer for the rest of your days, even if you never actually use Lisp itself a lot. #+end_quote – Eric Raymond

Moreover, SICP has gems of computer programming wisdom sprinkled throughout its pages:

#+begin_quote "Programs must be written for people to read, and only incidentally for machines to execute." #+end_quote – Abelson & Sussman, SICP, preface to the first edition.

Don't take my word for it --- study the book yourself! This repository provides notes based on the video lectures that you will find useful if:

  • You want SICP 'distilled' in a small file.
  • You want to see how old MIT Scheme code is implemented in Racket's =#lang sicp=.
  • You're following the video lectures, and of course, if:
  • You came across this repository late at night and you have nothing better to do.

** Notes My notes are based on the [[https://groups.csail.mit.edu/mac/classes/6.001/abelson-sussman-lectures/][1986 presentation of 6.001 (SICP), produced by Hewlett-Packard]]. The notes are generated using Emacs' Org mode, are written in literate programming style, and use Racket's =#lang sicp=. In some (very few) cases, this causes the code in these notes to differ from the equivalent code in MIT-Scheme. These instances are pointed out in the notes.

** Future Plans Once I'm done working through the videos, I'll start working on the exercises (second edition). Eventually, this repository may include solutions to assignments and exams on the OCW page as well. No promises though --- it takes a non-trivial amount of energy and time to write reasonably high-quality notes and solutions.

** Reporting Errors Open an issue, or, if you think you can fix the error yourself, submit a pull request. Don't worry about being wrong --- I don't mind having discussions in the issue tracker. This is, after all, a learning-centric repository.


** Metadata *** On Literate Programming

SICP and its video lectures are [[https://www.eecs.umich.edu/techreports/cse/2021/CSE-TR-001-21.pdf#%5B%7B%22num%22%3A55%2C%22gen%22%3A0%7D%2C%7B%22name%22%3A%22XYZ%22%7D%2C72%2C717.509%2Cnull%5D][particularly well-suited]] to
literate programming, given the fact that SICP's exercises and
example programs are *highly* inter-dependent. Often, later
lectures require small procedures defined in past lectures.
All-in-all, this makes writing code for SICP a tough job, since
yank-pasting dependencies every time you need them is tiring, and
a bug fix will not propagate to all the pastes.

This is where literate programming becomes useful, since it
maintains only one copy of each code block, and changes can be
forward-propagated by re-evaluation. Org mode is one of the
most complete implementations of literate programming, although
today a majority of literate programming users come from Jupyter
notebooks.

*** MIT's SICP Content

**** Videos The videos the notes are based on are licensed by MIT under [[http://creativecommons.org/licenses/by-sa/3.0][CC-BY-SA 3.0]]. The citation of the course on MIT OCW is: #+begin_quote Eric Grimson, Peter Szolovits, and Trevor Darrell. /6.001 Structure and Interpretation of Computer Programs/. Spring 2005. Massachusetts Institute of Technology: MIT OpenCourseWare, https://ocw.mit.edu. License: Creative Commons BY-NC-SA. #+end_quote

**** Book Directory =book= includes the =pdf= and =texi= unofficial SICP ebooks. These are not officially licensed by MIT, so it is wise to peruse these carefully, given the +silly DMCA+ ethical concerns.

** License All material in this repository that is my creative property is licensed under [[https://creativecommons.org/licenses/by-nc-sa/4.0/deed.en][CC-BY-NC-SA 4.0]].