Hacker News new | ask | show | jobs
by cpill 654 days ago
the diagram on the front page I thought was documenting the huge amount of code next to it but it turns out it's the other way around! huge amount of code is generating the simple diagram. you must really hate dsl's. the point of the DSL is it saves you writing the huge amount of code to do something simple. so your premise here is people aren't writing enough code that's right more code that we have to maintain just to draw diagrams. play something simple like a DSL with something difficult like more code. heaps of it! and then charge money for it :D
1 comments

Tradeoffs are real. My example displays a few more knobs and yes, it’s more verbose.

I’d say my premise isn’t that “DSLs are bad”, but more along the lines of if a DSL isn’t what you’re looking for, I may have something for you. Particularly if you need your application to generate a view of a graph _during runtime_ so that it is your real-time source of truth.

I find that DSLs and “as code” solutions for several products have their own niche. Take for example Terraform vs Pulumi.

The L in DSL is "Language", so it's a programming language that is domain, or niche, specific. These are code.

Diagramming is a domain, and within diagramming are any number of diagram type domains, leading to concise code for particular niches.

Compare 25+ of these niches here: https://kroki.io/