A big scratch on the door

One of Intel’s top executives once told me that he finally understood how things had changed in microprocessor business when someone asked him if he would accept delivery on an expensive new automobile if it was in perfect condition except for a big scratch on the door. After all, the car would deliver the same fuel economy, same performance, same cargo capacity, same expected service lifetime. But no, he paid for a perfect product, and that’s what he expected.

— IEEE Computer

— 2002.07.08

.

.

2022.10.31 Monday ACHK

CENG3430


75% -> vhdl
10% -> ps
15% -> transmission

~~~

EPROM: E = 0
       G = 0
       P = 1

~~~

Maths mid-term:
11/10/2011

.

.

2022.10.31 Monday (c) All rights reserved by ACHK

Euler problem 6.1

— by this meme’s creator

.

(defun range (max &key (min 0) (step 1))
  (loop :for n :from min :below max :by step
    collect n))

(defun sum-1-n (n)
  (/ (* n (+ n 1)) 2))

(defun sum (lst)
  (reduce #'+ lst))

(defun square (x)
  (* x x))

(- (square (sum-1-n 100))
   (sum (mapcar #'square (range 101 :min 1))))

; 25164150

.

— Me@2022-10-29 06:39:07 AM

.

.

2022.10.29 Saturday (c) All rights reserved by ACHK

Ex 1.1: Motion on a Sphere, 2

Functional Differential Geometry

.

The metric for a unit sphere, expressed in colatitude \displaystyle{\theta} and longitude \displaystyle{\phi}, is

\displaystyle{g(u,v) = d\theta(u) d \theta(v) + (\sin \theta)^2 d \phi (u) d \phi (v)}

Compute the Lagrange equations for motion of a free particle on the sphere …

~~~

(define ((L2 mass metric) place velocity)
  (* 1/2
     mass
     ((metric velocity velocity) place)))

(define ((Lc mass metric coordsys) state)
  (let ((x (coordinates state))
        (v (velocities state))
        (e (coordinate-system->vector-basis
            coordsys)))
    ((L2 mass metric)
     ((point coordsys) x) (* e v))))

(define the-metric
  (literal-metric 'g R2-rect))

(define L
  (Lc 'm the-metric R2-rect))

(L (up 't (up 'x 'y) (up 'vx 'vy)))

(show-expression
 (L (up 't (up 'x 'y) (up 'v_x 'v_y))))

.

\displaystyle{g(u,v) = d\theta(u) d \theta(v) + (\sin \theta)^2 d \phi (u) d \phi (v)}

(show-expression
 (L (up 't
    (up 'theta 'phi)
    (up 'thetadot 'phidot))))

.

When \displaystyle{R = 1} and \displaystyle{    [g] = \begin{bmatrix}    1 & 0 \\    0 & (\sin \theta)^2    \end{bmatrix}},

\displaystyle{    \frac{1}{2} m (\sin \theta)^2 \dot \phi^2 + 0     + \frac{1}{2} m \dot \theta^2}

.

.

— Me@2022-10-27 10:30:50 AM

.

.

2022.10.28 Friday (c) All rights reserved by ACHK

Posted in FDG

Coherent light source

superkuh 17 hours ago [–]

Coherence isn’t what you think it is. It is not an “alignment in phase” of the sinusoid, like all the lay diagrams show. It isn’t even being the same frequency. In the early days of quantum physics the light sources were mercury arc lamps (muliple freqs) that achieved coherence by shining through tiny pinholes.

https://web.archive.org/web/20220820182938/http://amasci.com/miscon/coherenc.html

Coherence is being a point source. Stars, except for our sun since it is too close, are coherent light sources.

— Hacker News

.

.

2022.10.27 Thursday ACHK

1920s

Dear men,

If she won’t give you her 20s, don’t give her your 30s and 40s.

— Lovers’ Guide

— guideforlovers

.

Don’t give a woman your prime if she won’t give you hers.

A woman who spends her twenties sleeping around until her biological clock starts ticking isn’t worth a penny.

— ManlyConfidence

.

.

2022.10.26 Wednesday ACHK

Presentation 基本原理 1.2.2.5

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

.

然後第三點會,補充第一點。剛才第一點說,一課應只有一個重點。定義何謂「一點」和何謂「一課」,正正是講者的職責。

第三點就是,宏觀而言,

說話要 in series(串聯),不要 in parallel(並聯)。你要說完一句說話,才開始下一句。你要講完一個 point(要點),才講下一個。

千萬不要企圖,在同一刻時間中,講超過一句說話。亦千萬不要企圖,在同一句說話中,包含超過一個要點(point)。

簡言之,說話要有條理。

— Me@2010.09.05

那就正正為什麼是「條理」,而不是「塊理」。思路是一「條」線,不是一「塊」面。

那就正正為什麼是「思路」,而不是「思面」。思路是一條「路」,不是一塊「面」。

.

那正正是,「安排」這個詞語的意思,把眾多想法要點,安放成一個排列。

情形就好像打字一樣。打字快的原因是,你打完一個英文字母,才打下一個;而不是在同一刻,打超過一個字母。

如果你企圖在同一刻,打超過一個字母,你會打錯字。字母次序錯了的話,時間得不償失。

— Me@2010.09.05

— Me@2022-10-25 02:58:36 PM

.

.

2022.10.26 Wednesday (c) All rights reserved by ACHK

The Sixth Sense, 2.2

Euler problem 5.2 | Folding an infinite list, 2

.

.

f = foldr1 lcm [1..20]

.

.

Most problems on Project Euler can be solved in three ways:

  • with brute-force

  • with an algorithm that solves a more general problem

  • with a smart solution that requires pencil and paper at most

If you’re interested in a nice solution rather than fixing your code, try concentrating on the last approach …

— edited Oct 8, 2016 at 8:57

— huwr

— answered Dec 27, 2011 at 14:33

— Philip

— Stack Overflow

.

.

2022.10.23 Sunday (c) All rights reserved by ACHK

3.3 Electromagnetism in three dimensions

A First Course in String Theory

.

(a) Find the reduced Maxwell equations in three dimensions by starting with Maxwell’s equations and the force law in four dimensions, using the ansatz (3.11), and assuming that no field can depend on the z direction.

~~~

\displaystyle{\begin{aligned}          \nabla \cdot \mathbf {E} &= \rho  \\     \nabla \cdot \mathbf {B} &= 0 \\     \nabla \times \mathbf {E} &= - \frac{1}{c} {\frac {\partial \mathbf {B} }{\partial t}} \\     \nabla \times \mathbf {B} &= \frac{1}{c} \mathbf {J} + \frac{1}{c} {\frac {\partial \mathbf {E} }{\partial t}} \\    \end{aligned}}

.

Eq. (3.11):

\displaystyle{\begin{aligned}          E_z &= 0 \\    B_x &= 0 \\     B_y &= 0 \\     \end{aligned}}

.

\displaystyle{\begin{aligned}          \frac{\partial E_x}{\partial x} + \frac{\partial E_y}{\partial y} &= \rho  \\     \frac{\partial B_z}{\partial z} &= 0 \\     \frac{\partial E_y}{\partial x} - \frac{\partial E_x}{\partial y} &= - \frac{1}{c} {\frac {\partial B_z }{\partial t}} \\     \nabla \times \mathbf {B} &= \frac{1}{c} \mathbf {J} + \frac{1}{c} {\frac {\partial \mathbf {E} }{\partial t}} \\    \end{aligned}}

.

\displaystyle{\begin{aligned}          \frac{\partial B_z }{\partial y} - \frac{\partial B_y }{\partial z} &= \frac{1}{c} j_x + \frac{1}{c} {\frac {\partial E_x }{\partial t}} \\     \frac{\partial B_x }{\partial z} - \frac{\partial B_z }{\partial x} &= \frac{1}{c} j_y + \frac{1}{c} {\frac {\partial E_y }{\partial t}} \\    \frac{\partial B_y }{\partial x} - \frac{\partial B_x }{\partial y} &= \frac{1}{c} j_z + \frac{1}{c} {\frac {\partial E_z }{\partial t}} \\     \end{aligned}}

.

\displaystyle{\begin{aligned}          \frac{\partial B_z }{\partial y} &= \frac{1}{c} j_x + \frac{1}{c} {\frac {\partial E_x }{\partial t}} \\     - \frac{\partial B_z }{\partial x} &= \frac{1}{c} j_y + \frac{1}{c} {\frac {\partial E_y }{\partial t}} \\    \end{aligned}}

.

\displaystyle{\begin{aligned}          \frac{d \vec p}{dt} &= q \left( \vec E + \frac{\vec v}{c} \times \vec B \right) \\    \end{aligned}}

.

\displaystyle{\begin{aligned}          \frac{d p_x}{dt} &= q \left( E_x + \frac{1}{c} (v_y B_z - v_z B_y) \right) \\    \frac{d p_y}{dt} &= q \left( E_y - \frac{1}{c} (v_x B_z - v_z B_x) \right) \\    \frac{d p_z}{dt} &= q \left( E_z + \frac{1}{c} (v_x B_y - v_y B_x) \right) \\    \end{aligned}}

.

\displaystyle{\begin{aligned}          \frac{d p_x}{dt} &= q \left( E_x + \frac{1}{c} v_y B_z \right) \\    \frac{d p_y}{dt} &= q \left( E_y - \frac{1}{c} v_x B_z \right) \\    \frac{d p_z}{dt} &= 0 \\    \end{aligned}}

.

— Me@2022-10-22 04:17:10 PM

.

.

2022.10.22 Saturday (c) All rights reserved by ACHK

Swampland

In physics, the term swampland refers to effective low-energy physical theories which are not compatible with string theory, in contrast to the so-called “string theory landscape” of compatible theories. In other words, the swampland is the set of consistent-looking theories with no consistent ultraviolet completion in string theory.

Developments in string theory suggest that the string theory landscape of false vacua is vast, so it is natural to ask if the landscape is as vast as allowed by consistent-looking effective field theories. Some authors, such as Cumrun Vafa, suggest that is not the case and that the swampland is in fact much larger than the string theory landscape.

— Wikipedia on Swampland (physics)

.

Recall that Vafa’s Swampland is a giant parameter space of effective field theories that cannot be realized within a consistent theory of quantum gravity i.e. within string/M-theory. Only a tiny island inside this Swampland, namely the stringy Landscape, is compatible with quantum gravity. String/M-theory makes lots of very strong predictions – namely that we don’t live in the Swampland. We have to live in the special hospitable Landscape.

— Vafa, quintessence vs Gross, Silverstein

— The Reference Frame

— Luboš Motl

.

.

2022.10.21 Friday ACHK

Euler problem 5.1

1930s, 3

.

— meme creator

.

(defun range (max &key (min 0) (step 1))
  (loop :for n :from min :below max :by step
    collect n))

(defmacro lcm-lst (lst)
  `(apply #'lcm ,lst))

(lcm-lst (range 21 :min 2))

.

— palette fm

— Me@2022-10-17 05:21:23 PM

.

.

2022.10.17 Monday (c) All rights reserved by ACHK

Ex 1.28 Kinetic energy contains terms that are linear

Structure and Interpretation of Classical Mechanics

.

An analogous result holds when the f_\alpha‘s depend explicitly on time.

a. Show that in this case the kinetic energy contains terms that are linear in the generalized velocities.

~~~

\displaystyle{\begin{aligned}    \mathbf{v_\alpha} &= \partial_0 f_\alpha (t,q) + \partial_1 f_\alpha (t,q) v \\   T(t,q,v) &= \frac{1}{2} \sum_\alpha m_\alpha v^2_\alpha \\   v_\alpha &= |\mathbf{v}_\alpha| \\   v &= \text{generalized velocity} \\   \mathbf{v}_\alpha &= \text{rectangular velocity} \\     \end{aligned}}

.

\displaystyle{\begin{aligned}    &T(t,q,v) \\    &= \frac{1}{2} \sum_\alpha m_\alpha |\partial_0 f_\alpha (t,q) + \partial_1 f_\alpha (t,q) v|^2 \\      &= \frac{1}{2} \sum_\alpha m_\alpha       \left \{ [\partial_0 f_\alpha (t,q)]^2 + 2 \partial_0 f_\alpha (t,q) \partial_1 f_\alpha (t,q) v + [\partial_1 f_\alpha (t,q) v]^2 \right \} \\     \end{aligned}}

— Me@2022-10-15 11:17:59 AM

.

.

2022.10.15 Saturday (c) All rights reserved by ACHK

Computing Note

21122002 not mine but quotation

Yet, in principle, computers cannot be asked to discover proofs, except in very restricted areas of mathematics–such as elementary Euclidean geometry–where the set of theorems happens to be recursive, as was proved by Tarski.

… the prime number theorem was first suggested as the result of extensive hand calculations on the prime numbers up to 3,000,000 by the Swiss mathematician Leonhard Euler (1707-83), a process that would have been greatly facilitated by the availability of a modern computer.

Thus Godel was able to assert that the set of theorems of mathematics is recursively enumerable, and, more recently, the American linguist Noam Chomsky (b. 1928) could say that the set of grammatical sentences of a natural language, such as English, is recursively enumerable.

Godel’s incompleteness theorem is that the consistency of mathematics can be proved only in a language which is stronger than the language of mathematics itself. Yet, formalism is not dead- …

— Encyclopædia Britannica

.

.

2022.10.13 Thursday ACHK

眾害取其輕 10.2

The least of all evils, 10.2

這段改編自 2021 年 12 月 15 日的對話。

.

「眾害之最輕」有時可以零,有時不可以零。你只能客觀面對,不能主觀判斷。換句話說,「眾害之最輕」不一定「可以零」,亦不一定「不可以零」。

記住,主觀意願不成理據。任何人在,沒有足夠理據的情況下,認為某事選擇的「眾害之最輕」必為零,或者認為「眾害之最輕」必不為零,都是狂妄;要麼是蠢,要麼是壞,通常又蠢又壞。

.

不可為零的眾害之最輕,簡稱「必要之惡」。

愚善的人往往認為,任何情況下,任何人的任何痛苦,都可以驅除,或應該驅除。他們移除「必要之惡」時,引發「不必要之惡」,帶來更大的痛苦。例如,移除工作之痛,卻換來捱餓之苦。

又例如,任何學問,必有必須背誦的地方。但是,竟然有人提倡「背誦是苦,所以應該只需要理解,而毋須背誦」。我年輕時錯信這點,誤了學業。正確的取向是:

1. 理解後背誦

2. 有用的東西就背

3. 無用的東西就不背

.

愚賤之人的邪惡,則是另一個極端。他們認為,任何情況下,痛苦都無可避免。以「眾害取其輕」為名,把「不必要之惡」標籤為「必要之惡」,讓自己及他人承受著大量,不必要的痛苦。

例如,有一科目的考試,有大量零碎,而沒有用的東西要背誦。我向講師反映時,他卻說:「這科的性質是這樣的。」

我當時心想,這科考試考什麼,其實全由他設計;他有絕對權力,在那科之中,選擇有用的內容來出題。

.

又例如,工作固然是苦,但卻可分成,有用之苦(必要之惡)和無用之苦(額外之惡)。

天作孽猶可恕,自作孽不可活。

辭職的原因往往不是,工作本質困難到,你承受不到;而是上司緣於個人的喜好或誤解,僭建了很多不相干的工序環節。而跟他反映時,他卻會覺得,工作有困難在所難免,年青人不要怕吃苦。

他不知道,那其實並非「必要之苦」,而是他在自製的災難。

— Me@2022-10-11 11:39:33 PM

.

.

2022.10.12 Wednesday (c) All rights reserved by ACHK

Euler problem 4.2

.

Find the largest palindrome made from the product of two 3-digit numbers.

g = [(y, z, y*z) | y<-[100..999], z<-[y..999], f==y*z]
    where
      f = maximum [x | y<-[100..999], z<-[y..999],
                   let x=y*z, let s=show x, s==reverse s]

— based on Haskell offical

.

— Me@2022-10-10 10:09:53 PM

.

.

2022.10.10 Monday (c) All rights reserved by ACHK

Ex 1.1: Motion on a Sphere

Functional Differential Geometry

.

The metric for a unit sphere, expressed in colatitude \displaystyle{\theta} and longitude \displaystyle{\phi}, is

\displaystyle{g(u,v) = d\theta(u) d \theta(v) + (\sin \theta)^2 d \phi (u) d \phi (v)}

Compute the Lagrange equations for motion of a free particle on the sphere and convince yourself that they describe great circles. For example, consider the motion on the equator \displaystyle{\theta = \pi/2} and motion on a line of longitude (\displaystyle{\phi} is constant).

~~~

(define ((Lfree mass) state)
  (* 1/2 mass (square (velocity state))))

(define ((sphere->R3 R) state)
  (let ((q (coordinate state)))
    (let ((theta (ref q 0)) (phi (ref q 1)))
      (up (* R (sin theta) (cos phi))
          (* R (sin theta) (sin phi))
          (* R (cos theta))))))

(define ((F->C F) local)
  (up (time local)
      (F local)
      (+ (((partial 0) F) local)
         (* (((partial 1) F) local)
            (velocity local)))))

(define (Lsphere m R)
  (compose (Lfree m) (F->C (sphere->R3 R))))

(show-expression
 ((Lsphere 'm 'R)
  (up 't
      (up 'theta 'phi)
      (up 'thetadot 'phidot))))

(show-expression
 (((Lagrange-equations
    (Lsphere 'm 'R))
   (up
    (literal-function 'theta)
    (literal-function 'phi)))
  't))

\displaystyle{  \begin{aligned}    - \sin \theta (D \phi)^2 \cos \theta + D^2 \theta &= 0 \\     2 \sin \theta D \theta D \phi \cos \theta + D^2 \phi (\sin \theta)^2 &= 0 \\ \\      D^2 \theta &= (D \phi)^2 \cos \theta \sin \theta \\      D( D \phi (\sin \theta)^2) &= 0 \\ \\    \end{aligned}}

.

So

\displaystyle{  \begin{aligned}    D \phi (\sin \theta)^2 &\equiv C \\ \\    \end{aligned}}

for some constant C.

.

Since \displaystyle{  \begin{aligned}    D \phi (\sin \theta)^2 &= 0 \\ \\    \end{aligned}} for some \theta,

\displaystyle{  \begin{aligned}    D \phi (\sin \theta)^2 &\equiv 0 \\ \\    \end{aligned}}

This is equivalent to setting up the coordinate system such that the initial value of \theta equals zero.

.

Also, since \displaystyle{  \begin{aligned}    (\sin \theta)^2 &\ne 0 \\ \\    \end{aligned}} for some \theta,

\displaystyle{  \begin{aligned}    D \phi &\equiv 0 \\ \\    \end{aligned}}

.

— Me@2022-10-08 04:56:27 PM

.

.

2022.10.09 Sunday (c) All rights reserved by ACHK

Posted in FDG