7 ms·
Pikchr: A PIC-like markup language for diagrams in technical documentation
- gnatolf 3y agoYet another one, it feels like. In the end, these all drop their promises of ease of use when slightly off the path. The one and true power lies with tikz, as hard as it is.
- remram 3y agoIt seems to have limited options for layout, focusing on manually-positioned elements.
- MoreQARespect 3y agoIt's similar to static site generators - it's easy enough to create a simple one and hundreds of people have but the real differentiator is having hundreds of high quality working templates and aint nobody got time to maintain those. The CLI diagramming winner will be the one that can easily do 150 different types of diagram out of the box. It might never happen.
- emareg 3y agoThe result looks nice but why not use existing tools like plantuml for common diagrams? It is already supported by some Markdown to HTML converters.
- JonChesterfield 3y agoI expected the answer to be that pikchr came first, but plantuml was 2009 according to Wikipedia and pikchr appears to be 2020 https://pikchr.org/home/info/d06dd0ebe7dae623 https://pikchr.org/home/info/d06dd0ebe7dae623 I'm personally excited to discover pikchr because I periodically need to produce box&arrow style diagrams and everything else from the author has been solid and easy to hack on.
- bachmeier 3y agoThat's not quite the full story though. Pikchr is designed to be compatible with and extend PIC, which goes back to 1988. https://en.wikipedia.org/wiki/PIC_(markup_language) https://en.wikipedia.org/wiki/PIC_(markup_language) https://pikchr.org/home/doc/trunk/doc/differences.md https://pikchr.org/home/doc/trunk/doc/differences.md
- LVB 3y agoFor common diagrams, you probably should. I've used Pikchr, and if you want/need to place a lot of things manually or otherwise have a larger degree of control, then it fills that niche OK, I guess. But for whipping up a flowchart or sequence diagram, I find Mermaid or other tools with higher-level abstractions much quicker and simpler. The big use case is if you need to use Fossil, which only supports Pikchr for inline diagrams. That's a shame IMO, and I would love Mermaid support.
- sgbeal 3y ago> The big use case is if you need to use Fossil, which only supports Pikchr for inline diagrams. That's a shame IMO, and I would love Mermaid support. Sidebar... (A fossil dev here.) That would require third-party code dependencies, something all projects created by Fossil's project lead (Richard Hipp) avoid except where absolutely necessary. In fossil, the only required 3rd-party dependency is zlib, with libssl highly recommended but not strictly required. Though fossil is heavily dependent on sqlite, they're both by the same main developer so it's not really a 3rd-party dependency. Same goes for JS code like Mermaid - if it's not written by a fossil project member, it doesn't go into the source tree.
- troupo 3y agoThere is a point at which you end up re-writing the entire universe yourself for smaller and smaller gains
- jddj 3y agoSure, but it depends how strongly you care about the security of the supply chain for a core piece of software for our industry, Vs having a more featureful way to make diagrams.
- troupo 3y agocreating inline diagrams to display in documentation or comments in a VCS used to handle sqlite code isn't that much of a security issue IMO. It's bordering on paranoia :)
- sgbeal 3y ago> why not use existing tools like plantuml for common diagrams? Pikchr was created specifically to support the sqlite family of projects and was initially deployed in the markdown processor of the Fossil SCM (one of sqlite's siblings). That whole family of projects avoids third-party dependencies where at all possible for reasons too detailed to type out one-handed on a mobile device.
- sgbeal 3y ago> That whole family of projects avoids third-party dependencies where at all possible for reasons too detailed to type out one-handed on a mobile device. ... but which has since been elaborated on in <https://news.ycombinator.com/item?id=38890382 https://news.ycombinator.com/item?id=38890382>.
- Veuxdo 3y agoPrevious discussion (6 months ago): https://news.ycombinator.com/item?id=36847133 https://news.ycombinator.com/item?id=36847133
- PMunch 3y agoI recently had to draw some diagrams for documenting something. After looking at various Markdown-friendly options I landed on svgbob[1]. I believe it's a superior solution to these kinds of graph drawing tools for Markdown for one specific reason: the code is still readable. When I go to look at a Markdown file I don't always open the output. I will commonly open up a README file in Vim or just cat it to the terminal. In this case diagrams like those in this post is next to useless. I'm not going to read through some complex drawing definitions and try to visualise the results. With svgbob (or Typograms[2] or any of the other similar options) you can still read the Markdown text document and see the diagrams which is great! Of course this comes with a tradeoff, drawing the diagrams can be a bit of a pain. But I believe this can be solved by a good Markdown editor or editor plugin. Alternatively a spec like this could be converted into an svgbob-compatible diagram. [1]https://ivanceras.github.io/svgbob-editor/ https://ivanceras.github.io/svgbob-editor/ [2]https://google.github.io/typograms/ https://google.github.io/typograms/
- diggan 3y agoSeems like the use-cases are kind of different from the two. Pikchr seems to be made specifically for A) ease of editing and B) compile to graphs after being embedded in markdown code fences svgbob I guess would work fine for B, but seems like a hassle to use it for A, but then I've never done ASCII art manually, maybe that's why it seems cumbersome to me? If you come across this graph and want to edit it, how would you approach it? Because I'm guessing you're not manually moving characters around? Seems like a big hassle if so, even if I'm a daily user of vim which could help a lot. ,─. ( 0 ) `-' / \ / \ V V ,─. ,─. ( 1 ) ( 4 ) `-' `-' . / \ | \ `. / \ | \ `. V V | \ `. ,─. ,─. V V V ( 2 ) ( 3 ) ,─. ,─. ,─. `─' `─' ( 5 ) ( 6 ) ( 7 ) `─' `─' `─'
- PMunch 3y agoYeah this is the drawback I was talking about. Vim certainly helps a bit, but some kind of editor or plugin which allowed you to more easily move stuff around, draw lines, draw boxes and circles, etc. would be very handy. The current approach is moving characters around by hand, which is quite tedious.
- edu_guitar 3y agoWhile not embedded in markdown, I like d2 [1]. I can use it with org-babel to embed and view the diagrams on emacs. After using graphviz for years, the visual output seems more polished to me. With that said, I want to give pikchr a try. [1]:https://d2lang.com/ https://d2lang.com/