Comment

Comment by jpwalsh234

Great question, I had to noodle that one over a bit, but I think it helped me clarify that difference between pikchr and reladraw. My container example was a poor one, and you are right that pikchr can handle adding elements to a container without fiddling.

My main objection to pikchr is that it is turtle graphics plus coordinate offsets, which to me feels like the wrong tool when I want to say "I have A to the left, and B, C, and D all right of A". I don't want to have to translate that to turtle graphic movements like saying "there's a group, draw B, move down some amount, place C, move down again, place D".

Similarly, if I'm thinking at the level of abstraction of nodes and edges and relative positions, it feels awkward to say something like this in pikchr (where the 0.2 is a guess to fiddle with):

  arrow from Web.s down 0.2 then right until even with DB.s then to DB.s
Rather than saying in reladraw:

  edge web -> db   from: bottom  to: bottom
I think it's less a matter of "reladraw can do it, but pikchr cannot". It's more like, "both can get to the same destination, but how you get there is a matter of taste and how you express your intent".

For example in pikchr:

  A: box "A" fit
  G: [
    down
    B: box "B" fit
    move 0.1
    C: box "C" fit
    move 0.1
    D: box "D" fit
    move 0.1
    E: box "E" fit
  ] with .w at A.e+(0.5,0)
  arrow from A to G.B chop
  arrow from A to G.C chop
  arrow from A to G.D chop
  arrow from A to G.E chop
To me, it's not as clear that your intent is that you want several nodes right of A. However, in reladraw, it's clearer to me that the intent is "these things are right of A":

  node a "A"
  node b "B"  right of a
  node c "C"  right of a
  node d "D"  right of a
  node e "E"  right of a
  edge a -> b
  edge a -> c
  edge a -> d
  edge a -> e
However, that's a subjective taste thing and I could see some people liking the pikchr approach.
parent jpwalsh234 1 month ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton