re-doing GvR in xturtle
I'm beginning work on moving GvR into xturtle. The main reason I'm doing this is that I want to get over the language limitations that GvR currently has. (No variable assignment, etc.) In other words, I want to be able to teach much more of Python to young people with such an environment. It'll take a while to get this done. I'm new to TK programming. I do web development. If Crunchy had sufficient graphics and sandboxing, I'd probably do it all in Crunchy for web delivery, etc. I'll keep an eye on their progress. If anyone's interested in the results or has commentary, please let me know. Eventually, it would be very nice to have a whole curriculum around such an environment, with teaching materials, quizzes, tests, answer keys, etc. If anyone has already done this, please let me know. I'd rather not reinvent this if I don't have to. Cordially, Scott
On 8/11/06, Scott Chapman <scott_list@mischko.com> wrote:
I'm beginning work on moving GvR into xturtle.
The main reason I'm doing this is that I want to get over the language limitations that GvR currently has. (No variable assignment, etc.)
This is, in parts, why I designed RUR-PLE (http://rur-ple.sourceforge.net/). RUR-PLE uses Python, instead of a Python-like language like GvR. It also comes with more lessons than GvR does, but could use more.
In other words, I want to be able to teach much more of Python to young people with such an environment. It'll take a while to get this done. I'm new to TK programming. RUR-PLE uses wxPython (instead of Tkinter).
I do web development. If Crunchy had sufficient graphics and sandboxing, I'd probably do it all in Crunchy for web delivery, etc. I'll keep an eye on their progress.
I started developping Crunchy for that very purpose: to have a web-based version of RUR-PLE. I still plan to do that, eventually... For the foreseeable future, Crunchy will continue to be developped to run locally, however with the ability of "fetching" tutorials located elsewhere on the web. The work lately has focused on doing this part in a secure way. The next release (soon!) should be secure that way. Until there's a way to sandbox Python (i.e. until Brett Cannon finishes his Ph.D.), it would probably be pointless to try to have Crunchy running somewhere on the web and have user "log" remotely into it to run an interactive session.
If anyone's interested in the results or has commentary, please let me know.
Eventually, it would be very nice to have a whole curriculum around such an environment, with teaching materials, quizzes, tests, answer keys, etc.
I totally agree.
If anyone has already done this, please let me know. I'd rather not reinvent this if I don't have to.
As far as I know, it has not been done (otherwise I would not be working on it the way I am). If you want to contribute in any way (producing teaching materials, helping implementing browser-based animations, etc.), feel free to do it! André
Cordially, Scott _______________________________________________ Edu-sig mailing list Edu-sig@python.org http://mail.python.org/mailman/listinfo/edu-sig
Andre Roberge wrote:
On 8/11/06, Scott Chapman <scott_list@mischko.com> wrote:
I'm beginning work on moving GvR into xturtle.
The main reason I'm doing this is that I want to get over the language limitations that GvR currently has. (No variable assignment, etc.)
This is, in parts, why I designed RUR-PLE (http://rur-ple.sourceforge.net/). RUR-PLE uses Python, instead of a Python-like language like GvR. It also comes with more lessons than GvR does, but could use more.
I've downloaded RUR-PLE and played with it a bit also. I simply assumed it had a limited language also. Thanks very much for pointing this out! I'll not bother with xturtle.
I started developping Crunchy for that very purpose: to have a web-based version of RUR-PLE. I still plan to do that, eventually... For the foreseeable future, Crunchy will continue to be developped to run locally, however with the ability of "fetching" tutorials located elsewhere on the web. The work lately has focused on doing this part in a secure way. The next release (soon!) should be secure that way.
Until there's a way to sandbox Python (i.e. until Brett Cannon finishes his Ph.D.), it would probably be pointless to try to have Crunchy running somewhere on the web and have user "log" remotely into it to run an interactive session.
No doubt. However I might be willing to deploy it on a student's own box (windows or linux) for them to use in the web environment. Creating tutorials/tests in the web environment would be quite easy. The results of tests could be sent to an on-line web server so the students could send me test results, questions, etc. An ajax library implementing parts of this on my server might be the very useful. It would be very cool to put an entire Crunchy Frog environment on a USB thumb drive with binaries that would work on Linux or Windows, probably including such things as Apache, Python, SQLite, and other useful tools. If you could put it into a chroot jail, you could gain a modicum of security. I haven't thought through what all would still be in "harms way" in that case. I wonder if you could make a thumbdrive be a chroot jail? Probably not on Windows, but maybe on Linux.
As far as I know, it has not been done (otherwise I would not be working on it the way I am). If you want to contribute in any way (producing teaching materials, helping implementing browser-based animations, etc.), feel free to do it!
I'll let you know as I get further into it. I'm home schooling my 3 children and hope to use this as the core of their curriculum. Scott
Andre Roberge wrote:
I started developping Crunchy for that very purpose: to have a web-based version of RUR-PLE. I still plan to do that, eventually... For the foreseeable future, Crunchy will continue to be developped to run locally, however with the ability of "fetching" tutorials located elsewhere on the web. The work lately has focused on doing this part in a secure way. The next release (soon!) should be secure that way.
Andre, I'm thinking of what all is needed to get Crunchy to do RUR-PLE. One thing is the ability to click on the canvas (to build the walls in the "worlds"). Is there any capability to do this yet? What else needs to be done to Crunchy to begin doing RUR-PLE in it? Scott
On 8/11/06, Scott Chapman <scott_list@mischko.com> wrote:
Andre Roberge wrote:
I started developping Crunchy for that very purpose: to have a web-based version of RUR-PLE. I still plan to do that, eventually... For the foreseeable future, Crunchy will continue to be developped to run locally, however with the ability of "fetching" tutorials located elsewhere on the web. The work lately has focused on doing this part in a secure way. The next release (soon!) should be secure that way.
Andre, I'm thinking of what all is needed to get Crunchy to do RUR-PLE. One thing is the ability to click on the canvas (to build the walls in the "worlds"). Is there any capability to do this yet?
There isn't. This would involve some javascript coding of the kind I've never done (finding where on a page a click has occurred, etc.). It might be straightforward to do. However, another approach I have been thinking about is to have the world-builder being a Tkinter or wxPython based app that is launched from Crunchy; this would mean only Python programming (no javascript) and totally doable *today* within Crunchy. (not in the last public released version, but in the svn.)
What else needs to be done to Crunchy to begin doing RUR-PLE in it?
Actually, before the world-builder, some means to have the robot moves within a canvas. The first thing to do would be to load an image and have it move on the canvas! My original plan was to use, as a first prototype, the existing Python from rur-ple create a "list" of moves coming from running a user program. This could be passed to a little javascript program with each move executed by a setTimeout call with a suitable delay. At this point, any "toy" program that simulates robot motion within an html canvas would be useful to have to play with and explore ideas. To go back to Crunchy, I'd like to replace the html textarea by an editor with syntax colouring, like editarea (http://cdolivet.net/index.php?page=editArea ). I've already contacted the author and there's a possibility that the current limitation (one instance per page) might be removed soon, making it suitable to be adapted for Crunchy. There's a few more things I want to implement before I'm ready to move on to rur-ple within Crunchy. My (ambitious?) goal is to get there by mid-Fall. Any help of any kind (even creating little toy programs/samples) would be appreciated! André
Scott
Andre Roberge wrote:
On 8/11/06, Scott Chapman <scott_list@mischko.com> wrote:
Andre Roberge wrote:
I started developping Crunchy for that very purpose: to have a web-based version of RUR-PLE. I still plan to do that, eventually... For the foreseeable future, Crunchy will continue to be developped to run locally, however with the ability of "fetching" tutorials located elsewhere on the web. The work lately has focused on doing this part in a secure way. The next release (soon!) should be secure that way.
Andre, I'm thinking of what all is needed to get Crunchy to do RUR-PLE. One thing is the ability to click on the canvas (to build the walls in the "worlds"). Is there any capability to do this yet?
There isn't. This would involve some javascript coding of the kind I've never done (finding where on a page a click has occurred, etc.). It might be straightforward to do. However, another approach I have been thinking about is to have the world-builder being a Tkinter or wxPython based app that is launched from Crunchy; this would mean only Python programming (no javascript) and totally doable *today* within Crunchy. (not in the last public released version, but in the svn.)
Andre, I'd suggest making world building work in the browser without an external application. This should be easily done with information from these examples: I found a simple example of painting on a canvas at: http://blog.monstuff.com/archives/images/JS-graffiti.html and one with a cute little train animation at: http://www.xml.com/lpt/a/1639 A fairly simple puzzle example: http://nic-nac-project.de/~jcm/index.php?nav=puzzle There is a set of slides from OSCON2006 that have quite a bit of information, including a more serious painting program: http://conferences.oreillynet.com/presentations/os2006/doughtie_gavin.zip Inside the zip file is oscon_2006\oscon_examples\demos\canvaspainter.html. http://developer.mozilla.org/en/docs/Canvas_tutorial has lots of great information. Lots of goodies here: http://andrewwooldridge.com/canvas/
What else needs to be done to Crunchy to begin doing RUR-PLE in it?
Actually, before the world-builder, some means to have the robot moves within a canvas.
The first thing to do would be to load an image and have it move on the canvas!
The examples above include this functionality.
My original plan was to use, as a first prototype, the existing Python from rur-ple create a "list" of moves coming from running a user program. This could be passed to a little javascript program with each move executed by a setTimeout call with a suitable delay.
At this point, any "toy" program that simulates robot motion within an html canvas would be useful to have to play with and explore ideas.
To go back to Crunchy, I'd like to replace the html textarea by an editor with syntax colouring, like editarea (http://cdolivet.net/index.php?page=editArea ). I've already contacted the author and there's a possibility that the current limitation (one instance per page) might be removed soon, making it suitable to be adapted for Crunchy. There's a few more things I want to implement before I'm ready to move on to rur-ple within Crunchy. My (ambitious?) goal is to get there by mid-Fall.
Any help of any kind (even creating little toy programs/samples) would be appreciated!
I'll see what I can do! Scott
On 8/12/06, Scott Chapman <scott_list@mischko.com> wrote: [snip - discussion about what is needed to get rur-ple working within a browser; first, getting a "world builder"]
I'd suggest making world building work in the browser without an external application. This should be easily done with information from these examples:
[many good reference sites containing examples deleted...]
[André wrote:] Any help of any kind (even creating little toy programs/samples) would be appreciated!
I'll see what I can do!
Scott
Now that Scott has volunteered publicly ;-), I thought I'd issue a challenge to other edu-sig subscribers: Who is interested in writing a short mini-tutorial (it can be a single html page, a few screen long) on a topic of interest to you, that would involve the reader into trying out the code (even if it's simply executing it by clicking button, but ideally should suggest trying out changes, etc.) and which could be included in Crunchy's distribution? For example, would Gregor be interested in writing a short intro to x-turtle? Or do you have a short doctest-based tutorial you've been thinking about? Or perhaps, you've been thinking of possible exercices to use with "How to think like a computer scientist". As for "rur-ple", one "conceptual hurdle" I was facing was how to reproduce the ability to start/pause/resume the program which was relatively easy to do with Python but which seems much more complicated with javascript (given that javascript animations use either setTimeout or setInterval to get them started ... with no obvious hook into a way to pause and resume the animation). However, inspired by Scott's search, I searched some more on my own and found the following: http://www.adrian.zentner.name/content/projects/javascript/easyAnimation/ind... Anyone interested in working on javascript-based animation to be included within Crunchy (and accessible by the end user by programming in pure Python) is welcome to join in! André
I'm definitely interested André. Crunchy Frog could become an important tool for my Saturday Academy classes and/or Winterhaven classes (two venues where I've taught Python to pre-college youth), other classes for adults. I explored with an earlier version. I'll see what I can do to get up to speed with your latest. Will there be a way to share interactive sessions independently of the Crunchy Frog platform? I presume so. Adapting existing templates is the easiest way to learn a new form. Kirby
Who is interested in writing a short mini-tutorial (it can be a single html page, a few screen long) on a topic of interest to you, that would involve the reader into trying out the code (even if it's simply executing it by clicking button, but ideally should suggest trying out changes, etc.) and which could be included in Crunchy's distribution?
On 8/13/06, kirby urner <kirby.urner@gmail.com> wrote:
I'm definitely interested André. Crunchy Frog could become an important tool for my Saturday Academy classes and/or Winterhaven classes (two venues where I've taught Python to pre-college youth), other classes for adults.
I explored with an earlier version. I'll see what I can do to get up to speed with your latest. Will there be a way to share interactive sessions independently of the Crunchy Frog platform?
I'm not totally sure I understand the question. Perhaps it is my non-native English understanding, but I read the question like: "Is it possible to share Python scripts independently of the Python platform?... i.e. can I run the scripts that someone gave me if I don't have Python installed on my computer?..." Interactive "sessions/tutorials" are simply html pages (with minor markup added). Crunchy can be thought of as a specialised web server (with a built-in Python interpreter, etc.) What Crunchy does is "fetch" the html page, process it (to add the interactive elements) and "serve" it to your browser. "Requests" from the browser are interpreted by Crunchy (the web server) and fed back into the page. So, users can exchange interactive tutorials (web pages) to their heart's delight, but they need to have Crunchy running to make use of them - otherwise, they will be displayed only as static web pages.
Adapting existing templates is the easiest way to learn a new form.
The soon-to-be-released-next-version will have quite a few sample tutorials as well as documentation that includes all kinds of examples that can be cut-and-pasted. We're mostly adding the final touches to a "security module" before we proceed with the next release (hopefully this week). André
Kirby
The soon-to-be-released-next-version will have quite a few sample tutorials as well as documentation that includes all kinds of examples that can be cut-and-pasted. We're mostly adding the final touches to a "security module" before we proceed with the next release (hopefully this week).
André
Thanks André, you answered my question about what teachers would pass around, assuming Crunchy Frog installed / working. Tried in Python 2.5 but even after changing to xlm.etree, could find HTMLTreeBuilder, so ended up with separate ElementTree installation. It'd be nice if a VLAM evaluation would then give an ensuing Python interpreter access to the namespace created thereby, something like i.e. if I define a class and user Evaluates, then user might create objects of that class in the following line-by-line dialog. Or is that capability already somehow present and I've missed seeing it? Kirby
On 8/13/06, kirby urner <kirby.urner@gmail.com> wrote:
The soon-to-be-released-next-version will have quite a few sample tutorials as well as documentation that includes all kinds of examples that can be cut-and-pasted. We're mostly adding the final touches to a "security module" before we proceed with the next release (hopefully this week).
André
Thanks André, you answered my question about what teachers would pass around, assuming Crunchy Frog installed / working.
Tried in Python 2.5 but even after changing to xlm.etree, could find HTMLTreeBuilder, so ended up with separate ElementTree installation.
I was hoping that this was not going to be necessary with Python 2.5 (I'm still using 2.4 myself)... It's too bad that ElementTree will still be required as a separate download.
It'd be nice if a VLAM evaluation would then give an ensuing Python interpreter access to the namespace created thereby, something like i.e. if I define a class and user Evaluates, then user might create objects of that class in the following line-by-line dialog.
Or is that capability already somehow present and I've missed seeing it?
No, you did not miss it. "Evaluate" is used, among others, with an "editor" (html textarea). Upon clicking on the Evaluate button, the code is executed within its own local dict, to avoid possible interference with Crunchy's own code. The Python interpreter is also working with its own namespace. I think it might be potentially really confusing (for students, not so for teachers like you) if all the code used within a single session was somehow all put in the same namespace. However.... One thing we are working on is the ability to save a file (from an "editor"). Then, it will be possible to import that file from the interpreter and proceed from there. So, one could start with a sample lesson containing some pre-defined class that could be executed ... and/or saved into a file. It could then either be further edited (within the "editor") or imported at an embedded prompt and "played" with from there - a bit like you could do with Idle I guess. One possibility not available with Idle is if you plan a lesson that way, you can "cut and paste" your interractive practice session right into a web page (you might need to put in the fake interpreter prompt), and use it both as a guide when doing a demo, and as a reference for the students. The "soon to be released version" will, if desired, take a "fake interpreter session", extract the input from the user and put the Python code (minus the interpreter prompt and the output, but keeping the indentation intact) into an "editor" so that it can be run all at once, without having to retype everything - and the output of the live session can be compared with the one "recorded" on the html page. For example, putting the following inside an html page (with the appropriate vlam code) ==============
def p3(): ... print 3 ... p3() 3 ======== will insert the following inside an "editor" box: ==== def p3(): print 3
p3() ==== Ready to be further edited or evaluated as is. Or, if you prefer, you can simply have an interpreter prompt inserted right underneath the "fake interpreter session", which you can then reproduce. Thanks for trying it! André
Kirby
No, you did not miss it. "Evaluate" is used, among others, with an "editor" (html textarea). Upon clicking on the Evaluate button, the code is executed within its own local dict, to avoid possible interference with Crunchy's own code.
That is of course the safest thing, and the least confusing in some applications. My model coming in, to the genre of interactive tutorials, was the way J allows users to build "labs" that walk you through a module. A little text, a little play, a little text, a little play, just like Crunchy. But stuff we've taken the trouble to define at the top, remains relevant through the session. So if there's a function def, you want that in local memory, until with lab is completed. I think you've given the idea of an easy work around in Crunchy. Put all the accumulative code in a module and just import it in every VLAM to populate a namespace. Like we import string for example (which I don't want to go away, but maybe that's just me). The specific application I have in mind (lesson plan, Crunchy Frog XHTML), involves defining Integers Modulo N, not by subclassing int or anything, but simply by redefining __add__ __mul__ and their inverses, modulo some class variable. I've written the module many times. Once a student VLAMs the class def, I want new objects to be instantiable throughout. The solution is easy: import modulo in each VLAM textarea. Kirby
participants (3)
-
Andre Roberge -
kirby urner -
Scott Chapman