Live data from Hacker News

Vim.wasm

rhysd.github.io

121–130 of 291 posts

Re: Vim.wasm

#121
post #66
post #56

Earlier quoted context omitted.

Who is RMS?

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.

Re: Vim.wasm

#122
post #88
post #87

Earlier quoted context omitted.

Wasm is company and technology independent and went through the proper process for becoming a standard rather than being forced in by some corp hoping to take over the internet. It also doesn't have any of the security issues because its limited to things JavaScript can do.

Both alternatives that I mentioned, Flash and PNaCL did have open source implementations available, it is just a matter of following the links I posted. WASM doesn't offer any security over internal data corruption as buffer access within linear memory aren't validated for data bounds or nullability. So it is possible, for a WASM module generated from C or C++ code, to provide input data to its functions in such a wa…

Wasm linear memory is a building block, if you want higher security boundaries, stitch together multiple Wasm envs and communicate via webworkers.

Wasm is nearly identical, but different in the ways that matter. You are being blinded by being ahead of the curve, but the curve has moved now.

Re: Vim.wasm

#123
post #83
post #22

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

Yeah, right. As if Flash ( http://adobe-flash.github.io/crossbridge/ ), PNaCL ( https://developer.chrome.com/native-client/reference/pnacl-b... ) never existed.

CrossBridge is a cross compiler. Where is the open source flash runtime?

Re: Vim.wasm

#124
post #93

I wonder if this will be useful for electron based editors like vscode's vim plugin. I know the plugin is "good" but I always find something that works in vim and doesn't in the plugin and end up going back to my terminal.

I heard that you could embed neovim for that sort of thing, since neovim has an ipc. I don't know how well the feature is maintained though.

Re: Vim.wasm

#125

Does anyone know if lynx plans on supporting wasm? I'd like to try this editor in a terminal.

At this point, the easier route to getting a text-based browser to support something like this would be creating a new one based on WebKit/Blink. It would probably need to get the engine to draw to a fake screen buffer and run an OCR algorithm over that. And even if the OCR and layout worked well, there would be a lot other work necessary to get reasonable text based interactivity, though that's probably partially so…

> OCR

Hey, dial back the blasphemy there. HTML is not PDF, it's usually made from text in the first place.

I'd guess you could force all text to use a monospace font, with fixed measures and line-height, and limit the width of the page. Then mostly dump the resulting text arrangement into the terminal.

Now, layouts from the various elements and CSS are probably a lot trickier, but snapping all margins and padding to multiples of a symbol's size should go a long way.

It seems that this could even be embedded at different levels in the browser: the layout engine or just the user's JS. (If JS can obtain the exact layout of text lines and elements―likely not, though, especially in forms. Maybe via devtools.)

Re: Vim.wasm

#126
post #125

Earlier quoted context omitted.

At this point, the easier route to getting a text-based browser to support something like this would be creating a new one based on WebKit/Blink. It would probably need to get the engine to draw to a fake screen buffer and run an OCR algorithm over that. And even if the OCR and layout worked well, there would be a lot other work necessary to get reasonable text based interactivity, though that's probably partially so…

> OCR Hey, dial back the blasphemy there. HTML is not PDF, it's usually made from text in the first place. I'd guess you could force all text to use a monospace font, with fixed measures and line-height, and limit the width of the page. Then mostly dump the resulting text arrangement into the terminal. Now, layouts from the various elements and CSS are probably a lot trickier, but snapping all margins and padding to…

> HTML is not PDF, it's usually made from text in the first place.

I don't know, man. Most websites would be smaller if they were replaced by a HD video of someone reading the contents.

Re: Vim.wasm

#127
post #40

Will wasm ever use html/css properly? Or will it just be more like flash?

It can already interact with the dom and people are working on making this more seamless and faster.

The real question would be: why would you do that when you can instead use any proper native UI toolkit?

Answer: it's now a choice. If you need command line stuff like vi running smoothly in a browser, the DOM is an obstacle, not a solution. If on the other hand you want a wasm application driving the DOM and generally looking and feeling like a web app, you can do that as well. There are several frameworks emerging for rust, kotlin, C#, and other languages that do exactly that and that use bindings for the DOM and other APIs you have in javascript in a browser. Basically, you are writing normal dom/html/css based applications; except it all compiles down to wasm and does not involve any javascript.

Re: Vim.wasm

#128

Does anyone know if lynx plans on supporting wasm? I'd like to try this editor in a terminal.

It would need to have its HTTP code gutted and replaced with something that uses JS's XMLHttpRequest or the request API, but I think that's all you'd need to change.
Post reply on HN