I was today years old when I realized that just like OBJ files are really useful to write while debugging 3D stuff, SVG files are useful for 2D cases! So obvious, but I never did it before! Well, turns out an old dog can still learn some new tricks. Example: https://projects.blender.org/blender/blender/pulls/156622

@aras I recently briefly used SVG as a makeshift timeline visualization for profiling!

Unfortunately I soon found out that neither web browsers nor inkscape can really handle Large SVGs so I ultimately switched to simple binary dumps and a standalone timeline viewer built with SDL_Renderer...

@scherzog yeah very much like you wouldn't want to dump "something really complex" 3D into OBJ, there are practical limits how much 2D stuff you can dump into SVG before it becomes not usable :/

@aras Yeah I used SVG dumps a few weeks ago to debug!

The big downside is that "obvious" viewers are pretty bad at handling large files :(

One other annoyance is that SVG doesn't seem to have layering/Z indices, which makes it non ideal for dissecting parts in the viewer, and forces a specific output flow in the code which can be inconvenient. OBJ doesn't have either problem.

@zeux @aras i have used svg groups for that. Surely depends on use case if they work
@aras one fun thing is that Firefox is *significantly* faster at rendering svgs than chrome etc. so if you have a moderate chonker it's worth trying that. Bonus points for embedding JS to manipulate the svg. :')

@aras also if you’re debugging a non-Cartesian graph like structure then graphviz dot files are often handy. It’s a simple text graph notation like “A -> {B C}”

https://en.wikipedia.org/wiki/DOT_%28graph_description_language%29

DOT (graph description language) - Wikipedia

@aras I even used it a lot in the early stages of a Delaunay triangulation implementation (which was Cartesian) as it was easier to set up than SVGs
@aras I'm guessing your rasterizer isn't actually NP-complete, but https://en.wikipedia.org/wiki/Boolean_satisfiability_problem
Boolean satisfiability problem - Wikipedia

@nothings @aras *adjust glasses* it's a separating axis _test_. The _theorem's_ name is the Hyperplane Separation Theorem (or Hahn-Banach for the most general version).
@nothings @aras this is a -1 nerd point mistake and will be added to your permanent record!!1111
@rygorous @nothings I am aiming for my nerd score to wrap around to INT_MAX!
@aras @rygorous @nothings But where will you find the nuclear weapons?
@aras SAT means clamp not wrap, you poor fool https://en.cppreference.com/w/cpp/numeric/add_sat.html
std::add_sat - cppreference.com

@nothings @aras Seeing this out of context for a second I thought std::add_sat had managed to get saturation wrong.
@SonnyBonds @nothings @aras yeah, me too! and the fact that it is even an option to consider speaks volumes about <gestures widely> everything!
@nothings oh shoot! I’ll reply on SAT
@aras @rygorous @nothings Your scholastic aptitude test score won't help you here.
@pervognsen @aras @nothings nor will your summed area tables!
@aras One of my students was making a game about wandering around a city talking to people. He wanted to know where players were going during play tests. So I wrote an SVG generator for him that logged a map of the area and showed the trail made by the player.
@aras I used SVG as debug output for a local light shadow atlas reorg algorithm at Frostbite. It came up with a sequence of moves that could safely be performed in parallel with a single compute dispatch without requiring a second atlas for ping-pong, but the sequences were sometimes rather unobvious, and thus needed visualising. 😁