Live data from Hacker News

Penrose – Create diagrams by typing notation in plain text

penrose.cs.cmu.edu

21–30 of 124 posts

Re: Penrose – Create diagrams by typing notation in plain text

#22
post #5

Penrose looks great. Beautiful diagrams and readable code. What are some other text-driven diagramming languages / tools? I know of: https://mermaid.js.org/ https://graphviz.org/ https://flowchart.fun/

D2 is my current favorite: https://github.com/terrastruct/d2

Re: Penrose – Create diagrams by typing notation in plain text

#24

Does this require a browser (or browser engine) for rendering (like Mermaid.js)? Or can it render (esp. to SVG) without a browser (like Graphviz)? Penrose appears to be written in TypeScript, so my assumption is that it needs a browser.

It looks like the CLI tool (@penrose/roger) just depends on a few npm packages with no browser engine and supports SVG export.

Looks like that depends on the “canvas” package, which appears to use Cairo/Pango for text, similar to Graphviz.

This is great! I wanted something I could compile (the native code) to WebAssembly for use in a Deno-based SSG, and this looks promising.

Re: Penrose – Create diagrams by typing notation in plain text

#25
I have always found "diagrams as code" tools to be limiting. There will be that scenario where the generated diagram is not what you expected. The flexibility you get by using code is outweighed by these limiting scenarios. I switched to Mermaid.js but ended up switching back to normal diagramming tools because of these limitations.

Re: Penrose – Create diagrams by typing notation in plain text

#26

I have always found "diagrams as code" tools to be limiting. There will be that scenario where the generated diagram is not what you expected. The flexibility you get by using code is outweighed by these limiting scenarios. I switched to Mermaid.js but ended up switching back to normal diagramming tools because of these limitations.

Mermaid.js is pretty great, but I agree you usually get to something that doesn't express nicely. I was hoping to find a graph language I might be able to tweak into a DSL. Mermaid is easy to onboard and get things done with but then it didn't quite cover what I wanted to achieve.

Re: Penrose – Create diagrams by typing notation in plain text

#27

I have always found "diagrams as code" tools to be limiting. There will be that scenario where the generated diagram is not what you expected. The flexibility you get by using code is outweighed by these limiting scenarios. I switched to Mermaid.js but ended up switching back to normal diagramming tools because of these limitations.

What’s a “normal” tool in this case?

Re: Penrose – Create diagrams by typing notation in plain text

#28

I have always found "diagrams as code" tools to be limiting. There will be that scenario where the generated diagram is not what you expected. The flexibility you get by using code is outweighed by these limiting scenarios. I switched to Mermaid.js but ended up switching back to normal diagramming tools because of these limitations.

What’s a “normal” tool in this case?

Inkscape for WYSIWYG or Latex figure package.

Re: Penrose – Create diagrams by typing notation in plain text

#29
post #2

How do I see the notation? The diagrams sure look beautiful, but I must be missing something obvious… Thanks!

I just noticed there are 3 tabs for a diagram - substance style domain.

This seems too hard to use by person, but I look forward to seeing this plugged into chatgpt

Post reply on HN