kill9/readings/sicp.md

20 lines
2.3 KiB
Markdown
Raw Normal View History

2020-05-12 21:51:54 +00:00
# Structure and Interpretation of Computers
This is a good book which teaches you the basics of programming: data abstraction, recursion, evaluation and that kind of stuff
SICP uses the [standarized Scheme programming language](https://kill-9.xyz/harmful/software/scheme) which is a simple programming language
<pre style='color:#d1d1d1;'><span style='color:#d2cd86; '>(</span>define <span style='color:#d2cd86; '>(</span>square <nspan style='color:#d2cd86; '>x</span><span style='color:#d2cd86; '>)</span> <span style='color:#d2cd86; '>(</span><span style='color:#d2cd86; '>*</span> <span style='color:#d2cd86; '>x</span> <span style='color:#d2cd86; '>x</span><span style='color:#d2cd86; '>)</span><span style='color:#d2cd86; '>)</span> <span style='color:#b060b0; '>;</span><span style='color:#b060b0; '>;</span> A simple function
<span style='color:#d2cd86; '>(</span>define <span style='color:#d2cd86; '>(</span>fact <span style='color:#d2cd86; '>x</span><span style='color:#d2cd86; '>)</span> <span style='color:#b060b0; '>;</span><span style='color:#b060b0; '>;</span> A simple recursive function
<span style='color:#d2cd86; '>(</span><span style='color:#e66170; font-weight:bold; '>if</span> <span style='color:#d2cd86; '>(</span><span style='color:#d2cd86; '>=</span> <span style='color:#d2cd86; '>x</span> <span style='color:#00a800; '>1</span><span style='color:#d2cd86; '>)</span>
<span style='color:#00a800; '>1</span>
<span style='color:#d2cd86; '>(</span><span style='color:#d2cd86; '>*</span> <span style='color:#d2cd86; '>x</span> <span style='color:#d2cd86; '>(</span>fact <span style='color:#d2cd86; '>(</span><span style='color:#d2cd86; '>-</span> <span style='color:#d2cd86; '>x</span> <span style='color:#00a800; '>1</span><span style='color:#d2cd86; '>)</span><span style='color:#d2cd86; '>)</span><span style='color:#d2cd86; '>)</span><span style='color:#d2cd86; '>)</span><span style='color:#d2cd86; '>)</span>
</pre>
This book is easy to understand provided you aren't a complete brainlet and know the most basic high school maths.
You can read SICP [here](https://vxempire.xyz/sicp)