Drosophila melanogaster Updated 2025-07-16
Dutch Golden Age Updated 2025-07-16
Quote by Bill Gates Updated 2025-07-16
SymPy Updated 2025-07-16
It also has serious applications obviously. www.sympy.org/scipy-2017-codegen-tutorial/ mentions code generation capabilities, which sounds super cool!
Let's start with some basics. fractions:outputs:Note that this is an exact value, it does not get converted to floating-point numbers where precision could be lost!
from sympy import *
sympify(2)/3 + sympify(1)/27/6We can also do everything with symbols:outputs:We can now evaluate that expression object at any time:outputs:
from sympy import *
x, y = symbols('x y')
expr = x/3 + y/2
print(expr)x/3 + y/2expr.subs({x: 1, y: 2})4/3How about a square root?outputs:so we understand that the value was kept without simplification. And of course:outputs outputs:gives:
x = sqrt(2)
print(x)sqrt(2)sqrt(2)**22. Also:sqrt(-1)II is the imaginary unit. We can use that symbol directly as well, e.g.:I*I-1Let's do some trigonometry:gives:and:gives:The exponential also works:gives;
cos(pi)-1cos(pi/4)sqrt(2)/2exp(I*pi)-1Now for some calculus. To find the derivative of the natural logarithm:outputs:Just read that. One over x. Beauty. And now for some integration:outputs:OK.
from sympy import *
x = symbols('x')
print(diff(ln(x), x))1/xprint(integrate(1/x, x))log(x)Let's do some more. Let's solve a simple differential equation:Doing:outputs:which means:To be fair though, it can't do anything crazy, it likely just goes over known patterns that it has solvers for, e.g. if we change it to:it just blows up:Sad.
y''(t) - 2y'(t) + y(t) = sin(t)from sympy import *
x = symbols('x')
f, g = symbols('f g', cls=Function)
diffeq = Eq(f(x).diff(x, x) - 2*f(x).diff(x) + f(x), sin(x)**4)
print(dsolve(diffeq, f(x)))Eq(f(x), (C1 + C2*x)*exp(x) + cos(x)/2)diffeq = Eq(f(x).diff(x, x)**2 + f(x), 0)NotImplementedError: solve: Cannot solve f(x) + Derivative(f(x), (x, 2))**2Let's try some polynomial equations:which outputs:which is a not amazingly nice version of the quadratic formula. Let's evaluate with some specific constants after the fact:which outputsLet's see if it handles the quartic equation:Something comes out. It takes up the entire terminal. Naughty. And now let's try to mess with it:and this time it spits out something more magic:Oh well.
from sympy import *
x, a, b, c = symbols('x a b c d e f')
eq = Eq(a*x**2 + b*x + c, 0)
sol = solveset(eq, x)
print(sol)FiniteSet(-b/(2*a) - sqrt(-4*a*c + b**2)/(2*a), -b/(2*a) + sqrt(-4*a*c + b**2)/(2*a))sol.subs({a: 1, b: 2, c: 3})FiniteSet(-1 + sqrt(2)*I, -1 - sqrt(2)*I)x, a, b, c, d, e, f = symbols('x a b c d e f')
eq = Eq(e*x**4 + d*x**3 + c*x**2 + b*x + a, 0)
solveset(eq, x)x, a, b, c, d, e, f = symbols('x a b c d e f')
eq = Eq(f*x**5 + e*x**4 + d*x**3 + c*x**2 + b*x + a, 0)
solveset(eq, x)ConditionSet(x, Eq(a + b*x + c*x**2 + d*x**3 + e*x**4 + f*x**5, 0), Complexes)Let's try some linear algebra.Let's invert it:outputs:
m = Matrix([[1, 2], [3, 4]])m**-1Matrix([
[ -2, 1],
[3/2, -1/2]]) Tangible and intangible assets Updated 2025-07-16
Uncomputable function Updated 2025-07-16
The prototypical example is the Busy beaver function, which is the easiest example to reach from the halting problem.
Calcium carbonate polymorph Updated 2025-07-16
Dependency graph Updated 2025-07-16
Joyce Wildenthal Updated 2025-07-16
WormWideWeb Updated 2025-07-16
Common Crawl Athena Updated 2025-07-16
INNER JOIN Updated 2025-07-16
Microwave oven Updated 2025-07-16
How Microwaves Work by National MagLab (2017)
Source. A bit meh. Does not mention the word cavity magnetron! NADP+ Updated 2025-07-16
WebGL Updated 2025-07-16
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);
}
} Web of Stories Updated 2025-07-16
1-2 to hour long interviews, the number of Nobel Prize winners is off-the-charts. The videos have transcripts on the description!
webots.cloud Updated 2025-07-16
Not going to lie, this is some cool shit, robot simulation and 3D visualization in the browser.
Weekend Updated 2025-07-16
Well-capitalized Seattle start-up seeks Unix developers Updated 2025-07-16
Apparently posted to
ba.jobs.offered Usenet newsgroup? What does it mean that photons are force carriers for electromagnetism? Updated 2025-07-16
TODO find/create decent answer.
I think the best answer is something along:
- local symmetries of the Lagrangian imply conserved currents. gives conserved charges.
- OK now. We want a local symmetry. And we also want:Given all of that, the most obvious and direct thing we reach a guess at the quantum electrodynamics Lagrangian is Video "Deriving the qED Lagrangian by Dietterich Labs (2018)"
- Dirac equation: quantum relativistic Newton's laws that specify what forces do to the fields
- electromagnetism: specifies what causes forces based on currents. But not what it does to masses.
A basic non-precise intuition is that a good model of reality is that electrons do not "interact with one another directly via the electromagnetic field".
A better model happens to be the quantum field theory view that the electromagnetic field interacts with the photon field but not directly with itself, and then the photon field interacts with parts of the electromagnetic field further away.
The more precise statement is that the photon field is a gauge field of the electromagnetic force under local U(1) symmetry, which is described by a Lie group. TODO understand.
This idea was first applied in general relativity, where Einstein understood that the "force of gravity" can be understood just in terms of symmetry and curvature of space. This was later applied o quantum electrodynamics and the entire Standard Model.
From Video "Lorenzo Sadun on the "Yang-Mills and Mass Gap" Millennium problem":
- www.youtube.com/watch?v=pCQ9GIqpGBI&t=1663s mentions this idea first came about from Hermann Weyl.
- youtu.be/pCQ9GIqpGBI?t=2827 mentions that in that case the curvature is given by the electromagnetic tensor.
Bibliography:
- www.youtube.com/watch?v=qtf6U3FfDNQ Symmetry and Quantum Electrodynamics (The Standard Model Part 1) by ZAP Physics (2021)
- www.youtube.com/watch?v=OQF7kkWjVWM The Symmetry and Simplicity of the Laws of Nature and the Higgs Boson by Juan Maldacena (2012). Meh, also too basic.
There are unlisted articles, also show them or only show them.