HNHacker News
TopNewBestAskShowJobs

dunk010

758 karma · joined May 15, 2008

submissionscomments
dunk010··on DSLs are a waste of time
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.

dunk010··on DSLs are a waste of time
I think that you really have to use some Lisp to get the point here. The point is it's the best of both worlds, and the problem somewhat vanishes. But I don't know if I can convey that to you in words.
dunk010··on DSLs are a waste of time
It is. But nobody listens. Ever.
dunk010··on DSLs are a waste of time
> No need for the personal swipe

Fair enough

It used specific types of DSLs as evidence but I don’t see a narrowing of the claim itself? Where are you getting that?

What makes me sad, as I posted in a top-level comment, is that I read this exact same rationale 20 years go, by Steve Yegge, and yet we are still having the same stupid debate in programming about whether we should use DSLs and then the DSL grows and grows and, lo and behold, it's Turing-complete, but its ergonomics are dire and its tooling non-existant. And it's not like this is some niche part of the ecosystem - it's how most people deploy infrastructure.

What I despise is seeing the same problems come up again and again, and never seeing good solutions to them, jsut the same mistakes, repeated. Programming is, truly, terrible. Just a load of slaves building the Pyramids.

dunk010··on DSLs are a waste of time
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 another millenium. Let's take a modern codebase - say Python - you're much better to just use something like pyinvoke - handles all the CLI-level stuff, and you get the full force of the programming language you were writing in the first place.

dunk010··on DSLs are a waste of time
The point is that the config gets more and more complex, requiring more and more features, until you get a rather ugly turing-complete programming language. And the further point is that with Lisp, you don't need any of that. Code is data. Data is code.
dunk010··on DSLs are a waste of time
Regular expressions ... this representation is a somewhat fundamental and mathematically general representation of interacting with strings - the DLSs in question here are, quite obviously, nothing of the sort.

https://en.wikipedia.org/wiki/Regular_language

Regular expressions have a deep mathematical background. An ad-hoc DSL from a company that specifies infrustructure does not.

dunk010··on DSLs are a waste of time
Steve Yegge made this same point ~20 years ago:

> The whole nasty "configuration" problem becomes incredibly more convenient in the Lisp world. No more stanza files, apache-config, .properties files, XML configuration files, Makefiles — all those lame, crappy, half-language creatures that you wish were executable, or at least loaded directly into your program without specialized processing. I know, I know — everyone raves about the power of separating your code and your data. That's because they're using languages that simply can't do a good job of representing data as code. But it's what you really want, or all the creepy half-languages wouldn't all evolve towards being Turing-complete, would they?

Via: https://sites.google.com/site/steveyegge2/the-emacs-problem

dunk010··on DSLs are a waste of time
I don't think that this is a true comparison. JavaScript was limited mostly by its sandboxing, not what you could write in it. You can't really compare that to what HCL is and does.
dunk010··on DSLs are a waste of time
Well, I remember them teaching that stuff, and regex is quite clearly a very different sort of DSL than the ones being discussed. That combined with the comment author's seeming lack of nuance made me wonder if they'd ever looked deeper than "all things without a for loop are a DSL". I think we are getting too far into the semantics here though, at risk of splitting hairs and geting lost in the details. The core point is that the article is talking about some quite specific types of DSLs, so you can't say respond with "No, DSLs are useful" and then list off a bunch of unrelated stuff as a rebuttal.
dunk010··on DSLs are a waste of time
Exactly. The languages in the article are nothing of the sort.
dunk010··on DSLs are a waste of time
If you re-read my reply, you'll see that I said that regex is a DSL, but doesn't apply for different reasons.
dunk010··on DSLs are a waste of time
JavaScript wasn't really a DSL though was it? Not in the sense of this article. Brendan Eich was hired to embed Scheme into Netscape Navigator. That's not the same as the kind of crippled templating languages this article is discussing.
dunk010··on DSLs are a waste of time
I think your examples are spurious and wrong, when compared with the specific kind of DSL the article talks about. SQL is a "Fourth Generation Language", much like Prolog, which is quite different to what is being discussed. HTML isn't a DSL; it's a type of SGML, a specific document markup language - you can't just shout "DSL" and squint a bunch and assume "All sort-of-languages are DSLs". Regular expressions, sure, but that's not relevant here because it's so universal - and mathematically backed (ever done a CS degree?) - that it's embedded inside every language now - i.e. this representation is a somewhat fundamental and mathematically general representation of interacting with strings - the DLSs in question here are, quite obviously, nothing of the sort.

The article is right. DSLs are, universally, awful, as they grow and grow until they encompass all features of a general programming language - but because of their evolution path the're awkward and twisted and lack basic features of a general programming language (and definitely lack all the tooling you get). Witness what happened with XML as a configuration language. What started off as another leaf node under SGML ended up - by way of the Java ecosystem - growing if statements and loops and all the rest, only in a horrendous, hard-to-read and harder-to-debug monstrous language.

So he's right. We should use real languages. And we should probably all just use Pulmi.

dunk010··on Becoming a contractor
As a contractor you’re being paid to take on risk. That’s the trade.
dunk010··on Things I wish I knew before moving 50K lines of code to React Server Components
You monster
dunk010··on Things I wish I knew before moving 50K lines of code to React Server Components
Thin vs thick client is a much older debate, but you have to go back to the times before the Web ;-)
dunk010··on What an executive physical is like
I thought American healthcare was ace? (assuming you have insurance)
dunk010··on Why Htmx Does Not Have a Build Step
Reminds me of this: https://programmingisterrible.com/post/139222674273/write-co...

“Write code that is easy to delete, not easy to extend.”

dunk010··on Welcome to Datasette Cloud
> hope Softbank buys you out soon :-)

The cynical thing is to say this is about monetisation and an exit, rather than about making an excellent tool more easily available to journalists.

dunk010··on Welcome to Datasette Cloud
Bit cynical, no?
dunk010··on Is this a good book for me, now?
Presumably… Waldo?
dunk010··on We reduced the cost of building Mastodon at Twitter-scale by 100x
People should probably close the TikTok and pick up a book instead to increase their attention spans then :-D
dunk010··on We reduced the cost of building Mastodon at Twitter-scale by 100x
Exactly, why are so many people missing this point. It's not "we built a narrow, tedious framework for knocking off Twitter clones", it's "We built a platform that turns data processing on its head and look in a couple of months you can clone Twitter just imagine what YOU can do with this."

I see parallels though to Datomic, where they turned the database inside out, co-located the app logic and data and indexes, etc. There are a bunch of great videos on YT about Datomic by Rich Hickey & co, worth a watch and I think shine a light on the approach here, too.

dunk010··on We reduced the cost of building Mastodon at Twitter-scale by 100x
You never know.
dunk010··on We reduced the cost of building Mastodon at Twitter-scale by 100x
You're killing it with the replies here +++
dunk010··on How not to write a pipeline
Use a database. Wrap it with a scheduler. Have your workers poll it. Use Redis if you must in higer-contention situations for locks. Doing this will solve countless swathes of distributed systems problems, and you won't get woken up at 2am every third night.
dunk010··on GitHub code search is generally available
I had the same realisation. Also remember they’ve extended JavaScript with Typescript, and built LSP. It does indeed feel like they are eating the whole of software.
dunk010··on The D.E.N.N.I.S. system: Résumé tips for Senior Devs
Came here to say this. It’s definitely a bad idea given that so much first stage screening is automated these days. If your CV parses badly you’re just as likely to be silently binned by an algorithm. I say this from personal experience, and now having begrudgingly rolled my CV back from LaTeX to Word.
dunk010··on Big Ball of Mud (1999)
One of the best articles about software engineering ever written. They should pin it to the top of the HN front page :P
← PreviousPage 2 of 8Next →