From tjd at sfu.ca Wed Mar 1 01:44:38 2006 From: tjd at sfu.ca (Toby Donaldson) Date: Tue, 28 Feb 2006 16:44:38 -0800 Subject: [Edu-sig] Edu-sig Digest, Vol 31, Issue 16 In-Reply-To: References: Message-ID: > So I think the following would be handy: > > 1. equally usable with either "import * from turtle" or "import turtle" > imports > 2. should open with a window covering at least half the screen (the > current default is too small to be useful) > 3. should offer some simple configuration choices for things like > initial size and shape, but mostly rely on reasonable defaults > 4. should offer a class wrapper so that that one could easily > instantiate different turtles for a first experience with objects. > 5. some minor tweaks to make it better behaved when run from IDLE > > Does anyone have any feedback on these ideas or any other suggestions > about how turtle.py might be improved without being fundamentally changed? > > Note: this is about turtle.py only, for all its deficiencies. Any > suggestions to try another library, system, or language will be > cheerfully, but resolutely, ignored. ;) > > Cheers, > Vern Ceder Vern, I would be interested in testing any improved turtle.py package you come up with. I used the Python turtle.py package last semester with about 500 first-year university students, and two problems stood out above all others: 1. The broken interaction between Idle and the turtle package. 2. Poor documentation. To actually understand certain function calls, it was necessary to read the turtle.py source code. I agree that your other points would be improvements, but, for my purposes at least, they are lower priority. I have another suggestion: rewrite turtle.py so it has a simpler, more modular internal design. I use it for learning about functional decomposition and bottom-up programming; the graphics are secondary. So I would like a less powerful turtle, but one that students can easily build upon. Perhaps a BabyTurtle class with the absolute bare primitive methods could be added, e.g. something like class BabyTurtle(object): def forward(self, steps): # ... def left(self, degrees): # ... def penUp(self): # ... def penDown(self): # ... Toby -- Dr. Toby Donaldson School of Computing Science Simon Fraser University (Surrey) From kirby.urner at gmail.com Wed Mar 1 02:09:46 2006 From: kirby.urner at gmail.com (kirby urner) Date: Tue, 28 Feb 2006 17:09:46 -0800 Subject: [Edu-sig] Edu-sig Digest, Vol 31, Issue 16 In-Reply-To: References: Message-ID: On 2/28/06, Toby Donaldson wrote: > > > 1. The broken interaction between Idle and the turtle package. > > 2. Poor documentation. To actually understand certain function > calls, it was necessary to read the turtle.py source code. My tentative conclusion, reading the above, and from some personal experience, is the Tkinter turtle.py, while a fun demo, is mostly a toy and should not be used for serious teaching, at least on Windows. Too much adverse experience. Too much frustration. In general, Tk on Windows has a lot of problems -- I generally forsake IDLE and go to a command window, for good reason. IPython is an alternative (a good one -- once you get it working in Windows, which is very doable). I really don't think *any* kind of turtle graphics is essential to learning programming, although as I said, I think the approach is very viable and destined to last. I'm not "anti turtle". My own special interest is in going back to the very early days of Logo, when a physical robot was used. I'd rather have hardware robots than screen based ones, with Python bindings. SONY should seed me a prototype :-D Kirby -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/edu-sig/attachments/20060228/6ccb97a0/attachment.html From tjd at sfu.ca Wed Mar 1 02:55:23 2006 From: tjd at sfu.ca (Toby Donaldson) Date: Tue, 28 Feb 2006 17:55:23 -0800 Subject: [Edu-sig] Edu-sig Digest, Vol 31, Issue 16 In-Reply-To: References: Message-ID: As I pointed out in my message, the reason we use turtle graphics is to introduce the idea of functional decomposition and bottom-up development. I have little interest in graphics, personally. It worked very well for our students, and the fact that turtle graphics is a toy is important: there's less anxiety playing with toys. I see many, many students who have zero experience with programming in high school, and exhibit more anxiety in the first-programming course than in a math course (which at they least have a decade of experience with, even if they dislike the topic). Toby On 2/28/06, kirby urner wrote: > On 2/28/06, Toby Donaldson wrote: > > > > 1. The broken interaction between Idle and the turtle package. > > > > 2. Poor documentation. To actually understand certain function > > calls, it was necessary to read the turtle.py source code. > > My tentative conclusion, reading the above, and from some personal > experience, is the Tkinter turtle.py, while a fun demo, is mostly a toy and > should not be used for serious teaching, at least on Windows. Too much > adverse experience. Too much frustration. In general, Tk on Windows has a > lot of problems -- I generally forsake IDLE and go to a command window, for > good reason. IPython is an alternative (a good one -- once you get it > working in Windows, which is very doable). > > I really don't think *any* kind of turtle graphics is essential to learning > programming, although as I said, I think the approach is very viable and > destined to last. I'm not "anti turtle". > > My own special interest is in going back to the very early days of Logo, > when a physical robot was used. I'd rather have hardware robots than screen > based ones, with Python bindings. SONY should seed me a prototype :-D > > Kirby > > -- Dr. Toby Donaldson School of Computing Science Simon Fraser University (Surrey) From radenski at chapman.edu Wed Mar 1 02:57:40 2006 From: radenski at chapman.edu (Radenski, Atanas) Date: Tue, 28 Feb 2006 17:57:40 -0800 Subject: [Edu-sig] Any suggestions about turlte.py Message-ID: Vern, My apologies for being unclear. In Windows, turtle commands in interactive mode have been most problematic, meaning that Tk becomes irresponsive. In Windows XP, this can be simulated very easily. 0. Launch IDLE and run a Python shell. 1. Launch IE Explorer and make sure it covers the Python shell. 2. Bring the shell to the front and enter: >>> import turtle; pen = turtle.Pen(); After this, Tk becomes unresponsive. In addition, I believe my students have had problems of the second type you refer to: when a window with an already completed drawing/program becomes unresponsive. Unfortunately, I could not recreate such a situation today. I do not think I have had problems with a turtle program that is *running*. I have found Turtle graphics very useful, despite of all difficulties in Windows. Even a partial improvement would be beneficial. To me it seems very important to keep the new turtle module as compatible as possible with the current one. The reason is the turtle module has already been used in various publications or internal teaching materials. It would be nice if the updated turtle can be used with existing resources. Again, thank you for doing this. Atanas Atanas Radenski mailto:radenski at chapman.edu http://www.chapman.edu/~radenski/ I find television very educating. Every time somebody turns on the set, I go into the other room and read a book - Groucho Marx > -----Original Message----- > From: Vern Ceder [mailto:vceder at canterburyschool.org] > Sent: Tuesday, February 28, 2006 5:49 AM > To: Radenski, Atanas; Edu-sig at python.org > Subject: Re: [Edu-sig] Any suggestions about turlte.py > > Atanas, > > Thanks for the input - I wasn't aware of the first problem you mention. > I'm not sure about the secnond issue - do you mean that a turtle program > that is *running* will hang if covered by other graphics? Or that a > window with an already completed drawing/program will become > unrresponsive? I've seen the second behavior, but not the first. > > Thanks, > Vern > > Radenski, Atanas wrote: > > Hi, > > > > Thank you for taking care of the turtle.py module. Here are tow > > suggestions. > > > > [1] I would suggest a correction of a bug in the fill function of > > turtle.py. The statement: > > > > # self._canvas.lower(item) > > > > should be removed. As it is now, it lowers polygons when filled. This > > causes inconsistent behavior because nothing else is lowered. Here is a > > suggested the statement in context: > > > > > > def fill(self, flag): > > if self._filling: > > path = tuple(self._path) > > smooth = self._filling < 0 > > if len(path) > 2: > > item = self._canvas._create('polygon', path, > > {'fill': self._color, > > 'smooth': smooth}) > > self._items.append(item) > > > > # Should be removed, because > > # nothing else is lowered but filled polygons: > > > > # self._canvas.lower(item) > > > > if self._tofill: > > for item in self._tofill: > > self._canvas.itemconfigure(item, > > fill=self._color) > > self._items.append(item) > > self._path = [] > > self._tofill = [] > > self._filling = flag > > if flag: > > self._path.append(self._position) > > self.forward(0) > > > > [2] A nuisance with this otherwise quite useful module is its behavior > > in Windows systems: It tends to *stop responding*. This happens when the > > canvas is covered by other graphics for a while, especially in cases > > when execution is triggered form the interactive prompt. It would be > > great if this problem can be fixed (although I am not sure what can be > > done about it.) > > > > Atanas > > > > Atanas Radenski > > mailto:radenski at chapman.edu http://www.chapman.edu/~radenski/ > > > > I find television very educating. Every time somebody turns on the set, > > I go into the other room and read a book - Groucho Marx > > > > > > > >>-----Original Message----- > >>From: edu-sig-bounces at python.org [mailto:edu-sig-bounces at python.org] > > > > On > > > >>Behalf Of Vern Ceder > >>Sent: Monday, February 27, 2006 11:32 AM > >>To: Edu-sig at python.org > >>Subject: [Edu-sig] Any suggestions about turlte.py > >> > >>Hello everyone, > >> > >>As a consequence of my complaining about it in my PyCon talk, I have > >>been invited to submit some patches for turtle.py. To my mind, > > > > turtle.py > > > >>should be something that one could actually use for some very simple > >>"programming with graphics" lessons, with NO tweaking or additional > >>software. > >> > >>So I think the following would be handy: > >> > >>1. equally usable with either "import * from turtle" or "import > > > > turtle" > > > >>imports > >>2. should open with a window covering at least half the screen (the > >>current default is too small to be useful) > >>3. should offer some simple configuration choices for things like > >>initial size and shape, but mostly rely on reasonable defaults > >>4. should offer a class wrapper so that that one could easily > >>instantiate different turtles for a first experience with objects. > >>5. some minor tweaks to make it better behaved when run from IDLE > >> > >>Does anyone have any feedback on these ideas or any other suggestions > >>about how turtle.py might be improved without being fundamentally > > > > changed? > > > >>Note: this is about turtle.py only, for all its deficiencies. Any > >>suggestions to try another library, system, or language will be > >>cheerfully, but resolutely, ignored. ;) > >> > >>Cheers, > >>Vern Ceder > >> > >> > >>-- > >>This time for sure! > >> -Bullwinkle J. Moose > >>----------------------------- > >>Vern Ceder, Director of Technology > >>Canterbury School, 3210 Smith Road, Ft Wayne, IN 46804 > >>vceder at canterburyschool.org; 260-436-0746; FAX: 260-436-5137 > >>_______________________________________________ > >>Edu-sig mailing list > >>Edu-sig at python.org > >>http://mail.python.org/mailman/listinfo/edu-sig > > -- > This time for sure! > -Bullwinkle J. Moose > ----------------------------- > Vern Ceder, Director of Technology > Canterbury School, 3210 Smith Road, Ft Wayne, IN 46804 > vceder at canterburyschool.org; 260-436-0746; FAX: 260-436-5137 From radenski at chapman.edu Wed Mar 1 03:20:42 2006 From: radenski at chapman.edu (Radenski, Atanas) Date: Tue, 28 Feb 2006 18:20:42 -0800 Subject: [Edu-sig] Edu-sig Digest, Vol 31, Issue 16 Message-ID: My experience with turtle graphics in a CS1 course has been very rewarding. It allows *everyone*, not just the most motivated, to be creative. With turtle, drawing an original and intersting design is so easy. In a couple of dozens of lines, my CS1 students create some amazing designs - every semester brings more and more gems. Students use turtle to draw fractals and then concentric figures that change colors and are constantly redrawn. Of course, turtle is not fast and it is not fancy as programming, and it behaves badly in Windows, but the important thing is that it really inspires almost all beginners to learn and do more. My students post their turtle graphics designs in course Forums and they are so proud - for good reason. Consider for example this simple program: # Pattern Designer import turtle; # Create a blue pen and determine the window's width and height: def init(): pen = turtle.Pen(); pen.color(0, 0, 1); # blue width = pen.window_width(); height = pen.window_height(); return pen, width, height; # Given a number, design a pattern for that number: def pattern(number): pen, w, h = init(); # Switch off tracing for higher speed: pen.tracer(False); for x in range(-w/2, +w/2): for y in range (-h/2, +h/2): draw(pen, number, x, y); # Temporarily switch on tracing to observe drawing: if (x % 100 == 0): pen.tracer(True); pen.tracer(False); pen.tracer(True); # Draw a pattern element at point (x, y): def draw(pen, number, x, y): a = y * (number / 100.0); b = x * (number / 100.0); ez = int(a*a*a + b*b*b); # Try ez = int(a*a + b*b) and other expressions. if (ez % 2 == 0): pen.up(); pen.goto(x, y); pen.down(); pen.circle(1); # Draw pattern #5 pattern(5); # The above program is a framework to design original patterns that are different form anything else - just by playing with the draw function above. Change the expression that defines ez, use random numbers for colors, etc. The opportunities for creative designs are unlimited. Of course the above program is slow. But it delivers exciting designs and inspires people. This is what matters, particularly in CS1. Certainly, one can use more realistic platforms, such as VPython, but then the complexity will probably kill the enthusiasm. This is why I am interested in the turtle module and its improvement. (Thank you again, Vern.) Atanas Atanas Radenski mailto:radenski at chapman.edu http://www.chapman.edu/~radenski/ I find television very educating. Every time somebody turns on the set, I go into the other room and read a book - Groucho Marx ________________________________ From: edu-sig-bounces at python.org [mailto:edu-sig-bounces at python.org] On Behalf Of kirby urner Sent: Tuesday, February 28, 2006 5:10 PM To: Toby Donaldson Cc: edu-sig at python.org Subject: Re: [Edu-sig] Edu-sig Digest, Vol 31, Issue 16 On 2/28/06, Toby Donaldson wrote: 1. The broken interaction between Idle and the turtle package. 2. Poor documentation. To actually understand certain function calls, it was necessary to read the turtle.py source code. My tentative conclusion, reading the above, and from some personal experience, is the Tkinter turtle.py, while a fun demo, is mostly a toy and should not be used for serious teaching, at least on Windows. Too much adverse experience. Too much frustration. In general, Tk on Windows has a lot of problems -- I generally forsake IDLE and go to a command window, for good reason. IPython is an alternative (a good one -- once you get it working in Windows, which is very doable). I really don't think *any* kind of turtle graphics is essential to learning programming, although as I said, I think the approach is very viable and destined to last. I'm not "anti turtle". My own special interest is in going back to the very early days of Logo, when a physical robot was used. I'd rather have hardware robots than screen based ones, with Python bindings. SONY should seed me a prototype :-D Kirby -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/edu-sig/attachments/20060228/74d4ddbf/attachment-0001.htm From Scott.Daniels at Acm.Org Wed Mar 1 04:17:08 2006 From: Scott.Daniels at Acm.Org (Scott David Daniels) Date: Tue, 28 Feb 2006 19:17:08 -0800 Subject: [Edu-sig] Edu-sig Digest, Vol 31, Issue 16 In-Reply-To: References: Message-ID: Toby Donaldson wrote: > I used the Python turtle.py package last semester with about 500 > first-year university students, and two problems stood out above all > others: > > 1. The broken interaction between Idle and the turtle package. On windows, I have an icon linked to: C:\Python24\Lib\idlelib\idle.pyw -n Does this expedient not work for you? The -n means to use a single-process model (more fragile, but the interaction of two GUI loops is not there). --Scott David Daniels Scott.Daniels at Acm.Org From glingl at aon.at Wed Mar 1 04:28:20 2006 From: glingl at aon.at (Gregor Lingl) Date: Wed, 01 Mar 2006 04:28:20 +0100 Subject: [Edu-sig] suggetions abaout turtle.py In-Reply-To: <44035392.6020402@canterburyschool.org> References: <44035392.6020402@canterburyschool.org> Message-ID: <440514D4.2090705@aon.at> Vern Ceder schrieb: > Hello everyone, > > As a consequence of my complaining about it in my PyCon talk, I have > been invited to submit some patches for turtle.py. To my mind, turtle.py > should be something that one could actually use for some very simple > "programming with graphics" lessons, with NO tweaking or additional > software. Hello all, I'm very happy, that this topic is coming up. In my opinion turtle graphics is a very valuable tool for learning (and teaching) programming. That is the reason, why I chose turtle graphics as the basic tool in my textbook "Python f?r Kids" (written in German), although I felt, that Python's turtle.py was rather limited. In my book I tried (imho successfully) to introduce nearly every programming concept by visualizing it via turtle graphics. Of course there are many other ways to to that, but this is definitely one, which one can go. In the meantime (and looking forward to preparing a second edition of my book) I've been working on a new turtle graphics module - I named it Xturtle.py. My main intention was just to achieve what Vern Ceder wrote in the lines above: > "programming with graphics" lessons, with NO tweaking or additional > software. My main inspiration was the turtle graphics component of Logo (specifically of MSW-Logo). So I'd like to participate in the development of this amended tool. What I can offer for now is the following: Consider Xturtle.py as a proposition about what a turtle module could comprise. So have a look at the functions it provides and at examples done with it. It is *NOT* intetended as final result but only as a prototype - but a prototype which had been in use with numerous classes and students since two years and really showed up very few bugs. I'm currently doing a complete rewrite, which - in fact - I intended to offer to you slready before this thread started up. I think it will take two more intensive coding weekends until I'll come up with a "pre alpha release". In the meantime 1) I submit my Xturtle.py module along with a set of 10+ demo samples. I've zipped them into a package and I'll try to submit them as an attachment in a separate follow up posting. Moreover the zipped package XturtlePkg.ZIP as well as the single files can be downloaded from http://ada.rg16.asn-wien.ac.at/~python/Xturtle/ The README.TXT, which mainly contains a description of the sample programs, will be attached to this posting. Of course I'd like to get feedback from those of you, who find turtle graphics useful for teaching, but ALSO FROM THOSE OF YOU, who "don't think *any* kind of turtle graphics is essential to learning". I'd like to stress, that there now is an effort to produce a valuable teaching tool, which should be done as well as possible. Nonwithstanding the fact, that not all who teach Python will use it, nor those, who will use it, will use it in the same way. Moreover let's remember, that turtle graphics was invented to teach programming to very young people. So let's do it in a way, that interesting things can easily be done with it. 2) When thinking about a renewed turtle.py, there come up a lot of points to discuss - especially in the early stage of development. (Considering the fact, that here in Europe it's 3:30 in the morning, I'll only will touch a few of them) (a) How about compatibility? Should every old turtle program be executable with the amended module? Remind that there is some strange behaviour in the old module concerning fill. IMO it should be discussed if the "radians"-mode in turtle.py should be retained. (Is it really useful?) (b) The problem of the "hanging turtle". This was introduced with Python 2.3 when IDLE was renewed. There exist at least to possible "solutions": (a) to use IDLE with the -n switch whenever *interactive* turtle graphics is needed. This is rather easy, as opening IDLE for editing a given Python program (at least under Windows) opens it automatically in this -n - switch - mode. I for my part work with two different links to IDLE on my desktop, normal mode and "no subprocesses" mode, also in my classes. (b) one could try to use the approach of John Zelle, which he did in his graphics package, namely to let the drawing do in a separate thread. I don't know if this is easily possible with the animated drawing turtles - perhaps one should produce a prototype to see ... (Guido two or three years ago told me, that Tkinter is not threadsave) (c) I'd propose to add a sort of TurtleCanvas class to the turtle module. (You will observe that Xturtle works with a scrolled canvas due to a comment in the source code of good old turtle.py, which asked for that ;-) ). There are simply several canvas oriented commands (like setbg etc.) To implement them as Pen (= Turtle) methods doesn't make sense. Also resizing the canvas would be a useful candidate (?). (d) I'll add one more question as an example: turtle.py has the function width() which sets the thickness of the lines to draw. There is no function to "get" it. In Xturtle.py I've implemented pensize() (with width() as an alias) in a way thatit can be used to set the pensize, when called with an argument and to return the current pensize when called without arguments. Would you like this or would you prefer get- and set- functions() for each property? What is the "more pythonic" way? There are many functions concerning pen-properties where this problem arises. They should be treated uniformly. I'll close for now. Only a few remarks to the following: > > So I think the following would be handy: > > 1. equally usable with either "import * from turtle" or "import turtle" > imports I think this is possible currently . What do you meadn exactly? Something like "from turtle import Pen"? > 2. should open with a window covering at least half the screen (the > current default is too small to be useful) Xturtle.py does so > 3. should offer some simple configuration choices for things like > initial size and shape, but mostly rely on reasonable defaults ok, easy to do > 4. should offer a class wrapper so that that one could easily > instantiate different turtles for a first experience with objects. I don't understand this question. Currently there are the classes Pen and RawPen in th turtle module. The anonymous turtle is in fact an instance of Pen (named _pen). It is easy to uses several turtles at the same time. > 5. some minor tweaks to make it better behaved when run from IDLE I fear, these will become major tweaks ... > Does anyone have any feedback on these ideas or any other suggestions > about how turtle.py might be improved without being fundamentally changed? > > Note: this is about turtle.py only, for all its deficiencies. Any > suggestions to try another library, system, or language will be > cheerfully, but resolutely, ignored. ;) OK - Xturtle uses no other library, system nor language - so please do not ignore it - not even resolutely ;-) Regards Gregor P.S.: Xturtle is here, along with its example programs: http://ada.rg16.asn-wien.ac.at/~python/Xturtle/ > > Cheers, > Vern Ceder > > -- Gregor Lingl Reisnerstrasse 3/19 A-1030 Wien Telefon: +43 1 713 33 98 Mobil: +43 664 140 35 27 Website: python4kids.net -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: README.TXT Url: http://mail.python.org/pipermail/edu-sig/attachments/20060301/f25e56a1/attachment.asc From vceder at canterburyschool.org Wed Mar 1 05:18:55 2006 From: vceder at canterburyschool.org (Vern Ceder) Date: Tue, 28 Feb 2006 23:18:55 -0500 Subject: [Edu-sig] suggestions about turtle.py In-Reply-To: <440514D4.2090705@aon.at> References: <44035392.6020402@canterburyschool.org> <440514D4.2090705@aon.at> Message-ID: <440520AF.20205@canterburyschool.org> Everyone, It seems that many of us (probably to our mutual surprise) have use for the humble turtle. I want to get an improved, backward compatible patch into the standard package fairly soon, so over the next few days I will see if I can't come up with something that covers most of the ideas suggested here, including Gregor's libraries to some extent. I will of course post it for comments/testing before I send it along. I would also suggest that those of us who are interested in turtle graphics consider what we want (even IF we want) in an extended turtle package as well, and how much we would want to push for its inclusion in the standard libraries. My sense is that some of us will be fine if the basic turtle.py is usable, but others will really want more. Figuring out the "what" and "how much" may take some time. Certainly Gregor's Xturtle package will give us some direction in thinking about it. Cheers, Vern Gregor Lingl wrote: > Vern Ceder schrieb: > >> Hello everyone, >> >> As a consequence of my complaining about it in my PyCon talk, I have >> been invited to submit some patches for turtle.py. To my mind, >> turtle.py should be something that one could actually use for some >> very simple "programming with graphics" lessons, with NO tweaking or >> additional software. > > > Hello all, > > I'm very happy, that this topic is coming up. In my opinion turtle > graphics is a very valuable tool for learning (and teaching) > programming. That is the reason, why I chose turtle graphics as the > basic tool in my textbook "Python f?r Kids" (written in German), > although I felt, that Python's turtle.py was rather limited. In my book > I tried (imho successfully) to introduce nearly every programming > concept by visualizing it via turtle graphics. Of course there are many > other ways to to that, but this is definitely one, which one can go. > > In the meantime (and looking forward to preparing a second edition > of my book) I've been working on a new turtle graphics module - I named > it Xturtle.py. > > My main intention was just to achieve what Vern Ceder wrote in the lines > above: > > > "programming with graphics" lessons, with NO tweaking or additional > > software. > > My main inspiration was the turtle graphics component of Logo > (specifically of MSW-Logo). > > So I'd like to participate in the development of this amended tool. > > What I can offer for now is the following: > > Consider Xturtle.py as a proposition about what a turtle module could > comprise. So have a look at the functions it provides and at examples > done with it. It is *NOT* intetended as final result but only as a > prototype - but a prototype which had been in use with numerous classes > and students since two years and really showed up very few bugs. > > I'm currently doing a complete rewrite, which - in fact - I intended to > offer to you slready before this thread started up. I think it will take > two more intensive coding weekends until I'll come up with a "pre alpha > release". > > In the meantime > > 1) I submit my Xturtle.py module along with a set of 10+ demo samples. > I've zipped them into a package and I'll try to submit them as > an attachment in a separate follow up posting. > > Moreover the zipped package XturtlePkg.ZIP as well as the single files > can be downloaded from > > http://ada.rg16.asn-wien.ac.at/~python/Xturtle/ > > The README.TXT, which mainly contains a description of the sample > programs, will be attached to this posting. > > Of course I'd like to get feedback from those of you, who find turtle > graphics useful for teaching, but ALSO FROM THOSE OF YOU, who "don't > think *any* kind of turtle graphics is essential to learning". > > I'd like to stress, that there now is an effort to produce a valuable > teaching tool, which should be done as well as possible. Nonwithstanding > the fact, that not all who teach Python will use it, nor those, who will > use it, will use it in the same way. Moreover let's remember, that > turtle graphics was invented to teach programming to very young people. > So let's do it in a way, that interesting things can easily be done with > it. > > 2) When thinking about a renewed turtle.py, there come up a lot of > points to discuss - especially in the early stage of development. > (Considering the fact, that here in Europe it's 3:30 in the morning, > I'll only will touch a few of them) > > (a) How about compatibility? Should every old turtle program be > executable with the amended module? Remind that there is some > strange behaviour in the old module concerning fill. IMO it should be > discussed if the "radians"-mode in turtle.py should be retained. (Is it > really useful?) > > (b) The problem of the "hanging turtle". This was introduced with Python > 2.3 when IDLE was renewed. There exist at least to possible "solutions": > (a) to use IDLE with the -n switch whenever *interactive* turtle > graphics is needed. This is rather easy, as opening IDLE for editing a > given Python program (at least under Windows) opens it automatically in > this -n - switch - mode. I for my part work with two different links to > IDLE on my desktop, normal mode and "no subprocesses" mode, also in my > classes. > (b) one could try to use the approach of John Zelle, which he did in his > graphics package, namely to let the drawing do in a separate thread. I > don't know if this is easily possible with the animated drawing turtles > - perhaps one should produce a prototype to see ... (Guido two or three > years ago told me, that Tkinter is not threadsave) > (c) I'd propose to add a sort of TurtleCanvas class to the turtle > module. (You will observe that Xturtle works with a scrolled canvas due > to a comment in the source code of good old turtle.py, which asked for > that ;-) ). There are simply several canvas oriented commands (like > setbg etc.) To implement them as Pen (= Turtle) methods doesn't make > sense. Also resizing the canvas would be a useful candidate (?). > (d) I'll add one more question as an example: > turtle.py has the function width() which sets the thickness of the lines > to draw. There is no function to "get" it. > In Xturtle.py I've implemented pensize() (with width() as an alias) in a > way thatit can be used to set the pensize, when called with an argument > and to return the current pensize when called without arguments. > Would you like this or would you prefer get- and set- functions() for > each property? What is the "more pythonic" way? > There are many functions concerning pen-properties where this problem > arises. They should be treated uniformly. > > > I'll close for now. Only a few remarks to the following: > >> >> So I think the following would be handy: >> >> 1. equally usable with either "import * from turtle" or "import >> turtle" imports > > > I think this is possible currently . What do you meadn exactly? > Something like "from turtle import Pen"? > >> 2. should open with a window covering at least half the screen (the >> current default is too small to be useful) > > Xturtle.py does so > >> 3. should offer some simple configuration choices for things like >> initial size and shape, but mostly rely on reasonable defaults > > ok, easy to do > >> 4. should offer a class wrapper so that that one could easily >> instantiate different turtles for a first experience with objects. > > I don't understand this question. Currently there are the classes > Pen and RawPen in th turtle module. The anonymous turtle is in fact > an instance of Pen (named _pen). It is easy to uses several turtles at > the same time. > >> 5. some minor tweaks to make it better behaved when run from IDLE > > I fear, these will become major tweaks ... > >> Does anyone have any feedback on these ideas or any other suggestions >> about how turtle.py might be improved without being fundamentally >> changed? >> >> Note: this is about turtle.py only, for all its deficiencies. Any >> suggestions to try another library, system, or language will be >> cheerfully, but resolutely, ignored. ;) > > OK - Xturtle uses no other library, system nor language - so please > do not ignore it - not even resolutely ;-) > > Regards > Gregor > > P.S.: Xturtle is here, along with its example programs: > > http://ada.rg16.asn-wien.ac.at/~python/Xturtle/ > > >> >> Cheers, >> Vern Ceder >> >> > > > ------------------------------------------------------------------------ > > > 2006-03-01 > > Xturtle.py is the prototype of a turtle module written in Python. > It is intended to serve as a first proposition what functions > and features I consider to be useful in a turtle module and what > can easily be done in Python with Tkinter. > > Starting point was the turtle module contained in the current > Python distribution. To a far extent this eXperimental turtle > module is compatible with turtle.py. > > The code is typical experimental. I'm currently doing a complete > rewrite, which I expect to be in a state of a "pre-alpha-release" > within about two weeks. > > In the meantime there is much to discuss - see my posting on > Python Edu-Sig. > > The Xturtle-package contains > > 1. the Xturtle.py module (eXperimental turtle module) > 2. this document - mainly to discribe the > 3. set of included examples > 4. A documentation containing a description of (nearly) all > classes and functions contained in the module - written > in German language :-( > Nevertheless it may be useful for you, as you can see > which functions with which parameter-lists are provided. > And the function names are English anyway. > It is in rtf-format > > (At least I've translated most of the texts occuring in the > sample programs.) > > ================= > Important remark! > ================= > > To do interactive turtle-graphics from IDLE, you have to > run IDLE with the -n-switch (No subprocesses!) > > If you do so, your turtle-graphics programs must not contain > a mainloop() call. > > There is only one example (Xplotter.py) which I recommend > to use with IDLE in this way. Interestingly in Windows > you can achieve this by opening the Python program by > right-clicking with the mouse and chosing Edit with IDLE. > Then press F5 from the active editor - window to run > the program. After the program has been run, you can give > additional graphics-commands from the IDLE shell window, > if you want and modify the graphics to your liking. > > > =========================================================== > List of example-programs. > Under Windows you can run them by double-clicking them > in the windows explorer. Xturtle.py must be on the > search path for modules. E.G. in the same directory > as the examples or in the directory where turtle.py lives. > =========================================================== > > There are examples from elementary to more elaborated. > Some of them I used for my teaching, some only to demonstrate > what can be done with turtle.py > They are not intended to serve as examples for *optimal* > solutions. > > > 0. Xturtle.py > has a if __name__== "__main__" demo: > So simply start it. > First you see the demo from turtle.py to demonstrate > compatibility, then you can observe some Xturtle > features. > > 1. radioactive.py > paints radioactivity-sign > if you import turtle instaed of Xturtle, the > program display a subtle bug of turtle.py > program essentially written by one of my students > > 2. yinyang.py > displays a yin-yang symbol > try also with turtle instead of Xturtle > > 3. Xyinyang.py same as yinyang.py, but uses some (few) > features of Xturtle > > 4. sierpinsky.py and Xsierpinsky.py: two coloured > sierpinsky-triangles, one for turtle, the other one > for Xturtle > > 5. Xcurlicues.py display three of the curlicues described > by Ian Stuart in his book "Another Fine Math You've Got > Me Into ..." --- very well suited for turtle graphics. > After the third graphic has been displayed, shut the > graphics window. > (The third one can only be generated thus easily with > a language with long integer arithmetics.) > > 6. Xtree.py displays a typical binary tree as done so often > with turtle graphics, BUT this time done with a > Python generator. As a result the tree is displayed > the breadth-first-way. > > 7. Xforest.py elaborates the idea from 6. > > 8. Xhangman.py This is from my book "Python f?r Kids" - > only turtle replaced by Xturtle. Compatibility-check. > (You can do the reverse and see, that it also runs > with turtle.py) > > 9. Xmoorhuhn.py is a well known action game. Uses three > gifs contained in the directory. Only for people > accustomed to this type of games. (I normally achieve > a hit rate of 0.25 :-( ) > > 10. Xgame2 is a very strange game, which I invented for demo > purposes. It is an event driven program for two players. > There are two turtles on the screen. One of them is > governed by mouseclicks (left, middle, right), > the other one by keypresses (arrow-keys: left/up/right) > One of them is red (the hunter), the other one - blue - is > the prey (i.e. to be cought). The role of the turtles > - and accordingly their color - changes randomly. > So while it's fin to be far away, if you are hunted, it's > not so fine if you suddenly become the hunter .... > > 11. Xspaceship is intended as a learning game. > There is a spaceship in space without gravity. > It has to be led to a target by simulated rocket > propulsion. Start the game and again use three > arrow-keys to move it around. But be aware, that > you only can stop it by turning it 180 degrees and > "accelerate" it in the opposite direction .... > Students like it ... > > 12. mill1.py - doubleclick and look. A very simple > animation. > > mill2.py - doubleclick and look. Another animation. > Wait a little, it will develop differently. > > These two programs use an experimental feature, which is > not documented: userdefined turtle-shapes. > > ================================================== > > 13. Xplotter.py === USE THIS IN INTERACTIVE MODE > e.g. by rightclicking and chosing Edit with IDLE. > > run it. It is intended to show the relation > between a function and its derivative. > > Click several times into the graphics window. > If you have learned enough about the graphs shown > type > > >>> plot(fun, -1, 2.5) > > (there is a function fun defined in the script) > > or define and display your own functions (along with > their derivatives) > > =================================================== > > > > > > -- This time for sure! -Bullwinkle J. Moose ----------------------------- Vern Ceder, Director of Technology Canterbury School, 3210 Smith Road, Ft Wayne, IN 46804 vceder at canterburyschool.org; 260-436-0746; FAX: 260-436-5137 From tjd at sfu.ca Wed Mar 1 06:13:01 2006 From: tjd at sfu.ca (Toby Donaldson) Date: Tue, 28 Feb 2006 21:13:01 -0800 Subject: [Edu-sig] Edu-sig Digest, Vol 32, Issue 2 In-Reply-To: References: Message-ID: > > 1. The broken interaction between Idle and the turtle package. > > On windows, I have an icon linked to: > C:\Python24\Lib\idlelib\idle.pyw -n > Does this expedient not work for you? > > The -n means to use a single-process model (more fragile, > but the interaction of two GUI loops is not there). Thanks! I've never noticed this option before. Toby From tjd at sfu.ca Wed Mar 1 06:24:06 2006 From: tjd at sfu.ca (Toby Donaldson) Date: Tue, 28 Feb 2006 21:24:06 -0800 Subject: [Edu-sig] Edu-sig Digest, Vol 32, Issue 2 In-Reply-To: References: Message-ID: > I want to get an improved, backward compatible patch into the standard > package fairly soon, so over the next few days I will see if I can't > come up with something that covers most of the ideas suggested here, > including Gregor's libraries to some extent. I will of course post it > for comments/testing before I send it along. I volunteer to help add doc-strings (with examples) to the code if you would like such assistance. > I would also suggest that those of us who are interested in turtle > graphics consider what we want (even IF we want) in an extended turtle > package as well, and how much we would want to push for its inclusion in > the standard libraries. > > My sense is that some of us will be fine if the basic turtle.py is > usable, but others will really want more. Figuring out the "what" and > "how much" may take some time. Certainly Gregor's Xturtle package will > give us some direction in thinking about it. One other source of ideas for graphics beyond turtles is the ACM Java Task Force, which has just released a new version of the proposed acm package: http://www-cs-faculty.stanford.edu/~eroberts//jtf/ Creating standard educational libraries like this for Python could be a real boon. Toby From glingl at aon.at Wed Mar 1 08:39:00 2006 From: glingl at aon.at (Gregor Lingl) Date: Wed, 01 Mar 2006 08:39:00 +0100 Subject: [Edu-sig] suggetions abaout turtle.py In-Reply-To: <440514D4.2090705@aon.at> References: <44035392.6020402@canterburyschool.org> <440514D4.2090705@aon.at> Message-ID: <44054F94.2090505@aon.at> Hi all, Apparently XturtlePkg.ZIP is to large(or wrong format) to be sent over the Edu-SIG list, so if you want to try it out, you are bound to use the mentioned link http://ada.rg16.asn-wien.ac.at/~python/Xturtle/ to download it. Regards, Gregor Gregor Lingl schrieb: > Vern Ceder schrieb: > >> Hello everyone, >> >>... > > _______________________________________________ > Edu-sig mailing list > Edu-sig at python.org > http://mail.python.org/mailman/listinfo/edu-sig -- Gregor Lingl Reisnerstrasse 3/19 A-1030 Wien Telefon: +43 1 713 33 98 Mobil: +43 664 140 35 27 Website: python4kids.net From christian.mascher at gmx.de Wed Mar 1 09:38:00 2006 From: christian.mascher at gmx.de (Christian Mascher) Date: Wed, 01 Mar 2006 09:38:00 +0100 Subject: [Edu-sig] suggestions about turtle.py In-Reply-To: References: Message-ID: <44055D68.30408@gmx.de> Hi all, some years ago I had to teach using a macintosh lab: due to some problems with Tk on mac there was no Idle (and no turtle.py IIRC). That was when I realized how useful the "batteries included" Idle (-n) together with the old turle.py really was for me. It is my standard "graphics package". I once used it to demonstrate the adding up of arrows for physics (arrows representing sine-waves with different phases like from a grating): you could script this from idle and look at the different resulting amplitudes for different angles (arrow spirals curling up or not). Physicists will know what I mean. A Turtle was exactly the right tool to do this. As a quick way to introduce loops etc. with visual feedback the turtle has always worked out well in my (school) classes: ages 15-17. I also like it that the old turtle.py lets you decide if you want to do it procedural (module-level functions) or OO-like. And if you want to hide the things you don't need or rename methods etc. just implement an appropriate intermediate module with your favorite settings and put it in the pythonpath for the class to import: # ooTurtle.py from turtle import Pen class Turtle: def __init__(self, mycolor='black'): self._pen=Pen() self.color(mycolor) def color(self,*args): self._pen.color(*args) ... So dir(Turtle) will only show the methods you explicitly put in there. And you can have the names that you want. Gregor Lingl wrote: > > In the meantime (and looking forward to preparing a second edition > of my book) I've been working on a new turtle graphics module - I named > it Xturtle.py. BTW, I like your book. > 1) I submit my Xturtle.py module along with a set of 10+ demo samples. > I've zipped them into a package and I'll try to submit them as > an attachment in a separate follow up posting. Great stuff. > Moreover let's remember, that > turtle graphics was invented to teach programming to very young people. > So let's do it in a way, that interesting things can easily be done with it. Still: "young" could be quite old. I still like to play around with turtles... > (a) How about compatibility? Should every old turtle program be > executable with the amended module? Remind that there is some > strange behaviour in the old module concerning fill. IMO it should be > discussed if the "radians"-mode in turtle.py should be retained. (Is it > really useful?) As I could rename methods (i.e. to German) anyway, backwards compatibility isn't that important. I just need to find the things I need. Fixing things to go with a new turtle-module shouldn't be difficult. But there should always be an Out-of-the-Box turtle in the standard installation. > (c) I'd propose to add a sort of TurtleCanvas class to the turtle > module. Seems reasonable to me. Just my 2c. Cheers Christian From kirby.urner at gmail.com Wed Mar 1 18:31:29 2006 From: kirby.urner at gmail.com (kirby urner) Date: Wed, 1 Mar 2006 09:31:29 -0800 Subject: [Edu-sig] Edu-sig Digest, Vol 31, Issue 16 In-Reply-To: References: Message-ID: On 2/28/06, Toby Donaldson wrote: > > As I pointed out in my message, the reason we use turtle graphics is > to introduce the idea of functional decomposition and bottom-up > development. I have little interest in graphics, personally. Not sure what this means exactly, but I'm sure there're lots of ways to do this. def g:... def f:... def h:... h(g(f(x))) f(h(g(x))) h(h(g(f(h(g(x))))) whatever. It worked very well for our students, and the fact that turtle > graphics is a toy is important: there's less anxiety playing with By "toy" I meant something more like "broken toy" -- thinking specifically of turtle.py on Windows. One could argue that it's Window's that's the broken toy in this picture. I'd probably smile and nod. I'm not anti-turtle and certainly not anti-Python. I tolerate Windows because I love .NET (so far anyway -- my goal is to be teaching IronPython someday soon, on Linux boxes as well). Maybe at some future SIGCSE (if they stop meeting in Texas -- I'm boycotting that state for the forseeable future, won't go to any events there (Texas has screwed up the Oregon electrical power scene big time, adding to my bill, messing with my quality of living)). > toys. I see many, many students who have zero experience with > programming in high school, and exhibit more anxiety in the > first-programming course than in a math course (which at they least > have a decade of experience with, even if they dislike the topic). > > Toby The Shuttleworth Foundation in South Africa is looking at Logo | Squeak | Python as a preferred pipeline. The curriculum is designed for self-teachers, home scholars, i.e. no cadre of "qualified teachers" need apply. In this model, we'll have gotten the turtle stuff out of the way (on a first pass anyway) with Logo. Python will be under no pressure to star as a turtle graphics platform (it's not known for this now and it's an uphill battle to win recognition for it in this niche). Kids coming into Python will already be highly familiar with turtle stuff, so we can allude to it (in the curriculum, maybe a Moodle -- I've pointed them to two of mine), but we don't introduce either programming or turtles using Python. I'm brainstorming towards the day when high schoolers with no previous programming experience will be the exception more than the rule. That's already the case here in Portland, in some schools anyway. I hope South Africa will get there shortly (you might think they have a long way to go, but actually South Africa is poised for a great leap forward, in the Chinese sense, but we hope without the same stumbling). Kirby -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/edu-sig/attachments/20060301/5ddd02d8/attachment.html From glingl at aon.at Wed Mar 1 19:49:48 2006 From: glingl at aon.at (Gregor Lingl) Date: Wed, 01 Mar 2006 19:49:48 +0100 Subject: [Edu-sig] Edu-sig Digest, Vol 31, Issue 16 In-Reply-To: References: Message-ID: <4405ECCC.3090400@aon.at> kirby urner schrieb: > On 2/28/06, *Toby Donaldson* > wrote: > > As I pointed out in my message, the reason we use turtle graphics is > to introduce the idea of functional decomposition and bottom-up > development. I have little interest in graphics, personally. > > > Not sure what this means exactly, but I'm sure there're lots of ways to > do this. > > def g:... > def f:... > def h:... > h(g(f(x))) > f(h(g(x))) > h(h(g(f(h(g(x))))) > > whatever. I suppose, that this is a misunderstanding. In the logo world of computing with beginners, this means to decompose somewhat complex tastks in tiny peaces and write functions for those, wich then can be assembled to solve the complex task. This is the ordinary meaning of bottum-up development. > > It worked very well for our students, and the fact that turtle > graphics is a toy is important: there's less anxiety playing with > Right! But that doesn't meen that the toy should be poor. IMO it should offer a rich set of means to solve different tasks. Or - as another example, concerning turtle graphics - it should have good means for animationa as are, for example, possibilities to set the speed of the turtle movements or to set different turtle-shapes, maybe even gifs. This makes programming much more interesting for learners. > > By "toy" I meant something more like "broken toy" -- thinking > specifically of turtle.py on Windows. There are easy ways to overcome this and they are still mentioned several times on this list. (It's not necessary to blame windows) One could argue that it's > Window's that's the broken toy in this picture. I'd probably smile and > nod. I'm not anti-turtle and certainly not anti-Python. I tolerate > Windows because I love .NET (so far anyway -- my goal is to be teaching > IronPython someday soon, on Linux boxes as well). Maybe at some future > SIGCSE (if they stop meeting in Texas -- I'm boycotting that state for > the forseeable future, won't go to any events there (Texas has screwed > up the Oregon electrical power scene big time, adding to my bill, > messing with my quality of living)). > > > toys. I see many, many students who have zero experience with > programming in high school, and exhibit more anxiety in the > first-programming course than in a math course (which at they least > have a decade of experience with, even if they dislike the topic). > > Toby > > There are a few important arguments why not to underestimate the importance of a good turtle module in the Python distribution (out of the box as vern ceder says). 1. Many of us are trying to further the use of Python as a first programming language. For them and for their students this would make a great advantage. 2. At least in Europe there ar many teachers who have a good Logo-experience. But now Logo seems to be largely out of date and many are searching for a substitute. As Python has an outstanding clear syntax (imho much clearer than Logo, when it comes to programs beyond turtle-graphics), Python would be a great cadidate. Had it a good turtle module, Python were an even more seductive offer to all those teachers. 3. Compared to its presence in the software world *and* compared to its adequacy as a teaching language, the presence of Python in the educational area is relative is reatively weak. So (many different) things should be done to improve the situation. One of these could definitely be the construction of a better turtle module, which has apparently been started by now. That's a good thing. Everybody hwo wants (and has time to do so ;-( ), should support it. Those who prefer different ways, will (an already do) support those, fortunately. Regards, Gregor > The Shuttleworth Foundation in South Africa is looking at Logo | Squeak > | Python as a preferred pipeline. The curriculum is designed for > self-teachers, home scholars, i.e. no cadre of "qualified teachers" need > apply. In this model, we'll have gotten the turtle stuff out of the way > (on a first pass anyway) with Logo. Python will be under no pressure to > star as a turtle graphics platform (it's not known for this now and it's > an uphill battle to win recognition for it in this niche). Kids coming > into Python will already be highly familiar with turtle stuff, so we can > allude to it (in the curriculum, maybe a Moodle -- I've pointed them to > two of mine), but we don't introduce either programming or turtles using > Python. > > I'm brainstorming towards the day when high schoolers with no previous > programming experience will be the exception more than the rule. That's > already the case here in Portland, in some schools anyway. I hope South > Africa will get there shortly (you might think they have a long way to > go, but actually South Africa is poised for a great leap forward, in the > Chinese sense, but we hope without the same stumbling). > > Kirby > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Edu-sig mailing list > Edu-sig at python.org > http://mail.python.org/mailman/listinfo/edu-sig -- Gregor Lingl Reisnerstrasse 3/19 A-1030 Wien Telefon: +43 1 713 33 98 Mobil: +43 664 140 35 27 Website: python4kids.net From kirby.urner at gmail.com Wed Mar 1 21:12:38 2006 From: kirby.urner at gmail.com (kirby urner) Date: Wed, 1 Mar 2006 12:12:38 -0800 Subject: [Edu-sig] Edu-sig Digest, Vol 31, Issue 16 In-Reply-To: <4405ECCC.3090400@aon.at> References: <4405ECCC.3090400@aon.at> Message-ID: > I suppose, that this is a misunderstanding. In the logo world of > computing with beginners, this means to decompose somewhat complex > tastks in tiny peaces and write functions for those, wich then > can be assembled to solve the complex task. This is the ordinary > meaning of bottum-up development. OK, so like test-driven development. Write a test. Write a function that passes the test. Get a bunch of little pieces that work well. Then (and only then) start using these pieces to pass other tests (more complicated tasks). In the world of structured programming, this meant: def f: def g: def h: def main: f; g; h But today it might be more in terms of subclassing generic classes i.e. in place of main call sequences, we have more specialized forms of composed and inherited object. > > > It worked very well for our students, and the fact that turtle > > graphics is a toy is important: there's less anxiety playing with > > > > Right! But that doesn't meen that the toy should be poor. IMO it should > offer a rich set of means to solve different tasks. Or - as another > example, concerning turtle graphics - it should have good means for > animationa as are, for example, possibilities to set the speed of the > turtle movements or to set different turtle-shapes, maybe even gifs. > This makes programming much more interesting for learners. Those weren't my words you were agreeing with, but I guess you knew. I guess I don't see Python as currently very strong in the turtle graphics department. Maybe someday. Maybe even soon. I like spatial turtles, i.e. turtles that swim in XYZ, not just in XY. I played with doing that using Python + POV-Ray a long time ago, i.e. do your movements, then publish a rendering of where you've been. But that's all pretty esoteric. Too advanced for most beginners. http://www.4dsolutions.net/ocn/numeracy3.html (see 'mywalk.pov' -- ironically planar) > > > By "toy" I meant something more like "broken toy" -- thinking > > specifically of turtle.py on Windows. > > There are easy ways to overcome this and they are still mentioned > several times on this list. (It's not necessary to blame windows) You mean with the -n switch? Why not just use some other language that's better at Turtles than Python? is my main question. If you're going to use Turtles as your primary pedagogy, I suggest Logo or some more sophisticated 3D turtle implementation (there's a 3D Logo no?). Python doesn't have a strong literature. Logo does. This may change in future, but for now, that's just the way it is. If you forced me to use Turtles today, I'd use Logo. > There are a few important arguments why not to underestimate the > importance of a good turtle module in the Python distribution > (out of the box as vern ceder says). > > 1. Many of us are trying to further the use of Python as a first > programming language. For them and for their students this would > make a great advantage. Again, I don't think turtle graphics is an essential first step. But IF it is, then why not use something other than Python? Like Logo? > 2. At least in Europe there ar many teachers who have a good > Logo-experience. But now Logo seems to be largely out of date > and many are searching for a substitute. Why is Logo out of date? Use it for 3 classes (?) to set the stage, get through with the turtle stuff, then turn to Python or something else. This idea that we should pick just one language and use it for everything, regardless, is to be avoided. That's not the real world. As Python has an outstanding clear syntax (imho much clearer than > Logo, when it comes to programs beyond turtle-graphics), Python > would be a great cadidate. Had it a good turtle module, Python were > an even more seductive offer to all those teachers. I don't disagree with this. I just don't see it as a high priority. I'm fine with the idea of using Logo for awhile, moving to Python when the students are more sophisticated and don't need a turtle to motivate their interest. Many students I work with wouldn't agree to use a turtle. That's something for little kids. They're more hungry to become adults. 3. Compared to its presence in the software world *and* compared > to its adequacy as a teaching language, the presence of Python > in the educational area is relative is reatively weak. Which doesn't concern me, per above. If Python *never* had a strong turtle graphics capability, I would shed no tears. But if it does, so much the better. I have *no* reason to get in your way on improving Python's turtle abilities. I'm just not seeing these efforts as critical to my own plans i.e. as we say in idiomatic language "I'm not holding my breath". So (many different) things should be done to improve the situation. > One of these could definitely be the construction of a better turtle > module, which has apparently been started by now. That's a good thing. > > Everybody hwo wants (and has time to do so ;-( ), should support it. > Those who prefer different ways, will (an already do) support those, > fortunately. > > Regards, > Gregor Yes, I think we're in agreement. I plan to stop saying anything on this topic, as I'm afraid I will be cast as "anti- turtle". For political reasons, I want Seymour Papert to like me. Alan Kay too. I hope that's OK with Arthur (whom I like a great deal). Kirby -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/edu-sig/attachments/20060301/6ab9cb90/attachment.htm From andre.roberge at gmail.com Wed Mar 1 23:25:45 2006 From: andre.roberge at gmail.com (Andre Roberge) Date: Wed, 1 Mar 2006 18:25:45 -0400 Subject: [Edu-sig] Edu-sig Digest, Vol 31, Issue 16 In-Reply-To: <4405ECCC.3090400@aon.at> References: <4405ECCC.3090400@aon.at> Message-ID: <7528bcdd0603011425y70cd2058h6bdc330feef01731@mail.gmail.com> On 3/1/06, Gregor Lingl wrote: [snip] > > There are a few important arguments why not to underestimate the > importance of a good turtle module in the Python distribution > (out of the box as vern ceder says). > > 1. Many of us are trying to further the use of Python as a first > programming language. For them and for their students this would > make a great advantage. > > 2. At least in Europe there ar many teachers who have a good > Logo-experience. But now Logo seems to be largely out of date > and many are searching for a substitute. Have you (/they) considered something like Guido van Robot, or RUR-PLE? Andr? > As Python has an outstanding clear syntax (imho much clearer than > Logo, when it comes to programs beyond turtle-graphics), Python > would be a great cadidate. Had it a good turtle module, Python were > an even more seductive offer to all those teachers. > > 3. Compared to its presence in the software world *and* compared > to its adequacy as a teaching language, the presence of Python > in the educational area is relative is reatively weak. > > So (many different) things should be done to improve the situation. > One of these could definitely be the construction of a better turtle > module, which has apparently been started by now. That's a good thing. > > Everybody hwo wants (and has time to do so ;-( ), should support it. > Those who prefer different ways, will (an already do) support those, > fortunately. > > Regards, > Gregor > From delza at livingcode.org Thu Mar 2 00:11:51 2006 From: delza at livingcode.org (Dethe Elza) Date: Wed, 1 Mar 2006 15:11:51 -0800 Subject: [Edu-sig] Edu-sig Digest, Vol 31, Issue 16 In-Reply-To: <7528bcdd0603011425y70cd2058h6bdc330feef01731@mail.gmail.com> References: <4405ECCC.3090400@aon.at> <7528bcdd0603011425y70cd2058h6bdc330feef01731@mail.gmail.com> Message-ID: <24d517dd0603011511u62f2d3f3y49be8d14e6b57c60@mail.gmail.com> > Have you (/they) considered something like Guido van Robot, or RUR-PLE? > > Andr? I think it would be cool to have a simple 2D turtle library which scaled up (maybe via PYRO) to 3D simulated robots, then (again via PYRO) to physical robots. But that won't be part of the standard library, so it's out of scope for this particular thread. --Dethe From glingl at aon.at Thu Mar 2 00:21:12 2006 From: glingl at aon.at (Gregor Lingl) Date: Thu, 02 Mar 2006 00:21:12 +0100 Subject: [Edu-sig] turtle-rurple [Was Digest 31/16] In-Reply-To: <7528bcdd0603011425y70cd2058h6bdc330feef01731@mail.gmail.com> References: <4405ECCC.3090400@aon.at> <7528bcdd0603011425y70cd2058h6bdc330feef01731@mail.gmail.com> Message-ID: <44062C68.6040107@aon.at> Andre Roberge schrieb: > On 3/1/06, Gregor Lingl wrote: > [snip] > >>... > Have you (/they) considered something like Guido van Robot, or RUR-PLE? When I was younger, in 1986, together with friends I wrote a schoolbook called "Werkzeug Computer" ("Werkzeug"=tool). Then I implemented a version of "Karel the Robot" in Turbo Pascal. It was a complete IDE with syntax colouring, visual tracing etc etc. The compiled code was 64k - 20 bytes approx, which was the utmost limit of Turbo Pascal 3.0 then. It was a big success and was used by some Austrian teachers until recently. (I think it still can be run in a DOS - Window.) A short time afterwards I leared to know Logo, and so turtle graphics also. Now I find this more rewarding. It provides nearly every advantage of the Robot plus a lot more freedom and space for new ideas. (*) If I had the time, I'd like to translate also GvR or RUR_PLE to German, but now I'm involved in my Turtle-Project and maybe there will be a second edition of my book "Python f?r Kids" - (I well remember, that you asked me for an English translation one or two years ago.) During the last few month together with Mike M?ller from Leipzig I've completed a (still "raw") translation of "How to think like a computer scientist - the Python way" to German. (German readers may find it here: http://ada.rg16.asn-wien.ac.at/~python/how2think/ and are invited for feedback ...) You see, I'm really a fan of providing different ways ... But currently RUR-PLE surpasses my capacities for the moment. If you know of a German translation on the way, let me know. Maybe I can put a short section or at least a hint to it in my book....) Best wishes Gregor (*) If you tried out my Xturtle-examples you could easily grasp, what I mean with this. -- Gregor Lingl Reisnerstrasse 3/19 A-1030 Wien Telefon: +43 1 713 33 98 Mobil: +43 664 140 35 27 Website: python4kids.net From andre.roberge at gmail.com Thu Mar 2 01:10:51 2006 From: andre.roberge at gmail.com (Andre Roberge) Date: Wed, 1 Mar 2006 20:10:51 -0400 Subject: [Edu-sig] turtle-rurple [Was Digest 31/16] In-Reply-To: <44062C68.6040107@aon.at> References: <4405ECCC.3090400@aon.at> <7528bcdd0603011425y70cd2058h6bdc330feef01731@mail.gmail.com> <44062C68.6040107@aon.at> Message-ID: <7528bcdd0603011610n29711df6j244cce71453a0f98@mail.gmail.com> On 3/1/06, Gregor Lingl wrote: > Andre Roberge schrieb: > > On 3/1/06, Gregor Lingl wrote: > > [snip] > > Have you (/they) considered something like Guido van Robot, or RUR-PLE? > > When I was younger, in 1986, together with friends I wrote a schoolbook > called "Werkzeug Computer" ("Werkzeug"=tool). Then I implemented a > version of "Karel the Robot" in Turbo Pascal. It was a complete IDE with > syntax colouring, visual tracing etc etc. The compiled code was 64k - 20 > bytes approx, which was the utmost limit of Turbo Pascal 3.0 then. It > was a big success and was used by some Austrian teachers until recently. > (I think it still can be run in a DOS - Window.) > > A short time afterwards I leared to know Logo, and so turtle graphics > also. Now I find this more rewarding. It provides nearly every advantage > of the Robot plus a lot more freedom and space for new ideas. (*) > I just looked at Xturtle; nice work! I am *strongly* considering the inclusion of turtle graphics within RUR-PLE. However, since it is based on wxPython instead of Tkinter, I should probably rewrite it almost from scratch (so that I understand it, in any event ;-). > If I had the time, I'd like to translate also GvR or RUR_PLE to German, > but now I'm involved in my Turtle-Project and maybe there will be a > second edition of my book "Python f?r Kids" - (I well remember, that you > asked me for an English translation one or two years ago.) > Yes, I do remember. And I still would be curious to see such a translation. As it is now, with RUR-PLE, I have about 50 lessons written (36 have been released) and am thinking of converting it into a "publish-on-demand" book (for those that like to hold a physical book). > > You see, I'm really a fan of providing different ways ... > > But currently RUR-PLE surpasses my capacities for the moment. If you > know of a German translation on the way, let me know. Maybe I can put a > short section or at least a hint to it in my book....) That might be nice :-) I don't know of any German translation in the works. One thing I did this past week was to change the way language translation was implemented, from my own idiosyncratic version to a new version that makes use of ".po" files. These can be translated by non-programmers. At the moment, the programme UI is available in English, French and Spanish. Existing lessons are being translated into Spanish... I guess I will have to do a French translation soon, just as a matter of personal pride! > Best wishes > Gregor > > (*) If you tried out my Xturtle-examples you could easily grasp, what > I mean with this. > As I wrote above, I did... very impressive!! Andr? From glingl at aon.at Thu Mar 2 02:20:40 2006 From: glingl at aon.at (Gregor Lingl) Date: Thu, 02 Mar 2006 02:20:40 +0100 Subject: [Edu-sig] turtle-rurple [Was Digest 31/16] In-Reply-To: <7528bcdd0603011610n29711df6j244cce71453a0f98@mail.gmail.com> References: <4405ECCC.3090400@aon.at> <7528bcdd0603011425y70cd2058h6bdc330feef01731@mail.gmail.com> <44062C68.6040107@aon.at> <7528bcdd0603011610n29711df6j244cce71453a0f98@mail.gmail.com> Message-ID: <44064868.20305@aon.at> Andre Roberge schrieb: > I am *strongly* considering the inclusion of turtle graphics within RUR-PLE. > However, since it is based on wxPython instead of Tkinter, I should probably > rewrite it almost from scratch (so that I understand it, in any event ;-). > Did you know, that there is a powerful turtle graphics module contained in PythonCard - which is a wxPython extension as far as I know. It has a lot of interesting examples Gregor -- Gregor Lingl Reisnerstrasse 3/19 A-1030 Wien Telefon: +43 1 713 33 98 Mobil: +43 664 140 35 27 Website: python4kids.net From tjd at sfu.ca Thu Mar 2 07:34:18 2006 From: tjd at sfu.ca (Toby Donaldson) Date: Wed, 1 Mar 2006 22:34:18 -0800 Subject: [Edu-sig] Edu-sig Digest, Vol 31, Issue 16 In-Reply-To: References: Message-ID: On 3/1/06, kirby urner wrote: > On 2/28/06, Toby Donaldson wrote: > > > As I pointed out in my message, the reason we use turtle graphics is > > to introduce the idea of functional decomposition and bottom-up > > development. I have little interest in graphics, personally. > > > Not sure what this means exactly, but I'm sure there're lots of ways to do > this. > > def g:... > def f:... > def h:... > h(g(f(x))) > f(h(g(x))) > h(h(g(f(h(g(x))))) > > whatever. I mean cutting up large problems into smaller ones according function, and then creating the resulting program by first writing (and testing) small functions, and then combining those to make larger functions. Your example shows the syntax of function calling, but the more interesting question is how do you get h, g, and f in the first place? > > > It worked very well for our students, and the fact that turtle > > graphics is a toy is important: there's less anxiety playing with > > > By "toy" I meant something more like "broken toy" -- thinking specifically > of turtle.py on Windows. One could argue that it's Window's that's the > broken toy in this picture. I'd probably smile and nod. Well, in this case, it's clearly turtle.py that's lacking. > I'm not > anti-turtle and certainly not anti-Python. I tolerate Windows because I > love .NET (so far anyway -- my goal is to be teaching IronPython someday > soon, on Linux boxes as well). Maybe at some future SIGCSE (if they stop > meeting in Texas -- I'm boycotting that state for the forseeable future, > won't go to any events there (Texas has screwed up the Oregon electrical > power scene big time, adding to my bill, messing with my quality of > living)). > > > toys. I see many, many students who have zero experience with > > programming in high school, and exhibit more anxiety in the > > first-programming course than in a math course (which at they least > > have a decade of experience with, even if they dislike the topic). > > > > Toby > > > The Shuttleworth Foundation in South Africa is looking at Logo | Squeak | > Python as a preferred pipeline. The curriculum is designed for > self-teachers, home scholars, i.e. no cadre of "qualified teachers" need > apply. In this model, we'll have gotten the turtle stuff out of the way (on > a first pass anyway) with Logo. Python will be under no pressure to star as > a turtle graphics platform (it's not known for this now and it's an uphill > battle to win recognition for it in this niche). Kids coming into Python > will already be highly familiar with turtle stuff, so we can allude to it > (in the curriculum, maybe a Moodle -- I've pointed them to two of mine), but > we don't introduce either programming or turtles using Python. Logo is a non-starter. For my purposes, a practical language is a necessity, if only because some students need practical skills to get programming jobs on co-op terms. Personally, I far prefer turtle graphics in Python than Logo since Python is much more readable. I've suggested Squeak to a few people, and there's been close to zero interest. It's not considered very practical, and the language syntax is generally considered a major problem. I'd guess it is less of a problem for complete novices, but it's just too esoteric and impractical to be a contender. > I'm brainstorming towards the day when high schoolers with no previous > programming experience will be the exception more than the rule. That's > already the case here in Portland, in some schools anyway. I hope South > Africa will get there shortly (you might think they have a long way to go, > but actually South Africa is poised for a great leap forward, in the Chinese > sense, but we hope without the same stumbling). That would be nice: "programming anxiety" is a bigger problem than "math anxiety" at my campus. Toby -- Dr. Toby Donaldson School of Computing Science Simon Fraser University (Surrey) From tjd at sfu.ca Thu Mar 2 08:27:23 2006 From: tjd at sfu.ca (Toby Donaldson) Date: Wed, 1 Mar 2006 23:27:23 -0800 Subject: [Edu-sig] Edu-sig Digest, Vol 31, Issue 16 In-Reply-To: References: <4405ECCC.3090400@aon.at> Message-ID: On 3/1/06, kirby urner wrote: > > > > I suppose, that this is a misunderstanding. In the logo world of > > computing with beginners, this means to decompose somewhat complex > > tastks in tiny peaces and write functions for those, wich then > > can be assembled to solve the complex task. This is the ordinary > > meaning of bottum-up development. > > > OK, so like test-driven development. Write a test. Write a function that > passes the test. Get a bunch of little pieces that work well. Then (and > only then) start using these pieces to pass other tests (more complicated > tasks). > > In the world of structured programming, this meant: > > def f: > def g: > def h: > > def main: > f; g; h > > But today it might be more in terms of subclassing generic classes i.e. in > place of main call sequences, we have more specialized forms of composed and > inherited object. I think the Scheme folks get it right when they start with functions before moving on to OOP. I've cribbed a lot of ideas from work in Scheme education and tried to apply it to Python. Toby -- Dr. Toby Donaldson School of Computing Science Simon Fraser University (Surrey) From jonah at ccnmtl.columbia.edu Thu Mar 2 08:26:34 2006 From: jonah at ccnmtl.columbia.edu (Jonah Bossewitch) Date: Thu, 02 Mar 2006 02:26:34 -0500 Subject: [Edu-sig] Edu-sig Digest, Vol 31, Issue 16 In-Reply-To: References: Message-ID: <44069E2A.2070504@ccnmtl.columbia.edu> I want to throw out one idea that worked great for me in my initial introduction to cs. In our class our first programs generated simple postscript (ie - turtle graphics) which we then sent to a printer (well, ghostscript first, to save a few trees). By week two we were generating mandlebrot sets, and recursive artwork the week after. http://www.cs.princeton.edu/courses/archive/spr01/cs126/assignments/mandel.html best of both worlds? At least we got to making art quickly. Best, /Jonah Toby Donaldson wrote: > On 3/1/06, kirby urner wrote: >> On 2/28/06, Toby Donaldson wrote: >> >>> As I pointed out in my message, the reason we use turtle graphics is >>> to introduce the idea of functional decomposition and bottom-up >>> development. I have little interest in graphics, personally. >> >> Not sure what this means exactly, but I'm sure there're lots of ways to do >> this. >> >> def g:... >> def f:... >> def h:... >> h(g(f(x))) >> f(h(g(x))) >> h(h(g(f(h(g(x))))) >> >> whatever. > > I mean cutting up large problems into smaller ones according function, > and then creating the resulting program by first writing (and testing) > small functions, and then combining those to make larger functions. > > Your example shows the syntax of function calling, but the more > interesting question is how do you get h, g, and f in the first place? > >>> It worked very well for our students, and the fact that turtle >>> graphics is a toy is important: there's less anxiety playing with >> >> By "toy" I meant something more like "broken toy" -- thinking specifically >> of turtle.py on Windows. One could argue that it's Window's that's the >> broken toy in this picture. I'd probably smile and nod. > > Well, in this case, it's clearly turtle.py that's lacking. > >> I'm not >> anti-turtle and certainly not anti-Python. I tolerate Windows because I >> love .NET (so far anyway -- my goal is to be teaching IronPython someday >> soon, on Linux boxes as well). Maybe at some future SIGCSE (if they stop >> meeting in Texas -- I'm boycotting that state for the forseeable future, >> won't go to any events there (Texas has screwed up the Oregon electrical >> power scene big time, adding to my bill, messing with my quality of >> living)). >> >>> toys. I see many, many students who have zero experience with >>> programming in high school, and exhibit more anxiety in the >>> first-programming course than in a math course (which at they least >>> have a decade of experience with, even if they dislike the topic). >>> >>> Toby >> >> The Shuttleworth Foundation in South Africa is looking at Logo | Squeak | >> Python as a preferred pipeline. The curriculum is designed for >> self-teachers, home scholars, i.e. no cadre of "qualified teachers" need >> apply. In this model, we'll have gotten the turtle stuff out of the way (on >> a first pass anyway) with Logo. Python will be under no pressure to star as >> a turtle graphics platform (it's not known for this now and it's an uphill >> battle to win recognition for it in this niche). Kids coming into Python >> will already be highly familiar with turtle stuff, so we can allude to it >> (in the curriculum, maybe a Moodle -- I've pointed them to two of mine), but >> we don't introduce either programming or turtles using Python. > > Logo is a non-starter. For my purposes, a practical language is a > necessity, if only because some students need practical skills to get > programming jobs on co-op terms. Personally, I far prefer turtle > graphics in Python than Logo since Python is much more readable. > > I've suggested Squeak to a few people, and there's been close to zero > interest. It's not considered very practical, and the language syntax > is generally considered a major problem. I'd guess it is less of a > problem for complete novices, but it's just too esoteric and > impractical to be a contender. > >> I'm brainstorming towards the day when high schoolers with no previous >> programming experience will be the exception more than the rule. That's >> already the case here in Portland, in some schools anyway. I hope South >> Africa will get there shortly (you might think they have a long way to go, >> but actually South Africa is poised for a great leap forward, in the Chinese >> sense, but we hope without the same stumbling). > > That would be nice: "programming anxiety" is a bigger problem than > "math anxiety" at my campus. > > Toby > -- > Dr. Toby Donaldson > School of Computing Science > Simon Fraser University (Surrey) > _______________________________________________ > Edu-sig mailing list > Edu-sig at python.org > http://mail.python.org/mailman/listinfo/edu-sig From ajsiegel at optonline.net Thu Mar 2 15:14:39 2006 From: ajsiegel at optonline.net (Arthur) Date: Thu, 02 Mar 2006 09:14:39 -0500 Subject: [Edu-sig] Edu-sig Digest, Vol 31, Issue 16 In-Reply-To: Message-ID: <000001c63e03$a5bc6890$1702a8c0@BasementDell> ________________________________ kirby urner Kirby - question 1. Do you understand why your messages are coming to me as html? Makes it difficult to reply in normal form. > I like spatial turtles, i.e. turtles that swim in XYZ, not just in XY. I played with doing that using Python + >POV->Ray a long time ago, i.e. do your movements, then publish a rendering of where you've been. But that's all pretty >esoteric. Too advanced for most beginners. I agree with you here, but keep wondering why you haven't done more with vpython. It works from the command line and its natural syntax seems to me turtle-like, or certainly beginner friendly. >Python doesn't have a strong literature. Logo does. This may change in future, but for now, that's just the way it is. >If you forced me to use Turtles today, I'd use Logo. I tend to agree. If Python is going to compete for the attention of kids and educators in this "space" it seem to me it has some obligation to do something different. And if Python educators feel that the Turtle approach is so effective that it needs to be part of Python's core, at least make a very overt nod to where the ideas are coming from. There are many people out of touch with the history here. It is easy to assume that people can identify Turtle graphics with Logo and there is no need for an explicit appreciation. Just not true, as of now, and with the intended audience. Let's play nice. Andre is careful on this issue in talking about the history of Rur=ple. >Why is Logo out of date? In the words of Randy Pausch - "Logo was". To me it's sort of the technofreak ethos -the weighting factor, with anything from year 19XX and before weighted at zero - i.e. non-existent. Strange world-view. I personally don't pay a lot of attention to the Logo world, but the only reason being that I am not particularly interested in reaching children with computers. They seem to be doing fine on there own. But every impression I have is that it is a continuing and active community, building- as you say - on a long literature and long experience. >Yes, I think we're in agreement. I plan to stop saying anything on this topic, as I'm afraid I will be cast as "anti- >turtle". For political reasons, I want Seymour Papert to like me. Alan Kay too. I hope that's OK with Arthur (whom I >like a great deal). Hmmm. Loves .Net, admires Kay, and likes Arthur. I'm almost concerned ;) But don't we demonstrate that 2 people can agree about little, and enjoy and respect each other. Why do you suspect that the same would not be true with, for example, Kay? Art From dajoy at openworldlearning.org Thu Mar 2 15:22:07 2006 From: dajoy at openworldlearning.org (Daniel Ajoy) Date: Thu, 02 Mar 2006 09:22:07 -0500 Subject: [Edu-sig] 3D Logo In-Reply-To: Message-ID: <4406B93F.17542.30CDA9AF@dajoy.openworldlearning.org> On 1 Mar 2006 at 21:12, edu-sig-request at python.org wrote: > You mean with the -n switch? Why not just use some other language that's > better at Turtles than Python? is my main question. If you're going to use > Turtles as your primary pedagogy, I suggest Logo or some more sophisticated > 3D turtle implementation (there's a 3D Logo no?). Sure there is, I know three: http://zenon.superforos.com/viewtopic.php?p=50 Daniel ***************************** OpenWorld Learning http://www.openworldlearning.org From dajoy at openworldlearning.org Thu Mar 2 15:34:46 2006 From: dajoy at openworldlearning.org (Daniel Ajoy) Date: Thu, 02 Mar 2006 09:34:46 -0500 Subject: [Edu-sig] PyLogo anyone? In-Reply-To: Message-ID: <4406BC36.28151.30D93EF4@dajoy.openworldlearning.org> I find strange that PyLogo hasn't been mention in this discussion: Daniel Date: Tue, 18 Nov 2003 16:16:56 -0600 From: Ian Bicking ianb at colorstudy.com Subject: ANN: PyLogo 0.1 PyLogo 0.1 ========== This is the first public release of the still rough (but I think functional) PyLogo interpreter. PyLogo interprets the Logo language, an education Lisp-like language best known for its turtle graphics. Found at: http://pylogo.org Who Is This For? ================ This release is primarily targeted at other developers. Though PyLogo is a fairly complete Logo implementation, the programming environment is still rough. Because PyLogo is written in Python, this is a very easy interpreter to work with -- the code is small, it's easy to create new primitives using Python code, and there's already a wide array of interesting and useful Python libraries which are easily made accessible to Logo programs. It also inherits Python's rich object model (though it needs more work to make Python objects easier to work with), which makes it possible to avoid some of the more crude features of some Logo dialects with respect to properties (dictionaries), files, etc. What Does It Do Now? ==================== PyLogo implements all of the core Logo features (as far as I know), generally trying to match UCBLogo (the de facto standard Logo implementation). Like traditional Logo, it uses dynamic scoping and a global namespace. Unlike many young language implementation, the existence of bugs is given consideration -- errors produce tracebacks, and room exists for even more helpful error diagnostics. Turtle graphics are available, including multiple turtles. You can use multiple, concurrent threads in your Logo programs. (You can't use threads and turtles together -- yet) -- Ian Bicking | ianb at colorstudy.com | http://blog.ianbicking.org ***************************** OpenWorld Learning http://www.openworldlearning.org From kirby.urner at gmail.com Thu Mar 2 16:27:54 2006 From: kirby.urner at gmail.com (kirby urner) Date: Thu, 2 Mar 2006 07:27:54 -0800 Subject: [Edu-sig] Edu-sig Digest, Vol 31, Issue 16 In-Reply-To: <000001c63e03$a5bc6890$1702a8c0@BasementDell> References: <000001c63e03$a5bc6890$1702a8c0@BasementDell> Message-ID: > kirby urner > > Kirby - question 1. Do you understand why your messages are coming to me as > html? Makes it difficult to reply in normal form. No, didn't realize. Using Google's gmail. How about this one? When I check the edu-sig archive, my emails look OK. I'll see what I can do to fix the problem. > And if Python educators feel that the Turtle approach is so effective that > it needs to be part of Python's core, at least make a very overt nod to > where the ideas are coming from. There are many people out of touch with the > history here. It is easy to assume that people can identify Turtle graphics > with Logo and there is no need for an explicit appreciation. Just not true, > as of now, and with the intended audience. Just a nitpicky comment that "Python's core" tends to mean "core Python" and there's no move to inject a Turtle at that level. As close as we get is turtle.py in the Standard Library. Python's other turtles are outside even that. > I personally don't pay a lot of attention to the Logo world, but the only > reason being that I am not particularly interested in reaching children with > computers. They seem to be doing fine on there own. But every impression I > have is that it is a continuing and active community, building- as you say - > on a long literature and long experience. > The move back to real robots, as in Lego Mindstorms, has been the most prominent trend I'd say. I think this will continue, perhaps with Python as one of the controlling language options. I hope so. I have a segment on that in one of my moodles, but it's not fleshed out yet (because I don't have the robots). > Loves .Net, admires Kay, and likes Arthur. I'm almost concerned ;) > Heh. > But don't we demonstrate that 2 people can agree about little, and enjoy and > respect each other. Why do you suspect that the same would not be true > with, for example, Kay? > > Art He might respect you too for all I know. Anyway, I expect we'll continue to maintain rather different positions on a lot of issues. I think that's OK with both of us. Kirby From ajsiegel at optonline.net Thu Mar 2 17:38:17 2006 From: ajsiegel at optonline.net (Arthur) Date: Thu, 02 Mar 2006 11:38:17 -0500 Subject: [Edu-sig] IDLE wish (was Edu-sig Digest, Vol 31, Issue 16) In-Reply-To: References: <000001c63e03$a5bc6890$1702a8c0@BasementDell> Message-ID: <44071F79.3030203@optonline.com> kirby urner wrote: >>kirby urner >> >>Kirby - question 1. Do you understand why your messages are coming to me as >>html? Makes it difficult to reply in normal form. >> >> > >No, didn't realize. Using Google's gmail. How about this one? > > > Not sure, because I am now at a machine using Thunderbird, rather than Outlook. It seems fine, but it might be just that Thunderbird handles the issue better than Outlook, though I am sure I have Outlook configured to reply in text and quote/indent the original message appropriately, and it ain't happening. >Just a nitpicky comment that "Python's core" tends to mean "core >Python" and there's no move to inject a Turtle at that level. As >close as we get is turtle.py in the Standard Library. Python's other >turtles are outside even that. > > On the subject of the Standard Distribution, I have one and only one wish that I think would make the environment more beginner friendly- a good bang for the buck proposition.. And that it an IDLE that can accept command line arguments. There is a very specific reason why I think this is important. Gregor, or Art, or whoever has developed a module that works hard to be accessible to an average computer user. And have the appropriate setup.py file created. And the beginning of the relationship with the user is a need to explain to them to go to the command line (the what?) and type, getting the path to where their zip file extracted itself exactly right. Not the way I want to begin the relationship. What I want to say is to go to their normal Windows Start/Programs Files routine and under Python2x open up the IDLE environment, use the File/Open dialog as you have a million times before to find and open the setup.py file, and hit w/ Parameters selection under the Run Menu option and type in "install". Even that process is a little geekier than many like to get, and some will probably drop off, but that's OK with me- that much effort might be acceptable to expect as the price of admission. *After* using Gergor's, or Art's, or whoever's module for a time - something like going to the command line and typing something to get something done will not seem so out of the ordinary. But we are not there yet, and won't be getting there as often we might with this one little enhancement to IDLE. Excellent point, Art. Bring it up on the IDLE-Dev list. Well I have found the IDLE-Dev list to be a bit of a sink hole. Art From tjd at sfu.ca Thu Mar 2 20:08:27 2006 From: tjd at sfu.ca (Toby Donaldson) Date: Thu, 2 Mar 2006 11:08:27 -0800 Subject: [Edu-sig] Edu-sig Digest, Vol 31, Issue 16 In-Reply-To: <000001c63e03$a5bc6890$1702a8c0@BasementDell> References: <000001c63e03$a5bc6890$1702a8c0@BasementDell> Message-ID: > And if Python educators feel that the Turtle approach is so effective that > it needs to be part of Python's core, at least make a very overt nod to > where the ideas are coming from. There are many people out of touch with the > history here. It is easy to assume that people can identify Turtle graphics > with Logo and there is no need for an explicit appreciation. Just not true, > as of now, and with the intended audience. > > Let's play nice. Are you offering to write the history of turtle graphics for inclusion in turtle.py? Toby -- Dr. Toby Donaldson School of Computing Science Simon Fraser University (Surrey) From ajsiegel at optonline.net Thu Mar 2 20:32:39 2006 From: ajsiegel at optonline.net (ajsiegel at optonline.net) Date: Thu, 02 Mar 2006 14:32:39 -0500 Subject: [Edu-sig] Edu-sig Digest, Vol 31, Issue 16 In-Reply-To: References: <000001c63e03$a5bc6890$1702a8c0@BasementDell> Message-ID: > > And if Python educators feel that the Turtle approach is so > effective that > > it needs to be part of Python's core, at least make a very overt > nod to > > where the ideas are coming from. There are many people out of > touch with the > > history here. It is easy to assume that people can identify > Turtle graphics > > with Logo and there is no need for an explicit appreciation. > Just not true, > > as of now, and with the intended audience. > > > > Let's play nice. > > Are you offering to write the history of turtle graphics for inclusion > in turtle.py? > No. Not only I am unqualified to do so, I am uninterested in becoming qualified. What the hell- say it; The little I have read from Papert sounds to me mostly like Genius Assertions. I have a bug-up-my-ass about Genius Assertions and when in the mood for unprovable truths I prefer to read populartizations of theoretical physicists' ideas. But I do believe in the importance of certain Free Software ideas, becuase I have personally benefited from them. Though I don't think there is a literal rule-book to follow, I think conscience should be one's guide. In that context I don't think more than a demo type implementation should be part of Python's standard distribution without some way of including substantial attribution and I don't think in it self belongs in\ the standrad distribution. Publicize a pyLogo or a Xturtle, where proper and appropriate attribution can and I expect will be included with the distribution. And give them a way to run the install from IDLE. The consensus is to the contrary. I have long since given up on being taken seriously on these matters. My algorithmic skills don't justify it, apparently. Art > Toby > -- > Dr. Toby Donaldson > School of Computing Science > Simon Fraser University (Surrey) > From Scott.Daniels at Acm.Org Thu Mar 2 22:57:59 2006 From: Scott.Daniels at Acm.Org (Scott David Daniels) Date: Thu, 02 Mar 2006 13:57:59 -0800 Subject: [Edu-sig] Edu-sig Digest, Vol 31, Issue 16 In-Reply-To: References: <4405ECCC.3090400@aon.at> Message-ID: kirby urner wrote: > Why is Logo out of date? Use it for 3 classes (?) to set the stage, get > through with the turtle stuff, then turn to Python or something else. This > idea that we should pick just one language and use it for everything, > regardless, is to be avoided. That's not the real world. This is important. One of the most successful parts of my computer education was early on (the second year I'd programmed a computer) learning a language a week for the summer. Tough course, but after that, a new language didn't (and doesn't) scare me, as it does most mono-lingual students. I feel I got a much better idea of what, in general, programming was from learning wildly disparate languages. --Scott David Daniels Scott.Daniels at Acm.Org From ajsiegel at optonline.net Fri Mar 3 15:59:26 2006 From: ajsiegel at optonline.net (Arthur) Date: Fri, 03 Mar 2006 09:59:26 -0500 Subject: [Edu-sig] IDLE wish (was Edu-sig Digest, Vol 31, Issue 16) In-Reply-To: <44071F79.3030203@optonline.com> Message-ID: <000001c63ed3$133834b0$1702a8c0@BasementDell> > >-----Original Message----- > >From: Arthur [mailto:ajsiegel at optonline.net] > >Well I have found the IDLE-Dev list to be a bit of a sink hole. > > For those who don't follow it, the most recent post to the IDLE-dev list was, to me, interesting. http://mail.python.org/pipermail/idle-dev/2006-February/002442.html Stani is the author of SPE, an Python IDE that is generally on everybody's top XXX list of free Python IDEs. He is also a Blender guy, and, I'm told, an artist. It no longer surprises me that there has been no public response to Stani's post. Since Guido stopped his personal development efforts, IDLE seems to have become the Phone Company's IDE, Anti-Agile to an extreme. One argument against an "official" turtle.py module, is that it will be the Phone Company's Turtle, and the forces of agility and merit will be lost. To me it is better if folks wanting a serious turtle graphics implementation expect to look for it outside the standard distribution. I am perfectly aware that my approach to these discussion is not likely to get me liked. Kirby, we know, is weird ;). But if I had no passion around the issues that arise, it would be easy enough to approach the discussions otherwise. Probably my approach is Anti-Effective - so the "serious" discussion is perceived to be the one that is held without any overt passion. Too bad. Art From vceder at canterburyschool.org Fri Mar 3 16:08:41 2006 From: vceder at canterburyschool.org (Vern Ceder) Date: Fri, 03 Mar 2006 10:08:41 -0500 Subject: [Edu-sig] IDLE wish (was Edu-sig Digest, Vol 31, Issue 16) In-Reply-To: <000001c63ed3$133834b0$1702a8c0@BasementDell> References: <000001c63ed3$133834b0$1702a8c0@BasementDell> Message-ID: <44085BF9.6070206@canterburyschool.org> Art, You've made your feelings about turtle.py abundantly clear. I would only suggest that (contrary to your implications) we benighted individuals who actually use the module in teaching and want improve it are also passionate, moral and even (perhaps) intelligent. Or at least we deserve the benefit of the doubt. ;) However if our discussion of the module bothers you that much, I'm happy to move it to off of this list. Cheers, Vern Ceder Arthur wrote: > > > >>>-----Original Message----- >>>From: Arthur [mailto:ajsiegel at optonline.net] > > One argument against an "official" turtle.py module, is that it will be the > Phone Company's Turtle, and the forces of agility and merit will be lost. > To me it is better if folks wanting a serious turtle graphics implementation > expect to look for it outside the standard distribution. > > I am perfectly aware that my approach to these discussion is not likely to > get me liked. Kirby, we know, is weird ;). > > But if I had no passion around the issues that arise, it would be easy > enough to approach the discussions otherwise. Probably my approach is > Anti-Effective - so the "serious" discussion is perceived to be the one that > is held without any overt passion. Too bad. > > Art > > > _______________________________________________ > Edu-sig mailing list > Edu-sig at python.org > http://mail.python.org/mailman/listinfo/edu-sig -- This time for sure! -Bullwinkle J. Moose ----------------------------- Vern Ceder, Director of Technology Canterbury School, 3210 Smith Road, Ft Wayne, IN 46804 vceder at canterburyschool.org; 260-436-0746; FAX: 260-436-5137 From ajsiegel at optonline.net Fri Mar 3 16:40:02 2006 From: ajsiegel at optonline.net (Arthur) Date: Fri, 03 Mar 2006 10:40:02 -0500 Subject: [Edu-sig] IDLE wish (was Edu-sig Digest, Vol 31, Issue 16) In-Reply-To: <44085BF9.6070206@canterburyschool.org> Message-ID: <000001c63ed8$bd4e9660$1702a8c0@BasementDell> > >-----Original Message----- > >From: Vern Ceder [mailto:vceder at canterburyschool.org] > >However if our discussion of the module bothers you that > >much, I'm happy to move it to off of this list. How about responding to some of my substantive points. Or are you saying you don't perceive any? Starting with: What is the importance of having your improved module part of the standard distribution? Why isn't the cheeseshop - http://cheeseshop.python.org/pypi - the appropriate place for results of your undertaking, as it is foe the results of every other Python application developer. Or is the substance of your response simply that I am in discussion with the Phone Company, have been put on hold, and am wasting my time in attempting to have a discussion on the merits. Are you an appointed or self-appointed redactor of all that is Turtle in the world of Python? Art From vceder at canterburyschool.org Fri Mar 3 17:49:58 2006 From: vceder at canterburyschool.org (Vern Ceder) Date: Fri, 03 Mar 2006 11:49:58 -0500 Subject: [Edu-sig] IDLE wish (was Edu-sig Digest, Vol 31, Issue 16) In-Reply-To: <000001c63ed8$bd4e9660$1702a8c0@BasementDell> References: <000001c63ed8$bd4e9660$1702a8c0@BasementDell> Message-ID: <440873B6.50009@canterburyschool.org> Arthur wrote: > Starting with: > > What is the importance of having your improved module part of the standard > distribution? Teachers in many school situations don't even have control of what software is on the machines their students use. They need to request an installation from tech support. Or if they do have control, they don't have time to install multiple packages on 20-30 workstations. So having a minimally usable turtle implementation included in the standard library would be helpful to them. It's my understanding that this is why turtle.py is there in the first place. The problem is that its usability is *too* minimal. > Why isn't the cheeseshop - http://cheeseshop.python.org/pypi - the > appropriate place for results of your undertaking, as it is foe the results > of every other Python application developer. > Or is the substance of your response simply that I am in discussion with the > Phone Company, have been put on hold, and am wasting my time in attempting > to have a discussion on the merits. I was asked submit the enhacements by Raymond Hettinger. I foolishly thought it might be good to ask for input on the nature of the improvements before doing so. If you want to have an argument about whethe turtle.py should be in the standard library at all, I would suggest you file a PEP or discuss it with the BDFL. It's far beyond me. > Are you an appointed or self-appointed redactor of all that is Turtle in the > world of Python? Why, yes, I am actually... didn't you get the memo on that? Vern -- This time for sure! -Bullwinkle J. Moose ----------------------------- Vern Ceder, Director of Technology Canterbury School, 3210 Smith Road, Ft Wayne, IN 46804 vceder at canterburyschool.org; 260-436-0746; FAX: 260-436-5137 From ajsiegel at optonline.net Fri Mar 3 19:27:15 2006 From: ajsiegel at optonline.net (ajsiegel at optonline.net) Date: Fri, 03 Mar 2006 13:27:15 -0500 Subject: [Edu-sig] IDLE wish (was Edu-sig Digest, Vol 31, Issue 16) In-Reply-To: <440873B6.50009@canterburyschool.org> References: <000001c63ed8$bd4e9660$1702a8c0@BasementDell> <440873B6.50009@canterburyschool.org> Message-ID: ----- Original Message ----- From: Vern Ceder > Why, yes, I am actually... didn't you get the memo on that? > The memo I apparently didn't get is the one change the PEP rules. Heretofore they have been understood to be necessary to open community discussion about a change to the standard distribution. Has a the "turtle exception" been issued, is the memo more pervasive. ;) Art From radenski at chapman.edu Fri Mar 3 19:42:02 2006 From: radenski at chapman.edu (Radenski, Atanas) Date: Fri, 3 Mar 2006 10:42:02 -0800 Subject: [Edu-sig] IDLE wish (was Edu-sig Digest, Vol 31, Issue 16) Message-ID: > What is the importance of having your improved module part of the standard distribution? The current turtle.py module it is already in the standard distribution. Why should not an *improved* version remain in the standard distribution? Quite a few instructors already rely on turtle.py being in the standard distribution. Turtle.py is good for beginners. Having it outside the standard distribution will create difficulties for beginner learners and their instructors. Atanas ________________________________ From: edu-sig-bounces at python.org on behalf of Arthur Sent: Fri 3/3/2006 7:40 AM To: 'Vern Ceder'; 'Arthur' Cc: edu-sig at python.org Subject: Re: [Edu-sig] IDLE wish (was Edu-sig Digest, Vol 31, Issue 16) > >-----Original Message----- > >From: Vern Ceder [mailto:vceder at canterburyschool.org] > >However if our discussion of the module bothers you that > >much, I'm happy to move it to off of this list. How about responding to some of my substantive points. Or are you saying you don't perceive any? Starting with: What is the importance of having your improved module part of the standard distribution? Why isn't the cheeseshop - http://cheeseshop.python.org/pypi - the appropriate place for results of your undertaking, as it is foe the results of every other Python application developer. Or is the substance of your response simply that I am in discussion with the Phone Company, have been put on hold, and am wasting my time in attempting to have a discussion on the merits. Are you an appointed or self-appointed redactor of all that is Turtle in the world of Python? Art _______________________________________________ Edu-sig mailing list Edu-sig at python.org http://mail.python.org/mailman/listinfo/edu-sig From ajsiegel at optonline.net Fri Mar 3 19:49:47 2006 From: ajsiegel at optonline.net (ajsiegel at optonline.net) Date: Fri, 03 Mar 2006 13:49:47 -0500 Subject: [Edu-sig] IDLE wish (was Edu-sig Digest, Vol 31, Issue 16) In-Reply-To: <440873B6.50009@canterburyschool.org> References: <000001c63ed8$bd4e9660$1702a8c0@BasementDell> <440873B6.50009@canterburyschool.org> Message-ID: ----- Original Message ----- From: Vern Ceder > > I was asked submit the enhacements by Raymond Hettinger. I > foolishly > thought it might be good to ask for input on the nature of the > improvements before doing so. If you want to have an argument > about > whethe turtle.py should be in the standard library at all, I would > suggest you file a PEP or discuss it with the BDFL. It's far > beyond me. > Just to be clearer, I have assumed that the turtle.py module in the standaerd library is exactly the turtle.py module that the BDFL had judged was appropriate for the standard library. And I never had a problem with it. It is appropriately minimal. IMO, a less minimal one is less appropriate. Do you think I am arguing to argue, or do you at least believe that I mean what I say. And for reasons that may be judged wrong, but are not outlandish in any possible way. Which is why I think a PEP might be nice to see if there is anyone else out there who sees it as I do. Besides the fact that - before the issuance of the new memo I didn't get - that ,at least arguably, would just represent adherence to SOP. Art From glingl at aon.at Fri Mar 3 23:23:17 2006 From: glingl at aon.at (Gregor Lingl) Date: Fri, 03 Mar 2006 23:23:17 +0100 Subject: [Edu-sig] IDLE wish (was Edu-sig Digest, Vol 31, Issue 16) In-Reply-To: <000001c63ed3$133834b0$1702a8c0@BasementDell> References: <000001c63ed3$133834b0$1702a8c0@BasementDell> Message-ID: <4408C1D5.4070602@aon.at> Arthur schrieb: > > > >>>-----Original Message----- >>>From: Arthur [mailto:ajsiegel at optonline.net] >... > One argument against an "official" turtle.py module, is that it will be the > Phone Company's Turtle, and the forces of agility and merit will be lost. > To me it is better if folks wanting a serious turtle graphics implementation > expect to look for it outside the standard distribution. > > I am perfectly aware that my approach to these discussion is not likely to > get me liked. Kirby, we know, is weird ;). > ... Hi Arthur and all of you ... we all really know very well that you don't like to liked, except perhaps by Kirby. But that's really not the point when discussing about changes in the turtle.py module. To me this discussion already seems rather strange. There are (I think quite a lot) of people, who use turtle.py, as a part of the standard distribution of Python, for their educational work. Some of them feel, that the module is not adequate for their needs and they propose to enhance it. A procedure, done so many times with so many Python modules. And just in that moment there come two protagonists of the Pythonic educational scene and state: if you want to amend it, then we find, that it would be better to delete it completely from the standard distribution. That's a really weird conclusion. And it lets me ask myself, what interests stand behind this sort of argument? My interests are clear. I've written a book "Python f?r/for Kids" which relies heavily on the turtle module as a visualiziation tool. (And I've got a really nice preface from Guido.) So clearly I wouldn't like turtle.py found to be deleted from the Python distribution. What I and most other users of the python module want and, I think, many teachers need, is: you can install Python and use it - as was said "out of the box" - with children and young student (and also older students) and thus have fun. A bit more fun would be a bit better. This comprises among other things doing some graphics without having to learn the Tkinter machinery. I not only teach students but also teachers. Many of the teachers of what we call "Informatik", sort of computer science, have a big stress not only with their daily school life, as they normally are also maths, physics or teachers of some other subject, but also with keeping contact to the progress in so many branches of computer science. They need tools they can learn easily and teach easily to students who (at least the largest par of them) don't want to become computer scientists. Thats a kind of cp4e. (Many of the e's will not learn more than one computer language, at least in Austria ;-( ) And of course it has many more merits, as for instance making Python more popular etc. etc. (By the way: who of us uses the really good turtle module of PythonCard? I assume only few, and I think, that is because it's not in the standard distribution.) But I don't want to argue on this any more, as most of it has already been stated in this discussion. In fact I would like to support the idea of Vernon Ceder to transfer the discussion of the development of turtly.py to some separate place. Perhaps it would be possible to host it at sourceforge or something like that and install some mailing list, e.g. turtle-dev, on it for several month. On python.org there currently approximately 70, many of which are low traffic. There are really many interesting questions to discuss and that is not possible in a fruitful athmosphere on a list where two people who do more than 50% of the overall postings (in terms of number not to speak of volume, as it was in the last six month) dislike it. Moreover it would also be not interesting enough for the majority of the participants of Edu-Sig. So it would suffice to report progress and results from time to time here. So Vernon, could you check which possibilities there are? Regards, Gregor > > > _______________________________________________ > Edu-sig mailing list > Edu-sig at python.org > http://mail.python.org/mailman/listinfo/edu-sig > > -- Gregor Lingl Reisnerstrasse 3/19 A-1030 Wien Telefon: +43 1 713 33 98 Mobil: +43 664 140 35 27 Website: python4kids.net From glingl at aon.at Fri Mar 3 23:34:52 2006 From: glingl at aon.at (Gregor Lingl) Date: Fri, 03 Mar 2006 23:34:52 +0100 Subject: [Edu-sig] IDLE wish (was Edu-sig Digest, Vol 31, Issue 16) In-Reply-To: References: <000001c63ed8$bd4e9660$1702a8c0@BasementDell> <440873B6.50009@canterburyschool.org> Message-ID: <4408C48C.8040203@aon.at> ajsiegel at optonline.net schrieb: > > ----- Original Message ----- > From: Vern Ceder > >>I was asked submit the enhacements by Raymond Hettinger. I >>foolishly >>thought it might be good to ask for input on the nature of the >>improvements before doing so. If you want to have an argument >>about >>whethe turtle.py should be in the standard library at all, I would >>suggest you file a PEP or discuss it with the BDFL. It's far >>beyond me. >> > > > Just to be clearer, I have assumed that the turtle.py module in the standaerd library > is exactly the turtle.py module that the BDFL had judged was appropriate for > the standard library. And I never had a problem with it. It is appropriately minimal. > > IMO, a less minimal one is less appropriate. This statement seems to me, at least to say, a bit arrogant. Did you ever use turtle.py in an educational setting? If so you surely had a different view! You knew, for instance, that it has a number of serious bugs. Things like this you call "approriately minimal". Might it be rewarding for you, to supplement your opinion about turtle.py with some practical experience? Regards, Gregor > Do you think I am arguing to argue, or do you at least believe that I mean > what I say. And for reasons that may be judged wrong, but are not outlandish in > any possible way. > > Which is why I think a PEP might be nice to see if there is anyone else out > there who sees it as I do. > > Besides the fact that - before the issuance of the new memo I didn't get - that ,at least > arguably, would just represent adherence to SOP. > > > Art > _______________________________________________ > Edu-sig mailing list > Edu-sig at python.org > http://mail.python.org/mailman/listinfo/edu-sig > > -- Gregor Lingl Reisnerstrasse 3/19 A-1030 Wien Telefon: +43 1 713 33 98 Mobil: +43 664 140 35 27 Website: python4kids.net From delza at livingcode.org Fri Mar 3 23:45:13 2006 From: delza at livingcode.org (Dethe Elza) Date: Fri, 3 Mar 2006 14:45:13 -0800 Subject: [Edu-sig] IDLE wish (was Edu-sig Digest, Vol 31, Issue 16) In-Reply-To: <4408C1D5.4070602@aon.at> References: <000001c63ed3$133834b0$1702a8c0@BasementDell> <4408C1D5.4070602@aon.at> Message-ID: <24d517dd0603031445s4cf1a8a3m2a9d8809b6787565@mail.gmail.com> I think it would be a real shame if this discussion moved off-list, and a failure of the lists purpose. Turtle graphics have been a mainstay of computers in education for years and have proved their worth in that regard. The turtle.py module is minimal, and isn't going to be taken out of the standard distribution just because Arthur or Kirby don't like it. No-one is proposing that turtle.py be an end-all-be-all super turtle tool, obviously something like that would be more appropriate for the Cheeseshop, and there is plenty of room for such tools. Arthur, I for one have no trouble with your opinions and feelings, but I'm tired of your claims of persecution ("I am perfectly aware that my approach to these discussion is not likely to get me liked.") and your attacks on others who are using this list to have a genuine discussion of python in education ("Are you an appointed or self-appointed redactor of all that is Turtle in the world of Python?"). Surely you can agree to disagree without the attack mode. Note carefully: I am not asking you to shut up, just wondering if you can be more civil about your opposition. Not every educator we'd like to have participate has usenet-thickened skin, and it seems we're already driving them off. Back to the subject of improved turtles, I think there could be a two-pronged approach. The first prong would be to provide incremental improvements to the existing turtle.py (and possibly IDLE) within the standard distribution, while the second would be to provide one or more advanced turtle environments, possibly interfacing with 3D (VPython) or actual robot turtles (PYRO). I'd love to see other alternatives to Tkinter build or advanced as well (I may take this on for PyObjC, and PyCard already has this for wxPython). Obviously, these advance turtle environments would go through the Cheeseshop, not the standard distribution. Both discussions should be welcomed on this list. From ajsiegel at optonline.net Fri Mar 3 23:58:20 2006 From: ajsiegel at optonline.net (ajsiegel at optonline.net) Date: Fri, 03 Mar 2006 17:58:20 -0500 Subject: [Edu-sig] IDLE wish (was Edu-sig Digest, Vol 31, Issue 16) In-Reply-To: <4408C1D5.4070602@aon.at> References: <000001c63ed3$133834b0$1702a8c0@BasementDell> <4408C1D5.4070602@aon.at> Message-ID: ----- Original Message ----- From: Gregor Lingl Date: Friday, March 3, 2006 5:23 pm Subject: Re: [Edu-sig] IDLE wish (was Edu-sig Digest, Vol 31, Issue 16) > Arthur schrieb: > > Some of them feel, that the module is not adequate for their needs and > they propose to enhance it. A procedure, done so many times with > so many > Python modules. And just in that moment there come two > protagonists of > the Pythonic educational scene and state: if you want to amend it, > thenwe find, that it would be better to delete it completely from the > standard distribution. I don't know where you get the idea I propose that it be deleted. I have stated that I thought that the current module, as it is, was an appropriate proof of concept. It would never occur to me that Guido would not put the module he thought most appropriate in his distribution. He has always struck me as a bit of a perfectionsit. Clearly it is not a matter of what level of implementation he is capable of. So No. I am not proposing any change to the status quo. That would require a PEP ;) Also I haven't heard Kirby say anything one way or another about the issue of what he thinks should or should not be done with turtle.py in the standard distribution. So I don't know how he got dragged into this. Among other things, I am being sensitive to the fact that the turle graphics ideas - whether I am attracked to those ideas or not - have a long history and identification with Logo and its living, breathing community. And exactly nothing in particular to do with Python. Perhaps I am too much of a boyscout, but it certainly would not be *my* style to include a wonderful, beautiful, and complete implementation of it in the standard distribution in such a way that the connection of the ideas it embodies to Python and its developers can and certainly *will* in some number of cases be misunderstood. But that, I guess, is me. I would love to be liked by all, but it is most important to me that I be liked by me. *I* have no question that the questions I am raising are worth raising, while at the same time wishing I needn't be the one to raise them - if there are to get raised at all. Art > > That's a really weird conclusion. And it lets me ask myself, what > interests stand behind this sort of argument? > > My interests are clear. I've written a book "Python f?r/for Kids" > whichrelies heavily on the turtle module as a visualiziation tool. > (And I've > got a really nice preface from Guido.) So clearly I wouldn't like > turtle.py found to be deleted from the Python distribution. > > What I and most other users of the python module want and, I > think, many > teachers need, is: you can install Python and use it - as was said > "outof the box" - with children and young student (and also older > students)and thus have fun. A bit more fun would be a bit better. > This comprises > among other things doing some graphics without having to learn the > Tkinter machinery. > > I not only teach students but also teachers. Many of the teachers of > what we call "Informatik", sort of computer science, have a big stress > not only with their daily school life, as they normally are also > maths,physics or teachers of some other subject, but also with > keeping contact > to the progress in so many branches of computer science. They need > toolsthey can learn easily and teach easily to students who (at > least the > largest par of them) don't want to become computer scientists. > Thats a > kind of cp4e. (Many of the e's will not learn more than one > computer > language, at least in Austria ;-( ) > > And of course it has many more merits, as for instance making Python > more popular etc. etc. > > (By the way: who of us uses the really good turtle module of > PythonCard?I assume only few, and I think, that is because it's > not in the standard > distribution.) > > But I don't want to argue on this any more, as most of it has already > been stated in this discussion. > > In fact I would like to support the idea of Vernon Ceder to > transfer the > discussion of the development of turtly.py to some separate place. > Perhaps it would be possible to host it at sourceforge or > something > like that and install some mailing list, e.g. turtle-dev, on it > for > several month. On python.org there currently approximately 70, > many of > which are low traffic. > > There are really many interesting questions to discuss and that > is not > possible in a fruitful athmosphere on a list where two people who > do > more than 50% of the overall postings (in terms of number not to > speak > of volume, as it was in the last six month) dislike it. Moreover > it > would also be not interesting enough for the majority of the > participants of Edu-Sig. So it would suffice to report progress > and > results from time to time here. > > So Vernon, could you check which possibilities there are? > > Regards, > Gregor > > > > > > > > _______________________________________________ > > Edu-sig mailing list > > Edu-sig at python.org > > http://mail.python.org/mailman/listinfo/edu-sig > > > > > > -- > Gregor Lingl > Reisnerstrasse 3/19 > A-1030 Wien > > Telefon: +43 1 713 33 98 > Mobil: +43 664 140 35 27 > > Website: python4kids.net > > > From Scott.Daniels at Acm.Org Sat Mar 4 00:07:02 2006 From: Scott.Daniels at Acm.Org (Scott David Daniels) Date: Fri, 03 Mar 2006 15:07:02 -0800 Subject: [Edu-sig] IDLE wish (was Edu-sig Digest, Vol 31, Issue 16) In-Reply-To: <24d517dd0603031445s4cf1a8a3m2a9d8809b6787565@mail.gmail.com> References: <000001c63ed3$133834b0$1702a8c0@BasementDell> <4408C1D5.4070602@aon.at> <24d517dd0603031445s4cf1a8a3m2a9d8809b6787565@mail.gmail.com> Message-ID: Dethe Elza wrote: > .... Back to the subject of improved turtles, I think there could be a > two-pronged approach. The first prong would be to provide incremental > improvements to the existing turtle.py (and possibly IDLE) within the > standard distribution... Along this prong, how about a list of turtle.py's deficiencies? I suspect this list will to a lot to assuage Art's fears of over- elaboration. What I have read in the discussion is that a clear small interface is wanted to the internal module. > ... the second would be to provide one or more advanced turtle > environments, possibly interfacing with 3D (VPython) or actual > robot turtles (PYRO).... > Obviously, these advance turtle environments would go through the > Cheeseshop, not the standard distribution. --Scott David Daniels Scott.Daniels at Acm.Org From lac at strakt.com Sat Mar 4 00:28:18 2006 From: lac at strakt.com (Laura Creighton) Date: Sat, 04 Mar 2006 00:28:18 +0100 Subject: [Edu-sig] IDLE wish (was Edu-sig Digest, Vol 31, Issue 16) In-Reply-To: Message from ajsiegel@optonline.net of "Fri, 03 Mar 2006 17:58:20 EST." References: <000001c63ed3$133834b0$1702a8c0@BasementDell> <4408C1D5.4070602@aon.at> Message-ID: <200603032328.k23NSJ90001140@theraft.strakt.com> In a message of Fri, 03 Mar 2006 17:58:20 EST, ajsiegel at optonline.net writes: >I have stated that I thought that the current module, as it is, was an a >ppropriate proof >of concept. It would never occur to me that Guido would not put the modul >e he thought >most appropriate in his distribution. He has always struck me as a bit of > a perfectionsit. >Clearly it is not a matter of what level of implementation he is capable >of. A lot of the standard library could stand improvement. Often this is because they were the best-of-breed .... often only-of-breed ... at some point in history, when they went in. Times change. >So No. I am not proposing any change to the status quo. That would requ >ire a PEP ;) I am not sure this requires a PEP. Ask on python-list at python.org. Laura From andre.roberge at gmail.com Sat Mar 4 01:47:25 2006 From: andre.roberge at gmail.com (Andre Roberge) Date: Fri, 3 Mar 2006 20:47:25 -0400 Subject: [Edu-sig] IDLE wish (was Edu-sig Digest, Vol 31, Issue 16) In-Reply-To: <4408C1D5.4070602@aon.at> References: <000001c63ed3$133834b0$1702a8c0@BasementDell> <4408C1D5.4070602@aon.at> Message-ID: <7528bcdd0603031647o52871606gb625a7d4db12172c@mail.gmail.com> On 3/3/06, Gregor Lingl wrote: [snip] > There are really many interesting questions to discuss and that is not > possible in a fruitful athmosphere on a list where two people who do > more than 50% of the overall postings (in terms of number not to speak > of volume, as it was in the last six month) dislike it. When only two people contribute to a thread (or many), it is an indication that 1. other people are not interested, or 2. other people feel they have nothing significant to contribute. [I have been in both camps, at various times.] When a new thread comes up that generates interest from *many* other people than the two people mentioned above, it is a sign that it *should* be discussed on the list. (btw, I assume you mean Art and Kirby; personally I have come to appreciate Art's opposite point of view [from mine] on various topics - it causes me to think twice. As for Kirby... Kirby is Kirby; Laura Creighton gave us a great [unintentional] quote about him in a message not so long ago ;-) >Moreover it > would also be not interesting enough for the majority of the > participants of Edu-Sig. So it would suffice to report progress and > results from time to time here. > I disagree. Strongly. It belongs here! (in my opinion) To me, the thread about turtle.py is leading to my ideal kind of topic for edu-sig. Here's how I would like to see this thread evolve: Actual examples (starting from simple ones) of how turtle.py is currently used to introduce computer programming. Fact-based assessment of weaknesses of the current turtle.py in teaching Python or computer programming in general. There already has been some hints of that :-) This tread is great: - It talks about using Python in an educational setting - turtle.py can be used to introduce "computer programming 4 everybody" ;-) - It talks about improving a Python tool well known. I would love to see the same kind of discussion by people that have tried PyGeo to do this. Of course I would love, for a slightly different reason, to hear of people's opinion of RUR-PLE, its strengths and weaknesses. Andr? From kirby.urner at gmail.com Sat Mar 4 01:57:54 2006 From: kirby.urner at gmail.com (kirby urner) Date: Fri, 3 Mar 2006 16:57:54 -0800 Subject: [Edu-sig] IDLE wish (was Edu-sig Digest, Vol 31, Issue 16) In-Reply-To: <24d517dd0603031445s4cf1a8a3m2a9d8809b6787565@mail.gmail.com> References: <000001c63ed3$133834b0$1702a8c0@BasementDell> <4408C1D5.4070602@aon.at> <24d517dd0603031445s4cf1a8a3m2a9d8809b6787565@mail.gmail.com> Message-ID: > The turtle.py module is minimal, and isn't going to be taken out of the standard > distribution just because Arthur or Kirby don't like it. I never ever said I "don't like" turtle.py nor did I suggest deleting it from the Standard Library. Not once. I discussed it's being broken on Windows (the only platform on which I've played with it), but we already know that. I was even willing to blame Windows (then I was corrected). What I *did* say is: (1) turtle graphics is valuable, popular, here to stay (2) I don't personally use the turtle graphics approach at present (3) I don't believe Python *must* have better turtle in order to be useful in education, including for beginners. But if it *does* gain stronger turtle powers, so much the better. I know a lot of educators will be happier if this occurs. And I've learned about many turtle projects I didn't even know about. I said I'd stop making remarks on this topic because someone would misconstrue my position as "anti-turtle". I see I didn't stop soon enough. The misinterpretation of my remarks has already gained a foothold. Please do not repeat the baseless rumor that I am either anti-turtle or have ever recommended deleting turtle.py or whatever somebody said I said. And do not confuse my views with Arthur's. He and I disagree on many issues. Kirby From ajsiegel at optonline.net Sat Mar 4 02:25:48 2006 From: ajsiegel at optonline.net (Arthur) Date: Fri, 03 Mar 2006 20:25:48 -0500 Subject: [Edu-sig] IDLE wish (was Edu-sig Digest, Vol 31, Issue 16) In-Reply-To: <24d517dd0603031445s4cf1a8a3m2a9d8809b6787565@mail.gmail.com> Message-ID: <002501c63f2a$943a68b0$1702a8c0@BasementDell> > >-----Original Message----- > >From: dethe.elza at gmail.com [mailto:dethe.elza at gmail.com] On > >Behalf Of Dethe Elza > >Sent: Friday, March 03, 2006 5:45 PM > >To: Gregor Lingl > >Cc: Arthur; edu-sig at python.org > >Subject: Re: [Edu-sig] IDLE wish (was Edu-sig Digest, Vol > >31, Issue 16) > > > >I think it would be a real shame if this discussion moved > >off-list, and a failure of the lists purpose. Turtle > >graphics have been a mainstay of computers in education for > >years and have proved their worth in that regard. The > >turtle.py module is minimal, and isn't going to be taken out > >of the standard distribution just because Arthur or Kirby > >don't like it. Have said 4 times now that I have no problem with it in the standard distribution. And never said I didn't like it - as it is, i.e. with its current scope. Why does my position here keep getting misrepresented? And no, I am not suggesting we don't fix bugs. > No-one is proposing that turtle.py be an > >end-all-be-all super turtle tool, obviously something like > >that would be more appropriate for the Cheeseshop, and there > >is plenty of room for such tools. You know where the line is - I don't. But we seem to agree there is a line to be watched. > > > >Arthur, I for one have no trouble with your opinions and > >feelings, but I'm tired of your claims of persecution ("I am > >perfectly aware that my approach to these discussion is not > >likely to get me liked.") and your attacks on others who are > >using this list to have a genuine discussion of python in > >education ("Are you an appointed or self-appointed redactor > >of all that is Turtle in the world of Python?"). Long history of not feeling like I am working within a meritocracy. Nobody could find it in their heart to support me on the contention that an IDLE that cannot run a setup.py is something to be addressed. Perhaps if I found some support when I try to push a point that is straight-forward sensible (nothing seems to happen without *some* pushing), I'd be less reactive in a discussion that had some unavoidable level of controversy. > > > >Back to the subject of improved turtles, I think there could > >be a two-pronged approach. The first prong would be to > >provide incremental improvements to the existing turtle.py > >(and possibly IDLE) within the standard distribution, while > >the second would be to provide one or more advanced turtle > >environments, possibly interfacing with 3D > >(VPython) or actual robot turtles (PYRO). I'd love to see > >other alternatives to Tkinter build or advanced as well (I > >may take this on for PyObjC, and PyCard already has this for > >wxPython). If I take my boyscout hat off, and put on my businessman's hat - it seems to me that a vpython in the standard distribution would be a much more significant thing to think and work toward if we are concerned about Python's popularity and its utility in the classroom. Mostly because it actually highlights some of Python's indigenous strengths - not only providing friendly access to high performance graphics in C++, but doing so in such a way that the C++ graphical objects can be subclassed and extended in pure Python. Seems to me - with my businessman's hat on - that one wants to showcase those kinds of facilities. It's competitive out there. And as useful as a turtles might be in the classroom, there are many turtles out there, and there is nothing indigenous to Python about them. Get Python - its turtles are pretty OK. My businessman doesn't get excited. Art From tjd at sfu.ca Sat Mar 4 03:36:31 2006 From: tjd at sfu.ca (Toby Donaldson) Date: Fri, 3 Mar 2006 18:36:31 -0800 Subject: [Edu-sig] Edu-sig Digest, Vol 32, Issue 8 In-Reply-To: References: Message-ID: > Dethe Elza wrote: > > .... Back to the subject of improved turtles, I think there could be a > > two-pronged approach. The first prong would be to provide incremental > > improvements to the existing turtle.py (and possibly IDLE) within the > > standard distribution... > Along this prong, how about a list of turtle.py's deficiencies? > I suspect this list will to a lot to assuage Art's fears of over- > elaboration. What I have read in the discussion is that a clear > small interface is wanted to the internal module. Here are the problems I had with turtle.py in the situation of teaching it to ~500 first-year university students, most of whom identify themselves as non-technical. I've ordered them by importance for my purposes: - There's no doc strings or other documentation in the turtle.py module itself. There is one the web page, and that certainly helps, but it should be in turtle.py. - The error messages are sometimes unnecessarily confusing. For example, you can set pen colors in about three ways, and different kinds of errors are generated depending on the mistake you make. One standard error message that gives examples of the correct way to set colors would save a lot of unnecessary headaches. - Idle and Python don't play well together (on Windows, at least). There are fixes, but they are still not ideal. - I find the turtle too powerful for my purposes. Many of the current turtle functions can easily be implemented in terms of other ones, and I think it's instructive for students to do that for themselves, to learn about functional decomposition, bottom-up programming, code re-use, etc. - At the same time, I would also like to have more powerful turtles that would be useful for more powerful graphics. You know, the right turtle for the right job. :-) - The name Pen is a bit confusing, since this is "turtle" graphics. But it wasn't a major problem for me since I stuck mainly with the non-OOP turtle commands. One the plus side: - Once Python is installed, turtle.py just works (usually!). There's no extra packages to install or options to configure. Just load and go. Many students (and teachers!) get frustrated installing software at home, and the "batteries included" nature of turtle.py is a win. Dealing with installation issues can eat up a lot of time in large courses, and so minimizing that is good. - It's simple, easy to understand stuff that turns out to be very powerful. Even using multiple Pen objects proved easy for interested students when they see even one or two examples. (My course doesn't cover OOP, but after seeing the success of using turtle.py, it makes sense to move that way.) - It's in Python. Part of the goal of the course is, at least for a few students, to learn enough about Python to use it for practical, real-world scripting that don't involve graphics or games. So I prefer to stick to the language proper than to use special educational packages. Part of this is personal taste and the culture of my department's approach to introducing programming; I certainly do give students special libraries and other packages (like PyGame) later in the course, so I am admittedly "soft" on this issue, and possibly inconsistent. It boils down to this: turtle graphics was fun and educational for hundreds of students. I can't think of many other things I've done in such a class that have had such a positive impact. Fixing a few obvious problems with turtle.py will surely only improve the experience. Moving to a different kind of graphics or a different turtle system might work as well or better, but I am not currently convinced that such a move will accrue enough benefits to make it worth the effort. I know from experience the sort of risks involved in making changes to big courses. I agree with those who suggested a two-pronged approach: tweak turtle.py, and then consider the creation of bigger and better Python education tools. I've already written a lot fo doc-strings for turtle.py to offer to Vern, and I would willing to help out on the second prong too; if, for example, Gregor wanted to spearhead that starting with xturtle and friends, I'd be interested in helping out insofar as my particular experience and needs can be of use. Toby -- Dr. Toby Donaldson School of Computing Science Simon Fraser University (Surrey) From kirby.urner at gmail.com Sat Mar 4 03:45:24 2006 From: kirby.urner at gmail.com (kirby urner) Date: Fri, 3 Mar 2006 18:45:24 -0800 Subject: [Edu-sig] Monkeys! (was turtles) Message-ID: So with my 8th graders this week, we were back to writing a class. Here's the eventual definition: class Monkey: def __init__(self, name): self.name = name self.stomach = [] def eat(self, food): self.stomach.append(food) print "Yum, thanks for the %s" % food def __repr__(self): return "Monkey named %s" % self.name We didn't do this all at once, e.g. I had the self.stomach.append(food) line before I'd mentioned a stomach elsewhere and said this wouldn't work, because you couldn't append to a list that didn't yet exist. How to fix? My most advanced student raised his hand and gave the right answer: start with an empty list, and put it up top in the constructor. In my patter, I make sure to say words like "instantiate" and "object" a lot. I talk about classes as "blueprints" (like for a house) whereas what you actually "instantiate" from a blueprint, or plan, is an object, an actual house with its own color. Then each student created a bunch of Monkey objects, after saving the above in site-packages as zoo.py. >>> from zoo import Monkey >>> m1 = Monkey('BoBo') >>> m2 = Monkey('George') # as in Curious George At this point, I'd go around the room helping any student with broken code. Common errors: saved as Zoo.py but importing from zoo.py. Missing colon somewhere. Single under instead of underunder. Inconsistent indentation. Of course I'd talked about all of these possible mistakes in some detail, but kids sometimes tune out or are involved in other things. A couple tried to do all this in shell mode, instead of in a text window (I have them Save As zoo.py immediately, even with a blank slate, to get the color coding). A couple thought where I wrote 'name' they should substitute an actual name, like 'Andy' i.e. they were not yet clear on the difference between variable-as-storage and value. Actually, the first thing I did was put triple-quote comments up top, and talk about conventions of indicating alpha, beta and production-ready code. Kind of an interlude, story time. Anyway, back to the shell: >>> m1.eat('banana') Yum, thanks for the banana >>> m1.eat('coconut') Yum, thanks for the coconut >>> m1.stomach ['banana', 'coconut'] I asked what would be in m2's stomach and a chorus of voices gave the right answer: nothing yet, because only m1 had been fed. Then, as it was almost the end of the period, I had a brainstorm. Let's feed m2 to m1! >>> m1.eat(m2) Yum, thanks for the Monkey named George >>> m1.stomach ['banana','coconut','Monkey named George'] Hah hah. They thought that was pretty funny. Then I had m2 eat itself. OK that was just weird. Kirby is just Kirby I guess (yum). Next week, we'll be writing a more generic Mammal class and having our Monkey and Dog inherit from it. We'll also get more deeply into the Dictionary type (so far, I've only discussed lists, and strings in sum detail, including string substitution syntax). Once we have the dictionary type more understood, I'll be able to mention self.__dict__ and talk about how the individual "state" (e.g. the stomach) of each object (e.g. each Monkey) is saved in a dictionary. I like diving into OO pretty early, obviously. I'm not one of these "let's do procedural programming for a year and get around to OO only in year number two." No way Jose! Kirby From andre.roberge at gmail.com Sat Mar 4 04:03:11 2006 From: andre.roberge at gmail.com (Andre Roberge) Date: Fri, 3 Mar 2006 23:03:11 -0400 Subject: [Edu-sig] Monkeys! (was turtles) In-Reply-To: References: Message-ID: <7528bcdd0603031903p3989c09exb8c01d0d6c1a11a1@mail.gmail.com> On 3/3/06, kirby urner wrote: > So with my 8th graders this week, we were back to writing a class. > Here's the eventual definition: > > class Monkey: > [snip] Very nice example deleted... Kirby: any reason why you use "old style" classes? Andr? From kirby.urner at gmail.com Sat Mar 4 04:49:08 2006 From: kirby.urner at gmail.com (kirby urner) Date: Fri, 3 Mar 2006 19:49:08 -0800 Subject: [Edu-sig] Monkeys! (was turtles) In-Reply-To: <7528bcdd0603031903p3989c09exb8c01d0d6c1a11a1@mail.gmail.com> References: <7528bcdd0603031903p3989c09exb8c01d0d6c1a11a1@mail.gmail.com> Message-ID: Not really -- just cuz I don't want to explain the difference and old-style is even simpler syntax. My expectation, maybe wrong, is by the time these kids are old enough to use Python "on the job", the old-style syntax will automatically create a new style class (as the old style will have gone away). I always think of "classic Coke" versus "the new Coke" (as in Coca Cola) when I write about this stuff. Old timer that I must be by now. Kirby On 3/3/06, Andre Roberge wrote: > On 3/3/06, kirby urner wrote: > > So with my 8th graders this week, we were back to writing a class. > > Here's the eventual definition: > > > > class Monkey: > > > [snip] Very nice example deleted... > > Kirby: any reason why you use "old style" classes? > > Andr? > From andre.roberge at gmail.com Sat Mar 4 04:51:48 2006 From: andre.roberge at gmail.com (Andre Roberge) Date: Fri, 3 Mar 2006 23:51:48 -0400 Subject: [Edu-sig] Monkeys! (was turtles) In-Reply-To: References: <7528bcdd0603031903p3989c09exb8c01d0d6c1a11a1@mail.gmail.com> Message-ID: <7528bcdd0603031951q79e617fdof8829e3dd7395141@mail.gmail.com> On 3/3/06, kirby urner wrote: > Not really -- just cuz I don't want to explain the difference and > old-style is even simpler syntax. My expectation, maybe wrong, is by > the time these kids are old enough to use Python "on the job", the > old-style syntax will automatically create a new style class (as the > old style will have gone away). I was thinking (no experience to back this up, unfortunately) that by starting from day one to use the new style, it would be much easier to introduce inheritance. That's what I plan to do in rur-ple lessons. (With a note somewhere pointing out the existence of old style classes.) Andr? > > I always think of "classic Coke" versus "the new Coke" (as in Coca > Cola) when I write about this stuff. Old timer that I must be by now. > > Kirby > > > On 3/3/06, Andre Roberge wrote: > > On 3/3/06, kirby urner wrote: > > > So with my 8th graders this week, we were back to writing a class. > > > Here's the eventual definition: > > > > > > class Monkey: > > > > > [snip] Very nice example deleted... > > > > Kirby: any reason why you use "old style" classes? > > > > Andr? > > > From andre.roberge at gmail.com Sat Mar 4 05:11:17 2006 From: andre.roberge at gmail.com (Andre Roberge) Date: Sat, 4 Mar 2006 00:11:17 -0400 Subject: [Edu-sig] Introducing classes Message-ID: <7528bcdd0603032011o53b25d03rf49aef51be7eae10@mail.gmail.com> A long time ago, Kirby suggested to me (on this list I believe - I can't trace the post right now) that perhaps I should use rur-ple's code itself as an example to use. I replied that it was most likely too complicated .... but I kept his idea at the back of my mind. After seeing his post on the Monkey class, I thought of how I would go about to introduce classes, to users of rur-ple that have already written simple programs to make a robot (Reeborg) move in his world, both using the "function" notation and the OOP notation. Here are my thoughts at the moment. (Sorry for the amount of code; it is designed to be all cut-and-pasted in one chunk to be run altogether as an example. In a classroom situation it would be broken up in various steps.) The next step would be to introduce the second dimension (streets). Any kind of comments would be appreciated, especially as I am thinking of writing a rur-ple lesson using this approach :-) Andr? ==================== # Minimal robot that can move. class Robot(object): def move(self): print "I moved." Reeborg = Robot() Reeborg.move() print "----------------" # Add real movement along a line class Robot(object): def __init__(self): self.avenue = 1 def move(self): self.avenue += 1 print "I moved to Avenue %d"%self.avenue Reeborg = Robot() Reeborg.move() Reeborg.move() print "----------------" # Add movement in both directions along the line class Robot(object): def __init__(self): self.avenue = 1 self.step = 1 def move(self): self.avenue += self.step print "I moved to Avenue %d"%self.avenue def turn_around(self): self.step = -self.step print "I turned around." Reeborg = Robot() Reeborg.move() Reeborg.move() Reeborg.turn_around() Reeborg.move() print "----------------" # Add obstacles (walls) class Robot(object): def __init__(self): self.avenue = 1 self.step = 1 self.walls = [0, 5] def move(self): self.avenue += self.step if self.avenue in self.walls: print "A wall is preventing me to move to Avenue %d"%self.avenue self.avenue -= self.step else: print "I moved to Avenue %d"%self.avenue def turn_around(self): self.step = -self.step print "I turned around." Reeborg = Robot() Reeborg.move() Reeborg.move() Reeborg.turn_around() Reeborg.move() Reeborg.move() Reeborg.move() Reeborg.turn_around() for i in range(5): Reeborg.move() print "----------------" # Create world and robot separately; put robot in world class World(object): def __init__(self): self.walls = [] def add_wall(self, avenue): self.walls.append(avenue) def is_clear(self, avenue): return avenue in self.walls class Robot(object): def __init__(self, world): self.avenue = 1 self.step = 1 self.world = world def move(self): self.avenue += self.step if self.world.is_clear(self.avenue): print "Something in the world is preventing me", print "to move to Avenue %d"%self.avenue self.avenue -= self.step else: print "I moved to Avenue %d"%self.avenue def turn_around(self): self.step = -self.step print "I turned around." w = World() w.add_wall(0) w.add_wall(5) Reeborg = Robot(w) Reeborg.move() Reeborg.move() Reeborg.move() Reeborg.turn_around() Reeborg.move() Reeborg.move() Reeborg.move() Reeborg.move() w.add_wall(3) Reeborg.turn_around() for i in range(3): Reeborg.move() print "----------------" From kirby.urner at gmail.com Sat Mar 4 14:57:40 2006 From: kirby.urner at gmail.com (kirby urner) Date: Sat, 4 Mar 2006 05:57:40 -0800 Subject: [Edu-sig] Monkeys! (was turtles) In-Reply-To: <7528bcdd0603031951q79e617fdof8829e3dd7395141@mail.gmail.com> References: <7528bcdd0603031903p3989c09exb8c01d0d6c1a11a1@mail.gmail.com> <7528bcdd0603031951q79e617fdof8829e3dd7395141@mail.gmail.com> Message-ID: > I was thinking (no experience to back this up, unfortunately) that by > starting from day one to use the new style, it would be much easier > to introduce inheritance. That's what I plan to do in rur-ple lessons. > (With a note somewhere pointing out the existence of old style classes.) > > Andr? Yes, I'm starting to think you're correct. I'll probably experiment with inheriting from 'object' next week. Thanks for your feedback. Kirby From kirby.urner at gmail.com Sat Mar 4 15:18:22 2006 From: kirby.urner at gmail.com (kirby urner) Date: Sat, 4 Mar 2006 06:18:22 -0800 Subject: [Edu-sig] Introducing classes In-Reply-To: <7528bcdd0603032011o53b25d03rf49aef51be7eae10@mail.gmail.com> References: <7528bcdd0603032011o53b25d03rf49aef51be7eae10@mail.gmail.com> Message-ID: > Any kind of comments would be appreciated, especially as I am thinking > of writing a rur-ple lesson using this approach :-) > Andr? > ==================== I really like this kind of thing Andr?. One thing I like is the visual imagination is engaged (avenues, obstacles) and yet the code and evaluation loop are entirely lexical. This is more like reading a book (without pictures even), which is what children are learning to appreciate (we hope): scanning typography while using their imaginations at the same time. Those of us heavily into TV as a medium don't want to lose or undermine that skill. The fact that you actually *do* move to visual animations later, using the facilities of wx, is very good as well. Switching between modes is valid, and we're dealing with TV generations who hunger for more visual stimuli. I often think education is a travesty because we build visual literacy through television and then set up our classrooms to fight or ignore that literacy, going only for chalk boards and slow talking. Switching between modes is key. It restores faith among students that we recognize all their modes / talents and plan to reinforce across the spectrum. Cartoons are not evil, but neither is reading and imagining (with few if any visual aids). In sum, I think it's OK to teach the traditional read/imagine mode ONLY IF we acknowledge and respect the TV and audio modes they've learned from multi-media. I am very much in favor of teaching multi-track editing as a part of regular schooling (lots about this in my blogs). More to the details of your code: a technique I use sometimes is to start with a simple Monkey (or let's say Robot in this case) and evolve it through subclassing. In other words, as I add new capabilities, I don't show a more and more complicated Robot. Rather, I show more and more descendents, in an inheritance chain, each generation adding to and/or modifying the behavior of ancestor robots. There's an implicit message here, that the children may be more capable than the adults. That reflects my belief system: that humans are still on a learning curve and our children *are* more generally adapted and competent to live in the future than we are, in the natural course of things. That doesn't mean they should disrespect us (we have much more experience). It does mean we should eagerly share power. Too much talk today, on adult math teacher lists, is about how "the kids today" are dumber and/or less qualified than we were or are. This is all a prelude / setup for not turning over significant responsibility to younger people. Because our traditional school system has not made sophisticated use of TV or multimedia (which young people grew up on), I tend to side with them and make it part of my business to boost their power and authority, in part by taking their talents and powers seriously. Related blog post: http://controlroom.blogspot.com/2006/02/boosting-bandwidth.html Kirby From andre.roberge at gmail.com Sat Mar 4 15:35:06 2006 From: andre.roberge at gmail.com (Andre Roberge) Date: Sat, 4 Mar 2006 10:35:06 -0400 Subject: [Edu-sig] Introducing classes In-Reply-To: References: <7528bcdd0603032011o53b25d03rf49aef51be7eae10@mail.gmail.com> Message-ID: <7528bcdd0603040635w4f652073o63bdf337409a3a54@mail.gmail.com> On 3/4/06, kirby urner wrote: > > I really like this kind of thing Andr?. :-) > One thing I like is the visual imagination is engaged (avenues, > obstacles) and yet the code and evaluation loop are entirely lexical. > This is more like reading a book (without pictures even), which is > what children are learning to appreciate (we hope): scanning > typography while using their imaginations at the same time. Those of > us heavily into TV as a medium don't want to lose or undermine that > skill. > > The fact that you actually *do* move to visual animations later, using > the facilities of wx, is very good as well. Switching between modes > is valid, and we're dealing with TV generations who hunger for more > visual stimuli. I often think education is a travesty because we > build visual literacy through television and then set up our > classrooms to fight or ignore that literacy, going only for chalk > boards and slow talking. Actually, it's the other way around. I start *within rur-ple* with the simplest program. move() turn_off() The student gets the visual feedback right way. Then, within rur-ple, I introduce Python's syntax, building more and more complex programs. Then I introduce OOP notation: Reeborg = UsedRobot() Reeborg.move() It is after this step that I was planning to introduce the class example I gave, to show students how they could design their own robot. [snip] > More to the details of your code: a technique I use sometimes is to > start with a simple Monkey (or let's say Robot in this case) and > evolve it through subclassing. In other words, as I add new > capabilities, I don't show a more and more complicated Robot. Rather, > I show more and more descendents, in an inheritance chain, each > generation adding to and/or modifying the behavior of ancestor robots. Since I want the students to design their own robot, I thought of emulating the inheritance that they had seen. The UsedRobot() objects can only turn left. RefurbishedRobot() can turn right, and inherits from UsedRobot. So, I thought of building Robot() until it had the same abilities as rur-ple's UsedRobot(). Then, introduce subclassing to build a BetterRobot() that would have the same abilities as rur-ple's RefurbishedRobot(). Andr? From ajsiegel at optonline.net Sat Mar 4 15:44:26 2006 From: ajsiegel at optonline.net (Arthur) Date: Sat, 04 Mar 2006 09:44:26 -0500 Subject: [Edu-sig] Introducing classes In-Reply-To: Message-ID: <000001c63f9a$22d33ba0$1702a8c0@BasementDell> > >-----Original Message----- > >From: edu-sig-bounces at python.org > >[mailto:edu-sig-bounces at python.org] On Behalf Of kirby urner > >Sent: Saturday, March 04, 2006 9:18 AM > >To: Andre Roberge > >Cc: edu-sig at python.org > >Subject: Re: [Edu-sig] Introducing classes > > > >> Any kind of comments would be appreciated, especially as I > >am thinking > >> of writing a rur-ple lesson using this approach :-) Andr? > >> ==================== > > > > > >In sum, I think it's OK to teach the traditional > >read/imagine mode ONLY IF we acknowledge and respect the TV > >and audio modes they've learned from multi-media. I am very > >much in favor of teaching multi-track editing as a part of > >regular schooling (lots about this in my blogs). The difference in our sensitivities here has to do with the fact that I am unwilling to forget that the media our kids are experiencing is as it is only as a matter of market forces. The classroom should be a haven, and a respite and a counterforce. And one way to communicate to kids that we are somewhere else, is to turn off the TV. Art From ajsiegel at optonline.net Sat Mar 4 16:22:23 2006 From: ajsiegel at optonline.net (Arthur) Date: Sat, 04 Mar 2006 10:22:23 -0500 Subject: [Edu-sig] Introducing classes In-Reply-To: <7528bcdd0603032011o53b25d03rf49aef51be7eae10@mail.gmail.com> Message-ID: <000001c63f9f$70b18570$1702a8c0@BasementDell> > >-----Original Message----- > >From: edu-sig-bounces+ajsiegel=optonline.net at python.org > >[mailto:edu-sig-bounces+ajsiegel=optonline.net at python.org] > >On Behalf Of Andre Roberge > >A long time ago, Kirby suggested to me (on this list I > >believe - I can't trace the post right now) that perhaps I > >should use rur-ple's code itself as an example to use. If it is appropriate to talk about our projects and where we are with them and what is driving are efforts, as I think it surely well should be: This resonates highly with how I have spent a good deal of my free time the last month. Among my follies with PyGeo is trying to bring some life and reality to the concept that the code is its text - both in terms of tying together programming and functionality, and in tying together analytic mathematics with geometry and the sensible world. Part of the problem there is of course making one's code worthy. Not sure I can ever solve that with full satisfaction - but starting from little things, I don't think you will be able to find a line in PyGeo anymore - far from where it was - that is not orthodox in terms of something as simple and 'unessential' as indentation. In the end, there is no excuse for PyGeo to *be* in Python (better performance could be achieved elsewhere) if the readability and access to the code is not part of its intent. So maybe my thinking hear is some form of rationalization of the fact that it is. And where it has led me recently is on a journey connected to automated documentation, having become enamored by what the Pudge documentation project is trying to do - essentially auto generating context sensitive hyperlinks between reStructured text doc strings and nicely colorized html versions of the source code. But the project is young, doesn't work for me as I ultimately would like to see it. That is without me getting hand-on with it. So it has led me into the netherworld of the docutils state machine, the inspect module, Kid XML templating. It's all hard for me to keep up with - but that's how I learned to ski, following folks down the mountain who know what the hell they were doing, and trying to keep up. Pudge cite: http://pudge.lesscode.org/ The end. Art > > From andre.roberge at gmail.com Sat Mar 4 16:47:49 2006 From: andre.roberge at gmail.com (Andre Roberge) Date: Sat, 4 Mar 2006 11:47:49 -0400 Subject: [Edu-sig] Introducing classes In-Reply-To: <000001c63f9f$70b18570$1702a8c0@BasementDell> References: <7528bcdd0603032011o53b25d03rf49aef51be7eae10@mail.gmail.com> <000001c63f9f$70b18570$1702a8c0@BasementDell> Message-ID: <7528bcdd0603040747h6248306fj79e65a297f95a091@mail.gmail.com> On 3/4/06, Arthur wrote: > > >-----Original Message----- > > >On Behalf Of Andre Roberge > > > >A long time ago, Kirby suggested to me (on this list I > > >believe - I can't trace the post right now) that perhaps I > > >should use rur-ple's code itself as an example to use. > > If it is appropriate to talk about our projects and where we are with them > and what is driving are efforts, as I think it surely well should be: Personally, I find it motivating to hear about other people's "behind the scene thoughts" about their programming projects. > This resonates highly with how I have spent a good deal of my free time the > last month. Among my follies with PyGeo is trying to bring some life and > reality to the concept that the code is its text - both in terms of tying > together programming and functionality, and in tying together analytic > mathematics with geometry and the sensible world. This is very reminescent of Knuth's literate programming concept. I'd be curious to see what you think of Leo, the Python based outliner/editor. I don't use it myself, as I find it to be too much of a barrier between my brain and my code ;-) > Part of the problem there is of course making one's code worthy. Not sure I > can ever solve that with full satisfaction - but starting from little > things, I don't think you will be able to find a line in PyGeo anymore - far > from where it was - that is not orthodox in terms of something as simple and > 'unessential' as indentation. You made me curious, and I had to see what you meant. I only looked at the vpyframe.py file. I think I understand one thing: you use "inconsistent" indentation (mostly 3 spaces, a few times 4 spaces or 5 spaces. Python, being Python, makes the structure of your code understandable. However, as I use indentation guides set at 4 spaces in my editor, your indentation choices make it a bit more difficult for _me_ to read. [snip] > And where it has led me recently is on a journey connected to automated > documentation, having become enamored by what the Pudge documentation > project is trying to do - essentially auto generating context sensitive > hyperlinks between reStructured text doc strings and nicely colorized html > versions of the source code. [snip] > Pudge cite: > > http://pudge.lesscode.org/ Thanks for the link. Andr? From andre.roberge at gmail.com Sat Mar 4 17:03:07 2006 From: andre.roberge at gmail.com (Andre Roberge) Date: Sat, 4 Mar 2006 12:03:07 -0400 Subject: [Edu-sig] Introducing classes In-Reply-To: References: <7528bcdd0603032011o53b25d03rf49aef51be7eae10@mail.gmail.com> Message-ID: <7528bcdd0603040803l42627c1wb65dc0690fb9daf8@mail.gmail.com> On 3/4/06, kirby urner wrote: [snip] > Too much talk today, on adult math teacher lists, is about how "the > kids today" are dumber and/or less qualified than we were or are. > This is all a prelude / setup for not turning over significant > responsibility to younger people. > > Because our traditional school system has not made sophisticated use > of TV or multimedia (which young people grew up on), I tend to side > with them and make it part of my business to boost their power and > authority, in part by taking their talents and powers seriously. > > Related blog post: > http://controlroom.blogspot.com/2006/02/boosting-bandwidth.html > I agree that the education system could make a better use of modern multimedia tools ... but up to a point. A teacher should *not* have to be an entertainer first. A teacher should be a guide for learners, accompanying them in their journey. The goal of the journey might be for the learners to become their own entertainer, producing "stuff" that interest them - within the discipline being considered. This may mean having them use Python and related tools (e.g. PyGeo) to learn about mathematical concepts. *But*, it means having *them* (the learners) using Python and related and non-related tools. That's where I differ from some points you made in the above quoted blog entry. If all teachers shared your skills, perhaps I might come to a different conclusion. However, they do not ... and this is partly why I've argued to see more discussions about things like turtle.py - how it can be used in a teaching setting, simple examples, pedagogical guides, enhancements, etc. Something that can help your average teacher be a respected guide from what s/he can bring to their learners. Andr? > Kirby > From chuck at freshsources.com Sat Mar 4 18:05:12 2006 From: chuck at freshsources.com (Chuck Allison) Date: Sat, 4 Mar 2006 10:05:12 -0700 Subject: [Edu-sig] wxPython and COM Query In-Reply-To: <7528bcdd0603040803l42627c1wb65dc0690fb9daf8@mail.gmail.com> References: <7528bcdd0603032011o53b25d03rf49aef51be7eae10@mail.gmail.com> <7528bcdd0603040803l42627c1wb65dc0690fb9daf8@mail.gmail.com> Message-ID: <1707282754.20060304100512@freshsources.com> Hello All, I need to get up to speed on wxPython and was wondering if you could recommend the best resources for the task. Thanks! PS - When Mark Hammond's Windows stuff came out for 2.4, it became clear that the COM stuff was buggy. Does anyone know if that has been fixed? Thanks again. -- Best regards, Chuck From andre.roberge at gmail.com Sat Mar 4 18:19:12 2006 From: andre.roberge at gmail.com (Andre Roberge) Date: Sat, 4 Mar 2006 13:19:12 -0400 Subject: [Edu-sig] wxPython and COM Query In-Reply-To: <1707282754.20060304100512@freshsources.com> References: <7528bcdd0603032011o53b25d03rf49aef51be7eae10@mail.gmail.com> <7528bcdd0603040803l42627c1wb65dc0690fb9daf8@mail.gmail.com> <1707282754.20060304100512@freshsources.com> Message-ID: <7528bcdd0603040919t68d4c231h45d036438ff1f2e2@mail.gmail.com> On 3/4/06, Chuck Allison wrote: > Hello All, > > I need to get up to speed on wxPython and was wondering if you could > recommend the best resources for the task. Thanks! Perhaps not as your first step, but I would highly recommend that you have a look at the wxPython demo. I almost always look at it first when I want to learn to do something using wxPython. It requires a separate download. There's a new book that will be coming out soon which I definitely intend to buy: http://www.manning.com/books/rappin The cost of shipping to Canada is such that I will wait for it to be available through other channels (Chapter's or Amazon). However, from the link above, you can buy an e-book, which has about half the chapters available (it looks like the whole thing will be available within a month). I have heard great things about this book from wxPython users whose opinion I highly respect. Another path may be to use Dabo, which includes a wrapper around wxPython, and is supposed to be easier to learn. I've heard good things about it, but never tried it myself. Andr? > > PS - When Mark Hammond's Windows stuff came out for 2.4, it became > clear that the COM stuff was buggy. Does anyone know if that has > been fixed? Thanks again. > > -- > Best regards, > Chuck > From Scott.Daniels at Acm.Org Sat Mar 4 19:45:16 2006 From: Scott.Daniels at Acm.Org (Scott David Daniels) Date: Sat, 04 Mar 2006 10:45:16 -0800 Subject: [Edu-sig] wxPython and COM Query In-Reply-To: <7528bcdd0603040919t68d4c231h45d036438ff1f2e2@mail.gmail.com> References: <7528bcdd0603032011o53b25d03rf49aef51be7eae10@mail.gmail.com> <7528bcdd0603040803l42627c1wb65dc0690fb9daf8@mail.gmail.com> <1707282754.20060304100512@freshsources.com> <7528bcdd0603040919t68d4c231h45d036438ff1f2e2@mail.gmail.com> Message-ID: Andre Roberge wrote: > There's a new book that will be coming out soon which I definitely > intend to buy: > http://www.manning.com/books/rappin > The cost of shipping to Canada is such that I will wait for it to be > available through other channels (Chapter's or Amazon). However, from > the link above, you can buy an e-book, which has about half the > chapters available (it looks like the whole thing will be available > within a month). Most of it is already available, with the whole book due quite soon. By the way, if you buy the e-book from them, you can later use the e-book purchase price as credit towards the purchase of the paper book directly from them (which will be at full retail price). --Scott David Daniels Scott.Daniels at Acm.Org From chuck at freshsources.com Sat Mar 4 20:45:47 2006 From: chuck at freshsources.com (Chuck Allison) Date: Sat, 4 Mar 2006 12:45:47 -0700 Subject: [Edu-sig] wxPython and COM Query In-Reply-To: <7528bcdd0603040919t68d4c231h45d036438ff1f2e2@mail.gmail.com> References: <7528bcdd0603032011o53b25d03rf49aef51be7eae10@mail.gmail.com> <7528bcdd0603040803l42627c1wb65dc0690fb9daf8@mail.gmail.com> <1707282754.20060304100512@freshsources.com> <7528bcdd0603040919t68d4c231h45d036438ff1f2e2@mail.gmail.com> Message-ID: <1627813172.20060304124547@freshsources.com> Hello Andre, Thanks. I'll get the e-book from manning right now. Saturday, March 4, 2006, 10:19:12 AM, you wrote: AR> On 3/4/06, Chuck Allison wrote: >> Hello All, >> >> I need to get up to speed on wxPython and was wondering if you could >> recommend the best resources for the task. Thanks! AR> Perhaps not as your first step, but I would highly recommend that you AR> have a look at the wxPython demo. I almost always look at it first AR> when I want to learn to do something using wxPython. It requires a AR> separate download. AR> There's a new book that will be coming out soon which I definitely AR> intend to buy: AR> http://www.manning.com/books/rappin AR> The cost of shipping to Canada is such that I will wait for it to be AR> available through other channels (Chapter's or Amazon). However, from AR> the link above, you can buy an e-book, which has about half the AR> chapters available (it looks like the whole thing will be available AR> within a month). I have heard great things about this book from AR> wxPython users whose opinion I highly respect. AR> Another path may be to use Dabo, which includes a wrapper around AR> wxPython, and is supposed to be easier to learn. I've heard good AR> things about it, but never tried it myself. -- Best regards, Chuck From Scott.Daniels at Acm.Org Sun Mar 5 00:12:18 2006 From: Scott.Daniels at Acm.Org (Scott David Daniels) Date: Sat, 04 Mar 2006 15:12:18 -0800 Subject: [Edu-sig] suggestions about turtle.py In-Reply-To: <44055D68.30408@gmx.de> References: <44055D68.30408@gmx.de> Message-ID: Just for fun I stole some of the turtle code, added docstrings, used complex as position format, and made a small (but not entirely minimal) turtle class. I figured this might do as a straw-man for Myrtle the Minimal Turtle. I do like Christian Mascher's idea of making a turtle with a contained Pen being how to control all of the "dir()" results. --Scott David Daniels Scott.Daniels at Acm.Org -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: myrtle.py Url: http://mail.python.org/pipermail/edu-sig/attachments/20060304/acc83a78/attachment.asc From kirby.urner at gmail.com Sun Mar 5 06:25:24 2006 From: kirby.urner at gmail.com (kirby urner) Date: Sat, 4 Mar 2006 21:25:24 -0800 Subject: [Edu-sig] Introducing classes In-Reply-To: <000001c63f9a$22d33ba0$1702a8c0@BasementDell> References: <000001c63f9a$22d33ba0$1702a8c0@BasementDell> Message-ID: > The difference in our sensitivities here has to do with the fact that I am > unwilling to forget that the media our kids are experiencing is as it is > only as a matter of market forces. The classroom should be a haven, and a > respite and a counterforce. And one way to communicate to kids that we are > somewhere else, is to turn off the TV. > > Art We should distinguish between TV as a medium for communication, and the programming (content). With free Google video streaming etc., more affordable equipment, it's ever more feasible for kids to author their own media, which is what my earlier cited blog post was in part about. And you could get educational videos other than via commerical broadcast or even cable. Yes, these cost money to produce, but so do text books. >From my point of view, economics doesn't stop at the school house even pre-TV. This idea of a "haven" seems ultra-naive. Those text book companies have a bottom line to think about, plus economic needs have always shaped what gets taught (or *not* taught as the case may be). I worked at McGraw-Hill in the 1980s. I'm not entirely clueless about these things. I think TV as a medium is what kids need fluency in, as creators, not just passive consumers. Watch what others have done with an eye towards doing your own. Same as in music, other media. I think to NOT make this medium a part of schooling is part of the cultural and generational breakdown that's happening around school. Kids get brought up on TV from a very young age, develop their brains around it, but then are expected to go cold turkey with when it comes to formal education. That's really screwed up. It's not a haven we create, but a bandwidth starvation zone. Kirby From ajsiegel at optonline.net Sun Mar 5 14:51:22 2006 From: ajsiegel at optonline.net (Arthur) Date: Sun, 05 Mar 2006 08:51:22 -0500 Subject: [Edu-sig] Introducing classes In-Reply-To: Message-ID: <000301c6405b$e5216350$1702a8c0@BasementDell> > >-----Original Message----- > >From: edu-sig-bounces at python.org > >[mailto:edu-sig-bounces at python.org] On Behalf Of kirby urner > > > > > >With free Google video streaming etc., more affordable > >equipment, it's ever more feasible for kids to author their > >own media, which is what my earlier cited blog post was in > >part about. Having a son who has surprised me with his interest and aptitude in doing this kind of thing - I can't completely disagree. One thing he showed me was something he did taking stills of him and his friends and setting them to music - a rap song. Without going into details - it was very funny and well executed. Off-color - and something he did for his and his friends' amusement, not for school. I didn't ask too many questions, but my impression was that the tool he used was a blackmarket copy of Final Cut Pro. Because that I guess is what he was taught to use, and obviously a student cannot hope to have access to a legal copy. So I will not fight you - with the proviso that the kids are not being taught to use expensive proprietary tools. Hopefully stimulating the imagination does not need to include stimulating the criminal mind ;) Art From bmiller at luther.edu Sun Mar 5 15:47:21 2006 From: bmiller at luther.edu (Brad Miller) Date: Sun, 5 Mar 2006 08:47:21 -0600 Subject: [Edu-sig] SIGCSE Special Session Slides Message-ID: <322A20C5-2079-4FC1-83B6-73D5A6498451@luther.edu> Hi Everyone: I have posted the slides, and miscellaneous links from the SIGCSE Special Session "Successful Approaches to Teaching Introductory Computer Science Courses with Python" You can find them at http://www.cs.luther.edu/Python The special session was a lot of fun and we had an excellent turnout. We counted over 100 people in attendance! The discussion following our short presentation was very positive. It is clear that there is growing interest in using Python for introductory computer science. Brad -- Brad Miller, PhD Assistant Professor Luther College http://www.cs.luther.edu/~bmiller jabber: bnmnetp at jabber.org -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/edu-sig/attachments/20060305/ee07eec6/attachment.htm -------------- next part -------------- A non-text attachment was scrubbed... Name: PGP.sig Type: application/pgp-signature Size: 186 bytes Desc: This is a digitally signed message part Url : http://mail.python.org/pipermail/edu-sig/attachments/20060305/ee07eec6/attachment.pgp From kirby.urner at gmail.com Sun Mar 5 16:47:21 2006 From: kirby.urner at gmail.com (kirby urner) Date: Sun, 5 Mar 2006 07:47:21 -0800 Subject: [Edu-sig] Introducing classes In-Reply-To: <000301c6405b$e5216350$1702a8c0@BasementDell> References: <000301c6405b$e5216350$1702a8c0@BasementDell> Message-ID: > So I will not fight you - with the proviso that the kids are not being > taught to use expensive proprietary tools. > Open source to the rescue here. Kirby From kirby.urner at gmail.com Sun Mar 5 17:11:55 2006 From: kirby.urner at gmail.com (kirby urner) Date: Sun, 5 Mar 2006 08:11:55 -0800 Subject: [Edu-sig] SIGCSE Special Session Slides In-Reply-To: <322A20C5-2079-4FC1-83B6-73D5A6498451@luther.edu> References: <322A20C5-2079-4FC1-83B6-73D5A6498451@luther.edu> Message-ID: > The special session was a lot of fun and we had an excellent turnout. We > counted over 100 people in attendance! The discussion following our short > presentation was very positive. It is clear that there is growing interest > in using Python for introductory computer science. > > Brad > -- > Brad Miller, PhD > Assistant Professor > Luther College > http://www.cs.luther.edu/~bmiller > jabber: bnmnetp at jabber.org Excellent! Along similar lines, I was at an all-Oregon computer conference yesterday and although I didn't make any formal presentation, it was a small gathering and I got to be an effective diplomat for Python. Plus there was obvious interest in the language independently of me (although of those present, to my knowledge only Gary Frankenberry, a past president of this group, currently uses it with his high schoolers, as a prelude to doing some Java -- in addition to myself that is). More details are posted in my blog, for any curious: http://worldgame.blogspot.com/2006/03/sao-spring-conference-2006.html Kirby From lac at strakt.com Sun Mar 5 19:24:47 2006 From: lac at strakt.com (Laura Creighton) Date: Sun, 05 Mar 2006 19:24:47 +0100 Subject: [Edu-sig] This in the mail In-Reply-To: Your message of "Tue, 14 Feb 2006 13:38:48 +0100." References: <553fe0efa3c350a551e459027ad0df3f@dalkescientific.com> <200602131134.k1DBYuXa016109@theraft.strakt.com> <7fad29f8a309e4d40959de3fe1ff2876@dalkescientific.com> <200602141040.k1EAeABi016336@theraft.strakt.com> Message-ID: <200603051824.k25IOlqX018534@theraft.strakt.com> I got this in the mail today. Any teachers need some? Laura ------------ Folks - My company is looking to replace about 300 (!) 1U rack mount linux boxes. Anyone interested in them for either bulk purchase or for a worthy charitable cause? Specs: 1U chassis w/ 150W PSU Pentium 4 (some 2.4Ghz, some 2.8Ghz) Fairly standard desktop motherboard 512MB RAM 40GB ATA disk 2x ethernet (some FE, some GE) No warranty, floppy drive, cd-rom, or anything else The units are located in San Francisco, and if you're interested you need to think about the logistics of getting them to where you want them. Caveats: - - Please - this information is *not* for public consumption. If you talk to someone else about them, don't mention the company name, just refer them to me. - - The machines are currently in active use on our grid... but there's probably some duds in the group - - Be aware that these servers are noisy(!) and power-hungry. -------------------------------- From delza at livingcode.org Mon Mar 6 05:53:24 2006 From: delza at livingcode.org (Dethe Elza) Date: Sun, 5 Mar 2006 20:53:24 -0800 Subject: [Edu-sig] IDLE wish (was Edu-sig Digest, Vol 31, Issue 16) In-Reply-To: References: <000001c63ed3$133834b0$1702a8c0@BasementDell> <4408C1D5.4070602@aon.at> <24d517dd0603031445s4cf1a8a3m2a9d8809b6787565@mail.gmail.com> Message-ID: <8749C633-1245-4529-A00A-8550B9F702E3@livingcode.org> On 3-Mar-06, at 4:57 PM, kirby urner wrote: > I never ever said I "don't like" turtle.py nor did I suggest deleting > it from the Standard Library. Not once. My apologies, I certainly didn't intend to put words into either Kirby or Arthur's mouths. I was only trying to address the "let's move this off list," ostensibly because both Kirby and Arthur had made some form of disapproving comments (not anti-turtle!). Personally, this kind of discussion is exactly the kind of thing that belongs on edu-sig, and it's a breath of fresh air to have so many different people posting on a topic (not that I am anti-Kirby or anti- Arthur, just pro-diversity). And pro-turtle. I wrote my own turtle graphics before noticing there was one bundled (and taking a different tact with it, more direct manipulation of the turtles). > And do not confuse my views with Arthur's. He and I disagree on > many issues. I don't know. Has anyone ever seen Arthur and Kirby in the same room together? %-) --Dethe All space and matter, organic or inorganic, has some degree of life in it [...] All matter/space has some degree of "self" in it. If either of these claims comes, in future, to be considered true, that would radically change our picture of the universe. --Christopher Alexander From delza at livingcode.org Mon Mar 6 06:13:20 2006 From: delza at livingcode.org (Dethe Elza) Date: Sun, 5 Mar 2006 21:13:20 -0800 Subject: [Edu-sig] IDLE wish (was Edu-sig Digest, Vol 31, Issue 16) In-Reply-To: <002501c63f2a$943a68b0$1702a8c0@BasementDell> References: <002501c63f2a$943a68b0$1702a8c0@BasementDell> Message-ID: <90D56688-0833-4480-B2CC-163A058BC4A4@livingcode.org> > Have said 4 times now that I have no problem with it in the standard > distribution. My apologies for misrespresenting you, but that is how you were coming across. I was trying to address the perception more than what you actually said, but I could have made that more clear. I'm sorry about that. > And never said I didn't like it - as it is, i.e. with its current > scope. > > Why does my position here keep getting misrepresented? Um, possibly because you come off pretty strongly, and seemed to be upset that it was even being discussed? > And no, I am not suggesting we don't fix bugs. But that's kind of how it came across. Of course, others weren't so clear about the scope they were addressing, either. There was room for improved communication all around. > You know where the line is - I don't. But we seem to agree there > is a line > to be watched. I don't necessarily know where the line is, but what folks are proposing (i.e., fix the more egregious things in turtle.py, so that it is usable more or less as-is) seems approporiate to me. That doesn't make it so, just one voice and all that. > Long history of not feeling like I am working within a > meritocracy. Nobody > could find it in their heart to support me on the contention that > an IDLE > that cannot run a setup.py is something to be addressed. Sorry, I don't remember that discussion, but I don't follow every thread that closely. > Perhaps if I found > some support when I try to push a point that is straight-forward > sensible > (nothing seems to happen without *some* pushing), I'd be less > reactive in a > discussion that had some unavoidable level of controversy. I think someone else mentioned here that often when there is no feedback, it's because others on the list either have no strong opinion on a matter, or aren't familiar enough with the issue to push their opinion, or have nothing relevant to add to the discussion. On other lists sometimes people will post with nothing more than a "+1" in the body, kind of like, "Yeah, what you said" or "me too!" On this list, as far as I have been able to observe, people mainly wait to post until they have something more substantive to add to the conversation (which often means we see more posts that disagree than posts that agree, since it's easier to substantively disagree). > If I take my boyscout hat off, and put on my businessman's hat - it > seems to > me that a vpython in the standard distribution would be a much more > significant thing to think and work toward if we are concerned about > Python's popularity and its utility in the classroom. I'd love to see a VPython in the standard distro, but it's not going to happen. The VPython folks have enough trouble getting it to compile and run on both Windows and Linux (the only way to run it on a Mac is to pretend it's Linux, load it up with tons of linux libraries, and run it under X-Windows instead of the native Mac interface). Python runs in lots of places that VPython never will. Tkinter tends to run in most of those places as well, which is probably why it is still bundled with the standard distro. All that given, I'd be in favor of seeing a "more batteries included" distro of Python for the big three platforms (Windows, Linux, Mac) that included VPython, PyGame, and other neat toys. But recent efforts with the Cheese Shop and easy_install are making an uber- distro of Python less necessary, since it's becoming much easier to add the libraries you need/want. > Mostly because it > actually highlights some of Python's indigenous strengths - not only > providing friendly access to high performance graphics in C++, but > doing so > in such a way that the C++ graphical objects can be subclassed and > extended > in pure Python. Seems to me - with my businessman's hat on - that > one wants > to showcase those kinds of facilities. It's competitive out there. > And as > useful as a turtles might be in the classroom, there are many > turtles out > there, and there is nothing indigenous to Python about them. Get > Python - > its turtles are pretty OK. My businessman doesn't get excited. Yes, turtles aren't going to be big sales items for Python, but this isn't the python marketing list. Teachers dig 'em, kids get 'em, we should at least fix 'em so they work consistently. --Dethe "Any idea that couldn't stand a few decades of neglect is not worth anything." --Gabriel Garcia Marquez From kirby.urner at gmail.com Mon Mar 6 07:06:48 2006 From: kirby.urner at gmail.com (kirby urner) Date: Sun, 5 Mar 2006 22:06:48 -0800 Subject: [Edu-sig] IDLE wish (was Edu-sig Digest, Vol 31, Issue 16) In-Reply-To: <8749C633-1245-4529-A00A-8550B9F702E3@livingcode.org> References: <000001c63ed3$133834b0$1702a8c0@BasementDell> <4408C1D5.4070602@aon.at> <24d517dd0603031445s4cf1a8a3m2a9d8809b6787565@mail.gmail.com> <8749C633-1245-4529-A00A-8550B9F702E3@livingcode.org> Message-ID: > I don't know. Has anyone ever seen Arthur and Kirby in the same room > together? > I have. :-D Kirby From ajsiegel at optonline.net Mon Mar 6 14:57:00 2006 From: ajsiegel at optonline.net (ajsiegel at optonline.net) Date: Mon, 06 Mar 2006 08:57:00 -0500 Subject: [Edu-sig] IDLE wish (was Edu-sig Digest, Vol 31, Issue 16) In-Reply-To: <90D56688-0833-4480-B2CC-163A058BC4A4@livingcode.org> References: <002501c63f2a$943a68b0$1702a8c0@BasementDell> <90D56688-0833-4480-B2CC-163A058BC4A4@livingcode.org> Message-ID: ----- Original Message ----- From: Dethe Elza > > Um, possibly because you come off pretty strongly, and seemed to be > upset that it was even being discussed? Yeah I guess I do and I was. OTOH, in reading back through the thread I see that Vern was quite explicit, let's get some basic things fixed and *then* decide how much we want to push for a less minimal turtle in the the standard distribution. I can see that my focus on the 2nd stage disrupted the discussion of the first. I owe an apology and I offer it. > > All that given, I'd be in favor of seeing a "more batteries > included" > distro of Python for the big three platforms (Windows, Linux, Mac) > that included VPython, PyGame, and other neat toys. But recent > efforts with the Cheese Shop and easy_install are making an uber- > distro of Python less necessary, since it's becoming much easier to > add the libraries you need/want. I am not yet a fan of easy install, and I know I am not alone in that. And there is nothing at all easy about it at the monent, it requiring an install of the installer. My point about IDLE not running setup.py is and was exactly to this issue. I still wish I could get some substantive reaction, I think it important. Art From vceder at canterburyschool.org Mon Mar 6 16:51:32 2006 From: vceder at canterburyschool.org (Vern Ceder) Date: Mon, 06 Mar 2006 10:51:32 -0500 Subject: [Edu-sig] IDLE wish (was Edu-sig Digest, Vol 31, Issue 16) In-Reply-To: References: <002501c63f2a$943a68b0$1702a8c0@BasementDell> <90D56688-0833-4480-B2CC-163A058BC4A4@livingcode.org> Message-ID: <440C5A84.3030700@canterburyschool.org> ajsiegel at optonline.net wrote: > I can see that my focus on the 2nd stage disrupted the discussion of the first. > > I owe an apology and I offer it. Completely accepted for my part. It actually clears up why we couldn't understand each other - we were discussing different questions. As to part 2, I would tend to come down more on the conservative side myself. > I am not yet a fan of easy install, and I know I am not alone in that. > > And there is nothing at all easy about it at the monent, it requiring an install of the > installer. > > My point about IDLE not running setup.py is and was exactly to this issue. I still wish > I could get some substantive reaction, I think it important. I agree, actually. I would say it's just one of IDLE's shortcomings, but I've noticed it as well. This lack of ability to run a script with parameters makes IDLE much less useful for intermediate programmers as well. Add to that IDLE's general quirkiness (esp. on Windows), a few stray bugs, and it is definitely not helping the cause. Vern -- This time for sure! -Bullwinkle J. Moose ----------------------------- Vern Ceder, Director of Technology Canterbury School, 3210 Smith Road, Ft Wayne, IN 46804 vceder at canterburyschool.org; 260-436-0746; FAX: 260-436-5137 From andre.roberge at gmail.com Mon Mar 6 17:08:49 2006 From: andre.roberge at gmail.com (Andre Roberge) Date: Mon, 6 Mar 2006 12:08:49 -0400 Subject: [Edu-sig] IDLE wish (was Edu-sig Digest, Vol 31, Issue 16) In-Reply-To: <440C5A84.3030700@canterburyschool.org> References: <002501c63f2a$943a68b0$1702a8c0@BasementDell> <90D56688-0833-4480-B2CC-163A058BC4A4@livingcode.org> <440C5A84.3030700@canterburyschool.org> Message-ID: <7528bcdd0603060808s4b9e4e27t954616cdcedfabfe@mail.gmail.com> On 3/6/06, Vern Ceder wrote: > I agree, actually. I would say it's just one of IDLE's shortcomings, but > I've noticed it as well. This lack of ability to run a script with > parameters makes IDLE much less useful for intermediate programmers as > well. Add to that IDLE's general quirkiness (esp. on Windows), a few > stray bugs, and it is definitely not helping the cause. Sorry if my reply is starting to stray from the original topic. Not too long ago I wrote a little app (named "Lightning Compiler") that is meant to provide a nice, albeit limited, environment to play with scripts. It comes with a very simple editor and an interpreter window. It does have the ability (implemented just for fun, never tested seriously) to run scripts with parameters. I released it publicly (and provided a recipe for the online Python Cookbook) as it had a feature (handling of input and raw_input) that took me a while to figure out, and wanted to save others the trouble. I got more feedback on Lightning Compiler in a couple of weeks than I did on rur-ple in about a year an a half!! It might be useful for teachers in a classroom situation. It is available from rur-ple's sourceforge page: https://sourceforge.net/project/showfiles.php?group_id=125834 On the down side, it does require wxPython which is not an "included battery"! Andr? > > Vern > From ajsiegel at optonline.net Mon Mar 6 22:13:51 2006 From: ajsiegel at optonline.net (ajsiegel at optonline.net) Date: Mon, 06 Mar 2006 16:13:51 -0500 Subject: [Edu-sig] IDLE wish (was Edu-sig Digest, Vol 31, Issue 16) In-Reply-To: <440C5A84.3030700@canterburyschool.org> References: <002501c63f2a$943a68b0$1702a8c0@BasementDell> <90D56688-0833-4480-B2CC-163A058BC4A4@livingcode.org> <440C5A84.3030700@canterburyschool.org> Message-ID: ----- Original Message ----- From: Vern Ceder > > I owe an apology and I offer it. > > Completely accepted for my part. Thank you. For consummating a rare online transaction ;) > Vern > > -- > This time for sure! > -Bullwinkle J. Moose Mr. Moose is an old hero of mine. I have an homage to him in my study - an old album cover with him and his squirrel friend displayed. Though I can't say I could have recalled his full name, middle initial and all. ahead of me again. ;) Art From glingl at aon.at Tue Mar 7 00:46:59 2006 From: glingl at aon.at (Gregor Lingl) Date: Tue, 07 Mar 2006 00:46:59 +0100 Subject: [Edu-sig] Introducing classes (from functions to methods) In-Reply-To: <7528bcdd0603032011o53b25d03rf49aef51be7eae10@mail.gmail.com> References: <7528bcdd0603032011o53b25d03rf49aef51be7eae10@mail.gmail.com> Message-ID: <440CC9F3.1060603@aon.at> Andre Roberge wrote: > ... I thought of how I would go > about to introduce classes, to users of rur-ple that have already > written simple programs to make a robot (Reeborg) move in his world, > both using the "function" notation and the OOP notation. > ... Hi Andre and all of you, may I give you a short sketch of my approach to this problem, just as a supplement to your approach. It mainly deals with the transition from writing functions to writing (classes and) methods and understanding the role of the self parameter: You surely will not be surprised, that I do it with turtles. For your convenience with standard turtle.py ;-) Say, my students have written a short function >>> def polystep(length, angle): forward(length) left(angle) to make the (anonymous) turtle (more exactly: Pen) draw spirals like >>> for l in range(4,80,4): polystep(l, 90) Sometimes we say, we have taught the turtle a new word: polystep. So she now knows how to polystep. Say, my students then have learned to use turtle objects: >>> joe=Pen() >>> ann=Pen() >>> ann.left(180) >>> for turtle in joe, ann: turtle.up() turtle.forward(100) turtle.down() Wie now have two turtles at different positions on the screen. Now we want joe and ann to draw a spiral. We can do that this way: >>> for l in range(4,80,4): for turtle in joe, ann: turtle.forward(l) turtle.left(90) We would appreciate it, if joe and ann both knew how to polystep: >>> for l in range(4,80,4): for turtle in joe, ann: turtle.polystep(l,90) So - as a first step towards our goal - we want to modify polystep in order to pass a turtle object to it. This way it would know which turtle should perform the polystep: >>> def polystep(turtle, length, angle): turtle.forward(length) turtle.left(angle) Now we can make our spirals like this: >>> for l in range(4,80,4): for turtle in joe, ann: polystep(turtle,l,90) We would prefer the last line to be: turtle.polystep(l,90) i. e., that our turtles undertand how to polystep. So we make a new class, (I omit some necessary explanations here which you easily can fill in) >>> class MyPen(Pen): pass which we can immediately investigate, e.g.: >>> joe = MyPen() >>> ann = MyPen() >>> joe.color("red") >>> joe.forward(50) >>> ann.left(90) >>> ann.forward(50) >>> So we see, that MyPens (i.e. MyPen instances) know everything Pens know. MyPen is a subclass of Pen: >>> isinstance(joe, MyPen) True >>> isinstance(joe,Pen) True Every MyPen is a Pen Now we want MyPens to know more thatn Pens. So we have to teach them something new: we make polystep a method of MyPen. (The students know methods, e.g. forward as a method of Pen): >>> class MyPen(Pen): def polystep(turtle, length, angle): turtle.forward(length) turtle.left(angle) We now can observe, that we have achieved, what we wanted: >>> joe = MyPen() >>> ann = MyPen() >>> ann.left(180) >>> for turtle in joe, ann: turtle.up() turtle.forward(100) turtle.down() >>> for l in range(4,80,4): for turtle in joe, ann: turtle.polystep(l,90) works as desired. We now have to explain, why there are only two arguments in the call of polystep. Lets try (arbitrary) three: >>> joe.polystep(1,2,3) Traceback (most recent call last): File "", line 1, in ? joe.polystep(1,2,3) TypeError: polystep() takes exactly 3 arguments (4 given) >>> This shows, what the Pythoninterpreter thinks about this call. He counts joe as a fourth argument. So >>> joe.polystep(50, 90) in fact has passed three arguments to the polystep method of MyPen, joe beeing passed to the first one, turtle. Really? Really! It does the same as: >>> MyPen.polystep(joe, 50, 90) That means, that the interpreter passes the turtle it*self* (for which the method is called) to the first parameter of the method. Taking into account, that one may chose variable names freely, but should chose them so, that the names appropriately describe the meaning, we replace the name turtle by the name self (and explain that that is a convention in Python): >>> class MyPen(Pen): def polystep(self, length, angle): self.forward(length) self.left(angle) This last step changes nothing, except (hopefully) enhancing our understanding of the process of moving on from defining functions to defining methods, and especially of the role of self. Regards, Gregor -- Gregor Lingl Reisnerstrasse 3/19 A-1030 Wien Telefon: +43 1 713 33 98 Mobil: +43 664 140 35 27 Website: python4kids.net From delza at livingcode.org Tue Mar 7 00:48:48 2006 From: delza at livingcode.org (Dethe Elza) Date: Mon, 6 Mar 2006 15:48:48 -0800 Subject: [Edu-sig] IDLE wish (was Edu-sig Digest, Vol 31, Issue 16) In-Reply-To: References: <002501c63f2a$943a68b0$1702a8c0@BasementDell> <90D56688-0833-4480-B2CC-163A058BC4A4@livingcode.org> Message-ID: <24d517dd0603061548w5db001eau8e2ea4ad10f4030a@mail.gmail.com> > I am not yet a fan of easy install, and I know I am not alone in that. I'm still getting used to it as well, and some parts are not finished yet, but it is clearly the best way forward for installing and maintaining python packages. > And there is nothing at all easy about it at the monent, it requiring an install of the > installer. Yes. Here is the "one-line" (split for email) setup_tools installer-installer: python -c "import urllib; urllib.main()" \ http://peak.telecommunity.com/dist/ez_setup.py \ | python - -U setuptools > My point about IDLE not running setup.py is and was exactly to this issue. I still wish > I could get some substantive reaction, I think it important. I missed the point about IDLE not running setup.py, but I can guess that running setup.py inside another process could confuse it when it tries to do dependency analysis to see which files to include. That was a problem when I included a setup.py-like script in the same file as the rest of my code (for one-file distribution). It caused distutils to do a dependency analysis on itself and include everything for distutils in the executable. --Dethe From ajsiegel at optonline.net Tue Mar 7 01:39:56 2006 From: ajsiegel at optonline.net (ajsiegel at optonline.net) Date: Mon, 06 Mar 2006 19:39:56 -0500 Subject: [Edu-sig] IDLE wish (was Edu-sig Digest, Vol 31, Issue 16) In-Reply-To: <24d517dd0603061548w5db001eau8e2ea4ad10f4030a@mail.gmail.com> References: <002501c63f2a$943a68b0$1702a8c0@BasementDell> <90D56688-0833-4480-B2CC-163A058BC4A4@livingcode.org> <24d517dd0603061548w5db001eau8e2ea4ad10f4030a@mail.gmail.com> Message-ID: ----- Original Message ----- From: Dethe Elza > > python -c "import urllib; urllib.main()" \ > http://peak.telecommunity.com/dist/ez_setup.py \ > | python - -U setuptools My point exactly - for the audience that I am focusing on and that with which many on edu-sig are concerned. > > > My point about IDLE not running setup.py is and was exactly to > this issue. I still wish > > I could get some substantive reaction, I think it important. > > I missed the point about IDLE not running setup.py, but I can guess > that running setup.py inside another process could confuse it when it > tries to do dependency analysis to see which files to include. It's much more fundamental than that. How does one run any script from IDLE that requires a parameter? The fact that there isn't a straightforward, obvious GUI based way to do so is the issue. A setup.py script requires a parameter - "install". We are back to the command line, and new territory for many, before we have had the oppurtunity to influence them in the direction that ideally, it should not be. One might accept that the absence of a "run with parameter" menu item is a vote for minimalism. I recently voted for minimalism myself, someplace ;). To me, the concern of getting folks access to libraries and applications in a manner not so far outside their normal experience overrides any appreciation of IDLE's minimalism in this respect No other battery included is up to the job, and I suspect that this is a small amendment to the IDLE codebase. And directing them to IDLE to do an install is a natural way of introducing IDLE, and the concept of a programmers' editor, period. Art From andre.roberge at gmail.com Tue Mar 7 01:59:54 2006 From: andre.roberge at gmail.com (Andre Roberge) Date: Mon, 6 Mar 2006 20:59:54 -0400 Subject: [Edu-sig] IDLE wish (was Edu-sig Digest, Vol 31, Issue 16) In-Reply-To: References: <002501c63f2a$943a68b0$1702a8c0@BasementDell> <90D56688-0833-4480-B2CC-163A058BC4A4@livingcode.org> <24d517dd0603061548w5db001eau8e2ea4ad10f4030a@mail.gmail.com> Message-ID: <7528bcdd0603061659o686f4ed8o68195dc023bed2cb@mail.gmail.com> On 3/6/06, ajsiegel at optonline.net wrote: > ----- Original Message ----- > From: Dethe Elza > > > > > python -c "import urllib; urllib.main()" \ > > http://peak.telecommunity.com/dist/ez_setup.py \ > > | python - -U setuptools > > My point exactly - for the audience that I am focusing on and that with which many > on edu-sig are concerned. > > > > > > My point about IDLE not running setup.py is and was exactly to > > this issue. I still wish > > > I could get some substantive reaction, I think it important. > > > > I missed the point about IDLE not running setup.py, but I can guess > > that running setup.py inside another process could confuse it when it > > tries to do dependency analysis to see which files to include. > > It's much more fundamental than that. > > How does one run any script from IDLE that requires a parameter? > > The fact that there isn't a straightforward, obvious GUI based way to do so is the > issue. A setup.py script requires a parameter - "install". > > We are back to the command line, and new territory for many, before we have > had the oppurtunity to influence them in the direction that ideally, it should not be. > > One might accept that the absence of a "run with parameter" menu item is a vote > for minimalism. I recently voted for minimalism myself, someplace ;). > > To me, the concern of getting folks access to libraries and applications in a manner > not so far outside their normal experience overrides any appreciation of IDLE's > minimalism in this respect > > No other battery included is up to the job, and I suspect that this is a small amendment to > the IDLE codebase. > > And directing them to IDLE to do an install is a natural way of introducing IDLE, and the > concept of a programmers' editor, period. > (inspired by some other posts about silent agreements on this list and wanting to break this tradition ;-) Art: You've made some excellent points! +1 Andr? > Art > From kirby.urner at gmail.com Tue Mar 7 07:00:41 2006 From: kirby.urner at gmail.com (kirby urner) Date: Mon, 6 Mar 2006 22:00:41 -0800 Subject: [Edu-sig] From Kirby's corner... Message-ID: For my part, I've been musing on the animals we're seeing: turtles on Python. I'm into monkeys. And Python's a snake (some say a comedy troupe, but I say "it ate Monty"). I'm invited to a Shuttleworth Foundation gig in London in April to brainstorm on a proposed curriculum pipeline in South Africa that'd start 'em in Logo, move on to Squeak, thence to Python. Lots of big names invited, plus me. Then I notice the Scheme folks might come and wonder if they're like the zookeepers. because, like, we have all these animals: {Logo : turtle, Squeak : mouse, Python : snake}. Now the Schemers show up, and plan a circus or something? Anyway, interesting fantasy. My current interest is that Parrot avatar Jim Huginin demos in some of his IronPython previews. He grabs it out of the Windows .DLLs and makes it squawk and fly, from the Python command line. It's a cross between VPython and Looney Tunes (more flat than 3D). I think this stuff has potential, in terms of scripting, in terms of girls even caring. There's a title on my bookshelf about the computer screen having a lot in common with the theater stage. When you file in to a theater, take your seats in the rows, they hand you a Programme (no coincidence). The playwright writes a script. We need to make numeracy training more literary and vice versa, and I see computer animation and/or "GUI TV" as a bridge. But that doesn't mean losing touch with the command line and doing all drag and drop programming with icons (although we can do some of that too, ala GameMaker & Mindstorms). We'll still use ordinary Python -- just with different puppets than we might be used to, on the other ends of our strings. Kirby From ajsiegel at optonline.net Tue Mar 7 08:12:04 2006 From: ajsiegel at optonline.net (ajsiegel at optonline.net) Date: Tue, 07 Mar 2006 02:12:04 -0500 Subject: [Edu-sig] From Kirby's corner... In-Reply-To: References: Message-ID: ----- Original Message ----- From: kirby urner > For my part, I've been musing on the animals we're seeing: turtles on > Python. I'm into monkeys. And Python's a snake (some say a comedy > troupe, but I say "it ate Monty"). > > I'm invited to a Shuttleworth Foundation gig in London in April to > brainstorm on a proposed curriculum pipeline in South Africa that'd > start 'em in Logo, move on to Squeak, thence to Python. Lots of big > names invited, plus me. > > Then I notice the Scheme folks might come and wonder if they're like > the zookeepers. because, like, we have all these animals: {Logo : > turtle, Squeak : mouse, Python : snake}. Now the Schemers show up, > and plan a circus or something? Anyway, interesting fantasy. The Moose. Where is Mr. J pre-digital Moose. His absence has me feeling persectued, again. > > My current interest is that Parrot avatar Jim Huginin demos in some of > his IronPython previews. He grabs it out of the Windows .DLLs and > makes it squawk and fly, from the Python command line. It's a cross > between VPython and Looney Tunes (more flat than 3D). I think this > stuff has potential, in terms of scripting, in terms of girls even > caring. > > There's a title on my bookshelf about the computer screen having a lot > in common with the theater stage. When you file in to a theater, take > your seats in the rows, they hand you a Programme (no coincidence). > The playwright writes a script. Digital, actually is cold. And children are too sensitive not to perceive it as cold. Anything we can actually pet around? I'd feel better about it if I knew what problem, exactly, we were solving. Or are we just riding tsunamis. Art From ajsiegel at optonline.net Tue Mar 7 08:37:07 2006 From: ajsiegel at optonline.net (ajsiegel at optonline.net) Date: Tue, 07 Mar 2006 02:37:07 -0500 Subject: [Edu-sig] From Kirby's corner... In-Reply-To: References: Message-ID: ----- Original Message ----- From: ajsiegel at optonline.net > > Then I notice the Scheme folks might come and wonder if they're like > > the zookeepers. because, like, we have all these animals: {Logo : > > turtle, Squeak : mouse, Python : snake}. Now the Schemers show up, > > and plan a circus or something? Anyway, interesting fantasy. Let's say we find just the right formula: 3 turtles, a mouse, 2 snakes- shake and stir and we can create geeks at will. Remind me why that's good. Don't tell me - I know - Web Frameworks.. More web frameworks. ;) Art From kirby.urner at gmail.com Tue Mar 7 09:03:46 2006 From: kirby.urner at gmail.com (kirby urner) Date: Tue, 7 Mar 2006 00:03:46 -0800 Subject: [Edu-sig] From Kirby's corner... In-Reply-To: References: Message-ID: > Digital, actually is cold. And children are too sensitive not to perceive it as cold. > Yes, but they love cartoons. > Anything we can actually pet around? > I'm all for that too. Not either/or. > I'd feel better about it if I knew what problem, exactly, we were solving. > We're trying to recruit more girls by taking the edge off of technology some (more dolls, fewer bayonets). A kinder gentler CS? Doesn't mean we stop with the war games. Quakers play Quake. But it's metaphoric violence. > Or are we just riding tsunamis. > > Art Kids grow up watching a lot of TV, has a big impact. But pedagogy is still very pre-TV in a lot of ways, passed down through traditions that've been going since Rome and before. So how to break out of the pre-TV mode and embrace the fatter pipe bandwidths that computers and such now provide? I think by making TV, not just watching it, and that also means "scripting" with languages such as Python. I'm into multi-track audio also. Kirby From ajsiegel at optonline.net Tue Mar 7 15:44:42 2006 From: ajsiegel at optonline.net (ajsiegel at optonline.net) Date: Tue, 07 Mar 2006 09:44:42 -0500 Subject: [Edu-sig] From Kirby's corner... In-Reply-To: References: Message-ID: ----- Original Message ----- From: kirby urner > > We're trying to recruit more girls by taking the edge off of > technology some (more dolls, fewer bayonets). A kinder gentler CS? > Doesn't mean we stop with the war games. Quakers play Quake. But > it's metaphoric violence. Kirby, For my taste, you are getting your rap down way too well. For the record - I found it necessary to walk out of - yes - a Monty Python movie. Limbs were being severed, and people were laughing. Wasn't in that kind of mood. My sisters might think that the fact I couldn't sit through that at the time was a manifestation of mental imbalance. Trite stuff, your paragraph above, IMO. Art From kirby.urner at gmail.com Tue Mar 7 16:23:24 2006 From: kirby.urner at gmail.com (kirby urner) Date: Tue, 7 Mar 2006 07:23:24 -0800 Subject: [Edu-sig] From Kirby's corner... In-Reply-To: References: Message-ID: > For my taste, you are getting your rap down way too well. > Wait'll you hear the music that goes with it! (I haven't yet either). ;-D > For the record - I found it necessary to walk out of - yes - a Monty Python movie. > I had a lot of trouble with 'The Meaning of Life' when I saw it. I was already feeling dark, ended up feeling darker. > Limbs were being severed, and people were laughing. Wasn't in that kind of mood. > Hey, I understand. I've found MP's stuff hilarious, other times I just wasn't in the right frame of mind. That's how it is with humor. I'm not a fascist when it comes to making others laugh (not even at my own jokes). I like Ali G. quite a bit, when it comes to mentioning the talented comedians of our day. Paraphrasing from memory: Ali to retired astronaut: when youz came to the moon, what was the reaction of the peoples there? Astronaut: What?? We never had any thought that the moon would be populated! Ali: do you think man will ever walk on the sun? Astronaut (stifling incredulity): No. Ali G: how about in winter, when the sun is cold? His interview with Pat Buchanan -- I've watched it several times -- is a riot. Here's a blog entry with a link to QuickTime (still works, just checked it): http://worldgame.blogspot.com/2005/12/charter-school-approved.html (clip). > My sisters might think that the fact I couldn't sit through that at the time > was a manifestation of mental imbalance. > > Trite stuff, your paragraph above, IMO. > > Art S'OK. The question seemed kinda trite too. Fact is, we're gonna explore some options. Call it a tsunami, call it what you will. Don't care. I don't see any high risk that these experiments in using Gnu Math to make GUI TV will leave a lot of dead bodies in my wake (on the contrary, more likely we'll attract geek girlz), so I'm gonna go for it. Here's the *real* reason then: because I *want* to. And I'm not asking you to laugh. Kirby From wescpy at gmail.com Tue Mar 7 21:59:38 2006 From: wescpy at gmail.com (w chun) Date: Tue, 7 Mar 2006 12:59:38 -0800 Subject: [Edu-sig] ANN: 2006 Python training courses, San Francisco In-Reply-To: <78b3a9580603071020k59e65356rc8f9279181a826d2@mail.gmail.com> References: <78b3a9580603071020k59e65356rc8f9279181a826d2@mail.gmail.com> Message-ID: <78b3a9580603071259n4215878du948ac96f04ed41a2@mail.gmail.com> Dear Edu-Sig, Below is the announcement we made earlier today regarding our intro and advanced Python courses for the remainder of 2006. There are significant discounts for students/teachers. Please snip this msg and forward the attachment below to anyone whom you think would be interested or would benefit from Python training courses. This includes Plone, Zope, and Mailman groups as well. Thanks for your interest, -Wesley ---------- Forwarded message ---------- From: w chun Date: Mar 7, 2006 10:20 AM Subject: ANN: 2006 Python training courses, San Francisco WE are giving 4 more Python training sessions (held near the San Francisco airport) for the remainder of this year. For the first time, there will be an "advanced" Python course available to the public. In fact, we've added the March intro course date for those prepping to take the advanced class in May. You may register for any of the 4 courses/dates below. (Intensive) Introduction to Python March 29-31, 2006 August 16-18, 2006 Advanced Python Programming May 17-19, 2006 November 8-10, 2006 LOCALS: it'll be at a hotel with BART and CalTrain access (San Bruno stations) VISITORS: free shuttle directly from the San Francisco airport, lots of free food and wireless DISCOUNTS available. for more info and details, go to http://cyberwebconsulting.com and click "Python training." cheers, -wesley ps. a great big public THANKS to Rob Stephenson for putting together the short PodCast clip of one of our training sessions for your viewing pleasure on a video iPod or iTunes on your Mac! - - - - - - - - - - - - - - - - - - - - - - - - - - - - "Core Python Programming", Prentice Hall, (c)2006,2001 http://corepython.com wesley.j.chun :: wescpy-at-gmail.com cyberweb.consulting : silicon valley, ca http://cyberwebconsulting.com From kirby.urner at gmail.com Wed Mar 8 01:09:06 2006 From: kirby.urner at gmail.com (kirby urner) Date: Tue, 7 Mar 2006 16:09:06 -0800 Subject: [Edu-sig] A Quick Puzzle Message-ID: Here's a quick puzzle, that'd make a good source of Python programs, or programs in other languages: Assume dogs live at 7 times the rate of a man, such that when a man ages but one year, the dog ages by 7. Now assume a dog is born later than you, and you get her as a puppy (feel free to mess with these gender assumptions). At some point, as long as you keep living (assume that you do), the dog will catch up to you, and overtake you in age (the dog too, keeps living, at least long enough for the two life-lines to intersect). So challenge: write a program where you input the two birth dates, yours and your dog's. What the script returns is the very day of the very month of the very year, on which you and your dog might reasonably celebrate a "same age" intersection, a "birthday in common" if you will (we could get more precise, but only if the birth times are known with equal precision). I'm actually working on this project now, in anticipation of earning five dollars. Jon Bunce, another Wanderer, has already worked out a formula and shared it around. But I'm thinking just for fun, to do something totally brute force using Julian dates. Anyway, it'll be fun to compare different solutions, in terms of accuracy, quirkiness, readability, speed -- lots of interesting criteria. Just another puzzle for the literature, not my invention, just something I've thought about. A guy with a real dog and a real interest in the answer, came to Don Wardwell with it, looking for the services of a real think tank. Over on the Math Forum, I couched it as a puzzle for cgi scripters, i.e. make up a web site calculator around this, using JavaScript or whatever (a new way to do story problems). Of course similar games may be played with other animals with different "life rates." Don't get too hung up on what actual ratios to use, unless that's a stated goal of the lesson. In most cases, just take these as puzzles, like Sudoku, not as literally true biology lessons. Kirby From kirby.urner at gmail.com Wed Mar 8 01:47:35 2006 From: kirby.urner at gmail.com (kirby urner) Date: Tue, 7 Mar 2006 16:47:35 -0800 Subject: [Edu-sig] New Python website Message-ID: I see the long-planned reskinning of the Python website is finally going down. edu-sig is as good a place as any to check out the handsome new template: http://www.python.org/community/sigs/current/edu-sig/ I'm glad I had the foresite to put a direct link to this archive at the very bottom of the page, as that direct relationship to a SIG mail list and archive appears to have been severed (used to be upper left -- check archive.org). Also, I don't see any direct attribution to me, as the page maintainer, which is good, because my SVN pipeline was broken anyway. I'd become a mere figure-head, another faceless name around campus. So I'm off the hook, swimming free. I still freely admit to enjoying Python though -- so charming. And I'm really in to Pythonic Mathematics, same as always, with a Buckyian spin. Scott, I connected with your friend J. Orr @ Willamette. Salem is obviously well supported from Portland, should that tiny CS faculty want to work with livewire snake charmers, seasoned, experienced. We should fire up PORPIG again. OSCON approacheth. Kirby From mtobis at gmail.com Wed Mar 8 01:49:27 2006 From: mtobis at gmail.com (Michael Tobis) Date: Tue, 7 Mar 2006 18:49:27 -0600 Subject: [Edu-sig] A Quick Puzzle In-Reply-To: References: Message-ID: # I love Python! import datetime # batteries included! me = datetime.date(1954,9,1) dog = datetime.date(2006,3,7) print me + (7 * (dog - me)/6) # mt On 3/7/06, kirby urner wrote: > Here's a quick puzzle, that'd make a good source of Python programs, > or programs in other languages: From tim.peters at gmail.com Wed Mar 8 02:12:09 2006 From: tim.peters at gmail.com (Tim Peters) Date: Tue, 7 Mar 2006 20:12:09 -0500 Subject: [Edu-sig] A Quick Puzzle In-Reply-To: References: Message-ID: <1f7befae0603071712k19a818fo274a93c21d997b37@mail.gmail.com> [kirby urner] > Here's a quick puzzle, that'd make a good source of Python programs, > or programs in other languages: > > Assume dogs live at 7 times the rate of a man, such that when a man > ages but one year, the dog ages by 7.... That vaguely reminds me of a puzzle I enjoyed much as a kid: on what day will you be half as old as your father? a third as old? a quarter as old? three-quarters as old? nine-tenths as old? ... It's a good way of showing that x/(x+d), for fixed positive d, approaches 1 from the left as x goes to infinity. Unfortunately, my own father died before I became twice as old as him ;-) From kirby.urner at gmail.com Wed Mar 8 03:42:02 2006 From: kirby.urner at gmail.com (kirby urner) Date: Tue, 7 Mar 2006 18:42:02 -0800 Subject: [Edu-sig] A Quick Puzzle In-Reply-To: References: Message-ID: Yeah, that looks like the Jon Bunce formula. Packing lap top. Hoping to claim $5 (I owe you a beer). Kirby On 3/7/06, Michael Tobis wrote: > # I love Python! > > import datetime # batteries included! > > me = datetime.date(1954,9,1) > dog = datetime.date(2006,3,7) > print me + (7 * (dog - me)/6) > > # mt > > > On 3/7/06, kirby urner wrote: > > Here's a quick puzzle, that'd make a good source of Python programs, > > or programs in other languages: > From kirby.urner at gmail.com Wed Mar 8 06:14:39 2006 From: kirby.urner at gmail.com (kirby urner) Date: Tue, 7 Mar 2006 21:14:39 -0800 Subject: [Edu-sig] A Quick Puzzle In-Reply-To: References: Message-ID: Michael -- Here's a cut and paste from Pauling House (boyhood home of Portland *other* famous Linus). IDLE 1.1.1 >>> import datetime >>> me = datetime.date(1952,12,17) >>> dog = datetime.date(1999, 1,2) >>> print me + (7 * (dog - me)/6) 2006-09-04 This is the real answer the guy wanted. Mission accomplished. No offer of $5 though. Kirby On 3/7/06, Michael Tobis wrote: > # I love Python! > > import datetime # batteries included! > > me = datetime.date(1954,9,1) > dog = datetime.date(2006,3,7) > print me + (7 * (dog - me)/6) > > # mt > > > On 3/7/06, kirby urner wrote: > > Here's a quick puzzle, that'd make a good source of Python programs, > > or programs in other languages: > From Scott.Daniels at Acm.Org Wed Mar 8 06:15:45 2006 From: Scott.Daniels at Acm.Org (Scott David Daniels) Date: Tue, 07 Mar 2006 21:15:45 -0800 Subject: [Edu-sig] A Quick Puzzle In-Reply-To: <1f7befae0603071712k19a818fo274a93c21d997b37@mail.gmail.com> References: <1f7befae0603071712k19a818fo274a93c21d997b37@mail.gmail.com> Message-ID: Tim Peters wrote: > That vaguely reminds me of a puzzle I enjoyed much as a kid: on what > day will you be half as old as your father? a third as old? a > quarter as old? three-quarters as old? nine-tenths as old? ... It's > a good way of showing that x/(x+d), for fixed positive d, approaches 1 > from the left as x goes to infinity. Unfortunately, my own father > died before I became twice as old as him ;-) I called my father up within an hour of when he was twice as old as I. I was expecting a real "you are such a dweeb" conversation, but he wound up talking a lot about what it felt like when I was born. It was such a wonderful surprise; a great conversation for both of us. -- Scott David Daniels Scott.Daniels at Acm.Org From kirby.urner at gmail.com Wed Mar 8 07:10:54 2006 From: kirby.urner at gmail.com (kirby urner) Date: Tue, 7 Mar 2006 22:10:54 -0800 Subject: [Edu-sig] A Quick Puzzle In-Reply-To: References: Message-ID: > This is the real answer the guy wanted. Mission accomplished. No > offer of $5 though. > > Kirby Still here at Pauling House (near 39th & Hawthorne, SE Portland). The dog owner remembered about the $5. I said I'm narrating the story in quasi real time, that his giving me a fiver would enter the annals of... well, not to over do it or anything. He paid me. Machael, I owe you that beer (Jon too, come to think of it). Kirby From radenski at chapman.edu Wed Mar 8 14:44:30 2006 From: radenski at chapman.edu (Atanas Radenski) Date: Wed, 8 Mar 2006 05:44:30 -0800 (PST) Subject: [Edu-sig] Python First: Free access for educators Message-ID: <1979.24.136.77.127.1141825470.squirrel@montreal.chapman.edu> I have published online a new 'Introduction to Computing with Python' study pack. This 'Python First' digital pack is intended for students with little or no prior programming experience. This digital pack is all-in-one solution. Ten self-contained online chapters consist of e-texts (66,000 words), 730 slides, 62 labs (36,000 words), 58 sample programs, and 10 quizzes (280 questions). An experienced instructor can start teaching within minutes of logging on to StudyPack.com for the first time. If you are an educator and are interested in the potential of Python, you can explore the 'Python First' digital pack at http://studypack.com/. To gain free personal access, open an account and use enrollment key 31415. More detailed instructions of how to enroll are posted here: http://studypack.com/comp/mod/resource/view.php?inpopup=true&id=1915. The following resources of interest to educators are available under the main menu of http://studypack.com. 1. 'Python First' Features http://studypack.com/comp/mod/resource/view.php?inpopup=true&id=2923 The 'Python First' pack is lab-based, paperless, and low-cost for students. This is more than a book, a digital pack to support blended courses for the net generation of students. 2. Student Surveys http://studypack.com/comp/mod/resource/view.php?id=2837 A recent student survey indicates that students like and prefer Python as a first language. Students also perceive the online study pack as very beneficial. Browse the posted survey results for details. 3. Questions and Answers http://studypack.com/comp/mod/glossary/view.php?id=2838 How a Python study pack is supposed to be used to support a course? Answers to this and other questions are provided in the Questions and Answers resource. 4. A tuition-free summer workshop for educators http://studypack.com/comp/mod/resource/view.php?inpopup=true&id=1916 A tuition-free Python workshop for educators will be held this June at Chapman University in Orange, California. Preliminary versions of the 'Python First' pack have been used by me and my colleagues at Chapman University in California since 2004. The pack will be used in other schools starting this fall. I will be happy to answer any questions or provide additional information. Respectfully, Atanas Radenski mailto:radenski at chapman.edu http://www.chapman.edu/~radenski/ From kirby.urner at gmail.com Wed Mar 8 16:50:57 2006 From: kirby.urner at gmail.com (kirby urner) Date: Wed, 8 Mar 2006 07:50:57 -0800 Subject: [Edu-sig] Python First: Free access for educators In-Reply-To: <1979.24.136.77.127.1141825470.squirrel@montreal.chapman.edu> References: <1979.24.136.77.127.1141825470.squirrel@montreal.chapman.edu> Message-ID: Cool, I'm in. Checking out your moodle. Another way people write switch: def switch(choice): if 0 References: <1979.24.136.77.127.1141825470.squirrel@montreal.chapman.edu> Message-ID: Dang, got away from me, anyway, like: def switch(choice, functions = [cf0, cf1, cf2, cf3]) if 0 wrote: > Cool, I'm in. Checking out your moodle. > > Another way people write switch: > > def switch(choice): > if 0 From wescpy at gmail.com Wed Mar 8 19:10:36 2006 From: wescpy at gmail.com (w chun) Date: Wed, 8 Mar 2006 10:10:36 -0800 Subject: [Edu-sig] Python First: Free access for educators In-Reply-To: References: <1979.24.136.77.127.1141825470.squirrel@montreal.chapman.edu> Message-ID: <78b3a9580603081010k78a0644dmace7203b70b5de53@mail.gmail.com> > def switch(choice, functions = [cf0, cf1, cf2, cf3]) should we really be showing folks using a mutable object as a default argument? ;-) i'd suggest: (1) changing it to a tuple, or (2) None and figure it out after that. cheers, -wesley From kirby.urner at gmail.com Wed Mar 8 19:34:39 2006 From: kirby.urner at gmail.com (kirby urner) Date: Wed, 8 Mar 2006 10:34:39 -0800 Subject: [Edu-sig] Python First: Free access for educators In-Reply-To: <78b3a9580603081010k78a0644dmace7203b70b5de53@mail.gmail.com> References: <1979.24.136.77.127.1141825470.squirrel@montreal.chapman.edu> <78b3a9580603081010k78a0644dmace7203b70b5de53@mail.gmail.com> Message-ID: > should we really be showing folks using a mutable object as a default > argument? ;-) > That was purely pathological on my part -- I was writing quirky "get the idea across" code, not "put this in a text book and publish it" code. > i'd suggest: (1) changing it to a tuple, or (2) None and figure it out > after that. Might not be a function at all, just embedded code, since you often don't need but one or two switch statements if any. Just some embedded try-except syntax might suffice. I tend not to use them much (switches), in part because I don't write 1970s-style via-menu i/o loops so much as just import the tools I need from a namespace and use them directly, i.e. the "switch" statement is behind my eyes (one might say)). That's how I expect others to use my modules as well -- no "switch" need apply. > cheers, > -wesley Kirby From kirby.urner at gmail.com Wed Mar 8 19:41:01 2006 From: kirby.urner at gmail.com (kirby urner) Date: Wed, 8 Mar 2006 10:41:01 -0800 Subject: [Edu-sig] Python First: Free access for educators In-Reply-To: References: <1979.24.136.77.127.1141825470.squirrel@montreal.chapman.edu> <78b3a9580603081010k78a0644dmace7203b70b5de53@mail.gmail.com> Message-ID: Kirby: > I tend not to use them much (switches), in part because I don't write > 1970s-style via-menu i/o loops so much as just import the tools I need > from a namespace and use them directly, i.e. the "switch" statement is > behind my eyes (one might say)). That's how I expect others to use my > modules as well -- no "switch" need apply. For an example of this approach, check out this recent thread on the Math Forum. Some teachers were concerned about finding the center of volume of a tetrahedron with simple 3-tuple coordinates (all ones and zeros). I show up with my Python interpreter and start operating a Vector type as I point to relevant off-screen diagrams and little-known math facts, involving the fractions 1/3 and 1/4. It's really a math lecture, with Python interleaved with the chalk and pretty much replacing the calculator. Like J or APL, it's another notation for learning math in. This is what I call Pythonic Mathematics. http://mathforum.org/kb/thread.jspa?threadID=1343350 Kirby From radenski at chapman.edu Wed Mar 8 19:42:43 2006 From: radenski at chapman.edu (Radenski, Atanas) Date: Wed, 8 Mar 2006 10:42:43 -0800 Subject: [Edu-sig] Python First: Free access for educators Message-ID: > Another way people write switch: > > def switch(choice): > if 0 -----Original Message----- > From: kirby urner [mailto:kirby.urner at gmail.com] > Sent: Wednesday, March 08, 2006 7:51 AM > To: Radenski, Atanas > Cc: edu-sig at python.org > Subject: Re: [Edu-sig] Python First: Free access for educators > > Cool, I'm in. Checking out your moodle. > > Another way people write switch: > > def switch(choice): > if 0 References: Message-ID: > I know this list is a most sophisticated Python audience. Any feedback > is appreciated. I can also explain my chosen pedagogy, should that need > arise. > > Cheers, > > Atanas Hi Atanas -- My broad brush stroke philosophy in this context is we're in the early stages of pioneering effective ways of teaching programming, in Python or any other language. How a language gets taught is not an easy business to describe and involves much trial and error. As a consequence, I am not eager to lay down any strict rules about how it should or must be done. Too early to get strident. Like, I'll be trying underunder-style operator overriding (overloading) as early as the 4th week, because I'm just using Python as a means to an end: what this is *really* about is the Vector type in math. Python is just a notation. But that's not necessarily the standard CS approach. The CS idea of heaven (as in "stairway to") seems to be: put Python students on an escalator to the even greater delights of Java (angel music, shaft of light). I mutter something about Bruce Eckel liking Python better, but usually under my breath, as I sense a fanatical gleam in their CS faculty eyes.[1] Anyway, my bottom line is: teach Python in any way you feel you're effective at. Teachers *cannot* simply pick up other teachers' skills and techniques at the drop of a hat. We're reprogrammable, but not *that* reprogrammable. I can't be you and you can't be me. So we shouldn't worry if our own style and effectiveness is not a carbon copy of someone else's. My Python moodles are very much geared to Algebra students. I'm looking at Polynomials, Polyhedra, Vectors and Rationals as "types in an extensible type system" with Python's OO illustrating what I mean by that (but it even kinda meant that pre-Python and pre formalized OO). So is this what I think everyone should be doing in their own respective moodles? Absolutely not. Then I'd feel a lot more redundant, and maybe have to find a new gig. But for now, my gig is pretty unique, and that suits me just fine (which doesn't mean I don't welcome competitors). Kirby [1] http://pythonjournal.cognizor.com/pyj2/Eckel.html From annaraven at gmail.com Wed Mar 8 20:18:09 2006 From: annaraven at gmail.com (Anna Ravenscroft) Date: Wed, 8 Mar 2006 11:18:09 -0800 Subject: [Edu-sig] Python First: Free access for educators In-Reply-To: <78b3a9580603081010k78a0644dmace7203b70b5de53@mail.gmail.com> References: <1979.24.136.77.127.1141825470.squirrel@montreal.chapman.edu> <78b3a9580603081010k78a0644dmace7203b70b5de53@mail.gmail.com> Message-ID: On 3/8/06, w chun wrote: > > > def switch(choice, functions = [cf0, cf1, cf2, cf3]) > > > should we really be showing folks using a mutable object as a default > argument? ;-) > > i'd suggest: (1) changing it to a tuple, or (2) None and figure it out > after that. I prefer dicts for this sort of thing. That way "choice" could be something meaningful. For example, I recently wrote a python script showing how different sorting algorithms work (for my discrete math class). I have a dict of algorithms, something like (I'm typing from memory before my first cup of coffee - go gentle on me): algs = {'quick':quicksort, 'merge':mergesort, "insert": insertionsort} choice = "quick" # however we get the choice..eg from the command line. if choice in algs: choice(datatosort) ... I really like not having to remember order. This way, I get the right function easily. And I can print out the list of keys to remind me which functions are available. Anna -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/edu-sig/attachments/20060308/3801bc14/attachment.html From vceder at canterburyschool.org Wed Mar 8 20:49:09 2006 From: vceder at canterburyschool.org (Vern Ceder) Date: Wed, 08 Mar 2006 14:49:09 -0500 Subject: [Edu-sig] Python First: Free access for educators In-Reply-To: References: <1979.24.136.77.127.1141825470.squirrel@montreal.chapman.edu> <78b3a9580603081010k78a0644dmace7203b70b5de53@mail.gmail.com> Message-ID: <440F3535.3010107@canterburyschool.org> I also was thinking thinking of using a dictionary, for pretty much the same reasons. +1 Vern Anna Ravenscroft wrote: > > > On 3/8/06, *w chun* > wrote: > > > def switch(choice, functions = [cf0, cf1, cf2, cf3]) > > > should we really be showing folks using a mutable object as a default > argument? ;-) > > i'd suggest: (1) changing it to a tuple, or (2) None and figure it out > after that. > > > I prefer dicts for this sort of thing. That way "choice" could be > something meaningful. For example, I recently wrote a python script > showing how different sorting algorithms work (for my discrete math > class). I have a dict of algorithms, something like (I'm typing from > memory before my first cup of coffee - go gentle on me): > > algs = {'quick':quicksort, 'merge':mergesort, "insert": insertionsort} > choice = "quick" # however we get the choice..eg from the command line. > if choice in algs: > choice(datatosort) > ... > > I really like not having to remember order. This way, I get the right > function easily. And I can print out the list of keys to remind me which > functions are available. > > Anna > > > ------------------------------------------------------------------------ > > _______________________________________________ > Edu-sig mailing list > Edu-sig at python.org > http://mail.python.org/mailman/listinfo/edu-sig -- This time for sure! -Bullwinkle J. Moose ----------------------------- Vern Ceder, Director of Technology Canterbury School, 3210 Smith Road, Ft Wayne, IN 46804 vceder at canterburyschool.org; 260-436-0746; FAX: 260-436-5137 From vceder at canterburyschool.org Wed Mar 8 21:06:34 2006 From: vceder at canterburyschool.org (Vern Ceder) Date: Wed, 08 Mar 2006 15:06:34 -0500 Subject: [Edu-sig] IDLE wish (was Edu-sig Digest, Vol 31, Issue 16) In-Reply-To: <7528bcdd0603060808s4b9e4e27t954616cdcedfabfe@mail.gmail.com> References: <002501c63f2a$943a68b0$1702a8c0@BasementDell> <90D56688-0833-4480-B2CC-163A058BC4A4@livingcode.org> <440C5A84.3030700@canterburyschool.org> <7528bcdd0603060808s4b9e4e27t954616cdcedfabfe@mail.gmail.com> Message-ID: <440F394A.1020704@canterburyschool.org> Andre. I like Lightening a lot! This is almost exactly what I have been wanting for beginners, and I may give it a try this spring. If IDLE behaved this well and was this easy to use things would be much better. The reliance on an unincluded "battery" is a real drawback for many environments, of course, but it may be worth the trouble. Regards, Vern Andre Roberge wrote: > On 3/6/06, Vern Ceder wrote: > >>I agree, actually. I would say it's just one of IDLE's shortcomings, but >>I've noticed it as well. This lack of ability to run a script with >>parameters makes IDLE much less useful for intermediate programmers as >>well. Add to that IDLE's general quirkiness (esp. on Windows), a few >>stray bugs, and it is definitely not helping the cause. > > > Sorry if my reply is starting to stray from the original topic. > Not too long ago I wrote a little app (named "Lightning Compiler") that > is meant to provide a nice, albeit limited, environment to play with scripts. > It comes with a very simple editor and an interpreter window. It does > have the ability (implemented just for fun, never tested seriously) to > run scripts > with parameters. I released it publicly (and provided a recipe for the online > Python Cookbook) as it had a feature (handling of input and raw_input) that > took me a while to figure out, and wanted to save others the trouble. I got > more feedback on Lightning Compiler in a couple of weeks than I did on > rur-ple in about a year an a half!! > It might be useful for teachers in a classroom situation. It is available > from rur-ple's sourceforge page: > https://sourceforge.net/project/showfiles.php?group_id=125834 > > On the down side, it does require wxPython which is not an "included battery"! > > Andr? > >>Vern >> -- This time for sure! -Bullwinkle J. Moose ----------------------------- Vern Ceder, Director of Technology Canterbury School, 3210 Smith Road, Ft Wayne, IN 46804 vceder at canterburyschool.org; 260-436-0746; FAX: 260-436-5137 From bmiller at luther.edu Wed Mar 8 21:54:29 2006 From: bmiller at luther.edu (Brad Miller) Date: Wed, 8 Mar 2006 14:54:29 -0600 Subject: [Edu-sig] IDLE wish (was Edu-sig Digest, Vol 31, Issue 16) In-Reply-To: <440F394A.1020704@canterburyschool.org> References: <002501c63f2a$943a68b0$1702a8c0@BasementDell> <90D56688-0833-4480-B2CC-163A058BC4A4@livingcode.org> <440C5A84.3030700@canterburyschool.org> <7528bcdd0603060808s4b9e4e27t954616cdcedfabfe@mail.gmail.com> <440F394A.1020704@canterburyschool.org> Message-ID: <1CC26DCD-FAD3-408C-AB79-A194DD71378A@luther.edu> On Mar 8, 2006, at 2:06 PM, Vern Ceder wrote: > Andre. > > I like Lightening a lot! This is almost exactly what I have been > wanting > for beginners, and I may give it a try this spring. > > If IDLE behaved this well and was this easy to use things would be > much > better. > > The reliance on an unincluded "battery" is a real drawback for many > environments, of course, but it may be worth the trouble. > > Regards, > Vern > Andre, I agree with Vern, I just downloaded lightning and took it for a spin. Its really very nice. The simplicity of IDLE is one of the keys to the success of Python in our introductory CS courses. But students do have a bunch of trouble with IDLE on windows. I like the fact that the traceback pane pops up right under the editor pane when you run a script and hit a problem. Regarding the 'batteries'. What if we, as a community of educators using python, did something like the Enthought or MacEnthon people and created our own 'batteries included' distribution of Python. Students and other interested parties would have one stop shopping to get all the Python they needed to use python for learning computer science. What packages would we include? Brad > Andre Roberge wrote: >> On 3/6/06, Vern Ceder wrote: >> >>> >> It might be useful for teachers in a classroom situation. It is >> available >> from rur-ple's sourceforge page: >> https://sourceforge.net/project/showfiles.php?group_id=125834 >> >> On the down side, it does require wxPython which is not an >> "included battery"! >> >> Andr? >> >>> Vern >>> > > -- > This time for sure! > -Bullwinkle J. Moose > ----------------------------- > Vern Ceder, Director of Technology > Canterbury School, 3210 Smith Road, Ft Wayne, IN 46804 > vceder at canterburyschool.org; 260-436-0746; FAX: 260-436-5137 > _______________________________________________ > Edu-sig mailing list > Edu-sig at python.org > http://mail.python.org/mailman/listinfo/edu-sig > From andre.roberge at gmail.com Wed Mar 8 22:16:41 2006 From: andre.roberge at gmail.com (Andre Roberge) Date: Wed, 8 Mar 2006 17:16:41 -0400 Subject: [Edu-sig] IDLE wish (was Edu-sig Digest, Vol 31, Issue 16) In-Reply-To: <1CC26DCD-FAD3-408C-AB79-A194DD71378A@luther.edu> References: <002501c63f2a$943a68b0$1702a8c0@BasementDell> <90D56688-0833-4480-B2CC-163A058BC4A4@livingcode.org> <440C5A84.3030700@canterburyschool.org> <7528bcdd0603060808s4b9e4e27t954616cdcedfabfe@mail.gmail.com> <440F394A.1020704@canterburyschool.org> <1CC26DCD-FAD3-408C-AB79-A194DD71378A@luther.edu> Message-ID: <7528bcdd0603081316g323f5c07t3ec67bcb0c8f3600@mail.gmail.com> On 3/8/06, Brad Miller wrote: > > On Mar 8, 2006, at 2:06 PM, Vern Ceder wrote: > > > Andre. > > > > I like Lightening a lot! This is almost exactly what I have been > > wanting > > for beginners, and I may give it a try this spring. > > > > If IDLE behaved this well and was this easy to use things would be > > much > > better. > > @ Brad and Vern especially: Thank you for the positive feedback. I hesitated before posting about Lightning as it was a bit off-topic, but I'm glad I did. Feel free to make suggestions for improvement. Also.... did you try to write a program that uses input() or raw_input()? This is, imo, its nicest feature... and why I wrote it in the first place. Andr? From john.zelle at wartburg.edu Wed Mar 8 22:38:16 2006 From: john.zelle at wartburg.edu (John Zelle) Date: Wed, 8 Mar 2006 15:38:16 -0600 Subject: [Edu-sig] IDLE wish (was Edu-sig Digest, Vol 31, Issue 16) In-Reply-To: <1CC26DCD-FAD3-408C-AB79-A194DD71378A@luther.edu> References: <002501c63f2a$943a68b0$1702a8c0@BasementDell> <440F394A.1020704@canterburyschool.org> <1CC26DCD-FAD3-408C-AB79-A194DD71378A@luther.edu> Message-ID: <200603081538.16509.john.zelle@wartburg.edu> I also like the simplicity of lightning, but it would need some enhancements before I could imagine using it in class. For example, it doesn't seem to auto-indent and requires typing the filename on a save. I'm sure it would not be hard to tidy up those things. I'd also like to handle multiple open files. I noticed on my system (Linux, Kubuntu 5.10), lightning plays well with my graphics.py library, but it seg faults if I try to use VPython. I don't think I would switch to an environment that doesn't play well with VPython, and I'm afraid that VPython is pretty closely tied to IDLE. Anybody know why packages like lightning and SPE (both wxPython) don't seem to work with VPython? Eric (QT-based) seems to work fine. On Wednesday 08 March 2006 14:54, Brad Miller wrote: > I just downloaded lightning and took it for a > spin. Its really very nice. The simplicity of IDLE is one of the > keys to the success of Python in our introductory CS courses. But > students do have a bunch of trouble with IDLE on windows. I like > the fact that the traceback pane pops up right under the editor pane > when you run a script and hit a problem. > > Regarding the 'batteries'. What if we, as a community of educators > using python, did something like the Enthought or MacEnthon people > and created our own 'batteries included' distribution of Python. > Students and other interested parties would have one stop shopping to > get all the Python they needed to use python for learning computer > science. What packages would we include? > This is an interesting question. I think this idea of an educational distribution has been kicked around before. For those of us in the Linux world, installation of the major non-standard tools is pretty simple. I can just apt-get install the vast majority. For students with Windows or OSX, it's not as simple. I wonder of the cheeseshop and ez-install tools will eventually make it all pretty easy regardless of platform. --John > > Andre Roberge wrote: > >> On 3/6/06, Vern Ceder wrote: > >> > >> > >> It might be useful for teachers in a classroom situation. It is > >> available > >> from rur-ple's sourceforge page: > >> https://sourceforge.net/project/showfiles.php?group_id=125834 > >> > >> On the down side, it does require wxPython which is not an > >> "included battery"! > >> > >> Andr? > >> > >>> Vern > > > > -- > > This time for sure! > > -Bullwinkle J. Moose > > ----------------------------- > > Vern Ceder, Director of Technology > > Canterbury School, 3210 Smith Road, Ft Wayne, IN 46804 > > vceder at canterburyschool.org; 260-436-0746; FAX: 260-436-5137 > > _______________________________________________ > > Edu-sig mailing list > > Edu-sig at python.org > > http://mail.python.org/mailman/listinfo/edu-sig > > _______________________________________________ > Edu-sig mailing list > Edu-sig at python.org > http://mail.python.org/mailman/listinfo/edu-sig -- John M. Zelle, Ph.D. Wartburg College Professor of Computer Science Waverly, IA john.zelle at wartburg.edu (319) 352-8360 From andre.roberge at gmail.com Wed Mar 8 23:13:49 2006 From: andre.roberge at gmail.com (Andre Roberge) Date: Wed, 8 Mar 2006 18:13:49 -0400 Subject: [Edu-sig] IDLE wish (was Edu-sig Digest, Vol 31, Issue 16) In-Reply-To: <200603081538.16509.john.zelle@wartburg.edu> References: <002501c63f2a$943a68b0$1702a8c0@BasementDell> <440F394A.1020704@canterburyschool.org> <1CC26DCD-FAD3-408C-AB79-A194DD71378A@luther.edu> <200603081538.16509.john.zelle@wartburg.edu> Message-ID: <7528bcdd0603081413k74bdf053i3547ca6487a015d3@mail.gmail.com> On 3/8/06, John Zelle wrote: > I also like the simplicity of lightning, but it would need some enhancements > before I could imagine using it in class. For example, it doesn't seem to > auto-indent and requires typing the filename on a save. I'm sure it would not > be hard to tidy up those things. I'd also like to handle multiple open files. Indeed, I don't think it would be too hard to fix these. I'll keep them in mind for the next time I look at the code. However, one of my goals is to keep it as simple as possible, mostly used as a quick testing or demo environment; I like to use SPE for serious coding. > > I noticed on my system (Linux, Kubuntu 5.10), lightning plays well with my > graphics.py library, but it seg faults if I try to use VPython. I don't think > I would switch to an environment that doesn't play well with VPython, and I'm > afraid that VPython is pretty closely tied to IDLE. Anybody know why packages > like lightning and SPE (both wxPython) don't seem to work with VPython? Eric > (QT-based) seems to work fine. > I tried to run a sample program from the VPython web page in the "editor" window and it ran fine (under Windows XP); however, closing the VPython window killed the whole app. The same sample program seemed to hang the embedded Shell... I agree that this would be a major show-stopper for using it in a classroom with VPython :-( Andr? > John M. Zelle, Ph.D. Wartburg College > Professor of Computer Science Waverly, IA > john.zelle at wartburg.edu (319) 352-8360 > _______________________________________________ > Edu-sig mailing list > Edu-sig at python.org > http://mail.python.org/mailman/listinfo/edu-sig > From annaraven at gmail.com Thu Mar 9 00:41:38 2006 From: annaraven at gmail.com (Anna Ravenscroft) Date: Wed, 8 Mar 2006 15:41:38 -0800 Subject: [Edu-sig] IDLE wish (was Edu-sig Digest, Vol 31, Issue 16) In-Reply-To: <200603081538.16509.john.zelle@wartburg.edu> References: <002501c63f2a$943a68b0$1702a8c0@BasementDell> <440F394A.1020704@canterburyschool.org> <1CC26DCD-FAD3-408C-AB79-A194DD71378A@luther.edu> <200603081538.16509.john.zelle@wartburg.edu> Message-ID: On 3/8/06, John Zelle wrote: > > > On Wednesday 08 March 2006 14:54, Brad Miller wrote: > > I just downloaded lightning and took it for a > > spin. Its really very nice. The simplicity of IDLE is one of the > > keys to the success of Python in our introductory CS courses. But > > students do have a bunch of trouble with IDLE on windows. I like > > the fact that the traceback pane pops up right under the editor pane > > when you run a script and hit a problem. > > > > Regarding the 'batteries'. What if we, as a community of educators > > using python, did something like the Enthought or MacEnthon people > > and created our own 'batteries included' distribution of Python. > > Students and other interested parties would have one stop shopping to > > get all the Python they needed to use python for learning computer > > science. What packages would we include? > > > > This is an interesting question. I think this idea of an educational > distribution has been kicked around before. For those of us in the Linux > world, installation of the major non-standard tools is pretty simple. I > can > just apt-get install the vast majority. For students with Windows or OSX, > it's not as simple. I wonder of the cheeseshop and ez-install tools will > eventually make it all pretty easy regardless of platform. I know that at PyCon, Raymond Hettinger and others from Python_dev were discussing an "educational" package for Python. I suspect it will be easy to get buy-in and support from that group if we can get a list together of what we want in the package. Anna -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/edu-sig/attachments/20060308/2e10d769/attachment.htm From kirby.urner at gmail.com Thu Mar 9 17:03:18 2006 From: kirby.urner at gmail.com (kirby urner) Date: Thu, 9 Mar 2006 08:03:18 -0800 Subject: [Edu-sig] Getting ready for class... Message-ID: Here's what I'm starting with today: http://www.4dsolutions.net/ocn/python/zoo.py Note: inheriting from object at the top level, per Andr?'s suggestion. Kirby From andre.roberge at gmail.com Thu Mar 9 18:02:51 2006 From: andre.roberge at gmail.com (Andre Roberge) Date: Thu, 9 Mar 2006 13:02:51 -0400 Subject: [Edu-sig] Getting ready for class... In-Reply-To: References: Message-ID: <7528bcdd0603090902k6346e0bw2c52af18a407b998@mail.gmail.com> On 3/9/06, kirby urner wrote: > Here's what I'm starting with today: > > http://www.4dsolutions.net/ocn/python/zoo.py > > Note: inheriting from object at the top level, per Andr?'s suggestion. > > Kirby I like your examples. I imagine you are presenting them to the same group of students you mentioned before. One example that I've seen on comp.lang.python which I really like, especially because it has a second level of inheritance, is the following (original by John Gabriele, with comments modified slightly here): #----------------------------------------------------------------- class Grand_parent( object ): def speak( self ): print 'Grand_parent.speak()' self.advise() def advise( self ): print 'Grand_parent.advise()' self.critique() def critique( self ): print 'Grand_parent.critique()' #----------------------------------------------------------------- class Parent( Grand_parent ): def speak( self ): print '\tParent.speak()' self.advise() def advise( self ): print '\tParent.advise()' self.critique() # The Parent inherits his criticism method from his/her own parent #----------------------------------------------------------------- class Child( Parent ): def speak( self ): print '\t\tChild.speak()' self.advise() # Currently, the Child has no really useful advice to give. The child will just # parrot what he/she hears the parent say. def critique( self ): print '\t\tChild.critique()' #----------------------------------------------------------------- print 'speak() calls advise(), then advise() calls critique().' print people = [ Grand_parent(), Parent(), Child() ] for person in people: person.speak() print ==================== The output is: speak() calls advise(), then advise() calls critique(). Grand_parent.speak() Grand_parent.advise() Grand_parent.critique() Parent.speak() Parent.advise() Grand_parent.critique() Child.speak() Parent.advise() Child.critique() Andr? From kirby.urner at gmail.com Thu Mar 9 19:24:07 2006 From: kirby.urner at gmail.com (kirby urner) Date: Thu, 9 Mar 2006 10:24:07 -0800 Subject: [Edu-sig] Getting ready for class... In-Reply-To: References: Message-ID: On 3/9/06, kirby urner wrote: > Here's what I'm starting with today: > > http://www.4dsolutions.net/ocn/python/zoo.py > > Note: inheriting from object at the top level, per Andr?'s suggestion. > > Kirby > So here's the complete, raw transcript of today's session. I simply shut my lap top mid session, and flipped it up when I got back to my office -- unusual to have this work so smoothly in Windows, although I know iPeople take this stuff for granted. Replying to Andre's question, yes, same group. And notice how my objects start eating each other at the end, and yet I'm able to still feed the dog a big juicey steak, even though it's a list item in the monkey's stomach (where our monkey is in the human's). Oh, and at one point I create a 100 monkeys. Arthur probably thinks I'm making a political statement or something. Kirby ==== Python 2.4.1 (#65, Mar 30 2005, 09:13:57) [MSC v.1310 32 bit (Intel)] on win32 Type "copyright", "credits" or "license()" for more information. **************************************************************** Personal firewall software may warn about the connection IDLE makes to its subprocess using this computer's internal loopback interface. This connection is not visible on any external interface and no data is sent to or received from the Internet. **************************************************************** IDLE 1.1.1 >>> ['banana', 'oil', 'canned food', 'food bank'] ['banana', 'oil', 'canned food', 'food bank'] >>> stuff = ['banana', 'oil', 'canned food', 'food bank'] >>> stuff[1] 'oil' >>> stuff[0] 'banana' >>> len(stuff) 4 >>> len([]) 0 >>> emptylist = [] >>> len(emptylist) 0 >>> emptylist.append('more canned foods') >>> emptylist ['more canned foods'] >>> len(emptylist) 1 >>> from zoo import Monkey >>> first_monkey = Monkey('Jerry Garcia') >>> second_monkey = Monkey('Shyla') >>> second_monkey Monkey named Shyla >>> first_monkey Monkey named Jerry Garcia >>> secondmonkey.eat('coconut') Traceback (most recent call last): File "", line 1, in -toplevel- secondmonkey.eat('coconut') NameError: name 'secondmonkey' is not defined >>> second_monkey.eat('coconut') Yum, thanks for the coconut >>> second_monkey.stomach ['coconut'] >>> first_monkey.stomach [] >>> hundredmonkeys = [ Monkey('fido') for i in range(100)] >>> hundredmonkeys [Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido, Monkey named fido] >>> x = { 'hold':'bananas','cabin':'passengers':'engine':'fuel'} SyntaxError: invalid syntax >>> x = { 'hold':'bananas','cabin':'passengers','engine':'fuel'} >>> x {'engine': 'fuel', 'hold': 'bananas', 'cabin': 'passengers'} >>> classroom = {'diana':14, 'joe':12, 'shyla':17} >>> classroom {'diana': 14, 'shyla': 17, 'joe': 12} >>> classroom['shyla'] 17 >>> classroom['diana'] 14 >>> classroom.keys() ['diana', 'shyla', 'joe'] >>> classroom.values() [14, 17, 12] >>> classroom.items() [('diana', 14), ('shyla', 17), ('joe', 12)] >>> classroom.items() [('diana', 14), ('shyla', 17), ('joe', 12)] >>> from zoo import Human Traceback (most recent call last): File "", line 1, in -toplevel- from zoo import Human ImportError: cannot import name Human >>> from zoo import Monkey, Dog, Human Traceback (most recent call last): File "", line 1, in -toplevel- from zoo import Monkey, Dog, Human ImportError: cannot import name Dog >>> reload(zoo) Traceback (most recent call last): File "", line 1, in -toplevel- reload(zoo) NameError: name 'zoo' is not defined >>> import zoo >>> reload(zoo) >>> from zoo import Monkey, Dog, Human >>> m1 = Monkey('Curious George') >>> d1 = Dog('Fido') >>> h1 = Human('Tom Cruise') >>> h1.talk(1) Why hello there. >>> h1.talk(2) When do we eat? >>> h1.talk(100) Appears confused. >>> d1.talk(2) bark! >>> m1.eat('canned food for second wind') Yum, thanks for the canned food for second wind >>> m1.stomach ['canned food for second wind'] >>> d1.stomach [] >>> m1.talk(2) chatter chatter >>> m1.talk(3) screeeeech!! >>> m1.stomach ['canned food for second wind'] >>> m1.eat(d1) Yum, thanks for the Dog named Fido >>> h1.eat(m1) Yum, thanks for the Monkey named Curious George >>> h1.stomach [Monkey named Curious George] >>> h1.stomach[0].stomach ['canned food for second wind', Dog named Fido] >>> h1.stomach[0].stomach[1].stomach [] >>> d1.eat('big juicey steak') Yum, thanks for the big juicey steak >>> h1.stomach[0].stomach[1].stomach ['big juicey steak'] >>> From kirby.urner at gmail.com Thu Mar 9 21:41:22 2006 From: kirby.urner at gmail.com (kirby urner) Date: Thu, 9 Mar 2006 12:41:22 -0800 Subject: [Edu-sig] Entering Squeakland Message-ID: So McCarty, my supervisor @ Winterhaven, treasured faculty, talked me through a demo dowload of Squeak to the Toshiba, as kids were settling into their seats (projecter already running). Now I have it open in another tab, within FireFox. Let's go see if the plug-in actually works (didn't quite get to it, as class was starting).... Got a mouse-on-wheels, Loading Project... (I passed on getting updates this time)... OK, Teds Ocean comes up, I beckon my wife, and she comes over to watch. "What about the car?" That's what Tara's been up to, programming a car (one of the eToys exercises). We check another canned example: Stair. Quite fun then, not just an applet as plugin, but I guess the whole Squeak development environment, which is the 6.5 meg I downloaded. The browser simply wraps this deeper think tank with a friendly and familiar out frame, one which conveniently connects me to worlds I'll want to check out anyway. OK, so now that's on the Toshiba. Tara can show us about the car. And I can learn more about this teaching environment (I've been also looking at the books). Kirby From glingl at aon.at Thu Mar 9 22:35:08 2006 From: glingl at aon.at (Gregor Lingl) Date: Thu, 09 Mar 2006 22:35:08 +0100 Subject: [Edu-sig] Getting ready for class... In-Reply-To: <7528bcdd0603090902k6346e0bw2c52af18a407b998@mail.gmail.com> References: <7528bcdd0603090902k6346e0bw2c52af18a407b998@mail.gmail.com> Message-ID: <44109F8C.5000409@aon.at> Andre Roberge schrieb: > On 3/9/06, kirby urner wrote: > >>Here's what I'm starting with today: >> >>http://www.4dsolutions.net/ocn/python/zoo.py >> >>Note: inheriting from object at the top level, per Andr?'s suggestion. >> >>Kirby > > > I like your examples. I imagine you are presenting them to the same > group of students you mentioned before. One example that I've seen on > comp.lang.python which I really like, especially because it has a > second level of inheritance, is the following (original by John > Gabriele, with comments modified slightly here): > Sorry Andre, but I really dislike this example. For me and in my lessons inheritance is connected to an "isa" relation. A Monkey isa Mammal etc. This is violated here and i consider the confusion, which would be caused by this example, would outweigh the benefits, if any ... This doesn't work: A parent "isa" grand_parent ? - no! A child "isa" parent ? - no! I understand that the exmples goes about inheriting habits or opinions, but I really think this shouldn't be done this way Regards Gregor > #----------------------------------------------------------------- > class Grand_parent( object ): > > def speak( self ): > print 'Grand_parent.speak()' > self.advise() > > def advise( self ): > print 'Grand_parent.advise()' > self.critique() > > def critique( self ): > print 'Grand_parent.critique()' > > #----------------------------------------------------------------- > class Parent( Grand_parent ): > > def speak( self ): > print '\tParent.speak()' > self.advise() > > def advise( self ): > print '\tParent.advise()' > self.critique() > > # The Parent inherits his criticism method from his/her own parent > > #----------------------------------------------------------------- > class Child( Parent ): > > def speak( self ): > print '\t\tChild.speak()' > self.advise() > > # Currently, the Child has no really useful advice to give. The > child will just > # parrot what he/she hears the parent say. > > def critique( self ): > print '\t\tChild.critique()' > > #----------------------------------------------------------------- > print 'speak() calls advise(), then advise() calls critique().' > print > > people = [ Grand_parent(), Parent(), Child() ] > for person in people: > person.speak() > print > > ==================== > The output is: > > speak() calls advise(), then advise() calls critique(). > > Grand_parent.speak() > Grand_parent.advise() > Grand_parent.critique() > > Parent.speak() > Parent.advise() > Grand_parent.critique() > > Child.speak() > Parent.advise() > Child.critique() > > Andr? > _______________________________________________ > Edu-sig mailing list > Edu-sig at python.org > http://mail.python.org/mailman/listinfo/edu-sig > > -- Gregor Lingl Reisnerstrasse 3/19 A-1030 Wien Telefon: +43 1 713 33 98 Mobil: +43 664 140 35 27 Website: python4kids.net From kirby.urner at gmail.com Thu Mar 9 23:08:00 2006 From: kirby.urner at gmail.com (kirby urner) Date: Thu, 9 Mar 2006 14:08:00 -0800 Subject: [Edu-sig] Getting ready for class... In-Reply-To: References: Message-ID: > >>> emptylist.append('more canned foods') [ Long digression about lists, then dove into dictionaries, as "data structures" (and note dict.items() returns our 3rd: the tuple). ] > >>> m1.eat('canned food for second wind') A girl student came in at the start of class to announce tomorrow as the last day to contribute cans in a food drive to help hungry people through something called Second Wind. She spoke pretty loudly, but kids were still getting settled, so I said I'd work it into my lesson. So my content included this sidebar commercials for Oregon Food Bank (a former employer) and the like, plus some comment on how we still have hunger even in Oregon. I also shared the saga of my cell phone (Verizon) and how the whole of Oregon State is apparently suffering the effects of some giant technical glitch (hey, I'm just passing on the lore I'm getting when I call customer service (all the switches have been "not processing changes" since like 11 AM yesterday)). Kirby From villate at gnu.org Thu Mar 9 18:18:02 2006 From: villate at gnu.org (Jaime E. Villate) Date: Thu, 09 Mar 2006 17:18:02 +0000 Subject: [Edu-sig] A Quick Puzzle In-Reply-To: References: <1f7befae0603071712k19a818fo274a93c21d997b37@mail.gmail.com> Message-ID: <1141924683.20865.46.camel@localhost.localdomain> On Tue, 2006-03-07 at 21:15 -0800, Scott David Daniels wrote: > I called my father up within an hour of when he was twice as old as I. > I was expecting a real "you are such a dweeb" conversation, but he wound > up talking a lot about what it felt like when I was born. It was such a > wonderful surprise; a great conversation for both of us. If my father, my son and I survive 4 more years, I will call my son someday to tell him that in that exact day: I've become 3 times older than him, and his grandfather (85) has become 5 times older than him! I will also phone my father in that exact date, to remind him of those facts, and neither my father nor my son will be surprised that I call them to talk about ages; both will think I called them to wish them a happy birthday. They will also take the opportunity to wish me a happy birthday too :) By the way, my father didn't do any special planning about my mother's pregnancy with me, and I didn't do any planning about my wife's pregnancy either. It was all pure coincidence. Jaime From glingl at aon.at Fri Mar 10 00:20:31 2006 From: glingl at aon.at (Gregor Lingl) Date: Fri, 10 Mar 2006 00:20:31 +0100 Subject: [Edu-sig] Getting ready for class... In-Reply-To: References: Message-ID: <4410B83F.8080900@aon.at> kirby urner schrieb: > Here's what I'm starting with today: > > http://www.4dsolutions.net/ocn/python/zoo.py > > Note: inheriting from object at the top level, per Andr?'s suggestion. > > Kirby > I also like this example very much (especially the somewhat sophisticated use of __repr__). Despite of the lack of echo to my former (turtle-)example I'd like to contribute one more - this one without turtles (the English translation may be a bit inept): In my class I let the students do the following exercise to sum up or recapitulate what they have learned in previous lessons about objects, inheritance and message passing: We begin very simply (who wants may inherit from object): >>> class Messenger: def announce(self): print "I announce to you:", "Hello!" >>> herold = Messenger() >>> herold.announce() I announce to you: Hello! >>> annunciator = Messenger() >>> annunciator.announce() I announce to you: Hello! >>> #### Not very diversified ... We improve it: >>> class Messenger: def announce(self, text): print "I announce to you:", text >>> herold = Messenger() >>> herold.announce("Fire on the roof") I announce to you: Fire on the roof >>> herold.announce("Hurricane approaching!") I announce to you: Hurricane approaching! >>> #### Now we want the messengers to remember their message text: >>> class CleverMessenger: def note(self, text): self.message = text def announce(self): print "I announce to you:", self.message >>> wiseguy = CleverMessenger() >>> wiseguy.note("Shares are rising!") >>> wiseguy.announce() I announce to you: Shares are rising! >>> vifzac = CleverMessenger() >>> vifzac.note("Weather is becoming cold!") >>> vifzac.announce() I announce to you: Weather is becoming cold! >>> >>> vifzac.note("Weather is becoming warm!") >>> vifzac.announce() I announce to you: Weather is becoming warm! >>> vifzac.message 'Weather is becoming warm!' #### ( A look at an attribute ) #### Now inheritance: A VeryCleverMessenger 'isa' CleverMessenger >>> class VeryCleverMessenger(CleverMessenger): def note_additionally(self, addendum): self.message = self.message+" "+addendum >>> angelo = VeryCleverMessenger() >>> angelo.note("It's becoming cold!") >>> angelo.announce() I announce to you: It's becoming cold! >>> angelo.note_additionally("Use warm clothing!") >>> angelo.announce() I announce to you: It's becoming cold! Use warm clothing! >>> merkur = CleverMessenger() >>> merkur.note("Traffic jam on all Highways!") >>> merkur.note_additionally("Defer trip!") Traceback (most recent call last): File "", line 1, in -toplevel- merkur.note_additionally("Defer trip!") AttributeError: CleverMessenger instance has no attribute 'note_additionally' #### We see: merkur is not very clever #### The following shows a serious defect of our messenger classes >>> zweistein = VeryCleverMessenger() >>> zweistein.announce() I announce to you: Traceback (most recent call last): File "", line 1, in -toplevel- zweistein.announce() File "", line 5, in announce print "I announce to you:", self.message AttributeError: VeryCleverMessenger instance has no attribute 'message' #### We will repair this by initializing the message attribute: >>> class CleverMessenger: def __init__(self): self.message="Hi!" def note(self, text): self.message = text def announce(self): print "I announce to you:", self.message >>> class VeryCleverMessenger(CleverMessenger): def note_additionally(self, addendum): self.message = self.message+" "+addendum >>> zweistein = VeryCleverMessenger() >>> zweistein.announce() I announce to you: Hi! #### One more inheritance example: >>> class FriendlyMessenger(CleverMessenger): def __init__(self, greeting): CleverMessenger.__init__(self) self.greeting = greeting def greet(self): print self.greeting >>> sunny = FriendlyMessenger("Have a nice day!") >>> sunny.greet() Have a nice day! >>> sunny.announce() I announce to you: Hi! #### Overwrite methods >>> class FriendlyMessenger(CleverMessenger): def __init__(self, greeting): CleverMessenger.__init__(self) self.greeting = greeting def greet(self): print self.greeting def announce(self): self.greet() CleverMessenger.announce(self) >>> sunny = FriendlyMessenger("Have a nice day!") >>> sunny.announce() Have a nice day! I announce to you: Hi! >>> sunny.note("OOP is pretty useful!") >>> sunny.announce() Have a nice day! I announce to you: OOP is pretty useful! >>> tim = CleverMessenger() >>> tim.note("Tomorrow it will happen!") >>> tim.announce() I announce to you: Tomorrow it will happen! #### Last example: communicating objects >>> class Agent(CleverMessenger): def passMessage(self, agent): agent.note(self.message) def listen(self, agent): self.note(agent.message) >>> james = Agent() >>> austin = Agent() >>> james.announce() I announce to you: Hi! >>> james.listen(tim) >>> james.announce() I announce to you: Tomorrow it will happen! >>> austin.announce() I announce to you: Hi! >>> james.passMessage(austin) >>> austin.announce() I announce to you: Tomorrow it will happen! >>> I assume that this interactive session is somewhat selfexplanatory, so I omit additional explanations. Regards, Gregor From andre.roberge at gmail.com Fri Mar 10 01:24:32 2006 From: andre.roberge at gmail.com (Andre Roberge) Date: Thu, 9 Mar 2006 20:24:32 -0400 Subject: [Edu-sig] Getting ready for class... In-Reply-To: <44109F8C.5000409@aon.at> References: <7528bcdd0603090902k6346e0bw2c52af18a407b998@mail.gmail.com> <44109F8C.5000409@aon.at> Message-ID: <7528bcdd0603091624t559d88aah681e2b68861c75af@mail.gmail.com> On 3/9/06, Gregor Lingl wrote: > > > Andre Roberge schrieb: > > On 3/9/06, kirby urner wrote: > > > >>Here's what I'm starting with today: > >> > >>http://www.4dsolutions.net/ocn/python/zoo.py > >> > >>Note: inheriting from object at the top level, per Andr?'s suggestion. > >> > >>Kirby > > > > > > I like your examples. I imagine you are presenting them to the same > > group of students you mentioned before. One example that I've seen on > > comp.lang.python which I really like, especially because it has a > > second level of inheritance, is the following (original by John > > Gabriele, with comments modified slightly here): > > > > Sorry Andre, but I really dislike this example. For me and in my lessons > inheritance is connected to an "isa" relation. > > A Monkey isa Mammal etc. > > This is violated here and i consider the confusion, which would be > caused by this example, would outweigh the benefits, if any ... Very good points. I guess I won't be including this type of example in the lessons I am writing for rur-ple. Thanks! Andr? > > This doesn't work: > > A parent "isa" grand_parent ? - no! A child "isa" parent ? - no! I > understand that the exmples goes about inheriting habits or opinions, > but I really think this shouldn't be done this way > > Regards > > Gregor > > > #----------------------------------------------------------------- > > class Grand_parent( object ): > > > > def speak( self ): > > print 'Grand_parent.speak()' > > self.advise() > > > > def advise( self ): > > print 'Grand_parent.advise()' > > self.critique() > > > > def critique( self ): > > print 'Grand_parent.critique()' > > > > #----------------------------------------------------------------- > > class Parent( Grand_parent ): > > > > def speak( self ): > > print '\tParent.speak()' > > self.advise() > > > > def advise( self ): > > print '\tParent.advise()' > > self.critique() > > > > # The Parent inherits his criticism method from his/her own parent > > > > #----------------------------------------------------------------- > > class Child( Parent ): > > > > def speak( self ): > > print '\t\tChild.speak()' > > self.advise() > > > > # Currently, the Child has no really useful advice to give. The > > child will just > > # parrot what he/she hears the parent say. > > > > def critique( self ): > > print '\t\tChild.critique()' > > > > #----------------------------------------------------------------- > > print 'speak() calls advise(), then advise() calls critique().' > > print > > > > people = [ Grand_parent(), Parent(), Child() ] > > for person in people: > > person.speak() > > print > > > > ==================== > > The output is: > > > > speak() calls advise(), then advise() calls critique(). > > > > Grand_parent.speak() > > Grand_parent.advise() > > Grand_parent.critique() > > > > Parent.speak() > > Parent.advise() > > Grand_parent.critique() > > > > Child.speak() > > Parent.advise() > > Child.critique() > > > > Andr? > > _______________________________________________ > > Edu-sig mailing list > > Edu-sig at python.org > > http://mail.python.org/mailman/listinfo/edu-sig > > > > > > -- > Gregor Lingl > Reisnerstrasse 3/19 > A-1030 Wien > > Telefon: +43 1 713 33 98 > Mobil: +43 664 140 35 27 > > Website: python4kids.net > From andre.roberge at gmail.com Fri Mar 10 01:29:33 2006 From: andre.roberge at gmail.com (Andre Roberge) Date: Thu, 9 Mar 2006 20:29:33 -0400 Subject: [Edu-sig] Getting ready for class... In-Reply-To: <4410B83F.8080900@aon.at> References: <4410B83F.8080900@aon.at> Message-ID: <7528bcdd0603091629l1560314fvc65789cd65954c87@mail.gmail.com> On 3/9/06, Gregor Lingl wrote: > > > kirby urner schrieb: > > Here's what I'm starting with today: > > > > http://www.4dsolutions.net/ocn/python/zoo.py > > > > Note: inheriting from object at the top level, per Andr?'s suggestion. > > > > Kirby > > > > I also like this example very much (especially the somewhat > sophisticated use of __repr__). > > Despite of the lack of echo to my former (turtle-)example I'd like to > contribute one more - this one without turtles (the English translation > may be a bit inept): > [snip] I don't know how everyone else feels about these long "real-life" teaching examples but, personally, I *love* them. Sorry if I didn't give any feedback on the previous one. It is not often that I read examples about Python (e.g. those including weird stomach content) and that I find myself smiling if not laughing out loud. And I like the Gregor's "messenger family". Andr? From ajsiegel at optonline.net Fri Mar 10 14:51:22 2006 From: ajsiegel at optonline.net (Arthur) Date: Fri, 10 Mar 2006 08:51:22 -0500 Subject: [Edu-sig] Entering Squeakland In-Reply-To: Message-ID: <000001c64449$b8064d80$1702a8c0@BasementDell> > >-----Original Message----- > >From: edu-sig-bounces at python.org > >[mailto:edu-sig-bounces at python.org] On Behalf Of kirby urner > > > >OK, Teds Ocean comes up, I beckon my wife, and she comes > >over to watch. "What about the car?" That's what Tara's > >been up to, programming a car (one of the eToys exercises). > >We check another canned example: Stair. Girl. Car. ?? Probably more fuel efficient, or something, than the kind of car a *boy* might be interested in ;) > > > >Quite fun then, not just an applet as plugin, but I guess > >the whole Squeak development environment, which is the 6.5 > >meg I downloaded. I think you owe it to yourself, and perhaps to us, to understand and express why Squeak does not represent the perfect environment for pursuing the kind of educational ideas that you tend to express. If it in fact does not. My own concerns start exactly there - with the word "environment". My understanding is that many conclude that too much "environment" is what doomed Smalltalk to a minor role in today's software world. And respect for children starts, I think, with not considering them any different from oneself on these kinds of issues. I am actually very disappointed that - according to what you are saying - Canonical sees Squeak as having a central role to play in education for children. Python is glue, a citizen of the larger software world, and proficiency in it helps make one a better, more productive and potentially creative citizen of the world. Squeak is too much its own world. If Canonical mission is to educate better world citizens, I think it is going off in the wrong direction here. Art > >The browser simply wraps this deeper think tank with a > >friendly and familiar out frame, one which conveniently > >connects me to worlds I'll want to check out anyway. > > > >OK, so now that's on the Toshiba. Tara can show us about the car. > >And I can learn more about this teaching environment (I've > >been also looking at the books). > > > >Kirby > >_______________________________________________ > >Edu-sig mailing list > >Edu-sig at python.org > >http://mail.python.org/mailman/listinfo/edu-sig > > From vceder at canterburyschool.org Fri Mar 10 15:20:49 2006 From: vceder at canterburyschool.org (Vern Ceder) Date: Fri, 10 Mar 2006 09:20:49 -0500 Subject: [Edu-sig] Entering Squeakland In-Reply-To: <000001c64449$b8064d80$1702a8c0@BasementDell> References: <000001c64449$b8064d80$1702a8c0@BasementDell> Message-ID: <44118B41.7040706@canterburyschool.org> Arthur wrote: > My own concerns start exactly there - with the word "environment". > > My understanding is that many conclude that too much "environment" is what > doomed Smalltalk to a minor role in today's software world. > > And respect for children starts, I think, with not considering them any > different from oneself on these kinds of issues. I am actually very > disappointed that - according to what you are saying - Canonical sees Squeak > as having a central role to play in education for children. > > Python is glue, a citizen of the larger software world, and proficiency in > it helps make one a better, more productive and potentially creative citizen > of the world. Squeak is too much its own world. If Canonical mission is to > educate better world citizens, I think it is going off in the wrong > direction here. +1 ;) Vern -- This time for sure! -Bullwinkle J. Moose ----------------------------- Vern Ceder, Director of Technology Canterbury School, 3210 Smith Road, Ft Wayne, IN 46804 vceder at canterburyschool.org; 260-436-0746; FAX: 260-436-5137 From andre.roberge at gmail.com Fri Mar 10 15:32:50 2006 From: andre.roberge at gmail.com (Andre Roberge) Date: Fri, 10 Mar 2006 10:32:50 -0400 Subject: [Edu-sig] Entering Squeakland In-Reply-To: <44118B41.7040706@canterburyschool.org> References: <000001c64449$b8064d80$1702a8c0@BasementDell> <44118B41.7040706@canterburyschool.org> Message-ID: <7528bcdd0603100632y5664a0e6o61dd49bef592c31c@mail.gmail.com> On 3/10/06, Vern Ceder wrote: > Arthur wrote: > > My own concerns start exactly there - with the word "environment". > > > > My understanding is that many conclude that too much "environment" is what > > doomed Smalltalk to a minor role in today's software world. > > > > And respect for children starts, I think, with not considering them any > > different from oneself on these kinds of issues. I am actually very > > disappointed that - according to what you are saying - Canonical sees Squeak > > as having a central role to play in education for children. > > > > Python is glue, a citizen of the larger software world, and proficiency in > > it helps make one a better, more productive and potentially creative citizen > > of the world. Squeak is too much its own world. If Canonical mission is to > > educate better world citizens, I think it is going off in the wrong > > direction here. > > +1 ;) +1 as well :-) Andr? > > > Vern > -- From annaraven at gmail.com Fri Mar 10 17:53:48 2006 From: annaraven at gmail.com (Anna Ravenscroft) Date: Fri, 10 Mar 2006 08:53:48 -0800 Subject: [Edu-sig] Entering Squeakland In-Reply-To: <000001c64449$b8064d80$1702a8c0@BasementDell> References: <000001c64449$b8064d80$1702a8c0@BasementDell> Message-ID: On 3/10/06, Arthur wrote: > > > > > >-----Original Message----- > > >From: edu-sig-bounces at python.org > > >[mailto:edu-sig-bounces at python.org] On Behalf Of kirby urner > > > > > >OK, Teds Ocean comes up, I beckon my wife, and she comes > > >over to watch. "What about the car?" That's what Tara's > > >been up to, programming a car (one of the eToys exercises). > > >We check another canned example: Stair. > > Girl. Car. ?? > > Probably more fuel efficient, or something, than the kind of car a *boy* > might be interested in ;) As the only girl in shop class and electronics class etc, I would have *loved* to have a chance to build and program cars back then. My daughter does it now in school (Lego Mindstorms) and has a blast. Some of us, sometimes, just like to tinker. It's nice to see other girls out there with the same interests... > > > > >Quite fun then, not just an applet as plugin, but I guess > > >the whole Squeak development environment, which is the 6.5 > > >meg I downloaded. > > I think you owe it to yourself, and perhaps to us, to understand and > express why Squeak does not represent the perfect environment for pursuing > the kind of educational ideas that you tend to express. If it in fact does > not. > > My own concerns start exactly there - with the word "environment". > > My understanding is that many conclude that too much "environment" is what > doomed Smalltalk to a minor role in today's software world. > > And respect for children starts, I think, with not considering them any > different from oneself on these kinds of issues. I am actually very > disappointed that - according to what you are saying - Canonical sees > Squeak > as having a central role to play in education for children. > > Python is glue, a citizen of the larger software world, and proficiency in > it helps make one a better, more productive and potentially creative > citizen > of the world. Squeak is too much its own world. If Canonical mission is > to > educate better world citizens, I think it is going off in the wrong > direction here. Great point, Art. Anna -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/edu-sig/attachments/20060310/80d1ebad/attachment.htm From kirby.urner at gmail.com Fri Mar 10 19:06:01 2006 From: kirby.urner at gmail.com (kirby urner) Date: Fri, 10 Mar 2006 10:06:01 -0800 Subject: [Edu-sig] Entering Squeakland In-Reply-To: <000001c64449$b8064d80$1702a8c0@BasementDell> References: <000001c64449$b8064d80$1702a8c0@BasementDell> Message-ID: > I think you owe it to yourself, and perhaps to us, to understand and > express why Squeak does not represent the perfect environment for pursuing > the kind of educational ideas that you tend to express. If it in fact does > not. In fact I'm better at using Python to express what I want to express, about mathematics. Hence my Pythonic Mathematics, my OSCON talks about it, my trip to Sweden to explain it and so forth. I was simply never was a SmallTalk guy, much though I treasure OO. What I see in Squeakland is a branch point to entirely other genres of experience, but with OO in common, plus a willingness to control puppets (assets I'm hoping to add, via Mono/.NET, to Python's capabilities -- "giving hands to the snake" we might call it (a metaphor for evolution, "snake" being the generic spinal chord in some readings)). > My own concerns start exactly there - with the word "environment". > > My understanding is that many conclude that too much "environment" is what > doomed Smalltalk to a minor role in today's software world. Yes, there's lots to say about this (most of it not by me). In SmallTalk what you save is "the image" -- which is the world as you've massaged it and messaged it up until now. You pass whole worlds around, more than fragments thereof. Context becomes everything. And obviously, at some extreme, this becomes very impractical. Most of us evolve our "working environment" in our heads so to speak, crafting a personal and productive style, a mountain of habits, practices, familiar routines. But what we share with others is minus most of that, just a *piece* of the action. In Python, we ship modules or .py files. In Java, we ship beans (among other products). My guess is SmallTalk wizards long ago added the atomism people were missing, but by that time, the other language designers had already absorbed the OO paradigm, and were reimplementing it in C (to give us C++, Java, C#) and in Python. To barrel ahead in the commercial sector, people wanted something familiar. Back when OO got started, in like the 1960 and 70s, Smalltalk was way too Xerox Park, using odd-ball GUI and mouse ideas (expensive!) -- those would become standard on the PC only later, by way of the Mac. > And respect for children starts, I think, with not considering them any > different from oneself on these kinds of issues. I am actually very > disappointed that - according to what you are saying - Canonical sees Squeak > as having a central role to play in education for children. Think of it this way: You live in an environment (traffic, kitchen sink) and need to train your thinking from within the OO paradigm. "I am a factory" you say, dressing for work. Or "I am an Amtrak train, what are my properties and methods?" (shades of Walt Whitman). Then you go out there and live your life -- in Squeakland if you're a mouse in Alan Kay's mind. Or maybe this way: Play Uru for awhile, on a fast, solid, Windows computer (no, not an oxymoron, I'm tired of hearing that joke). Now *there's* an environment. Is it wrong to expose children to such art? Tara and I venture in Uru together, or she goes with her same-age friends. I bought it for her as a gift. In my scenario, in my lifestyle, a game like Uru has the status of a Mona Lisa or Rembrandt. It's only regional prejudice that people think anything named Cyan, in Spokane, Washington, could produce something as memorable. Now, am I saying the mostly flat Squeak environment is as surreal and immersive as Uru's.? Not exactly. But it gives you access to a wheelworks, the code piles, behind all this environmental interactivity. You see the tunnels under Disneyworld. So again this is a useful metaphor, as a kid grows up in a science, say a medical one. > Python is glue, a citizen of the larger software world, and proficiency in > it helps make one a better, more productive and potentially creative citizen > of the world. Squeak is too much its own world. If Canonical mission is to > educate better world citizens, I think it is going off in the wrong > direction here. > > Art Better ability to slip *between* worlds -- to hop on a jet in LA, to show up in Tokyo. I'm hoping to push cars to eat more vegetables (biodiesel) so we have more Arabica Gold left over for jets. I want kids to travel, Arabic speaking ones as much as any. Squeakers all. Squeakland typifies a genre of literature (I'll call it that) in which one becomes willfully lost in a vast matrix, the creation of other minds (we hope not too sick and twisted). More like reading a novel or watching science fiction or something. It's wonderful that we're able to build things like this. Another example: http://www.activeworlds.com/ Yes, *you* might hate such stuff, but we could *not* take all this away from children on general policy, once they've become addicted. There's simply too much precedent for healthy development in this direction, like in the form of fairy tales and mythology. Or see: http://www.cybergeography.org/atlas/muds_vw.html Kirby From ajsiegel at optonline.net Fri Mar 10 20:21:03 2006 From: ajsiegel at optonline.net (Arthur) Date: Fri, 10 Mar 2006 14:21:03 -0500 Subject: [Edu-sig] Entering Squeakland In-Reply-To: References: <000001c64449$b8064d80$1702a8c0@BasementDell> Message-ID: <4411D19F.4020504@optonline.com> kirby urner wrote: >Yes, *you* might hate such stuff, but we could *not* take all this >away from children on general policy, once they've become addicted. >There's simply too much precedent for healthy development in this >direction, like in the form of fairy tales and mythology. > > Tsunamis, addictions - I sometimes think your choice of words are more appropriate than you want them to be ;). To some extent the most practical thinking is yes, we have jaded children's sensitivities - as well as our own. Work within it. *We* don't understand much about the tools on which we are dependent, have given up trying, nobody seems to attach much importance to it - so we can't expect more from our children. Get lost in the magic. Go with it. We turn on the television and pictures appear and we are lost in the pictures - the magic that is beyond our understanding or interest on what is making them appear is suitably left as magic. *That's* the fallacy that's going to bring us down, IMO. Guess I prefer the voice of the prophet over that of the visionary. . Got to read more from my friend Kay yesterday - by accident. Fun book: What We Believe But Cannot Prove - Todays Leading Thinkers on Science in the Age of Certainly. Edited by John Brockman Maybe 100 scientists in diverse fields get between a few paragraphs and a few pages to express something related, or unrelated, to their own field of specialty that represents what they consider to be true , but (currently) unprovably so. The only computer scientist so far encountered is Kay. No surprises - in the course of a few paragraphs he quotes Einstein, Knuth, and McCluhan and other peers (we fill in our own wink number here) - does his printing press thing - and expresses his guess -that he admits he has been married to for a long time - that "people who learn to think" in the new way represented by computers will be "qualitatively different thinkers", "and this will (usually) advance our limited conception of civilization". And the funny thing is I don't really disagree with him. Except that I would express it a little differently - believing that the most profound thing that computers will do for us is teach us what computers cannot do for us. And I do think that is a profound lesson. Just a little impatient with the process, is all. Art From kirby.urner at gmail.com Fri Mar 10 21:13:00 2006 From: kirby.urner at gmail.com (kirby urner) Date: Fri, 10 Mar 2006 12:13:00 -0800 Subject: [Edu-sig] Entering Squeakland In-Reply-To: <4411D19F.4020504@optonline.com> References: <000001c64449$b8064d80$1702a8c0@BasementDell> <4411D19F.4020504@optonline.com> Message-ID: > We turn on the television and pictures appear and we are lost in the > pictures - the magic that is beyond our understanding or interest on > what is making them appear is suitably left as magic. *That's* the > fallacy that's going to bring us down, IMO. > Yes, and I think Squeakland helps fight that "take it all for granted" mentality. Because you're in a cartoon-like space, and it it's *up to you* to make stuff happen (your the TV *producer* not just the potato). > And the funny thing is I don't really disagree with him. Except that I > would express it a little differently - believing that the most profound > thing that computers will do for us is teach us what computers cannot do > for us. And I do think that is a profound lesson. Yes. Wittgenstein took the same approach to logic: yes it's true, but so is 0 = 0. > Just a little impatient with the process, is all. > > Art We get, and will get, both these types of children: Type: Excellent in a virtual jungle game, with avatar Tarzan or companion Jane, or maybe as some Tombraider chick. Admired for skills, a celebrity in the urban bazaar, where the technology is taken for granted, virtual reality accepted ("the reality of court life"). Type: A real Tarzan or Jane, a virtuoso of real jungles -- has no use for computers in big sky country, outside the DVD teepee. Maybe sleeps in a hammock, suffers no star-stealing "light pollution" (the nearest big city is far away). Kirby From ajsiegel at optonline.net Fri Mar 10 21:25:19 2006 From: ajsiegel at optonline.net (Arthur) Date: Fri, 10 Mar 2006 15:25:19 -0500 Subject: [Edu-sig] Entering Squeakland In-Reply-To: References: <000001c64449$b8064d80$1702a8c0@BasementDell> <4411D19F.4020504@optonline.com> Message-ID: <4411E0AF.5060806@optonline.com> kirby urner wrote: > >Type: > >A real Tarzan or Jane, a virtuoso of real jungles -- has no use for >computers in big sky country, outside the DVD teepee. Maybe sleeps in >a hammock, suffers no star-stealing "light pollution" (the nearest big >city is far away). > > > Can we get them elected to something, perhaps. Funny thing: The one thing the conservatives and liberals seemed to have agreed about recently is that a mathematician does not belong on the Supreme Court. I was excited to learn that Harriet Myers' undergraduate degree was in mathematics. I thought there was hope there, for a minute. ;) Art > > From ajsiegel at optonline.net Fri Mar 10 21:46:01 2006 From: ajsiegel at optonline.net (Arthur) Date: Fri, 10 Mar 2006 15:46:01 -0500 Subject: [Edu-sig] Entering Squeakland In-Reply-To: References: <000001c64449$b8064d80$1702a8c0@BasementDell> <4411D19F.4020504@optonline.com> Message-ID: <4411E589.7020101@optonline.com> kirby urner wrote: >>We turn on the television and pictures appear and we are lost in the >>pictures - the magic that is beyond our understanding or interest on >>what is making them appear is suitably left as magic. *That's* the >>fallacy that's going to bring us down, IMO. >> >> >> > >Yes, and I think Squeakland helps fight that "take it all for granted" >mentality. Because you're in a cartoon-like space, and it it's *up to >you* to make stuff happen (your the TV *producer* not just the >potato). > > Please Kirby, I am talking physics, not cartoons. And as much as I admire Mr. J. Moose - I try not to confuse the two things. >>And the funny thing is I don't really disagree with him. Except that I >>would express it a little differently - believing that the most profound >>thing that computers will do for us is teach us what computers cannot do >>for us. And I do think that is a profound lesson. >> >> > >Yes. Wittgenstein took the same approach to logic: yes it's true, >but so is 0 = 0. > > Not sure what you mean. If I sound like I am talking sematically, I certainly don't mean to be. I am thinking literally and in terms of practicalities, even if I am not successful in expressing it as such. We count the roses in Shakespeares. Know the exact number. Now what? Wittgenstein played a major role in the book I just finished. "The Proof and Paradox of Kurt Godel" by Rebecca Goldstein. Goldstein is a novelist with a heavy weight philosophy background. Godel and Wittgenstein were not on contemporaries, but moved in the same circles for a good part of these lives - The Vienna Circle. Goldstein does a brilliant job of describing the nature of the problem they had with each other. And yes it is wonderful to have a brilliant woman's perspective here. Also no question that Einstein and Godel were peers - just by the fact they chose to spend so much of their timing hanging out with each other. We all need folks to chat with ;) Art Art From kirby.urner at gmail.com Fri Mar 10 22:35:40 2006 From: kirby.urner at gmail.com (kirby urner) Date: Fri, 10 Mar 2006 13:35:40 -0800 Subject: [Edu-sig] Entering Squeakland In-Reply-To: <4411E589.7020101@optonline.com> References: <000001c64449$b8064d80$1702a8c0@BasementDell> <4411D19F.4020504@optonline.com> <4411E589.7020101@optonline.com> Message-ID: > Please Kirby, I am talking physics, not cartoons. And as much as I > admire Mr. J. Moose - I try not to confuse the two things. > Awwwww, you're no fun. [Roger Rabbit voice] > >Yes. Wittgenstein took the same approach to logic: yes it's true, > >but so is 0 = 0. > > > > > Not sure what you mean. If I sound like I am talking sematically, I > certainly don't mean to be. I am thinking literally and in terms of > practicalities, even if I am not successful in expressing it as such. > > We count the roses in Shakespeares. Know the exact number. Now what? That's some Old Europe stereotype of a computer. All these threatened school dons, in front of a chalkboard, worried some big metal box down the hall will put them out of a job. Update: I want to make TV = I want to learn multi-track editing = I need a computer = if I learn to program, I'll be able to make even *better* TV -> [back to start of loop] > "The Proof and Paradox of Kurt Godel" by Rebecca Goldstein. > At least not the one where Witttgenstein gets menacing next to the fireplace. Popperians read that like a ghost story, scare themselves, whisper about "mean old LW" to their children -- a boogey man. > circles for a good part of these lives - The Vienna Circle. Goldstein Yeah, LW was born into money. Was living a glam life as a courtly genius, then gave it all up to go to Oxford, to leave the ordinary world of Muggles and their ways and join up with Slytherin, headed by Bertrand Russell. His Tractatus-Logico-Philosophicus (known as TLP by insiders) was his young knight-in-shining-armour debut (the women back in Vienna swooned), then he exited stage right and wasn't heard from in awhile. Then he returned (surprise!), this time to teach his Philosophical Investigations, his mysterious PI -- a dark art, with LW a hooded figure, all Darth Vadery and Jedi, with a penchant light sabers (er fire pokers). > Also no question that Einstein and Godel were peers - just by the fact > they chose to spend so much of their timing hanging out with each other. > We all need folks to chat with ;) > > Art Yeah, Princeton. Those were the days. Now they point to Fine Hall and say Einstein worked in Fine Hall, but maybe neglect to tell you Fine Hall moved to Fine Tower since Einstein's day, next to Jadwin. When I was on campus, Einstein's office was part of Near Eastern Studies or something. Anyway, I think Princeton is one of the few Ivy League schools to do math in a skyscraper (albeit not a very tall one -- tall enough). True story: at least one of my friends got help with calculus from that beautiful mind guy (this was pre the Nobel). Nash'd materialize in the corridor, wearing sneakers of two colors, and flutter over to some wide-eyed scholar, living a dream. Anyway, he new everything about calculus reportedly, and much else besides. Kirby From ajsiegel at optonline.net Sat Mar 11 00:35:57 2006 From: ajsiegel at optonline.net (Arthur) Date: Fri, 10 Mar 2006 18:35:57 -0500 Subject: [Edu-sig] Entering Squeakland In-Reply-To: References: <000001c64449$b8064d80$1702a8c0@BasementDell> <4411D19F.4020504@optonline.com> <4411E589.7020101@optonline.com> Message-ID: <44120D5D.3040707@optonline.com> kirby urner wrote: >>Please Kirby, I am talking physics, not cartoons. And as much as I >>admire Mr. J. Moose - I try not to confuse the two things. >> >> >> > >Awwwww, you're no fun. [Roger Rabbit voice] > > > >>>Yes. Wittgenstein took the same approach to logic: yes it's true, >>>but so is 0 = 0. >>> >>> >>> >>> >>Not sure what you mean. If I sound like I am talking sematically, I >>certainly don't mean to be. I am thinking literally and in terms of >>practicalities, even if I am not successful in expressing it as such. >> >>We count the roses in Shakespeares. Know the exact number. Now what? >> >> > >That's some Old Europe stereotype of a computer. All these threatened >school dons, in front of a chalkboard, worried some big metal box down >the hall will put them out of a job. > > Please. It's a simplification, yes. But absent some Kayian, intelligent agent, computer-human mind meld process, I don't think it is qualitatively wrong. And, scientifically, I am at the moment very much absent the mind-meld unit. What I think is true, but cannot prove, is that nothing will change about that, qualitatively - ever. And what's worse for your side: I have said to myself for some time that if I ever got the credit card swiped the right way around at the checkout *the first time*, I would begin to take myself more seriously. Just went to the supermarket to pick up a few things. And guess what I did... Art >Update: I want to make TV = I want to learn multi-track editing = I >need a computer = if I learn to program, I'll be able to make even >*better* TV -> [back to start of loop] > > > >>"The Proof and Paradox of Kurt Godel" by Rebecca Goldstein. >> >> >> > >At least not the one where Witttgenstein gets menacing next to the >fireplace. Popperians read that like a ghost story, scare themselves, >whisper about "mean old LW" to their children -- a boogey man. > > > >>circles for a good part of these lives - The Vienna Circle. Goldstein >> >> > >Yeah, LW was born into money. Was living a glam life as a courtly >genius, then gave it all up to go to Oxford, to leave the ordinary >world of Muggles and their ways and join up with Slytherin, headed by >Bertrand Russell. His Tractatus-Logico-Philosophicus (known as TLP by >insiders) was his young knight-in-shining-armour debut (the women back >in Vienna swooned), then he exited stage right and wasn't heard from >in awhile. Then he returned (surprise!), this time to teach his >Philosophical Investigations, his mysterious PI -- a dark art, with LW >a hooded figure, all Darth Vadery and Jedi, with a penchant light >sabers (er fire pokers). > > > >>Also no question that Einstein and Godel were peers - just by the fact >>they chose to spend so much of their timing hanging out with each other. >>We all need folks to chat with ;) >> >>Art >> >> > >Yeah, Princeton. Those were the days. Now they point to Fine Hall >and say Einstein worked in Fine Hall, but maybe neglect to tell you >Fine Hall moved to Fine Tower since Einstein's day, next to Jadwin. >When I was on campus, Einstein's office was part of Near Eastern >Studies or something. > >Anyway, I think Princeton is one of the few Ivy League schools to do >math in a skyscraper (albeit not a very tall one -- tall enough). > >True story: at least one of my friends got help with calculus from >that beautiful mind guy (this was pre the Nobel). Nash'd materialize >in the corridor, wearing sneakers of two colors, and flutter over to >some wide-eyed scholar, living a dream. Anyway, he new everything >about calculus reportedly, and much else besides. > >Kirby > > > > From dooms at info.ucl.ac.be Sat Mar 11 17:57:10 2006 From: dooms at info.ucl.ac.be (=?ISO-8859-1?Q?Gr=E9goire_Dooms?=) Date: Sat, 11 Mar 2006 17:57:10 +0100 Subject: [Edu-sig] 1 hour introduction to Python Message-ID: <44130166.5000100@info.ucl.ac.be> Hello, next friday I'll give a one hour hands-on Python introduction to our students in second year of Bsc in Computer Science. The course is part of a "tools class" (other courses in this class are about svn, latex and so on). They already know Java and Oz. The first objective of the course is to arm them with shell scripting tools but I would like to convince them to continue learning/using/loving it for other tasks too. I think I will basically do this (10-15 minutes per item) : - language syntax - read/write files, os.listdir and glob.glob - os.system, os.popen, urllib.urlopen - online documentation and other resources Do you have ideas of subjects/features I could show them ? Or useful resources ? -- Gr?goire Dooms From ajsiegel at optonline.net Sat Mar 11 19:35:20 2006 From: ajsiegel at optonline.net (Arthur) Date: Sat, 11 Mar 2006 13:35:20 -0500 Subject: [Edu-sig] 1 hour introduction to Python In-Reply-To: <44130166.5000100@info.ucl.ac.be> References: <44130166.5000100@info.ucl.ac.be> Message-ID: <44131868.70107@optonline.com> Gr?goire Dooms wrote: >Hello, >next friday I'll give a one hour hands-on Python introduction to our >students in second year of Bsc in Computer Science. >The course is part of a "tools class" (other courses in this class are >about svn, latex and so on). >They already know Java and Oz. > >The first objective of the course is to arm them with shell scripting >tools but I would like to convince them to continue >learning/using/loving it for other tasks too. > >I think I will basically do this (10-15 minutes per item) : >- language syntax >- read/write files, os.listdir and glob.glob >- os.system, os.popen, urllib.urlopen >- online documentation and other resources > > Just suggest that you include in "documentation" the kind of questions one can answer for oneself from the interactive prompt. I actually find it relatively rare to need to go to the formal docs. dir(..) seems to answer a very decent % of the kinds of questions I tend to run into in practice - together with a measure of trial and error from the prompt. Art >Do you have ideas of subjects/features I could show them ? Or useful >resources ? >-- >Gr?goire Dooms > > >_______________________________________________ >Edu-sig mailing list >Edu-sig at python.org >http://mail.python.org/mailman/listinfo/edu-sig > > > > From Scott.Daniels at Acm.Org Sat Mar 11 21:45:58 2006 From: Scott.Daniels at Acm.Org (Scott David Daniels) Date: Sat, 11 Mar 2006 12:45:58 -0800 Subject: [Edu-sig] Entering Squeakland In-Reply-To: References: <000001c64449$b8064d80$1702a8c0@BasementDell> Message-ID: kirby urner wrote: >> I think you owe it to yourself, and perhaps to us, to understand and >> express why Squeak does not represent the perfect environment for pursuing >> the kind of educational ideas that you tend to express. If it in fact does >> not.... >> My own concerns start exactly there - with the word "environment". >> >> My understanding is that many conclude that too much "environment" is what >> doomed Smalltalk to a minor role in today's software world. > > Yes, there's lots to say about this (most of it not by me). In > SmallTalk what you save is "the image" -- which is the world as you've > massaged it and messaged it up until now. You pass whole worlds > around, more than fragments thereof. Context becomes everything. This is both the strength and weakness of Smalltalk: Then environment is a single, learnable model. You can look into the guts and see how it works. Yo can change the way the system works and see the effects of the change. This is gold for the tinkerers among us. What techie-kid has not wanted to take things apart and see how they work with a bit of a twist? It becomes hard to build separate things that work well with anybody's hallucination of what the core is. This is a problem with Lisp and Ruby systems as well. The other problem is the "one world model" which Smalltalk shares with Lisp, APL, and Prolog (and many others). > My guess is SmallTalk wizards long ago added the atomism people were > missing, but by that time, the other language designers had already > absorbed the OO paradigm, and were reimplementing it in C (to give us > C++, Java, C#) and in Python. But many shared Smalltalk things involve mucking with the core objects: "This is my nifty whizz-bang: just add these methods to 'object' and then you'll find that ...." -- Scott David Daniels Scott.Daniels at Acm.Org From wescpy at gmail.com Sun Mar 12 04:51:28 2006 From: wescpy at gmail.com (w chun) Date: Sat, 11 Mar 2006 19:51:28 -0800 Subject: [Edu-sig] 1 hour introduction to Python In-Reply-To: <44130166.5000100@info.ucl.ac.be> References: <44130166.5000100@info.ucl.ac.be> Message-ID: <78b3a9580603111951g652ea00csfd442250d1b94919@mail.gmail.com> On 3/11/06, Gr?goire Dooms wrote: > Hello, > next friday I'll give a one hour hands-on Python introduction to our > students in second year of Bsc in Computer Science. > The course is part of a "tools class" (other courses in this class are > about svn, latex and so on). > They already know Java and Oz. > > I think I will basically do this (10-15 minutes per item) : > - language syntax > - read/write files, os.listdir and glob.glob > - os.system, os.popen, urllib.urlopen > - online documentation and other resources > > Do you have ideas of subjects/features I could show them ? Or useful > resources ? i have a one-hour presentation that i give to university students when i get a chance to speak at one with an appropriate group. attached is the abstract of a talk i gave late last year to computer science graduate students at san francisco state univ. if you think a copy of my slide presentation would help you further, just write me privately. cheers, -- wesley - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "Core Python Programming", Prentice Hall, (c)2006,2001 http://corepython.com wesley.j.chun :: wescpy-at-gmail.com cyberweb.consulting : silicon valley, ca http://cyberwebconsulting.com -------------- next part -------------- info on my talk... cheers, -wesley What is Python? Python http://python.org is an agile applications development programming language that is quickly gaining worldwide popularity. Downloads rocketed from 200GB average per month in 2001 to 1.3TB in Feb 2005! What is Python all about and what can you do with it? Although initially recognized for building Web/CGI applications, Python has become well-known for so much more: it is interpreted, interactive and inherently object-oriented in nature, featuring an easy-to-learn syntax that is clear and concise. It combines the robustness and power of a compiled language with the simplicity, low maintenance, portability and short development time of an interpreted scripting language. Engineers no longer have to concern themselves with memory management, language syntax, or managing complex data types -- you simply just think and code your solution! Python is often compared to Perl, JavaScript, PHP, Tcl/Tk, C/C++, Ruby, and Java, and in many situations, presents a viable and advantageous alternative because of its ease-of-use, rapid development time, and innate nature of encouraging group collaboration. Python is also available on both Java and .NET platforms: Jython is a Java-compiled Python interpreter which runs anywhere a JVM is available and provides access to Java class libraries, thus giving Java a scripting language development environment! Python classes can interact with Java classes and vice versa, making Jython a powerful tool in Java development. The Python implementation for .NET/Mono is called IronPython and will see an official release soon. In addition to Win32, MacOS, and most UNIX-oriented operating systems, you will find Python almost anywhere, even Playstation, GameCube, Zaurus, and Nokia Series 60 phones! There are plenty of standard library as well as 3rd party modules to help you get your job done, and if it still doesn't suit your needs, Python can even be extended (in C/C++, Java, or C#). Python is currently used at Google, Yahoo!, Disney/Go.com, NASA, Industrial Light and Magic, Red Hat, CCP Games (makers of EVE Online), and many research facilities around the globe. WESLEY J. CHUN, with degrees in Computer Science, Mathematics, and Music from the University of California, is a full-time Software Engineer at IronPort Systems http://ironport.com, creating applications which run on an e-mail security gateway appliance, and in his spare time, serves as a Principal with over two decades of programming and instructional experience at CyberWeb Consulting http://cyberwebconsulting.com, specializing in software engineering, website design, corporate training, and technical documentation. Mr. Chun is also a coordinator for the Silicon Valley-San Francisco Bay Area Python users group (BayPIGgies http://baypiggies.net), a volunteer moderator for the Python Tutor mailing list, and the author of "Core Python Programming" http://corepython.com -- the Python book in Prentice Hall's popular Core series (2nd ed. coming Summer 2006) -- as well as various technical articles for Linux Journal and cNet. Previously, he was an engineer at Synarc, Yahoo!, Sun, HP, Rockwell, Legato, and Xilinx. While at Yahoo!, he helped create Yahoo!Mail and Yahoo! People Search using Python. From annaraven at gmail.com Mon Mar 13 18:29:38 2006 From: annaraven at gmail.com (Anna Ravenscroft) Date: Mon, 13 Mar 2006 09:29:38 -0800 Subject: [Edu-sig] Announcing edupython list Message-ID: In order to facilitate small groups working on specific Python-in-Education projects, we have launched an edupython list on google groups (http://groups.google.com/group/edupython or edupython at googlegroups.com). We envision participation by people trying to coordinate work on the nuts and bolts implementation of a project, with frequent progress reports and requests for suggestions and comments coming back to edu-sig. The list developed as a result of a quite well-attended and enthusiastic BOF meeting at PyCon. This edupython list is not intended to replace edu-sig, which remains very strong for theoretical and philosophical discussions, and for getting input and suggestions from a wider group, but is also necessarily higher bandwidth. We invite anyone working on Python-related education projects to join the list. Cordially, Anna Martelli Ravenscroft -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/edu-sig/attachments/20060313/42980d16/attachment.html From ajsiegel at optonline.net Wed Mar 15 00:52:19 2006 From: ajsiegel at optonline.net (Arthur) Date: Tue, 14 Mar 2006 18:52:19 -0500 Subject: [Edu-sig] Properties use case Message-ID: <44175733.8030408@optonline.com> I don't know whether this is theoretical, philosophical, or in any way relevant to what we are *supposed* to be discussing here - but to break what I consider to be an uncomfortable silence I thought I'd throw it out into the excess bandwidth, nonetheless: I do in fact use properties in various places in my code, and but not generally in ways I find compelling or truly functional - maybe some nuance of "interface" that I could easily live without. I seem , however, to have come across my first more compelling use case. I went with the creation of a mutable complex number type, which I then inherit from and use down the line. But when I send instances of classes derived from this custom type to use as elements of a Numeric Userarray, there is no way that I have found to be able to tell Numeric that if it treats these instances as if they were built-in complex numbers, things should work out OK. Numeric seems to insist on creating arrays of Python instances, and then insists it does not know how to do math with Python instances. So properties come in handy essentially to do casting - from the custom Complex type to the built-in complex type on the way into the UserArray, and in reverse on the way out - i.e, set and get. This only additionally meant customizing the Numeric UserArray to derive from object (it doesn't come that way) , before I go further with it, so that properties "take". I am sure I am taking at least a bit of a performance hit by going this route. Does anyone see something simple I may be missing here to get to where I am trying to get, without the hit? Art From kirby.urner at gmail.com Wed Mar 15 03:14:36 2006 From: kirby.urner at gmail.com (kirby urner) Date: Tue, 14 Mar 2006 18:14:36 -0800 Subject: [Edu-sig] Properties use case In-Reply-To: <44175733.8030408@optonline.com> References: <44175733.8030408@optonline.com> Message-ID: > I am sure I am taking at least a bit of a performance hit by going this > route. Does anyone see something simple I may be missing here to get to > where I am trying to get, without the hit? > > Art Sounds like the kind of question that should go with example code, but maybe that's just me. Kirby From ajsiegel at optonline.net Wed Mar 15 15:41:20 2006 From: ajsiegel at optonline.net (Arthur) Date: Wed, 15 Mar 2006 09:41:20 -0500 Subject: [Edu-sig] Properties use case In-Reply-To: References: <44175733.8030408@optonline.com> Message-ID: <44182790.1030200@optonline.com> kirby urner wrote: >>I am sure I am taking at least a bit of a performance hit by going this >>route. Does anyone see something simple I may be missing here to get to >>where I am trying to get, without the hit? >> >>Art >> >> > >Sounds like the kind of question that should go with example code, but >maybe that's just me. > > What it seems to be is mostly a question of a limitation in my understanding of what means type(xxx). I want to create a class that impersonates a built-in type - in my case . And in fact am working from pypy code that not only impersonates , but within the pypy implementation, *is* . How does pypy get there? My motive is simply to con Numeric into a willingness to treat my implementation of the complex number type - the mutable one - on the same basis that it treats the built-in immutable one. Is there a mechanism to con Numeric here? Art >Kirby >_______________________________________________ >Edu-sig mailing list >Edu-sig at python.org >http://mail.python.org/mailman/listinfo/edu-sig > > > > From kirby.urner at gmail.com Thu Mar 16 02:45:24 2006 From: kirby.urner at gmail.com (kirby urner) Date: Wed, 15 Mar 2006 17:45:24 -0800 Subject: [Edu-sig] Properties use case In-Reply-To: <44182790.1030200@optonline.com> References: <44175733.8030408@optonline.com> <44182790.1030200@optonline.com> Message-ID: > Is there a mechanism to con Numeric here? > > Art I'm interested in your question and therefore presumably in the answer. However, I'm not running Numeric these days, for the simple reason that it's not currently a part of my Python curriculum. We create a matrix object, maybe a quaternion object, in order to rotate our polyhedron objects (assemblages of face-defining tuples, each element a vertex in a dictionary of vectors -- e.g. the 26 A-Z of the concentric hierarchy): http://www.4dsolutions.net/ocn/oop7.html (see graphic top right). So I don't need linear algebra from Numeric at this time, nor any of its other resources. Not saying I won't in future. Numpy is cool stuff. Kirby From mtobis at gmail.com Thu Mar 16 04:34:13 2006 From: mtobis at gmail.com (Michael Tobis) Date: Wed, 15 Mar 2006 21:34:13 -0600 Subject: [Edu-sig] Properties use case In-Reply-To: <44182790.1030200@optonline.com> References: <44175733.8030408@optonline.com> <44182790.1030200@optonline.com> Message-ID: A Numeric array is mutable; it refers to allocated memory. So any subpart of it is mutable. So I suggest you use a 1-element complex numeric array as your mutable complex type. >>> import Numeric as N >>> a = N.ones((20,20),N.Complex) >>> b = N.ravel(a[1:2,1:2]) >>> b array([ 1.+0.j]) >>> id(b) 2741696 >>> b += 1 + 1j >>> b array([ 2.+1.j]) >>> id(b) 2741696 Admittedly the str() of this object is ugly, and because Numeric isn't inheritance-friendly this is hard to work around elegantly. If this is a problem it might provide the occasion to upgrade to a newer numerical package. Still, why do you care about mutability of your complex number instances once they are outside Numeric? That seems unusual. mt From ajsiegel at optonline.net Thu Mar 16 04:54:16 2006 From: ajsiegel at optonline.net (Arthur) Date: Wed, 15 Mar 2006 22:54:16 -0500 Subject: [Edu-sig] Properties use case In-Reply-To: References: <44175733.8030408@optonline.com> <44182790.1030200@optonline.com> Message-ID: <4418E168.5030901@optonline.com> kirby urner wrote: >>Is there a mechanism to con Numeric here? >> >>Art >> >> > >I'm interested in your question and therefore presumably in the >answer. However, I'm not running Numeric these days, for the simple >reason that it's not currently a part of my Python curriculum. > > Appreciate your interest. I think it is an interesting question in that it in some sense represents a clash between "technical" typing and duck typing. My mutable complex number quacks (almost) exactly like the immutable one, and usually in Python that might be enough to have it accepted as being of the same type. Numeric seems to be catching me on a technicality. Technology seems to full of the damn things ;) The array object of Numeric is actually the C multiarray object. And Numeric is perhaps thinking more in C than in Python in using a technical rather than functional definition of type. Unfortunately it seems to be a bit too daunting to me to attempt to follow the trail into the C code to try to track down the error that's generated when I (innocently ;) try to cast an array of the mutable complex numbers to the Numeric complex array type. Neither have I tried yet to see if the more recent numarray and numpy libraries behave any differently here. >We create a matrix object, maybe a quaternion object, in order to >rotate our polyhedron objects (assemblages of face-defining tuples, >each element a vertex in a dictionary of vectors -- e.g. the 26 A-Z of >the concentric hierarchy): > >http://www.4dsolutions.net/ocn/oop7.html (see graphic top right). > >So I don't need linear algebra from Numeric at this time, nor any of >its other resources. Not saying I won't in future. Numpy is cool >stuff. > > > I actually think your way is best to achieve ultimate transparency for pedagogical purposes, even at the sacrifice of performance. I am more and more thinking that a good deal of Numeric is overkill for my purposes as well - sacrificing transparency for what is probably not tremendous performance benefits when I am dealing only in 2x2, 3x3 and 4x4 arrays. Since Numeric is designed as a general use library, it needs to spend some time determining what it is looking at when, for example, doing linear algebra - what shape are the arrays it is looking at, what type, etc. In the controlled environment that I am working in in PyGeo I know what I am sending along, so I think I can gain some of the time back that I would be loosing in going from C to Python simply because I can design things in a way where little is general, everything is specific - we know what we are getting because we are sending it. Have been experimenting with all this, as it happens. Art >Kirby > > > > From ajsiegel at optonline.net Thu Mar 16 05:22:02 2006 From: ajsiegel at optonline.net (Arthur) Date: Wed, 15 Mar 2006 23:22:02 -0500 Subject: [Edu-sig] Properties use case In-Reply-To: References: <44175733.8030408@optonline.com> <44182790.1030200@optonline.com> Message-ID: <4418E7EA.6020504@optonline.com> Michael Tobis wrote: >A Numeric array is mutable; it refers to allocated memory. So any >subpart of it is mutable. So I suggest you use a 1-element complex >numeric array as your mutable complex type. > > > >>>>import Numeric as N >>>>a = N.ones((20,20),N.Complex) >>>>b = N.ravel(a[1:2,1:2]) >>>>b >>>> >>>> >array([ 1.+0.j]) > > >>>>id(b) >>>> >>>> >2741696 > > >>>>b += 1 + 1j >>>>b >>>> >>>> >array([ 2.+1.j]) > > >>>>id(b) >>>> >>>> >2741696 > >Admittedly the str() of this object is ugly, and because Numeric isn't >inheritance-friendly this is hard to work around elegantly. If this is >a problem it might provide the occasion to upgrade to a newer >numerical package. > > Yeah, I should be moving along to understand what the newer numerical packages do differently. One of the reasons I haven't is because I have had the impression that differences are more at the level of implementation detail, rather than user-facing, and there is no fundamental difference in these kinds of functional issues. but that has only been an impression, and you seem to be implying otherwise. >Still, why do you care about mutability of your complex number >instances once they are outside Numeric? That seems unusual. > > Well outside of Numeric they represent dynamic, graphical geometric objects, whose identity needs to stay intact as they run through their paces. Art From kirby.urner at gmail.com Thu Mar 16 16:51:57 2006 From: kirby.urner at gmail.com (kirby urner) Date: Thu, 16 Mar 2006 07:51:57 -0800 Subject: [Edu-sig] Thinking about my class... Message-ID: Early AM before school in Portland, and my Brother multifunction printer, soon to be retired (factory remanufactured clone enroute, after we broke the paper feeder), is printing up a storm. We'll be doing a simple substitution cipher, i.e. substitute a random shuffle (permutation) of A-Z and space, for some coherent plaintext (also in Latin-1), to get garbled ciphertext, then reverse. Here's my worksheet (decrypt not included): ==== from random import shuffle from string import uppercase def makefunction(): theletters = list(uppercase[:26] + ' ') copyof = theletters[:] shuffle(copyof) return dict(zip(theletters, copyof)) def encrypt(plaintext, thekey): return ''.join([ thekey[i] for i in plaintext ] ) STEPS: Use File | New Window to start a new program file. Save As "something.py" (in site-packages would be OK). Enter the above code, paying attention to indentation. Save again. REMARKS: We import from modules to get additional features. The file you save is itself a module. You can import your own modules, as well as modules provided by others. [ side 2 of this worksheet is something about xml-rpc -- hitting a Perl utility with a street address, getting back lat/long ] Kirby From jonah at ccnmtl.columbia.edu Thu Mar 16 17:44:51 2006 From: jonah at ccnmtl.columbia.edu (Jonah Bossewitch) Date: Thu, 16 Mar 2006 11:44:51 -0500 Subject: [Edu-sig] Coding Tool Is a Text Adventure Message-ID: <5C6DF0E7-4FD5-4606-AF5E-CD909FDE0BFB@ccnmtl.columbia.edu> http://wired.com/news/technology/0,70413-0.html?tw=wn_index_14 just saw this, and thought it might be interesting for this group. /jsb ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Jonah Bossewitch Senior Technical Architect ccnmtl.columbia.edu jonah at ccnmtl dot columbia dot edu 212.854.1815 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From ajsiegel at optonline.net Thu Mar 16 19:06:02 2006 From: ajsiegel at optonline.net (Arthur) Date: Thu, 16 Mar 2006 13:06:02 -0500 Subject: [Edu-sig] Properties use case In-Reply-To: <4418E168.5030901@optonline.com> References: <44175733.8030408@optonline.com> <44182790.1030200@optonline.com> <4418E168.5030901@optonline.com> Message-ID: <4419A90A.9000509@optonline.com> Arthur wrote: >> > I actually think your way is best to achieve ultimate transparency for > pedagogical purposes, even at the sacrifice of performance. I am more > and more thinking that a good deal of Numeric is overkill for my > purposes as well - sacrificing transparency for what is probably not > tremendous performance benefits when I am dealing only in 2x2, 3x3 and > 4x4 arrays. Since Numeric is designed as a general use library, it > needs to spend some time determining what it is looking at when, for > example, doing linear algebra - what shape are the arrays it is > looking at, what type, etc. In the controlled environment that I am > working in in PyGeo I know what I am sending along, so I think I can > gain some of the time back that I would be loosing in going from C to > Python simply because I can design things in a way where little is > general, everything is specific - we know what we are getting because > we are sending it. Have been experimenting with all this, as it happens. > > Art Just thought I'd throw out the tool I am using for my "experiments". Python Performance Validator - an (expensive) commercial product to be found at http://www.softwareverify.com/ Working with a free fully functional 30 day trial version, seeing what I can learn about my code with it before it expires, and then will probably be left to other tools, as I can't justify its cost for my purposes. But at least I can give them a plug. I have found profiling, formal debugging, etc. somewhat complicated by the fact that I am working with a graphical and dynamic application. Not that that's so unusual a situation to face, but some of the issues that arise seem to me to come under the category of Profiling 103, and I never got through 101. This tool has helped me get my bearings. Art What it solves for me is the problem of separating performance issues, e.g. start-u >> Kirby >> >> >> >> > > > > From kirby.urner at gmail.com Thu Mar 16 23:04:54 2006 From: kirby.urner at gmail.com (kirby urner) Date: Thu, 16 Mar 2006 14:04:54 -0800 Subject: [Edu-sig] Properties use case In-Reply-To: <4419A90A.9000509@optonline.com> References: <44175733.8030408@optonline.com> <44182790.1030200@optonline.com> <4418E168.5030901@optonline.com> <4419A90A.9000509@optonline.com> Message-ID: > This tool has helped me get my bearings. > > Art > > > > What it solves for me is the problem of separating performance issues, > e.g. start-u > The idea of a "mutable complex number" gives me the creeps. Did you say you'd seen this successfully tried somewhere? Kirby From ajsiegel at optonline.net Fri Mar 17 00:16:27 2006 From: ajsiegel at optonline.net (ajsiegel at optonline.net) Date: Thu, 16 Mar 2006 18:16:27 -0500 Subject: [Edu-sig] Properties use case In-Reply-To: References: <44175733.8030408@optonline.com> <44182790.1030200@optonline.com> <4418E168.5030901@optonline.com> <4419A90A.9000509@optonline.com> Message-ID: ----- Original Message ----- From: kirby urner Date: Thursday, March 16, 2006 5:04 pm Subject: Re: [Edu-sig] Properties use case > > The idea of a "mutable complex number" gives me the creeps. Did you > say you'd seen this successfully tried somewhere? Don't lose any sleep over it. Yes. PyGeo. Art From kirby.urner at gmail.com Fri Mar 17 00:44:08 2006 From: kirby.urner at gmail.com (kirby urner) Date: Thu, 16 Mar 2006 15:44:08 -0800 Subject: [Edu-sig] Properties use case In-Reply-To: References: <44175733.8030408@optonline.com> <44182790.1030200@optonline.com> <4418E168.5030901@optonline.com> <4419A90A.9000509@optonline.com> Message-ID: > > The idea of a "mutable complex number" gives me the creeps. Did you > > say you'd seen this successfully tried somewhere? > > Don't lose any sleep over it. > > Yes. > > PyGeo. > > Art Sorry you felt forced into doing something quirky for whatever reason. Or maybe it's just for the fun of it, experimenting with new ideas. Lots of good comes from experimentation, trial and error. I'm not being critical, just leery i.e. is this a sandbox I could play in? A lot of people ask the same questions about mine, with quirky sand-castles aplenty (I love sand). Kirby From ajsiegel at optonline.net Fri Mar 17 03:21:41 2006 From: ajsiegel at optonline.net (ajsiegel at optonline.net) Date: Thu, 16 Mar 2006 21:21:41 -0500 Subject: [Edu-sig] Properties use case In-Reply-To: References: <44175733.8030408@optonline.com> <44182790.1030200@optonline.com> <4418E168.5030901@optonline.com> <4419A90A.9000509@optonline.com> Message-ID: ----- Original Message ----- From: kirby urner > > > The idea of a "mutable complex number" gives me the creeps. > Did you > > > say you'd seen this successfully tried somewhere? > > > > Don't lose any sleep over it. > > > > Yes. > > > > PyGeo. > > > > Art > > Sorry you felt forced into doing something quirky for whatever reason. > Or maybe it's just for the fun of it, experimenting with new ideas. > Just looking for the most elegant solution to my problem- nothing quirky intended. Except that I am consciously here, as elsewhere, sacrificing some measure of performance in the interest of my own sense of elegance. I guess one could argue that scarificing performance for an application where performance *is* an issue cannot be elegant. Depends what one is after, I guess. Are there people out there with a more developed sense of elegance in programming than I have been able to develop? No question. But it ain't like I am inheriting from float to redefine =, or anything ;) Or throwing properties aropund willy nilly. Art > Lots of good comes from experimentation, trial and error. > > I'm not being critical, just leery i.e. is this a sandbox I could > play in? > > A lot of people ask the same questions about mine, with quirky > sand-castles aplenty (I love sand). > > Kirby > From kirby.urner at gmail.com Fri Mar 17 03:38:03 2006 From: kirby.urner at gmail.com (kirby urner) Date: Thu, 16 Mar 2006 18:38:03 -0800 Subject: [Edu-sig] Properties use case In-Reply-To: References: <44175733.8030408@optonline.com> <44182790.1030200@optonline.com> <4418E168.5030901@optonline.com> <4419A90A.9000509@optonline.com> Message-ID: > Just looking for the most elegant solution to my problem- nothing quirky intended. Well, philosophically, I could see where a lot of CS types might have a problem with mutable numbers, complex or otherwise. Usually, some complex number s would be operated on by a function g, to return new complex number g(s). This idea that g(s) might return null or something, while meanwhile s itself has changed, is usually not considered so elegant. Even s = g(s) i.e. reassignment of s to a new value, is better than g(s) producing a side-effect, i.e. a change to s itself -- where s.g() would be another way to say it. You'll hear the word "quirky" applied to this latter pattern. Usually means: "hard to debug" (reassignments are easier to catch than implicit changes in memory). Kirby From ajsiegel at optonline.net Fri Mar 17 16:05:29 2006 From: ajsiegel at optonline.net (ajsiegel at optonline.net) Date: Fri, 17 Mar 2006 10:05:29 -0500 Subject: [Edu-sig] Properties use case In-Reply-To: References: <44175733.8030408@optonline.com> <44182790.1030200@optonline.com> <4418E168.5030901@optonline.com> <4419A90A.9000509@optonline.com> Message-ID: ----- Original Message ----- From: kirby urner Date: Thursday, March 16, 2006 9:38 pm Subject: Re: [Edu-sig] Properties use case > > Well, philosophically, I could see where a lot of CS types might have > a problem with mutable numbers, complex or otherwise. Are you a CS type? If so, speak directly. If not, why do you feel compelled to speak on their behalf. As an OOP devotee I am surpirsed you find this as much of an issue as you seem to. My complex number is an old fashioned object. For my purposes - destroying it and recreating another every time a value changes is wasteful, (and cruel ;)) Instead of having my geometric objects of the complex plane *be* complex numbes, there is certainly the solution of having a complex number as an attribute of these objects - and then I can take more your approach, and at the speed of C, since I would then be using the built-in for arithmettic operations. There remained something unsatisfying to me about that approach. Until something blows up about my current approach, I am quite happy with it. And if and when something does blow up, I will know what it is and will have developed some *real* expertise on the problem of mutable complex numbers, beyond the fear of distrubing the sleep of some abstract CS type. And will report back in. At the moment I don't expect that to happen - but my mind is open - as it has been from the beginning - to the possbility that I have made a wrong turn here. Art From ajsiegel at optonline.net Fri Mar 17 17:04:18 2006 From: ajsiegel at optonline.net (ajsiegel at optonline.net) Date: Fri, 17 Mar 2006 11:04:18 -0500 Subject: [Edu-sig] Properties use case In-Reply-To: References: <44175733.8030408@optonline.com> <44182790.1030200@optonline.com> <4418E168.5030901@optonline.com> <4419A90A.9000509@optonline.com> Message-ID: ----- Original Message ----- From: ajsiegel at optonline.net Date: Friday, March 17, 2006 10:05 am ----- Original Message ----- From: ajsiegel at optonline.net > Instead of having my geometric objects of the complex plane *be* > complex numbes, > there is certainly the solution of having a complex number as an > attribute of these objects - > and then I can take more your approach, and at the speed of C, > since I would then > be using the built-in for arithmettic operations. Eureka - potentially. Michaels' comments about using a Numeric array as my mutable number, together with my own efforts to justify my current architecture from your doubts... All my geometric objects of the complex plane, points, lines and circles have an associated 2X2 Hermitian matrix as an attrbute. This is what allows me - for example - to do transformations on an abritrary set of objects. They all can quack out a Hermitian matrix, and therefore can be treated as one "type" for the purposes of certain processes. A level of abstraction up from where I am right now -- perhaps the better architecture is to have all my complex objects *be* (derived from) this 2x2 matrix. This - although not the motive - would probably allow me to in fact put my mutable complex number to sleep. And help others' sleep ;). This might have to be psuedo-inheritance via an UserArray mechanism - until it becomes clearer to me if there is in the newer array libraries a way to do true inheritance Something that feels right about this at the moment. Will report back in. Art From kirby.urner at gmail.com Fri Mar 17 19:17:07 2006 From: kirby.urner at gmail.com (kirby urner) Date: Fri, 17 Mar 2006 10:17:07 -0800 Subject: [Edu-sig] Properties use case In-Reply-To: References: <44175733.8030408@optonline.com> <4418E168.5030901@optonline.com> <4419A90A.9000509@optonline.com> Message-ID: On 3/17/06, ajsiegel at optonline.net wrote: > > Well, philosophically, I could see where a lot of CS types might have > > a problem with mutable numbers, complex or otherwise. > > Are you a CS type? If so, speak directly. > I flirt with the idea, but feel more drawn to American Literature. Hoping for some honorary degree from UC Santa Cruz maybe, or Berkeley even. > If not, why do you feel compelled to speak on their behalf. > I'm volunteering this information. I read a lot of CS type stuff and know that Guido finds mutable strings an abomination in Ruby. Mutability must be tastefully applied. Doing it to a primitive number type should at least be on the table for discussion, even in polite company. > As an OOP devotee I am surpirsed you find this as much of an issue as you seem to. > I've written polyhedron, vector and modulo integer types, and generally come to wanting to return a new object as the result of any operation, even rotations in the case of polyhedra. I'll use reassignment to save namespace, but I prefer mypoly = mypoly('X', 90) over mypoly('X',90) and a side-effect. > My complex number is an old fashioned object. For my purposes - destroying it and > recreating another every time a value changes is wasteful, (and cruel ;)) > "Old fashioned object" isn't clear enough. It's as easy to return a new object as not. Neither approach is intrinsically "old fashioned". Look at strings. 'kirby'.uppercase() returns the string 'KIRBY'. If I want to keep the result, I need to assign it a reference. That's how primitive numbers behave too. -2 .__invert__() returns 3, doesn't alter -2 in any way. > Instead of having my geometric objects of the complex plane *be* complex numbes, > there is certainly the solution of having a complex number as an attribute of these objects It'd see that as a separate issue. Even if you demote the identity to an attribute, you're still not compelled to implement that much mutability. > and then I can take more your approach, and at the speed of C, since I would then > be using the built-in for arithmettic operations. > > There remained something unsatisfying to me about that approach. > > Until something blows up about my current approach, I am quite happy with it. > That's what I was asking. Do you feel compelled or are you more just freely experimenting with an approach that gives you pleasure. I think you've answered my question. I'm only giving substance to my adjective "quirky". It's OK to be quirky and have fun, in my book anyway. > And if and when something does blow up, I will know what it is and will have > developed some *real* expertise on the problem of mutable complex numbers, beyond > the fear of distrubing the sleep of some abstract CS type. And will report back in. > Fair enough. Just be aware of the many skeptics in your audience, who'll think you're off on some wild goose chase in search of a superior paradigm. > At the moment I don't expect that to happen - but my mind is open - as it has been from > the beginning - to the possbility that I have made a wrong turn here. > > Art It all depends on your goals. If your goal is a working PyGeo with code your well understand, then the mutable complex number may be no hindrance at all. If your goal is to get your source code studied in CS departments, as exemplary of how to go about coding such a VPython app, that'd be a different challenge. Probably why I'm drawn to American Literature is I think that's where my own brand of quirkiness will find more acceptance. I *do* want to have my fun and need a fair amount of freedom to do so. Likewise in the Python community, I'd hope fun experiments like yours get a lot of latitude to just develop as they develop. You'll solicit feedback, sure, but there's nobody here pretending to be your boss in any way. Kirby From ajsiegel at optonline.net Fri Mar 17 20:09:21 2006 From: ajsiegel at optonline.net (ajsiegel at optonline.net) Date: Fri, 17 Mar 2006 14:09:21 -0500 Subject: [Edu-sig] Properties use case In-Reply-To: References: <44175733.8030408@optonline.com> <4418E168.5030901@optonline.com> <4419A90A.9000509@optonline.com> Message-ID: ----- Original Message ----- From: kirby urner Date: Friday, March 17, 2006 1:17 pm Subject: Re: [Edu-sig] Properties use case > > I flirt with the idea, but feel more drawn to American Literature. > Hoping for some honorary degree from UC Santa Cruz maybe, or Berkeley > even. As it happens I have an *actual* degree in Literature from a school in that neighborhood - San Francisco State. Not an academically honered department, but certainly an interesting one - folks who hung with Andre Beton and the Surrealists in Paris in their heyday, etc. But for us to argue over things we actually know something about would be so much less entertaining ;). > > That's what I was asking. Do you feel compelled or are you more just > freely experimenting with an approach that gives you pleasure. I > think you've answered my question. I'm only giving substance to my > adjective "quirky". It's OK to be quirky and have fun, in my book > anyway. I feel neither compelled, or that I am experimenting. I am trying to solve problems, though some of those problems have an aesthetic component as well as a functional component. I can't think outside the box, having no good idea where the box is to begin with. Art From delza at livingcode.org Sat Mar 18 00:08:35 2006 From: delza at livingcode.org (Dethe Elza) Date: Fri, 17 Mar 2006 15:08:35 -0800 Subject: [Edu-sig] Properties use case In-Reply-To: References: <44175733.8030408@optonline.com> <4418E168.5030901@optonline.com> <4419A90A.9000509@optonline.com> Message-ID: <24d517dd0603171508g161d33f1xa6d6e7dff48196ec@mail.gmail.com> Arthur: > > Are you a CS type? If so, speak directly. I'm a CS type (BS in CS, MS in CSEE). Kirby's right, it's generally considered "better" to return a new primitive type rather than mutate it in place. Many programming languages impose "striction functionality" which means you have no (or nearly no) mutable state at all, just returning new values. This can avoid many, many types of problems in programming, but isn't as friendly in some cases. For "better" in the first sentence above you can insert any of: faster, more stable, less error-prone, and frequently more readable. Arthur: > > If not, why do you feel compelled to speak on their behalf. Kirby: > I'm volunteering this information. And therein I think we have the nub of the frequent Arthur/Kirby semi-argument. My impression is that Kirby often offers suggestions and information, and Arthur interprets this as telling him what to do and pushes back. No idea what to do about this, just pointing it out. Arthur: > > My complex number is an old fashioned object. For my purposes - destroying it and > > recreating another every time a value changes is wasteful, (and cruel ;)) Wasteful how? By implementing your own complex type and ignoring the built-in one you are wasting memory, speed, and (arguably) your time. The bytes that are thrown away when an existing complex object is reclaimed are treated humanely and given a decent recycling to emerge as new objects. Where is the waste? Kirby: > That's > how primitive numbers behave too. -2 .__invert__() returns 3, doesn't > alter -2 in any way. I hadn't noticed the __invert__ method before so I tested this: -2.__invert__() gave a SyntaxError (-2).__invert__() gave 1 (2).__invert__() gave -3 Just to be pedantic about it. %-) > It all depends on your goals. If your goal is a working PyGeo with > code your well understand, then the mutable complex number may be no > hindrance at all. If your goal is to get your source code studied in > CS departments, as exemplary of how to go about coding such a VPython > app, that'd be a different challenge. That about sums it up. You can make up you're own types to your hearts content: mutable ints and floats if you want. It can be a good learning experience, as long as you're not trying to to pass it off as a best practice. --Dethe From ajsiegel at optonline.net Sat Mar 18 00:14:37 2006 From: ajsiegel at optonline.net (ajsiegel at optonline.net) Date: Fri, 17 Mar 2006 18:14:37 -0500 Subject: [Edu-sig] Properties use case In-Reply-To: <24d517dd0603171508g161d33f1xa6d6e7dff48196ec@mail.gmail.com> References: <44175733.8030408@optonline.com> <4418E168.5030901@optonline.com> <4419A90A.9000509@optonline.com> <24d517dd0603171508g161d33f1xa6d6e7dff48196ec@mail.gmail.com> Message-ID: ----- Original Message ----- From: Dethe Elza Date: Friday, March 17, 2006 6:08 pm Subject: Re: [Edu-sig] Properties use case > Arthur: > > > Are you a CS type? If so, speak directly. > > I'm a CS type (BS in CS, MS in CSEE). Kirby's right, it's generally > considered "better" to return a new primitive type rather than mutate > it in place. What defines a "primitive type". My understanding is that in many languages there is no complex primitive type. Perhaps it is a bit less primitive, and that the thinking about, say, floats does not apply, one-to-one, about thinking about complex numbers. > And therein I think we have the nub of the frequent Arthur/Kirby > semi-argument. My impression is that Kirby often offers suggestions > and information, and Arthur interprets this as telling him what to do > and pushes back. No idea what to do about this, just pointing it out. How about the rub of the Dethe/Arthur dynamics. You think I am being a wise guy, when I think I am being an iniquisitive student - I think. Art From delza at livingcode.org Sat Mar 18 00:26:53 2006 From: delza at livingcode.org (Dethe Elza) Date: Fri, 17 Mar 2006 15:26:53 -0800 Subject: [Edu-sig] Properties use case In-Reply-To: References: <44175733.8030408@optonline.com> <24d517dd0603171508g161d33f1xa6d6e7dff48196ec@mail.gmail.com> Message-ID: <24d517dd0603171526g224cc957o831d10c02640bf73@mail.gmail.com> > What defines a "primitive type". My understanding is that in many languages there > is no complex primitive type. Each language defines its own primitive types, some have no primitive types (or hide them better), some are more primitive than others. In Python, complex numbers have an implementation which is coded in C and quite fast compared to anything achievable in pure Python. > Perhaps it is a bit less primitive, and that the thinking about, say, > floats does not apply, one-to-one, about thinking about complex numbers. In the sense that they are not based on hardware-implemented types that's true. In the sense that they are "special" in Python (i.e., faster and more efficient than user-created types), then they are still primitives. > How about the rub of the Dethe/Arthur dynamics. You think I am being a wise guy, > when I think I am being an iniquisitive student - I think. I understand that you're an inquisitive student, but the style you respond in is often more aggressive than inquisitive, as far as I've been able to observe. Nothing wrong with challenging the status quo, or whatever, but it does tend to squelch participation on the list at times, especially from members who are less thick-skinned (or patient) than Kirby. Just saying. --Dethe From ajsiegel at optonline.net Sat Mar 18 00:40:12 2006 From: ajsiegel at optonline.net (ajsiegel at optonline.net) Date: Fri, 17 Mar 2006 18:40:12 -0500 Subject: [Edu-sig] Properties use case In-Reply-To: <24d517dd0603171526g224cc957o831d10c02640bf73@mail.gmail.com> References: <44175733.8030408@optonline.com> <24d517dd0603171508g161d33f1xa6d6e7dff48196ec@mail.gmail.com> <24d517dd0603171526g224cc957o831d10c02640bf73@mail.gmail.com> Message-ID: ----- Original Message ----- From: Dethe Elza > > What defines a "primitive type". My understanding is that in many > languages there > > is no complex primitive type. > > Each language defines its own primitive types, some have no primitive > types (or hide them better), some are more primitive than others. In > Python, complex numbers have an implementation which is coded in C and > quite fast compared to anything achievable in pure Python. Obviously once I become convinced that the mutable complex numbers happens to work for my purposes, there is nothing preventing me from implementing as an extension in C. Would that put the issue to bed? What - pedagogically - do you imagine you are communicating to me by telling me that *this* is generally considered better than *that*. Nakedly - pretty much nothing. And it would be easier to converse, no doubt,l if we all felt we were listening to each other. You always seem to be listening with half an ear. I said in the course of the discussion - maybe 3 times - that I understood that I was giving up performance, and that I could understand an objection on that basis, but for where I am going - knowing for example that a C extension is always doable - that I wasn't going to let that be short-term decisive. You come back to me explaining to be that I am giving up performance. Yeah. I know. > I understand that you're an inquisitive student, but the style you > respond in is often more aggressive than inquisitive, as far as I've > been able to observe. Nothing wrong with challenging the status quo, > or whatever, but it does tend to squelch participation on the list at > times, especially from members who are less thick-skinned (or patient) > than Kirby. Kirby understands. I am from New York ;) You seemed married to Arthur as the desruptive bad guy. I don't buy it, but don't expect to change your mind either. Art From delza at livingcode.org Sat Mar 18 00:59:33 2006 From: delza at livingcode.org (Dethe Elza) Date: Fri, 17 Mar 2006 15:59:33 -0800 Subject: [Edu-sig] Properties use case In-Reply-To: References: <44175733.8030408@optonline.com> <24d517dd0603171508g161d33f1xa6d6e7dff48196ec@mail.gmail.com> <24d517dd0603171526g224cc957o831d10c02640bf73@mail.gmail.com> Message-ID: <24d517dd0603171559i1f2f692cxf2a5ac1c1936bff6@mail.gmail.com> > Obviously once I become convinced that the mutable complex numbers happens > to work for my purposes, there is nothing preventing me from implementing > as an extension in C. Of course. > Would that put the issue to bed? No particular issue. Kirby said something, you challenged it, I'm putting in my CAD$0.02. You can reimplement python in python if you want (and you wouldn't be the first). > What - pedagogically - do you imagine you are communicating to me by telling me > that *this* is generally considered better than *that*. Nakedly - pretty much nothing. Thought I said that--faster, less memory, more readable, y'know, because you asked. > And it would be easier to converse, no doubt,l if we all felt we were listening to each other. Oh, I mostly listen. Sometimes I stop listening when the thread goes on too long without going anywhere. On rare occasions I jump in. Coming to regret doing that, going back to lurk mode now. > You always seem to be listening with half an ear. Hmm. I wonder which half? > I said in the course of the discussion - maybe 3 times - that I understood that I was giving > up performance, and that I could understand an objection on that basis, but for where I > am going - knowing for example that a C extension is always doable - that I wasn't > going to let that be short-term decisive. Yes, I know, I read that. I'm not questioning that you know this. You asked what problems from a CS viewpoint there would be. I told you. You don't like it, don't ask. > You come back to me explaining to be that I am giving up performance. Which you knew, but you asked. Performance is a nebulous word by itself. I tried to clarify--adding mutable objects is unlikely to save *either* memory *or* speed. Your mileagle may vary, of course. > Kirby understands. I am from New York ;) Yeah, I'm from Tennessee, but I don't speak from there. And I don't use it to justify being confrontational. > You seemed married to Arthur as the desruptive bad guy. Nope, perfectly willing to be shown otherwise. On the other hand, folks have dropped off the list, or threatened to, in part because of your attacks on other posters. Just because I'm de-lurking to point this out doensn't mean I'm the only one who feels this way (although maybe the only one still around, dunno). > I don't buy it, but don't expect to change your mind > either. Damn. I wish you would. I'd really like to have my mind changed on this. I truly would. > Art --Dethe From ajsiegel at optonline.net Sat Mar 18 01:15:52 2006 From: ajsiegel at optonline.net (ajsiegel at optonline.net) Date: Fri, 17 Mar 2006 19:15:52 -0500 Subject: [Edu-sig] Properties use case In-Reply-To: <24d517dd0603171559i1f2f692cxf2a5ac1c1936bff6@mail.gmail.com> References: <44175733.8030408@optonline.com> <24d517dd0603171508g161d33f1xa6d6e7dff48196ec@mail.gmail.com> <24d517dd0603171526g224cc957o831d10c02640bf73@mail.gmail.com> <24d517dd0603171559i1f2f692cxf2a5ac1c1936bff6@mail.gmail.com> Message-ID: ----- Original Message ----- From: Dethe Elza > > Yes, I know, I read that. I'm not questioning that you know this. > You asked what problems from a CS viewpoint there would be. I told > you. You don't like it, don't ask. Its not that I'm a bad guy. Must be that I'm just stupid. I still don't understand what I have been told from a CS standpoint. Beyond that one Computer Scientist doesn't particularly like me. But I knew that already, as well. Art From Scott.Daniels at Acm.Org Sat Mar 18 01:23:08 2006 From: Scott.Daniels at Acm.Org (Scott David Daniels) Date: Fri, 17 Mar 2006 16:23:08 -0800 Subject: [Edu-sig] Properties use case In-Reply-To: References: <44175733.8030408@optonline.com> <44182790.1030200@optonline.com> <4418E168.5030901@optonline.com> <4419A90A.9000509@optonline.com> Message-ID: ajsiegel at optonline.net wrote: > Instead of having my geometric objects of the complex plane *be* complex numbes, > there is certainly the solution of having a complex number as an attribute of these objects - > and then I can take more your approach, and at the speed of C, since I would then > be using the built-in for arithmettic operations. > > There remained something unsatisfying to me about that approach. > > Until something blows up about my current approach, I am quite happy with it. The thing that typically blows up is when you are (for example) computing with a complex number that is changed halfway through the computation by another thread (say a mouse drag). The square root winds up being neither the square root of the original number nor of the new changed number. Further, it becomes dicey to try to prove that your square root function will always terminate (a step size from one that is guaranteed to settle might be a disaster at the new-improved value. So, that's why CS people like immutable primitive types. -- Scott David Daniels Scott.Daniels at Acm.Org From Scott.Daniels at Acm.Org Sat Mar 18 01:28:55 2006 From: Scott.Daniels at Acm.Org (Scott David Daniels) Date: Fri, 17 Mar 2006 16:28:55 -0800 Subject: [Edu-sig] Thinking about my class... In-Reply-To: References: Message-ID: kirby urner wrote: > Early AM before school in Portland, and my Brother multifunction > printer, soon to be retired (factory remanufactured clone enroute, > after we broke the paper feeder), is printing up a storm. > > We'll be doing a simple substitution cipher, i.e. substitute a random > shuffle (permutation) of A-Z and space, for some coherent plaintext > (also in Latin-1), to get garbled ciphertext, then reverse. > > Here's my worksheet (decrypt not included): ... > > def makefunction(): > theletters = list(uppercase[:26] + ' ') > copyof = theletters[:] > shuffle(copyof) > return dict(zip(theletters, copyof)) You could go: def makefunction(): theletters = uppercase[:26] + ' ' copyof = list(theletters) # reason: to allow a shuffle shuffle(copyof) return dict(zip(theletters, copyof)) -- -- Scott David Daniels Scott.Daniels at Acm.Org From mtobis at gmail.com Sat Mar 18 01:39:44 2006 From: mtobis at gmail.com (Michael Tobis) Date: Fri, 17 Mar 2006 18:39:44 -0600 Subject: [Edu-sig] Properties use case In-Reply-To: References: <44175733.8030408@optonline.com> <4418E168.5030901@optonline.com> <4419A90A.9000509@optonline.com> Message-ID: Thank you for a refreshingly terse and substantive comment! Let's have more of those! mt On 3/17/06, Scott David Daniels wrote: > ajsiegel at optonline.net wrote: > > > Instead of having my geometric objects of the complex plane *be* complex numbes, > > there is certainly the solution of having a complex number as an attribute of these objects - > > and then I can take more your approach, and at the speed of C, since I would then > > be using the built-in for arithmettic operations. > > > > There remained something unsatisfying to me about that approach. > > > > Until something blows up about my current approach, I am quite happy with it. > > The thing that typically blows up is when you are (for example) > computing with a complex number that is changed halfway through > the computation by another thread (say a mouse drag). The square > root winds up being neither the square root of the original number > nor of the new changed number. Further, it becomes dicey to > try to prove that your square root function will always terminate > (a step size from one that is guaranteed to settle might be a > disaster at the new-improved value. > > So, that's why CS people like immutable primitive types. > > -- Scott David Daniels > Scott.Daniels at Acm.Org > > _______________________________________________ > Edu-sig mailing list > Edu-sig at python.org > http://mail.python.org/mailman/listinfo/edu-sig > From mtobis at gmail.com Sat Mar 18 01:55:31 2006 From: mtobis at gmail.com (Michael Tobis) Date: Fri, 17 Mar 2006 18:55:31 -0600 Subject: [Edu-sig] Properties use case In-Reply-To: <24d517dd0603171559i1f2f692cxf2a5ac1c1936bff6@mail.gmail.com> References: <44175733.8030408@optonline.com> <24d517dd0603171508g161d33f1xa6d6e7dff48196ec@mail.gmail.com> <24d517dd0603171526g224cc957o831d10c02640bf73@mail.gmail.com> <24d517dd0603171559i1f2f692cxf2a5ac1c1936bff6@mail.gmail.com> Message-ID: On 3/17/06, Dethe Elza wrote: > Nope, perfectly willing to be shown otherwise. On the other hand, > folks have dropped off the list, or threatened to, in part because of > your attacks on other posters. My interest in justice has overwhelmed my interest in discretion. I have followed the present discussion closely and think the above does not match my experience. Being new here, I have no idea of prior history. This is the first significant thread I have followed on this list. With that caveat I feel compelled to say that in the context of the current discussion I saw Arthur ask questions in a straightforward way, and get very little help and lots of wildly off-topic nitpicking digression laced with argument from authority and a snarky attitude. I saw nothing of him attacking any other poster, and think he has been relatively patient given the tone of the responses. In the not unlikely event that I stop paying any mind to this list as a consequence of the present discussion, I feel compelled from a sense of fairness to say that it will *not* be because of anything I have seen in Arthur's behavior. mt From ajsiegel at optonline.net Sat Mar 18 08:02:16 2006 From: ajsiegel at optonline.net (Arthur) Date: Sat, 18 Mar 2006 02:02:16 -0500 Subject: [Edu-sig] Properties use case In-Reply-To: Message-ID: <000001c64a59$e6691930$1702a8c0@BasementDell> > >-----Original Message----- > >From: edu-sig-bounces at python.org > >[mailto:edu-sig-bounces at python.org] On Behalf Of Scott David Daniels > > > >So, that's why CS people like immutable primitive types. I believe you. But if we trace back the thread we will see that the bottom line question that I was struggling with at the beginning was precisely the question of what *makes* a primitive type such. Obviously something much deeper than the fact that it is coded in C. But let's leave it alone though, because at the moment, among other things - for the practical purposes for which I raised the issue (and as a Na?ve Programmer, that is my focus) - it seems to be moot. Ten posts back or so I had tried to communicate that through Kirby's prodding and Michael's suggestive remarks, I had begun to see an approach that I had not before considered that might solve the issue I consider myself to be facing in a manner that was more satisfactory - not only to the CS world - but to myself. This was *after* I complemented Kirby on the transparency of his approach and suggested that I was trying to emulate such an approach more thoroughly. But - and this is what particularly confused me - before he declared the idea of a mutable complex number - I think the technical term was - "creepy". Let's just go to sleep. Art From kirby.urner at gmail.com Sat Mar 18 17:46:46 2006 From: kirby.urner at gmail.com (kirby urner) Date: Sat, 18 Mar 2006 08:46:46 -0800 Subject: [Edu-sig] Thinking about my class... In-Reply-To: References: Message-ID: > You could go: > > def makefunction(): > theletters = uppercase[:26] + ' ' > copyof = list(theletters) # reason: to allow a shuffle > shuffle(copyof) > return dict(zip(theletters, copyof)) I like it. Hadn't considered zipping a string with a list: >>> zip('abc',['r','s','t']) [('a', 'r'), ('b', 's'), ('c', 't')] Kirby From Scott.Daniels at Acm.Org Sat Mar 18 19:03:10 2006 From: Scott.Daniels at Acm.Org (Scott David Daniels) Date: Sat, 18 Mar 2006 10:03:10 -0800 Subject: [Edu-sig] Properties use case In-Reply-To: <000001c64a59$e6691930$1702a8c0@BasementDell> References: <000001c64a59$e6691930$1702a8c0@BasementDell> Message-ID: Arthur wrote: > ... But if we trace back the thread we will see that the bottom line question > that I was struggling with at the beginning was precisely the question of > what *makes* a primitive type such. Obviously something much deeper than the > fact that it is coded in C. Well, if it hadn't been buried in a hail of words, it would have been more obvious to the readers as well as the writer. I'll try to talk from the point of view of a language designer. Typically, a computer language is developed to solve some kind of problem (or family of problems). The primitives must be enough to express, succinctly, problems in that space and parts of solutions to those problems. You'd be surprised at the variety of things people want to express. It used to be commonly accepted that "little languages" was the way to attack this problem. A new problem space meant building a "little language" to express its problems and solutions. However, it turns out that these "little languages" have this "feeping creaturism" problem; the users often want "just a bit more" added until the language (which was once nice and small and tidy) seems to be all bolts and knobs and corners where unanticipated extensions got thrown on to solve "just one problem." Also, the number of people capable of building, supporting, and extending a language is not huge in comparison to the number of problem spaces. Experience in building languages has shown us that the more "distinct" things in the language, the harder it is to learn, use, and remember. Here I am not talking about the complexity of the compiler/interpreter/language translation system, but the amount of "stuff" a _user_ of the language needs to know about the language. The fewer things a user has to track mentally, the "simpler" the language. So, here is a tension: we want a simple language that can express succinctly problems and (effective) solutions to problems. The simpler the language, the more quickly you can become expert in the language, and move on to the problems you really want to solve. The more expressive the language, the simpler your programs in your field of discourse. We do know that program complexity grows _significantly_ worse than linearly with the size of a program, so we want the programs the user writes to be small to help him out. Often adding more to the language shrinks the users code, so there is a balancing act here. Here are some criteria for primitives. We want as few primitives as possible. We should add primitives for anything almost every user will need. In addition to those, we may add some primitives for those things that the user cannot build himself nearly as efficiently (or perhaps is very likely to get wrong). We probably need primitives for every "manifest constant" in a program (the 5 in "i *= 5"). Almost always, programs need a way to perform I/O (Knuth, in one class defined a computer program as something that took zero or more inputs and produced one or more outputs, on the grounds a rock implements anything that produces zero outputs). But programs that simply produce output, but consume no input are rare; ab initio chemists may write some of these. Usually the programs are to be operated by people other than those who wrote the programs, so they must consume input in some form. Input, output, and calculation all need to be expressed. Even if you have no intention of doing text processing, input and output almost force you to have a text type. Most calculation will want to do arithmetic (there are languages w/o arithmetic primitives). There must be a way to build data structures (combine our primitives), since the design and use of data structures is core CS (and the key to not having to build everything into the language). We need to be able to define functions (a way to decompose problems), and how functions and their results are combined is, finally, the probable answer to the mutability question. If every time you call a function it might mutate its arguments, safe practice is to copy any arguments to the function. Early FORTRAN said a procedure could change its arguments, and the change would be reflected in the calling program. So, after: pi = 3.1415297 somesub(pi, 3) the value of pi might be changed. Even worse, the program might change the value of 3 (the constant used in the compiled chunk of code for 3). The FORTRAN solution was to tell the programmer "don't do that." We now solve these problems either by using "pass-by-value" semantics (the subroutine gets a copy of its argument), or by passing immutable objects. So, it makes sense that manifest constants must be immutable in a language like Python that does call-by-sharing. Also you avoid another nasty problems called "aliasing". If you have a function like: def same_range(a, b): while a < b: a *= 2 while a >= b: a /= 2 return a Calling "same_range(lumberjacks, lumberjacks)" will make the second loop infinite because both a and b are aliases for the same object. That's no problem for immutables (one version is as good as another), but can cause surprisingly hard-to-find bugs. Note aliases are _much_ harder to detect than simply this case, and the results can be nasty. Some people have proposed that program have no side-effects to solve this, but others among us consider that absurd: a program models reality, and reality is mutable. There is no way to write to a printer and then abandon that calculation and move to another where the printer has not yet been written upon. So I've gone on at absurd length here to explain why immutable primitives are preferred. The reasons are subtle, and come from shared experience on building languages. This is why some of us study computer science; we are interested in such questions. It is frustrating sometimes to be asked a simple-to-ask question that seems combined with a "nasty CS elitists" attitude. There _is_ a body of work in CS, what it talks about is not trivial, and it builds on itself in a way that makes it hard to answer some questions succinctly. Some of the questions feel a lot like, "why so many planar surfaces in architecture;" to answer them requires work, not simply in the saying, but in looking back for the whys. Often the first answer "it makes my skin crawl" is the real answer; some rule has become so internalized you don't know why you feel it. It doesn't necessarily mean Kirby was saying you had done an incredibly stupid thing; it might simply mean that something about that as design felt dangerous to him in some way. --Scott David Daniels Scott.Daniels at Acm.Org From ajsiegel at optonline.net Sat Mar 18 19:39:29 2006 From: ajsiegel at optonline.net (Arthur) Date: Sat, 18 Mar 2006 13:39:29 -0500 Subject: [Edu-sig] Properties use case In-Reply-To: Message-ID: <000001c64abb$4a8ef360$1702a8c0@BasementDell> > >-----Original Message----- > >From: edu-sig-bounces at python.org > >[mailto:edu-sig-bounces at python.org] On Behalf Of Scott David Daniels > >Sent: Saturday, March 18, 2006 1:03 PM > >To: edu-sig at python.org > >Subject: Re: [Edu-sig] Properties use case > > > >Arthur wrote: > >Some of the questions feel a lot like, "why so many planar > >surfaces in architecture;" to answer them requires work, not > >simply in the saying, but in looking back for the whys. > >Often the first answer "it makes my skin crawl" is the real > >answer; some rule has become so internalized you don't know > >why you feel it. It doesn't necessarily mean Kirby was > >saying you had done an incredibly stupid thing; it might > >simply mean that something about that as design felt > >dangerous to him in some way. Can we allow this to be about the communication between teacher and student, and me be the student recognizing that the teacher has the knowledge he seeks, but frustrated... Because it is probably exactly my inability to phrase the question properly - I'm just a student - that leads to the problem. But if I was able to ask the question exactly properly, I probably wouldn't need to ask it - I would probably already have the answer. So I am recognizing that *I* am the source of the problem, in this sense. But that doesn't make the problem go away. Or allow us the say that the process is working. Intuitively, there is something qualitatively different - float as primitive, complex number as primitive. Simply a wrong intuition? Nothing lying beneath it? >From where I sit it looks that one might choose to express a 3 element vector as a tuple or one might choose to express is as a list, or even more likely a mutable array. And while suspecting that one can get into religious arguments about the matter, in practice smart people can be found doing either or both. I don't understand, really, the distinction between a vector expressed as a list and a vector expressed as a tuple, from the concept of a complex number in mutable form, and one in immutable form. If you feel like trying to help... Art From ajsiegel at optonline.net Sat Mar 18 20:11:03 2006 From: ajsiegel at optonline.net (Arthur) Date: Sat, 18 Mar 2006 14:11:03 -0500 Subject: [Edu-sig] Properties use case In-Reply-To: <000001c64abb$4a8ef360$1702a8c0@BasementDell> Message-ID: <000701c64abf$b3d7c870$1702a8c0@BasementDell> > >-----Original Message----- > >From: edu-sig-bounces at python.org > >[mailto:edu-sig-bounces at python.org] On Behalf Of Arthur > >Sent: Saturday, March 18, 2006 1:39 PM > >To: 'Scott David Daniels'; edu-sig at python.org >>I don't understand, really, the distinction > >between a vector expressed as a list and a vector expressed > >as a tuple, from the concept of a complex number in mutable > >form, and one in immutable form. > > > >If you feel like trying to help... Put another way, if I take the PyPy implementation of the complex primitive, and comment out the 2 property lines that restrict the write to real and imag - and instead of calling it a primitive I call it a class. And I use the class as such - where have I gone wrong? Art From lac at strakt.com Sat Mar 18 21:01:17 2006 From: lac at strakt.com (Laura Creighton) Date: Sat, 18 Mar 2006 21:01:17 +0100 Subject: [Edu-sig] Properties use case In-Reply-To: Message from Arthur of "Sat, 18 Mar 2006 14:11:03 EST." <000701c64abf$b3d7c870$1702a8c0@BasementDell> References: <000701c64abf$b3d7c870$1702a8c0@BasementDell> Message-ID: <200603182001.k2IK1H2v007087@theraft.strakt.com> In a message of Sat, 18 Mar 2006 14:11:03 EST, Arthur writes: >> >-----Original Message----- >> >From: edu-sig-bounces at python.org >> >[mailto:edu-sig-bounces at python.org] On Behalf Of Arthur >> >Sent: Saturday, March 18, 2006 1:39 PM >> >To: 'Scott David Daniels'; edu-sig at python.org > >>>I don't understand, really, the distinction >> >between a vector expressed as a list and a vector expressed >> >as a tuple, from the concept of a complex number in mutable >> >form, and one in immutable form. >> > >> >If you feel like trying to help... > > >Put another way, if I take the PyPy implementation of the complex primiti >ve, >and comment out the 2 property lines that restrict the write to real and >imag - and instead of calling it a primitive I call it a class. And I use >the class as such - where have I gone wrong? > >Art I'm confused too. It sounds to me that you want to invent your own type. Does your type have any relationship to the complex numbers that we know and love, or do you just want a type that has 2 parts? In particular, check out: http://home.scarlet.be/~ping1339/complget.htm#Polar-representation Do you want this a + ib = r (cos(t) + i sin(t)) to be true for your type as well? I think so. I'm worried that when you start mutating the type -- as opposed to simply assigning new values to it -- you can create a state where this is _not_ true. Am I wrong? Laura From Scott.Daniels at Acm.Org Sat Mar 18 21:19:45 2006 From: Scott.Daniels at Acm.Org (Scott David Daniels) Date: Sat, 18 Mar 2006 12:19:45 -0800 Subject: [Edu-sig] Properties use case In-Reply-To: <000701c64abf$b3d7c870$1702a8c0@BasementDell> References: <000001c64abb$4a8ef360$1702a8c0@BasementDell> <000701c64abf$b3d7c870$1702a8c0@BasementDell> Message-ID: Arthur wrote: > > >>> -----Original Message----- >>> From: edu-sig-bounces at python.org >>> [mailto:edu-sig-bounces at python.org] On Behalf Of Arthur >>> Sent: Saturday, March 18, 2006 1:39 PM >>> To: 'Scott David Daniels'; edu-sig at python.org > >>> I don't understand, really, the distinction >>> between a vector expressed as a list and a vector expressed >>> as a tuple, from the concept of a complex number in mutable >>> form, and one in immutable form. >>> >>> If you feel like trying to help... > > > Put another way, if I take the PyPy implementation of the complex primitive, > and comment out the 2 property lines that restrict the write to real and > imag - and instead of calling it a primitive I call it a class. And I use > the class as such - where have I gone wrong? > > Art OK, so as I said in my over-long thing, immutable types have an exciting property that you can't really tell aliases from copies. This makes Python's call method behave a lot like "call-by-value" -- a good thing, since call-by-value is easy to analyze (both for machines and humans). With mutables, you have the question of "caller-saves" or "callee-saves" in function calls. Caller-saves makes a copy to do the call with, and callee-saves makes a copy on function entry (at least for those args for which there will be mutation). Typically, a lot of effort (either by the compiler or the programmer) is expended to keep all of this copying to a minimum. With immutables, you needn't do any of the bookkeeping. It is not that you have gone terribly wrong; it is that you have opened the lid on a large class of avoidable problems. If you look at Java's strings (as I remember -- it has been forever since I studied Java at all), you will find they are mutable. You also find that Java code copies strings a _lot_, just to be safe against lower- level mutation. Your primitive complex (the mutable one) also could not be used as a dictionary key except by identity, which would not allow rapid access. --Scott David Daniels Scott.Daniels at Acm.Org From ajsiegel at optonline.net Sat Mar 18 21:35:34 2006 From: ajsiegel at optonline.net (Arthur) Date: Sat, 18 Mar 2006 15:35:34 -0500 Subject: [Edu-sig] Properties use case In-Reply-To: <200603182001.k2IK1H2v007087@theraft.strakt.com> Message-ID: <000001c64acb$8387f620$1702a8c0@BasementDell> > >-----Original Message----- > >From: Laura Creighton [mailto:lac at strakt.com] > >Sent: Saturday, March 18, 2006 3:01 PM > >To: Arthur > > > >I'm confused too. > > > >It sounds to me that you want to invent your own type. Does > >your type have any relationship to the complex numbers that > >we know and love, or do you just want a type that has 2 parts? > > > >In particular, check out: > >http://home.scarlet.be/~ping1339/complget.htm#Polar-representation > > > >Do you want this > > > >a + ib = r (cos(t) + i sin(t)) > > > >to be true for your type as well? I think so. Isn't the creation of any class the creation of one's own type? Now what am I missing now? My class - unless I am missing something else - does complex mathematics exactly as does the built-in type. But it is now the Complex type, say. Which allows me to say a=Complex(5,3) on creation, and a.real = 6 somewhere down the line. Obviously notation ally, a=5 +3j will still return the Python immutable built-in type. Which is fine by me. That's exactly why I am having so much trouble with the problem I seem to be causing here. I understand next to nothing about threading, but can't understand why this particular class is any less safe than any other class one might create and use. Use cases? Seems to me to be a totally separate and different issue. One that, for example, Michael was skeptical about from the beginning. But that really doesn't seem to me to be what the discussion has been about - at least the discussion that others seem to want to have. >From the use case point of view, I have retained my own skepticism, as I tried to make clear. I had my reasonable reasons to go in that direction, I think. But there wasn't any really, really deep soul searching, precisely because there didn't seem to be anything at all unusual about the idea of this kind of class compared to others I might create and use as a matter of course - despite that there was a similar built-in. But no, *don't* like to give up performance, and have been happy to have had a discussion that led me to a possible alternative that is prettier, *and* faster. Ain't Edu-sig cool ;) Art From Scott.Daniels at Acm.Org Sat Mar 18 21:54:09 2006 From: Scott.Daniels at Acm.Org (Scott David Daniels) Date: Sat, 18 Mar 2006 12:54:09 -0800 Subject: [Edu-sig] Properties use case In-Reply-To: <000001c64acb$8387f620$1702a8c0@BasementDell> References: <200603182001.k2IK1H2v007087@theraft.strakt.com> <000001c64acb$8387f620$1702a8c0@BasementDell> Message-ID: Arthur wrote: > > ... > Isn't the creation of any class the creation of one's own type? Now what am > I missing now? Ahh, I thought we were talking about language primitives. The range of behavior for non-primitives is larger. For example, a Vertex in 3-space for a polyhedron might have mutable x, y, and z properties just so that shared points and coincident points are distinguished. > My class - unless I am missing something else - does complex mathematics > exactly as does the built-in type. But it is now the Complex type, say. > Which allows me to say a=Complex(5,3) on creation, and a.real = 6 somewhere > down the line. Obviously notation ally, a=5 +3j will still return the Python > immutable built-in type. Which is fine by me. I thought you had been asking why it was wrong to make a primitive mutable. > That's exactly why I am having so much trouble with the problem I seem to be > causing here. I understand next to nothing about threading, but can't > understand why this particular class is any less safe than any other class > one might create and use. It is not, except for one thing: one often thinks of complex numbers as values, and when they are mutable, they are more objects than values. It is dangerous in that users of the type may have wrong intuitions. > ...But no, *don't* like to give up performance, and have been happy to have had > a discussion that led me to a possible alternative that is prettier, *and* > faster. OK, so one big performance gain is that immutable values can be safely shared, a copy is never a meaningful operation on an immutable type. --Scott David Daniels Scott.Daniels at Acm.Org From chuck at freshsources.com Sat Mar 18 22:23:46 2006 From: chuck at freshsources.com (Chuck Allison) Date: Sat, 18 Mar 2006 14:23:46 -0700 Subject: [Edu-sig] Properties use case In-Reply-To: References: <44175733.8030408@optonline.com> <44182790.1030200@optonline.com> <4418E168.5030901@optonline.com> <4419A90A.9000509@optonline.com> Message-ID: <716576471.20060318142346@freshsources.com> Hello Scott, In C++ we have a saying for value types, such as complex numbers: "Do as the ints do". The complex class in C++ is also immutable. I have never seen a need for mutable numeric, scalar quantities since I began scientific programming 30 years ago. Just a perspective. Friday, March 17, 2006, 5:23:08 PM, you wrote: SDD> ajsiegel at optonline.net wrote: >> Instead of having my geometric objects of the complex plane *be* complex numbes, >> there is certainly the solution of having a complex number as an attribute of these objects - >> and then I can take more your approach, and at the speed of C, since I would then >> be using the built-in for arithmettic operations. >> >> There remained something unsatisfying to me about that approach. >> >> Until something blows up about my current approach, I am quite happy with it. SDD> The thing that typically blows up is when you are (for example) SDD> computing with a complex number that is changed halfway through SDD> the computation by another thread (say a mouse drag). The square SDD> root winds up being neither the square root of the original number SDD> nor of the new changed number. Further, it becomes dicey to SDD> try to prove that your square root function will always terminate SDD> (a step size from one that is guaranteed to settle might be a SDD> disaster at the new-improved value. SDD> So, that's why CS people like immutable primitive types. SDD> -- Scott David Daniels SDD> Scott.Daniels at Acm.Org SDD> _______________________________________________ SDD> Edu-sig mailing list SDD> Edu-sig at python.org SDD> http://mail.python.org/mailman/listinfo/edu-sig -- Best regards, Chuck From ajsiegel at optonline.net Sat Mar 18 22:53:59 2006 From: ajsiegel at optonline.net (Arthur) Date: Sat, 18 Mar 2006 16:53:59 -0500 Subject: [Edu-sig] Properties use case In-Reply-To: Message-ID: <000001c64ad6$76ba5ea0$1702a8c0@BasementDell> > >-----Original Message----- > >From: edu-sig-bounces at python.org > >[mailto:edu-sig-bounces at python.org] On Behalf Of Scott David Daniels > > > >Arthur wrote: > >> > >> ... > >> Isn't the creation of any class the creation of one's own > >type? Now > >> what am I missing now? > >Ahh, I thought we were talking about language primitives. I guess I have the advantage that this is abstract to everybody else, quite concrete to myself as the class we are talking about is created, in use, and doing its thing. And it is possible - just possible - that people who have never had use for this kind of class might not have ever created dynamic, graphical applications of just the PyGeo kind. Not surprising, because not many people have. Maybe for good enough reason- but that's a separate issue. What was "creepy" - *I thought* - was the concept of mutable complex number as a type, in the same sense that any class is a type. Because what else could we be talking about, since I am designing only an application, not a programming language. And if the consensus now needs to shift to one that I am amateurishly out-of-my-mind to think that this could quite reasonably be a serviceable class *for just the kind of application on which I happen to be working* - let-it-be-so. > >It is not, except for one thing: one often thinks of complex > >numbers as values, and when they are mutable, they are more > >objects than values. I am not designing a programming language, I am designing an application. And bingo - for that application I need them to be more objects than values. Art From mtobis at gmail.com Sat Mar 18 23:39:51 2006 From: mtobis at gmail.com (Michael Tobis) Date: Sat, 18 Mar 2006 16:39:51 -0600 Subject: [Edu-sig] Properties use case In-Reply-To: <000001c64ad6$76ba5ea0$1702a8c0@BasementDell> References: <000001c64ad6$76ba5ea0$1702a8c0@BasementDell> Message-ID: The following, modulo a pronoun shift were exactly the words I was sitting down to type. > I am not designing a programming language, I am designing an application. That is why, to me, the advice offerred to date seems quite far off the mark. > And bingo - for that application I need them to be more objects than values. So, is there a problem with wrapping them thus: ### class mcx(object): def __init__(self,val): self.val = complex(val) def __add__(self,other): """ and similarly for most other special methods """ return self.val.__add__(other) ### I think Arthur would duckishly call this a mutable complex type and others would more formally call it an object containing a reference to an immutable complex type and we could all live happily ever after. If I am right then the vast verbiage expended on this thread so far deflates into exactly nothing. If this is inadequate for anyone, what exactly is the problem? mt From ajsiegel at optonline.net Sat Mar 18 23:38:36 2006 From: ajsiegel at optonline.net (Arthur) Date: Sat, 18 Mar 2006 17:38:36 -0500 Subject: [Edu-sig] Properties use case In-Reply-To: <000001c64ad6$76ba5ea0$1702a8c0@BasementDell> Message-ID: <000001c64adc$b27991d0$1702a8c0@BasementDell> > >-----Original Message----- > >From: edu-sig-bounces at python.org > >[mailto:edu-sig-bounces at python.org] On Behalf Of Arthur > > > >What was "creepy" - *I thought* - was the concept of > >mutable complex number as a type, in the same sense that any > >class is a type. Just so that I am not accused of being disingenuous. That subject of primitive type was raised early in the discussion, but only intended in the context of the fact that Numeric arrays were prepared to except the immutable built-ins as complex numbers and unprepared to accept the custom class that was the same but mutable, as such. It presented a practical problem to me, and I was looking for practical solutions to it beyond the one had I been working with but found not fully satisfactory. But to repeat - The course of these discussions had some real practical value to me, having helped me come upon an idea for the implementation of the objects of the complex plane geometric objects that I think better reflects the ground of the mathematical ideas being explored, and with less of a performance trade-off. I could not want more, and I just hope I am not missing anything important by being excited about getting to the implementation. The small problem at the moment being the laptop on which I have my latest working version ain't taking well to getting powered up. ARGHHHH., Art From ajsiegel at optonline.net Sat Mar 18 23:48:11 2006 From: ajsiegel at optonline.net (Arthur) Date: Sat, 18 Mar 2006 17:48:11 -0500 Subject: [Edu-sig] Properties use case In-Reply-To: Message-ID: <000101c64ade$08a6ebb0$1702a8c0@BasementDell> > >-----Original Message----- > >From: edu-sig-bounces at python.org > >[mailto:edu-sig-bounces at python.org] On Behalf Of Michael Tobis > >objects than values. > > > >So, is there a problem with wrapping them thus: > > > >### > >class mcx(object): > > > > def __init__(self,val): > > self.val = complex(val) > > > > def __add__(self,other): > > """ and similarly for most other special methods """ > > return self.val.__add__(other) >### > > > >I think Arthur would duckishly call this a mutable complex > >type and others would more formally call it an object > >containing a reference to an immutable complex type and we > >could all live happily ever after. Not so easy, I'm afraid. If I am understanding correctly the implementation that you are suggesting is exactly the one I had one generation ago. Kind of the UserArray solution. No? And I can't easily explain why I felt the need to push it a step further - to in fact having a more truly full implementation of complex numerics contained *as* my object - not as an attribute of it. But there were reasons. Some more practical, more less. Art From mtobis at gmail.com Sun Mar 19 00:16:50 2006 From: mtobis at gmail.com (Michael Tobis) Date: Sat, 18 Mar 2006 17:16:50 -0600 Subject: [Edu-sig] Properties use case In-Reply-To: <000101c64ade$08a6ebb0$1702a8c0@BasementDell> References: <000101c64ade$08a6ebb0$1702a8c0@BasementDell> Message-ID: > And I can't easily explain why I felt the need to push it a step further - Do give it a try, please. > to in fact having a more truly full implementation of complex numerics > contained *as* my object - not as an attribute of it. But there were > reasons. Some more practical, more less. Well, if you do it right, the enclosing code would not be different from that of a "truly full" implementation. That's why we use objects in the first place! The rest of the code should need no information about how you implement your mutable complex type. So unless there's a performance issue I can't see what you lose by wrapping the complex number. mt From ajsiegel at optonline.net Sun Mar 19 00:29:05 2006 From: ajsiegel at optonline.net (Arthur) Date: Sat, 18 Mar 2006 18:29:05 -0500 Subject: [Edu-sig] Properties use case In-Reply-To: Message-ID: <000001c64ae3$c545dec0$1702a8c0@BasementDell> > >-----Original Message----- > >From: Michael Tobis [mailto:mtobis at gmail.com] > >So unless there's a performance issue I can't see what you > >lose by wrapping the complex number. My last friend ....oh well. Because it didn't *feel* yet that I couldn't come up with something better, that I was at the end of the road. No question, it was workable - and if I was being paid to do this work by the hour it would have been some form of sin to look further. But I'm not. ;) Art From ajsiegel at optonline.net Sun Mar 19 00:40:17 2006 From: ajsiegel at optonline.net (Arthur) Date: Sat, 18 Mar 2006 18:40:17 -0500 Subject: [Edu-sig] Properties use case In-Reply-To: <000001c64ae3$c545dec0$1702a8c0@BasementDell> Message-ID: <000001c64ae5$50202d10$1702a8c0@BasementDell> > >-----Original Message----- > >From: Arthur [mailto:ajsiegel at optonline.net] > > > >Because it didn't *feel* yet that I couldn't come up with > >something better, that I was at the end of the road. No > >question, it was workable - and if I was being paid to do > >this work by the hour it would have been some form of sin to > >look further. But I'm not. I bit more to the point, is I that I consider it an API issue, but an API issue specific to the intent of PyGeo - and that is to allow people to use and extend it as much as possible thinking as geometers and mathematicians and math students rather than as programmers. And there seemed to me something much more natural about saying- think of this *as* a complex number rather than think about wrapping something within a something else. These kinds of API issues, tied to the program's intent, are - IMO - necessary soft, and folks can disagree about what works. I decided this was serious enough not only to make the effort to implement, but to sacrifice performance on its behalf. Judgment call. Art From ajsiegel at optonline.net Sun Mar 19 00:49:31 2006 From: ajsiegel at optonline.net (Arthur) Date: Sat, 18 Mar 2006 18:49:31 -0500 Subject: [Edu-sig] Properties use case In-Reply-To: <000001c64ae5$50202d10$1702a8c0@BasementDell> Message-ID: <000001c64ae6$9ad45ce0$1702a8c0@BasementDell> > >-----Original Message----- > >From: Arthur [mailto:ajsiegel at optonline.net] > >These kinds of API issues, tied to the program's intent, are > >- IMO - necessary soft, and folks can disagree about what > >works. I decided this was serious enough not only to make > >the effort to implement, but to sacrifice performance on its behalf. And maybe even more to the point than that - since this is the way that *I* was thinking about these objects - I wanted my conception of the object and their implementation to be as closely and purely allied as possible. With the instinct that doing so would lead me to where I should be going next. Which I think it has. Not textbook, to be sure. Art From mtobis at gmail.com Sun Mar 19 01:10:10 2006 From: mtobis at gmail.com (Michael Tobis) Date: Sat, 18 Mar 2006 18:10:10 -0600 Subject: [Edu-sig] Properties use case In-Reply-To: <000001c64ae5$50202d10$1702a8c0@BasementDell> References: <000001c64ae3$c545dec0$1702a8c0@BasementDell> <000001c64ae5$50202d10$1702a8c0@BasementDell> Message-ID: Well, if you are sacrificing performance, what is wrong with wrapping the complex number in a pure python class with all the magic methods overridden? I share your objectives and agree that Python provides a platform for addressing them. See my article at http://geosci.uchicago.edu/~tobis/ciseps.pdf You do not explain why a properly duck-typed pure Python wrapper of a complex number fails to achieve those objectives in your case. Calling it an "API" issue appears to me to miss my point. You can present the identical API with a wrapper as with a native extension, and stay out of the mathematician's way altogether, no? If not, why not? Note that when you stray from pure python you shrink your user base and complicate your support issues substantially. I would be happy to discuss the topic, but this requires that I approach the design with due skepticism. If you don't care to explain your needs you can't expect many useful answers, though I think it's reasonable to expect fewer and shorter non-useful ones! Michael From ajsiegel at optonline.net Sun Mar 19 01:45:26 2006 From: ajsiegel at optonline.net (Arthur) Date: Sat, 18 Mar 2006 19:45:26 -0500 Subject: [Edu-sig] Properties use case In-Reply-To: Message-ID: <000001c64aee$6aad4510$1702a8c0@BasementDell> > >-----Original Message----- > >From: Michael Tobias [mailto:mtobis at gmail.com] > > > >I would be happy to discuss the topic, but this requires > >that I approach the design with due skepticism. If you don't > >care to explain your needs you can't expect many useful > >answers, though I think it's reasonable to expect fewer and > >shorter non-useful ones! I sincerely appreciate your offer, and there is good reason to believe that you have a good beat on my objectives. But as I say, these conversations have actually caused me to reconceptualize a bit. So that talking about my complex "object"'s issues in its specifics seems to address where I was at the beginning of the conversation rather than where I am at the moment. I will have a better idea as to where I am at the moment if the power supply to my laptop decides to begin talking to my laptop. That and a day or two to futz, and than I'd love to reconvene. Art From john.zelle at wartburg.edu Sun Mar 19 03:10:04 2006 From: john.zelle at wartburg.edu (John Zelle) Date: Sat, 18 Mar 2006 20:10:04 -0600 Subject: [Edu-sig] Properties use case In-Reply-To: References: <000001c64ad6$76ba5ea0$1702a8c0@BasementDell> Message-ID: <200603182010.04511.john.zelle@wartburg.edu> On Saturday 18 March 2006 16:39, Michael Tobis wrote: > > So, is there a problem with wrapping them thus: > > ### > class mcx(object): > > def __init__(self,val): > self.val = complex(val) > > def __add__(self,other): > """ and similarly for most other special methods """ > return self.val.__add__(other) > ### > This reminds me of a question I have with new-style classes. With classic Python classes, we can do something like this even more simply with getattr magic: class Mutable: def __init__(self, value): self.value = value def __getattr__(self,name): return getattr(self.value, name) This saves me the trouble of having to specifically reimplement all of the methods just so that I can trivially pass the work off to self.value. Everything works just fine: >>> from mutable import Mutable >>> x = Mutable(3+5j) >>> x (3+5j) >>> x + (4+7j) (7+12j) >>> print x (3+5j) >>> x.value = 3 >>> x + 4 7 I've used this technique to good advantage when mixing objects from different toolkits. My question is, is there an easy way to do this with new-style classes? While I'm on the thread, let me just add my 2 cents on Arthur's "creepy" mutable complex type. I understand all of the arguments about the potential pitfalls of mutable types (I'm one of those "CS types," don't you know :-). But OOP is all about mutable objects. As a _design_ decision, if a mutable complex will streamline my system, or make it more intuitive, then I wouldn't hesitate to do it. I think the "creepiness" here is just in the name. We don't expect complex numbers to be mutable. Let's call the new type a complex container with auto-unboxing. Does anyone object to a mutable container? I hope not, we used to just call them variables. Since the contents are isomorphic to complex, it could be handy to have the container object also duck-type to a complex (or whatever else it contained). I don't see any creepiness in that. Of course, this kind of thinking could get out of hand. The next thing you know people might use these to simulate wacko things like reference parameters (oh, the horror! :-) Just my 2 cents. --John -- John M. Zelle, Ph.D. Wartburg College Professor of Computer Science Waverly, IA john.zelle at wartburg.edu (319) 352-8360 From mtobis at gmail.com Sun Mar 19 03:19:14 2006 From: mtobis at gmail.com (Michael Tobis) Date: Sat, 18 Mar 2006 20:19:14 -0600 Subject: [Edu-sig] Properties use case In-Reply-To: <200603182010.04511.john.zelle@wartburg.edu> References: <000001c64ad6$76ba5ea0$1702a8c0@BasementDell> <200603182010.04511.john.zelle@wartburg.edu> Message-ID: > This reminds me of a question I have with new-style classes. I just asked basically this question on c.l.p, and Alex Martelli has answered, quite helpfully. See topic "can't rebind magic methods' Michael Tobis From ajsiegel at optonline.net Sun Mar 19 14:04:02 2006 From: ajsiegel at optonline.net (Arthur) Date: Sun, 19 Mar 2006 08:04:02 -0500 Subject: [Edu-sig] Properties use case In-Reply-To: Message-ID: <000301c64b55$98773390$1702a8c0@BasementDell> > >-----Original Message----- > >From: Michael Tobis [mailto:mtobis at gmail.com] > > > >You can present the identical API with a wrapper as with a > >native extension, and stay out of the mathematician's way > >altogether, no? If not, why not? Well, instead of arguing what is not optimum about the solution that I *think* you are suggesting I will argue what is - only because I think it brings me around in full circle - I *think* - to where I started. The wrapper allows me to maintain object identity when working within complex typed Numeric arrays, since it is an object attribute been sent and received from the arrays, not the object itself. The solution that I have been exploring is more fragile in this respect. Since Numeric will not accept my complex object as such, and I need to cast it to a complex built-in on the way into the array and back to a complex custom type on the way. My object identity is lost. This is not a killer under my present structure, but is certainly has a more fragile feel that I would like. But in my mind it is only because in moving into Numeric land I am moving out of a land of duck typing and into a land of strict typing. Its Numeric's fault, not mine ;). I was hoping for some elegant solution to this particular issue that is not obvious to me. The other answer is that I should not attempt to fight Mother Nature in this regard. Art From kirby.urner at gmail.com Sun Mar 19 16:58:04 2006 From: kirby.urner at gmail.com (kirby urner) Date: Sun, 19 Mar 2006 07:58:04 -0800 Subject: [Edu-sig] Properties use case In-Reply-To: References: <000001c64a59$e6691930$1702a8c0@BasementDell> Message-ID: > Some of the questions feel a lot like, "why so many planar surfaces in > architecture;" to answer them requires work, not simply in the saying, > but in looking back for the whys. Often the first answer "it makes my > skin crawl" is the real answer; some rule has become so internalized > you don't know why you feel it. It doesn't necessarily mean Kirby was > saying you had done an incredibly stupid thing; it might simply mean > that something about that as design felt dangerous to him in some way. > > --Scott David Daniels > Scott.Daniels at Acm.Org Yeah, good, thanks Scott. Arthur is a really smart guy -- knows enough to get himself in real trouble. My high school year book quote: "If a little knowledge is a dangerous thing, show the me man who knows so much as to be out of danger." I forget who said that. The point being (of course) that's we may never know enough. Kirby From Scott.Daniels at Acm.Org Sun Mar 19 17:22:44 2006 From: Scott.Daniels at Acm.Org (Scott David Daniels) Date: Sun, 19 Mar 2006 08:22:44 -0800 Subject: [Edu-sig] Properties use case In-Reply-To: <000001c64adc$b27991d0$1702a8c0@BasementDell> References: <000001c64ad6$76ba5ea0$1702a8c0@BasementDell> <000001c64adc$b27991d0$1702a8c0@BasementDell> Message-ID: Arthur wrote: > .... > The small problem at the moment being the laptop on which I have my latest > working version ain't taking well to getting powered up. > > ARGHHHH., Laptops are, in my experience fragile little beasties. So, this discussion has led me to think about a structure like: import numarray class PointHolder(object): def __init__(self): self.points = numarray.array((0., 0., 0.)) self.nextalloc = 0 def new(self, point): if self.nextalloc <= self.points[0]: self.points.resize(((self.points.shape[0] * 2,) + self.points.shape[1:])) result = self.nextalloc self.points[result] = point self.nextalloc += 1 return result def positions(self, index): return self.points[index] class Vertex(object): positions = PointHolder() def __init__(self, point): self.location = self.positions.new(point) def position(self): seturn self.positions.position(self.location) A Vertex is a point on a polyhedron and it is shared by all of the faces that contain it. The 3-space position of the point is kept remotely in a numarray (or Numeric if you prefer) array named Vertex.positions.points; the position of a particular Vertex is available as a method. The value of such a system is that you can apply a transformation (scale, shift, rotate, ...) to all points in a single matrix operation. The work to do such transformations would be proportional to the number of distinct vertices, rather than to the number of mentions in such structures as faces making up a polygon. What got me thinking about this was "why would you want to share mutable state on complexes (and then on points)" -- the answer is when you are applying a uniform transformation to a bunch of points. --Scott David Daniels Scott.Daniels at Acm.Org From ajsiegel at optonline.net Sun Mar 19 17:54:33 2006 From: ajsiegel at optonline.net (Arthur) Date: Sun, 19 Mar 2006 11:54:33 -0500 Subject: [Edu-sig] Properties use case In-Reply-To: Message-ID: <000001c64b75$cc304490$1702a8c0@BasementDell> > >-----Original Message----- > >From: edu-sig-bounces at python.org > >[mailto:edu-sig-bounces at python.org] On Behalf Of kirby urner > >Sent: Sunday, March 19, 2006 10:58 AM > > Arthur is a really smart guy -- > >knows enough to get himself in real trouble. And generally have. Just a little more cautious, with age, about the kind of trouble ;) Art From ajsiegel at optonline.net Sun Mar 19 18:34:20 2006 From: ajsiegel at optonline.net (Arthur) Date: Sun, 19 Mar 2006 12:34:20 -0500 Subject: [Edu-sig] Properties use case In-Reply-To: Message-ID: <000501c64b7b$5b6d2ce0$1702a8c0@BasementDell> > >-----Original Message----- > >From: edu-sig-bounces+ajsiegel=optonline.net at python.org > >[mailto:edu-sig-bounces+ajsiegel=optonline.net at python.org] > >On Behalf Of Scott David Daniels > >What got me thinking about this was "why would you want to > >share mutable state on complexes (and then on points)" -- > >the answer is when you are applying a uniform transformation > >to a bunch of points. A lot of what I am doing is about uniform transformations on bunches of points - so I will be looking carefully at the idea you are presenting. To some extent it has been almost scary how straight forward what I am trying to do can be expressed/implemented in Python. Understanding what __iter__, combined with duck typing, can get me in terms of what I am trying to express was the most recent major revelation. Art From ajsiegel at optonline.net Tue Mar 21 17:57:16 2006 From: ajsiegel at optonline.net (Arthur) Date: Tue, 21 Mar 2006 11:57:16 -0500 Subject: [Edu-sig] Properties use case In-Reply-To: Message-ID: <000001c64d08$8288ac30$1702a8c0@BasementDell> > >From: Michael Tobis [mailto:mtobis at gmail.com] > > > >Note that when you stray from pure python you shrink your > >user base and complicate your support issues substantially. > > Haven't had the opportunity to code much anew, but am still replaying to myself where I am with these issues, and in the context of the discussion. When Kirby mentioned that he was not using Numeric for the purposes of his pedagogical approach to programming and numerics, I said - right on, why would you unless it was necessary. More transparency. And so realizing that a) my objectives are most fundamentally pedagogical b) Numeric is not playing nice with me at the moment c) I am only using 1% of the capacity of Numeric to do heavyweight array processing d) When I look into the code that Numeric needs to use to talk to - say - laplack, we begin to approach *my* definition of creepy. e) """Note that when you stray from pure python you shrink your user base and complicate your support issues substantially.""" For example, numpy's documentation is not free, at the moment. I am of course thinking whether I have been knee-jerk in bringing Numeric into play as a fundamental tool for my application. Which I why I then move on to trying to get serious about gaining some profiling skills. Gain some intelligence about the trade-offs of doing the kind of simple linear algebra my application requires in pure Python, versus what I may gaining by the creepy calls to laplack. Judgment calls need to be made in the end, but I take them seriously enough to want them to be informed judgment calls. No conclusions as yet. Art From mtobis at gmail.com Tue Mar 21 18:17:42 2006 From: mtobis at gmail.com (Michael Tobis) Date: Tue, 21 Mar 2006 11:17:42 -0600 Subject: [Edu-sig] Properties use case In-Reply-To: <000001c64d08$8288ac30$1702a8c0@BasementDell> References: <000001c64d08$8288ac30$1702a8c0@BasementDell> Message-ID: I use numeric a lot, and I understand what you mean. Perhaps there is some Python-like scientific language yet to be invented, but on the other hand, perhaps the interface between convenient latent typing and efficient strong typing may be fated to always be a bit uncomfortable. Meanwhile I have been (rather irresponsibly) obsessed with the idea of a mutable complex. It turned out to be harder than I expected but I learned a lot in the process. Even though I'm still not sure it's a useful idea, I am ready to do it in a rather pretty way, but it will take a couple of hours I'm not sure I have. If you want to beat me to the punch read this thread (if you dare): http://mail.python.org/pipermail/python-list/2006-March/331842.html mt From lac at strakt.com Tue Mar 21 19:48:34 2006 From: lac at strakt.com (Laura Creighton) Date: Tue, 21 Mar 2006 19:48:34 +0100 Subject: [Edu-sig] Properties use case In-Reply-To: Message from Arthur of "Tue, 21 Mar 2006 11:57:16 EST." <000001c64d08$8288ac30$1702a8c0@BasementDell> References: <000001c64d08$8288ac30$1702a8c0@BasementDell> Message-ID: <200603211848.k2LImY6F019983@theraft.strakt.com> Arthur, have you tried using Psyco? Then you get to write your code in a naive, straightforward fashion, and then you get something that runs nearly as fast. Plus no headaches from having to write your code inside out, like numeric makes you do, all too often. Laura, sold on it, In a message of Tue, 21 Mar 2006 11:57:16 EST, Arthur writes: > > >> >From: Michael Tobis [mailto:mtobis at gmail.com] >> > >> >Note that when you stray from pure python you shrink your >> >user base and complicate your support issues substantially. >> > > >Haven't had the opportunity to code much anew, but am still replaying to >myself where I am with these issues, and in the context of the discussion >. > >When Kirby mentioned that he was not using Numeric for the purposes of hi >s >pedagogical approach to programming and numerics, I said - right on, why >would you unless it was necessary. More transparency. > >And so realizing that >a) my objectives are most fundamentally pedagogical >b) Numeric is not playing nice with me at the moment >c) I am only using 1% of the capacity of Numeric to do heavyweight array >processing >d) When I look into the code that Numeric needs to use to talk to - say >- >laplack, we begin to approach *my* definition of creepy. >e) """Note that when you stray from pure python you shrink your > user base and complicate your support issues substantially.""" > >For example, numpy's documentation is not free, at the moment. > >I am of course thinking whether I have been knee-jerk in bringing Numeric >into play as a fundamental tool for my application. > >Which I why I then move on to trying to get serious about gaining some >profiling skills. Gain some intelligence about the trade-offs of doing t >he >kind of simple linear algebra my application requires in pure Python, ver >sus >what I may gaining by the creepy calls to laplack. > >Judgment calls need to be made in the end, but I take them seriously enou >gh >to want them to be informed judgment calls. > >No conclusions as yet. > >Art > > > >_______________________________________________ >Edu-sig mailing list >Edu-sig at python.org >http://mail.python.org/mailman/listinfo/edu-sig From lac at strakt.com Tue Mar 21 19:51:05 2006 From: lac at strakt.com (Laura Creighton) Date: Tue, 21 Mar 2006 19:51:05 +0100 Subject: [Edu-sig] Properties use case In-Reply-To: Message from "Michael Tobis" of "Tue, 21 Mar 2006 11:17:42 CST." References: <000001c64d08$8288ac30$1702a8c0@BasementDell> Message-ID: <200603211851.k2LIp5qq020079@theraft.strakt.com> In a message of Tue, 21 Mar 2006 11:17:42 CST, "Michael Tobis" writes: >I use numeric a lot, and I understand what you mean. > >Perhaps there is some Python-like scientific language yet to be >invented, but on the other hand, perhaps the interface between >convenient latent typing and efficient strong typing may be fated to >always be a bit uncomfortable. PyPy. we are working on it. Type inference engine works now, JIT about to happen .... Dynamic Languages Need Not Be Slow!! (Psyco and now PyPy Slogan) Laura From dblank at brynmawr.edu Tue Mar 21 18:58:55 2006 From: dblank at brynmawr.edu (Douglas S. Blank) Date: Tue, 21 Mar 2006 12:58:55 -0500 Subject: [Edu-sig] Properties use case In-Reply-To: <000001c64d08$8288ac30$1702a8c0@BasementDell> References: <000001c64d08$8288ac30$1702a8c0@BasementDell> Message-ID: <1142963935.22134.34.camel@mightymouse.brynmawr.edu> On Tue, 2006-03-21 at 11:57 -0500, Arthur wrote: [snip] > I am of course thinking whether I have been knee-jerk in bringing Numeric > into play as a fundamental tool for my application. > > Which I why I then move on to trying to get serious about gaining some > profiling skills. Gain some intelligence about the trade-offs of doing the > kind of simple linear algebra my application requires in pure Python, versus > what I may gaining by the creepy calls to laplack. > > Judgment calls need to be made in the end, but I take them seriously enough > to want them to be informed judgment calls. I've been wrestling with these issues. I've built a Python robotics 2D simulator in 99% Python, 1% Numeric. It works amazingly well: fast enough and realistic enough to do the job. The robot can have sonar, IR, and bumpers; lights, and light bulbs; a 2D camera with pan-zoom, and a gripper to pick up things. The world has some simple physics (bump a puck head-on and it will slide, with some friction). Then I extended it to be a 3D simulator. Still, amazingly, fast enough and realistic enough to do the job. On the one hand, I like all of the source code to be accessible to the student. We say that it is "Pythons all the way down". And that also makes it portable. But on the other hand, it has to run fast enough. We are able to do it all in Python, expect for the nitty gritty vision and image processing code, which we use SWIG and C++. I did some profiling, and was surprised at where some of the time was spent. (This simulator is also controlled over sockets, so I had some additional items to speed up). But, was able to refactor some, and get some very substantial speedup, just in the Python portion. castRay() is still the most expensive bit in Python. I am also looking at IronPython for .NET and Mono, and am wondering how much I can get in one layer (without going to C/C++) and how fast it will be... Here are some pictures: http://pyrorobotics.org/?page=The_20Pyrobot_20Simulator -Doug > No conclusions as yet. > > Art > > > > _______________________________________________ > Edu-sig mailing list > Edu-sig at python.org > http://mail.python.org/mailman/listinfo/edu-sig > -- Douglas S. Blank Computer Science Assistant Professor Bryn Mawr College (610)526-6501 http://cs.brynmawr.edu/~dblank From ajsiegel at optonline.net Tue Mar 21 20:32:27 2006 From: ajsiegel at optonline.net (ajsiegel at optonline.net) Date: Tue, 21 Mar 2006 14:32:27 -0500 Subject: [Edu-sig] Properties use case In-Reply-To: <200603211851.k2LIp5qq020079@theraft.strakt.com> References: <000001c64d08$8288ac30$1702a8c0@BasementDell> <200603211851.k2LIp5qq020079@theraft.strakt.com> Message-ID: ----- Original Message ----- From: Laura Creighton > PyPy. we are working on it. I'm quite conscious of that. More and more my design decisions are in anticipation of it. Not to add to the pressure ;) Art From mtobis at gmail.com Tue Mar 21 20:58:52 2006 From: mtobis at gmail.com (Michael Tobis) Date: Tue, 21 Mar 2006 13:58:52 -0600 Subject: [Edu-sig] Properties use case In-Reply-To: <200603211851.k2LIp5qq020079@theraft.strakt.com> References: <000001c64d08$8288ac30$1702a8c0@BasementDell> <200603211851.k2LIp5qq020079@theraft.strakt.com> Message-ID: While PyPy is a most admirable endeavor, I can't imagine that it can resolve this problem. I'll be most pleased to discover that I am wrong, so please correct me. Is scientific programming a target usage of PyPy? In particular, how could large arrays of numbers of homogeneous type be handled outside the Numeric-type libraries in such a way that efficient computation is possible and also provide a guarantee the memory mapping of the data to allow interoperation with compiled languages? Surely a reimplementation of BLAS, Atlas, Lapack, etc is not part of PyPy's mission. So how is the success of PyPy going to have great relevance to Numeric/numarray/numpy users? mt From kirby.urner at gmail.com Wed Mar 22 02:10:19 2006 From: kirby.urner at gmail.com (kirby urner) Date: Tue, 21 Mar 2006 17:10:19 -0800 Subject: [Edu-sig] Brainstorming about GNU Math Message-ID: Of course "gnu math" is a pun on "new math", more formally known as SMSG, and designed to ride a tsunami of cold war paranoia, when the USA first started "falling behind" in science and technology, as evidenced by Sputnik. "New math" was supposed to turn out a new crop of eggheads, prepared to keep the USA in the game, and you can't say the effort failed entirely. We got NASA and Apollo, and later The Mouse in Orlando, all products of these post WWII curriculum reforms. However, there was never a huge buy-in among rank and file teachers, who felt left out of the loop. Plus SMSG had its own problems... Rolling the scenario forward several decades, we've had the GNU/Linux revolution and the advent of more generous licensing agreements, complete with a new business ethic that deals kids in at the outset, as wannabee space cadets, as junior engineers. They quickly start learning, and in a few short years are out of the gate as players, spinning their own networks and lighting up the boards with new high scores, news of old records broken and so forth. The next generation starts ahead of the previous one, if all goes according to plan. That's called a learning curve. That's called future shock (especially if folks can't handle it, and go flying into buildings or whatever terrifying thing -- The Power of Nightmares is worth seeing on this ( http://www.imdb.com/title/tt0430484/ )). With GNU/Linux and falling hardware prices comes greater access to sophisticated computing environments, such as only a cast of high priests had known before. The age of Turing Machines for Everyone had arrived. We'd be needing programs like CP4E to spread the love. Guido came up with a great language. The die was cast. Rolling forward some more, we have a big literature on file, but it's not that well organized. Hypertext glues it together, more than book covers, although the shelf space devoted to Python and related topics is respectable. In the meantime, OO has become well-established, so even if Python isn't your final destination, it's within the right track system. Switching to Java or C# is pretty easy, especially given Jython and IronPython use these for guts. As a Silicon Forest exec, my question is why non-OO problem solving, as taught on the math track, has all this political clout, whereas would be computer geeks have to drop out of school or sneak knowledge when not in class. Sure, there's some leakage, some osmosis, but for the most part it seems there's a dike, a barrier, designed to keep computer programming from "polluting" some purist tradition. And it's not just programming that's kept at bay, but computer graphics and animation. The pre-college mainstream remains strangely bereft of serious-minded spatial geometry, even in districts that could afford the low-cost diskless workstations or hand-me-down Pentiums. No A & B modules. No hexapents. What's the story here? Well, I don't think here is the right place to recap my analysis, but in gist: overspecialization has bitten us in the rear. This isn't a new conclusion. Bucky Fuller came to the same result. Lack of cross-disciplinary communication has hampered our ability to evolve the curriculum at a sufficient rate. We've fallen way behind. Again. But this time, there's no "new math" to the rescue. There's "gnu math" instead. Kirby From ajsiegel at optonline.net Wed Mar 22 02:54:06 2006 From: ajsiegel at optonline.net (Arthur) Date: Tue, 21 Mar 2006 20:54:06 -0500 Subject: [Edu-sig] Properties use case In-Reply-To: Message-ID: <000001c64d53$82264bd0$1702a8c0@BasementDell> > >-----Original Message----- > >From: Michael Tobis [mailto:mtobis at gmail.com] > >Sent: Tuesday, March 21, 2006 12:18 PM > >To: Arthur; edu-sig at python.org > >Subject: Re: [Edu-sig] Properties use case >> If you want to beat me to the > >punch read this thread (if you dare): > > > >http://mail.python.org/pipermail/python-list/2006-March/331842.html I dared. And it is amazing to me how quickly my eyes glaze over - how unintelligent I am about certain coding issues/styles. I'd would just as soon spell out the magic, method by method - if that is all we are trying to avoid. More typing, maybe a little more time - but once it's there it's there, like forever. 3 hours/float(forever) = 0, approximately. Unless I am misinterpreting what we are trying to do with the nested defs and whatever the hell else is going on in there. The PyPy complex number implementation was the basis for what I ended up with. http://codespeak.net/svn/pypy/dist/pypy/module/__builtin__/app_complex.py As it happens I need a good deal more in terms of methods for my Complex than the "conjugate" that is essentially it for the Python built-in. What other methods, which need to be inplace transformations, and which need to return new Complex objects, or even scalar values - the answers were all pretty specific to my app, not choices I could (or need to I don't think) justify on the basis of any general principles I can identify. Art From ajsiegel at optonline.net Wed Mar 22 03:00:19 2006 From: ajsiegel at optonline.net (Arthur) Date: Tue, 21 Mar 2006 21:00:19 -0500 Subject: [Edu-sig] Brainstorming about GNU Math In-Reply-To: Message-ID: <000101c64d54$5f544e30$1702a8c0@BasementDell> > >-----Original Message----- > >From: edu-sig-bounces+ajsiegel=optonline.net at python.org > >[mailto:edu-sig-bounces+ajsiegel=optonline.net at python.org] > >On Behalf Of kirby urner > >Rolling the scenario forward several decades, we've had the > >GNU/Linux revolution and the advent of more generous > >licensing agreements, complete with a new business ethic > >that deals kids in at the outset, as wannabee space cadets, > >as junior engineers. This is where I begin to lose you. Tell me more, if you could, about this new business ethic, as it relates to kids. Another memo I don't think got distributed on this Coast as of yet, perhaps. To put it in a more mundane manner - I don't have a clue what you are talking about. Art From kirby.urner at gmail.com Wed Mar 22 03:27:27 2006 From: kirby.urner at gmail.com (kirby urner) Date: Tue, 21 Mar 2006 18:27:27 -0800 Subject: [Edu-sig] Pickling Polyhedra Message-ID: OK, so this title is somewhat misleading, because pickling and shelving is one of the things I've not yet gotten around to, vis-a-vis Polyhedra. But let me tell you about some of the other things I've done (classic bait and switch, I realize). First, what data structures to use? Well, no need to reinvent the wheel here. Geometers discovered long ago that labeled vertices made a lot of sense, which suggests a dictionary. But we're not done. What vertices connect to what? Just edges (pairs of connected vertices) might seem like the answer but then figuring out the faces turns out to be hard, relative to how easy it'd be if the faces were simply a part of the data. And that suggests a list of tuples perhaps, the list being Faces and each tuple being a face. Within the tuple, labels, keys in a dictionary of saved Vertices. And what about edges? They derive from Faces, by means of a simple algorithm (weeding out duplicates is part of it -- the native Set type may prove useful). So what about the *values* of our Vertexes dictionary? [Vertexes: an intentional respelling, per Synergetics -- I like the 'x-marks-a-rail-crossing' aesthetic]. I vote for vectors (lovely alliteration). Of course the Clifford Algebra people may have other ideas, and I can't say I'd be against them. But for now, simple XYZ coordination is sufficient, or try our newfangled Quadrays, with only-positive four-tuples (a member of the "simplicial coordinate system" family -- "simplicial" from "simplex," our tetrahedron or "minimum system" in synergetic geometry). So that's the data structure: a dictionary of vertex vectors, gathered into face-tuples in a list. There's good practice with all three main collection types here, plus strings, if you use those to label your vertices (you could also just use plain integers, a popular choice among computational geometers). So one design pattern would be this: define your Polyhedron class to "eat" your data structures. Build in rotation, translation and scaling. Have the results of these operations be new polyhedra, i.e. these are not "changes in place" even if the rotations are minor. Every change begets a new self. Very Buddhist, very "be here now". Then, make a Writer superclass as a paradigm consumer of these Polyhedron objects (an icosahedron say, or rhombic triacontahedron of 120 T modules). The polyhedra themselves are fairly innocent of i/o. At this superclass level, maybe there's a default data dump, a YAML or XML generator. But anything more elaborate and application specific, such as a VRML, VPython, POV-Ray, EIG or LiveGraphics3D writer (and I've written all of these in my day), should simply eat a Polyhedron and scribble the file. The Polyhedron class itself remains blissfully ignorant of all these nitty gritty requirements. >From a students point of view, how might all this work? XML and file i/o is probably going to come through other topical segments. I'm a big fan of using kml files ("camel files") out of Google Earth. The syntax of class construction will likewise already be familiar, as will these basic Python data structures (dictionary, tuple and list). The Vector concept might be new though. We could start with that. Vector algebra is very graphical, plays well with geometry. A computer graphics savvy curriculum is going to need vectors. Implement these natively in pure Python. Then get into the rotation algorithms. 3x3 matrices should be sufficient (our newfangled Quadrays come with 4x4s, thanks to Tom Ace) -- no need for homogenous coordinates at this level. To rotate is to hit every unique vector in the Vertexes dictionary, and to spit back a new poly (now rotated). My inclination is to focus on POV-Ray early, as this full featured ray tracer offers hours of fun to those who would get lost in it. A Python polyhedron writer only takes advantage of a small subset of POV-Ray's capabilities, but there's much more to explore "off camera". A goal is to unleash the artist in each student, to give them high powered creativity tools. Yes, mastery of mathematics is important, but not at the expense of a well-developed sense of aesthetics. "Ethics = aesthetics" wrote Ludwig Wittgenstein, in his Tractatus Logico-Philosophicus. Our Python-based mathematics aims for some Athenian style panache, not just for Spartan style bare bones efficiency. Where to go after POV-Ray I'm not so sure. I'm not sure it matters. Depends on the curriculum, the teacher, the student. Plus I'm expecting the IronPython branch to open new territory, hitherto unexplored. VPython is certainly fun, per Arthur's PyGeo, my Hypertoons, and any number of art-science projects that others may brainstorm. I'm looking forward to witnessing a lot of creativity in these areas, having helped craft a launching pad or starting gate, with plenty of help from others (Pythonistas, Pyconistos -- some in full Monty). Anyway, now that we've got Python and Polyhedra in the picture, I'm thinking mathematics learning will be a lot more rewarding and fun. Let the good times roll. Exercise: Relate the above design pattern proposal to the model-view-controller architecture. Explain how the above might be consistent and/or inconsistent with MVC concepts. ==== K. Urner 4D Studios PDX USA 2006.3.21 From kirby.urner at gmail.com Wed Mar 22 03:28:38 2006 From: kirby.urner at gmail.com (kirby urner) Date: Tue, 21 Mar 2006 18:28:38 -0800 Subject: [Edu-sig] Brainstorming about GNU Math In-Reply-To: <000101c64d54$5f544e30$1702a8c0@BasementDell> References: <000101c64d54$5f544e30$1702a8c0@BasementDell> Message-ID: > Another memo I don't think got distributed on this Coast as of yet, perhaps. > Math Forum. Drexel closer to your coast I think. Kirby From ajsiegel at optonline.net Wed Mar 22 03:40:13 2006 From: ajsiegel at optonline.net (Arthur) Date: Tue, 21 Mar 2006 21:40:13 -0500 Subject: [Edu-sig] Pickling Polyhedra In-Reply-To: Message-ID: <000301c64d59$f2866580$1702a8c0@BasementDell> Kirby - You might want to check out Yafray http://www.yafray.org/ It's a powerful raytracers, with ties to Blender (with ties to Python), and a pure XML based SDL. If my free minute, or next lifetime, I am hoping to do a PyGeo to Yafray export in addition to PyGeo to Povray as there is now. Among my motives is simply to get more hands on with XML processing concepts - which is something I need to do more for business reasons than anything else. These kinds of synergies between what I do because I like to do it and what I do because I can get paid to do it is how PyGeo gets financed - in a manner of speaking. Or that's at least the story to my wife ;) Art > >-----Original Message----- > >From: edu-sig-bounces at python.org > >[mailto:edu-sig-bounces at python.org] On Behalf Of kirby urner > >Sent: Tuesday, March 21, 2006 9:27 PM > >To: edu-sig at python.org > >Subject: [Edu-sig] Pickling Polyhedra > > > >OK, so this title is somewhat misleading, because pickling > >and shelving is one of the things I've not yet gotten around > >to, vis-a-vis Polyhedra. But let me tell you about some of > >the other things I've done (classic bait and switch, I realize). > > > >First, what data structures to use? Well, no need to > >reinvent the wheel here. Geometers discovered long ago that > >labeled vertices made a lot of sense, which suggests a > >dictionary. But we're not done. > >What vertices connect to what? Just edges (pairs of connected > >vertices) might seem like the answer but then figuring out > >the faces turns out to be hard, relative to how easy it'd be > >if the faces were simply a part of the data. > > > >And that suggests a list of tuples perhaps, the list being > >Faces and each tuple being a face. Within the tuple, > >labels, keys in a dictionary of saved Vertices. And what > >about edges? They derive from Faces, by means of a simple > >algorithm (weeding out duplicates is part of it -- the > >native Set type may prove useful). > > > >So what about the *values* of our Vertexes dictionary? > >[Vertexes: an intentional respelling, per Synergetics -- I > >like the 'x-marks-a-rail-crossing' aesthetic]. I vote for > >vectors (lovely alliteration). Of course the Clifford > >Algebra people may have other ideas, and I can't say I'd be > >against them. But for now, simple XYZ coordination is > >sufficient, or try our newfangled Quadrays, with > >only-positive four-tuples (a member of the "simplicial > >coordinate system" family -- "simplicial" from "simplex," > >our tetrahedron or "minimum system" in synergetic geometry). > > > >So that's the data structure: a dictionary of vertex > >vectors, gathered into face-tuples in a list. There's good > >practice with all three main collection types here, plus > >strings, if you use those to label your vertices (you could > >also just use plain integers, a popular choice among > >computational geometers). > > > >So one design pattern would be this: define your Polyhedron > >class to "eat" your data structures. Build in rotation, > >translation and scaling. Have the results of these > >operations be new polyhedra, i.e. > >these are not "changes in place" even if the rotations are minor. > >Every change begets a new self. Very Buddhist, very "be here now". > > > >Then, make a Writer superclass as a paradigm consumer of > >these Polyhedron objects (an icosahedron say, or rhombic > >triacontahedron of 120 T modules). The polyhedra themselves > >are fairly innocent of i/o. > >At this superclass level, maybe there's a default data dump, > >a YAML or XML generator. But anything more elaborate and > >application specific, such as a VRML, VPython, POV-Ray, EIG > >or LiveGraphics3D writer (and I've written all of these in > >my day), should simply eat a Polyhedron and scribble the > >file. The Polyhedron class itself remains blissfully > >ignorant of all these nitty gritty requirements. > > > >>From a students point of view, how might all this work? > >XML and file > >i/o is probably going to come through other topical > >segments. I'm a big fan of using kml files ("camel files") > >out of Google Earth. The syntax of class construction will > >likewise already be familiar, as will these basic Python > >data structures (dictionary, tuple and list). > > > >The Vector concept might be new though. We could start with that. > >Vector algebra is very graphical, plays well with geometry. > >A computer graphics savvy curriculum is going to need vectors. > >Implement these natively in pure Python. Then get into the > >rotation algorithms. 3x3 matrices should be sufficient (our > >newfangled Quadrays come with 4x4s, thanks to Tom Ace) -- no > >need for homogenous coordinates at this level. > > > >To rotate is to hit every unique vector in the Vertexes > >dictionary, and to spit back a new poly (now rotated). > > > >My inclination is to focus on POV-Ray early, as this full > >featured ray tracer offers hours of fun to those who would > >get lost in it. A Python polyhedron writer only takes > >advantage of a small subset of POV-Ray's capabilities, but > >there's much more to explore "off camera". > > A goal is to unleash the artist in each student, to give > >them high powered creativity tools. Yes, mastery of > >mathematics is important, but not at the expense of a > >well-developed sense of aesthetics. > >"Ethics = aesthetics" wrote Ludwig Wittgenstein, in his > >Tractatus Logico-Philosophicus. Our Python-based > >mathematics aims for some Athenian style panache, not just > >for Spartan style bare bones efficiency. > > > >Where to go after POV-Ray I'm not so sure. I'm not sure it matters. > >Depends on the curriculum, the teacher, the student. Plus > >I'm expecting the IronPython branch to open new territory, > >hitherto unexplored. VPython is certainly fun, per Arthur's > >PyGeo, my Hypertoons, and any number of art-science projects > >that others may brainstorm. I'm looking forward to > >witnessing a lot of creativity in these areas, having helped > >craft a launching pad or starting gate, with plenty of help > >from others (Pythonistas, Pyconistos -- some in full Monty). > > > >Anyway, now that we've got Python and Polyhedra in the > >picture, I'm thinking mathematics learning will be a lot > >more rewarding and fun. > >Let the good times roll. > > > >Exercise: > > > >Relate the above design pattern proposal to the > >model-view-controller architecture. Explain how the above > >might be consistent and/or inconsistent with MVC concepts. > > > >==== > > > >K. Urner > >4D Studios > >PDX USA > >2006.3.21 > >_______________________________________________ > >Edu-sig mailing list > >Edu-sig at python.org > >http://mail.python.org/mailman/listinfo/edu-sig > > From ajsiegel at optonline.net Wed Mar 22 03:48:12 2006 From: ajsiegel at optonline.net (Arthur) Date: Tue, 21 Mar 2006 21:48:12 -0500 Subject: [Edu-sig] Brainstorming about GNU Math In-Reply-To: Message-ID: <000401c64d5b$0fb23de0$1702a8c0@BasementDell> > >-----Original Message----- > >From: kirby urner [mailto:kirby.urner at gmail.com] > >Sent: Tuesday, March 21, 2006 9:29 PM > >To: Arthur; edu-sig at python.org > >Subject: Re: [Edu-sig] Brainstorming about GNU Math > > > >> Another memo I don't think got distributed on this Coast > >as of yet, perhaps. > >> > > > >Math Forum. Drexel closer to your coast I think. Not sure how that helps. Let's just say that any part of your curriculum ideas that rely on the reality of new business ethic, for kids or anyone else, I am against - as being based on an illusion. A not undangerous one, at that. Art From kirby.urner at gmail.com Wed Mar 22 07:23:54 2006 From: kirby.urner at gmail.com (kirby urner) Date: Tue, 21 Mar 2006 22:23:54 -0800 Subject: [Edu-sig] Brainstorming about GNU Math In-Reply-To: <000401c64d5b$0fb23de0$1702a8c0@BasementDell> References: <000401c64d5b$0fb23de0$1702a8c0@BasementDell> Message-ID: That's an OK battle, as I think anything based in some "business ethic" is indeed a failure-prone model, and suspicious, vigilant opposition should be encouraged. We call that "a discerning customer". On the other hand, I think Stallman's Gnu revolution has sparked something new in the engineering world: a stronger sense of us all being in this together. Just the one planet, gotta make it work, and dealing in the kids is critical. Kirby On 3/21/06, Arthur wrote: > > > > >-----Original Message----- > > >From: kirby urner [mailto:kirby.urner at gmail.com] > > >Sent: Tuesday, March 21, 2006 9:29 PM > > >To: Arthur; edu-sig at python.org > > >Subject: Re: [Edu-sig] Brainstorming about GNU Math > > > > > >> Another memo I don't think got distributed on this Coast > > >as of yet, perhaps. > > >> > > > > > >Math Forum. Drexel closer to your coast I think. > > Not sure how that helps. > > Let's just say that any part of your curriculum ideas that rely on the > reality of new business ethic, for kids or anyone else, I am against - as > being based on an illusion. > > A not undangerous one, at that. > > Art > > > From kirby.urner at gmail.com Wed Mar 22 07:26:44 2006 From: kirby.urner at gmail.com (kirby urner) Date: Tue, 21 Mar 2006 22:26:44 -0800 Subject: [Edu-sig] Pickling Polyhedra In-Reply-To: <000301c64d59$f2866580$1702a8c0@BasementDell> References: <000301c64d59$f2866580$1702a8c0@BasementDell> Message-ID: > These kinds of synergies between what I do because I like to do it and what > I do because I can get paid to do it is how PyGeo gets financed - in a > manner of speaking. > > Or that's at least the story to my wife ;) > > Art It's a lot like that for me too. I think of it as "serious play" as in "I'm enjoying the playful aspects" but it's also about feeding the families, mine included. Kirby From lac at strakt.com Wed Mar 22 10:57:29 2006 From: lac at strakt.com (Laura Creighton) Date: Wed, 22 Mar 2006 10:57:29 +0100 Subject: [Edu-sig] Properties use case In-Reply-To: Message from "Michael Tobis" of "Tue, 21 Mar 2006 13:58:52 CST." References: <000001c64d08$8288ac30$1702a8c0@BasementDell> <200603211851.k2LIp5qq020079@theraft.strakt.com> Message-ID: <200603220957.k2M9vTtg032103@theraft.strakt.com> In a message of Tue, 21 Mar 2006 13:58:52 CST, "Michael Tobis" writes: >While PyPy is a most admirable endeavor, I can't imagine that it can >resolve this problem. I'll be most pleased to discover that I am >wrong, so please correct me. > >Is scientific programming a target usage of PyPy? Yes. >In particular, how could large arrays of numbers of homogeneous type >be handled outside the Numeric-type libraries in such a way that >efficient computation is possible and also provide a guarantee the >memory mapping of the data to allow interoperation with compiled >languages? This one is better discussed on pypy-dev at codespeak.net where you will get better answers from people who are actually implementing this stuff :-) >Surely a reimplementation of BLAS, Atlas, Lapack, etc is not part of >PyPy's mission. So how is the success of PyPy going to have great >relevance to Numeric/numarray/numpy users? We don't -- at least right now -- want to replace these cases where you use numeric because you really need a lot of linear algebra. (Though the goal is to make it easy for researchers to drop in algorithms that can speed up their code, so who knows what people will do with it, eventually). But a lot of people are using numeric simply for speed and more memory packing. These people will find it easier to write their programs in PyPy, just as some of them now find it easier to write their programs in straightforward python and then use Psyco. I could be wrong, but I don't think it is the linear algebra that Arthur wants, or needs. He wants 'bloody fast arrays'. And I think he will like tens of thousands of threads, too, though if these just means tens of thousands of chances to modify only part of your complex number, when you wanted an atomic action guaranteed to modify both parts as one, then he may hate it before he likes it. :-) > >mt Laura From ajsiegel at optonline.net Wed Mar 22 14:28:18 2006 From: ajsiegel at optonline.net (Arthur) Date: Wed, 22 Mar 2006 08:28:18 -0500 Subject: [Edu-sig] Properties use case In-Reply-To: <200603220957.k2M9vTtg032103@theraft.strakt.com> Message-ID: <000001c64db4$7cad1dd0$1702a8c0@BasementDell> > >-----Original Message----- > >From: Laura Creighton [mailto:lac at strakt.com] > >We don't -- at least right now -- want to replace these > >cases where you use numeric because you really need a lot of > >linear algebra. Actually, the way I see it, there will be a significant benefit even when using a library like Numeric for linear algebra When profiling I was surprised at the time being spent on the calculation of determinants for my small matrices. Looking at the Numeric code I understood the issue better. It needs to do a decent amount of processing just to form the right question for lapack, i.e. it needs to analyze and understand the array it is processing before it can call the lapack routine. Which is why I begin to think that within the framework of an application where I know beforehand, e.g. the size and shape of the array for which I need a determinant, I would be losing less than I would have guessed by just up and calculating it in Python. Either way PyPY will be a win for this kind of processing. Art From lac at strakt.com Wed Mar 22 17:07:56 2006 From: lac at strakt.com (Laura Creighton) Date: Wed, 22 Mar 2006 17:07:56 +0100 Subject: [Edu-sig] No Learning Patents Message-ID: <200603221607.k2MG7ukc020643@theraft.strakt.com> Some of you may be interested in signing this: http://www.noelearningpatents.net/ I will paste in the first paragraph so that this article looks much less like 'buy me' spam. What is this? This petition aims to alert European authorities and policy-makers to the dangers of software patents, and particularly to the negative impact they will have on education. The use of Information and Communication Technologies (ICT) to support and enhance teaching and learning, including e-learning, is now recognised as a key element in providing education which meets the needs and abilities of students, and prepares Europe to participate creatively, technologically and economically on a global level. Laura Creighton From lac at strakt.com Wed Mar 22 17:32:30 2006 From: lac at strakt.com (Laura Creighton) Date: Wed, 22 Mar 2006 17:32:30 +0100 Subject: [Edu-sig] python wrappers for gecode Message-ID: <200603221632.k2MGWUKu021642@theraft.strakt.com> Somebody was looking for these earlier. According to the bottom of this message, Logilab has a primative version of this now. Laura ------- Forwarded Message Return-Path: python-logic-bounces at www.logilab.org Delivery-Date: Wed Mar 22 16:43:13 2006 Return-Path: Subject: Re: [Python-logic] Additional informations about the CSP library in Python From: =?ISO-8859-1?Q?Aur=E9lien_Camp=E9as?= To: python-logic at www.logilab.org, saymon at netium.com.br, saymon at netium.com.br List-Id: Logic and constraint propagation for Python On Wed, 2006-03-22 at 10:48 -0400, saymon at netium.com.br wrote: > Hello, > > I was looking for a CSP library to work with, as I have to make a software > that involves Constraint Satisfaction, and I found Logilab's library, > as a recommendation from my Master-in-Science course tutor (I am > studing in the university to get the MSc title in Artificial Intelligence). > > Now I am trying to use it, after reading a Python tutorial, > but I still have some problems on using that CSP library. Do you > have any additional documentation about it (the possible commands, > how they are used, etc.)? I think not. At this point, the source might be yout best documentation (it is quite readable). Note that all the available public methods are probably exposed in the web site demo. Which one do you feel is missing ? > I am working only with the informations you > published on the web page, and now they are not enough, as the software > I am building deals with constraints with numbers, not literals. There is nothing special about the kind of constraints you want to use. Logilab constraint.py is quite agnostic about that. Your have to ensure you give the correct operators (as constraints) to the repository ... You might feel that this package misses a very important optimisation : it lacks dedicated propagators for integer variables (basically a linear constraint solver) and thus its performance sucks in this area, compared to other more complete solvers. This pathological behaviour shows for instance in the naive specification of the send more money problem. If you need good performance with numbers, you should have a look at Mozart/Oz which contains a whole high-level constraint solving machinery - - which actually inspired logilab constraint package. Oz solver works very well and can help you debug your problem in powerful ways. If you are looking for *extreme* performance, then have a look at gecode, all written in plain C++, which is basically the Oz solver minus the concurrency management, but plus more stuff ... Note that there is currently a thin wrapper for python -> gecode currently in gestation at logilab. If you are interested in helping contraint.py benefit from the ultra-efficient gecode by completing the wrapper, you are welcome - just ask, and I'll talk with Ludovic here which is sitting on a primitive version of it. Cheers, > > Thanks a lot in advance. > > Saymon Erickson > Manaus - Brazil > _______________________________________________ > Python-logic mailing list > Python-logic at lists.logilab.org > http://lists.logilab.org/mailman/listinfo/python-logic _______________________________________________ Python-logic mailing list Python-logic at lists.logilab.org http://lists.logilab.org/mailman/listinfo/python-logic ------- End of Forwarded Message From dooms at info.ucl.ac.be Wed Mar 22 18:02:19 2006 From: dooms at info.ucl.ac.be (=?ISO-8859-1?Q?Gr=E9goire_Dooms?=) Date: Wed, 22 Mar 2006 18:02:19 +0100 Subject: [Edu-sig] python wrappers for gecode In-Reply-To: <200603221632.k2MGWUKu021642@theraft.strakt.com> References: <200603221632.k2MGWUKu021642@theraft.strakt.com> Message-ID: <4421831B.6040103@info.ucl.ac.be> Laura Creighton wrote: > Somebody was looking for these earlier. According to the bottom of this > message, Logilab has a primative version of this now. > It is available at http://codespeak.net/pypy/dist/pypy/lib/logic/gecode_wrapper/ You should however know that it is very preliminary and currently not really useable. If someone wants to offer support, please contact python-logic at lists.logilab.org and users at gecode.org Best, -- Gre'goire Dooms From kirby.urner at gmail.com Wed Mar 22 18:05:39 2006 From: kirby.urner at gmail.com (kirby urner) Date: Wed, 22 Mar 2006 09:05:39 -0800 Subject: [Edu-sig] Preview of Shuttleworth Summit (edu-sig exclusive) Message-ID: Exclusive to edu-sig: Here's a sneak peak at what I'm kicking around in advance of the upcoming Shuttleworth summit in London, which is about getting our favorite snake more puppeteer-programmers in South Africa (as a means to an end, not as an end in itself, i.e. lots of other languages in play): http://www.4dsolutions.net/presentations/urnermindstorm.pdf (5 pages, no pictures) Kirby From chuck at freshsources.com Wed Mar 22 18:48:37 2006 From: chuck at freshsources.com (Chuck Allison) Date: Wed, 22 Mar 2006 10:48:37 -0700 Subject: [Edu-sig] Brainstorming about GNU Math In-Reply-To: References: Message-ID: <1865284118.20060322104837@freshsources.com> Hello kirby, Let's not overlook the efforts being made by the ACM and the Shodor Group (with NSF money). In this month's CACM there is an article on Computational Thinking, describing how it's everybody's business - the liberal arts education of this century, if you will. And the Shodor Group is trying to evangelize cross-disciplinary Computational Science everywhere (I'm attending their intro workshop in May). There is a matching grass-roots awakening throughout higher education as well. I think it's happening, albeit slowly (but that's typical of successful shifts). And the Math Crisis has everyone everywhere in Chicken Little mode. Something's happening. PS - I took those SMSG courses. They were good, IMO. They qualified me for a summer at Philips Academy to learn Calculus and Statistics after my junior of high school in 1968. If not for that I doubt I'd have 3 degrees in math right now. Tuesday, March 21, 2006, 6:10:19 PM, you wrote: ku> Of course "gnu math" is a pun on "new math", more formally known as ku> SMSG, and designed to ride a tsunami of cold war paranoia, when the ku> USA first started "falling behind" in science and technology, as ku> evidenced by Sputnik. "New math" was supposed to turn out a new crop ku> of eggheads, prepared to keep the USA in the game, and you can't say ku> the effort failed entirely. We got NASA and Apollo, and later The ku> Mouse in Orlando, all products of these post WWII curriculum reforms. ku> However, there was never a huge buy-in among rank and file teachers, ku> who felt left out of the loop. Plus SMSG had its own problems... ku> Rolling the scenario forward several decades, we've had the GNU/Linux ku> revolution and the advent of more generous licensing agreements, ku> complete with a new business ethic that deals kids in at the outset, ku> as wannabee space cadets, as junior engineers. They quickly start ku> learning, and in a few short years are out of the gate as players, ku> spinning their own networks and lighting up the boards with new high ku> scores, news of old records broken and so forth. The next generation ku> starts ahead of the previous one, if all goes according to plan. ku> That's called a learning curve. That's called future shock ku> (especially if folks can't handle it, and go flying into buildings or ku> whatever terrifying thing -- The Power of Nightmares is worth seeing ku> on this ( http://www.imdb.com/title/tt0430484/ )). ku> With GNU/Linux and falling hardware prices comes greater access to ku> sophisticated computing environments, such as only a cast of high ku> priests had known before. The age of Turing Machines for Everyone had ku> arrived. We'd be needing programs like CP4E to spread the love. ku> Guido came up with a great language. The die was cast. ku> Rolling forward some more, we have a big literature on file, but it's ku> not that well organized. Hypertext glues it together, more than book ku> covers, although the shelf space devoted to Python and related topics ku> is respectable. In the meantime, OO has become well-established, so ku> even if Python isn't your final destination, it's within the right ku> track system. Switching to Java or C# is pretty easy, especially ku> given Jython and IronPython use these for guts. ku> As a Silicon Forest exec, my question is why non-OO problem solving, ku> as taught on the math track, has all this political clout, whereas ku> would be computer geeks have to drop out of school or sneak knowledge ku> when not in class. ku> Sure, there's some leakage, some osmosis, but for the most part it ku> seems there's a dike, a barrier, designed to keep computer programming ku> from "polluting" some purist tradition. And it's not just programming ku> that's kept at bay, but computer graphics and animation. The ku> pre-college mainstream remains strangely bereft of serious-minded ku> spatial geometry, even in districts that could afford the low-cost ku> diskless workstations or hand-me-down Pentiums. No A & B modules. No ku> hexapents. What's the story here? ku> Well, I don't think here is the right place to recap my analysis, but ku> in gist: overspecialization has bitten us in the rear. This isn't a ku> new conclusion. Bucky Fuller came to the same result. Lack of ku> cross-disciplinary communication has hampered our ability to evolve ku> the curriculum at a sufficient rate. We've fallen way behind. Again. ku> But this time, there's no "new math" to the rescue. There's "gnu ku> math" instead. ku> Kirby ku> _______________________________________________ ku> Edu-sig mailing list ku> Edu-sig at python.org ku> http://mail.python.org/mailman/listinfo/edu-sig -- Best regards, Chuck From ajsiegel at optonline.net Wed Mar 22 19:51:52 2006 From: ajsiegel at optonline.net (ajsiegel at optonline.net) Date: Wed, 22 Mar 2006 13:51:52 -0500 Subject: [Edu-sig] Brainstorming about GNU Math Message-ID: Kirby writes - >And it's not just programming >that's kept at bay, but computer graphics and animation. The >pre-college mainstream remains strangely bereft of serious-minded >spatial geometry It's frustrating how close and far we are from each other on this particular point, at the same time. Can we negotiate?? You insist - it seems to me (not directly in the quote above, but generally) - on making this a Fuller thing, and as such, something visionary, a bit rebelous, and certainly outside/beyond the of thinking of mainstream math educators. I have been able to demonstrate to you that a mathematician as mainstream as Felix Klein was pitching this exact point about spatial geometry- not abstractly in the laboratory but in seminars he conducted for pre-college math educators - at least 30 years before Fuller had a word to say on the subject. Different world views, you and I, I guess getting in the way. Klein is much more "from the mountain top" then Fuller, in my world - especially when we are talking about geometric ideas. And since we are talking about working within the academy, I think it important we have our facts straight, in terms of attribution of ideas. And from a pure *getting things accomplished* point of view, why present ideas in a way that makes them seem less mainstream, more tied to the insights of a Unique Genius, then they actually are, when one looks at the facts. Its just good math - in Kleins's presentation, at least. Art From ajsiegel at optonline.net Wed Mar 22 20:28:13 2006 From: ajsiegel at optonline.net (ajsiegel at optonline.net) Date: Wed, 22 Mar 2006 14:28:13 -0500 Subject: [Edu-sig] Brainstorming about GNU Math In-Reply-To: References: Message-ID: ----- Original Message ----- From: ajsiegel at optonline.net > > And since we are talking about working within the academy, I think > it important we > have our facts straight, in terms of attribution of ideas. Normally, BTW I'd agree with you. Why give away a thing. In this case, though, I think we need to make believe there is are Europeans, too. Art From kirby.urner at gmail.com Wed Mar 22 20:30:13 2006 From: kirby.urner at gmail.com (kirby urner) Date: Wed, 22 Mar 2006 11:30:13 -0800 Subject: [Edu-sig] Brainstorming about GNU Math In-Reply-To: References: Message-ID: > You insist - it seems to me (not directly in the quote above, but generally) - > on making this a Fuller thing, and as such, something visionary, a bit rebelous, > and certainly outside/beyond the of thinking of mainstream math educators. > Yeah, that's sort of my schtick. I think it's important. More than a bit rebelous even. > I have been able to demonstrate to you that a mathematician as mainstream as > Felix Klein was pitching this exact point about spatial geometry- not abstractly in > the laboratory but in seminars he conducted for pre-college math educators - at > least 30 years before Fuller had a word to say on the subject. I'm happy for you to stick to Klein as your avatar. I have no problem with that. I'm sure we'll have other big names in common. I've been writing about Penrose quite a bit recently, in my blog. Just because I'm into Bucky doesn't mean I live in a vacuum, even named as I am. > Different world views, you and I, I guess getting in the way. Klein is much more > "from the mountain top" then Fuller, in my world - especially when we are talking > about geometric ideas. I'm a philosophy major, entering the door of American Literature, and feeling impressed. I'm not really a mathematician wannabee. In the old trivium/quadrivium framework, that'd be a step down in rank. I have my career to think about. > And since we are talking about working within the academy, I think it important we > have our facts straight, in terms of attribution of ideas. I'm very accomplished as an academic, cite my sources religiously. In my case, Fuller is often a source. In your case, others, like Klein. There's nothing that needs fixing here. And again, I'm sure we can find overlap. Britney Spears? Dr. Evil? > And from a pure *getting things accomplished* point of view, why present ideas > in a way that makes them seem less mainstream, more tied to the insights of a > Unique Genius, then they actually are, when one looks at the facts. > I'm a Fuller Schooler, that's my gig, including at last year's OSCON. But I'm not trying to recruit everyone I see, saying join me, join me. I'm more looking to form alliances, already having a full crew of professionals aboard, arrrrgh. Eye patch. Parrot. > Its just good math - in Kleins's presentation, at least. > > Art > Again, we can be ships passing in the night on this. My venture into the Bermuda Triangle of synergetic geometry is in the "don't try this @ home" category i.e. it's not for everyone. More like an Xtreme sport [tm]. Fun though. Kirby From mark.engelberg at alumni.rice.edu Wed Mar 22 20:54:34 2006 From: mark.engelberg at alumni.rice.edu (Mark Engelberg) Date: Wed, 22 Mar 2006 11:54:34 -0800 Subject: [Edu-sig] python wrappers for gecode In-Reply-To: <4421831B.6040103@info.ucl.ac.be> References: <200603221632.k2MGWUKu021642@theraft.strakt.com> <4421831B.6040103@info.ucl.ac.be> Message-ID: Thanks for mentioning this. Please keep us apprised when the wrapper is ready for mainstream use. --Mark From ajsiegel at optonline.net Wed Mar 22 23:30:11 2006 From: ajsiegel at optonline.net (ajsiegel at optonline.net) Date: Wed, 22 Mar 2006 17:30:11 -0500 Subject: [Edu-sig] Brainstorming about GNU Math In-Reply-To: References: Message-ID: ----- Original Message ----- From: kirby urner > Again, we can be ships passing in the night on this. My venture into > the Bermuda Triangle of synergetic geometry is in the "don't try this > @ home" category i.e. it's not for everyone. More like an Xtreme > sport [tm]. Fun though. Except that's another big difference in our sensiblities - as a good progressive, you are a relativist. There ain't no such thing as speaking good ;) Apropos of Chuck's post, math as the new liberal art - my best sense of history comes from my sense of the history of the development iof mathematical ideas. Synergetic geometry, as I hear it presented, is about space - but somehow exists outside of time. It popped into being - an otherwordly vision. Maybe true. But in my view of what makes the study of math meaningful, its math without much meaning, to the extent we are really talking math at all, rather than something not more like - American Unaccountable Geniuses 101. Kay does make a good 102. It's a curriculum, yes. Art From kirby.urner at gmail.com Thu Mar 23 00:35:45 2006 From: kirby.urner at gmail.com (kirby urner) Date: Wed, 22 Mar 2006 15:35:45 -0800 Subject: [Edu-sig] Brainstorming about GNU Math In-Reply-To: References: Message-ID: > Except that's another big difference in our sensiblities - as a good progressive, you are a > relativist. There ain't no such thing as speaking good ;) > I have a long thread with some guy on wittgenstein-dialognet (a Yahoo! group) about moral relativism, whether Wittgenstein was one, etc. He wasn't, nor am I, seems to be the upshot of that thread. > Synergetic geometry, as I hear it presented, is about space - but somehow exists > outside of time. It popped into being - an otherwordly vision. No, Fuller casts his body of work as very time/size specific, his self-discipline, with a vocabulary that's deliberately remote and deliberately engineered. He even admits has central insights might all pre-exist in other literature. That being said, he's a born explorer and has the right to draw his map, which is what he did. I find it a very useful contribution, as I've said. He does more to interconnect the disciplines than most, and isn't writing as a geometer, specifically. I file it under Philosophy and/or Literature. It's a work in the humanities, maybe a liberal art in its own right (given how no department wants to claim it). > Maybe true. But in my view of what makes the study of math > meaningful, its math without much meaning, to the extent we are really talking math > at all, rather than something not more like - American Unaccountable Geniuses 101. > > Kay does make a good 102. > > It's a curriculum, yes. > > Art I'll file that under "from a guy who likes to have opinions" -- whether well-informed or no. If you ever undertake a serious study of Fuller's synergetics, maybe let me know. I could maybe offer a few pointers. Kirby From kirby.urner at gmail.com Thu Mar 23 02:52:29 2006 From: kirby.urner at gmail.com (kirby urner) Date: Wed, 22 Mar 2006 17:52:29 -0800 Subject: [Edu-sig] Pickling Polyhedra In-Reply-To: References: Message-ID: > > Exercise: > > Relate the above design pattern proposal to the model-view-controller > architecture. Explain how the above might be consistent and/or > inconsistent with MVC concepts. Related reading: http://www.4dsolutions.net/ocn/polys.html Note: Stu and Cary's Design Science Toys inventory, including the industrial equipment for making more inventory, burned to the ground, heavy metal melted. I filed an account directly from Cary to Synergeo awhile back (a Yahoo! group). What I told Cary is I didn't consider this a huge tragedy, as this wasn't about the machines. Those can be replaced. Kirby ==== > > K. Urner > 4D Studios > PDX USA > 2006.3.21 > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/edu-sig/attachments/20060322/de61f707/attachment.htm From kirby.urner at gmail.com Thu Mar 23 03:00:54 2006 From: kirby.urner at gmail.com (kirby urner) Date: Wed, 22 Mar 2006 18:00:54 -0800 Subject: [Edu-sig] Pickling Polyhedra In-Reply-To: References: Message-ID: > > > Note: Stu and Cary's Design Science Toys inventory, including the > industrial equipment for making more inventory, burned to the ground, heavy > metal melted. I filed an account directly from Cary to Synergeo awhile > back (a Yahoo! group). > Here's the link, if you manage to get past Yahoo's! credentialing machinery: http://groups.yahoo.com/group/synergeo/message/26461 Kirby -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/edu-sig/attachments/20060322/72bd5bfc/attachment.html From lac at strakt.com Thu Mar 23 05:12:31 2006 From: lac at strakt.com (Laura Creighton) Date: Thu, 23 Mar 2006 05:12:31 +0100 Subject: [Edu-sig] From europython -- should we do Python for kids? Message-ID: <200603230412.k2N4CVET023855@theraft.strakt.com> I think doing this would be fun. Since the CFP hasn't gone out yet, we haven't really organised ourselves all that well yet. But I think that Introductory Python is a good idea. I wonder if a separate Python-for-the-kids section would be good as well, and how many kids we could get to Europython if we offered this? What do other people think of this? Laura, brainstorming ------- Forwarded Message Return-Path: europython-bounces at python.org Delivery-Date: Wed Mar 22 23:27:56 2006 To: europython at python.org From: Jan Ulrich Hasecke Date: Wed, 22 Mar 2006 11:37:10 +0100 Subject: [EuroPython] Python for Kids? X-BeenThere: europython at python.org Hello, I am interested to register for the europython and would like to come with my son. He is 13 and has started to program with python 2 years ago. He is interested in the game track of course. Are there any other events for "kids", interested in learning python? There is a very good book around in German "Python for Kids" for example. Are you planning to do some beginner courses or courses for advanced beginners? Sincerely Jan Ulrich Hasecke DZUG e.V. - Deutschsprachige Zope User Group - www.zope.de - www.dzug.org Forster Stra?e 29 - 06112 Halle/Saale Telefon +49 345 122 9889 9 - Fax +49 345 122 9889 1 _______________________________________________ EuroPython mailing list EuroPython at python.org http://mail.python.org/mailman/listinfo/europython ------- End of Forwarded Message From glingl at aon.at Thu Mar 23 06:17:42 2006 From: glingl at aon.at (Gregor Lingl) Date: Thu, 23 Mar 2006 06:17:42 +0100 Subject: [Edu-sig] From europython -- should we do Python for kids? In-Reply-To: <200603230412.k2N4CVET023855@theraft.strakt.com> References: <200603230412.k2N4CVET023855@theraft.strakt.com> Message-ID: <44222F76.90602@aon.at> Laura Creighton schrieb: > I think doing this would be fun. Since the CFP hasn't gone out > yet, we haven't really organised ourselves all that well yet. > > But I think that Introductory Python is a good idea. I wonder if > a separate Python-for-the-kids section would be good as well, and > how many kids we could get to Europython if we offered this? > > What do other people think of this? > I'm considering to attend Europython this year - as it will take place in Switzerland, which is not far from Austria ;-) and also after the end of the school year in (eastern) Austria. Moreover I considered to give a short talk about, or presentation of, the turtle module I'm currently developing. Incidentally I've written a book "Python f?r Kids" (in German), a second edition of which I'm going to prepare this summer. So you can imagine that I would definitely be very interested in some event like the one you proposed - as well as to further the use of Python in education in general. As far as I know there was an educational track last year at Europython. Will this also be the case this year. What will (or should) be the relation to "Python for kids" that track? (part of? replacement?) ** Oh, I just noticed that your posting was a reply to some posting elsewhere.** In principle I also can imagine to give some beginner course ... Sorry for ending this posting so abruptly - it's early in the morning here and I've to go to work. Will be back in the evening. Regards, Gregor Lingl > Laura, brainstorming > > ------- Forwarded Message > > Return-Path: europython-bounces at python.org > Delivery-Date: Wed Mar 22 23:27:56 2006 > To: europython at python.org > From: Jan Ulrich Hasecke > Date: Wed, 22 Mar 2006 11:37:10 +0100 > > Subject: [EuroPython] Python for Kids? > X-BeenThere: europython at python.org > > Hello, > > I am interested to register for the europython and would like to come > with my son. He is 13 and has started to program with python 2 years > ago. He is interested in the game track of course. Are there any > other events for "kids", interested in learning python? > > There is a very good book around in German "Python for Kids" for > example. Danke f?r die Blumen! Are you planning to do some beginner courses or courses for > advanced beginners? > > Sincerely > Jan Ulrich Hasecke > > DZUG e.V. - Deutschsprachige Zope User Group - www.zope.de - > www.dzug.org > Forster Stra?e 29 - 06112 Halle/Saale > Telefon +49 345 122 9889 9 - Fax +49 345 122 9889 1 > > > > _______________________________________________ > EuroPython mailing list > EuroPython at python.org > http://mail.python.org/mailman/listinfo/europython > > ------- End of Forwarded Message > > _______________________________________________ > Edu-sig mailing list > Edu-sig at python.org > http://mail.python.org/mailman/listinfo/edu-sig > > -- Gregor Lingl Reisnerstrasse 3/19 A-1030 Wien Telefon: +43 1 713 33 98 Mobil: +43 664 140 35 27 Website: python4kids.net From mark.engelberg at alumni.rice.edu Thu Mar 23 06:20:52 2006 From: mark.engelberg at alumni.rice.edu (Mark Engelberg) Date: Wed, 22 Mar 2006 21:20:52 -0800 Subject: [Edu-sig] Livewires question Message-ID: I just checked out the book "Python Programming for the Absolute Beginner" to see some examples of the livewires package in use. The book says that the version of livewires it uses has been modified to be "even simpler" than the original. Does anyone here know the precise changes that the author made? Thanks, Mark From lac at strakt.com Thu Mar 23 07:05:01 2006 From: lac at strakt.com (Laura Creighton) Date: Thu, 23 Mar 2006 07:05:01 +0100 Subject: [Edu-sig] From europython -- should we do Python for kids? In-Reply-To: Message from Gregor Lingl of "Thu, 23 Mar 2006 06:17:42 +0100." <44222F76.90602@aon.at> References: <200603230412.k2N4CVET023855@theraft.strakt.com> <44222F76.90602@aon.at> Message-ID: <200603230605.k2N651uu029295@theraft.strakt.com> In a message of Thu, 23 Mar 2006 06:17:42 +0100, Gregor Lingl writes: >Laura Creighton schrieb: >> I think doing this would be fun. Since the CFP hasn't gone out >> yet, we haven't really organised ourselves all that well yet. >> >> But I think that Introductory Python is a good idea. I wonder if >> a separate Python-for-the-kids section would be good as well, and >> how many kids we could get to Europython if we offered this? >> >> What do other people think of this? >> > >I'm considering to attend Europython this year - as it will take place >in Switzerland, which is not far from Austria ;-) and also after the end >of the school year in (eastern) Austria. > >Moreover I considered to give a short talk about, or presentation of, >the turtle module I'm currently developing. Please do. >Incidentally I've written a book "Python f?r Kids" (in German), a second > edition of which I'm going to prepare this summer. Make a talk about this, also. >So you can imagine that I would definitely be very interested in some >event like the one you proposed - as well as to further the use of >Python in education in general. > >As far as I know there was an educational track last year at Europython. > Will this also be the case this year. What will (or should) be the >relation to "Python for kids" that track? (part of? replacement?) Yes, there will be an education track. I am chairing it. >** Oh, I just noticed that your posting was a reply to some posting >elsewhere.** Yes, a posting to the europython mailing list. But I told them to come here to discuss what the education track should be doing. We have the freedom to do whatever we want as part of Europython. The question is, what do we want to do? I know some people from South Africa are coming, and would like to discuss 'teaching scientific computing using Python in South Africa'. I told Kirby, who is going to the Mark Shuttleworth computers and education bash (which is happening __real soon__, no? ) to be on the look out for interesting people to invite to Europython. The plan is for the Call for Proposals to go out today sometime, and then we can get a better picture of who wants to present what, but since this is a self-organising conference, the only real rule is 'what we get depends on what we do'. So I want to open this up for discussion. What do we want to accomplish and how? >In principle I also can imagine to give some beginner course ... > >Sorry for ending this posting so abruptly - it's early in the morning >here and I've to go to work. Will be back in the evening. Here too, and I am off to work as well. Take care, Laura > >Regards, >Gregor Lingl > >> Laura, brainstorming >> >> ------- Forwarded Message >> >> Return-Path: europython-bounces at python.org >> Delivery-Date: Wed Mar 22 23:27:56 2006 >> To: europython at python.org >> From: Jan Ulrich Hasecke >> Date: Wed, 22 Mar 2006 11:37:10 +0100 >> >> Subject: [EuroPython] Python for Kids? >> X-BeenThere: europython at python.org >> >> Hello, >> >> I am interested to register for the europython and would like to come >> with my son. He is 13 and has started to program with python 2 years >> ago. He is interested in the game track of course. Are there any >> other events for "kids", interested in learning python? >> >> There is a very good book around in German "Python for Kids" for >> example. > >Danke f?r die Blumen! > >Are you planning to do some beginner courses or courses for >> advanced beginners? >> >> Sincerely >> Jan Ulrich Hasecke >> >> DZUG e.V. - Deutschsprachige Zope User Group - www.zope.de - >> www.dzug.org >> Forster Stra?e 29 - 06112 Halle/Saale >> Telefon +49 345 122 9889 9 - Fax +49 345 122 9889 1 >> >> >> >> _______________________________________________ >> EuroPython mailing list >> EuroPython at python.org >> http://mail.python.org/mailman/listinfo/europython >> >> ------- End of Forwarded Message >> >> _______________________________________________ >> Edu-sig mailing list >> Edu-sig at python.org >> http://mail.python.org/mailman/listinfo/edu-sig >> >> > >-- >Gregor Lingl >Reisnerstrasse 3/19 >A-1030 Wien > >Telefon: +43 1 713 33 98 >Mobil: +43 664 140 35 27 > >Website: python4kids.net From ajsiegel at optonline.net Thu Mar 23 14:38:22 2006 From: ajsiegel at optonline.net (Arthur) Date: Thu, 23 Mar 2006 08:38:22 -0500 Subject: [Edu-sig] Properties use case In-Reply-To: <200603220957.k2M9vTtg032103@theraft.strakt.com> Message-ID: <000301c64e7f$0e512590$1702a8c0@BasementDell> > >-----Original Message----- > >From: Laura Creighton [mailto:lac at strakt.com] > > And I think he will like tens of thousands of threads, too, > >though if these just means tens of thousands of chances to > >modify only part of your complex number, when you wanted an > >atomic action guaranteed to modify both parts as one, then > >he may hate it before he likes it. :-) Sorry - I suspect everyone else is quite done with this, but I'm still bothered by mixed signals. I would like to be able to present PyGeo as good, sensible code. Not Museum Quality, to be sure. But good and responsible. There is an implication in what you are saying that I am still off the mark. Perhaps I am. But its not fair, in my mind, to throw that at me knowing that it still has not gotten through to me (and Zelle ?) in what way I am off the mark. For the life of me I don't see the problem. My class has 2 __slots__ - .real and .imag. It does with them the kind of things that classes do. How is this class different and less thread safe than an infinite number of other classes that do with attributes the kinds of things that classes do with attributes? I have unintentionally stimulated a CS nerve, apparently. But would still love to get to the bottom of issue. Or get an official CS - proper use case aside - bill of health. Art From ajsiegel at optonline.net Thu Mar 23 15:12:40 2006 From: ajsiegel at optonline.net (Arthur) Date: Thu, 23 Mar 2006 09:12:40 -0500 Subject: [Edu-sig] Brainstorming about GNU Math In-Reply-To: Message-ID: <000001c64e83$d8e311c0$1702a8c0@BasementDell> > >-----Original Message----- > >From: kirby urner [mailto:kirby.urner at gmail.com] > >I'll file that under "from a guy who likes to have opinions" >> -- whether well-informed or no. Yes I do have opinions. And among my opinions is Accountability in educational matters is fundamental and cannot be replaced by Genius and that you - and I mean a broader "you" than Kirby Urner - are broadly assaulting accountability on a number of fronts. And you need to because you are a rush. We can't have a computer on everybody's desk if we need to be Accountable for the "why". Let's do it because of Genius, we will find the why later. You do your thing, I'll do mine - is always your answer. But I think you are muddying the waters tremendously for us Accountability slobs, and doing damage. Art > > > >If you ever undertake a serious study of Fuller's > >synergetics, maybe let me know. I could maybe offer a few pointers. > > > >Kirby > > From dooms at info.ucl.ac.be Thu Mar 23 16:24:39 2006 From: dooms at info.ucl.ac.be (=?ISO-8859-1?Q?Gr=E9goire_Dooms?=) Date: Thu, 23 Mar 2006 16:24:39 +0100 Subject: [Edu-sig] Properties use case In-Reply-To: <000301c64e7f$0e512590$1702a8c0@BasementDell> References: <000301c64e7f$0e512590$1702a8c0@BasementDell> Message-ID: <4422BDB7.2040006@info.ucl.ac.be> Arthur wrote: > > > >>> -----Original Message----- >>> From: Laura Creighton [mailto:lac at strakt.com] >>> > > >>> And I think he will like tens of thousands of threads, too, >>> though if these just means tens of thousands of chances to >>> modify only part of your complex number, when you wanted an >>> atomic action guaranteed to modify both parts as one, then >>> he may hate it before he likes it. :-) >>> > > Sorry - I suspect everyone else is quite done with this, but I'm still > bothered by mixed signals. > > I would like to be able to present PyGeo as good, sensible code. Not Museum > Quality, to be sure. But good and responsible. > > There is an implication in what you are saying that I am still off the mark. > Perhaps I am. But its not fair, in my mind, to throw that at me knowing > that it still has not gotten through to me (and Zelle ?) in what way I am > off the mark. > > For the life of me I don't see the problem. My class has 2 __slots__ - > .real and .imag. It does with them the kind of things that classes do. > > How is this class different and less thread safe than an infinite number of > other classes that do with attributes the kinds of things that classes do > with attributes? > This is a complex matter and I'll try to give a very short (hence a little categoric) answer. First of all, IMO Laura was referring to several thousands of lightweight thread such as those found in the Oz/Mozart language (http://www.mozart-oz.org). And that is because we have had a PyPy/Oz sprint two weeks ago where we made plans and prototypes for the integration of some ideas of Mozart into PyPy (mostly logic variables, "search", and constraint programming, micro-threads were already on the go). In that language stateful datatypes such as mutable objects are an exception. By default the variable store is a single assignment store. That means when you create a variable (e.g. with this statement X=_ ) it is uninitialized (called unbound). Then when you assign it you cannot rebind it to an other value: X=4 works but if you do X=5 later you get a sort of exception (failure). In a sense = does not do assignment but true mathematical equality (called unification). So you can do 4=X as well as 1+X = 5. The language supports very lightweight threads (having a million of those is no problem), when they try to "use" the value of a variable , they block if the variable is unbound. So you can launch inter-dependant threads accessing values computed by each others without wondering about the synchronization. That is called dataflow concurrency. In a sense, your mutable complex object is opposite to that approach where (almost) all variables never ever change their value. > I have unintentionally stimulated a CS nerve, apparently. But would still > love to get to the bottom of issue. > HTH :-) > Or get an official CS - proper use case aside - bill of health. > I would refer you to the CTM book: http://www2.info.ucl.ac.be/people/PVR/book.html You will find there lots of interresting ideas about computer language semantics. Best, -- Gr?goire Dooms From lac at strakt.com Thu Mar 23 17:00:41 2006 From: lac at strakt.com (Laura Creighton) Date: Thu, 23 Mar 2006 17:00:41 +0100 Subject: [Edu-sig] Properties use case In-Reply-To: Message from =?ISO-8859-1?Q?Gr=E9goire_Dooms?= of "Thu, 23 Mar 2006 16:24:39 +0100." <4422BDB7.2040006@info.ucl.ac.be> References: <000301c64e7f$0e512590$1702a8c0@BasementDell> <4422BDB7.2040006@info.ucl.ac.be> Message-ID: <200603231600.k2NG0fWA002365@theraft.strakt.com> In a message of Thu, 23 Mar 2006 16:24:39 +0100, Gr?goire Dooms writes: >Arthur wrote: >> >> >> >>>> -----Original Message----- >>>> From: Laura Creighton [mailto:lac at strakt.com] >>>> >> >> >>>> And I think he will like tens of thousands of threads, too, >>>> though if these just means tens of thousands of chances to >>>> modify only part of your complex number, when you wanted an >>>> atomic action guaranteed to modify both parts as one, then >>>> he may hate it before he likes it. :-) >>>> >> >> Sorry - I suspect everyone else is quite done with this, but I'm still >> bothered by mixed signals. >> >> I would like to be able to present PyGeo as good, sensible code. Not M >useum >> Quality, to be sure. But good and responsible. >> >> There is an implication in what you are saying that I am still off the >mark. >> Perhaps I am. But its not fair, in my mind, to throw that at me knowin >g >> that it still has not gotten through to me (and Zelle ?) in what way I >am >> off the mark. >> >> For the life of me I don't see the problem. My class has 2 __slots__ - >> .real and .imag. It does with them the kind of things that classes do. > >> >> How is this class different and less thread safe than an infinite numbe >r of >> other classes that do with attributes the kinds of things that classes >do >> with attributes? >> >This is a complex matter and I'll try to give a very short (hence a >little categoric) answer. >First of all, IMO Laura was referring to several thousands of >lightweight thread such as those found in the Oz/Mozart language >(http://www.mozart-oz.org). And that is because we have had a PyPy/Oz >sprint two weeks ago where we made plans and prototypes for the >integration of some ideas of Mozart into PyPy (mostly logic variables, >"search", and constraint programming, micro-threads were already on the g >o). > >In that language stateful datatypes such as mutable objects are an >exception. >By default the variable store is a single assignment store. That means >when you create a variable (e.g. with this statement X=_ ) it is >uninitialized (called unbound). Then when you assign it you cannot >rebind it to an other value: X=4 works but if you do X=5 later you get a >sort of exception (failure). In a sense = does not do assignment but >true mathematical equality (called unification). So you can do 4=X as >well as 1+X = 5. >The language supports very lightweight threads (having a million of >those is no problem), when they try to "use" the value of a variable , >they block if the variable is unbound. So you can launch >inter-dependant threads accessing values computed by each others without >wondering about the synchronization. That is called dataflow concurrency. > >In a sense, your mutable complex object is opposite to that approach >where (almost) all variables never ever change their value. >> I have unintentionally stimulated a CS nerve, apparently. But would s >till >> love to get to the bottom of issue. >> >HTH :-) >> Or get an official CS - proper use case aside - bill of health. >> >I would refer you to the CTM book: >http://www2.info.ucl.ac.be/people/PVR/book.html >You will find there lots of interresting ideas about computer language >semantics. > > >Best, >-- >Gr?goire Dooms > >_______________________________________________ >Edu-sig mailing list >Edu-sig at python.org >http://mail.python.org/mailman/listinfo/edu-sig Thank you Gr?goire for writing that. Much better than I could. Arthur, classes are not safe either. Say you have class that has two attributes, myclass.price and myclass.tax, and an update method that first assigns a new value to the price, and then, sometime later, even the very next line, assigns tax to be 7% of the price, unless the tax is over 300,000 in which case the tax is 300,000 very simple. And if you only have 1 thread, you are guaranteed that nobody is going to get a hold of an instance of myclass where the price has been changed, but that tax hasn't yet. Only one thing gets to run at all, so there is nobody else, to get a hold of things. Now add threading. Ooops, one thread could be using an instance while the other was updating it. Very bad for you. You need a way to lock' the object and say 'nobody gets to use this thing until I am done with it'. You can implement your own locking mechanism. Or you could use a language type that comes with the language -- a tuple, for instance -- which guarantees this atomicity you want. Then it is the language implementor's headache to make the locking mechanism work. Laura From kirby.urner at gmail.com Thu Mar 23 17:01:49 2006 From: kirby.urner at gmail.com (kirby urner) Date: Thu, 23 Mar 2006 08:01:49 -0800 Subject: [Edu-sig] Brainstorming about GNU Math In-Reply-To: <000001c64e83$d8e311c0$1702a8c0@BasementDell> References: <000001c64e83$d8e311c0$1702a8c0@BasementDell> Message-ID: > Yes I do have opinions. And among my opinions is Accountability in > educational matters is fundamental and cannot be replaced by Genius and > that > you - and I mean a broader "you" than Kirby Urner - are broadly assaulting > accountability on a number of fronts. You haven't a clue what I'm doing. You got "assaulting" right I suppose -- has a kind of Lord of the Rings ring that I like. And you need to because you are a rush. We can't have a computer on > everybody's desk if we need to be Accountable for the "why". Let's do it > because of Genius, we will find the why later. I'm a Silicon Forest exec looking after my own. Do what you will in New York. Not my problem, not my concern. Teaching Python again this morning -- we'll get into operator overloading some. Then back to string substitution with madlibs. Every kid has an Internet-enabled Win2000 box, while I project from my laptop. These basic logistics are not my concern. Portland already has its act together. You do your thing, I'll do mine - is always your answer. Exactly. What other choice is there? If you wanted to collaborate, you'd have to have more of a clue about what I do for a living, as a Fuller Schooler that is. But I think you are muddying the waters tremendously for us Accountability > slobs, and doing damage. > > Art And I think you're very far from the action to be making any kind of informed judgment. People who study my writings don't go running to Arthur for an assessment of my effectiveness, I can assure you (unless they're lost or confused). Kirby -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/edu-sig/attachments/20060323/c56199af/attachment.html From kirby.urner at gmail.com Thu Mar 23 17:01:49 2006 From: kirby.urner at gmail.com (kirby urner) Date: Thu, 23 Mar 2006 08:01:49 -0800 Subject: [Edu-sig] Brainstorming about GNU Math In-Reply-To: <000001c64e83$d8e311c0$1702a8c0@BasementDell> References: <000001c64e83$d8e311c0$1702a8c0@BasementDell> Message-ID: > Yes I do have opinions. And among my opinions is Accountability in > educational matters is fundamental and cannot be replaced by Genius and > that > you - and I mean a broader "you" than Kirby Urner - are broadly assaulting > accountability on a number of fronts. You haven't a clue what I'm doing. You got "assaulting" right I suppose -- has a kind of Lord of the Rings ring that I like. And you need to because you are a rush. We can't have a computer on > everybody's desk if we need to be Accountable for the "why". Let's do it > because of Genius, we will find the why later. I'm a Silicon Forest exec looking after my own. Do what you will in New York. Not my problem, not my concern. Teaching Python again this morning -- we'll get into operator overloading some. Then back to string substitution with madlibs. Every kid has an Internet-enabled Win2000 box, while I project from my laptop. These basic logistics are not my concern. Portland already has its act together. You do your thing, I'll do mine - is always your answer. Exactly. What other choice is there? If you wanted to collaborate, you'd have to have more of a clue about what I do for a living, as a Fuller Schooler that is. But I think you are muddying the waters tremendously for us Accountability > slobs, and doing damage. > > Art And I think you're very far from the action to be making any kind of informed judgment. People who study my writings don't go running to Arthur for an assessment of my effectiveness, I can assure you (unless they're lost or confused). Kirby -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/edu-sig/attachments/20060323/c56199af/attachment-0001.htm From mtobis at gmail.com Thu Mar 23 17:49:41 2006 From: mtobis at gmail.com (Michael Tobis) Date: Thu, 23 Mar 2006 10:49:41 -0600 Subject: [Edu-sig] Properties use case In-Reply-To: <200603231600.k2NG0fWA002365@theraft.strakt.com> References: <000301c64e7f$0e512590$1702a8c0@BasementDell> <4422BDB7.2040006@info.ucl.ac.be> <200603231600.k2NG0fWA002365@theraft.strakt.com> Message-ID: > Then it is the language implementor's headache to make the locking mechanism work. "from threading import Lock" generally works for me. Arthur is not implementing a general purpose thread-safe language, so like him I continue to be confused as to the relevance of this conversation to his project. This conversation has indeed been interesting. In particular I appreciate the explanation of what Oz is about. However, one should make clear whether one is musing or offering advice. It's my impression that the advice now boils down either to None, or to abandon Python for Oz, neither of which is very helpful. Did I miss something? mt From kirby.urner at gmail.com Thu Mar 23 17:54:26 2006 From: kirby.urner at gmail.com (kirby urner) Date: Thu, 23 Mar 2006 08:54:26 -0800 Subject: [Edu-sig] From europython -- should we do Python for kids? In-Reply-To: <200603230605.k2N651uu029295@theraft.strakt.com> References: <200603230412.k2N4CVET023855@theraft.strakt.com> <44222F76.90602@aon.at> <200603230605.k2N651uu029295@theraft.strakt.com> Message-ID: My initial take is it's a good idea to do actual Python trainings at various levels, especially for participants feeling somewhat peripheral to the main conference tracks, owing to a language barrier of some kind. The pre OSCON workshops (before the actual start of the conference) accomplish a similar purpose, in tandem with sprints, which are more for experts taking advantage of a (sometimes rare) opportunity to collaborate with peers in meatspace. I don't think the main tracks can be given over to trainings simply for lack of time and generality. A EuroPython should generally assume a high level of Python literacy as a given, and not devote its core schedule to ensuring basic language proficiency. That's simply because such conferences are all too short and expensive, and what participants need is usually higher level. In the education realm, that would translate to seminars about pedagogy (what works, what doesn't), and about content (this is how we use Python to teach math, geography, physics or whatever). I'd think a prime topic for discussion might be Education Distros, i.e. pre-package Pythons that contain not only add-ons we might need, but plenty of actual curriculum (branded), say in the form of HTML, MPEG, JPEG and so on. DVDs another option. Speaking of video, has anyone but me watched the Python-with-Tk trainings on video.google.com. I like the laid back, low pressure style. Kirby -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/edu-sig/attachments/20060323/6a040362/attachment.html From john.zelle at wartburg.edu Thu Mar 23 18:09:38 2006 From: john.zelle at wartburg.edu (John Zelle) Date: Thu, 23 Mar 2006 11:09:38 -0600 Subject: [Edu-sig] Properties use case In-Reply-To: <200603231600.k2NG0fWA002365@theraft.strakt.com> References: <000301c64e7f$0e512590$1702a8c0@BasementDell> <4422BDB7.2040006@info.ucl.ac.be> <200603231600.k2NG0fWA002365@theraft.strakt.com> Message-ID: <200603231109.39116.john.zelle@wartburg.edu> Since my name was invoked recently on this thread (albeit with a question mark), let me try to summarize: We all agree that mutability introduces interesting issues, particularly in the face of true concurrency. Language designers are very interested in languages with semantics that avoid or minimize these problems. As a Prologer at heart, I'm a big fan of unification semantics myself. I think we all also agree that Python is an OO language, and as such it institutionalizes side-effects. OO is not functional, it is not single assignment, it is not dataflow. It is a different computational model, and one that makes use of mutable objects as an inherent feature of design. We use objects to enacpsulate changeable state. When designing a system using OO, I as the designer make choices about what types (mutable vs. immutable) make the most sense for my design. That evaluation involves issues such as efficiency, maintainablility, and elegance. I understand Arthur to be saying: "In my design, a container for a complex that masquerades as a complex is a good and useful type." Without taking a detailed look at his code and the design ramifications of that choice, I personally have no basis for saying it's a bad decision (or a good one, for that matter). He is aware of the risks of mutability and has decided his design criteria still calls for it. Even though I'm a CS type (sometimes that's a pejorative here, I know), Arthur has my blessing to use the tools of his chosen paradigm (OOP) to solve his problem in an elegant way. If that's all he's looking for, then we can close the thread :-). BTW, I have also found this discussion very interesting, if not particularly helpful for Arthur. --John On Thursday 23 March 2006 10:00, Laura Creighton wrote: > In a message of Thu, 23 Mar 2006 16:24:39 +0100, Gr?goire Dooms writes: > >Arthur wrote: > >>>> -----Original Message----- > >>>> From: Laura Creighton [mailto:lac at strakt.com] > >>>> > >>>> > >>>> > >>>> And I think he will like tens of thousands of threads, too, > >>>> though if these just means tens of thousands of chances to > >>>> modify only part of your complex number, when you wanted an > >>>> atomic action guaranteed to modify both parts as one, then > >>>> he may hate it before he likes it. :-) > >> > >> Sorry - I suspect everyone else is quite done with this, but I'm still > >> bothered by mixed signals. > >> > >> I would like to be able to present PyGeo as good, sensible code. Not M > > > >useum > > > >> Quality, to be sure. But good and responsible. > >> > >> There is an implication in what you are saying that I am still off the > > > >mark. > > > >> Perhaps I am. But its not fair, in my mind, to throw that at me knowin > > > >g > > > >> that it still has not gotten through to me (and Zelle ?) in what way I > > > >am > > > >> off the mark. > >> > >> For the life of me I don't see the problem. My class has 2 __slots__ - > >> .real and .imag. It does with them the kind of things that classes do. > >> > >> > >> How is this class different and less thread safe than an infinite numbe > > > >r of > > > >> other classes that do with attributes the kinds of things that classes > > > >do > > > >> with attributes? > > > >This is a complex matter and I'll try to give a very short (hence a > >little categoric) answer. > >First of all, IMO Laura was referring to several thousands of > >lightweight thread such as those found in the Oz/Mozart language > >(http://www.mozart-oz.org). And that is because we have had a PyPy/Oz > >sprint two weeks ago where we made plans and prototypes for the > >integration of some ideas of Mozart into PyPy (mostly logic variables, > >"search", and constraint programming, micro-threads were already on the g > >o). > > > >In that language stateful datatypes such as mutable objects are an > >exception. > >By default the variable store is a single assignment store. That means > >when you create a variable (e.g. with this statement X=_ ) it is > >uninitialized (called unbound). Then when you assign it you cannot > >rebind it to an other value: X=4 works but if you do X=5 later you get a > >sort of exception (failure). In a sense = does not do assignment but > >true mathematical equality (called unification). So you can do 4=X as > >well as 1+X = 5. > >The language supports very lightweight threads (having a million of > >those is no problem), when they try to "use" the value of a variable , > >they block if the variable is unbound. So you can launch > >inter-dependant threads accessing values computed by each others without > >wondering about the synchronization. That is called dataflow concurrency. > > > >In a sense, your mutable complex object is opposite to that approach > >where (almost) all variables never ever change their value. > > > >> I have unintentionally stimulated a CS nerve, apparently. But would s > > > >till > > > >> love to get to the bottom of issue. > > > >HTH :-) > > > >> Or get an official CS - proper use case aside - bill of health. > > > >I would refer you to the CTM book: > >http://www2.info.ucl.ac.be/people/PVR/book.html > >You will find there lots of interresting ideas about computer language > >semantics. > > > > > >Best, > >-- > >Gr?goire Dooms > > > >_______________________________________________ > >Edu-sig mailing list > >Edu-sig at python.org > >http://mail.python.org/mailman/listinfo/edu-sig > > Thank you Gr?goire for writing that. Much better than I could. > > Arthur, classes are not safe either. Say you have class that > has two attributes, myclass.price and myclass.tax, and an > update method that first assigns a new value to the price, and > then, sometime later, even the very next line, assigns tax > to be 7% of the price, unless the tax is over 300,000 in which > case the tax is 300,000 > > very simple. And if you only have 1 thread, you are guaranteed that > nobody is going to get a hold of an instance of myclass where the > price has been changed, but that tax hasn't yet. Only one thing > gets to run at all, so there is nobody else, to get a hold of things. > > Now add threading. Ooops, one thread could be using an instance while > the other was updating it. Very bad for you. You need a way to lock' > the object and say 'nobody gets to use this thing until I am done with > it'. > > You can implement your own locking mechanism. Or you could use a > language type that comes with the language -- a tuple, for instance -- > which guarantees this atomicity you want. Then it is the language > implementor's headache to make the locking mechanism work. > > Laura > _______________________________________________ > Edu-sig mailing list > Edu-sig at python.org > http://mail.python.org/mailman/listinfo/edu-sig -- John M. Zelle, Ph.D. Wartburg College Professor of Computer Science Waverly, IA john.zelle at wartburg.edu (319) 352-8360 From ajsiegel at optonline.net Thu Mar 23 18:26:39 2006 From: ajsiegel at optonline.net (ajsiegel at optonline.net) Date: Thu, 23 Mar 2006 12:26:39 -0500 Subject: [Edu-sig] Brainstorming about GNU Math In-Reply-To: References: <000001c64e83$d8e311c0$1702a8c0@BasementDell> Message-ID: ----- Original Message ----- From: kirby urner > > I'm a Silicon Forest exec looking after my own. So I *do* understand correctly. Business is business - to be sure. Art A -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/edu-sig/attachments/20060323/94cbd6e9/attachment.html From jan.ulrich at hasecke.com Thu Mar 23 08:53:50 2006 From: jan.ulrich at hasecke.com (Jan Ulrich Hasecke) Date: Thu, 23 Mar 2006 08:53:50 +0100 Subject: [Edu-sig] From europython -- should we do Python for kids? In-Reply-To: <200603230605.k2N651uu029295@theraft.strakt.com> References: <200603230412.k2N4CVET023855@theraft.strakt.com> <44222F76.90602@aon.at> <200603230605.k2N651uu029295@theraft.strakt.com> Message-ID: Hi, I subscribed to follow the discussions here for some time. It was me, who asked for informations about python for kids events at the europython. Am 23.03.2006 um 07:05 schrieb Laura Creighton: > So I want to open this up for discussion. What do we want to > accomplish and how? I can not do much but to show our situation. I am not a developer, but I am engaged in the german speaking zope user group and this is my link to python. So I am not able to really help my son when he runs into problems. We live in a medium town, but up to now he does not find other kids using python or blender in our town. I imagine that there are some kids around who are a little isolated, because they are the only ones in there town using python. Side effect of this is, that he has to use material from the web, which is mostly in English. Thats ok, it will improve his language skills. ;-) So maybe it is only my problem not being a developer, and there won't be many participants coming with their kids to the europython. He would like an advanced beginner course, because after working with the book of Gregor Lingl he is in the middle of "Objektorientierte Programmierung mit Python" a standard learning book in German. And he started to use soya together with blender. So tips and tricks using blender and soya would be very appreciated. ;-) Generally: If there will be some events for kids, this should be promoted specially, because not many participants will expect this. But maybe more than expected will come with their kids or even families (Geneva is nice enough!) if they knew that their kids could learn something and won't just hang around. Cheers! juh -- DZUG e.V. - Deutschsprachige Zope User Group - www.zope.de - www.dzug.org Forster Stra?e 29 - 06112 Halle/Saale Telefon +49 345 122 9889 9 - Fax +49 345 122 9889 1 From kirby.urner at gmail.com Thu Mar 23 19:44:47 2006 From: kirby.urner at gmail.com (kirby urner) Date: Thu, 23 Mar 2006 10:44:47 -0800 Subject: [Edu-sig] Brainstorming about GNU Math In-Reply-To: References: <000001c64e83$d8e311c0$1702a8c0@BasementDell> Message-ID: On 3/23/06, ajsiegel at optonline.net wrote: > > *----- Original Message -----* > > *From*: kirby urner > > > > > I'm a Silicon Forest exec looking after my own. > > So I *do* understand correctly. > I doubt it, given your track record. I want the kids around here to grow up with many opportunities, to prosper, to avail themselves of our local high tech economy if they so choose (in addition to our other natural wonders). Management of Ecotopia is not something to outsource. We'll come up with our own designs. To that end, I'm working to grow some indigenous curriculum that suits our needs. However, as it turns out, the Silicon Forest is not alone in having a high-tech, knowledge-based economy, so my work in the neighborhood sometimes earns me an invite to other necks of the woods as well. > Business is business - to be sure. > > Art > Academia has its own forms of corruption. You may feel some holier than thou complex coming on, given your fantasies about some above-it-all Ivory Tower. Don't let me burst your bubble then. Dream on. Kirby -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/edu-sig/attachments/20060323/aa76435c/attachment.html From kirby.urner at gmail.com Thu Mar 23 20:00:57 2006 From: kirby.urner at gmail.com (kirby urner) Date: Thu, 23 Mar 2006 11:00:57 -0800 Subject: [Edu-sig] Properties use case In-Reply-To: <200603231109.39116.john.zelle@wartburg.edu> References: <000301c64e7f$0e512590$1702a8c0@BasementDell> <4422BDB7.2040006@info.ucl.ac.be> <200603231600.k2NG0fWA002365@theraft.strakt.com> <200603231109.39116.john.zelle@wartburg.edu> Message-ID: If I were Arthur and trying to ensure my PyGeo source was "camera ready" from a code teaching point of view, I'd probably open source it on sourceforge, making the checkin/checkout process easy, and recruit apprentice PyGeo coders into the fold. They'd learn the ropes and propose enhancements or refactorings. There'd be more than one pair of eyes, more than one brain, working on the code. Design patterns such as we've been discussing, would get hashed out among insiders, less so in a generic public forum like edu-sig. As long as it's just Arthur writing everything, and soliciting advice from people who haven't made a concerted study of his work, I don't have any confidance that the code will be camera ready as some showcase for beautiful code. If this were Gerald de Jong, or Guido, or Tim Peters we were talking about, I might have a different assessment. But Arthur didn't grow up in computer world, is a johnny come lately, bearing much cultural baggage. He needs professional help, in my estimation. In my own case, I've posted working code, e.g. for a presentation manager using PyGame, that's obviously idiosyncratic, not peer-reviewed let alone peer-enhanced. I've been up front with my corresponding expectation: this source code won't be very useful to others -- except maybe in the case of the OSCON 2005 source wherein I buried some notes of historical interest, but that's a different notion of utility. Kirby -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/edu-sig/attachments/20060323/3ddea278/attachment.htm From ajsiegel at optonline.net Thu Mar 23 20:16:37 2006 From: ajsiegel at optonline.net (ajsiegel at optonline.net) Date: Thu, 23 Mar 2006 14:16:37 -0500 Subject: [Edu-sig] Properties use case In-Reply-To: References: <000301c64e7f$0e512590$1702a8c0@BasementDell> <4422BDB7.2040006@info.ucl.ac.be> <200603231600.k2NG0fWA002365@theraft.strakt.com> <200603231109.39116.john.zelle@wartburg.edu> Message-ID: Thank you for the advice, Mr. Urner. Happy Dethe? Art -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/edu-sig/attachments/20060323/0f46bd5a/attachment.html -------------- next part -------------- If I were Arthur and trying to ensure my PyGeo source was "camera ready" from a code teaching point of view, I'd probably open source it on sourceforge, making the checkin/checkout process easy, and recruit apprentice PyGeo coders into the fold. They'd learn the ropes and propose enhancements or refactorings. There'd be more than one pair of eyes, more than one brain, working on the code. Design patterns such as we've been discussing, would get hashed out among insiders, less so in a generic public forum like edu-sig. As long as it's just Arthur writing everything, and soliciting advice from people who haven't made a concerted study of his work, I don't have any confidance that the code will be camera ready as some showcase for beautiful code. If this were Gerald de Jong, or Guido, or Tim Peters we were talking about, I might have a different assessment. But Arthur didn't grow up in computer world, is a johnny come lately, bearing much cultural baggage. He needs professional help, in my estimation. In my own case, I've posted working code, e.g. for a presentation manager using PyGame, that's obviously idiosyncratic, not peer-reviewed let alone peer-enhanced. I've been up front with my corresponding expectation: this source code won't be very useful to others -- except maybe in the case of the OSCON 2005 source wherein I buried some notes of historical interest, but that's a different notion of utility. Kirby -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/edu-sig/attachments/20060323/0f46bd5a/attachment.htm -------------- next part -------------- _______________________________________________ Edu-sig mailing list Edu-sig at python.org http://mail.python.org/mailman/listinfo/edu-sig From christian.mascher at gmx.de Thu Mar 23 18:26:08 2006 From: christian.mascher at gmx.de (Christian Mascher) Date: Thu, 23 Mar 2006 18:26:08 +0100 Subject: [Edu-sig] Properties use case In-Reply-To: References: <000001c64abb$4a8ef360$1702a8c0@BasementDell> <000701c64abf$b3d7c870$1702a8c0@BasementDell> Message-ID: <4422DA30.5090300@gmx.de> Scott David Daniels wrote: > copying to a minimum. With immutables, you needn't do any of the > bookkeeping. It is not that you have gone terribly wrong; it is that > you have opened the lid on a large class of avoidable problems. If you > look at Java's strings (as I remember -- it has been forever since I > studied Java at all), you will find they are mutable. You also find > that Java code copies strings a _lot_, just to be safe against lower- > level mutation. Incidentally, Java's strings are immutable, too. Quote from "Head First Java" (p. 589): "For security purposes, and for the sake of conserving memory ... Strings in Java are immutable." Christian From Scott.Daniels at Acm.Org Thu Mar 23 23:48:38 2006 From: Scott.Daniels at Acm.Org (Scott David Daniels) Date: Thu, 23 Mar 2006 14:48:38 -0800 Subject: [Edu-sig] Properties use case In-Reply-To: <4422DA30.5090300@gmx.de> References: <000001c64abb$4a8ef360$1702a8c0@BasementDell> <000701c64abf$b3d7c870$1702a8c0@BasementDell> <4422DA30.5090300@gmx.de> Message-ID: Christian Mascher wrote: > Scott David Daniels wrote: > >> copying to a minimum. With immutables, you needn't do any of the >> bookkeeping. It is not that you have gone terribly wrong; it is that >> you have opened the lid on a large class of avoidable problems. If you >> look at Java's strings (as I remember -- it has been forever since I >> studied Java at all), you will find they are mutable. You also find >> that Java code copies strings a _lot_, just to be safe against lower- >> level mutation. > > Incidentally, Java's strings are immutable, too. Quote from "Head First > Java" (p. 589): > > "For security purposes, and for the sake of conserving memory ... > Strings in Java are immutable." Sorry about the mis-information, it has been too many years since I looked at Java. Perhaps I was remembering Pascal or Ada. --Scott David Daniels Scott.Daniels at Acm.Org From lac at strakt.com Sat Mar 25 07:13:13 2006 From: lac at strakt.com (Laura Creighton) Date: Sat, 25 Mar 2006 07:13:13 +0100 Subject: [Edu-sig] Properties use case In-Reply-To: Message from "Michael Tobis" of "Thu, 23 Mar 2006 10:49:41 CST." References: <000301c64e7f$0e512590$1702a8c0@BasementDell> <4422BDB7.2040006@info.ucl.ac.be> <200603231600.k2NG0fWA002365@theraft.strakt.com> Message-ID: <200603250613.k2P6DDY1029384@theraft.strakt.com> In a message of Thu, 23 Mar 2006 10:49:41 CST, "Michael Tobis" writes: >> Then it is the language implementor's headache to make the locking mec >hanism work. > >"from threading import Lock" > >generally works for me. > >Arthur is not implementing a general purpose thread-safe language, so >like him I continue to be confused as to the relevance of this >conversation to his project. > >This conversation has indeed been interesting. In particular I >appreciate the explanation of what Oz is about. However, one should >make clear whether one is musing or offering advice. > >It's my impression that the advice now boils down either to None, or >to abandon Python for Oz, neither of which is very helpful. Did I miss >something? Yes. from threading import Lock relies on the global interpreter lock to work. PyPy doesn't have one. It has never been clear to me whether Arthur has been locking his complex numbers before be modifies them or not, which is why I asked him 'should I worry' a while ago. It has also not been clear to me whether he _cares_ if he uses a half-modified complex number in the course of running things. Maybe for his purposes this doesn't matter. However, if it matters, and if he is using the global interpreter lock to keep problems from happening, then when he moves to a pure pypy solution, one of the changes in his way of thinking will have to be 'how to write this in the absence of the global interpreter lock'. Laura > >mt From ajsiegel at optonline.net Sat Mar 25 09:02:31 2006 From: ajsiegel at optonline.net (Arthur) Date: Sat, 25 Mar 2006 03:02:31 -0500 Subject: [Edu-sig] Properties use case In-Reply-To: <200603250613.k2P6DDY1029384@theraft.strakt.com> Message-ID: <000001c64fe2$78b74e00$1702a8c0@BasementDell> > >-----Original Message----- > >From: edu-sig-bounces at python.org > >[mailto:edu-sig-bounces at python.org] On Behalf Of Laura Creighton > >Sent: Saturday, March 25, 2006 1:13 AM > >To: Michael Tobis > >Cc: edu-sig at python.org > >Subject: Re: [Edu-sig] Properties use case >> It has also not > >been clear to me whether he _cares_ if he uses a > >half-modified complex number in the course of running > >things. Maybe for his purposes this doesn't matter. It doesn't matter to me any more than whether my tax calculations are consistently correct were my class the one you described a few posts back. I think I should perhaps appreciate that Kirby is the only one talking straight to me. This programming business is quite over-my-head. Art From ajsiegel at optonline.net Sat Mar 25 09:59:29 2006 From: ajsiegel at optonline.net (Arthur) Date: Sat, 25 Mar 2006 03:59:29 -0500 Subject: [Edu-sig] Properties use case In-Reply-To: <000001c64fe2$78b74e00$1702a8c0@BasementDell> Message-ID: <000001c64fea$6d7da450$1702a8c0@BasementDell> > >-----Original Message----- > >From: edu-sig-bounces at python.org > >[mailto:edu-sig-bounces at python.org] On Behalf Of Arthur > >Sent: Saturday, March 25, 2006 3:03 AM > >To: 'Laura Creighton'; 'Michael Tobis' > >Cc: edu-sig at python.org > >Subject: Re: [Edu-sig] Properties use case > > > >It doesn't matter to me any more than whether my tax > >calculations are consistently correct were my class the one > >you described a few posts back. Can someone remind me why we are talking about threads related to my complex number class? Which I think we have agreed is just in the end a class like any other class. My general understanding is that unless there is some special reason to get into it, stay away from trying to manage multiple threads of execution in general, and in Python in particular. Should I not be using classes? Sould I not be using threads? Should I not be using Python? Should I not be programming? Which the hell is it, damn it. Art Are we talking OS threads that are somehow unavoidable? From lac at strakt.com Sat Mar 25 13:16:23 2006 From: lac at strakt.com (Laura Creighton) Date: Sat, 25 Mar 2006 13:16:23 +0100 Subject: [Edu-sig] Properties use case In-Reply-To: Message from Arthur of "Sat, 25 Mar 2006 03:02:31 EST." <000001c64fe2$78b74e00$1702a8c0@BasementDell> References: <000001c64fe2$78b74e00$1702a8c0@BasementDell> Message-ID: <200603251216.k2PCGNx1012947@theraft.strakt.com> In a message of Sat, 25 Mar 2006 03:02:31 EST, Arthur writes: >It doesn't matter to me any more than whether my tax calculations are >consistently correct were my class the one you described a few posts back >. > >I think I should perhaps appreciate that Kirby is the only one talking >straight to me. This programming business is quite over-my-head. > >Art Ok, so it does matter. Are you locking your complex number before modifying it? Laura From ajsiegel at optonline.net Sat Mar 25 14:33:22 2006 From: ajsiegel at optonline.net (Arthur) Date: Sat, 25 Mar 2006 08:33:22 -0500 Subject: [Edu-sig] Properties use case In-Reply-To: <200603251216.k2PCGNx1012947@theraft.strakt.com> Message-ID: <000001c65010$b0a833f0$1702a8c0@BasementDell> > >-----Original Message----- > >From: Laura Creighton [mailto:lac at strakt.com] > >Sent: Saturday, March 25, 2006 7:16 AM > >To: Arthur > >Ok, so it does matter. Are you locking your complex number > >before modifying it? Just to generalize the issue, so that I know, realy, what we are talking about, can we discuss my circle instead of my complex object. It has a center, a radius, and a matrix describing its orientation in space. I would like all to be in sync and recalculated, based on changes to the position of any other objects on which its center, its radius, or its orientation in space is dependent, *before* it redraws itself. No I do not lock my circle. Art From dreedmac at columbus.rr.com Sat Mar 25 15:10:22 2006 From: dreedmac at columbus.rr.com (David Reed) Date: Sat, 25 Mar 2006 09:10:22 -0500 Subject: [Edu-sig] Properties use case In-Reply-To: <000001c65010$b0a833f0$1702a8c0@BasementDell> References: <000001c65010$b0a833f0$1702a8c0@BasementDell> Message-ID: <1C723D7C-43D7-473F-B2E2-C44B4A9C816C@columbus.rr.com> On Mar 25, 2006, at 8:33 AM, Arthur wrote: > > >>> -----Original Message----- >>> From: Laura Creighton [mailto:lac at strakt.com] >>> Sent: Saturday, March 25, 2006 7:16 AM >>> To: Arthur > >>> Ok, so it does matter. Are you locking your complex number >>> before modifying it? > > Just to generalize the issue, so that I know, realy, what we are > talking > about, can we discuss my circle instead of my complex object. > > It has a center, a radius, and a matrix describing its orientation > in space. > I would like all to be in sync and recalculated, based on changes > to the > position of any other objects on which its center, its radius, or its > orientation in space is dependent, *before* it redraws itself. > > No I do not lock my circle. > > Art I think you are saying you don't quite understand when locks are needed. My apologies if this is not what you are saying, but here is a short explanation of when locks are needed. Whenever you have multiple threads that are using the same data structure you need a lock to ensure that only one thread is accessing it at a time. This is not an issue if none of the threads are modifying the object (which is the case with immutable objects since they cannot be modified). If at least one thread is modifying the object you need a lock around every access of the object otherwise you could have one thread start updating the object, be interrupted by the scheduler and another thread could then access the object that is now in an inconsistent state because the modification by the other thread had not completed. Consider two different threads both executing the code (with the same variables): y = x y = y + 1 x = y If one thread executes y = x and then is interrupted by the scheduler, and the other thread now executes all three statements, and then the first thread completes the final two statements, x is now just one more than it was before, even though both threads added one to it (i.e., it should be two more than it was). The solution to this each thread does: lock.acquire() y = x y = y + 1 x = y lock.release() This will not allow the second thread to start the code if the first thread has started it but not yet finished it. Again with immutable objects, this is not an issue. Also, as I understand it, Python's Queue class in the Queue module is thread safe (i.e., it essentially takes care of the locking for you). HTH, Dave From mtobis at gmail.com Sat Mar 25 16:21:03 2006 From: mtobis at gmail.com (Michael Tobis) Date: Sat, 25 Mar 2006 09:21:03 -0600 Subject: [Edu-sig] Properties use case In-Reply-To: <1C723D7C-43D7-473F-B2E2-C44B4A9C816C@columbus.rr.com> References: <000001c65010$b0a833f0$1702a8c0@BasementDell> <1C723D7C-43D7-473F-B2E2-C44B4A9C816C@columbus.rr.com> Message-ID: Arthur (addressing you directly) does your code use any threading library at all? Did you bring up concurrency at all? If not, what do you suppose these people are going on about? mt From chuck at freshsources.com Sat Mar 25 16:39:25 2006 From: chuck at freshsources.com (Chuck Allison) Date: Sat, 25 Mar 2006 08:39:25 -0700 Subject: [Edu-sig] Properties use case In-Reply-To: References: <000001c65010$b0a833f0$1702a8c0@BasementDell> <1C723D7C-43D7-473F-B2E2-C44B4A9C816C@columbus.rr.com> Message-ID: <59402908.20060325083925@freshsources.com> I think they are "going on" about a very fundamental CS issue: mutable objects are not thread-safe. If threads are not an issue, then this has all been hot air, but it came up, IIRC, because the discussion mentioned the "mutable vs. immutable" issue, and this always leads one to concurrency nowadays, since so many applications have some level of concurrency (we take it for granted in the apps we use - and more programmers will have to face concurrency issues as time goes on; as Herb Sutter says, "The Free Lunch is Over"). Immutable objects are inherently thread-safe, and mutable ones are not. That's the simple truth, so, if one asks what's the diff, there it is. I believe that summarizes the past few days of discussion to some degree. No amount of further discussion will change the facts. The point I tried to bring up a while back was that numeric types tend to be *value types*, and they also are traditionally immutable, even without considering thread-safety issues. There is room for debate there, and I think Arthur has brought up some good points. He may have good reason for not having his complex be a value type. I was just saying that this was a departure from the norm, but hey, that what norms are for :-). Saturday, March 25, 2006, 8:21:03 AM, you wrote: MT> Arthur (addressing you directly) does your code use any threading MT> library at all? MT> Did you bring up concurrency at all? MT> If not, what do you suppose these people are going on about? MT> mt MT> _______________________________________________ MT> Edu-sig mailing list MT> Edu-sig at python.org MT> http://mail.python.org/mailman/listinfo/edu-sig -- Best regards, Chuck From ajsiegel at optonline.net Sat Mar 25 16:43:26 2006 From: ajsiegel at optonline.net (Arthur) Date: Sat, 25 Mar 2006 10:43:26 -0500 Subject: [Edu-sig] Properties use case In-Reply-To: Message-ID: <000901c65022$dc5584a0$1702a8c0@BasementDell> > >-----Original Message----- > >From: edu-sig-bounces+ajsiegel=optonline.net at python.org > >[mailto:edu-sig-bounces+ajsiegel=optonline.net at python.org] > >On Behalf Of Michael Tobis > >Sent: Saturday, March 25, 2006 10:21 AM > >To: edu-sig at python.org > >Subject: Re: [Edu-sig] Properties use case > > > >Arthur (addressing you directly) does your code use any > >threading library at all? > > > >Did you bring up concurrency at all? > > > >If not, what do you suppose these people are going on about? I brought up threading and concurrency - and I think the record will bear me out - exactly to the same extent I brought up the question of the impact of my "cultural baggage" on my design decisions. Art From ajsiegel at optonline.net Sat Mar 25 17:11:21 2006 From: ajsiegel at optonline.net (Arthur) Date: Sat, 25 Mar 2006 11:11:21 -0500 Subject: [Edu-sig] FW: Properties use case Message-ID: <000001c65026$c1e1fc30$1702a8c0@BasementDell> My response to something Gr?goire sent me this off-list is below. My off-list response to him bounced. I see no reason why he would mind me posted it up so I take the liberty to do so. Apologies if Gr?goire feels otherwise. Not something I generally like to do, but see no reason in this case why he would be all sensitive to it. Art > >-----Original Message----- > >From: Arthur [mailto:ajsiegel at optonline.com] > >Sent: Saturday, March 25, 2006 10:29 AM > >To: 'Gr?goire Dooms'; 'Arthur' > >Subject: RE: [Edu-sig] Properties use case > > > > > > > >> >-----Original Message----- > >> >From: Gr?goire Dooms [mailto:dooms at info.ucl.ac.be] > >> >> > >> >What is the question you ask here ? Do you want a > >certification that > >> >you have done your PyGeo The Right Way (tm) ? > > > >No. I see no issues and have some confidence in my overall > >design. People with more depth on some of these issues than > >I seem to be concerned that I am overconfident. I am simply > >trying to understand better why. > > > >*I* raised none of these questions. I raised what I > >understood to be a very specific, and - yes - technical > >issue about Numeric's typing mechanism. *I think* that *if* > >Numeric were to accept my custom type as a pseudo-complex > >type rather than something as general as a Python object, > >and processed it *as if* it were equivalent to a Python > >complex primitive, no harm would come to the calculations > >being performed and my ideas for the design I am pursuing, > >and am generally comfortable with, would proceed in an > >optimal manner. I am not *sure* that this is true. But even > >that question is not the question I raised. I was simply > >hoping to get far enough to be able to get some sense of > >whether it is true. I would be curious to learn why it is > >not, if it is not. But have no way of learning that if it > >is not even implementable. > > > >My question whether was and is - Is anyone aware, or > >could imagine, a mechanism that would allow me to coerce > >Numeric to process my custom type as a complex primitive > >while maintaining object identity? > > > >I have taken the silence as a *no*, a not terribly > >surprising *no*, and have begun to think about the > >implications of that *no* on my overall thinking about my > >overall design. > > > >I take reasonability for my design, but feel it not > >responsible to look-the-other-way when folks more > >experienced than I seem to have reasons to doubt its > >integrity - from the little I have said about it. Doubts > >have been raised and I am not looking-other-other-way. > > > >> >How do you store the dependency graph ? Is it cycle free (a > >> >DAG) ? How do you decide which objects need to be > >repainted when an > >> >other object is changed ? What is the overall design of the > >> >application ? > > > >Other then not knowing what a DAG is, I feel that the other > >issues you raise are under control in some reasonable way. > >Part of the Fun (tm) of doing PyGeo has been not just to > >find my way to solutions - first I needed to find my way to > >the issues. Eventually the issues seem to identify > >themselves, and in general the one's you raise have done so. > > > >Nothing yet (before these discussions) raised to me the > >issue of the thread safety of my geometric objects. > >Therefore I have not considered it to be an issue. > > > >I call the style in which I have approached the development > >of PyGeo - tongue-in-cheek - Na?ve Programming. It's been a > >fascinating experience. > > > >But I am sincerely trying to inquire whether there could be > >something fundamental I have missed by this approach - only > >because the issue has been raised - presumably sincerely - > >by others. Perhaps it is so subtle as to be unidentifiable > >except under Extreme Circumstances (tm). Perhaps it doesn't exist. > > > >> >> No I do not lock my circle. > >> >> > >> >Do you use threads ? > > > >In one sense, and it depends. > > > >There is the *option* of running a TK control panel that > >provides functioning to control more aspects of the > >interactivity with the rendering window than can be > >controlled directly from the rendering window itself. These > >are more in the nature of changing some global settings > >on-the-fly, then they are about interactivity with the > >rendering and interactivity on a micro-second by > >micro-second basis - which, whether the control panel option > >is or is not selected - run together in one thread. In my > >conception of what is taking place, at least. > > > >Thanks for your interest in my question/dilemma. > > > >> >Best, > >> >-- > >> >Gr?goire > >> > > >> > From dooms at info.ucl.ac.be Sat Mar 25 17:29:40 2006 From: dooms at info.ucl.ac.be (=?ISO-8859-1?Q?Gr=E9goire_Dooms?=) Date: Sat, 25 Mar 2006 17:29:40 +0100 Subject: [Edu-sig] FW: Properties use case In-Reply-To: <000001c65026$c1e1fc30$1702a8c0@BasementDell> References: <000001c65026$c1e1fc30$1702a8c0@BasementDell> Message-ID: <44256FF4.3080104@info.ucl.ac.be> Arthur wrote: > My response to something Gr?goire sent me this off-list is below. My > off-list response to him bounced. I see no reason why he would mind me > posted it up so I take the liberty to do so. Apologies if Gr?goire feels > otherwise. Not something I generally like to do, but see no reason in this > case why he would be all sensitive to it. > > No problemo. I just forgot to cc the list. >>>>>> No I do not lock my circle. >>>>>> >>>>>> >>>>> Do you use threads ? >>>>> >>> In one sense, and it depends. >>> >>> There is the *option* of running a TK control panel that >>> provides functioning to control more aspects of the >>> interactivity with the rendering window than can be >>> controlled directly from the rendering window itself. >>> AFAIK, you won't have any problems as Tk is single threaded and explicitely forbids to call any Tk related function from an other thread. So unless you spawn an other thread yourself and make it interact in a non-atomic way with your objects you should be safe as the Tk mainloop will call your functions/methods in a sequential way. >>> Thanks for your interest in my question/dilemma. >>> You are welcome. -- Gregoire From radenski at chapman.edu Sun Mar 26 03:08:03 2006 From: radenski at chapman.edu (Atanas Radenski) Date: Sat, 25 Mar 2006 17:08:03 -0800 (PST) Subject: [Edu-sig] Python Workshop at Chapman University, Orange, CA, June 19-22, 2006 Message-ID: <4810.206.211.137.87.1143335283.squirrel@manitoba.chapman.edu> Dear edu-sig members, This email is to announce a summer workshop entitled "Python First: A Lab-Based Digital Introduction to Computer Science": http://www.chapman.edu/wcls/MathCS/sWorkshop/Python/default.asp This tuition-free workshop will be held on the Chapman University's campus in Orange, California, June 19-22 (Monday - Thursday). The workshop is intended for computer science educators who seek an alternative to either purely commercial languages, such as Java or C++, or educational languages, such as Scheme, for introductory computer science courses. The workshop will introduce participants to interactive program design with the Python programming language. Participants will also learn how to customize and manage a 'Python First' digital study pack. Daily activities will start with overview lectures and will continue with hands-on sessions in the computer lab. The summer workshop and all supporting materials are free. A nominal registration fee will cover meals and snacks. Transportation costs and lodging are the responsibility of the attendee. Please see: http://www.chapman.edu/wcls/MathCS/sWorkshop/Python/default.asp for complete details on the Python workshop and an on-line registration form. Or contact Dr. Arnold Shugarman (Shugarman at chapman.edu) for more information. Respectfully, Atanas Radenski mailto:radenski at chapman.edu http://www.chapman.edu/~radenski/ From ajsiegel at optonline.net Tue Mar 28 15:16:25 2006 From: ajsiegel at optonline.net (Arthur) Date: Tue, 28 Mar 2006 08:16:25 -0500 Subject: [Edu-sig] How to Think Like A Computer Scientist Message-ID: <000001c65269$d21baa70$1702a8c0@BasementDell> Ironically, apropos of the recent discussion How to Think Like A Computer Scientist - Java Version introduces the fundamental concepts of Object Oriented Programming by way of the creation of a mutable complex number. http://www.ibiblio.org/obp/thinkCSjav/chap13.htm FWIW. Art From kirby.urner at gmail.com Tue Mar 28 15:41:00 2006 From: kirby.urner at gmail.com (kirby urner) Date: Tue, 28 Mar 2006 05:41:00 -0800 Subject: [Edu-sig] How to Think Like A Computer Scientist In-Reply-To: <000001c65269$d21baa70$1702a8c0@BasementDell> References: <000001c65269$d21baa70$1702a8c0@BasementDell> Message-ID: Are you sure? public static Complex add (Complex a, Complex b) { return new Complex (a.real + b.real, a.imag + b.imag); } To invoke this method, we would pass both operands as arguments: Complex sum = add (x, y); Written as an object method, it would take only one argument, which it would add to the current object: public Complex add (Complex b) { return new Complex (real + b.real, imag + b.imag); } Looks immutable to me, i.e. we're not changing in place but returning a new complex. I guess you're referring to the fact that real and imag aren't private e.g.: Complex x = new Complex (); x.real = 1.0; x.imag = 2.0; Complex y = new Complex (3.0, 4.0); Yes, that's a change-in-place ability, true. Kirby On 3/28/06, Arthur wrote: > > Ironically, apropos of the recent discussion > > How to Think Like A Computer Scientist - Java Version > introduces the fundamental concepts of Object Oriented Programming by way of > the creation of a mutable complex number. > > http://www.ibiblio.org/obp/thinkCSjav/chap13.htm > > FWIW. > > Art > > > _______________________________________________ > Edu-sig mailing list > Edu-sig at python.org > http://mail.python.org/mailman/listinfo/edu-sig > From ajsiegel at optonline.net Tue Mar 28 16:12:22 2006 From: ajsiegel at optonline.net (Arthur) Date: Tue, 28 Mar 2006 09:12:22 -0500 Subject: [Edu-sig] How to Think Like A Computer Scientist In-Reply-To: Message-ID: <000001c65271$a2114260$1702a8c0@BasementDell> > >From: kirby urner [mailto:kirby.urner at gmail.com] > > > > Complex x = new Complex (); > > x.real = 1.0; > > x.imag = 2.0; > > Complex y = new Complex (3.0, 4.0); > > > >Yes, that's a change-in-place ability, true. > > > >Kirby And exactly what I need to have my Complexes do the PyGeo dance. Art From ajsiegel at optonline.net Tue Mar 28 16:51:05 2006 From: ajsiegel at optonline.net (Arthur) Date: Tue, 28 Mar 2006 09:51:05 -0500 Subject: [Edu-sig] How to Think Like A Computer Scientist In-Reply-To: <000001c65271$a2114260$1702a8c0@BasementDell> Message-ID: <000001c65277$0b9185b0$1702a8c0@BasementDell> > >-----Original Message----- > >From: Arthur [mailto:ajsiegel at optonline.net] > >Sent: Tuesday, March 28, 2006 9:12 AM > >To: 'kirby urner'; 'Arthur' > >Cc: edu-sig at python.org > >Subject: RE: [Edu-sig] How to Think Like A Computer Scientist > > > >> >From: kirby urner [mailto:kirby.urner at gmail.com] > >> > > >> > Complex x = new Complex (); > >> > x.real = 1.0; > >> > x.imag = 2.0; > >> > Complex y = new Complex (3.0, 4.0); > >> > > >> >Yes, that's a change-in-place ability, true. > >> > > >> >Kirby > > > >And exactly what I need to have my Complexes do the PyGeo dance. The developer of this math library for Eiffel includes both mutable and immutable complex number classes. http://www.eiffelzone.com/esd/mathw/index.html To what extent that reflects the approach taken in the book he references: Object-Oriented Implementation of Numerical Methods; ISBN: 1-55860-679-3. can't say. Art From kirby.urner at gmail.com Tue Mar 28 17:42:33 2006 From: kirby.urner at gmail.com (kirby urner) Date: Tue, 28 Mar 2006 07:42:33 -0800 Subject: [Edu-sig] How to Think Like A Computer Scientist In-Reply-To: <000001c65277$0b9185b0$1702a8c0@BasementDell> References: <000001c65271$a2114260$1702a8c0@BasementDell> <000001c65277$0b9185b0$1702a8c0@BasementDell> Message-ID: So we have different levels of mutability. A complex type which doesn't allow resassignment of real and imaginary parts might look like: Immutable: c = Complex(1,2) c = c.real(3) # assigning a new value c = c.imag(4) # yet another new value Mutable: c = Complex(1,2) c.real = 3 c.imag = 4 Even more mutable: c + c # changes c to 2c c**2 # 2nd power of c (changes c "in place") All are codable in Python of course. Of these three possibilities, my own bias is in favor of the least mutable (top example). Arthur is proposing first level mutability (2nd example). I doubt any of us like the 3rd level. Am I right? Note that Python's built-in complex number doesn't even allow the top example. Instead, one might go: Even more immutable: c = Complex(1,2) c = Complex(3, c.imag) # assigning a new value c = Complex(c.real, 4) # yet another new value So obviously there's a spectrum here. Python supports them all, with coding. Kirby From kirby.urner at gmail.com Tue Mar 28 17:42:33 2006 From: kirby.urner at gmail.com (kirby urner) Date: Tue, 28 Mar 2006 07:42:33 -0800 Subject: [Edu-sig] How to Think Like A Computer Scientist In-Reply-To: <000001c65277$0b9185b0$1702a8c0@BasementDell> References: <000001c65271$a2114260$1702a8c0@BasementDell> <000001c65277$0b9185b0$1702a8c0@BasementDell> Message-ID: So we have different levels of mutability. A complex type which doesn't allow resassignment of real and imaginary parts might look like: Immutable: c = Complex(1,2) c = c.real(3) # assigning a new value c = c.imag(4) # yet another new value Mutable: c = Complex(1,2) c.real = 3 c.imag = 4 Even more mutable: c + c # changes c to 2c c**2 # 2nd power of c (changes c "in place") All are codable in Python of course. Of these three possibilities, my own bias is in favor of the least mutable (top example). Arthur is proposing first level mutability (2nd example). I doubt any of us like the 3rd level. Am I right? Note that Python's built-in complex number doesn't even allow the top example. Instead, one might go: Even more immutable: c = Complex(1,2) c = Complex(3, c.imag) # assigning a new value c = Complex(c.real, 4) # yet another new value So obviously there's a spectrum here. Python supports them all, with coding. Kirby From john.zelle at wartburg.edu Tue Mar 28 17:50:21 2006 From: john.zelle at wartburg.edu (John Zelle) Date: Tue, 28 Mar 2006 09:50:21 -0600 Subject: [Edu-sig] How to Think Like A Computer Scientist In-Reply-To: References: <000001c65271$a2114260$1702a8c0@BasementDell> <000001c65277$0b9185b0$1702a8c0@BasementDell> Message-ID: <200603280950.21453.john.zelle@wartburg.edu> On Tuesday 28 March 2006 09:42, kirby urner wrote: > So we have different levels of mutability. A complex type which > doesn't allow resassignment of real and imaginary parts might look > like: > > Immutable: > > c = Complex(1,2) > c = c.real(3) # assigning a new value > c = c.imag(4) # yet another new value > Actually is a mutable version. Allowing the change to the components after creation makes it mutable. It does not matter if the change is through mutating methods or by direct attribute access. The point is that the object itself changes. If two variables reference the same object (or two threads manipulate it) they will both see the changes. An immutable complex would simply disallow changes. To "change" either component would require creation of a new object. > Mutable: > > c = Complex(1,2) > c.real = 3 > c.imag = 4 > > Even more mutable: > > c + c # changes c to 2c > c**2 # 2nd power of c (changes c "in place") > > All are codable in Python of course. Of these three possibilities, > my own bias is in favor of the least mutable (top example). Arthur is > proposing first level mutability (2nd example). I doubt any of us > like the 3rd level. Am I right? > > Note that Python's built-in complex number doesn't even allow the top > example. Instead, one might go: > > Even more immutable: > > c = Complex(1,2) > c = Complex(3, c.imag) # assigning a new value > c = Complex(c.real, 4) # yet another new value > > So obviously there's a spectrum here. Python supports them all, with > coding. > > Kirby > _______________________________________________ > Edu-sig mailing list > Edu-sig at python.org > http://mail.python.org/mailman/listinfo/edu-sig -- John M. Zelle, Ph.D. Wartburg College Professor of Computer Science Waverly, IA john.zelle at wartburg.edu (319) 352-8360 From ajsiegel at optonline.net Tue Mar 28 18:25:21 2006 From: ajsiegel at optonline.net (ajsiegel at optonline.net) Date: Tue, 28 Mar 2006 11:25:21 -0500 Subject: [Edu-sig] How to Think Like A Computer Scientist In-Reply-To: References: <000001c65271$a2114260$1702a8c0@BasementDell> <000001c65277$0b9185b0$1702a8c0@BasementDell> Message-ID: ----- Original Message ----- From: kirby urner > Arthur is > proposing first level mutability (2nd example). I doubt any of us > like the 3rd level. Am I right? I am not proposing anything. I am programming. > > So obviously there's a spectrum here. Python supports them all, > with coding. More generally, Python supports programmer freedomn, and accepts the cost of that freedom. If we don't exercise that freedom, Python - it seems to me - is a losing proposition. Art From kirby.urner at gmail.com Tue Mar 28 23:02:52 2006 From: kirby.urner at gmail.com (kirby urner) Date: Tue, 28 Mar 2006 13:02:52 -0800 Subject: [Edu-sig] How to Think Like A Computer Scientist In-Reply-To: <200603280950.21453.john.zelle@wartburg.edu> References: <000001c65271$a2114260$1702a8c0@BasementDell> <000001c65277$0b9185b0$1702a8c0@BasementDell> <200603280950.21453.john.zelle@wartburg.edu> Message-ID: On 3/28/06, John Zelle wrote: > On Tuesday 28 March 2006 09:42, kirby urner wrote: > > So we have different levels of mutability. A complex type which > > doesn't allow resassignment of real and imaginary parts might look > > like: > > > > Immutable: > > > > c = Complex(1,2) > > c = c.real(3) # assigning a new value > > c = c.imag(4) # yet another new value > > > > Actually is a mutable version. Allowing the change to the components after > creation makes it mutable. It does not matter if the change is through > mutating methods or by direct attribute access. The point is that the object > itself changes. If two variables reference the same object (or two threads > manipulate it) they will both see the changes. > > An immutable complex would simply disallow changes. To "change" either > component would require creation of a new object. But the above doesn't allow any change to a complex number. Rather, c.imag(3) outputs a new complex number, leaving c unchanged. Except I immediately reassign the new value to c. Something like: class Complex(object): def __init__(self, v, z): self.r = v self.i = z def imag(v): return Complex(self.r, v) def real(v): return Complex(v, self.i) # plus code to make i, r read-only. Just plain c.imag(3) would not change c, plus the returned value would be lost, given there's no assignment. Sorry if my example was unclear. Kirby From kirby.urner at gmail.com Tue Mar 28 23:04:57 2006 From: kirby.urner at gmail.com (kirby urner) Date: Tue, 28 Mar 2006 13:04:57 -0800 Subject: [Edu-sig] How to Think Like A Computer Scientist In-Reply-To: References: <000001c65271$a2114260$1702a8c0@BasementDell> <000001c65277$0b9185b0$1702a8c0@BasementDell> Message-ID: > More generally, Python supports programmer freedomn, and accepts the cost of that > freedom. If we don't exercise that freedom, Python - it seems to me - is a losing > proposition. > > Art Programmer freedom means more opportunities to shoot oneself in the foot with bad designs. Exercising freedom doesn't have to mean suspending one's judgment as to what's a pitfall. Kirby From ajsiegel at optonline.net Tue Mar 28 23:19:58 2006 From: ajsiegel at optonline.net (ajsiegel at optonline.net) Date: Tue, 28 Mar 2006 16:19:58 -0500 Subject: [Edu-sig] How to Think Like A Computer Scientist In-Reply-To: References: <000001c65271$a2114260$1702a8c0@BasementDell> <000001c65277$0b9185b0$1702a8c0@BasementDell> Message-ID: ----- Original Message ----- From: kirby urner > > More generally, Python supports programmer freedomn, and accepts > the cost of that > > freedom. If we don't exercise that freedom, Python - it seems to > me - is a losing > > proposition. > > > > Art > > Programmer freedom means more opportunities to shoot oneself in the > foot with bad designs. > > Exercising freedom doesn't have to mean suspending one's judgment as > to what's a pitfall. Hmmm? Didn't think of that. Thank you Mr. Urner. How my doing, Dethe? Art From ajsiegel at optonline.net Wed Mar 29 00:37:10 2006 From: ajsiegel at optonline.net (ajsiegel at optonline.net) Date: Tue, 28 Mar 2006 17:37:10 -0500 Subject: [Edu-sig] How to Think Like A Computer Scientist In-Reply-To: References: <000001c65271$a2114260$1702a8c0@BasementDell> <000001c65277$0b9185b0$1702a8c0@BasementDell> Message-ID: ----- Original Message ----- From: kirby urner > > Programmer freedom means more opportunities to shoot oneself in the > foot with bad designs. You certainly don't need to confront that issue in the typical Urner 10 line script. Though I am not sure I can imagine something worse than your @property laden triangle in so many lines. You might have more sympathy for what I am confronted with if you went a little further. Its that damn 11th line that's the killer. Sorry Dethe. Art From lac at strakt.com Wed Mar 29 15:02:10 2006 From: lac at strakt.com (Laura Creighton) Date: Wed, 29 Mar 2006 15:02:10 +0200 Subject: [Edu-sig] Maybe 'learn python with your kids' is an idea whose time has come? Message-ID: <200603291302.k2TD2ANV026035@theraft.strakt.com> We could do this for Europython. Do we want to? What would we teach, and what would we need? Laura ------- Forwarded Message Return-Path: marketing-python-bounces at wingware.com Delivery-Date: Wed Mar 29 14:41:01 2006 Return-Path: Received: from www.wingide.com (www.archaeopteryx.com [209.251.75.100]) Date: Tue, 28 Mar 2006 21:16:01 -0600 From: "Michael Tobis" To: marketing-python at wingware.com MIME-Version: 1.0 In response to a query from a father wanting joint programming tutorials with his son that appeared on the Chicago Python User Group (ChiPy; pronounced "chippie") mailing list, I volunteered to teach an introductory class in Python to all comers. I announced this on the ChiPy list and on the Linux Users of Northern Illinois (LUNI) list, and made no other effort to promote it. My colleague Andy Harrington, a professor at Loyola University of Chicago was able to arrange for a classroom for a Staurday afternoon. We met last weekend, and it went pretty well. In addition to another ChiPy volunteer, Robert Ramsdell, and Andy, over a dozen people showed up, three women, two fathers with young sons in tow, and about ten guys, all seriously motivated. After talking for too long, I walked them through some very simple exercises with the interactive prompt. We got as far as writing loops to draw a diamond figure in ASCII graphics. A few people managed to draw the whole kite figure which was my objective. You can see the slides I showed up with at http://webpages.luc.edu/~mt/pyfl/pyfl.html If I had it to do over, I'd just "dive in" (to coin a phrase) and skip the preamble, which I think was mostly a mistake. This was my first experience teaching complete beginners, and it will be helpful to me in preparation for my formally teaching an introductory CS course at Loyola this summer. I think most of the participants found it worthwhile as well. Probably the most interesting thing is we did almost zero promotion to fill the room. Just an announcement on the ChiPy list and an announcement on the Linux Users of Northern Illinois list. This leads me to suspect that you could pull this together in a smaller city, if you promoted it harder. There are people out there who want to learn Python. We should reach out to them. regards Michael Tobis _______________________________________________ marketing-python mailing list marketing-python at wingware.com http://wingware.com/mailman/listinfo/marketing-python ------- End of Forwarded Message From jan.ulrich at hasecke.com Wed Mar 29 15:22:12 2006 From: jan.ulrich at hasecke.com (Jan Ulrich Hasecke) Date: Wed, 29 Mar 2006 15:22:12 +0200 Subject: [Edu-sig] Maybe 'learn python with your kids' is an idea whose time has come? In-Reply-To: <200603291302.k2TD2ANV026035@theraft.strakt.com> References: <200603291302.k2TD2ANV026035@theraft.strakt.com> Message-ID: <65868EFD-D178-45B5-8F10-D6416CD11507@hasecke.com> Am 29.03.2006 um 15:02 schrieb Laura Creighton: > > We could do this for Europython. Do we want to? What would we > teach, and what would we need? > > > I volunteered to teach an > introductory class in Python to all comers. > > I announced this on the ChiPy list and on the Linux Users of Northern > Illinois (LUNI) list, and made no other effort to promote it. I think that this experience is very promising. I think that announcing introductory classes will motivate some more parents to come with their kids. But I am sure that these kids will have very different skills, so do we need different levels? 1. What is python? Short introduction into the very basics 2. Advanced beginner course 3. Open Workshops: everybody can come and ask questions juh From lac at strakt.com Wed Mar 29 22:34:03 2006 From: lac at strakt.com (Laura Creighton) Date: Wed, 29 Mar 2006 22:34:03 +0200 Subject: [Edu-sig] Want to improve the python tutorial? Message-ID: <200603292034.k2TKY3Eq019572@theraft.strakt.com> >From doc-sig. Thank you Fredrik. Laura ------- Forwarded Message Return-Path: doc-sig-bounces at python.org Delivery-Date: Wed Mar 29 21:58:11 2006 From: "Fredrik Lundh" Date: Wed, 29 Mar 2006 21:56:57 +0200 Lines: 13 Message-ID: Subject: [Doc-SIG] introducing the experimental pytut wiki without further ado, here's http://pytut.infogami.com/ inspired by http://article.gmane.org/gmane.comp.python.general/455724 and related to several earlier threads on this mailing list. _______________________________________________ Doc-SIG maillist - Doc-SIG at python.org http://mail.python.org/mailman/listinfo/doc-sig ------- End of Forwarded Message From jonah at ccnmtl.columbia.edu Fri Mar 31 08:44:48 2006 From: jonah at ccnmtl.columbia.edu (Jonah Bossewitch) Date: Fri, 31 Mar 2006 01:44:48 -0500 Subject: [Edu-sig] Rapunsel, Rapunsel In-Reply-To: References: Message-ID: <442CCFE0.3040908@ccnmtl.columbia.edu> Does this group know about this project? http://maryflanagan.com/rapunsel/index.htm I saw Mary talk today and her work is quite impressive. It's still being researched... wouldn't it be wonderful if they moved away from java and towards a more youthful, dynamic, vibrant, language... /jsb From ajsiegel at optonline.net Fri Mar 31 16:49:35 2006 From: ajsiegel at optonline.net (Arthur) Date: Fri, 31 Mar 2006 09:49:35 -0500 Subject: [Edu-sig] Rapunsel, Rapunsel In-Reply-To: <442CCFE0.3040908@ccnmtl.columbia.edu> Message-ID: <000301c654d2$5411b5f0$1702a8c0@BasementDell> > >-----Original Message----- > >From: edu-sig-bounces at python.org > >[mailto:edu-sig-bounces at python.org] On Behalf Of Jonah Bossewitch > >Sent: Friday, March 31, 2006 1:45 AM > >To: edu-sig at python.org > >Subject: [Edu-sig] Rapunsel, Rapunsel > > > >Does this group know about this project? > > > >http://maryflanagan.com/rapunsel/index.htm Or this project? http://weblogs.media.mit.edu/llk/scratch/ > > > >I saw Mary talk today and her work is quite impressive. > >It's still being researched... It is difficult - *for me* - to understand what "researched" means in the context a project whose goals are stated in the form of a Manifesto. Give me an old fashioned unfunded manifesto, like Breton's http://www.tcf.ua.edu/courses/Jbutler/T340/SurManifesto/ManifestoOfSurrealis m.htm >> wouldn't it be wonderful if > >they moved away from java and towards a more youthful, > >dynamic, vibrant, language... When one abstracts "programming" as far from the particulars of any real programming language as - I suspect - a project like Rapunsel does - then implementation language does not seem to have much significance. Isn't this one of Pausch's lessons from Alice? Much of the outcome of the research - it seems to me - depends on issues of semantics. What is programming - for example. Which - BTW - is *not* a discussion I am hoping to have here. Personally, I don't think Python *is* in the Alice, Scratch, Rapunsel space or *belongs* in that space or is competitive in that space. Which happens to be more than fine with me. Art