Skip to content

Notes and solutions of exercises in SICP and SDF. Also have the related ones for https://www.composingprograms.com/ and sicpjs etc. uncovered by sicp (maybe also for HtDP, DCIC and PLAI)

Notifications You must be signed in to change notification settings

sci-42ver/SICP_SDF

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What this repo contains

  • notes for SICP and SDF
  • SICP
    • project 4 needed by SICP lec
    • notes for SICP 6.001 lec and rec with solutions (if unavailable for some section, use 6.037)
      • also for CS61A notes and labs with solutions
    • CS61A Unit 0 solution and notes
  • SDF
    • exercise solutions
    • 6.5150 ps solution
    • TODO 6.5150 project demo

How long I have taken to read these books

SICP

  • From Jun 2 to Jul 2, chapter 1 is finished. to Jul 11, up to chapter 2.1. to Jul 13, review history chapter recitations, etc. to Jul 15, up to chapter 2.2.1. to Jul 16, finish related history labs, lecs, recs. (15 days) From Aug 5 to Aug 7, finish chapter 2.2.2. to Aug 10, 2.2.3. to Aug 11, 2.2. to Aug 12, 2.3.2. to Aug 13, 2.3. to Aug 15, related lec, rec and labs. to Aug 16, 2.5.2 and 2.5.3. to Aug 18, finish chapter 2. (14 days) From Sep 12 to Sep 13, section 3.2 to Sep 15, 2 CS61A week notes and labs. to Sep 19, section 3.3 up to exercise 3.123.27 most of time to do exercises. to Sep 20, one CS61A week to Sep 25, read 6.001 notes lec11 to lec16. to Sep 28, 6.001 OOP project. to Sep 30, section 3.3. to Oct 2, section 3.4 to Oct 3, one CS61A week to Oct 5, Exercise 3.50exercise 3.57. to Oct 7, https://stackoverflow.com/questions/78597962/1-01e-100-1-in-mit-scheme/78626541#comment138620089_78597962 to Oct 10, section 3.5.3. (the speed is a bit slow.) to Oct 12, chapter 3 is finished. to Oct 13, one CS61A week to Oct 15, one lec, 2 recs and partly section 4.1. From Oct 10 to Oct 25, section 4.1... (too slow)
    • Up to now, the main time is spent on reading the book and schemewiki. Emm about one month for each chapter... up to chapter 3.

SDF

From Jul 17 to Aug 9, my efficiency is low (continued up to Aug 11, and then up to Aug 14 where I sometimes may think about weird things (still up to Aug 19)... ).

  • From Jul 16 to Jul 18, read ps00 prerequisite contents. to Jul 21, finish ps00. to Aug 4, finish chapter 2. to Aug 5, finish ps01 (14 Feb to 23 Feb) (recommended to use 10 days. So exceed 4 days). From Aug 19 to Aug 22, finish ps02 (21 Feb to 1 Mar) (recommended to use 10 days). From Aug 22 to Sep 1 (11 days), finish ps03 (28 February to 8 March) (recommended to use 10 days). From Sep 2 to Sep 11 (10 days), finish ps04 (6 March to 15 March) (recommended to use 10 days).
    • Notice the above ps recommendation time have overlap, so my efficiency seems to be very low...
    • Up to now, the main time is spent on reading the book and finishing chapter exercises

SICP

Notice I also have exercise solutions in sicp_exercise.md and exercise_codes/ repo besides the SICP submodule.

booklist better read it with the adequate maths background

I will use official wiki (http://community.schemewiki.org/?sicp-ex-1.27 resumed at least when 2024-6-21) as the main part.

why I still learn sicp in 2024. See this especially cemerick.

Scheme interpreter choice

Notice Racket/PLTScheme doesn't have mutable pairs. from tekkie.wordpress

This change only applies to the issue of immutable vs. mutable pairs. The dev. team made this decision, because in their view it made Scheme more of a pure functional language

I choose R5RS as Racket is based on it and 6.5151 (6.905) Red Tape Memo recommends R5RS.

I use MIT/GNU Scheme.

what I skipped

lacking exercise solutions

  • 5.51~52

book

prerequisite

  • So we better read the HTML version to avoid ambiguity.

    is is the second edition  book, from Unofficial Texinfo Format. e freely-distributed official -and- format was first con-verted personally to Unofficial Texinfo Format () version 1 Also, it’s quite possible that some errors of ambiguity were introduced during the conversion

    • older computer seems to read the book using Emacs due to its performance.

      You are probably reading it in an Info hypertext browser, such as the Info mode of Emacs. You might alternatively be reading it TEX-formaed on your screen or printer, though that would be silly.

other solutions

How to learn

TODO

SDF

This book is built on the lectures and problem sets that are now used in our class.

TODO

course 6.5151 (6.905)

  1. I can't find the pdf lecture by "mit 6.5151 lecture filetype:pdf".
  2. It seems to have no homework by '6.5151 "homework"' (with only Red Tape pdf), similarly for Exam by 'mit 6.5151 "exam"' and Quizzes by "mit 6.5151 Quiz". It only has problem set / assignment.
    • By seeing their pdf's, they are mainly directly book exercises.

what to learn

  • https://groups.csail.mit.edu/mac/users/gjs/6.945/red-tape.pdf
    • The grades for this subject will be determined by a combination of classroom participation, homework, and project work To receive an “A” in this subject you will have to work all of the problem sets and prepare a good final project. We expect you to be at every class and to work every problem set. So do "problem sets" and the "final project".

SDF

  • "course using Software Design for Flexibility" has no candidates while "course using SICP" has.
  • This is not helpful up to this sorted by Best when giving one brief reading.
  • Substantial weekly programming assignments and a final project are an integral part of the subject.

  • Assignments
  • project

    If you don’t come up with a great IDEA yourself, we have some ideas that you might pursue. You will be expected to write elegant code that can be easily read and understood by us. You must supply a clear English explanation of how your software works, and a set of test cases illustrating and testing its operation. You will present a brief summary and demo in class near the end of the term.

  • homework may mean assignment

    by a combination of classroom participation, homework, and project work

  • Collaborative work

    involve themselves in all aspects of the work. ... you should indicate the names of any collaborators for each part of the assignment

Don't Panic!

Sections 2, 3, 4, 6, and 7 are essential. Please follow these thoroughly.

3.1

  • advantages of edwin

    offers a better integrated scheme debugger than emacs disadvantages (i.e. advantages of emacs) based on an older version of emacs (version 19) and has not been developed much since. no online presence or community fairly anemic library

    • disadvantages of emacs

      uses elisp, a fairly kludgy dialect of lisp, as an extension language not as much integration with mit-scheme than edwin

    • I will just use vscode and drracket as the 6.001/6.037 course does.
    • So I will skip

      To view the tutorial, execute: For a tour of what you can do, go here: You should read all the key bindings of both the scheme source code mode and the scheme REPL mode

  • TODO

    how do you figure out that C-M-x will evaluate the scheme form at your cursor if you don't already know that C-h k -> C-M-x will output "... is undefined".

  • kw

    LISP is almost as old as programming itself, having been created just a year after Fortran, the first "high-level" computer language.

    • REPL (similar to python)

      The most important thing about programming using scheme, and any LISP for that matter, is to use the REPL. Generally, as you are programming in scheme, you will have one window which contains the code you are writing, and one window which serves as your REPL. You write some code (perhaps a single function), evaluate that code, then move over to the repl and experiment with the code you just wrote. Based on your repl interaction, you go back to your code and make changes, and then the cycle repeats. You can also run some tests in the REPL and then copy the results of those tests into your main source file, to use as documentation of what the function is supposed to do for certain inputs. This will be an effective way to prepare psets – you write code, then copy the answers to the problem from the REPL back to your source file.

    • If this were a C or Java program you would have to write a small test-harness, re-compile and then run the program again to do what you have just done.

  • TODO I don't know how to copy in emacs. The top 2 answers by Daniel and Steven D fail.
  • You can always start the debugger at a scheme REPL by evaluating i.e. it is inside MIT-Scheme. So it may have less functions than drracket.

  • If you start the debugger in this way, then you will get a very nice looking window that constantly displays many of the things you could otherwise access through the commands you have just been shown. Try it out; it's neat! In a summary the key useful feature is v. TODO how to do that in drracket?

About

Notes and solutions of exercises in SICP and SDF. Also have the related ones for https://www.composingprograms.com/ and sicpjs etc. uncovered by sicp (maybe also for HtDP, DCIC and PLAI)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published