Ken Chan 時光機 1.4.1

迷宮直昇機 5.1

.

至於第三個技巧,則實在是最宏觀,亦可能是最重要。

Ken Chan 說:「你們現在會盤算,在會考中,各科太概會有什麼目標,奪取什麼等級的成績。但是,我當年全部科目,只有一個目標,就是要『攞 full』」。

那就即是要,全部科目中的每一科,不只要甲等,而是要滿分;因為在當年,如果可以在全部科目奪得滿分,考生會獲頒一張特別證書。他那時就為了,那張證書而努力。

但是,那是如何辦到的呢?

考生在中五時參加「會考」,中七時參加「高考」。所以,正常的學校,會在中四和中五的校內考試測驗中,考核會考課程。

但是,他的學校不正常——在中四和中五的校內考試測驗中,不斷地考核高考課程。所以,他在中四時代開始,已經要鑽研,高考程度和大學程度的物理。

結果,到真正會考時,由於「只會」考核中五程度的東西,他會突然覺得十分容易。

— Me@2018-11-18 10:06:43 PM

.

.

2018.11.18 Sunday (c) All rights reserved by ACHK

defmacro, 2

Defining the defmacro function using only LISP primitives?

.

McCarthy’s Elementary S-functions and predicates were

atom, eq, car, cdr, cons

.

He then went on to add to his basic notation, to enable writing what he called S-functions:

quote, cond, lambda, label

.

On that basis, we’ll call these “the LISP primitives”…

How would you define the defmacro function using only these primitives in the LISP of your choice?

edited Aug 21 ’10 at 2:47
Isaac

asked Aug 21 ’10 at 2:02
hawkeye

.

Every macro in Lisp is just a symbol bound to a lambda with a little flag set somewhere, somehow, that eval checks and that, if set, causes eval to call the lambda at macro expansion time and substitute the form with its return value. If you look at the defmacro macro itself, you can see that all it’s doing is rearranging things so you get a def of a var to have a fn as its value, and then a call to .setMacro on that var, just like core.clj is doing on defmacro itself, manually, since it doesn’t have defmacro to use to define defmacro yet.

– dreish Aug 22 ’10 at 1:40

.

.

2018.11.17 Saturday (c) All rights reserved by ACHK

Problem 14.5c

Counting states in heterotic SO(32) string theory | A First Course in String Theory

.

At any mass level \displaystyle{\alpha' M^2 = 4k} of the heterotic string, the spacetime bosons are obtained by “tensoring” all the left states (NS’+ and R’+) with \displaystyle{\alpha' M_L^2 = k} with the right-moving NS+ states with \displaystyle{\alpha' M_R^2 = k}.

~~~

In heterotic (closed) string theory, there are left-moving part and right-moving part. Then, what is the meaning of “at any mass level \displaystyle{\alpha' M^2 = 4k} of the heterotic string”?

— Me@2018-11-11 03:44:18 PM

.

Type IIA/B closed superstrings

p.322

In closed superstring theories spacetime bosons arise from the (NS, NS) sector and also from the (R, R) sector, since this sector is “doubly” fermionic. The spacetime fermions arise from the (NS, R) and (R, NS) sectors.

p.322

\displaystyle{\alpha' M_L^2 = \alpha' M_R^2}

\displaystyle{\frac{1}{2} \alpha' M^2 = \alpha' M_L^2 + \alpha' M_R^2}

\displaystyle{\alpha' M^2 = 2 \left( \alpha' M_L^2 + \alpha' M_R^2 \right) = 4 \alpha' M_L^2}

These are the reasons that any mass level of the heterotic string is always in the form \displaystyle{\alpha' M^2 = 4k}.

— Me@2018-11-12 03:09:11 PM

.

Equation (14.77):

p.322

closed string sectors: (NS, NS), (NS, R), (R, NS), (R, R)

\text{type IIA}:~~~(NS+, NS+), ~(NS+, R+),~ (R-, NS+), ~ (R-, R+)

\text{type IIB}:~~~(NS+, NS+), ~(NS+, R-),~ (R-, NS+), ~ (R-, R-)

What is the difference between Type IIA/B closed superstrings and heterotic SO(32) strings?

— Me@2018-11-12 03:15:46 PM

.

The five consistent superstring theories are:

d_2018_11_15__09_36_16_am_

  • The type I string has one supersymmetry in the ten-dimensional sense (16 supercharges). This theory is special in the sense that it is based on unoriented open and closed strings, while the rest are based on oriented closed strings.
  • The type II string theories have two supersymmetries in the ten-dimensional sense (32 supercharges). There are actually two kinds of type II strings called type IIA and type IIB. They differ mainly in the fact that the IIA theory is non-chiral (parity conserving) while the IIB theory is chiral (parity violating).
  • The heterotic string theories are based on a peculiar hybrid of a type I superstring and a bosonic string. There are two kinds of heterotic strings differing in their ten-dimensional gauge groups: the heterotic E8×E8 string and the heterotic SO(32) string. (The name heterotic SO(32) is slightly inaccurate since among the SO(32) Lie groups, string theory singles out a quotient Spin(32)/Z2 that is not equivalent to SO(32).)

— Wikipedia on Superstring theory

.

.

2018.11.15 Thursday (c) All rights reserved by ACHK

Detecting a photon

In the double-slit experiments, how to detect a photon without destroying it?

— Me@2018-11-10 08:07:29 PM

.

Artlav: I’ve been thinking about the double slit experiment – the one with single photons going thru two slits forming an interference pattern never the less. Now, one thing i was unable to find clarification for is the claim that placing a detector even in just one of the slits to find out thru which slit a photon passed will result in the disappearance of the interference pattern. The question is – how does such detector work? How can one detect a photon without destroying it?

Cthugha (Science Advisor): Well, in the kind of experiment you describe, the photon will usually be destroyed by detecting it. However, in some cases it is possible to detect photons without destroying them. Usually one uses some resonator, for example some cavity, in which photons go back and forth and prepare some atom in a very well defined spin state. Now the atom falls through the cavity perpendicular to the photons moving back and forth and the spin state of the atom after leaving the cavity will depend on the number of photons because the spin precession will be a bit faster in presence of photons. If you do this several times, you will get a nondestructive photon number measurement. However, these are so called weak measurements, so this means you do not change the photon states if you are in a photon number eigenstate already. The first measurement however might change the photon state from some undefined state to a photon number eigenstate.

Reference: physicsforums double-slit-experiment-counter.274914

.

.

2018.11.10 Saturday ACHK

凌晨舊戲 2.2

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

.

繼而,甲版本的瀕死經驗,可信度亦會高一些;因為,如果甲所講述的「境界極高道理」,其實是他自己的創作的話,一般而言,他並沒有動機,去把功勞賦予一個,虛構的瀕死經驗。

(問:但是,道理又怎樣為之「境界極高」呢?)

這個問題,跟前一個問題性質一樣,所以,答案跟前一個答案相若,都是用「好樹結好果」這個大原則。

能結出好果的,就為之「好樹」。能治療(或舒緩)病患的,就為之「好醫生」。

同理,如果一個建議,或者個觀點,能大大改善,讀者的心靈世界,甚至實際生活的話,那就為之「境界極高道理」。

(以下的「瀕死經驗者」,是「自稱經歷瀕死經驗人仕」的簡稱。同理,「瀕死經驗後」,是「所宣稱的瀕死經驗後」的縮寫。)

有部分瀕死經驗者,在瀕死經驗後,性格太幅度地改善,道德超常地提升。那樣,他口中的道理,可信度自然甚高。

(問:那樣,你又如何呢?

雖然,你未曾有過瀕死經歷,但是,你有閱讀過,所謂由瀕死經歷中,領悟到的道理。你有沒有嘗試,應用過它們?結果是「好果」?還是「壞果」?)

有部分是好果,受用無窮。但是,不幸地,亦有部分是壞果,受害無窮。那就是為什麼,我剛才再三強調,

如果你閱讀那些文章的話,要小心一點,因為那類文章良莠不齊——當中有些文章發人深省,有些則謊話連篇。

(問:那樣,你又可否舉例,哪些是帶來「好果」的真道理,而哪些卻是帶在「壞果」的假道理?)

不太可以,因為,沒有足夠的上文下理,個別道理說出來,很容易造成誤解。但是,要有足夠的上文下理的話,除了此刻需要,長篇大論外,聽者的人生閱歷,不能太少。

(問:即是話,要足夠老?)

可以這樣說。但是,我可以給你一個大方向。

年輕人,很容易以為,動聽的(所謂)道理,就是真確的道理。

只要你能夠提防這種錯覺,你就已經可以,避免大量的錯誤。

— Me@2018-11-08 11:24:23 AM

.

.

2018.11.08 Thursday (c) All rights reserved by ACHK

defmacro

SLIME, 2

.

Alt + Up/Down

Switch between the editor and the REPL

— Me@2018-11-07 05:57:54 AM

~~~

defmacro

.


(defmacro our-expander (name) `(get ,name 'expander))

(defmacro our-defmacro (name parms &body body)
  (let ((g (gensym)))
    `(progn
       (setf (our-expander ',name)
	     #'(lambda (,g)
		 (block ,name
		   (destructuring-bind ,parms (cdr ,g)
		     ,@body))))
       ',name)))

(defun our-macroexpand-1 (expr)
  (if (and (consp expr) (our-expander (car expr)))
      (funcall (our-expander (car expr)) expr)
      expr))

.

A formal description of what macros do would be long and confusing. Experienced programmers do not carry such a description in their heads anyway. It’s more convenient to remember what defmacro does by imagining how it would be defined.

The definition in Figure 7.6 gives a fairly accurate impression of what macros do, but like any sketch it is incomplete. It wouldn’t handle the &whole keyword properly. And what defmacro really stores as the macro-function of its first argument is a function of two arguments: the macro call, and the lexical environment in which it occurs.

— p.95

— A MODEL OF MACROS

— On Lisp

— Paul Graham

.


(our-defmacro sq (x)
  `(* ,x ,x))

After using our-defmacro to define the macro sq, if we use it directly,


(sq 2)

we will get an error.

The function COMMON-LISP-USER::SQ is undefined.
[Condition of type UNDEFINED-FUNCTION]

Instead, we should use (eval (our-macroexpand-1 ':


(eval (our-macroexpand-1 '(sq 2)))

— Me@2018-11-07 02:12:47 PM

.

.

2018.11.07 Wednesday (c) All rights reserved by ACHK

Problem 14.5b2

Counting states in heterotic SO(32) string theory | A First Course in String Theory

.

(b) … Keep only states with \displaystyle{(-1)^{F_L}=+1}; this defines the left R’+ sector.

Write explicitly and count the states we keep for the two lowest mass levels, indicating the corresponding values of \displaystyle{\alpha' M_L^2}. [This is a shorter list.]

~~~

— This answer is my guess. —

\displaystyle{ \begin{aligned} \alpha' M_L^2 &= 1 + \sum_{n \in \mathbf{Z}^+} \left( \bar \alpha_{-n}^I \bar \alpha_{n}^I + n \lambda_{-n}^A \lambda_{n}^A \right) \\ \end{aligned}}

If we define N^\perp in a way similar to equation (14.37), we have

\displaystyle{ \begin{aligned} \alpha' M_L^2 &= 1 + N^\perp \\ \end{aligned}}

.

\displaystyle{\begin{aligned}  (-1)^{F_L} |R_\alpha \rangle_L &= + |R_\alpha \rangle_L \\  (-1)^{F_L} |R_\alpha \rangle_R &= - |R_\alpha \rangle_L \\ \end{aligned}}

.

\displaystyle{\begin{aligned}  \alpha'M^2=1,~~~&N^\perp = 0:~~~~~&|R_\alpha \rangle_L \\  \alpha'M^2=2,~~~&N^\perp = 1:~~~~~&\alpha_{-1} |R_\alpha \rangle_L, \lambda_{-1} |R_\alpha \rangle_R \\  \end{aligned}}

— This answer is my guess. —

— Me@2018-11-06 03:39:15 PM

.

.

2018.11.06 Tuesday (c) All rights reserved by ACHK

Monty Hall problem 1.6

Sasha Volokh (2015) wrote that “any explanation that says something like ‘the probability of door 1 was 1/3, and nothing can change that…’ is automatically fishy: probabilities are expressions of our ignorance about the world, and new information can change the extent of our ignorance.”

— Wikipedia on Monty Hall problem

.

.

2018.11.02 Friday ACHK

講道理 

情緒病 2 | 不思考之道 6

.

年紀漸長,我越來越覺得「(太)喜歡講道理」,或者「(太)喜歡聽道理」,是一種情緒病。

— Me@2012.02.14

.

.

2018.11.01 Thursday (c) All rights reserved by ACHK

Posted in OCD