11 comments

  • Myrmornis1 day ago
    <a href="https:&#x2F;&#x2F;d2lang.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;d2lang.com&#x2F;</a> is a nicer language than Mermaid with much nicer visual appearance. It would be great if it became more widely supported.
    • erajasekar1 day ago
      I reached the same conclusion after comparing diagram-as-code tools — D2 feels cleaner and more expressive than Mermaid.<p>I’ve been working on an AI diagramming tool built around D2: <a href="https:&#x2F;&#x2F;aidiagrammaker.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;aidiagrammaker.com&#x2F;</a> You describe a system in plain English, and it generates architecture diagrams, flowcharts, and sequence diagrams in D2.<p>Edits can be made either directly in the D2 code or via a context-aware editor.
    • wps1 day ago
      Has anyone here used <a href="https:&#x2F;&#x2F;pikchr.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;pikchr.org&#x2F;</a> from the creator of SQLite?
    • I agree that it&#x27;s nicer and more powerful, but it&#x27;s a little concerning it hasn&#x27;t had any commits in the past 6 months: <a href="https:&#x2F;&#x2F;github.com&#x2F;terrastruct&#x2F;d2&#x2F;commits&#x2F;master&#x2F;" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;terrastruct&#x2F;d2&#x2F;commits&#x2F;master&#x2F;</a>
      • 16bitvoid1 day ago
        I think the founder&#x2F;lead developer, Alexander Wang, works at OpenAI now.<p>Plus, according to this comment on an issue, folks in their discord say it&#x27;s not being actively maintained.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;terrastruct&#x2F;d2&#x2F;issues&#x2F;2735#issuecomment-4214818821" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;terrastruct&#x2F;d2&#x2F;issues&#x2F;2735#issuecomment-4...</a>
        • vladsanchez1 day ago
          Never imagined Scale.ai CEO was D2Lang creator nor that he joined his room-mate at OpenAI (giggle).<p>Thanks for sharing
          • 16bitvoid1 day ago
            Scale AI is a different Alex. Their first names are spelled slightly different. Alexandr vs Alexander
      • nine_k1 day ago
        Maybe it doesn&#x27;t need constant fixing? Are there many issues in the tracker?
    • spacecow1 day ago
      Oh, finally, something that supports actual hierarchical state diagrams (that isn&#x27;t Graphviz, no offense)... Mermaid&#x27;s &quot;You cannot define transitions between internal states belonging to different composite states&quot; [1] has driven me up a wall for years.<p><pre><code> parentA.childA -&gt; parentB.childB: voop parentB.childB -&gt; parentA: vorp </code></pre> shouldn&#x27;t be that hard!<p>[1] <a href="https:&#x2F;&#x2F;mermaid.ai&#x2F;open-source&#x2F;syntax&#x2F;stateDiagram.html#composite-states" rel="nofollow">https:&#x2F;&#x2F;mermaid.ai&#x2F;open-source&#x2F;syntax&#x2F;stateDiagram.html#comp...</a>
    • lugao1 day ago
      Does it produce real svgs as opposed to foreign object html in svg mess that mermaid compilers produce?
      • troyvit21 hours ago
        d2 produces real svgs but I&#x27;ve found them to have a hard time displaying in other svg editors. The d2 folks talk about that somewhere and they have some fixes for it.
    • pastelsky1 day ago
      Thanks for sharing! I haven’t looked into that before but looks neat.
    • growrow1 day ago
      What makes it nicer?
      • Myrmornis1 day ago
        Take a look at <a href="https:&#x2F;&#x2F;d2lang.com&#x2F;examples&#x2F;dagre&#x2F;" rel="nofollow">https:&#x2F;&#x2F;d2lang.com&#x2F;examples&#x2F;dagre&#x2F;</a> and <a href="https:&#x2F;&#x2F;d2lang.com&#x2F;tour&#x2F;intro&#x2F;" rel="nofollow">https:&#x2F;&#x2F;d2lang.com&#x2F;tour&#x2F;intro&#x2F;</a><p>The language is richer and all diagram types are implemented consistently in the same language in a way that can be composed, as opposed to being a collection of unrelated DSLs.<p>The improved visual appearance is clear from inspecting example diagrams, I believe.
    • How good is the LLM at creating d2? What if any skills&#x2F;material can folks recommend? (Follow-up: D2-mcp has a cheat sheet, <a href="https:&#x2F;&#x2F;github.com&#x2F;h0rv&#x2F;d2-mcp&#x2F;blob&#x2F;main&#x2F;d2&#x2F;CHEATSHEET.md" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;h0rv&#x2F;d2-mcp&#x2F;blob&#x2F;main&#x2F;d2&#x2F;CHEATSHEET.md</a>)<p>And, does GitHub support it? (Follow up: alas not! Sadness. Please add!)
  • pastelsky1 day ago
    Author here - thanks for all the support (and bug reports)!<p>I built pretty.fish with the belief that Mermaid diagrams don’t have to look like they’re from the 80s and to avoid squinting at Mermaid diagrams that coding agents create in tiny windows.<p>Having them on canvas also makes it easier to keep a track of, and even visualize agent steps as and when they are are being taken (if you connect an MCP you get a pretty nice view of agent building its knowledge graph for eg for a problem).<p>Didn’t expect it to take off like this—there are still rough edges (pan&#x2F;zoom, mobile), but I’m working on smoothing those out soon.
  • juancn1 day ago
    It&#x27;s pretty but I don&#x27;t know about better.<p>- How do you pan? Two finger sliding on the trackpad just zooms.<p>- Why does the diagram you&#x27;re working on doesn&#x27;t use all the remaining space? I picked one example and it&#x27;s on a small-ish box with controls that don&#x27;t seem to do anything and half of it is out the screen on the bottom<p>Ohh... the scroll metaphor... it&#x27;s annoying. A bunch of tabs would have been better or even a one at a time with a tree somewhere.<p>There&#x27;s too much fighting with layout where a plain interface would be better, something closer to <a href="https:&#x2F;&#x2F;mermaid.live&#x2F;" rel="nofollow">https:&#x2F;&#x2F;mermaid.live&#x2F;</a>
  • laserbeam1 day ago
    The first thing I tried to do is resize that rectangle in the default diagram... and the resize handles do not affect the height, only the width. What is this &quot;better&quot; than?
  • smusamashah1 day ago
    How is this one better? I thought this was going to be a visual editor where you click and edit on the diagram itself. I don&#x27;t seem to be able to do that here.
  • Arubis1 day ago
    I will grant this: that&#x27;s a brilliant name and domain.
  • lo1tuma1 day ago
    I actually like Mermaid’s text-based approach a lot and wouldn’t want to replace it with a visual editor.<p>Where I do see room for improvement is the rendering quality. A lot of diagrams end up looking a bit rough, especially with arrow routing and layout, which can feel somewhat arbitrary.<p>Better layout&#x2F;rendering would probably add more value (for me at least) than improving the editing experience.
  • pastelsky7 days ago
    - Write Mermaid diagrams with a live preview. - Arrange multiple diagrams on an infinite canvas. - Group diagrams into multi-page projects. - Better themes
  • jggonz1 day ago
    Interesting timing and similarity with something I built last month! :)<p>I built <a href="https:&#x2F;&#x2F;fishygram.com" rel="nofollow">https:&#x2F;&#x2F;fishygram.com</a> with a DSL you can copy and paste into ChatGPT to build diagrams for you.<p>You can take a look at the examples to see what it can do.
    • totetsu1 day ago
      I&#x27;m always frustrated by how bad LLMs seem to be at making mermaid text without parsing errors all through it.
  • rdos1 day ago
    I can&#x27;t seem to change the colors of the pie chart, other than the predefined themes. But all of those are horrible for a pie chart.
    • jsmith451 day ago
      Yeah, as far as I know, you need to define a customized theme to customize pie chart colors. You can prepend the chart with initialization logic like:<p>%%{init: {&quot;theme&quot;: &quot;base&quot;, &quot;themeVariables&quot;: { &quot;pie1&quot;: &quot;#FF5733&quot;, &quot;pie2&quot;: &quot;#33FF57&quot;, &quot;pie3&quot;: &quot;#3357FF&quot;, &quot;pieStrokeColor&quot;: &quot;#000000&quot;, &quot;pieStrokeWidth&quot;: 3, &quot;pieOpacity&quot;: 0.8 }}}%%<p>This looks like it works on this site too.
    • pjot1 day ago
      To be fair, pie charts are horrible in general.
  • Lord_Zero1 day ago
    How does the agent session thing work? Server-side you proxy requests to client via websockets or something? How does the agent see the client-side data?