<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 26, 2015 at 5:41 PM, Steven D'Aprano <span dir="ltr"><<a href="mailto:steve@pearwood.info" target="_blank">steve@pearwood.info</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span class="">On Tue, May 26, 2015 at 01:19:59PM -0500, Wes Turner wrote:<br>
<br>
> Ways to teach Python from first principles:<br>
<br>
</span>Most of these methods fail to teach *Python*. They teach something<br>
similar, but different to, Python: almost-Python.<br>
<br>
If Rustom wishes to fork Python to create his own version of almost-<br>
Python, he doesn't need to discuss it here. I'd rather he didn't discuss<br>
it here -- this is PYTHON-ideas, not Cobra-ideas, or Lua-ideas, or<br>
Rustom's-purely-functional-almost-python-ideas.<br></blockquote><div><br></div><div>I agree.</div><div><br></div><div>* Language syntax propositions -> <a href="mailto:python-ideas@python.org">python-ideas@python.org</a></div><div> * Or, if not feasible for the general community,</div><div> RPython and Sandboxing research do identify</div><div> methods for (more than) syntactical restriction</div><div>* Teaching -> <a href="mailto:edu-sig@python.org">edu-sig@python.org</a></div><div> * IPython Notebook, JupyterHub</div><div> * A custom interpreter with RPython and a custom Jupyter kernel</div><div> may be of use.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
There is, or at least was, a strong tradition of creating specialist<br>
teaching languages, starting with Pascal which developed as a more<br>
restricted and more pure form of Algol. But this is not the place to<br>
discuss it.<br></blockquote><div><br></div><div><a href="https://en.wikipedia.org/wiki/History_of_Python">https://en.wikipedia.org/wiki/History_of_Python</a><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<span class=""><br>
<br>
> * Restrict the syntactical token list ("switch features on and off")<br>
> * Fork Python<br>
> * RPython -- <a href="https://rpython.readthedocs.org/en/latest/" target="_blank">https://rpython.readthedocs.org/en/latest/</a><br>
<br>
</span>I'm pretty sure that RPython is not designed as a teaching language. The<br>
PyPy guys are fairly insistent that RPython is not a general purpose<br>
language, but exists for one reason and one reason only: building<br>
compilers.<br></blockquote><div><br></div><div>Rather than forking, writing an interpeter may be more maintainable</div><div>(and relatively consistent with a widely-deployed language with versioned semantics):</div><div><br></div><div><a href="https://rpython.readthedocs.org/en/latest/#writing-your-own-interpreter-in-rpython">https://rpython.readthedocs.org/en/latest/#writing-your-own-interpreter-in-rpython</a><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<span class=""><br>
<br>
> * <a href="https://pypi.python.org/pypi/RestrictedPython" target="_blank">https://pypi.python.org/pypi/RestrictedPython</a><br>
> * <a href="http://pyvideo.org/video/2585/building-and-breaking-a-python-sandbox" target="_blank">http://pyvideo.org/video/2585/building-and-breaking-a-python-sandbox</a><br>
> * OR: execute code in container (e.g. LXC, LXD, Docker (JupyterHub);<br>
> virtualization)<br>
<br>
</span>Sandboxing Python and restricting the functionality of almost-Python are<br>
unrelated issues. Purely functional almost-Python would want to replace<br>
things like dict.update which modifies the dict in place with a built-in<br>
function which returns a new, updated, dict. Running regular Python in a<br>
container doesn't make it almost-Python, it is still regular Python.<br></blockquote><div><br></div><div>If hosting (or trying to maintain n shells), sandboxing and containers are directly relevant.</div><div><br></div><div>* IPython notebooks can be converted to edX courses (link above)</div><div>* There are reproducible Dockerfiles for development and education</div><div>* A custom interpreter with RPython and a custom Jupyter kernel may be of use.</div><div><br></div><div>Thanks!</div></div></div></div>