HNHacker News
TopNewBestAskShowJobs

jpwalsh234

177 karma · joined September 12, 2026

submissionscomments
jpwalsh234··on Show HN: Reladraw – A diagram language where you decide where to place things
Reladraw has no runtime dependencies and Typescript is only needed to build it. If you mean Node, though, that's fair!
jpwalsh234··on Show HN: Reladraw – A diagram language where you decide where to place things
Great idea! Adding to the todo list.
jpwalsh234··on Show HN: Reladraw – A diagram language where you decide where to place things
Great idea! Yep, the layout instructions are translated into absolute positions. The one gap right now is just that the CLI doesn't give you a way to say "just calculate the positions, stop there, and give me JSON". The logic basically exists to do that, with a minor tweak to the CLI to allow that.

I'll add that to my Reladraw todo list!

jpwalsh234··on Show HN: Reladraw – A diagram language where you decide where to place things
tikz looks super powerful. Reladraw is opting for a narrower job - making diagrams with boxes, groups, arrows, where you can say relative positions and let Reladraw save you extra work.
jpwalsh234··on Show HN: Reladraw – A diagram language where you decide where to place things
Just pushed an update to add a basket of themes, including light and dark themes.
jpwalsh234··on Show HN: Reladraw – A diagram language where you decide where to place things
Yep, exactly! D2 is in the same family as Mermaid, i.e., automatic layout, with some escape hatches like grid placement or absolute positioning. Reladraw sits in a gap between automatic layout and absolute positioning.
jpwalsh234··on Show HN: Reladraw – A diagram language where you decide where to place things
Yea, it's hard to beat absolute positioning if you want something ultra-custom, but I'm hoping for most flowcharts, mind maps, etc. the relative positioning is enough to get what you want without fiddling too much!
jpwalsh234··on Show HN: Reladraw – A diagram language where you decide where to place things
Genuine bug! Good find. I'll look into a fix.
jpwalsh234··on Show HN: Reladraw – A diagram language where you decide where to place things
Glad to hear it! I'm a big fan of diagrams for understanding, mapping out architecture, etc!
jpwalsh234··on Show HN: Reladraw – A diagram language where you decide where to place things
Thanks! Mermaid is so cool, but I wanted this relative placement, too. I've played with having Claude make me infographics in HTML and also using SVG. They can be surprisingly decent, until you want something complicated, then it gets messy! I figure, let the agents just say what they want, and let the tool (Reladraw) worry about the arithmetic. No use having an agent burning tokens to recompute coordinates with dubious results! >.<'
jpwalsh234··on Show HN: Reladraw – A diagram language where you decide where to place things
Thanks very much! Yea, with .dot, the layout engine decides where things go. So, the agent doesn't know what the result looks like, leading to render, look, fiddle loops. And, depending on how much you care about layout, .dot might not give you enough knobs to turn to make it look like what you want.

The idea with Reladraw is that a human or agent could just state "I want this node to the right of this other one", rather than have a layout engine decide. Hopefully less fiddling for agents!

jpwalsh234··on Show HN: Reladraw – A diagram language where you decide where to place things
Thanks! My concern was that a resolver making decisions "to be helpful" could become surprising or frustrating.

For example, if you ask for edges to pass "between C and D", but those two nodes sit diagonally, the gap you are asking for might be the vertical channel or horizontal channel between them. So instead of guessing for you, it will tell you of the ambiguity and let you spell out what you want.

jpwalsh234··on Show HN: Reladraw – A diagram language where you decide where to place things
Great idea! So, right now it defaults to this sorta "dark" theme, and the only option you'd have is to change the diagram background color or define styles. I'll make defining some preset themes a priority!
jpwalsh234··on Show HN: Reladraw – A diagram language where you decide where to place things
Appreciate the comment and questions!

Does the resolver do any routing? It doesn't auto-route around obstacles. But, if nodes A, B, and C all have edges going to the left side of D, they share that side and space themselves apart so they don't cross. If the side is too short, they'll bow out to make space for each other, so you don't have to manually fiddle. You can also give routing instructions like "these edges pass between these two nodes on their way to D".

Conflicting statements? Statements that can all hold will all apply. Right of one node and below another is okay. Or, "right of A and B and C" will clear whichever sticks out furthest. If they all can't hold, you'll get an error naming the clashing statements (e.g., something both left and right of A). Nothing silently wins.

jpwalsh234··on Show HN: Reladraw – A diagram language where you decide where to place things
Glad to hear it :) If you find that you want Reladraw to do something that it can't, let me know! I keep uncovering features by looking at actual Draw.io diagrams I've made and seeing if Reladraw can do it.
jpwalsh234··on Show HN: Reladraw – A diagram language where you decide where to place things
Thanks! I really like Mermaid, but if the diagram gets too complicated, it draws it how it wants and I end up reaching for Draw.io, which is also awesome, but can take a lot of time.
jpwalsh234··on Show HN: Reladraw – A diagram language where you decide where to place things
Thanks! The big difference is that Pikchr uses "turtle" graphics (where a cursor walks along and draws shapes). Reladraw lets you state relationships and relative positions.

So, if you have a container with children, or multiple nodes off to the right of another, with links between them, adding or resizing one adjusts the rest, without re-specifying positions the way turtle graphics would require.

← PreviousPage 2 of 2