Live data from Hacker News

An SVG is all you need

jon.recoil.org

61–70 of 155 posts

Re: An SVG is all you need

#61
post #40

Even though the article is mostly talking about visualizations, but I thought I'd share that I did at one point build a dance choreography software that renders the UI entirely SVG. I was surprised as to how well that worked. If you're curious, it's called StageKeep, and you can find it here. https://stagekeep.com/ The original project used React Three Fiber, but refactored it to SVG for reasons I don't quite remembe…

Very cool. Are you a dancer yourself?

Re: An SVG is all you need

#63

I love SVG! Recently I needed to render markdown in SVG and found no library existed for that yet so I released one: github: https://github.com/davefowler/markdown-svg playground: https://markdown-svg-production.up.railway.app

I assume the goal is to get rid of all foreignObject uses eventually? (Otherwise it would be easier yo render one big foreignObject and convert everything to HTML)

Anyways, impressive, but what I’d really love to see is flexbox for SVG ;)

Re: An SVG is all you need

#66
post #53

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 NVIDI…

Interactive and SVGs don't really mix, although intuitively it would seem that they do. Rendering remotely complex SVGs tale multiple seconds, while any kind of interactivity demands ~30+ frames per seconds. Without interactivity, postscript is vector graphics too.

I'd be curious to know what classes as complex for you, since ive done some frankly crazy stuff with svg's, which outperformed any raster implementation. Ultimately, poor performance was always my fault, especially initially when i was still treating it with paradigms better suited to the world of raster graphics.

Re: An SVG is all you need

#67
Two years ago I re-vamped my "Spurious Correlations" side project, which is mostly just a bunch of charts. However, I couldn't find a charting software I liked that would display clean, simple visuals with the constraints I wanted. (I had used pCharts and HighCharts in the past, but didn't like charting in Javascript or PHP.)

I decided to "roll my own" and write Python scripts that outputted SVG markup. I was worried this would go about as well as every other "roll your own" project does, but was pleasantly surprised. It is surprisingly easy to output reliable, good-looking SVG graphics using Python. If you are making a chart, everything is just math.

The infinite scalability is almost just a happy upside to the simplicity of creating the visualizations, which is annoying in raster format. It made me like SVG even more.

Re: An SVG is all you need

#68

Two years ago I re-vamped my "Spurious Correlations" side project, which is mostly just a bunch of charts. However, I couldn't find a charting software I liked that would display clean, simple visuals with the constraints I wanted. (I had used pCharts and HighCharts in the past, but didn't like charting in Javascript or PHP.) I decided to "roll my own" and write Python scripts that outputted SVG markup. I was worried…

It's a bit sad that Postscript never caught on as much as it could have. In an alternate timeline, it could have been the HTML (and SVG) we got in ours.

Re: An SVG is all you need

#69
post #59

Earlier quoted context omitted.

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.

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?

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.

Re: An SVG is all you need

#70
post #68

Two years ago I re-vamped my "Spurious Correlations" side project, which is mostly just a bunch of charts. However, I couldn't find a charting software I liked that would display clean, simple visuals with the constraints I wanted. (I had used pCharts and HighCharts in the past, but didn't like charting in Javascript or PHP.) I decided to "roll my own" and write Python scripts that outputted SVG markup. I was worried…

It's a bit sad that Postscript never caught on as much as it could have. In an alternate timeline, it could have been the HTML (and SVG) we got in ours.

Postscript is still everywhere. Its just out of sight, being used as a compile target.

PDF may have "officially" replaced it, but it is still embedded almost everywhere you look.

Post reply on HN