News for hackers. Stuff that matters.
Re:Pikchr: A PIC-like markup language for diagrams in techni... by emareg on Friday January 05, 2024 @05:45PM (#38886074)
The result looks nice but why not use existing tools like plantuml for common diagrams?

It is already supported by some Markdown to HTML converters.

Re:Pikchr: A PIC-like markup language for diagrams in techni... by LVB on Friday January 05, 2024 @06:12PM (#38886344)
For 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.

Re:Pikchr: A PIC-like markup language for diagrams in techni... by sgbeal on Saturday January 06, 2024 @01:59AM (#38889144)
> 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.

Re:Pikchr: A PIC-like markup language for diagrams in techni... by troupo on Saturday January 06, 2024 @03:50AM (#38889754)
There is a point at which you end up re-writing the entire universe yourself for smaller and smaller gains
Re:Pikchr: A PIC-like markup language for diagrams in techni... by jddj on Saturday January 06, 2024 @05:08AM (#38890120)
Sure, 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.
Re:Pikchr: A PIC-like markup language for diagrams in techni... by troupo on Saturday January 06, 2024 @05:19AM (#38890181)
creating 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 :)
Re:Pikchr: A PIC-like markup language for diagrams in techni... by sgbeal on Saturday January 06, 2024 @06:01AM (#38890382)
> It's bordering on paranoia :)

FWIW/FYI... as someone who has collaborated extensively in the "Hwaci ecosystem," for lack of a better term (projects stemming from Richard Hipp and his company (Hwaci)), i can elaborate a bit on that...

It's not about security in the conventional computing sense, but more about _supply-chain security_. Any third-party components can become unmaintained or break in incompatible ways at any time. The Hwaci ecosystem has a strong culture of avoiding third-party-dependencies, stemming from/related to Richard's definition of freedom: "freedom is being able to take care of yourself," i.e. not depending on others to take care of you. It's important to Richard, and is therefore a part of his projects' cultures, that those who maintain the project are capable of continuing to do so. It's not always feasible to take over maintenance of upstream third-party code, or port away from it, if it suddenly becomes unmaintained. Similarly, it is not always feasible to adapt one's own code to incompatible changes made in upstream third-party code. Avoiding upstream dependencies, despite the obvious annoyance of having to re-invent the wheel at times, inherently gives a developer more freedom over the direction of their own projects. All projects within the Hwaci ecosystem share the trait that they eschew third-party dependencies unless they are (A) unavoidable, (B) non-trivial or non-sensible to reimplement in some minimal form, and (C) ubiquitous (zlib, libssl, and tcl being the counter-examples which most readily come to mind).

That's the short and the long of it.

Re:Pikchr: A PIC-like markup language for diagrams in techni... by troupo on Saturday January 06, 2024 @07:56AM (#38891052)
I was on the both sides of the spectrum: from everythig custom-built to everything is a third-party dependency.

I guess you managed to find the balance where it works.

Because on the one side it often falls into "oh, we built a PDF writer, and a phone routing system, and a generalised build system from scratch, and now we have no one who knows how these work, how to upgrade them, or replace them". On the other side is "we've been running this PHP 4 project forever because the cost of upgrading every third-party library used across all the breaking changes is at least a three-year project, so we're better off not touching it" :)

Re:Pikchr: A PIC-like markup language for diagrams in techni... by jddj on Saturday January 06, 2024 @04:10PM (#38895511)
Core software is worlds apart from some client app.

Dependencies get compromised, supply chain attacks are extremely real. If you write a webapp do whatever works for you. If you write software with a blast radius as large as SQLite's then please consider not pulling in some vulnerable third party lib for a nice to have.

Re:Pikchr: A PIC-like markup language for diagrams in techni... by troupo on Sunday January 07, 2024 @03:44AM (#38899633)
Re:Pikchr: A PIC-like markup language for diagrams in techni... by mongol on Saturday January 06, 2024 @09:21AM (#38891643)
Makes me think of SerenityOS. Although I have not heard it stated the motivation in that way, seems it arrived at a similar conclusion.
Re:Pikchr: A PIC-like markup language for diagrams in techni... by LVB on Saturday January 06, 2024 @09:36AM (#38891744)
I’ll redo my wish into: I wish Pikchr was more expressive. I’m not attached to Mermaid, but I do like things that make the common tasks simple.

AFAICT the Pikchr language is still pretty close to its PIC roots, which is comparatively low level. An expansion to better handle the sort of diagramming that has become common since PIC’s 80s time would be excellent.

This is especially true in the context of Fossil, where being able to make quick flowcharts or sequence diagrams would be super useful.

Re:Pikchr: A PIC-like markup language for diagrams in techni... by JonChesterfield on Friday January 05, 2024 @06:08PM (#38886312)
I 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

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.

Re:Pikchr: A PIC-like markup language for diagrams in techni... by bachmeier on Friday January 05, 2024 @06:58PM (#38886738)
That'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://pikchr.org/home/doc/trunk/doc/differences.md

Re:Pikchr: A PIC-like markup language for diagrams in techni... by sgbeal on Friday January 05, 2024 @11:34PM (#38888457)
> 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.

Re:Pikchr: A PIC-like markup language for diagrams in techni... by sgbeal on Saturday January 06, 2024 @06:02AM (#38890386)
> 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>.