<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.0.10" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: The Morris-Pratt algorithm</title>
	<link>http://www.sungnyemun.org/wordpress/2006/04/13/the-morris-pratt-algorithm/</link>
	<description>A diary of madness</description>
	<pubDate>Wed, 07 Jan 2009 20:45:31 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.10</generator>

	<item>
		<title>by: dda</title>
		<link>http://www.sungnyemun.org/wordpress/2006/04/13/the-morris-pratt-algorithm/#comment-163</link>
		<pubDate>Sat, 15 Apr 2006 11:47:36 +0000</pubDate>
		<guid>http://www.sungnyemun.org/wordpress/2006/04/13/the-morris-pratt-algorithm/#comment-163</guid>
					<description>Christian, thanks again for the explanation. I do think I understand page 14 and following, *now*, but the reaction about p was my original, and usual, one. You see, it has nothing to do with your figure page 14, but with the way maths people work [and thus my inability to follow them :-)]: &lt;blockquote&gt;for example let us imagine that the word slided p letters.&lt;/blockquote&gt; My usual reaction to that is &lt;em&gt;Why? How come? Where do you get p from?&lt;/em&gt; Terrible, I know. I am assuming here that p is an already bound variable, whereas it's just an hypothetical value, unbound. Grrr. Works every time!

As for KMP, as you know well, I am fighting with the KMP-SUPPLY function – well, it's again in your hands now :-)</description>
		<content:encoded><![CDATA[<p>Christian, thanks again for the explanation. I do think I understand page 14 and following, *now*, but the reaction about p was my original, and usual, one. You see, it has nothing to do with your figure page 14, but with the way maths people work [and thus my inability to follow them <img src='http://www.sungnyemun.org/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> ]:<br />
<blockquote>for example let us imagine that the word slided p letters.</p></blockquote>
<p> My usual reaction to that is <em>Why? How come? Where do you get p from?</em> Terrible, I know. I am assuming here that p is an already bound variable, whereas it&#8217;s just an hypothetical value, unbound. Grrr. Works every time!</p>
<p>As for KMP, as you know well, I am fighting with the KMP-SUPPLY function – well, it&#8217;s again in your hands now <img src='http://www.sungnyemun.org/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Christian</title>
		<link>http://www.sungnyemun.org/wordpress/2006/04/13/the-morris-pratt-algorithm/#comment-161</link>
		<pubDate>Sat, 15 Apr 2006 03:25:03 +0000</pubDate>
		<guid>http://www.sungnyemun.org/wordpress/2006/04/13/the-morris-pratt-algorithm/#comment-161</guid>
					<description>&lt;i&gt; how in botheration did you calculate p in (j − i + p)? &lt;/i&gt;

Ah, I see. My figure is not self-explanatory:-) Okay, first, I did not calculate &lt;i&gt;p&lt;/i&gt; (sorry). My picture is a snapshot of a word sliding along a text and a prefix of the word matches the text. Therefore there is an index in the text corresponding to an index in the word where the letter comparison fails. Let us call the former &lt;i&gt;j&lt;/i&gt; and the latter &lt;i&gt;i&lt;/i&gt;. That's all. Then, we represent the word at a slided index, for example let us imagine that the word slided &lt;i&gt;p&lt;/i&gt; letters. Thus the index of &lt;i&gt;x[1]&lt;/i&gt; now corresponds to previous &lt;i&gt;x[p+1]&lt;/i&gt;, which, in turn, is none other than &lt;i&gt;t[j-i+p]&lt;/i&gt;. Why the latter? The failure index in the text is, by definition, &lt;i&gt;j&lt;/i&gt;. Then, if you want the index of the letter of the text that matched the first letter in the word, since the failure position in the word is, by definition, &lt;i&gt;i&lt;/i&gt;, it is &lt;i&gt;j-i&lt;/i&gt;. Now, after sliding the word, you want to know the index in the text corresponding to the first letter in the word (again). Since, by definition, we slided the word of &lt;i&gt;p&lt;/i&gt; positions, it is &lt;i&gt;j-i+p&lt;/i&gt;. You see?

You really must see what happens in figure page 14 before going on... When the comparisons start again (after the sliding), in the naive algorithm, we compare &lt;i&gt;x[1]&lt;/i&gt; to &lt;i&gt;t[j-i+p]&lt;/i&gt; and so on, right? But this section of the text matched previously the word, when it was &lt;i&gt;p&lt;/i&gt; letters to the left! So we are comparing a prefix of the word with a suffix of it... This enables a preprocessing of the word, independently of the text, to find the maximum-length borders, which are the longest proper prefixes which are suffixes too. Then, we slide of the length of the maximum border of the previous word prefix that matched, say &lt;i&gt;w&lt;/i&gt;, and we resume the comparisons at &lt;i&gt;x[1+&#124;Border(w)&#124;]&lt;/i&gt;&lt;i&gt; instead of &lt;/i&gt;&lt;i&gt;x[1]&lt;/i&gt;.

Yeah, you are right, I am too serious here, I am not so serious, usually. It's that I am concerned about you...:-D

Java is better than C++, where the implicit semantics of so many constructs makes the whole language slippy. But for low-level stuff, like drivers, C++ is still a good option. The design of Java is no bad, it is a bit too verbose, right, but I see some problems which are not due to the language itself: (1) the virtual machine is a nice concept (which originated, by the way, in functional languages, see LISP and Caml) but it is very hard to write an efficient virtual machine -- nowadays this improved, but still -- (2) the marketing makes you believe that, once you have the byte-code, you can run it on every platform: that's bullshit (3) which brings me to the problem of third-party libraries: how many times did I download a Java byte-code and wasn't able to run it just because I don't have Sun SDK (of whatever the name nowadays)? I wan't my intelligence back! Ah, and the memory footprint of Java application is also concerning. But, again, the language itself is really fine.

I think that you can really understand compilers because of your linguistics skills, but you need to learn first things first. Actually: re-learn. So: forget. That's. Difficult.

I will send you a version of Knuth-Morris-Pratt in Objective Caml, written by a friend of mine, which is 40 lines long with comments, blank lines and even an optimisation:-). It's just for giving you a taste of Caml (which is strongly statically typed, which means that the compiler has a heavy stick and is watching you, but in the other hand you don't need to write the types explicitly).
</description>
		<content:encoded><![CDATA[<p><i> how in botheration did you calculate p in (j − i + p)? </i></p>
<p>Ah, I see. My figure is not self-explanatory:-) Okay, first, I did not calculate <i>p</i> (sorry). My picture is a snapshot of a word sliding along a text and a prefix of the word matches the text. Therefore there is an index in the text corresponding to an index in the word where the letter comparison fails. Let us call the former <i>j</i> and the latter <i>i</i>. That&#8217;s all. Then, we represent the word at a slided index, for example let us imagine that the word slided <i>p</i> letters. Thus the index of <i>x[1]</i> now corresponds to previous <i>x[p+1]</i>, which, in turn, is none other than <i>t[j-i+p]</i>. Why the latter? The failure index in the text is, by definition, <i>j</i>. Then, if you want the index of the letter of the text that matched the first letter in the word, since the failure position in the word is, by definition, <i>i</i>, it is <i>j-i</i>. Now, after sliding the word, you want to know the index in the text corresponding to the first letter in the word (again). Since, by definition, we slided the word of <i>p</i> positions, it is <i>j-i+p</i>. You see?</p>
<p>You really must see what happens in figure page 14 before going on&#8230; When the comparisons start again (after the sliding), in the naive algorithm, we compare <i>x[1]</i> to <i>t[j-i+p]</i> and so on, right? But this section of the text matched previously the word, when it was <i>p</i> letters to the left! So we are comparing a prefix of the word with a suffix of it&#8230; This enables a preprocessing of the word, independently of the text, to find the maximum-length borders, which are the longest proper prefixes which are suffixes too. Then, we slide of the length of the maximum border of the previous word prefix that matched, say <i>w</i>, and we resume the comparisons at <i>x[1+|Border(w)|]</i><i> instead of </i><i>x[1]</i>.</p>
<p>Yeah, you are right, I am too serious here, I am not so serious, usually. It&#8217;s that I am concerned about you&#8230;:-D</p>
<p>Java is better than C++, where the implicit semantics of so many constructs makes the whole language slippy. But for low-level stuff, like drivers, C++ is still a good option. The design of Java is no bad, it is a bit too verbose, right, but I see some problems which are not due to the language itself: (1) the virtual machine is a nice concept (which originated, by the way, in functional languages, see LISP and Caml) but it is very hard to write an efficient virtual machine &#8212; nowadays this improved, but still &#8212; (2) the marketing makes you believe that, once you have the byte-code, you can run it on every platform: that&#8217;s bullshit (3) which brings me to the problem of third-party libraries: how many times did I download a Java byte-code and wasn&#8217;t able to run it just because I don&#8217;t have Sun SDK (of whatever the name nowadays)? I wan&#8217;t my intelligence back! Ah, and the memory footprint of Java application is also concerning. But, again, the language itself is really fine.</p>
<p>I think that you can really understand compilers because of your linguistics skills, but you need to learn first things first. Actually: re-learn. So: forget. That&#8217;s. Difficult.</p>
<p>I will send you a version of Knuth-Morris-Pratt in Objective Caml, written by a friend of mine, which is 40 lines long with comments, blank lines and even an optimisation:-). It&#8217;s just for giving you a taste of Caml (which is strongly statically typed, which means that the compiler has a heavy stick and is watching you, but in the other hand you don&#8217;t need to write the types explicitly).
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: dda</title>
		<link>http://www.sungnyemun.org/wordpress/2006/04/13/the-morris-pratt-algorithm/#comment-160</link>
		<pubDate>Fri, 14 Apr 2006 15:42:08 +0000</pubDate>
		<guid>http://www.sungnyemun.org/wordpress/2006/04/13/the-morris-pratt-algorithm/#comment-160</guid>
					<description>&lt;blockquote&gt;Everything is in the definition of the maximum border of a word. But there are no assumptions. The key point is to see why in figures at pages 14 and 18.&lt;/blockquote&gt;

See...? Where you see definitions and key points I see assumptions and tricks. I still have a long way to go! Not that I mind: &lt;em&gt;L'espoir fait vivre.&lt;/em&gt;

&lt;blockquote&gt;In order to not miss any match, we must be careful not to slide too much at a time,&lt;/blockquote&gt;

Yes indeed, which is why I dubbed this trick an "assumption" – I *know* it is not an assumption, but I failed to see how it was a calculation, and not playing the lottery. That is, how in botheration did you calculate p in (j − i + p)? The problem being that, as a good math wizz, you postulated a theory and backed it up with a demonstration, something that flies completely over my head: I need the demonstration first and then the postulate. My first reaction in seeing p was: what is p and where does it come from? Duh. So now re-reading the part about MP, and *backtracking* to page 13/14 – having understood, I hope, the concept of Border, Beta and supply [well, that last one, not sure yet], I think I understand that cute little p. In my own words:

&lt;blockquote&gt;After a failure [hopefully after more than 1 character in x], we want to slide more than 1 character in t like naive does, so we'd better ascertain that within the part in x that *did not* fail there is a border [prefix and suffix] of a substring of t, which could be schematized as &lt;kbd&gt;b  w  b&lt;/kbd&gt; [Border, Word, Border]. If so, we can safely slide x by YY characters, YY being the length of the prefix + the length of the word inside the border, ie &#124;b&#124; + &#124;w&#124; [another way I think of calculating p = i − 1 − β ( i − 1 ), I think]. This is because we know that the next match of the prefix within t is the suffix. Simple, but very clever, like Colombus' egg.&lt;/blockquote&gt;

You have the right to slap me silly if I got it wrong, again... And thanks for making that clear. I *do* think I understand. And now that I do, I'd like to shake MM. Morris &#38; Pratt's collective hand. I am properly wowed. Seriously.

But then I had a thought: if we can slide &lt;em&gt;t&lt;/em&gt; to &lt;em&gt;j-i+p&lt;/em&gt;, why start again at x[1]? Why not slide the pointer to &lt;em&gt;x&lt;/em&gt; too, to x[&#124;b&#124;+1], b being the border? Since this part has been covered too, after all, right? Duhuhuh. Sure enough, that's what the algorithm do. No ground-breaking discovery here. Sigh... At least that's my understanding so far.

Now, about languages. I agree whole-heartedly with you. One reason – I think – I am good with human languages is because I have a formal training in linguistics, especially phonetics and phonology [other classes, I mostly looked at the girls], which are basically the theory behind sounds and speech patterns. For instance, you can learn by rote that b, d and g between two vowels are pronounced ϐ, δ and γ in Cuban Spanish, and hope you remember, or that plosives are spirantised at inter-vocalic position. I'd rather memorize that one rule [especially since it helps explaining descrepancies in Modern Korean like 덥다 &#62; 더운, which point to a Medieval Korean intervocalic spirant ϐ weakened into w later, but I friggin' digress].

So yeah, what you said.

Now, you need to be a little less serious, or rather lower your shields when you detect bullshit made in dda... When I went off on a tangent on paradigm shifts and Hello World, I was of course taking a shortcut, half-joking. I won't do graphics processing in Python [the PIL notwithstanding], and I'd rather not drink a single glass of wine rather than code OpenGL code in Erlang [or Prolog, which looks amazingly similar in syntax, but that's no surprise: the first Erlang emulator was written IN Prolog. SO guess what? I installed gprolog... Sigh!]. And my friend Damien notwithstanding, I wouldn't use Java for anything serious. You think Erlang is verbose?!? [BTW, 40 lines to implement Morris-Pratt, is that really verbose? Besides, I love chiding Java users...]. But in the end you're right: I need to be able to do with comp sci what I can do with linguistics. So far I'm more of a collector of languages than anything else [can't complain though, it's fun!]. Too bad that when I was a student you had to go through two years of maths and crap before you could go to a comp sci department... But that's the French way I guess.

Thanks for all this Christian, I hope you get something out of it: I surely do!</description>
		<content:encoded><![CDATA[<blockquote><p>Everything is in the definition of the maximum border of a word. But there are no assumptions. The key point is to see why in figures at pages 14 and 18.</p></blockquote>
<p>See&#8230;? Where you see definitions and key points I see assumptions and tricks. I still have a long way to go! Not that I mind: <em>L&#8217;espoir fait vivre.</em></p>
<blockquote><p>In order to not miss any match, we must be careful not to slide too much at a time,</p></blockquote>
<p>Yes indeed, which is why I dubbed this trick an &#8220;assumption&#8221; – I *know* it is not an assumption, but I failed to see how it was a calculation, and not playing the lottery. That is, how in botheration did you calculate p in (j − i + p)? The problem being that, as a good math wizz, you postulated a theory and backed it up with a demonstration, something that flies completely over my head: I need the demonstration first and then the postulate. My first reaction in seeing p was: what is p and where does it come from? Duh. So now re-reading the part about MP, and *backtracking* to page 13/14 – having understood, I hope, the concept of Border, Beta and supply [well, that last one, not sure yet], I think I understand that cute little p. In my own words:</p>
<blockquote><p>After a failure [hopefully after more than 1 character in x], we want to slide more than 1 character in t like naive does, so we&#8217;d better ascertain that within the part in x that *did not* fail there is a border [prefix and suffix] of a substring of t, which could be schematized as <kbd>b  w  b</kbd> [Border, Word, Border]. If so, we can safely slide x by YY characters, YY being the length of the prefix + the length of the word inside the border, ie |b| + |w| [another way I think of calculating p = i − 1 − β ( i − 1 ), I think]. This is because we know that the next match of the prefix within t is the suffix. Simple, but very clever, like Colombus&#8217; egg.</p></blockquote>
<p>You have the right to slap me silly if I got it wrong, again&#8230; And thanks for making that clear. I *do* think I understand. And now that I do, I&#8217;d like to shake MM. Morris &amp; Pratt&#8217;s collective hand. I am properly wowed. Seriously.</p>
<p>But then I had a thought: if we can slide <em>t</em> to <em>j-i+p</em>, why start again at x[1]? Why not slide the pointer to <em>x</em> too, to x[|b|+1], b being the border? Since this part has been covered too, after all, right? Duhuhuh. Sure enough, that&#8217;s what the algorithm do. No ground-breaking discovery here. Sigh&#8230; At least that&#8217;s my understanding so far.</p>
<p>Now, about languages. I agree whole-heartedly with you. One reason – I think – I am good with human languages is because I have a formal training in linguistics, especially phonetics and phonology [other classes, I mostly looked at the girls], which are basically the theory behind sounds and speech patterns. For instance, you can learn by rote that b, d and g between two vowels are pronounced ϐ, δ and γ in Cuban Spanish, and hope you remember, or that plosives are spirantised at inter-vocalic position. I&#8217;d rather memorize that one rule [especially since it helps explaining descrepancies in Modern Korean like 덥다 &gt; 더운, which point to a Medieval Korean intervocalic spirant ϐ weakened into w later, but I friggin&#8217; digress].</p>
<p>So yeah, what you said.</p>
<p>Now, you need to be a little less serious, or rather lower your shields when you detect bullshit made in dda&#8230; When I went off on a tangent on paradigm shifts and Hello World, I was of course taking a shortcut, half-joking. I won&#8217;t do graphics processing in Python [the PIL notwithstanding], and I&#8217;d rather not drink a single glass of wine rather than code OpenGL code in Erlang [or Prolog, which looks amazingly similar in syntax, but that&#8217;s no surprise: the first Erlang emulator was written IN Prolog. SO guess what? I installed gprolog&#8230; Sigh!]. And my friend Damien notwithstanding, I wouldn&#8217;t use Java for anything serious. You think Erlang is verbose?!? [BTW, 40 lines to implement Morris-Pratt, is that really verbose? Besides, I love chiding Java users&#8230;]. But in the end you&#8217;re right: I need to be able to do with comp sci what I can do with linguistics. So far I&#8217;m more of a collector of languages than anything else [can&#8217;t complain though, it&#8217;s fun!]. Too bad that when I was a student you had to go through two years of maths and crap before you could go to a comp sci department&#8230; But that&#8217;s the French way I guess.</p>
<p>Thanks for all this Christian, I hope you get something out of it: I surely do!
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Christian</title>
		<link>http://www.sungnyemun.org/wordpress/2006/04/13/the-morris-pratt-algorithm/#comment-159</link>
		<pubDate>Fri, 14 Apr 2006 07:51:08 +0000</pubDate>
		<guid>http://www.sungnyemun.org/wordpress/2006/04/13/the-morris-pratt-algorithm/#comment-159</guid>
					<description>About "user-friendliness". It depends on what kind of application, or even part of of application, you plan to develop. And, certainly, nobody plans an application to print "Hello world!", so it is not a criterion at all. For example, in Objective Caml, a functional language as Erlang, you would write

print_string "Hello world!"

That's it. But that doesn't actually implies that it is easy or efficient to use Caml for intense string processing applications... or that is not easy or not efficient.

There is no such thing as "all-purposes programming language". There are always design principles, paradigms, that lean towards certain kind of applications. I think that the most erroneous idea I found in the head of many people, from students to university professors, is that "One language is better than another." Nobody seems to realise that we live in the post-Babel era and that is &lt;i&gt;a good thing&lt;/i&gt;: use a given language for this part of the application, another for this part and so on, each being especially suited for the corresponding task.

Of course, this requires to learn not just many languages, but some language theory, exactly like linguistics.

What do you think?</description>
		<content:encoded><![CDATA[<p>About &#8220;user-friendliness&#8221;. It depends on what kind of application, or even part of of application, you plan to develop. And, certainly, nobody plans an application to print &#8220;Hello world!&#8221;, so it is not a criterion at all. For example, in Objective Caml, a functional language as Erlang, you would write</p>
<p>print_string &#8220;Hello world!&#8221;</p>
<p>That&#8217;s it. But that doesn&#8217;t actually implies that it is easy or efficient to use Caml for intense string processing applications&#8230; or that is not easy or not efficient.</p>
<p>There is no such thing as &#8220;all-purposes programming language&#8221;. There are always design principles, paradigms, that lean towards certain kind of applications. I think that the most erroneous idea I found in the head of many people, from students to university professors, is that &#8220;One language is better than another.&#8221; Nobody seems to realise that we live in the post-Babel era and that is <i>a good thing</i>: use a given language for this part of the application, another for this part and so on, each being especially suited for the corresponding task.</p>
<p>Of course, this requires to learn not just many languages, but some language theory, exactly like linguistics.</p>
<p>What do you think?
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Christian</title>
		<link>http://www.sungnyemun.org/wordpress/2006/04/13/the-morris-pratt-algorithm/#comment-158</link>
		<pubDate>Fri, 14 Apr 2006 07:37:31 +0000</pubDate>
		<guid>http://www.sungnyemun.org/wordpress/2006/04/13/the-morris-pratt-algorithm/#comment-158</guid>
					<description>Everything is in the definition of the maximum border of a word. But there are no assumptions. The key point is to see why in figures at pages 14 and 18. 

The naive search did not re-use any information between two successive matching attempts. The idea of Morris-Pratt is to re-use some information after a failure for improving the next attempt. Indeed, after a failure (at the grey position in the figure page 14), you &lt;i&gt;know&lt;/i&gt; something, even if it looks obvious: a proper prefix (until the failure position) of the word has been matched in the text. This is x[1..i-1]. It is the equivalent of the chicken's _sot-l'y-laisse_. Indeed, the next attempt, after sliding the word with respect to the text, will compare a prefix of x[1..i-1] to a suffix &lt;i&gt;of itself&lt;/i&gt;. Don't think, just look at the picture page 14 and see. You must see it before going on.

Then, you deduce that the next attempt will match x[1..i-1] if and only if this prefix is a border of x, i.e. it is both a prefix and a suffix (figure page 18). In order to not miss any match, we must be careful not to slide too much at a time, that is why we need to consider the maximum-length border of x, noted Border(x[1..i-1]), whose length, by definition, is written beta(i-1).

An now the good news: we do not need to compare again the letters of Border(x[1..i-1]) against the letters of t, precisely because it is a border of x[1..i-1], &lt;b&gt;which previously matched the text.&lt;/b&gt; Therefore, we resume the comparisons at position 1+beta(i-1) in the word (and j in the text).

Is it clearer now?</description>
		<content:encoded><![CDATA[<p>Everything is in the definition of the maximum border of a word. But there are no assumptions. The key point is to see why in figures at pages 14 and 18. </p>
<p>The naive search did not re-use any information between two successive matching attempts. The idea of Morris-Pratt is to re-use some information after a failure for improving the next attempt. Indeed, after a failure (at the grey position in the figure page 14), you <i>know</i> something, even if it looks obvious: a proper prefix (until the failure position) of the word has been matched in the text. This is x[1..i-1]. It is the equivalent of the chicken&#8217;s _sot-l&#8217;y-laisse_. Indeed, the next attempt, after sliding the word with respect to the text, will compare a prefix of x[1..i-1] to a suffix <i>of itself</i>. Don&#8217;t think, just look at the picture page 14 and see. You must see it before going on.</p>
<p>Then, you deduce that the next attempt will match x[1..i-1] if and only if this prefix is a border of x, i.e. it is both a prefix and a suffix (figure page 18). In order to not miss any match, we must be careful not to slide too much at a time, that is why we need to consider the maximum-length border of x, noted Border(x[1..i-1]), whose length, by definition, is written beta(i-1).</p>
<p>An now the good news: we do not need to compare again the letters of Border(x[1..i-1]) against the letters of t, precisely because it is a border of x[1..i-1], <b>which previously matched the text.</b> Therefore, we resume the comparisons at position 1+beta(i-1) in the word (and j in the text).</p>
<p>Is it clearer now?
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: dda</title>
		<link>http://www.sungnyemun.org/wordpress/2006/04/13/the-morris-pratt-algorithm/#comment-157</link>
		<pubDate>Thu, 13 Apr 2006 16:21:38 +0000</pubDate>
		<guid>http://www.sungnyemun.org/wordpress/2006/04/13/the-morris-pratt-algorithm/#comment-157</guid>
					<description>And by [not] "user-friendly" I really meant a language that doesn't require a massive paradigm shift in order to write Hello World – which is the case for Erlang vs C/RB/Perl/Pyhton.</description>
		<content:encoded><![CDATA[<p>And by [not] &#8220;user-friendly&#8221; I really meant a language that doesn&#8217;t require a massive paradigm shift in order to write Hello World – which is the case for Erlang vs C/RB/Perl/Pyhton.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: dda</title>
		<link>http://www.sungnyemun.org/wordpress/2006/04/13/the-morris-pratt-algorithm/#comment-156</link>
		<pubDate>Thu, 13 Apr 2006 16:18:26 +0000</pubDate>
		<guid>http://www.sungnyemun.org/wordpress/2006/04/13/the-morris-pratt-algorithm/#comment-156</guid>
					<description>All French wines are expensive in .kr, because of the taxes... Can't do anything about it except befriend importers and get their price, not the retail price...

The one thing that disturbs me in the Morris Pratt – or at least in what I understand of it, is the calculation of the sliding offset. It seems to work, but it still looks like it's making dangerous assumptions. But at the same time, I think that the trick is in the border, [BORDER and β, and ultimately s(i)], which makes these assumptions fail-safe. But I have yet to see how THAT works.</description>
		<content:encoded><![CDATA[<p>All French wines are expensive in .kr, because of the taxes&#8230; Can&#8217;t do anything about it except befriend importers and get their price, not the retail price&#8230;</p>
<p>The one thing that disturbs me in the Morris Pratt – or at least in what I understand of it, is the calculation of the sliding offset. It seems to work, but it still looks like it&#8217;s making dangerous assumptions. But at the same time, I think that the trick is in the border, [BORDER and β, and ultimately s(i)], which makes these assumptions fail-safe. But I have yet to see how THAT works.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Christian</title>
		<link>http://www.sungnyemun.org/wordpress/2006/04/13/the-morris-pratt-algorithm/#comment-155</link>
		<pubDate>Thu, 13 Apr 2006 15:46:20 +0000</pubDate>
		<guid>http://www.sungnyemun.org/wordpress/2006/04/13/the-morris-pratt-algorithm/#comment-155</guid>
					<description>I forgot: don't be impressed by me or because I am supposed to know this and this. If you think that I made a mistake or if you just don't understand, you should ask a question. The only problem is when one asks questions without thinking before opening the mouth, but that's not your case.</description>
		<content:encoded><![CDATA[<p>I forgot: don&#8217;t be impressed by me or because I am supposed to know this and this. If you think that I made a mistake or if you just don&#8217;t understand, you should ask a question. The only problem is when one asks questions without thinking before opening the mouth, but that&#8217;s not your case.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Christian</title>
		<link>http://www.sungnyemun.org/wordpress/2006/04/13/the-morris-pratt-algorithm/#comment-154</link>
		<pubDate>Thu, 13 Apr 2006 15:37:12 +0000</pubDate>
		<guid>http://www.sungnyemun.org/wordpress/2006/04/13/the-morris-pratt-algorithm/#comment-154</guid>
					<description>I am a bit busy now, so I can't check your code now... 

It seems that Erlang itself is a bit verbose, isn't it? But the fact that it is not suitable for algorithms on strings doesn't mean that it is not "user-friendly". The fact that you don't have pointer arithmetic &lt;b&gt;is&lt;/b&gt; user-friendly, for example (unless you are writing a driver, for example).

Most importantly, you should know that I met several doctors in computer science that would (and did) acknowledge in private that they do not understand Morris-Pratt and akin. Contrary to what you may think, it does not mean that these algorithms are inherently difficult, but that when one is lazy, &lt;i&gt;everything&lt;/i&gt; is obscure.

The sad truth is that, even a doctor in comp. sc. must spend some time and energy to &lt;i&gt;think&lt;/i&gt;. Too many professors do not think, they just repeat themselves. Student usually do not notice, but I do.

I spent a lot of time writing my slides because familiarity, intuition, needs time to come.

So it has nothing to do at all with your painful math classes of the past. Realising that is a huge liberation, because your failure to understand now is then no more emotionally associated to your past failures, so you keep trying again and again.

The key point is: do not be afraid of thinking, of giving up mechanisms -- which are the hallmark of robots. Thinking is naked freedom. For what I read of you, I think that you can do it. Your brain is definitely working well.

Oh... and that's too bad that burgondy wine is expensive in Seoul... I wish you good luck in your businesses (I know you are from Bordeaux but maybe exporting burgondy wine?;-)</description>
		<content:encoded><![CDATA[<p>I am a bit busy now, so I can&#8217;t check your code now&#8230; </p>
<p>It seems that Erlang itself is a bit verbose, isn&#8217;t it? But the fact that it is not suitable for algorithms on strings doesn&#8217;t mean that it is not &#8220;user-friendly&#8221;. The fact that you don&#8217;t have pointer arithmetic <b>is</b> user-friendly, for example (unless you are writing a driver, for example).</p>
<p>Most importantly, you should know that I met several doctors in computer science that would (and did) acknowledge in private that they do not understand Morris-Pratt and akin. Contrary to what you may think, it does not mean that these algorithms are inherently difficult, but that when one is lazy, <i>everything</i> is obscure.</p>
<p>The sad truth is that, even a doctor in comp. sc. must spend some time and energy to <i>think</i>. Too many professors do not think, they just repeat themselves. Student usually do not notice, but I do.</p>
<p>I spent a lot of time writing my slides because familiarity, intuition, needs time to come.</p>
<p>So it has nothing to do at all with your painful math classes of the past. Realising that is a huge liberation, because your failure to understand now is then no more emotionally associated to your past failures, so you keep trying again and again.</p>
<p>The key point is: do not be afraid of thinking, of giving up mechanisms &#8212; which are the hallmark of robots. Thinking is naked freedom. For what I read of you, I think that you can do it. Your brain is definitely working well.</p>
<p>Oh&#8230; and that&#8217;s too bad that burgondy wine is expensive in Seoul&#8230; I wish you good luck in your businesses (I know you are from Bordeaux but maybe exporting burgondy wine?;-)
</p>
]]></content:encoded>
				</item>
</channel>
</rss>
