]> Untitled Git - monorepo.git/commitdiff
more journal entries
authorPreston Pan <preston@nullring.xyz>
Wed, 28 Feb 2024 01:04:35 +0000 (17:04 -0800)
committerPreston Pan <preston@nullring.xyz>
Wed, 28 Feb 2024 01:04:35 +0000 (17:04 -0800)
config/doom.org
index.org
journal/20240210.org [new file with mode: 0644]
journal/20240226.org [new file with mode: 0644]
mindmap/factorial.org
mindmap/recursion.org

index 2bb8fb53ed4084f1e66e627d12e9a420db981141..c8dda21ea052b33bf189c77cbfbfc043b308ace3 100644 (file)
@@ -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)
index 8ed03fb6d423d54d0512ff1228233cb65175a539..17b499bcdd642ef9346f1f28d0b61fdb5d17d5bd 100644 (file)
--- 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 (file)
index 0000000..c7880e9
--- /dev/null
@@ -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 (file)
index 0000000..2f218b3
--- /dev/null
@@ -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.
index 2f738b16a60ece930b1a71bf3471dd5e9ca45697..0f0010163bb44749746b6cb808dadd63cc1d1265 100644 (file)
@@ -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 \\
index 644e196140cd60dc6c1e41f3e3ea17c41ca79a32..5191203eb6005b9dc19143a999cdf576debfe8b9 100644 (file)
@@ -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.