<div class="gmail_quote">Responding to the 2nd part (raco -link)<div><br></div><div>Both $PLTCOLLECTS &amp; `raco -link` persist across different racket installations (ie: they&#39;re independent of how and when you compiled &amp; installed racket itself), but it seems that collections directories added by `raco -link` take precedence over $PLTCOLLECTS.</div>

<div><br></div><div>Eg:</div><div># contents = /foo/imran/prelude.rkt</div><div>export PLTCOLLECTS=&quot;/foo:&quot;</div><div><br></div><div># contents = /foo2/prelude.rkt</div>
<div>raco -link -n imran /foo2</div><div><br></div><div>Then, (require imran/prelude) *NEVER* looks in $PLTCOLLECTS. Even if the copy in /foo2/prelude.rkt is a badly formed module, and /foo/imran/prelude.rkt is correct.</div>

<div><br></div><div>At least, thats what I discovered last night after installing from git :)</div><span class="HOEnZb"><font color="#888888"><div><br></div></font></span><div><span class="HOEnZb"><font color="#888888">-- <br>
Regards,<br>       Imran Rafique<br>
<br><br></font></span><div class="gmail_quote"><div class="im">On 19 January 2012 13:40, Eduardo Cavazos <span dir="ltr">&lt;<a href="mailto:wayo.cavazos@gmail.com" target="_blank">wayo.cavazos@gmail.com</a>&gt;</span> wrote:<br>
</div><div><div class="h5"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello,<br>
<br>
I&#39;ve been testing out my MPL libraries with Racket 5.2 on Windows 7.<br>
<br>
I generally use R6RS implementations and libraries. Thus, I tend to keep my library directories in &quot;~/scheme&quot; on Linux or &quot;c:\users\myhomedir\scheme&quot; on Windows. MPL has two dependencies (surfage and dharmalab; mentioned in the README) that should also be present in the library collection.<br>


<br>
So to &quot;install&quot; MPL for Racket on Windows, I simply modified my PLTCOLLECTS environment variable. At first I simply defined it as:<br>
<br>
    c:\users\dharmatech\scheme<br>
<br>
However, having only that directory in PLTCOLLECTS caused major problems for DrRacket.<br>
<br>
My next step was to check the result of:<br>
<br>
    (get-collects-search-dirs)<br>
<br>
and include those paths in PLTCOLLECTS as well. That seemed to do the trick. So my PLTCOLLECTS variable now looks like:<br>
<br>
C:\Users\dharmatech\AppData\<u></u>Roaming\Racket\5.2\collects;C:<u></u>\Program Files (x86)\R<br>
acket\collects;c:\users\<u></u>dharmatech\scheme<br>
<br>
I&#39;d like to provide some basic instructions in the README for getting started in a Windows environment with Racket and MPL. Should I suggest that the PLTCOLLECTS variable be modified as I&#39;ve done above?<br>
<br>
Section 6.1.3 of the Racket guide recommends using &#39;raco link&#39; to install collections. Would this somehow be better than the PLTCOLLECTS approach? The drawback to this is that it appears that the user would have to &#39;raco link&#39; all three library collections (i.e. surfage, dharmalab, mpl).<br>


<br>
Once installed, MPL appears to function properly. The test suite passes when I run:<br>
<br>
c:\Program Files (x86)\Racket&gt;plt-r6rs c:\Users\dharmatech\scheme\<u></u>mpl\test.sps<br>
<br>
I recently added an &#39;(mpl all)&#39; library which exports commonly used procedures and macros. So to get a REPL up an running, in a DrRacket definitions window add:<br>
<br>
#!r6rs<br>
<br>
(import (mpl rnrs-sans)<br>
        (mpl all))<br>
<br>
hit &quot;Run&quot; and the MPL procedures/macros should available in the interactions window.<br>
<br>
I normally write my Scheme code as R6RS libraries, not as Racket modules and I don&#39;t have much experience with the latter. It&#39;d be nice if Racket module authors could import MPL libraries into their normal racket modules. Of course, MPL exports procedures that conflict naming-wise with traditional procedures like +, -, *, /, sin, cos, etc. How should I handle this in Racket modules? As a first attempt at mixing Racket and MPL I tried:<br>


<br>
#lang racket<br>
<br>
(require (lib &quot;mpl/sum-product-power.sls&quot;))<br>
<br>
When I multiply &#39;x&#39; times &#39;x&#39; I get:<br>
<br>
&gt; (* &#39;x &#39;x)<br>
(mcons &#39;^ (mcons &#39;x (mcons 2 &#39;())))<br>
<br>
In Petite Chez Scheme I get:<br>
<br>
&gt; (* &#39;x &#39;x)<br>
(^ x 2)<br>
<br>
I guess the &#39;mcons&#39; stuff is due to the mutable/immutable pairs difference between R6RS and default racket.<br>
<br>
In R6RS, as shown above, I usually do &#39;(import (mpl rnrs-sans) (mpl all))&#39;. The library &#39;(mpl rnrs-sans)&#39; is equivalent to &#39;(rnrs)&#39; except for procedures which conflict name-wise with MPL procedures. Would you recommend setting up something similar for Racket so that the user can do:<br>


<br>
#lang racket-sans<br>
<br>
(require (lib &quot;mpl/all.sls&quot;))<br>
<br>
Thanks for any hints and tips!<br>
<br>
The MPL github project page is at:<br>
<br>
<a href="https://github.com/dharmatech/mpl" target="_blank">https://github.com/dharmatech/<u></u>mpl</a><br>
<br>
Ed<br>
____________________<br>
 Racket Users list:<br>
 <a href="http://lists.racket-lang.org/users" target="_blank">http://lists.racket-lang.org/<u></u>users</a><br>
</blockquote></div></div></div><br></div>
</div><br>