Show Me How, an algorithm visualizer in zig

Show Me How:


Hi, Show Me How is a project I’ve been wanting for a long time. When I was tutoring people on how to program, I really wished I could make some of the concepts more visual. Earlier this year I was working on a graph optimization algorithm and again wished I could show it rather than just explain the intuition behind it.

The best visualizations available right now would probably come from the python manim library, but creating visualizations this way still might not be incredibly easy, and could require re-implementing the algorithm within manim. This might be difficult if the code you want to visualize is written in another language. Plus, I’ve seen visualizations made with manim and use of the library doesn’t make the visualization good!

Show Me How works by reading a command script from stdin so I don’t have to reimplement my algorithms, just modify them to produce an extra script which can then be run by this program. Layout and animations are handled automatically. Scripts can be played live, as the source program generates them (for long-running tasks) or from a script file, and all operations can be played backwards and forwards.

Right now, I’m trying to solidify the architecture and patch up some of its weaknesses, then move onto graphs, using graphviz as the layout engine. After I have that done,

Project link: https://codeberg.org/splinterofchaos/Show-Me-How

Supported Zig versions

I’ve been developing on zig-0-16.

AI / LLM usage disclosure

A disclosure feels more like a confessional to me because a few months back on another project, I got so addicted to prompting that I depleted all my dopamine. Since then, I’ve been mostly writing all my own code, but sometimes I feel weak, tired, lazy, and ask claude to do something here or there. I consider this a personal failing, and now a public embarrassment.

Disclosing also feels like a confessional because I feel it destroys any credibility I or my project might have, but not disclosing would just be dishonest. But I hope the shame I feel from writing this disclosure helps me kick the habit for good.

4 Likes

Going to share a link to it?

OMG, I forgot to do the ONE thing this post was supposed to do :stuck_out_tongue:

Sorry, it’s here: https://codeberg.org/splinterofchaos/Show-Me-How

I’ll update the first post as well.

1 Like