Skip to content

Instantly share code, notes, and snippets.

@lukeburns
lukeburns / Eigenstates.md
Last active November 7, 2024 00:10
Eigenstates.md

Dirac ideal

Spinors in the Dirac ideal are given by $$\begin{aligned} N &= M \frac{1+\gamma_0}{2} \frac{1+\gamma_5\sigma_3}{2} \ &= (M_+ + M_-)\frac{1+\gamma_0}{2} \frac{1+\gamma_5\sigma_3}{2} \ &= (M_+ + M_-\gamma_0)\frac{1+\gamma_0}{2} \frac{1+\gamma_5\sigma_3}{2} \ &= M_+'\frac{1+\gamma_0}{2} \frac{1+\gamma_5\sigma_3}{2} \ &= (\text{Re}M_+' + \text{Im} M_+' I \sigma_3)\frac{1+\gamma_5\sigma_3}{2}\frac{1+\gamma_0}{2} \ &= \psi \frac{1+\gamma_5\sigma_3}{2}\frac{1+\gamma_0}{2} \ \end{aligned} $$where $\psi \in \mathcal Cl_{1,3}^+$.

@lukeburns
lukeburns / A positive-energy relativistic wave equation.md
Last active October 27, 2024 01:56
A positive-energy relativistic wave equation.md

Let $$ \begin{gathered} \gamma_0 = \begin{bmatrix} 0 & - i I_2 \ i I_2 & 0 \end{bmatrix} = -i \beta \ \gamma_1 = \begin{bmatrix} -i\sigma_3 & 0 \ 0 & i\sigma_3

@lukeburns
lukeburns / bns-hnsd.js
Last active March 13, 2022 19:26
Silent Error: `No authority address.`
const { RecursiveResolver, dnssec, wire: { Record, types } } = require('bns')
const port = 5349
const resolver = new RecursiveResolver()
resolver.setStub('127.0.0.1', port, hnsDS())
resolver.on('log', console.log)
resolver.on('error', console.error)
resolver.lookup('com', types.A).then(console.log).catch(console.error)
@lukeburns
lukeburns / pknn.jl
Created September 24, 2021 06:05
Interactive KNN Pluto Notebook
### A Pluto.jl notebook ###
# v0.16.1
using Markdown
using InteractiveUtils
# This Pluto notebook uses @bind for interactivity. When running this notebook outside of Pluto, the following 'mock version' of @bind gives bound variables a default value (instead of an error).
macro bind(def, element)
quote
local el = $(esc(element))
@lukeburns
lukeburns / latex-completions.jl
Last active May 31, 2021 22:10
Global Julia and LaTeX Autocompletions with Espanso (https://espanso.org/)
# Put this in your espanso config folder and run `julia latex-completions.jl` to add all Julia REPL completions to espanso.
# Note: each expansion includes a space at the end (otherwise e.g. \c will autocomplete before you finish typing \cdot).
# You can try using a tab to trigger: "\\\\$(word[2:end])\t" instead, but this led to some unpredictable behavior for me.
# https://github.com/JunoLab/atom-latex-completions/blob/master/completions/generate.jl
import REPL
open(joinpath(dirname(@__FILE__), "user/latex-completions.yml"), "w") do io
println(io, "name: latex-completions")
@lukeburns
lukeburns / background.js
Created April 17, 2021 05:11
Chrome 'Open Frame in New Tab' Context Menu Extension
chrome.contextMenus.create({
title: 'Open Frame in New Tab',
contexts: ['frame'],
onclick: ({ frameUrl }) => {
chrome.tabs.create({
active: false,
url: frameUrl
})
}
})
@lukeburns
lukeburns / startup.jl
Created April 4, 2021 02:23
Nodelike require in Julia (probably you shouldn't do this)
macro require(mod)
try
Base.require(__module__, Symbol(mod)) # like require("module")
catch e
mod = string(mod)
include(mod) # like require("./module.js")
end
end
macro assign(ex)
hello world
@lukeburns
lukeburns / tex.ink
Last active December 17, 2019 21:39
Rendered $\LaTeX$ from [Github Gists](https://gist.github.com/)
@lukeburns
lukeburns / riemann
Last active September 20, 2017 17:08
Hello!
So…this is the expression I’m finding for the “inhomogeneous” equations:
$\nabla_\mu R^{\mu \nu}_{ \rho \sigma} = J^\nu_{\rho \sigma}$ where $J^\nu_{\rho \sigma} \equiv \nabla_\mu W^{\mu \nu}_{\rho \sigma} + \nabla_{[\rho} t_{\sigma]}^\nu$, $t_{\mu \nu} = \frac{1}{2} T_{\mu \nu} - \frac{1}{3} g_{\mu \nu} T$, and $T$ is the trace of $T_{\mu \nu}$. I think this can be placed entirely in terms of $T_{\mu \nu}$ using self-duality of the Weyl tensor.
And I expect the "electric" and "magnetic" fields to be given by $E_{i \rho \sigma} = R_{0 i \rho \sigma}$ and $B_{i \rho \sigma} = -\frac{1}{2} \epsilon_{ijk} R^{jk}_{\rho \sigma}$.
I think the only real dent in the analogy is that $J^\nu_{\rho \sigma}$ is not a conserved current in general.