<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Lev&#039;s Blog</title>
	<atom:link href="http://levsblog.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://levsblog.wordpress.com</link>
	<description>Programming at work and at home</description>
	<lastBuildDate>Fri, 07 Aug 2009 21:35:11 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='levsblog.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/cf75bf71d3803573937c754fcadf80c4?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Lev&#039;s Blog</title>
		<link>http://levsblog.wordpress.com</link>
	</image>
			<item>
		<title>Displaying feedback after each block in E-Prime</title>
		<link>http://levsblog.wordpress.com/2009/08/08/displaying-feedback-after-each-block-in-e-prime/</link>
		<comments>http://levsblog.wordpress.com/2009/08/08/displaying-feedback-after-each-block-in-e-prime/#comments</comments>
		<pubDate>Fri, 07 Aug 2009 21:26:52 +0000</pubDate>
		<dc:creator>Lev</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[e-prime]]></category>

		<guid isPermaLink="false">http://levsblog.wordpress.com/?p=222</guid>
		<description><![CDATA[If you don&#8217;t use E-Prime for psychological experiments, skip this post.
It&#8217;s written for the benefit of psychologists who have the misfortune of using E-Prime without a programmer husband to help them out.

E-Prime only allows you to display feedback after each stimulus:

What if you want to show feedback after each block? This won&#8217;t work:

Because in this [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=levsblog.wordpress.com&blog=5362894&post=222&subd=levsblog&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>If you don&#8217;t use E-Prime for psychological experiments, skip this post.<br />
It&#8217;s written for the benefit of psychologists who have the misfortune of using E-Prime without a programmer husband to help them out.<br />
<span id="more-222"></span><br />
E-Prime only allows you to display feedback after each stimulus:<br />
<img src="http://levsblog.files.wordpress.com/2009/08/e1.png" alt="Feedback after stimulus" /><br />
What if you want to show feedback after each block? This won&#8217;t work:<br />
<img src="http://levsblog.files.wordpress.com/2009/08/e2.png" alt="Feedback after TrialList" /><br />
Because in this case, only the last response in each block will be added to the statistics. Worse, the feedback screen will show &#8220;Correct&#8221; or &#8220;Incorrect&#8221;, according to that last response.</p>
<p>I succeeded to solve the problem by taking some of the Basic code generated by E-Studio and customizing it. This is the updated experiment:<br />
<img src="http://levsblog.files.wordpress.com/2009/08/e3.png" alt="With code" /><br />
As you see, <code>Feedback</code> now resides under <code>Unreferenced objects</code>, i.e., it doesn&#8217;t reside inside a procedure. To achieve this, either delete <code>Feedback</code> from the procedure it already resides in, or, if you haven&#8217;t created it yet, drag the FeedbackDisplay button to the background of the E-Prime window. In both cases <code>Feedback</code> will be unreferenced. </p>
<p>There are also two InLines. An InLine is a piece of code (program) that you can write yourself. When you double-click on an InLine, you get an empty page where you can write code. Here is the code you need in AddStats (note the small &#8220;copy to clipboard&#8221; link at the top):</p>
<pre class="brush: vb;">
'Add an observation to the accuracy stats
Feedback.AccStats.AddObservation Stimulus.Acc

'Add an observation to the response time stats
' unless the user did not respond
If Len(Stimulus.RESP) &gt; 0 Then
	Feedback.RTStats.AddObservation Stimulus.RT
	Feedback.CorrectRTStats.AddObservation Stimulus.RT
End If
</pre>
<p>Here is the code for ShowFeedback:</p>
<pre class="brush: vb;">
'Generate statistics text to be shown
'Note that if you add more text and then see that statistics appear in the wrong places,
'try changing the numbers in Objects(1) and Objects(2)
Set Feedback_SlideText = CSlideText(Feedback.States.Item(&quot;Correct&quot;).Objects(1))
Feedback_SlideText.Text = &quot;&quot; &amp; _
	Format$((Feedback.ACCStats.Mean / Feedback.ACCDivisor),Feedback.ACCFormat) &amp; &quot; Correct&quot;
Set Feedback_SlideText = Nothing

Set Feedback_SlideText = CSlideText(Feedback.States.Item(&quot;Correct&quot;).Objects(2))
Feedback_SlideText.Text = &quot;&quot; &amp; _
	Format$((Stimulus.RT / Feedback.RTDivisor), Feedback.RTFormat) &amp; _
	&quot; Seconds Average Response Time&quot;
Set Feedback_SlideText = Nothing

'You only need this part if you want to let the user close Feedback by pressing a key
Feedback.InputMasks.Reset
If Keyboard.GetState() = ebStateOpen Then
	FeedbackEchoClients.RemoveAll
	Feedback.InputMasks.Add Keyboard.CreateInputMask(&quot;{ANY}&quot;, &quot;&quot;, CLng(Feedback.Duration), CLng(&quot;1&quot;), ebEndResponseActionTerminate, CLogical(&quot;Yes&quot;), &quot;&quot;, &quot;&quot;, &quot;ResponseMode:All ProcessBackspace:Yes&quot;)
End If

' Show the window
Feedback.Run
</pre>
<p>If you name your feedback and stimulus objects some other names than <code>Feedback</code> and <code>Stimulus</code>, you&#8217;ll have to search for <code>Feedback</code> and <code>Stimulus</code> in the code and replace by the respective names you use. You can also customize your <code>ShowFeedback</code> code to modify the feedback text or to disable dismissing the feedback with the keyboard.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/levsblog.wordpress.com/222/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/levsblog.wordpress.com/222/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/levsblog.wordpress.com/222/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/levsblog.wordpress.com/222/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/levsblog.wordpress.com/222/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/levsblog.wordpress.com/222/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/levsblog.wordpress.com/222/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/levsblog.wordpress.com/222/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/levsblog.wordpress.com/222/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/levsblog.wordpress.com/222/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=levsblog.wordpress.com&blog=5362894&post=222&subd=levsblog&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://levsblog.wordpress.com/2009/08/08/displaying-feedback-after-each-block-in-e-prime/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8e008ef9c094cff73da9aa089deed580?s=96&#38;d=identicon" medium="image">
			<media:title type="html">levbor</media:title>
		</media:content>

		<media:content url="http://levsblog.files.wordpress.com/2009/08/e1.png" medium="image">
			<media:title type="html">Feedback after stimulus</media:title>
		</media:content>

		<media:content url="http://levsblog.files.wordpress.com/2009/08/e2.png" medium="image">
			<media:title type="html">Feedback after TrialList</media:title>
		</media:content>

		<media:content url="http://levsblog.files.wordpress.com/2009/08/e3.png" medium="image">
			<media:title type="html">With code</media:title>
		</media:content>
	</item>
		<item>
		<title>Sin, punishment and the Halting Problem</title>
		<link>http://levsblog.wordpress.com/2009/08/04/sin-punishment-and-the-halting-problem/</link>
		<comments>http://levsblog.wordpress.com/2009/08/04/sin-punishment-and-the-halting-problem/#comments</comments>
		<pubDate>Tue, 04 Aug 2009 18:47:45 +0000</pubDate>
		<dc:creator>Lev</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[religion]]></category>

		<guid isPermaLink="false">http://levsblog.wordpress.com/?p=204</guid>
		<description><![CDATA[
*This possibility is not available in Buddhism.
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=levsblog.wordpress.com&blog=5362894&post=204&subd=levsblog&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><a href="http://levsblog.files.wordpress.com/2009/08/sin1.png"><img src="http://levsblog.files.wordpress.com/2009/08/sin1.png" alt="Sin, punishment and the Halting Problem" /></a><br />
<font size="-2"><sup>*</sup>This possibility is not available in Buddhism.</font></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/levsblog.wordpress.com/204/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/levsblog.wordpress.com/204/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/levsblog.wordpress.com/204/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/levsblog.wordpress.com/204/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/levsblog.wordpress.com/204/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/levsblog.wordpress.com/204/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/levsblog.wordpress.com/204/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/levsblog.wordpress.com/204/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/levsblog.wordpress.com/204/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/levsblog.wordpress.com/204/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=levsblog.wordpress.com&blog=5362894&post=204&subd=levsblog&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://levsblog.wordpress.com/2009/08/04/sin-punishment-and-the-halting-problem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8e008ef9c094cff73da9aa089deed580?s=96&#38;d=identicon" medium="image">
			<media:title type="html">levbor</media:title>
		</media:content>

		<media:content url="http://levsblog.files.wordpress.com/2009/08/sin1.png" medium="image">
			<media:title type="html">Sin, punishment and the Halting Problem</media:title>
		</media:content>
	</item>
		<item>
		<title>Was FogBugz really released ahead of schedule?</title>
		<link>http://levsblog.wordpress.com/2009/08/02/was-fogbugz-really-released-ahead-of-schedule/</link>
		<comments>http://levsblog.wordpress.com/2009/08/02/was-fogbugz-really-released-ahead-of-schedule/#comments</comments>
		<pubDate>Sun, 02 Aug 2009 18:49:55 +0000</pubDate>
		<dc:creator>Lev</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[FogBugz]]></category>
		<category><![CDATA[schedule]]></category>

		<guid isPermaLink="false">http://levsblog.wordpress.com/?p=195</guid>
		<description><![CDATA[On July 20, FogCreek released FogBugz 7. Joel Spolsky bragged about being a week or two ahead of schedule thanks to using EBS 2.0. However, the release had some pretty annoying bugs. Those bugs were fixed in the next release, on July 28.
With all due respect to EBS, I think that instead of releasing ahead [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=levsblog.wordpress.com&blog=5362894&post=195&subd=levsblog&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>On July 20, FogCreek released FogBugz 7. Joel Spolsky <a href="http://www.joelonsoftware.com/items/2009/07/20.html">bragged</a> about being a week or two ahead of schedule thanks to using EBS 2.0. However, the release had some pretty annoying bugs. Those bugs were fixed in the next release, on July 28.</p>
<p>With all due respect to EBS, I think that instead of releasing ahead of time, FogCreek should have started <a href="http://en.wikipedia.org/wiki/Eating_one%27s_own_dog_food">eating their own dog food</a>. They would have discovered most bugs themselves, fixed them and released approximately on schedule, but without the bugs.</p>
<p>The way I see it, the real release was on July 28, and the date of the buggy release is irrelevant.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/levsblog.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/levsblog.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/levsblog.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/levsblog.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/levsblog.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/levsblog.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/levsblog.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/levsblog.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/levsblog.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/levsblog.wordpress.com/195/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=levsblog.wordpress.com&blog=5362894&post=195&subd=levsblog&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://levsblog.wordpress.com/2009/08/02/was-fogbugz-really-released-ahead-of-schedule/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8e008ef9c094cff73da9aa089deed580?s=96&#38;d=identicon" medium="image">
			<media:title type="html">levbor</media:title>
		</media:content>
	</item>
		<item>
		<title>Science and free will</title>
		<link>http://levsblog.wordpress.com/2009/06/08/science-and-free-will/</link>
		<comments>http://levsblog.wordpress.com/2009/06/08/science-and-free-will/#comments</comments>
		<pubDate>Mon, 08 Jun 2009 20:21:25 +0000</pubDate>
		<dc:creator>Lev</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[determinism]]></category>
		<category><![CDATA[ethics]]></category>
		<category><![CDATA[free will]]></category>
		<category><![CDATA[philosophy]]></category>
		<category><![CDATA[science]]></category>

		<guid isPermaLink="false">http://levsblog.wordpress.com/?p=186</guid>
		<description><![CDATA[On one hand, since I believe in the scientific approach, I don&#8217;t accept free will. Instead, I believe that human behavior is determined by the laws of nature, and where those laws are non-deterministic, our behavior is truly random.
However, I find I must assume free will or my world will be overturned. For example, without [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=levsblog.wordpress.com&blog=5362894&post=186&subd=levsblog&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>On one hand, since I believe in the scientific approach, I don&#8217;t accept free will. Instead, I believe that human behavior is determined by the laws of nature, and where those laws are non-deterministic, our behavior is truly random.</p>
<p>However, I find I must assume free will or my world will be overturned. For example, without free will, ethics loses its significance. Of course, people will still behave ethically most of the time because of law enforcement, selfish genes and upbringing, but in the phrase &#8220;thou shalt not steal&#8221; the word <em>shalt</em> becomes meaningless.</p>
<p>Political freedom, too, becomes pointless. In the absence of free will freedom turns into <a href="http://books.google.co.il/books?id=s6y8KsjrbzIC&amp;pg=PA275&amp;lpg=PA275&amp;dq=%22cognised+necessity%22+marx&amp;source=bl&amp;ots=8Y0z_w5arz&amp;sig=ldWvADRUwgIxr1v4Yslt6moc7DY&amp;hl=en&amp;ei=_WgtSoGsKYOsjAe5vqTeCg&amp;sa=X&amp;oi=book_result&amp;ct=result&amp;resnum=1">recognized necessity</a>. What difference does it make then if the state makes its citizens recognize a different necessity?</p>
<p>But science itself, paradoxically, needs free will, too. In experiments, independent variables are used to test causality. But how can a variable be independent in the absence of free will?</p>
<p>All of this is not to say that free will exists; rather, it&#8217;s a simplified model we have to contend ourselves with until we have a better one, in the same way that physics freshmen are implicitly taught that <a href="http://en.wikipedia.org/wiki/Consciousness_causes_collapse#Consciousness_causes_collapse">Consciousness causes collapse</a> because we don&#8217;t yet have an established &#8220;correct&#8221; interpretation of quantum physics.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/levsblog.wordpress.com/186/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/levsblog.wordpress.com/186/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/levsblog.wordpress.com/186/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/levsblog.wordpress.com/186/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/levsblog.wordpress.com/186/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/levsblog.wordpress.com/186/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/levsblog.wordpress.com/186/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/levsblog.wordpress.com/186/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/levsblog.wordpress.com/186/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/levsblog.wordpress.com/186/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=levsblog.wordpress.com&blog=5362894&post=186&subd=levsblog&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://levsblog.wordpress.com/2009/06/08/science-and-free-will/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8e008ef9c094cff73da9aa089deed580?s=96&#38;d=identicon" medium="image">
			<media:title type="html">levbor</media:title>
		</media:content>
	</item>
		<item>
		<title>The new name</title>
		<link>http://levsblog.wordpress.com/2009/05/16/the-new-name/</link>
		<comments>http://levsblog.wordpress.com/2009/05/16/the-new-name/#comments</comments>
		<pubDate>Sat, 16 May 2009 06:35:09 +0000</pubDate>
		<dc:creator>Lev</dc:creator>
				<category><![CDATA[Multilingual]]></category>

		<guid isPermaLink="false">http://levsblog.wordpress.com/?p=154</guid>
		<description><![CDATA[
We in the Western world are used to names being fixed since our birth. In other cultures it is different. Indians, for example, used to take new names after significant events. Chinese children were sometimes given permanent names only at the age of three, when a monk would visit their house and choose a name [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=levsblog.wordpress.com&blog=5362894&post=154&subd=levsblog&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p align="center"><a title="Deutsch" href="http://levaufdeutsch.wordpress.com/2009/05/22/der-neue-name/"><img src="http://levsblog.files.wordpress.com/2009/05/de2.gif" alt="" /></a></p>
<p>We in the Western world are used to names being fixed since our birth. In other cultures it is different. Indians, for example, used to take new names after significant events. Chinese children were sometimes given permanent names only at the age of three, when a monk would visit their house and choose a name for the child.</p>
<p>Nowadays, most urban Chinese have <a href="http://www.slate.com/id/2217001">English names</a>. They select these names for themselves in English lessons at school. Then they use those English names when talking to Westerners.</p>
<p>The modern Westerner has a name he chooses for himself, too. It&#8217;s the Web name. If one acquires even a little Web fame via one&#8217;s blog or some social site, the username becomes a name for all practical purposes. Sometimes, people are even called by their Web names in real life. (This hasn&#8217;t happened to me yet, though.)</p>
<p>My seven-year-old son already has a Web name he has invented for himself, and I&#8217;ve heard a friend call him by that name. Now that&#8217;s a child of the 21st century!</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/levsblog.wordpress.com/154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/levsblog.wordpress.com/154/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/levsblog.wordpress.com/154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/levsblog.wordpress.com/154/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/levsblog.wordpress.com/154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/levsblog.wordpress.com/154/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/levsblog.wordpress.com/154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/levsblog.wordpress.com/154/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/levsblog.wordpress.com/154/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/levsblog.wordpress.com/154/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=levsblog.wordpress.com&blog=5362894&post=154&subd=levsblog&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://levsblog.wordpress.com/2009/05/16/the-new-name/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8e008ef9c094cff73da9aa089deed580?s=96&#38;d=identicon" medium="image">
			<media:title type="html">levbor</media:title>
		</media:content>

		<media:content url="http://levsblog.files.wordpress.com/2009/05/de2.gif" medium="image" />
	</item>
		<item>
		<title>AshkEnte</title>
		<link>http://levsblog.wordpress.com/2009/05/01/ashkente/</link>
		<comments>http://levsblog.wordpress.com/2009/05/01/ashkente/#comments</comments>
		<pubDate>Fri, 01 May 2009 06:44:55 +0000</pubDate>
		<dc:creator>Lev</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://levsblog.wordpress.com/?p=149</guid>
		<description><![CDATA[The Rite of AshkEnte, quite simply, summons and binds Death. Students of the occult will  be aware that it can be performed with a simple incantation, three small bits of wood and  4cc of mouse blood, but no wizard worth his pointy hat would dream of doing anything so  unimpressive; they knew [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=levsblog.wordpress.com&blog=5362894&post=149&subd=levsblog&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><blockquote><p>The Rite of AshkEnte, quite simply, summons and binds Death. Students of the occult will  be aware that it can be performed with a simple incantation, three small bits of wood and  4cc of mouse blood, but no wizard worth his pointy hat would dream of doing anything so  unimpressive; they knew in their hearts that if a spell didn&#8217;t involve big yellow candles,  lots of rare incense, circles drawn on the floor with eight different colours of chalk and  a few cauldrons around the place then it simply wasn&#8217;t worth contemplating.</p></blockquote>
<p>This quote from Terry Pratchett reminds me of programming.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/levsblog.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/levsblog.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/levsblog.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/levsblog.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/levsblog.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/levsblog.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/levsblog.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/levsblog.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/levsblog.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/levsblog.wordpress.com/149/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=levsblog.wordpress.com&blog=5362894&post=149&subd=levsblog&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://levsblog.wordpress.com/2009/05/01/ashkente/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8e008ef9c094cff73da9aa089deed580?s=96&#38;d=identicon" medium="image">
			<media:title type="html">levbor</media:title>
		</media:content>
	</item>
		<item>
		<title>Adding C code to Perl on PC</title>
		<link>http://levsblog.wordpress.com/2009/04/09/adding-c-code-to-perl-on-pc/</link>
		<comments>http://levsblog.wordpress.com/2009/04/09/adding-c-code-to-perl-on-pc/#comments</comments>
		<pubDate>Thu, 09 Apr 2009 19:48:24 +0000</pubDate>
		<dc:creator>Lev</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://levsblog.wordpress.com/?p=145</guid>
		<description><![CDATA[I tried adding an external C library to Perl, more specifically, ActivePerl on PC. Here are my findings:
The recommended way is using something called xsub, a utility that has its own language, XS. The process is documented in two long manpages, perlxs and perlxstut. It&#8217;s long and complicated, involving a makefile generated by a local [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=levsblog.wordpress.com&blog=5362894&post=145&subd=levsblog&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I tried adding an external C library to Perl, more specifically, ActivePerl on PC. Here are my findings:</p>
<p>The recommended way is using something called <code>xsub</code>, a utility that has its own language, XS. The process is documented in two long manpages, <code>perlxs</code> and <code>perlxstut</code>. It&#8217;s long and complicated, involving a makefile generated by a local script, makefile.pl, in turn generated by <code>xsub</code>. The makefile doesn&#8217;t work because the backslashes there aren&#8217;t escaped. I tried replacing each backslash that wasn&#8217;t at the end of a line by two backslashes, but it didn&#8217;t work for some other reason. The conclusion is that <code>MakeMake</code> is broken on PC, and therefore so is <code>xsub</code>.</p>
<p>Then there is <code>C::DynaLoad</code>. It allows calling functions from shared libraries. In its doc the author says that <code>xsub</code> is much cooler, but doesn&#8217;t explain why. The only reason I can think of is that it can work with Perl variables, but then why not allow passing those variables directly to C functions? Anyway, guess what. <code>C::DynaLoad</code> is written using <code>xsub</code>. So I still had to build it using the makefile and everything, and the makefile was still broken. I tried to find it compiled for PC, but failed.</p>
<p>Now on PC there is <code>Win32::API</code>. Actually it allows calling any function from a DLL. It&#8217;s like <code>C::DynaLoad</code>, only it doesn&#8217;t require compilation. It actually can receive the C prototype of a function, and you can pass structs that on the Perl side look like hashes. I compiled the library I needed into a DLL, and it works just fine.</p>
<p>On PC, calling C functions in DLLs is standard. This isn&#8217;t surprising, since it&#8217;s a very simple interface. Why does Linux require jumping through all those hoops? I suppose because it&#8217;s more interesting in a geekish way. And that&#8217;s symptomatic of the general reason why Linux isn&#8217;t popular.</p>
<p>As an aside, I used <code>MinGW</code>, a port of <code>gcc</code>, to compile the DLL. You have to make the functions <code>__declspec(dllexport)</code> and <code>WINAPI</code> (because that&#8217;s what <code>Win32::API</code> expects). Now <code>gcc</code> understands the former, but the latter is defined in <code>"winnt.h"</code>, on which <code>gcc</code> chokes. It turns out that <code>WINAPI</code> is defined to mean <code>__stdcall</code> (not <code>__pascal</code> any more), and <code>gcc</code> understands that. Then the function names are decorated with <code>@4</code>. I suppose it&#8217;s possible to turn off this decoration, but it&#8217;s simpler to pass the decorated function names to <code>Win32::API</code>. It works. The flag for making DLLs is <code>-shared</code>.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/levsblog.wordpress.com/145/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/levsblog.wordpress.com/145/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/levsblog.wordpress.com/145/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/levsblog.wordpress.com/145/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/levsblog.wordpress.com/145/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/levsblog.wordpress.com/145/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/levsblog.wordpress.com/145/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/levsblog.wordpress.com/145/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/levsblog.wordpress.com/145/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/levsblog.wordpress.com/145/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=levsblog.wordpress.com&blog=5362894&post=145&subd=levsblog&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://levsblog.wordpress.com/2009/04/09/adding-c-code-to-perl-on-pc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8e008ef9c094cff73da9aa089deed580?s=96&#38;d=identicon" medium="image">
			<media:title type="html">levbor</media:title>
		</media:content>
	</item>
		<item>
		<title>The wise men of Chelm strike again</title>
		<link>http://levsblog.wordpress.com/2009/04/03/the-wise-men-of-chelm-strike-again/</link>
		<comments>http://levsblog.wordpress.com/2009/04/03/the-wise-men-of-chelm-strike-again/#comments</comments>
		<pubDate>Fri, 03 Apr 2009 08:43:48 +0000</pubDate>
		<dc:creator>Lev</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://levsblog.wordpress.com/?p=140</guid>
		<description><![CDATA[Recently I&#8217;ve mentioned that there are many Wise Men of Chelm in governmental agencies. Well, there are especially many in armies. Here&#8217;s a recent example from The Daily WTF. 
Its logic runs like this: On one hand, we want to be able to deal with unexpected moves, so let&#8217;s add a random factor to the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=levsblog.wordpress.com&blog=5362894&post=140&subd=levsblog&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Recently I&#8217;ve <a href="http://levsblog.wordpress.com/2009/03/28/the-wise-men-of-chelm/">mentioned</a> that there are many Wise Men of Chelm in governmental agencies. Well, there are especially many in armies. Here&#8217;s a recent <a href="http://thedailywtf.com/Articles/More-or-Less-Random.aspx">example</a> from The Daily WTF. </p>
<p>Its logic runs like this: On one hand, we want to be able to deal with unexpected moves, so let&#8217;s add a random factor to the simulation. On the other hand, we want the random moves to be the same every time!</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/levsblog.wordpress.com/140/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/levsblog.wordpress.com/140/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/levsblog.wordpress.com/140/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/levsblog.wordpress.com/140/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/levsblog.wordpress.com/140/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/levsblog.wordpress.com/140/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/levsblog.wordpress.com/140/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/levsblog.wordpress.com/140/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/levsblog.wordpress.com/140/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/levsblog.wordpress.com/140/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=levsblog.wordpress.com&blog=5362894&post=140&subd=levsblog&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://levsblog.wordpress.com/2009/04/03/the-wise-men-of-chelm-strike-again/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8e008ef9c094cff73da9aa089deed580?s=96&#38;d=identicon" medium="image">
			<media:title type="html">levbor</media:title>
		</media:content>
	</item>
		<item>
		<title>The Wise Men of Chelm</title>
		<link>http://levsblog.wordpress.com/2009/03/28/the-wise-men-of-chelm/</link>
		<comments>http://levsblog.wordpress.com/2009/03/28/the-wise-men-of-chelm/#comments</comments>
		<pubDate>Sat, 28 Mar 2009 19:15:42 +0000</pubDate>
		<dc:creator>Lev</dc:creator>
				<category><![CDATA[Multilingual]]></category>

		<guid isPermaLink="false">http://levsblog.wordpress.com/?p=134</guid>
		<description><![CDATA[&#160;&#160;&#160;
The wise men of Chelm are a gallery of wrong decision making. For example:
The wise men of Chelm discussed how to make the Chelmians in general wiser. They decided that stupid people should not have children. To achieve that, they decided to make the village shtetl idiot divorce his wife. &#8220;But he isn&#8217;t married&#8221;, someone [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=levsblog.wordpress.com&blog=5362894&post=134&subd=levsblog&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p align="center"><a href='http://sevastnikon.livejournal.com/93703.html' title='Русский'><img src='http://levsblog.files.wordpress.com/2009/05/ru2.gif'></a>&nbsp;&nbsp;&nbsp;</p>
<p><a href="http://www.google.co.il/search?q=the+wise+men+of+chelm">The wise men of Chelm</a> are a gallery of wrong decision making. For example:</p>
<blockquote><p>The wise men of Chelm discussed how to make the Chelmians in general wiser. They decided that stupid people should not have children. To achieve that, they decided to make the <span style="text-decoration:line-through;">village</span> shtetl idiot divorce his wife. &#8220;But he isn&#8217;t married&#8221;, someone objected. So the wise men decreed that the idiot should marry and then divorce.</p></blockquote>
<p>That&#8217;s right. Set an intermediate goal and forget the final one. Large bureaucracies such as ministries and government agencies do that all the time.</p>
<blockquote><p>The bridge at Chelm was dangerous: People passing over the bridge would slip at its end and break their arms or legs. So the wise men of Chelm decreed to build a hospital next to the bridge.</p></blockquote>
<p>Programmers call that patching.</p>
<blockquote><p>The Chelmians wanted to build a public bath. However, they couldn&#8217;t make up their minds whether to rasp the floor boards. For if they didn&#8217;t, people might get splinters in their feet, but if they did rasp and the boards were smooth, people might slip on the wet floor and fall. After discussing the matter for several days, the wise men decreed: The carpenter must rasp the boards but put them smooth side down.</p></blockquote>
<p>Conflicting goals. And so on.</p>
<p>The wise men of Chelm live among us. Unfortunately, some of us are their employees.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/levsblog.wordpress.com/134/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/levsblog.wordpress.com/134/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/levsblog.wordpress.com/134/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/levsblog.wordpress.com/134/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/levsblog.wordpress.com/134/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/levsblog.wordpress.com/134/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/levsblog.wordpress.com/134/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/levsblog.wordpress.com/134/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/levsblog.wordpress.com/134/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/levsblog.wordpress.com/134/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=levsblog.wordpress.com&blog=5362894&post=134&subd=levsblog&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://levsblog.wordpress.com/2009/03/28/the-wise-men-of-chelm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8e008ef9c094cff73da9aa089deed580?s=96&#38;d=identicon" medium="image">
			<media:title type="html">levbor</media:title>
		</media:content>

		<media:content url="http://levsblog.files.wordpress.com/2009/05/ru2.gif" medium="image" />
	</item>
		<item>
		<title>Multivac</title>
		<link>http://levsblog.wordpress.com/2009/03/23/multivac/</link>
		<comments>http://levsblog.wordpress.com/2009/03/23/multivac/#comments</comments>
		<pubDate>Mon, 23 Mar 2009 20:39:31 +0000</pubDate>
		<dc:creator>Lev</dc:creator>
				<category><![CDATA[Multilingual]]></category>

		<guid isPermaLink="false">http://levsblog.wordpress.com/?p=127</guid>
		<description><![CDATA[&#160;&#160;&#160;
Isaac Asimov thought there would be a Multivac storing and processing data on all the people on Earth. In fact, he was quite close. Only there are several such Multivacs, each with its own part of the data. What Asimov missed completely is that the data is entered voluntarily, and most of it is publicly [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=levsblog.wordpress.com&blog=5362894&post=127&subd=levsblog&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p align="center"><a href='http://sevastnikon.livejournal.com/93506.html' title='Русский'><img src='http://levsblog.files.wordpress.com/2009/05/ru2.gif'></a>&nbsp;&nbsp;&nbsp;</p>
<p>Isaac Asimov thought there would be a Multivac storing and processing data on all the people on Earth. In fact, he was quite close. Only there are several such Multivacs, each with its own part of the data. What Asimov missed completely is that the data is entered voluntarily, and most of it is publicly available.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/levsblog.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/levsblog.wordpress.com/127/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/levsblog.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/levsblog.wordpress.com/127/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/levsblog.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/levsblog.wordpress.com/127/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/levsblog.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/levsblog.wordpress.com/127/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/levsblog.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/levsblog.wordpress.com/127/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=levsblog.wordpress.com&blog=5362894&post=127&subd=levsblog&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://levsblog.wordpress.com/2009/03/23/multivac/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8e008ef9c094cff73da9aa089deed580?s=96&#38;d=identicon" medium="image">
			<media:title type="html">levbor</media:title>
		</media:content>

		<media:content url="http://levsblog.files.wordpress.com/2009/05/ru2.gif" medium="image" />
	</item>
	</channel>
</rss>