Live data from Hacker News

Vim.wasm

rhysd.github.io

131–140 of 291 posts

Re: Vim.wasm

#131
post #7

I thought I was getting stuck in insert mode, and I got fairly frustrated before realizing my Vim keybindings browser extension was grabbing ESC and keeping it from this weird browser-Vim. We brought this abomination on ourselves.

  Ctr+[
Vim-ing on devices with not physical Esc key makes you get used to this (default configured, no extra keymapping required) Esc alternative :P

Re: Vim.wasm

#132
post #22

This is absolutely incredible. I never thought this would be possible-- wasm opens a new phase of software development and deployment.

Or just use regular Vim and not think that everything needs to run inside of a web browser, especially if you value user privacy and computer resources.

There is some benefits you may not see atm...

I'd love to have my VIM with my config just available as a web service to use it on every device! That's what I already love about NextCloud and the likes - just one install and every device can access it. If you know how you can also make it secure enough for every day stuff - I think to be really secure going offline is not enough anymore.

Re: Vim.wasm

#133

Earlier quoted context omitted.

The reason is interesting as well. Paraphrasing from this blog post[0] When you format the ASCII table in four columns, you can see `ESC` and `[` on the same row. Holding `CTRL` essentially ~lops off the first three bits~ subtracts 64, resulting in `ESC` ... ... 0011000 CAN 0111000 8 1011000 X 1111000 x 0011001 EM 0111001 9 1011001 Y 1111001 y 0011010 SUB 0111010 : 1011010 Z 1111010 z 0011011 ESC 0111011 ; 1011011 […

> Holding `CTRL` essentially lops off the first three bits No, it inverts the 7th bit (or subtracts 64). The Linux `ascii(7)` man page has a similar table, but with 2 columns. The first 32 control characters listed there have their "caret notation" character in the opposite column.

Thanks! Listen to this person ^

Re: Vim.wasm

#134
post #66

Earlier quoted context omitted.

Someone from the era of short usernames on unix boxes, along with "esr" and "rob". To more directly answer, it's Richard Stallman. Known for the free software movement and emacs among other things.

ESR is a poseur who doesn't belong next to those other names.

I totally disagree. I don't agree with anything he believes in outside of software as far as I can tell, but the Cathedral and Bazaar was pivotal. Not only that, but if you've never looked at the source code for Nethack, you should. I admit, I haven't looked at it since he was leading the project, but it remains in my mind as one of the best pieces of C code I've ever played with. Also, his description of working with Fetchmail revolutionised (at least for me) the idea of just taking some code that someone else has abandoned and slowly improving it.

He never understood software freedom, but as far as I can tell he is responsible for communicating the way that free (as in freedom) software can be competitive in the real world. Before that, all anyone would talk about was how we had to have free software for moral reasons (which I personally believe). He was the one that saw how successful projects were being run, put 2 and 2 together and told everybody else how to do it. I have much respect for ESR and I wish that the good things he has done had a wider audience.

Re: Vim.wasm

#135

This is pretty dope, but I'm terrified about the fact that Firefox lets it take over Ctrl+L, Ctrl+1, or any other way (that I can find, at least) of breaking out of Vim with a keyboard aside from closing the tab with Ctrl+W - which is even more terrifying since I use that in Vim a ton, too :O ...but this is pretty cool :D

The actual issue is that Windows and Linux don't properly use a ‘super’ key―while the ‘Win’ key is sitting there uselessly.

Ironically, MS' own ‘ergonomic’ (cough) keyboards have gigantic Win keys, right under the thumbs which are the strongest digits. These keys are great to use on Mac, it's an eye-opener as to how the historical keyboard mutations ended up in just the wrong way for two platforms (and for Emacs).

I could also say some things about the nonsensical shape of keyboards and the moronic replication of the typewriters' staggered key layout...

Re: Vim.wasm

#136

Earlier quoted context omitted.

The reason is interesting as well. Paraphrasing from this blog post[0] When you format the ASCII table in four columns, you can see `ESC` and `[` on the same row. Holding `CTRL` essentially ~lops off the first three bits~ subtracts 64, resulting in `ESC` ... ... 0011000 CAN 0111000 8 1011000 X 1111000 x 0011001 EM 0111001 9 1011001 Y 1111001 y 0011010 SUB 0111010 : 1011010 Z 1111010 z 0011011 ESC 0111011 ; 1011011 […

> Holding `CTRL` essentially lops off the first three bits No, it inverts the 7th bit (or subtracts 64). The Linux `ascii(7)` man page has a similar table, but with 2 columns. The first 32 control characters listed there have their "caret notation" character in the opposite column.

Is this why the symbol for Ctrl is also commonly the symbol for xor?!

Re: Vim.wasm

#137

Earlier quoted context omitted.

> Holding `CTRL` essentially lops off the first three bits No, it inverts the 7th bit (or subtracts 64). The Linux `ascii(7)` man page has a similar table, but with 2 columns. The first 32 control characters listed there have their "caret notation" character in the opposite column.

Is this why the symbol for Ctrl is also commonly the symbol for xor?!

I'm not sure. I think the caret is just a prefix to make it distinguishable from the normal letters.

It is the reason why Ctrl+i in a terminal is the same as Tab though. Likewise for Ctrl+m == Enter.

Re: Vim.wasm

#138
post #7

I thought I was getting stuck in insert mode, and I got fairly frustrated before realizing my Vim keybindings browser extension was grabbing ESC and keeping it from this weird browser-Vim. We brought this abomination on ourselves.

:imap jk

Will change your life man.

Re: Vim.wasm

#139

How do Emscripten cross-compiled things and WASM compiled things handle the display? Is it a framebuffer they blindly draw to, do they need shim layers added to interpret normal output to window-scaled in-browser output?

In this example, author implements custom UI layer as it is described in readme "WebAssembly frontend for Vim is implemented as a new GUI frontend". Input and output is handled in JS side but core functionality resides on WebAssembly part. I am not familiar with Vim but probably I/O is well seperated from logic code so it might be easier to modify it to work on browser but I actually don't know how it is working for other applications.

Re: Vim.wasm

#140
post #131
post #7

I thought I was getting stuck in insert mode, and I got fairly frustrated before realizing my Vim keybindings browser extension was grabbing ESC and keeping it from this weird browser-Vim. We brought this abomination on ourselves.

Ctr+[ Vim-ing on devices with not physical Esc key makes you get used to this (default configured, no extra keymapping required) Esc alternative :P

In many terminals (especially old ones), Ctrl-3 also commonly gives ESC.
Post reply on HN