#+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)
#+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
--- /dev/null
+#+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.
--- /dev/null
+#+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.
#+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 \\
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*}
: 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
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.