<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.9.3">Jekyll</generator><link href="https://livid.v2ex.com/feed.xml" rel="self" type="application/atom+xml" /><link href="https://livid.v2ex.com/" rel="alternate" type="text/html" /><updated>2023-12-23T12:18:36+00:00</updated><id>https://livid.v2ex.com/feed.xml</id><title type="html">Livid</title><subtitle>Beautifully Advance
</subtitle><author><name>Livid</name></author><entry><title type="html">Installing Jekyll on macOS Ventura</title><link href="https://livid.v2ex.com/guides/2023/01/03/jekyll-macos-ventura.html" rel="alternate" type="text/html" title="Installing Jekyll on macOS Ventura" /><published>2023-01-03T00:00:00+00:00</published><updated>2023-01-03T00:00:00+00:00</updated><id>https://livid.v2ex.com/guides/2023/01/03/jekyll-macos-ventura</id><content type="html" xml:base="https://livid.v2ex.com/guides/2023/01/03/jekyll-macos-ventura.html">&lt;p&gt;I have been following &lt;a href=&quot;https://sboots.ca/2021/07/20/installing-jekyll-locally-on-macos-big-sur/&quot;&gt;this tutorial&lt;/a&gt; by Sean Boots on how to install Jekyll on previous versions of macOS. It worked really well and provided a smooth installation process. However, since the latest version of macOS (Ventura) still ships with Ruby 2.6, some Gems started to complain about that. So, I found a new method that uses the excellent &lt;a href=&quot;https://github.com/rbenv/rbenv&quot;&gt;rbenv&lt;/a&gt; project to install a newer version of Ruby.&lt;/p&gt;

&lt;h3 id=&quot;1-install-rbenv-with-homebrew&quot;&gt;1. Install rbenv with Homebrew.&lt;/h3&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;brew install rbenv ruby-build
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Add this to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;~/.zshrc&lt;/code&gt; if you are using zsh:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;eval &quot;$(rbenv init - zsh)&quot;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;2-change-to-your-jekyll-blogs-work-directory-and-install-a-newer-version-of-ruby&quot;&gt;2. Change to your Jekyll blog’s work directory, and install a newer version of Ruby:&lt;/h3&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;rbenv install 3.1.3
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;3-activate-it-for-your-jekyll&quot;&gt;3. Activate it for your Jekyll:&lt;/h3&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;rbenv local 3.1.3
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Check if you have got the desired version:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;ruby -v
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;It should output something like this:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;ruby 3.1.3p185 (2022-11-24 revision 1a6b16756e) [arm64-darwin22]
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;If you see an older version like this:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;ruby 2.6.10p210 (2022-04-12 revision 67958) [universal.arm64e-darwin22]
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Check previous steps.&lt;/p&gt;

&lt;h3 id=&quot;4-install-the-two-essential-gems&quot;&gt;4. Install the two essential gems:&lt;/h3&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;gem install bundler jekyll
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;5-set-bundle-to-use-a-local-folder-inside-your-website&quot;&gt;5. Set bundle to use a local folder inside your website:&lt;/h3&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;bundle config set --local path 'vendor/bundle'
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;6-install-the-rest-of-gems&quot;&gt;6. Install the rest of gems:&lt;/h3&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;bundle install
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;If you encounter any issues with any Gems, try deleting the Gemfile.lock and running the command again.&lt;/p&gt;

&lt;h3 id=&quot;7-exclude-the-vendor-folder-in-your-jekyll-config-file-for-example&quot;&gt;7. Exclude the vendor folder in your Jekyll config file, for example:&lt;/h3&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;exclude:
- .ruby-gemset
- .ruby-version
- Gemfile
- Gemfile.lock
- Makefile
- README.md
- vendor/
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;You will also need to add the following lines into &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.gitignore&lt;/code&gt;:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;vendor/
.bundle/
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h3 id=&quot;8-your-jekyll-installation-is-now-set-up-and-ready-to-use-to-launch-a-live-preview-try-running-the-following-command&quot;&gt;8. Your Jekyll installation is now set up and ready to use. To launch a live preview, try running the following command:&lt;/h3&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;bundle exec jekyll serve --watch
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;hr /&gt;

&lt;p&gt;I hope you are enjoying the ride. However, if you found the process complex and difficult, you are not alone. That is also part of the reason I started working on &lt;a href=&quot;https://planetable.xyz/&quot; target=&quot;_blank&quot;&gt;Planetable.xyz&lt;/a&gt;, a static site generator with a graphical interface and a built-in IPFS node. With the Planet app, you don’t need any command line knowledge to &lt;a href=&quot;https://planetable.xyz/guides/&quot;&gt;start blogging and self-hosting on your Mac&lt;/a&gt;. You don’t even need an account or cloud because Planet has a built-in &lt;a href=&quot;https://ipfs.io/&quot; target=&quot;_blank&quot;&gt;IPFS&lt;/a&gt; node that can help you publish your blog directly to the Internet as an &lt;a href=&quot;https://docs.ipfs.tech/concepts/ipns/&quot; target=&quot;_blank&quot;&gt;InterPlanetary Name&lt;/a&gt;. You can later link that InterPlanetary Name (IPNS) to your &lt;a href=&quot;https://ens.domains/&quot; target=&quot;_blank&quot;&gt;Ethereum Name&lt;/a&gt; (.eth name). Since both IPFS and ENS are not controlled by any single entity, you can publish your blog in a fully decentralized way.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/planet-feature-update-6.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;</content><author><name>Livid</name></author><category term="guides" /><summary type="html">I have been following this tutorial by Sean Boots on how to install Jekyll on previous versions of macOS. It worked really well and provided a smooth installation process. However, since the latest version of macOS (Ventura) still ships with Ruby 2.6, some Gems started to complain about that. So, I found a new method that uses the excellent rbenv project to install a newer version of Ruby.</summary></entry><entry><title type="html">20210531</title><link href="https://livid.v2ex.com/diaries/2021/05/31/20210531.html" rel="alternate" type="text/html" title="20210531" /><published>2021-05-31T00:00:00+00:00</published><updated>2021-05-31T00:00:00+00:00</updated><id>https://livid.v2ex.com/diaries/2021/05/31/20210531</id><content type="html" xml:base="https://livid.v2ex.com/diaries/2021/05/31/20210531.html">&lt;p&gt;After I started the website for nearly eleven years, V2EX finally got its special treatment from China – China blocked it for the Internet users in the mainland by SNI filtering and DNS poisoning. In those sleepless nights, I lay on my bed and kept thinking about what is really blocked when we are talking about that wall and its blockage.&lt;/p&gt;

&lt;p&gt;It becomes obvious that in recent years more and more controls are being imposed there. For dealing with the website hosted in China, they have ICP filing, public security filing, and a brand new Cyber Administration to monitor and act. Individuals and corporations obey. Those websites and apps that are not hosted in China will be blocked in most cases once they got big, especially if it is a website in Chinese.&lt;/p&gt;

&lt;p&gt;Thus, control of the usage of the Chinese language is accomplished. That is the sad part. Internet is the most effective way to spread ideas in this era, while the usage of a language used by 1.4 billion people is strictly controlled. Of course, you can write in Chinese on a server outside China, but if what you wrote cannot reach its most potential audience, the meaning of writing itself is reduced.&lt;/p&gt;

&lt;p&gt;Such control of a language is probably quite unique if we can have a chance to look back from a historical perspective. Now I just have no idea where that will go.&lt;/p&gt;

&lt;p&gt;During the early days of founding Singapore, they chose English as the primary language. It was a pragmatic choice. Also, English is not controlled by any country but shared by a whole world outside China.&lt;/p&gt;</content><author><name>Livid</name></author><category term="diaries" /><category term="Livid" /><summary type="html">After I started the website for nearly eleven years, V2EX finally got its special treatment from China – China blocked it for the Internet users in the mainland by SNI filtering and DNS poisoning. In those sleepless nights, I lay on my bed and kept thinking about what is really blocked when we are talking about that wall and its blockage.</summary></entry><entry><title type="html">Jekyll in 2021</title><link href="https://livid.v2ex.com/essays/2021/05/10/jekyll-in-2021.html" rel="alternate" type="text/html" title="Jekyll in 2021" /><published>2021-05-10T00:00:00+00:00</published><updated>2021-05-10T00:00:00+00:00</updated><id>https://livid.v2ex.com/essays/2021/05/10/jekyll-in-2021</id><content type="html" xml:base="https://livid.v2ex.com/essays/2021/05/10/jekyll-in-2021.html">&lt;p&gt;距离这个 blog 最早开始用 Jekyll 已经快过去十年。现在我几乎可以说最早的兴奋感大抵已经褪去了。&lt;/p&gt;

&lt;p&gt;这十年间，作为一个静态网站生成工具的那些优点依然成立：&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;性能好&lt;/li&gt;
  &lt;li&gt;可以用自己最喜欢的 Markdown 编辑器书写内容（此时此刻我在用 &lt;a href=&quot;https://www.v2ex.com/go/vscode&quot;&gt;Visual Studio Code&lt;/a&gt;），因此离线使用也是完全可能的&lt;/li&gt;
  &lt;li&gt;可以自己控制协议层面的细节&lt;/li&gt;
  &lt;li&gt;可以使用 Git 来看到所有变化&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;但是：&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;每次想写什么的时候，需要打开 Markdown 编辑器，找到 Jekyll 所在目录，在指定的目录下添加文件，需要为文件想好文件名，文件头部需要 headers&lt;/li&gt;
  &lt;li&gt;写完之后，需要执行 Git 操作，需要写 commit message 然后 git push&lt;/li&gt;
  &lt;li&gt;及，Jekyll 在任何平台上初次安装时会遇到的那些问题&lt;/li&gt;
  &lt;li&gt;这整个流程很难在手机上跑通&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;如果每一个需要做的决定都会让整件事情更可能被放弃的话（一想到要做那么多决定就不想做了的无力感），那么这个过程中需要做的决定数量是大大超过一个简单的文本输入框 + 一个发布按钮类型的系统里所需要做的决定数量。&lt;/p&gt;

&lt;p&gt;而同样是在十年间，一个简单的文本输入框 + 一个发布按钮类型的系统，因为浏览器标准及前后端工程技术方面的发展，已经变得非常好用：&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;图片甚至视频都可以直接拖进浏览器就发布&lt;/li&gt;
  &lt;li&gt;链接内容会被展开&lt;/li&gt;
  &lt;li&gt;如果链接目的地是一个视频网站，那么基于 HTML5 的播放器可以直接播放视频&lt;/li&gt;
  &lt;li&gt;类似 Word 那样的富文本选取和格式化&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;这样的系统做到极致，就是 2021 年的 &lt;a href=&quot;https://www.notion.so/&quot;&gt;Notion&lt;/a&gt;，&lt;a href=&quot;https://twitter.com/&quot;&gt;Twitter&lt;/a&gt; 和 &lt;a href=&quot;https://www.facebook.com/&quot;&gt;Facebook&lt;/a&gt; 的发布框。如果想要让个人网站拥有类似的发布体验，是一件极有工程和运维挑战的事情。所以，或许这件事情值得一试？&lt;/p&gt;</content><author><name>Livid</name></author><category term="essays" /><category term="Jekyll" /><summary type="html">距离这个 blog 最早开始用 Jekyll 已经快过去十年。现在我几乎可以说最早的兴奋感大抵已经褪去了。</summary></entry><entry><title type="html">DOSBox Pure</title><link href="https://livid.v2ex.com/guides/2021/02/20/dosbox-pure.html" rel="alternate" type="text/html" title="DOSBox Pure" /><published>2021-02-20T00:00:00+00:00</published><updated>2021-02-20T00:00:00+00:00</updated><id>https://livid.v2ex.com/guides/2021/02/20/dosbox-pure</id><content type="html" xml:base="https://livid.v2ex.com/guides/2021/02/20/dosbox-pure.html">&lt;p&gt;&lt;a href=&quot;https://github.com/schellingb/dosbox-pure&quot;&gt;DOSBox Pure&lt;/a&gt; 是一个可以用于在 RetroArch 里模拟 DOS 游戏的插件。关于 RetroArch 的配置，可以看之前的这篇文章：&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://livid.v2ex.com/guides/2021/01/08/retroarch.html&quot;&gt;RetroArch 配置使用&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;相比之前的其他 DOSBox 的 fork，DOSBox Pure 除了可以支持 RetroArch 的状态保存及 Shader 功能外，还可以支持：&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;直接从 zip 文件包中加载游戏&lt;/li&gt;
  &lt;li&gt;自动挂载 zip 文件包里的 CD Image，考虑到之前的很多老 DOS 游戏使用 CD 作为音乐源&lt;/li&gt;
  &lt;li&gt;加载一个外部的 SF2 文件，来提供更好的 MIDI 音乐效果&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;用来体验老游戏真的是非常不错的体验。比如这是 DOS 下的经典游戏《仙剑奇侠传》在 DOSBox Pure 里运行的截图（加上了 CRT Caligari Shader 的效果）：&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/dos-pal.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;KOEI 的大航海时代 II：&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/dos-uncharted-waters-ii.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Maxis 的 SimCity 2000：&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/dos-sc2k.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;甚至当年 id Software 的 3D 大作 Quake：&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/dos-quake.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;性能&quot;&gt;性能&lt;/h2&gt;

&lt;p&gt;在摩尔定律尚还非常有效的 1990 年代，不同的 DOS 游戏对于性能的需求非常不一样。Bullfrog 的 Theme Park 需要 DOSBox 模拟一台 386 电脑，否则就会因为一切动画过快而造成游戏根本没法玩。而 Quake 这样的游戏则需要 DOSBox 尽可能快地运行。&lt;/p&gt;

&lt;p&gt;因此，你可能需要在游戏开始运行之后，根据具体的游戏选择需要的性能级别：&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/dos-cycles.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;目前 DOSBox Pure 还不能支持读取 zip 包中的 dosbox.conf 配置文件。如果将来能够支持的话，那么就可以通过 dosbox.conf 来为不同的游戏提供不同的定制选项了。&lt;/p&gt;

&lt;h2 id=&quot;获取-dos-游戏&quot;&gt;获取 DOS 游戏&lt;/h2&gt;

&lt;p&gt;现在是 2021 年了，但是合法地获取 DOS 游戏文件依然是可能的。比如你可以通过以下渠道买到 DOS 游戏：&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.gog.com/&quot;&gt;GOG&lt;/a&gt; - 可以找到大部分在欧美发行过的 DOS 游戏&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;https://www.origin.com/&quot;&gt;Origin&lt;/a&gt; - EA Origin 上提供的 SimCity 2000 SE 其实就是基于 DOSBox 模拟的，可以在安装目录里找到 DOS 游戏的文件&lt;/li&gt;
&lt;/ul&gt;</content><author><name>Livid</name></author><category term="guides" /><summary type="html">DOSBox Pure 是一个可以用于在 RetroArch 里模拟 DOS 游戏的插件。关于 RetroArch 的配置，可以看之前的这篇文章：</summary></entry><entry><title type="html">RetroArch</title><link href="https://livid.v2ex.com/guides/2021/01/08/retroarch.html" rel="alternate" type="text/html" title="RetroArch" /><published>2021-01-08T00:00:00+00:00</published><updated>2021-01-08T00:00:00+00:00</updated><id>https://livid.v2ex.com/guides/2021/01/08/retroarch</id><content type="html" xml:base="https://livid.v2ex.com/guides/2021/01/08/retroarch.html">&lt;p&gt;&lt;a href=&quot;https://www.retroarch.com&quot;&gt;RetroArch&lt;/a&gt; 是一个功能强大的模拟器前端。它的核心是一个叫做 &lt;a href=&quot;https://www.libretro.com&quot;&gt;libretro&lt;/a&gt; 的开源软件项目，基于 libretro 开发的 RetroArch 提供了一套管理多个不同模拟器系统的界面。这篇文章是关于 RetroArch 的配置和使用，并且会根据 RetroArch 的发展持续更新。&lt;/p&gt;

&lt;p&gt;文章中的配图来自 RetroArch 运行在 Windows 下的效果。但是 RetroArch 几乎可以运行在所有主流软硬件平台上。&lt;/p&gt;

&lt;h2 id=&quot;menu-菜单&quot;&gt;Menu 菜单&lt;/h2&gt;

&lt;p&gt;RetroArch 提供了多种不同的使用界面方案。其中一个类似 PlayStation 的 XMB 界面方案，非常方便用手柄导航。如果你安装的 RetroArch 没有默认使用这个界面的话，你可以在这个位置打开：&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Settings -&amp;gt; Drivers -&amp;gt; Menu -&amp;gt; xmb
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;img src=&quot;/images/retroarch-menu-xmb.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;core-核心&quot;&gt;Core 核心&lt;/h2&gt;

&lt;p&gt;配置 RetroArch 的第一步，就是为你打算模拟的平台下载 Core。RetroArch 本身是一个启动器，对具体游戏平台的模拟，是通过不同的 Core 来实现。比如打算模拟 NES 的话，你可能会需要下载 FCEUmm 这个 Core。&lt;/p&gt;

&lt;p&gt;作为一个已经发展了多年的成熟项目，RetroArch 包括了几乎所有游戏平台的模拟器 Core。甚至包括了一些非常专用的 Core，比如 &lt;a href=&quot;https://docs.libretro.com/library/openlara/&quot;&gt;OpenLara&lt;/a&gt; 和 &lt;a href=&quot;https://docs.libretro.com/library/prboom/&quot;&gt;PrBoom&lt;/a&gt; 这样专用于特定 PC 游戏的 Core。&lt;/p&gt;

&lt;p&gt;下载新的 Core 的菜单位置：&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Main Menu -&amp;gt; Load Core -&amp;gt; Download a Core
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;scan-扫描内容&quot;&gt;Scan 扫描内容&lt;/h2&gt;

&lt;p&gt;在 Core 安装完成之后，接下来需要做的就是把内容添加到 RetroArch。&lt;/p&gt;

&lt;p&gt;建议把不同平台的 ROM 文件分别放到不同的文件夹里，比如分别为 NES 和 SNES 建立不同的文件夹。然后在 RetroArch 菜单中选择：&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Import Content -&amp;gt; Scan Directory -&amp;gt; 选择你存放 ROM 的目录
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;通常，这样就可以找到你组织好的内容。扫描完成后，RetroArch 界面里就会多出来刚刚找到的新游戏的 Playlist。RetroArch 会为每个平台的所有游戏建立一个 Playlist。&lt;/p&gt;

&lt;p&gt;但是，在某些情况下，如果上面的方法没有找到新内容，那么你还可以试试：&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Import Content -&amp;gt; Manual Scan
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;在 Manual Scan 模式下，你需要指定用哪个 Core 来扫描内容。Manual Scan 每次会用一个指定的 Core 扫描指定的一个文件夹，所以可以用这样的方式来一次性为一个平台生成 Playlist。&lt;/p&gt;

&lt;h2 id=&quot;rom&quot;&gt;ROM&lt;/h2&gt;

&lt;p&gt;使用类似 &lt;a href=&quot;https://www.retrode.org/&quot; target=&quot;_blank&quot;&gt;Retrode&lt;/a&gt; 这样的设备，你可以从卡带中获得游戏内容，也就是 ROM 文件。&lt;/p&gt;

&lt;p&gt;互联网上的一群经典游戏的爱好者维护了一个叫做 &lt;a href=&quot;https://no-intro.org/&quot; target=&quot;_blank&quot;&gt;no-intro&lt;/a&gt; 的数据库，记录所有完整的 ROM 文件的特征，比如游戏的官方名称、CRC32 校验值、MD5 值等等。&lt;/p&gt;

&lt;h2 id=&quot;shader-画面特效&quot;&gt;Shader 画面特效&lt;/h2&gt;

&lt;p&gt;针对 CRT 显示器设计的老游戏，分辨率相比现代 PC，是很低的 240p 分辨率：&lt;/p&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th&gt;Platform 平台&lt;/th&gt;
      &lt;th&gt;Resolution 分辨率&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;img src=&quot;https://www.v2ex.com/static/gamedb/32/fc.gif&quot; style=&quot;width: 16px; image-rendering: pixelated; vertical-align: text-bottom;&quot; /&gt;  NES/Famicom&lt;/td&gt;
      &lt;td&gt;256×224&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;img src=&quot;https://www.v2ex.com/static/gamedb/32/sfc.gif&quot; style=&quot;width: 16px; image-rendering: pixelated; vertical-align: text-bottom;&quot; /&gt;  Super NES/Super Famicom&lt;/td&gt;
      &lt;td&gt;256×224&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;img src=&quot;https://www.v2ex.com/static/gamedb/32/genesis.gif&quot; style=&quot;width: 16px; image-rendering: pixelated; vertical-align: text-bottom;&quot; /&gt;  Geneis/Mega Drive&lt;/td&gt;
      &lt;td&gt;320×224&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;img src=&quot;https://www.v2ex.com/static/gamedb/32/gb.gif&quot; style=&quot;width: 16px; image-rendering: pixelated; vertical-align: text-bottom;&quot; /&gt;  Game Boy&lt;/td&gt;
      &lt;td&gt;160×144&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;img src=&quot;https://www.v2ex.com/static/gamedb/32/gbc.gif&quot; style=&quot;width: 16px; image-rendering: pixelated; vertical-align: text-bottom;&quot; /&gt;  Game Boy Color&lt;/td&gt;
      &lt;td&gt;160×144&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;img src=&quot;https://www.v2ex.com/static/gamedb/32/gba.gif&quot; style=&quot;width: 16px; image-rendering: pixelated; vertical-align: text-bottom;&quot; /&gt;  Game Boy Advance&lt;/td&gt;
      &lt;td&gt;240×160&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;img src=&quot;https://www.v2ex.com/static/gamedb/32/vb.gif&quot; style=&quot;width: 16px; image-rendering: pixelated; vertical-align: text-bottom;&quot; /&gt;  Virtual Boy&lt;/td&gt;
      &lt;td&gt;384×224&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;img src=&quot;https://www.v2ex.com/static/gamedb/32/n64.gif&quot; style=&quot;width: 16px; image-rendering: pixelated; vertical-align: text-bottom;&quot; /&gt;  Nintendo 64&lt;/td&gt;
      &lt;td&gt;320×240&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;因此，如果要在现代的高分辨率 LCD 屏幕上模拟老旧 CRT 电视机的效果，你可以使用 RetroArch 的 Shader 功能。在运行游戏的过程中呼出快捷菜单，然后在 Shader 菜单中选择一款 CRT Shader（适用于主机平台）或者 Handheld Shader（适用于手持平台）即可。&lt;/p&gt;

&lt;p&gt;比如这是在 4K 分辨率下，没有使用 Shader 时的效果：&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/images/retroarch-contra-without-shader-4k.png&quot;&gt;&lt;img src=&quot;/images/retroarch-contra-without-shader-4k.png&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;作为对比，这是使用了 CRT Caligari 之后的效果：&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/images/retroarch-contra-with-shader-4k.png&quot;&gt;&lt;img src=&quot;/images/retroarch-contra-with-shader-4k.png&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;RetroArch 内置了几十款不同的 Shader。&lt;/p&gt;

&lt;p&gt;为了让 Shader 获得最好的显示效果，下面的这个设置选项推荐打开：&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Settings -&amp;gt; Video -&amp;gt; Scaling -&amp;gt; Integer Scale
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;这样 RetroArch 在将模拟器输出的视频画面填充当前分辨率时，会确保按照整数倍来进行放大。这样可以避免因为画面被非整数倍放大而带来的一些 Shader 的渲染问题。这些问题当你在使用扫描线类型的 CRT Shader 时会尤其明显。&lt;/p&gt;

&lt;h2 id=&quot;rewind-回退&quot;&gt;Rewind 回退&lt;/h2&gt;

&lt;p&gt;以前的很多游戏的难度非常具有挑战性。比如在 &lt;a href=&quot;https://www.v2ex.com/gamedb/developers/konami/nes&quot;&gt;Konami&lt;/a&gt; 的经典游戏 &lt;a href=&quot;https://www.v2ex.com/gamedb/nes/contra&quot;&gt;Contra 魂斗罗&lt;/a&gt; 和 &lt;a href=&quot;https://www.v2ex.com/gamedb/nes/life-force-salamander&quot;&gt;Life Force 沙罗曼蛇&lt;/a&gt; 里，无论你积攒了多少火力，只要吃一颗子弹就全部重来。并且游戏里只有三条命。&lt;/p&gt;

&lt;p&gt;RetroArch 提供了一种让苦手玩家有可能可以一命通关的方法——当在游戏里出现失误的时候，只要按住 &lt;kbd&gt;R&lt;/kbd&gt; 就可以回退。直到退回到失误出现之前。借助这种方式，一命通关很多很难的游戏，或者在彩蛋区域进行反复探索，就只是时间问题了。&lt;/p&gt;

&lt;p&gt;可以在 Quick Menu 的这个位置设置 Rewind 的速度，默认是 1 帧：&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Quick Menu -&amp;gt; Rewind -&amp;gt; Rewind Frames
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;如果你基本上只用 RetroArch 来玩那些不需要手柄 L2 键的游戏，那么可以考虑把 L2 映射为 Rewind 回退功能。&lt;/p&gt;

&lt;h2 id=&quot;auto-save-load-自动保存和加载&quot;&gt;Auto Save Load 自动保存和加载&lt;/h2&gt;

&lt;p&gt;以前的游戏大部分都没有提供存盘功能，尤其是 8 位机时代的游戏。其中一些游戏提供的解决方案是通关密码 Password，即你在打通了每一关之后会获得一个通关密码，之后只要输入这个通关密码就可以从这一关开始游戏。&lt;/p&gt;

&lt;p&gt;而另外一种更简单的方式就是用 RetroArch 来自动记录和恢复游戏状态。你可以在设置菜单中的这个位置找到相关设置：&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Settings -&amp;gt; Saving
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;img src=&quot;/images/retroarch-auto-save.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;推荐把下面的这两个选项都打开：&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Auto Save State&lt;/li&gt;
  &lt;li&gt;Load State Automatically&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;这样在你每次关闭游戏时，状态会被自动保存。下次打开游戏时，状态会被自动加载。如果你的整个 RetroArch 文件夹是放在一个云同步的目录中的话，那么这些游戏状态就可以在你的电脑之间同步。然后就可以在任何一台电脑上继续你的任何游戏的进度。&lt;/p&gt;

&lt;h2 id=&quot;screenshot-截图&quot;&gt;Screenshot 截图&lt;/h2&gt;

&lt;p&gt;按下 &lt;kbd&gt;F8&lt;/kbd&gt; 就可以保存当前游戏的截图。RetroArch 提供了一个设置，让你可以保存 8-bit/16-bit 的原始像素的 PNG 格式，而不是应用了 Shader 之后的效果。&lt;/p&gt;

&lt;p&gt;可以从菜单的这个位置打开或者关闭这个设置：&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Settings -&amp;gt; Video -&amp;gt; GPU Screenshot
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;或者直接编辑 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;retroarch.cfg&lt;/code&gt; 中的这个属性：&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;video_gpu_screenshot = &quot;false&quot;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;当 GPU Screenshot 设置打开时，截图保存的是带有 Shader 的效果及分辨率。当 GPU Screenshot 设置关闭时，截图保存的是游戏的原始分辨率，比如 NES 的 256×224。&lt;/p&gt;

&lt;p&gt;部分 NES 模拟器 Core 支持剪裁掉横向或者竖向的 overscan 内容区域，因为某些游戏比如 &lt;a href=&quot;https://www.v2ex.com/gamedb/nes/super-mario-bros-3&quot;&gt;Super Mario Bros. 3&lt;/a&gt; 的 overscan 区域会有一些垃圾渲染（这些区域在真实硬件及 CRT 显示上不可见）。如果所有 overscan 内容区域都被保留，那么 NES 游戏的截图分辨率会是 256×240，如果都被剪裁，那么会是 240×224。&lt;/p&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th&gt;No Crop&lt;/th&gt;
      &lt;th&gt;Crop Horizontal&lt;/th&gt;
      &lt;th&gt;Crop Vertical&lt;/th&gt;
      &lt;th&gt;Crop Both&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;img src=&quot;/images/smb3-256x240.png&quot; alt=&quot;&quot; /&gt;&lt;/td&gt;
      &lt;td&gt;&lt;img src=&quot;/images/smb3-240x240.png&quot; alt=&quot;&quot; /&gt;&lt;/td&gt;
      &lt;td&gt;&lt;img src=&quot;/images/smb3-256x224.png&quot; alt=&quot;&quot; /&gt;&lt;/td&gt;
      &lt;td&gt;&lt;img src=&quot;/images/smb3-240x224.png&quot; alt=&quot;&quot; /&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;256×240&lt;/td&gt;
      &lt;td&gt;240×240&lt;/td&gt;
      &lt;td&gt;256×224&lt;/td&gt;
      &lt;td&gt;240×224&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;FCEUmm 的默认设置是：&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Crop Horizontal -&amp;gt; Off&lt;/li&gt;
  &lt;li&gt;Crop Vertical -&amp;gt; On&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;这样出来的截图的分辨率是 256×224&lt;/p&gt;

&lt;p&gt;你可以在 RetroArch 的 screenshots 目录找到截图的 .png 文件。&lt;/p&gt;

&lt;h2 id=&quot;recording-视频录制&quot;&gt;Recording 视频录制&lt;/h2&gt;

&lt;p&gt;虽然用 OBS 或者 GeForce Experience 也可以录下游戏过程，但是 RetroArch 内置的游戏录制功能的特殊之处在于可以用一种无损（lossless）的方式以游戏的原始分辨率保存为一个 .mkv 文件。如果使用 RetroArch 本身来播放这个 .mkv 文件，那么还可以在上面应用 Shader 效果。&lt;/p&gt;

&lt;p&gt;按下一次 &lt;kbd&gt;O&lt;/kbd&gt; 即可开始录制，再按下一次 &lt;kbd&gt;O&lt;/kbd&gt; 即可停止录制。你可以在 RetroArch 的 recordings 目录找到录制的 .mkv 文件。&lt;/p&gt;</content><author><name>Livid</name></author><category term="guides" /><summary type="html">RetroArch 是一个功能强大的模拟器前端。它的核心是一个叫做 libretro 的开源软件项目，基于 libretro 开发的 RetroArch 提供了一套管理多个不同模拟器系统的界面。这篇文章是关于 RetroArch 的配置和使用，并且会根据 RetroArch 的发展持续更新。</summary></entry><entry><title type="html">Ecosia</title><link href="https://livid.v2ex.com/essays/2020/12/16/ecosia.html" rel="alternate" type="text/html" title="Ecosia" /><published>2020-12-16T00:00:00+00:00</published><updated>2020-12-16T00:00:00+00:00</updated><id>https://livid.v2ex.com/essays/2020/12/16/ecosia</id><content type="html" xml:base="https://livid.v2ex.com/essays/2020/12/16/ecosia.html">&lt;p&gt;在 iOS 14.3 的更新里，加入了一个新的搜索引擎选项——&lt;a href=&quot;https://www.ecosia.org/&quot;&gt;Ecosia&lt;/a&gt;。&lt;/p&gt;

&lt;p&gt;Ecosia 是一家总部位于德国柏林的公益企业。他们的核心产品是一个基于 Microsoft Bing 的搜索引擎。而特别之处在于，Ecosia 会把他们的利润（收入减去开支）的至少 80% 用于在全世界各地种树。根据 Ecosia 的数据，目前为止他们已经种了超过 1 亿颗树。&lt;/p&gt;

&lt;p&gt;整件事情让人感觉美好得不像是真的，所以如果你觉得好奇的话，你可以进一步去了解他们披露的&lt;a href=&quot;https://blog.ecosia.org/ecosia-financial-reports-tree-planting-receipts/&quot;&gt;财务数据&lt;/a&gt;，他们的 &lt;a href=&quot;https://www.instagram.com/ecosia/&quot;&gt;Instagram&lt;/a&gt; 和 &lt;a href=&quot;https://www.youtube.com/user/EcosiaORG&quot;&gt;YouTube&lt;/a&gt; 频道。&lt;/p&gt;

&lt;p&gt;在整个搜索引擎市场，Bing 的份额很小，而基于 Bing 的 Ecosia 的份额就更小了。如果是 Google 划出 1% 的收入用来种树会怎样？但是商业公司不能像公益企业这样做事，所以像种树这样的事情，不太可能变成 Google 这样的商业公司的追求。商业公司追求的是更高的利润率，而商业和技术上的成功也带来了搜索效果最好的 Google。当人们在使用 Ecosia 时，由此产生的搜索广告流量的收入会变成地球上的树，及实际上在挥舞着铲子种树的人的收入，这是一件美好的事情。但是，用户可能会在这个过程中由于使用了一个效果不是最好的搜索引擎而浪费一些时间，这些时间其实也是钱，只是大概不像搜索广告收入那么容易衡量吧。&lt;/p&gt;</content><author><name>Livid</name></author><category term="essays" /><summary type="html">在 iOS 14.3 的更新里，加入了一个新的搜索引擎选项——Ecosia。</summary></entry><entry><title type="html">MacBook Pro 2019 16-inch</title><link href="https://livid.v2ex.com/essays/2019/12/14/mbp-16.html" rel="alternate" type="text/html" title="MacBook Pro 2019 16-inch" /><published>2019-12-14T00:00:00+00:00</published><updated>2019-12-14T00:00:00+00:00</updated><id>https://livid.v2ex.com/essays/2019/12/14/mbp-16</id><content type="html" xml:base="https://livid.v2ex.com/essays/2019/12/14/mbp-16.html">&lt;p&gt;在购入这台 2019 的 16 英寸 MacBook Pro 之前，我一直在使用的是一台 2014 的 15 寸，最后一代装备了 NVIDIA 显卡的 MacBook Pro。而中间几年的那代，则完全错过了。因为无法接受那个键盘的手感和可靠性。&lt;/p&gt;

&lt;p&gt;每次设置新电脑是一个很有趣的过程。尤其是这种隔了 5 年的升级，可以感觉到太多事物真是已经巨变。&lt;/p&gt;

&lt;h2 id=&quot;编辑器&quot;&gt;编辑器&lt;/h2&gt;

&lt;p&gt;做 &lt;a href=&quot;https://www.v2ex.com/&quot;&gt;V2EX&lt;/a&gt; 这十几年里用过的编辑器：TextWranger -&amp;gt; TextMate -&amp;gt; Sublime Text -&amp;gt; Visual Studio Code。&lt;/p&gt;

&lt;p&gt;于是这次拿到新电脑之后，上面就只装了一个编辑器：Visual Studio Code。并且似乎不需要装别的了。因为通过 &lt;a href=&quot;https://code.visualstudio.com/docs/remote/ssh&quot;&gt;Remote SSH&lt;/a&gt; 这个插件，可以让开发环境跑在另外一台服务器上，编辑这台服务器上的代码目录，和编辑本地的代码目录，体验上并没有太大的区别。&lt;/p&gt;

&lt;p&gt;但是依赖关系上会有非常巨大的区别——把开发中的代码存放和运行于一台远程服务器上，意味着不再需要在笔记本上跑下面这些重型软件：&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Docker&lt;/li&gt;
  &lt;li&gt;Vagrant&lt;/li&gt;
  &lt;li&gt;VirtualBox&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;及各种数据库服务器。&lt;/p&gt;

&lt;p&gt;之前当我需要在一台笔记本电脑上同时启动多个 VirtualBox 时，即使性能最好的编辑器也会在这种情况下出现卡顿，风扇会开始转，电池只能坚持不到 2 个小时不到……&lt;/p&gt;

&lt;h2 id=&quot;icloud-drive&quot;&gt;iCloud Drive&lt;/h2&gt;

&lt;p&gt;以前开始用 Dropbox 时，同时期的 .Mac 服务提供的是 WebDAV。&lt;/p&gt;

&lt;p&gt;而到了 2019 年，iCloud Drive 在数据同步这件事上已经做得足够好，甚至连桌面都可以同步了。因此这次在这台新机器上不再需要 Dropbox 了。&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;在一台新的电脑上，几乎不需要安装第三方软件，就可以继续做自己喜欢的事情，喜欢这样的感觉。&lt;/p&gt;</content><author><name>Livid</name></author><category term="essays" /><summary type="html">在购入这台 2019 的 16 英寸 MacBook Pro 之前，我一直在使用的是一台 2014 的 15 寸，最后一代装备了 NVIDIA 显卡的 MacBook Pro。而中间几年的那代，则完全错过了。因为无法接受那个键盘的手感和可靠性。</summary></entry><entry><title type="html">Dark Mode</title><link href="https://livid.v2ex.com/essays/2019/09/05/dark-mode.html" rel="alternate" type="text/html" title="Dark Mode" /><published>2019-09-05T00:00:00+00:00</published><updated>2019-09-05T00:00:00+00:00</updated><id>https://livid.v2ex.com/essays/2019/09/05/dark-mode</id><content type="html" xml:base="https://livid.v2ex.com/essays/2019/09/05/dark-mode.html">&lt;p&gt;大概是由于这两年&lt;a href=&quot;https://www.apple.com/pro-display-xdr/&quot;&gt;新的显示器&lt;/a&gt;的亮度越来越高，支持 Dark Mode，从操作系统到 App，再到网站，都已经变成一件用户和开发者都有强烈需求去做的事情。&lt;/p&gt;

&lt;p&gt;最近花了一些时间，对这个博客的 CSS 进行了一些小小的调整，现在也可以根据操作系统的设置，自动支持 Dark Mode 了。只是这样的支持，相比那些从一开始设计时就考虑到 Dark Mode 的设计，大概并不完美。Dark Mode 并不只是简简单单地把颜色 invert，而是需要考虑对比度及新设备（OLED）特性，全盘考虑的新设计。&lt;/p&gt;

&lt;p&gt;最近几年，在 &lt;a href=&quot;https://caniuse.com/&quot;&gt;Can I Use&lt;/a&gt; 上追踪最新的浏览器标准的进化，对我而言是一件非常有乐趣的事情。能够将这些新特性以恰当的方式在 &lt;a href=&quot;https://www.v2ex.com/&quot;&gt;V2EX&lt;/a&gt; 上实施，是一件非常有意思的事情。一个网站如果能够在前端和后端的技术上，都时刻保持更新，那么保持更新这个动作本身，无论是对于网站还是做这件事情人，都是有价值的。&lt;/p&gt;

&lt;p&gt;说到对新技术的支持，最近在 V2EX 上完成部署的一个新更新，就是现在 V2EX 可以支持通过 &lt;a href=&quot;https://jsonfeed.org/&quot;&gt;JSON Feed&lt;/a&gt; 将节点的最新内容输出。然后就可以通过支持 JSON Feed 的 RSS 阅读器，比如 &lt;a href=&quot;https://ranchero.com/netnewswire/&quot;&gt;NetNewsWire 5.0&lt;/a&gt; 或者 &lt;a href=&quot;https://feedbin.com/&quot;&gt;Feedbin&lt;/a&gt; 来订阅指定节点的最新内容。NetNewsWire 5.0 是新近发布的一款 RSS 阅读器，实现得简直就像是来自 Apple 的作品。&lt;/p&gt;

&lt;p&gt;下图是用 NetNewsWire 5.0 订阅 V2EX 的分享创造节点的效果：&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://i.v2ex.co/30v518br.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;分享创造节点的 JSON Feed 地址：&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://ranchero.com/netnewswire/&quot;&gt;https://www.v2ex.com/feed/create.json&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;这种阅读 V2EX 内容的方式会和直接访问网站很不一样：所有的内容以创建时间排序，不会受到排序算法的影响。用户可以使用一款自己喜欢的 Native App 来指定订阅自己真正感兴趣的内容，很多杂音会在这个过程中被排除。同时 JSON Feed 的输出中也不会有广告。是的，我想我永远不会去在 JSON Feed 中加广告，我希望就去保持一个尽可能纯粹的内容输出格式。如果有一天有更多的人通过这种方式来阅读 V2EX 上的内容，我会觉得这些选择帮助他们节省了时间，会很有意义。&lt;/p&gt;</content><author><name>Livid</name></author><category term="essays" /><summary type="html">大概是由于这两年新的显示器的亮度越来越高，支持 Dark Mode，从操作系统到 App，再到网站，都已经变成一件用户和开发者都有强烈需求去做的事情。</summary></entry><entry><title type="html">用 Docker 运行 Jekyll</title><link href="https://livid.v2ex.com/essays/2018/12/31/jekyll-docker.html" rel="alternate" type="text/html" title="用 Docker 运行 Jekyll" /><published>2018-12-31T00:00:00+00:00</published><updated>2018-12-31T00:00:00+00:00</updated><id>https://livid.v2ex.com/essays/2018/12/31/jekyll-docker</id><content type="html" xml:base="https://livid.v2ex.com/essays/2018/12/31/jekyll-docker.html">&lt;p&gt;很喜欢 Jekyll 这个静态网站生成框架，这个站就是用 Jekyll 做的。但是总感觉 Jekyll 的安装是一件很麻烦的事情。直接安装到 Host OS 上是一种污染环境的方法，而我又不想去花时间研究到底怎样才是管理 Ruby 依赖包的最科学的方式。所以用 Docker 来让这个网站可以在本地跑起来，是最好的方式了。而且 Docker 这样的方式也通吃 macOS 和 Windows。&lt;/p&gt;

&lt;p&gt;首先是获取 Jekyll 的最新 Docker 镜像：&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;docker pull jekyll/jekyll
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;然后切换到你的 Jekyll 网站所在目录，执行这条命令启动 Jekyll：&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;docker run &lt;span class=&quot;nt&quot;&gt;--mount&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;bind&lt;/span&gt;,source&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;$(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;pwd&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;)&lt;/span&gt;,target&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;/srv/jekyll &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;-p&lt;/span&gt; 4000:4000 &lt;span class=&quot;nt&quot;&gt;--name&lt;/span&gt; blog &lt;span class=&quot;nt&quot;&gt;-it&lt;/span&gt; jekyll/jekyll &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
jekyll serve
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;然后就可以通过 localhost:4000 访问到这个 Jekyll 的动态生成结果了。&lt;/p&gt;

&lt;p&gt;因为我们给这个 Container 赋予了名字 blog，所以之后如果再次需要这个 Container 的话，只需要这样就可以启动：&lt;/p&gt;

&lt;div class=&quot;language-bash highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;docker start &lt;span class=&quot;nt&quot;&gt;-i&lt;/span&gt; blog
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;hr /&gt;

&lt;p&gt;参考文档 &lt;a href=&quot;https://github.com/envygeeks/jekyll-docker/blob/master/README.md&quot;&gt;https://github.com/envygeeks/jekyll-docker/blob/master/README.md&lt;/a&gt;&lt;/p&gt;</content><author><name>Livid</name></author><category term="essays" /><summary type="html">很喜欢 Jekyll 这个静态网站生成框架，这个站就是用 Jekyll 做的。但是总感觉 Jekyll 的安装是一件很麻烦的事情。直接安装到 Host OS 上是一种污染环境的方法，而我又不想去花时间研究到底怎样才是管理 Ruby 依赖包的最科学的方式。所以用 Docker 来让这个网站可以在本地跑起来，是最好的方式了。而且 Docker 这样的方式也通吃 macOS 和 Windows。</summary></entry><entry><title type="html">Gran Turismo Sport</title><link href="https://livid.v2ex.com/essays/2018/06/18/gt-sport.html" rel="alternate" type="text/html" title="Gran Turismo Sport" /><published>2018-06-18T00:00:00+00:00</published><updated>2018-06-18T00:00:00+00:00</updated><id>https://livid.v2ex.com/essays/2018/06/18/gt-sport</id><content type="html" xml:base="https://livid.v2ex.com/essays/2018/06/18/gt-sport.html">&lt;p&gt;最近几个月，GT Sport 这款游戏对于我而言，已经不仅是一款游戏，简直就成为某种可以称之为生活方式的事物。此时此刻，当我在书房的电脑上敲打这篇文字的时候，旁边桌子的桌面上就放着 PS4 Pro，上面运行的 GT Sport 提供了房间中变化的光线和音乐。&lt;/p&gt;

&lt;p&gt;我想这可能也是其功能之一——作为房间的背景光和声音。因为 GT Sport 在游戏进入之后，如果你什么都不做的话，那么默认的显示画面就是一个隐去了所有 UI（这样大概可以防止 LED burn-in），然后不停变换的幻灯片。幻灯片的内容包括各种重大的历史事件，及游戏中的各种车在现实中的场景的照片。我猜想大概 Polyphony 公司的入口就会悬挂这样的一块大屏幕，然后只要让其始终运行 GT Sport 的这个 idle 模式即可源源不断地提供各种几乎不会重复的视觉和听觉刺激。&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://i.v2ex.co/A75nrs56.jpeg&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;视觉肯定是这个游戏最大的一个优点。只要显示硬件支持，游戏可以以 4K HDR 的方式输出。各种颜色和对比度非常不同，确实是一种享受。那个桌面就是我平时写代码的桌面，所以上面的支持 4K HDR 的 Dell U2718Q 一共接了 3 台设备，包括一台 Windows PC 和一台 Mac，及 PS4 Pro。U2718Q 可以自动检测输入信号源，因此只要不是同时开了多台设备的话，那么显示信号是可以自动切换的，非常方便。无论是关闭 PS4 打开 PC，或是关闭 PC 打开了 PS4，然后显示信号就自动进行了切换，中间的几秒的时间对于大脑的上下文切换也恰到好处。而最近 Asus 和 Acer 刚刚推出了支持 144Hz G-Sync 的 4K HDR 显示器，不过还没有在 Micro Center 看到实物，很期待去看看在色彩的表现上是否能够超过 Dell U2718Q。&lt;/p&gt;

&lt;p&gt;然后说说 GT Sport 的音乐。这也是一件让我一直觉得很有趣的事情，就是为什么 Forza 和 Project CARS 2 在菜单和游戏中所选择的音乐都是各种恢弘（或者莫不如说是苦大仇深也可以）的交响乐，而 GT Sport 系列一直在音乐的选择上要更柔和、轻松，或者说 hip。所以我无法接受 Forza 和 Project CARS 系列的一个重要原因或许就是他们的音乐太严肃了。&lt;/p&gt;

&lt;p&gt;虽然这代 GT 提供了增强的在线和 Sport 模式，但是这个游戏目前对于我而言就是一个孤独的，自己和自己较劲的游戏。每天找到一段合适的时间和心情，然后挑战 campaign 中的某个模式，或是试着让自己在 Nurburgring Nordschleife 上单圈时间时间能够减少几秒。&lt;/p&gt;

&lt;p&gt;这种情况下的游戏体验是一种接近于 zen 的体验。你必须忘掉一切，忘掉手机上的 300 个提醒，忘掉白天说错的话，忘掉明天要赴的约，把自己的全部注意力放到游戏中。在这个过程中，满足自己在开始时升起的那个微小的念头，可能是通关 campaign 中的一个模式，或是得到一辆新车，或是减短时间，然后关掉游戏，继续生活。&lt;/p&gt;</content><author><name>Livid</name></author><category term="essays" /><summary type="html">最近几个月，GT Sport 这款游戏对于我而言，已经不仅是一款游戏，简直就成为某种可以称之为生活方式的事物。此时此刻，当我在书房的电脑上敲打这篇文字的时候，旁边桌子的桌面上就放着 PS4 Pro，上面运行的 GT Sport 提供了房间中变化的光线和音乐。</summary></entry></feed>