From a0ebcbe95aee9cfd191419bf171b4b658ab20194 Mon Sep 17 00:00:00 2001 From: Preston Pan Date: Sun, 26 Apr 2026 16:14:21 -0700 Subject: routine cleanup --- .pre-commit-config.yaml | 1 - agenda.org | 71 +++++++++++++++++++++++------------------------ config/emacs.el | 6 ++++ config/emacs.org | 45 ++++++++++++++++++++---------- config/nix.org | 73 +++++++++++++++++++++++++++++++++++++------------ journal/20260415.org | 9 ++++++ journal/20260416.org | 10 +++++++ nix | 2 +- 8 files changed, 149 insertions(+), 68 deletions(-) delete mode 120000 .pre-commit-config.yaml create mode 100644 config/emacs.el create mode 100644 journal/20260415.org create mode 100644 journal/20260416.org diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml deleted file mode 120000 index 82c6c1d..0000000 --- a/.pre-commit-config.yaml +++ /dev/null @@ -1 +0,0 @@ -/nix/store/cakjamand6f24wvfg7wfh6xi7ydwicq6-pre-commit-config.json \ No newline at end of file diff --git a/agenda.org b/agenda.org index f9c6825..9b5da59 100644 --- a/agenda.org +++ b/agenda.org @@ -12,9 +12,6 @@ project, it can be referenced here. * Tasks These are general life tasks that I need to do, which don't depend on a specific time or date. ** TODO [#B] Monorepo -- [X] add an RSS feed of my blogs to my website. -- [X] finish up my SCSS abstractions and learning how to write in it (also finish touching up my CSS). -- [X] touch up emacs. - [ ] finish my automated testing matrix. - [ ] write a shell script to get passwords from my run path. - [ ] write tests for installer script. @@ -25,11 +22,9 @@ These are general life tasks that I need to do, which don't depend on a specific - [X] Should have an SSH server. - [ ] Should have simple cronjobs. - [ ] Gitolite -- [ ] AI Agent integration +- [X] AI Agent integration ** TODO [#B] Nullring Update the nullring to be in org mode, and also include a couple more sites. -** TODO RTOS -Write an RTOS for ARM and an emulator maybe? ** TODO Advanced Amateur Radio License ** Music and Media *** TODO [#B] Write Another Song @@ -38,22 +33,24 @@ I want to write another song. I want to start making YouTube videos. ** TODO [#C] Analogue Computer I want to make an analogue computer. +** TODO Aquaponics +** TODO Fix Ebike +** TODO Raspberry Pi Setup * Skills -** TODO Learn Supercollider Languages For Music Production +** TODO Read AI Papers Until Know how LLMs Work ** TODO Learn Blender -** TODO Drawing with Krita -** DONE Circuit Design -** TODO Learn More Solidity -** TODO Learn Idris -** TODO Learn Lean Theorem Prover +** TODO Learn Lean4 +** TODO Learn CL * Academic ** TODO QFT ** TODO GM -** TODO Complex Analysis -** DONE Topology -** DONE Measure Theory -** TODO Category Theory -** TODO ZK Proof Deep Dive +** TODO Category Theory/Group/Algebra +DEADLINE: <2026-06-23 Tue> +** TODO Algebraic Topology and Geometry +DEADLINE: <2026-11-23 Mon> +** TODO Stochastic Calculus +** TODO Statistics +** TODO Functional Analysis * Scheduled tasks These are one-time tasks that are scheduled at a particular date, and that don't require regular schedules. @@ -63,12 +60,6 @@ These are tasks related to my appointments which have to be at a specific time. These are tasks related to seeing my friends. There will be tasks listed here when I schedule something. ** Chores -*** DONE Buy Fish Oil -DEADLINE: <2026-03-18 Wed> -*** DONE Take Out Trash -DEADLINE: <2026-03-18 Wed> -*** TODO Do Dishes -DEADLINE: <2026-03-18 Wed> * Habits These are some habits I want to track. They are repeated according to a calendar schedule in general. @@ -83,11 +74,13 @@ SCHEDULED: <2026-04-19 Sun 10:00 ++1w> :END: I need to have a schedule for cleaning my git tree. ** TODO Skincare -SCHEDULED: <2026-04-16 Thu 12:30 .+1d> +SCHEDULED: <2026-04-19 Sun 12:30 .+1d> :PROPERTIES: -:LAST_REPEAT: [2026-04-15 Wed 20:03] +:LAST_REPEAT: [2026-04-18 Sat 12:41] :END: :LOGBOOK: +- State "DONE" from "TODO" [2026-04-18 Sat 12:41] +- State "DONE" from "TODO" [2026-04-16 Thu 19:52] - State "DONE" from "TODO" [2026-04-15 Wed 20:03] - State "DONE" from "TODO" [2026-04-12 Sun 12:25] - State "DONE" from "TODO" [2026-04-11 Sat 13:20] @@ -107,12 +100,14 @@ Current stack: - Hyaluronic acid (2x/day) - Glycerin for hands ** TODO Supplements -SCHEDULED: <2026-04-16 Thu 12:00 .+1d> +SCHEDULED: <2026-04-19 Sun 12:00 .+1d> :PROPERTIES: -:LAST_REPEAT: [2026-04-15 Wed 13:43] +:LAST_REPEAT: [2026-04-18 Sat 12:41] :STYLE: habit :END: :LOGBOOK: +- State "DONE" from "TODO" [2026-04-18 Sat 12:41] +- State "DONE" from "TODO" [2026-04-16 Thu 19:52] - State "DONE" from "TODO" [2026-04-15 Wed 13:43] - State "DONE" from "TODO" [2026-04-12 Sun 12:25] - State "DONE" from "TODO" [2026-04-11 Sat 13:20] @@ -161,12 +156,13 @@ Current stack: - Creatine Monohydrate - Coffee ** TODO Strength Training -SCHEDULED: <2025-10-17 Fri 14:00 .+2d> +SCHEDULED: <2026-04-17 Fri 14:00 .+2d> :PROPERTIES: -:LAST_REPEAT: [2025-10-16 Thu 18:08] +:LAST_REPEAT: [2026-04-15 Wed 23:20] :STYLE: habit :END: :LOGBOOK: +- State "DONE" from "TODO" [2026-04-15 Wed 23:20] - State "DONE" from "TODO" [2025-10-16 Thu 18:08] - State "DONE" from "TODO" [2025-09-28 Sun 20:52] - State "DONE" from "TODO" [2025-09-24 Wed 07:08] @@ -194,12 +190,14 @@ SCHEDULED: <2025-09-29 Mon 16:00 .+1d> :END: I want to be able to run or bike every day so that I get my exercise in. ** TODO Stretch -SCHEDULED: <2026-04-04 Sat 00:00 .+1d> +SCHEDULED: <2026-04-18 Sat 00:00 .+1d> :PROPERTIES: -:LAST_REPEAT: [2026-04-03 Fri 00:01] +:LAST_REPEAT: [2026-04-17 Fri 00:00] :STYLE: habit :END: :LOGBOOK: +- State "DONE" from "TODO" [2026-04-17 Fri 00:00] +- State "DONE" from "TODO" [2026-04-16 Thu 23:58] - State "DONE" from "TODO" [2026-04-03 Fri 00:01] - State "DONE" from "TODO" [2026-03-19 Thu 03:36] - State "DONE" from "TODO" [2025-09-24 Wed 07:08] @@ -222,12 +220,13 @@ Stretches: - Seal - Cat ** TODO Journal -SCHEDULED: <2026-04-12 Sun 22:00 .+1d> +SCHEDULED: <2026-04-17 Fri 22:00 .+1d> :PROPERTIES: -:LAST_REPEAT: [2026-04-11 Sat 13:21] +:LAST_REPEAT: [2026-04-16 Thu 23:57] :STYLE: habit :END: :LOGBOOK: +- State "DONE" from "TODO" [2026-04-16 Thu 23:57] - State "DONE" from "TODO" [2026-04-11 Sat 13:21] - State "DONE" from "TODO" [2026-04-02 Thu 22:09] - State "DONE" from "TODO" [2026-04-01 Wed 00:22] @@ -264,11 +263,13 @@ SCHEDULED: <2026-04-12 Sun 22:00 .+1d> :END: I want to journal every day, at least a little bit, about my life and track it with a git repo. ** TODO Update Agenda -SCHEDULED: <2026-04-16 Thu 11:00 .+1d> +SCHEDULED: <2026-04-19 Sun 11:00 .+1d> :PROPERTIES: -:LAST_REPEAT: [2026-04-15 Wed 13:43] +:LAST_REPEAT: [2026-04-18 Sat 12:41] :END: :LOGBOOK: +- State "DONE" from "TODO" [2026-04-18 Sat 12:41] +- State "DONE" from "TODO" [2026-04-16 Thu 19:52] - State "DONE" from "TODO" [2026-04-15 Wed 13:43] - State "DONE" from "TODO" [2026-04-12 Sun 12:25] - State "DONE" from "TODO" [2026-04-11 Sat 13:20] diff --git a/config/emacs.el b/config/emacs.el new file mode 100644 index 0000000..430d9a5 --- /dev/null +++ b/config/emacs.el @@ -0,0 +1,6 @@ +;; [[file:emacs.org::*VTerm][VTerm:1]] +(use-package vterm + :custom + (vterm-kill-buffer-on-exit nil) + :hook (vterm-exit-functions . rp/vterm-close-window-on-exit)) +;; VTerm:1 ends here diff --git a/config/emacs.org b/config/emacs.org index ce61b4a..2970ca3 100644 --- a/config/emacs.org +++ b/config/emacs.org @@ -894,6 +894,10 @@ First, some small configurations and some evil-mode initilaization because I lik :config (evil-multiedit-default-keybinds)) + (use-package evil-indent-plus + :ensure t + :config (evil-indent-plus-default-bindings)) + (use-package evil-textobj-tree-sitter :ensure t ;; Ensure Evil is loaded first so the text-object maps exist @@ -903,12 +907,16 @@ First, some small configurations and some evil-mode initilaization because I lik :bind ((:map evil-outer-text-objects-map ("f" . my-treesit-outer-function) ("c" . my-treesit-outer-class) - ("a" . my-treesit-outer-arg)) - + ("a" . my-treesit-outer-arg) + ("s" . my-treesit-outer-statement) ;; Added Statement + ("b" . my-treesit-outer-block)) ;; Added Block (Great for SCSS/CSS) + (:map evil-inner-text-objects-map ("f" . my-treesit-inner-function) ("c" . my-treesit-inner-class) - ("a" . my-treesit-inner-arg)) + ("a" . my-treesit-inner-arg) + ("s" . my-treesit-inner-statement) ;; Added Statement + ("b" . my-treesit-inner-block)) ;; Added Block (:map evil-normal-state-map ("] f" . my-treesit-goto-next-function) @@ -919,15 +927,23 @@ First, some small configurations and some evil-mode initilaization because I lik ;; 2. The Command Definitions :config ;; Link the custom names we bound above to the actual Tree-sitter closures - (defalias 'my-treesit-outer-function (evil-textobj-tree-sitter-get-textobj "function.outer")) - (defalias 'my-treesit-inner-function (evil-textobj-tree-sitter-get-textobj "function.inner")) + (defalias 'my-treesit-outer-function (evil-textobj-tree-sitter-get-textobj "function.outer")) + (defalias 'my-treesit-inner-function (evil-textobj-tree-sitter-get-textobj "function.inner")) - (defalias 'my-treesit-outer-class (evil-textobj-tree-sitter-get-textobj "class.outer")) - (defalias 'my-treesit-inner-class (evil-textobj-tree-sitter-get-textobj "class.inner")) + (defalias 'my-treesit-outer-class (evil-textobj-tree-sitter-get-textobj "class.outer")) + (defalias 'my-treesit-inner-class (evil-textobj-tree-sitter-get-textobj "class.inner")) ;; "a" is standard Vim terminology for "argument" (parameter) - (defalias 'my-treesit-outer-arg (evil-textobj-tree-sitter-get-textobj "parameter.outer")) - (defalias 'my-treesit-inner-arg (evil-textobj-tree-sitter-get-textobj "parameter.inner")) + (defalias 'my-treesit-outer-arg (evil-textobj-tree-sitter-get-textobj "parameter.outer")) + (defalias 'my-treesit-inner-arg (evil-textobj-tree-sitter-get-textobj "parameter.inner")) + + ;; Added Statement definitions + (defalias 'my-treesit-outer-statement (evil-textobj-tree-sitter-get-textobj "statement.outer")) + (defalias 'my-treesit-inner-statement (evil-textobj-tree-sitter-get-textobj "statement.inner")) + + ;; Added Block definitions (Targets {} blocks in SCSS, C, TS, etc.) + (defalias 'my-treesit-outer-block (evil-textobj-tree-sitter-get-textobj "block.outer")) + (defalias 'my-treesit-inner-block (evil-textobj-tree-sitter-get-textobj "block.inner")) ;; Navigation commands are standard interactive functions, so we wrap them cleanly (defun my-treesit-goto-next-function () @@ -946,7 +962,6 @@ First, some small configurations and some evil-mode initilaization because I lik (interactive) (evil-textobj-tree-sitter-goto-textobj "class.outer" t))) - (use-package general :after (evil evil-collection) :config @@ -1143,6 +1158,10 @@ We use org-alert in order to give us notifications based on our org-agenda. ** LSP We set up eglot, the LSP manager for emacs, now built in: #+begin_src emacs-lisp :tangle ../nix/init.el +(use-package envrc + :demand t + :hook (after-init . envrc-global-mode)) + (use-package python :after lsp-mode :hook (python-ts-mode . lsp-deferred)) @@ -1873,10 +1892,8 @@ I use tabs because sometimes I like using the mouse (it's actually more efficien ** Lean4 For some reason, lean4-mode is not in MELPA currently so I have to do this ugly thing: #+begin_src emacs-lisp :tangle ../nix/init.el -(unless noninteractive (use-package lean4-mode - :commands lean4-mode - :vc (:url "https://github.com/leanprover-community/lean4-mode.git" - :rev "76895d8939111654a472cfc617cfd43fbf5f1eb6"))) +(use-package lean4-mode + :commands lean4-mode) #+end_src and actually pull something from the internet instead of pinning. Thankfully this reproduction issue is probably localized to lean files. Also, we're pulling a specific commit so it is still pinned. If it fails to fetch, lean4 is broken I guess. diff --git a/config/nix.org b/config/nix.org index 71d9b4c..9c92f06 100644 --- a/config/nix.org +++ b/config/nix.org @@ -96,6 +96,10 @@ and now for the main flake: url = "github:catppuccin/qutebrowser"; flake = false; }; + lean4-mode-src = { + url = "github:leanprover-community/lean4-mode"; + flake = false; + }; }; outputs = { @@ -3538,26 +3542,58 @@ as an org file which gets automatically tangled to an emacs-lisp file. enable = lib.mkDefault config.monorepo.profiles.graphics.enable; package = pkgs.emacs-pgtk; extraConfig = '' - (setq debug-on-error t) - (setq logo-file "${self}/data/logo.png") - (setq system-email "${super.monorepo.vars.email}") - (setq system-username "${super.monorepo.vars.internetName}") - (setq system-fullname "${super.monorepo.vars.fullName}") - (setq system-gpgkey "${super.monorepo.vars.gpgKey}") - (setq my-ispell-dictionary "${pkgs.scowl}/share/dict/words.txt") - (setq my-ispell-args '( - "--encoding=iso-8859-1" - "--mode=url" - "--data-dir=${pkgs.aspell}/lib/aspell" - "--dict-dir=${pkgs.aspellDicts.en}/lib/aspell")) - - (load "${pkgs.writeText "init.el" (builtins.readFile ../../init.el)}") - ''; - - extraPackages = import ./emacs-packages.nix; + (setq debug-on-error t) + (setq logo-file "${self}/data/logo.png") + (setq system-email "${super.monorepo.vars.email}") + (setq system-username "${super.monorepo.vars.internetName}") + (setq system-fullname "${super.monorepo.vars.fullName}") + (setq system-gpgkey "${super.monorepo.vars.gpgKey}") + (setq my-ispell-dictionary "${pkgs.scowl}/share/dict/words.txt") + (setq my-ispell-args '( + "--encoding=iso-8859-1" + "--mode=url" + "--data-dir=${pkgs.aspell}/lib/aspell" + "--dict-dir=${pkgs.aspellDicts.en}/lib/aspell")) + + (load "${pkgs.writeText "init.el" (builtins.readFile ../../init.el)}") + ''; + extraPackages = epkgs: + let + # 1. Import the new file and pass it the required arguments + lean4-mode-pinned = import ../../user-packages/lean4.nix { + inherit epkgs; + lean4-src = self.inputs.lean4-mode-src; + }; + + # 2. Import your standard packages + basePackages = import ./emacs-packages.nix epkgs; + in + basePackages ++ [ lean4-mode-pinned ]; }; } #+end_src +**** Lean4-Mode +#+begin_src nix :tangle ../nix/user-packages/lean4.nix +{ epkgs, lean4-src }: + +epkgs.trivialBuild { + pname = "lean4-mode"; + version = "pinned"; + src = lean4-src; + + packageRequires = with epkgs; [ + lsp-mode + magit-section + dash + f + s + ]; + + postInstall = '' + cp -r data $out/share/emacs/site-lisp/ + ''; +} +#+end_src **** Emacs Packages I want to separate out these packages so that my parent flake which builds my website has a list of my packages. #+begin_src nix :tangle ../nix/modules/home/emacs-packages.nix @@ -3575,6 +3611,7 @@ epkgs: with epkgs; [ dap-mode dash dashboard + envrc doom-themes doom-modeline indent-bars @@ -3590,6 +3627,7 @@ epkgs: with epkgs; [ engrave-faces enwc evil + evil-indent-plus evil-collection evil-commentary evil-multiedit @@ -4214,6 +4252,7 @@ for these configurations. libnotify htop minify + direnv python3Packages.adblock (pkgs.writeShellScriptBin "help" diff --git a/journal/20260415.org b/journal/20260415.org new file mode 100644 index 0000000..f9be782 --- /dev/null +++ b/journal/20260415.org @@ -0,0 +1,9 @@ +#+TITLE: Daily Journal +#+STARTUP: showeverything +#+DESCRIPTION: My daily journal entry +#+AUTHOR: Preston Pan +#+date: +#+options: broken-links:t +* Wednesday, 15 April 2026 +** 23:20 +I was at Ainslie's place for the past couple days. Now I'm doing more complex analysis, and just fixed some CSS on my website. diff --git a/journal/20260416.org b/journal/20260416.org new file mode 100644 index 0000000..6cfe83a --- /dev/null +++ b/journal/20260416.org @@ -0,0 +1,10 @@ +#+TITLE: Daily Journal +#+STARTUP: showeverything +#+DESCRIPTION: My daily journal entry +#+AUTHOR: Preston Pan +#+date: +#+options: broken-links:t +* Thursday, 16 April 2026 +** 23:58 +I did some more complex analysis today, and I have committed to doing complex analysis, then focus entirely on algebraic topology and functional +analysis entirely. diff --git a/nix b/nix index b109360..f05aa8e 160000 --- a/nix +++ b/nix @@ -1 +1 @@ -Subproject commit b10936007641960438955e3d1a4de33950c90781 +Subproject commit f05aa8eb4f2cfb9d35b05d0b0f842f78dd7299b6 -- cgit v1.3