<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 9.00.8112.16457"></HEAD>
<BODY>
<DIV><FONT size=2 face="Courier New"><SPAN class=706572521-03012013>In some
cases I want a namespace that includes more than racket/base only, preferably a
namespace that includes all of module racket. For example, a
base-namespace does not include procedure force (as clearly documented) I see
two methods to require all of racket into a base-namespace (I imagine there are
more methods)</SPAN></FONT></DIV>
<DIV><FONT size=2 face="Courier New"><SPAN
class=706572521-03012013></SPAN></FONT> </DIV>
<DIV><FONT size=2 face="Courier New"><SPAN class=706572521-03012013>Method
1:</SPAN></FONT></DIV>
<DIV><FONT size=2 face="Courier New"><SPAN
class=706572521-03012013></SPAN></FONT> </DIV>
<DIV><FONT size=2 face="Courier New">#lang racket</FONT></DIV>
<DIV><FONT size=2 face="Courier New"></FONT> </DIV>
<DIV><FONT size=2 face="Courier New">(define namespace-1<BR> (parameterize
((current-namespace (make-base-namespace)))<BR> (namespace-require
'racket)<BR> (current-namespace)))</FONT></DIV>
<DIV><FONT size=2 face="Courier New"></FONT> </DIV>
<DIV><FONT size=2 face="Courier New">(eval 'force namespace-1) ; ->
#<procedure:force></FONT></DIV>
<DIV><FONT size=2 face="Courier New"></FONT> </DIV>
<DIV><SPAN class=706572521-03012013><FONT size=2 face="Courier New">Method
2:</FONT></SPAN></DIV>
<DIV><SPAN class=706572521-03012013><FONT size=2
face="Courier New"></FONT></SPAN> </DIV>
<DIV><SPAN class=706572521-03012013><FONT size=2 face="Courier New">#lang
racket</FONT></SPAN></DIV>
<DIV><FONT size=2 face="Courier New"></FONT> </DIV>
<DIV><FONT size=2 face="Courier New">(define namespace-2<BR> (let
((namespace (make-base-namespace)))<BR> (eval '(require racket)
namespace)<BR> namespace))</FONT></DIV>
<DIV><FONT size=2 face="Courier New"></FONT> </DIV>
<DIV><FONT size=2 face="Courier New">(eval 'force namespace-2) ; ->
#<procedure:force></FONT></DIV>
<DIV><FONT size=2 face="Courier New"></FONT> </DIV>
<DIV><FONT size=2 face="Courier New"><SPAN class=706572521-03012013>I have also
seen that nowadays even </SPAN></FONT><FONT size=2 face="Courier New"><SPAN
class=706572521-03012013>the following is accepted:</SPAN></FONT></DIV>
<DIV><FONT size=2 face="Courier New"><SPAN
class=706572521-03012013></SPAN></FONT> </DIV>
<DIV><FONT size=2 face="Courier New"><SPAN class=706572521-03012013>(eval
'(define list 1) (make-base-namespace))</SPAN></FONT></DIV>
<DIV><FONT size=2 face="Courier New"><SPAN
class=706572521-03012013></SPAN></FONT> </DIV>
<DIV><FONT size=2 face="Courier New"><SPAN class=706572521-03012013>IIRC this
was not accepted in earlier versions.</SPAN></FONT></DIV>
<DIV><FONT size=2 face="Courier New"><SPAN class=706572521-03012013>The above
is in DrRacket's definitions window version 5.3.1.10--2012-12-21(8d5a069/a)
[3m]. </SPAN></FONT></DIV>
<DIV><FONT size=2 face="Courier New"><SPAN
class=706572521-03012013></SPAN></FONT> </DIV>
<DIV><FONT size=2 face="Courier New"><SPAN
class=706572521-03012013>Questions:</SPAN></FONT></DIV>
<DIV><FONT size=2 face="Courier New"><SPAN class=706572521-03012013>What is
preferable? (e.g. method 1 does not require procedure eval)</SPAN></FONT></DIV>
<DIV><FONT size=2 face="Courier New"><SPAN class=706572521-03012013>Do the
methods work under all circumstances?</SPAN></FONT></DIV>
<DIV><FONT size=2 face="Courier New"><SPAN class=706572521-03012013>Possibly
there are differences and pitfalls I have not
noticed? </SPAN></FONT></DIV>
<DIV><FONT size=2 face="Courier New"></FONT> </DIV>
<DIV><SPAN class=706572521-03012013><FONT size=2 face="Courier New">My questions
stems from the fact that even after many years, I am still playing with my own
interpreters (meta-recursive and correctly treating tail positions).
It is handy to have a namespace that provides all primitives I need/want. Taking
the whole as a namespace is fast and easy, especially when testing
meta-recursivity. Mods shaddow the namespace or I simply use
namespace-set-variable-value!</FONT></SPAN></DIV>
<DIV><SPAN class=706572521-03012013><FONT size=2
face="Courier New"></FONT></SPAN> </DIV>
<DIV><SPAN class=706572521-03012013><FONT size=2 face="Courier New">Thanks,
Jos</FONT></SPAN></DIV></BODY></HTML>