Functional programming 6.3

Just because a functional language is functional ([maybe] even completely pure like Haskell!), it doesn’t mean that programs written in that language must be pure when [run].

Haskell’s approach, for example, when dealing with side-effects, can be explained rather simply: Let the whole program itself be pure (meaning that functions always return the same values for the same arguments and don’t have any side effect), but let the return value of the main function be an action that can be [run].

— answered Dec 6 ’11 at 21:32, dflemstr

— Stack Overflow

2013.09.03 Tuesday ACHK

Bank account

緬懷過去 2 | Cumulative concept of time, 16

For a bank account, the past balances are irrelevant and useless. 

What is really relevant is the present balance.

And it has encrypted all the past money that can still be used now. 

— Me@2011.04.25

對於一個銀行户口而言,過往的結餘數字是沒有意義的。真正有意思的是,現在的結餘。

你曾經擁有過的金錢之中,有些已經失去,有仍然擁有。你過去的金錢之中,現在還可以動用的,都已經全部反映在,「現在結餘」那數字之中。所以,「過去結餘」的那堆數字,參考價值不大,不宜多想。

過多的「緬懷過去」,影響身心健康。

— Me@2013.09.03

2013.09.03 Tuesday (c) All rights reserved by ACHK

無限倍 1.2

身輕如燕 1.8 | 試前暑假 3.3

這段改編自 2010 年 7 月 20 日的對話。

萬事起頭難。最難的一步,往往是開始執行大計時的那一步。相反,起頭萬事易。開始了以後,要持續執行往後的步驟,反而沒有那麼困難。

所以,如果你可以在中七(中學的最後一個學年),開學前的那個暑假,先行開始執行你的「past paper 大計」,先行完成數份 past paper(歷屆試題)的話,你的進度就已經是,一般人的一千萬倍。

— Me@2013.09.03

2013.09.03 Tuesday (c) All rights reserved by ACHK

Lessons from the Light, 5

Time’s arrow is due to that the macroscopic observers keep losing the microscopic information about the physical systems.

For simplicity, we consider only classical systems now.

Microscopically, there is no time arrow, because for any two times, t1 and t2, their states have one-one correspondence. In other words, once we know the exact state of a physical system at time t1, we also know the exact state of the system at time t2, and vice versa.

This feature of time may be corresponding to a NDE feature that a dying person moving towards the end of the white tunnel will feel that all the past, present, and future collapse to one point. Some people call that point “the Eternal Now”.

— Me@2013-08-26 6:12 PM

2013.09.02 Monday (c) All rights reserved by ACHK

量子力學 1.7

因果律 1.12 | Verification principle, 5.12

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

即使掌握了一個「量子物理系統」,運作時的所有資料,「隨機性」仍然存在。而這種「量子隨機性」,是來自該個物理系統的「環境」。

這個講法有可能是正確的。但問題是,什麼為之「環境」呢? 

一個物理系統的「環境」,廣義是指「其他東西」,即是「整個宇宙」;狹義是指「周圍附近的東西」。

方便起見,以下我把我們正在討論的假想量子物理系統,簡稱為「甲」;甲的環境,就簡稱為「乙」;「乙」的環境,則簡稱為「丙」;如此類推。

理論上,只要準確預測「環境乙」的演化,物理學家就能準確預測,該個物理系統本身(甲)的演化,把原本的「量子隨機性」排除。

但是,如果你要準確預測「乙」的演化,就相當於要把「乙」的「量子隨機性」排除。換句話說,你要先行準確預測「乙的環境」,即是「丙」的演化。同理,想要了解「丙」,又要先行了解「丁」。如此類推的話,最終你也要牽連「整個宇宙」,才可以完全排除,物理系統「甲」的「量子隨機性」。

無論你所指的「環境」是廣義還是狹義,你也會「牽一髮而動全宇宙」。

— Me@2013.09.02

2013.09.02 Monday (c) All rights reserved by ACHK

Juan Maldacena 2

What is the difference between 10 and 11?

The simplest string theory is ten dimensional. Strings can interact with each other. If the interaction among strings is large, the theory is hard to describe. It turns out that when strings interact very, very strongly, something surprising happens. A new dimension opens up and we have a theory in eleven dimensions, the ten we started with plus an extra circle. In eleven dimensions we do not have strings, we have membranes. Membranes wrapped along the 11th dimension give rise to strings.

— Who’s Counting? Is it 10 or 11? (dimensions, that is — M Theory is making me Manic!)

— Prof. Juan Maldacena

— Institute for Advanced Study

2013.09.01 Sunday ACHK

無限倍

身輕如燕 1.7 | 試前暑假 3.2

這段改編自 2010 年 7 月 20 日的對話。

你要每一科也維持,一個恰當的進度。大概而言,你在這個暑假之中,如果每科每星期完成到,一份一年的 past paper(歷屆試題),就已經十分理想。

試想想,即使你「計時間、計分數」,去完成某一年的 past paper,只需要用六個小時,你還要為自己批改和做改正。遇到不懂改正的地方,更要抽時間去問老師或者同學。然後,你又要把學到的內容和技巧,歸納壓縮至你該科的「魔法筆記」之中。再考慮「你有幾科要兼顧」這個因素的話,你要發現,「每科每星期完成一份 past paper」這簡單的目標,其實並不容易達到。

假設你原本打算這一科在暑假之中,可以完成到六份試題;而結果只完成了三份。即使那樣的大失預算,你仍然遠遠優勝過,其他大部分的同學。大部分人的問題是,他們時常企圖先「溫完書」,才開始做 past paper。結果是,一份也沒有做。

你雖然只完成了三份,但是別人卻完成了零份。你試想想,你的工作成果,是別人的多少倍?

— Me@2013.09.01

2013.09.01 Sunday (c) All rights reserved by ACHK