Home » Posts tagged "windows"

在 TeX 上輸出圍棋棋譜的套件 psgo_emitter

忘記是在哪邊看到 avysk/psgo_emitter 這個套件,提供 TeX 語法輸出成圍棋棋盤的圖示,不過說明裡說只支援 Windows 平台:

psgo_emitter is a (Windows) console utility to create go diagrams for go life-and-death problems (tsumego).

可以只輸出角部,像是這段語法:

    \begin{psgopartialboard}{(1,1)(8,6)}
            \stone{black}{b}{3}
            \stone{black}{d}{3}
            \stone{black}{b}{4}
            \stone{white}{d}{5}
            \stone{white}{g}{2}
            \stone{black}{d}{2}
            \stone{white}{b}{5}
            \stone{white}{c}{4}
            \stone{white}{e}{4}
            \stone{white}{e}{3}
            \stone{white}{e}{2}
            \stone{black}{e}{1}
    \end{psgopartialboard}

會輸出這樣的圖:

另外也可以把手順放進去:

    \begin{psgopartialboard}{(1,1)(8,6)}
            \stone{black}{b}{3}
            \stone[\marklb{1}]{black}{a}{2}
            \stone{black}{d}{3}
            \stone{black}{b}{4}
            \stone[\marklb{8}]{white}{f}{1}
            \stone[\marklb{6}]{white}{d}{1}
            \stone{white}{e}{2}
            \stone{white}{g}{2}
            \stone{black}{d}{2}
            \stone{white}{b}{5}
            \stone[\marklb{7}]{black}{b}{2}
            \stone[\marklb{9}]{black}{a}{1}
            \stone{white}{c}{4}
            \stone[\marklb{4}]{white}{c}{2}
            \stone{white}{e}{4}
            \stone[\marklb{5}]{black}{c}{3}
            \stone{white}{e}{3}
            \stone[\marklb{2}]{white}{b}{1}
            \stone{white}{d}{5}
            \stone[\marklb{3}]{black}{a}{4}
            \stone{black}{e}{1}
    \end{psgopartialboard}

就會輸出:

套件還很新,不知道之後會發展成什麼樣子...

Microsoft 的 TTD 與 Mozilla 的 RR

也是個在瀏覽器 tab 上放了一陣子的連結... 先前看到 MicrosoftTime Travel Debugger (TTD),可以錄下程式執行的狀態,然後回放與搜尋:「Thoughts On Microsoft's Time-Travel Debugger」,另外有 CppCon 2017 上的影片,在 YouTube 上:

另外 Mozilla 也有類似的工具,叫做 rr (在影片開頭就有人問類似的問題 XD),程式碼在 GitHub 上:「mozilla/rr」。

而 TTD 與 rr 兩者最大的差異當然是平台支援的情況:

The most important and obvious difference between TTD and rr is that TTD is for Windows and rr is for Linux (though a few crazy people have had success debugging Windows applications in Wine under rr).

但另外一個也很重要的差異是 TTD 支援完整的 multi-threading,這對於現代的程式來說還蠻常見的:

TTD supports recording of multiple threads in parallel, while rr is limited to a single core.

當然,更完整的錄影也是要付出效能代價的:

On the other hand, per-thread recording overhead seems to be much higher in TTD than in rr. It's hard to make a direct comparison, but a simple "start Firefox, display mozilla.org, shut down" test run on similar hardware takes about 250 seconds under TTD and 26 seconds under rr.

不過有需要的時候應該會很方便?工具總是愈多愈好...

Windows 10 將支援 AF_UNIX (Unix Socket)

在「Unix sockets come to Windows」這邊看到微軟的說明文「AF_UNIX comes to Windows」,Windows 10 將要引入 AF_UNIX 了:

Beginning in Insider Build 17063, you’ll be able to use the unix socket (AF_UNIX) address family on Windows to communicate between Win32 processes. Unix sockets allow inter-process communication (IPC) between processes on the same machine.

所以這讓跨 process 溝通的方式又多了一種,而 Unix 的程式如果要移植到 Windows 上,至少這塊有相容... (相容性與 bug 還不知道情況 XD)

玩 ReactOS 0.4.7

ReactOS 是個 Open Source 的作業系統,目標是建立一個相容於 Windows 的環境。剛剛看到 ReactOS 0.4.7 釋出的消息,抓下來用虛擬機玩一下,看看目前的進展如何:「ReactOS 0.4.7 released!」。

現在可以比較輕鬆的在 VirtualBox 上安裝 ReactOS 了,雖然會需要自己改一些設定,但比以前已經簡單很多了... 可以參考「VirtualBox - ReactOS Wiki」這邊的說明,大致上有這幾點需要注意:

  • 在選擇的時候使用 Windows 2003 (32bit)。
  • 一定要掛一顆硬碟進去 (要記得確認設成 IDE 界面)。
  • 網路卡用 PCnet-FAST III。

然後在 Application Manager 把 Firefox 45 裝起來了,但是沒辦法更新到目前的 ESR 版本 52,或是目前最新版 57... 應該是還有些東西沒實做 :o

AWS 提供 Windows 上的 Deep Learning AMI

有一些 Windows 上的東西就可以直接開起來跑了:「Announcing New AWS Deep Learning AMI for Microsoft Windows」。

目前支援 2012 R2 與 2016:

Amazon Web Services now offers an AWS Deep Learning AMI for Microsoft Windows Server 2012 R2 and 2016.

然後 driver 與常用的東西都包進去了:

The AMIs also include popular deep learning frameworks such as Apache MXNet, Caffe and Tensorflow, as well as packages that enable easy integration with AWS, including launch configuration tools and many popular AWS libraries and tools. The AMIs come prepackaged with Nvidia CUDA 9, cuDNN 7, and Nvidia 385.54 drivers, and contain the Anaconda platform (supports Python versions 2.7 and 3.5).

Microsoft 與 GitHub 合作,將會把 GVFS 移植到 Linux 與 Mac 上

MicrosoftGitHub 合作將本來只有在 Windows 上可以用的 GVFS 移植到 LinuxMac 上:「Microsoft and GitHub team up to take Git virtual file system to macOS, Linux」。

GVFS 是解決微軟內部自己在用 Git 的痛處,因為微軟的 repository 都... 有... 點... 肥... (畢竟有不少產品發展了很久)。

目前 Git 的操作是卡在 I/O 與 memory cache 的限制上:

Also, Git wasn't designed for a codebase that was so large, either in terms of the number of files and version history for each file, or in terms of sheer size, coming in at more than 300GB. When using standard Git, working with the source repository was unacceptably slow. Common operations (such as checking which files have been modified) would take multiple minutes.

GVFS 的想法是有用到的部份再真的去拉,藉此大幅減少 I/O 需求...

Savitech (盛微) 的 USB 音效驅動程式會安裝 Root CA (被發了 CVE-2017-9758)

Hacker News 上看到 CERT 的「Savitech USB audio drivers install a new root CA certificate」提到 Savitech USB audio driver 會安裝自己的 Root CA:

Savitech provides USB audio drivers for a number of specialized audio products. Some versions of the Savitech driver package silently install a root CA certificate into the Windows trusted root certificate store.

出自「Inaudible Subversion - Did your Hi-Fi just subvert your PC? (原網站已經無法訪問,參考備份連結 https://archive.is/K6REr)」,CVE 編號是 CVE-2017-9758,最初是由 n3kt0n 提出的:「某單位 drivers silently install certificate in trusted root certificate authorities store [CVE-2017-9758]」:

Mitre assigned this exposure the identifier CVE-2017-9758, but was initially tracked by HITCON ZeroDay project as ZD-2017-00386.

有兩把 CA public key 被塞進去。雖然目前還沒有徵兆 private key 有外洩,但還是建議儘快移除:

There is currently no evidence that the Savitech private key is compromised. However, users are encouraged to remove the certificate out of caution. The two known certificates are:

SaviAudio root certificate #1
‎Validity: Thursday, ‎May ‎31, ‎2012 - ‎Tuesday, ‎December ‎30, ‎2036
Serial number: 579885da6f791eb24de819bb2c0eeff0
Thumbprint: cb34ebad73791c1399cb62bda51c91072ac5b050

SaviAudio root certificate #2
Validity: ‎Thursday, ‎December ‎31, ‎2015 - ‎Tuesday, ‎December ‎30, ‎2036
Serial number: ‎972ed9bce72451bb4bd78bfc0d8b343c
Thumbprint: 23e50cd42214d6252d65052c2a1a591173daace5

另外 Savitech 也放出了新版的 driver,不包含 Root CA:

Savitech has released a new driver package to address the issue. Savitech drivers version 2.8.0.3 or later do not install the root CA certificate. Users still must remove any previously installed certificate manually.

看了一下說明,看起來是當時為了支援 Windows XP 而做的,但微軟已經不提供驅動程式的數位簽章了,所以就只好這樣搞...

Windows 將引入 TruePlay,推出作弊偵測的 API

在「Windows now includes gaming cheat detection at the system level」這邊看到微軟將會引入 TruePlay (然後跟 Sonostrueplay 衝名 XDDD) 作弊偵測機制。

很明顯的會有隱私問題,而也很明顯的微軟說不會有隱私問題:

As Microsoft notes, "to protect customer privacy, no data is shared or transmitted until permission is granted," and no information is sent until "processing has determined cheating is likely to have occurred."

這不是把人當傻子嗎,遊戲一開始就會要求你同意才能玩啊,所以資料一定會送出的啊... 而且 TruePlay 變成作業系統的標準配備後,作弊程式就會找 workaround 才會推出 :o

Amazon Lightsail 支援 Windows 了

Amazon Lightsail 決定支援 Windows 了,算是其他目前幾家領頭的 VPS 還沒進入的領域:「Amazon Lightsail Update – Launch and Manage Windows Virtual Private Servers」。

由於多了 Windows 的授權費用,價錢貴了不少:

不過還是提供一個月免費的額度:

You can try out a 512 MB server for one month (up to 750 hours) at no charge.

不過不是所有 Amazon Lightsail 有開的區域都支援 Windows:

This feature is available today in the US East (Northern Virginia), US East (Ohio), US West (Oregon), EU (London), EU (Ireland), EU (Frankfurt), Asia Pacific (Singapore), Asia Pacific (Mumbai), Asia Pacific (Sydney), and Asia Pacific (Tokyo) Regions.

不過還是不知道 Amazon Lightsail 進入這塊市場的想法是什麼...

Firefox 的 Headless 模式

Google Chrome 推出 Headless 模式後,Firefox 也推出了:「Headless mode」。

目前正式版是 55 版,只有 Linux 版本有支援,下一個版本 56 版就會包括 Windows 與 Mac 了:

Headless Firefox works on Fx55+ on Linux, and 56+ on Windows/Mac.

然後大家也都是以 Selenium 為重心,所以使用上應該不會是大問題...

Archives