aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config/doom.org1
-rw-r--r--index.org2
-rw-r--r--journal/20240210.org12
-rw-r--r--journal/20240226.org13
-rw-r--r--mindmap/factorial.org2
-rw-r--r--mindmap/recursion.org32
6 files changed, 54 insertions, 8 deletions
diff --git a/config/doom.org b/config/doom.org
index 2bb8fb5..c8dda21 100644
--- a/config/doom.org
+++ b/config/doom.org
@@ -12,7 +12,6 @@ Below is the old documentation.
#+begin_src emacs-lisp :tangle yes
(setq user-full-name "Preston Pan"
user-mail-address "preston@nullring.xyz")
-
(setq display-line-numbers-type t)
(setq x-select-enable-clipboard t)
(setq save-interprogram-paste-before-kill t)
diff --git a/index.org b/index.org
index 8ed03fb..17b499b 100644
--- a/index.org
+++ b/index.org
@@ -64,7 +64,7 @@ website:
#+begin_src shell :exports code :results silent
cd ~/org/website
git add .
-git commit -m "edit some mindmaps"
+git commit -m "more journal entries"
git push github main
rsync -azvP ~/website_html/ root@nullring.xyz:/var/www/ret2pop/
#+end_src
diff --git a/journal/20240210.org b/journal/20240210.org
new file mode 100644
index 0000000..c7880e9
--- /dev/null
+++ b/journal/20240210.org
@@ -0,0 +1,12 @@
+#+TITLE: Daily Journal
+#+STARTUP: showeverything
+#+DESCRIPTION: My daily journal entry
+#+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
+* Saturday, 10 February 2024
+** 22:09
+I am writing in the journal from Vancouver. I am working more on the cognition programming language; Matthew and I
+often talk about it much.
diff --git a/journal/20240226.org b/journal/20240226.org
new file mode 100644
index 0000000..2f218b3
--- /dev/null
+++ b/journal/20240226.org
@@ -0,0 +1,13 @@
+#+TITLE: Daily Journal
+#+STARTUP: showeverything
+#+DESCRIPTION: My daily journal entry
+#+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
+* Monday, 26 February 2024
+** 18:54
+Today, I decided to install NixOS on my machine, and yesterday I got back from Bowen Island to see
+Anslie and her friends, while in the process messaging Josh Cindy more (idk if I've mentioned him in my previous journals but if you don't
+know I won't elaborate). I went to downtown a couple of times during the process, and it was really fun all around.
diff --git a/mindmap/factorial.org b/mindmap/factorial.org
index 2f738b1..0f00101 100644
--- a/mindmap/factorial.org
+++ b/mindmap/factorial.org
@@ -6,7 +6,7 @@
#+options: num:nil
#+html_head: <link rel="stylesheet" type="text/css" href="../style.css" />
-* Introduction
+ Introduction
The factorial [[id:b1f9aa55-5f1e-4865-8118-43e5e5dc7752][function]] $n!: \mathbb{N} \rightarrow \mathbb{N}$ describes the amount of ways one can arrange $n$ differentiable objects. In practice:
\begin{align*}
0! = 1 \\
diff --git a/mindmap/recursion.org b/mindmap/recursion.org
index 644e196..5191203 100644
--- a/mindmap/recursion.org
+++ b/mindmap/recursion.org
@@ -20,6 +20,7 @@ Yeah, but I think it's a good introduction to the subject. You can think of recu
as [[id:42dbae12-827c-43c4-8dfc-a2cb1e835efa][self-assembly]] and it has deep connections to topics such as [[id:b005fb71-2a16-40f9-9bb6-29138f4719a2][emergence]]. I will first
describe it in a mathematics context, and then a programming context.
For demonstration purposes, I will use my own programming language, [[https://ret2pop.nullring.xyz/blog/stem.html][Stem]] (warning: link takes you outside of mindmap).
+Again, stem is a prerequisite as it is the standard programming language in the mindmap.
* [[id:a6bc601a-7910-44bb-afd5-dffa5bc869b1][Mathematics]] Describes Recursion
For this example, I will be using the [[id:aed6b5dc-c2ec-4e8c-b793-538cd5d6e355][factorial]]. One might define it like so:
\begin{align*}
@@ -59,7 +60,7 @@ factorial [ dup 0 <= [ 1 + ] [ dup 1 - factorial * ] if ] def
: 120
and in stem, we can print out the 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 dup . * ] if ] def
+factorial-debug [ dup 0 <= [ 1 + ] [ ? "\n" . dup 1 - factorial-debug ? "\n" . * ] if ] def
5 factorial-debug .
#+end_src
@@ -85,14 +86,35 @@ factorial-debug [ dup 0 <= [ 1 + ] [ ? "\n" . dup 1 - factorial-debug dup . * ]
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
-
-* TODO Recursion Describes…?
-* TODO Recursion is not Recursive
-* TODO Recursion = [[id:1b1a8cff-1d20-4689-8466-ea88411007d7][duality]]?
+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.