Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add Compiler diagram #49893

Merged
merged 1 commit into from
Jun 2, 2023
Merged

Conversation

sjkelly
Copy link
Contributor

@sjkelly sjkelly commented May 19, 2023

This is inspired by the diagram presented by Lionel Zoubritzky
in his 2018 JuliaCon talk.
This gives a visual overview of what is happening in the compiler.

@JeffBezanson JeffBezanson added the docs This change adds or pertains to documentation label May 19, 2023
@sjkelly
Copy link
Contributor Author

sjkelly commented May 19, 2023

I've cleaned up the design up a bit for symmetry and legibility. Feedback is appreciated.

@Seelengrab
Copy link
Contributor

The green on orange text is a bit hard to make out, and the "Specialize" from "Method Dispatch" to "IR" could do with a different layout/position - it looks a bit odd that it's the only text crossing a colored box boundary.

@sjkelly
Copy link
Contributor Author

sjkelly commented May 19, 2023

Thanks for the great feedback @Seelengrab! I tweaked the colors and alignment a bit. I agree yellows are tough on the eyes!

@Seelengrab
Copy link
Contributor

Thank you! Yeah, that's easier to follow.

@cormullion
Copy link
Contributor

cormullion commented May 20, 2023

the black lines might struggle for visibility on a dark background (eg dark mode)... Here's a suggested edit that should work on any background. Changing the black elements to a midtone color would also work...

compiler_diagram

@sjkelly
Copy link
Contributor Author

sjkelly commented May 22, 2023

Thanks for the feedback @cormullion, good catch!

@KristofferC
Copy link
Sponsor Member

Note that CI seems to fail here.

@inkydragon
Copy link
Sponsor Member

inkydragon commented May 23, 2023

Note that CI seems to fail here.

LaTeX does not have good support for SVG.
So there is an error when compiling PDFs.

A workaround is to keep both SVG and PNG formatted images, and to refer to the PNG images in the md document.

This is an upstream issue that requires Documenter.jl to improve the SVG support of the LaTeX backend.

@ViralBShah
Copy link
Member

Simplest to just check in a png as well

This is inspired by the diagram presented by Lionel Zoubritzky
in his 2018 JuliaCon talk.
This gives a visual overview of what is happening in the compiler.
@sjkelly
Copy link
Contributor Author

sjkelly commented May 31, 2023

I've opted to commit both the PNG and SVG. It was done in Google Draw, so there is unfortunately no other lossless format we can use for posterity.

@fredrikekre
Copy link
Member

There is also https://github.com/JuliaDocs/DocumenterMermaid.jl for things like this now, but will probably also fail in PDF output.

@oscardssmith oscardssmith merged commit f09e46d into JuliaLang:master Jun 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs This change adds or pertains to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants