Tuesday, October 4, 2022

Intentions

Either intentions exist, in which case they are inferred from actions.

Or they don't, and we're just imagining them.


So the question of "why did the chicken cross the road?" really is "because it wanted to". Or more comprehensively, "because it wanted to, and preferred all the (expected?) consequences of doing so".

We can highlight one of the consequences to form a narrative, but the truth is more boring than that.

先見



唔知其他人有冇嗰種「一遇到命運注定嘅嘢,就會忘記其他嘅一切去追逐」嘅感覺。

佢哋係「睇」唔到,定係決定無視?

而家人生最重要嘅嘢都係當日「見到」某個未來,然後出盡全力爭取返嚟。

但我已經好幾年冇試過清楚咁「見到」自己應該行啲咩路。

又或者其實我都係一早就「見到」,只不過係唔敢去做。





Thursday, September 15, 2022

投資

最近無聊起嚟拎起 Ben Graham 本 The Intelligent Investor 嚟睇。

Ben Graham 係專業嘅資產管理者,佢話用佢啲方法投資,可能會比市場贏多幾個巴仙,講緊嘅係好大筆數入面好穩陣咁比一般人賺多啲,當然係好勁。

但,我望返自己,甚至大部份人,其實每年多幾個巴仙係咪真係差咁遠?用返傳統財金佬𠱁人買基金嘅講法就係,啲錢越滾越大(compound interest),十幾廿年後就會好大分別。呢個固然係事實,但相對於人生大部份嘅決定,呢啲單位數%嘅影響,好多時係微乎其微。

人生最大嘅投資,通常都唔係錢,而係生活裡面佔最重要比重嘅嘢。細個就係學業、朋友;大個就加埋事業、婚姻。點解我感慨到要開個 post 特登講,就係啲金融才俊九牛二虎之力又 diversification 又剩,先賺多幾%,但正常人生活最重要嘅決定,幾乎全部都係(被迫) all-in 嘅。學業 all-in,最多咪讀個 double degree?工通常都係每份工做幾年以上,唔會同時做幾份;婚姻更加係冇得唔 all-in,預計綑綁成世。(香港人多樣嘢:買樓都係成副身家 all-in)以上幾樣嘢,每一樣都影響緊你人生包括身家總值唔只幾個%,但好少人會純粹用金錢回報計數。冇夢想同條咸魚冇分別?係都要講咩個人興趣呀、愛情呀,懶係冇咁俗氣。

對於大部份人嚟講,你揀嘅工作、行業、公司、老闆, 對你嘅收入嘅影響先至係最大;而你揀嘅伴侶同朋友,對你嘅支出嘅影響先至係最大。如果你連最大嗰條數都唔係咁 care 金錢回報率,例如娶個老婆返嚟有 30% 機會廿年後身家俾佢分走咗一半,或者拒絕咗個二世祖追求同個窮撚結婚 opportunity cost 三千萬,咁結婚之後你走去買個儲蓄保險,佢同你講最高年回報有 3% 定 4% 其實係咪真係咁大分別呢?

所以某程度上,Ben Graham 徒弟 Warren Buffet 推薦嘅投資方法可能更加切合普羅大眾嘅實況:搵啲值得投資嘅嘢,all in,長揸。而「值得投資」嘅嘢唔多,一世人可能得幾次機會,要好好珍惜。


Sunday, September 11, 2022

Beliefs

Given a subjective interpretation of reality, can we show that some beliefs cannot be identified as encodings in physical reality?

My gut feeling is that the answer is likely yes, and even if the answer is not as interesting as I thought it would be, the process of exploring it would yield interesting results.

For example, if we had a machine that, somehow purported to accurately decipher your brain neurons and tell you what you (objectively) believed, what would it be like?

Perhaps there would be instances in which the machine would claim you believed in X, but you actually believe you honestly believe in Y. Assuming the machine is really reliable due to some physical law or whatever... is this possible to have a belief that isn't encoded in physical reality, something that the machine cannot detect or will contradict you? This might be a parallel with free will vs determinism, in the objective interpretation of reality the two might not be that different, but in the subjective interpretation, beliefs seem to have more power than mere "will".

Perhaps it is useful to imagine something slightly different -- a machine that can tell you what color you perceive. It doesn't do so by just asserting the colors it displays on the screen, but rather, in addition to displaying colors on the screen, probe into your brain to try to figure out which neurons are firing. Is it possible for such a machine to misreport what you perceive?

This goes back to the question of whether we perceive the color "red" in the same way. While most people (those without a colorblind situation) can usually agree whether an object is objectively "red", there seems to be nothing physical that ensures one's perception of "red" is the same as another's. What if there is the same thing for belief?

Another funny thing about the a "belief probe" is that it might actually be able to probe the brain for "beliefs", and might actually be accurate in doing so for the overall person. But if it were only one belief, it might still not be able to accurately probe the subjective beliefs within a person. What if multiple "consciousnesses", with conflicting beliefs, were within the same physical body (as in the case of multiple personality disorders).  The "tsundere" factor might also come into play, where while the probe might accurately predict behaviors, the subjective consciousness might dismiss it as superficial, because thoughts might not necessarily translate to concrete action. Is it necessary for a mere subjective feeling to always have a physical basis?

There is also the issue of meta beliefs, i.e. "belief of belief of belief ... ". Do they complicate the picture? I don't know.

It feels as if sorting this out properly could make way for identifying room that metaphysical entities might theoretically reside, if they exist.

Saturday, September 10, 2022

舊酒新瓶

本身我唔係好跟時事,舊年 NFT 熱潮推到癲瘋嗰陣,有朋友問起,我先臨急抱佛腳走去望咗兩望究竟係咩嚟。NFT 技術上大概係乜我就有少少頭緒,不過實際上點解會有人肯為咗個 token 俾成千上萬,我就一直都唔明。雖則話 crypto 嗰排水浸,有班暴發戶亂咁揈錢,但我心諗都未至於解釋得晒成個熱潮嘛?

直至最近,諗起傳統 fine art 市場。


原來又係舊酒新瓶。

點解一幅「名畫」可以值幾百萬?本身搵個畫師臨摹,貴極都唔使嗰個價,隨時搵個夠撩倒嘅,一千幾百有找。啲「名畫」嘅價值其實都唔係在於藝術品實物,而係作品背後嘅「故事」。咩「X畫家唯一傳世真跡」、「Y畫家臨終時最後作品」,呢啲喺外人眼中都係虛無縹緲嘅嘢,支撐咗啲「名畫」大部份嘅「價值」。大家都相信佢好值好貴,所以就值好貴。

睇返呢啲吹水嘢,同 NFT 比較,真係完全冇分別。

至於 NFT 係咪呃人,就好似我畫張圖,我話佢賣一千蚊,咁係咪呃你?


《勇者打怪圖》筆者畫


都係願者上釣㗎啫。

如果我話「遲啲市價會更貴,有人會用一萬蚊買㗎」咁就真係呃鳩你喇。

Thursday, September 8, 2022

「教主」

好似啱啱出咗 https://stevejobsarchive.com/

我 2010 年入公司,嗰陣佢已經係*唔知乜*末期,已將大部份工作交咗俾 Tim Apple。Tim 處事四平八穩,聽聞以前死鬼老細啲 all hands meeting 多啲有趣嘢聽 (同埋以前公司細啲,人少少冇咁拘謹)。冇機會見識,回想返都幾可惜。

第一次同佢有比較深刻嘅接觸,已經係公司為佢舉辦嘅紀念活動。(一時搵唔到官方嘅嘢,可能刪咗?老翻片喺度 https://www.youtube.com/watch?v=ApnZTL-AspQ )本身我對佢冇咩認知,見坊間啲人對佢評價兩極,覺得好不可思議。由於同我有比較切身關係,偶然都會留意下或自己搵下資料睇下係咩一回事。

所以就有早幾個月嘅體會。死鬼老細最出名係做蘋果同Pixar CEO,不過以打機嘅「職階」計算,佢應該歸類為「先知」。睇返佢以前嘅訪問,睇得出佢收收埋埋啲學識都好得人驚。正所謂「愛就係選擇」,佢只不過選擇咗搞 consumer electronics 咁解。

可能佢唔係一種好傳統「先知」嘅款,但以(我認為)最重要嘅元素嚟計,佢又的確齊齊哋。其實「先知」可以以各種式形出現,喺美國資本主義社會,改變人類對科技同營商手法嘅信仰,未嘗唔係一種有效嘅「傳道」手法。

或者佢花佢幾乎整個人生走去設計個人電子產品,真係押啱咗注。想像下地球上俾得起錢嘅人,有一半係用緊佢整出嚟嘅產品,呢種影響力其實仲勁過各大宗教。或者你可能會問:唔係喎以前 windows 咪壟斷得仲犀利? (但 windows 冇靈魂嘛)

Sunday, August 21, 2022

玩 AI 製圖,玩咗個幾星期

早前喺 HN 見到關於 DALL-E 嘅 blog post,講用 AI 製圖擺囉個 blog 度。咁啱(?)我有堆冇人睇嘅文,有時想搵啲圖嚟襯托下,但又懶得自己整,就心諗不如又試下。

然後發現 DALL-E 係 closed beta,又話驚 deep fake 呢樣嗰樣,俾錢都冇得用 (要等佢皇恩浩蕩賜你access)。 不過既然有咗呢啲技術,坊間類近嘅軟件同服務其實都唔少。呢幾日嚟,搵到呢啲:

Online services 應該仲有其他,不過呢幾個做得比較好啲。另外喺 github (同 google collab notebooks) 搵到勁多可以自己用嘅 github project:

另外有個似乎就嚟 public release 嘅 project: https://stability.ai/https://github.com/CompVis/stable-diffusion )

先講過程。頭幾日試咗幾個 online service,製圖最靚嘅係 midjourney.com 。由於 midjourney.com 嘅玩法係要上 discord ,然後所有輸出嘅圖都係公開,所以一路玩一路見到其他人嘅「製成品」。正所謂「隔籬飯香」,我就 post 下我見到人哋整得靚嘅圖啦:


我覺得呢個最屈機。咩叫隔籬飯香呢?我自己整就變成咁:


midjourney 個 AI 最勁就係精細像真但又有啲夢幻氣質嘅圖,例如呢啲:





真係好靚㗎。(所以小心啲,好易一玩就沉迷落去唔見咗幾個鐘。)咁我主要就係想喺個 blog 度 gen 圖,所以啲見得人嘅製成品喺度: https://hnfong.github.io/public-crap/ —— 唔係篇篇文都有,不過呢兩年嘅文大概一半都有張配圖,應該係。

每一張圖要用好幾分鐘去 gen,gen 完仲要揀 (同影完相之後揀相差唔多感覺)、要等佢 upscale。好多時,因為個 AI model 本身可能未見過某啲題材,或者認得唔好,試幾次都 gen 唔到理想嘅圖象,咁就冇咗半個鐘 (同埋一堆 GPU credits)。從效率嚟講,唔算好高效率,暫時嚟講,想快速配圖嘅話,都係買傳統 stock photos 比較化算。

我玩咗兩三晚就放棄咗為 blog 配圖呢個用法,轉移咗去試另一種配圖用法:詞典嘅配圖。

由於上述嘅 online services 收錢之餘又冇咩方便嘅 API,質素唔錯但好多時啲細節有待微調,我就索性攞 github 嗰啲 projects 嚟玩。作為一個 machine learning 嘅超級新手,本身以為 setup 會勁煩。但落手一試,卻發現實際體驗都唔算太差(尤其係如果你識得喺 github 度搵啲幫你執靚咗嘅 fork)。

我喺 AWS 度租咗一個有 vGPU 嘅機,裝咗 Ubuntu 落去,然後就照住裝,都玩得幾開心。最後喺我個 use case 入面最可取嘅 model 係呢個:https://github.com/openai/glide-text2im  佢 gen 嘅圖冇 midjourney 嗰啲咁令人驚艷,但總括嚟講最「像真」(同埋相對快手,一分鐘內可以整到張圖出嚟),係衰在有少少矇。(另外佢為咗「防止個model俾濫用」淨係公開咗一個唔認得人嘅model,所以啲同人有關嘅嘢例如「朋友」、「老師」都肯定 gen 唔到嘢出嚟)

結果大概係咁。整咗兩百幾個 entry,但未完成「揀相」,最後都係 labor intensive 嘅工作嚟....



另外都試咗 VQGAN-CLIP 嗰堆,雖然啲結果同實物都好「神似」,但完全唔夠「像真」。本身以為 disco-diffusion 集各家之大成應該有啲睇頭,但我玩咗成個 weekend 完全駕馭唔到佢,可能佢「畫畫」唔錯啦,但流於「抽象派」。另外佢原本個 github 竟然係一個幾千行嘅 python file,又冇啲合理嘅 requirements.txt。望住佢啞咗,好彩搵到個 fork 幫佢執返靚啲 code 同 setup instructions⋯

一路發掘一路覺得啲嘢日新月異,好有廿幾年前做 software development 嗰種「等多半年啲嘢肯定勁好多」嘅感覺。啲人成日話「科技日新月異」,有時講得多大家就唔會認真審視呢句仲係咪真 (我認為資訊科技大部份範疇都已經唔係咁,啲人話咩追新科技追唔切係呃鳩你㗎咋),但 AI 嚟講就肯定係。2021 同 2022 發佈嘅嘢用起上嚟有明顯嘅分別。我未得閒玩 text generation (GPT 嗰堆),但斷估情況都類近。尤其早前有個被炒嘅 Google 員工話個 AI 有意識,大部份人嗤之以鼻,但我覺得其實真係幾震撼⋯

話時話,我亂咁搵 paper, github repo 嗰陣,留意到 AI 範疇似乎相對比較多女性 (比起傳統 IT9 範疇嚟講),都係個幾好嘅現像嚟。