From a7da57c0736bec58d1fc4ec99d211099c31bb45f Mon Sep 17 00:00:00 2001 From: Preston Pan Date: Wed, 24 Jan 2024 19:26:59 -0800 Subject: new content --- LICENSE.org | 2 +- about.org | 19 +- android-chrome-192x192.png | Bin 0 -> 10645 bytes android-chrome-512x512.png | Bin 0 -> 30050 bytes apple-touch-icon.png | Bin 0 -> 9856 bytes browserconfig.xml | 9 + config/doom.org | 277 ++- config/elfeed.org | 2 + config/qtile.org | 169 +- config/qutebrowser.org | 5 +- favicon-16x16.png | Bin 0 -> 1068 bytes favicon-32x32.png | Bin 0 -> 1449 bytes favicon.ico | Bin 0 -> 15086 bytes img/churchill.png | Bin 0 -> 296744 bytes img/drawing-old.png | Bin 0 -> 52643 bytes img/drawing.png | Bin 0 -> 1019 bytes img/favicon.ico | Bin 0 -> 1150 bytes img/relativity1.jpg | Bin 0 -> 99304 bytes img/relativity2.jpg | Bin 0 -> 116362 bytes img/relativity2.jpg~ | Bin 0 -> 127432 bytes index.org | 17 +- journal/20231208.org | 22 + journal/20231209.org | 13 + journal/20231210.org | 17 + journal/20231213.org | 13 + journal/20231214.org | 14 + journal/20231215.org | 12 + journal/20231217.org | 12 + journal/20231220.org | 12 + journal/20240110.org | 13 + journal/20240123.org | 24 + journal/20240124.org | 17 + journal/index.org | 23 +- mindmap/Fourier Transform.org | 12 + mindmap/Lagrangian mechanics.org | 106 + mindmap/Legendre Transformation.org | 31 + mindmap/Lorentz Force.org | 21 + mindmap/Maxwell's Equations.org | 78 + mindmap/Newtonian mechanics.org | 9 +- mindmap/conservative force.org | 2 +- mindmap/continuity equation.org | 24 + mindmap/del operator.org | 13 +- mindmap/derivative.org | 8 +- mindmap/divergence theorem.org | 17 + mindmap/duality.org | 8 +- mindmap/electrostatics.org | 6 + mindmap/emergence.org | 35 +- mindmap/factorial.org | 9 +- mindmap/function.org | 2 - mindmap/group.org | 3 + mindmap/index.org | 54 + mindmap/induction.org | 3 +- mindmap/infinity.org | 18 +- mindmap/inverse square.org | 6 +- mindmap/logic.org | 14 + mindmap/magnetostatics.org | 91 + mindmap/mathematics.org | 5 +- mindmap/natural number.org | 6 +- mindmap/physics.org | 25 +- mindmap/recursion.org | 22 +- mindmap/special relativity.org | 68 + mstile-150x150.png | Bin 0 -> 7205 bytes robots.txt | 2 + safari-pinned-tab.svg | 4100 +++++++++++++++++++++++++++++++++++ site.webmanifest | 19 + style.css | 438 ++-- 66 files changed, 5435 insertions(+), 512 deletions(-) create mode 100644 android-chrome-192x192.png create mode 100644 android-chrome-512x512.png create mode 100644 apple-touch-icon.png create mode 100644 browserconfig.xml create mode 100644 favicon-16x16.png create mode 100644 favicon-32x32.png create mode 100644 favicon.ico create mode 100644 img/churchill.png create mode 100644 img/drawing-old.png create mode 100644 img/drawing.png create mode 100644 img/favicon.ico create mode 100644 img/relativity1.jpg create mode 100644 img/relativity2.jpg create mode 100644 img/relativity2.jpg~ create mode 100644 journal/20231208.org create mode 100644 journal/20231209.org create mode 100644 journal/20231210.org create mode 100644 journal/20231213.org create mode 100644 journal/20231214.org create mode 100644 journal/20231215.org create mode 100644 journal/20231217.org create mode 100644 journal/20231220.org create mode 100644 journal/20240110.org create mode 100644 journal/20240123.org create mode 100644 journal/20240124.org create mode 100644 mindmap/Fourier Transform.org create mode 100644 mindmap/Lagrangian mechanics.org create mode 100644 mindmap/Legendre Transformation.org create mode 100644 mindmap/Lorentz Force.org create mode 100644 mindmap/Maxwell's Equations.org create mode 100644 mindmap/continuity equation.org create mode 100644 mindmap/divergence theorem.org create mode 100644 mindmap/logic.org create mode 100644 mindmap/magnetostatics.org create mode 100644 mindmap/special relativity.org create mode 100644 mstile-150x150.png create mode 100644 robots.txt create mode 100644 safari-pinned-tab.svg create mode 100644 site.webmanifest diff --git a/LICENSE.org b/LICENSE.org index df18b21..0c2a051 100644 --- a/LICENSE.org +++ b/LICENSE.org @@ -5,7 +5,7 @@ #+date: <2023-06-11 Sun> #+language: en -Copyright Β© 2023 Preston Pan +Copyright Β© 2024 Preston Pan Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the β€œSoftware”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/about.org b/about.org index a3b3b9c..fe95fea 100644 --- a/about.org +++ b/about.org @@ -5,20 +5,33 @@ #+language: en #+OPTIONS: broken-links:t #+date: <2023-06-26 Mon> +#+html_head: +#+html_head: +#+html_head: +#+html_head: +#+html_head: +#+html_head: +#+html_head: * About Me -Some might know me as ret2pop, some as Preston Pan, and -others as [[https://preston.nullring.xyz][LiCoO2]]. +** whoami? +[[https://preston.nullring.xyz][Preston Pan]]. Although, that is not really important for the enjoyment of ret2pop, and +it is certainly not the focus at all. Ret2pop is a separate entity, controlled only +by the will of Francois. Ret2pop is a relentlessly curious force willing to entertain +ideas that are unconventional and unorthodox; Preston Pan is the individual that tries +to live this out and fails in a somewhat cringy manner. +Some might know me as ret2pop, some as Preston Pan, and others as LiCoO2. ** Contact Here are all the methods you should use to contact me: *** IRC - ret2pop on libera.chat - Note: I will not always be online and I don't use a bouncer on this server. Email me to coordinate a time if you really need to reach me this way. -- LiCoO2 on [[https://andrei.rm-r.org/irc][the best irc server]]. *** Email - preston@nullring.xyz - ret2pop@gmail.com +*** Amateur Radio (In case the world ends) +My callsign is ~VE7PPN~. * Professional For now, you should consult [[https://preston.nullring.xyz/about/index.html][my other website]], but I will make diff --git a/android-chrome-192x192.png b/android-chrome-192x192.png new file mode 100644 index 0000000..653f43d Binary files /dev/null and b/android-chrome-192x192.png differ diff --git a/android-chrome-512x512.png b/android-chrome-512x512.png new file mode 100644 index 0000000..864b240 Binary files /dev/null and b/android-chrome-512x512.png differ diff --git a/apple-touch-icon.png b/apple-touch-icon.png new file mode 100644 index 0000000..1e3ed09 Binary files /dev/null and b/apple-touch-icon.png differ diff --git a/browserconfig.xml b/browserconfig.xml new file mode 100644 index 0000000..b3930d0 --- /dev/null +++ b/browserconfig.xml @@ -0,0 +1,9 @@ + + + + + + #da532c + + + diff --git a/config/doom.org b/config/doom.org index 480c4c6..5e77b70 100644 --- a/config/doom.org +++ b/config/doom.org @@ -32,84 +32,92 @@ To display the battery percentage: #+begin_src emacs-lisp :tangle yes (display-battery-mode 1) #+end_src +** Transparency +Let's make emacs transparent. +#+begin_src emacs-lisp :tangle yes +(set-frame-parameter nil 'alpha-background 90) + +(add-to-list 'default-frame-alist '(alpha-background . 90)) +#+end_src ** EXWM First we load our packages: #+begin_src emacs-lisp :tangle yes -(use-package! exwm) -(use-package! exwm-config) -(exwm-config-example) +;; (use-package! exwm) +;; (use-package! exwm-config) +;; (exwm-config-example) #+end_src Now, we set our keybindings: #+begin_src emacs-lisp :tangle yes -(setq exwm-input-global-keys - `( - ([?\s-r] . exwm-reset) - ([?\s-w] . exwm-workspace-switch) - ,@(mapcar (lambda (i) - `(,(kbd (format "s-%d" i)) . - (lambda () - (interactive) - (exwm-workspace-switch-create ,i)))) - (number-sequence 0 9)) - ([?\s-&] . (lambda (command) - (interactive (list (read-shell-command "$ "))) - (start-process-shell-command command nil command))) - - ([?\s-d] . (lambda () - (interactive) - (dired default-directory))) - - ([?\s-f] . (lambda () - (interactive) - (exwm-layout-toggle-mode-line) - (exwm-workspace-toggle-minibuffer))) - - ([?\s-b] . exwm-workspace-switch-to-buffer) - - - ([?\s-w] . (lambda () - (interactive) - (start-process "" nil "qutebrowser"))) - ([?\s-n] . (lambda () - (interactive) - (start-process "" nil "nyxt"))) - ([?\s-k] . (lambda () - (interactive) - (start-process "" nil "krita"))) - ([?\s-g] . (lambda () - (interactive) - (start-process "" nil "gimp"))) - ([?\s-b] . (lambda () - (interactive) - (start-process "" nil "blender"))) - ([?\s-c] . (lambda () - (interactive) - (start-process "" nil "chromium"))) - ([s-f2] . (lambda () - (interactive) - (start-process "" nil "/usr/bin/slock"))))) +;; (setq exwm-input-global-keys +;; `( +;; ([?\s-r] . exwm-reset) +;; ([?\s-w] . exwm-workspace-switch) +;; ,@(mapcar (lambda (i) +;; `(,(kbd (format "s-%d" i)) . +;; (lambda () +;; (interactive) +;; (exwm-workspace-switch-create ,i)))) +;; (number-sequence 0 9)) +;; ([?\s-&] . (lambda (command) +;; (interactive (list (read-shell-command "$ "))) +;; (start-process-shell-command command nil command))) + +;; ([?\s-d] . (lambda () +;; (interactive) +;; (dired default-directory))) + +;; ([?\s-f] . (lambda () +;; (interactive) +;; (exwm-layout-toggle-mode-line) +;; (exwm-workspace-toggle-minibuffer))) + +;; ([?\s-b] . exwm-workspace-switch-to-buffer) + + +;; ([?\s-w] . (lambda () +;; (interactive) +;; (start-process "" nil "qutebrowser"))) +;; ([?\s-n] . (lambda () +;; (interactive) +;; (start-process "" nil "nyxt"))) +;; ([?\s-k] . (lambda () +;; (interactive) +;; (start-process "" nil "krita"))) +;; ([?\s-g] . (lambda () +;; (interactive) +;; (start-process "" nil "gimp"))) +;; ([?\s-b] . (lambda () +;; (interactive) +;; (start-process "" nil "blender"))) +;; ([?\s-c] . (lambda () +;; (interactive) +;; (start-process "" nil "chromium"))) +;; ([s-f2] . (lambda () +;; (interactive) +;; (start-process "" nil "/usr/bin/slock"))))) #+end_src And we also need to set up our media keys: #+begin_src emacs-lisp :tangle yes -(exwm-input-set-key (kbd "") 'emms-next) -(exwm-input-set-key (kbd "") 'emms-previous) -(exwm-input-set-key (kbd "") 'emms-pause) -(exwm-input-set-key - (kbd "") - (lambda () - (interactive) (start-process-shell-command - "pactl" nil "pactl set-sink-volume 0 +5% && pactl set-sink-volume 1 +5%"))) -(exwm-input-set-key - (kbd "") - (lambda () - (interactive) (start-process-shell-command - "pactl" nil "pactl set-sink-volume 0 -5% && pactl set-sink-volume 1 -5%"))) -(exwm-input-set-key - (kbd "") - (lambda () - (interactive) (start-process-shell-command - "pactl" nil "pactl set-sink-mute 0 toggle && pactl set-sink-mute 1 toggle"))) +;; (exwm-input-set-key (kbd "") 'emms-next) +;; (exwm-input-set-key (kbd "") 'emms-previous) +;; (exwm-input-set-key (kbd "") 'emms-pause) +;; (exwm-input-set-key +;; (kbd "") +;; (lambda () +;; (interactive) (start-process-shell-command +;; "pactl" nil "pactl set-sink-volume 0 +5% && pactl set-sink-volume 1 +5%"))) +;; (exwm-input-set-key +;; (kbd "") +;; (lambda () +;; (interactive) (start-process-shell-command +;; "pactl" nil "pactl set-sink-volume 0 -5% && pactl set-sink-volume 1 -5%"))) +;; (exwm-input-set-key +;; (kbd "") +;; (lambda () +;; (interactive) (start-process-shell-command +;; "pactl" nil "pactl set-sink-mute 0 tog +;; gle && pactl set-sink-mute 1 toggle"))) ;; Things to implement in exwm: ;;Key([], 'XF86MonBrightnessUp', lazy.spawn("light -A 10")), ;;Key([], 'XF86MonBrightnessDown', lazy.spawn("light -U 10")), @@ -118,24 +126,26 @@ And we also need to set up our media keys: ** Font Now we configure fonts: #+begin_src emacs-lisp :tangle yes -(setq doom-font (font-spec :family "FiraCode Nerd Font" :size 14 :weight 'semi-light) - doom-variable-pitch-font (font-spec :family "Fira Sans" :size 14) - doom-unicode-font (font-spec :family "Symbola" :size 14) - doom-serif-font (font-spec :family "Fira Sans" :size 14) - doom-big-font (font-spec :family "FiraCode Nerd Font" :size 28)) +(setq doom-font (font-spec :family "Hack" :size 16 :weight 'semi-light) + doom-variable-pitch-font (font-spec :family "Fira Sans" :size 16) + doom-unicode-font (font-spec :family "Symbola" :size 16) + doom-serif-font (font-spec :family "Fira Sans" :size 16) + doom-big-font (font-spec :family "Hack" :size 28)) #+end_src ** Color Scheme I'm experimenting with many themes right now. One of these themes is the city-lights theme, another one of them is the catppuccin theme. #+begin_src emacs-lisp :tangle yes -(setq doom-theme 'doom-ayu-light) -;; (setq doom-theme 'doom-rouge) +;; (setq doom-theme 'doom-ayu-light) +(setq doom-theme 'doom-miramare) ;; (setq catppuccin-flavor 'mocha) +;; (load-theme 'catppuccin) #+end_src ** Doom Module and Programs Configuration *** Agenda Now we add these two files to our agenda search path: #+begin_src emacs-lisp :tangle yes +(require 'org-habit) (setq org-agenda-files (list "~/org/agenda.org" "~/org/contacts.org" "~/org/notes.org")) @@ -148,23 +158,29 @@ And we also want to set up org-habit to start graphing our habits as soon as pos *** IRC Set up circe to connect to my bouncer: #+begin_src emacs-lisp :tangle yes -(after! circe - (set-irc-server! "nullring.xyz" - `(:tls t - :port 4095 - :nick "LiCoO2/AndreiNet" - :user "LiCoO2/AndreiNet" - :pass ,(+pass-get-secret "ZNC")))) +;; (after! circe +;; (set-irc-server! "nullring.xyz" +;; `(:tls t +;; :port 4095 +;; :nick "LiCoO2/AndreiNet" +;; :user "LiCoO2/AndreiNet" +;; :pass ,(+pass-get-secret "ZNC")))) #+end_src And another to connect to libera: #+begin_src emacs-lisp :tangle yes -(set-irc-server! "irc.libera.chat" +(after! circe (set-irc-server! "irc.libera.chat" `(:tls t :port 6697 :nick "ret2pop" :sasl-username "ret2pop" :sasl-password (lambda (&rest _) (+pass-get-secret "libera.chat")) - :channels ("#emacs" "#rwx"))) + :channels ("#emacs" "#rwx")))) +#+end_src +#+begin_src emacs-lisp :tangle yes +(after! circe (set-irc-server! "nullring.xyz" + `(:tls t + :port 6697 + :nick "LiCoO2"))) #+end_src *** Email In order to use this configuration, you must install and configure mu and mbsync. @@ -210,6 +226,7 @@ We want the default search engine of eww to be google because duckduckgo is bad: (setq search-engine-default "google") (setq eww-search-prefix "https://google.com/search?q=") +(setq browse-url-secondary-browser-function 'browse-url-generic browse-url-generic-program "qutebrowser") (setq browse-url-browser-function 'eww-browse-url) (add-hook 'eww-mode-hook (lambda () (local-set-key (kbd "y Y") #'eww-copy-page-url))) @@ -218,11 +235,41 @@ We want the default search engine of eww to be google because duckduckgo is bad: In order to use this configuration, you must have mpd configured to use the same directory. We automatically connect to mpd. #+begin_src emacs-lisp :tangle yes +(emms-all) +(setq emms-source-file-default-directory (expand-file-name "~/music/")) (setq emms-player-mpd-music-directory "~/music/") +(setq emms-player-mpd-server-name "localhost") +(setq emms-player-mpd-server-port "6600") (setq emms-player-list '(emms-player-mpd)) -(emms-all) +(add-to-list 'emms-info-functions 'emms-info-mpd) +(add-to-list 'emms-player-list 'emms-player-mpd) (emms-player-mpd-connect) #+end_src +** Keybindings +Now we set up our keybindings for our applications: +#+begin_src emacs-lisp :tangle yes +(map! :leader + :desc "Open irc" + "i c" #'circe) +(map! :leader + :desc "Open audio manager" + "m m" #'emms) +(map! :leader + :desc "Open RSS feed reader" + "r s" #'elfeed) +(map! :leader + :desc "Open password manager" + "p w" #'ivy-pass) +(map! :leader + :desc "Open dictionary program" + "d i" #'dictionary) +(map! :leader + :desc "Open rtorrent frontend" + "r t" #'mentor) +(map! :leader + :desc "Open eww web browser" + "e w" #'eww) +#+end_src *** Journal First we set the journal to be in the website directory: #+begin_src emacs-lisp :tangle yes @@ -241,6 +288,7 @@ And then we add the headers needed to export the journal automatically: (`yearly "#+TITLE: Yearly Journal\n#+STARTUP: folded")))) (setq org-journal-file-header 'org-journal-file-header-func) +(setq org-export-with-section-numbers nil) (setq org-journal-file-format "%Y%m%d.org") #+end_src To add everything to the agenda search path, we toggle: @@ -276,13 +324,12 @@ In order to publish my website, we need to configure emacs to publish it somewhe :auto-preamble t) ("website-static" :base-directory "~/org/website" - :base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf" + :base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf\\|ico" :publishing-directory "~/website_html/" :recursive t :publishing-function org-publish-attachment) - ("website" :components ("website-org" "website-static")))) - - + ("website" :auto-sitemap t :components ("website-org" "website-static")))) +(setq org-html-postamble "Copyright (c) 2024 Preston Pan") #+end_src *** Contacts Now we configure org-contacts, which allows me to store contacts in an org mode file: @@ -308,31 +355,6 @@ Sometimes I want a timer to help me keep track of the time. #+begin_src emacs-lisp :tangle yes (setq org-clock-sound "~/audio/ding.wav") #+end_src -** Keybindings -Now we set up our keybindings for our applications: -#+begin_src emacs-lisp :tangle yes -(map! :leader - :desc "Open irc" - "i c" #'circe) -(map! :leader - :desc "Open audio manager" - "m m" #'emms) -(map! :leader - :desc "Open RSS feed reader" - "r s" #'elfeed) -(map! :leader - :desc "Open password manager" - "p w" #'ivy-pass) -(map! :leader - :desc "Open dictionary program" - "d i" #'dictionary) -(map! :leader - :desc "Open rtorrent frontend" - "r t" #'mentor) -(map! :leader - :desc "Open eww web browser" - "e w" #'eww) -#+end_src ** External Packages we want to include some packages that don't come with doom emacs. *** KBD-Mode @@ -393,9 +415,26 @@ We use ednc to manage notifications. #+end_src *** Mastodon #+begin_src emacs-lisp :tangle yes -(setq mastodon-instance-url "https://types.pl" - mastodon-active-user "ret2pop") +(setq mastodon-instance-url "https://types.pl") +(setq mastodon-active-user "ret2pop") +#+end_src +*** Ement +#+begin_src emacs-lisp :tangle yes +;; (ement-connect :uri-prefix "http://localhost:8009") #+end_src +*** Stem +I wrote a [[https://github.com/ret2pop/stem-mode][major mode]] for my programming language [[https://github.com/ret2pop/stem][stem]]. +#+begin_src emacs-lisp :tangle yes +(use-package stem-mode) +(add-to-list 'auto-mode-alist '("\\.stem\\'" . stem-mode)) +#+end_src +*** Tufte +Our website uses the tufte css styling and we must therefore tell emacs to generate html that is compliant with this html: +#+begin_src emacs-lisp +(use-package! ox-tufte) +(use-package! plan9-theme) +#+end_src + * packages.el Configuration These are some external packages that I use that are not provided by doom modules. #+begin_src emacs-lisp :tangle packages.el @@ -424,6 +463,8 @@ These are some external packages that I use that are not provided by doom module (package! go-translate) (package! ts) (package! chess) +(package! ox-tufte) +(package! plan9-theme) #+end_src * init.el Configuration @@ -552,7 +593,7 @@ This installs all the doom modules that we are going to be configuring: ;;gdscript ; the language you waited for (go +lsp) ;;(graphql +lsp) ; Give queries a REST - ;;(haskell +lsp) ; a language that's lazier than I am + (haskell +lsp) ; a language that's lazier than I am ;;hy ; readability of scheme w/ speed of python ;;idris ; a language you can depend on (json +lsp) @@ -584,7 +625,7 @@ This installs all the doom modules that we are going to be configuring: (scheme +guile) (sh +fish +lsp) ;;sml - ;;solidity ; do you need a blockchain? No. + solidity ; do you need a blockchain? No. ;;swift ; who asked for emoji variables? ;;terra ; Earth and Moon in alignment for performance. (web +lsp) diff --git a/config/elfeed.org b/config/elfeed.org index ca942ea..94fdbf5 100644 --- a/config/elfeed.org +++ b/config/elfeed.org @@ -18,6 +18,8 @@ Here are some interesting blogs, many of which are from substack. ** News :news: These are the news articles that I subscribe to. Some of these are politics related but I mostly just want to inform myself about technology subjects. +*** https://www.wired.com/feed/tag/ai/latest/rss +*** https://www.wired.com/feed/category/science/latest/rss *** https://feeds.washingtonpost.com/rss/politics?itid=lk_inline_manual_2 *** https://news.ycombinator.com/rss diff --git a/config/qtile.org b/config/qtile.org index 04bcb12..537bab5 100644 --- a/config/qtile.org +++ b/config/qtile.org @@ -30,7 +30,7 @@ import subprocess mod = "mod4" -terminal = guess_terminal() +terminal = "kitty" wl_import_rules = None auto_minimize = True wmname = "LG3D" @@ -38,8 +38,9 @@ wmname = "LG3D" ** Hex Colors We then load the catppuccin colors for the bar and window borders. #+begin_src python :tangle config.py -def get_colors(): - return [ +def get_colors(theme): + if theme == "city-lights": + return [ # Normal colors '#45475a', '#f38ba8', @@ -65,8 +66,33 @@ def get_colors(): # foreground '#cdd6f4', ] + elif theme == "gruvbox": + return [ + # normal colors + '#282828', + '#cc241d', + '#98971a', + '#d79921', + '#458588', + '#b16286', + '#689d6a', + '#a89984', + #bright colors + '#928374', + '#fb4934', + '#b8bb26', + '#fabd2f', + '#83a598', + '#d3869b', + '#8ec07c', + '#ebdbb2', + # background + '#282828', + # foreground + '#ebdbb2', + ] -colors = get_colors() +colors = get_colors("gruvbox") #+end_src ** Keybindings The _keys_ variable is going to be our final list of keybindings. We start by initializing it @@ -123,6 +149,7 @@ keys.extend([ Key([mod], "g", lazy.spawn("gimp"), desc="Run GIMP"), Key([mod], "t", lazy.spawn("torbrowser-launcher"), desc="Run Tor Browser"), Key([mod], "i", lazy.spawn("emacsclient --eval \"(emacs-everywhere)\""), desc="Emacs Everywhere!"), + Key([mod], "d", lazy.spawn("dmenu_run"), desc="dmenu"), ]) #+end_src *** XF86 @@ -173,7 +200,7 @@ layouts = [ # layout.Stack(num_stacks=2), # layout.Bsp(), # layout.Matrix(), - # layout.MonadTall(), + layout.MonadTall(border_focus=colors[2], border_normal=colors[0], border_width=4, margin=7), # layout.MonadWide(), # layout.RatioTile(), # layout.Tile(), @@ -195,40 +222,120 @@ widget_defaults = dict( ) extension_defaults = widget_defaults.copy() +# screens = [ +# Screen( +# top=bar.Bar( +# [ +# # widget.CurrentLayout(), +# widget.GroupBox(active=colors[6], inactive=colors[15], this_current_screen_border=colors[4], highlight_colorsr=colors[3]), +# widget.Prompt(), +# widget.WindowName(), +# widget.Chord( +# chords_colors={ +# "launch": ("#ff0000", "#ffffff"), +# }, +# name_transform=lambda name: name.upper(), +# ), +# # widget.StatusNotifier(), + +# widget.Systray(), +# widget.Battery(charge_char="πŸ”‹", discharge_char="πŸ”‹", full_char="πŸ”‹", format="{char} {percent:2.0%}"), +# # widget.TextBox("|", foreground=colors[1]), +# widget.Sep(padding=16, size_percent=80, foreground=colors[1]), +# widget.Clock(format="πŸ•’ %a %I:%M %p"), +# widget.Sep(padding=16, size_percent=80, foreground=colors[1]), +# widget.Mpd2(), +# widget.TextBox(" "), + +# ], +# 24, + +# # border_width=[2, 0, 2, 0], # Draw top and bottom borders +# # border_colorsr=["ff00ff", "000000", "ff00ff", "000000"] # Borders are magenta +# ), +# bottom=bar.Gap(4), +# left=bar.Gap(3), +# right=bar.Gap(3), +# ), +# ] + +def pline(rl, fg, bg): + if rl == 0: + uc = "ξ‚°" + else: + uc = "ξ‚²" + return widget.TextBox(text = uc, + padding = 0, + fontsize = 22, + foreground=fg, + background=bg) + screens = [ Screen( + wallpaper="~/.config/qtile/wallpaper", + wallpaper_mode="fill", top=bar.Bar( [ - # widget.CurrentLayout(), - widget.GroupBox(active=colors[6], inactive=colors[15], this_current_screen_border=colors[4], highlight_color=colors[3]), - widget.Prompt(), - widget.WindowName(), - widget.Chord( - chords_colors={ - "launch": ("#ff0000", "#ffffff"), - }, - name_transform=lambda name: name.upper(), + widget.CurrentLayoutIcon( + scale=0.75, + background=colors[3] ), - # widget.StatusNotifier(), - - widget.Systray(), - widget.Battery(charge_char="πŸ”‹", discharge_char="πŸ”‹", full_char="πŸ”‹", format="{char} {percent:2.0%}"), - # widget.TextBox("|", foreground=colors[1]), - widget.Sep(padding=16, size_percent=80, foreground=colors[1]), - widget.Clock(format="πŸ•’ %a %I:%M %p"), - widget.Sep(padding=16, size_percent=80, foreground=colors[1]), - widget.Mpd2(), - widget.TextBox(" "), + pline(0, colors[3], colors[6]), + widget.GroupBox( + highlight_method="block", + background=colors[6], + this_current_screen_border="#7daea3" + ), + pline(0, colors[6], colors[7]), + widget.TaskList( + highlight_method="block", + max_title_width=300, + border="#d3869b", + padding=2, + background=colors[7] + ), + pline(0, colors[7], colors[0]), + widget.Spacer(), + pline(1, colors[2], colors[0]), + widget.Net( # requires python-psutil + interface="wlp0s20f3", + format="πŸ“‘ {total}", + update_interval=30, + background=colors[2] + ), + pline(1, colors[5], colors[2]), + widget.Backlight( + format="πŸ’‘ {percent:2.0%}", + backlight_name="intel_backlight", + background=colors[5] + ), + pline(1, colors[3], colors[5]), + widget.Volume( + emoji=True, + background=colors[3] + ), + widget.Volume( + background=colors[3] + ), + pline(1, colors[4], colors[3]), + widget.BatteryIcon( + background=colors[4] + ), + widget.Battery( + charge_char="now ", + discharge_char="left", + format="{percent:2.0%} {char}", + background=colors[4] + ), + pline(1, colors[1], colors[4]), + widget.Clock( + format="%Y-%m-%d %a %I:%M %p", + background=colors[1] + ), ], - 24, - - # border_width=[2, 0, 2, 0], # Draw top and bottom borders - # border_color=["ff00ff", "000000", "ff00ff", "000000"] # Borders are magenta + 26, ), - bottom=bar.Gap(4), - left=bar.Gap(3), - right=bar.Gap(3), ), ] #+end_src diff --git a/config/qutebrowser.org b/config/qutebrowser.org index 03741b0..1deb37a 100644 --- a/config/qutebrowser.org +++ b/config/qutebrowser.org @@ -18,7 +18,8 @@ We import pathlib to get our home directory. I am experimenting with many themes right now, and one of them is the [[https://github.com/gicrisf/qute-city-lights][city-lights]] theme. Another one I have used is the [[https://github.com/catppuccin/catppuccin][catppuccin]] theme. #+begin_src python :tangle config.py -config.source('themes/qute-city-lights/city-lights-theme.py') +# config.source('themes/qute-city-lights/city-lights-theme.py') +config.source('gruvbox.py') #+end_src ** Variables We need the location of the home directory. @@ -96,7 +97,7 @@ for item in js_blacklist: ** Misc. Doing mundane things like setting the downloads directory to not use an upper case letter. #+begin_src python :tangle config.py -c.downloads.location.directory = "~/downloads" +c.downloads.location.directory = "~/Downloads" #+end_src ** End of Config #+begin_src python :tangle config.py diff --git a/favicon-16x16.png b/favicon-16x16.png new file mode 100644 index 0000000..03a6eec Binary files /dev/null and b/favicon-16x16.png differ diff --git a/favicon-32x32.png b/favicon-32x32.png new file mode 100644 index 0000000..d5eba6e Binary files /dev/null and b/favicon-32x32.png differ diff --git a/favicon.ico b/favicon.ico new file mode 100644 index 0000000..2b34bfd Binary files /dev/null and b/favicon.ico differ diff --git a/img/churchill.png b/img/churchill.png new file mode 100644 index 0000000..23003ad Binary files /dev/null and b/img/churchill.png differ diff --git a/img/drawing-old.png b/img/drawing-old.png new file mode 100644 index 0000000..d2907a4 Binary files /dev/null and b/img/drawing-old.png differ diff --git a/img/drawing.png b/img/drawing.png new file mode 100644 index 0000000..522dc50 Binary files /dev/null and b/img/drawing.png differ diff --git a/img/favicon.ico b/img/favicon.ico new file mode 100644 index 0000000..2633e87 Binary files /dev/null and b/img/favicon.ico differ diff --git a/img/relativity1.jpg b/img/relativity1.jpg new file mode 100644 index 0000000..e3b0a82 Binary files /dev/null and b/img/relativity1.jpg differ diff --git a/img/relativity2.jpg b/img/relativity2.jpg new file mode 100644 index 0000000..3455404 Binary files /dev/null and b/img/relativity2.jpg differ diff --git a/img/relativity2.jpg~ b/img/relativity2.jpg~ new file mode 100644 index 0000000..e23e252 Binary files /dev/null and b/img/relativity2.jpg~ differ diff --git a/index.org b/index.org index 55469f1..3d8f6b1 100644 --- a/index.org +++ b/index.org @@ -1,17 +1,28 @@ -#+title: ret2pop +#+title: Introducing ret2pop #+author: Preston Pan #+description: My personal website #+html_head: +#+html_head: +#+html_head: +#+html_head: +#+html_head: +#+html_head: +#+html_head: +#+html_head: #+date: <2023-06-09 Fri> #+language: en #+OPTIONS: broken-links:t -* Introducing ret2pop +* Introduction +#+caption: All Hope Abandon, Ye Who Enter Here +[[./img/drawing-old.png]] + Hello! I'm a person on the internet that does things, such as: - Music - Programming - Mathematics - Physics +- Linguistics - Thinking And if you're here to do one of these things, I guarantee you're in the right place! ** [[file:journal/index.org][Journal]] @@ -37,7 +48,7 @@ can therefore publish them. So I did! Configurations include: - Elfeed …and many more! ** [[file:about.org][About]] -To see my contact information and whatnot. +Who is the man behind ret2pop? How do you contact him? So many mysteries await… * About this Website I wrote this website in org mode. For more information, see the [[file:README.org][README]]. diff --git a/journal/20231208.org b/journal/20231208.org new file mode 100644 index 0000000..3c207bc --- /dev/null +++ b/journal/20231208.org @@ -0,0 +1,22 @@ +#+TITLE: Daily Journal +#+STARTUP: showeverything +#+DESCRIPTION: My daily journal entry +#+AUTHOR: Preston Pan +#+HTML_HEAD: +#+html_head: +#+html_head: +#+options: broken-links:t +* Friday, 08 December 2023 +** 17:31 +Recently I have decided to start using emacs again, and this website is therefore +going to be updated much more. I have learned a little bit of Lagrangian and Hamiltonian +mechanics, and I am trying to learn some quantum mechanics as a result. I have my amateur +radio license now so I want to get my advanced amateur radio license. + +Also, I am kind of failing out of University because I don't really like any of the classes and +I obviously know a lot of the math and physics already, as well as a decent amount of programming. +I don't really know what University has to offer for me other than the paper, but it makes the +whole thing feel really pointless. Maybe I'll start a company, or starve on the streets, who knows! +** 21:57 +I'm just with my friend Jude right now because I am demonstrating the power of emacs and how it +can do journaling automatically and add it to my website which is integrated with all my other org files. diff --git a/journal/20231209.org b/journal/20231209.org new file mode 100644 index 0000000..419f2a1 --- /dev/null +++ b/journal/20231209.org @@ -0,0 +1,13 @@ +#+TITLE: Daily Journal +#+STARTUP: showeverything +#+DESCRIPTION: My daily journal entry +#+AUTHOR: Preston Pan +#+HTML_HEAD: +#+html_head: +#+html_head: +#+options: broken-links:t +* Saturday, 09 December 2023 +** 18:37 +Today I lost my charger but later my friend Lucien returned it to me. He has the same computer +as me and I therefore lost some time today. However, it is fine because I managed to read +some of my quantum mechanics book. diff --git a/journal/20231210.org b/journal/20231210.org new file mode 100644 index 0000000..c64278a --- /dev/null +++ b/journal/20231210.org @@ -0,0 +1,17 @@ +#+TITLE: Daily Journal +#+STARTUP: showeverything +#+DESCRIPTION: My daily journal entry +#+AUTHOR: Preston Pan +#+HTML_HEAD: +#+html_head: +#+html_head: +#+options: broken-links:t +* Sunday, 10 December 2023 +** 15:21 +After not using my computer for a day due to not finding my charger, I have finally found it. I am now working on some quantum mechanics. +Specifically, I am trying to wrap my head around the Schrodinger equation and how that relates to position and velocity. I understand +currently that the time-evolution of the system is governed by it, and I understand how to solve the equation for certain assumptions. However, +I am unclear as to how Fourier Transforms have a connection to quantum systems. +** 21:10 +I have worked a lot on the website; I am currently attempting to figure out how to make it look good instead of bad, and I want to add a navbar. +I also probably want to reformat how I'm doing some things in org mode. I have a favicon now but it isn't good. diff --git a/journal/20231213.org b/journal/20231213.org new file mode 100644 index 0000000..376f61f --- /dev/null +++ b/journal/20231213.org @@ -0,0 +1,13 @@ +#+TITLE: Daily Journal +#+STARTUP: showeverything +#+DESCRIPTION: My daily journal entry +#+AUTHOR: Preston Pan +#+HTML_HEAD: +#+html_head: +#+html_head: +#+options: broken-links:t +* Wednesday, 13 December 2023 +** 14:06 +Today, I am meeting my friend Matthew. +** 19:32 +That meeting is done. I played some really good piano and I think now I am going to work on the mindmap more. diff --git a/journal/20231214.org b/journal/20231214.org new file mode 100644 index 0000000..bfd05b1 --- /dev/null +++ b/journal/20231214.org @@ -0,0 +1,14 @@ +#+TITLE: Daily Journal +#+STARTUP: showeverything +#+DESCRIPTION: My daily journal entry +#+AUTHOR: Preston Pan +#+HTML_HEAD: +#+html_head: +#+html_head: +#+options: broken-links:t +* Thursday, 14 December 2023 +** 13:46 +Yesterday I had good conversations with many of my friends; I talked a decent bit about the Null +Philosophy with my dorm friends and I talked about the mindmap with Matthew Hinton. In any case, +I did not really work much on the mindmap yesterday so I believe I will do so today. I also need +to get my advanced license. diff --git a/journal/20231215.org b/journal/20231215.org new file mode 100644 index 0000000..9be750e --- /dev/null +++ b/journal/20231215.org @@ -0,0 +1,12 @@ +#+TITLE: Daily Journal +#+STARTUP: showeverything +#+DESCRIPTION: My daily journal entry +#+AUTHOR: Preston Pan +#+HTML_HEAD: +#+html_head: +#+html_head: +#+options: broken-links:t +* Friday, 15 December 2023 +** 13:31 +I went on an early morning run at 4 today; it felt really really good and I want to do it again. I then +woke up very late. diff --git a/journal/20231217.org b/journal/20231217.org new file mode 100644 index 0000000..6a70d9e --- /dev/null +++ b/journal/20231217.org @@ -0,0 +1,12 @@ +#+TITLE: Daily Journal +#+STARTUP: showeverything +#+DESCRIPTION: My daily journal entry +#+AUTHOR: Preston Pan +#+HTML_HEAD: +#+html_head: +#+html_head: +#+options: broken-links:t +* Sunday, 17 December 2023 +** 23:21 +Today I talked with my friend Jude and I also did some electrodynamics problems. We tried solving for the magnetic +field equations with special relativity and the Coulomb law as a postulate. diff --git a/journal/20231220.org b/journal/20231220.org new file mode 100644 index 0000000..8605381 --- /dev/null +++ b/journal/20231220.org @@ -0,0 +1,12 @@ +#+TITLE: Daily Journal +#+STARTUP: showeverything +#+DESCRIPTION: My daily journal entry +#+AUTHOR: Preston Pan +#+HTML_HEAD: +#+html_head: +#+html_head: +#+options: broken-links:t +* Wednesday, 20 December 2023 +** 16:35 +Shit is a little bit fucked, but I don't really feel that bad which is good. I do not know if I am going +to university anymore. diff --git a/journal/20240110.org b/journal/20240110.org new file mode 100644 index 0000000..86465ca --- /dev/null +++ b/journal/20240110.org @@ -0,0 +1,13 @@ +#+TITLE: Daily Journal +#+STARTUP: showeverything +#+DESCRIPTION: My daily journal entry +#+AUTHOR: Preston Pan +#+HTML_HEAD: +#+html_head: +#+html_head: +#+options: broken-links:t +* Wednesday, 10 January 2024 +** 16:39 +I have remembered that journaling capabilities existed in emacs again. I've been working on a programming language +called stem for the past 6 days, and it's finally looking like a finished project. It is a stack based language +and it has a foreign language interface and metaprogramming. diff --git a/journal/20240123.org b/journal/20240123.org new file mode 100644 index 0000000..d86dc5b --- /dev/null +++ b/journal/20240123.org @@ -0,0 +1,24 @@ +#+TITLE: Daily Journal +#+STARTUP: showeverything +#+DESCRIPTION: My daily journal entry +#+AUTHOR: Preston Pan +#+HTML_HEAD: +#+html_head: +#+html_head: +#+options: broken-links:t +* Tuesday, 23 January 2024 +** 02:13 +I have decided to write in my journal yet again. I've been working on a programming language ~stem~ for the past +few weeks, and it has been exhilarating. I plan to add much more functionality to the programming language, as I +am already attempting to implement object oriented programming for it. Additionally, I have had ideas about how I would +implement a compiler for this programming language, and I have thought about writing a new lisp dialect based on +this language. + +In other news, I have become a University drop-out. I am still visiting my old university UVic from time to time, but I +am no longer enrolled in any classes at UVic nor am I staying there long term. I don't really know what I'm going to do. + +I found that university was utterly stiffling and didn't allow me to pursue my own interests. Additionally, I found that +many of the professors were unwilling to help me. Therefore, I dropped out. +** 11:34 +I just woke up. I will do my agenda tasks and then try to go to a BCIT convention to try to do some job-hunting. I'm pretty +excited for this. diff --git a/journal/20240124.org b/journal/20240124.org new file mode 100644 index 0000000..1b10e38 --- /dev/null +++ b/journal/20240124.org @@ -0,0 +1,17 @@ +#+TITLE: Daily Journal +#+STARTUP: showeverything +#+DESCRIPTION: My daily journal entry +#+AUTHOR: Preston Pan +#+HTML_HEAD: +#+html_head: +#+html_head: +#+options: broken-links:t +* Wednesday, 24 January 2024 +** 13:43 +For lunch, I ate rice and vegetables, mainly cauliflower, and two eggs. I plan to take my protein in the night, and I need to +get more protein soon. +*** TODO Get more protein +Vega to be mixed with milk. +** 15:44 +What's weird is I think my journal might be a little broken; I wrote the thing above yesterday. Oh well. I am also looking into +changing my website's css to make it less ugly. I also need to buy some vega protein. diff --git a/journal/index.org b/journal/index.org index bfdcb46..290f751 100644 --- a/journal/index.org +++ b/journal/index.org @@ -5,10 +5,18 @@ #+date: <2023-06-09 Fri> #+language: en #+OPTIONS: broken-links:t -* Journal! +#+html_head: +#+html_head: +#+html_head: +#+html_head: +#+html_head: +#+html_head: +#+html_head: +* Introduction This is my journal. It's basically my everyday life from a technology perspective (not many personal details although -there will be some). +there will be some). I will also be posting some TODOs that I have +throughout time. ** Entries Here is a list of all my journal entries: @@ -23,6 +31,17 @@ done #+end_src #+RESULTS: +- [[file:20240124.org][20240124.org]] +- [[file:20240123.org][20240123.org]] +- [[file:20240110.org][20240110.org]] +- [[file:20231220.org][20231220.org]] +- [[file:20231217.org][20231217.org]] +- [[file:20231215.org][20231215.org]] +- [[file:20231214.org][20231214.org]] +- [[file:20231213.org][20231213.org]] +- [[file:20231210.org][20231210.org]] +- [[file:20231209.org][20231209.org]] +- [[file:20231208.org][20231208.org]] - [[file:20230711.org][20230711.org]] - [[file:20230704.org][20230704.org]] - [[file:20230625.org][20230625.org]] diff --git a/mindmap/Fourier Transform.org b/mindmap/Fourier Transform.org new file mode 100644 index 0000000..9996abd --- /dev/null +++ b/mindmap/Fourier Transform.org @@ -0,0 +1,12 @@ +:PROPERTIES: +:ID: 262ca511-432f-404f-8320-09a2afe1dfb7 +:END: +#+title: Fourier Transform +#+author: Preston Pan +#+html_head: +#+html_head: +#+html_head: +#+options: broken-links:t + +* Introduction +The Fourier Transform is a generalization of the Fourier Series. diff --git a/mindmap/Lagrangian mechanics.org b/mindmap/Lagrangian mechanics.org new file mode 100644 index 0000000..d306be7 --- /dev/null +++ b/mindmap/Lagrangian mechanics.org @@ -0,0 +1,106 @@ +:PROPERTIES: +:ID: 83da205c-7966-417e-9b77-a0a354099f30 +:END: +#+title: Lagrangian mechanics +#+author: Preston Pan +#+html_head: +#+html_head: +#+html_head: +#+options: broken-links:t +* Introduction +The Lagrangian, $L: (\mathbb{R}, \mathbb{R} \rightarrow \mathbb{R}, \mathbb{R} \rightarrow \mathbb{R}) \rightarrow \mathbb{R}$ is simply a functional: +\begin{align*} +L = L(t, f(t), f'(t)) +\end{align*} +Where the Lagrangian represents some metric by which we calculate how optimized $f(x)$ is. The action: +\begin{align*} +J[f] = \int_{a}^{b}L(t, f(t), f'(t))dt \\ +\end{align*} +Defines the actual relationship between $f(t)$ and its level of optimization, where $a$ and $b$ represent the start +and end points for a certain curve. For example, if you wanted to minimize the surface area of something, $a$ and $b$ +would be the starting and end points of the surface. +* Euler-Lagrange Equation +We first define some function: +\begin{align*} +g(t) := f(t) + \epsilon \nu(t) +\end{align*} +Where $f(t)$ is our optimized function and $\nu(t)$ represents some function we add to $f(t)$ such that we perturb it +by some small amount. Now $\epsilon$ is a small number such that the perturbation is small. Note that when $\epsilon = 0$, $g(t) = f(t)$, +our optimized function. +\begin{align*} +J[g] = \int_{a}^{b}L(t, g(t), g'(t))dt +\end{align*} +Now $J[g]$ is optimized when $g(t)$ is a maximum or minimum with respect to the Lagrangian. $\frac{dJ}{d\epsilon}$ represents the extent to which +the action changes when the perturbation changes. When $\epsilon = 0$, $g(t) = f(t)$, which means $\frac{dJ}{d\epsilon}$ evaluated at $\epsilon = 0$ +should be zero, by definition of maxima and minima. +\begin{align*} +\frac{dJ[g]}{d\epsilon} = \int_{a}^{b}\frac{dL}{d\epsilon}dt +\end{align*} +By the multivariable chain rule: +\begin{align*} +\frac{dL}{d\epsilon} = \frac{\partial L}{\partial t}\frac{dt}{d\epsilon} + \frac{\partial L}{\partial g}\frac{dg}{d\epsilon} + \frac{\partial L}{\partial g'}\frac{dg'}{d\epsilon} +\end{align*} +because $t$ does not depend on $\epsilon$, $g = f + \epsilon\nu$, and $g' = f' + \epsilon\nu'$: +\begin{align*} +\frac{dL}{d\epsilon} = \frac{\partial L}{\partial g}\nu(t) + \frac{\partial L}{\partial g'}\nu'(t) +\end{align*} +now substituting back into the integral: +\begin{align*} +\frac{dJ}{d\epsilon} = \int_{a}^{b}(\frac{\partial L}{\partial g}\nu(t) + \frac{\partial L}{\partial g'}\nu'(t))dt +\end{align*} +applying integration by parts to the right side: +\begin{align*} +\frac{dJ}{d\epsilon} = \int_{a}^{b}\frac{\partial L}{\partial g}\nu(t)dt + \nu(t)\frac{\partial L}{\partial g'}\bigg|_{a}^{b} - \int_{a}^{b}\nu(t)\frac{d}{dt}\frac{\partial L}{\partial g'}dt +\end{align*} +now $\nu(t)$ can be any perturbation of $f(t)$ but the boundary conditions must stay the same (every function that we are considering for optimization must have the same start and end points); +therefore, $\nu(a) = \nu(b) = 0$. We can evaluate the bar to be 0 as a result. Doing this, combining the integral, then factoring out $\nu(t)$: +\begin{align*} +\frac{dJ}{d\epsilon} = \int_{a}^{b}\nu(t)(\frac{\partial L}{\partial g} - \frac{d}{dt}\frac{\partial L}{\partial g'})dt +\end{align*} +Now we finally set $\epsilon = 0$. This means $g(t) = f(t)$, $g'(t) = f'(t)$, and $\frac{dJ}{d\epsilon} = 0$: +\begin{align*} +0 = \int_{a}^{b}\nu(t)(\frac{\partial L}{\partial f} - \frac{d}{dt}\frac{\partial L}{\partial f'})dt +\end{align*} +And now because $\nu(t)$ can be an arbitrarily large or small valued function as long as the boundary conditions remain the same and the left hand side +must be zero, we get the Euler-Lagrange equation: +\begin{align*} +\frac{\partial L}{\partial f} - \frac{d}{dt}\frac{\partial L}{\partial f'} = 0 +\end{align*} +This is because the integral implies that for all selections for this function $\nu(t)$, $\nu(t)(\frac{dL}{df} - \frac{d}{dt}\frac{dL}{dg'}) = 0$. Because $\nu(t)$ can be any +function assuming it satisfies the boundary conditions, this can only be the case if $\frac{dL}{df} - \frac{d}{dt}\frac{dL}{dg'} = 0$. +In physics, we re-cast $f$ as $q$ and $f'$ as $\dot{q}$, where $q$ and $\dot{q}$ are the /generalized coordinates/ and /generalized velocities/ respectively. +* The Hamiltonian +The Hamiltonian represents the total energy in the system; it is the [[id:23df3ba6-ffb2-4805-b678-c5f167b681de][Legendre Transformation]] of the Lagrangian. Applying the Legendre Transformation to the +Lagrangian for coordinate $\dot{q}$: +\begin{align*} +L = \frac{1}{2}m\dot{q}^{2} - V(q) \\ +H = \frac{\partial L}{\partial \dot{q}}\dot{q} - L +\end{align*} +the Hamiltonian is defined as: +\begin{align*} +H(q, p) = \sum _{i}p_{i}\dot{q_{i}} - L(q, \dot{q}) +\end{align*} +Or: +\begin{align*} +H(q, p) = \frac{p^{2}}{2m} + V(q) +\end{align*} +where $p$ is the generalized momentum, and $q$ is a generalized coordinate. This results in two differential equations, the first of which is: +\begin{align*} +\frac{\partial H}{\partial p_{i}} = \dot{q_{i}} +\end{align*} +which follows directly from the Hamiltonian definition. Then, from the Euler-Lagrange equation: +\begin{align*} +L = \sum_{i}p_{i}\dot{q_{i}} - H \\ +\frac{\partial(\sum_{i}p_{i}\dot{q_{i}} - H)}{\partial q_{i}} - \frac{d}{dt}\frac{\partial(\sum_{i}p_{i}\dot{q_{i}} - H)}{\partial \dot{q_{i}}} = 0 \\ +- \frac{\partial H}{\partial q_{i}} = \frac{dp_{i}}{dt} \\ +\frac{\partial H}{\partial q_{i}} = - \frac{dp_{i}}{dt} +\end{align*} +Although the generalized coordinate system in question does not have to be linear, we can encode all the differential +equations for all the coordinates at once with the [[id:4bfd6585-1305-4cf2-afc0-c0ba7de71896][del operator]]: +\begin{align*} +\vec{\nabla}_{p}H = \frac{d\vec{q}}{dt} \\ +\vec{\nabla}_{q}H = -\frac{d\vec{p}}{dt} +\end{align*} +this notation isn't standard and I kind of made it up, but I think it works, as long as you don't take the divergence +or the curl of this system to really mean anything. Note that in both the Hamiltonian formulation and Lagrangian formulation, +the differential equations reduce to [[id:6e2a9d7b-7010-41da-bd41-f5b2dba576d3][Newtonian mechanics]] if we are working in a linear coordinate system with energy conservation. diff --git a/mindmap/Legendre Transformation.org b/mindmap/Legendre Transformation.org new file mode 100644 index 0000000..f9bc51f --- /dev/null +++ b/mindmap/Legendre Transformation.org @@ -0,0 +1,31 @@ +:PROPERTIES: +:ID: 23df3ba6-ffb2-4805-b678-c5f167b681de +:END: +#+title: Legendre Transformation +#+author: Preston Pan +#+html_head: +#+html_head: +#+html_head: +#+options: broken-links:t + +* Definition +The Legendre Transformation represents a function in terms of the y-intercept of the tangent line at every point on the function. +we start with the equation for a tangent line: +\begin{align*} +y = mx + b +\end{align*} +However, the Legendre transform actually solves for $b$. For a general function $f(x)$ we define +the tangent line to a point on that function to be: +\begin{align*} +y = y'(x)x - b +\end{align*} +where subtracting $b$ is the convention, for some reason. Then solving for b: +\begin{align*} +b = y'(x)x - y +\end{align*} +The actual Legendre Transform requires $b$ to be a function of $y'$, therefore: +\begin{align*} +x(f') = (f'(x))^{-1} \\ +L\{f(x)\} = b(f') = f'x(f') - f((x(f')) +\end{align*} +In [[id:83da205c-7966-417e-9b77-a0a354099f30][Lagrangian mechanics]], the Hamiltonian can be defined as the Legendre transform of the Lagrangian. diff --git a/mindmap/Lorentz Force.org b/mindmap/Lorentz Force.org new file mode 100644 index 0000000..23aa782 --- /dev/null +++ b/mindmap/Lorentz Force.org @@ -0,0 +1,21 @@ +:PROPERTIES: +:ID: 658f3916-6b7f-4897-85c6-9acc82b13214 +:END: +#+title: Lorentz Force +#+author: Preston Pan +#+html_head: +#+html_head: +#+html_head: +#+options: broken-links:t + +* Definition +The Lorentz Force is an experimental law given by the equation: +\begin{align*} +\vec{F} = q(\vec{E} + \vec{v} \times \vec{B}) +\end{align*} +Where $q$ is the electric charge, $\vec{E}$ is the [[id:63656810-537f-42fc-a38a-1468d763b39a][Electric Field]], and $\vec{B}$ is the Magnetic Field. +For a continuous charge distribution: +\begin{align*} +\vec{F} = \rho\vec{E} + \vec{J} \times \vec{B} +\end{align*} +Where $\vec{J}$ is the electric current. diff --git a/mindmap/Maxwell's Equations.org b/mindmap/Maxwell's Equations.org new file mode 100644 index 0000000..187f7a5 --- /dev/null +++ b/mindmap/Maxwell's Equations.org @@ -0,0 +1,78 @@ +:PROPERTIES: +:ID: fde2f257-fa2e-469a-bc20-4d11714a515e +:END: +#+title: Maxwell's Equations +#+author: Preston Pan +#+html_head: +#+html_head: +#+html_head: +#+options: broken-links:t + +* Introduction +Maxwell's Equations are a set of four differential equations in multiple dimensions that produce a complete classical +theory of electromagnetic phenomena. + +* Derivations +These are the derivations of all four laws in their differential forms based on the [[id:2a543b79-33a0-4bc8-bd1c-e4d693666aba][inverse square]] law for [[id:32f0b8b1-17bc-4c91-a824-2f2a3bbbdbd1][electrostatics]] ([[id:5388f4e8-7bb8-452e-b997-fe9892aefcf3][Coulomb's Law]]), the [[id:658f3916-6b7f-4897-85c6-9acc82b13214][Lorentz Force]], +as well as the [[id:a871e62c-b4a0-4674-9dea-d377de2f780b][continuity equation]] and electromagnetic induction (which are just special cases of [[id:e38d94f2-8332-4811-b7bd-060f80fcfa9b][special relativity]]) as initial assumptions: +** Gauss' Law +This is given by the divergence of an [[id:2a543b79-33a0-4bc8-bd1c-e4d693666aba][inverse square]] field, specifically for an electric field which is the same as in [[id:32f0b8b1-17bc-4c91-a824-2f2a3bbbdbd1][electrostatics]]: +\begin{align*} +\vec{\nabla} \cdot \vec{E} = \frac{\rho}{\epsilon_{0}} +\end{align*} +** Divergence of Magnetic Field +The divergence of the magnetic field is the same as in [[id:5c36d0f1-06ad-436a-a56f-5ecc198b9b3e][magnetostatics]]: +\begin{align*} +\vec{\nabla} \cdot \vec{B} = 0 +\end{align*} +** Ampere's Law with Modifications +The [[id:5c36d0f1-06ad-436a-a56f-5ecc198b9b3e][magnetostatic]] magnetic field is given by the Bio-Savart Law, which can be derived from [[id:e38d94f2-8332-4811-b7bd-060f80fcfa9b][special relativity]] and [[id:5388f4e8-7bb8-452e-b997-fe9892aefcf3][Coulomb's Law]]: +\begin{align*} +\vec{B} = \frac{\mu_{0}}{4\pi}\int_{V}\frac{\vec{J} \times \hat{r}}{r^{2}}d\tau +\end{align*} +Now the curl of this field is given by [[id:5c36d0f1-06ad-436a-a56f-5ecc198b9b3e][magnetostatics]]: +\begin{align*} +\vec{\nabla} \times \vec{B} = \mu_{0}\vec{J} +\end{align*} +However, if you take the divergence of this equation, the left hand side reduces to zero by the definition of the [[id:4bfd6585-1305-4cf2-afc0-c0ba7de71896][del operator]], but the +right hand side does not always: +\begin{align*} +\vec{\nabla} \cdot \mu_{0}\vec{J} = \mu_{0} (\vec{\nabla} \cdot \vec{J}) \neq 0 +\end{align*} + +Given this problem, a correction is given via the [[id:a871e62c-b4a0-4674-9dea-d377de2f780b][continuity equation]]: +\begin{align*} +\vec{\nabla} \cdot \vec{J} = -\frac{\partial \rho}{\partial t} \\ +\epsilon_{0}(\vec{\nabla} \cdot \vec{E}) = \rho \\ +\vec{\nabla} \cdot \vec{J} = -\epsilon_{0}\vec{\nabla} \cdot \frac{\partial\vec{E}}{\partial t} +\end{align*} +So therefore when we account for the fact that $\vec{\nabla} \cdot \vec{\nabla} \times \vec{B} = 0$ +\begin{align*} +\vec{\nabla} \times \vec{B} = \mu_{0}\vec{J} + \mu_{0}\epsilon_{0}\frac{\partial\vec{E}}{\partial t} +\end{align*} +** Faraday's Law of Induction +By definition of electromagnetic induction (and to make Ampere's law consistent with relativity): +\begin{align*} +\vec{\nabla} \times \vec{E} = - \frac{\partial\vec{B}}{\partial t} +\end{align*} +Instead of assuming induction as an axiom, it is possible to fix Ampere's equation with the [[id:a871e62c-b4a0-4674-9dea-d377de2f780b][continuity equation]] first, and then +assume Lorentz symmetry. This explanation is a work in progress. +* Implications +Maxwell's Equations can be used to calculate all electromagnetic phenomena on the macro scale all the way down to the atom. +In practice, solving Maxwell's Equations can be analytically impossible, so several simplifying assumptions are often made. +To recap, these are the four equations: +\begin{align*} +\vec{\nabla} \cdot \vec{E} = \frac{\rho}{\epsilon_{0}} \\ +\vec{\nabla} \times \vec{E} = -\frac{\partial\vec{B}}{\partial t} \\ +\vec{\nabla} \cdot \vec{B} = 0 \\ +\vec{\nabla} \times \vec{B} = \mu_{0}\vec{J} + \mu_{0}\epsilon_{0}\frac{\partial\vec{E}}{\partial t} +\end{align*} +* Speed of Light +Maxwell's Equations can be shown to reproduce the speed of light in a vacuum, where: +\begin{align*} +\mu_{0}\epsilon_{0} = \frac{1}{c^{2}} +\end{align*} +* Relativity +It is known that Maxwell's Equations are consistent with [[id:e38d94f2-8332-4811-b7bd-060f80fcfa9b][special relativity]] and can be expressed +in terms of curved spacetime. In fact, if relativity is taken as an axiom, it can be proven that the electric +and magnetic fields are descriptions of the same phenomena; this can be taken as a specific example of a [[id:1b1a8cff-1d20-4689-8466-ea88411007d7][duality]]. diff --git a/mindmap/Newtonian mechanics.org b/mindmap/Newtonian mechanics.org index c78b1e3..7d4b414 100644 --- a/mindmap/Newtonian mechanics.org +++ b/mindmap/Newtonian mechanics.org @@ -54,12 +54,13 @@ In general, the total momentum is defined to be: \end{align*} And in real life, we o