<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Rails: Not a DSL</title>
	<atom:link href="http://nutrun.com/weblog/rails-not-a-dsl/feed/" rel="self" type="application/rss+xml" />
	<link>http://nutrun.com/weblog/rails-not-a-dsl/</link>
	<description>nutrun</description>
	<pubDate>Tue, 07 Oct 2008 14:28:04 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.2</generator>
		<item>
		<title>By: Tom</title>
		<link>http://nutrun.com/weblog/rails-not-a-dsl/#comment-138</link>
		<dc:creator>Tom</dc:creator>
		<pubDate>Fri, 21 Jul 2006 22:07:45 +0000</pubDate>
		<guid isPermaLink="false">http://new-site.nutrun.com/?p=37#comment-138</guid>
		<description>Thanks for the link, Marco.</description>
		<content:encoded><![CDATA[<p>Thanks for the link, Marco.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike H</title>
		<link>http://nutrun.com/weblog/rails-not-a-dsl/#comment-137</link>
		<dc:creator>Mike H</dc:creator>
		<pubDate>Fri, 21 Jul 2006 22:03:31 +0000</pubDate>
		<guid isPermaLink="false">http://new-site.nutrun.com/?p=37#comment-137</guid>
		<description>I don't think anyone is saying Rails IS a DSL.  What they are saying is that Rails utilizes a DSL or DSLs in it to do certain things, such as the example from paul in a previous comment.

That leads into the question: what the hell is a DSL?  Isn't that too general to be a DSL?  Isn't everything then a DSL?

Well .... yes.  Obviously, DSL has become a buzzword, and is widly overused.  However, for me, I find it helpful to think of the "DSL Concept" not as a script definition of a thing, but as a general concept that is applicable (sometimes) to how I write code and/or anything textual and client facing.

To me, it has elements of LISP = Programmable Programming Language, (in that I try and write lower level code that eventually enables me to write code and think in a higher level domain), treating code as language (where appropriate) and other related concepts.  If you stick to getting a Webster's definition of DSL, you'll never get anywhere and you won't get any benefit.</description>
		<content:encoded><![CDATA[<p>I don&#8217;t think anyone is saying Rails IS a DSL.  What they are saying is that Rails utilizes a DSL or DSLs in it to do certain things, such as the example from paul in a previous comment.</p>
<p>That leads into the question: what the hell is a DSL?  Isn&#8217;t that too general to be a DSL?  Isn&#8217;t everything then a DSL?</p>
<p>Well &#8230;. yes.  Obviously, DSL has become a buzzword, and is widly overused.  However, for me, I find it helpful to think of the &#8220;DSL Concept&#8221; not as a script definition of a thing, but as a general concept that is applicable (sometimes) to how I write code and/or anything textual and client facing.</p>
<p>To me, it has elements of LISP = Programmable Programming Language, (in that I try and write lower level code that eventually enables me to write code and think in a higher level domain), treating code as language (where appropriate) and other related concepts.  If you stick to getting a Webster&#8217;s definition of DSL, you&#8217;ll never get anywhere and you won&#8217;t get any benefit.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marco Abis</title>
		<link>http://nutrun.com/weblog/rails-not-a-dsl/#comment-136</link>
		<dc:creator>Marco Abis</dc:creator>
		<pubDate>Thu, 20 Jul 2006 10:30:35 +0000</pubDate>
		<guid isPermaLink="false">http://new-site.nutrun.com/?p=37#comment-136</guid>
		<description>Tom take a look at "A rationale for semantically enhanced library languages" by Bjarne Stroustrup

"A Semantically Enhanced Library Language (a SEL language or a SELL) is a dialect created by supersetting a language using a library and then subsetting the result using a tool that “understands” the syntax and semantics of both the underlying language and the library"

http://public.research.att.com/~bs/SELLrationale.pdf</description>
		<content:encoded><![CDATA[<p>Tom take a look at &#8220;A rationale for semantically enhanced library languages&#8221; by Bjarne Stroustrup</p>
<p>&#8220;A Semantically Enhanced Library Language (a SEL language or a SELL) is a dialect created by supersetting a language using a library and then subsetting the result using a tool that “understands” the syntax and semantics of both the underlying language and the library&#8221;</p>
<p><a href="http://public.research.att.com/~bs/SELLrationale.pdf" rel="nofollow">http://public.research.att.com/~bs/SELLrationale.pdf</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul Ingles</title>
		<link>http://nutrun.com/weblog/rails-not-a-dsl/#comment-135</link>
		<dc:creator>Paul Ingles</dc:creator>
		<pubDate>Tue, 18 Jul 2006 20:32:08 +0000</pubDate>
		<guid isPermaLink="false">http://new-site.nutrun.com/?p=37#comment-135</guid>
		<description>D'oh, it missed my code snippet:

    class Customer &#38;lt; Content
      has_many :orders, :dependent =&#38;gt; true
    end</description>
		<content:encoded><![CDATA[<p>D&#8217;oh, it missed my code snippet:</p>
<p>    class Customer &#38;lt; Content<br />
      has_many :orders, :dependent =&#38;gt; true<br />
    end</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul Ingles</title>
		<link>http://nutrun.com/weblog/rails-not-a-dsl/#comment-134</link>
		<dc:creator>Paul Ingles</dc:creator>
		<pubDate>Tue, 18 Jul 2006 20:30:52 +0000</pubDate>
		<guid isPermaLink="false">http://new-site.nutrun.com/?p=37#comment-134</guid>
		<description>Nice post George, only just spotted it tonight.

However, I do think that Rails could be considered to contain lots of little DSLs. Matt's point about it still being Ruby grammar, just easy to read is valid. But then what's language after all? If Ruby is generous enough to let you write in a very open-ended way, it's just it provides you with more options.

For instance, would you not say Rails' ActiveRecord provides a good DSL for the expression of a data model?

I.e.:

class Customer  true
end

Although you're still at the whim of Ruby syntax (i.e. the exploitation of hashes and symbols), it's still an attempt to provide language natural domain to better let you express intent. Admittedly, that's with other developers, but that doesn't mean we're less important right?

I agree that there's a risk that too many things could be considered DSLs, but I think thats possibly because its a wide-term, what's important is the value and usefulness. Does Rails provide language-like extensions that better let you express the problems of the domain?

My own feeling is that it does, but I do agree that the bluriness between fluent interface-esque designs and DSLs is blurry, but should we be worried about that? Why can't they be talking about the same thing? Fundamentally to me they're all focused on trying to make it easier to communicate and that's something I'm in favour of, whatever form :)</description>
		<content:encoded><![CDATA[<p>Nice post George, only just spotted it tonight.</p>
<p>However, I do think that Rails could be considered to contain lots of little DSLs. Matt&#8217;s point about it still being Ruby grammar, just easy to read is valid. But then what&#8217;s language after all? If Ruby is generous enough to let you write in a very open-ended way, it&#8217;s just it provides you with more options.</p>
<p>For instance, would you not say Rails&#8217; ActiveRecord provides a good DSL for the expression of a data model?</p>
<p>I.e.:</p>
<p>class Customer  true<br />
end</p>
<p>Although you&#8217;re still at the whim of Ruby syntax (i.e. the exploitation of hashes and symbols), it&#8217;s still an attempt to provide language natural domain to better let you express intent. Admittedly, that&#8217;s with other developers, but that doesn&#8217;t mean we&#8217;re less important right?</p>
<p>I agree that there&#8217;s a risk that too many things could be considered DSLs, but I think thats possibly because its a wide-term, what&#8217;s important is the value and usefulness. Does Rails provide language-like extensions that better let you express the problems of the domain?</p>
<p>My own feeling is that it does, but I do agree that the bluriness between fluent interface-esque designs and DSLs is blurry, but should we be worried about that? Why can&#8217;t they be talking about the same thing? Fundamentally to me they&#8217;re all focused on trying to make it easier to communicate and that&#8217;s something I&#8217;m in favour of, whatever form <img src='http://nutrun.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://nutrun.com/weblog/rails-not-a-dsl/#comment-133</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Sun, 16 Jul 2006 22:15:11 +0000</pubDate>
		<guid isPermaLink="false">http://new-site.nutrun.com/?p=37#comment-133</guid>
		<description>Really, though, any code which is expressive enough can be considered a domain specific language.

To answer Luke's question - not all APIs can be used in a DSL, but often crafting a DSL is really just API design. I just wrote a DSL for time calculations - it is just a series of wrappers around a pre-existing Ruby time library, but it reads like English.

On the question of, "Is Rails a DSL?", I'd be inclined to answer, "Sometimes" because much of a Rails application's code could be understood by domain experts, with only a little walk through help from the programmer. That is not something you can say about most frameworks.</description>
		<content:encoded><![CDATA[<p>Really, though, any code which is expressive enough can be considered a domain specific language.</p>
<p>To answer Luke&#8217;s question - not all APIs can be used in a DSL, but often crafting a DSL is really just API design. I just wrote a DSL for time calculations - it is just a series of wrappers around a pre-existing Ruby time library, but it reads like English.</p>
<p>On the question of, &#8220;Is Rails a DSL?&#8221;, I&#8217;d be inclined to answer, &#8220;Sometimes&#8221; because much of a Rails application&#8217;s code could be understood by domain experts, with only a little walk through help from the programmer. That is not something you can say about most frameworks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Luke Francl</title>
		<link>http://nutrun.com/weblog/rails-not-a-dsl/#comment-132</link>
		<dc:creator>Luke Francl</dc:creator>
		<pubDate>Fri, 14 Jul 2006 20:51:03 +0000</pubDate>
		<guid isPermaLink="false">http://new-site.nutrun.com/?p=37#comment-132</guid>
		<description>"DSL" was on everyone's lips at RailsConf and it really had me wondering -- what, exactly, is a DSL? The examples shown had me wondering, what's the difference between an API and a DSL?

It seems to me that a domain specific language should require some restricted grammar which could be described by BNF and you could use a parser-generator to generate a parser for that DSL. Or, if you love pain, you could use regexps.

But if it's just method calls with nicely named parameters, that seems to be pushing it a little.

I think DSL term has aquired something like buzzword status in the Ruby community. Not that good work isn't being done, but it seems too widely used.</description>
		<content:encoded><![CDATA[<p>&#8220;DSL&#8221; was on everyone&#8217;s lips at RailsConf and it really had me wondering &#8212; what, exactly, is a DSL? The examples shown had me wondering, what&#8217;s the difference between an API and a DSL?</p>
<p>It seems to me that a domain specific language should require some restricted grammar which could be described by BNF and you could use a parser-generator to generate a parser for that DSL. Or, if you love pain, you could use regexps.</p>
<p>But if it&#8217;s just method calls with nicely named parameters, that seems to be pushing it a little.</p>
<p>I think DSL term has aquired something like buzzword status in the Ruby community. Not that good work isn&#8217;t being done, but it seems too widely used.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://nutrun.com/weblog/rails-not-a-dsl/#comment-131</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Fri, 14 Jul 2006 17:12:56 +0000</pubDate>
		<guid isPermaLink="false">http://new-site.nutrun.com/?p=37#comment-131</guid>
		<description>"A DSL is somewhere between a tiny programming language and a scripting language, and is often used in a way analogous to a programming library."

http://en.wikipedia.org/wiki/Domain_Specific_Language</description>
		<content:encoded><![CDATA[<p>&#8220;A DSL is somewhere between a tiny programming language and a scripting language, and is often used in a way analogous to a programming library.&#8221;</p>
<p><a href="http://en.wikipedia.org/wiki/Domain_Specific_Language" rel="nofollow">http://en.wikipedia.org/wiki/Domain_Specific_Language</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom</title>
		<link>http://nutrun.com/weblog/rails-not-a-dsl/#comment-130</link>
		<dc:creator>Tom</dc:creator>
		<pubDate>Fri, 14 Jul 2006 15:45:48 +0000</pubDate>
		<guid isPermaLink="false">http://new-site.nutrun.com/?p=37#comment-130</guid>
		<description>But don't forget the very traditional adage that &lt;a href="http://www.pragmaticprogrammer.com/ppllc/papers/1998_03.html" rel="nofollow"&gt;"library design is language design"&lt;/a&gt; (from Stroustrup in his C++ book). Languages like C++ or more so Ruby or more so Scala (or more so Lisp?) make this a fairly meaningful statement. I prefer the ease of use and consistency from Ruby over the concepts shared by JetBrains.</description>
		<content:encoded><![CDATA[<p>But don&#8217;t forget the very traditional adage that <a href="http://www.pragmaticprogrammer.com/ppllc/papers/1998_03.html" rel="nofollow">&#8220;library design is language design&#8221;</a> (from Stroustrup in his C++ book). Languages like C++ or more so Ruby or more so Scala (or more so Lisp?) make this a fairly meaningful statement. I prefer the ease of use and consistency from Ruby over the concepts shared by JetBrains.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt Savage</title>
		<link>http://nutrun.com/weblog/rails-not-a-dsl/#comment-129</link>
		<dc:creator>Matt Savage</dc:creator>
		<pubDate>Thu, 13 Jul 2006 23:48:08 +0000</pubDate>
		<guid isPermaLink="false">http://new-site.nutrun.com/?p=37#comment-129</guid>
		<description>God I love reading this blog.

Yeah, the ubiquitousnessnessness of that little acronym grates with me too.

For me it's the L that makes me puzzled when I look at some things claiming the DSL title. The thing about calling a DSL-ish thing that you write in Ruby a language is that it's still using Ruby's grammar. You've just written a humane interface in a grammar that happens to be particularly easy to grock. No one calls JMock a DSL because Java looks ruff.

If you can show me some BNF and a compiler we can talk.

I don't wish to be negative- I do think DSLs are really very useful indeed- especially on account of my being obsessed by the idea of acceptance-tests-as-documentation. I can't wait till we start seeing more true DSLs once Mr Simonyi, jetbrains et al finally make it easier for us.</description>
		<content:encoded><![CDATA[<p>God I love reading this blog.</p>
<p>Yeah, the ubiquitousnessnessness of that little acronym grates with me too.</p>
<p>For me it&#8217;s the L that makes me puzzled when I look at some things claiming the DSL title. The thing about calling a DSL-ish thing that you write in Ruby a language is that it&#8217;s still using Ruby&#8217;s grammar. You&#8217;ve just written a humane interface in a grammar that happens to be particularly easy to grock. No one calls JMock a DSL because Java looks ruff.</p>
<p>If you can show me some BNF and a compiler we can talk.</p>
<p>I don&#8217;t wish to be negative- I do think DSLs are really very useful indeed- especially on account of my being obsessed by the idea of acceptance-tests-as-documentation. I can&#8217;t wait till we start seeing more true DSLs once Mr Simonyi, jetbrains et al finally make it easier for us.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
