<p dir="ltr">This blog post by Matthew Flatt provides some more intuition for racket's eval: </p>
<p dir="ltr"><a href="http://blog.racket-lang.org/2011/10/on-eval-in-dynamic-languages-generally.html">http://blog.racket-lang.org/2011/10/on-eval-in-dynamic-languages-generally.html</a></p>
<div class="gmail_quote">On Apr 26, 2014 12:57 PM, "AbdUr-RehMan" <<a href="mailto:arabdurrehman@gmail.com">arabdurrehman@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">thanks guys the anchor one works for this case, I almost tried everything else here <div><span style="font-family:arial,sans-serif;font-size:13px"> </span><a href="http://docs.racket-lang.org/guide/eval.html?q=namespace#%28tech._namespace%29" style="font-family:arial,sans-serif;font-size:13px" target="_blank">http://docs.racket-lang.org/guide/eval.html?q=namespace#%28tech._namespace%29</a><br>
</div><div><br></div><div>Only overlooked namespace-anchor and thats exactly what I want here, Thanks for indicating</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Apr 26, 2014 at 11:56 AM, Eric Hanchrow <span dir="ltr"><<a href="mailto:eric.hanchrow@gmail.com" target="_blank">eric.hanchrow@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I suspect this falls under the rather large umbrella of "the top level<br>
is hopeless". See e.g. the first Google hit for that phrase:<br>
<a href="https://gist.github.com/samth/3083053" target="_blank">https://gist.github.com/samth/3083053</a><br>
<div><div><br>
On Sat, Apr 26, 2014 at 8:50 AM, Philipp Dikmann <<a href="mailto:philipp@dikmann.de" target="_blank">philipp@dikmann.de</a>> wrote:<br>
> When I had a similar problem regarding eval and the REPL, the fine folks of<br>
> this mailing list pointed out that the namespace-argument of eval makes all<br>
> the difference, as explained here<br>
> <a href="http://docs.racket-lang.org/guide/eval.html?q=namespace#%28tech._namespace%29" target="_blank">http://docs.racket-lang.org/guide/eval.html?q=namespace#%28tech._namespace%29</a><br>
><br>
> Have you tried supplying a namespace to eval, possibly obtained using<br>
> define-namespace-anchor after your imports?<br>
><br>
><br>
><br>
> On 26.04.14 14:57, AbdUr-RehMan wrote:<br>
><br>
><br>
> eval working fine in REPL but gives "ask: unbound identifier;<br>
> also, no #%app syntax transformer is bound in: ask" error when used in<br>
> source file like<br>
><br>
> (require racket/include)<br>
> (include "world.rkt")<br>
><br>
> (eval '(ask abdur 'go 'north))<br>
><br>
> I have seen various questions regarding the same eval issue on racket<br>
> mailing list and in the documentation<br>
> but I didn't came across a case where they touch on case like this<br>
> where I am including another file and the function is defined in that class.<br>
><br>
> Any help would be greatly appreciated,<br>
> Thanks<br>
><br>
><br>
> ____________________<br>
> Racket Users list:<br>
> <a href="http://lists.racket-lang.org/users" target="_blank">http://lists.racket-lang.org/users</a><br>
><br>
><br>
><br>
> ____________________<br>
> Racket Users list:<br>
> <a href="http://lists.racket-lang.org/users" target="_blank">http://lists.racket-lang.org/users</a><br>
><br>
____________________<br>
Racket Users list:<br>
<a href="http://lists.racket-lang.org/users" target="_blank">http://lists.racket-lang.org/users</a><br>
</div></div></blockquote></div><br></div>
<br>____________________<br>
Racket Users list:<br>
<a href="http://lists.racket-lang.org/users" target="_blank">http://lists.racket-lang.org/users</a><br>
<br></blockquote></div>