Live data from Hacker News

LibreOffice running natively in the browser via WebAssembly

lab.allotropia.de

171–180 of 216 posts

Re: LibreOffice running natively in the browser via WebAssembly

#171

What the hell. This feels basically native?! I had no idea WebAssembly was this far developed. This feels like electron in reverse, and GOOD.

Define "this far".

The toolchains for webassembly are still not trivial to use.

I wish more work was done to support WASM, but it requires a lot of work from compiler developers, for each language backend, so it's still a lot of work.

Not to mention that I have almost no clue how to debug a WASM build.

WASM is clearly the future, but I don't think there is any company really spending money to write better WASM tools, and you can be sure WASM is against the interests of google, apple, microsoft etc.

Re: LibreOffice running natively in the browser via WebAssembly

#172
Something like this was tried before. The year was ~1995 and the trough of disillusionment for Java applets was far in the future. WordPerfect decided that the future was the web and they wanted in. They ported WordPerfect to Java and and published an applet. The applet was huge (at least 10's of MB), particularly so when fast internet access for most meant a 28.8k modem.

After the excruciating wait for it to load, it crashed. I would have been happier if it would have at least flashed a message "don't forget to drink your Ovaltine."

A quarter of a century later, this attempt works much better.

Re: LibreOffice running natively in the browser via WebAssembly

#174
post #118

Earlier quoted context omitted.

300 MiB. & … "a bit" — it takes nearly 20 seconds on "Gigabit" fiber. (312 MiB in 19.22s, or 136 Mbps.) Runs shockingly smoothly once it starts, though.

It runs smoothly for me when zoomed out but when you zoom in on a page it starts to lag. Nevertheless its quite amazing to see LibreOffice running in the browser.

"its quite amazing to see LibreOffice running in the browser"

You should see jslinux:

https://bellard.org/jslinux/

Re: LibreOffice running natively in the browser via WebAssembly

#176
post #46

Wait... Isn't LO a Java application? Have we created a new way to shove Java into a browser, but this time with the JVM itself inside the browser ?

I think you're confusing it with OpenOffice. IIRC LibreOffice is mostly C/C++.

OpenOffice wasn't written in Java either. They did have a few small Java components (for example, HSQL) but it it was predominantly C++.

Re: LibreOffice running natively in the browser via WebAssembly

#177
post #171

What the hell. This feels basically native?! I had no idea WebAssembly was this far developed. This feels like electron in reverse, and GOOD.

Define "this far". The toolchains for webassembly are still not trivial to use. I wish more work was done to support WASM, but it requires a lot of work from compiler developers, for each language backend, so it's still a lot of work. Not to mention that I have almost no clue how to debug a WASM build. WASM is clearly the future, but I don't think there is any company really spending money to write better WASM tools,…

Why is it against the interests of large tech companies? I get Apple, but Google is always pretty eager about the advancement of the web platform, see Chrome and Chrome OS.

Re: LibreOffice running natively in the browser via WebAssembly

#178

I started experimenting with Go-WASM recently and learnt that writing non-blocking code is very crucial, Timer even inside a Goroutine blocks & crashes WASM. Leading me to use unreliable JS timers(albeit mitigating it with a worker) and performing only non-blocking compute on WASM. Is this just a consequence of using Go for WASM(i.e. lack of WASM threads), What are people who built LibreOffice in WASM or Doom3 using?…

You may want to file a bug on Go - I believe goroutines should work, including swapping between them. The code is emitted in a form that allows that (switch-in-a-loop pattern).

Another thing you can try is TinyGo, whch uses Asyncify (a general wasm transformation to allow blocking) for goroutines,

https://twitter.com/TinyGolang/status/1461364896197578759

Doom3 uses Asyncify in some parts of the event loop, for similar reasons (blocking code). I'm not sure if LibreOffice does as well, but it might.

Re: LibreOffice running natively in the browser via WebAssembly

#179
post #129

Earlier quoted context omitted.

I meant Electron brought webapps to the Desktop. Now Web Assembly seems to bring native apps to the browser.

So the next step would be to write "electron-browserify.js" which emulates a JS runtime in browser so you can run Electron apps remote.

Well someone has already got WebKit to run in WASM[1] so hey, maybe it’s not that far off :D

[1]: https://github.com/trevorlinton/webkit.js

Re: LibreOffice running natively in the browser via WebAssembly

#180

I remember when LibreOffice was called Star Office and would run like molasses on a Celeron 300A OC to 450mhz machine. The office suite would take up most of the ram and eventually crash due to system resource exhaustion. Now we can run the whole thing in a browser like it's Minesweeper. Wow.

I can always remember thinking 10+ years ago that browsers would never be able to run 'proper' applications like Photoshop and Office, and would just be limited to CRUD style apps (around the times of IE6 when even basic CSS was buggy and hard to get right on multiple browsers). Now I only use Figma - and never open Photoshop (for UI design). I rarely open MS Office, use google docs without thinking.

Data is still a problem for audio and video apps, because there can be so much of it.
Post reply on HN