Derivation of the Klein-Gordon equation by
Ciro Santilli 35 Updated 2025-04-18 +Created 1970-01-01
But since this is quantum mechanics, we feel like making into the "momentum operator", just like in the Schrödinger equation.
But we don't really know how to apply the momentum operator twice, because it is a gradient, so the first application goes from a scalar field to the vector field, and the second one...
But then, we have to avoid taking the square root to reach a first derivative in time, because we don't know how to take the square root of that operator expression.
So the Klein-Gordon equation just takes the approach of using this squared Hamiltonian instead.
Since it is a Hamiltonian, and comparing it to the Schrödinger equation which looks like:taking the Hamiltonian twice leads to:
We can contrast this with the Dirac equation, which instead attempts to explicitly construct an operator which squared coincides with the relativistic formula: derivation of the Dirac equation.
TypeScript is good. It does find errors in your JavaScript. But it is a form of "turd polishing". But Ciro Santilli would rather have a polished turd than a non-polished one.
Part of the reason TypeScript became popular is due to the universality of asset bundlers. Once you are already using an asset bundler, changing the
.js
extension into .ts
to get a less shitty experience is an easy choice.The other big reason is that JavaScript is so lose with type conversions, notably undefined happily converting to strings without problems, and any missing properties of Object happily being undefined. We should actually use ES6 Map everywhere instead of using Objects as maps.
Since TypeScript is not the default form of the language however, it inevitably happens that you need to add external types for a gazillion projects that are using raw JavaScript, and sometimes fight a lot to get things to work. And so we have: github.com/DefinitelyTyped/DefinitelyTyped. Not sure if this is beautiful, or frightening.
But in the end, as with other type of static linters, TypeScript generally transforms a few hard to debug runtime issues, into a bunch of stupid to solve compile time issues, which is generally a good thing.
The fact that this it parses comments JSDoc comments in JavaScript files is quite amazing.
Examples under typescript. Run each one of them with:Helper:
npx tsc example.ts
node example.js
tsr() (
# ts Run
f="$1"
npx tsc "$f"
node "${f%.*}.js"
)
tsr example.ts
- typescript/inferFromInit.ts. Should fail with:since TypeScript infers the type of
i
from first assignment asstring
, and we then attempt anumber
assignment later on - typescript/inferAfterInit.ts. Does not fail, as the first assignment cannot be computationally determined at runtime without breaking computer science.
- typescript/js-from-ts/main.ts: call JavaScript file typescript/js-from-ts/notmain.js from TypeScript.TODO we are unable to make it typecheck that require, i.e. make that fail, but we've seen cases in complex codebases where that did happen and www.typescriptlang.org/docs/handbook/intro-to-js-ts.html has infinite information on supporting it. So... how to make it fail??
npx tsc jsFromTs.ts && node jsFromTs.js
- typescript/functionArgument.ts: basic argument tests
- typescript/functionOptionalArgument.ts:
f(n?: number)
- typescript/functionOptionalArgument.ts:
- typescript/functionOptions.ts:
f({n, s}: {n: number, s: string})
Some major annoyances of TypeScript:
- destructuring assignment in function arguments requires repeating all arguments:
- stackoverflow.com/questions/12710905/how-do-i-dynamically-assign-properties-to-an-object-in-typescript how to dynamically assign properties to objects without defining explicit interfaces? We really need a syntax of type:
const myobj = { i: 2, [s string], } if (something) { myobj.s = 'asdf' }
The Internet Protocol by Ben Eater (2014)
Source. Set SVG background color in Inkscape by
Ciro Santilli 35 Updated 2025-04-18 +Created 1970-01-01
This is related to the underlying SVG pain point of SVG background color:
This is a bit harder than iterative pre-order: now we have to check if there is a left or right element or not:
- (START) push current
- if there is left:
- move left
- else:
- (ELSE) pop
- visit
- if there is right
- move right
- GOTO START
- else:
- GOTO ELSE
The control flow can be slightly simplified if we allow NULLs: www.geeksforgeeks.org/inorder-tree-traversal-without-recursion/
HTML snippet:
new class extends OurbigbookCanvasDemo {
init() {
super.init('webgl', {context_type: 'webgl'});
this.ctx.viewport(0, 0, this.ctx.drawingBufferWidth, this.ctx.drawingBufferHeight);
this.ctx.clearColor(0.0, 0.0, 0.0, 1.0);
this.vertexShaderSource = `
#version 100
precision highp float;
attribute float position;
void main() {
gl_Position = vec4(position, 0.0, 0.0, 1.0);
gl_PointSize = 64.0;
}
`;
this.fragmentShaderSource = `
#version 100
precision mediump float;
void main() {
gl_FragColor = vec4(0.18, 0.0, 0.34, 1.0);
}
`;
this.vertexShader = this.ctx.createShader(this.ctx.VERTEX_SHADER);
this.ctx.shaderSource(this.vertexShader, this.vertexShaderSource);
this.ctx.compileShader(this.vertexShader);
this.fragmentShader = this.ctx.createShader(this.ctx.FRAGMENT_SHADER);
this.ctx.shaderSource(this.fragmentShader, this.fragmentShaderSource);
this.ctx.compileShader(this.fragmentShader);
this.program = this.ctx.createProgram();
this.ctx.attachShader(this.program, this.vertexShader);
this.ctx.attachShader(this.program, this.fragmentShader);
this.ctx.linkProgram(this.program);
this.ctx.detachShader(this.program, this.vertexShader);
this.ctx.detachShader(this.program, this.fragmentShader);
this.ctx.deleteShader(this.vertexShader);
this.ctx.deleteShader(this.fragmentShader);
if (!this.ctx.getProgramParameter(this.program, this.ctx.LINK_STATUS)) {
console.log('error ' + this.ctx.getProgramInfoLog(this.program));
return;
}
this.ctx.enableVertexAttribArray(0);
var buffer = this.ctx.createBuffer();
this.ctx.bindBuffer(this.ctx.ARRAY_BUFFER, buffer);
this.ctx.vertexAttribPointer(0, 1, this.ctx.FLOAT, false, 0, 0);
this.ctx.useProgram(this.program);
}
draw() {
this.ctx.clear(this.ctx.COLOR_BUFFER_BIT);
this.ctx.bufferData(this.ctx.ARRAY_BUFFER, new Float32Array([Math.sin(this.time / 60.0)]), this.ctx.STATIC_DRAW);
this.ctx.drawArrays(this.ctx.POINTS, 0, 1);
}
}
This was the first full scale nuclear reactor in the world, and was brought up slowly to test it out.
Hanford B Reactor tour by Studio McGraw
. Source. 2016.- youtu.be/8rlVHEY7BF0?t=335 good description of the fuel element. It uses uranium metal, not Uranium dioxide
- youtu.be/8rlVHEY7BF0?t=652 N Reactor and F Reactor were identical, and came up 2 months later, but much faster because of what they learned on the B
One thing that annoys Ciro Santilli about that website are the footnote overload. Ciro likes linear things.
Forms the bacterial cell wall.
From the Wikipedia image we can see clearly the polymer structure formed: it is a mesh with:
- sugar covalent bond chains in one direction. These have two types of monosaccharide, NAM and NAG
- peptide chains on the other, and only coming off from NAM
Peptidoglycan polymer structure
. Source. Session reports of the Royal Prussian Academy of Sciences at Berlin by
Ciro Santilli 35 Updated 2025-04-18 +Created 1970-01-01
Publications by the Prussian Academy of Sciences.
Links to their publications: de.wikisource.org/wiki/Sitzungsberichte_der_K%C3%B6niglich_Preu%C3%9Fischen_Akademie_der_Wissenschaften_zu_Berlin
Notable papers:
Inscription added by Satoshi Nakamoto on the Genesis block containing:which is a reference to: www.thetimes.co.uk/article/chancellor-alistair-darling-on-brink-of-second-bailout-for-banks-n9l382mn62h wihch is fully titled:The "Alistair" was slikely removed due to limited payload concerns.
And it hints that one of Bitcoin's motivation was the financial crisis of 2007-2008, where banks were given bailouts by the government to not go under, which many people opposed as the crisis was their own fault in the first place. A notable related stab is taken at Len Sassaman tribute.
We can extract the image from the blockchain ourselves by starting from: blockchain.info/block-height/0?format=json.
From that page we manually extract the hash and that does contain the famous genesis block string:The JSON clarifies that the data is encoded in the
000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f
and then:wget -O 0.hex https://blockchain.info/block/000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f?format=hex
xxd -p -r 0.hex
EThe Times 03/Jan/2009 Chancellor on brink of second bailout for banks
script
field of the transaction input
:{
{
"script":"04ffff001d0104455468652054696d65732030332f4a616e2f32303039204368616e63656c6c6f72206f6e206272696e6b206f66207365636f6e64206261696c6f757420666f722062616e6b73"
The extra where:
E
(0x45 in ASCII) in EThe Times
is just extra noise required by the script, we can break things up as:04ffff001d0104 45 5468652054696d65732030332f4a616e2f32303039204368616e63656c6c6f72206f6e206272696e6b206f66207365636f6e64206261696c6f757420666f722062616e6b73
54
isT
- the
04ffff001d0104
part just doesn't show up on the terminal because it is not made of any printable characters.
The initial
04
is OP_RETURN
.TODO what is actual the meaning of the
ffff001d010445
part? @defango
twitter.com/defango/status/1642750851134652417 comments:04ffff001d0104 is a hexadecimal string. It is commonly used in the Bitcoin network as a part of the mining process. Specifically, it is used as the target value for a block to be considered valid by the Bitcoin network.
E.g. a Galilean transformation generally changes the exact values of coordinates, but not the form of the laws of physics themselves.
Lorentz covariance is the main context under which the word "covariant" appears, because we really don't want the form of the equations to change under Lorentz transforms, and "covariance" is often used as a synonym of "Lorentz covariance".
TODO some sources distinguish "invariant" from "covariant": invariant vs covariant.
Unlisted articles are being shown, click here to show only listed articles.