Ayende @ Rahien

Refunds available at head office

Book Idea: Writing Domain Specific Languages in Boo

I know that I am asking the question from a self-selecting group, but what the hell.

I am considering the idea of writing a book about writing domain specific languages, with Boo as the implementation language. This has two distinct topics:

  • Theoretical knowledge:
    • DSL Usages
    • How to create the syntax
    • How to integrate into an application
    • Testing
    • Versioning
    • Patterns
  • Implementation strategy - how to actually build a useful DSL that can do all of the above using Boo.

I certainly like the subject, but I wanted to know what you think about it.

Do you find the idea useful? Is there enough interest in it? Do you (or people you know) use DSLs for work/fun? Any other comment?

Comments

Pierre-Marc
10/12/2007 07:25 PM by
Pierre-Marc

I would buy the first copy!

Chris Gibson
10/12/2007 07:34 PM by
Chris Gibson

I would definitely buy a copy. I would be particularly interested in the "Implementation strategy" topic.

Derick Bailey
10/12/2007 07:35 PM by
Derick Bailey

I'd buy the second copy! :)

Although I would recommend releasing it as an e-book, to get it out the door sooner and into the hands of those that want to read it.

Ayende Rahien
10/12/2007 07:41 PM by
Ayende Rahien

Implementation strategy is basically how to actually build it using Boo.

Mike Breen
10/12/2007 07:46 PM by
Mike Breen

Where should I send the money for a copy?

Mark Monster
10/12/2007 07:52 PM by
Mark Monster

I would certainly be interested. Do have a published in your mind? I can help you get in contact with a publisher if you're interested.

Truadpon Satayarak
10/12/2007 08:17 PM by
Truadpon Satayarak

I'd buy a copy. How about "Debuging" topic. And "Samples of applications" would be welcome.

Jeremy
10/12/2007 08:19 PM by
Jeremy

I personally would buy the book, but I doubt many developers would have much interest in the subject. It's definitely a niche topic.

Sneal
10/12/2007 08:22 PM by
Sneal

I would buy a copy, but I don't know many people that would. Jeremy is correct about this being a Niche topic.

Maybe a small ebook?

Mike
10/12/2007 08:36 PM by
Mike

That would be a beautiful topic. Maybe start with a e-zine article and see what kind of interest it generates?

Mike

Mike
10/12/2007 08:36 PM by
Mike

That would be a beautiful topic. Maybe start with a e-zine article and see what kind of interest it generates?

Mike

Avish
10/12/2007 08:39 PM by
Avish

Not to spoil the fun or anything (I'd download a copy if it were CC-licensed!), do you think Boo is mature enough to have books written on it? It always seemed kinda flaky to me (working on that, of course, but still).

Stuart
10/12/2007 09:20 PM by
Stuart

Sounds interesting. I would pay to read it.

Ayende Rahien
10/12/2007 09:21 PM by
Ayende Rahien

Mark, yes, I have a publisher in mind, Manning, I am in contact with them now.

Thanks for the offer

Ayende Rahien
10/12/2007 09:23 PM by
Ayende Rahien

The idea is to stop it from being a Niche topic

Ayende Rahien
10/12/2007 09:25 PM by
Ayende Rahien

Avish,

As I am using Boo DSLs in production for over a year, I should certainly hope so, I am moving money with it.

The main focus of the book is actually not on Boo itself, worthy as it. It is on DSLs and building DSLs

Chris Holmes
10/12/2007 09:37 PM by
Chris Holmes

Yes, I'd buy it. And yes, Jeremy is probably right that it's a niche, but maybe more books like this could help expand people's awareness.

And that might be a good thing.

James Curran
10/12/2007 09:47 PM by
James Curran

Well, I'd be interested in a book on DSLs, however, I don't know Boo, and I suspect that would be true of most potenial readers. Will you be teaching Boo first, or will you just assume knowledge of it.

If you just assume knowledge of it, you are targeting a small segment of a small segment .

If you teach Boo first, you are doubling your work and halving your focus.

Either way, you leave your readers wondering "Why must I learn Boo, to learn Dsl?". Worse, you may give them the impression, "DSLs are only really useful using Boo".

I would recommend using a more common language (C#/VB) for as much as you could, and the switch to Boo at the end for features that C#/VB prove inadeque. (And remove Boo from the book title)

This would broaden the books appeal, while letting you get away with providing just a brief overview of Boo.

Ayende Rahien
10/12/2007 09:54 PM by
Ayende Rahien

I am still thinking about it, but the general idea is that I am going to talk about DSLs, and use Boo as the implementation language.

I am going to assume that you can translate from

if(x == 1) { ... }

to

if x == 1:

...

So I'll probably go over the Boo syntax and some of the niceties there, and then move to discuss the interesting DSL parts.

You can't build DSLs in C# / VB, they aren't flexible enough (at all).

Boo is not the language that I am going to use to write the DSL in, Boo is the DSL language.

Srdjan
10/13/2007 12:33 AM by
Srdjan

I definitely pay for that book. It is a great subject,

plus a chance for Boo to reach wider audience...

Go for it!

Tim Wilde
10/13/2007 02:38 AM by
Tim Wilde

I think this sounds like a great idea, too. I'd buy a copy! :)

I don't use DSLs (other than fluent interfaces, which are arguably little more than a nod to the DSL meme) but I can certainly see their benefits and this book sounds like fun (isn't everything with Boo?!), and something I would really enjoy reading.

I hope you do decide to write this Oren, I've already reserved you a space on my shelf next to Fowler and Evans! :)

Ngarajan
10/13/2007 06:23 AM by
Ngarajan

Great topic

Jeff Brown
10/13/2007 09:52 AM by
Jeff Brown

The geek in me loves the idea.

However, I hope the book will include some guidance on when to write a DSL and how to flesh it out into a complete product used and maintained by a large number of people. eg. How to turn your DSL idea into a popular OSS project.

I'm glad Boo makes it easier to implement DSLs but I'm mildly worried about the day when I have to pick up someone else's code that was built using their 5 undocumented homebrew DSLs that no one else knows about... And I'm an excellent developer too.

Ayende Rahien
10/13/2007 10:07 AM by
Ayende Rahien

Yes, is would certainly contain guidance in about fleshing DSLs.

Not sure if this turning your DSL to OSS project should be a goal, though :-)

Aren't you as worried about picking up someones code who uses their own 5 undocumented homebrew libraries / frameworks?

Benedikt Eckhard
10/13/2007 10:42 AM by
Benedikt Eckhard

That sounds really intersting! If it is "just" about internal DSLs (in Boo, Ruby, or whatever) you should clearly state that in the title. I would also be very intersted in security concerns if the DSL should not only be used by developers but by business persons as well.

If you also write on external DSL you might want to take a look at http://www.openarchitectureware.org/. Especially their xText transformation language is just great for building DSLs.

just my two cents.

Jeff Brown
10/13/2007 10:50 AM by
Jeff Brown

Indeed I am...

In my experience developers often have a rather skewed perception of the discoverability, generality and usefulness of their designs (myself included). Sometimes they need an additional reminder that their contributions must have meaning within the social context of the organization; not just to the compiler.

However in the end, I'm glad to see people experimenting with new ideas despite the latent potential for chaos. You only get to build something from the ground up once so you might as well learn something doing it; even if it's to never make the same mistake again. After all, there's only one way to achieve excellence: practice. ;-)

Gabriel Schenker
10/13/2007 01:45 PM by
Gabriel Schenker

I'm slowly starting to implement my own fluent interfaces and it's a lot of fun and the readability of the code increases very much. So I'll definitely love to buy and read your book!

Pedro Teixeira
10/13/2007 02:40 PM by
Pedro Teixeira

I've used ANTLR in successfull projects to both speed development and to enable end users edit expressions in their domain language. I agree that DSLs are the way to go and a book on how to do it with boo is really welcomed - specially if you are to explain clever ways to use meta methods, etc...

Do you also consider means of exposing boo snippets to user, or you see dsl solely to be used by developers?

ah, I think it would also interesting to see your perspective on graphical DSL (DSL Tools for VS specifically) and there could also be some tips regarding caching of compiled boo, or other performance issues you find relevant.

Kevin Williams
10/13/2007 03:43 PM by
Kevin Williams

I would certainly buy a copy. I assume it wouldn't be a $50 tome, but rather a $20-$30 DSB (domain-specific book). ;-)

Michael Dorfman
10/13/2007 06:34 PM by
Michael Dorfman

I might be interested in the book, if you could first point out for those of us who have not (yet) tasted the Boo koolaid exactly what makes this language more suitable to DSLs than VB9, C#3, F#, IronPython or IronRuby.

It's not enough to say "You can't build DSLs in C# / VB, they aren't flexible enough (at all)", you need to mention which language features are missing.

If you can do that, and help people get over that initial Boo hurdle, I think it sounds like an excellent book.

Jostein
10/13/2007 08:40 PM by
Jostein

I would buy a copy.

Ayende Rahien
10/13/2007 08:49 PM by
Ayende Rahien

Pedro,

Exposing the DSL to the users is something that I am in two minds about.

On the one hand, this is something that make the user influence the application more easily.

On the other hand, I have extreme hesitations about letting random joe user go and modify code in production.

I would certainly expect the user to read it, but I would have to think carefully about who can create it.

Ayende Rahien
10/13/2007 08:51 PM by
Ayende Rahien

Kevin,

No idea yet about what kind of book it would be, it is still in the thinking phase.

dru
10/14/2007 01:29 AM by
dru

I would buy a copy, even if it was PDF only. -d

Nick Parker
10/14/2007 02:17 PM by
Nick Parker

I would buy a copy!

James Gregory
10/14/2007 10:33 PM by
James Gregory

Sounds like a great idea, you'd get my money.

schorsch
10/15/2007 07:57 AM by
schorsch

Great idea!

Frederico Pinto
10/15/2007 09:13 AM by
Frederico Pinto

A book will have a huge advantage over your webcasts, customizable speed :)

Love the idea, keep on working to lower the barrier to entry!

I. Horowitz
10/15/2007 10:50 AM by
I. Horowitz

The subject (language oriented programming) is getting more and more interrest I'm sure it will find its buyers. I'm definitely one of them. I'm always thrilled when I see "boo" and "DSL" in the title of your posts.

Sendhil
10/15/2007 12:05 PM by
Sendhil

I would buy, If you beat Martin Fowler on the release date :-)

Martin Fowler is working on this topic (DSL) too.

Regards,

Sendhil

Ben Scheirman
10/15/2007 08:58 PM by
Ben Scheirman

Count me in for one, actual book preferred (but I'd buy a PDF if it didn't get enough buzz to warrant a paperback)

JasonA
10/16/2007 07:03 PM by
JasonA

+1 copy for me.

Developing a mini-language in Boo is something I've been thinking on for a while.

I'd be very interested in learning more about the debug experience both for implementing the internal DSL as well as what the debug experience would be like for someone authoring a piece of an application using that DSL.

Comments have been closed on this topic.