nehaa arora wrote:What computer language fundamentals are required to get on with building/designing a DSL beyond the ones required for writing 'theoretical' compilers?
SCJP, SCJD, SCEA 5 "Any sufficiently analyzed magic is indistinguishable from science!" Agatha Heterodyne (Girl Genius)
Burk Hufnagel wrote:even something like a RESTful web service could be considered a small and rather limited DSL.
Terence Parr wrote:When your world is a parser generator, everything looks like a parsing problem ;)
SCJP, SCJD, SCEA 5 "Any sufficiently analyzed magic is indistinguishable from science!" Agatha Heterodyne (Girl Genius)
Terence Parr wrote:
Burk Hufnagel wrote:even something like a RESTful web service could be considered a small and rather limited DSL.
Sure. Anything that is not random text follows the format, hence, a language. URLs certainly follow a language. The output of the Web service itself must also follow a format. This is usually XML or JSON etc... Those are languages.
When your world is a parser generator, everything looks like a parsing problem ;)
nehaa arora wrote:Wow! that is indeed an interesting view to problem solving! but it would need a lot of experience to know you are not hammering down your screws?!
Terence Parr wrote:
Yep, experience helps in two ways: knowing when to go DSL and being able to get their quickly. It also helps in designing the language (syntax/semantics)...so three ways.
I cringe when see of the languages out there. I remember a friend, who was designing a new programming language, telling me about a bug he had in his parser. It allowed what he thought was a cool language feature. It was a weird special case. Every tool that parsed that language would have to have a bug to match it.
nehaa arora wrote:Hmm...any hints as to how one can attain nirvana here? I know nothing beats making your mistakes and learning from them but a guru can sure set one on the right path to the needed grind. Any recommended references for the above three, besides your book?
SCJP, SCJD, SCEA 5 "Any sufficiently analyzed magic is indistinguishable from science!" Agatha Heterodyne (Girl Genius)
Burk Hufnagel wrote:Great question Neha! Please Terence, inquiring minds want to know. Is there a mailing list or Google group for DSL designer/implemeters that you're aware of? Or, perhaps some web site where they congregate to share mistakes and successes? If not maybe you could start some centered around the book's web site.
Terence Parr wrote:
Burk Hufnagel wrote:Great question Neha! Please Terence, inquiring minds want to know. Is there a mailing list or Google group for DSL designer/implemeters that you're aware of? Or, perhaps some web site where they congregate to share mistakes and successes? If not maybe you could start some centered around the book's web site.
Let's take design first. I think exposing yourself to lots of languages is the key to avoiding "sins". Try to pick out what you like and dislike from some languages. Think about how languages evolve. For example, Java has gotten WAY to complicated for my taste. Some of the weird edge cases are truly frightening in complexity. It also lacks gotos, which sucks for a guy like me that has to *generate* Java a lot. Try to look at everything through the lens of a language designer. during the day tomorrow while doing your job, try to pick out the languages you see (and imagine the hidden ones): command-line shell, URL, HTTP, SMTP (mail), network protocols, programming languages, HTML, XML, config files, ...
As for implementation, you can hang out on the antlr-interest list or comp.compilers newsgroup (though I admit I don't read that anymore). Stuff pops up on various lists/forums, but too much content focuses on compilers. That's why I wrote this book and teach a non-compiler language course at Univ. of San Francisco. Almost no one is writing a compiler but all of us are writing little languages for everything from dat files to graphics DSLs etc...
SCJP, SCJD, SCEA 5 "Any sufficiently analyzed magic is indistinguishable from science!" Agatha Heterodyne (Girl Genius)
SCJP, SCJD, SCEA 5 "Any sufficiently analyzed magic is indistinguishable from science!" Agatha Heterodyne (Girl Genius)
I remember a friend, who was designing a new programming language, telling me about a bug he had in his parser. It allowed what he thought was a cool language feature. It was a weird special case. Every tool that parsed that language would have to have a bug to match it.
nehaa arora wrote:I guess, then, the choice of language used for coming up with a DSL does have a bearing on its working and success. Thoughts?
SCJP, SCJD, SCEA 5 "Any sufficiently analyzed magic is indistinguishable from science!" Agatha Heterodyne (Girl Genius)
Don't get me started about those stupid light bulbs. |