W!o 的派生‧十日談之《六》

615px-Tupper's_self_referential_formula_plot.svg

300px-MagrittePipe

220px-Droste

{1\over 2} < \left\lfloor \mathrm{mod}\left(\left\lfloor {y \over 17} \right\rfloor 2^{-17 \lfloor x \rfloor - \mathrm{mod}(\lfloor y\rfloor, 17)},2\right)\right\rfloor

二零零一年加拿大傑夫‧塔珀 Jeff Tupper 所發現的自指公式,它的二維『函數圖像』,與數學的『公式外觀』相仿。

一九二九年比利時畫家雷內‧弗朗索瓦‧吉蘭‧馬格利特 René François Ghislain Magritte  名作《形象的叛逆》The Treachery of Images 上用法文寫著 『你看到的不是煙斗』。

一九零四年荷蘭著名品牌德羅斯特 Droste 所販售的可可粉之包裝盒上的圖片是一位護士拿著一個上有杯子及紙盒的托盤,托盤裡的杯子和紙盒上之圖案也就是這張圖片。

不過『自我指涉』可能會產生『矛盾』,『遞迴』也許將陷入『無窮循環』,然而它們的『魅力』卻是歷久彌新!!

如果說『雷公』遇到『電母』 ── 就像『 Mr. & Mrs. Smith 』執行任務 ── ,那在『可以換頭』的倒數時刻,也許離『科學怪人』之出現不遠的吧。

磁鐵

看見磁力線

抽象』的概念雖然『無象』可以用來作『想象』,就如同前面談到過的『思想實驗』一樣,還是可以建造『情境』方便『觀相』的。假使說『思考』是根『概念磁鐵』,那麼『思維』就是『磁力線』。從『創造發想』的『發散處』出發,抵達『清晰自恰』之『收斂點』。因此『磁力線』的『封閉性』也可比喻成『思維』是『自我遞迴』的了。這樣或許『思考』在『』與『』的方面能夠成為『自行車』之『雙輪』,而這個『操控』之人也逐漸地步上了『收發自如』的道路。

我喃喃自語說︰我做了一個夢。在那夢中我做了一個夢,我喃喃自語說︰我做了一個夢。宛如我置身『鏡廊』一面『鏡子』前,我見着了『鏡裡』的我置身『鏡廊』一面『鏡子』前,… \infty

俄羅斯娃哇是『有趣的』事物,雖然只有『有限』的幾個『迭套』,它卻是『象徵』一個『不思議』的『奧秘』。其實『遞迴』Recursion 與『疊代』 Iteration 兩個概念,彼此間有著很深刻的『聯繫』。

View of the restored paintings of the Ha

俄羅斯娃哇

人類能夠『獨立思考』嗎?人們講︰因為他『如此說』,所以我『這般信』,難到這果是『合理』的嗎??還是這真的『不合裡』的呢???就像有人探討後認為︰『差異』在『關鍵處』!也在『對的人』!!於是『問題』變成了是否『相信』了『對的人』,且在『事物』之『關鍵處』着力,就『這樣』……『決定』了……是否從此以後都能過著『自主判斷』的日子的了!!!

220px-Louvre_identifiers_Ma1274-MR242

羅浮宮雕塑背後的標識符

一個『標識符』 ID identifier

能有多少好說之事,需要如是的陣仗?假使你已發現『身份證』比『你自己』更能『證明』你是誰!各種『號碼』效用之大,可以『轉帳購物』,你才剛知道『不變』 Immutable 之『物件』 object 要比『可變』 mutable 的『你』更『安全』『可靠』的哩!!不要『懷疑』,即使那些『號碼』因『你』而『有』,在『電腦語言』裡,他們可是『第一類公民』 First-class value ,享有第一等的『價值』??

雖然有時令人『千迴百轉』的想不通?是『機器』服務於『』,還是『』符合『機器』的『處理』?!

或許那個『鄭三絕』能讓人們『回回神』的吧!『鄭板橋』固因『詩書畫』稱『三絕』,他傳聞軼事『也絕』︰

『絕對』難能卻『對』,
『絕句』自可斷『句』,
『絕情』反倒多『情』。

鄭板橋‧竹

竹本【笨】虛心是我師

 

鄭板橋‧【一聯千金

龍虎山中真宰相

麒麟閣上活神仙

 

難得糊塗

難得糊塗

 

鄭縣令‧【崇仁‧大悲】寺‧庵之戀

硃筆一批

一半葫蘆一半瓢,合來一處好成桃;
徒令人定風歸寂,此後敲門月影遙:
鳥性悅時空即色,蓮花落處靜偏嬌;
是誰勾卻風流案,記取當年鄭板橋。

 

派生』 python 的『標識符』,2.X 的『版本』如

Python Basic Syntax 》教程裡所言︰

Python Identifiers:

Python identifier is a name used to identify a variable, function, class, module or other object. An identifier starts with a letter A to Z or a to z or an underscore (_) followed by zero or more letters, underscores and digits (0 to 9).

Python does not allow punctuation characters such as @, and % within identifiers. Python is a case sensitive programming language. Thus, Manpower and manpower are two different identifiers in Python.</span>  <span style="color: #808080;">Here are following identifier <span style="color: #cc99ff;"><strong>naming convention</strong></span> for Python:</span>  <span style="color: #808080;">‧Class names start with an uppercase letter and all other identifiers with a lowercase letter.</span>  <span style="color: #808080;">‧Starting an identifier with a single leading underscore indicates by convention that the identifier is meant to be private.</span>  <span style="color: #808080;">‧Starting an identifier with two leading underscores indicates a strongly private identifier.</span>  <span style="color: #808080;">‧If the identifier also ends with two trailing underscores, the identifier is a language-defined special name.</span>  然而從 Python 3.0 開始,『<strong>派生</strong>』已經支持『<strong><a href="https://docs.python.org/3/reference/lexical_analysis.html#identifiers">萬國碼</a></strong>』 Unicode 的『<strong>標識符</strong>』,這意味著︰ <pre class="lang:sh decode:true "># 可以使用中文『標識符』 >>> 甲=7 >>> 乙=甲*甲-3*甲+2 >>> 甲;乙 7 30 >>></pre> 。 <span style="color: #ff99cc;">『<strong>派生</strong>』之『<strong>標識符</strong>』是個『<strong>標籤</strong>』『<strong>索引</strong>』,『<strong>功用</strong>』在於『<strong>指稱</strong>』『<strong>標示</strong>』物件,不具有任何『型別』,以其所『<strong>綁定</strong>』 <span style="color: #cc99ff;"><strong><a href="http://stackoverflow.com/questions/9073995/difference-between-mutation-rebinding-copying-value-and-assignment-operator"><span style="color: #cc99ff;">binding</span></a></strong></span> 的『<strong>物件型別</strong>』為『<strong>型別</strong>』。也就是說,人們只是藉著『<strong>標識符</strong>』來操作其『<strong>所指</strong>』之『<strong>物件</strong>』。</span>  讀者可以嘗試用著  <span style="color: #808000;"><strong>id(...)</strong></span> <span style="color: #808000;"><strong> id(object) -> integer</strong></span>  <span style="color: #808000;"><span style="color: #ff9900;"><strong>Return the identity of an object.</strong> </span>This is guaranteed to be unique among simultaneously existing objects. (<span style="color: #cc99ff;">Hint: it's the object's memory address.</span>)</span>  ,了解所謂的『<span style="color: #cc99ff;"><strong>純標籤</strong></span>』之意︰ <pre class="lang:sh decode:true">pi@raspberrypi ~ python3
Python 3.2.3 (default, Mar 1 2013, 11:53:50)
[GCC 4.6.3] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.

# 『標籤』自身沒有『型別』 type ,以『指稱』物件為『型別』
>>> x=5
>>> type(x);type(5)
<class ‘int’>
<class ‘int’>
>>>

# 『不可變』物件 id
>>> m=3
>>> id(m);id(3)
2965620
2965620
>>> n=m
>>> id(n);id(m);id(3)
2965620
2965620
2965620
>>> m=m-1
>>> id(m);id(n);id(2);id(3)
2965604
2965620
2965604
2965620
>>> m=m-1
>>> id(m);id(n);id(1);id(2);id(3)
2965588
2965620
2965588
2965604
2965620
>>>

『可變』物件 id
>>> l=[1,2,3]
>>> id(l);id([1,2,3])
1990071160
1990071840
>>> t=l
>>> t;id(t);l;id(l)
[1, 2, 3]
1990071160
[1, 2, 3]
1990071160
>>> l=l+[4]
>>> t;id(t);l;id(l)
[1, 2, 3]
1990071160
[1, 2, 3, 4]
1990073480

>>> l=[1,2,3]
>>> t=l
>>> l[0]=0
>>> t;id(t);l;id(l)
[0, 2, 3]
1990071840
[0, 2, 3]
1990071840
>>>