Live data from Hacker News

Create system diagrams with Go

github.com

21–30 of 70 posts

Re: Create system diagrams with Go

#21

Every time I have to create a diagram I struggle. If I want something quick and dirty the options are out there. But if I want to create a diagram for a serious project, I have trouble. Ideally, I would love a solution that integrated with templates and allowed me to define my diagrams at a "higher-level". It should also integrate with Latex to look consistent. Does anyone know of a better alternative to TikZ for my…

[deleted]

Re: Create system diagrams with Go

#23

Earlier quoted context omitted.

> I really don't see the point in having to write a Go snippet to describe the architecture: in the end you're providing only data as an input. Writing a program to generate the diagram is similar to writing a program to generate your infrastructure which is exactly what you do in "infrastructure as code". If your infrastructure is simple then you may not need infrastructure as code. The same can be said for diagrams…

It all depends on the context, you're right. I was more thinking about my use case without considering all of the possible use cases such as Infrastructure as Code, which this project seems more suited for. My use case is to create simple explanatory diagrams about a concept / idea rather than a real-world scenario: in those cases, I always end up using Draw.io. This causes me to waste a lot of time dragging and drop…

Congratulations on a neat project!

Re: Create system diagrams with Go

#24

Every time I have to create a diagram I struggle. If I want something quick and dirty the options are out there. But if I want to create a diagram for a serious project, I have trouble. Ideally, I would love a solution that integrated with templates and allowed me to define my diagrams at a "higher-level". It should also integrate with Latex to look consistent. Does anyone know of a better alternative to TikZ for my…

> It should also integrate with Latex to look consistent

How does latex determine how the pngs you include should look like? Or are you worried the uml diagrams look too old?

Edit: Added those parts back.

I'm using Lucidchart to create uml diagrams, which I export as pngs and embed in latex. Costs a couple dollars. I like Lucidchart more for the freeform diagrams where I want to position everything to look pleasing

Then theres yuml, which I render to svg and then with inkscape to png. I used yuml for a sequence diagram because positioning each one manually felt unnecessary.

Re: Create system diagrams with Go

#25
post #23

Earlier quoted context omitted.

It all depends on the context, you're right. I was more thinking about my use case without considering all of the possible use cases such as Infrastructure as Code, which this project seems more suited for. My use case is to create simple explanatory diagrams about a concept / idea rather than a real-world scenario: in those cases, I always end up using Draw.io. This causes me to waste a lot of time dragging and drop…

Congratulations on a neat project!

I just forked the project linked on this article, I didn't create the original version myself: my addition to what has been posted here is the idea of parsing a YAML file and getting back the diagram, without having to write a single line of Go code (:

Re: Create system diagrams with Go

#26

Every time I have to create a diagram I struggle. If I want something quick and dirty the options are out there. But if I want to create a diagram for a serious project, I have trouble. Ideally, I would love a solution that integrated with templates and allowed me to define my diagrams at a "higher-level". It should also integrate with Latex to look consistent. Does anyone know of a better alternative to TikZ for my…

> It should also integrate with Latex to look consistent How does latex determine how the pngs you include should look like? Or are you worried the uml diagrams look too old? Edit: Added those parts back. I'm using Lucidchart to create uml diagrams, which I export as pngs and embed in latex. Costs a couple dollars. I like Lucidchart more for the freeform diagrams where I want to position everything to look pleasing T…

> How does latex determine how the pngs you include should look like?

In my comment integration refers to text selection and font rendering. As much as I find TikZ too "cloying", I have to admit the end result looks terrific. However, I would settle for anything that improves my current setup. Next time I'll give a try to Lucidchart (by the way, I saw your previous comment). I currently do embed pngs because I find TikZ too verbose.

Re: Create system diagrams with Go

#27
post #7

Earlier quoted context omitted.

yaml is a serialization format. You need at least a schema at which point you might as well write in a nicer language.

I agree with OP on this, YAML seems better suited for such a tool as you can easily add some form validation to it and then serialize it into Go data structures. You really shouldn't have to recompile your codebase in order to modify a diagram.

You don’t recompile the codebase, you build the diagram. You can build it with a tool that converts yaml into svg or golang into svg. The point is that there isn’t much difference as the diagram build process has the exact same high level steps in either case.

Re: Create system diagrams with Go

#28

Earlier quoted context omitted.

> It should also integrate with Latex to look consistent How does latex determine how the pngs you include should look like? Or are you worried the uml diagrams look too old? Edit: Added those parts back. I'm using Lucidchart to create uml diagrams, which I export as pngs and embed in latex. Costs a couple dollars. I like Lucidchart more for the freeform diagrams where I want to position everything to look pleasing T…

> How does latex determine how the pngs you include should look like? In my comment integration refers to text selection and font rendering. As much as I find TikZ too "cloying", I have to admit the end result looks terrific. However, I would settle for anything that improves my current setup. Next time I'll give a try to Lucidchart (by the way, I saw your previous comment). I currently do embed pngs because I find T…

I initially thought TikZ being about any sort of diagram, so uml did not fit :)

With Lucidchart any text can be highlighted with color independently and there are lots of fonts to choose from. I like it for uml diagrams.

Re: Create system diagrams with Go

#30

Very nice, but IMHO this should be the engine behind a file that could easily be parsed such as YML / JSON. I really don't see the point in having to write a Go snippet to describe the architecture: in the end you're providing only data as an input. I guess I'll try to do what I just described because I feel like this could have a lot of potential for my system diagrams

Writing my masters thesis, where i worked a lot with TikZ, the real power came from being able to defined your own graphing primitives.

With that you can defined your own graphing system. Maybe you have a type of arrow that means something UML doesn't have, just define that class and then defined how it will look. Maybe you have a connection type that requires separate arrows in both directions, just defined the syntax.

You can make all these things happen with regular TikZ, but the ability to define macros and classes makes for easier graph drawing, and a unified definition. It also means you can distribute these styles and let others work on your graph language.

Post reply on HN