<?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: Introducing ErlTL: A Simple Erlang Template Language</title>
	<atom:link href="http://yarivsblog.com/articles/2006/10/17/introducting-erltl-a-simple-erlang-template-language/feed/" rel="self" type="application/rss+xml" />
	<link>http://yarivsblog.com/articles/2006/10/17/introducting-erltl-a-simple-erlang-template-language/</link>
	<description>Adventures in Open Source Erlang</description>
	<pubDate>Fri, 16 May 2008 03:41:48 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: Daniel Kwiecinski</title>
		<link>http://yarivsblog.com/articles/2006/10/17/introducting-erltl-a-simple-erlang-template-language/#comment-16285</link>
		<dc:creator>Daniel Kwiecinski</dc:creator>
		<pubDate>Fri, 16 Mar 2007 16:25:41 +0000</pubDate>
		<guid isPermaLink="false">#comment-16285</guid>
		<description>If the *.et files contains top level expresions not in the first line (as in album.et) and are saved with Windows style line ending (CR+LF) instead of Unix one (LF), during the compilation I got the following error:

{error,{misplaced_top_exprs,{{line,2},
                             {chunk," {Title, Artist, Songs} = Data %&#62;\r"},
                             {msg,"top expressions must appear before all other expressions in a function"}}}}

Cheers,
Daniel</description>
		<content:encoded><![CDATA[<p>If the *.et files contains top level expresions not in the first line (as in album.et) and are saved with Windows style line ending (CR+LF) instead of Unix one (LF), during the compilation I got the following error:</p>
<p>{error,{misplaced_top_exprs,{{line,2},<br />
                             {chunk,&#8221; {Title, Artist, Songs} = Data %&gt;\r&#8221;},<br />
                             {msg,&#8221;top expressions must appear before all other expressions in a function&#8221;}}}}</p>
<p>Cheers,<br />
Daniel</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dru Nelson</title>
		<link>http://yarivsblog.com/articles/2006/10/17/introducting-erltl-a-simple-erlang-template-language/#comment-4915</link>
		<dc:creator>Dru Nelson</dc:creator>
		<pubDate>Fri, 12 Jan 2007 08:31:29 +0000</pubDate>
		<guid isPermaLink="false">#comment-4915</guid>
		<description>just saw this on Reddit, I think this is a great tool for Erlang!</description>
		<content:encoded><![CDATA[<p>just saw this on Reddit, I think this is a great tool for Erlang!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: taide</title>
		<link>http://yarivsblog.com/articles/2006/10/17/introducting-erltl-a-simple-erlang-template-language/#comment-415</link>
		<dc:creator>taide</dc:creator>
		<pubDate>Mon, 23 Oct 2006 18:23:45 +0000</pubDate>
		<guid isPermaLink="false">#comment-415</guid>
		<description>&lt;p&gt;Check this for inspiration, it&#8217;s very good: 
&lt;a href="http://www.kieranholland.com/code/documentation/nevow-stan/" rel="nofollow"&gt;http://www.kieranholland.com/code/documentation/nevow-stan/&lt;/a&gt;&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>Check this for inspiration, it&#8217;s very good:<br />
<a href="http://www.kieranholland.com/code/documentation/nevow-stan/" rel="nofollow">http://www.kieranholland.com/code/documentation/nevow-stan/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: taide</title>
		<link>http://yarivsblog.com/articles/2006/10/17/introducting-erltl-a-simple-erlang-template-language/#comment-414</link>
		<dc:creator>taide</dc:creator>
		<pubDate>Mon, 23 Oct 2006 18:23:36 +0000</pubDate>
		<guid isPermaLink="false">#comment-414</guid>
		<description>&lt;p&gt;Check this for inspiration, it&#8217;s very good: 
&lt;a href="http://www.kieranholland.com/code/documentation/nevow-stan/" rel="nofollow"&gt;http://www.kieranholland.com/code/documentation/nevow-stan/&lt;/a&gt;&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>Check this for inspiration, it&#8217;s very good:<br />
<a href="http://www.kieranholland.com/code/documentation/nevow-stan/" rel="nofollow">http://www.kieranholland.com/code/documentation/nevow-stan/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Yariv</title>
		<link>http://yarivsblog.com/articles/2006/10/17/introducting-erltl-a-simple-erlang-template-language/#comment-413</link>
		<dc:creator>Yariv</dc:creator>
		<pubDate>Wed, 18 Oct 2006 13:07:12 +0000</pubDate>
		<guid isPermaLink="false">#comment-413</guid>
		<description>&lt;p&gt;Hi Dmitirii, I &lt;em&gt;think&lt;/em&gt; ErlTL will work at least with UTF8 encoding, but I haven&#8217;t tried it myself. Would you like to give it a test drive and tell me what happens. If there are problems, I &lt;em&gt;may&lt;/em&gt; be able to find a solution to dealing with different encoding schemes.&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>Hi Dmitirii, I <em>think</em> ErlTL will work at least with UTF8 encoding, but I haven&#8217;t tried it myself. Would you like to give it a test drive and tell me what happens. If there are problems, I <em>may</em> be able to find a solution to dealing with different encoding schemes.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dmitrii Dimandt aka Mamut</title>
		<link>http://yarivsblog.com/articles/2006/10/17/introducting-erltl-a-simple-erlang-template-language/#comment-412</link>
		<dc:creator>Dmitrii Dimandt aka Mamut</dc:creator>
		<pubDate>Wed, 18 Oct 2006 01:31:05 +0000</pubDate>
		<guid isPermaLink="false">#comment-412</guid>
		<description>&lt;p&gt;What about non-ASCII :)&lt;/p&gt;

&lt;p&gt;Will ErlT be able to compile templates with, say, Unicode data in them?&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The usual amount of drooling goes here :))&lt;/em&gt;&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>What about non-ASCII :)</p>
<p>Will ErlT be able to compile templates with, say, Unicode data in them?</p>
<p><em>The usual amount of drooling goes here :))</em></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Yariv</title>
		<link>http://yarivsblog.com/articles/2006/10/17/introducting-erltl-a-simple-erlang-template-language/#comment-410</link>
		<dc:creator>Yariv</dc:creator>
		<pubDate>Tue, 17 Oct 2006 17:42:19 +0000</pubDate>
		<guid isPermaLink="false">#comment-410</guid>
		<description>&lt;p&gt;(Another advantage to ErlTL is that with ErlTL, Yaws doesn&#8217;t have to  spend time expanding the ehtml structure.)&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>(Another advantage to ErlTL is that with ErlTL, Yaws doesn&#8217;t have to  spend time expanding the ehtml structure.)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Yariv</title>
		<link>http://yarivsblog.com/articles/2006/10/17/introducting-erltl-a-simple-erlang-template-language/#comment-409</link>
		<dc:creator>Yariv</dc:creator>
		<pubDate>Tue, 17 Oct 2006 17:36:52 +0000</pubDate>
		<guid isPermaLink="false">#comment-409</guid>
		<description>&lt;p&gt;I think the two approaches are complementary. When your content is largely programatically generated, it&#8217;s easier to work with functions. When you have a lot of static binary text and you want to embed some dynamic expressions inside it, it may be more readable to use a ErlTL template. I think in this example, a hybrid approach could work well:&lt;/p&gt;

&lt;pre&gt;&#60;code&#62;&#38;amp;lt;html&#38;amp;gt;&#60;br /&#62;&lt;br /&gt;
&#38;amp;lt;title&#38;amp;gt;&#38;#46;..&#38;amp;lt;/title&#38;amp;gt;&#60;br /&#62;&lt;br /&gt;
&#38;amp;lt;body&#38;amp;gt;&#38;#46;..&#38;amp;lt;% table(Data) %&#38;amp;gt;&#38;amp;lt;/body&#38;amp;gt;&#60;br /&#62;&lt;br /&gt;
&#38;amp;lt;/html&#38;amp;gt;&#60;/code&#62;&lt;/pre&gt;

&lt;p&gt;In the end, it&#8217;s about readability. In addition, ErlTL helps newbies use binaries by default in places where they may mistakenly use strings.&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>I think the two approaches are complementary. When your content is largely programatically generated, it&#8217;s easier to work with functions. When you have a lot of static binary text and you want to embed some dynamic expressions inside it, it may be more readable to use a ErlTL template. I think in this example, a hybrid approach could work well:</p>
<pre>&lt;code&gt;&amp;amp;lt;html&amp;amp;gt;&lt;br /&gt;
&amp;amp;lt;title&amp;amp;gt;&amp;#46;..&amp;amp;lt;/title&amp;amp;gt;&lt;br /&gt;
&amp;amp;lt;body&amp;amp;gt;&amp;#46;..&amp;amp;lt;% table(Data) %&amp;amp;gt;&amp;amp;lt;/body&amp;amp;gt;&lt;br /&gt;
&amp;amp;lt;/html&amp;amp;gt;&lt;/code&gt;</pre>
<p>In the end, it&#8217;s about readability. In addition, ErlTL helps newbies use binaries by default in places where they may mistakenly use strings.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anon.Coward</title>
		<link>http://yarivsblog.com/articles/2006/10/17/introducting-erltl-a-simple-erlang-template-language/#comment-408</link>
		<dc:creator>Anon.Coward</dc:creator>
		<pubDate>Tue, 17 Oct 2006 17:30:06 +0000</pubDate>
		<guid isPermaLink="false">#comment-408</guid>
		<description>&lt;p&gt;Nice, but why not simple do it like this:&lt;/p&gt;

&lt;p&gt;table([[1,&#8221;Come together&#8221;],[2,&#8221;Something&#8221;],&#8230;etc&#8230;]).&lt;/p&gt;

&lt;p&gt;and the definition of table/1;&lt;/p&gt;

&lt;pre&gt;table(Rows) -&#62;&lt;br /&gt;
&#160;&#160;&#160;&#160;{table, [],&#160;&#160; td_rows(Rows)}.&lt;br /&gt;
&#160;&lt;br /&gt;
table(Header, Rows) -&#62;&lt;br /&gt;
&#160;&#160;&#160;&#160;table(Header, Rows, []).&lt;br /&gt;
&#160;&lt;br /&gt;
table([], Rows, Attrs) -&#62;&lt;br /&gt;
&#160;&#160;&#160;&#160;{table, lkup(table, Attrs, []),&lt;br /&gt;
&#160;&#160;&#160;&#160; [td_rows(Rows)]};&lt;br /&gt;
table(Header, Rows, Attrs) -&#62;&lt;br /&gt;
&#160;&#160;&#160;&#160;{table, lkup(table, Attrs, []),&lt;br /&gt;
&#160;&#160;&#160;&#160; [{tr, [], map(fun(C) -&#62; {th, [], [C]} end, Header)},&lt;br /&gt;
&#160;&#160;&#160;&#160;&#160;&#160;td_rows(Rows)]}.&lt;br /&gt;
&#160;&lt;br /&gt;
td_rows(Rows) -&#62;&lt;br /&gt;
&#160;&#160;&#160;&#160; lists:map(fun(R) -&#62;&lt;br /&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {tr, [],&lt;br /&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;map(fun(C) -&#62; {td, [], [C]} end, R)}&lt;br /&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; end, Rows).&lt;/pre&gt;

&lt;p&gt;Note: you even get in headers and attributes in the above&#8230;&lt;/p&gt;

&lt;p&gt;Cheers!&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>Nice, but why not simple do it like this:</p>
<p>table([[1,&#8221;Come together&#8221;],[2,&#8221;Something&#8221;],&#8230;etc&#8230;]).</p>
<p>and the definition of table/1;</p>
<pre>table(Rows) -&gt;
&nbsp;&nbsp;&nbsp;&nbsp;{table, [],&nbsp;&nbsp; td_rows(Rows)}.
&nbsp;
table(Header, Rows) -&gt;
&nbsp;&nbsp;&nbsp;&nbsp;table(Header, Rows, []).
&nbsp;
table([], Rows, Attrs) -&gt;
&nbsp;&nbsp;&nbsp;&nbsp;{table, lkup(table, Attrs, []),
&nbsp;&nbsp;&nbsp;&nbsp; [td_rows(Rows)]};
table(Header, Rows, Attrs) -&gt;
&nbsp;&nbsp;&nbsp;&nbsp;{table, lkup(table, Attrs, []),
&nbsp;&nbsp;&nbsp;&nbsp; [{tr, [], map(fun(C) -&gt; {th, [], [C]} end, Header)},
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;td_rows(Rows)]}.
&nbsp;
td_rows(Rows) -&gt;
&nbsp;&nbsp;&nbsp;&nbsp; lists:map(fun(R) -&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {tr, [],
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;map(fun(C) -&gt; {td, [], [C]} end, R)}
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; end, Rows).</pre>
<p>Note: you even get in headers and attributes in the above&#8230;</p>
<p>Cheers!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
