Common Lisp vs Racket

flavio81 11 months ago [-]

The author, a famous and well-liked lisper, is not considering portability features. CL is an ANSI standard and code often runs with no changes in many distinct CL implementations/compilers/interpreters.

Also, related to that point: There are many different CL implementations out there that satisfy different use cases, like for example JVM deployment (ABCL), embedded systems (ECL), speed(SBCL), fast compile times (Clozure), pro-level support (LispWorks, ACL), etc. So the same code has a huge amount of options for deployment. It really makes Common Lisp be “write once, run anywhere”.

Then speed is also never mentioned. Lisp can be seriously fast; under SBCL it is generally 0.3x to 1x C speed; LispWorks might be faster, and there’s a PDF out there called “How to make Lisp go faster than C”, so that should give an idea of Lisp speed potential.

CL wasn’t created by philosophing about what a programming language should be for many years; CL was basically created by merging Lisps that were already proven in the industry (Maclisp, Zetalisp, etc), already proven to be good for AI, heavy computation, symbolic computation, launching rockets, writing full operating systems, etc.

CL is a “you want it, you got it” programming language. You want to circumvent the garbage collector? Need to use GOTOs for a particular function? Want to produce better assembly out? Need side effects? Multiple inheritance? Want to write an OS? CL will deliver the goods.

In short, I would guess that from a computer scientist or reseacher point of view, Racket is certainly more attactive, but for the engineer or start-up owner that wants to have killer production systems done in short time, or to create really complex, innovative systems that can be deployed to the real world, Common Lisp ought to be the weapon of choice!

— Why I haven’t jumped ship from Common Lisp to Racket just yet

— Hacker News

.

.

2022.07.13 Wednesday ACHK

No reading, 2

Teaching is useless, 4

.

[Projections start to stare at Ariadne as they walk by]

Ariadne: Why are they all looking at me?

Cobb: Cause my subconscious feels that someone else is creating this world. The more you change things, the quicker the projections start to converge on you.

Ariadne: Converge?

Cobb: They sense the foreign nature of the dreamer. They attack, like white blood cells fighting an infection.

Ariadne: What, they’re gonna attack us?

Cobb: No, no….Just you.

— Inception

.

Most people hate being taught because they don’t want their personal world to be interfered with.

— Me@2016-05-29 06:29:40 AM

.

.

2022.07.12 Tuesday (c) All rights reserved by ACHK

星期日休息

在生活事務上,有些夫妻男方做主導,即「夫唱婦隨」;有些則女方做主導,即「婦唱夫隨」。

一方主導的關係,不健康,因為不平等。平等的交往,雙方才可坦誠相對。

可改為「雙方不主導」和「雙方主導」。

有客觀標準的事項,按該道理來行事,雙方不主導。例如,男方懂電腦,女方不太懂。那樣,購買電腦時,由男方選擇。

而只是風格喜好的情節,則雙方主導。逢星期一、三、五,由男方話事;逢二、四、六,由女方。

— Me@2022-07-12 12:33:24 PM

.

.

2022.07.12 Tuesday (c) All rights reserved by ACHK

1.7 Evolution of Dynamical State, 2.2

Structure and Interpretation of Classical Mechanics

.

\displaystyle{ \begin{aligned}     \partial_1 L \circ \Gamma[q]     &= D ( \partial_2 L \circ \Gamma[q]) \\ \\    &= \partial_0 ( \partial_2 L \circ \Gamma[q]) Dt +  \partial_1 ( \partial_2 L \circ \Gamma[q]) Dq + \partial_2 ( \partial_2 L \circ \Gamma[q]) Dv \\ \\     &= \partial_0 \partial_2 L \circ \Gamma[q] +  ( \partial_1 \partial_2 L \circ \Gamma[q]) Dq + (\partial_2 \partial_2 L \circ \Gamma[q]) D^2 q \\ \\     \end{aligned}}

.

\displaystyle{ \begin{aligned}      (\partial_2 \partial_2 L \circ \Gamma[q]) D^2 q     &=     \partial_1 L \circ \Gamma[q]     - \partial_0 \partial_2 L \circ \Gamma[q]     - (\partial_1 \partial_2 L \circ \Gamma[q]) Dq  \\ \\         D^2 q     &=     \left[ \partial_2 \partial_2 L \circ \Gamma[q] \right]^{-1}    \left\{ \partial_1 L \circ \Gamma[q]     - \partial_0 \partial_2 L \circ \Gamma[q]     - (\partial_1 \partial_2 L \circ \Gamma[q]) Dq  \right\} \\ \\      \end{aligned}}

where \displaystyle{\left[ \partial_2 \partial_2 L \circ \Gamma \right]} is a structure that can be represented by a symmetric square matrix, so we can compute its inverse.

~~~

[guess]

The Lagrange equation:

\displaystyle{ \begin{aligned} D \left( \frac{\partial}{\partial \dot q_1} L \circ \Gamma[\begin{bmatrix} q_1 \\ q_2 \end{bmatrix}] \right) - \left(\frac{\partial}{\partial q_1} L \circ \Gamma[\begin{bmatrix} q_1 \\ q_2 \end{bmatrix}]]\right) &= 0 \\ \end{aligned}}

\displaystyle{ \begin{aligned} D \left( \frac{\partial}{\partial \dot q_2} L \circ \Gamma[\begin{bmatrix} q_1 \\ q_2 \end{bmatrix}]] \right) - \left(\frac{\partial}{\partial q_2} L \circ \Gamma[\begin{bmatrix} q_1 \\ q_2 \end{bmatrix}]]\right) &= 0 \\ \end{aligned}}

\displaystyle{ \begin{aligned}   \frac{d}{dt} \left( \frac{\partial}{\partial \dot q_1} L (t, q_1(t), \dot q_1(t), q_2(t), \dot q_2(t)) \right) - \frac{\partial}{\partial q_1} L (t, q_1(t), \dot q_1(t), q_2(t), \dot q_2(t))    &= 0       \end{aligned}}

\displaystyle{ \begin{aligned}   \frac{d}{dt} \left( \frac{\partial}{\partial \dot q_2} L (t, q_1(t), \dot q_1(t), q_2(t), \dot q_2(t)) \right) - \frac{\partial}{\partial q_2} L (t, q_1(t), \dot q_1(t), q_2(t), \dot q_2(t))    &= 0       \end{aligned}}

.

\displaystyle{   \begin{aligned} D \left( \begin{bmatrix} \frac{\partial}{\partial \dot q_1}  \\ \frac{\partial}{\partial \dot q_2}  \end{bmatrix}       L \circ \Gamma[q_1, q_2] \right)     - \left(     \begin{bmatrix} \frac{\partial}{\partial q_1}  \\ \frac{\partial}{\partial  q_2}  \end{bmatrix}     L \circ \Gamma[q_1, q_2]\right) &= 0 \\       D \left(     \vec \partial_2    L \circ \Gamma[q_1, q_2] \right)     - \left(     \vec \partial_1     L \circ \Gamma[q_1, q_2]\right) &= 0 \\       \end{aligned}}

.

\displaystyle{ \begin{aligned}         \vec \partial_1 L \circ \Gamma[q] &= D ( \vec \partial_2 L \circ \Gamma[q]) \\ \\         \begin{bmatrix} \frac{\partial}{\partial q_1}  \\ \frac{\partial}{\partial  q_2}  \end{bmatrix}     L \circ \Gamma[q_1, q_2]     &=     D \left( \begin{bmatrix} \frac{\partial}{\partial \dot q_1}  \\ \frac{\partial}{\partial \dot q_2}  \end{bmatrix}       L \circ \Gamma[q_1, q_2] \right)   \\  \\    \frac{\partial}{\partial q_1}      L \circ \Gamma[q_1, q_2]     &=     \partial_0 \left(\frac{\partial}{\partial \dot q_1} L \circ \Gamma[q_1, q_2] \right) Dt \\    &+ \partial_{q_1} \left(\frac{\partial}{\partial \dot q_1} L \circ \Gamma[q_1, q_2] \right) D q_1     + \partial_{v_1} \left(\frac{\partial}{\partial \dot q_1} L \circ \Gamma[q_1, q_2] \right) D v_1 \\    &+ \partial_{q_2} \left(\frac{\partial}{\partial \dot q_1} L \circ \Gamma[q_1, q_2] \right) D q_2     + \partial_{v_2} \left(\frac{\partial}{\partial \dot q_1} L \circ \Gamma[q_1, q_2] \right) D v_2       \\       \frac{\partial}{\partial  q_2}      L \circ \Gamma[q_1, q_2]     &=     ...      \\      \end{aligned}}

.

\displaystyle{ \begin{aligned}         \frac{\partial}{\partial q_1}      L \circ \Gamma[q_1, q_2]     &=     \partial_0 \left(\frac{\partial}{\partial \dot q_1} L \circ \Gamma[q_1, q_2] \right) Dt \\    &+ \frac{\partial}{\partial q_1}  \left(\frac{\partial}{\partial \dot q_1} L \circ \Gamma[q_1, q_2] \right) D q_1       + \frac{\partial}{\partial q_2}  \left(\frac{\partial}{\partial \dot q_1} L \circ \Gamma[q_1, q_2] \right) D q_2 \\    &+ \frac{\partial}{\partial \dot q_1}  \left(\frac{\partial}{\partial \dot q_1} L \circ \Gamma[q_1, q_2] \right) D^2 q_1     + \frac{\partial}{\partial \dot q_2} \left(\frac{\partial}{\partial \dot q_1} L \circ \Gamma[q_1, q_2] \right) D^2 q_2       \\      \frac{\partial}{\partial  q_2}      L \circ \Gamma[q_1, q_2]     &=     \partial_0 \left(\frac{\partial}{\partial \dot q_2} L \circ \Gamma[q_1, q_2] \right) Dt \\    &+ \frac{\partial}{\partial q_1}  \left(\frac{\partial}{\partial \dot q_2} L \circ \Gamma[q_1, q_2] \right) D q_1       + \frac{\partial}{\partial q_2}  \left(\frac{\partial}{\partial \dot q_2} L \circ \Gamma[q_1, q_2] \right) D q_2 \\    &+ \frac{\partial}{\partial \dot q_1}  \left(\frac{\partial}{\partial \dot q_2} L \circ \Gamma[q_1, q_2] \right) D^2 q_1     + \frac{\partial}{\partial \dot q_2} \left(\frac{\partial}{\partial \dot q_2} L \circ \Gamma[q_1, q_2] \right) D^2 q_2         \\           \end{aligned}}

.

\displaystyle{\begin{aligned}    \vec \partial_1    L \circ \Gamma[q_1, q_2]     &=     \partial_0 \left(\vec \partial_2 L \circ \Gamma[q_1, q_2] \right) Dt \\    &+ \frac{\partial}{\partial q_1}  \left(    \vec \partial_2    L \circ \Gamma[q_1, q_2] \right) D q_1       + \frac{\partial}{\partial q_2}  \left(    \vec \partial_2     L \circ \Gamma[q_1, q_2] \right) D q_2 \\    &+ \frac{\partial}{\partial \dot q_1}  \left(    \vec \partial_2     L \circ \Gamma[q_1, q_2] \right) D^2 q_1     + \frac{\partial}{\partial \dot q_2} \left(    \vec \partial_2  L \circ \Gamma[q_1, q_2] \right) D^2 q_2       \\ \\    \end{aligned}}

\displaystyle{\begin{aligned}    \begin{bmatrix}     \frac{\partial}{\partial q_1} \\    \frac{\partial}{\partial q_2}    \end{bmatrix}    L \circ \Gamma[q_1, q_2]     &=     \partial_0 \left(  \begin{bmatrix}     \frac{\partial}{\partial \dot q_1} \\    \frac{\partial}{\partial \dot q_2}    \end{bmatrix}   L \circ \Gamma[q_1, q_2] \right) Dt \\    &+ \frac{\partial}{\partial q_1}  \left(    \begin{bmatrix}     \frac{\partial}{\partial \dot q_1} \\    \frac{\partial}{\partial \dot q_2}    \end{bmatrix}      L \circ \Gamma[q_1, q_2] \right) D q_1       + \frac{\partial}{\partial q_2}  \left(    \begin{bmatrix}     \frac{\partial}{\partial \dot q_1} \\    \frac{\partial}{\partial \dot q_2}    \end{bmatrix}       L \circ \Gamma[q_1, q_2] \right) D q_2 \\    &+ \frac{\partial}{\partial \dot q_1}  \left(    \begin{bmatrix}     \frac{\partial}{\partial \dot q_1} \\    \frac{\partial}{\partial \dot q_2}    \end{bmatrix}       L \circ \Gamma[q_1, q_2] \right) D^2 q_1     + \frac{\partial}{\partial \dot q_2} \left(    \begin{bmatrix}     \frac{\partial}{\partial \dot q_1} \\    \frac{\partial}{\partial \dot q_2}    \end{bmatrix}    L \circ \Gamma[q_1, q_2] \right) D^2 q_2       \\ \\    \end{aligned}}

.

\displaystyle{ \begin{aligned}     \frac{\partial}{\partial \dot q_1} \left(\frac{\partial}{\partial \dot q_1} L \circ \Gamma[\vec q] \right) D^2 q_1 + \frac{\partial}{\partial \dot q_2} \left(\frac{\partial}{\partial \dot q_1} L \circ \Gamma[\vec q] \right) D^2 q_2    &= \frac{\partial}{\partial q_1} L \circ \Gamma[\vec q]     - \partial_0 \left(\frac{\partial}{\partial \dot q_1} L \circ \Gamma[\vec q] \right) Dt \\     &- \frac{\partial}{\partial q_1} \left(\frac{\partial}{\partial \dot q_1} L \circ \Gamma[\vec q] \right) D q_1 - \frac{\partial}{\partial q_2} \left(\frac{\partial}{\partial \dot q_1} L \circ \Gamma[\vec q] \right) D q_2 \\      \\      \frac{\partial}{\partial \dot q_1} \left(\frac{\partial}{\partial \dot q_2} L \circ \Gamma[\vec q] \right) D^2 q_1 + \frac{\partial}{\partial \dot q_2} \left(\frac{\partial}{\partial \dot q_2} L \circ \Gamma[\vec q] \right) D^2 q_2      &= \frac{\partial}{\partial q_2} L \circ \Gamma[\vec q] - \partial_0 \left(\frac{\partial}{\partial \dot q_2} L \circ \Gamma[\vec q] \right) Dt \\     &- \frac{\partial}{\partial q_1} \left(\frac{\partial}{\partial \dot q_2} L \circ \Gamma[\vec q] \right) D q_1 - \frac{\partial}{\partial q_2} \left(\frac{\partial}{\partial \dot q_2} L \circ \Gamma[\vec q] \right) D q_2 \\       \end{aligned}}

\displaystyle{ \begin{aligned}     &\begin{bmatrix}  \frac{\partial}{\partial \dot q_1} \left(\frac{\partial}{\partial \dot q_1} L \circ \Gamma[\vec q] \right) &    \frac{\partial}{\partial \dot q_2} \left(\frac{\partial}{\partial \dot q_1} L \circ \Gamma[\vec q] \right) \\       \frac{\partial}{\partial \dot q_1} \left(\frac{\partial}{\partial \dot q_2} L \circ \Gamma[\vec q] \right) &    \frac{\partial}{\partial \dot q_2} \left(\frac{\partial}{\partial \dot q_2} L \circ \Gamma[\vec q] \right)    \end{bmatrix} \begin{bmatrix}  D^2 q_1 \\ D^2 q_2 \end{bmatrix} \\      &= \begin{bmatrix} \frac{\partial}{\partial q_1} L \circ \Gamma[\vec q]     - \partial_0 \left(\frac{\partial}{\partial \dot q_1} L \circ \Gamma[\vec q] \right) Dt      - \frac{\partial}{\partial q_1} \left(\frac{\partial}{\partial \dot q_1} L \circ \Gamma[\vec q] \right) D q_1 - \frac{\partial}{\partial q_2} \left(\frac{\partial}{\partial \dot q_1} L \circ \Gamma[\vec q] \right) D q_2 \\      \\    \frac{\partial}{\partial q_2} L \circ \Gamma[\vec q] - \partial_0 \left(\frac{\partial}{\partial \dot q_2} L \circ \Gamma[\vec q] \right) Dt      - \frac{\partial}{\partial q_1} \left(\frac{\partial}{\partial \dot q_2} L \circ \Gamma[\vec q] \right) D q_1 - \frac{\partial}{\partial q_2} \left(\frac{\partial}{\partial \dot q_2} L \circ \Gamma[\vec q] \right) D q_2 \\   \end{bmatrix}      \end{aligned}}

.

\displaystyle{ \begin{aligned}     &\left(\begin{bmatrix}  \frac{\partial}{\partial \dot q_1} \left(\frac{\partial}{\partial \dot q_1} \right) &    \frac{\partial}{\partial \dot q_2} \left(\frac{\partial}{\partial \dot q_1} \right) \\       \frac{\partial}{\partial \dot q_1} \left(\frac{\partial}{\partial \dot q_2} \right) &    \frac{\partial}{\partial \dot q_2} \left(\frac{\partial}{\partial \dot q_2} \right)    \end{bmatrix} L \circ \Gamma[\vec q] \right)\begin{bmatrix}  D^2 q_1 \\ D^2 q_2 \end{bmatrix} \\      &=     \begin{bmatrix} \frac{\partial}{\partial q_1}       \\    \frac{\partial}{\partial q_2}   \end{bmatrix} L \circ \Gamma[\vec q]    -    \left( \partial_0    \begin{bmatrix}      \frac{\partial}{\partial \dot q_1} \\    \frac{\partial}{\partial \dot q_2}       \end{bmatrix} L \circ \Gamma[\vec q] \right) Dt    -    \left(  \begin{bmatrix}        \frac{\partial}{\partial q_1} \left(\frac{\partial}{\partial \dot q_1}  \right)      & \frac{\partial}{\partial q_2} \left(\frac{\partial}{\partial \dot q_1}  \right)  \\      \\         \frac{\partial}{\partial q_1} \left(\frac{\partial}{\partial \dot q_2} \right)     & \frac{\partial}{\partial q_2} \left(\frac{\partial}{\partial \dot q_2} \right)  \\   \end{bmatrix}    L \circ \Gamma[\vec q] \right)    \begin{bmatrix}  D q_1 \\ D q_2 \end{bmatrix} \\      \end{aligned}}

.

\displaystyle{ \begin{aligned}     &\left(    \begin{bmatrix}  \frac{\partial}{\partial \dot q_1} \\    \frac{\partial}{\partial \dot q_2} \\    \end{bmatrix}     \begin{bmatrix}  \frac{\partial}{\partial \dot q_1} &    \frac{\partial}{\partial \dot q_2} \\       \end{bmatrix}         L \circ \Gamma[\vec q] \right)\begin{bmatrix}  D^2 q_1 \\ D^2 q_2 \end{bmatrix} \\      &=     \begin{bmatrix} \frac{\partial}{\partial q_1}       \\    \frac{\partial}{\partial q_2}   \end{bmatrix} L \circ \Gamma[\vec q]    -    \left( \partial_0    \begin{bmatrix}      \frac{\partial}{\partial \dot q_1} \\    \frac{\partial}{\partial \dot q_2}       \end{bmatrix} L \circ \Gamma[\vec q] \right) Dt    -    \left(    \begin{bmatrix}        \frac{\partial}{\partial \dot q_1} \\    \frac{\partial}{\partial \dot q_2}     \end{bmatrix}      \begin{bmatrix}        \frac{\partial}{\partial q_1}   &    \frac{\partial}{\partial q_2}         \end{bmatrix}    L \circ \Gamma[\vec q] \right)    \begin{bmatrix}  D q_1 \\ D q_2 \end{bmatrix} \\      \end{aligned}}

.

\displaystyle{ \begin{aligned}     &\left( \vec \partial_2 \vec \partial_2^T     L \circ \Gamma[\vec q] \right) D^2 \vec q \\    &= \vec \partial_1 L \circ \Gamma[\vec q]    - \left( \partial_0 \vec \partial_2 L \circ \Gamma[\vec q] \right)     - \left( \vec \partial_2 \vec \partial_1^T L \circ \Gamma[\vec q] \right) D \vec q \\      \end{aligned}}

[guess]

— Me@2022-07-07 05:20:38 PM

.

.

2022.07.09 Saturday (c) All rights reserved by ACHK

1.7 Evolution of Dynamical State, 2.1

Structure and Interpretation of Classical Mechanics

.

\displaystyle{ \begin{aligned}      (\partial_2 \partial_2 L \circ \Gamma[q]) D^2 q     &=     \partial_1 L \circ \Gamma[q]     - \partial_0 \partial_2 L \circ \Gamma[q]     - (\partial_1 \partial_2 L \circ \Gamma[q]) Dq  \\ \\         D^2 q     &=     \left[ \partial_2 \partial_2 L \circ \Gamma[q] \right]^{-1}    \left\{ \partial_1 L \circ \Gamma[q]     - \partial_0 \partial_2 L \circ \Gamma[q]     - (\partial_1 \partial_2 L \circ \Gamma[q]) Dq  \right\} \\ \\      \end{aligned}}

where \displaystyle{\left[ \partial_2 \partial_2 L \circ \Gamma \right]} is a structure that can be represented by a symmetric square matrix, so we can compute its inverse.

~~~

[guess]

Eq. (1.110):

\displaystyle{  \left(D \Gamma[q] \right)(t)   = \left( 1, Dq(t), D^2 q(t), ... \right)  = \begin{bmatrix} 1 \\ Dq(t) \\ D^2 q(t) \\ ... \\ \end{bmatrix} \\   }

.

\displaystyle{ \Gamma[q](t) = \left( t, q(t), D q(t), D^2 q(t), ... \right)  = \begin{bmatrix} t \\ q(t) \\ D q(t) \\ D^2 q(t) \\ ... \\ \end{bmatrix} \\   }

\displaystyle{ \Gamma[q] = \begin{bmatrix} I \\ q \\ D q \\ D^2 q \\ ... \\ \end{bmatrix} \\   },

where I(t) = t.

\displaystyle{ \Gamma[q_1, q_2](t) = \left( t, \begin{bmatrix} q_1(t) \\ q_2(t) \end{bmatrix},   D \begin{bmatrix} q_1(t) \\ q_2(t) \end{bmatrix},   D^2 \begin{bmatrix} q_1(t) \\ q_2(t) \end{bmatrix},   ... \right) = \begin{bmatrix} t \\ \begin{bmatrix} q_1(t) \\ q_2(t) \end{bmatrix} \\   D \begin{bmatrix} q_1(t) \\ q_2(t) \end{bmatrix} \\   D^2 \begin{bmatrix} q_1(t) \\ q_2(t) \end{bmatrix} \\   ... \\ \end{bmatrix} \\ }

The Lagrange equation:

\displaystyle{ \begin{aligned} D ( \partial_2 L \circ \Gamma[q]) - (\partial_1 L \circ \Gamma[q]) &= 0 \\ \end{aligned}}

\displaystyle{ \begin{aligned}     \frac{d}{dt} \left( \frac{\partial}{\partial \dot q} L (t, q(t), \dot q(t)) \right) - \frac{\partial}{\partial q} L (t, q(t), \dot q(t))    &= 0     \end{aligned}}

.

\displaystyle{ \begin{aligned} D \left( \frac{\partial}{\partial \dot q_1} L \circ \Gamma[q_1, q_2] \right) - \left(\frac{\partial}{\partial q_1} L \circ \Gamma[q_1, q_2]\right) &= 0 \\ \end{aligned}}

\displaystyle{ \begin{aligned} D \left( \frac{\partial}{\partial \dot q_2} L \circ \Gamma[q_1, q_2] \right) - \left(\frac{\partial}{\partial q_2} L \circ \Gamma[q_1, q_2]\right) &= 0 \\ \end{aligned}}

\displaystyle{ \begin{aligned}   \frac{d}{dt} \left( \frac{\partial}{\partial \dot q_1} L (t, q_1(t), \dot q_1(t), q_2(t), \dot q_2(t)) \right) - \frac{\partial}{\partial q_1} L (t, q_1(t), \dot q_1(t), q_2(t), \dot q_2(t))    &= 0       \end{aligned}}

\displaystyle{ \begin{aligned}   \frac{d}{dt} \left( \frac{\partial}{\partial \dot q_2} L (t, q_1(t), \dot q_1(t), q_2(t), \dot q_2(t)) \right) - \frac{\partial}{\partial q_2} L (t, q_1(t), \dot q_1(t), q_2(t), \dot q_2(t))    &= 0       \end{aligned}}

.

\displaystyle{   \begin{aligned} D \left( \begin{bmatrix} \frac{\partial}{\partial \dot q_1}  \\ \frac{\partial}{\partial \dot q_2}  \end{bmatrix}       L \circ \Gamma[q_1, q_2] \right)     - \left(     \begin{bmatrix} \frac{\partial}{\partial q_1}  \\ \frac{\partial}{\partial  q_2}  \end{bmatrix}     L \circ \Gamma[q_1, q_2]\right) &= 0 \\       D \left(     \vec \partial_2    L \circ \Gamma[q_1, q_2] \right)     - \left(     \vec \partial_1     L \circ \Gamma[q_1, q_2]\right) &= 0 \\       \end{aligned}}

.

\displaystyle{ \begin{aligned}         \vec \partial_1 L \circ \Gamma[q] &= D ( \vec \partial_2 L \circ \Gamma[q]) \\ \\         \begin{bmatrix} \frac{\partial}{\partial q_1}  \\ \frac{\partial}{\partial  q_2}  \end{bmatrix}     L \circ \Gamma[q_1, q_2]     &=     D \left( \begin{bmatrix} \frac{\partial}{\partial \dot q_1}  \\ \frac{\partial}{\partial \dot q_2}  \end{bmatrix}       L \circ \Gamma[q_1, q_2] \right)   \\  \\        \frac{\partial}{\partial q_1}      L \circ \Gamma[q_1, q_2]     &=     D \left(\frac{\partial}{\partial \dot q_1} L \circ \Gamma[q_1, q_2] \right)   \\       \frac{\partial}{\partial  q_2}      L \circ \Gamma[q_1, q_2]     &=     D \left( \frac{\partial}{\partial \dot q_2}        L \circ \Gamma[q_1, q_2] \right)   \\  \\      \frac{\partial}{\partial q_1}      L \circ \Gamma[q_1, q_2]     &=     \partial_0 \left(\frac{\partial}{\partial \dot q_1} L \circ \Gamma[q_1, q_2] \right) Dt \\    &+ \partial_{q_1} \left(\frac{\partial}{\partial \dot q_1} L \circ \Gamma[q_1, q_2] \right) D q_1     + \partial_{v_1} \left(\frac{\partial}{\partial \dot q_1} L \circ \Gamma[q_1, q_2] \right) D v_1 \\    &+ \partial_{q_2} \left(\frac{\partial}{\partial \dot q_1} L \circ \Gamma[q_1, q_2] \right) D q_2     + \partial_{v_2} \left(\frac{\partial}{\partial \dot q_1} L \circ \Gamma[q_1, q_2] \right) D v_2       \\       \frac{\partial}{\partial  q_2}      L \circ \Gamma[q_1, q_2]     &= ... \\      \end{aligned}}

.

\displaystyle{ \begin{aligned}         \frac{\partial}{\partial q_1}      L \circ \Gamma[q_1, q_2]     &=     \partial_0 \left(\frac{\partial}{\partial \dot q_1} L \circ \Gamma[q_1, q_2] \right) Dt \\    &+ \frac{\partial}{\partial q_1}  \left(\frac{\partial}{\partial \dot q_1} L \circ \Gamma[q_1, q_2] \right) D q_1       + \frac{\partial}{\partial q_2}  \left(\frac{\partial}{\partial \dot q_1} L \circ \Gamma[q_1, q_2] \right) D q_2 \\    &+ \frac{\partial}{\partial \dot q_1}  \left(\frac{\partial}{\partial \dot q_1} L \circ \Gamma[q_1, q_2] \right) D^2 q_1     + \frac{\partial}{\partial \dot q_2} \left(\frac{\partial}{\partial \dot q_1} L \circ \Gamma[q_1, q_2] \right) D^2 q_2       \\      \frac{\partial}{\partial  q_2}      L \circ \Gamma[q_1, q_2]     &=     \partial_0 \left(\frac{\partial}{\partial \dot q_2} L \circ \Gamma[q_1, q_2] \right) Dt \\    &+ \frac{\partial}{\partial q_1}  \left(\frac{\partial}{\partial \dot q_2} L \circ \Gamma[q_1, q_2] \right) D q_1       + \frac{\partial}{\partial q_2}  \left(\frac{\partial}{\partial \dot q_2} L \circ \Gamma[q_1, q_2] \right) D q_2 \\    &+ \frac{\partial}{\partial \dot q_1}  \left(\frac{\partial}{\partial \dot q_2} L \circ \Gamma[q_1, q_2] \right) D^2 q_1     + \frac{\partial}{\partial \dot q_2} \left(\frac{\partial}{\partial \dot q_2} L \circ \Gamma[q_1, q_2] \right) D^2 q_2         \\           \end{aligned}}

.

This part is wrong.

\displaystyle{\begin{aligned}    \vec \partial_1    L \circ \Gamma[q_1, q_2]     &=     \partial_0 \left(\vec \partial_2 L \circ \Gamma[q_1, q_2] \right) Dt \\    &+ \frac{\partial}{\partial q_1}  \left(    \vec \partial_2    L \circ \Gamma[q_1, q_2] \right) D q_1       + \frac{\partial}{\partial q_2}  \left(    \vec \partial_2     L \circ \Gamma[q_1, q_2] \right) D q_2 \\    &+ \frac{\partial}{\partial \dot q_1}  \left(    \vec \partial_2     L \circ \Gamma[q_1, q_2] \right) D^2 q_1     + \frac{\partial}{\partial \dot q_2} \left(    \vec \partial_2  L \circ \Gamma[q_1, q_2] \right) D^2 q_2       \\ \\    &= \partial_0 \left(\vec \partial_2 L \circ \Gamma[q_1, q_2] \right) Dt \\    &+ \begin{bmatrix}  \frac{\partial}{\partial q_1} &  \frac{\partial}{\partial q_2} \\ \end{bmatrix}       \begin{bmatrix} \left(    \vec \partial_2    L \circ \Gamma[q_1, q_2] \right) D q_1    \\ \left(    \vec \partial_2     L \circ \Gamma[q_1, q_2] \right) D q_2 \\ \end{bmatrix}      +     \begin{bmatrix}  \frac{\partial}{\partial \dot q_1} &  \frac{\partial}{\partial \dot q_2} \\ \end{bmatrix}         \begin{bmatrix} \left(    \vec \partial_2    L \circ \Gamma[q_1, q_2] \right) D^2 q_1    \\ \left(    \vec \partial_2     L \circ \Gamma[q_1, q_2] \right) D^2 q_2 \\ \end{bmatrix} \\        \\           \end{aligned}}

\displaystyle{\begin{aligned}    &= \partial_0 \left(\vec \partial_2 L \circ \Gamma[q_1, q_2] \right) Dt \\    &+ \begin{bmatrix}  \frac{\partial}{\partial q_1} &  \frac{\partial}{\partial q_2} \\ \end{bmatrix}       \left(    \vec \partial_2    L \circ \Gamma[q_1, q_2] \right) D \begin{bmatrix} q_1    \\  q_2 \\ \end{bmatrix}      +     \begin{bmatrix}  \frac{\partial}{\partial \dot q_1} &  \frac{\partial}{\partial \dot q_2} \\ \end{bmatrix}         \left(    \vec \partial_2    L \circ \Gamma[q_1, q_2] \right) D^2 \begin{bmatrix} q_1    \\  q_2 \\ \end{bmatrix} \\       \\    \vec \partial_1    L \circ \Gamma[\vec q]       &= \partial_0 \left(\vec \partial_2 L \circ \Gamma[q_1, q_2] \right) + \vec \partial_1^T \left( \vec \partial_2 L \circ \Gamma[\vec q] \right) D \vec q     + \vec \partial_2^T \left( \vec \partial_2 L \circ \Gamma[\vec q] \right) D^2 \vec q \\        \end{aligned}}

This can be proven wrong by just checking the dimensions of the matrix products.

The source of the errors is the second step. It puts the column matrix \displaystyle{\vec \partial_2 = \begin{bmatrix} \frac{\partial}{\partial \dot q_1} & \frac{\partial}{\partial \dot q_2} \end{bmatrix}^T} into each equation. Instead, each row of \displaystyle{\vec \partial_2} should match only one of the two equations.

[guess]

— Me@2022-07-07 05:20:38 PM

.

.

2022.07.09 Saturday (c) All rights reserved by ACHK

Schrodinger’s cat, 3.5

This description is wrong.

Quantum superposition is exhibited in fact in many directly observable phenomena, such as interference peaks from an electron wave in a double-slit experiment.

— Wikipedia on Quantum superposition

Whatever you observe, it is not a superposition.

If no left-right detector is allowed, the moving-left/right variable is an unobservable. What you observe, instead, is the dot on the final screen.

In other words, the observable is the final position of a particle when it reaches the final screen. And the final screen itself acts as the detector for that observable.

Superposition is unobservable due to the lack of definition (of the distinction between different states) of the corresponding physical variable, due to the fact that no corresponding detector, such as the left-right detector, is allowed in the experimental design.

physical phenomena

~ observable events

Superposition

~ logically unobservable, since not yet defined

~ not yet defined, since logically undefinable

~ logically undefinable, since no corresponding detector is allowed

A superposition state is not an observable state. In other words, it is not a physical state. Then what is the point of considering it?

Although a superposition state is not a physical state, it is a mathematical state that can be used to calculate the probabilities of different possible physical-states/observable-events.

— Me@2022-07-06 06:00:55 PM

.

.

2022.07.07 Thursday (c) All rights reserved by ACHK

ELEG 1110

ELEG 1110 – Basic Circuit Theory – Assignment 1

Due Date: 27/9/2011 (Tue)

Please submit your assignments in the collection box before the due time.

Please do not send soft copy to Prof. Choy or tutors.

The collection box is located on 3rd floor of Ho Sin Hang building, near room 321.

Please pay attention to submit the assignment to the collection box located at the second row, not the distribution box in the first row.

.

.

2022.07.06 Wednesday ACHK

愛情畢業證書(兩張)

相聚零刻 1.2.3

.

如果愛情是一個朴實的話,那你就一定要,在成熟的時候,[才]去採摘。如果在此之前採摘,那這個果子採下來之後呢,它就不會再成長了;直接爛掉。

— 為什麽遇到喜歡的女生,千萬去表白!

— 楚兒戀愛說

.

實情並非

你原本沒有中學的學問。在頒發中學畢業證書的那一刻,突然集齊中學的知識。

而是相反:

當你的學識達到,準大學的程度時,中學才頒畢業證書。

.

同樣原理,實情並非

你倆原本不是情侶。透過表白,你倆有機會,𣊬間變成情侶。

而是相反:

你倆的感情累積已達到,情侶的階段時,表白可有可無。

表白的目的,不是開始建立愛情,而是確認已知情侶。

表白的作用是,愛情里程碑。

.

正如,旅行時拍照,只是為了作歷史紀錄,而不是「拍照促成旅行」;即使沒有拍照,旅行仍在。

又正如,行李箱用來放行李;即使沒有行李箱,行李仍在,只是不便攜帶。

.

已為情侶之人,確認為情侶的目的是,穩定感情,從而再發展,至最終成夫妻。

沒有打算成夫妻,表白又有何用?

.

愛情的畢業證書,有兩張。第二張是結婚證書。

— Me@2022-07-05 12:18:26 PM

.

.

2022.07.05 Tuesday (c) All rights reserved by ACHK

Quick Calculation 3.10

A First Course in String Theory

.

Equation (3.96) has content: if you move a particle along a closed loop in a static gravitational field, the net work that you do against the gravitational field is zero.

Prove the above statement.

~~~

Eq. (3.96):

\displaystyle{\vec g = - \nabla V_g}

.

By the gradient theorem (aka the fundamental theorem of calculus for line integrals):

\displaystyle{\int _{\gamma }\nabla \varphi (\mathbf {r} )\cdot \mathrm {d} \mathbf {r} =\varphi \left(\mathbf {q} \right)-\varphi \left(\mathbf {p} \right)}

— Me@2022-07-03 04:27:19 PM

.

.

2022.07.03 Sunday (c) All rights reserved by ACHK

Schrodinger’s cat, 3.4

A macroscopic system (such as a cat) may evolve over time into a superposition of classically distinct quantum states (such as “alive” and “dead”).

— Wikipedia on Quantum superposition

.

The components of a superposition must be indistinguishable states.

A superposition is neither an AND state nor an OR state.

AND or OR are only possible for more than one state.

AND or OR are only possible for at least 2 (distinguishable) states.

The cat is not in a superposition state of “alive” and “dead”.

Instead, it is in a mixed state of “alive” and “dead”.

A mixed state is an OR state (of at least 2 distinguishable states).

— Me@2022-07-03 11:02:24 AM

.

.

2022.07.03 Sunday (c) All rights reserved by ACHK

超整理法, 2

兩項重點必須遵守:一是取出用過的檔案不要放回原位,而放進最左邊,如此日復一日,常用的資料集中在左邊,被「推擠」到最右邊的,多半是不常用的資料。二是將同學錄、電話簿、保證書、說明書等要永久或長期保存的資料,放在書架最右邊,標上特別記號。

「野口式推擠建檔」的優點包括,輕鬆隨手地就可以把桌上的資料整理好,不像以前要剪貼、分類,弄得人仰馬翻;最近常用的檔案都集中在左邊,立刻可以找到所需資料,而靠近右邊,比較不常用的資料,可以定期查看,丟掉不用的資料。

— 「超級」整理.超高效率

— 天下雜誌 173 期

— 孫曉萍

.

.

2022.07.02 Saturday ACHK

物理避數學;數學避思考

數學教育 8.1

這段改編自 2010 年 4 月 24 日的對話。

.

科技是一套,避開科學的系統。

科技的存在,是為了讓不懂科學的人,也能享受,科學的成果。

例如,即使你不懂寫程式,也可以使用電腦。

.

科學的起點是物理。物理是一套,避開數學的系統。

物理的存在,是為了讓人在,毋須全懂數學的情況下,也能享受,數學的成果。

例如,在物理科中「簡諧運動」,原本需要懂數學中的「三角學」和「微分方程」,才可以處理得到。但是,在中學的物理教科書中,會教你把「簡諧運動」,看成某個「圓周運動」的投影;那樣,你可以在不太懂,「三角學」和「微分方程」的情況下,獲得那些運算成果。

所以,如果一題物理題目,你竟然需要,大量的數學運算才能完成,有很大機會是,你根本不懂,該題的物理原理,導致沒有工具,去簡化(甚至避開)運算。

.

數學的存在,是為了讓人在,盡量避開思考的情況下,也能享受,思考的成果。

例如,你在學過乘法的定義和原理後,就會背誦乘數表,從而毋須再刻意思考,也可以利用到,乘法的成果。

.

那樣,既然數學是一個「盡量避開思考」的系統,為什麼還要學呢?

完全不學數學,就可以完全避開思考。那不是更好嗎?

.

學過數學思考,才會有能力判斷,哪時需要思考,哪時不需要。

而有時「不需要思考」,正正是因為在那些情況,你知道可以用,哪些內在或外在工具,去避開思考之餘,而獲取成果。

如果你從來未學過乘法,即使給你計數機,你也不會用它來做乘法,因為,你根本不知道,有「乘法」這個數學概念工具。

— Me@2022-07-02 12:02:59 PM

.

.

2022.07.02 Saturday (c) All rights reserved by ACHK