
Penrose: Create diagrams by typing mathematical notation in plain text - espeed
https://github.com/penrose/penrose
======
miki123211
If people could share the source along with the diagrams they make, this could
be huge for accessibility. I can't count how many times I've been blocked from
reading some content just because of all the JPGs and SVGs my screen reader
couldn't read. Often they were themselves created with GUI programs, so even
the authors couldn't help.

~~~
maxkrieger
I work on the SVG renderer for Penrose and would love to reach out and see if
there's anything we can do to improve this! The renderer is written
declaratively in react so it's easy to add supplemental tags or even a more
readable DOM hierarchy.

~~~
nerpderp82
Include the Penrose source as a comment in the SVG, this can also be done with
a PNG as well.

[https://dev.exiv2.org/projects/exiv2/wiki/The_Metadata_in_PN...](https://dev.exiv2.org/projects/exiv2/wiki/The_Metadata_in_PNG_files)

------
espeed
This is one of the projects out of Jonathan Aldrich's
([http://www.cs.cmu.edu/~aldrich/](http://www.cs.cmu.edu/~aldrich/)) group at
CMU ...

"The Penrose team is based at Carnegie Mellon University, comprising Katherine
Ye, Nimo Ni, Dor Ma'ayan, Max Krieger, Rain Du, Josh Sunshine, Jonathan
Aldrich, and Keenan Crane. (Emeritus: Jenna Wise and Lily Shellhammer.)"

[http://www.penrose.ink](http://www.penrose.ink)

------
stevekrouse
Happy to see this on HN! I interviewed Katherine on my podcast a few months
ago about this
[https://futureofcoding.org/episodes/034.html](https://futureofcoding.org/episodes/034.html)

------
MockObject
Lovely project, but "Penrose" is not the best name possible. There will be
confusion between diagrams made with Penrose (Penrose diagrams?), and Penrose
diagrams:

[https://en.wikipedia.org/wiki/Penrose_diagram](https://en.wikipedia.org/wiki/Penrose_diagram)

------
taliesinb
i’m having trouble finding a gallery of examples that give a sense of the
range of different diagrams Penrose can create. anyone know if there is such a
thing?

~~~
anchpop
I expect that there will be more examples once the project is deemed to be
ready for public use

------
8note
it's called Penrose, but there's no example of a Penrose diagram?

~~~
miles7
I use Penrose diagrams all the time for my research and was hoping to see
exactly this. I'm thinking of contacting the developers and participating in
their survey...

------
fsiefken
It seems this is for mathematical diagrams (X,Y or Venn), am I right? I was
wondering if I could make flowcharts, mindmaps or uml diagrams with it.
Mermaid.js is nice but limited.

~~~
waynenilsen
See graphviz

~~~
no-such-address
Yes, there is so much potential to integrate diagramming and recent work on
constraint solvers including SAT solvers, but also very difficult to make such
systems usable and convenient. There is a lot of hackery in graphviz that
seems difficult to recreate in a general context. It would help if graphviz
could be brought up to date or moved to a better environment for doing new
work.

------
amelius
Why do the text labels appear to be not centered in the smaller circles?

~~~
lifthrasiir
Because the style doesn't know about that. Penrose is inherently an
interactive constraint solver and you need to supply such implicit assumptions
for a visually pleasing result. At the first glance I guess `objective
centerLabel(...)` will do.

~~~
amelius
Interesting. Which constraint solver does it use, or do they use their own
one?

~~~
hypotext
Hi, Katherine here—we've written our own code for numerical optimization (via
L-BFGS) and constraint solving (via the exterior point method).

------
_emacsomancer_
But can it create Penrose tilings?

~~~
asab
Maybe not, but this can: [http://ariasabeti.me/](http://ariasabeti.me/)

(scroll down)

------
nubela
Feedback: Improve the syntax? Why not just make it look like code?

~~~
enriquto
it looks like code, what do you mean?

------
pencillr
Not the fan of haskell, though I like the fact that it uses react frontend.

~~~
dan-robertson
What does the implementation language have to do with anything? Sure one could
complain that the program is slow/buggy but I don’t think that has much to do
with whether one likes the implementation language or not.

I feel like this is like complaining about tex being written in web or hg
being written in python (hg being slow seems a more reasonable complaint).

I think with a program, the proof of the pudding is in the eating

~~~
lifthrasiir
I guess, it would be kinda harder to adapt Haskell to the client-side-only
interactive web (but of course, people are trying [1]). Nowadays the
availability in the web directly impacts its acceptance so it is not a
separate concern.

[1]
[https://wiki.haskell.org/The_JavaScript_Problem#Haskell_-.3E...](https://wiki.haskell.org/The_JavaScript_Problem#Haskell_-.3E_JS)

~~~
Retra
That's kind of outweighed by the more relevant fact that the people who had
the time and inclination to create the software preferred one set of tools,
and the preferences of some after-the-fact passerby would obviously not factor
into this kind of decision.

