{"id":20070877,"url":"https://github.com/iain-s/wizards-within","last_synced_at":"2026-03-05T12:32:40.055Z","repository":{"id":114479099,"uuid":"183938092","full_name":"Iain-S/wizards-within","owner":"Iain-S","description":"Working through SICP, one chapter at a time.","archived":false,"fork":false,"pushed_at":"2022-06-06T10:47:17.000Z","size":607,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-02T11:48:58.173Z","etag":null,"topics":["educational","functional-programming","scheme"],"latest_commit_sha":null,"homepage":"https://mitpress.mit.edu/sites/default/files/sicp/full-text/book/book.html","language":"Racket","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Iain-S.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-04-28T17:23:18.000Z","updated_at":"2022-03-07T10:25:16.000Z","dependencies_parsed_at":"2023-04-09T13:31:56.050Z","dependency_job_id":null,"html_url":"https://github.com/Iain-S/wizards-within","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Iain-S/wizards-within","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Iain-S%2Fwizards-within","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Iain-S%2Fwizards-within/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Iain-S%2Fwizards-within/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Iain-S%2Fwizards-within/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Iain-S","download_url":"https://codeload.github.com/Iain-S/wizards-within/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Iain-S%2Fwizards-within/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30124476,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T11:11:57.947Z","status":"ssl_error","status_checked_at":"2026-03-05T11:11:29.001Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["educational","functional-programming","scheme"],"created_at":"2024-11-13T14:25:54.526Z","updated_at":"2026-03-05T12:32:40.029Z","avatar_url":"https://github.com/Iain-S.png","language":"Racket","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Structure and Interpretation of Computer Programs\n\n![A wizard shooting lightning](wizard-gif-5.gif)\n\nThe full book is available online from MIT Press for free [here](https://mitpress.mit.edu/sites/default/files/sicp/full-text/book/book.html), though I prefer the formatting and footnotes of [this](https://sarabander.github.io/sicp/) version.\n\n## Setup\n\nThere are other ways to work through SICP, like using Emacs or repl.it but I have found DrRacket to work best for me.\n\n1. Install [DrRacket](https://download.racket-lang.org), the Racket language IDE.\n1. The DrRacket SICP [support package](https://github.com/sicp-lang/sicp) may be required.\n1. Use `#lang sicp` at the top of any new .rkt file.\n\n## Organisation\n\nOne file per chapter, or sub-chapter, seems to be a good compromise: if you try to fit more than that you get too many naming conflicts.\n\n## Testing\n\nDoing TDD for the exercises can be done with some test helpers:\n\n```scheme\n; Exercise x.y: Try to write a Fibonacci function.\n\n;; My function (not a very good one, at that).\n(define (my-fib n)\n    7)\n\n;; A test helper. It is easy to write similar ones for lists, symbols, etc.\n(define (assert-numbers-equal expected actual)\n  (if (= expected actual)\n      ; If expected == actual, the test has passed and we return #t...\n      #t\n      ; ...else, the test has failed.\n      ; Fist, we print helpful output...\n      (begin\n        (display \"expected: \")\n        (display expected)\n        (display \"  actual: \")\n        (display actual)\n        (newline)\n        ; ...and only then return #f or raise an error, etc.\n        #f)))\n\n\n;; Optionally, use a string to name the test.\n\"Test 1: Check Fib(9) == 21\"\n(assert-numbers-equal (my-fib 9) 21)\n```\n\nThe above will print something along these lines, in the output\n\n```text\n\"Test 1: Check Fib(9) == 21\"\nexpected: 7  actual: 21\n#f\n```\n\n## Imports\n\nIt took some trial and error to find that you can import functions defined in other files like so\n\n**provide-hello.rkt**\n\n```scheme\n#lang sicp\n\n(#%provide hello)\n\n(define (hello)\n  \"Hello, World\"\n  )\n```\n\n\nand use it like this\n\n**require-hello.rkt**\n\n```scheme\n#lang sicp\n\n; Remember to start DrRacket from the right directory for this to work\n(#%require \"provide-hello.rkt\")\n\n(hello)\n```\n\nSee also, https://docs.racket-lang.org/sicp-manual/SICP_Language.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiain-s%2Fwizards-within","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiain-s%2Fwizards-within","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiain-s%2Fwizards-within/lists"}