News for hackers. Stuff that matters.
Re:Systems ideas that sound good but almost never work by billyp-rva on Tuesday December 31, 2024 @12:24PM (#42560183)
> (1) DSLs work great sometimes.

I'll take a stab at fleshing this out: DSLs work great when they have an IDE with autocomplete and a quick (or instant) feedback loop.

Re:Systems ideas that sound good but almost never work by diggan on Tuesday December 31, 2024 @12:43PM (#42560327)
I was gonna say something like "DSLs work great when they're small, purposeful and easy to test", I guess yours kind of helps when they're not what I'd suggest :)
Re:Systems ideas that sound good but almost never work by tinthedev on Tuesday December 31, 2024 @12:49PM (#42560375)
This whole thread said exactly what I wanted to write. Feels bad to be so pre-empted.

DSLs that solve a specific problem with a page or two of documentation overhead are great.

Trying to reinvent paradigms or scope creep is where the pain comes in. Seems like the post author has been burned by that type of DSLs.

Re:Systems ideas that sound good but almost never work by f1shy on Tuesday December 31, 2024 @02:40PM (#42561217)
I would say that is the line between DSL and just “L” another language…
Re:Systems ideas that sound good but almost never work by earnestinger on Tuesday December 31, 2024 @05:53PM (#42562472)
> DSLs that solve a specific problem with a page or two of documentation overhead are great.

Do you have any example? I’ve heard lots of good things of dsl, but never had the luck to witness it’s full glory.

(except for regex, which I love, but it has more than two pages of docs)

Re:Systems ideas that sound good but almost never work by tinthedev on Friday January 03, 2025 @10:48AM (#42586654)
I've coded some myself, and have used some... but it depends on where you draw the line.

I'd consider Python's f-string syntax a DSL of sorts.

YAML might be considered a simple DSL, if you don't consider it a language/format instead. It's a bit more than 2-3 pages, but it's not hundreds of pages. And a simplified version could be constructed with <10 pages.

Similar to YAML, but for Markdown. I'd call that a DSL too, and it's even simpler than YAML.

Then, something more tiered as: CSV, JSON, TOML, INI, AsciiDoc

Once you're in the short form, it's a bit blurry what's a format, what's a DSL, and what is a language.

PS. Sorry for the late answer, I missed the direct question for a bit.

Re:Systems ideas that sound good but almost never work by PaulHoule on Tuesday December 31, 2024 @12:47PM (#42560359)
Maybe his problem is with those yucky distributed systems as in Kube, Antilles, etc. I write plain ordinary Java programs that work with a cloud API and compile bash scripts that colonize machines.
Re:Systems ideas that sound good but almost never work by verdverm on Tuesday December 31, 2024 @01:00PM (#42560459)
I think of Kube as more of abstractions whereas Wasp & Dark lang would be DSLs for the same concepts
Re:Systems ideas that sound good but almost never work by f1shy on Tuesday December 31, 2024 @02:35PM (#42561168)
So any DSL as an embedded language inside another.
Re:Systems ideas that sound good but almost never work by mdaniel on Tuesday December 31, 2024 @09:03PM (#42563415)
> and a quick (or instant) feedback loop.

And yet Terraform/Tofu continues to poison people's brains. It boggles(!) the mind

Re:Systems ideas that sound good but almost never work by crabbone on Wednesday January 01, 2025 @06:44AM (#42565464)
Counterexample: regex. In terms of how successful DSLs are, I think, something like Perl's regular expression is, at least, in the top ten. Most regex users don't care about there being an IDE for it, I don't think there's a lot of value for regex autocomplete, even if such thing existed.
Re:Systems ideas that sound good but almost never work by hot_gril on Sunday January 05, 2025 @11:13PM (#42607594)
Regex is a good counterexample. It's the only useful DSL I can think of. That said, IDE support for regex would be cool, especially considering many languages have special syntax for regex.