Hacker News new | past | comments | ask | show | jobs | submit login
DSL Engineering: Designing, Implementing, Using Domain-Specific Languages (2013) [pdf] (voelter.de)
75 points by walterbell on April 26, 2017 | hide | past | favorite | 6 comments



One of the awesome things about Lisp is how easy it is to build DSLs with. I used to think this wasn't that useful of a feature, but recently I've had an idea for a few web apps and instead of writing all the tedious GUI logic I've written a DSL in Clojure instead. This has allowed me to jump straight into the feature building, and quickly build prototype versions of my ideas. For example, when working with code, switching between a list structure and tree structure is trivial. But in a GUI you need to write a load of boiler plate to change how it displays, how selection works and so on.

Additionally the hotswapping allows me to interact with the application in real time, just like a GUI. Pretty powerful stuff.


The question for me, my my day to day use cases, is : can you propose the power to someone who is less proficient in functional programming. That is, a "regular java developer" (I don't say this in a disrespectful way at all, the simple fact is that some people are trained or like to just program and don't always see the advantages of DSL which are, to me at least, outside of the realm of regular software development)


As a user of some somehow-DSL (VisualRules), I find the first pages of the book very enlightening as they put my day-to-day tool in perspective.

And what ? 500+ pages donation ware, that's altruism. Thank to the author.


The author of this book also runs the Omega Tau podcast [1] that should be of great interest to many HN readers.

[1] http://omegataupodcast.net


More info on author: http://dslbook.org

His 2010 paper [1], "From Programming To Modeling – and back again", talks about other modeling projects, including the Charles Simonyi (inventor of MS Word and Hungarian notation) company Intentional Software. Microsoft recently bought [2] Intentional (with its DSL workbench) and the technology will continue in the Microsoft Office / Productivity division.

[1] http://voelter.de/data/articles/FromProgrammingToModeling-1....

[2] http://www.intentional.com/charles-simonyi/

"Real surfaces in the world can hold many forms of information, for instance: drawings, memos, messages, stickers, notes, or maps ... Similarly, the surfaces on the new devices should show all kinds of data side-by-side and interwoven as a universal surface ... You would be “interacting with the documents” themselves rather than with apps as such.

Now combine these scenarios with the new capabilities in machine learning and knowledge representation. In the spreadsheet era, we had a very simple ontology, which was really divisions of data into types: numbers, text, and maybe dates. Since then, powerful web services emerged by giving these simple types more precise semantics: the text is a product to buy, the number is its price, or the text is the name of your friend and the number counts the “likes.”

Even with just a handful of such “domain specific” terms the value of services to the user has already soared. Imagine then, the power of an ontology consisting of thousands of terms covering most of the common activities that comprise our personal and professional lives ranging from life transitions, education, entertainment, buying and selling. Curating and exploiting such an ontology will be as important as the hardware and software surfaces that activate it.

The Intentional platform can represent domain specific information both at the meta-level (as schemas) and at the content level (as data or rules). It has patterns for distributed interactive documents and for views for a universal surface."


I think this book was put on here a while back, probably wrong about that. Wish the code were in Haskell or Scala




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: