Point it at a code project directory to get a file tree and content, optionally with a git diff, copied to the clipboard - ready for copy pasting into ChatGPT.
It is very true that this only works for small projects, as you will bloat the LLM’s context with large codebases.
My solution to this is two files you can use to steer the tool’s behavior:
- .copconignore: For ignoring specific files and directories.
- .copcontarget: For targeting specific files and directories (applied before .copconignore).
These two files provide great control over what to include and exclude in the copied context.
In an NN context, given that you already have “transform with a matrix” as a primitive, probably something very much like sticking a https://en.wikipedia.org/wiki/DFT_matrix somewhere. (You are already extremely familliar with the 2-input DFT, for example: it’s the (x, y) ↦ (x+y, x−y) map.)
If you want a physical implementation of a Fourier transform, it gets a little more fun. A sibling comment already mentioned one possibility. Another is that far-field (i.e. long-distance; “Fraunhofer”) diffraction of coherent light on a semi-transparent planar screen gives you the Fourier transform of the transmissivity (i.e. transparency) of that screen[1]. That’s extremely neat and covers all textbook examples of diffraction (e.g. a finite-width slit gives a sinc for the usual reasons), but probably impractical to mention in an introductory course because the derivation is to get a gnarly general formula then apply the far-field approximation to it.
A related application is any time the “reciprocal lattice” is mentioned in solid-state physics; e.g. in X-ray crystallography, what you see on the CRT screen in the simplest case once the X-rays have passed through the sample is the (continuous) Fourier transform of (a bunch of Dirac deltas stuck at each center of) its crystal lattice[2], and that’s because it’s basically the same thing as the Fraunhofer diffraction in the previous paragraph.
Of course, the mammalian inner ear is also a spectral analyzer[3].
> Another is that far-field (i.e. long-distance; “Fraunhofer”) diffraction of coherent light on a semi-transparent planar screen gives you the Fourier transform of the transmissivity (i.e. transparency) of that screen
Ooh, yes, I’d forgotten that! And I’ve actually done this experiment myself — it works impressively well when you set it up right. I even recall being able to create filters (low-pass, high-pass etc.) simply by blocking the appropriate part of the light beam and reconstituting the final image using another lens. Should have mentioned it in my comment…
It looks like Albert Michelson's Harmonic Analyzer: see https://engineerguy.com/fourier/ (and don’t miss the accompanying video series! It’s pretty cool.)
https://github.com/kasperjunge/copcon
Point it at a code project directory to get a file tree and content, optionally with a git diff, copied to the clipboard - ready for copy pasting into ChatGPT.
It is very true that this only works for small projects, as you will bloat the LLM’s context with large codebases.
My solution to this is two files you can use to steer the tool’s behavior:
- .copconignore: For ignoring specific files and directories.
- .copcontarget: For targeting specific files and directories (applied before .copconignore).
These two files provide great control over what to include and exclude in the copied context.