<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
  <channel>
    <title>Recent Posts in 'code:get_path / code:add_path' | Pragmatic Forums</title>
    <link>http://forums.pragprog.com/forums/27/topics/284</link>
    <language>en-us</language>
    <ttl>60</ttl>
    <description></description>
    <item>
      <title>code:get_path / code:add_path posted by Alain O'Dea @ Sat, 22 Mar 2008 22:52:58 -0000</title>
      <description>&lt;p&gt;The path list can be modified because it is maintained by a separate process. The state around the receive statement in that process can be changed by recursion.&lt;/p&gt;


	&lt;p&gt;code:call/1 invokes code_server:call/1 which sends a message to the code server process. Upon receiving a path addition message the code_server process calls the function that receives code_server commands again recursively with a modified version of the list. Single assignment is preserved in this manner.&lt;/p&gt;</description>
      <pubDate>Sat, 22 Mar 2008 22:52:58 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:27:284:2476</guid>
      <author>Alain O'Dea</author>
      <link>http://forums.pragprog.com/forums/27/topics/284</link>
    </item>
    <item>
      <title>code:get_path / code:add_path posted by Mike Lutz @ Mon, 03 Mar 2008 01:56:54 -0000</title>
      <description>&lt;p&gt;code:getpath() returns a list of the current directories searched for modules. This list can be &lt;strong&gt;modified&lt;/strong&gt; by code:add_patha() and code:add_pathz() and a bunch of their cousins. This looks like a violation of the one assignment rule &amp;#8211; otherwise, how can code:get_path() return different values at different times?&lt;/p&gt;


	&lt;p&gt;The source code shows add_patha as:&lt;/p&gt;


	&lt;p&gt;add_patha(Dir) when is_list(Dir) -&amp;gt; call({add_path,first,Dir}).&lt;/p&gt;


	&lt;p&gt;and I can&amp;#8217;t find any documentation on &amp;#8220;call&amp;#8221;, so my suspicion is that it&amp;#8217;s some internal mumbo-jumbo in the interpreter, but I&amp;#8217;d love to have this explained. A form of continuation??&lt;/p&gt;


	&lt;p&gt;&lt;span class="caps"&gt;MJL&lt;/span&gt;&lt;/p&gt;</description>
      <pubDate>Mon, 03 Mar 2008 01:56:54 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:27:284:2361</guid>
      <author>Mike Lutz</author>
      <link>http://forums.pragprog.com/forums/27/topics/284</link>
    </item>
  </channel>
</rss>
