Live data from Hacker News

Diagram as Code

diagrams.mingrammer.com

61–70 of 77 posts

Re: Diagram as Code

#61
post #18

This is cool! I was hoping it would look something like: ‘’’ import diagrams calc_d = diagrams.new_diagram(“calculator_123”) calc_d.Datum("SuperNumber") class SuperNumber(int): pass @calc_d.Service(“Calculator”, “takes numbers and operations and operates”) class Calculator(object): @calc_d.Endpoint("Add", calls=["Increment"], main_data={"b": "SuperNumber}) def add(self, a, b: SuperNumber): out = a for i in range(b):…

For anyone finding a solution to code blocks... I write these comments from Safari on my iPhone

Re: Diagram as Code

#63

This looks really neat! Is it possible to have embedded diagrams. For example, Gitlab lets you embed a PlantUML[1] diagram in any Markdown or ADoc file using a proxy server. This makes it really easy to write and serve documentation. Personally, I'm a fan of PlantUML. Having an svg served in a browser that has labels linking directly to the relevant entity (code, resource etc) is a huge plus for new hire onboarding.…

I wish plantUML would update it's default theme, I feel like more people would use it if it didn't look ancient.

Re: Diagram as Code

#65
Slight tangent, but some of the cool tools noted in the comments remind me of some of the amazing things put out by Netflix engineering in recent years, like Vizceral^1 and Flux^2.

1. https://github.com/Netflix/vizceral/wiki

2. https://link.medium.com/LY2vw4Rsr6

(Sorry about the Medium.com link; all I could grab on the spot on phone)

Re: Diagram as Code

#66

> from diagrams import Diagram Slightly off-topic, but I wish JavaScript's import syntax was designed to be this way around, for better autocomplete in your editor.

[deleted]

Re: Diagram as Code

#67

This looks really neat! Is it possible to have embedded diagrams. For example, Gitlab lets you embed a PlantUML[1] diagram in any Markdown or ADoc file using a proxy server. This makes it really easy to write and serve documentation. Personally, I'm a fan of PlantUML. Having an svg served in a browser that has labels linking directly to the relevant entity (code, resource etc) is a huge plus for new hire onboarding.…

I wish plantUML would update it's default theme, I feel like more people would use it if it didn't look ancient.

I personally enjoy the style of it, but it could be described as “retro.”

Re: Diagram as Code

#68

> from diagrams import Diagram Slightly off-topic, but I wish JavaScript's import syntax was designed to be this way around, for better autocomplete in your editor.

SELECT column FROM table

:(

Re: Diagram as Code

#69
The author has made DSL in Python by (ab?)using context managers and the bitshift operator. It's very interesting, and I haven't seen anything quite like it.

Python can lend itself to horrific abuses through shenanigans like this. I sometimes feel that siren call myself, and usually regret it.

So by default I'm pretty skeptical of this kind of thing, but I'm actually on the fence about this one.

Re: Diagram as Code

#70

This looks really neat! Is it possible to have embedded diagrams. For example, Gitlab lets you embed a PlantUML[1] diagram in any Markdown or ADoc file using a proxy server. This makes it really easy to write and serve documentation. Personally, I'm a fan of PlantUML. Having an svg served in a browser that has labels linking directly to the relevant entity (code, resource etc) is a huge plus for new hire onboarding.…

PlantUML and Mermaid have really been very useful to me!

It feels like I'm missing something with this tool if one's already aware of Mermaid (and PlantUML)

Post reply on HN