Hacker News

Top stories

Live mirror
30 storiesupdated just nowView source snapshot
  1. Human brain is two separate organs, Stanford Medicine-led research finds(stanford.edu ↗)
    114comments
  2. AI-generated posters don’t have to be horrible(john.hartnup.uk ↗)
    168comments
  3. “The Secret Life of Circuits” is here(coredump.cx ↗)
    26comments
  4. GPT-6 Astra Solves a WWI German Radio Cipher(prinzai.com ↗)
    81comments
  5. Android 17 is the first since 3.x to add new APIs without releasing to the AOSP(grapheneos.social ↗)
    450comments
  6. Laya the open source version of Jev(convaiinnovations.com ↗)
    2comments
  7. If math is more than proof, we need to better celebrate the rest of it(terrytao.wordpress.com ↗)
    108comments
  8. San Francisco Onion Futures Company(onionfutures.com ↗)
    77comments
  9. Communication by means of modulated Johnson noise(pnas.org ↗)
    2comments
  10. Cloudflare Quick Tunnels(cloudflare.com ↗)
    285comments
  11. How to Write with an LLM(sockpuppet.org ↗)
    342comments
  12. SDCC – Small Device C Compiler(sourceforge.net ↗)
    20comments
  13. Science Is Open Software(jepedersen.dk ↗)
    40comments
  14. Saving another 100TB of RAM(cloudflare.com ↗)
    83comments
  15. You can run Git on object storage if you re-make packfiles(tigrisdata.com ↗)
    19comments
  16. Why building a Rust LSP is hard(rust-glancer.github.io ↗)
    32comments
  17. How OpenAI Used Its Own LLMs to Design Its Jalapeño Chip(ieee.org ↗)
    94comments
  18. Ctenophores: Wonders of Biology(quantamagazine.org ↗)
    6comments
  19. From Stonemasons to Carpenters(thelastsoftwareengineer.substack.com ↗)
    1comments
  20. NASA-IBM Lunar Foundation open-Source Geospatial AI Model(usra.edu ↗)
    4comments
  21. The first new cat species discovered in 100 years(nationalgeographic.com ↗)
    108comments
  22. OpenJev(openjev.com ↗)
    270comments
  23. Show HN: Cactus Needle 3: 8-29MB automation models can match DeepSeek V4 Flash(cactuscompute.com ↗)
    89comments
  24. Apple M6 Pro Achieves the Highest Single-Core CPU Score in Geekbench 7(geekbench.com ↗)
    82comments
  25. Goroutine Leak Profiles(go.dev ↗)
    4comments
  26. Photon-Emission-Guided Laser Fault Injection Enables RP2350 Secure Debug(ledger.com ↗)
    73comments
  27. Veronese's Dogs(publicdomainreview.org ↗)
    1comments
  28. Cache-to-Cache: Direct Semantic Communication Between LLMs (2025)(arxiv.org ↗)
    14comments
  29. Warez: The Infrastructure and Aesthetics of Piracy (2021)(archive.org ↗)
    84comments
  30. Inside ZCode: Silently uploading your Git history to the cloud(ferstar.org ↗)
    102comments

Penrose: From mathematical notation to beautiful diagrams

176 pointsby 6y agopenrose.ink
19 comments
6y agoHN ↗

So this is written in Haskell - very impressive demo of the languages capabilities.

6y agoHN ↗

You mean that it can create decent parsers?

6y agoHN ↗

I assume you mean "it is not ready for public use yet"?

6y agoHN ↗

As a recovering mathematician, this fills me with joy. It would be great if it were implemented as, say, a LaTeX package, so the code to your diagrams could sit right in your documents (like how TikZ works). Still, either way, amazing work!

6y agoHN ↗

It will be great to include Penrose diagrams in LaTeX documents. But Penrose is implemented in Haskell and I'm pretty sure no-one would want to see what it would look like were it implemented in TeX!

6y agoHN ↗

I agree that rendering graphics as a separate file is fine. I think, if one wants to get better interoperability with TeX, they can try to make Penrose produce TikZ, which can be then embedded into the TeX document.

6y agoHN ↗

Oh sure, reimplementing in TeX would not be worth thinking about! I'm not familiar with exactly how TeX packages work, but I assumed they could call out to external tools that return the necessary (La)TeX commands (e.g., code syntax highlighters work like this, IIRC).

6y agoHN ↗

OK, I see. Sorry yes I agree what you're saying is sensible and what I said was silly.

Yes, minted works like that -- it starts a python child process to use pygments to do the syntax highlighting. But with minted and TikZ there's a single element of "source code" in the LaTeX file (a code listing or tikz code fragment respectively) that maps to a single element in the output (syntax-highlighted code, or a TiKZ image). Whereas with Penrose, there would be multiple source code files (the style and substance code). I'm not sure it quite fits the native LaTeX model does it? Maybe it's better just to use Make to generate the Penrose diagram for inclusion via \includegraphics?

6y agoHN ↗

Stuff like this could be amazing for pedagogy. It’s automatically generating different ways of looking at a topic. I’m sure authors would love to include these different viewpoints were it not for the effort involved, so making it easy could be great!

6y agoHN ↗

This looks beautiful! And strange! And beautiful! Like the diagrams for an entire Calculus textbook could be created with it...(!)

Penrose, for mathematical drawings, might very well become what TeX, LaTeX, and Desktop Publishing programs are, to text!

I think you are on the right track to something grand!

Wishing you a lot of luck in this endeavor!

6y agoHN ↗

Oh how beautiful! Keenan Crane's papers by themselves are already a blessing. Now this, illustrations in his style? I'm drooling!