從 Chrome 50 開始,HTTP 網頁內將禁用 Geolocation 功能

Twitter 上看到如標題所說的,從 Google Chrome 50 開始 (現在正式版本是 48),HTTP 網頁將禁用 Geolocation API

對隱私保護的加強。

最近電腦圍棋的兩個突破...

昨天先看到 Mark Zuckerberg 丟出來的資訊,比較完整的資料可以在「Better Computer Go Player with Neural Network and Long-term Prediction」這邊看到。

Facebook 這邊的成就在於用 DCNN-based model 改善效率,可以用一台電腦 (包括 GPU) 維持在 KGS 5d (業餘五段),跟 Zen19 差不多的棋力,跟目前最好的電腦圍棋軟體棋力差不多:

darkfmcts3now holds a stable KGS 5d level, on par with the top Go AIs, has beaten Zen19 onceand hold 1win/1lose against a Korean 6p professional player with 4 handicaps.

The distributed version, named darkfmcts3in KGS Go Server, use darkfores2 as the underlying DCNN model, runs 75,000 rollouts on 2048 threads and produces a move every 13 seconds with one Intel Xeon E5-2680 v2 at 2.80GHz and 44 NVidia K40m GPUs.

In this paper, we have substantially improved the performance of DCNN-based Go AI, extensively evaluated it against both open source engines and strong amateur human players, and shown its potentials if combined with Monte-Carlo Tree Search (MCTS).

而隔壁棚的 Google 也丟出對應的研究成果「AlphaGo: Mastering the ancient game of Go with Machine Learning」,直接往 Nature 上丟:「Mastering the game of Go with deep neural networks and tree search」。

Google 不是跑在單機上,而是跑在 Google Cloud Platform 上,分散式的版本大約是職業五段的水準:

Of course, all of this requires a huge amount of compute power, so we made extensive use of Google Cloud Platform, which enables researchers working on AI and Machine Learning to access elastic compute, storage and networking capacity on demand.

實際對樊麾 (職業二段) 的成績也是五比零的大獲全勝:

So we invited the reigning 3-time European Go champion Fan Hui — an elite professional player who has devoted his life to Go since the age of 12 — to our London office for a challenge match. The match was played behind closed doors between October 5-9 last year. AlphaGo won by 5 games to 0 -- the first time a computer program has ever beaten a professional Go player.

而今年預定要去打大魔王,目前韓國圍棋第一人李世乭

AlphaGo’s next challenge will be to play the top Go player in the world over the last decade, Lee Sedol. The match will take place this March in Seoul, South Korea. Lee Sedol is excited to take on the challenge saying, "I am privileged to be the one to play, but I am confident that I can win." It should prove to be a fascinating contest!

到時候中國那邊的圍棋節目應該會有網路直播可以看吧,再來盯...

Love your country, but never trust its government

Hacker News Daily 上看到的,在 Sun-2 的 bootloader 裡可以看到「Love your country, but never trust its government」這樣的字串:「Why the Sun 2 has the message "Love your country, but never trust its government"」。

這段字串是由 John Gilmore 當時在 Sun 開發時所放入的,John Gilmore 同時也是後來 EFF 創辦人之一,不過當初放入這段字串的目的是為了抓到盜版:

Yes. Vinod Khosla, first President of Sun, came to me at one point and said to put something hidden, triggered in an unexpected way, into the ROM Monitor, so that if somebody cloned the Sun Workstation (violating our software’s copyright), we could do that unexpected thing to the competitor’s demo workstation at a trade show and thereby prove that they had cloned it.

過了三十年後 John Gilmore 被挖出來問的回應也是蠻有趣的... (可以參考原文附上的信件)

而這句話現在回頭看也很經典,尤其是最近各國政府想要在 crypto system 裡面放後門的各種反應。

YouTube 支援 Loop 功能 (重複播放)

在「YouTube Loop」這邊看到 YouTube 支援 Loop 了,在影片上按右鍵:

而且作者也有提到,在外嵌的影片也支援:

It also works for embedded videos.

以前要找外掛或是某些網站幫你,官方支援後省不少事 XD

Composer 出現 lock file out of date 的解法

之前也有遇到,結果 Lorna Jane Mitchell 寫了一篇「Handling Composer "lock file out of date" Warning」給了不少解法。

第一種是 composer upgrade,直接全部升級。

第二種是先用 composer update --dry-run 看看是不是有人加到 composer.json 後忘記更新,如果是的話再用 composer update [package] 處理。

第三種是用 composer update nothing 閉上眼睛更新 hash 值,當作什麼都沒看到 XDDD

Sometimes this is the right answer so it's a handy trick to know!. I seem to see these kinds of issues in people's projects quite often (I'm a consultant, I see a lot of projects) so I thought I'd share my usual tactics for getting things sorted - if you have any tricks of your own to share, I'd love to hear them :)

該說很「實用」嗎 XDDD

Adobe Typekit 對 PageSpeed 的妥協

Adobe Typekit 是個收費的網頁字型服務,為了讓變更可以儘快生效,用了比較短的 cache time:

We use a short cache time for the kit JavaScript so that you can update your kit (for example, adding fonts, or changing the list of allowed domains) and have your changes live in a reasonable amount of time.

但這也造成了不少人抱怨 Google PageSpeed Tools 會扣分,而實際上也的確降低效率 (因為你不需要天天改設定):

Adobe 給了妥協的方案,你可以選擇使用更長的 cache time,從本來的 10 mins 變成 1 week:「Improved caching for kits: Opt for longer cache timeout」。

這個選項使得 Google PageSpeed Tools 不會扣分,也讓效能再更好一些。

北都數位 (TaipeiNet) 的網路

在住的地方拉了北都數位的 cable 與網路來用,首先是速度,30M 有跑滿,不知道用的人多了之後會如何:

線路 IP 反解看起來是走遠傳 SEEDNet,而實際 traceroute 也都是走遠傳的骨幹。

首先是 DHCP 的 DNS 設定頗糟糕,居然配出 HiNet 的 168.95.1.1:

螢幕快照 2016-01-22 15.11.18

然後測了老半天,遠傳看起來完全沒有 Akamai Edge?查了一堆站台,不是走香港、日本,不然就是 HiNet 的 Akamai Edge (即使我把 DNS 硬設為 SEEDNet 自己的 DNS resolver),這樣吃國際頻寬不會吃很兇嗎?

之後找時間來看看遠傳的行動網路如何好了,固網這塊感覺好慘...

AWS 也推出免費的 SSL Certificate 給 ELB 與 CloudFront 用了

AWS 推出免費的 SSL Certificate 服務 AWS Certificate Manager:「New – AWS Certificate Manager – Deploy SSL/TLS-Based Apps on AWS」。

目前宣佈只有在 us-east-1 可以用,不過實際測試會發現包括 CloudFront

AWS Certificate Manager (ACM) is available now in the US East (Northern Virginia) region, with additional regions in the works. You can provision, deploy, and renew certificates at no charge.

可以看到是 Amazon 是找 Starfield 搞定的:

$ openssl s_client -servername i.kfs.io -connect d2c884gdd5bajy.cloudfront.net:443
CONNECTED(00000003)
depth=4 C = US, O = "Starfield Technologies, Inc.", OU = Starfield Class 2 Certification Authority
verify return:1
depth=3 C = US, ST = Arizona, L = Scottsdale, O = "Starfield Technologies, Inc.", CN = Starfield Services Root Certificate Authority - G2
verify return:1
depth=2 C = US, O = Amazon, CN = Amazon Root CA 1
verify return:1
depth=1 C = US, O = Amazon, OU = Server CA 1B, CN = Amazon
verify return:1
depth=0 CN = *.kfs.io
verify return:1

使用的是傳統的 e-mail 認證:

連買憑證的成本都可以省下來了,而且比起以前要自己用 aws-cli 在 command line 裡上傳 key & certificate 來的簡單多了。

用 Shell Script 寫的 Let's Encrypt Client

在找 Let's Encrypt 安裝方法時找到的專案:「letsencrypt/acme client implemented as a shell-script」。

整個專案用 bash 寫,用到的 dependency 都非常基本,「比較特別的」只有 curlopenssl,這兩個套件應該不是什麼問題... XD

沒有安裝問題 (因為只有一個 shell script 檔案),用起來也很簡單,執行速度也比官方快多了 (畢竟官方的考慮比較多),之後應該就會用這個吧... 另外自動化的部份也應該會用這個解決 :o