DSLs are a waste of time
11–20 of 165 posts
Re: DSLs are a waste of time
#12Why don't we have a tool that lets us associate monetary budgets to concrete hardware specs, and then generates a cross-cloud (or cloud-agnostic) configuration? budget: $23000 pricing: cheapest cpu: preferred: xeon cores: 8 mem: 64gb disk: preferred: ssd And some --import-usage flag to specify a folder of historical CPU and memory usage from Grafana.
Found a great option for you at $23000. Amazingly we managed to accommodate your budget. /s
Re: DSLs are a waste of time
#13Why don't we have a tool that lets us associate monetary budgets to concrete hardware specs, and then generates a cross-cloud (or cloud-agnostic) configuration? budget: $23000 pricing: cheapest cpu: preferred: xeon cores: 8 mem: 64gb disk: preferred: ssd And some --import-usage flag to specify a folder of historical CPU and memory usage from Grafana.
If you want services to turn off if they exceed a threshold then you will need some sort of priority scheme.
Re: DSLs are a waste of time
#14Earlier quoted context omitted.
DSLs need not be declarative. DSLs need not be succinct. DSLs need not be close to English at all. All of these are properties which may or may not apply to a _specific_ DSL, they are not defining features.
But they can be. They can have nice properties that general purpose languages cannot.
Re: DSLs are a waste of time
#15Re: DSLs are a waste of time
#16This is a great takeaway from the article-- "programming languages are the better authoring model for cloud infrastructure". I was surprised by the simplicity of the "complex" terraform example the author offered, I have seen much thornier Terraform. The title, while appropriate for an article inspired by Terraform, I think misses the benefits DSLs have paricularly in LISP-derived ecosystems. A much better title for…
Re: DSLs are a waste of time
#17Re: DSLs are a waste of time
#18Yes, platform specification languages are a mess. Making them without the "language" part keeps all of the mess (the language is absolutely not the source of it). There are people trying to fix this, although I'm not sure if I'd place Pulumi on that group.
And DSLs are still a great software architecture technique with all kinds of applications.
Re: DSLs are a waste of time
#19I have no dog in this fight. But I do have opinions about DSLs.
The declarative vs imperative, or some hybrid, debate is ongoing with build systems.
James Duncan Davidson, author of Ant build system for Java, famously wrote a post-mortem. Mostly wrt to choice of XML for Ant's syntax and semantics. TLDR: Wheels fall off a declarative model once imperative logic is added.
FWIW, Here's how I think about declarative DSLs. Such as a scenegraph.
You have an exquisite mental model for a scene. It's probably hierarchical.
You attempt to capture that mental model in code. The representation is probably a grove data structure. aka Directed Acyclic Graph where nodes can have key/value pairs for metadata.
You need to serialize that grove. So you pick a suitable syntax. Hopefully something that looks like VRML-97. Basically s-expressions (JSON without the syntactic vinegar), with some way to represent object prototyping (define/use), and don't forget identifiers ("id" field). Bonus points if you include path expressions in your syntax.
That (human readable) serialized grove is the declarative DSL.
In an future perfect world, your mental model, runtime representation, serialization format, AND the real world will be isomorphic.
Not isomorphic? Of course they're isomorphic. Why even mention it?
Funny you should ask.
In the Java world, dom4j for representing XML documents, and most of its progeny, is not isomorphic. Only JDOM2's class hierarchy design actually matches the serialization format. (As of the last time I checked, a few years ago.)
dom4j's mismatch, leaky abstraction, poor design, what have you, begat untold additional labor and heartache. Which is all completely mooted by JDOM2's correct design.
Ensuring correct isomorphism avoids errors in the same way that strong typing and garbage collection do.
To wrap this up...
In my experience, isomorphism is the exception.
I have no idea if Terraform is a good declarative DSL. But I do know that it should be isomorphic with the runtime representation AND the real world. And that should be settled before weaving in imperative functionality.
Re: DSLs are a waste of time
#20Is SQL a “waste of time?” Regular expressions, HTML, Makefiles, CSS (and CSS selectors aka jquery selectors)?
It’s the bad ones that are a waste of time. The ones still called “dsl” instead of just “language, “format,” or “syntax.”