Skip to content

Commit

Permalink
Clean up lost notes, add root notes
Browse files Browse the repository at this point in the history
  • Loading branch information
utensil committed Sep 26, 2024
1 parent e7f73c2 commit bfd9c25
Show file tree
Hide file tree
Showing 14 changed files with 84 additions and 22 deletions.
18 changes: 10 additions & 8 deletions trees/cg-macros.tree
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
\export{ag-macros}

\tag{macro}

\def\normbar{\verb~|\|~}
\def\norm[x]{\normbar\x\normbar}

Expand Down Expand Up @@ -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];
}
Expand All @@ -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);
Expand Down Expand Up @@ -269,4 +271,4 @@ snake,amplitude=.4mm,segment length=2.5mm,post length=1mm}]
\fill[orange] (0,0) circle (0.8);
}
}
}
}
4 changes: 3 additions & 1 deletion trees/mwe-0001.tree
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
\import{mwe-macros}

\tag{mwe}

\<html:div>[class]{child1}{
\p{dummy text 1}
}
}
4 changes: 3 additions & 1 deletion trees/mwe-0002.tree
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
\import{mwe-macros}

\tag{mwe}

\<html:div>[class]{child2}{
\p{dummy text 2}
}
}
2 changes: 2 additions & 0 deletions trees/mwe-0003.tree
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
\import{mwe-macros}

\tag{mwe}

\<html:div>[class]{parent}{
\transclude{mwe-0001}
}
Expand Down
5 changes: 4 additions & 1 deletion trees/mwe-macros.tree
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
\xmlns:html{http://www.w3.org/1999/xhtml}
\tag{mwe}
\tag{macro}

\xmlns:html{http://www.w3.org/1999/xhtml}
1 change: 1 addition & 0 deletions trees/tt-0032.tree
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
% clifford hopf spin tt math draft
% \tag{tt}
% \tag{draft}
\tag{macro}

\title{basic objects in category theory}

Expand Down
4 changes: 2 additions & 2 deletions trees/uts-0001.tree
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
\import{macros}
% clifford hopf spin math
\tag{math}
\tag{root}

\title{draft notes}

Expand All @@ -26,4 +26,4 @@
}
}

}
}
6 changes: 4 additions & 2 deletions trees/uts-000T.tree
Original file line number Diff line number Diff line change
@@ -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).}

Expand Down
3 changes: 2 additions & 1 deletion trees/uts-0010.tree
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
\import{macros}
\tag{root}

\title{technical experiments}

Expand All @@ -12,4 +13,4 @@
}
}

\related{\ref{uts-0012}}
\related{\ref{uts-0012}}
3 changes: 2 additions & 1 deletion trees/uts-0012.tree
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
\import{macros}
\tag{root}

\title{technical notes (draft)}

Expand All @@ -7,4 +8,4 @@
\open\query
\isect{\tag{notes}}{\tag{tech}}{\tag{draft}}
}
}
}
6 changes: 3 additions & 3 deletions trees/uts-0014.tree
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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}
Expand All @@ -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{
Expand Down
5 changes: 3 additions & 2 deletions trees/uts-0018.tree
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
\import{macros}
% clifford hopf spin tt ag math draft tech exp notes readings
\tag{root}

\put\transclude/numbered{false}

Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -196,4 +197,4 @@ The readings during this period are reflected in [My math interests in 2024](htt

}

}
}
32 changes: 32 additions & 0 deletions trees/uts-001N.tree
Original file line number Diff line number Diff line change
@@ -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}
}

}
13 changes: 13 additions & 0 deletions trees/uts-001O.tree
Original file line number Diff line number Diff line change
@@ -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}
}
}
}

0 comments on commit bfd9c25

Please sign in to comment.