Live data from Hacker News

DSLs are a waste of time

leebriggs.co.uk

161–165 of 165 posts

Re: DSLs are a waste of time

#161
post #48

Earlier quoted context omitted.

> I like Prolog much more than Pulimi in this role as you can succinctly and unambiguously declare dependency relations. Prolog for Pulumi is an absolutely doable thing - and indeed sounds sufficiently diabolical that someone should do it ;-)

Or even Prolog w/ the AWS CDK. Hmm.. that might even be a business.

It's probably not a business... someone will just fork it ;-)

Re: DSLs are a waste of time

#162
post #31
post #14

Earlier quoted context omitted.

Why not?

Well the reasons for each point are a bit different so let's go through them one by one. A declarative language cannot be general purpose by definition. Succinctness. If you know exactly the domain you are talking about it means you can use many shortcuts and abbreviations that would be unclear otherwise. We all know this is true for natural languages, and it is also true for programming. Close to English. In this ca…

> A declarative language cannot be general purpose by definition.

Prolog is both declarative and general purpose.

> Succinctness

life ← {⊃1 ⍵ ∨.∧ 3 4 = +/ +⌿ ¯1 0 1 ∘.⊖ ¯1 0 1 ⌽¨ ⊂⍵}

> Close to English.

We disagree that this is even desirable (and why English, rather than Hebrew or Dutch?) - but BASIC is a pretty good example of a general purpose language which is close to English.

Re: DSLs are a waste of time

#163

Earlier quoted context omitted.

You're grasping at straws now. Just admit that regex is a much more fundamental technology than some ad-hoc, badly specified commercialware and we can be done. Go on, you can find it in yourself ;-D. Sure, Makefiles are a DSL. Just a horrible one. They just make my point in a different way. Have you used a Makefile recently? They are AWFUL . Brittle, complex, half-bash, invisible-tab-prefixed, abominations, sent from…

You seem to have fundamentally misunderstood my purpose for engaging you. I tried repeatedly to move the conversation from a poorly supported absolutist statement from you to a productive discussion about what makes a DSL good or bad, but you're only interested in defending yourself and your over encompassing statement, not in actually having a discussion. Such as why does being fundamental in some way make it a good…

I think you’re giving yourself quite a bit too much credit there. Most of this discussion you’ve been trying to argue about regex. We can drop it up to a higher level, sure, but you seem to only want to do that to avoid conceding in the specifics.

As I’ve quite clearly said, regex is a good DSL - so I obviously do think, and have argued above, that there is a split between “good” and “bad” DSLs, but examples of good ones are vanishingly scarce.

I think, given that it’s your position that DSLs are generally good; or at least that there are many examples that you find fine, then it’s upon you to provide examples. So far you named Makefiles, which are hilariously bad, but your response to my comments on it was basically some lazy ad-hominem, so I don’t hold out hope for any actual intelligent analysis.

But as I have outlined above there is a giant chasm of difference between mathematically-backed deep and broad DSLs, and… some ad-hoc commercialware that iterates towards being a full language but with bad, ad-hoc design and worse tooling.

Re: DSLs are a waste of time

#165

Earlier quoted context omitted.

Very much agree, I do wonder how can things like crontab be specified? The cron job syntax is its own fricking thing that I have to always look up. But then, I wonder, how else can it be specified? yaml file?

I've spent way too many hours this week looking for a better model for configurable timers than cron. Cron is kind of awful, not just the syntax but the logic. You can't say "Every three days but not on Monday, if it would land on a Monday, defer that run till the next selected day". There is also too many ways to say the same thing, so GUI editors are hard.

Yeah, basically it needs to be Turing complete but it falls short. Then why not just give us Lua or some real programming language. There is no real need for a cryptic single line syntax.
Post reply on HN