From bfd9c25bb81ea2ead0dd6c8d78248aa3ae29826d Mon Sep 17 00:00:00 2001 From: utensil Date: Thu, 26 Sep 2024 13:59:09 +0800 Subject: [PATCH] Clean up lost notes, add root notes --- trees/cg-macros.tree | 18 ++++++++++-------- trees/mwe-0001.tree | 4 +++- trees/mwe-0002.tree | 4 +++- trees/mwe-0003.tree | 2 ++ trees/mwe-macros.tree | 5 ++++- trees/tt-0032.tree | 1 + trees/uts-0001.tree | 4 ++-- trees/uts-000T.tree | 6 ++++-- trees/uts-0010.tree | 3 ++- trees/uts-0012.tree | 3 ++- trees/uts-0014.tree | 6 +++--- trees/uts-0018.tree | 5 +++-- trees/uts-001N.tree | 32 ++++++++++++++++++++++++++++++++ trees/uts-001O.tree | 13 +++++++++++++ 14 files changed, 84 insertions(+), 22 deletions(-) create mode 100644 trees/uts-001N.tree create mode 100644 trees/uts-001O.tree diff --git a/trees/cg-macros.tree b/trees/cg-macros.tree index 7562450..d55c6e4 100644 --- a/trees/cg-macros.tree +++ b/trees/cg-macros.tree @@ -1,5 +1,7 @@ \export{ag-macros} +\tag{macro} + \def\normbar{\verb~|\|~} \def\norm[x]{\normbar\x\normbar} @@ -205,13 +207,13 @@ snake,amplitude=.4mm,segment length=2.5mm,post length=1mm}] } % Upper line of the eye \draw (0,0) -- (\halfangle:\radius); - + % Lower line of the eye \draw (0,0) -- (-\halfangle:\radius); - + % Arc for the eye shape \draw (\halfangle:\arcradius) arc[start angle=\halfangle, end angle=-\halfangle, radius=\arcradius]; - + % Filled ellipse for the pupil \fill (0:\pupilpos) ellipse[x radius=\pupilshort, y radius=\pupillong]; } @@ -228,20 +230,20 @@ snake,amplitude=.4mm,segment length=2.5mm,post length=1mm}] \begin{scope}[scale=\lightbulbscale, rotate=\lightbulbangle] % Base of the light bulb \draw[fill=gray] (-0.5,0) rectangle (0.5,0.6); - + % Screw threads \foreach \y in {0.2, 0.4} { \draw (-0.5,\y) -- (0.5,\y); } - + % Contact point \draw[fill=black] (0,0) circle (0.1); - + % Filament \draw[thick] (0,1) -- (0,1.5); \draw[thick] (-0.2,1.5) -- (0.2,1.5); \draw[thick] (-0.2,1.5) arc[start angle=180, end angle=0, radius=0.2]; - + % Bulb \draw[thick] (1,1.5) arc[start angle=0, end angle=180, radius=1]; \draw[thick] (-1,1.5) to[out=-90, in=90] (-0.5,0.6); @@ -269,4 +271,4 @@ snake,amplitude=.4mm,segment length=2.5mm,post length=1mm}] \fill[orange] (0,0) circle (0.8); } } -} \ No newline at end of file +} diff --git a/trees/mwe-0001.tree b/trees/mwe-0001.tree index cee8530..2295465 100644 --- a/trees/mwe-0001.tree +++ b/trees/mwe-0001.tree @@ -1,5 +1,7 @@ \import{mwe-macros} +\tag{mwe} + \[class]{child1}{ \p{dummy text 1} -} \ No newline at end of file +} diff --git a/trees/mwe-0002.tree b/trees/mwe-0002.tree index 5538ed7..6e24452 100644 --- a/trees/mwe-0002.tree +++ b/trees/mwe-0002.tree @@ -1,5 +1,7 @@ \import{mwe-macros} +\tag{mwe} + \[class]{child2}{ \p{dummy text 2} -} \ No newline at end of file +} diff --git a/trees/mwe-0003.tree b/trees/mwe-0003.tree index 2b9a443..6b0aed4 100644 --- a/trees/mwe-0003.tree +++ b/trees/mwe-0003.tree @@ -1,5 +1,7 @@ \import{mwe-macros} +\tag{mwe} + \[class]{parent}{ \transclude{mwe-0001} } diff --git a/trees/mwe-macros.tree b/trees/mwe-macros.tree index 980e0fb..bde970c 100644 --- a/trees/mwe-macros.tree +++ b/trees/mwe-macros.tree @@ -1 +1,4 @@ -\xmlns:html{http://www.w3.org/1999/xhtml} \ No newline at end of file +\tag{mwe} +\tag{macro} + +\xmlns:html{http://www.w3.org/1999/xhtml} diff --git a/trees/tt-0032.tree b/trees/tt-0032.tree index 1954b07..b41db34 100644 --- a/trees/tt-0032.tree +++ b/trees/tt-0032.tree @@ -2,6 +2,7 @@ % clifford hopf spin tt math draft % \tag{tt} % \tag{draft} +\tag{macro} \title{basic objects in category theory} diff --git a/trees/uts-0001.tree b/trees/uts-0001.tree index 3e7ec0f..9c6b569 100644 --- a/trees/uts-0001.tree +++ b/trees/uts-0001.tree @@ -1,6 +1,6 @@ \import{macros} % clifford hopf spin math -\tag{math} +\tag{root} \title{draft notes} @@ -26,4 +26,4 @@ } } -} \ No newline at end of file +} diff --git a/trees/uts-000T.tree b/trees/uts-000T.tree index a12bf91..9245b5b 100644 --- a/trees/uts-000T.tree +++ b/trees/uts-000T.tree @@ -1,7 +1,9 @@ -\title{tips about Forester} - \import{macros} +\tag{root} + +\title{tips about Forester} + \block{Browsing}{ \p{To search, use the magnifying glass icon on the top right corner, or press \code{Ctrl+K}(Windows/Linux) or \code{Cmd+K}(Mac).} diff --git a/trees/uts-0010.tree b/trees/uts-0010.tree index 985e8ce..090c0da 100644 --- a/trees/uts-0010.tree +++ b/trees/uts-0010.tree @@ -1,4 +1,5 @@ \import{macros} +\tag{root} \title{technical experiments} @@ -12,4 +13,4 @@ } } -\related{\ref{uts-0012}} \ No newline at end of file +\related{\ref{uts-0012}} diff --git a/trees/uts-0012.tree b/trees/uts-0012.tree index fbf7e1d..bf7a673 100644 --- a/trees/uts-0012.tree +++ b/trees/uts-0012.tree @@ -1,4 +1,5 @@ \import{macros} +\tag{root} \title{technical notes (draft)} @@ -7,4 +8,4 @@ \open\query \isect{\tag{notes}}{\tag{tech}}{\tag{draft}} } -} \ No newline at end of file +} diff --git a/trees/uts-0014.tree b/trees/uts-0014.tree index a721e52..d9ff40e 100644 --- a/trees/uts-0014.tree +++ b/trees/uts-0014.tree @@ -1,6 +1,6 @@ \import{tt-macros} % clifford hopf spin tt math draft -\tag{tt} +\tag{root} % definition theorem lemma construction observation % convention corollary axiom example exercise proof @@ -19,7 +19,7 @@ \open\query \open\rel \def\query/root{ - \union{\tag{root}}{\tag{notes}} + \union{\tag{root}}{\tag{notes}}{\tag{exp}} } \def\query/root/transcluded{ \union-fam-rel{\query/root}{\paths}{\outgoing}{\transclusion} @@ -29,7 +29,7 @@ } \def\query/normal{ \compl{ - \union{\query/root}{\tag{draft}}{\tag{macro}}{\tag{exp}}{\taxon{person}}{\taxon{reference}}{\taxon{eq}} + \union{\query/root}{\tag{draft}}{\tag{macro}}{\tag{exp}}{\taxon{person}}{\taxon{reference}}{\taxon{eq}}{\tag{mwe}} } } \def\query/lost{ diff --git a/trees/uts-0018.tree b/trees/uts-0018.tree index 9279b46..3b281be 100644 --- a/trees/uts-0018.tree +++ b/trees/uts-0018.tree @@ -1,5 +1,6 @@ \import{macros} % clifford hopf spin tt ag math draft tech exp notes readings +\tag{root} \put\transclude/numbered{false} @@ -129,7 +130,7 @@ Make some progress on [[ag-000G]], particularly on mixing 4 elements (formulas, \mdblock{09-04}{ - \citek{hamilton2023supergeometric} and \citek{hamilton2023unification}: illuminating path towards a unified theory of four fundamental forces, the first theory seemingly capable of reaching the same level of elegance and simplicity as \citek{wilson2024discrete}, the authors are also aware of potential issues and worked out viable solutions to address them. Unfortunately, there are no citations as of now. - \citek{trautman1997clifford} has certain historical remarks and a unusual approach that spinor representations are treated first for odd-dimensional spaces -spaces +spaces - \citek{henry2024geometry} - \citek{ahle2024tensor} and [Graphical tensor notation for interpretability](https://www.lesswrong.com/posts/BQKKQiBmc63fwjDrj/graphical-tensor-notation-for-interpretability) - [The Calculus of Variations and Geometry: a Historical Perspective](https://people.cmm.minesparis.psl.eu/users/velasco/JPB.pdf) @@ -196,4 +197,4 @@ The readings during this period are reflected in [My math interests in 2024](htt } -} \ No newline at end of file +} diff --git a/trees/uts-001N.tree b/trees/uts-001N.tree new file mode 100644 index 0000000..4abcf50 --- /dev/null +++ b/trees/uts-001N.tree @@ -0,0 +1,32 @@ +\import{macros} +% clifford hopf spin tt ag math draft tech exp notes +\tag{tech} +\tag{notes} +\tag{draft} + +\note{initial survey on headless render/testing for WebGL}{ +\md{ +I want to be able to run headless render or visual regression tests, both locally where GPU is available, and on CI where GPU has to be emulated. + +The ingredients seems to be Storybook+Playwright+Xvfb. + +- use [OrbStack](https://docs.orbstack.dev/) as local docker engine +- use [act](https://github.com/nektos/act) ([usage](https://nektosact.com/usage/index.html)) to run GitHub Actions locally +- use [Storybook](https://storybook.js.org/) to building pages and components in isolation +- use [Playwright](https://playwright.dev/) to verify the visual appearance on different browsers +- use [Xvfb](https://en.wikipedia.org/wiki/Xvfb) to emulate a display server + +If I'm a bit more ambitious, I would like to be able to do the same for WebGPU. At least we do know that Xvfb support OpenGL via [mesa](https://www.mesa3d.org/) (which also supports Vulkan etc.), and there are some libraries to run WebGPU via WebGL 2. + +Some resources I found so far: + +- [Effortless CI Integration: Running Playwright Tests with GitHub Actions](https://medium.com/@merisstupar11/effortless-ci-integration-running-playwright-tests-with-github-actions-9df48837d68f) uses `xvfb-run` +- `playwright`'s [own CI](https://github.com/microsoft/playwright/blob/597642d26929656ce629af89089cd157ccdc506c/.github/actions/run-test/action.yml#L61) uses `xvfb-run` +- [Headless chrome – testing WebGL using playwright](https://github.com/createit-dev/168-headless-chrome-get-60fps-in-windows) demonstrates WegGL testing when GPU is available, see also its [writeup](https://www.createit.com/blog/headless-chrome-testing-webgl-using-playwright/) +- [Options to enable GPU Hardware Acceleration in headeless mode](https://github.com/microsoft/playwright/issues/11627) +- [use xquartz with PyVirtualDisplay on Mac](https://stackoverflow.com/a/72874345/200764) +- [use libosmesa with Chrome](https://stackoverflow.com/a/39060739/200764) from 2016 +- use [VirtualGL](https://virtualgl.org/) with Xvfb \link{https://stackoverflow.com/a/78725632/200764} +} + +} diff --git a/trees/uts-001O.tree b/trees/uts-001O.tree new file mode 100644 index 0000000..fdd5d31 --- /dev/null +++ b/trees/uts-001O.tree @@ -0,0 +1,13 @@ +\import{macros} +% clifford hopf spin tt ag math draft tech exp notes +\tag{root} + +\note{root notes}{ +\scope{ + \open\query + \open\rel + \query{ + \tag{root} + } +} +}