ldct / isicp

Interactive Structure and Interpretation of Computer Programs
http://www.xuanji.li/isicp/
MIT License
1.16k stars 162 forks source link

Interactive SICP

screenshot

Structure and Interpretation of Computer Programs now in an interactive textbook form!

Click on (almost) any code fragment to edit. Ctrl-Enter will re-run the script.

Contributing

NOTE: a lot of the code lives in a separate repository, web-worker-interpreter

This project is a work-in-progress and we need your help!

The chapter and section files here will be generated by render_all.sh using files in content/ as input. Please make changes there.

todo

Contributing

iSICP is built on the web-worker-interpreter/coding.js library. We use the CodeMirror editor and a custom scheme interpreter.

If you just wish to help port more of SICP to this site, here is how to create an interactive code fragment.

<div id="scheme-times-size">
(* 5 size)
</div>
<script>
prompt("scheme-times-size", ["scheme-define-size"]);
</script>

the div contains the initial text. The second argument to prompt is optional and specifies dependencies.