This repository is a set of notes, highlights, and clippings from "Structure and Interpretation of Computer Programs", both from the book and video lectures to the course of the same name, interesting examples from the book, and solutions for the exercises.
You may also find some useful links down below, in this very document.
"Structure and Interpretation of Computer Programs" by professors Harold Abelson, Gerald Jay Sussman, and Julie Sussman is a prolific textbook aiming to teach the principles of computer programming, such as abstraction in programming, metalinguistic abstraction, recursion, interpreters, and modular programming. The book was formerly used at MIT as a manual for introductory programming classes and as such has its structure laid out in the manner alike the course schedule or outline.
Unlike many of its predecessors, which almost always concentrated on teaching details of a certain programming language, SICP aims at finding, defining, and explaining general and abstract programming paradigms, common to all programming languages. Due to that very fact, SICP remains to be relevant and extremely instructive source of knowledge, even though using Scheme, a dialect of Lisp, for explanation of concepts and paradigms, examples, and exercises.
The book also provides a great amount of fun and challenging exercises, which require rigor and dedication, as well as a voluminous lot of time. Tasks in exercises range from writing code for some puzzling problems to researching a particular subject matter or meticulously proving a statement or theorem with extensive induction.
This high relevance, striking generality and applicability of broad Computer Science concepts, along with challenging exercises is what makes this book (along with some MIT course material) a perfect tutorial for both beginners and experienced programmers, who aspire to acquire deep and thorough understanding of mind bending concepts and ideas of programming.
My main idea when reading the book, working through exercises, and compiling this repository is solely self-development and learning computer programming. I put all of the resources here for my personal use and no other intentions.
However, you are more than welcome to view or use any of it. But please, if you find yourself puzzled with some exercises, do not jump to the solution right away as it forfeits your learning and defies the whole reason of reading and working through the book.
- This readme contains many useful bits of information for preparation, setup, and embarking on the learning experience with the book.
- Using the links in the table of contents, it is possible to navigate to short notes and extracts from the book and video lectures. There, in the chapter level readme and in the subsections of it, there are links to exercises and some interesting examples.
- It is always possible to explore single examples or exercises by simply following the path.
Two main components to start working with exercises and examples:
- Scheme interpreter (Required)
- Edwin editor - a modification of Emacs (not required, but very useful)
Interpreter
- option one, Racket.
First off, one of the best interpreters for Scheme to work on SICP is Racket. on *nix like systems you can install Racket through your software repository and then install sicp collections through:
raco setup # might be optional
raco pkg install sicp
Then, simply including (require sicp)
at the beginning of your scm files or by invoking interpreter with racket -l sicp --repl
or right away aliasing it with lines in your .bashrc by alias scheme='racket -l sicp --repl'
.
For Windows things are as usual trickier and it is really not recommended to do that stuff there, just because it is so much easier on *nix systems.
- option two, MIT Scheme.
Extensive explanation of installation is provided here: MIT Scheme. It includes the creation of all shortcuts, including Edwin preparation.
Editor
To use Edwin with all of its perks and qwerks, simply install MIT Scheme (having emacs is prerequisite) and that will add Edwin environment to the scheme interpreter.
To start working in Edwin, type scheme -edwin
.
Otherwise, any text editor can be used and the resulting file can be passed to interpreter from command line.
Work online
As an alternative, it is possible to work with scheme online here - repl (There is no MIT assumed macros and primitives, thus you have to define a lot of those things).
Many of these links are readily available online in the first search page or in the home page of this course on Open Course Ware from MIT, but it is still useful to list them here. There are more links to useful resources throught the book.
- SICP Website
- The book
- MIT Course Ware home and video lectures
- Youtube playlist with video lectures
- Thrid party instruction on installing MIT Scheme and Setup
- MIT Scheme home
- Racket
- SICP Racket collections
- Edwin installition
- Edwin user guide
- Don't panic guide
- Beating the Averages (a small story about using lisp in startup)
- Useful Math resource if you need some brush up