<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments for Trails in a Langscape</title>
	<atom:link href="http://fiber-space.de/wordpress/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://fiber-space.de/wordpress</link>
	<description>Projects and projections</description>
	<lastBuildDate>Wed, 18 Apr 2012 08:05:59 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
	<item>
		<title>Comment on Python vs TTCN-3 by Petri Savolainen</title>
		<link>http://fiber-space.de/wordpress/2009/04/26/python-vs-ttcn-3/comment-page-1/#comment-641</link>
		<dc:creator>Petri Savolainen</dc:creator>
		<pubDate>Wed, 18 Apr 2012 08:05:59 +0000</pubDate>
		<guid isPermaLink="false">http://fiber-space.de/wordpress/?p=381#comment-641</guid>
		<description>&lt;p&gt;I have programmed in Python for years, and while I am no real expert on TTCN-3, I have nevertheless taught a day-long beginner-level course on it once, and visited the TTCN-3 conference in Berlin a few years ago.&lt;/p&gt;

&lt;p&gt;Given that Bernard Stepien&#039;s presentation was given at a TTCN conference, it is quite natural that it aims to highlight benefits of TTCN. The circles are small, and he&#039;s more or less a semi-regular presenter there. It is sad that the presentation is so clearly constructed purely for the purpose of making TTCN-3 look good, without any real attempt at a sound academic-quality comparison. Or maybe its just incompetence.&lt;/p&gt;

&lt;p&gt;It is good to try &amp; understand the differences though, so this kind of comparisons serve a purpose regardless :D&lt;/p&gt;

&lt;p&gt;But getting into categorical argument about special-purpose testing language vs. using a general-purpose language for testing would be just plain silly. It all depends on purpose, context and requirements. For example, it would be silly to use TTCN-3 for direct testing of Python programs, but I would rather pick TTCN-3 for low-level telecommunications protocol conformance and interoperability testing any day. The testing-specific features built right into TTCN-3 are particularly useful for such purposes and contexts, and while they could be replicated in Python, the implementations would always be less elegant.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I have programmed in Python for years, and while I am no real expert on TTCN-3, I have nevertheless taught a day-long beginner-level course on it once, and visited the TTCN-3 conference in Berlin a few years ago.</p>

<p>Given that Bernard Stepien&#8217;s presentation was given at a TTCN conference, it is quite natural that it aims to highlight benefits of TTCN. The circles are small, and he&#8217;s more or less a semi-regular presenter there. It is sad that the presentation is so clearly constructed purely for the purpose of making TTCN-3 look good, without any real attempt at a sound academic-quality comparison. Or maybe its just incompetence.</p>

<p>It is good to try &amp; understand the differences though, so this kind of comparisons serve a purpose regardless <img src='http://fiber-space.de/wordpress/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>

<p>But getting into categorical argument about special-purpose testing language vs. using a general-purpose language for testing would be just plain silly. It all depends on purpose, context and requirements. For example, it would be silly to use TTCN-3 for direct testing of Python programs, but I would rather pick TTCN-3 for low-level telecommunications protocol conformance and interoperability testing any day. The testing-specific features built right into TTCN-3 are particularly useful for such purposes and contexts, and while they could be replicated in Python, the implementations would always be less elegant.</p>]]></content:encoded>
	</item>
	<item>
		<title>Comment on Universal Set in Python by kay</title>
		<link>http://fiber-space.de/wordpress/2009/04/16/universal-set-in-python/comment-page-1/#comment-640</link>
		<dc:creator>kay</dc:creator>
		<pubDate>Wed, 19 Oct 2011 05:36:03 +0000</pubDate>
		<guid isPermaLink="false">http://fiber-space.de/wordpress/?p=322#comment-640</guid>
		<description>&lt;p&gt;Thanks! It&#039;s a great addition!&lt;/p&gt;

&lt;p&gt;I will definitely update my implementation of univset based on this. Coincidentally I&#039;ve just revised Langscape&#039;s lexer and included set literals as well as pattern such as complement pattern ~{} expressing the same as the regexp dot. The inclusion of the __invert__ method matches the semantics perfectly. The algebraic equations look so nice that I could even imagine that some people on python.ideas find this cute and univset would be a great addition to the Python core.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Thanks! It&#8217;s a great addition!</p>

<p>I will definitely update my implementation of univset based on this. Coincidentally I&#8217;ve just revised Langscape&#8217;s lexer and included set literals as well as pattern such as complement pattern ~{} expressing the same as the regexp dot. The inclusion of the __invert__ method matches the semantics perfectly. The algebraic equations look so nice that I could even imagine that some people on python.ideas find this cute and univset would be a great addition to the Python core.</p>]]></content:encoded>
	</item>
	<item>
		<title>Comment on Universal Set in Python by joyrexus</title>
		<link>http://fiber-space.de/wordpress/2009/04/16/universal-set-in-python/comment-page-1/#comment-639</link>
		<dc:creator>joyrexus</dc:creator>
		<pubDate>Mon, 17 Oct 2011 17:07:35 +0000</pubDate>
		<guid isPermaLink="false">http://fiber-space.de/wordpress/?p=322#comment-639</guid>
		<description>&lt;p&gt;Nice.  I&#039;ve found it useful to add the following to the &lt;strong&gt;sub&lt;/strong&gt; method:&lt;/p&gt;

&lt;p&gt;&lt;pre lang=&quot;python&quot;&gt;if type(other) == univset:  return other._diff&lt;/pre&gt;&lt;/p&gt;

&lt;p&gt;Then you can take complements more generally:&lt;/p&gt;

&lt;p&gt;&lt;pre lang=&quot;python&quot;&gt;NOT = univset()
assert NOT - (NOT-A) == A
assert NOT - (NOT - (NOT-A)) == NOT-A
&lt;/pre&gt;&lt;/p&gt;

&lt;p&gt;And by adding an &lt;strong&gt;inverse&lt;/strong&gt; method to both set and univset, you can express complementation quite nicely:&lt;/p&gt;

&lt;p&gt;&lt;pre lang=&quot;python&quot;&gt;assert ~A == NOT-A
assert ~A &amp; ~B == ~(A &#124; B)
assert ~A &#124; B == ~(A - B)
assert ~~A == A
assert ~~~A == ~A
&lt;/pre&gt;&lt;/p&gt;

&lt;p&gt;I.E.:&lt;/p&gt;

&lt;p&gt;&lt;pre lang=&quot;python&quot;&gt;class univset(object):
    def __invert__(self):
        return self._diff
&lt;/pre&gt;&lt;/p&gt;

&lt;p&gt;&lt;pre lang=&quot;python&quot;&gt;class Set(set):
    def __invert__(self):
        U = univset()
        return U - self
&lt;/pre&gt;&lt;/p&gt;

&lt;p&gt;Of course be sure to replace all set constructors with Set().&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Nice.  I&#8217;ve found it useful to add the following to the <strong>sub</strong> method:</p>

<p>

</p>
<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #000066;font-weight:bold;">if</span> <span style="color: #008000;">type</span><span style="color: black;">&#40;</span>other<span style="color: black;">&#41;</span> == univset:  <span style="color: #000066;font-weight:bold;">return</span> other._diff</pre></div></div>




<p>Then you can take complements more generally:</p>

<p>

</p>
<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;">NOT = univset<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
<span style="color: #000066;font-weight:bold;">assert</span> NOT - <span style="color: black;">&#40;</span>NOT-A<span style="color: black;">&#41;</span> == A
<span style="color: #000066;font-weight:bold;">assert</span> NOT - <span style="color: black;">&#40;</span>NOT - <span style="color: black;">&#40;</span>NOT-A<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span> == NOT-A</pre></div></div>




<p>And by adding an <strong>inverse</strong> method to both set and univset, you can express complementation quite nicely:</p>

<p>

</p>
<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #000066;font-weight:bold;">assert</span> ~A == NOT-A
<span style="color: #000066;font-weight:bold;">assert</span> ~A <span style="color: #306f30;">&amp;</span> ~B == ~<span style="color: black;">&#40;</span>A | B<span style="color: black;">&#41;</span>
<span style="color: #000066;font-weight:bold;">assert</span> ~A | B == ~<span style="color: black;">&#40;</span>A - B<span style="color: black;">&#41;</span>
<span style="color: #000066;font-weight:bold;">assert</span> ~~A == A
<span style="color: #000066;font-weight:bold;">assert</span> ~~~A == ~A</pre></div></div>




<p>I.E.:</p>

<p>

</p>
<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #000066;font-weight:bold;">class</span> univset<span style="color: black;">&#40;</span><span style="color: #008000;">object</span><span style="color: black;">&#41;</span>:
    <span style="color: #000066;font-weight:bold;">def</span> <span style="">__invert__</span><span style="color: black;">&#40;</span><span style="color: #008000;">self</span><span style="color: black;">&#41;</span>:
        <span style="color: #000066;font-weight:bold;">return</span> <span style="color: #008000;">self</span>._diff</pre></div></div>




<p>

</p>
<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #000066;font-weight:bold;">class</span> Set<span style="color: black;">&#40;</span><span style="color: #008000;">set</span><span style="color: black;">&#41;</span>:
    <span style="color: #000066;font-weight:bold;">def</span> <span style="">__invert__</span><span style="color: black;">&#40;</span><span style="color: #008000;">self</span><span style="color: black;">&#41;</span>:
        U = univset<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
        <span style="color: #000066;font-weight:bold;">return</span> U - <span style="color: #008000;">self</span></pre></div></div>




<p>Of course be sure to replace all set constructors with Set().</p>]]></content:encoded>
	</item>
	<item>
		<title>Comment on LL(*) faster than LL(1)? by kay</title>
		<link>http://fiber-space.de/wordpress/2011/09/12/ll-faster-than-ll1/comment-page-1/#comment-630</link>
		<dc:creator>kay</dc:creator>
		<pubDate>Wed, 14 Sep 2011 12:12:12 +0000</pubDate>
		<guid isPermaLink="false">http://fiber-space.de/wordpress/?p=1876#comment-630</guid>
		<description>&lt;p&gt;Hi Jonathan, the parser is basically a tricky LL(1) parser which inlines rules but in a way that their use can be reconstructed when the parse is finished.  Reconstruction costs time and space of course. So I was surprised that rule embedding saves more time than reconstruction costs in some implementations at least. So one gets a much more powerful-than-classical-LL(1) parser for no costs.&lt;/p&gt;

&lt;p&gt;You might be correct about Earley parsers. I don&#039;t know.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi Jonathan, the parser is basically a tricky LL(1) parser which inlines rules but in a way that their use can be reconstructed when the parse is finished.  Reconstruction costs time and space of course. So I was surprised that rule embedding saves more time than reconstruction costs in some implementations at least. So one gets a much more powerful-than-classical-LL(1) parser for no costs.</p>

<p>You might be correct about Earley parsers. I don&#8217;t know.</p>]]></content:encoded>
	</item>
	<item>
		<title>Comment on LL(*) faster than LL(1)? by kay</title>
		<link>http://fiber-space.de/wordpress/2011/09/12/ll-faster-than-ll1/comment-page-1/#comment-629</link>
		<dc:creator>kay</dc:creator>
		<pubDate>Wed, 14 Sep 2011 11:28:54 +0000</pubDate>
		<guid isPermaLink="false">http://fiber-space.de/wordpress/?p=1876#comment-629</guid>
		<description>&lt;p&gt;Hi Terence, thanks for writing this up.&lt;/p&gt;

&lt;p&gt;It will take a little time for me to figure out which concepts match Trails algorithms and which do not. For example Trail does some lookahead analysis in cases when rule expansion is cancelled. So it is already the essential fall-back mechanism, not backtracking. However I detected a bug in the parser implementation with respect to lookahead recently and haven&#039;t had the time yet to analyse if it is fundamental or shallow. Anyway, it is an interesting paper, at least for me.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi Terence, thanks for writing this up.</p>

<p>It will take a little time for me to figure out which concepts match Trails algorithms and which do not. For example Trail does some lookahead analysis in cases when rule expansion is cancelled. So it is already the essential fall-back mechanism, not backtracking. However I detected a bug in the parser implementation with respect to lookahead recently and haven&#8217;t had the time yet to analyse if it is fundamental or shallow. Anyway, it is an interesting paper, at least for me.</p>]]></content:encoded>
	</item>
	<item>
		<title>Comment on LL(*) faster than LL(1)? by Jonathan Graehl</title>
		<link>http://fiber-space.de/wordpress/2011/09/12/ll-faster-than-ll1/comment-page-1/#comment-628</link>
		<dc:creator>Jonathan Graehl</dc:creator>
		<pubDate>Tue, 13 Sep 2011 21:28:36 +0000</pubDate>
		<guid isPermaLink="false">http://fiber-space.de/wordpress/?p=1876#comment-628</guid>
		<description>&lt;p&gt;I can&#039;t imagine this is any better than the well-known http://en.wikipedia.org/wiki/Earley_parser - upon skimming, it&#039;s reminiscent, and Earley is essentially as optimal as bottom-up CYK while still doing top-down prediction.&lt;/p&gt;

&lt;p&gt;Scanning a string while maintaining the full set of reachable NFA states is just scanning a lazily determinized FSA - and it may make sense compared to backtracking, although it may take more space.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I can&#8217;t imagine this is any better than the well-known <a href="http://en.wikipedia.org/wiki/Earley_parser" rel="nofollow">http://en.wikipedia.org/wiki/Earley_parser</a> &#8211; upon skimming, it&#8217;s reminiscent, and Earley is essentially as optimal as bottom-up CYK while still doing top-down prediction.</p>

<p>Scanning a string while maintaining the full set of reachable NFA states is just scanning a lazily determinized FSA &#8211; and it may make sense compared to backtracking, although it may take more space.</p>]]></content:encoded>
	</item>
	<item>
		<title>Comment on LL(*) faster than LL(1)? by Terence Parr</title>
		<link>http://fiber-space.de/wordpress/2011/09/12/ll-faster-than-ll1/comment-page-1/#comment-627</link>
		<dc:creator>Terence Parr</dc:creator>
		<pubDate>Tue, 13 Sep 2011 17:14:18 +0000</pubDate>
		<guid isPermaLink="false">http://fiber-space.de/wordpress/?p=1876#comment-627</guid>
		<description>&lt;p&gt;Hi, you might be interested to learn more about the formal LL(&#092;*) parsing strategy, which ANTLR v4 uses.&lt;/p&gt;

&lt;p&gt;http://www.antlr.org/papers/LL-star-PLDI11.pdf&lt;/p&gt;

&lt;p&gt;Regards,
Terence&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi, you might be interested to learn more about the formal LL(&#092;*) parsing strategy, which ANTLR v4 uses.</p>

<p><a href="http://www.antlr.org/papers/LL-star-PLDI11.pdf" rel="nofollow">http://www.antlr.org/papers/LL-star-PLDI11.pdf</a></p>

<p>Regards,
Terence</p>]]></content:encoded>
	</item>
	<item>
		<title>Comment on LL(*) faster than LL(1)? by kay</title>
		<link>http://fiber-space.de/wordpress/2011/09/12/ll-faster-than-ll1/comment-page-1/#comment-626</link>
		<dc:creator>kay</dc:creator>
		<pubDate>Tue, 13 Sep 2011 16:45:01 +0000</pubDate>
		<guid isPermaLink="false">http://fiber-space.de/wordpress/?p=1876#comment-626</guid>
		<description>&lt;p&gt;One more note about PgenParser ( or PyPgen ). I found an implementation of it in an old EasyExtend release. I tokenized decimal.py and passed the token sequence as an argument into the constructor of a simple token iterator which implements &lt;em&gt;next_token()&lt;/em&gt;. Then I feed the iterator into the parser and measure the time it takes for building the parse tree. PyPgen is roughly twice as fast as Trail.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>One more note about PgenParser ( or PyPgen ). I found an implementation of it in an old EasyExtend release. I tokenized decimal.py and passed the token sequence as an argument into the constructor of a simple token iterator which implements <em>next_token()</em>. Then I feed the iterator into the parser and measure the time it takes for building the parse tree. PyPgen is roughly twice as fast as Trail.</p>]]></content:encoded>
	</item>
	<item>
		<title>Comment on LL(*) faster than LL(1)? by kay</title>
		<link>http://fiber-space.de/wordpress/2011/09/12/ll-faster-than-ll1/comment-page-1/#comment-624</link>
		<dc:creator>kay</dc:creator>
		<pubDate>Tue, 13 Sep 2011 05:06:50 +0000</pubDate>
		<guid isPermaLink="false">http://fiber-space.de/wordpress/?p=1876#comment-624</guid>
		<description>&lt;p&gt;Yes, Michael. The parser I&#039;ve mentioned is part of the &lt;a href=&quot;http://code.google.com/p/basil/&quot; rel=&quot;nofollow&quot;&gt;Basil&lt;/a&gt; project which seems to be a reference implementation of &lt;a href=&quot;http://www.python.org/dev/peps/pep-0269/&quot; rel=&quot;nofollow&quot;&gt;PEP 269&lt;/a&gt; which was written about a decade ago. I remember I found the PyPgen parser in an early version of PyPy. It was dropped there, later.&lt;/p&gt;

&lt;p&gt;PyPgen doesn&#039;t seperate a tokenization from a parsing phase. Instead the parser works lazily and reads the next token from the tokenizer which can produce it from a string on demand. One could do the tokenization in advance though and pass in a list of token wrapped into a handler with the necessary interface. Then it will be possible to compare the parser components speed-wise. Comparing the tokenizer used by Trail and tokenizer.py is not particularly fair, because the essential string matching by tokenizer.py is done using Pythons re module. So one would compare a pure Python solution against a C implementation - with a predicatble result.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Yes, Michael. The parser I&#8217;ve mentioned is part of the <a href="http://code.google.com/p/basil/" rel="nofollow">Basil</a> project which seems to be a reference implementation of <a href="http://www.python.org/dev/peps/pep-0269/" rel="nofollow">PEP 269</a> which was written about a decade ago. I remember I found the PyPgen parser in an early version of PyPy. It was dropped there, later.</p>

<p>PyPgen doesn&#8217;t seperate a tokenization from a parsing phase. Instead the parser works lazily and reads the next token from the tokenizer which can produce it from a string on demand. One could do the tokenization in advance though and pass in a list of token wrapped into a handler with the necessary interface. Then it will be possible to compare the parser components speed-wise. Comparing the tokenizer used by Trail and tokenizer.py is not particularly fair, because the essential string matching by tokenizer.py is done using Pythons re module. So one would compare a pure Python solution against a C implementation &#8211; with a predicatble result.</p>]]></content:encoded>
	</item>
	<item>
		<title>Comment on LL(*) faster than LL(1)? by Michael Dillon</title>
		<link>http://fiber-space.de/wordpress/2011/09/12/ll-faster-than-ll1/comment-page-1/#comment-623</link>
		<dc:creator>Michael Dillon</dc:creator>
		<pubDate>Tue, 13 Sep 2011 03:16:54 +0000</pubDate>
		<guid isPermaLink="false">http://fiber-space.de/wordpress/?p=1876#comment-623</guid>
		<description>&lt;p&gt;Is it this Jon Riehl by any chance? http://log.jonriehl.com/ He is still doing parsers in Python.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Is it this Jon Riehl by any chance? <a href="http://log.jonriehl.com/" rel="nofollow">http://log.jonriehl.com/</a> He is still doing parsers in Python.</p>]]></content:encoded>
	</item>
</channel>
</rss>

