FAQ
Login
GNU social JPは日本のGNU socialサーバーです。
Usage
/
ToS
/
admin
/
test
/
Pleroma FE
Public
Public
Network
Groups
Featured
Popular
People
Embed Notice
HTML Code
<blockquote style="position: relative; padding-left: 55px;"><section><a href="https://social.jvns.ca/users/b0rk/statuses/114196639706597725">Julia Evans (b0rk@social.jvns.ca)'s status on Saturday, 22-Mar-2025 06:28:41 JST</a><a href="https://social.jvns.ca/@b0rk" title="b0rk@social.jvns.ca"><img src="https://gnusocial.jp/avatar/88850-48-20230116234922.webp" width="48" height="48" alt="Julia Evans" style="position: absolute; left: 0; top: 0;">Julia Evans</a></section><article><p>canonical mode</p></article><footer><a rel="bookmark" href="https://gnusocial.jp/conversation/4772104#notice-9348181">In conversation</a><time datetime="2025-03-22T06:28:41+09:00" title="Saturday, 22-Mar-2025 06:28:41 JST">about 15 days ago</time> <span>from <span><a href="https://social.jvns.ca/@b0rk/114196639706597725" rel="external" title="Sent from social.jvns.ca via ActivityPub">social.jvns.ca</a></span></span><a href="https://social.jvns.ca/@b0rk/114196639706597725">permalink</a><h4>Attachments</h4><ol><li><label><a rel="external" href="https://gnusocial.jp/attachment/4340632">panel 1: the terminal driver: an interface that hasn't changed since the 80sperson: “I pressed an arrow key and it just printed out ^[[D???” terminal driver: “what's an arrow key?"panel 2: when you're typing text, there are two situations1. by default: the terminal driver (part of the OS) is responsible"canonical mode"2. the program is responsible“raw mode”panel 3: "canonical mode" is a terrible way to edit textbecause the terminal driver hasn't changed much since the 80s, you can only do:1. backspace 2. Ctrl+W (delete word) 3. Ctrl+U (delete line) panel 4: how canonical mode works1. you type "helll" + backspace 2. the terminal emulator turns what you typed into bytes 3. the terminal driver passes on "hell" and interprets the backspace 4. the program gets "hello\n"In canonical mode, terminal driver doesn't send anything to the program until you press Enter.In raw mode, the terminal driver just sends “hell\xFFo\n” without changing itpanel 5: how to try out canonical modeRun `cat` and type some stuff!Interactive programs almost never use canonical mode because it's so limited. But if you run into it `rlwrap $COMMAND` can help</a></label><br><a href="https://cdn.masto.host/socialjvnsca/media_attachments/files/114/196/639/425/627/496/original/0c4f46cd9086206c.png" rel="external">https://cdn.masto.host/socialjvnsca/media_attachments/files/114/196/639/425/627/496/original/0c4f46cd9086206c.png</a></li></ol></footer></blockquote>
Corresponding Notice
Embed this notice
Julia Evans (b0rk@social.jvns.ca)'s status on Saturday, 22-Mar-2025 06:28:41 JST
Julia Evans
canonical mode