<?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/"
	>

<channel>
	<title>Guy Wiener</title>
	<atom:link href="http://www.cs.bgu.ac.il/~gwiener/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cs.bgu.ac.il/~gwiener</link>
	<description>Computer Sciences Dept., Ben-Gurion University</description>
	<lastBuildDate>Sun, 10 Oct 2010 19:52:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Why Software Engineers Need to Learn Functional&#160;Programming</title>
		<link>http://www.cs.bgu.ac.il/~gwiener/software-engineering/why-software-engineers-need-to-learn-functional-programming/</link>
		<comments>http://www.cs.bgu.ac.il/~gwiener/software-engineering/why-software-engineers-need-to-learn-functional-programming/#comments</comments>
		<pubDate>Sun, 10 Oct 2010 19:52:37 +0000</pubDate>
		<dc:creator>Guy Wiener</dc:creator>
				<category><![CDATA[Software Engineering]]></category>

		<guid isPermaLink="false">http://www.cs.bgu.ac.il/~gwiener/?p=331</guid>
		<description><![CDATA[I have just returned from ICFP 2010, were I gave a talk at the Erlang workshop. I admit that many of the talks were too theoretical for my taste &#8211; &#8220;A sophisticated type theory looking for a programming language&#8221; was a repeating theme. Nevertheless, my conclusion from the conference was: There is a big gap [...]]]></description>
			<content:encoded><![CDATA[<p>I have just returned from <a href="http://www.icfpconference.org/icfp2010/">ICFP 2010</a>, were I gave a talk at the <a href="http://www.erlang.org/workshop/2010/">Erlang workshop</a>. I admit that many of the talks were too theoretical for my taste &#8211; &#8220;A sophisticated type theory looking for a programming language&#8221; was a repeating theme. Nevertheless, my conclusion from the conference was: There is a big gap between software engineers and functional programmers, and there shouldn&#8217;t be. Here are some talks that should draw the attention of the SE community:</p>
<p><span id="more-331"></span></p>
<ul>
<li>A whole session, chaired by James Cheney, discussed bidirectional functions. The problem definition is: Given a function f from X to Y such that f(x) = y, synthesize a function g from Y to X, such that if y&#8217; is similar enough to y then g(y&#8217;) = x&#8217; and f(x&#8217;) = y&#8217;. Rephrasing for the modeling community: Given a code generation schema f, synthesize a model extraction schema g, such that if the code hasn&#8217;t changed too much, it can reflect the changes back to the model. The results in this field are still far from usable as-is (the restriction assumptions are still rather limiting). However, any progress in this track will be great.</li>
<li>A repeating topic in those type theory talks were dependent types. A <em>dependent type</em>, if I understand correctly, is a type that is define by some computation, and not only in terms of its structure. For example, prime numbers are a dependent type. Some new programming languages (the favorite was <a href="http://wiki.portal.chalmers.se/agda/pmwiki.php">Agda</a>) actually support a type system with dependent types. That brings these languages closer to automatic theorem provers, such as <a href="http://coq.inria.fr/">Coq</a>. If this trend continues, we&#8217;ll see a new programming paradigm emerging, at least as powerful as logic programming.</li>
<li>Finally, &#8220;the most influential ICFP paper&#8221; for the years 2000 &#8211; 2010 was announced in this year&#8217;s ICFP. It wasn&#8217;t a type theory paper; it wasn&#8217;t a partial evaluation paper; it wasn&#8217;t about compilation at all. It was John Hughes&#8217; paper about <a href="http://en.wikipedia.org/wiki/QuickCheck">QuickCheck</a>, a multilingual library for generating test cases based on properties. Later, at the Erlang workshop, John briefly discussed properties testing for parallel scenarios, and how it caught bugs in one Erlang&#8217;s standard library servers (!). That&#8217;s a result that cannot be ignored, given the raising importance of parallelism.</li>
</ul>
<p><!--more--></p>
<ul></ul>
<p>To cut a long conference short: Software Engineering is not just about OOP anymore.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cs.bgu.ac.il/~gwiener/software-engineering/why-software-engineers-need-to-learn-functional-programming/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>In Praise of&#160;Elitism</title>
		<link>http://www.cs.bgu.ac.il/~gwiener/software-engineering/in-praise-of-elitism/</link>
		<comments>http://www.cs.bgu.ac.il/~gwiener/software-engineering/in-praise-of-elitism/#comments</comments>
		<pubDate>Fri, 17 Sep 2010 11:06:20 +0000</pubDate>
		<dc:creator>Guy Wiener</dc:creator>
				<category><![CDATA[Software Engineering]]></category>

		<guid isPermaLink="false">http://www.cs.bgu.ac.il/~gwiener/?p=312</guid>
		<description><![CDATA[I haven&#8217;t posted here for a while &#8211; It&#8217;s been a crazy couple of months. Now, that I have a few more publications and a newborn baby, I can go back to posting. I&#8217;ve encountered a few interesting posts recently, following Zohar Arad&#8217;s The Thinker Fail post on Newsgeek. Summing it up, Israel, once praised [...]]]></description>
			<content:encoded><![CDATA[<p><em>I haven&#8217;t posted here for a while &#8211; It&#8217;s been a crazy couple of months. Now, that I have a few more publications and a newborn baby, I can go back to posting.</em></p>
<p>I&#8217;ve encountered a few interesting posts recently, following Zohar Arad&#8217;s <a href="http://www.newsgeek.co.il/the-thinker-fails/">The Thinker Fail</a> post on <a href="http://www.newsgeek.co.il/">Newsgeek</a>. Summing it up, Israel, once praised as &#8220;The Start-Up Nation&#8221;, is in trouble &#8211; We&#8217;re dragging behind as the web technology progresses. Causes:</p>
<ol>
<li>The government, and hence the army, are biased towards Microsoft products (see <a href="http://sixkidsandafulltimejob.blogspot.com/2010/07/hummus-manifesto-part-1.html">Michael Eisenberg&#8217;s post</a>). Therefore, the plethora of army-trained programmers are biased towards .NET technologies.</li>
<li>The universities and colleges teach web programming using .NET or Java.</li>
<li>The world, namely the silicon valley, has moved onward to open-source web technologies, like distributed cache and HTTP load balancing (thanks again to Michael Eisenberg for pointing that out).</li>
<li>Bottom line, Israeli students are not up-do-date with the technology required for building a scalable web application.</li>
</ol>
<p>Zohar Arad claims that this is in part the fault of Israeli higher education, that puts <strong>too much</strong> focus on mainstream technologies. Please read the last sentence again: It is a cry from the hi-tech trenches for the universities to focus <strong>less</strong> on technologies, <strong>more</strong> on theory and methods, and let (even <em>force</em>) the students to study the rapidly-changing technological stack <strong>by themselves.</strong> After teaching students OOP and web programming for over 4 years now, I couldn&#8217;t agree more. However, it is not entirely the fault of the universities. Students often cry to high heavens when a lecturer switches from good-old mainstream programming languages to something else &#8211; Be it a functional programming language, a scripting language, or even just an open-source application. If it is outside the comfort zone of Eclipse (or visual studio) and Windows&#8217; next-next-next installers, it&#8217;s too hacker-ish for many students&#8217; taste.</p>
<p><span id="more-312"></span>In Israel, elitism is a sin against political correctness. Being in an elite, however, doesn&#8217;t necessary means demanding more from other; it means demanding more from <em>yourself</em>. I would like to address an elite group &#8211; As if getting accepted to a Computer Science program isn&#8217;t elite enough &#8211; The more motivated and driven students. No musician will achieve greatness without practicing on every single free moment, even if he (or she) studies at Juliard. Likewise, you can&#8217;t become a web entrepreneur just by doing the required minimum at a CS program. You have to go the extra mile yourself. Following Zohar&#8217;s shopping list to the letter is a good start.</p>
<p>See you all at the fall semester!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cs.bgu.ac.il/~gwiener/software-engineering/in-praise-of-elitism/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Bad Case of Geek&#160;Humor</title>
		<link>http://www.cs.bgu.ac.il/~gwiener/programming/a-bad-case-of-geek-humor/</link>
		<comments>http://www.cs.bgu.ac.il/~gwiener/programming/a-bad-case-of-geek-humor/#comments</comments>
		<pubDate>Wed, 28 Apr 2010 12:28:18 +0000</pubDate>
		<dc:creator>Guy Wiener</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[erlang]]></category>

		<guid isPermaLink="false">http://www.cs.bgu.ac.il/~gwiener/?p=244</guid>
		<description><![CDATA[I haven&#8217;t written here for a long time (suffered from a bad case of deadlines), so let me brighten things up by unfolding one of the most severe cases of geek humor that I encountered. The Erlang standard library includes Mnesia, a distributed database library. It is a most useful application. To make it even [...]]]></description>
			<content:encoded><![CDATA[<p>I haven&#8217;t written here for a long time (suffered from a bad case of deadlines), so let me brighten things up by unfolding one of the most severe cases of geek humor that I encountered.</p>
<p>The Erlang standard library includes <a href="http://www.erlang.org/doc/man/mnesia.html">Mnesia</a>, a distributed database library. It is a most useful application. To make it even more useful, it includes the Table Viewer (TV) &#8211; A Tk application that shows the content of Mnesia tables.</p>
<p>When I opened it, I was surprised to see that one of the options is &#8220;Error Messages in Haiku&#8221;:<br />
<a href="http://www.cs.bgu.ac.il/~gwiener/wp-content/uploads/2010/04/screenshot-tv-options.png"><img class="alignnone size-medium wp-image-245" title="screenshot-tv-options" src="http://www.cs.bgu.ac.il/~gwiener/wp-content/uploads/2010/04/screenshot-tv-options-300x153.png" alt="" width="300" height="153" /></a></p>
<p><span id="more-244"></span>When this option is checked, the viewer provides it&#8217;s-own Zen interpretation to various malfunctions:</p>
<p><a href="http://www.cs.bgu.ac.il/~gwiener/wp-content/uploads/2010/04/screenshot-tv-search.png"><img class="alignnone size-medium wp-image-246" title="screenshot-tv-search" src="http://www.cs.bgu.ac.il/~gwiener/wp-content/uploads/2010/04/screenshot-tv-search-300x160.png" alt="" width="300" height="160" /><br />
</a> <a href="http://www.cs.bgu.ac.il/~gwiener/wp-content/uploads/2010/04/screenshot-tv-stopped.png"><img class="alignnone size-medium wp-image-247" title="screenshot-tv-stopped" src="http://www.cs.bgu.ac.il/~gwiener/wp-content/uploads/2010/04/screenshot-tv-stopped.png" alt="" width="300" height="180" /><br />
</a><a href="http://www.cs.bgu.ac.il/~gwiener/wp-content/uploads/2010/04/screenshot-tv-down.png"><img class="alignnone size-medium wp-image-248" title="screenshot-tv-down" src="http://www.cs.bgu.ac.il/~gwiener/wp-content/uploads/2010/04/screenshot-tv-down.png" alt="" width="300" height="180" /></a></p>
<p>This can be the beginning of a great geek-talk tradition, although I doubt how useful or informative it will be:</p>
<p style="text-align: center;">The reference X<br />
Only seems to be valid;<br />
But it points to null.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cs.bgu.ac.il/~gwiener/programming/a-bad-case-of-geek-humor/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Radioactive&#160;Code</title>
		<link>http://www.cs.bgu.ac.il/~gwiener/software-engineering/radioactive-code/</link>
		<comments>http://www.cs.bgu.ac.il/~gwiener/software-engineering/radioactive-code/#comments</comments>
		<pubDate>Thu, 28 Jan 2010 08:25:59 +0000</pubDate>
		<dc:creator>Guy Wiener</dc:creator>
				<category><![CDATA[Software Engineering]]></category>
		<category><![CDATA[se]]></category>

		<guid isPermaLink="false">http://www.cs.bgu.ac.il/~gwiener/?p=214</guid>
		<description><![CDATA[&#8220;It takes 10 years to study, train and specialise in order to be a M.D that prescribes radiation therapy to people. It takes 3-4 years to do a Bachelor&#8217;s degree in order to be a programmer that codes the machine that blasts peoples with radiation.&#8221;  I often open my OOP course with this sentence, trying [...]]]></description>
			<content:encoded><![CDATA[<p>&#8220;It takes 10 years to study, train and specialise in order to be a M.D that prescribes radiation therapy to people. It takes 3-4 years to do a Bachelor&#8217;s degree in order to be a programmer that codes the machine that blasts peoples with radiation.&#8221;  I often open my OOP course with this sentence, trying to motivate SE students to take their programming skills seriously. A couple of days ago the New-York Times published a <a href="http://www.nytimes.com/2010/01/24/health/24radiation.html?pagewanted=all">gruesome proof</a> why that sentence presents a real problem. Apparently, software and configuration errors in linear accelerators (the machines that blast patients with radiation) caused numerous injuries and several death cases. Now it&#8217;s official: <strong>Bad code kills</strong>.</p>
<p><span id="more-214"></span></p>
<p>Programming began as a merry hackers&#8217; hobby, and evolved into a quick way to make money &#8211; We saw two high-tech bubble bursts in the last 10 years to prove the second. Somewhere in the process, software sneaked into each and every piece of machinery that we have, from phones to war machines. However, the software industry never paused and reflected on how to take itself more seriously. People started to be afraid of machines (See the terminator and Matrix series for a proof), but they are pointing their fingers in the wrong direction. <strong>Machines don&#8217;t kill people. People who program machines kill people.</strong></p>
<p>Btw, credit where it&#8217;s due: Reody Green saw it coming.  Read his wonderful article on <a href="http://mindprod.com/jgloss/unmain.html">&#8220;How to Write Unmaintainable Code&#8221;</a> and the appendix <a href="http://mindprod.com/jgloss/unmaintermite.html">&#8220;Operation Termite&#8221;</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cs.bgu.ac.il/~gwiener/software-engineering/radioactive-code/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Curried Predicates in&#160;Prolog</title>
		<link>http://www.cs.bgu.ac.il/~gwiener/programming/curried-predicates-in-prolog/</link>
		<comments>http://www.cs.bgu.ac.il/~gwiener/programming/curried-predicates-in-prolog/#comments</comments>
		<pubDate>Fri, 04 Dec 2009 10:38:39 +0000</pubDate>
		<dc:creator>Guy Wiener</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[prolog]]></category>

		<guid isPermaLink="false">http://www.cs.bgu.ac.il/~gwiener/?p=210</guid>
		<description><![CDATA[Prolog is not a functional language &#8211; Not yet, at least. Sometimes, that&#8217;s a shame, especially when you want to use meta-predicates such as &#8220;forall&#8221; or &#8220;findall&#8221;, and use a predicate with partial arguments as the goal &#8211; As you would have done in functional programming languages. Luckily, that specific scenario is actually possible &#8211; [...]]]></description>
			<content:encoded><![CDATA[<p>Prolog is not a functional language &#8211; Not yet, at least. Sometimes, that&#8217;s a shame, especially when you want to use meta-predicates such as &#8220;forall&#8221; or &#8220;findall&#8221;, and use a predicate with partial arguments as the goal &#8211; As you would have done in functional programming languages.</p>
<p>Luckily, that specific scenario is actually possible &#8211; In <a href="http://www.swi-prolog.org/">SWI-Prolog</a>, at least. The &#8220;call&#8221; meta-predicate, and its derivatives, may take a functor and extra arguments as parameters. Then, the extra arguments are concatenated to the arguments of the functor, and the resulting functor acts as a goal.</p>
<p>If this is all Prolog-Chinese for you, here&#8217;s an example:</p>
<p><span id="more-210"></span></p>
<p>Consider the following predicate:</p>

<div class="wp_syntax"><div class="code"><pre class="prolog" style="font-family:monospace;"><span style="color: #990000;">is</span><span style="color: #008080;">_child_of</span><span style="color: #009900;">&#40;</span><span style="color: #008080;">Parent</span><span style="color: #339933;">,</span> <span style="color: #008080;">Child</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">:-</span>
  some<span style="color: #008080;">_conditions</span><span style="color: #339933;">...</span></pre></div></div>

<p>It succeeds if the second argument unifies with a child of the first argument &#8211; Whatever that means.</p>
<p>Now, suppose you have a list of elements, and you want to find only those who are children of &#8220;foo&#8221;:</p>

<div class="wp_syntax"><div class="code"><pre class="prolog" style="font-family:monospace;">apply<span style="color: #339933;">:</span><span style="color: #990000;">include</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">is</span><span style="color: #008080;">_child_of</span><span style="color: #009900;">&#40;</span>foo<span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #008080;">List</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span></pre></div></div>

<p>There are many more ways to do this, but you get the idea: &#8220;<tt>call(is_child_of(X), Y)</tt>&#8221; is the same as &#8220;<tt>call(is_child_of(X, Y)</tt>&#8220;, which is the same as running &#8220;<tt>is_child_of(X, Y)</tt>&#8220;.</p>
<h2>Addendum</h2>
<p>Why did I said that Prolog is not <em>yet</em> a functional programming language? Because there is currently a debate in the SWI-Prolog mailing list about introducing lambda expressions as a part of Prolog. <a href="http://www.di.ubi.pt/~pmoura/">Paulo Moura</a> even went ahead and introduced it as a part of <a href="http://logtalk.org/">Logtalk</a> (see <a href="http://logtalk.org/manuals/refman/grammar.html#grammar_lambdas">this section</a>). There&#8217;s also Ulrich&#8217;s <a href="http://www.complang.tuwien.ac.at/ulrich/Prolog-inedit/ISO-Hiord">lambda library</a>. Some people <a href="http://old.nabble.com/Purity-of-Prolog-Campaign-to26599880.html">don&#8217;t really approve of this</a>, but hey, no language feature is perfect.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cs.bgu.ac.il/~gwiener/programming/curried-predicates-in-prolog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Erlang: Strong&#160;Buy</title>
		<link>http://www.cs.bgu.ac.il/~gwiener/programming/erlang-strong-buy/</link>
		<comments>http://www.cs.bgu.ac.il/~gwiener/programming/erlang-strong-buy/#comments</comments>
		<pubDate>Wed, 18 Nov 2009 16:23:03 +0000</pubDate>
		<dc:creator>Guy Wiener</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[erlang]]></category>

		<guid isPermaLink="false">http://www.cs.bgu.ac.il/~gwiener/?p=208</guid>
		<description><![CDATA[I&#8217;ve returned last week from EUC&#8217;2009. My conclusion: If programming languages were stocks, and if I were a market advisor, I would put a &#8220;strong buy&#8221; recommendation on Erlang. If you have some spare &#8220;programming language money&#8221; (that is, the time and patience to learn a new language), put it on Erlang. It would be [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve returned last week from <a href="http://www.erlang-factory.com/conference/ErlangUserConference2009">EUC&#8217;2009</a>. My conclusion: If programming languages were stocks, and if I were a market advisor, I would put a &#8220;strong buy&#8221; recommendation on Erlang. If you have some spare &#8220;programming language money&#8221; (that is, the time and patience to learn a new language), put it on Erlang. It would be worth your while. Here are some reasons why:</p>
<p><span id="more-208"></span></p>
<h2>Big Talk</h2>
<p>I attended a talk a few month ago by Jeffrey Ullman. One of the slides includes a graph with circles and arrows. He explained that the circles are computers and the arrows are messages, and that the graph describes an algorithm. &#8220;An algorithm&#8221;, he said, &#8220;is how computers collaborate&#8221;.</p>
<p>If the great Jeffrey Ullman gives a new definition to algorithms, the rest of us mortals need to pay attention. The reason behind this new definition was that modern CS problems are just too big to fit into the main memory of a single machine. Finding frequent pairs in terabytes of data-sets or handling a rapid click-stream are just a couple of examples. If you want to be a part of the &#8220;big talk&#8221;, you need to be able to scale up &#8211; That is, to distribute.</p>
<p>Distribution is one of the strongest points in Erlang, hence the recommendation. Even if you don&#8217;t end up programming in Erlang for living, it&#8217;s worth studying the design and standard library of Erlang, with respect to parallelism and distribution. It represents an invaluable knowledge from many years of designing distributed systems.</p>
<h2>Buy low, sell high</h2>
<p>Erlang is still a manageable language. The syntax is minimal and the standard library is not too bloated. Even the open-source projects are still rather focused on exploiting the strong points of the language, rather than just re-implementing thing &#8220;in the language we love&#8221;. The Erlang community is still small and welcoming. In other words, you can still become an &#8220;Erlang professional&#8221; without having to go over gigabytes of documentation and dozens of books. If you do it now, you&#8217;ll be ready when distribution will be a must. I believe that the question &#8220;can you program several computers, or just one?&#8221; will start popping up in job interviews within a few years.</p>
<h2>A simple and modern language</h2>
<p>Erlang is a simple language: It&#8217;s just a functional language with a modules system and 3 extra operators for asynchronous message-passing. Such languages tend to be somewhat restricted &#8211; For example, try to find a GUI toolkit for Scheme.</p>
<p>Erlang is not restricted. You can get any modern framework that you like for Erlang: Web servers, web page generation, AJAX, document databases, GUI, unit testing, large-scale system testing &#8211; And the list is still growing. It was an absolute delight to see the demos in EUC, in which good-old functional programming scaled up into a fancy web application. It&#8217;s true that Lisp did it before, but Erlang does it well.</p>
<h2>A hacker&#8217;s delight</h2>
<p>To top on its other merits, Erlang inherited from its ancestors (Prolog and Lisp) a couple of hackers&#8217; back-doors. It exposes its scanner, parser, compiler and loader to the public use, so tricks like intervening with the parsing and loading code dynamically are available. It might not be the prettiest code in the world, but it is still more elegant than textual code generation.</p>
<p>To summarise: I don&#8217;t want to say on which programming language I am putting a &#8220;<em>strong</em> <em>sell</em>&#8221; recommendation, but one language that I am putting my programming money on, is Erlang.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cs.bgu.ac.il/~gwiener/programming/erlang-strong-buy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I&#8217;m Speaking at Erlang User&#160;Conference</title>
		<link>http://www.cs.bgu.ac.il/~gwiener/programming/im-speaking-at-euc/</link>
		<comments>http://www.cs.bgu.ac.il/~gwiener/programming/im-speaking-at-euc/#comments</comments>
		<pubDate>Mon, 12 Oct 2009 16:02:45 +0000</pubDate>
		<dc:creator>Guy Wiener</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[erlang]]></category>

		<guid isPermaLink="false">http://www.cs.bgu.ac.il/~gwiener/?p=206</guid>
		<description><![CDATA[Mayer and mine work on self-application in Erlang is going to be presented on the Erlang User Conference 2009. Here is the full teaser: Most servers and clients in Erlang are implemented as named procedures in named modules.  Similarly, processes communicate via named messages.  This exposes and fixes a great deal of information about an [...]]]></description>
			<content:encoded><![CDATA[<p>Mayer and mine work on <a href="http://www.erlang-factory.com/conference/ErlangUserConference2009/speakers/GuyWiener">self-application in Erlang</a> is going to be presented on the <a href="http://www.erlang-factory.com/conference/ErlangUserConference2009">Erlang User Conference 2009</a>. Here is the full teaser:</p>
<p>Most servers and clients in Erlang are implemented as named procedures in named modules.  Similarly, processes communicate via named messages.  This exposes and fixes a great deal of information about an Erlang application: The names of the modules, procedures, messages between servers and clients, etc.  This talk explores how to gain anonymity through the use of anonymous higher-order procedures.</p>
<p>To spawn a process on a node, one must either to use a module name and a function, or to pass an anonymous procedure.  In order to use a function from a module, the module file must be available on the remote node.</p>
<p>For a server to receive many messages, the spawned function must be recursive. Recursive functions are typically implemented in Erlang via a name in a module. Running such a server requires that the client be aware of the names of the module, function, and messages.</p>
<p>Functional programming languages (such as LISP, Scheme, and Erlang), permit recursion to be replaced with self-application, which means functions that are applied to themselves.  This is a classical technique from functional programming.  In Erlang, this technique adds flexibility, anonymity and security.  Specifically, we demonstrate how to</p>
<ul>
<li>Spawn a fully-functional server without requiring shared modules or access to  the file system.</li>
<li>Have client-server groups that take the message names as arguments.</li>
<li>Use random and constantly-changing message names.</li>
</ul>
<p>See you there!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cs.bgu.ac.il/~gwiener/programming/im-speaking-at-euc/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>A Lesson from&#160;Budapest</title>
		<link>http://www.cs.bgu.ac.il/~gwiener/uncategorized/a-lesson-from-budapest/</link>
		<comments>http://www.cs.bgu.ac.il/~gwiener/uncategorized/a-lesson-from-budapest/#comments</comments>
		<pubDate>Tue, 29 Sep 2009 07:48:55 +0000</pubDate>
		<dc:creator>Guy Wiener</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.cs.bgu.ac.il/~gwiener/?p=204</guid>
		<description><![CDATA[No-one is more dangerous than the supervisor of a failed system, who abandons the system, but keeps the loot: A position of power. I saw that quote on the 1956 anti-communist students&#8217; rebellion memorial in Budapest. (read: Buda-pesht. There is no such city as &#8220;buda-pest&#8221;. It&#8217;s a transliteration error.) Without mentioning names, I can think [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>No-one is more dangerous than the supervisor of a failed system, who abandons the system, but keeps the loot: A position of power.</p></blockquote>
<p>I saw that quote on the 1956 anti-communist students&#8217; rebellion memorial in Budapest. (read: Buda-pe<span style="text-decoration: underline;">sh</span>t. There is no such city as &#8220;buda-pe<span style="text-decoration: underline;">s</span>t&#8221;. It&#8217;s a transliteration error.)</p>
<p>Without mentioning names, I can think of several engineering and programming practices that can fall into this category: Mistakes that are too collosal to admit; Practices that give power to the supervisor but no merit to the practitioner.</p>
<p>In the spirit of Tom Gilb, any development method should by itself be subject to development. Keep that in mind next time someone declares &#8220;the ultimate programming methodology&#8221; or &#8220;the last programming language we&#8217;ll ever need&#8221;.</p>
<p>(Btw: COBOL has just celebrates its 50th birthday.)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cs.bgu.ac.il/~gwiener/uncategorized/a-lesson-from-budapest/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Prolog&#160;Hacking</title>
		<link>http://www.cs.bgu.ac.il/~gwiener/programming/prolog-hacking/</link>
		<comments>http://www.cs.bgu.ac.il/~gwiener/programming/prolog-hacking/#comments</comments>
		<pubDate>Sat, 12 Sep 2009 10:46:27 +0000</pubDate>
		<dc:creator>Guy Wiener</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[prolog]]></category>

		<guid isPermaLink="false">http://www.cs.bgu.ac.il/~gwiener/?p=202</guid>
		<description><![CDATA[&#8220;Prolog&#8221; and &#8220;Hacking&#8221; are not two terms that are usually found in close proximity. In a matter of fact, most hackers I know do not consider Prolog as a programming language. Prolog is just that thing you learn in a principles of programming languages course, that demonstrates &#8220;what are declarative languages&#8221;. Afterwards, you forget about [...]]]></description>
			<content:encoded><![CDATA[<p>&#8220;Prolog&#8221; and &#8220;Hacking&#8221; are not two terms that are usually found in close proximity. In a matter of fact, most hackers I know do not consider Prolog as a programming language. Prolog is just that thing you learn in a <em>principles of programming languages</em> course, that demonstrates &#8220;what are declarative languages&#8221;. Afterwards, you forget about it and go back to program in some imperative language, just as <a href="http://en.wikipedia.org/wiki/K&amp;R">Kernighan &amp; Ritchie</a> intended you to do.</p>
<p>You couldn&#8217;t get it more wrong.</p>
<p><span id="more-202"></span></p>
<p>Prolog is a programming language that has a specific domain. Just like SQL and relational databases, Perl and text processing, Erlang and distributed computing, Java and over-sized, badly-designed on-top-of-a-technological-stack-higher-than-the-empire-state-building so-called &#8220;enterprise applications&#8221; — Prolog is about facts and deduction rules, under the closed-world assumption. Its true that you could use it to manipulate general-purpose data structures (just like you can write one-off text processing scripts in Java) — But it&#8217;s not intended to. Prolog read facts and produces more facts using deduction rules. That&#8217;s it.</p>
<p>You might ask yourself &#8220;What&#8217;s that good for?&#8221;. Admittedly, the textbook examples are awful. We all know that the brother of your father is your uncle, and so on, there&#8217;s no real necessity to apply artificial intelligence technique to get that. Also, the &#8220;closed world&#8221; thing makes Prolog less applicable for general application development. However, there&#8217;s one domain that is made exactly of facts and rules in a closed world, and that&#8217;s were Prolog hacking is:</p>
<p><strong>Software.</strong></p>
<p>Requirements and implementations, problem domains, design models and source code, are all finite-sized sets of facts. Who-calls-who, what-implements-what and were-did-that-code-go are all queries on top of the closed world of a software project. Implementation patterns are deduction rules, and that&#8217;s just from the top of my head.</p>
<p>The most obvious evident to that trick is the fact that Prolog is the one language that does not need a fancy IDE, since that code (i.e., predicates with body) is treated in the exact same way as facts (i.e., predicates with no body). SWI-Prolog supports the following IDE-like predicates built-in:</p>
<ul>
<li>List the current predicates</li>
<li>Cross-reference between predicates (i.e., who-calls-who)</li>
<li>Online help on a predicate</li>
<li>Predicate properties (arity, source file, line number, content)</li>
<li>List a predicate</li>
<li>Open a predicate in your favourite editor</li>
<li>Find predicates with a similar name to what you typed (the DWIM predicate &#8211; &#8220;Do What I Mean&#8221;)</li>
</ul>
<p>It&#8217;s true that most IDEs know to do exactly that, but Prolog itself knows too: It just taps its-own database.</p>
<p>Using this power for software modeling is another thing, and that&#8217;s more-or-less my next line of research, so more on that to come.</p>
<p>(Btw, I know I haven&#8217;t written in a while, but neither did Shakespeare, and he did not have to grade two exams and go on  reserve duty.)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cs.bgu.ac.il/~gwiener/programming/prolog-hacking/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>My IDE is too&#160;big!</title>
		<link>http://www.cs.bgu.ac.il/~gwiener/uncategorized/my-ide-is-too-big/</link>
		<comments>http://www.cs.bgu.ac.il/~gwiener/uncategorized/my-ide-is-too-big/#comments</comments>
		<pubDate>Tue, 04 Aug 2009 09:16:55 +0000</pubDate>
		<dc:creator>Guy Wiener</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[rant]]></category>

		<guid isPermaLink="false">http://www.cs.bgu.ac.il/~gwiener/?p=200</guid>
		<description><![CDATA[I thought that my trustworthy Dell laptop with 2 GB of RAM will serve me throughout my Ph.D, but that was before I had to develop an Eclipse plug-in. A single instance of Eclipse Galileo modelling edition chews up 360 MB of RAM just for starters. Running another instance in debug mode doubles the weight, [...]]]></description>
			<content:encoded><![CDATA[<p>I thought that my trustworthy Dell laptop with 2 GB of RAM will serve me throughout my Ph.D, but that was before I had to develop an Eclipse plug-in. A single instance of <a href="http://www.eclipse.org/downloads/packages/eclipse-modeling-tools-includes-incubating-components/galileor">Eclipse Galileo modelling edition</a> chews up 360 MB of RAM just for starters. Running another instance in debug mode doubles the weight, at least. Pile upon that a couple of UML2 documents with their fancy editors, et voila! Half of the RAM is gone.</p>
<p>Why is that? Even the notoriously hoggish IntelliJ IDEA 8 doesn&#8217;t take that much RAM. I don&#8217;t know for sure how comes Eclipse became the new memory hog in town, but I have a guess: It has something to do with <a href="http://www.eclipse.org/modeling/emf/">EMF</a>.</p>
<p>EMF stands for &#8220;Eclipse Modeling Framework&#8221;. It&#8217;s the underlying layer that enables all those nice property sheets and graphical editors. Basically, it adds highly-detailed reflection to Plain-Old Java Objects (POJOs) by generating a massive amount of code. This reflection is needed for auto-generating all that fancy GUI, but it requires supporting data structures &#8211; And that shows up on the system monitor.</p>
<p>(Btw, if you&#8217;re willing to pay the price for reflection, why not use a language that have native reflection, such as Python, and get rid of those code-generated monstrosities? Just a thought.)</p>
<p>No solution this time. It is a ranting post.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cs.bgu.ac.il/~gwiener/uncategorized/my-ide-is-too-big/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

