Live data from Hacker News

Problems with DSLs for non-programmers

artur-martsinkovskyi.github.io

51–60 of 144 posts

Re: Problems with DSLs for non-programmers

#51
post #18

Earlier quoted context omitted.

I think DSLs are about defining a 100% textual format. And spreadsheets are GUI apps. There's a DSL for defining a cell formula but in total it's a small part of the experience of using a spreadsheet app.

> "I think DSLs are about defining a 100% textual format." That's an unjustified qualification. I could throw together a spreadsheet format that is all text. The spreadsheet GUI then becomes a advanced text editor that, when editing that particular format, exposes advanced content-aware controls not at all unlike advanced text editors like emacs can for s-expressions. We can bridge the gap in other ways too, for inst…

> I could throw together a spreadsheet format that is all text. […] The spreadsheet GUI then becomes a advanced text editor that, when editing that particular format, exposes advanced content-aware controls not at all unlike advanced text editors like emacs can for s-expressions.

Emacs already has that, included in org-mode: https://orgmode.org/org.html#Tables

(Emacs also has an even more spreadsheet-like mode; ses-mode, but that saves its data in less-than-purely-textual format. Or, at least, less textual than org-mode.)

Re: Problems with DSLs for non-programmers

#52

> The last time I had a business analyst that wanted to write SQL, he tripped over one join and asked me to do the job. Anecdotal counterpoint: I've met many an analyst who had some mean SQL skills.

And equally I've met many a career programmer who get confused by non-trivial SQL

Re: Problems with DSLs for non-programmers

#53
post #33

Earlier quoted context omitted.

I wouldn’t say that doctors are necessarily technical (when it comes to software).

Casual conversation I had with a top surgeon trying to login to an account: me: It's case sensitive - you need a capital letter. him: How do I do that? me: Hold down the shift key. him: Where's that?

Haha! I’m not surprised :)

Re: Problems with DSLs for non-programmers

#54
post #8

The argument here boils down to: I haven't seen it work in places where I've been employed so it must not work. Reality check: I've worked on multiple large research teams that successfully developed DSLs still in use by domain experts -- military sigint in one case, doctors in another case, industrial engineers in another. We developed these languages for specific applications where the domain experts needed to prog…

They became programmers...

To use a DSL without becoming a "progammer", by virtue of that fact, it needs be non-programmable: non-Turing equivalent (at the very least).

Re: Problems with DSLs for non-programmers

#55

I think it's better to call the users of such high-level DSLs, accidental programmers . It's not like they are not programmers, its just that they don't see software development as their vocation or profession. Yes, it's important to have languages that target them (e.g. Excel, Latex, SQL). Design of such DSLs is important and hard work. We need more professional activity making DSLs usable, consistent, and extensibl…

I agree. I think what the author was trying to say with his article is that DSLs where end users can use the system with zero training are a hoax. You can't put SQL, LateX or even Excel in front of someone with no context or help and expect them to understand how to use it. But with a few days or weeks of training, a business user can go from being helpless to being able to query their organization's database and create fancy charts.

Much like most things in software, it's key to hit the correct level of abstraction.

Re: Problems with DSLs for non-programmers

#56
post #11
post #7

Counter example: spreadsheets.

Yes, and it's so strong it makes the topic totally moot. The author has just stated in his experience DSL:s have turned into a mess. The same could be said for any known well established technique that is not used competently. "No, all tools don't suck. But please don't use the chainsaw as a hammer"

I agree with this. I think the author's real issue is that designing a good DSL is hard.

Re: Problems with DSLs for non-programmers

#57
post #18

Earlier quoted context omitted.

I think DSLs are about defining a 100% textual format. And spreadsheets are GUI apps. There's a DSL for defining a cell formula but in total it's a small part of the experience of using a spreadsheet app.

> "I think DSLs are about defining a 100% textual format." That's an unjustified qualification. I could throw together a spreadsheet format that is all text. The spreadsheet GUI then becomes a advanced text editor that, when editing that particular format, exposes advanced content-aware controls not at all unlike advanced text editors like emacs can for s-expressions. We can bridge the gap in other ways too, for inst…

> That's an unjustified qualification. I could throw together a spreadsheet format that is all text. The spreadsheet GUI then becomes a advanced text editor that, when editing that particular format, exposes advanced content-aware controls not at all unlike advanced text editors like emacs can for s-expressions.

If you could invent a text format that could be efficiently edited with a basic text editor then I would agree it's a DSL. But I feel like you would lose a lot by dropping a dedicated GUI, e.g.:

- horizontal scrolling of columns, adding, hiding columns

- "smart copying" a formula by scrolling down

- selection of rows/columns/cells

I don't think anybody would use such DSL using a basic editor.

Overall it's discussion about the definitions of terms, but I don't understand why people want to capture anything having some "editable format" as a "DSL" when addtional terms like "visual programming" allow more differentiation?

Re: Problems with DSLs for non-programmers

#58
post #37

Earlier quoted context omitted.

I think these are examples of a https://en.wikipedia.org/wiki/Visual_programming_language , while https://en.wikipedia.org/wiki/Domain-specific_language#Examp... are purely text-based.

Don't confuse a deficiency of a wikipedia article for the definition of that thing.

So where should I look up the definition of a DSL?

Re: Problems with DSLs for non-programmers

#59

Earlier quoted context omitted.

Yep. But they're overused and underused each day... Everything can be a spreadsheet and nobody questions if there are better ways of holding that particular data

The issue that I've seen with Excel is that it's often seen as the hammer -everything is a nail- for people that are less inclined with technology / set in their way. They will use it both as intended, a spreadsheet for calculations, usually for reports. But also as publishing software (think InDesign) and format their spreadsheet to look like an invoice / quote, a hand made Gantt chart (yeah with arrows as delimiter…

> But also as publishing software (think InDesign) and format their spreadsheet to look like an invoice / quote, a hand made Gantt chart (yeah with arrows as delimiter

Meh, I think I've done all these things myself at some point.

I'm very familiar with Excel, so sometimes it's easier to throw something together using a tool I know well, rather than get (or maybe buy) and learn new software.

Re: Problems with DSLs for non-programmers

#60
post #58

Earlier quoted context omitted.

Don't confuse a deficiency of a wikipedia article for the definition of that thing.

So where should I look up the definition of a DSL?

Let's take the Wikipedia definition, not the examples list:

> A domain-specific language (DSL) is a computer language specialized to a particular application domain.

where computer language links to a list of things that includes "programming languages", which visual programming languages are a part of.

Other sections of the article also mention some graphical examples, e.g. UML. (which isn't a programming language, but a modeling language, also used sometimes as an input to software)

Post reply on HN