Raspberry Pi 推出 MCU 產品 Pico

Raspberry Pi 推出了新的產品線 Raspberry Pi Pico,基於 ARM 架構的 MCU (microcontroller unit),Hacker News 上也有不少討論:「Raspberry Pi Pico and RP2040 Microcontroller (raspberrypi.org)」。

與 Raspberry Pi 的 Zero 系列比起來,Zero 上面有 512MB RAM,不算大但還是可以跑一個完整的 OS。而 Pico 的定位就直接是 MCU 了,基本上就是特製的系統。

再來是看 Pico 的規格,比隔壁棚的 ESP32 低一些,但可以看出來 Pico 主要的定位還是教學:高速雙核心 CPU、多腳位、大的記憶體以及 flash (對於一般量產的 MCU 來說),支援透過 Micro-USB 的 5V 供電界面方便開發與使用。

官方支援 CMicroPython 兩種開發使用的模式,其中在 Hacker News 上有人抱怨 MicroPython 哭爸慢,不過這點應該還好,要在上面跑比較複雜的人會自己跳到 C 上面開發。

最後來講價位,目前定價是每顆 USD$4,當然跟一般商用量產的 MCU 差不少 (會盡可能壓低到「剛好夠用」的等級,價錢就有可能低到 USD$0.x),但相比於現在在教學上很紅的 ESP32 (大約在 USD$10 附近) 來說,等於是殺出另外一條產品線,加上挾帶著 Raspberry Pi 的知名度來說,等於是讓更多人熟悉 MCU...

AWS 跳出來決定繼續搞 Elasticsearch 了

先前提到「Elasticsearch 與 Kibana 也變成非 Open Source 軟體」,後來 Elastic 的 CEO (創辦人) 發了一篇「Amazon: NOT OK - why we had to change Elastic licensing」直接批評 AWS

接下來是 AWS 跳出來放話了,基本上也是個新聞稿:「Stepping up for a truly open source Elasticsearch」,大概就是會繼續維護自己的版本,維持本來的 Apache License, Version 2.0,然後批評 Elastic 所說的話不實之類的...

現在還在雙方放話的階段,過一陣子看看有什麼更新...

Let's Encrypt 升級資料庫伺服器 (AMD YES?)

Let's Encrypt 升級了 MariaDB 資料庫的伺服器 (跑 InnoDB),特地寫了一篇文章出來講:「The Next Gen Database Servers Powering Let's Encrypt」。

CPU 的部份從本來的 2x Intel Xeon E5-2650 (Total 24 cores / 48 threads) 換成了 2x AMD EPYC 7542 (Total 64 cores / 128 threads),這點在本來就是 CPU 滿載的情境下改善很大:

而本來的瓶頸一解決,也使得 API 的 latency 直接降下去:

回頭看一下架構,可以看到他們提到沒有使用分散式的資料庫,而是單台 database 硬撐,驗證了即使到了 Let's Encrypt 這種規模,以暴制暴還是很有效的:

We run the CA against a single database in order to minimize complexity. Minimizing complexity is good for security, reliability, and reducing maintenance burden. We have a number of replicas of the database active at any given time, and we direct some read operations to replica database servers to reduce load on the primary.

除了 CPU 暴力外,2TB RAM 與 24 顆 NVMe SSD 的搞法也是很讚的,擺明就是用記憶體拼 cache 的量,以及用大量的 NVMe SSD 疊 IOPS。

然後硬體還在成長,看起來暴力解應該會變成以後的基本答案了...

產生名次的 SQL

Percona 的「Generating Numeric Sequences in MySQL」這篇在討論產生字串序列,主要是在 MySQL 環境下,裡面看到的技巧「Session Variable Increment Within a SELECT」這組,剛好可以用在要在每個 row 裡面增加名次:

SELECT (@val := @val + 1) - 1 AS value FROM t1, (SELECT @val := 0) AS tt;

另外看到 MariaDBMySQL 8.0 系列因為有多支援各種功能,剛好也可以被拿來用,然後最後也提到了 Percona 自家出的 MySQL 8.0.20-11 將會直接有 SEQUENCE_TABLE() 可以用 (這應該才是 Percona 這篇文章的主要目的,推銷一下自家產品的新功能)。

文章收起來之後遇到可以拿出來參考用...

繞過 Screensaver Lock 的有趣話題...

Hacker News Daily 上看到「Screensaver lock by-pass via the virtual keyboard」這篇,裡面這邊題到了 screensaver lock 的有趣話題。

先講嚴肅一點的,這個 bug 被編號為 CVE-2020-25712,問題出在 xorg-x11-server 上:

A flaw was found in xorg-x11-server before 1.20.10. A heap-buffer overflow in XkbSetDeviceInfo may lead to a privilege escalation vulnerability. The highest threat from this vulnerability is to data confidentiality and integrity as well as system availability.

比較有趣的事情是,這個 bug 是小朋友在亂玩時拉出 virtual keyboard 觸發的:

A few weeks ago, my kids wanted to hack my linux desktop, so they typed and clicked everywhere, while I was standing behind them looking at them play... when the screensaver core dumped and they actually hacked their way in! wow, those little hackers...

然後他說他自己搞不出來:

I tried to recreate the crash on my own with no success, maybe because it required more than 4 little hands typing and using the mouse on the virtual keyboard.

另外一個人也說他家小朋友也弄出 segfault 了:

My kids came upon a similar cinnamon-screensaver segfault! I've emailed details of how to reproduce the problem to root@linuxmint.com.

小朋友超強 XDDD

Zoom 的浮水印功能

Hacker News Daily 上看到 The Intercept 介紹了 Zoom 的浮水印功能,以及如果你要洩密的話要如何自保:「What You Should Know Before Leaking a Zoom Meeting」。這篇文章主要不是談 Zoom 之前被討論的那些問題,而就 Zoom 的浮水印功能來討論。

Zoom 支援 video watchmark 與 audio watchmark:

依照描述的兩個方式,看起來都不難破,但主要是要提醒記者,如果要放出線人提供的 Zoom 錄音或是錄影,要注意到裡面是否有 watchmark 導致線人的資訊被洩漏:

Journalists should also be wary of publishing raw audio leaked from Zoom meetings, particularly if the source is not sure whether audio watermarking was enabled or not.

翻了一下 GitHub 沒搜到有工具可以處理,這點可能要等人發展出來...

Mattermost 推出了 ESR 5.31

在「Support for ESR 5.25 is ending」這邊看到 Mattermost 新的 ESR (Extended Support Release) 釋出了,也就是 5.31 版。

不過看了一下發現 support 期間還是很短,一般的 release 是三個月,ESR 也才九個月:

另外一個大問題是在行動平台上多帳號的支援,官方在「Mobile Apps FAQ」有提到這個問題,然後也有解釋技術上的問題,不過從 issue tracking system 可以看到官方對這個 feature 進展不怎麼快:

At the moment, we only support connecting to one server at a time; however, we are aware that this is one of the top feature requests for the mobile app. We are currently investigating some technical challenges, such as how to handle push notifications coming from multiple servers. To follow our progress on this feature, you can join the RN: Multi-Server channel on our community server.

先繼續丟著...

從 EC2 的價格表上發現 AWS 多了好多區...

剛剛翻 Amazon EC2 的價格頁面,發現多了好多有趣的區域,多了不少 ISP-based 的區域,像是 VerizonKDDI 以及 SKT

翻了一下好像沒有講過,但都已經放上價格頁了,應該是晚點就會放消息?

改變 Xfce Terminal 的 Alt-Number 快速鍵功能

前陣子桌機重裝 Ubuntu,順便把桌面環境換成 Xubuntu 用看看,也把本來再用的 GNOME Terminal 換成 XfceTerminal

我的習慣會把 GNOME Terminal 的 Alt-Number (像是 Alt-1) 快速鍵改掉,因為有不少程式會吃這組快速鍵,像是 tmux 切換視窗內玻璃 (pane) 排列的 preset 以及 IRC client 在不同頻道的切換。

但 Xfce Terminal 沒有 GUI 讓你改這組快速鍵 (其他的快速鍵有,但也雷雷的,後面會提到...),翻了翻看起來只有「Disable alt-n tab shortcut in xfce-terminal?」這邊有提到,算是堪用:

~/.config/xfce4/terminal/accels.scm looked promising but my changes were undone after a restart, so I made it read-only but it turns out commenting out the relevant lines makes no difference anyway.

雖然作者有提到它改了 ~/.config/xfce4/terminal/accels.scm 沒用,我自己發現這邊的確是很 buggy,但暫時還是可以找到 workaround。

解法是直接改沒錯,但不能直接註解掉,而需要改空,也就是本來的:

(gtk_accel_path "<Actions>/terminal-window/goto-tab-1" "<Alt>-1")

不能改成:

; (gtk_accel_path "<Actions>/terminal-window/goto-tab-1" "<Alt>-1")

而是要改空:

(gtk_accel_path "<Actions>/terminal-window/goto-tab-1" "")

另外要注意,透過 GUI 修改快速鍵後,~/.config/xfce4/terminal/accels.scm 裡面的內容也會被重製,也就是 Xfce Terminal 寫入這個檔案時是直接把預設值寫進去,而非把有效值寫進去:

這點算是比較地雷的地方...

Windows 上包裝 Syncthing 的 SyncTrayzor

在「SyncTrayzor is an open source Syncthing client for Windows」這邊看到有人將 Syncthing 包裝好,讓使用者在 Windows 上直接設定,而不需要另外開瀏覽器設定:

Syncthing is a popular peer-to-peer file sharing/synchronization software. It uses a web GUI which can be a little confusing for beginners. SyncTrayzor is an open source client that makes the P2P tool more user-friendly.

Syncthing 比較特別的觀念就是每一台都要設定允許其他台分享 (通常是這樣)。假設你有四台 Syncthing 要設定,每一台都要設定允許其他三台的分享。

不過也可以有其他的設計,像是你可以在 VPS hosting 上租一台空間很大的機器,然後其他機器都只對 VPS 這台機器同步,這樣就比較像有中央 server 的架構。

對於有多電腦的人還蠻好用的東西...