<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
    <channel>
      <title>&#x2F;home&#x2F;ksqsf</title>
      <link>https://ksqsf.moe</link>
      <description></description>
      <generator>Zola</generator>
      <language>en</language>
      <atom:link href="https://ksqsf.moe/en/rss.xml" rel="self" type="application/rss+xml"/>
      <lastBuildDate>Thu, 14 May 2026 00:00:00 +0000</lastBuildDate>
      <item>
          <title>24 Hours of AI Coding</title>
          <pubDate>Thu, 14 May 2026 00:00:00 +0000</pubDate>
          <author>ksqsf</author>
          <link>https://ksqsf.moe/en/posts/2026-05-14-first-agentic-coding/</link>
          <guid>https://ksqsf.moe/en/posts/2026-05-14-first-agentic-coding/</guid>
          <description xml:base="https://ksqsf.moe/en/posts/2026-05-14-first-agentic-coding/">&lt;blockquote&gt;
&lt;p&gt;Disclaimer: This post was translated into English by an AI model. It may contain mistakes or awkward wording.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;Whether from news hype, friends in the AI industry, or online discussions, everyone keeps proclaiming the importance of the AI era. Yet I had never taken it very seriously. Claude Code has been out for more than a year, and I had occasionally used self-paid APIs to write small programs or analyze unfamiliar repositories, but I had never used an AI coding tool for a truly serious project. Yes, LLMs can write code, but did we not already know that? Only recently, after seeing friends use coding agents to build some quite interesting things, did I seriously try AI coding for the first time. The experience was perhaps too successful for me, even shocking. While the memory is still fresh, I want to record my first AI coding project.&lt;&#x2F;p&gt;</description>
      </item>
      <item>
          <title>Higher-order Data Types à la Carte</title>
          <pubDate>Sun, 12 Apr 2026 00:00:00 +0000</pubDate>
          <author>ksqsf</author>
          <link>https://ksqsf.moe/en/posts/2026-04-12-hodtalc/</link>
          <guid>https://ksqsf.moe/en/posts/2026-04-12-hodtalc/</guid>
          <description xml:base="https://ksqsf.moe/en/posts/2026-04-12-hodtalc/">&lt;blockquote&gt;
&lt;p&gt;Disclaimer: This post was translated into English by an AI model. It may contain mistakes or awkward wording.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;I recently needed to represent an AST for a small project, and I wanted the AST itself to be extensible: I could define fragments of a language and then combine them as needed. This sounds very suitable for DTALC. But one soon discovers that the classic DTALC formulation does not work. This post records the solution.&lt;&#x2F;p&gt;</description>
      </item>
      <item>
          <title>Living on WSL</title>
          <pubDate>Tue, 29 Apr 2025 00:00:00 +0000</pubDate>
          <author>ksqsf</author>
          <link>https://ksqsf.moe/en/posts/2025-04-29-work-in-wsl/</link>
          <guid>https://ksqsf.moe/en/posts/2025-04-29-work-in-wsl/</guid>
          <description xml:base="https://ksqsf.moe/en/posts/2025-04-29-work-in-wsl/">&lt;blockquote&gt;
&lt;p&gt;Disclaimer: This post was translated into English by an AI model. It may contain mistakes or awkward wording.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;I recently had to use Windows for work. After using WSL2 for a while, I found it quite usable. This post describes how I configure WSL and Emacs as my work environment.&lt;&#x2F;p&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;ksqsf.moe&#x2F;en&#x2F;posts&#x2F;2025-04-29-work-in-wsl&#x2F;.&#x2F;emacs-in-wsl.avif&quot; alt=&quot;Emacs in WSL&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;h1 id=&quot;why-use-wsl&quot;&gt;Why Use WSL?&lt;&#x2F;h1&gt;
&lt;p&gt;The first question is, of course: &lt;strong&gt;why not use a native Windows environment?&lt;&#x2F;strong&gt;&lt;&#x2F;p&gt;
&lt;p&gt;Indeed, today Windows can use tools such as Scoop to install command-line programs quickly, or one can use MSYS2 directly and build a command-line environment for Emacs to call.&lt;&#x2F;p&gt;
&lt;p&gt;I mainly use WSL for two reasons:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;I am used to the Linux environment. Installing WSL feels like coming home: the same recipe, the same taste, and no learning cost.&lt;&#x2F;li&gt;
&lt;li&gt;The projects I develop can only run on Linux, so in a sense it is a hard requirement. I say &quot;in a sense&quot; because Emacs can also use TRAMP for remote development.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;In short, I have spent very little time on native Windows, but I believe it can also be made usable with some effort.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;tui-or-gui&quot;&gt;TUI or GUI?&lt;&#x2F;h1&gt;
&lt;p&gt;When I first installed WSL, I briefly tried WSLg and ran into some problems, so I only used the TUI. At first this was a compromise, but later I found the TUI completely sufficient. Of course, using the TUI means giving up some features:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;The TUI can only use one font.&lt;&#x2F;li&gt;
&lt;li&gt;TUI Emacs cannot display images.&lt;&#x2F;li&gt;
&lt;li&gt;Before Emacs 30, there were no tty child frames.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;Aside from that, there do not seem to be many shortcomings.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;which-terminal&quot;&gt;Which Terminal?&lt;&#x2F;h1&gt;
&lt;p&gt;As shown above, I use WezTerm. At first I started with Windows Terminal like everyone else, but I soon found that Emacs in Windows Terminal had screen tearing, while WezTerm did not.&lt;&#x2F;p&gt;
&lt;p&gt;My WezTerm configuration is simple, but one thing is worth mentioning: Emacs in a terminal &lt;strong&gt;cannot receive some key sequences&lt;&#x2F;strong&gt;, such as &lt;code&gt;C-TAB&lt;&#x2F;code&gt;. We can bind this key in WezTerm to &quot;send string to terminal program&quot; as a workaround:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;lua&quot; style=&quot;background-color:#2b303b;color:#c0c5ce;&quot; class=&quot;language-lua &quot;&gt;&lt;code class=&quot;language-lua&quot; data-lang=&quot;lua&quot;&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;return &lt;&#x2F;span&gt;&lt;span&gt;{
&lt;&#x2F;span&gt;&lt;span&gt;   &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;keys &lt;&#x2F;span&gt;&lt;span&gt;= {
&lt;&#x2F;span&gt;&lt;span&gt;      &lt;&#x2F;span&gt;&lt;span style=&quot;color:#65737e;&quot;&gt;-- Press C-TAB to send C-x t o to the terminal program
&lt;&#x2F;span&gt;&lt;span&gt;      { &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;key &lt;&#x2F;span&gt;&lt;span&gt;= &amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;Tab&lt;&#x2F;span&gt;&lt;span&gt;&amp;#39;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;mods &lt;&#x2F;span&gt;&lt;span&gt;= &amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;CTRL&lt;&#x2F;span&gt;&lt;span&gt;&amp;#39;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;action &lt;&#x2F;span&gt;&lt;span&gt;= &lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;act&lt;&#x2F;span&gt;&lt;span&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;SendString&lt;&#x2F;span&gt;&lt;span&gt;(&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#96b5b4;&quot;&gt;\x18\x74\x6f&lt;&#x2F;span&gt;&lt;span&gt;&amp;#39;) },
&lt;&#x2F;span&gt;&lt;span&gt;   }
&lt;&#x2F;span&gt;&lt;span&gt;}
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;To find this string, call &lt;code&gt;kbd&lt;&#x2F;code&gt; in IELM:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;lisp&quot; style=&quot;background-color:#2b303b;color:#c0c5ce;&quot; class=&quot;language-lisp &quot;&gt;&lt;code class=&quot;language-lisp&quot; data-lang=&quot;lisp&quot;&gt;&lt;span&gt;ELISP&amp;gt; (kbd &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;C-x t o&lt;&#x2F;span&gt;&lt;span&gt;&amp;quot;)
&lt;&#x2F;span&gt;&lt;span&gt;&amp;quot;^Xto&amp;quot;
&lt;&#x2F;span&gt;&lt;span&gt;ELISP&amp;gt; ?^X
&lt;&#x2F;span&gt;&lt;span&gt;ELISP&amp;gt; ?^X
&lt;&#x2F;span&gt;&lt;span&gt;24
&lt;&#x2F;span&gt;&lt;span&gt; (&lt;&#x2F;span&gt;&lt;span style=&quot;color:#d08770;&quot;&gt;#o30, #x18,&lt;&#x2F;span&gt;&lt;span&gt; ?\C-x)
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This tells you that &lt;code&gt;Ctrl-x&lt;&#x2F;code&gt; corresponds to the character with ASCII code &lt;code&gt;0x18&lt;&#x2F;code&gt;, so you can construct the argument to &lt;code&gt;SendString&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;aside&gt;
In Emacs, the &lt;code&gt;^X&lt;&#x2F;code&gt; here is colored differently from ordinary text, indicating that it is a complete special character. Do not try to copy &lt;code&gt;^X&lt;&#x2F;code&gt; directly from the web page; I split it into two characters, &lt;code&gt;^&lt;&#x2F;code&gt; and &lt;code&gt;X&lt;&#x2F;code&gt;, so it can be displayed in a browser.
&lt;&#x2F;aside&gt;
&lt;h1 id=&quot;wsl-configuration&quot;&gt;WSL Configuration&lt;&#x2F;h1&gt;
&lt;p&gt;WSL has two layers of configuration:&lt;&#x2F;p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;code&gt;C:\Users\USERNAME\.wslconfig&lt;&#x2F;code&gt; on the Windows side, used to configure virtual-machine startup options.&lt;&#x2F;li&gt;
&lt;li&gt;&lt;code&gt;&#x2F;etc&#x2F;wsl.conf&lt;&#x2F;code&gt; inside Linux, used to configure system startup and Linux services.&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;p&gt;Below I omit full paths and only write filenames such as &lt;code&gt;.wslconfig&lt;&#x2F;code&gt;. See the &lt;a href=&quot;https:&#x2F;&#x2F;learn.microsoft.com&#x2F;en-us&#x2F;windows&#x2F;wsl&#x2F;wsl-config&quot;&gt;official documentation&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;which-distribution&quot;&gt;Which Distribution?&lt;&#x2F;h2&gt;
&lt;p&gt;Out of habit, I use Debian.&lt;&#x2F;p&gt;
&lt;p&gt;But I encountered some WSL Debian problems, such as not being able to start &lt;code&gt;.exe&lt;&#x2F;code&gt; files; the fix is mentioned below. These problems &lt;strong&gt;may&lt;&#x2F;strong&gt; not exist on Ubuntu, since Ubuntu is Microsoft&#x27;s main target.&lt;&#x2F;p&gt;
&lt;p&gt;If you need to choose, I suggest choosing a distribution you understand. If you do not want to tinker, Ubuntu is fine.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;allocate-more-hardware-resources&quot;&gt;Allocate More Hardware Resources&lt;&#x2F;h2&gt;
&lt;p&gt;In &lt;code&gt;.wslconfig&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;conf&quot; style=&quot;background-color:#2b303b;color:#c0c5ce;&quot; class=&quot;language-conf &quot;&gt;&lt;code class=&quot;language-conf&quot; data-lang=&quot;conf&quot;&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;processors&lt;&#x2F;span&gt;&lt;span&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color:#d08770;&quot;&gt;12
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;memory&lt;&#x2F;span&gt;&lt;span&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color:#d08770;&quot;&gt;12GB
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h2 id=&quot;enable-systemd&quot;&gt;Enable systemd&lt;&#x2F;h2&gt;
&lt;p&gt;Edit &lt;code&gt;&#x2F;etc&#x2F;wsl.conf&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;conf&quot; style=&quot;background-color:#2b303b;color:#c0c5ce;&quot; class=&quot;language-conf &quot;&gt;&lt;code class=&quot;language-conf&quot; data-lang=&quot;conf&quot;&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;[boot]
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;systemd &lt;&#x2F;span&gt;&lt;span&gt;= &lt;&#x2F;span&gt;&lt;span style=&quot;color:#d08770;&quot;&gt;true
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h2 id=&quot;run-exe-directly&quot;&gt;Run &lt;code&gt;.exe&lt;&#x2F;code&gt; Directly&lt;&#x2F;h2&gt;
&lt;p&gt;Debian&#x27;s WSLInterop seems to have some compatibility problems with systemd and needs manual repair:&lt;&#x2F;p&gt;
&lt;script src=&quot;https:&#x2F;&#x2F;gist.github.com&#x2F;ksqsf&#x2F;477ee4705e4e51f4bc2de01adb5f7c1d.js&quot;&gt;&lt;&#x2F;script&gt;
&lt;h2 id=&quot;configure-docker&quot;&gt;Configure Docker&lt;&#x2F;h2&gt;
&lt;p&gt;After enabling systemd, install the Docker packages directly.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;configure-qemu&quot;&gt;Configure Qemu&lt;&#x2F;h2&gt;
&lt;p&gt;WSL2 supports running KVM virtual machines. Edit &lt;code&gt;.wslconfig&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;conf&quot; style=&quot;background-color:#2b303b;color:#c0c5ce;&quot; class=&quot;language-conf &quot;&gt;&lt;code class=&quot;language-conf&quot; data-lang=&quot;conf&quot;&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;nestedVirtualization&lt;&#x2F;span&gt;&lt;span&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color:#d08770;&quot;&gt;true
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Edit &lt;code&gt;&#x2F;etc&#x2F;wsl.conf&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;conf&quot; style=&quot;background-color:#2b303b;color:#c0c5ce;&quot; class=&quot;language-conf &quot;&gt;&lt;code class=&quot;language-conf&quot; data-lang=&quot;conf&quot;&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;[boot]
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;command &lt;&#x2F;span&gt;&lt;span&gt;= &#x2F;bin&#x2F;bash -c &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;#39;chown -v root:kvm &#x2F;dev&#x2F;kvm &amp;amp;&amp;amp; chmod 600 &#x2F;dev&#x2F;kvm&amp;#39;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h1 id=&quot;emacs-configuration&quot;&gt;Emacs Configuration&lt;&#x2F;h1&gt;
&lt;h2 id=&quot;detect-whether-you-are-in-wsl&quot;&gt;Detect Whether You Are in WSL&lt;&#x2F;h2&gt;
&lt;pre data-lang=&quot;lisp&quot; style=&quot;background-color:#2b303b;color:#c0c5ce;&quot; class=&quot;language-lisp &quot;&gt;&lt;code class=&quot;language-lisp&quot; data-lang=&quot;lisp&quot;&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#96b5b4;&quot;&gt;string&lt;&#x2F;span&gt;&lt;span&gt;-match &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;WSL2&lt;&#x2F;span&gt;&lt;span&gt;&amp;quot; operating-system-release)
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;This expression returns a non-nil value inside WSL.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;use-the-mouse&quot;&gt;Use the Mouse&lt;&#x2F;h2&gt;
&lt;p&gt;Enable &lt;code&gt;xterm-mouse-mode&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;lisp&quot; style=&quot;background-color:#2b303b;color:#c0c5ce;&quot; class=&quot;language-lisp &quot;&gt;&lt;code class=&quot;language-lisp&quot; data-lang=&quot;lisp&quot;&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;when &lt;&#x2F;span&gt;&lt;span&gt;(not (display-graphic-p))
&lt;&#x2F;span&gt;&lt;span&gt;  (xterm-mouse-mode +&lt;&#x2F;span&gt;&lt;span style=&quot;color:#d08770;&quot;&gt;1&lt;&#x2F;span&gt;&lt;span&gt;))
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;TUI Emacs supports using the mouse to resize panes, click menus, open context menus, select text, and so on. Basically, the operations you use in the GUI also work in the TUI.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;clipboard-integration&quot;&gt;Clipboard Integration&lt;&#x2F;h2&gt;
&lt;p&gt;Clipboard integration may be the most important configuration. First define some commands:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;lisp&quot; style=&quot;background-color:#2b303b;color:#c0c5ce;&quot; class=&quot;language-lisp &quot;&gt;&lt;code class=&quot;language-lisp&quot; data-lang=&quot;lisp&quot;&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;defun &lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fa1b3;&quot;&gt;wsl-copy &lt;&#x2F;span&gt;&lt;span&gt;(beg end)
&lt;&#x2F;span&gt;&lt;span&gt;  &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;In a WSL2 environment, copy region to the system clipboard.&lt;&#x2F;span&gt;&lt;span&gt;&amp;quot;
&lt;&#x2F;span&gt;&lt;span&gt;  (interactive &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;r&lt;&#x2F;span&gt;&lt;span&gt;&amp;quot;)
&lt;&#x2F;span&gt;&lt;span&gt;  (&lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;let &lt;&#x2F;span&gt;&lt;span&gt;((default-&lt;&#x2F;span&gt;&lt;span style=&quot;color:#96b5b4;&quot;&gt;directory &lt;&#x2F;span&gt;&lt;span&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&#x2F;&lt;&#x2F;span&gt;&lt;span&gt;&amp;quot;))
&lt;&#x2F;span&gt;&lt;span&gt;    (shell-command-on-region beg end &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;clip.exe&lt;&#x2F;span&gt;&lt;span&gt;&amp;quot; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt; *wsl-copy*&lt;&#x2F;span&gt;&lt;span&gt;&amp;quot;))
&lt;&#x2F;span&gt;&lt;span&gt;  (deactivate-mark))
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;defun &lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fa1b3;&quot;&gt;wsl-get-clipboard &lt;&#x2F;span&gt;&lt;span&gt;()
&lt;&#x2F;span&gt;&lt;span&gt;  &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;In a WSL2 environment, get the clipboard text.&lt;&#x2F;span&gt;&lt;span&gt;&amp;quot;
&lt;&#x2F;span&gt;&lt;span&gt;  (&lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;let &lt;&#x2F;span&gt;&lt;span&gt;((clipboard
&lt;&#x2F;span&gt;&lt;span&gt;         (&lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;let &lt;&#x2F;span&gt;&lt;span&gt;((default-&lt;&#x2F;span&gt;&lt;span style=&quot;color:#96b5b4;&quot;&gt;directory &lt;&#x2F;span&gt;&lt;span&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&#x2F;&lt;&#x2F;span&gt;&lt;span&gt;&amp;quot;))
&lt;&#x2F;span&gt;&lt;span&gt;           (shell-command-&lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;to&lt;&#x2F;span&gt;&lt;span&gt;-&lt;&#x2F;span&gt;&lt;span style=&quot;color:#96b5b4;&quot;&gt;string &lt;&#x2F;span&gt;&lt;span&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;powershell.exe -command &amp;#39;Get-Clipboard&amp;#39; 2&amp;gt;&#x2F;dev&#x2F;null&lt;&#x2F;span&gt;&lt;span&gt;&amp;quot;))))
&lt;&#x2F;span&gt;&lt;span&gt;    (&lt;&#x2F;span&gt;&lt;span style=&quot;color:#96b5b4;&quot;&gt;setq&lt;&#x2F;span&gt;&lt;span&gt; clipboard (&lt;&#x2F;span&gt;&lt;span style=&quot;color:#96b5b4;&quot;&gt;replace&lt;&#x2F;span&gt;&lt;span&gt;-regexp-in-&lt;&#x2F;span&gt;&lt;span style=&quot;color:#96b5b4;&quot;&gt;string &lt;&#x2F;span&gt;&lt;span&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#96b5b4;&quot;&gt;\r&lt;&#x2F;span&gt;&lt;span&gt;&amp;quot; &amp;quot;&amp;quot; clipboard))
&lt;&#x2F;span&gt;&lt;span&gt;    (&lt;&#x2F;span&gt;&lt;span style=&quot;color:#96b5b4;&quot;&gt;setq&lt;&#x2F;span&gt;&lt;span&gt; clipboard (substring clipboard &lt;&#x2F;span&gt;&lt;span style=&quot;color:#d08770;&quot;&gt;0 &lt;&#x2F;span&gt;&lt;span&gt;-&lt;&#x2F;span&gt;&lt;span style=&quot;color:#d08770;&quot;&gt;1&lt;&#x2F;span&gt;&lt;span&gt;))
&lt;&#x2F;span&gt;&lt;span&gt;    clipboard))
&lt;&#x2F;span&gt;&lt;span&gt;
&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;defun &lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fa1b3;&quot;&gt;wsl-paste &lt;&#x2F;span&gt;&lt;span&gt;()
&lt;&#x2F;span&gt;&lt;span&gt;  &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;In a WSL2 environment, paste the text from the system clipboard.&lt;&#x2F;span&gt;&lt;span&gt;&amp;quot;
&lt;&#x2F;span&gt;&lt;span&gt;  (interactive)
&lt;&#x2F;span&gt;&lt;span&gt;  (&lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;if &lt;&#x2F;span&gt;&lt;span&gt;(derived-mode-p &amp;#39;vterm-mode)
&lt;&#x2F;span&gt;&lt;span&gt;      (vterm-insert (wsl-&lt;&#x2F;span&gt;&lt;span style=&quot;color:#96b5b4;&quot;&gt;get&lt;&#x2F;span&gt;&lt;span&gt;-clipboard))
&lt;&#x2F;span&gt;&lt;span&gt;    (insert (wsl-&lt;&#x2F;span&gt;&lt;span style=&quot;color:#96b5b4;&quot;&gt;get&lt;&#x2F;span&gt;&lt;span&gt;-clipboard))))
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;The commands are &lt;code&gt;wsl-copy&lt;&#x2F;code&gt; and &lt;code&gt;wsl-paste&lt;&#x2F;code&gt;, and their purposes are self-explanatory. Can we integrate further? Yes:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;lisp&quot; style=&quot;background-color:#2b303b;color:#c0c5ce;&quot; class=&quot;language-lisp &quot;&gt;&lt;code class=&quot;language-lisp&quot; data-lang=&quot;lisp&quot;&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;when &lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#96b5b4;&quot;&gt;string&lt;&#x2F;span&gt;&lt;span&gt;-match &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;WSL2&lt;&#x2F;span&gt;&lt;span&gt;&amp;quot; operating-system-release)
&lt;&#x2F;span&gt;&lt;span&gt;  (advice-add &amp;#39;gui-select-text :before
&lt;&#x2F;span&gt;&lt;span&gt;              (&lt;&#x2F;span&gt;&lt;span style=&quot;color:#96b5b4;&quot;&gt;lambda &lt;&#x2F;span&gt;&lt;span&gt;(text)
&lt;&#x2F;span&gt;&lt;span&gt;                (&lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;when&lt;&#x2F;span&gt;&lt;span&gt; select-enable-clipboard
&lt;&#x2F;span&gt;&lt;span&gt;                  (&lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;with&lt;&#x2F;span&gt;&lt;span&gt;-temp-buffer
&lt;&#x2F;span&gt;&lt;span&gt;                    (insert text)
&lt;&#x2F;span&gt;&lt;span&gt;                    (wsl-copy (point-min) (point-max)))))))
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Now pressing &lt;code&gt;M-w&lt;&#x2F;code&gt; automatically updates the Windows system clipboard. Unfortunately, this is only one-way synchronization; I have not yet found a way to make Emacs and Windows synchronize both ways.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;open-files-directly-from-windows&quot;&gt;Open Files Directly from Windows&lt;&#x2F;h2&gt;
&lt;p&gt;I recommend installing &lt;a href=&quot;https:&#x2F;&#x2F;wslu.wedotstud.io&#x2F;wslu&#x2F;&quot;&gt;&lt;code&gt;wslu&lt;&#x2F;code&gt;&lt;&#x2F;a&gt;. It includes a command called &lt;code&gt;wslview&lt;&#x2F;code&gt;, which opens paths or URIs using the Windows-side default program.&lt;&#x2F;p&gt;
&lt;p&gt;With this command, many integrations become possible. In Dired, for example:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;lisp&quot; style=&quot;background-color:#2b303b;color:#c0c5ce;&quot; class=&quot;language-lisp &quot;&gt;&lt;code class=&quot;language-lisp&quot; data-lang=&quot;lisp&quot;&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#96b5b4;&quot;&gt;setq&lt;&#x2F;span&gt;&lt;span&gt; dired-guess-shell-alist-user
&lt;&#x2F;span&gt;&lt;span&gt;        &amp;#39;((&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#96b5b4;&quot;&gt;\\&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;.pdf&lt;&#x2F;span&gt;&lt;span style=&quot;color:#96b5b4;&quot;&gt;\\&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;&amp;quot; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;wslview&lt;&#x2F;span&gt;&lt;span&gt;&amp;quot;)
&lt;&#x2F;span&gt;&lt;span&gt;          (&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#96b5b4;&quot;&gt;\\&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;.png&lt;&#x2F;span&gt;&lt;span style=&quot;color:#96b5b4;&quot;&gt;\\&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;&amp;quot; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;wslview&lt;&#x2F;span&gt;&lt;span&gt;&amp;quot;)
&lt;&#x2F;span&gt;&lt;span&gt;          (&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#96b5b4;&quot;&gt;\\&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;.jpg&lt;&#x2F;span&gt;&lt;span style=&quot;color:#96b5b4;&quot;&gt;\\&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;&amp;quot; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;wslview&lt;&#x2F;span&gt;&lt;span&gt;&amp;quot;)))
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;In practice, &lt;code&gt;xdg-open&lt;&#x2F;code&gt; also seems to work.&lt;&#x2F;p&gt;
&lt;p&gt;Another very useful command opens the current directory:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;lisp&quot; style=&quot;background-color:#2b303b;color:#c0c5ce;&quot; class=&quot;language-lisp &quot;&gt;&lt;code class=&quot;language-lisp&quot; data-lang=&quot;lisp&quot;&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;defun &lt;&#x2F;span&gt;&lt;span style=&quot;color:#8fa1b3;&quot;&gt;open-directory-here &lt;&#x2F;span&gt;&lt;span&gt;()
&lt;&#x2F;span&gt;&lt;span&gt;  &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;Open the current directory in the GUI file manager.
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;In most cases, this means the current directory of the current buffer.&lt;&#x2F;span&gt;&lt;span&gt;&amp;quot;
&lt;&#x2F;span&gt;&lt;span&gt;  (interactive)
&lt;&#x2F;span&gt;&lt;span&gt;  (shell-command (&lt;&#x2F;span&gt;&lt;span style=&quot;color:#96b5b4;&quot;&gt;format &lt;&#x2F;span&gt;&lt;span&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;%s %s&lt;&#x2F;span&gt;&lt;span&gt;&amp;quot; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;wslview&lt;&#x2F;span&gt;&lt;span&gt;&amp;quot; (shell-&lt;&#x2F;span&gt;&lt;span style=&quot;color:#96b5b4;&quot;&gt;quote&lt;&#x2F;span&gt;&lt;span&gt;-argument (&lt;&#x2F;span&gt;&lt;span style=&quot;color:#96b5b4;&quot;&gt;expand&lt;&#x2F;span&gt;&lt;span&gt;-file-name default-&lt;&#x2F;span&gt;&lt;span style=&quot;color:#96b5b4;&quot;&gt;directory&lt;&#x2F;span&gt;&lt;span&gt;)))))
&lt;&#x2F;span&gt;&lt;span&gt;(global-&lt;&#x2F;span&gt;&lt;span style=&quot;color:#96b5b4;&quot;&gt;set&lt;&#x2F;span&gt;&lt;span&gt;-key (kbd &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;C-c d&lt;&#x2F;span&gt;&lt;span&gt;&amp;quot;) &lt;&#x2F;span&gt;&lt;span style=&quot;color:#d08770;&quot;&gt;#&amp;#39;open-directory-here&lt;&#x2F;span&gt;&lt;span&gt;)
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;GUI Dired supports drag-and-drop, but WSL does not. This command partially solves that problem.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;browse-url&quot;&gt;&lt;code&gt;browse-url&lt;&#x2F;code&gt;&lt;&#x2F;h2&gt;
&lt;p&gt;In Emacs, &lt;code&gt;browse-url&lt;&#x2F;code&gt; opens URLs in the system default browser. By default it cannot directly open the Windows default browser. After some investigation, I found that &lt;code&gt;browse-url&lt;&#x2F;code&gt; thinks the current system is Linux, but has no GUI, so it gives up. Forcing a &lt;code&gt;DISPLAY&lt;&#x2F;code&gt; environment variable solves it:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;lisp&quot; style=&quot;background-color:#2b303b;color:#c0c5ce;&quot; class=&quot;language-lisp &quot;&gt;&lt;code class=&quot;language-lisp&quot; data-lang=&quot;lisp&quot;&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#b48ead;&quot;&gt;when&lt;&#x2F;span&gt;&lt;span&gt; is-wsl
&lt;&#x2F;span&gt;&lt;span&gt;  (setenv &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;DISPLAY&lt;&#x2F;span&gt;&lt;span&gt;&amp;quot; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;:0&lt;&#x2F;span&gt;&lt;span&gt;&amp;quot;))
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;h2 id=&quot;chinese-input&quot;&gt;Chinese Input&lt;&#x2F;h2&gt;
&lt;p&gt;In theory, Windows Terminal and WezTerm can both use Windows input methods directly. In practice, I encountered a strange problem: if I type quickly, Chinese characters easily lose one byte, causing Emacs to fail to recognize them:&lt;&#x2F;p&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;ksqsf.moe&#x2F;en&#x2F;posts&#x2F;2025-04-29-work-in-wsl&#x2F;.&#x2F;emacs-garbled-input.avif&quot; alt=&quot;Emacs garbled input&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
&lt;p&gt;This problem can also be reproduced in Windows Terminal. Because the WSL architecture is complex, I do not yet know who is to blame: Windows PTY, Emacs, WSL, or the terminal emulator.&lt;&#x2F;p&gt;
&lt;p&gt;So for comfortable typing, I recommend configuring &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;DogLooksGood&#x2F;emacs-rime&quot;&gt;emacs-rime&lt;&#x2F;a&gt;. I will not repeat how to configure Rime here. One caveat: &lt;code&gt;emacs-rime&lt;&#x2F;code&gt; cannot be used in &lt;code&gt;isearch&lt;&#x2F;code&gt;, because &lt;code&gt;isearch&lt;&#x2F;code&gt; does not use the minibuffer. &lt;a href=&quot;https:&#x2F;&#x2F;elpa.gnu.org&#x2F;packages&#x2F;isearch-mb.html&quot;&gt;isearch-mb&lt;&#x2F;a&gt; fixes this.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;latex-and-synctex&quot;&gt;LaTeX and SyncTeX&lt;&#x2F;h2&gt;
&lt;p&gt;Install TeX Live directly inside Linux. For reading, use the Windows-side PDF reader:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;lisp&quot; style=&quot;background-color:#2b303b;color:#c0c5ce;&quot; class=&quot;language-lisp &quot;&gt;&lt;code class=&quot;language-lisp&quot; data-lang=&quot;lisp&quot;&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#96b5b4;&quot;&gt;setq&lt;&#x2F;span&gt;&lt;span&gt; TeX-view-program-selection &amp;#39;((output-pdf &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;wslview&lt;&#x2F;span&gt;&lt;span&gt;&amp;quot;)))
&lt;&#x2F;span&gt;&lt;span&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#96b5b4;&quot;&gt;setq&lt;&#x2F;span&gt;&lt;span&gt; TeX-view-program-&lt;&#x2F;span&gt;&lt;span style=&quot;color:#96b5b4;&quot;&gt;list&lt;&#x2F;span&gt;&lt;span&gt; &amp;#39;((&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;wslview&lt;&#x2F;span&gt;&lt;span&gt;&amp;quot; (&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;wslview &amp;#39;%o&amp;#39;&lt;&#x2F;span&gt;&lt;span&gt;&amp;quot;))))
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;You can also let the PDF reader jump back to source code using SyncTeX information. For SumatraPDF, enter the following command in Settings -&amp;gt; Options -&amp;gt; Set inverse search command-line:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;bash&quot; style=&quot;background-color:#2b303b;color:#c0c5ce;&quot; class=&quot;language-bash &quot;&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;wsl&lt;&#x2F;span&gt;&lt;span&gt; emacsclient&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt; -n&lt;&#x2F;span&gt;&lt;span&gt; +%&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;l&lt;&#x2F;span&gt;&lt;span&gt;:%&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;c &lt;&#x2F;span&gt;&lt;span&gt;&amp;quot;$&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#bf616a;&quot;&gt;wslpath &lt;&#x2F;span&gt;&lt;span&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;%f&lt;&#x2F;span&gt;&lt;span&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#a3be8c;&quot;&gt;)&lt;&#x2F;span&gt;&lt;span&gt;&amp;quot;
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Here &lt;code&gt;l&lt;&#x2F;code&gt;, &lt;code&gt;c&lt;&#x2F;code&gt;, and &lt;code&gt;f&lt;&#x2F;code&gt; are the line number, column number, and file path. &lt;code&gt;wslpath&lt;&#x2F;code&gt; converts a Windows-style filename into a filename usable inside WSL.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;boot-into-emacs&quot;&gt;Boot into Emacs&lt;&#x2F;h2&gt;
&lt;p&gt;I added this to the end of &lt;code&gt;~&#x2F;.profile&lt;&#x2F;code&gt;:&lt;&#x2F;p&gt;
&lt;pre data-lang=&quot;bash&quot; style=&quot;background-color:#2b303b;color:#c0c5ce;&quot; class=&quot;language-bash &quot;&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span style=&quot;color:#96b5b4;&quot;&gt;exec&lt;&#x2F;span&gt;&lt;span&gt; emacs
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Now, whenever I open WSL, it automatically starts inside Emacs. It is almost hard to tell the difference from a standalone Emacs.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;another-reason-to-use-wsl-emacs&quot;&gt;Another Reason to Use WSL Emacs&lt;&#x2F;h2&gt;
&lt;p&gt;I did install native Windows Emacs, but strangely, my configuration takes 18 seconds to start there. In contrast, WSL TUI Emacs only takes 1.3 seconds.&lt;&#x2F;p&gt;
&lt;h1 id=&quot;end&quot;&gt;End&lt;&#x2F;h1&gt;
&lt;p&gt;These are the points worth mentioning for now.&lt;&#x2F;p&gt;
&lt;p&gt;Overall, WSL feels good. I have been using WSL for recent work and have not encountered any truly insurmountable problems.&lt;&#x2F;p&gt;
</description>
      </item>
      <item>
          <title>Notes on Tinkering with Rime Double Pinyin</title>
          <pubDate>Thu, 01 Jun 2023 17:07:59 +0800</pubDate>
          <author>ksqsf</author>
          <link>https://ksqsf.moe/en/posts/2023-06-01-rime-double-pinyin/</link>
          <guid>https://ksqsf.moe/en/posts/2023-06-01-rime-double-pinyin/</guid>
          <description xml:base="https://ksqsf.moe/en/posts/2023-06-01-rime-double-pinyin/">&lt;blockquote&gt;
&lt;p&gt;Disclaimer: This post was translated into English by an AI model. It may contain mistakes or awkward wording.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;Since last June, when I began learning shape-based input methods again, I somehow wandered into the bottomless world of Chinese input methods. After becoming familiar with various input schemes, I also started tinkering with schemes myself. What surprised me during this process was that Rime can completely realize my idea of &quot;double-pinyin plus auxiliary shape codes with sentence input&quot;, and the cost is quite low. To spread the Rime gospel, and to promote my idea, this post describes in detail how I implemented my input scheme in Rime and explains some of the difficulties and solutions.&lt;&#x2F;p&gt;</description>
      </item>
      <item>
          <title>Haskell as a non-toy</title>
          <pubDate>Thu, 03 Jun 2021 00:00:00 +0000</pubDate>
          <author>ksqsf</author>
          <link>https://ksqsf.moe/en/posts/2021-06-03-haskell-as-a-non-toy/</link>
          <guid>https://ksqsf.moe/en/posts/2021-06-03-haskell-as-a-non-toy/</guid>
          <description xml:base="https://ksqsf.moe/en/posts/2021-06-03-haskell-as-a-non-toy/">&lt;blockquote&gt;
&lt;p&gt;Disclaimer: This post was translated into English by an AI model. It may contain mistakes or awkward wording.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;I recently spent some time using Haskell in practice. This post summarizes some of my impressions.&lt;&#x2F;p&gt;</description>
      </item>
      <item>
          <title>G.E.B. -- A Mental Space Odyssey</title>
          <pubDate>Tue, 25 Aug 2020 00:00:00 +0000</pubDate>
          <author>ksqsf</author>
          <link>https://ksqsf.moe/en/posts/2020-08-25-geb/</link>
          <guid>https://ksqsf.moe/en/posts/2020-08-25-geb/</guid>
          <description xml:base="https://ksqsf.moe/en/posts/2020-08-25-geb/">&lt;blockquote&gt;
&lt;p&gt;Disclaimer: This post was translated into English by an AI model. It may contain mistakes or awkward wording. A long quoted passage from the book is summarized rather than translated in full.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;&lt;em&gt;Gödel, Escher, Bach: An Eternal Golden Braid&lt;&#x2F;em&gt; is a fascinating book that is hard to put down. I hope this short reading note can make more people interested in it.&lt;&#x2F;p&gt;</description>
      </item>
      <item>
          <title>Interpreting Implication</title>
          <pubDate>Sun, 23 Aug 2020 00:00:00 +0000</pubDate>
          <author>ksqsf</author>
          <link>https://ksqsf.moe/en/posts/2020-08-23-implication/</link>
          <guid>https://ksqsf.moe/en/posts/2020-08-23-implication/</guid>
          <description xml:base="https://ksqsf.moe/en/posts/2020-08-23-implication/">&lt;blockquote&gt;
&lt;p&gt;Disclaimer: This post was translated into English by an AI model. It may contain mistakes or awkward wording.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;The first difficulty in propositional logic is how to interpret implication. Logic textbooks give many explanations, but few give a more direct way to understand it. Here I try to derive the truth table for implication directly from the perspective of monotonic reasoning.&lt;&#x2F;p&gt;</description>
      </item>
      <item>
          <title>Quantum Mechanics in Linear Algebra</title>
          <pubDate>Tue, 26 Feb 2019 00:00:00 +0000</pubDate>
          <author>ksqsf</author>
          <link>https://ksqsf.moe/en/posts/2019-02-26-qm-in-la/</link>
          <guid>https://ksqsf.moe/en/posts/2019-02-26-qm-in-la/</guid>
          <description xml:base="https://ksqsf.moe/en/posts/2019-02-26-qm-in-la/">&lt;blockquote&gt;
&lt;p&gt;Disclaimer: This post was translated into English by an AI model. It may contain mistakes or awkward wording.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;Not long ago I accidentally dug up a course assignment I wrote last year for a class on frontiers of pure mathematics. I had just finished reading &lt;em&gt;Quantum Mechanics: The Theoretical Minimum&lt;&#x2F;em&gt;, so I wrote about elementary quantum mechanics. Because it was rushed, it is not very detailed; for example, it does not even mention density matrices. Its main emphasis is on eigenvalues. Perhaps it is useful as a simple summary or introduction to quantum mechanics, so I rewrote the LaTeX into Markdown and posted it here. &lt;del&gt;It does feel a bit like filler.&lt;&#x2F;del&gt;&lt;&#x2F;p&gt;
&lt;p&gt;The title is deliberately written this way, to emphasize that I know absolutely nothing about quantum mechanics.&lt;&#x2F;p&gt;</description>
      </item>
      <item>
          <title>Fun with Dependent Types</title>
          <pubDate>Mon, 18 Feb 2019 00:00:00 +0000</pubDate>
          <author>ksqsf</author>
          <link>https://ksqsf.moe/en/posts/2019-02-18-dt-fun/</link>
          <guid>https://ksqsf.moe/en/posts/2019-02-18-dt-fun/</guid>
          <description xml:base="https://ksqsf.moe/en/posts/2019-02-18-dt-fun/">&lt;blockquote&gt;
&lt;p&gt;Disclaimer: This post was translated into English by an AI model. It may contain mistakes or awkward wording.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;This post is about dependent types. Many people, even programmers with years of experience, may not have encountered the idea. In short, if a type &lt;strong&gt;depends on something that is not itself a type&lt;&#x2F;strong&gt;, it is a dependent type. I am not an expert on this topic, so why did I suddenly decide to write about it? Because I just finished reading &lt;em&gt;The Little Typer&lt;&#x2F;em&gt;, found it fresh and fascinating, and wanted to write something down. If I can share some of that fun with you, I will be very happy. (^_^)&lt;&#x2F;p&gt;</description>
      </item>
      <item>
          <title>What Does a Linux Distribution Mean?</title>
          <pubDate>Sat, 03 Mar 2018 00:00:00 +0000</pubDate>
          <author>ksqsf</author>
          <link>https://ksqsf.moe/en/posts/2018-03-03-what-is-a-linux-distro/</link>
          <guid>https://ksqsf.moe/en/posts/2018-03-03-what-is-a-linux-distro/</guid>
          <description xml:base="https://ksqsf.moe/en/posts/2018-03-03-what-is-a-linux-distro/">&lt;blockquote&gt;
&lt;p&gt;Disclaimer: This post was translated into English by an AI model. It may contain mistakes or awkward wording.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;Recent activity around projects such as Flatpak made me think more deeply about the package-management philosophy behind the major Linux distributions. Today I read &lt;a href=&quot;https:&#x2F;&#x2F;tingping.github.io&#x2F;2018&#x2F;03&#x2F;02&#x2F;when-distros-get-it-wrong.html&quot;&gt;TingPing&#x27;s post about Debian XChat&lt;&#x2F;a&gt;, which prompted me to write down my own thoughts.&lt;&#x2F;p&gt;</description>
      </item>
    </channel>
</rss>
