←back to thread

An SVG is all you need

(jon.recoil.org)
281 points sadiq | 5 comments | | HN request time: 0s | source
Show context
some_guy_nobel ◴[] No.46238219[source]
I agree with the author when they write:

""" In my idealistic vision of how scientific publishing should work, each paper would be accompanied by a fully interactive environment where the reader could explore the data, rerun the experiments, tweak the parameters, and see how the results changed. """

I do like seeing larger labs/companies releasing research full of SVGs. In recent memory, I quite liked this from NVIDIA:

https://research.nvidia.com/labs/dbr/blog/illustrated-evo2/

replies(5): >>46239200 #>>46239591 #>>46240330 #>>46243492 #>>46243626 #
1. mmooss ◴[] No.46239591[source]
Without the OP's proposed use of SVG, what format would someone use? PDFs won't handle it well - unless PDF's interactivity capabilities are much better than I think. We never developed a client-side multimedia file format; all we have are text formats like Word and PDF, which embed images decently, and embed multimedia and interactivity (beyond form filling) in awkwardly and in a limited manner.
replies(1): >>46239815 #
2. steezeburger ◴[] No.46239815[source]
What's wrong with SVG? Notebooks have their issues but are kinda this conceptually. I guess FLAs and Flash too. But you say we never developed a "client-side multimedia file format". Is that not exactly what html + js are for?
replies(1): >>46240147 #
3. mmooss ◴[] No.46240147[source]
I mean the equivalent of a Word document: a file I can reasonably edit, including editing the multimedia and interactive/dynamic content, save, email, put on a thumb drive or Dropbox, etc.
replies(2): >>46242631 #>>46242804 #
4. Agraillo ◴[] No.46242631{3}[source]
I'd say that html+js suggestion of GP still holds, but with caveats. After all these years, HTML has everything needed for this, including images that can be embedded via the data URI scheme [1].

For example, I once adjusted an Object Pascal interactive program (target: Windows/Win32) for the browser target (FreePascal compiler has the JS target). An intermediate result was a bunch of files that worked locally on desktop but struggled on mobile. With a little help from the SingleFile extension [2], I ended up with a single HTML file containing all functionality and content. It worked great, for example, in MiXplorer's internal HTML viewer. I can't recall the exact details, but the file:/// protocol still had issues in Chrome, Firefox, or both. Anyway, preparing a local address correctly with a keyboard is a challenge so let's just assume that having capable file managers running local html files is enough

Sure, to make this manageable, you need good tools that handle all sides of the task. But at least in theory, the format is fully capable. My only global issue was that the state for locally run HTML files is a kind of ephemeral entity, but for interactive multimedia files, you may consider this obstacle small.

[1] https://en.wikipedia.org/wiki/Data_URI_scheme

[2] https://github.com/gildas-lormeau/SingleFile

5. cl3misch ◴[] No.46242804{3}[source]
I think HTML is exactly the "client-side multimedia file format" you want. I guess what we don't have is an established editor UI. You have to create it yourself.

It's if we had the .docx format but MS Word was read-only. You would have to create the XML and zip it yourself, to be then rendered by Word. That's effectively how I see HTML+js in browsers.