aboutsummaryrefslogtreecommitdiff
path: root/mindmap
diff options
context:
space:
mode:
Diffstat (limited to 'mindmap')
-rw-r--r--mindmap/interpreter.org13
-rw-r--r--mindmap/lrc_circuit.pngbin3229 -> 3229 bytes
-rw-r--r--mindmap/recursion.org77
3 files changed, 15 insertions, 75 deletions
diff --git a/mindmap/interpreter.org b/mindmap/interpreter.org
new file mode 100644
index 0000000..4181fd5
--- /dev/null
+++ b/mindmap/interpreter.org
@@ -0,0 +1,13 @@
+:PROPERTIES:
+:ID: 2193dd78-50c4-4119-832a-e04c707687df
+:END:
+#+title: interpreter
+#+author: Preston Pan
+#+html_head: <link rel="stylesheet" type="text/css" href="../style.css" />
+#+html_head: <script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
+#+html_head: <script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
+#+options: broken-links:t
+* Introduction
+An interpreter in programming is a computer program that runs another
+computer program. A formal definition of these concepts are required
+in order to make sense of it.
diff --git a/mindmap/lrc_circuit.png b/mindmap/lrc_circuit.png
index c383ed0..2c5b6b6 100644
--- a/mindmap/lrc_circuit.png
+++ b/mindmap/lrc_circuit.png
Binary files differ
diff --git a/mindmap/recursion.org b/mindmap/recursion.org
index 80fb92d..6dc3942 100644
--- a/mindmap/recursion.org
+++ b/mindmap/recursion.org
@@ -49,81 +49,8 @@ by trying to replace unknown variables by trying to evaluate $f(x)$ one number d
a "base case" -- zero. As soon as the "base case" occurs, we then "go back up" by replacing all the unknown
values with known ones -- and that's how we evaluate recursive functions.
-* Programming Describe Recursion
-In stem, a factorial implementation might look like this:
-#+begin_src stem :exports both
-factorial [ dup 0 <= [ 1 + ] [ dup 1 - factorial * ] if ] def
-5 factorial .
-#+end_src
-
-#+RESULTS:
-: 120
-and in stem, we can print out the [[id:52d255d2-114c-42f4-b362-f0b4a2f7b83d][stack]] every step of the way with the builtin word ~?~:
-#+begin_src stem :exports both
-factorial-debug [ dup 0 <= [ 1 + ] [ ? "\n" . dup 1 - factorial-debug ? "\n" . * ] if ] def
-5 factorial-debug .
-#+end_src
-
-#+RESULTS:
-#+begin_example
-5
-
-5
-4
-
-5
-4
-3
-
-5
-4
-3
-2
-
-5
-4
-3
-2
-1
-
-5
-4
-3
-2
-1
-1
-
-5
-4
-3
-2
-1
-
-5
-4
-3
-2
-
-5
-4
-6
-
-5
-24
-
-120
-#+end_example
-as you can see, the stack is slowly built up to have all of the numbers needed, and then when we reach the basecase (the base case being the condition
-that doesn't cause recursion in the if statement), in which case we "go back up" by multiplying and going back up the stack. This procedure of using a stack
-is present in all programming languages, although in stem the operations are transparent as the stack is accessible by regular program users. In short, we keep
-on going down and down until we hit the bottom, base case, in which case we have all the pieces we need in order to go back up again, where the stack stores
-the information from most recent tasks to be done and we work back up in order to do the less recent tasks.
-
-This concept is important in programming because it allows one to build definitions in an intuitive way, simply by
-specifying the base case and specifying the case that is not the base case. Such an algorithm absolves oneself from having
-to design complicated patterns, as instead the entire computation emerges out of simple rules.
-
-In general, we see recursive definitions and design patterns in nature in the form of fractals.
+* Programming Describes Recursion
+In emacs-lisp, a factorial implementation may look like the following:
* Self Reference Problems
A big part of [[id:654280d8-82e8-4a0e-a914-bd32181c101b][infinite]] [[id:8f265f93-e5fd-4150-a845-a60ab7063164][recursion]] has to do with self reference problems. For instance, Russel's paradox with respect to
set theory: does a set that contains all sets that do not contain themselves contain itself?