From urnerk at qwest.net Wed Dec 1 19:39:52 2004 From: urnerk at qwest.net (Kirby Urner) Date: Wed Dec 1 20:06:22 2004 Subject: [Edu-sig] Urner's 2004 grant proposal to the PSF In-Reply-To: <41AC2663.EFBEE58A@execpc.com> Message-ID: <20041201190621.669B21E4006@bag.python.org> According to Martin v. L?wis, the PSF has rejected the appended grant proposal, although he hasn't yet had time to send a formal rejection with a detailed explanation. It at least made it past the first coupla rounds -- I like to think I was a semi-finalist. Anyway, I'm archiving it here on edu-sig (seems like a good place for it). I may shop it around (a modified version). Just today, I re-upped with Saturday Academy to do the math through Python course again in the spring. Kirby ================== Grant Proposal Submitted to: the Python Software Foundation by: Kirby Urner, urnerk@qwest.net Date: Sept 14, 2004 OVERVIEW I am requesting financial assistance to author curriculum materials focusing on Python applied within the knowledge domain of pre-college and college mathematics. The purpose of such a curriculum is to teach Python and mathematics in tandem, on the theory that the best way to learn a computer language is by applying it to some knowledge domain. Mastery within the target domain is not required in advance; learning Python actually helps make the topics and concepts more accessible. In short, tackling Python and mathematics together begets valuable positive synergies. The requested funds will give me more time to focus on curriculum writing instead of on the various consulting jobs I would ordinarily perform during the same time. BACKGROUND I have a long-standing interest in this application of Python, drawing inspiration from parallel applications of ISETL and J/APL. Recently, I have secured a part time teaching position. My class is offered through Saturday Academy, an educational non-profit affiliated with Portland State University. These 3 hours in the classroom on Saturdays will enable me to test and refine my materials in the field. My students will be of high school age. However, the position does not cover any time for curriculum development. AMOUNT REQUESTED, TIME TABLE The course begins in January 2005 and if successful will be offered again in the next semester. With $1000/mo for six months, starting in November of 2004, I would be able to focus considerably more energy on generating, field testing, and polishing the proposed curriculum materials. Such financial support would carry me over the threshold of producing ad hoc materials, and allow me to organize them into a more coherent and integrated curriculum, i.e. as chapters in a book. My goal is to set aside an average of about 10 hours per week for this work during these months, which translates to about 40 hrs/mo at an effective rate of about $25/hr. DELIVERABLES My goal would be to develop my materials in DocBook XML, using either CVS or Subversion to archive updates, thereby facilitating easy conversion to XHTML and PDF formats. From my consulting work, I already have some experience with the relevant tools. These materials would be distributed under the GPL or some Creative Commons license that made them amenable to future improvements and enhancements by others as well as myself. Distribution would be free over the Internet. Saturday Academy has already agreed in principle to my using Creative Commons or GPL materials in my classes for them, an arrangement we developed when I co-taught Adventures in Open Source Programming this June. I would adopt the book format and publish new chapters approximately biweekly. The XHTML version (generated from docbook source) would go to the website. Feedback from the Python community (e.g. from edu-sig), as well as from classroom students, will help me improve the content through several versions. The project might eventually materialize as a published book, as happened with Dive Into Python (Apress). But whether this occurs or not, a significant amount of material will be available for free on the web (the Creative Commons license would persist even in the event of publication). RATIONALE Whereas lots of math-related Python programming has been contributed by the community, to the Vaults of Parnassus for example (including some of it by me), what's lacking is much engaging writing connecting it all together, with concepts developed in sequence, and in relationship to each other. The mathematical modules currently available assume knowledge of Python and do not have it as their goal to build up familiarity with Python's capabilities in any step-by-step fashion, as would a tutorial. No book currently on the market fills this niche when it comes to the Python language. Some form of mathematics remains a required subject in most liberal arts curricula, and is of intrinsic interest to people of all ages in many walks of life. In focusing on generic math concepts common to many disciplines, my intent is to engage readers outside of the traditional computer science field. Such curriculum writing would not be redundant with Dr. John Zelle's excellent 'Python Programming: An Introduction to Computer Science' for example. TOPICS WILL INCLUDE... sequences and series, including use of Python generators using Python to parse geometry-related files (e.g. polyhedra) output of Polyhedra for rendering in POV-Ray, VRML and via VPython prime and composite numbers (Python's long integers are especially handy in this context) explorations of number theoretic concepts including the mechanics of RSA public key encryption. using operator overloading to study group theoretic properties of finite sets, e.g. adding and/or multiplying integers modulo N. vector mathematics, including some information about quaternions (used in game packages as well as in serious scientific applications) information on wxPython, VPython, Tkinter, PIL, PyGame and various plotting (graphing) tools I've selected the above Python add-ons for their relevance to working with graphics. SVG would be another option. In all cases, I will be focusing on free and open source tools available for download over the Internet. As suggested by my mention of RSA, my intent will be to draw connections to real world applications of the concepts under discussion, so that readers develop confidence that their time spent learning mathematics and Python through my writings is of direct relevance to the working world. On the other hand, I will not dogmatically eschew investigations that simply have an aesthetic goal. Getting a rhombic triacontahedron to rotate on screen, perhaps using Vpython's stereographic feature, is an end in itself (this went over well as a part of my talk at OSCON in 2004). My emphasis will be on relatively short programs (some will be only a few lines), *not* on developing full scale GUI driven applications, running to thousands of lines of code. All source will be available in an easily downloadable form and will avoid making use of operating-system specific features. BIOGRAPHICAL Although I am not a professional mathematician, I have taught mathematics professionally through high school level calculus. I have learned a lot more mathematics since then (and continue to learn more to this day). I've collaborated on math-related projects for several years, including assisting with a newfangled coordinate system (quadray coordinates). Some of this work was published in FoxPro Advisor (because at that time, I was using Microsoft FoxPro instead of Python). I've presented publicly on math topics, including a lecture on fractals as an introduction to a talk by Dr. Mandelbrot himself (c/o Institute for Science, Engineering and Public Policy, a Portland-based institution with which I continue to be affiliated). My background is in Philosophy (B.A. Princeton University, 1980) and my thinking about geometry is influenced by the writings of R. Buckminster Fuller, inventor of the geodesic dome. I built one of the first and most comprehensive web sites regarding his philosophy. My output over the years, in the form of essays, postings to edu-sig@python.org and so on, demonstrate my capacity to author these kinds of materials. However, not being an academic, I've had limited time to focus on a project that would integrate these threads and make them accessible in any logically connected way. As a professional programmer of over 15 years experience (using Python and other languages), I am also qualified to write with an eye towards the "real world" of programming. In sum, I think my experience highly qualifies me to engage in this kind of hybrid or cross-disciplinary curriculum writing. I was also a contributing editor for McGraw-Hill in the text book publishing department (computer literacy texts in particular). This was back in the days when only Logo and BASIC were taught as an adjunct to mathematics. Today, I sense even *less* cross-fertilization of programming with mathematics in the pre-college curriculum, primarily because math teachers are confused by the number of languages and their relative complexity. Showing them Python's capabilities, including its interactive shell, will be an eye-opener to many of them. I would of course be happy to provide additional information and/or references upon request. Relevant Link: I've collected a lot of my little math/programming essays over the years at this web page: http://www.4dsolutions.net/ocn/cp4e.html Kirby Urner 3745 SE Harrison St. Portland, Oregon 97214 USA Voice 503 232 7159 Fax 503 231 1045 Email addresses: urnerk@qwest.net urner@alumni.princeton.edu kirby@4dsolutions.net From carle at hamlin.org Thu Dec 2 18:01:49 2004 From: carle at hamlin.org (Andrew Carle) Date: Thu Dec 2 19:01:12 2004 Subject: [Edu-sig] teaching Python In-Reply-To: <41A4A0AD.1080606@wartburg.edu> References: <0I7N00I2AWSZ8I@mta3.srv.hcvlny.cv.net> <41A4A0AD.1080606@wartburg.edu> Message-ID: While we're on the subject of very young students, I thought I should stick my head up and mention that I'm using Zelle's text as the basis for a class of 7th grade girls. I teach at the Hamlin School in San Francisco and, while the girls never actually see the Zelle text, I've used it to structure and scaffold my work with them. The class also uses a specialized language for text adventure games (TADS2), but I've really enjoyed having Python around to teach the computing concepts in a syntax-light environment. Andrew Carle MS Technology The Hamlin School From jpsandys at yahoo.com Thu Dec 2 22:05:16 2004 From: jpsandys at yahoo.com (Jeff Sandys) Date: Thu Dec 2 22:05:19 2004 Subject: [Edu-sig] (no subject) Message-ID: <20041202210516.13016.qmail@web51610.mail.yahoo.com> Andrew Carle wrote: ... The class also uses a specialized language for text adventure games (TADS2), ... Have you looked at PAWS, Python Adventure Writing System? The adventure is written in Python. The adventure author imports PAWS then makes instances of rooms, things, paths and some overhead objects (where to start). Then the PAWS interpreter imports the python game and runs the text interface. The only drawback is the code hasn't been updated in two years, but the sample games make great 'go-bys'. http://members.nuvox.net/~zt.wolf/PAWS.htm Thanks, Jeff Sandys __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From urnerk at qwest.net Thu Dec 2 22:13:48 2004 From: urnerk at qwest.net (Kirby Urner) Date: Thu Dec 2 22:13:48 2004 Subject: [Edu-sig] teaching Python In-Reply-To: Message-ID: <20041202211347.9FF451E4006@bag.python.org> > While we're on the subject of very young students, I thought I should > stick my head up and mention that I'm using Zelle's text as the basis for > a class of 7th grade girls. > Andrew Carle > MS Technology > The Hamlin School Sounds like a fun class. I'm having trouble keeping up with the 8th grader I'm mentoring. We started with the calendar cgi, then he got into Apache more heavily, including mod_rewrite and mod_python. Another goal was to implement a blog for his teacher, so I recommended Pybloxsom. Before long, he was installing plugins, including a WYSIWYG posting interface. His latest foray was into xml.sax, using Python's sax parser to reorganize his buddy list on gaim. I was able to assist, but had to go to the docs quite a bit. On another front, I've been mentoring a much older guy (70s?) in New Zealand (flies his own plane, takes gorgeous pictures of Middle Earth). His background is Pascal and his questions about Python are more basic and easier for me to answer (nothing about mod_python or xml.sax). You can visit his site, and see some mention of me here: http://www.geokem.com/background.html (scroll down to Programming Languages for Geochemical Applications). I notice he calls me 'Dr. Kirby Urner' which is only correct if you buy that the Fuller School (which has an uphill battle getting any of its syllabus accepted in universities) is authorized to hand out doctor of philosophy degrees. This isn't a discussion I've had with Bernie -- he probably just surmised the Dr. cuz I'm such a geek. Kirby PS: added a couple threads re my Geek Channel idea http://worldgame.blogspot.com/2004/11/geek-channel.html (scroll down to 'Follow-up Threads' -- hit reload if they don't appear). From cben at users.sf.net Fri Dec 3 11:43:03 2004 From: cben at users.sf.net (Beni Cherniavsky) Date: Fri Dec 3 11:43:20 2004 Subject: [Edu-sig] Re: A better way? In-Reply-To: <20041122.144704.6458.109098@webmail22.nyc.untd.com> References: <20041122.144704.6458.109098@webmail22.nyc.untd.com> Message-ID: <41B04337.8080802@users.sf.net> Jeff Sandys wrote: > I showed this thread at the SeaPIG meeting and we > talked about handling attributes. I pointed out > that the dot is an operator and that you can have > a space between the dot, and the group didn't > believe me until they tried it. > >>>>s = "my string" >>>>s . split() > > ['my', 'string'] > > I think by showing the students that dot is an > operator helps them understand what is going on > and they might not be so concerned about making > the long variable and method dotted chains. > It's important that they realize that the dot is not a pure operator as the rest of Pythons operators: the thing on its right side is not an arbitrary expression but an identifier. So you can't do ``foo . (bar + baz)`` the way you can do ``foo * (bar + baz)``. Showing the equivallence to `getattr()` is a nice way to demonstarte the fact the right argument is not an expression evaluated in the current environment but actually just a string. -- Beni Cherniavsky , who can only read email on weekends. From jmillr at umich.edu Fri Dec 3 19:23:52 2004 From: jmillr at umich.edu (John Miller) Date: Fri Dec 3 19:23:55 2004 Subject: [Edu-sig] math fiction In-Reply-To: <20041203110004.03CED1E400E@bag.python.org> References: <20041203110004.03CED1E400E@bag.python.org> Message-ID: <7BF73466-4558-11D9-8A48-000A95B5BA08@umich.edu> I received this from the current issue of the Scout Report: http://scout.wisc.edu/Reports/ScoutReport/2004/scout-041203.php I know that there are a number of subscribers who are interested in using Python to teach Math, and I thought that this site might suggest an interdisciplinary approach. Perhaps these snippets could pique students' interest in math topics being presented. Anyway, it looks interesting... John Miller > 9. Mathematical Fiction > http://math.cofc.edu/faculty/kasman/MATHFICT/default.html > > Alex Kasman, Associate Professor in the College of Charleston > Department of > Mathematics, has compiled this list of Mathematical Fiction. The books > and > stories listed here may be of interest to teachers or anyone wanting > to read > about mathematics from a literary perspective. The collection is > organized > so that visitors can browse by medium (which includes 22 entries that > are > categorized as "Available Free Online"), genre, motif, or topic. Some > motifs > include Evil Mathematicians, Female Mathematicians, Insanity, Math as > Beautiful/Exciting/Useful, and Math as Cold/Dry/Useless. Some examples > of > topics listed include Algebra/Arithmetic/Number Theory, Mathematical > Physics, and Probability/Statistics. The category with by far the most > entries is Science Fiction with Not Science-Fiction, Fantasy or Horror > coming in at a close second. Visitors can also search the entire > database, > view entries by Title or Author or Year, or check out the 30 most > recently > added or modified entries. Each entry is followed by a sentence or two > describing the article or book and some include a website link to the > article or to Amazon.com for ordering information. Proceeds from sales > made > through the website go to the College of Charleston Department of > Mathematics. [VF] This site is also reviewed in the December 3, > 2004_NSDL > MET Report_. [VF] From urnerk at qwest.net Fri Dec 3 22:05:15 2004 From: urnerk at qwest.net (Kirby Urner) Date: Fri Dec 3 22:05:16 2004 Subject: [Edu-sig] math fiction In-Reply-To: <7BF73466-4558-11D9-8A48-000A95B5BA08@umich.edu> Message-ID: <20041203210516.08A141E4009@bag.python.org> > I know that there are a number of subscribers who are interested in > using Python to teach Math, and I thought that this site might suggest > an interdisciplinary approach. Perhaps these snippets could pique > students' interest in math topics being presented. Anyway, it looks > interesting... > > John Miller > Thanks for the link John. I just went to the site and looked up Cryptonomicon as a test. The site passed with flying colors: http://math.cofc.edu/faculty/kasman/MATHFICT/mfview.php?callnumber=mf61 Kirby From carle at hamlin.org Fri Dec 3 22:26:53 2004 From: carle at hamlin.org (Andrew Carle) Date: Fri Dec 3 23:26:27 2004 Subject: [Edu-sig] math fiction In-Reply-To: <20041203210516.08A141E4009@bag.python.org> References: <20041203210516.08A141E4009@bag.python.org> Message-ID: Although they need to catch up with Confusion and System of the World. :) "Kirby Urner" writes: >http://math.cofc.edu/faculty/kasman/MATHFICT/mfview.php?callnumber=mf61 Andrew Carle MS Technology The Hamlin School From glingl at aon.at Fri Dec 3 23:49:26 2004 From: glingl at aon.at (Gregor Lingl) Date: Fri Dec 3 23:49:07 2004 Subject: [Edu-sig] math fiction In-Reply-To: <20041203210516.08A141E4009@bag.python.org> References: <20041203210516.08A141E4009@bag.python.org> Message-ID: <41B0ED76.4050507@aon.at> Kirby Urner schrieb: > ... > > I just went to the site and looked up >Cryptonomicon as a test. The site passed with flying colors: >http://math.cofc.edu/faculty/kasman/MATHFICT/mfview.php?callnumber=mf61 > > > So it did with Mark Haddons "A curious incident of the Dog in the Night-time" http://math.cofc.edu/faculty/kasman/MATHFICT/mfview.php?callnumber=mf383 a *very rewarding* reading, which we did with a class in a common project of English- math- physics and cs teachers (in an Austrian highschool). Gregor >Kirby > > >_______________________________________________ >Edu-sig mailing list >Edu-sig@python.org >http://mail.python.org/mailman/listinfo/edu-sig > > > > From sandysj at juno.com Sat Dec 4 02:46:38 2004 From: sandysj at juno.com (Jeff Sandys) Date: Sat Dec 4 02:48:21 2004 Subject: [Edu-sig] Re: A better way? Message-ID: <20041203.174649.4468.49289@webmail13.nyc.untd.com> -- Beni Cherniavsky wrote: Jeff Sandys wrote: > I showed this thread at the SeaPIG meeting and we > talked about handling attributes. I pointed out > that the dot is an operator and that you can have > a space between the dot, and the group didn't > believe me until they tried it. > >>>>s = "my string" >>>>s . split() > > ['my', 'string'] > > I think by showing the students that dot is an > operator helps them understand what is going on > and they might not be so concerned about making > the long variable and method dotted chains. > It's important that they realize that the dot is not a pure operator as the rest of Pythons operators: the thing on its right side is not an arbitrary expression but an identifier. So you can't do ``foo . (bar + baz)`` the way you can do ``foo * (bar + baz)``. Showing the equivallence to `getattr()` is a nice way to demonstarte the fact the right argument is not an expression evaluated in the current environment but actually just a string. -- Beni Cherniavsky , who can only read email on weekends. There you go making dot (.) a special operator. ;-> It is no more special than plus (+), star (*), or percent (%). As you said objects need to have a __getattr__ method for dot to work just as they need __add__ method for plus to work, __mul__ method for star to work and __mod__ method for percent to work. Both numbers and strings have all three methods. The thing on the left or right is never an arbitrary expression, it is an object that might have the corresponding method for the given operator. >>> a = 5 >>> a . __mod__(2) 1 >>> b = "aaa %s ccc" >>> b . __mod__("bbb") 'aaa bbb ccc' I saw where this company, LiveLogix, has an extention of Python that added a "defop" function, that is kind of like a macro pattern language, that allows you to define infix operations. http://logix.livelogix.com/intro.html Thanks, Jeff Sandys ________________________________________________________________ Juno Gift Certificates Give the gift of Internet access this holiday season. http://www.juno.com/give From urnerk at qwest.net Sat Dec 4 07:31:32 2004 From: urnerk at qwest.net (Kirby Urner) Date: Sat Dec 4 07:31:36 2004 Subject: [Edu-sig] today's mentoring In-Reply-To: <20041203.174649.4468.49289@webmail13.nyc.untd.com> Message-ID: <20041204063134.21A8B1E400A@bag.python.org> This isn't strictly about Python, but I went to my daughter's school today, to be a resource person in the computer lab. This one lad (who might be want to learn some Python eventually) showed me how he'd been able to make his borrowed ThinkPad work as an ssh server and a telnet server (he's installed Mandrake 10 on it several times). He'd installed Putty on a Windows 2000 box, and since both the laptop and Windows box had IP numbers from the same school subnet, he was able to ifconfig on Linux, and enter the IP number into putty -- and log into his Linux laptop from Windows, using either ssh or telnet. That pleased him. I just watched, didn't help at all. His parents don't know this stuff. This is a 3rd grader -- 8 years old. Kirby From marilyn at deliberate.com Sat Dec 4 07:45:59 2004 From: marilyn at deliberate.com (Marilyn Davis) Date: Sat Dec 4 08:05:11 2004 Subject: [Edu-sig] Thoughts? Message-ID: http://story.news.yahoo.com/news?tmpl=story&ncid=742&e=1&u=/usatoday/20041203/cm_usatoday/paycloserattentionboysarestrugglingacademically struggling academically Fri Dec 3, 6:17 AM ET Op/Ed - USATODAY.com Girls are taking the nation's colleges by storm. They're streaming to campuses in greater numbers, earning better grades and graduating more often. The same phenomenal success shows in high schools, where girls dominate honor rolls, hold more student government spots and rake in most of the academic awards. So says a just-released report from the U.S. Department of Education (news - web sites). Impressive. But the real news is tucked into the deeper, darker corners of the report. Boys are doing miserably, and nobody knows quite why. On measures ranging from writing ability to the likelihood of needing special education, boys are flat-lining - or worse. The phenomenon is most serious in inner cities, but it's evident in even the wealthiest school districts. And it's not confined to the United States. The same trend is turning up throughout the industrialized world. The impact could hardly be overstated. College-educated people earn twice as much as high school graduates. If boys can't get to the good-jobs starting line, which these days is a bachelor's degree, they won't get a chance to use their natural competitive skills in the marketplace. And when fewer men earn college degrees there are fewer partners whom educated women find desirable to marry. That's a debilitating social phenomenon African-American women have struggled with for years. The problem has already grown so severe that three out of every four private colleges (an informal estimate from admissions directors) quietly practice affirmative action for boys, favoring them over girls in admissions to get near balance. Yet for most educators - from kindergarten on up - the problem is invisible. Any teacher looking for national research that might define classroom solutions won't find any. They don't exist. The small group of experts who research the problem only now is beginning to trace its outlines. It isn't so much that schools have changed in ways that hurt boys. It's that society has changed in ways that help girls. Increasingly, success requires verbal skills, which everyone agrees come more naturally to girls. Industrial-age jobs that required minimal verbal skills are disappearing, replaced by information-age jobs that range from filing insurance claims to law. Even in technical fields, verbal skills are at a premium. An auto mechanic or TV repairman now needs to master complex technical manuals. School reformers eventually spotted the need and reacted strongly, setting standards and writing tests that demand verbal skills. The SAT and ACT required for college applicants, for instance, now have an essay component. This puts boys at a huge handicap, and schools haven't begun to adapt. One hint of the inadequacy can be found in research done by Michael Gurian, author of Boys and Girls Learn Differently. He surveyed the course offerings of schools of education throughout the country. His discovery: 99% of universities and teacher colleges do not offer a course on the biological differences between how girls and boys learn. So teachers enter classrooms unprepared to turn boys into successful readers. Other factors also come quickly into play, setting off a downward spiral that looks something like this: At home, dads read to their daughters and throw footballs to their sons. In elementary school overwhelmingly female teaching staffs naturally teach in ways that connect better with girls. Fidgety boys are quickly defined as suffering from reading disabilities. In middle school, teachers - still unattuned to the boys' disadvantages - take no action to correct swelling reading gaps. That brings boys to the pivotal ninth grade, the first year when they run up against the heavily verbal, college-track curriculum that school reforms demand of most schools. And the boys flounder. The trend holds through the remaining school years: Girls shine; boys fade. Some responses suggested by researchers appear easy. Assign boys books that they find more appealing, for example. And bring them along gradually, so they don't quit. But in the end, the problem runs much deeper. It surely won't be fixed until educators first come to see that it exists. From cben at users.sf.net Sat Dec 4 20:03:51 2004 From: cben at users.sf.net (Beni Cherniavsky) Date: Sat Dec 4 20:03:56 2004 Subject: [Edu-sig] Re: A better way? In-Reply-To: <20041203.174649.4468.49289@webmail13.nyc.untd.com> References: <20041203.174649.4468.49289@webmail13.nyc.untd.com> Message-ID: <41B20A17.6020209@users.sf.net> Jeff Sandys wrote: > -- Beni Cherniavsky wrote: > >> It's important that they realize that the dot is not a >> pure operator as the rest of Pythons operators: the thing >> on its right side is not an arbitrary expression but an >> identifier. So you can't do ``foo . (bar + baz)`` the way >> you can do ``foo * (bar + baz)``. Showing the equivallence >> to `getattr()` is a nice way to demonstarte the fact the >> right argument is not an expression evaluated in the current environment but actually just a string. >> > There you go making dot (.) a special operator. ;-> > It is no more special than plus (+), star (*), or > percent (%). As you said objects need to have a __getattr__ > method for dot to work just as they need __add__ method for > plus to work, __mul__ method for star to work and __mod__ > method for percent to work. Both numbers and strings have > all three methods. The thing on the left or right is never > an arbitrary expression, it is an object that might have > the corresponding method for the given operator. Sure, at run-time a __getattr__ call is just like any other magic method. What I meant that the dot is a bit special *syntactically*. The thing on the left of the dot can be any expression. Its value should be an object with the expected attribute or you would get an exception but syntactically it can be any expression whatsoever. However, syntactically, the thing on the right of the dot is special: it's not an expression at all. As I said, you can't do ``foo.(bar+baz)`` - it's a syntax error. It's an identifier which is taken as a string, not evaluated in the current environment. ``foo.bar`` is not not related to the variable `bar` in the current environment in any way. ``foo+bar`` is. -- Beni Cherniavsky , who can only read email on weekends. From ajsiegel at optonline.net Sun Dec 5 13:01:42 2004 From: ajsiegel at optonline.net (ajsiegel@optonline.net) Date: Sun Dec 5 13:16:47 2004 Subject: [Edu-sig] Thoughts? Message-ID: From: Marilyn Davis Date: Saturday, December 4, 2004 1:45 am Subject: [Edu-sig] Thoughts? > > http://story.news.yahoo.com/news?tmpl=story&ncid=742&e=1&u=/usatoday/20041203/cm_usatoday/paycloserattentionboysarestrugglingacademically > My thoughts? I would like to use the information - if nothing else - to quiet talk of manipulating programming/math educational curricula to better appeal to women/girls. Those kinds of efforts and that kind of thinking was yesterday's academic flavor of month, and at least partly responsible - in my mind - for the statistics you cite. That being another thought - my objection to the article is only to the extent it gives credit to the "report" and the "small group of experts". Other reports and other small groups of experts had formally concluded much about the male-dominated nature of the curricula and the vital need for reform on this score. Why to someone like myself, without an agenda, was it clear that this agenda was overstated, and likely to lead to more "injustice" than it corrected. This *is* political. And the antidote is unfortunately too simple to be taken seriously. To trust more our senses (I think we have more than 5 of them). And trust less the small group of experts. Another thought is more controversial and more dire - that the "girl" friendly curricula to which we have evolved is a seriously inadequate curriculum on the merits, irrespective of the issue of the gender to which it better appeals. But it will take many years to reverse and correct where good intentions and the experts have brought us. Art > struggling academically > > Fri Dec 3, 6:17 AM ET > > Op/Ed - USATODAY.com > > Girls are taking the nation's colleges by storm. > They're streaming to campuses in greater numbers, > earning better grades and graduating more often. The > same phenomenal success shows in high schools, where > girls dominate honor rolls, hold more student > government spots and rake in most of the academic > awards. > > So says a just-released report from the U.S. > Department of Education (news - web sites). > > Impressive. But the real news is tucked into the > deeper, darker corners of the report. Boys are doing > miserably, and nobody knows quite why. On measures > ranging from writing ability to the likelihood of > needing special education, boys are flat-lining - or > worse. > > The phenomenon is most serious in inner cities, but > it's evident in even the wealthiest school districts. > And it's not confined to the United States. The same > trend is turning up throughout the industrialized > world. > > The impact could hardly be overstated. > College-educated people earn twice as much as high > school graduates. If boys can't get to the good-jobs > starting line, which these days is a bachelor's > degree, they won't get a chance to use their natural > competitive skills in the marketplace. > > And when fewer men earn college degrees there are > fewer partners whom educated women find desirable to > marry. That's a debilitating social phenomenon > African-American women have struggled with for years. > > The problem has already grown so severe that three out > of every four private colleges (an informal estimate > from admissions directors) quietly practice > affirmative action for boys, favoring them over girls > in admissions to get near balance. > > Yet for most educators - from kindergarten on up - the > problem is invisible. Any teacher looking for national > research that might define classroom solutions won't > find any. They don't exist. > > The small group of experts who research the problem > only now is beginning to trace its outlines. > > It isn't so much that schools have changed in ways > that hurt boys. It's that society has changed in ways > that help girls. > > Increasingly, success requires verbal skills, which > everyone agrees come more naturally to girls. > Industrial-age jobs that required minimal verbal > skills are disappearing, replaced by information-age > jobs that range from filing insurance claims to law. > Even in technical fields, verbal skills are at a > premium. An auto mechanic or TV repairman now needs to > master complex technical manuals. > > School reformers eventually spotted the need and > reacted strongly, setting standards and writing tests > that demand verbal skills. The SAT and ACT required > for college applicants, for instance, now have an > essay component. > > This puts boys at a huge handicap, and schools haven't > begun to adapt. > > One hint of the inadequacy can be found in research > done by Michael Gurian, author of Boys and Girls Learn > Differently. He surveyed the course offerings of > schools of education throughout the country. His > discovery: 99% of universities and teacher colleges do > not offer a course on the biological differences > between how girls and boys learn. So teachers enter > classrooms unprepared to turn boys into successful > readers. > > Other factors also come quickly into play, setting off > a downward spiral that looks something like this: At > home, dads read to their daughters and throw footballs > to their sons. In elementary school overwhelmingly > female teaching staffs naturally teach in ways that > connect better with girls. Fidgety boys are quickly > defined as suffering from reading disabilities. In > middle school, teachers - still unattuned to the boys' > disadvantages - take no action to correct swelling > reading gaps. > > That brings boys to the pivotal ninth grade, the first > year when they run up against the heavily verbal, > college-track curriculum that school reforms demand of > most schools. And the boys flounder. > > The trend holds through the remaining school years: > Girls shine; boys fade. > > > > Some responses suggested by researchers appear easy. > Assign boys books that they find more appealing, for > example. And bring them along gradually, so they don't > quit. > > But in the end, the problem runs much deeper. It > surely won't be fixed until educators first come to > see that it exists. > > > > > _______________________________________________ > Edu-sig mailing list > Edu-sig@python.org > http://mail.python.org/mailman/listinfo/edu-sig > From bvande at po-box.mcgill.ca Sun Dec 5 18:01:17 2004 From: bvande at po-box.mcgill.ca (Brian van den Broek) Date: Sun Dec 5 18:03:05 2004 Subject: [Edu-sig] explaining functions [Possibly OT] Message-ID: <41B33EDD.4060102@po-box.mcgill.ca> Hi all, This might be a bit tangential to the topic; if so, my apologies. (I've been reading this list for a while, but have never posted before.) I'm a Python hobbyist, and am not involved in CS education, except peripherally. I am also a grad student in Philosophy who has, for a few years now, been teaching Introduction to Formal Logic to audiences largely composed of Philosophy and Linguistics undergrads with a small contingent of Computer Science undergraduates, too. I have found it difficult to get some of the humanities undergraduates to see the understand the general mathematical concept of a function. Occasionally, even some of the CS students (who, when I see them, have just begun) stumble with the concept, too. The best I have managed to come up with is to tell them that a function is like a 'black box' to which you feed some ordered input of the appropriate sort, and it gives you an output determined entirely by that input. I have found that, at least for the humanities students, getting them to understand some of the material is largely a matter of finding a useful metaphor (and, convincing them that the metaphor is an aid, not the thing in itself). That's been the only way to get the ones bothered by the mathematician's use of "if ... then ..." to accept it. (They don't like that "If 2 + 2 = 97 then I am King of the moon" and "If grass is green then sky is blue" are taken to be true.) So, I am wondering if others on the list have had difficulty getting students (particularly students not primarily studying Math or CS) to get the idea of a function? If so, I'd be very interested in what techniques were of use. Thanks, and I do apologize if this query is received as too peripherally related to the topic of the list. Best to all, Brian vdB From kent37 at tds.net Sun Dec 5 18:52:00 2004 From: kent37 at tds.net (Kent Johnson) Date: Sun Dec 5 18:52:03 2004 Subject: [Edu-sig] explaining functions [Possibly OT] In-Reply-To: <41B33EDD.4060102@po-box.mcgill.ca> References: <41B33EDD.4060102@po-box.mcgill.ca> Message-ID: <41B34AC0.5030703@tds.net> Michael Dawson's "Python Programming for the absolute beginner" has a cute analogy. He say, a function is like a pizza joint. You call it and give it your parameters (what kind of pizza you want) and it returns a pizza. :-) Kent Brian van den Broek wrote: > Hi all, > > This might be a bit tangential to the topic; if so, my apologies. (I've > been reading this list for a while, but have never posted before.) > > I'm a Python hobbyist, and am not involved in CS education, except > peripherally. I am also a grad student in Philosophy who has, for a few > years now, been teaching Introduction to Formal Logic to audiences > largely composed of Philosophy and Linguistics undergrads with a small > contingent of Computer Science undergraduates, too. > > I have found it difficult to get some of the humanities undergraduates > to see the understand the general mathematical concept of a function. > Occasionally, even some of the CS students (who, when I see them, have > just begun) stumble with the concept, too. > > The best I have managed to come up with is to tell them that a function > is like a 'black box' to which you feed some ordered input of the > appropriate sort, and it gives you an output determined entirely by that > input. > > I have found that, at least for the humanities students, getting them to > understand some of the material is largely a matter of finding a useful > metaphor (and, convincing them that the metaphor is an aid, not the > thing in itself). That's been the only way to get the ones bothered by > the mathematician's use of "if ... then ..." to accept it. (They don't > like that "If 2 + 2 = 97 then I am King of the moon" and "If grass is > green then sky is blue" are taken to be true.) > > So, I am wondering if others on the list have had difficulty getting > students (particularly students not primarily studying Math or CS) to > get the idea of a function? If so, I'd be very interested in what > techniques were of use. > > Thanks, and I do apologize if this query is received as too peripherally > related to the topic of the list. Best to all, > > Brian vdB > > _______________________________________________ > Edu-sig mailing list > Edu-sig@python.org > http://mail.python.org/mailman/listinfo/edu-sig > From dragoncow2 at gmail.com Mon Dec 6 00:28:07 2004 From: dragoncow2 at gmail.com (Nicholas Wheeler) Date: Mon Dec 6 00:28:09 2004 Subject: [Edu-sig] explaining functions [Possibly OT] In-Reply-To: <41B34AC0.5030703@tds.net> References: <41B33EDD.4060102@po-box.mcgill.ca> <41B34AC0.5030703@tds.net> Message-ID: <9047620b041205152874b97f84@mail.gmail.com> Isn't a math function the same as a computer-science function? You give the math function an x, and it returns a y. ie: f(x) = 2*(4x)^x -or- def f(x): print 2*((4*x)**x). Most people should be able to grasp that, if they've been through highschool algebra. On Sun, 05 Dec 2004 12:52:00 -0500, Kent Johnson wrote: > Michael Dawson's "Python Programming for the absolute beginner" has a cute analogy. He say, a > function is like a pizza joint. You call it and give it your parameters (what kind of pizza you > want) and it returns a pizza. > > :-) > Kent > > > > Brian van den Broek wrote: > > Hi all, > > > > This might be a bit tangential to the topic; if so, my apologies. (I've > > been reading this list for a while, but have never posted before.) > > > > I'm a Python hobbyist, and am not involved in CS education, except > > peripherally. I am also a grad student in Philosophy who has, for a few > > years now, been teaching Introduction to Formal Logic to audiences > > largely composed of Philosophy and Linguistics undergrads with a small > > contingent of Computer Science undergraduates, too. > > > > I have found it difficult to get some of the humanities undergraduates > > to see the understand the general mathematical concept of a function. > > Occasionally, even some of the CS students (who, when I see them, have > > just begun) stumble with the concept, too. > > > > The best I have managed to come up with is to tell them that a function > > is like a 'black box' to which you feed some ordered input of the > > appropriate sort, and it gives you an output determined entirely by that > > input. > > > > I have found that, at least for the humanities students, getting them to > > understand some of the material is largely a matter of finding a useful > > metaphor (and, convincing them that the metaphor is an aid, not the > > thing in itself). That's been the only way to get the ones bothered by > > the mathematician's use of "if ... then ..." to accept it. (They don't > > like that "If 2 + 2 = 97 then I am King of the moon" and "If grass is > > green then sky is blue" are taken to be true.) > > > > So, I am wondering if others on the list have had difficulty getting > > students (particularly students not primarily studying Math or CS) to > > get the idea of a function? If so, I'd be very interested in what > > techniques were of use. > > > > Thanks, and I do apologize if this query is received as too peripherally > > related to the topic of the list. Best to all, > > > > Brian vdB > > > > _______________________________________________ > > Edu-sig mailing list > > Edu-sig@python.org > > http://mail.python.org/mailman/listinfo/edu-sig > > > _______________________________________________ > Edu-sig mailing list > Edu-sig@python.org > http://mail.python.org/mailman/listinfo/edu-sig > -- Nicholas Wheeler Systems Administrator Development InfoStructure From dblank at brynmawr.edu Sun Dec 5 23:07:54 2004 From: dblank at brynmawr.edu (Douglas S. Blank) Date: Mon Dec 6 00:32:26 2004 Subject: [Edu-sig] Thoughts? In-Reply-To: Message-ID: I'd like to see the data that the article uses, especially for the sciences, and computer science, specifically. I teach computer science at an all-women's college. We haven't seen a jump in any enrollment statistics. Although we did have a general enrollment decline (like most colleges/universities did) after the tech-pop, and also after 9/11/2001. I would be very hesitant to link these stats to changes in the way we teach computer science. For one thing, most of the research doesn't advocate teaching a topic in a "girl-centered" way, but rather teaching in a more inclusive manner. That would include making assignments and examples accessible to all. For another thing, I don't think most people in CS have changed the way they teach. I have heard too often that schools "don't have any gender issues", because *they don't have any women in their CS classes*. I don't know what Art (and his ESP) have in mind when making his general criticisms, but my colleagues and I see Python as being an instrument to make computing more accessible---to everyone, and that the status quo of how we teach CS needs some serious revision. For further information, I suggest taking a look at Margolis and Fisher's "Unlocking the Clubhouse: Women in Computing". Also, you might enjoy a short article on "Patterns of Curriculum Design" and other ramblings at: http://dangermouse.brynmawr.edu/publications.shtml -Doug ajsiegel@optonline.net said: > > From: Marilyn Davis > Date: Saturday, December 4, 2004 1:45 am > Subject: [Edu-sig] Thoughts? > > > > > http://story.news.yahoo.com/news?tmpl=story&ncid=742&e=1&u=/usatoday/20041203/cm_usatoday/paycloserattentionboysarestrugglingacademically > > > > > My thoughts? > > I would like to use the information - if nothing else - to quiet talk of manipulating programming/math educational curricula to better appeal to women/girls. > > Those kinds of efforts and that kind of thinking was yesterday's academic flavor of month, and at least partly responsible - in my mind - for the statistics you cite. > > That being another thought - my objection to the article is only to the extent it gives credit to the "report" and the "small group of experts". Other reports and other small groups of experts had formally concluded much about the male-dominated nature of the curricula and the vital need for reform on this score. > > Why to someone like myself, without an agenda, was it clear that this agenda was overstated, and likely to lead to more "injustice" than it corrected. > > This *is* political. And the antidote is unfortunately too simple to be taken seriously. To trust more our senses (I think we have more than 5 of them). And trust less the small group of experts. > > Another thought is more controversial and more dire - that the "girl" friendly curricula to which we have evolved is a seriously inadequate curriculum on the merits, irrespective of the issue of the gender to which it better appeals. But it will take many years to reverse and correct where good intentions and the experts have brought us. > > Art > > > > > struggling academically > > > > Fri Dec 3, 6:17 AM ET > > > > Op/Ed - USATODAY.com > > > > Girls are taking the nation's colleges by storm. > > They're streaming to campuses in greater numbers, > > earning better grades and graduating more often. The > > same phenomenal success shows in high schools, where > > girls dominate honor rolls, hold more student > > government spots and rake in most of the academic > > awards. > > > > So says a just-released report from the U.S. > > Department of Education (news - web sites). > > > > Impressive. But the real news is tucked into the > > deeper, darker corners of the report. Boys are doing > > miserably, and nobody knows quite why. On measures > > ranging from writing ability to the likelihood of > > needing special education, boys are flat-lining - or > > worse. > > > > The phenomenon is most serious in inner cities, but > > it's evident in even the wealthiest school districts. > > And it's not confined to the United States. The same > > trend is turning up throughout the industrialized > > world. > > > > The impact could hardly be overstated. > > College-educated people earn twice as much as high > > school graduates. If boys can't get to the good-jobs > > starting line, which these days is a bachelor's > > degree, they won't get a chance to use their natural > > competitive skills in the marketplace. > > > > And when fewer men earn college degrees there are > > fewer partners whom educated women find desirable to > > marry. That's a debilitating social phenomenon > > African-American women have struggled with for years. > > > > The problem has already grown so severe that three out > > of every four private colleges (an informal estimate > > from admissions directors) quietly practice > > affirmative action for boys, favoring them over girls > > in admissions to get near balance. > > > > Yet for most educators - from kindergarten on up - the > > problem is invisible. Any teacher looking for national > > research that might define classroom solutions won't > > find any. They don't exist. > > > > The small group of experts who research the problem > > only now is beginning to trace its outlines. > > > > It isn't so much that schools have changed in ways > > that hurt boys. It's that society has changed in ways > > that help girls. > > > > Increasingly, success requires verbal skills, which > > everyone agrees come more naturally to girls. > > Industrial-age jobs that required minimal verbal > > skills are disappearing, replaced by information-age > > jobs that range from filing insurance claims to law. > > Even in technical fields, verbal skills are at a > > premium. An auto mechanic or TV repairman now needs to > > master complex technical manuals. > > > > School reformers eventually spotted the need and > > reacted strongly, setting standards and writing tests > > that demand verbal skills. The SAT and ACT required > > for college applicants, for instance, now have an > > essay component. > > > > This puts boys at a huge handicap, and schools haven't > > begun to adapt. > > > > One hint of the inadequacy can be found in research > > done by Michael Gurian, author of Boys and Girls Learn > > Differently. He surveyed the course offerings of > > schools of education throughout the country. His > > discovery: 99% of universities and teacher colleges do > > not offer a course on the biological differences > > between how girls and boys learn. So teachers enter > > classrooms unprepared to turn boys into successful > > readers. > > > > Other factors also come quickly into play, setting off > > a downward spiral that looks something like this: At > > home, dads read to their daughters and throw footballs > > to their sons. In elementary school overwhelmingly > > female teaching staffs naturally teach in ways that > > connect better with girls. Fidgety boys are quickly > > defined as suffering from reading disabilities. In > > middle school, teachers - still unattuned to the boys' > > disadvantages - take no action to correct swelling > > reading gaps. > > > > That brings boys to the pivotal ninth grade, the first > > year when they run up against the heavily verbal, > > college-track curriculum that school reforms demand of > > most schools. And the boys flounder. > > > > The trend holds through the remaining school years: > > Girls shine; boys fade. > > > > > > > > Some responses suggested by researchers appear easy. > > Assign boys books that they find more appealing, for > > example. And bring them along gradually, so they don't > > quit. > > > > But in the end, the problem runs much deeper. It > > surely won't be fixed until educators first come to > > see that it exists. > > > > > > > > > > _______________________________________________ > > Edu-sig mailing list > > Edu-sig@python.org > > http://mail.python.org/mailman/listinfo/edu-sig > > > > _______________________________________________ > Edu-sig mailing list > Edu-sig@python.org > http://mail.python.org/mailman/listinfo/edu-sig > -- Douglas S. Blank, Assistant Professor dblank@brynmawr.edu, (610)526-6501 Bryn Mawr College, Computer Science Program 101 North Merion Ave, Park Science Building Bryn Mawr, PA 19010 dangermouse.brynmawr.edu From lac at strakt.com Mon Dec 6 00:39:13 2004 From: lac at strakt.com (Laura Creighton) Date: Mon Dec 6 00:39:24 2004 Subject: [Edu-sig] explaining functions [Possibly OT] In-Reply-To: Message from Nicholas Wheeler of "Sun, 05 Dec 2004 18:28:07 EST." <9047620b041205152874b97f84@mail.gmail.com> References: <41B33EDD.4060102@po-box.mcgill.ca> <41B34AC0.5030703@tds.net> <9047620b041205152874b97f84@mail.gmail.com> Message-ID: <200412052339.iB5NdDKl004801@ratthing-b246.strakt.com> I haven't run into 'don't understand what a function is' but I have run into 'don't understand why you would want to use one'. My youngish students would rather just paste the formula that is in the function again, and again. So I gave them a problem where they calculated the cost of a list of somethings with a tax rate of 5%. The pasters were more or less as fast as the function users. Then I said 'ok, now the government has lowered taxes. They are now 4%'. Suddenly the pasters saw that the function users had a much easier time of it. And the climax was when I made them fix _each others_ code to make it produce the correct results. I was called 'mean' for that. :-) Laura From glingl at aon.at Mon Dec 6 01:24:02 2004 From: glingl at aon.at (Gregor Lingl) Date: Mon Dec 6 01:23:43 2004 Subject: [Edu-sig] explaining functions [Possibly OT] In-Reply-To: <200412052339.iB5NdDKl004801@ratthing-b246.strakt.com> References: <41B33EDD.4060102@po-box.mcgill.ca> <41B34AC0.5030703@tds.net> <9047620b041205152874b97f84@mail.gmail.com> <200412052339.iB5NdDKl004801@ratthing-b246.strakt.com> Message-ID: <41B3A6A2.4090706@aon.at> Laura Creighton schrieb: This examples shows beautifully that there are different concepts of "function", which also shows up in Python: some are called to return a result - this *should* be independent of global circumstances (variables). (Like mathematical functions mentioned in Nicholas' posting.) The others are functions that *do* something, for instance draw a line (like forward from the turtle graphics module). What forward(50) produces is by no means independent of the state of the machine. (And it returns None!) So these are called merely because of their side-effects. And (regrettably?) there are many functions which do both: produce side-effects and return values (in the real world (especially of students)). >And the climax was when I made them fix _each others_ code to make it produce >the correct results. I was called 'mean' for that. :-) > > > By all means, what does 'mean' mean in this context? Gregor >Laura > >_______________________________________________ >Edu-sig mailing list >Edu-sig@python.org >http://mail.python.org/mailman/listinfo/edu-sig > > > > From urnerk at qwest.net Mon Dec 6 01:36:25 2004 From: urnerk at qwest.net (Kirby Urner) Date: Mon Dec 6 01:36:27 2004 Subject: [Edu-sig] explaining functions [Possibly OT] In-Reply-To: <9047620b041205152874b97f84@mail.gmail.com> Message-ID: <20041206003625.A82971E4004@bag.python.org> Kent: > Isn't a math function the same as a computer-science function? You > give the math function an x, and it returns a y. ie: f(x) = 2*(4x)^x > -or- def f(x): print 2*((4*x)**x). Most people should be able to grasp > that, if they've been through highschool algebra. > Computer science functions tend to have richer syntax, plus don't always spit out their results through the 'return' at the end. In C/C++/C# you'll typically pass in an argument that gets worked on by the function, and is thereby changed, with nothing explicitly returned (return type could be void). In Python, as everything is referential, this is easy to do as well: >>> mylist = range(3) >>> def additem(somelist): somelist.append(100) >>> additem(mylist) >>> mylist [0, 1, 2, 100] Note the absence of any 'return' key word. In mathematics, the formal idea of a function is probably best represented by a simple Python dictionary, which is a 'mapping' -- and a 'mapping' is what a function is. You'll always see these 'cloud' diagrams, showing a cloud on the left (domain) and a cloud on the right (image), with arrows going in between. I like the map representation in that it doesn't presume there has to be a rule. Most functions we encounter in algebra books *do* have a rule, such that we're able to compute outputs by applying an algorithm. But the idea of a function doesn't require such. {(1,3),(2,18),(3,-7),(8, 9.1)} is a perfectly good example of a mapping with no apparent rhyme or reason. The important thing about a function is the same inputs always map to the same outputs. There's no "fork in the road" where it could go one way or the other -- any such fork would have to pair with some additional input variable. This, too, corresponds with the dictionary idea, in that the same key can't map to more than one value (sure, that value might be a list, but the same key won't point to a different list elsewhere in the dictionary -- indeed, keys must be unique). I think the black box idea is just fine. I like to think of functions as verbs. They "do stuff" to inputs. I think of factories with bottles zooming by on a conveyor belt, and a machine screwing a lid onto each. Every bottle maps to itself with a lid on it. The machine is the function doing the mapping. More generically, I like to think of the present moment as a domain, and the very next moment as its image, and so on. The 'verb' is simply change, in all its bandwidth and glory. Our experience is just one long 'function' (events going to more events). We don't really know all the rules at work, but certainly there's a strong sense of rules working. Kirby From bvande at po-box.mcgill.ca Mon Dec 6 02:15:07 2004 From: bvande at po-box.mcgill.ca (Brian van den Broek) Date: Mon Dec 6 02:15:34 2004 Subject: [Edu-sig] explaining functions [Possibly OT] In-Reply-To: <9047620b041205152874b97f84@mail.gmail.com> References: <41B33EDD.4060102@po-box.mcgill.ca> <41B34AC0.5030703@tds.net> <9047620b041205152874b97f84@mail.gmail.com> Message-ID: <41B3B29B.4070403@po-box.mcgill.ca> Nicholas Wheeler said unto the world upon 2004-12-05 18:28: > Isn't a math function the same as a computer-science function? You > give the math function an x, and it returns a y. ie: f(x) = 2*(4x)^x > -or- def f(x): print 2*((4*x)**x). Most people should be able to grasp > that, if they've been through highschool algebra. Hi Nicholas, and all, I'd agree with you if experience hadn't taught me otherwise. I do see the CS and math notions of functions are tightly related (with the difference that math functions don't have side effects). But the idea that those with highschool algebra should be just fine has proven incorrect. Many Linguistics and Philosophy students in these classes "hate math" and have worked out that writing things like: (A -> (B & C)) v (B <-> C) looks suspiciously like math. They seem to have a mindset that "they cannot do it". Which is a shame, and I try like the dickens to make them understand the mathematical induction proof of the completeness of the deductive system for predicate logic by the time we are done. (I don't think they like me much ;-) My own inclination is to say something like "a function is a set of pairs, where the first member of each pair is an n-tuple of inputs, and the second member is the m-tuple that is output, and for each input n-tuple, there is a exactly one output m-tuple to which it is mapped." And, right after that, they'd all drop the class ;-) I think I like the pizza analogy (thanks Kent). My first impulse is to say "that isn't mathematical enough!" But, when I consider the difficulty that some students have had, and the obvious unhelpfulness to the target audience of my above quoted inclination, I think that means it might just be perfect ;-) I'll try it out on Tuesday -- I'm not teaching the course this semester, but I do have 12 hours of tutoring lined up before the course final on Wed. We will see if it works. Thanks to all who've responded. Brian vdB >>Brian van den Broek wrote: >> >>>Hi all, >>>I have found it difficult to get some of the humanities undergraduates >>>to see the understand the general mathematical concept of a function. >>>Occasionally, even some of the CS students (who, when I see them, have >>>just begun) stumble with the concept, too. >>>So, I am wondering if others on the list have had difficulty getting >>>students (particularly students not primarily studying Math or CS) to >>>get the idea of a function? If so, I'd be very interested in what >>>techniques were of use. >>> >>>Thanks, and I do apologize if this query is received as too peripherally >>>related to the topic of the list. Best to all, >>> >>>Brian vdB From tjd at sfu.ca Mon Dec 6 06:01:01 2004 From: tjd at sfu.ca (Toby Donaldson) Date: Mon Dec 6 06:01:05 2004 Subject: [Edu-sig] Re: explaining functions [Possibly OT] In-Reply-To: <20041205233228.81DA51E400B@bag.python.org> References: <20041205233228.81DA51E400B@bag.python.org> Message-ID: <41B3E78D.8010005@sfu.ca> I've always thought of the mathematical and programming notions of functions to be very different things. The problem with the mathematical definition of a function is that it is that it isn't broad enough, e.g. it says nothing about side-effects like printing, making a sound, or reading/writing a file, etc. So I think defining functions as "black boxes" or little machines is the way to go ... I think it's a mistake to explain Python functions as being the same sort of thing as mathematical functions. My experience is that the average student usually has no trouble understanding how to use a function. They grasp the mechanics pretty quickly from examples. Issues such as the difference between printing a result and returning a result are confusing to some, as are issues such as scope. But you don't need to have a perfect understanding of such things to use functions effectively. By far the biggest difficulty I've seen students have is deciding how and when to make their own functions. This is exacerbated by the fact that in beginning programming you typically only write small programs where writing your own functions might not be useful. Toby >Hi all, > >This might be a bit tangential to the topic; if so, my apologies. (I've >been reading this list for a while, but have never posted before.) > >I'm a Python hobbyist, and am not involved in CS education, except >peripherally. I am also a grad student in Philosophy who has, for a few >years now, been teaching Introduction to Formal Logic to audiences >largely composed of Philosophy and Linguistics undergrads with a small >contingent of Computer Science undergraduates, too. > >I have found it difficult to get some of the humanities undergraduates >to see the understand the general mathematical concept of a function. >Occasionally, even some of the CS students (who, when I see them, have >just begun) stumble with the concept, too. > >The best I have managed to come up with is to tell them that a function >is like a 'black box' to which you feed some ordered input of the >appropriate sort, and it gives you an output determined entirely by that >input. > >I have found that, at least for the humanities students, getting them to >understand some of the material is largely a matter of finding a useful >metaphor (and, convincing them that the metaphor is an aid, not the >thing in itself). That's been the only way to get the ones bothered by >the mathematician's use of "if ... then ..." to accept it. (They don't >like that "If 2 + 2 = 97 then I am King of the moon" and "If grass is >green then sky is blue" are taken to be true.) > >So, I am wondering if others on the list have had difficulty getting >students (particularly students not primarily studying Math or CS) to >get the idea of a function? If so, I'd be very interested in what >techniques were of use. > >Thanks, and I do apologize if this query is received as too peripherally >related to the topic of the list. Best to all, > >Brian vdB > > From lac at strakt.com Mon Dec 6 08:51:38 2004 From: lac at strakt.com (Laura Creighton) Date: Mon Dec 6 08:52:14 2004 Subject: [Edu-sig] explaining functions [Possibly OT] In-Reply-To: Message from Gregor Lingl of "Mon, 06 Dec 2004 01:24:02 +0100." <41B3A6A2.4090706@aon.at> References: <41B33EDD.4060102@po-box.mcgill.ca> <41B34AC0.5030703@tds.net> <9047620b041205152874b97f84@mail.gmail.com> <200412052339.iB5NdDKl004801@ratthing-b246.strakt.com> <41B3A6A2.4090706@aon.at> Message-ID: <200412060751.iB67pcjI005943@ratthing-b246.strakt.com> In a message of Mon, 06 Dec 2004 01:24:02 +0100, Gregor Lingl writes: > >>And the climax was when I made them fix _each others_ code to make it produce >>the correct results. I was called 'mean' for that. :-) >> >By all means, what does 'mean' mean in this context? >Gregor Well, somewhere along the line -- and these children were 9, 10 years old -- they had absorbed the notion that what programming was all about was for each of them personally to make code that generated the correct result. The notion that it is also about producing something that somebody else can a) understand and b) modify was entirely outside of their experience. The concept 'this answer is right, but this style is lousy, so you should not do things this way' is one that, as far as I could tell, they had never experienced before. And these are very bright children -- so their model of how the world works was 'if the teacher says you have to do it her way when your way produces the correct result, then the teacher is either too stupid to understand how your way works or just likes making you do things over in order to assert her authority'. So she's a fool or a bully. And matters were not helped that I inherited this group from a person who had taught them 'cute calculator tri?ks', which mean that they thought an interpreter was a fancy calculator. So -- figure out how to solve things and type away at the interpreter until you get the magic, all-important _correct answer_ was exactly what they were used to. So the problem 'you have to make _his_ program work while he has to make _your_ program work' was revolutionary. And some of the really brightest people, found not being able to throw away the whole thing, and start over really, really, frustrating. (And, given the code some of them started with, no wonder :-) ) And not all of them were able to do it. But all of them had a direct personal insight as to why 'bad coding style' was *bad* that did not involve 'pointless rules and other stupid things'. So in an admiring tone they marched off, saying 'oh, Miss, that was _really_ mean, making us do that. That was _so_ _hard_'. Made my day. Laura From lac at strakt.com Mon Dec 6 09:13:19 2004 From: lac at strakt.com (Laura Creighton) Date: Mon Dec 6 09:13:36 2004 Subject: [Edu-sig] explaining functions [Possibly OT] In-Reply-To: Message from Brian van den Broek of "Sun, 05 Dec 2004 20:15:07 EST." <41B3B29B.4070403@po-box.mcgill.ca> References: <41B33EDD.4060102@po-box.mcgill.ca> <41B34AC0.5030703@tds.net> <9047620b041205152874b97f84@mail.gmail.com> <41B3B29B.4070403@po-box.mcgill.ca> Message-ID: <200412060813.iB68DJik006023@ratthing-b246.strakt.com> In a message of Sun, 05 Dec 2004 20:15:07 EST, Brian van den Broek writes: >My own inclination is to say something like "a function is a set of >pairs, where the first member of each pair is an n-tuple of inputs, and >the second member is the m-tuple that is output, and for each input >n-tuple, there is a exactly one output m-tuple to which it is mapped." > >And, right after that, they'd all drop the class ;-) > >Brian vdB My experience is that it is better to teach this by showing examples, and then getting to any defintions later, rather than starting with a definition. Depending on your class size, you may be able to get them to produce a definition that works. I'd say that your definition doesn't explain why 3 successive calls to random.randrange(4) produces 3 different results. Laura From ajsiegel at optonline.net Mon Dec 6 09:47:41 2004 From: ajsiegel at optonline.net (ajsiegel@optonline.net) Date: Mon Dec 6 09:47:45 2004 Subject: [Edu-sig] Thoughts? Message-ID: Douglas wrties - > I'd like to see the data that the article uses, especially for the > sciences,and computer science, specifically. I teach computer > science at an all-women's > college. We haven't seen a jump in any enrollment statistics. > Although we did > have a general enrollment decline (like most colleges/universities > did) after > the tech-pop, and also after 9/11/2001. The article does not focus on science education. I would guess - or intuit, or see with my eyes - that behind the statistics, in fact, is the fact that one can achieve academic success, now more than previously, without any serious exposure to the sciences. > > I would be very hesitant to link these stats to changes in the way > we teach > computer science. For one thing, most of the research doesn't advocate > teaching a topic in a "girl-centered" way, but rather teaching in > a more > inclusive manner. That would include making assignments and examples > accessible to all. I would contend that asserting we know how to make this kind of curricula "inclusive", from a gender point of view, overstates greatly our understanding of the differences (if any) between the genders. We end up bringing something no deeper thatn fashion (because that's really as far as we can get) into the computer science classroom. Yuck. > > For another thing, I don't think most people in CS have changed > the way they > teach. I have heard too often that schools "don't have any gender > issues",because *they don't have any women in their CS classes*. They *don't* have a gender issue as long as both genders are welcome to enroll. > > I don't know what Art (and his ESP) have in mind when making his > generalcriticisms, but my colleagues and I see Python as being an > instrument to make > computing more accessible---to everyone, and that the status quo > of how we > teach CS needs some serious revision. Boys like Python funcrtions fine. And if you see something in Python functions that less excludes girls, wonderful. Art From lac at strakt.com Mon Dec 6 09:55:27 2004 From: lac at strakt.com (Laura Creighton) Date: Mon Dec 6 09:55:54 2004 Subject: [Edu-sig] explaining functions [Possibly OT] In-Reply-To: Message from Gregor Lingl of "Mon, 06 Dec 2004 01:24:02 +0100." <41B3A6A2.4090706@aon.at> References: <41B33EDD.4060102@po-box.mcgill.ca> <41B34AC0.5030703@tds.net> <9047620b041205152874b97f84@mail.gmail.com> <200412052339.iB5NdDKl004801@ratthing-b246.strakt.com> <41B3A6A2.4090706@aon.at> Message-ID: <200412060855.iB68tRat006323@ratthing-b246.strakt.com> Sorry to quote all of this -- When I post a one line message to edu-sig, it gets rejected as spam. If this works, of course, this indicates an attack. I wonder how many other one-line questions I have sent to people have been quietly eaten? Does anybody have any recommendations for an editor for children? In the days I was speaking, I used an editor called 'brief' but I don't think they are in business any more. Laura In a message of Mon, 06 Dec 2004 01:24:02 +0100, Gregor Lingl writes: >Laura Creighton schrieb: > >This examples shows beautifully that there are different concepts of >"function", which >also shows up in Python: some are called to return a result - this *shoul >d* >be independent of global circumstances (variables). (Like mathematical >functions >mentioned in Nicholas' posting.) >The others are functions that *do* something, for instance draw a line >(like forward >from the turtle graphics module). What forward(50) produces is by no mean >s >independent of the state of the machine. (And it returns None!) So these >are called >merely because of their side-effects. > >And (regrettably?) there are many functions which do both: produce >side-effects >and return values (in the real world (especially of students)). > >>And the climax was when I made them fix _each others_ code to make it pr >oduce >>the correct results. I was called 'mean' for that. :-) >> >> >> >By all means, what does 'mean' mean in this context? >Gregor > >>Laura >> >>_______________________________________________ >>Edu-sig mailing list >>Edu-sig@python.org >>http://mail.python.org/mailman/listinfo/edu-sig >> >> >> >> From capnregex at gmail.com Mon Dec 6 17:38:26 2004 From: capnregex at gmail.com (Robert Ferney) Date: Mon Dec 6 17:38:29 2004 Subject: [Edu-sig] explaining functions [Possibly OT] In-Reply-To: References: <41B33EDD.4060102@po-box.mcgill.ca> <41B34AC0.5030703@tds.net> <9047620b041205152874b97f84@mail.gmail.com> Message-ID: Sorry Nicholas, I hit reply instead of reply all, and didn't see that it wasn't getting back to the edu-sig list until I had hit send. On Sun, 5 Dec 2004 18:28:07 -0500, Nicholas Wheeler wrote: > Isn't a math function the same as a computer-science function? You > give the math function an x, and it returns a y. ie: f(x) = 2*(4x)^x > -or- def f(x): print 2*((4*x)**x). Most people should be able to grasp > that, if they've been through highschool algebra. I work, part-time at a local private school.. The school uses principle based education processes, and they have a placement test to determine where the entry students should be studying, which is repeated every 90 days. The school has found that over 80% of the transfer students from public or similar education have problems with basic integer math operations.. This is your basic 1+1=2 type of thing. Just because a student has physically attended an algebra class, (and even passed said class) does not mean that they have learned the concept of function while doing so. From carle at hamlin.org Mon Dec 6 16:52:38 2004 From: carle at hamlin.org (Andrew Carle) Date: Mon Dec 6 17:52:17 2004 Subject: [Edu-sig] explaining functions [Possibly OT] In-Reply-To: <41B3B29B.4070403@po-box.mcgill.ca> References: <41B33EDD.4060102@po-box.mcgill.ca> <41B34AC0.5030703@tds.net> < > <9047620b041205152874b97f84@mail.gmail.com> <41B3B29B.4070403@po-box.mcgill.ca> Message-ID: When I teach functions to 6-8th graders in a math class I often use the example of a soda/vending machine. I first saw this worked through in the CPM math textbooks, which have a very conversational tone and strong constructivist leanings. This has the benefit also having simple examples that explain the difference between functions and non functions (consistent sodas/output form a particular button/input), injective, and surjective functions. And I made a neat poster of it, which is probably more important for the 12 year old then it is for your students. Andrew Carle MS Technology The Hamlin School From urnerk at qwest.net Mon Dec 6 17:57:04 2004 From: urnerk at qwest.net (Kirby Urner) Date: Mon Dec 6 17:57:06 2004 Subject: [Edu-sig] explaining functions [Possibly OT] In-Reply-To: <41B3B29B.4070403@po-box.mcgill.ca> Message-ID: <20041206165705.61F751E4003@bag.python.org> Brian van den Broek: > I'd agree with you if experience hadn't taught me otherwise. I do see > the CS and math notions of functions are tightly related (with the > difference that math functions don't have side effects). However, I think mathematicians should accept the CS "side effects" as just more of the function's result, wherever and however it shows up. One thing I like about computer programming is it quickly gets you into operating with inputs/outputs other than numbers, strings for example. The early math exposure kids get is too exclusively number-focused IMO. Books like 'Godel Escher Bach' are a good antidote. My suggestion that a factory machine which twists lids onto milk bottles or the like, is a good model of a function, would be designed to break this fixation on numbers, always numbers. In a hybrid techie-math class, we'd wire sensors to chips, so that inputs were things like temperature, outputs various GUI gizmos -- more like the cockpit of an airplane (instrumentation readings = output, environmental conditions, like altitude, wind speed = input). The mathematicians' *notation* 'f : x -> y' or whatever they use, may well be about turtles moving, toasters popping, cranes swiveling, cells dividing. The abstraction is about taking inputs to outputs, stimuli to responses, causes to effects or whatever. In the case of random.randint(5), it needs to be explained that just as outputs may be other than what's explicitly returned (so-called side-effects), inputs may be coming from places other than the argument list -- in this case, there's a sequence of pseudo-random numbers being computed algorithmically, with state saved between calls (like in a generator). I think lots of examples of simple causes -> effects drawn from ordinary life helps phase in the new function semantics in a way that's very glued to everyday experience. In the case of propositional calculus in particular, I favor using logic gates at some point in the discussion. Little diagrams of AND OR NAND NOR XOR. http://encyclozine.com/Connective You can use these to assemble the behavior of p->q i.e. p,q are inputs to a logic gate setup, and the value of p->q is the output. p q p->q T T T T F F F T T F F T In Python, you can use Booleans, e.g. the above is equivalent to >>> def ifthen(p,q): return (not p) or q i.e. (~p | q) <-> (p -> q) >>> combos = ((True,True),(True,False),(False,True),(False,False)) >>> for p,q in combos: print "Inputs: %s\t%s\tOutput: %s" % (p, q, ifthen(p,q) ) Inputs: True True Output: True Inputs: True False Output: False Inputs: False True Output: True Inputs: False False Output: True Kirby From john.zelle at wartburg.edu Mon Dec 6 20:12:08 2004 From: john.zelle at wartburg.edu (John Zelle) Date: Mon Dec 6 20:41:37 2004 Subject: [Edu-sig] Acadmic gender gap (was Thoughts) Message-ID: <41B4AF08.5020601@wartburg.edu> OK, I lost one message, and then this one was bounced as Spam. I'm trying to post this one last time with a clean subject heading. Hello, I had a long, detailed reply to this post that got "eaten" by the dog that is our email system. This is a shorter note, as Douglas has already posted some ideas that touched on mine regarding women in computer science. The dominance of girls/women in academics now is well-attested. At the undergraduate level we struggle to get high-quality male students, and our Dean's list is about 2/3 women. However, I personally doubt that this has very much to do with any pro-girl agenda in our schools. As far as I can tell (my first child is in first grade now), public education has not changed a whole lot since I went through. And the article points out that what changes have been made are a reflection of new economic realities, not any political agenda. What I think has changed significantly is what our children are doing outside of school. They are watching television, surfing the Internet, and playing video games. There is a growing list of credible scientific research showing that computers and video games for young children are actually detrimental to developing creativity, problem solving skills, concentration (on non-computer tasks) and social skills. There are also some preliminary studies showing a link between electronic media exposure and the epidemic of ADHD diagnoses with its concommitant drugging of our children to "improve their concentration." The time spent huddled with a video game is time not spent out experiencing the real world in all it's richness. It's time not spent in meaningful social interation with peers. Although I love computers, I am in no hurry to expose my youngsters to the virtual world. What has this got to do with an academic gender gap? Well, it's primarily boys that are playing video games and messing around on computers. I just saw an article in Newsweek or Time (can't remember which) that documented how traditional toy manufacturers are getting crushed by the gameboy, xbox, Playstation, and computer-game competition. Boys are starting down this road already in the 3-6 age group. Girls are increasingly affected, but still play with more traditional toys up until age 10 or so. It could just be that the reason boys are not succeeding at the same rate has nothing to do with education per se, but with the increasing number who are simply ill-equipped for school. My hunch is that a well-behaved, non-video-gaming boy does just as well in the supposed "new curriculum" as his female counterpart. Some study needs to be done on this. Given that fewer boys are succeeding, we darn well better figure out ways to attract talented girls/women to the IT field, or we will be in sorry shape. And heaven help us when the marketers finally find the killer electronic game for young girls; that will equalize the playing field in the worst possible way. Those are a few of my thoughts... --John From ajsiegel at optonline.net Mon Dec 6 22:58:57 2004 From: ajsiegel at optonline.net (ajsiegel@optonline.net) Date: Mon Dec 6 22:59:26 2004 Subject: [Edu-sig] Acadmic gender gap (was Thoughts) Message-ID: This also a repost of a bounce. What's with this Spam sensitivity all of a sudden? > The dominance of girls/women in academics now is well-attested. At > the > undergraduate level we struggle to get high-quality male students, > and > our Dean's list is about 2/3 women. However, I personally doubt > that > this has very much to do with any pro-girl agenda in our schools. > As far > as I can tell (my first child is in first grade now), public > education > has not changed a whole lot since I went through. And the article > points > out that what changes have been made are a reflection of new > economic > realities, not any political agenda. I have to disagree, but only to an extent. My son ended up at a "progressive" public high school, where students were judged by their portfolios, the more elaborate the better - rather than by test. Nothing like that existed in my time. He barely got by. I was told at one point that his graduation was in doubt. He made his way to a large somewhat institutional college - where he is judged by performance on exams. And he is excelling. The best I can figure out - and I can't help trying to put him in the best light (I'm kind of fond of the young man) - is that he has a lot more patience for learning than he has for proving to someone else what it is that he has learned. The bother of sitting for an exam is tolerable. The implied - what? - subservience, of the going out of one's way to the extent of elaborate "portfolios" of one kind or another. to demonstrate to someone else one's understanding of a subject is more than he is willing to undertake with any degree of commitment or devotion. We can argue about whether the method of judgement of academic performance has, in general and in fact, changed and the degree to which any such change is a result of gender or other politics. And probably only argue. I say yes - it has changed and at least partly as a result of gender politics - recognizing there are other factors at work as well, including the self-indulgent whining of folks like myself in the 60's. But as it turns out, sadly (in some sense) , perhaps, women are brought up more anxious to please and more willing to go out of their way to do so, and for the wrong reasons more prepared to thrive in this kind of environment. Be that as it may, it seems to me we are measuring more the student's commitment to the environment and willingness to work to please (and in that sense their successful socialization), than we are their acquisition of knowledge. While this is *not* the whole of the story, I think it is a decent part of it. Art ----- Original Message ----- From: John Zelle Date: Monday, December 6, 2004 7:12 pm Subject: [Edu-sig] Acadmic gender gap (was Thoughts) > OK, I lost one message, and then this one was bounced as Spam. I'm > trying to post this one last time with a clean subject heading. > > Hello, > > I had a long, detailed reply to this post that got "eaten" by the > dog > that is our email system. This is a shorter note, as Douglas has > already > posted some ideas that touched on mine regarding women in computer > science. > The dominance of girls/women in academics now is well-attested. At > the > undergraduate level we struggle to get high-quality male students, > and > our Dean's list is about 2/3 women. However, I personally doubt > that > this has very much to do with any pro-girl agenda in our schools. > As far > as I can tell (my first child is in first grade now), public > education > has not changed a whole lot since I went through. And the article > points > out that what changes have been made are a reflection of new > economic > realities, not any political agenda. > > What I think has changed significantly is what our children are > doing > outside of school. They are watching television, surfing the > Internet, > and playing video games. There is a growing list of credible > scientific > research showing that computers and video games for young children > are > actually detrimental to developing creativity, problem solving > skills, > concentration (on non-computer tasks) and social skills. There are > also > some preliminary studies showing a link between electronic media > exposure and the epidemic of ADHD diagnoses with its concommitant > drugging of our children to "improve their concentration." The > time > spent huddled with a video game is time not spent out experiencing > the > real world in all it's richness. It's time not spent in meaningful > social interation with peers. Although I love computers, I am in > no > hurry to expose my youngsters to the virtual world. > > What has this got to do with an academic gender gap? Well, it's > primarily boys that are playing video games and messing around on > computers. I just saw an article in Newsweek or Time (can't > remember > which) that documented how traditional toy manufacturers are > getting > crushed by the gameboy, xbox, Playstation, and computer-game > competition. Boys are starting down this road already in the 3-6 > age > group. Girls are increasingly affected, but still play with more > traditional toys up until age 10 or so. > > It could just be that the reason boys are not succeeding at the > same > rate has nothing to do with education per se, but with the > increasing > number who are simply ill-equipped for school. My hunch is that a > well-behaved, non-video-gaming boy does just as well in the > supposed > "new curriculum" as his female counterpart. Some study needs to be > done > on this. > > Given that fewer boys are succeeding, we darn well better figure > out > ways to attract talented girls/women to the IT field, or we will > be in > sorry shape. And heaven help us when the marketers finally find > the > killer electronic game for young girls; that will equalize the > playing > field in the worst possible way. > > Those are a few of my thoughts... > > --John > > _______________________________________________ > Edu-sig mailing list > Edu-sig@python.org > http://mail.python.org/mailman/listinfo/edu-sig > From missive at hotmail.com Tue Dec 7 02:32:47 2004 From: missive at hotmail.com (Lee Harr) Date: Tue Dec 7 02:33:05 2004 Subject: [Edu-sig] editor for children (was Re: explaining functions [Possibly OT]) Message-ID: >Does anybody have any recommendations for an editor for children? In the >days I was speaking, I used an editor called 'brief' but I don't think they >are in business any more. What attributes are needed in a "for children" editor? (or is a list of attributes what you are looking for?) _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ From oldham at centre.edu Tue Dec 7 05:21:46 2004 From: oldham at centre.edu (Joseph D. Oldham) Date: Tue Dec 7 05:21:58 2004 Subject: [Edu-sig] Acadmic gender gap (was Thoughts) Message-ID: <0D6F3677FF3C0045BBEE54DB65C4EE4D014F80FF@exchange.centre.edu> I like using John's book, and I have not been following this thread, but I want to respond to what John has said about video games. I have not read the studies showing detrimental effects. I have looked at Gee's "What Video Games have to Teach us about Literacy and Learning" and find some good ideas there. Others have similar points to make. Anecdotal evidence in our house points to some real power in, and some positives from, video games. I've had plenty of (good) students, some women, in the last 5 years who were gamers. Nor is it just video games that separate boys from girls. For instance, in the past years there have been monumental, well justified efforts to support girls in schools. The school-centered opportunities for girls now versus when I grew up are phenomenal. I have a daughter and I applaud the changes. (In fact those changes could still go further.) I have a son too. I see very little effort having been put toward lifting boys up. His experience is moch more like mine 35 years earlier. (The perception has been they've been on top -- yet they're weaker academically. Check out, for instance, "The Wonder of Boys", Michael Gurian.) One further difference I see in what my son (the older child) is getting in school versus what I got is the pace of the curriculum. He's doing great. But he's learning more sooner, and started preschool at a younger age. Maybe that isn't all good. Maybe boys, who mature slowly, respond poorly. (Which does not explain why girls don't compute...) So before I buy into blaming video games for gender gaps, I would like to see a whole lot more study. We as students of computing should be among the investigators. The technology we study has enabled video games. We should be looking at gaming far beyond simple judgement, and beyond issues of how to code, looking at levels of design and impact as well. Who knows, maybe it would even be a good idea if we played a few games... %^) -----Original Message----- From: edu-sig-bounces+oldham=centre.edu@python.org on behalf of John Zelle Sent: Mon 12/6/2004 2:12 PM To: edu-sig@python.org Subject: [Edu-sig] Acadmic gender gap (was Thoughts) OK, I lost one message, and then this one was bounced as Spam. I'm trying to post this one last time with a clean subject heading. Hello, I had a long, detailed reply to this post that got "eaten" by the dog that is our email system. This is a shorter note, as Douglas has already posted some ideas that touched on mine regarding women in computer science. The dominance of girls/women in academics now is well-attested. At the undergraduate level we struggle to get high-quality male students, and our Dean's list is about 2/3 women. However, I personally doubt that this has very much to do with any pro-girl agenda in our schools. As far as I can tell (my first child is in first grade now), public education has not changed a whole lot since I went through. And the article points out that what changes have been made are a reflection of new economic realities, not any political agenda. What I think has changed significantly is what our children are doing outside of school. They are watching television, surfing the Internet, and playing video games. There is a growing list of credible scientific research showing that computers and video games for young children are actually detrimental to developing creativity, problem solving skills, concentration (on non-computer tasks) and social skills. There are also some preliminary studies showing a link between electronic media exposure and the epidemic of ADHD diagnoses with its concommitant drugging of our children to "improve their concentration." The time spent huddled with a video game is time not spent out experiencing the real world in all it's richness. It's time not spent in meaningful social interation with peers. Although I love computers, I am in no hurry to expose my youngsters to the virtual world. What has this got to do with an academic gender gap? Well, it's primarily boys that are playing video games and messing around on computers. I just saw an article in Newsweek or Time (can't remember which) that documented how traditional toy manufacturers are getting crushed by the gameboy, xbox, Playstation, and computer-game competition. Boys are starting down this road already in the 3-6 age group. Girls are increasingly affected, but still play with more traditional toys up until age 10 or so. It could just be that the reason boys are not succeeding at the same rate has nothing to do with education per se, but with the increasing number who are simply ill-equipped for school. My hunch is that a well-behaved, non-video-gaming boy does just as well in the supposed "new curriculum" as his female counterpart. Some study needs to be done on this. Given that fewer boys are succeeding, we darn well better figure out ways to attract talented girls/women to the IT field, or we will be in sorry shape. And heaven help us when the marketers finally find the killer electronic game for young girls; that will equalize the playing field in the worst possible way. Those are a few of my thoughts... --John _______________________________________________ Edu-sig mailing list Edu-sig@python.org http://mail.python.org/mailman/listinfo/edu-sig From marilyn at deliberate.com Tue Dec 7 07:10:42 2004 From: marilyn at deliberate.com (Marilyn Davis) Date: Tue Dec 7 07:10:45 2004 Subject: [Edu-sig] Acadmic gender gap (was Thoughts) In-Reply-To: <0D6F3677FF3C0045BBEE54DB65C4EE4D014F80FF@exchange.centre.edu> Message-ID: I've been pondering everyone's thoughts on this. It left me speechless that such an article would come forward. But it does reflect my personal experience. My son, 23, is a gamer and a wonderful guy, outgoing and comfortable, thank Goodness. However when he started playing games as a little boy, I saw a big shift in his personality. Luckily there was a study at that time that resulted in a small article in the paper saying that children who play computer games too young become more aggressive and impatient, more driven and difficult to get along with... something like that. The theory was that the response of the computer is so fast that small kids come to expect that sort of feedback from all of life. It fit Charlie exactly and so games, and computers, went away until Jr Hi, when he was playing games at school anyway. By then though, he had a solid presence about him and he didn't seem to suffer. And he was also learning computer languages, and system administration from his dad, not just playing games. Starting in kindergarten I could see that the classroom was slanted toward girls. At those young ages, girls naturally like to sit more than boys. Boys need to run around. Both need to socialize. The classroom disallows all but the sitting quietly and following directions. The Jr Hi years saw lots of shakeups for us. We finally took him out of school because the place was simply too mean. In particular, the teachers were too mean and it made him sick to his stomach. He was skinny and pale. It was a frightening time for this mother. First we tried a private school that let children do whatever they want, and he loved it. It was a school patterned after the Sudbury Valley School near Boston. They have been raising "free" children since the 60's. From their studies, it turns out that if kids are left alone, they want to learn. Kids want to grow up and want to grow up to be useful and successful. They are born with a sense of direction and huge curiosity, and self-knowledge. In our culture, this is systematically drummed out of us by adults who had it all drummed out of them -- all with the one word "should". The result is: we have not yet seen the adult of the species. But, this private school was, in fact, girl-biased. At a potluck, one of the main teachers chided Charlie to me: *Charlie* made this dish? I tried to say something about it to her later, that she doesn't want to be reinforcing the assumption that boys don't cook. She said that she figured that the system has been so slanted toward the boys for so long, it was time to slant toward the girls and even things up. I was irate, but I bit my tongue and didn't say anything. Charlie had to live with the situation, not me. Some months later Charlie came home complaining about how they treat the boys and I told him he didn't have to go back if he didn't want to. So, from then on, I kept him at home and we hid from the authorities until he was 16. I couldn't sign the school system's home-school papers and promise that I'd teach him this and that, because he wasn't interested in this and that. I did insist that he study 3 hours a day, but whatever he liked. It was math, science and computers. So, I can see what the article is saying. I have to say that any imposed gender-slant in the culture is detrimental to both genders. All the generations and cultures where the male had (or has), to a large extent, exclusivity on intellectuality and on power outside the home, he is also not allowed to cry, or to access to his feelings. Which gender suffers the larger loss? One more thing. The fact that women aren't in computing as much as men totally escapes me. I don't get it at all. Coding seems very much like sewing to me, requiring artful careful well-planned and often tedious work. I remember that, when typewriters first came out, it was men's work. And then it changed. So I wouldn't count it as decided yet. What do you think? Marilyn Davis From ajsiegel at optonline.net Tue Dec 7 09:41:19 2004 From: ajsiegel at optonline.net (ajsiegel@optonline.net) Date: Tue Dec 7 09:41:21 2004 Subject: [Edu-sig] Acadmic gender gap (was Thoughts) Message-ID: Joseph writes - > So before I buy into blaming video games for gender gaps, I would > like to see a whole lot more study. Please no. Not more studies. Either the playing of video games has an impact, or it does not. You and John seem to agree that it does. What that impact is, and whether is "good" or "bad", can only be a polticized conclusion - as there are no objective criteria for what is good and what is bad in this realm. We are on our own. Why is there such discomfort with that prospect? >We as students of computing > should be among the investigators. I think that students and practitioners of computing are among the least objective observers possible. Is someone in the position of, say, Alan Kay, able to objectively contemplate fully the sanity of his devotion to the notion of the children learning through the technology that computers have made available? What one wishes, in all good faith (or bad) to be true, tends to be found to be in fact true, where no criteria for an objective study of what is true, in truth, exists. Art From ajsiegel at optonline.net Tue Dec 7 09:51:58 2004 From: ajsiegel at optonline.net (ajsiegel@optonline.net) Date: Tue Dec 7 10:07:01 2004 Subject: [Edu-sig] Acadmic gender gap (was Thoughts) Message-ID: Marilyn writes - > One more thing. The fact that women aren't in computing as much as > men totally escapes me. I don't get it at all. Coding seems very > much like sewing to me, requiring artful careful well-planned and > often tedious work. Coding seems more like rebuilding carborateurs to me ;) But the cultural bias of the moment is that you are encouraged to make your analogy publically, in writing, in decent company, and I am not allowed to make mine - unless I am careless of my career. think about it. Art From lac at strakt.com Tue Dec 7 10:39:29 2004 From: lac at strakt.com (Laura Creighton) Date: Tue Dec 7 10:39:50 2004 Subject: [Edu-sig] editor for children (was Re: explaining functions [Possibly OT]) In-Reply-To: Message from "Lee Harr" of "Tue, 07 Dec 2004 06:02:47 +0430." References: Message-ID: <200412070939.iB79dT3R010973@ratthing-b246.strakt.com> In a message of Tue, 07 Dec 2004 06:02:47 +0430, "Lee Harr" writes: >>Does anybody have any recommendations for an editor for children? In th >e >>days I was speaking, I used an editor called 'brief' but I don't think t >hey >>are in business any more. > >What attributes are needed in a "for children" editor? >(or is a list of attributes what you are looking for?) > Not really. I taught the after school club emacs, which meant we spent a lot of time 'learnng how to use the editor'. They were bright, heavily motivated, and what was best, _only 5 of them_. And they got there by being very curious what I was doing to present stuff to them. But the next proposed summer lot will be a group of 30, and I don't think I will have enough individual instruction time. So I wonder if there is an editor they are likely to know -- perhaps unsurprisingly, most kids I know use Microsoft Word to edit things, and that's a _rotten_ editor for programming -- of if there is one that is known for the speed at which it is learnt. Laura From lac at strakt.com Tue Dec 7 11:05:43 2004 From: lac at strakt.com (Laura Creighton) Date: Tue Dec 7 11:05:52 2004 Subject: [Edu-sig] Acadmic gender gap (was Thoughts) In-Reply-To: Message from Marilyn Davis of "Mon, 06 Dec 2004 22:10:42 PST." References: Message-ID: <200412071005.iB7A5hfM011080@ratthing-b246.strakt.com> In a message of Mon, 06 Dec 2004 22:10:42 PST, Marilyn Davis writes: >One more thing. The fact that women aren't in computing as much as >men totally escapes me. I don't get it at all. Coding seems very >much like sewing to me, requiring artful careful well-planned and >often tedious work. I remember that, when typewriters first came out, >it was men's work. And then it changed. So I wouldn't count it as >decided yet. > >What do you think? > >Marilyn Davis Right now, at Chalmers University (in Sweden) the women outnumber the men in the Chemistry undergraduate department, while men still outnumber women in the other fields. The current belief is that until you get something like 30% of your class female, women will not show up in sufficient numbers to produce a 50/50 split. Women apparantly do not evaluate their university courses only based on 'how much they like the subject' or 'even how well they expect to do in the subject' but instead 'how much would I enjoy majoring / taking courses in the subject' -- or perhaps they think that they are unlikely to do well in a subject that does not already have a lot of other women. The men tend to read the syllabus, think 'I should do well in this' and sign up. The women look for other women to ask about the Major, and end up doing what some other woman explained to them worked out wonderfully for her. Not all, of course, but enough that this is statistically signigicant. At any rate, getting successful women graduates to come back and tell gymnasium (US: high school) students how terrific being a Chalmers Physics major was is now believed to be even more influential than they thought. The girls aren't learning how to sew, either. Mithlond, the Tolkien Society holds classes in sewing, so people can learn how to make period costumes. Heavily attended. Nobody is learning this stuff in school or at home any more. Laura From bvande at po-box.mcgill.ca Tue Dec 7 16:09:13 2004 From: bvande at po-box.mcgill.ca (Brian van den Broek) Date: Tue Dec 7 16:54:16 2004 Subject: [Edu-sig] Acadmic gender gap (was Thoughts) In-Reply-To: References: Message-ID: <41B5C799.8040600@po-box.mcgill.ca> Marilyn Davis said unto the world upon 2004-12-07 01:10: > One more thing. The fact that women aren't in computing as much as > men totally escapes me. I don't get it at all. Coding seems very > much like sewing to me, requiring artful careful well-planned and > often tedious work. I remember that, when typewriters first came out, > it was men's work. And then it changed. So I wouldn't count it as > decided yet. > > What do you think? > > Marilyn Davis Hi all, my experience isn't with teaching CS, but with teaching formal logic in university Philosophy departments, largely to humanities audiences. (Thanks again, btw, to those respondents to my query about ways to teach the general mathematical concept of a function.) But, I think there might be some overlap in the issues here. Most classes, the gender breakdown is pretty even, with slightly more women than men. Almost every time, the women are over-represented *both* in the group of the best students and in the group of students that fail. Once the symbolism starts, many of the female students immediately seem to think "this is math, and I cannot do math, so I cannot do this". When talking to them in office hours, etc., the big struggle is usually to convince them that they actually *can* understand the material. By contrast, the big struggle with many of the male students who are having difficulty is to convince them that they do not *yet* understand it. It is an odd contrast -- males seem to assume that of course they get this stuff, females that of course they cannot. Whenever I, with my modest skill set, have been asked to help a friend with their computer problems, the pattern is similar. Generally, my male friends have goofed something up, fuelled by a mistaken belief that they understood what was at issue. My female friends often have very minor difficulties that they actually do know how to resolve, save that they are convinced they don't. Instead of just fixing the problem, I generally try to help them find the answer on the 'net or in a manual and walk them through the fix. They end up saying something like "I'd just assumed I wouldn't understand." And this is often from people happily pursuing a PhD (in something non-mathematical). A funny/sad anecdote to close with: A number of years ago, when I was just starting my MA at a different school, I was TA'ing the advanced logic class. It was an axiomatic course, with a fair bit of proof-theory and model-theory, and the bulk of the audience was CS-students. (The CS department there required the course -- quite the bonus for the Philosophy dept.) An undergraduate friend of mine was in the course. She happened to be a shaved-headed lesbian with a very masculine style of dress. Two CS guys were sitting behind us, theorizing about why there were so few women in the course. (Said theorizing was most definitely *not* being done in what one might call a "welcoming" manner.) The look on their faces when my friend turned around and confronted them and they realized that she was, indeed, a she, was utterly priceless. Didn't make up for having heard them go on (or my discomfort/regret that as the TA I'd not been confronting them myself). But it came close. Best to all, Brian vdB From carle at hamlin.org Tue Dec 7 16:40:29 2004 From: carle at hamlin.org (Andrew Carle) Date: Tue Dec 7 17:39:55 2004 Subject: [Edu-sig] editor for children =?ISO-8859-1?Q?=28was?= Re: explaining functions=?ISO-8859-1?Q? [Possibly_OT]=29?= In-Reply-To: <200412070939.iB79dT3R010973@ratthing-b246.strakt.com> References: <200412070939.iB79dT3R010973@ratthing-b246.strakt.com> Message-ID: I run an all OS X lab, which gives me the freedom to run SubEthaEdit. It's a kid-friendly editor in that it does decent syntax coloring for a whole host of different code styles, will spell check in desired (useful for the text sections of our text adventures) and is otherwise simple and WSYWIG. If you're working with students under 18 at this point, asking them to use something other than the mouse and arrow keys for cursor control eats far too much of the hour. Andrew Carle MS Technology The Hamlin School From jhrsn at pitt.edu Tue Dec 7 22:00:59 2004 From: jhrsn at pitt.edu (Jim Harrison) Date: Tue Dec 7 21:59:12 2004 Subject: [Edu-sig] Acadmic gender gap (was Thoughts) In-Reply-To: Message-ID: on 12/6/04 4:58 PM, ajsiegel@optonline.net at ajsiegel@optonline.net wrote: > My son ended up at a "progressive" public high school, where students were > judged by their portfolios, the more elaborate the better - rather than by > test. > > Nothing like that existed in my time. > > He barely got by. I was told at one point that his graduation was in doubt. > > He made his way to a large somewhat institutional college - where he is judged > by performance on exams. And he is excelling. I admit that 1) we're pretty off topic and 2) generalizing from individual anecdotes is only slightly better than pure speculation. Having said that, I of course have an anecdote to contribute related to Arthur's comment. My son is currently a high school senior and has done very well. Although math/engineering oriented, his education is well-balanced by available measures. He's attended both private and public schools--public since 6th grade, at a well-regarded school that uses both traditional exams and portfolios. This is not a complaint against the strategies used in his school. However, I have noticed differences in his education and mine (in the 60s/70s): - Creation of "displays" rather than plain written papers tends to be emphasized, up to the senior high school year. These range from brochure-style pages to standup trifolds to flat posters and bulletin boards. I think the theory is that these work products are more interesting to the students than written papers, that the manual work of putting them together somehow consolidates the involved knowledge in at least a subset of kids, and these kinds of exercises teach kids about communication (or marketing, maybe?). - Education materials are more often professionally-produced or created from templates (e.g., the use of Powerpoint in class) and therefore look more "professional" than the typewritten, hand-lettered or -drawn materials that I had (though the actual content doesn't differ markedly). - Students very frequently work in groups and turn in collaborative projects. The theories behind doing this are probably well-known to this group and I'm not going to discuss it further except to mention that in my observation, one or two students will actually do the assignment, one will contribute at a lower level, and the rest will ride along uncommunicatively on the coattails of the others. My impression is that students tend to serve similar roles across multiple projects (the writers write, the artists do the artwork). I don't know if these behaviors could be gender-related. I don't doubt that these strategies do some good, but they also have effects that I don't think were foreseen. For example (here comes the anecdote), when my son was in middle school, he was assigned to create a class bulletin board as a work product for a book report on a Carl Sagan biography. He produced about 4 poorly hand-drawn notebook pages with minimal text, a trivial effort. As it developed, most of the boys had done similar work. I asked the teacher whether my son could create a Sagan-oriented web site as an alternative work product and was surprised to get an affirmative response. Given that opening, over two days he created a hand-coded interlinked site with 5 well-written essays on different aspects of Sagan's life, embedded images from NASA's planetary server, and hand drawn navigation icons. The teacher was amazed. So what's going on? Based on my observations of similar brochure- and display-oriented assignments and other situations through the years, I think this: 1. The attractiveness of the display/brochure approach is not universal. Some kids thrive with it and others feel that it is trivial and/or that their available talent and tools cannot produce something that they regard as worthwhile (or at least non-embarrassing). Thus they spend little effort on it. The production quality range of a typical assignment is very broad (I have no idea whether this could be gender-related). 2. The almost exclusive use of professional materials and templates for in-class teaching tends to reinforce the above feelings in some students. That's not to say that these materials are bad, but there can be an interaction if you're asking kids to produce brochure- or presentation-like assignments that resemble their classroom materials (including those created by the teacher) but are necessarily at a much lower production quality. 3. The emphasis on brochures and displays necessarily focuses some attention on the quality of formatting and graphic art rather than content. To produce something that looks like a quality product requires a fair amount of time and effort in an area that is likely not related to the information content of the assignment. This probably piques the interest of some kids but to others it trivializes the core of the assignment or may even provide barriers to fully engaging the material. 4. What if it takes a significant amount of time and effort to produce an assignment that will impress the class and teacher, there is the risk of working hard but creating something that you and others don't really like, and it's also "uncool" to be seen as trying too hard? Under those circumstances you trivialize the assignment and punt it. This was what was going on with my son and most of the other boys in the class in the anecdote above. When I changed the rules so that he could create something "cool," he engaged the content of the assignment. This is a particular set of circumstances that might not be generalizable. I also would not accuse the educational activities mentioned of being "anti-boy." However there are aspects of the way these activities are set up that appear to conflict in some ways with the typical middle-school and younger high school male dynamic. Jim Harrison Univ. of Pittsburgh From urnerk at qwest.net Tue Dec 7 22:29:11 2004 From: urnerk at qwest.net (Kirby Urner) Date: Tue Dec 7 22:29:14 2004 Subject: [Edu-sig] Acadmic gender gap (was Thoughts) In-Reply-To: Message-ID: <20041207212913.7CC841E4007@bag.python.org> > One more thing. The fact that women aren't in computing as much as > men totally escapes me. I don't get it at all. Coding seems very > much like sewing to me, requiring artful careful well-planned and > often tedious work. I remember that, when typewriters first came out, > it was men's work. And then it changed. So I wouldn't count it as > decided yet. > > What do you think? > > Marilyn Davis I think it's just a matter of time -- a rather short time -- until this evens up a *lot*. Geek girlz are realizing it's hot to be a techie, which rhymes with trekie. Can you say Seven of Nine? We are borg, and damn cute too (not that boys lack in the cutes department). Seriously, what you say is true: there's nothing inherently gender-specific in the art of computer programming. In how it's taught? Sure, sometimes. But pedagogy is malleable, as are stereotypes. All we need are a few dynamite CS teachers on the geek channel (one that boys can't wait to learn from), and geek chic ratchets up one more notch. Kirby My Geek Channel [tm] is what we're pushing to off-set the Military Channel [tm], which later is coming soon as well (the geek channel is more amorphous right now, given the Internet and how it works). From urnerk at qwest.net Tue Dec 7 22:41:11 2004 From: urnerk at qwest.net (Kirby Urner) Date: Tue Dec 7 22:41:12 2004 Subject: [Edu-sig] Acadmic gender gap (was Thoughts) In-Reply-To: <41B5C799.8040600@po-box.mcgill.ca> Message-ID: <20041207214112.099E51E4007@bag.python.org> > By contrast, the big struggle with many of the male students who are > having difficulty is to convince them that they do not *yet* understand > it. It is an odd contrast -- males seem to assume that of course they > get this stuff, females that of course they cannot. > What I often find about smart kids (and this is *definitely* just a rule of thumb -- lots of exceptions), is they have an aggressive stance toward what adults want to teach them. Like, I have this friend Jerritt, a much younger guy, who happens to be brilliant. He'll study something for a little while, get the gist of it, then, likely as not, he'll burst out with "that's just *absurd*, like that's so *stupid*, like why would people *do* it that way?" Boys may have an easier time being smart in this particular way because they're encouraged, more, to be up front with their aggression. Girls are supposed to be more covert, i.e. mean but in a more subtle/skillful and verbally artful kind of way. Boys are more likely to just dish out uninhibited sass. Of course these are well worn stereotypes -- indulge me, if you please. > Whenever I, with my modest skill set, have been asked to help a friend > with their computer problems, the pattern is similar. Generally, my male > friends have goofed something up, fuelled by a mistaken belief that they > understood what was at issue. My female friends often have very minor > difficulties that they actually do know how to resolve, save that they > are convinced they don't. Instead of just fixing the problem, I > generally try to help them find the answer on the 'net or in a manual > and walk them through the fix. They end up saying something like "I'd > just assumed I wouldn't understand." And this is often from people > happily pursuing a PhD (in something non-mathematical). Yeah, it can be a big surprise to discover the stuff is actually comprehensible. For decades, guys have excluded the women from the shop talks, letting them huddle in the kitchen, with shop talks of their own. But when the gender barrier comes down, and women catch up in the field, they find, sometimes to their surprise, that they're now in a position to lead the pack. "Whaddya know, I could be the next CTO of my company!" -- so true, girlfriend. > The look on their faces when my friend turned around and confronted them > and they realized that she was, indeed, a she, was utterly priceless. > Didn't make up for having heard them go on (or my discomfort/regret that > as the TA I'd not been confronting them myself). But it came close. > Yeah, priceless. And for everything else, there's MasterCard. Kirby From urnerk at qwest.net Tue Dec 7 23:17:18 2004 From: urnerk at qwest.net (Kirby Urner) Date: Tue Dec 7 23:17:20 2004 Subject: [Edu-sig] Acadmic gender gap (was Thoughts) In-Reply-To: Message-ID: <20041207221719.5641E1E4007@bag.python.org> Arthur: > What that impact is, and whether is "good" or "bad", can only be a > polticized conclusion - as there are no objective criteria for what is > good and what is bad in this realm. > > We are on our own. > > Why is there such discomfort with that prospect? > I can live with it. One aspect of today's video games that I think may be somewhat negative, is they just blow us away with their breakthrough sophistication. Some kid sitting in front of a Pygame console, manual open, just doesn't feel this is the cockpit of the same airplane, or even the same species of vehicle. "Tongue tied and twisted, just an earth-bound misfit, I" ('Learning to Fly', Momentary Lapse of Reason, Pink Floyd). For example, over Thanksgiving, I spent a goodly amount of time watching over the shoulder of my friend Les as he deftly maneuvered his way through a totalitarian world run by weird creatures from another dimension, with some human big brother quisling doing the propaganda -- cold, Eastern European looking towns, humans queuing for trains that never arrive, shuffling, heads down, guards with electric truncheons, ready to beat you back if you try to cross one of their crowd control lines. The physics in this game has been finely tuned. Les took me to an abandoned playground (no children, no sounds of fun). He picked up a cinder block and put it on one end of a see-saw, climbed an adjacent porch, and jumped on the other end of the see-saw. The cinder block flew up a little (it's heavy), and landed with a muffled thunk, kind of like the dead bodies do, elsewhere in this game. You can pick up just about any free object and throw it, sometimes with the aim to kill (several at once if you're good). Of course this virtual world is not the creation of one lone wolf coder. This is Valve, one of the strongest coding shops in the world right now. http://www.valvesoftware.com/ http://www.half-life2.com/ I think the workaround is to remind students that what we're up to is making "cave paintings" -- simplified homomorphisms (not isomorphisms) with several dimensions removed, and yet with enough intact analogies, enough realism, to impart the skills, heuristics, and habits of mind, that will serve the cave dweller well in future, as dimensions are added back. So learn your PyGame and SDL, and you'll be that much closer to your career objective. And who knows, along the way you might code some decent and fun little open source freebies, like Frozen Bubble (a staple in Linux world). Kirby From inxdr at yahoo.com.au Wed Dec 8 01:35:04 2004 From: inxdr at yahoo.com.au (Darren Payne) Date: Wed Dec 8 01:35:08 2004 Subject: [Edu-sig] Re: editor for children In-Reply-To: <20041207110029.59E041E4024@bag.python.org> Message-ID: <20041208003504.12292.qmail@web54604.mail.yahoo.com> May I suggest gvim (vim) as an editor. I have been using it for about 3 years with mainly yr10 - 12 students. Hoiwever, I have also shown it to 2 groups of very bright ten year olds who picked it up really easily. I like it because it is a dedicated editor for programmers, allows you to select the syntax highlighting for the language you are using and you can compile nad run your code from within gvim if you wish. Oh ... and it is open source too, runs on both windows and linux (probly mac too). regards ===== ----------------------------------------------------------------------------------- regards Darren Payne Hurlstone Agricultural High School Ph: 9829 9222 Fax: 98292026 __________________________________ Do you Yahoo!? Yahoo! Mail - Helps protect you from nasty viruses. http://promotions.yahoo.com/new_mail From john.zelle at wartburg.edu Wed Dec 8 01:54:58 2004 From: john.zelle at wartburg.edu (John M. Zelle) Date: Wed Dec 8 01:55:09 2004 Subject: [Edu-sig] Acadmic gender gap (was Thoughts) Message-ID: <200412071854.AA326041710@wartburg.edu> I hate to belabor this thread, as it seems a bit off topic, still I really feel that I've learned a lot. I just have to make one last response. See below. ---------- Original Message ---------------------------------- From: "Kirby Urner" Date: Tue, 7 Dec 2004 14:17:18 -0800 >Arthur: >> What that impact is, and whether is "good" or "bad", can only be a >> polticized conclusion - as there are no objective criteria for what is >> good and what is bad in this realm. >> >> We are on our own. >> >> Why is there such discomfort with that prospect? >> > >I can live with it. > I find this a dangerous attitude. You could just as easily say we agree that taking large amounts of LSD has effects on very young children. Whether that is "good" or "bad" can only be a politicized conclusion, as there is no objective criteria for what is good and bad. I'm sorry, but I can't accept that. If good scientific research does indeed establish that early exposure to video games and other electronic media causes loss of creativity, aggression, poor socialization, lack of concentration and contributes to academic failure, and if it is shown to be linked to a mental disorder (ADHD), then I cannot accept that as "good" in any stretch of the imagination. I'm not saying that the research at this point is definitive, but it's damn scary. Please don't misinterpret; I'm not saying that every kid who plays video games is headed for trouble, that's not the way complex causation works. But if it's even one in 10 or 1 in 50, that's a significant issue. Drinking alchohol during pregnancy has been linked to similar symptoms for the child. We try to discourage that. On the other hand, many parents are fighting tooth and nail to get more computers into early education. Why not wait? They can learn anything they need to learn about computers when they're in Junior High or later. It worked for most of us. >One aspect of today's video games that I think may be somewhat negative, is >they just blow us away with their breakthrough sophistication. Some kid >sitting in front of a Pygame console, manual open, just doesn't feel this is >the cockpit of the same airplane, or even the same species of vehicle. >"Tongue tied and twisted, just an earth-bound misfit, I" ('Learning to Fly', >Momentary Lapse of Reason, Pink Floyd). > >For example, over Thanksgiving, I spent a goodly amount of time watching >over the shoulder of my friend Les as he deftly maneuvered his way through a >totalitarian world run by weird creatures from another dimension, with some >human big brother quisling doing the propaganda -- cold, Eastern European >looking towns, humans queuing for trains that never arrive, shuffling, heads >down, guards with electric truncheons, ready to beat you back if you try to >cross one of their crowd control lines. > >The physics in this game has been finely tuned. Les took me to an abandoned >playground (no children, no sounds of fun). He picked up a cinder block and >put it on one end of a see-saw, climbed an adjacent porch, and jumped on the >other end of the see-saw. The cinder block flew up a little (it's heavy), >and landed with a muffled thunk, kind of like the dead bodies do, elsewhere >in this game. You can pick up just about any free object and throw it, >sometimes with the aim to kill (several at once if you're good). > >Of course this virtual world is not the creation of one lone wolf coder. >This is Valve, one of the strongest coding shops in the world right now. > >http://www.valvesoftware.com/ >http://www.half-life2.com/ > >I think the workaround is to remind students that what we're up to is making >"cave paintings" -- simplified homomorphisms (not isomorphisms) with several >dimensions removed, and yet with enough intact analogies, enough realism, to >impart the skills, heuristics, and habits of mind, that will serve the cave >dweller well in future, as dimensions are added back. > >So learn your PyGame and SDL, and you'll be that much closer to your career >objective. And who knows, along the way you might code some decent and fun >little open source freebies, like Frozen Bubble (a staple in Linux world). > >Kirby > > >_______________________________________________ >Edu-sig mailing list >Edu-sig@python.org >http://mail.python.org/mailman/listinfo/edu-sig > From urnerk at qwest.net Wed Dec 8 02:58:22 2004 From: urnerk at qwest.net (Kirby Urner) Date: Wed Dec 8 02:58:26 2004 Subject: [Edu-sig] Acadmic gender gap (was Thoughts) In-Reply-To: <200412071854.AA326041710@wartburg.edu> Message-ID: <20041208015824.4A8261E4007@bag.python.org> > -----Original Message----- > From: John M. Zelle [mailto:john.zelle@wartburg.edu] > Sent: Tuesday, December 07, 2004 4:55 PM > To: edu-sig@python.org; Kirby Urner > Subject: RE: RE: [Edu-sig] Acadmic gender gap (was Thoughts) > > I hate to belabor this thread, as it seems a bit off topic, still I really > feel that I've learned a lot. I just have to make one last response. See > below. > I don't think we should be too concerned about the apparent off topic-ness. We've zoomed out from the specific Python course (whatever) and are exploring the broader terrain. But it's ridiculous to pretend that the zoomed-in particulars have no context. As educators, it's responsible and topical to at least brush with these threads. > > I find this a dangerous attitude. You could just as easily say we agree > that taking large amounts of LSD has effects on very young children. > Whether that is "good" or "bad" can only be a politicized conclusion, as > there is no objective criteria for what is good and bad. > I too find it somewhat dangerous (like life itself). Nor do I have any illusions that Arthur's protestations about please, no more studies, will be heeded. Science will barrel forward, come hell or high water, churning out studies on any and everything. So I expect these studies. My recommendation over on math-teach, where a similar thread came up in regard to global warming (similar in the sense of being so broad brush as to appear off topic), was to both read the science *and* study the political and ideological affiliations of the scientists who do it. I think we're more sophisticated about science these days: we know the funding sources are not irrelevant. My own prejudice is that "video game" is a very broad category and studies will need to start with a long preamble about what, exactly, they mean by it. You have coin-operated arcade games, often two-person, in the malls, in theaters. You have Xbox, Nintendo, the various game consoles that use a TV screen -- these are very similar to what's in the mall, in terms of hardware and software. But the interface is more general purpose (as you're able to play a wide variety of games, not just "car racing" or whatever). Then you have stuff that runs on a general purpose computer. However, even these categories don't go very far in defining the taxonomy. It's as complicated as a zoo. Do we want to study whether "animals" (in general) are good or bad for kids, or do we want to look at the various species, one at a time. A gorilla might not have quite the same effect as a zebra. At Les's house, there's a quite young child (younger than my daughter). She isn't strongly encouraged to play computer games -- maybe not at all (I've never seen her play one). She's out with the horses, learning to ride them. The game Les was playing is specifically aimed at an somewhat older demographic, as are many of these games. My post was aimed at one specific downside: the power of professionally designed games to encourage a young person from getting started. Ordinary mathematics may have a similarly dismaying impact: pick up something by Euler, and feel like you'll never be like that. Euler is the like Valve on steroids -- just too cool. Kirby From tjd at sfu.ca Wed Dec 8 03:22:05 2004 From: tjd at sfu.ca (Toby Donaldson) Date: Wed Dec 8 03:22:09 2004 Subject: [Edu-sig] comments on Idle and Python In-Reply-To: <20041208005531.A63961E400C@bag.python.org> References: <20041208005531.A63961E400C@bag.python.org> Message-ID: <41B6654D.8080405@sfu.ca> With this discussion about what editor to use for Python education, I thought I'd share some of the issues that have come up with Idle. I am curious if other people have the same or similar issues with Idle. This is based on a semester-long first-year university level programming course in Python, with about 200 people in my classes (about 400 overall). Overall, Idle was pretty good and we plan to use it again. But there are some confusing defaults that confused a number of students and made their first experiences a little more confusing than necessary. - The File menu is confusing because the first choice is to open a "New Window". Is this a shell window or a file window? The difference between the shell and a file is not obvious to most beginners. Better would be "New File", or "Start New Python File" even. - Syntax coloring only happens if you save your file as a '.py' file. Unfortunately, by default, Idle does *not* save new files as a .py files. Thus many students ending up files that run fine, but lack syntax-coloring. So, Idle should either save all files as .py by default, or syntax-coloring should be turned on by default. - The default behavior when press F5 ('run') is to prompt you if you want to save a file. I have never seen anyone *not* want to save their file in this situation, so the more useful default would be to automatically save the file before it is run. - There is no "..." when you enter a multi-line shell command, e.g. Idle prints this >>> for i in range(10): <--- cursor sits here blinking The problem is that is nearly the same behavior as when you run a function that doesn't return (e.g. due to an infinite loop). So it would be helpful if Idle set sys.ps2 to '...' by default. Toby From urnerk at qwest.net Wed Dec 8 03:35:31 2004 From: urnerk at qwest.net (Kirby Urner) Date: Wed Dec 8 03:35:33 2004 Subject: [Edu-sig] Acadmic gender gap (was Thoughts) In-Reply-To: <20041208015824.4A8261E4007@bag.python.org> Message-ID: <20041208023532.ED5341E400B@bag.python.org> > My post was aimed at one specific downside: the power of professionally > designed games to encourage a young person from getting started. Ordinary ^^^^^^^^^ discourage > mathematics may have a similarly dismaying impact: pick up something by > Euler, and feel like you'll never be like that. Euler is the like Valve > on steroids -- just too cool. > > Kirby I was called to dinner just after typing these words. Dinner conversation wander to numbers so important they get their own letters (often greek). But Euler, I said, one of the greatest math heads of all time, has a number named after him: e. Actually, I said there were several theories kicking around about what 'e' might mean, other than lim n->infinity (1 + 1/n)^n -- but I'm going with 'Euler' -- good mnemonic. My daughter is 10. She and I play 'Uru' together. That game is a work of art, destined to last for centuries. A classic even in our own time. Kirby From john.zelle at wartburg.edu Wed Dec 8 04:09:44 2004 From: john.zelle at wartburg.edu (John M. Zelle) Date: Wed Dec 8 04:09:52 2004 Subject: [Edu-sig] comments on Idle and Python In-Reply-To: <41B6654D.8080405@sfu.ca> References: <20041208005531.A63961E400C@bag.python.org> <41B6654D.8080405@sfu.ca> Message-ID: <32844.167.142.253.65.1102475384.squirrel@167.142.253.65> I can't disagree with any of Toby's comments, but overall we like IDLE very much here. On a slightly more aggravating front, we and others have noticed that IDLE 1.04 is not as stable under Windows as previous versions. It seems that there are situations that can cause the shell to lose communication with its underlying subprocess. This happens sporadically, so it is a bit hard to reproduce. However, if you simply run a program with an input (or raw_input) function and then close the shell by clicking its close box while it is waiting for input, it seems to leave the subprocess hanging about 1/3 to 1/2 the time. The result is that the IDLE windows stop updating/refreshing and cannot even be killed. One has to resort to the task manager and kill the hanging processes. I don't know if this is a problem in IDLE or an underlying TK issue, but it happens enough to be annoying. Avoiding the close box seems to help, but I'm not sure even that is a 100% solution. Anyway, I'm hoping that IDLE 1.1 in Python 2.4 solves this problem. Bad defaults I can change; random crashes are very discouraging to students. --John Toby Donaldson said: > With this discussion about what editor to use for Python education, I > thought I'd share some of the issues that have come up with Idle. I am > curious if other people have the same or similar issues with Idle. This > is based on a semester-long first-year university level programming > course in Python, with about 200 people in my classes (about 400 overall). > > Overall, Idle was pretty good and we plan to use it again. But there are > some confusing defaults that confused a number of students and made > their first experiences a little more confusing than necessary. > > - The File menu is confusing because the first choice is to open a > "New Window". Is this a shell window or a file window? The difference > between the shell and a file is not obvious to most beginners. Better > would be "New File", or "Start New Python File" even. > > - Syntax coloring only happens if you save your file as a '.py' file. > Unfortunately, by default, Idle does *not* save new files as a .py > files. Thus many students ending up files that run fine, but lack > syntax-coloring. So, Idle should either save all files as .py by > default, or syntax-coloring should be turned on by default. > > - The default behavior when press F5 ('run') is to prompt you if you > want to save a file. I have never seen anyone *not* want to save their > file in this situation, so the more useful default would be to > automatically save the file before it is run. > > - There is no "..." when you enter a multi-line shell command, e.g. > Idle prints this > > >>> for i in range(10): > <--- cursor sits here blinking > > The problem is that is nearly the same behavior as when you run a > function that doesn't return (e.g. due to an infinite loop). > So it would be helpful if Idle set sys.ps2 to '...' by default. > > Toby > > _______________________________________________ > Edu-sig mailing list > Edu-sig@python.org > http://mail.python.org/mailman/listinfo/edu-sig > -- John M. Zelle, Ph.D. Professor of Computer Science Wartburg College From chackowsky.nick at portal.brandonsd.mb.ca Wed Dec 8 04:49:59 2004 From: chackowsky.nick at portal.brandonsd.mb.ca (Nick J Chackowsky) Date: Wed Dec 8 04:51:31 2004 Subject: [Edu-sig] comments on Idle and Python In-Reply-To: <41B6654D.8080405@sfu.ca> References: <20041208005531.A63961E400C@bag.python.org> <41B6654D.8080405@sfu.ca> Message-ID: <41B679E7.6010503@portal.brandonsd.mb.ca> Toby Donaldson wrote: > > > - Syntax coloring only happens if you save your file as a '.py' > file. Unfortunately, by default, Idle does *not* save new files as a > .py files. Thus many students ending up files that run fine, but lack > syntax-coloring. So, Idle should either save all files as .py by > default, or syntax-coloring should be turned on by default. Hello. Long time lurker, first time poster. Hope this works. The "delayed syntax coloring" and lack of default .py extension are my #1 and #2 beefs with Idle. I wonder if this is by design or by accident. If by design, does anyone know why? Nick. From kent37 at tds.net Wed Dec 8 11:26:24 2004 From: kent37 at tds.net (Kent Johnson) Date: Wed Dec 8 11:26:30 2004 Subject: [Edu-sig] comments on Idle and Python In-Reply-To: <41B679E7.6010503@portal.brandonsd.mb.ca> References: <20041208005531.A63961E400C@bag.python.org> <41B6654D.8080405@sfu.ca> <41B679E7.6010503@portal.brandonsd.mb.ca> Message-ID: <41B6D6D0.80407@tds.net> Maybe someone should propose a patch? Kent Nick J Chackowsky wrote: > Toby Donaldson wrote: > >> >> >> - Syntax coloring only happens if you save your file as a '.py' >> file. Unfortunately, by default, Idle does *not* save new files as a >> .py files. Thus many students ending up files that run fine, but lack >> syntax-coloring. So, Idle should either save all files as .py by >> default, or syntax-coloring should be turned on by default. > > > Hello. Long time lurker, first time poster. Hope this works. > > The "delayed syntax coloring" and lack of default .py extension are my > #1 and #2 beefs with Idle. I wonder if this is by design or by accident. > If by design, does anyone know why? > > Nick. > > _______________________________________________ > Edu-sig mailing list > Edu-sig@python.org > http://mail.python.org/mailman/listinfo/edu-sig > From ajsiegel at optonline.net Wed Dec 8 12:34:49 2004 From: ajsiegel at optonline.net (Arthur) Date: Wed Dec 8 12:35:08 2004 Subject: [Edu-sig] Acadmic gender gap (was Thoughts) In-Reply-To: <200412071854.AA326041710@wartburg.edu> Message-ID: <0I8E000R4IU6AT@mta9.srv.hcvlny.cv.net> John writes - > > I hate to belabor this thread, as it seems a bit off topic, still I really > feel that I've learned a lot. I just have to make one last response. See > below. > > Kirby writes - > >Arthur: > >> What that impact is, and whether is "good" or "bad", can only be a > >> polticized conclusion - as there are no objective criteria for what is > >> good and what is bad in this realm. > >> > >> We are on our own. > >> > >> Why is there such discomfort with that prospect? > >> > > > >I can live with it. > > > > I find this a dangerous attitude. You could just as easily say we agree > that taking large amounts of LSD has effects on very young children. > Whether that is "good" or "bad" can only be a politicized conclusion, as > there is no objective criteria for what is good and bad. > > I'm sorry, but I can't accept that. If good scientific research does > indeed establish that early exposure to video games and other electronic > media causes loss of creativity, aggression, poor socialization, lack of > concentration and contributes to academic failure, and if it is shown to > be linked to a mental disorder (ADHD), then I cannot accept that as "good" > in any stretch of the imagination. John please don't sell me short here. I am 100% for good scientific research. And 100% for good mathematical understanding of the limits of mathematical reasoning, and a scientific understanding of the limits of scientific understanding. When you have the "creativity meter" perfected, let me know. To tie some threads together, the elaborately funded studies of the Alice group at a university no less prestigious than Carnegie Mellon, concluded - I am not going back to the document, but the phrase sticks in my mind, so I think I am quoting from it directly - "Typing is Hard". "Hard" is bad, apparently. Because "Typing is Hard" allows us to conclude that it is an impediment to learning. And learning environments need to avoid making students type. Alice does that. Science at work. Laura is apparently not taking advantage of these findings in her approach to teaching programming. Thank goodness. Art I'm not saying that the research at > this point is definitive, but it's damn scary. Please don't misinterpret; > I'm not saying that every kid who plays video games is headed for trouble, > that's not the way complex causation works. But if it's even one in 10 or > 1 in 50, that's a significant issue. > > Drinking alchohol during pregnancy has been linked to similar symptoms for > the child. We try to discourage that. On the other hand, many parents are > fighting tooth and nail to get more computers into early education. Why > not wait? They can learn anything they need to learn about computers when > they're in Junior High or later. It worked for most of us. > > >One aspect of today's video games that I think may be somewhat negative, > is > >they just blow us away with their breakthrough sophistication. Some kid > >sitting in front of a Pygame console, manual open, just doesn't feel this > is > >the cockpit of the same airplane, or even the same species of vehicle. > >"Tongue tied and twisted, just an earth-bound misfit, I" ('Learning to > Fly', > >Momentary Lapse of Reason, Pink Floyd). > > > >For example, over Thanksgiving, I spent a goodly amount of time watching > >over the shoulder of my friend Les as he deftly maneuvered his way > through a > >totalitarian world run by weird creatures from another dimension, with > some > >human big brother quisling doing the propaganda -- cold, Eastern European > >looking towns, humans queuing for trains that never arrive, shuffling, > heads > >down, guards with electric truncheons, ready to beat you back if you try > to > >cross one of their crowd control lines. > > > >The physics in this game has been finely tuned. Les took me to an > abandoned > >playground (no children, no sounds of fun). He picked up a cinder block > and > >put it on one end of a see-saw, climbed an adjacent porch, and jumped on > the > >other end of the see-saw. The cinder block flew up a little (it's > heavy), > >and landed with a muffled thunk, kind of like the dead bodies do, > elsewhere > >in this game. You can pick up just about any free object and throw it, > >sometimes with the aim to kill (several at once if you're good). > > > >Of course this virtual world is not the creation of one lone wolf coder. > >This is Valve, one of the strongest coding shops in the world right now. > > > >http://www.valvesoftware.com/ > >http://www.half-life2.com/ > > > >I think the workaround is to remind students that what we're up to is > making > >"cave paintings" -- simplified homomorphisms (not isomorphisms) with > several > >dimensions removed, and yet with enough intact analogies, enough realism, > to > >impart the skills, heuristics, and habits of mind, that will serve the > cave > >dweller well in future, as dimensions are added back. > > > >So learn your PyGame and SDL, and you'll be that much closer to your > career > >objective. And who knows, along the way you might code some decent and > fun > >little open source freebies, like Frozen Bubble (a staple in Linux > world). > > > >Kirby > > > > > >_______________________________________________ > >Edu-sig mailing list > >Edu-sig@python.org > >http://mail.python.org/mailman/listinfo/edu-sig > > > > _______________________________________________ > Edu-sig mailing list > Edu-sig@python.org > http://mail.python.org/mailman/listinfo/edu-sig From ajsiegel at optonline.net Wed Dec 8 12:53:32 2004 From: ajsiegel at optonline.net (Arthur) Date: Wed Dec 8 12:53:48 2004 Subject: [Edu-sig] comments on Idle and Python In-Reply-To: <41B6654D.8080405@sfu.ca> Message-ID: <0I8E00MGOJPCED@mta8.srv.hcvlny.cv.net> Toby writes - > - The default behavior when press F5 ('run') is to prompt you if you > want to save a file. I have never seen anyone *not* want to save their > file in this situation, so the more useful default would be to > automatically save the file before it is run. By saying that it is the default indicates, I assume, that you understand that the behavior you want can be toggled via Options --> Configuration --> General. But I agree it is the wrong default. I believe that Tim Peters has expressed his opinion that the default should be to save without prompting. It seems to me it would be an issue only if one lost the "Undo" functionality after one saved. But one does not. You can save, and still undo changes made before the save. Which is great, and "state-of-the-art". Given that, the need *not* to save before a run would seem an unusual circumstance, and prompting to save a relic of the past. So yes, it does seem strange that this is the default behavior. Art From ajsiegel at optonline.net Wed Dec 8 14:01:12 2004 From: ajsiegel at optonline.net (Arthur) Date: Wed Dec 8 14:01:28 2004 Subject: [Edu-sig] comments on Idle and Python In-Reply-To: <41B6D6D0.80407@tds.net> Message-ID: <0I8E002Q7MU58P@mta2.srv.hcvlny.cv.net> Kent writes - > Kent writes - > Maybe someone should propose a patch? > > Kent Therein lies an OT tale. I am a bit familiar with the IDLE code because relatively early in my Python learning cycle I used it for its tutorial value. One of the important things about having IDLE in the standard distribution is the fact that it can serve as a "model" application to study. (The main problem I had at that stage was trying to sort out what was Tkinter specific code, and what was Python "built-in" code. But sorting that out was part of the challenge it presented. It wasn't easy, at that stage of the game. But I find "hard", within reason, more educational than "easy". How to measure "within reason" being where the art comes in. I think Python is well proportioned in this regard, which is what finds me here. ((I am not a lawyer, but have some legal education - and understand the legal edifice to be built upon the fiction of the indefinable "reasonable man" (((s/b reasonable "person", but we know what is meant - at least now))), which perhaps prepares me to be not uncomfortable with an educational philosophy built upon a concept of "reasonableness", un-measurable though it may be.))) Have I digressed? I would like to distribute PyGeo with an IDE. And about the only thing I require beyond IDLE's native facilities for the PyGeo IDE is the ability to add another level of syntax highlighting for the PyGeo specific API. The ability to customize in this fashion is a feature of most programmers editors, which is why we find Python syntax highlighting possible on most of the programmers editors out there. Not surprisingly, IDLE, under the covers, is designed with some modularity. And it looked to me by touching a few lines of existing IDLE code - whalaa - the ability to add domain specific color syntax highlighting was there. Which I then suggest on the IDLE-DEV mailing list. No response. Resend, pleading for a "no" if that is to be the response. No response. Private e-mail to the current lead developer. No response. Perhaps you have better luck. Art From arnd.baecker at web.de Wed Dec 8 14:22:53 2004 From: arnd.baecker at web.de (Arnd Baecker) Date: Wed Dec 8 14:22:53 2004 Subject: [Edu-sig] comments on Idle and Python In-Reply-To: <0I8E002Q7MU58P@mta2.srv.hcvlny.cv.net> References: <0I8E002Q7MU58P@mta2.srv.hcvlny.cv.net> Message-ID: On Wed, 8 Dec 2004, Arthur wrote: [...] > I would like to distribute PyGeo with an IDE. And about the only thing I > require beyond IDLE's native facilities for the PyGeo IDE is the ability to > add another level of syntax highlighting for the PyGeo specific API. The > ability to customize in this fashion is a feature of most programmers > editors, which is why we find Python syntax highlighting possible on most of > the programmers editors out there. > > Not surprisingly, IDLE, under the covers, is designed with some modularity. > And it looked to me by touching a few lines of existing IDLE code - whalaa - > the ability to add domain specific color syntax highlighting was there. > > Which I then suggest on the IDLE-DEV mailing list. > > No response. > > Resend, pleading for a "no" if that is to be the response. > > No response. > > Private e-mail to the current lead developer. > > No response. > > Perhaps you have better luck. I had similar experiences with the development of IDLE. We wanted to use IDLE in a computational physics course, however it was impossible to have two idle instances on the same (Linux) machine because of some socket stuff. My post http://mail.python.org/pipermail/idle-dev/2003-February/001663.html recieved no response. So IDLE was unusable for our course (and, I just checked, with IDLE 1.0.4, Python 2.3.4 the problem is still there ...). So now we are using happily ipython, http://ipython.scipy.org/ together with kate, or xemacs or vi(m), as editor, whatever the student prefers. Just my 2cents, Arnd From ajsiegel at optonline.net Wed Dec 8 15:26:59 2004 From: ajsiegel at optonline.net (Arthur) Date: Wed Dec 8 15:27:41 2004 Subject: [Edu-sig] Acadmic gender gap (was Thoughts) In-Reply-To: Message-ID: <0I8E00M9DQT4OU@mta6.srv.hcvlny.cv.net> Robert writes - > > There is however something to be said however for keeping things > simple. If you can teach something, without artificially adding to the > list of requirements, then you are likely to save yourself some > headaches. Sure there is something to be said for this. But I think you might agree there is not a scientific measure to be made here, outside (perhaps) of contexts that are so narrow as to be meaningless for any practical application. What is more scientific, it seems to me, are identifiable phenomena like the law of diminishing returns, and the "law" of unintended consequences of activity within the realm of real world complexity which is beyond our ability to comprehend. At some point, within a particular context and where an educational process is the goal, easier becomes too easy. We seem to agree there. Based on feel. The legal term for studies (at least the ones I have heard discussed here) that on the surface purport to deal with these issues is "loophole". Since they are not in essence in any sense scientific, there is no coherent scientific argument to be made to refute them. They rely upon their institutional affiliate and their ability to get funded as their authority. And will stand with more authority than they merit. That is a real *social* phenomena. I believe more real and measurable then the study itself. Which leaves the alternative, at least for those of us unaffiliated, to rant at them. Or at least that is the only alternative I have been able to see. But nobody likes a ranter. I should know ;) Art From urnerk at qwest.net Wed Dec 8 17:42:08 2004 From: urnerk at qwest.net (Kirby Urner) Date: Wed Dec 8 17:42:10 2004 Subject: [Edu-sig] Acadmic gender gap (was Thoughts) In-Reply-To: <0I8E00M9DQT4OU@mta6.srv.hcvlny.cv.net> Message-ID: <20041208164208.7443D1E4007@bag.python.org> > Which leaves the alternative, at least for those of us unaffiliated, to > rant at them. Or at least that is the only alternative I have been able > to see. > > But nobody likes a ranter. > > I should know ;) > > Art Those with money who don't like the science party line of the day, are likely to create affiliations out of whole cloth, and fund counter-science. In the global warming department, you'll find the Hoover Institute with funding from Scaife, pushing back against the UCSD Scripps Institution of Oceanography and National Geographic, for example. At least that's my current birds eye view, which may be inaccurate, since global warming is only a peripheral vision thing for me at the moment -- right out there with OWL, DAML and RDF. In any case, that's an alternative to ranting as an unaffiliated being. Either make some new friends, or, failing that, buy some. Kirby From ajsiegel at optonline.net Wed Dec 8 18:42:20 2004 From: ajsiegel at optonline.net (ajsiegel@optonline.net) Date: Wed Dec 8 18:57:23 2004 Subject: [Edu-sig] Acadmic gender gap (was Thoughts) Message-ID: <103907710346ea.10346ea1039077@optonline.net> ----- Original Message ----- From: Kirby Urner Date: Wednesday, December 8, 2004 11:42 am Subject: RE: RE: [Edu-sig] Acadmic gender gap (was Thoughts) > > > Which leaves the alternative, at least for those of us > unaffiliated, to > > rant at them. Or at least that is the only alternative I have > been able > > to see. > > > > But nobody likes a ranter. > > > > I should know ;) > > > > Art > > Those with money who don't like the science party line of the day, are > likely to create affiliations out of whole cloth, and fund counter- > science. The analogy you are making doesn't completely work for me. I don't see the issue here as competing science. I see bad science in the face of questions that cannot be answered by science. If my thesis is correct, if I stick with science, I can only counter with more bad science. But you describe the dynamics correctly. It becomes a funding game. *If* we were talking science, one can sleep with the confidence that in the end, the better science would prevail. If I am correct, and there is no scientific counter to be made, funding will decide the day. And one cannot sleep so well. And my darker visions arise again. Art > In the global warming department, you'll find the Hoover Institute > withfunding from Scaife, pushing back against the UCSD Scripps > Institution of > Oceanography and National Geographic, for example. > > At least that's my current birds eye view, which may be > inaccurate, since > global warming is only a peripheral vision thing for me at the > moment -- > right out there with OWL, DAML and RDF. > > In any case, that's an alternative to ranting as an unaffiliated > being.Either make some new friends, or, failing that, buy some. > > Kirby > > > _______________________________________________ > Edu-sig mailing list > Edu-sig@python.org > http://mail.python.org/mailman/listinfo/edu-sig > From urnerk at qwest.net Wed Dec 8 21:21:51 2004 From: urnerk at qwest.net (Kirby Urner) Date: Wed Dec 8 21:21:54 2004 Subject: [Edu-sig] explaining functions [Possibly OT] Message-ID: <20041208202153.51BB21E4007@bag.python.org> > >>> def ifthen(p,q): > return (not p) or q > > i.e. (~p | q) <-> (p -> q) > > >>> combos = ((True,True),(True,False),(False,True),(False,False)) > > >>> for p,q in combos: > print "Inputs: %s\t%s\tOutput: %s" % (p, q, ifthen(p,q) ) > > Inputs: True True Output: True > Inputs: True False Output: False > Inputs: False True Output: True > Inputs: False False Output: True > > > Kirby On more quickie regarding 'functions': I've got these integrated into a curriculum outline here: http://www.4dsolutions.net/ocn/mainoutline.html You'll see it's pretty traditional, but the context is clearly influenced by computer science. I haven't touched this document since Oct 9, 2003 but still consider it current enough to be useful in the field. Kirby From florian at reichl.net Wed Dec 8 22:22:22 2004 From: florian at reichl.net (Florian Reichl) Date: Wed Dec 8 22:22:26 2004 Subject: [Edu-sig] comments on Idle and Python In-Reply-To: <32844.167.142.253.65.1102475384.squirrel@167.142.253.65> References: <20041208005531.A63961E400C@bag.python.org> <41B6654D.8080405@sfu.ca> <32844.167.142.253.65.1102475384.squirrel@167.142.253.65> Message-ID: <41B7708E.5050007@reichl.net> John M. Zelle schrieb: > I can't disagree with any of Toby's comments, but overall we like IDLE > very much here. > > On a slightly more aggravating front, we and others have noticed that IDLE > 1.04 is not as stable under Windows as previous versions. It seems that > there are situations that can cause the shell to lose communication with > its underlying subprocess. This happens sporadically, so it is a bit hard > to reproduce. Same at our school: Sometimes the students just say "Run Module" but they just do not return to the Python Shell windows. Also their code in the editor window is not executed. So if they return to the Python Shell window manually their code changes in the editor have no effect to the shell. So the students loose confidence in idle and begin to ask for another development environment. Did anyone have the same experiences and got it solved? Best regards, Florian From pchase at sulross.edu Wed Dec 8 23:17:29 2004 From: pchase at sulross.edu (Peter Chase) Date: Wed Dec 8 23:17:34 2004 Subject: [Edu-sig] comments on Idle and Python In-Reply-To: <41B7708E.5050007@reichl.net> References: <20041208005531.A63961E400C@bag.python.org> <41B6654D.8080405@sfu.ca> <32844.167.142.253.65.1102475384.squirrel@167.142.253.65> <41B7708E.5050007@reichl.net> Message-ID: <41B77D79.6040805@sulross.edu> Florian Reichl wrote: > John M. Zelle schrieb: > >> I can't disagree with any of Toby's comments, but overall we like IDLE >> very much here. >> >> On a slightly more aggravating front, we and others have noticed that >> IDLE >> 1.04 is not as stable under Windows as previous versions. It seems that >> there are situations that can cause the shell to lose communication with >> its underlying subprocess. This happens sporadically, so it is a bit >> hard >> to reproduce. > > > Same at our school: > > Sometimes the students just say "Run Module" but they just do not return > to the Python Shell windows. > > Also their code in the editor window is not executed. So if they return > to the Python Shell window manually their code changes in the editor > have no effect to the shell. > > So the students loose confidence in idle and begin to ask for another > development environment. > > > Did anyone have the same experiences and got it solved? > > Best regards, > Florian > > _______________________________________________ > Edu-sig mailing list > Edu-sig@python.org > http://mail.python.org/mailman/listinfo/edu-sig > Chances are that if you open the Task Manager you will see a number of active python.exe processes that are still running. You can kill them and then the program may run successfully. From missive at hotmail.com Thu Dec 9 02:46:11 2004 From: missive at hotmail.com (Lee Harr) Date: Thu Dec 9 02:47:04 2004 Subject: [Edu-sig] Re: Acadmic gender gap (was Thoughts) Message-ID: >One aspect of today's video games that I think may be somewhat negative, is >they just blow us away with their breakthrough sophistication. Some kid >sitting in front of a Pygame console, manual open, just doesn't feel this >is >the cockpit of the same airplane, or even the same species of vehicle. So true. When I first got a computer and found out I could program it, there was a leap there that "OK... so I can make the computer do pretty much anything. It's just a simple matter of programming!" ;o) But at that point the leap was to Lode Runner and Castle Wolfenstein, which really is not much different from the leap to Immersive3D Environment Game o' the Week, but it sure does look a lot different. To me it is a question of abstraction. If you can write code to pick a random color, you can write code to have a bad guy choose a random target. But try convincing someone who has been living in a completely different world for the past week that he needs to be able to tell a turtle how to make a square before he can create his own world and you may be in for a tough sale. Why doesn't it just have a "Make a Square" button? Because no one wants to make a square. Because no one is there to click the button. Because the square is really a circle. _________________________________________________________________ FREE pop-up blocking with the new MSN Toolbar - get it now! http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/ From urnerk at qwest.net Thu Dec 9 05:37:31 2004 From: urnerk at qwest.net (Kirby Urner) Date: Thu Dec 9 05:37:34 2004 Subject: [Edu-sig] Re: Acadmic gender gap (was Thoughts) In-Reply-To: Message-ID: <20041209043732.E437D1E4002@bag.python.org> > If you can write code to pick a random color, you can write > code to have a bad guy choose a random target. But try > convincing someone who has been living in a completely > different world for the past week that he needs to be able > to tell a turtle how to make a square before he can create > his own world and you may be in for a tough sale. > What's true about many state of the art computer games, is that graphic artists, some of whom have little direct knowledge of coding, at least to start, are integral to the execution. Same in the movie biz. Pixar isn't Pixar just because of code jocks. Basically, we need to remember that computers have a very strong role and following in *the humanities* (quick takes of statues, classical buildings, Mona Lisa, Bart Simpson... sound track -- I can hear it, from 'Jesus Christ Superstar', a kind of mega-flash forward on all that his story would become). The computer science environment can be a little too antiseptic. That's partly why I enjoy OSCONs so much (the O'Reilly gig). You meet people heavy into computers who walk on the wild side somewhere, at Industrial Light and Magic for example (two years ago, I spent a lot of time with two ILM guys -- missed seein' 'em in 2004). Plus some of the keynote speakers. Like wow. Out there. > Why doesn't it just have a "Make a Square" button? > > Because no one wants to make a square. > Because no one is there to click the button. > Because the square is really a circle. > Sounds like you're getting zen on me here. Kirby From urnerk at qwest.net Sat Dec 11 08:20:49 2004 From: urnerk at qwest.net (Kirby Urner) Date: Sat Dec 11 08:20:52 2004 Subject: [Edu-sig] Brainstorming about January In-Reply-To: <20041209043732.E437D1E4002@bag.python.org> Message-ID: <20041211072050.DFEBA1E4009@bag.python.org> OK, so I'm supposedly on stage at OGI come January, doing a gig for Saturday Academy. I need to brainstorm content. What better place than edu-sig. Because it's a Python course. Math through programming. Here's the blurb: === Math & Programming: From Chaos to Python Explore topics in mathematics by writing and modifying programs in a contemporary computer language. A goal of this class is to help you gain proficiency as a programmer, while delving into number theory, group theory, chaos and fractals, cryptography, 3D graphics and more. A primary tool will be Python, an object oriented, uncluttered, general purpose language. For contrast and mind expansion, the J language will also be introduced. Instructor: Kirby Urner, with a BA in philosophy from Princeton University , is a computer programmer and educator. He has developed computer literacy products for McGraw-Hill and is a former high school mathematics teacher. Context: http://tinyurl.com/62mlb === Currently, my intention is to start out with Euclid's Algorithm for the GCD. I have the following reasons in mind: (1) Knuth hypes it in 'Art of Computer Programming' as basic basic, and core to the whole idea of "algorithm" (2) Guido gave us a very simple version of it: def gcd(a,b): while b: a,b = b,a%b return a That's almost the "hello world" of Python, one could say (does something more meaningful too). (3) The GCD is a core concept in number theory, as it creates a basis for "relatively prime," in turn the basis for totient and totatives. We need these later concepts to play with tiny groups, easy to grasp and appreciate (the "microbes" of group theory). However, I think the best way to understand the GCD is using visual or tactile metaphors: we have two lengths of wall and want to find the biggest brick that will tile both seamlessly. If one brick tiles the other, we're done. If not, there's a remainder, which, broken off, becomes a smaller brick relative to the second largest to begin with -- and so on in a recursive convergence to 1 or some bigger number. My eventual goal is to explain RSA. A message has a finite orbit in a finite group, where powering is the operation. Power it a few times, and it's encrypted. Power it a secret number more times, and you're back to square one. To get the secret, you need the prime factors of N, which is public. But huge composites with only two prime factors are hard to crack. We don't have an algorithm that's very successful or efficient against those. So RSA is strong, very strong. The course is not all group and number theory though. I plan to get really into polyhedra with Povray, as per my usual. This is where I get to use the Bucky stuff, which is secure and complete at this level -- just some models with easy relationships, great background and training if your future career plans include anything like graphic design. Feedback welcome. I may take it off list to an opt-in newsletter, later, when it comes time to report back on how these plans are actually field-testing. Given the PSF grant fell through, the actual course materials will likely stay closed source and proprietary for awhile, to give Saturday Academy something to run with on a more exclusive basis. If enrollment builds, we'll know it's camera-ready, and release it more widely. Kirby From urnerk at qwest.net Sat Dec 11 08:37:43 2004 From: urnerk at qwest.net (Kirby Urner) Date: Sat Dec 11 09:04:28 2004 Subject: [Edu-sig] Re: Acadmic gender gap (was Thoughts) In-Reply-To: <20041209043732.E437D1E4002@bag.python.org> Message-ID: <20041211080426.86E441E4009@bag.python.org> >Basically, we need to remember that computers have a very strong role and >following in *the humanities* (quick takes of statues, classical buildings, >Mona Lisa, Bart Simpson... sound track -- I can hear it, from 'Jesus Christ >Superstar', a kind of mega-flash forward on all that his story would >become). Oh, and hey, my apologies if anyone was offended by having Bart and Jesus in the same paragraph. I figured that since 'Jesus Christ Superstar,' a musical, right up there with 'Hair' in terms of hippie ratings, was *already* offensive (I was living in Rome when it broke as I recall -- or maybe I just read about it later)... if you're gonna sin, might as well piggy-back on a bigger one (like that wax museum stunt -- good one). G'night now. Kirby From ajsiegel at optonline.net Sat Dec 11 16:24:15 2004 From: ajsiegel at optonline.net (Arthur) Date: Sat Dec 11 16:25:12 2004 Subject: [Edu-sig] Brainstorming about January In-Reply-To: <20041211072050.DFEBA1E4009@bag.python.org> Message-ID: <0I8K00FW7DGMYL@mta9.srv.hcvlny.cv.net> Kirby writes: > > Here's the blurb: > > === > Math & Programming: From Chaos to Python > > Explore topics in mathematics by writing and modifying programs in a > contemporary computer language. > > A goal of this class is to help you gain proficiency as a programmer, > while > delving into number theory, group theory, chaos and fractals, > cryptography, > 3D graphics and more. A primary tool will be Python, an object oriented, > uncluttered, general purpose language. For contrast and mind expansion, > the > J language will also be introduced. > > Instructor: Kirby Urner, with a BA in philosophy from Princeton University > , > is a computer programmer and educator. He has developed computer literacy > products for McGraw-Hill and is a former high school mathematics teacher. > > Context: http://tinyurl.com/62mlb What? Appealing squarely to folks' intellectual curiosity. A little old-fashioned, don't-you-know. Thank you, Mr. Urner. Art From urnerk at qwest.net Sat Dec 11 19:37:20 2004 From: urnerk at qwest.net (Kirby Urner) Date: Sat Dec 11 19:37:25 2004 Subject: [Edu-sig] Brainstorming about January In-Reply-To: <0I8K00FW7DGMYL@mta9.srv.hcvlny.cv.net> Message-ID: <20041211183723.528571E4004@bag.python.org> > Appealing squarely to folks' intellectual curiosity. ^^^^^^^^ We buckobobs might take exception to "squarely" as a term of approbation. But hey, why be dogmatic on a day like today? Kirby From ajsiegel at optonline.net Sat Dec 11 20:39:08 2004 From: ajsiegel at optonline.net (Arthur) Date: Sat Dec 11 20:39:16 2004 Subject: [Edu-sig] Brainstorming about January In-Reply-To: <20041211183723.528571E4004@bag.python.org> Message-ID: <0I8K00EF2P9DV0@mta3.srv.hcvlny.cv.net> > -----Original Message----- > From: edu-sig-bounces@python.org [mailto:edu-sig-bounces@python.org] On > Behalf Of Kirby Urner > Sent: Saturday, December 11, 2004 1:37 PM > To: edu-sig@python.org > Subject: RE: [Edu-sig] Brainstorming about January > > > Appealing squarely to folks' intellectual curiosity. > ^^^^^^^^ > > We buckobobs might take exception to "squarely" as a term of approbation. > But hey, why be dogmatic on a day like today? > > Kirby > And I quote: """ Your search - buckobobs - did not match any documents. No pages were found containing "buckobobs". """ Is this Yiddish or something? Your curricula description, BTW, seems to me missing buttons. Is it intentional? Is it legal? Is it fair? Art From cben at users.sf.net Sat Dec 11 22:24:41 2004 From: cben at users.sf.net (Beni Cherniavsky) Date: Sat Dec 11 22:24:47 2004 Subject: [Edu-sig] Re: explaining functions [Possibly OT] In-Reply-To: <41B3E78D.8010005@sfu.ca> References: <20041205233228.81DA51E400B@bag.python.org> <41B3E78D.8010005@sfu.ca> Message-ID: <41BB6599.6050709@users.sf.net> Toby Donaldson wrote: > My experience is that the average student usually has no trouble > understanding how to use a function. They grasp the mechanics pretty > quickly from examples. Issues such as the difference between printing a > result and returning a result are confusing to some, as are issues such > as scope. But you don't need to have a perfect understanding of such > things to use functions effectively. > I didn't have a chance to test the following on students but I think the Python interpreter offers a chance to postpone the print/return difference by just not teaching "print" (except parhaps as a debugging aid). A "hello world" program should be just:: >>> "Hello, world!" I think that introducing arguments and return values is much simpler to understand than textual input/output usually taught with languages that lack a convenient interpreter prompt. > By far the biggest difficulty I've seen students have is deciding how > and when to make their own functions. This is exacerbated by the fact > that in beginning programming you typically only write small programs > where writing your own functions might not be useful. > Writing only small programs is harmful. Students must get the chance to write medium programs and to refactor them a lot. I think that any attempt at teaching good style and structure by "here is how you should write" is futile. Only by experiencing the hard way how is it to program without good structure will one learn its importance. -- Beni Cherniavsky , who can only read email on weekends. From ajsiegel at optonline.net Sun Dec 12 16:22:20 2004 From: ajsiegel at optonline.net (Arthur) Date: Sun Dec 12 16:37:33 2004 Subject: [Edu-sig] PyPy funded Message-ID: <0I8M00H8381DBK@mta1.srv.hcvlny.cv.net> I see reference, via blog at http://seanmcgrath.blogspot.com/archives/2004_12_05_seanmcgrath_archive.html that the PyPy project has obtained its EU funding. I assume this is new news, not old. But can't get through to the codespeak site to get the details. At any rate, it is good news. Art From lac at strakt.com Sun Dec 12 16:42:19 2004 From: lac at strakt.com (Laura Creighton) Date: Sun Dec 12 16:42:26 2004 Subject: [Edu-sig] PyPy funded In-Reply-To: Message from Arthur of "Sun, 12 Dec 2004 10:22:20 EST." <0I8M00H8381DBK@mta1.srv.hcvlny.cv.net> References: <0I8M00H8381DBK@mta1.srv.hcvlny.cv.net> Message-ID: <200412121542.iBCFgJ93000802@ratthing-b246.strakt.com> In a message of Sun, 12 Dec 2004 10:22:20 EST, Arthur writes: >I see reference, via blog at > >http://seanmcgrath.blogspot.com/archives/2004_12_05_seanmcgrath_archive.h >tml > >that the PyPy project has obtained its EU funding. > >I assume this is new news, not old. But can't get through to the codespe >ak >site to get the details. > >At any rate, it is good news. > >Art Thank you Art. It was official Dec. 1. Our kickoff meeting is in Saarbrucken on Tuesday. And codespeak has just suffered some sort of catastrophic hardware failure. New hardware should go in on Monday. We haven't lost anything. Laura From john.zelle at wartburg.edu Sun Dec 12 21:39:22 2004 From: john.zelle at wartburg.edu (John M. Zelle) Date: Sun Dec 12 21:39:36 2004 Subject: [Edu-sig] Re: explaining functions [Possibly OT] In-Reply-To: <41BB6599.6050709@users.sf.net> References: <20041205233228.81DA51E400B@bag.python.org> <41B3E78D.8010005@sfu.ca> <41BB6599.6050709@users.sf.net> Message-ID: <32800.167.142.253.65.1102883962.squirrel@167.142.253.65> Beni Cherniavsky said: >> By far the biggest difficulty I've seen students have is deciding how >> and when to make their own functions. This is exacerbated by the fact >> that in beginning programming you typically only write small programs >> where writing your own functions might not be useful. >> > Writing only small programs is harmful. Students must get the chance to > write > medium programs and to refactor them a lot. I think that any attempt at > teaching good style and structure by "here is how you should write" is > futile. > Only by experiencing the hard way how is it to program without good > structure will one learn its importance. > I agree with this basic assessment. However it is also true that students won't necessarily just "stumble" on good ways of (re)organizing programs. They probably need to see/write a couple programs in the "here is how you should write" mold before the hard lessons of experience will be really sucessful in internalizing this knowledge. --John -- John M. Zelle, Ph.D. Professor of Computer Science Wartburg College From glingl at aon.at Mon Dec 13 00:13:02 2004 From: glingl at aon.at (Gregor Lingl) Date: Mon Dec 13 00:11:44 2004 Subject: [Edu-sig] Brainstorming about January In-Reply-To: <20041211072050.DFEBA1E4009@bag.python.org> References: <20041211072050.DFEBA1E4009@bag.python.org> Message-ID: <41BCD07E.70606@aon.at> Kirby Urner schrieb: >OK, ... > >=== >Math & Programming: From Chaos to Python > >Explore topics in mathematics by writing and modifying programs in a >contemporary computer language. > Attention: this is a somewhat technical question/contribution (in contrast to the more philosophical ones concerning the design an didactics of cs courses) Hi Kirby and all the others! In one of my classes I'm just doing similar things. Starting with the very first program of John Zelle's mervelous book I arrived at a program drawing a Feigenbaum diagram. With this - and I think with all those chaos/fractal-programs which use pixel graphics - there occurs the problem, that pixel graphics with Tkinter is *very* slow. Although I have used a few tricks to make the program fast it still needs approximately 50 seconds to draw the diagram (on my machine). Moreover it show's that the slow operation is indeed the put-method of PhotoImage (and the update method). My students of course searching the net find Feigenbaum applets performing much faster. Being asked about that my (somewhat poor) answer is, yes it's slow in Python but the advantage is: *you* can write it in Python, whereas you can't write it in Java. Not really satisfying. As this is a problem concerning a large class of applications (at least in the context of programming in highschool) I dream of having at hand some easily usable class which defines a window for doing fast pixel graphics. As far as I know there are a *lot* of graphics-Toolkits for Python out there. Which of them could be used for this task? What are your experiences? Do you have significantly faster solutions? Here is the code of my solution using Tkinter: # Autor: Gregor Lingl # Datum: 21. 10. 2004 # feigen.py : zeichnet ein Feigenbaum-Diagramm from Tkinter import Tk, PhotoImage, Label WIDTH = 700 HEIGHT = 500 NUM = 2*HEIGHT//3 def f(x): return LAMBDA * x * (1-x) root = Tk() root.title("Feigenbaum Diagram") pic = PhotoImage(width=WIDTH+1, height=HEIGHT) lbl = Label(root, image=pic, bg='white') lbl.pack() for i in range(8): for j in range(0,HEIGHT): pic.put("red", (int(round(WIDTH/7.0)*i),j)) root.update() for frac in range(WIDTH): LAMBDA = 3.3 + frac*0.7/WIDTH x = 0.5 # initial value for iteration ys={} for i in range(150): x = f(x) for i in range(NUM): x = f(x) ys[int(HEIGHT*x)]=True for y in ys: pic.put("black", (frac,y)) if frac%10==0:root.update() root.mainloop() >A goal of this class is to help you gain proficiency as a programmer, while >delving into number theory, group theory, chaos and fractals, > the above program was intended to do just this ... Another example is from my book "Python f?r Kids" showing a more regular fractal (but suffering froom the same problem ...): ### Python f?r Kids - Kapitel 12 ### # Autor: Gregor Lingl # Datum: 13. 10. 2002 # simplefractal.py : zeichnet ein Sierpinsky-Dreieck from Tkinter import Tk, PhotoImage, Label from random import randrange, choice def mittelpunkt(a,b): (x1,y1), (x2,y2) = a, b return ( int(round((x1+x2)/2.0)), int(round((y1+y2)/2.0)) ) def sierpinsky(): global pixel while running: for i in range(20): ecke = choice(ecken) pixel = mittelpunkt(pixel,ecke) bild.put('black',pixel) root.update() def start(event): print "START" global running running = 1 sierpinsky() def stop(event): print "STOP" global running running = 0 if __name__ == "__main__": root = Tk() bild = PhotoImage(width=300, height=300) lbl = Label(root, image=bild, bg='white') lbl.pack() root.bind('', start) root.bind('', stop) ecken = a, b, c = (20,265),(280,265),(150,40) pixel = randrange(300), randrange(300) for p in (a, b, c, pixel): bild.put("black", p) root.update() root.mainloop() Any feedback, any suggestions, propositions, solutions are welcome Regards, Gregor P.S.: Some conversations on the list - e. g. the one following the posting to which this is a reply - are really difficult to follow for me, as I'm not using English as a native language. Sometimes there seems to prevail some strange sort of humour or animosity. If that is funny for you, that's o.k. but nevertheless I doubt if it's useful for our concerns. (I'm well aware of the fact that it might be equally difficult for you to understand what I try to say in my rather poor English.) From nico at teknico.net Sun Dec 12 17:28:06 2004 From: nico at teknico.net (Nicola Larosa) Date: Mon Dec 13 01:55:24 2004 Subject: [Edu-sig] PyPy funded In-Reply-To: <0I8M00H8381DBK@mta1.srv.hcvlny.cv.net> References: <0I8M00H8381DBK@mta1.srv.hcvlny.cv.net> Message-ID: <200412121728.08761.nico@teknico.net> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 > I see reference, via blog at > > http://seanmcgrath.blogspot.com/archives/2004_12_05_seanmcgrath_archive.html > > that the PyPy project has obtained its EU funding. Also reported by the Python Daily URL (2004-12-10, nineth entry): http://www.pythonware.com/daily/ > I assume this is new news, not old. But can't get through to the codespeak > site to get the details. The pypy-dev mailing list is archived at a number of other sites, try ActiveState's ASPN for instance: [pypy-dev] EU funding is official! http://aspn.activestate.com/ASPN/Mail/Message/pypy-dev/2240671 http://aspn.activestate.com/ASPN/Mail/Message/pypy-dev/2242618 Wish I could be one of those lucky five. :-) > At any rate, it is good news. I find it *extremely* good, and encouraging, news. The PyPy project may now be able to raise Python to an unprecedented level of power and flexibilty. Double cheers to all those involved in this gargantuan bureacracy-moving ordeal! - -- Nicola Larosa - nico@tekNico.net After a long life, and thirty years in the public school trenches, I've concluded that genius is as common as dirt. We suppress our genius only because we haven't yet figured out how to manage a population of educated men and women. The solution, I think, is simple and glorious. Let them manage themselves. -- John Taylor Gatto, 2001 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) iD8DBQFBvHGYXv0hgDImBm4RAod+AKC2SxbBfpsgUrXRYAEW71iIKA5eRACgsWrQ 7HoEodLYlvk3g/BpqR58NRc= =NK0f -----END PGP SIGNATURE----- From missive at hotmail.com Mon Dec 13 02:53:44 2004 From: missive at hotmail.com (Lee Harr) Date: Mon Dec 13 02:54:04 2004 Subject: [Edu-sig] Re: Brainstorming about January Message-ID: >As far as I know there are a *lot* of graphics-Toolkits for Python out >there. Which of them could be used for this task? What are your >experiences? Do you have significantly faster solutions? > How about pygame, This takes about 2 seconds on my system, while the tkinter version takes over a minute. # feigen_pygame.py import pygame pygame.init() WIDTH = 700 HEIGHT = 500 NUM = 2*HEIGHT//3 WHITE = (255, 255, 255) RED = (255, 0, 0) BLACK = (0, 0, 0) def f(x): return LAMBDA * x * (1-x) sfc = pygame.display.set_mode((WIDTH+1, HEIGHT)) sfc.fill(WHITE) for i in range(8): for y in range(0,HEIGHT): x = (WIDTH/7.0)*i sfc.set_at((x, y), RED) for frac in range(WIDTH): LAMBDA = 3.3 + frac*0.7/WIDTH x = 0.5 # initial value for iteration ys={} for i in range(150): x = f(x) for i in range(NUM): x = f(x) ys[int(HEIGHT*x)]=True for y in ys: sfc.set_at((frac, y), BLACK) if frac%10==0: pygame.display.update() # wait for a mouse click before closing the window ev = [] while not ev: ev = pygame.event.get([pygame.constants.MOUSEBUTTONDOWN]) _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ From missive at hotmail.com Mon Dec 13 03:04:59 2004 From: missive at hotmail.com (Lee Harr) Date: Mon Dec 13 03:05:13 2004 Subject: [Edu-sig] Re: Brainstorming about January Message-ID: >>Do you have significantly faster solutions? >How about pygame, This takes about 2 seconds on my system, That said, I remember implementing this exact algorithm on my Apple II and letting it run for probably an hour to do a 300x200 pixel screen. I thought it was awesome :o) _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ From andre.roberge at ns.sympatico.ca Mon Dec 13 03:14:29 2004 From: andre.roberge at ns.sympatico.ca (=?ISO-8859-1?Q?Andr=E9_Roberge?=) Date: Mon Dec 13 03:14:27 2004 Subject: [Edu-sig] [ANN] RUR: a Python Learning Environment (alpha) Message-ID: <41BCFB05.4080806@ns.sympatico.ca> RUR: a Python Learning Environment is a successor of Karel the Robot, PyRobot and Guido van Robot. Its purpose is to provide an environment for beginners, including children, to learn python. (Note that Guido van Robot still exists and has been upgraded recently.) Source for the program (python files; requires wxPython 2.4) can be found on SourceForge.net at https://sourceforge.net/projects/rur-ple/ The current (first) release has been tested under Windows and everything (except the "radio box") should work. For those using a platform other than Windows, I have been told that a much earlier version had problems displaying the robot world properly. If you're interested in trying and encounter problems, I suggest changing the window size, or clicking in the middle panel (the robot's world). Do not hesitate to give me some feedback. To my knowledge, no one (other than myself!) has tested it yet. The project's home page is located at: http://rur-ple.sourceforge.net/index.html It features a number of lessons, with an outline for future lessons. It should give you an idea of what this program is about, without having to try it. Note: This is my very first Python program (other than some very simple ones) and the first program I share with anyone. Comments, suggestions, criticisms are most welcome. Andr? Roberge From ajsiegel at optonline.net Mon Dec 13 04:03:31 2004 From: ajsiegel at optonline.net (Arthur) Date: Mon Dec 13 04:03:37 2004 Subject: [Edu-sig] Brainstorming about January In-Reply-To: <41BCD07E.70606@aon.at> Message-ID: <0I8N00CSM4HYYR@mta7.srv.hcvlny.cv.net> Gregor writes - > P.S.: Some conversations on the list - e. g. the one following the > posting to which this is a reply - are really difficult to follow for > me, as I'm not using English as a native language. Sometimes there seems > to prevail some strange sort of humour or animosity. If that is funny > for you, that's o.k. but nevertheless I doubt if it's useful for our > concerns. I guess it is a matter of how one defines "our concerns". Or perhaps more accurately, a matter of defining who is included in the "we" implied by your use of the word "our". Kirby found it necessary to publicly disassociate himself from my feelings about Alan Kay - because someone observing might otherwise take my position to be representative of that of the Python community, or a significant segment of it. Silence was not an option for him, in that situation. I guess it might be said that I have found myself in a similar situation here, at various times. I have put great effort - for better or for worse - into the creation of PyGeo. Not only is it written in Python, but I consider it to be entwined with Python. The possibility of porting it to another language, as much as I would sometimes like, does not present itself as a decent possibility. It is native to Python, as a language. So it is rather sad that I have in fact found it necessary - more often than I would like - to actively disassociate myself from (at least my sense) of the who "we" might be taken to be. I will leave it at that. And BTW, I meant to be paying Kirby a complement in the post to which I think you were referring. Art From urnerk at qwest.net Mon Dec 13 05:58:49 2004 From: urnerk at qwest.net (Kirby Urner) Date: Mon Dec 13 05:58:50 2004 Subject: [Edu-sig] Re: explaining functions [Possibly OT] In-Reply-To: <41BB6599.6050709@users.sf.net> Message-ID: <20041213045848.E80791E4005@bag.python.org> > Writing only small programs is harmful. Students must get the chance to > write medium programs and to refactor them a lot. I think that any > attempt at teaching good style and structure by "here is how you should > write" is futile. > Only by experiencing the hard way how is it to program without good > structure will one learn its importance. > > -- > Beni Cherniavsky , who can only read email on weekends. My approach is the same one used by other language teachers (e.g. of Spanish or Japanese): don't just focus on writing the stuff; read it also. And what you read may be quite a few notches ahead, in terms of level. It's easier to read that to write. So, for example, with my Povray scene description language generator, I don't have time to take students through reinventing that wheel. I spring it on them full-blown, if simplified (my complicated versions aren't so easy to grasp). They read it for comprehension, and as their coding skills improve, it also becomes a place to take off from, i.e. they're able to modify and add features. This is true-to-life in open source work: the first big programs you refactor and/or modify in some way, were probably written by others. Kirby From urnerk at qwest.net Mon Dec 13 06:42:20 2004 From: urnerk at qwest.net (Kirby Urner) Date: Mon Dec 13 06:42:21 2004 Subject: [Edu-sig] Brainstorming about January In-Reply-To: <41BCD07E.70606@aon.at> Message-ID: <20041213054219.F0CCD1E4005@bag.python.org> > As far as I know there are a *lot* of graphics-Toolkits for Python out > there. Which of them could be used for this task? What are your > experiences? Do you have significantly faster solutions? > John's graphics.py has a tweak that significantly increases speed, by not refreshing the screen with each change. >From his source code: # Version 2.1 1/15/04 # Added autoflush option to GraphWin. When True (default) updates on # the window are done after each action. This makes some graphics # intensive programs sluggish. Turning off autoflush causes updates # to happen during idle periods or when flush is called. Here's a program that takes about 30-50 secs to complete 500,000 loops, but then almost as long again to actually paint the window. The 10,000 loop takes a little over a second. I have a 2.8 Ghz P4, gig of RAM. I find using John's graphics.py (downloadable from his website) is a good alternative to working directly with Tkinter. It's a fa?ade, i.e. a wrapper that simplifies the API. My thanks to Bernie Gunn for a lot of this: ========================== # Demo graphic of Sierpinskis Triangle with Graphics.py from graphics import * from random import randint import time start = time.time() # autoflush isn't well documented in Zelle's manual -- mentioned in source # code comments. If set to false, window won't update with each new # draw, meaning we get the 10,000 pixels to plot, THEN show them all # at once. Set autoflush to True (default) for pixel-by-pixel rendering # but in that case, suggest 100 or 1000, vs. 10000 pixels. win = GraphWin("The Sierpinski Triangle",1280,1024, autoflush = False) # NOTE autoflush win.setBackground('white') shape = Rectangle(Point(10,10), Point(1270,970)) shape.draw(win) x = 500 # = centre of work screen y = 360 col = 'orange' man=2 Xd = 200 b2=800 t = Text(Point(Xd,b2), ' .......A Genuine Sierpinski Triangle') t.setFill("blue") t.draw(win) print "Working.... (please be patient)" Triang = Polygon(Point(600,20), Point(200,720), Point(1000,720)) Triang.setFill('black') Triang.draw(win) i = 1 while i < 500000: # you can play with this (make it smaller maybe) sel = randint(1,3) if sel == 1: x = (600 + x) / man y = (y + 20) / man elif sel == 2: x = (x + 200) / man y = (720 + y) / man else: x = (1000 + x) / man y = (720 + y) / man win.plotPixel(x,y,col) i += 1 end = time.time() print end - start win.getMouse() win.close() ================= Kirby From urnerk at qwest.net Mon Dec 13 07:11:23 2004 From: urnerk at qwest.net (Kirby Urner) Date: Mon Dec 13 07:11:24 2004 Subject: [Edu-sig] Brainstorming about January In-Reply-To: <0I8N00CSM4HYYR@mta7.srv.hcvlny.cv.net> Message-ID: <20041213061123.5893D1E4005@bag.python.org> > And BTW, I meant to be paying Kirby a complement in the post to which I > think you were referring. > > Art > And I took it that way. My reply was meant to be light-hearted: I was alluding to the fact that "squarely" associates with "square" which, from beatnik days, has connoted "uncool" -- a connotation perhaps tracing to Buckminster Fuller in his Greenwich Village phase, but if not, tracing to him later, as he considered our obsessing over squares (the shape) a major obstacle to our achieving a higher level of civilization. The word "buckobob" was made up on the spot, and could be interpreted to mean "some group or school of thought"; the world has an infinite number, and someone is bound to be offended by just about anything -- even an innocent use of the word 'squarely' in an approbatory manner. "Buckobob" does contain a hint of Bucky (Fuller's colloquial/familiar name). It may also resonate with Bob, the core figure in the Church of the Subgenius, which brand of American lit also concerns itself with the various types who make our lives difficult (a common thread in many traditions actually). But I didn't expect Arthur to appreciate all these details. I'm aware of an archive here, and my ability to tie back later, if the occasion arises. Plus some of my readers make associations on their own (sometimes entirely different ones -- strong readers in the humanities are also "misreaders" as Harold Bloom sees it). So yes Gregor, you are right that some esoterica fly under the radar in some of these posts. But it's not a big problem I don't think. We're for the most part quite topical. And you have the same freedoms, should you wish to sometimes be obscure for the benefit of readers we don't see. And if you go back to the early days (in the archives), you'll find Arthur and I have a long-running thread regarding Euclidean geometry, vs. my intention to deviate from its dogmas in many respects, for example by taking to heart Bucky's enjoinder to celebrate 60-degree-based aesthetics at least as heartily and 90-degree-based, i.e. I'm not going to be too rectilinear or "square" in my approach to geometry -- this January, in 2005, in a Python class. What that looks like in practice is I'll probably be sharing about a non-rectilinear coordinate system some friends and I have played with and developed (perhaps reinvented) over the years -- including in Python. We call them "quadray" or "tetray" coordinates. I think my high school audience will find them entertaining. Kirby From reuben.grinberg at yale.edu Mon Dec 13 08:17:13 2004 From: reuben.grinberg at yale.edu (Reuben Grinberg) Date: Mon Dec 13 08:17:19 2004 Subject: [Edu-sig] editor for children (was Re: explaining functions [Possibly OT]) In-Reply-To: <200412070939.iB79dT3R010973@ratthing-b246.strakt.com> References: <200412070939.iB79dT3R010973@ratthing-b246.strakt.com> Message-ID: <02C01D1B-4CD7-11D9-80D1-000A957167A4@yale.edu> Vi/ vim and emacs are great editors for programmers that have the time to learn all their functionality. However, the learning curve for both of these editors is steep. They are extremely different from anything most students are familiar with (namely Microsoft Word, Notepad, Text Areas in web apps, etc...) It's especially disturbing when you open one of these for the first time and can't seem to quit! I mean, ESC-:q and C-x C-c ? pretty intuitive, huh? Nedit is a pretty good editor (http://www.nedit.org/) in several respects. It has syntax hilighting for many programming languages, uses the mouse and arrow keys, has menus, and uses familiar keyboard shortcuts such as Control-C (copy) Control-V (paste), Control-X (cut), ^S (save), ^O (open), ^W (close), ^Q (quit), ^P (print), etc... There's basically no learning curve at all, but there are lots of advanced features that are easy to get to. The downside is that it's not straight-forward to install on non-linux machines (on most linux machines, just type nedit into a terminal and it should launch. On Windows, it can be installed using Cygwin. Nedit has a native binary for OS X and it can also be installed using Fink. My 2 cents, Reuben Grinberg P.S. I'm a 4th year CS major at Yale. For the record, I use emacs, pico, nedit, and xcode to do most of my coding. Every once in a while I'll use Eclipse for a project, but I find it really annoying to set up. On Dec 7, 2004, at 4:39 AM, Laura Creighton wrote: > In a message of Tue, 07 Dec 2004 06:02:47 +0430, "Lee Harr" writes: >>> Does anybody have any recommendations for an editor for children? >>> In th >> e >>> days I was speaking, I used an editor called 'brief' but I don't >>> think t >> hey >>> are in business any more. >> >> What attributes are needed in a "for children" editor? >> (or is a list of attributes what you are looking for?) >> > > Not really. I taught the after school club emacs, which meant we > spent a lot > of time 'learnng how to use the editor'. They were bright, heavily > motivated, > and what was best, _only 5 of them_. And they got there by being very > curious > what I was doing to present stuff to them. But the next proposed > summer lot > will be a group of 30, and I don't think I will have enough individual > instruction time. So I wonder if there is an editor they are likely to > know -- perhaps unsurprisingly, most kids I know use Microsoft Word to > edit things, and that's a _rotten_ editor for programming -- of if > there > is one that is known for the speed at which it is learnt. > > Laura > > _______________________________________________ > Edu-sig mailing list > Edu-sig@python.org > http://mail.python.org/mailman/listinfo/edu-sig > From gen2n at seznam.cz Mon Dec 13 10:36:14 2004 From: gen2n at seznam.cz (gen2n) Date: Mon Dec 13 10:36:00 2004 Subject: [Edu-sig] editor for children Message-ID: <41BD628E.8060305@seznam.cz> My believed editor for children is Czech PSPad, that is also located to English. That is why I write about. There are many features in it and seems to be very stable even on our W98. Just pickung up from www.pspad.com some functions: Why PSPad ? * do you work with various programming environments ? * do you like highlighted syntax in code ? * do you need a small tool with simple controls and the capabilities of a mighty code editor ? * are you looking for a tool to work with plain text ? * do you want to save money and still have the functionality of professional products ? * then PSPad is for you. PSPad features: * work with projects * work on several documents at the same time (MDI) * Save desktop session to later reopen all open files * FTP client - you can edit files directly from the web * macro recorder to record, save and load macros * search and replace in files * text difference with color-coded differences highlighted * templates (HTML tags, scripts, code templates...) * installation contains templates for HTML, PHP, Pascal, JScript, VBScript, MySQL, MS-Dos, Perl,... * syntax highlighting auto set by file type * user-defined highlighters for exotic environments * auto correction * inteligent internal HTML preview using IE and Mozilla * full HEX editor * call external programs, different for each environment * external compiler with catch command output, log window, log parser for each environment for "IDE" effect * color syntax highlight printing and print preview * integrated TiDy library for formatting and checking HTML code, conversion to CSS, XML, XHTML * integrated free version of top CSS editor TopStyle Lite * export with highlight to RTF, HTML, TeX format into file or clipboard * column block select, bookmarks, line numbers, ... * reformat and compress HTML code, tags char case change * line sorting with ability to sort on defined column, with option to drop duplicates * ASCII chart with HTML entities * Code explorer for Pascal, INI, HTML, XML, PHP, and more in future * spell checker * internal web browser with APACHE support * matching bracket highlighting * ... So thats all. Pavel Kosina gen2n ICQ 176015287 Reuben Grinberg napsal(a): > Vi/ vim and emacs are great editors for programmers that have the time > to learn all their functionality. However, the learning curve for both > of these editors is steep. They are extremely different from anything > most students are familiar with (namely Microsoft Word, Notepad, Text > Areas in web apps, etc...) It's especially disturbing when you open > one of these for the first time and can't seem to quit! I mean, ESC-:q > and C-x C-c ? pretty intuitive, huh? > > Nedit is a pretty good editor (http://www.nedit.org/) in several > respects. It has syntax hilighting for many programming languages, > uses the mouse and arrow keys, has menus, and uses familiar keyboard > shortcuts such as Control-C (copy) Control-V (paste), Control-X (cut), > ^S (save), ^O (open), ^W (close), ^Q (quit), ^P (print), etc... > There's basically no learning curve at all, but there are lots of > advanced features that are easy to get to. > > The downside is that it's not straight-forward to install on non-linux > machines (on most linux machines, just type nedit into a terminal and > it should launch. On Windows, it can be installed using Cygwin. Nedit > has a native binary for OS X and it can also be installed using Fink. > > My 2 cents, > Reuben Grinberg > > P.S. I'm a 4th year CS major at Yale. For the record, I use emacs, > pico, nedit, and xcode to do most of my coding. Every once in a while > I'll use Eclipse for a project, but I find it really annoying to set up. > > > > On Dec 7, 2004, at 4:39 AM, Laura Creighton wrote: > >> In a message of Tue, 07 Dec 2004 06:02:47 +0430, "Lee Harr" writes: >> >>>> Does anybody have any recommendations for an editor for children? >>>> In th >>> >>> e >>> >>>> days I was speaking, I used an editor called 'brief' but I don't >>>> think t >>> >>> hey >>> >>>> are in business any more. >>> >>> >>> What attributes are needed in a "for children" editor? >>> (or is a list of attributes what you are looking for?) >>> >> >> Not really. I taught the after school club emacs, which meant we >> spent a lot >> of time 'learnng how to use the editor'. They were bright, heavily >> motivated, >> and what was best, _only 5 of them_. And they got there by being very >> curious >> what I was doing to present stuff to them. But the next proposed >> summer lot >> will be a group of 30, and I don't think I will have enough individual >> instruction time. So I wonder if there is an editor they are likely to >> know -- perhaps unsurprisingly, most kids I know use Microsoft Word to >> edit things, and that's a _rotten_ editor for programming -- of if there >> is one that is known for the speed at which it is learnt. >> >> Laura >> >> _______________________________________________ >> Edu-sig mailing list >> Edu-sig@python.org >> http://mail.python.org/mailman/listinfo/edu-sig >> > > _______________________________________________ > Edu-sig mailing list > Edu-sig@python.org > http://mail.python.org/mailman/listinfo/edu-sig > -- gen2n ICQ 176015287 From urnerk at qwest.net Mon Dec 13 18:39:42 2004 From: urnerk at qwest.net (Kirby Urner) Date: Mon Dec 13 18:39:47 2004 Subject: [Edu-sig] editor for children In-Reply-To: <41BD628E.8060305@seznam.cz> Message-ID: <20041213173945.75FD21E4006@bag.python.org> > My believed editor for children is Czech PSPad, that is also located to > English. That is why I write about. > There are many features in it and seems to be very stable even on our W98. > Thanks for cueing me about PSPad. I'm downloading it now. An apparent drawback is no Linux version. I like that it explicitly saves with different line ending conventions (e.g. Windows, Linux, Mac). This looks to be a very capable, general purpose editor, and it's a great thing that it's a free download (but is the source available? -- I don't think so). In this same category (free, general purpose) is Eclipse (vi/vim already mentioned). There's a Python plug-in for Eclipse that provides some call tips, i.e. a kind of intellisense providing cues. For example, if I type import sys sys. ^ and then wait a second, I get a scroll panel listing all the sys module options. Clicking on any option gives me the docstring in another panel. There's also some way to get an interactive Python shell going within the editor. I can't figure that out this morning. I saw this at an OSCON demo. http://www.python.org/moin/EclipsePythonIntegration is somewhat out of date on this -- you'll see I inserted a comment alerting readers to these new capabilities. Eclipse is designed for workhorse use. You learn as much as you need to know to be productive. It's appropriate for kids, provided it has been set up properly and they're introduced to it in a logical manner. A lot of Python programmers use editors based on the Scintilla engine See: http://www.scintilla.org/SciTE.html The codeEditor in PythonCard (cross-platform, open source), is based on Robin Dunn's wxPython, a wrapper for wxWidgets (C++ library). Patrick O'Brian has developed similarly useful offerings in wx. All of these have namespace windows, allowing the same kind of module and docstring browsing you find in Eclipse (Eclipse offers this only recently, wxWorld has for a long time). You also get an interactive shell in both environments. For my January course, I'm strongly considering PythonCard. The only thing stopping me is my own ignorance and no way to bill for the hours it'll take me to overcome this (Saturday Academy doesn't pay for curriculum development, only hours in the classroom). I don't have much of a cushion these days, to take the impact of just dinking around, learning stuff -- especially not with Xmas breathing down my neck. With PythonCard, I'd have easy access to drawing surfaces, which I'll want for the fractals, and perhaps even for the Povray (called externally, with the results returned in a wxWindow). If there's ever a way to integrate VPython inside of wxWidgets (I don't think there is right now), then I dare say PyGeo would benefit by moving to wxWidgets. Arthur's Tk menus and controls could be re-rendered in a more capable framework. Plus he'd get the benefit of a more consistent look on the different platforms (this would be especially noticeable on Mac OSX). http://spe.pycs.net/ is another editor I'm tracking -- geared for the Mac crowd especially. For a long list of Python-compatible editors, check: http://www.python.org/moin/PythonEditors -- PSPad is not mentioned, and could be added (this is a Wiki, so if you register, you can do it). Thanks again for PSPad, which is handsome, professional, capable. Kirby From ajsiegel at optonline.net Mon Dec 13 20:00:42 2004 From: ajsiegel at optonline.net (ajsiegel@optonline.net) Date: Mon Dec 13 20:02:36 2004 Subject: [Edu-sig] editor for children Message-ID: <1457f721457f77.1457f771457f72@optonline.net> > > If there's ever a way to integrate VPython inside of wxWidgets (I > don'tthink there is right now), then I dare say PyGeo would > benefit by moving to > wxWidgets. Arthur's Tk menus and controls could be re-rendered in > a more > capable framework. Remember that the gui intensive Leo found no reason to go beyond TK. TK's capabilities and Arthur's capabilities with TK being different issues ;) Current VPython uses GTK1 on Linux (where an addtional component for creating a GTK OpenGL canvas is necessary) and a native OpenGL canvas for Windows. VPython is working toward some integration with PyOpenGL. Which will be very cool. I am hoping this will also mean that it will eventually render onto any OpenGL capable widget - which would include wxPython and PyGame, among others. Last I looked, the _tkinter OpenGL widget, which has always been a bit of a pain, was out of commission. At the point that VPython offers more flexibility, I will need to reassess my options. And look forward to it. All evidence still pointing to the fact that I have gotten on the right horses, for the kinds the things I have been exploring, and hoping to encourage others to explore. Art From ajsiegel at optonline.net Mon Dec 13 20:05:24 2004 From: ajsiegel at optonline.net (ajsiegel@optonline.net) Date: Mon Dec 13 20:05:54 2004 Subject: [Edu-sig] editor for children Message-ID: <156339c1564439.1564439156339c@optonline.net> > If there's ever a way to integrate VPython inside of wxWidgets (I > don'tthink there is right now), then I dare say PyGeo would > benefit by moving to > wxWidgets. Arthur's Tk menus and controls could be re-rendered in > a more > capable framework. Plus he'd get the benefit of a more consistent > look on > the different platforms (this would be especially noticeable on > Mac OSX). Remember that the gui intensive Leo found no reason to go beyond TK. TK's capabilities and Arthur's capabilities with TK being different issues ;) Current VPython uses GTK1 on Linux (where an addtional component for creating a GTK OpenGL canvas is necessary) and a native OpenGL canvas for Windows. VPython is working toward some integration with PyOpenGL. Which will be very cool. I am hoping this will also mean that it will eventually render onto any OpenGL capable widget - which would include wxPython and PyGame, among others. Last I looked, the _tkinter OpenGL widget, which has always been a bit of a pain, was out of commission. At the point that VPython offers more flexibility, I will need to reassess my options. And look forward to it. All evidence still pointing to the fact that I have gotten on the right horses, for the kinds the things I have been exploring, and hoping to encourage others to explore. Art From urnerk at qwest.net Tue Dec 14 02:08:07 2004 From: urnerk at qwest.net (Kirby Urner) Date: Tue Dec 14 02:08:10 2004 Subject: [Edu-sig] Pygeo, platforms, wx and Tk In-Reply-To: <1457f721457f77.1457f771457f72@optonline.net> Message-ID: <20041214010808.F2E1E1E4006@bag.python.org> > Remember that the gui intensive Leo found no reason to go beyond TK. > I haven't tried Leo on a Mac, but if it doesn't look like Aqua, I'd probably not be satisfied with it on a Mac (I might still use it in Windows or Linux). Ditto for Pygeo. When it comes to GUI-intensive programs, I like my Aqua, and get impatient with sitting on top of X. > TK's capabilities and Arthur's capabilities with TK being different > issues ;) > Tk is a great cross-platform solution, rock solid and not too hard to use. However, other cross-platform GUI frameworks exist, are free and open source, and have their own virtues and vices. PythonCard is a virtue, and not available in Tk. For that reason alone, wxWidgets is attractive. And that's not the only reason. So if a kid is already coming up through a curriculum that has a lot of wx in it, and not much Tk, trying to jump tracks to Tk all of a sudden would be jarring (so we might back up and use John's book, to provide an easy on ramp). Something I'm not up to date on about Pygeo: how much is it designed to model coding, teaching Python by virtue of its under-the-hood dynamics, versus how much is it designed to teach projective geometry, irrespective of internals (and yes, I realize it could be about both, but in what mixture?)? Part of the reason I ask, is that if Pygeo is mainly a geometry package, and the "learning to program in Python" part is secondary, then the GUI library makes less of a difference. You just want a usable interface. But when it's about learning to code, then it matters more if it's Tk or wx under the hood, and the calculation really has to do with which library is more likely to come up again on the job, i.e. professionally. There's no one answer for everyone. Many forks in the road, always will be. > Current VPython uses GTK1 on Linux (where an addtional component for > creating a GTK OpenGL canvas is necessary) and a native OpenGL canvas for > Windows. > > VPython is working toward some integration with PyOpenGL. Which will be > very cool. I am hoping this will also mean that it will eventually render > onto any OpenGL capable widget - which would include wxPython and PyGame, > among others. Last I looked, the _tkinter OpenGL widget, which has always > been a bit of a pain, was out of commission. > > At the point that VPython offers more flexibility, I will need to reassess > my options. > Yes, that's what I was thinking as well. I haven't found a way to get a VPython canvas to show up inside wx, especially as a static rectangle surrounded by control surfaces, either fixed or dockable. > And look forward to it. All evidence still pointing to the fact that I > have gotten on the right horses, for the kinds the things I have been > exploring, and hoping to encourage others to explore. > > Art Yes, I don't think you've made any serious mistakes in picking your tools. At one point I objected to Pygeo for needing a custom IDLE, but those days are long gone by now, and even then, you made a good/persuasive case for the design you chose. Kirby From urnerk at qwest.net Tue Dec 14 03:43:30 2004 From: urnerk at qwest.net (Kirby Urner) Date: Tue Dec 14 03:43:31 2004 Subject: [Edu-sig] Pygeo, platforms, wx and Tk In-Reply-To: <20041214010808.F2E1E1E4006@bag.python.org> Message-ID: <20041214024330.EEE131E4006@bag.python.org> > When it comes to GUI-intensive programs, I like my Aqua, and get impatient > with sitting on top of X. > However I'm speaking mostly vicariously here. I haven't been able to afford the PowerBook of my dreams as yet, so mostly I look over the shoulders of OS X users (like Kevin's), envy them, and plan for my day in the sun (it's pouring outside at the moment). Also, my apologies for misspelling Patrick O'Brien recently (re wx editors, like PyCrust and PyAlamode). http://www.wxpython.org/docs/api/wx.py.PyAlaMode-module.html Patrick is a great guy, and I really missed seeing him at the '04 OSCON (fond memories of '03). Kirby From gen2n at seznam.cz Tue Dec 14 12:59:05 2004 From: gen2n at seznam.cz (gen2n) Date: Tue Dec 14 12:58:57 2004 Subject: [Edu-sig] editor for children Message-ID: <41BED589.60106@seznam.cz> >This looks to be a very capable, general purpose editor, and it's a great >thing that it's a free download (but is the source available? -- I don't >think so). > > > its a freeware, without possibility of getting the source I think. >There's a Python plug-in for Eclipse that provides some call tips, i.e. a >kind of intellisense providing cues. > >For example, if I type > >import sys >sys. > ^ > > > Thats very nice feature which is promised to us, users, for a quite long time. For now, there works CTRL+Pause where you are offered commands for the type of dokument you are edited currently. ie.. if you have HTML you get list of commands to HTML... > >For a long list of Python-compatible editors, check: >http://www.python.org/moin/PythonEditors -- PSPad is not mentioned, and >could be added (this is a Wiki, so if you register, you can do it). > > > Thanks for this tip Pavel Kosina From ajsiegel at optonline.net Tue Dec 14 14:02:27 2004 From: ajsiegel at optonline.net (Arthur) Date: Tue Dec 14 14:02:40 2004 Subject: [Edu-sig] RE: Pygeo, platforms, wx and Tk In-Reply-To: <0I8O0031ITTJQ7@mta12.srv.hcvlny.cv.net> Message-ID: <0I8P00FPSQWEBI@mta10.srv.hcvlny.cv.net> Kirby writes - > > > Remember that the gui intensive Leo found no reason to go beyond TK. > > > > I haven't tried Leo on a Mac, but if it doesn't look like Aqua, I'd > probably > not be satisfied with it on a Mac (I might still use it in Windows or > Linux). Ditto for Pygeo. I'm surprised. Hoping we might get through, in an educational context, that looks are only looks. And that functionality is functionality. And that real developers of real world applications might focus on functionality, and short-change looks. I don't think this is a purest, academic lesson. In my real world development work, that is the tact I take, and the tact I am expected to take. Because $ is $. I think we have touched before on the problem that folks tend to get their idea of what software is, from the world of shrink wrapped stuff. Which, as I think we know, represents only a fraction of real world development work. So better help to my Pygeo (and other educational related efforts) would be to educate about the difference between books and covers. No? Art From ajsiegel at optonline.net Tue Dec 14 17:29:00 2004 From: ajsiegel at optonline.net (ajsiegel@optonline.net) Date: Tue Dec 14 17:29:02 2004 Subject: [Edu-sig] re: Pygeo, platforms, wx and Tk Message-ID: <15b7b8715b95a0.15b95a015b7b87@optonline.net> >> TK's capabilities and Arthur's capabilities with TK being different >> issues ;) >Tk is a great cross-platform solution, rock solid and not too hard to use. >However, other cross-platform GUI frameworks exist, are free and open >source, and have their own virtues and vices. Reluctant to go down this road, but: What Arthur uses as a gui toolkit for PyGeo is largely a decision being made by Guido. As mentioned, one of my most primary concerns regarding PyGeo at this point is packaging/distribution. So in the absence of compelling reason to do otherwise, I will stick with the toolkit distributed standard with PyGeo. There are lots of great things being done with other toolkits. And it does seem to me that general concensus would more easily form around wxPython, as truer standard, than TK. Not my battle to fight. And the status of Idle then becomes an issue. But Guido should be made aware if he is not already - since his own writings on education contemplate utilizing 3d graphics - that OpenGL on Tk has become problematic And I guess this is partly an effort to make sure that he is aware of this. (though I am not swearing as to its status as broken/fixed as of today) And I *do* face a crucial functional issue with TK, and only on Linux, as it happens, regarding threading. I may try to present the issue later, to try to get some feedback, and help determine whether the issue is inherent, a limitation of the developer, or a limitation of the particular toolkit. Art. From ajsiegel at optonline.net Tue Dec 14 17:44:23 2004 From: ajsiegel at optonline.net (ajsiegel@optonline.net) Date: Tue Dec 14 17:44:44 2004 Subject: [Edu-sig] re: Pygeo, platforms, wx and Tk Message-ID: <161f571161ccf6.161ccf6161f571@optonline.net> >As mentioned, one of my most primary concerns regarding PyGeo >at this point is packaging/distribution. So in the absence of compelling >reason to do otherwise, I will stick with the toolkit distributed standard with >PyGeo. Oops. Meant standard with Python. ^^^^^^^^^ While VPython does "include" Python ;) see: http://www.vpython.org PyGeo does not. Art From urnerk at qwest.net Tue Dec 14 18:06:26 2004 From: urnerk at qwest.net (Kirby Urner) Date: Tue Dec 14 18:06:29 2004 Subject: [Edu-sig] re: Pygeo, platforms, wx and Tk In-Reply-To: <15b7b8715b95a0.15b95a015b7b87@optonline.net> Message-ID: <20041214170628.3C1911E4006@bag.python.org> > As mentioned, one of my most primary concerns regarding PyGeo > at this point is packaging/distribution. So in the absence of compelling > reason to do otherwise, I will stick with the toolkit distributed standard > with PyGeo. > Bittorrent is an example of a popular application written in Python, used by students everywhere, that sits on wx. Distribution is easy. Click to download and install (I've only done this on Windows -- got my Mandrake 10.1 Official using it). http://bittorrent.com/ >From the FAQ: What language is BitTorrent written in? Python. And it uses wxWindows for its GUI. http://bittorrent.com/FAQ.html > But Guido should be made aware if he is not already - since his own > writings on education contemplate utilizing 3d graphics - that OpenGL > on Tk has become problematic > Looks like someone named Mike Hartshorn was in charge of Tkinter bindings to OpenGL: http://pyopengl.sourceforge.net/pydoc/OpenGL.Tk.html What I like about VPython is its *extremely* simple API. Just a couple pages of docs. And yet there's a lot you can do with it (as Pygeo demonstrates). Do you see PyGeo as primarily aimed at teaching Python, or geometry, or both or neither? I think the surrounding curriculum, as well as the architecture of the package itself, will hinge on this question in some respects. Here's another question: say two students have PyGeo installed. Can student A send student B a text file in "pygeo scripting language" that will recreate some cool interactive exhibit, like those that come with PyGeo? In other words, are the scripts cleanly separable from the core engine, and are they easily sharable as such, much as .py files get shared? If so, do PyGeo scripts have an extension, like .pg, and could we have special syntax coloring for them in various popular editors like vim? Kirby From ajsiegel at optonline.net Tue Dec 14 18:25:49 2004 From: ajsiegel at optonline.net (ajsiegel@optonline.net) Date: Tue Dec 14 18:26:18 2004 Subject: [Edu-sig] re: Pygeo, platforms, wx and Tk Message-ID: <1665b6b166a614.166a6141665b6b@optonline.net> > Do you see PyGeo as primarily aimed at teaching Python, or > geometry, or both > or neither? I think the surrounding curriculum, as well as the > architectureof the package itself, will hinge on this question in > some respects. All I can say is that, personally, I use it for both. And I am hoping that "both" is more than a hopeful answer. But I don't think I truly have the right to make that claim until there is something of a curriculum attached to/with PyGeo. However... It is true that my phantom curricula brilliantly synthesizes both ;). > > Here's another question: say two students have PyGeo installed. Can > student A send student B a text file in "pygeo scripting language" > that will > recreate some cool interactive exhibit, like those that come with > PyGeo? PyGeo files are only and nothing but Python files, with extension *.py. My new demos show examples of creating new derived classes on the fly that will behave as "native" PyGeo classes - be interactive and dynamic in a construction. It only requires conforming to some simple requirements of the - whateyoucallit? - abstract class (not the right word, but you get the idea). In some sense, its a good introduction to working with a simple existing API. And helps avoid the blank page syndrome. Which, IMO, is something crucial to avoid. And less prone, IMO, to the problems discussed in attempting to introduce folks to things via game writing. There are less expectations of standards that need to be met before one has something that is "real". IMO. Art From ajsiegel at optonline.net Wed Dec 15 05:05:04 2004 From: ajsiegel at optonline.net (Arthur) Date: Wed Dec 15 05:05:13 2004 Subject: [Edu-sig] re: Pygeo, platforms, wx and Tk Message-ID: <0I8Q00IKVWON4E@mta9.srv.hcvlny.cv.net> >And I *do* face a crucial functional issue with TK, and only on Linux, as >it happens, regarding threading. >I may try to present the issue later, to try to get some feedback, and >help determine whether the issue is inherent, a limitation of the >developer, or a limitation of the particular toolkit. Here goes: So I have 2 windows - one is a Display for the VPython rendering and is actually constructed as a class derived from the VPython display object (native on Windows, GTK1 on linux) The other is a TK control panel. The user can interact with either - pick and move points, for example, in the Display, or reveal or hide construction levels from the control Panel. So each must be in a loop, and the 2 windows need to be able to communicate with to each other as to any user action. On Windows, in the Display class I create the Panel, sending the Display as one of the arguments, while saving a reference to the Panel as an attribute of the Display class. And start a thread that sets off the TK loop for the Panel. The Display now has a reference to the Panel set on its creation, and the Panel now has a reference to the Display, sent to it as an argument. And the communication is bi-directional, via these references. Same tact on Linux produces an error something to the effect: "Attempt to start TK instance from a separate appartment" (definitely spelled with 2 p's). A search on this error message on python-list brings me to a post by Aahz, resident threading expert, asking why one would want to multi-thread a TK application. Implying, I think, that one can't. I am not sure that I need to. Or mean to. But nonetheless I can't find an approach here that yields bi-directional messaging other than the one that works on Windows. This is sounding both esoteric, and not well described. But I am not so much expecting as answer, as much as anyone's gut as to whether this is answerable, and whether my problem is in any way TK specific. Thanks. Art From urnerk at qwest.net Wed Dec 15 05:49:11 2004 From: urnerk at qwest.net (Kirby Urner) Date: Wed Dec 15 05:49:13 2004 Subject: [Edu-sig] Kirby introduces Tim to edu-sig In-Reply-To: <0I8Q00IKVWON4E@mta9.srv.hcvlny.cv.net> Message-ID: <20041215044912.78E3D1E4007@bag.python.org> So Tim has joined us for a spell. This is the student who did the calendar cgi I mentioned awhile back. I've been serving as his mentor via Saturday Academy. Tim, now in 8th grade, has been learning Python, amidst other explorations having to do with an Independent Learning Project (ILP). Feel free to ask him for more details if curious. And for sure visit his web site: http://kmg.is-a-geek.org/ (he's hosting this from his family computer through dyndns, so you'll almost literally be a guest in his home). Kirby From baumanpdx at comcast.net Wed Dec 15 06:58:57 2004 From: baumanpdx at comcast.net (The Bauman Family) Date: Wed Dec 15 06:58:58 2004 Subject: [Edu-sig] Hello, I'm Tim... Message-ID: <41BFD2A1.80801@comcast.net> Kirby told you to ask me questions. You'd need my email address for that (or of course you could email the mailing list... darn I'm stupid). But anyway here I am. Tim From kent37 at tds.net Wed Dec 15 12:10:32 2004 From: kent37 at tds.net (Kent Johnson) Date: Wed Dec 15 12:10:36 2004 Subject: [Edu-sig] re: Pygeo, platforms, wx and Tk In-Reply-To: <0I8Q00IKVWON4E@mta9.srv.hcvlny.cv.net> References: <0I8Q00IKVWON4E@mta9.srv.hcvlny.cv.net> Message-ID: <41C01BA8.9070807@tds.net> Arthur wrote: > So I have 2 windows - one is a Display for the VPython rendering and is > actually constructed as a class derived from the VPython display object > (native on Windows, GTK1 on linux) The other is a TK control panel. > > The user can interact with either - pick and move points, for example, in > the Display, or reveal or hide construction levels from the control Panel. > So each must be in a loop, and the 2 windows need to be able to communicate > with to each other as to any user action. I don't understand what the loop is doing. It sounds like you are polling the panel for changes instead of using event callbacks and the GUI event loop. Maybe you know this - normally in a GUI application you register callback handlers with the widgets in the gui. So when a field changes a handler function is called to do whatever you want. No explicit loop is needed. You certainly should be able to create a GUI app with two panels that respond to user input without explicitly creating any threads. HTH Kent > > On Windows, in the Display class I create the Panel, sending the Display as > one of the arguments, while saving a reference to the Panel as an attribute > of the Display class. And start a thread that sets off the TK loop for the > Panel. The Display now has a reference to the Panel set on its creation, and > the Panel now has a reference to the Display, sent to it as an argument. > And the communication is bi-directional, via these references. > > Same tact on Linux produces an error something to the effect: > > "Attempt to start TK instance from a separate appartment" (definitely > spelled with 2 p's). > > A search on this error message on python-list brings me to a post by Aahz, > resident threading expert, asking why one would want to multi-thread a TK > application. Implying, I think, that one can't. > > I am not sure that I need to. Or mean to. But nonetheless I can't find an > approach here that yields bi-directional messaging other than the one that > works on Windows. > > This is sounding both esoteric, and not well described. But I am not so much > expecting as answer, as much as anyone's gut as to whether this is > answerable, and whether my problem is in any way TK specific. > > Thanks. > > Art > > > > _______________________________________________ > Edu-sig mailing list > Edu-sig@python.org > http://mail.python.org/mailman/listinfo/edu-sig > From ajsiegel at optonline.net Wed Dec 15 13:15:14 2004 From: ajsiegel at optonline.net (Arthur) Date: Wed Dec 15 13:15:20 2004 Subject: [Edu-sig] re: Pygeo, platforms, wx and Tk In-Reply-To: <41C01BA8.9070807@tds.net> Message-ID: <0I8R004V4JDIDI@mta1.srv.hcvlny.cv.net> Kent writes - > > Arthur wrote: > > So I have 2 windows - one is a Display for the VPython rendering and is > > actually constructed as a class derived from the VPython display object > > (native on Windows, GTK1 on linux) The other is a TK control panel. > > > > The user can interact with either - pick and move points, for example, > in > > the Display, or reveal or hide construction levels from the control > Panel. > > So each must be in a loop, and the 2 windows need to be able to > communicate > > with to each other as to any user action. > > I don't understand what the loop is doing. It sounds like you are polling > the panel for changes > instead of using event callbacks and the GUI event loop. > Maybe you know this - normally in a GUI application you register callback > handlers with the widgets > in the gui. So when a field changes a handler function is called to do > whatever you want. No > explicit loop is needed. I am not sure what you are saying. By "be in a loop" I think I am referring to the same GUI event loop to which you are referring. My TK "loop" is nothing but the GUI event loop, using the event callbacks, > > You certainly should be able to create a GUI app with two panels that > respond to user input without > explicitly creating any threads. I think I understand that this is trivial, when the two panels of the GUI app are using the same GUI toolkit. That is specifically the kind of thing that GUI toolkits are designed to handle, and why Aahz asks why someone would want to multi-thread a TK application. And the fact is I don't want to multi-thread a TK application. What I want is a single TK thread and a single GTK thread, and the capacity to communicate between them, bi-directionally. Well, this is not really what I want;) But it is the problem that the circumstances put on my plate, as I am interpreting the circumstances and the problem. How could I have 2 windows from 2 different windowing toolkits, each responsive to user interaction, without running them as separate threads? Then I have also heard it said, as an opinion, that threading is usually the wrong solution for communication between processes. But when we get into to the distinction between separate processes and separate threads, I am in territory with which I am unfamiliar. The problem of running the old IDLE with VPython was, I think, one of making room for two processes, rather than 2 threads to run, without interference. And it was solved. Using sockets? But then, in this case, no input to IDLE needs to be handled *while* a VPython window runs. So I think my problem is distinguished. All that said, I am not *convinced* that there is not a trivial solution here. The solution on Windows is trivial enough. But my assumption that it was a crossplatform solution, at least as to the specifics of my implementation, was apparently na?ve. Art From ajsiegel at optonline.net Wed Dec 15 13:25:56 2004 From: ajsiegel at optonline.net (Arthur) Date: Wed Dec 15 13:26:31 2004 Subject: [Edu-sig] Hello, I'm Tim... In-Reply-To: <41BFD2A1.80801@comcast.net> Message-ID: <0I8R00FH9JVAET@mta9.srv.hcvlny.cv.net> Hi Tim- I'm a guy sometimes accused of straying off-topic here. So I thought I would stay in character, with you. This is an e-mail I recently received from my son, age 20, via my wife. """ Please show this video to dad http://www.ebaumsworld.com/theinternet.html """ My son thought the video hysterical. I thought it interesting. I wonder what you think of it. You may need Windows to view it. I hope you can scratch up a partition somewhere where you might be running that particular operating system ;). Art > -----Original Message----- > From: edu-sig-bounces@python.org [mailto:edu-sig-bounces@python.org] On > Behalf Of The Bauman Family > Sent: Wednesday, December 15, 2004 12:59 AM > To: Edu-sig@python.org > Subject: [Edu-sig] Hello, I'm Tim... > > Kirby told you to ask me questions. You'd need my email address for that > (or of course you could email the mailing list... darn I'm stupid). But > anyway here I am. > > Tim > _______________________________________________ > Edu-sig mailing list > Edu-sig@python.org > http://mail.python.org/mailman/listinfo/edu-sig From kent37 at tds.net Wed Dec 15 13:36:20 2004 From: kent37 at tds.net (Kent Johnson) Date: Wed Dec 15 13:36:23 2004 Subject: [Edu-sig] re: Pygeo, platforms, wx and Tk In-Reply-To: <0I8R004V4JDIDI@mta1.srv.hcvlny.cv.net> References: <0I8R004V4JDIDI@mta1.srv.hcvlny.cv.net> Message-ID: <41C02FC4.40802@tds.net> Thanks for the explanation. I didn't realize that the two panels are using different GUI frameworks. I don't know how to make that work... Kent Arthur wrote: > Kent writes - > >>Arthur wrote: >> >>>So I have 2 windows - one is a Display for the VPython rendering and is >>>actually constructed as a class derived from the VPython display object >>>(native on Windows, GTK1 on linux) The other is a TK control panel. >>> >>>The user can interact with either - pick and move points, for example, >> >>in >> >>>the Display, or reveal or hide construction levels from the control >> >>Panel. >> >>>So each must be in a loop, and the 2 windows need to be able to >> >>communicate >> >>>with to each other as to any user action. >> >>I don't understand what the loop is doing. It sounds like you are polling >>the panel for changes >>instead of using event callbacks and the GUI event loop. > > >>Maybe you know this - normally in a GUI application you register callback >>handlers with the widgets >>in the gui. So when a field changes a handler function is called to do >>whatever you want. No >>explicit loop is needed. > > > > I am not sure what you are saying. By "be in a loop" I think I am referring > to the same GUI event loop to which you are referring. My TK "loop" is > nothing but the GUI event loop, using the event callbacks, > > >>You certainly should be able to create a GUI app with two panels that >>respond to user input without >>explicitly creating any threads. > > > I think I understand that this is trivial, when the two panels of the GUI > app are using the same GUI toolkit. That is specifically the kind of thing > that GUI toolkits are designed to handle, and why Aahz asks why someone > would want to multi-thread a TK application. > > And the fact is I don't want to multi-thread a TK application. What I want > is a single TK thread and a single GTK thread, and the capacity to > communicate between them, bi-directionally. > > Well, this is not really what I want;) But it is the problem that the > circumstances put on my plate, as I am interpreting the circumstances and > the problem. > > How could I have 2 windows from 2 different windowing toolkits, each > responsive to user interaction, without running them as separate threads? > > Then I have also heard it said, as an opinion, that threading is usually > the wrong solution for communication between processes. But when we get > into to the distinction between separate processes and separate threads, I > am in territory with which I am unfamiliar. > > The problem of running the old IDLE with VPython was, I think, one of making > room for two processes, rather than 2 threads to run, without interference. > And it was solved. Using sockets? But then, in this case, no input to IDLE > needs to be handled *while* a VPython window runs. So I think my problem is > distinguished. > > All that said, I am not *convinced* that there is not a trivial solution > here. The solution on Windows is trivial enough. But my assumption that it > was a crossplatform solution, at least as to the specifics of my > implementation, was apparently na?ve. > > Art > > > From ajsiegel at optonline.net Wed Dec 15 13:50:44 2004 From: ajsiegel at optonline.net (Arthur) Date: Wed Dec 15 13:51:02 2004 Subject: [Edu-sig] re: Pygeo, platforms, wx and Tk In-Reply-To: <41C02FC4.40802@tds.net> Message-ID: <0I8R00KYFL0MDC@mta9.srv.hcvlny.cv.net> Kent writes - > > Thanks for the explanation. I didn't realize that the two panels are using > different GUI frameworks. > I don't know how to make that work... > > Kent Well, that's 2 of us anyway ;) I'm suspecting that I will have more flexibility when VPython moves from GTK1 to GTK2. But that might too, be wrong. FWIW, Arnd had recently mentioned coming to a solution that included the ipython interactive shell, when Idle could not serve his needs - because of its use of sockets. It turns out I can't use ipython to serve my needs with VPython, because it suffers from the same disease as did the old Idle - and which Idle solved with the use of sockets. It closes when I close a VPython display Life sucks ;) Art From nico at teknico.net Wed Dec 15 14:56:07 2004 From: nico at teknico.net (Nicola Larosa) Date: Wed Dec 15 14:56:13 2004 Subject: [Edu-sig] Hello, I'm Tim... In-Reply-To: <0I8R00FH9JVAET@mta9.srv.hcvlny.cv.net> References: <0I8R00FH9JVAET@mta9.srv.hcvlny.cv.net> Message-ID: <200412151456.10615.nico@teknico.net> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 > """ > Please show this video to dad > http://www.ebaumsworld.com/theinternet.html > """ > > My son thought the video hysterical. I thought it interesting. I wonder > what you think of it. > > You may need Windows to view it. I hope you can scratch up a partition > somewhere where you might be running that particular operating system ;). Fortunately there's no need to do that. :-) Just download the video at the direct link: http://media.ebaumsworld.com/theinternet.wmv (it's 9 MBytes), then play it with whatever understands wmv files on your choice of platform. As for the movie itself, I don't know what's "hysterical" about it, apart maybe from the last remark. :-) I found it pretty accurate, once one acknowledges the fact that it's obviously been made a few years ago. - -- Nicola Larosa - nico@tekNico.net Just did a bit of research (well, if you can call "apt-cache search" and "apt-cache show" research). -- Iolando, Linux Weekly News, September 2004 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) iD8DBQFBwEJ6Xv0hgDImBm4RAusaAKDBVAJl1ryVItA9o7UXp//q/7tHNQCfXPrQ +Vdaw/kshji4+6oQjEhb0RI= =F82O -----END PGP SIGNATURE----- From capnregex at gmail.com Wed Dec 15 15:05:38 2004 From: capnregex at gmail.com (Robert Ferney) Date: Wed Dec 15 15:05:41 2004 Subject: [Edu-sig] Hello, I'm Tim... In-Reply-To: <41BFD2A1.80801@comcast.net> References: <41BFD2A1.80801@comcast.net> Message-ID: Welcome to the List Tim. On Tue, 14 Dec 2004 21:58:57 -0800, The Bauman Family wrote: > Kirby told you to ask me questions. You'd need my email address for that > (or of course you could email the mailing list... darn I'm stupid). But > anyway here I am. > > Tim > _______________________________________________ > Edu-sig mailing list > Edu-sig@python.org > http://mail.python.org/mailman/listinfo/edu-sig > From ajsiegel at optonline.net Wed Dec 15 15:14:40 2004 From: ajsiegel at optonline.net (Arthur) Date: Wed Dec 15 15:14:45 2004 Subject: [Edu-sig] Hello, I'm Tim... In-Reply-To: <200412151456.10615.nico@teknico.net> Message-ID: <0I8R00CDKOWJYR@mta7.srv.hcvlny.cv.net> Nicola - > > > """ > > Please show this video to dad > > http://www.ebaumsworld.com/theinternet.html > > """ > > > > My son thought the video hysterical. I thought it interesting. I > wonder > > what you think of it. > > > > You may need Windows to view it. I hope you can scratch up a partition > > somewhere where you might be running that particular operating system > ;). > > Fortunately there's no need to do that. :-) Just download the video at the > direct link: > > http://media.ebaumsworld.com/theinternet.wmv > > (it's 9 MBytes), then play it with whatever understands wmv files on your > choice of platform. > > As for the movie itself, I don't know what's "hysterical" about it, apart > maybe from the last remark. :-) I found it pretty accurate, once one > acknowledges the fact that it's obviously been made a few years ago. > I'm not sure what's "hysterical" about it either. Partly why I wanted Tim's reaction. Maybe it looks and sounds prehistoric - rather than simply historic, as it does to those of us a bit older. And maybe my son is remembering when I discovered the Internet - on a 1200 baud modem, seeing blue screens. I must say that in a half hour I knew I was looking at the beginnings of something that was going to fundamentally change the world. And told him and my wife this. Which set me off on The Jag. The amazing thing, for somehow who happens to like to think of himself as a business person, is that I never made a nickel off of any of this. What I do have are souvenirs. I am a proud owner of Linux Journal #1, for example. From 1994. And a RedHat business card - when they were a few folks working out of Conneticut, I think it was. I'm sure we all have these kinds of stories. Art From john.zelle at wartburg.edu Wed Dec 15 15:39:58 2004 From: john.zelle at wartburg.edu (John Zelle) Date: Wed Dec 15 15:42:32 2004 Subject: [Edu-sig] re: Pygeo, platforms, wx and Tk In-Reply-To: <0I8R00KYFL0MDC@mta9.srv.hcvlny.cv.net> References: <0I8R00KYFL0MDC@mta9.srv.hcvlny.cv.net> Message-ID: <41C04CBE.1080901@wartburg.edu> Arthur, In our VR work here, we do something very similar to what you are doing, but in an impoverished way. We use a Tk panel to control simulations in VPython. We have done this using threads and run on both Linux (our primary platform) and Windows with no hitch. The main difference, I think, is that we are not trying to communicate back from VPython to the Tk panel. We can spin and zoom in the Vpython window, and control other parameters through Tk. I guess I don't see any reason in principle that the two-way communication shouldn't work. I suspect, can't tell without digging into your code, that the problem is that you end up making Tk calls from two different threads. That is strictly a no-no. It used to be the case that Tk calls could only be made in the thread that did the Tkinter import. I think that it's now OK to import, but only make calls in the thread the creates the main app (calls Tk() to get the root widget). If you are not currently doing this, the next step to try is to create the Tk interface in main program, and have that initial program call the Tk mainloop. That means that the VPython stuff will actually be created and run in the separate thread. As long as mainloop() is in your initial thread (the one that imports Tkinter and grabs Tk()), I think that your approach will work under Linux and Windows. If I get a little free time (hah!, it's finals week) I might try putting together a little demo to see that this two-way communication works. By the way, I hope you are using locks to protect any shared data across the two threads. --John Arthur wrote: >Kent writes - > > >>Thanks for the explanation. I didn't realize that the two panels are using >>different GUI frameworks. >>I don't know how to make that work... >> >>Kent >> >> > >Well, that's 2 of us anyway ;) > >I'm suspecting that I will have more flexibility when VPython moves from >GTK1 to GTK2. But that might too, be wrong. > >FWIW, Arnd had recently mentioned coming to a solution that included the >ipython interactive shell, when Idle could not serve his needs - because of >its use of sockets. > >It turns out I can't use ipython to serve my needs with VPython, because it >suffers from the same disease as did the old Idle - and which Idle solved >with the use of sockets. It closes when I close a VPython display > >Life sucks ;) > >Art > > >_______________________________________________ >Edu-sig mailing list >Edu-sig@python.org >http://mail.python.org/mailman/listinfo/edu-sig > > > > From tim at fungible.com Wed Dec 15 16:15:47 2004 From: tim at fungible.com (Tim Freeman) Date: Wed Dec 15 17:25:49 2004 Subject: [Edu-sig] re: Pygeo, platforms, wx and Tk In-Reply-To: <0I8Q00IKVWON4E@mta9.srv.hcvlny.cv.net> (message from Arthur on Tue, 14 Dec 2004 23:05:04 -0500) References: <0I8Q00IKVWON4E@mta9.srv.hcvlny.cv.net> Message-ID: <200412151625.iBFGP9LN006457@lobus.fungible.com> From: Arthur >So I have 2 windows - one is a Display for the VPython rendering and is >actually constructed as a class derived from the VPython display object >(native on Windows, GTK1 on linux) The other is a TK control panel. Hi. I'm new here. Now we have two Tim's. I've run into the duelling event loop scenario before, but not with these specific toolkits. The solution then was to refactor a bit and arrange to have one event loop, rather than having multiple threads. To implement a similar solution in this case, you would have to find the entry point that processes one GTK event, and another entrypoint that processes one TK event, then you do something like this: while True: get an event if the event came from the TK window: process it as a TK event else: process it as a GTK event Unfortunately, I suspect you'll lose OS portability when you do that, since the base events are different sorts of things for MSWindows and X Windows. The bad solution I encountered before had two threads with independent event loops. The symptom then was that events would occasionally get ignored when the event loop in wrong thread picked them up and didn't know what to do with them. Another solution would be to have two completely separate processes, each with its own connection to the window system. This way each event loop is guaranteed to get the events from the right window. Whether this is possible for you depends on whether it's feasible for your GTK and your TK code to interact the way you want when they are in separate processes. -- Tim Freeman http://www.fungible.com tim@fungible.com Programmer/consultant in the Sunnyvale, CA area. I'm presently available. From dblank at brynmawr.edu Wed Dec 15 18:15:56 2004 From: dblank at brynmawr.edu (Douglas S. Blank) Date: Wed Dec 15 18:16:04 2004 Subject: [Edu-sig] re: Pygeo, platforms, wx and Tk In-Reply-To: <41C04CBE.1080901@wartburg.edu> References: <0I8R00KYFL0MDC@mta9.srv.hcvlny.cv.net> <41C04CBE.1080901@wartburg.edu> Message-ID: <41C0714C.9010104@brynmawr.edu> We have multiple threads interacting with a Tk window (Pyro Robotics). But it has proven very reliable---even without any locks of any sort. I did make sure that we only have one Tk interpreter; it is easy to accidently create more than one. One situation does fail relably, however: on machines that have multiple processors, it seems that the Tk update code often steps on itself. I have tried to come up with a stripped-down example of the failure, but alas have not been able to pinpoint the problem. -Doug John Zelle wrote: > Arthur, > > In our VR work here, we do something very similar to what you are doing, > but in an impoverished way. We use a Tk panel to control simulations in > VPython. We have done this using threads and run on both Linux (our > primary platform) and Windows with no hitch. The main difference, I > think, is that we are not trying to communicate back from VPython to the > Tk panel. We can spin and zoom in the Vpython window, and control other > parameters through Tk. I guess I don't see any reason in principle that > the two-way communication shouldn't work. > > I suspect, can't tell without digging into your code, that the problem > is that you end up making Tk calls from two different threads. That is > strictly a no-no. It used to be the case that Tk calls could only be > made in the thread that did the Tkinter import. I think that it's now OK > to import, but only make calls in the thread the creates the main app > (calls Tk() to get the root widget). > > If you are not currently doing this, the next step to try is to create > the Tk interface in main program, and have that initial program call the > Tk mainloop. That means that the VPython stuff will actually be created > and run in the separate thread. As long as mainloop() is in your initial > thread (the one that imports Tkinter and grabs Tk()), I think that your > approach will work under Linux and Windows. > > If I get a little free time (hah!, it's finals week) I might try putting > together a little demo to see that this two-way communication works. By > the way, I hope you are using locks to protect any shared data across > the two threads. > > --John > > Arthur wrote: > >> Kent writes - >> >>> Thanks for the explanation. I didn't realize that the two panels are >>> using >>> different GUI frameworks. >>> I don't know how to make that work... >>> >>> Kent >>> >> >> >> Well, that's 2 of us anyway ;) >> >> I'm suspecting that I will have more flexibility when VPython moves from >> GTK1 to GTK2. But that might too, be wrong. >> >> FWIW, Arnd had recently mentioned coming to a solution that included the >> ipython interactive shell, when Idle could not serve his needs - >> because of >> its use of sockets. >> >> It turns out I can't use ipython to serve my needs with VPython, >> because it >> suffers from the same disease as did the old Idle - and which Idle solved >> with the use of sockets. It closes when I close a VPython display >> >> Life sucks ;) >> >> Art >> >> >> _______________________________________________ >> Edu-sig mailing list >> Edu-sig@python.org >> http://mail.python.org/mailman/listinfo/edu-sig >> >> >> >> > _______________________________________________ > Edu-sig mailing list > Edu-sig@python.org > http://mail.python.org/mailman/listinfo/edu-sig > > -- Douglas S. Blank, Assistant Professor dblank@brynmawr.edu, (610)526-6501 Bryn Mawr College, Computer Science Program 101 North Merion Ave, Park Science Bld. Bryn Mawr, PA 19010 dangermouse.brynmawr.edu From urnerk at qwest.net Wed Dec 15 18:52:42 2004 From: urnerk at qwest.net (Kirby Urner) Date: Wed Dec 15 18:52:45 2004 Subject: [Edu-sig] Hello, I'm Tim... In-Reply-To: <0I8R00CDKOWJYR@mta7.srv.hcvlny.cv.net> Message-ID: <20041215175244.6FC3A1E4007@bag.python.org> > Maybe it looks and sounds prehistoric - rather than simply historic, as it > does to those of us a bit older. > Kirby's reaction: I found it very cool to have the outer frame be my Half Life 2 skin over the Windows media player (not sure if 'nuxers have it yet). The newscast begins with frame-within-frame aesthetics (same as I do at grunch.net) and then, I have this weirdo science fiction frame. Reviewed recently at my blog in case you're curious: http://worldgame.blogspot.com/2004/12/interface-designs.html Then I had to cut out about half way through (got the gist: it looks like promising technology). I'll go through it again later when my 10 year old is home from school. I've got a road trip for the day, and need to get started. But I wanted to register on this thread in any case. Kirby From john.zelle at wartburg.edu Wed Dec 15 19:33:49 2004 From: john.zelle at wartburg.edu (John Zelle) Date: Wed Dec 15 19:36:23 2004 Subject: [Edu-sig] Help Testing IDLD patch Message-ID: <41C0838D.8080403@wartburg.edu> Hello all, A while back, I responded to a post about some IDLE annoyances and said I was more concerned about IDLE 1.04's instablility under Windows. I have a very simple test that causes IDLE to hang, and it does not appear to be fixed in IDLE 1.1. A number of folks who are trying to use Python in education have reported frsutration with the situation. So..., I did some poking around myself. I do not have a very good understanding of the IDLE code, but I think I have found a simple fix for the error I can reproduce reliably. I would appreciate it if some of you who have noticed these problems with IDLE would give my patch a try and let me know if it helps out at all. I have added a single line to the PyShell.py file that lives in Python2.3/lib/idlelib. You can get my modified version here: http://mcsp.wartburg/edu/zelle/Python/PyShell.py. You should be able to use this as a drop-in replacement. Alternatively, you can search in it for my initials (JMZ) to find the line I added and just edit your own copy. Basically, the patch just does the equivalent of a keyboard-interrupt (ctrl-c) before closing the shell window. Any feedback on this would be greatly appreciated. A number of schools are wondering what they should use for Winter term. It would be a real shame if this flaw in IDLE causes Python to lose ground. --John ps. With this "fix", killing the IDLE shell window will produce a little "chatter" before it goes away. I can live with that. From john.zelle at wartburg.edu Wed Dec 15 19:42:11 2004 From: john.zelle at wartburg.edu (John Zelle) Date: Wed Dec 15 19:44:38 2004 Subject: [Edu-sig] Help Testing IDLD patch In-Reply-To: <41C0838D.8080403@wartburg.edu> References: <41C0838D.8080403@wartburg.edu> Message-ID: <41C08583.5000301@wartburg.edu> Oooops. The link below should be: http://mcsp.wartburg.edu/zelle/python/PyShell.py John Zelle wrote: > Hello all, > > A while back, I responded to a post about some IDLE annoyances and > said I was more concerned about IDLE 1.04's instablility under > Windows. I have a very simple test that causes IDLE to hang, and it > does not appear to be fixed in IDLE 1.1. A number of folks who are > trying to use Python in education have reported frsutration with the > situation. So..., I did some poking around myself. I do not have a > very good understanding of the IDLE code, but I think I have found a > simple fix for the error I can reproduce reliably. > > I would appreciate it if some of you who have noticed these problems > with IDLE would give my patch a try and let me know if it helps out at > all. I have added a single line to the PyShell.py file that lives in > Python2.3/lib/idlelib. You can get my modified version here: > > http://mcsp.wartburg/edu/zelle/Python/PyShell.py. > > You should be able to use this as a drop-in replacement. > Alternatively, you can search in it for my initials (JMZ) to find the > line I added and just edit your own copy. Basically, the patch just > does the equivalent of a keyboard-interrupt (ctrl-c) before closing > the shell window. > > Any feedback on this would be greatly appreciated. A number of schools > are wondering what they should use for Winter term. It would be a real > shame if this flaw in IDLE causes Python to lose ground. > > --John > > ps. With this "fix", killing the IDLE shell window will produce a > little "chatter" before it goes away. I can live with that. > > > _______________________________________________ > Edu-sig mailing list > Edu-sig@python.org > http://mail.python.org/mailman/listinfo/edu-sig > > From baumanpdx at comcast.net Thu Dec 16 01:01:57 2004 From: baumanpdx at comcast.net (The Bauman Family) Date: Thu Dec 16 01:01:56 2004 Subject: [Edu-sig] Hello, I'm Tim... Message-ID: <41C0D075.5000503@comcast.net> > My son thought the video hysterical. I thought it interesting. I wonder > what you think of it. > > Yeah I guess it's interesting; not funny. It maily is talking about some newsgroup thing, when HTTP and websites ended up being the big thing (but this news show was before Netscape, wasn't it?).They say the advantage is that "there's a table marked football", and today those advantages are mostly gone. Most people use email or IM to communicate, which isn't like that. Also there are forums or mailing lists like this, but the average internet user doesn't use it communicate; they use it for Google or Amazon.com. > You may need Windows to view it. I hope you can scratch up a partition > somewhere where you might be running that particular operating system > ;) . > > Yeah I had to switch to Windows. Sound on Linux doesn't work, because the version of Alsa that Mandrake 10.0 came with doesn't have support for my sound card and there's no RPM for a newer version and compiling it didn't work. If I took the time to upgrade, I would get a new version. Also Totem Media Player, which Mandrake uses by default, doesn't work with WMVs very well (it tryed downloading a plugin, but nothing happened) for some reason. Tim. -- Visit my website: (and please be a supporter of free trade, free software, phr33 s0ftware, free dom, and free propoganda by giving others the url) http://kmg.is-a-geek.org Garunteed to be down at least 5% of the time. From david at handysoftware.com Thu Dec 16 02:35:55 2004 From: david at handysoftware.com (David Handy) Date: Thu Dec 16 02:36:16 2004 Subject: [Edu-sig] Help Testing IDLD patch In-Reply-To: <41C0838D.8080403@wartburg.edu> References: <41C0838D.8080403@wartburg.edu> Message-ID: <20041216013555.GB6934@arno2> On Wed, Dec 15, 2004 at 12:33:49PM -0600, John Zelle wrote: > I was more concerned about IDLE 1.04's instablility under Windows. I > have a very simple test that causes IDLE to hang, and it does not appear > to be fixed in IDLE 1.1. I'd like to try out your fix on my Windows 98 machine, but I'm not sure if I'm seeing the same problem as you. Please post your simple test that causes IDLE to hang. Thanks, David H. From urnerk at qwest.net Thu Dec 16 02:49:20 2004 From: urnerk at qwest.net (Kirby Urner) Date: Thu Dec 16 02:49:23 2004 Subject: [Edu-sig] Hello, I'm Tim... In-Reply-To: <41C0D075.5000503@comcast.net> Message-ID: <20041216014921.C29F21E400A@bag.python.org> > Yeah I had to switch to Windows. Sound on Linux doesn't work, because > the version of Alsa that Mandrake 10.0 came with doesn't have support > for my sound card and there's no RPM for a newer version and compiling > it didn't work. If I took the time to upgrade, I would get a new > version. Also Totem Media Player, which Mandrake uses by default, > doesn't work with WMVs very well (it tryed downloading a plugin, but > nothing happened) for some reason. > > Tim. OK, back from Salem. It's a fine town (got a lot done too), although I must say, Tacoma is really coming along. Our family made a side trip into Tacoma over the Thanksgiving weekend. Off topic: some slides from that side trip: http://tinyurl.com/3htra (the weird metal volcano that appears so many times is the outer hull of a glassworks -- part of the Museum of Glass, these being outside shots of it taken on my little Fujifilm 2600). Tim and I swapped a lot of emails on this sound card issue. He quickly burrowed down to the metal, figuring out which chipset Dell was using, and what he'd need to do to make ALSA work. I suggested grabbing just the ALSA rpms from a 10.1 (vs. the 10.0 he's using -- Mandrake), but then it didn't seem the right drivers were in there or something. Anyway, the annoying thing was in the beginning, when the configuration caused major melt downs. Having no sound, but no melt downs either, proved acceptable, until some future upgrade. Doesn't interfere with the ILP, which is the point right now. > -- > Visit my website: (and please be a supporter of free trade, free > software, phr33 s0ftware, free dom, and free propoganda by giving > others the url) http://kmg.is-a-geek.org > Garunteed to be down at least 5% of the time. > For those of you who've maybe visited, the whole blog thing is implemented in Python. Tim has tweaked and expanded Pybloxsom in various ways (the blog documents some of those accomplishments). The calendar cgi is also Python. And he's been switching over from raw cgi to a mod_python based approach, which is something I'm behind on. I'm hoping he'll give me a quick overview at official meeting #2. Kirby From baumanpdx at comcast.net Thu Dec 16 03:17:59 2004 From: baumanpdx at comcast.net (The Bauman Family) Date: Thu Dec 16 03:17:59 2004 Subject: [Edu-sig] Hello, I'm Tim... In-Reply-To: <20041216014921.C29F21E400A@bag.python.org> References: <20041216014921.C29F21E400A@bag.python.org> Message-ID: <41C0F057.9060005@comcast.net> >OK, back from Salem. It's a fine town (got a lot done too), although I must >say, Tacoma is really coming along. Our family made a side trip into Tacoma >over the Thanksgiving weekend. Off topic: some slides from that side trip: >http://tinyurl.com/3htra (the weird metal volcano that appears so many times >is the outer hull of a glassworks -- part of the Museum of Glass, these >being outside shots of it taken on my little Fujifilm 2600). > > That slideshow thing is awesome. It's done in Java, I assume? >For those of you who've maybe visited, the whole blog thing is implemented >in Python. > I think someone did visit as a result of the site, as the visitors went up from around 20 this month (very few) to 53 (still very few, but more!). >Tim has tweaked and expanded Pybloxsom in various ways (the blog >documents some of those accomplishments). The calendar cgi is also Python. >And he's been switching over from raw cgi to a mod_python based approach, >which is something I'm behind on. > Yeah, I made the mod_python version at http://kmg.is-a-geek.org/python/cal.py, and the calendar that Kirby made can be found at that url plus /cal2 Tim -- Visit my website: (and please be a supporter of free trade, free software, phr33 s0ftware, free dom, and free propoganda by giving others the url) http://kmg.is-a-geek.org Garunteed to be down at least 5% of the time. From ajsiegel at optonline.net Thu Dec 16 13:04:46 2004 From: ajsiegel at optonline.net (Arthur) Date: Thu Dec 16 13:04:58 2004 Subject: [Edu-sig] re: Pygeo, platforms, wx and Tk In-Reply-To: <41C0714C.9010104@brynmawr.edu> Message-ID: <0I8T00BYSDK7OV@mta6.srv.hcvlny.cv.net> Doug, John, Tim, etal Thanks for helping me kick this around. Bottom line problem is that I am using threading without understanding threads. I'm guessing my answer is somewhere in getting down a level into the threads themselves, rather than trying to get away with only dealing at the level of the objects being threaded. And now that I have a real problem to solve, I'll probably get down there (eventually) and solve it Like most of us, I'm sure, almost anything I understand about programming I understand because I needed to understand it to solve a real problem. Even if the problem is one self-imposed - like the PyGeo project. But this is part of the reason that I think that the answer to the question of more general programming literacy has to do with curricula integration. To most students pursuing higher education, at least, the need to get their mind around the concepts of, say, Calculus is a real problem. They have not chosen that problem any more than I have chosen the problem of threading. It has chosen them. They have to understand Calculus. I think that understanding a bit about programming can help them solve that problem, and others of the kind. And it only at the point that they are solving *real* problems, even if only for themselves, that they can get the sense of what it is to program and be a programmer. Art > -----Original Message----- > From: Douglas S. Blank [mailto:dblank@brynmawr.edu] > Sent: Wednesday, December 15, 2004 12:16 PM > To: John Zelle > Cc: Arthur; edu-sig@python.org > Subject: Re: [Edu-sig] re: Pygeo, platforms, wx and Tk > > We have multiple threads interacting with a Tk window (Pyro Robotics). > But it has proven very reliable---even without any locks of any sort. I > did make sure that we only have one Tk interpreter; it is easy to > accidently create more than one. > > One situation does fail relably, however: on machines that have multiple > processors, it seems that the Tk update code often steps on itself. I > have tried to come up with a stripped-down example of the failure, but > alas have not been able to pinpoint the problem. > > -Doug > > John Zelle wrote: > > Arthur, > > > > In our VR work here, we do something very similar to what you are doing, > > but in an impoverished way. We use a Tk panel to control simulations in > > VPython. We have done this using threads and run on both Linux (our > > primary platform) and Windows with no hitch. The main difference, I > > think, is that we are not trying to communicate back from VPython to the > > Tk panel. We can spin and zoom in the Vpython window, and control other > > parameters through Tk. I guess I don't see any reason in principle that > > the two-way communication shouldn't work. > > > > I suspect, can't tell without digging into your code, that the problem > > is that you end up making Tk calls from two different threads. That is > > strictly a no-no. It used to be the case that Tk calls could only be > > made in the thread that did the Tkinter import. I think that it's now OK > > to import, but only make calls in the thread the creates the main app > > (calls Tk() to get the root widget). > > > > If you are not currently doing this, the next step to try is to create > > the Tk interface in main program, and have that initial program call the > > Tk mainloop. That means that the VPython stuff will actually be created > > and run in the separate thread. As long as mainloop() is in your initial > > thread (the one that imports Tkinter and grabs Tk()), I think that your > > approach will work under Linux and Windows. > > > > If I get a little free time (hah!, it's finals week) I might try putting > > together a little demo to see that this two-way communication works. By > > the way, I hope you are using locks to protect any shared data across > > the two threads. > > > > --John > > > > Arthur wrote: > > > >> Kent writes - > >> > >>> Thanks for the explanation. I didn't realize that the two panels are > >>> using > >>> different GUI frameworks. > >>> I don't know how to make that work... > >>> > >>> Kent > >>> > >> > >> > >> Well, that's 2 of us anyway ;) > >> > >> I'm suspecting that I will have more flexibility when VPython moves > from > >> GTK1 to GTK2. But that might too, be wrong. > >> > >> FWIW, Arnd had recently mentioned coming to a solution that included > the > >> ipython interactive shell, when Idle could not serve his needs - > >> because of > >> its use of sockets. > >> > >> It turns out I can't use ipython to serve my needs with VPython, > >> because it > >> suffers from the same disease as did the old Idle - and which Idle > solved > >> with the use of sockets. It closes when I close a VPython display > >> > >> Life sucks ;) > >> > >> Art > >> > >> > >> _______________________________________________ > >> Edu-sig mailing list > >> Edu-sig@python.org > >> http://mail.python.org/mailman/listinfo/edu-sig > >> > >> > >> > >> > > _______________________________________________ > > Edu-sig mailing list > > Edu-sig@python.org > > http://mail.python.org/mailman/listinfo/edu-sig > > > > > > > -- > Douglas S. Blank, Assistant Professor > dblank@brynmawr.edu, (610)526-6501 > Bryn Mawr College, Computer Science Program > 101 North Merion Ave, Park Science Bld. > Bryn Mawr, PA 19010 dangermouse.brynmawr.edu From ajsiegel at optonline.net Thu Dec 16 14:54:33 2004 From: ajsiegel at optonline.net (Arthur) Date: Thu Dec 16 15:10:25 2004 Subject: [Edu-sig] re: Hello, I'm Tim... Message-ID: <0I8T003DJIN2HC@mta10.srv.hcvlny.cv.net> >Kirby's reaction: >I found it very cool to have the outer frame be my Half Life 2 skin over >the Windows media player (not sure if 'nuxers have it yet). Kirby - So I complement you for publishing a curricula description that is substantive, and provides fair warning to anyone showing up to bring their thinking cap. And you follow it with a post about widget appearance and then one rhapsodizing over the skin on your Windows media player. Proving what? That you are still in touch with the folk? You're trying to make be craz(ier), right? Art From john.zelle at wartburg.edu Thu Dec 16 15:22:02 2004 From: john.zelle at wartburg.edu (John Zelle) Date: Thu Dec 16 15:24:37 2004 Subject: [Edu-sig] Help Testing IDLE patch In-Reply-To: <20041216013555.GB6934@arno2> References: <41C0838D.8080403@wartburg.edu> <20041216013555.GB6934@arno2> Message-ID: <41C19A0A.7020309@wartburg.edu> I think my first reply to this went only to David. For others who might be interested, here's the scoop. The problem folks have been having is that IDLE sometimes loses communication with its subprocess. This can cause IDLE to freeze or be unable to bring the shell window up because the socket is in use. It's hard to recreate exactly what does this, as it seems to be a sporadic (race condition?) problem. There is a situation where I can reliably cause IDLE to hang. Simply create a program that has an input statement such as: x = input("Testing ") Run the program with and when the prompt "Testing " comes up, close the shell window to go back to the program window. Usually, this will hang IDLE. If it doesn't happen the first time, do - close again. Versions of IDLE since 1.0 will freeze after 1 or two rounds of this. My "patch" just does the equivalent of a keyboard interrupt before closing the shell, since I've found that doing a Ctrl-c before closing seems to avoid the problem. BTW, my fix is for IDLE 1.04 shipped with Python 2.3.3. I don't think it works for IDLE 1.1 in Python 2.4 :-( --John David Handy wrote: >On Wed, Dec 15, 2004 at 12:33:49PM -0600, John Zelle wrote: > > > >>I was more concerned about IDLE 1.04's instablility under Windows. I >>have a very simple test that causes IDLE to hang, and it does not appear >>to be fixed in IDLE 1.1. >> >> > >I'd like to try out your fix on my Windows 98 machine, but I'm not sure if >I'm seeing the same problem as you. > >Please post your simple test that causes IDLE to hang. > >Thanks, > >David H. >_______________________________________________ >Edu-sig mailing list >Edu-sig@python.org >http://mail.python.org/mailman/listinfo/edu-sig > > > > From john.zelle at wartburg.edu Thu Dec 16 15:47:49 2004 From: john.zelle at wartburg.edu (John Zelle) Date: Thu Dec 16 15:50:22 2004 Subject: [Edu-sig] Help Testing IDLE patch In-Reply-To: <41C19A0A.7020309@wartburg.edu> References: <41C0838D.8080403@wartburg.edu> <20041216013555.GB6934@arno2> <41C19A0A.7020309@wartburg.edu> Message-ID: <41C1A015.3030109@wartburg.edu> John Zelle wrote: > I think my first reply to this went only to David. For others who > might be interested, here's the scoop. > > The problem folks have been having is that IDLE sometimes loses > communication with its subprocess. This can cause IDLE to freeze or be > unable to bring the shell window up because the socket is in use. It's > hard to recreate exactly what does this, as it seems to be a sporadic > (race condition?) problem. > > There is a situation where I can reliably cause IDLE to hang. Simply > create a program that has an input statement such as: x = > input("Testing ") > Run the program with and when the prompt "Testing " comes up, > close the shell window to go back to the program window. Usually, this > will hang IDLE. If it doesn't happen the first time, do - close > again. Versions of IDLE since 1.0 will freeze after 1 or two rounds of > this. > > My "patch" just does the equivalent of a keyboard interrupt before > closing the shell, since I've found that doing a Ctrl-c before closing > seems to avoid the problem. > > BTW, my fix is for IDLE 1.04 shipped with Python 2.3.3. I don't think > it works for IDLE 1.1 in Python 2.4 :-( > Quick clarification: This should work with any of the 1.0x IDLEs shipped with Python 2.3.x From Scott.Daniels at Acm.Org Thu Dec 16 17:06:40 2004 From: Scott.Daniels at Acm.Org (Scott David Daniels) Date: Thu Dec 16 17:25:02 2004 Subject: [Edu-sig] Re: Pygeo, platforms, wx and Tk In-Reply-To: <0I8T00BYSDK7OV@mta6.srv.hcvlny.cv.net> References: <41C0714C.9010104@brynmawr.edu> <0I8T00BYSDK7OV@mta6.srv.hcvlny.cv.net> Message-ID: Arthur wrote: > Like most of us, I'm sure, almost anything I understand about programming I > understand because I needed to understand it to solve a real problem. This is actually a learning style question. I am personally only happy working on a system when I "understand" the layer below it. This is why I dislike windows (the system I primarily use) so much, and why I have so many issues with GUI programming -- I have a hard time letting go and "letting it be magic." Lucky for me I started with an ancient computer (the LGP-30); there was something comforting about looking at discrete components and boards of diodes with present and missing diodes. > ... it only at the point that they are solving *real* problems, even > if only for themselves, that they can get the sense of what it is to > program and be a programmer. Actually, for me, the "real problem" is second. I need a "real problem" to test whether I really understand an idea, or only think I do. I often have to loop back around a time or two to "get" it. >... Bottom line problem is that I am using threading without understanding > threads. I'm guessing my answer is somewhere in getting down a level into > the threads themselves, rather than trying to get away with only dealing at > the level of the objects being threaded. If you have a concrete understanding of processes, try this idea for threads: the old idea of a process as a separate "machine" can be split into two ideas: a resource allocation entity (for virtual memory, file handles, security ...) which there is one of per process, and a schedulable entity (which owns as little as possible) living inside a process that determines what the CPU does next. The latter of these two is called a "thread of execution" (hence thread). Multi-thread programming is simply multiprocess programming with all of the safety protection between the separate processes turned off. Sharing memory between threads is easy (they all live in the same memory space), but dangerous, because the different threads can be interwoven at the finest granularity available on the machine. So, sharing data that everyone reads is simple, but negotiating when a write is seen by another thread requires planning. Usually this is done by arranging that each thread plays in its own area, and writes (often through queues) when the data is available for others to read. A nasty complication to your intuition in threaded programming is that things you thought were indivisible operations are so only from the point of view of the thread performing the operation; often they have parts that another thread can see in the half-completed view. Python is lucky in that many python writes look like either: a) get a reference to a data structure (python object reference) and store it somewhere, an operation that _is_ indivisible. or b) build a data structure which was formerly non-existent (and therefore not shared with anyone else) and store a single pointer to it, an operation that _is_ indivisible. both of these work fine in a threaded environment. However, operations like list.reverse() have intermediate states. So, for a list "data" built like: data = range(1000000) is examined by two threads, one of which is doing sum(data), and the other of which is doing data.reverse(), the totals of the summing thread can vary substantially. -- -- Scott David Daniels Scott.Daniels@Acm.Org From ajsiegel at optonline.net Thu Dec 16 18:57:21 2004 From: ajsiegel at optonline.net (ajsiegel@optonline.net) Date: Thu Dec 16 18:57:43 2004 Subject: [Edu-sig] Re: Pygeo, platforms, wx and Tk Message-ID: <183afb21836b57.1836b57183afb2@optonline.net> Scott writes - > Arthur wrote: > > Like most of us, I'm sure, almost anything I understand about > programming I > > understand because I needed to understand it to solve a real > problem. > > This is actually a learning style question. I am personally only > happyworking on a system when I "understand" the layer below it. I don't think I'm different really. Only more adjusted and resigned to working unhappily - having gotten started late in all of this. As a matter of fac, I'm not fully happy working in Python, not understanding C. Which is why PyPy excites me. Art From urnerk at qwest.net Thu Dec 16 19:08:58 2004 From: urnerk at qwest.net (Kirby Urner) Date: Thu Dec 16 19:09:02 2004 Subject: [Edu-sig] Hello, I'm Tim... In-Reply-To: <41C0F057.9060005@comcast.net> Message-ID: <20041216180901.5B1421E4008@bag.python.org> Hi Tim -- > > > That slideshow thing is awesome. It's done in Java, I assume? > Yeah, I presume so. A free service I'll probably use again -- and you may upgrade to more bells and whistles, if you pay them, which I'll consider also. > I think someone did visit as a result of the site, as the visitors went > up from around 20 this month (very few) to 53 (still very few, but more!). > If you keep that dyndns URL alive, I think you'll find that our simply burying a pointer here on edu-sig will feed traffic over the long haul. What's true about archived listservs (a brand turned generic, like xerox for copy) is your communications are far less ephemeral than on IM or chat (chat logging is the prerogative of any individual, but there's rarely a highly centralized archive unless maybe on some .gov or .mil accounts). > -- > Visit my website: (and please be a supporter of free trade, free > software, phr33 s0ftware, free dom, and free propoganda by giving > others the url) http://kmg.is-a-geek.org > Garunteed to be down at least 5% of the time. > I should introduce you to some of the characters on board edu-sig. Arthur here is younger than I'd expected when I first met him via this list. As sometimes happens, you meet a person over the Internet long before you meet them in person, and it's funny when you've built up these expectations based on reading, and then, wow: (a) this person is just what I imagined! or (b) how could I have been more wrong? -- and anywhere in between. Anyway, Arthur was still in the NYC financial district (near the old Pan Am skyscraper) when I met him; we had a beer. Pygeo is his pet Python project, which has a lot of sophisticated geometry *on top* of the code, i.e. you can get lost in projective geometry as a topic in itself, and never even stop to consider that people (Arthur in a chief capacity) had to code this thing. John Zelle, recently chatting on the same thread, about wx, VPython, IDLE, Tk and so on, is the author of a new computer science text book, published by a friend of mine in Wilsonville. I recently attended a seminar at Willamette University in Salem, geared for college professors looking for a good intro-to-CS language, post burnout on C++, and then Java. In general, the so-called agile languages are getting a second look these days -- Perl definitely, but also Ruby and some others. John's book was given out free to everyone in the room -- smart marketing, but in my view an ethical maneuver, as if these profs in turn require students to purchase a copy, that spreads comprehension of Python, a powerful tool, a friend of geeks everywhere and for all time. Given the first computer language I ever learned was APL (Princeton had APL terminals scattered around the campus, netted to the IBM 370, just to see what would happen), you'll see that I've been an agile languages buff from the beginning, though I've dabbled in systems languages, starting with Assembler, FORTRAN, then PL/1, some C/C++ -- but that's not my forte. No, I gravitated to dBase because of all my work in the NGO sphere (the 501-c-3s), and grew up at the "dot prompt." Even today I'm a highly skilled FoxPro programmer. VFP opted out of .NET because it already had a lot of the same features, and an even cooler philosophy in some ways -- but more about that some other time (and on some other list). John, by the way, comes from a Java-teaching background. This connects us to Jython, a recent topic in our mentor-student emails. My own appreciation for Java as a language (if not a bread and butter one) derives mostly from Bruce Eckel ( http://www.mindview.net/ ) -- ditto C++. Anyway, these are only some of the wonderful cast on edu-sig. We have the special distinction of being one of the first listservs to be the subject of a PhD thesis: 'Promoting Computer Literacy Through Programming Python' by John Miller. You'll find the link on our home page: http://www.python.org/sigs/edu-sig/ Kirby From samtani at ISI.EDU Thu Dec 16 19:26:30 2004 From: samtani at ISI.EDU (Prasan Samtani) Date: Thu Dec 16 19:31:09 2004 Subject: [Edu-sig] The power of interactivity References: <20041216180904.970B71E4010@bag.python.org> Message-ID: <001601c4e39c$c34ccc50$19d00980@LYDIAN> > I should introduce you to some of the characters on board edu-sig. > ........ Fascinating stuff, Kirby. Thanks! Just kicking around some more ideas on Python in education. I am the assistant for a class on Game Programming, and just got the Python bug when I started using it for a research project (which hopefully shows up in PyCon - http://www.tacticallanguage.com). Anyways, I've been thinking of ways to introduce Python as a model for scripting languages (OK, OK, I know Python is not a scripting language, but it is most often used as one in the video game development cycle) for this one semester course. A problem arises in splitting the limited course time between teaching them 'hard skills' such as building the bare metal of their 'Game Engine', and soft skills such as designing a scripting system. I'd also like the students to write the binding code themselves, not because I'm a masochist, but because it will be invaluable should they enter the industry and be in charge of writing a scripting system. My objectives for introducing Python will be to introduce an appreciation for language design (our school sticks to C++ for most of the undergraduate coursework), and to get them thinking about building flexible applications. The one option here is to write the basic framework myself, including some binding code (that'd give them a head start, but they'll have to extend the application on both the C++ and Python side - and that should give them the experience they need). Has anyone here experimented with using the C++/Python combination as an example of how one could produce flexible systems (not just for games, but in general). If so, I'd love to hear about it. Thanks, Prasan From deanlake at fbeedle.com Thu Dec 16 19:33:15 2004 From: deanlake at fbeedle.com (Dean Lake) Date: Thu Dec 16 19:59:48 2004 Subject: [Edu-sig] TinyP2P Message-ID: <6.0.0.22.0.20041216101355.01e40f28@192.168.0.249> Just saw this last night. TinyP2P - The World's Smallest P2P Application http://www.freedom-to-tinker.com/tinyp2p.html 15 lines of Python code. Written to "to illustrate the difficulty of regulating peer-to-peer applications." So, remember kids, wear your white hat when programming. =];-{i Dean From ajsiegel at optonline.net Thu Dec 16 21:40:32 2004 From: ajsiegel at optonline.net (ajsiegel@optonline.net) Date: Thu Dec 16 21:41:22 2004 Subject: [Edu-sig] TinyP2P Message-ID: <180aa0c180b1de.180b1de180aa0c@optonline.net> > Just saw this last night. > > TinyP2P - The World's Smallest P2P Application > http://www.freedom-to-tinker.com/tinyp2p.html > > 15 lines of Python code. > Written to "to illustrate the difficulty of regulating peer-to- > peer > applications." So that's what go get if you use tabs, not spaces. ;) Art From baumanpdx at comcast.net Fri Dec 17 02:04:52 2004 From: baumanpdx at comcast.net (The Bauman Family) Date: Fri Dec 17 02:04:53 2004 Subject: [Edu-sig] TinyP2P In-Reply-To: <6.0.0.22.0.20041216101355.01e40f28@192.168.0.249> References: <6.0.0.22.0.20041216101355.01e40f28@192.168.0.249> Message-ID: <41C230B4.6050603@comcast.net> Dean Lake wrote: > Just saw this last night. > > TinyP2P - The World's Smallest P2P Application > http://www.freedom-to-tinker.com/tinyp2p.html > > 15 lines of Python code. > Written to "to illustrate the difficulty of regulating peer-to-peer > applications." > > So, remember kids, wear your white hat when programming. =];-{i > > Dean > I'm having a hard time getting it to work; it keeps telling me that it's iterating over a non-sequence. I guess this means that the object isn't a list or a tuple or anything like that. I think that means there's only one host, which is to be expected. I'm trying to do it with 127.0.0.1 or my local router-created network, but neither work. I tried setting up a second server on the same machine (connected to that same network), but it failed for the same reason. Can you get it to work? Tim -- Visit my website: (and please be a supporter of free trade, free software, phr33 s0ftware, free dom, and free propoganda by giving others the url) http://kmg.is-a-geek.org Garunteed to be down at least 5% of the time. From ajsiegel at optonline.net Fri Dec 17 13:14:08 2004 From: ajsiegel at optonline.net (Arthur) Date: Fri Dec 17 13:14:27 2004 Subject: [Edu-sig] The power of interactivity In-Reply-To: <001601c4e39c$c34ccc50$19d00980@LYDIAN> Message-ID: <0I8V00DKA8NRMR@mta6.srv.hcvlny.cv.net> Prasan writes - > I'm a masochist, but because it will be invaluable should they enter the > industry and be in charge of writing a scripting system. My objectives for > introducing Python will be to introduce an appreciation for language > design > (our school sticks to C++ for most of the undergraduate coursework), and > to > get them thinking about building flexible applications. The one option > here > is to write the basic framework myself, including some binding code > (that'd > give them a head start, but they'll have to extend the application on both > the C++ and Python side - and that should give them the experience they > need). Has anyone here experimented with using the C++/Python combination > as > an example of how one could produce flexible systems (not just for games, > but in general). If so, I'd love to hear about it. Are you aware of the Boost libraries for writing Python extensions in C++? http://www.boost.org/libs/python/doc/ The beauty being that bindings created with Boost allow C++ classes to be inheritable and extendible in Python, rather than just scripted by Python. VPython - which is a 3d library - uses Boost in its "experimental" 3.0 version. http://www.vpython.org/linux_download.html Why not get your students pitching in on the continuing development of VPython? Art From ajsiegel at optonline.net Fri Dec 17 13:20:21 2004 From: ajsiegel at optonline.net (Arthur) Date: Fri Dec 17 13:21:21 2004 Subject: [Edu-sig] The power of interactivity In-Reply-To: <001601c4e39c$c34ccc50$19d00980@LYDIAN> Message-ID: <0I8V004708Y1CB@mta1.srv.hcvlny.cv.net> Prasan - You should also definitely look at Panda3d, if you have not: http://panda3d.etc.cmu.edu/ Developed by Disney and now being supported at CMU, They may, in fact, have beaten you to the punch. It's pretty big league stuff, it seems to me. Art > -----Original Message----- > From: edu-sig-bounces@python.org [mailto:edu-sig-bounces@python.org] On > Behalf Of Prasan Samtani > Sent: Thursday, December 16, 2004 1:27 PM > To: edu-sig@python.org > Subject: [Edu-sig] The power of interactivity > > > I should introduce you to some of the characters on board edu-sig. > > ........ > > Fascinating stuff, Kirby. Thanks! > > Just kicking around some more ideas on Python in education. I am the > assistant for a class on Game Programming, and just got the Python bug > when > I started using it for a research project (which hopefully shows up in > PyCon - http://www.tacticallanguage.com). Anyways, I've been thinking of > ways to introduce Python as a model for scripting languages (OK, OK, I > know > Python is not a scripting language, but it is most often used as one in > the > video game development cycle) for this one semester course. A problem > arises > in splitting the limited course time between teaching them 'hard skills' > such as building the bare metal of their 'Game Engine', and soft skills > such > as designing a scripting system. > > I'd also like the students to write the binding code themselves, not > because > I'm a masochist, but because it will be invaluable should they enter the > industry and be in charge of writing a scripting system. My objectives for > introducing Python will be to introduce an appreciation for language > design > (our school sticks to C++ for most of the undergraduate coursework), and > to > get them thinking about building flexible applications. The one option > here > is to write the basic framework myself, including some binding code > (that'd > give them a head start, but they'll have to extend the application on both > the C++ and Python side - and that should give them the experience they > need). Has anyone here experimented with using the C++/Python combination > as > an example of how one could produce flexible systems (not just for games, > but in general). If so, I'd love to hear about it. > > Thanks, > Prasan > > _______________________________________________ > Edu-sig mailing list > Edu-sig@python.org > http://mail.python.org/mailman/listinfo/edu-sig From samtani at ISI.EDU Fri Dec 17 16:45:59 2004 From: samtani at ISI.EDU (Prasan Samtani) Date: Fri Dec 17 16:46:39 2004 Subject: [Edu-sig] The power of interactivity References: <0I8V00DKA8NRMR@mta6.srv.hcvlny.cv.net> Message-ID: <002201c4e44f$849da610$6700a8c0@mard> ----- Original Message ----- From: "Arthur" To: "'Prasan Samtani'" ; Sent: Friday, December 17, 2004 4:14 AM Subject: RE: [Edu-sig] The power of interactivity > Are you aware of the Boost libraries for writing Python extensions in C++? > > http://www.boost.org/libs/python/doc/ > > The beauty being that bindings created with Boost allow C++ classes to be > inheritable and extendible in Python, rather than just scripted by Python. I've used boost::python, and I like enough to use it at work. However, for the classroom, I'm using Python as a model for scripting languages, and I think that understanding the idea of 'extension' by hand-coding some bindings would be useful (we could of course require the bindings to be hand-written as a homework ass., and then recommend they use boost::python for the final project). > VPython - which is a 3d library - uses Boost in its "experimental" 3.0 > version. > > http://www.vpython.org/linux_download.html > > Why not get your students pitching in on the continuing development of > VPython? Thanks for the link. However, once again, for the classroom, we'd still like them to understand how games are built (including some of the nuts and bolts that are already implemented in VPython) from the ground up. Thanks again, Arthur. From samtani at ISI.EDU Fri Dec 17 16:52:02 2004 From: samtani at ISI.EDU (Prasan Samtani) Date: Fri Dec 17 16:52:39 2004 Subject: [Edu-sig] The power of interactivity References: <0I8V004708Y1CB@mta1.srv.hcvlny.cv.net> Message-ID: <002c01c4e450$5c889cb0$6700a8c0@mard> ----- Original Message ----- From: "Arthur" To: "'Prasan Samtani'" ; Sent: Friday, December 17, 2004 4:20 AM Subject: RE: [Edu-sig] The power of interactivity > Prasan - > > You should also definitely look at Panda3d, if you have not: > > http://panda3d.etc.cmu.edu/ > > Developed by Disney and now being supported at CMU, > > They may, in fact, have beaten you to the punch. It's pretty big league > stuff, it seems to me. > > Art Looks like a research team is running it though.... our aims for the class are set far lower - it is a one semester introduction course (which means students may not have _any_ 3D experience before stepping into the classroom). A simple space-shooter or tank game are examples of past projects. From urnerk at qwest.net Fri Dec 17 18:10:13 2004 From: urnerk at qwest.net (Kirby Urner) Date: Fri Dec 17 18:10:16 2004 Subject: [Edu-sig] TinyP2P In-Reply-To: <41C230B4.6050603@comcast.net> Message-ID: <20041217171013.6FA7C1E400B@bag.python.org> > I'm having a hard time getting it to work; it keeps telling me that it's > iterating over a non-sequence. I guess this means that the object isn't > a list or a tuple or anything like that. I think that means there's only > one host, which is to be expected. I'm trying to do it with 127.0.0.1 or > my local router-created network, but neither work. I tried setting up a > second server on the same machine (connected to that same network), but > it failed for the same reason. Can you get it to work? > > Tim > Hi Tim -- Too lazy to reboot the Compaq into Mandrake 9.2, I'm trying this in Windows. I downloaded the code to a Python 2.4 subdirectory (site-packages) and inserted a few carriage returns for readability (didn't help much -- these little lambda people might be happier in Scheme). Then I opened a cmd window and went to said subdirectory and entered: --- Microsoft Windows XP [Version 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp. C:\Documents and Settings\Kirby>d: D:\>cd python24 D:\Python24>cd Lib D:\Python24\Lib>cd site-packages D:\Python24\Lib\site-packages>python tinyp2p.py shazam server ktu2 6789 --- So far so good. Then I opened a second command window went to my c:\temp subdirectory and entered: --- Microsoft Windows XP [Version 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp. C:\Documents and Settings\Kirby>cd temp The system cannot find the path specified. C:\Documents and Settings\Kirby>cd\ C:\>cd temp C:\temp>d:\python24\python d:\python24\Lib\site-packages\tinyp2p.py shazam client http://ktu2.6789 * And what I got back was: Traceback (most recent call last): File "d:\python24\Lib\site-packages\tinyp2p.py", line 26, in ? for url in pxy(ar[3]).f(pw(ar[3]),0,[]): File "d:\python24\lib\xmlrpclib.py", line 1096, in __call__ return self.__send(self.__name, args) File "d:\python24\lib\xmlrpclib.py", line 1383, in __request verbose=self.__verbose File "d:\python24\lib\xmlrpclib.py", line 1129, in request self.send_content(h, request_body) File "d:\python24\lib\xmlrpclib.py", line 1243, in send_content connection.endheaders() File "d:\python24\lib\httplib.py", line 792, in endheaders self._send_output() File "d:\python24\lib\httplib.py", line 673, in _send_output self.send(msg) File "d:\python24\lib\httplib.py", line 640, in send self.connect() File "d:\python24\lib\httplib.py", line 608, in connect socket.SOCK_STREAM): socket.gaierror: (11001, 'getaddrinfo failed') C:\temp> --- Am I going to now try to debug this giant mess just so I can prove Python is able to do peer to peer (which I already knew)? No. Do I think someone else might get this to work on Win XP? Definitely. Do I think Win XP is part of the problem somehow? I really have no idea. BUT WAIT! Now that I'm eyeballing all of the above, I see that I have some silly dot instead of a colon after the ktu2 in the URL. Let's try that again: --- C:\temp>d:\python24\python d:\python24\Lib\site-packages\tinyp2p.py shazam client http://ktu2:6789 * Traceback (most recent call last): File "d:\python24\Lib\site-packages\tinyp2p.py", line 26, in ? for url in pxy(ar[3]).f(pw(ar[3]),0,[]): File "d:\python24\lib\xmlrpclib.py", line 1096, in __call__ return self.__send(self.__name, args) File "d:\python24\lib\xmlrpclib.py", line 1383, in __request verbose=self.__verbose File "d:\python24\lib\xmlrpclib.py", line 1147, in request return self._parse_response(h.getfile(), sock) File "d:\python24\lib\xmlrpclib.py", line 1286, in _parse_response return u.close() File "d:\python24\lib\xmlrpclib.py", line 744, in close raise Fault(**self._stack[0]) xmlrpclib.Fault: --- OK, well, definite progress anyway. This is a completely different error. I just had my URL borked in the top example. Maybe I just don't know what a pattern should look like. I tried * for "everything," then I tried "py". But look, even though both tries got me tracebacks, the server is now registering that it's getting hits: --- [beneath the earlier server command line] KTU2 - - [17/Dec/2004 09:02:34] "POST /RPC2 HTTP/1.0" 200 - KTU2 - - [17/Dec/2004 09:03:05] "POST /RPC2 HTTP/1.0" 200 - --- I feel a lot closer to having it work. On the other hand, I have no more incentive to try *making* it work. Off to other things. Kinda fun though. Kirby > -- > Visit my website: (and please be a supporter of free trade, free > software, phr33 s0ftware, free dom, and free propoganda by giving > others the url) http://kmg.is-a-geek.org > Garunteed to be down at least 5% of the time. > > _______________________________________________ > Edu-sig mailing list > Edu-sig@python.org > http://mail.python.org/mailman/listinfo/edu-sig From ajsiegel at optonline.net Sat Dec 18 00:30:40 2004 From: ajsiegel at optonline.net (Arthur) Date: Sat Dec 18 00:30:47 2004 Subject: [Edu-sig] The power of interactivity In-Reply-To: <002201c4e44f$849da610$6700a8c0@mard> Message-ID: <0I8W00EXO3ZAD3@mta8.srv.hcvlny.cv.net> Prasan writes - > > > Are you aware of the Boost libraries for writing Python extensions in > C++? > > > > http://www.boost.org/libs/python/doc/ > > > > The beauty being that bindings created with Boost allow C++ classes to > be > > inheritable and extendible in Python, rather than just scripted by > Python. > > I've used boost::python, and I like enough to use it at work. However, for > the classroom, I'm using Python as a model for scripting languages, and I > think that understanding the idea of 'extension' by hand-coding some > bindings would be useful (we could of course require the bindings to be > hand-written as a homework ass., and then recommend they use boost::python > for the final project). I guess the distinction between hand-coding and what it is one does using the mechanism provided via boost is lost on me. I understand that SWIG is an automated tool, and can better understand the distinction if made as to that tool. Do you mean you want the student writing directly to the Python extension API In C, versus C++, counting references (as if I understand what I am saying by saying this) - and so forth. I recently saw the release of package in the graphics area that had ported, in the new version, their C extension code to Pyrex. Once again, the problem is a good one - a number of good and interesting possible ways to go. Art From baumanpdx at comcast.net Sat Dec 18 19:01:53 2004 From: baumanpdx at comcast.net (The Bauman Family) Date: Sat Dec 18 19:01:57 2004 Subject: [Edu-sig] Firefox ad Message-ID: <41C47091.8010101@comcast.net> You know the Firefox ad in the New York Times on the 17th? My dad bought me a spot (actually 2 spots) in that (I didn't even know til the day of the ad)! Look at my blog and/or the paper to see it; it's Tim Bauman and Kimaster George (no space; it's sort of spelled wrong). Tim -- Visit my website: (and please be a supporter of ... free software, ... free dom, ... by giving others the url) http://kmg.is-a-geek.org Garunteed to be down at least 5% of the time. stff rmed4ur bndwdth "Do you want to reconsider your answer?" "No, I'll remain disconnected." From urnerk at qwest.net Sat Dec 18 23:20:26 2004 From: urnerk at qwest.net (Kirby Urner) Date: Sat Dec 18 23:20:37 2004 Subject: [Edu-sig] Firefox ad In-Reply-To: <41C47091.8010101@comcast.net> Message-ID: <20041218222027.2AC8C1E4017@bag.python.org> That's very cool Tim. I congratulate your dad for thinking of such a great gift. I need to find hardcopy of NYT 12/17. Maybe Coffee People still has some. Kirby > You know the Firefox ad in the New York Times on the 17th? My dad bought > me a spot (actually 2 spots) in that (I didn't even know til the day of > the ad)! Look at my blog and/or the paper to see it; it's Tim Bauman and > Kimaster George (no space; it's sort of spelled wrong). > > Tim > From ajsiegel at optonline.net Sat Dec 18 23:51:39 2004 From: ajsiegel at optonline.net (Arthur) Date: Sat Dec 18 23:53:42 2004 Subject: [Edu-sig] re: Pygeo, platforms, wx and Tk Message-ID: <1103410299.8651.22.camel@localhost.localdomain> I had written - >Bottom line problem is that I am using threading without understanding >threads. I'm guessing my answer is somewhere in getting down a level into >the threads themselves, rather than trying to get away with only dealing at >the level of the objects being threaded. >And now that I have a real problem to solve, I'll probably get down there >(eventually) and solve it Was able to spend some time on this today. Explored what I could find about threading and Tk, and learned (I think) - among other things - that the problem I was running into seems to (somewhat ironically) be the result of tcl implementing threading in 8.4 (and that the reason it was not cropping up on Windows is not a os issue, I'm thinking, but that tcl/tk is compiled on Windows without threading support) Whether the above is right or wrong ... I seem to have found a simple solution without going deeper in an implementation of threads, and qeues, and locks and semaphores and such. I start the TK thread from the VPython GTK Display class, sending "self" as a parameter to the Tk ControlPanel class. No problem here, as long as I don't try to start the TK mainloop from here. The Tk ContolPanel now has a reference to the Display and can send messages through that reference. The mainloop() call is from within __init__ of the Tk Control Panel. I had gotten that far before. Turns out, to get my bi-directional communication, all I need to do is setattr(Display,"control_panel",self) in the __init__ of the Tk ControlPanel class, so that now Display has a reference to the ControlPanel by which it can send messages of its events back in that direction. My first ever use of setattr. Knew it was there for something ;) Tidy and simple, I think. And I *do* have fun with Python. Art From Scott.Daniels at Acm.Org Sun Dec 19 00:56:10 2004 From: Scott.Daniels at Acm.Org (Scott David Daniels) Date: Sun Dec 19 00:54:56 2004 Subject: [Edu-sig] Re: Pygeo, platforms, wx and Tk In-Reply-To: <1103410299.8651.22.camel@localhost.localdomain> References: <1103410299.8651.22.camel@localhost.localdomain> Message-ID: Arthur wrote: > ... to get my bi-directional communication, all I need to do is > setattr(Display,"control_panel",self) in the __init__ of the Tk ControlPanel > class, so that now Display has a reference to the ControlPanel by which > it can send messages of its events back in that direction. > > My first ever use of setattr. Knew it was there for something ;) Hmmm.... Outside of playing with setattr, why not use: Display.control_panel = self -- -- Scott David Daniels Scott.Daniels@Acm.Org From lac at strakt.com Sun Dec 19 01:25:07 2004 From: lac at strakt.com (Laura Creighton) Date: Sun Dec 19 01:25:13 2004 Subject: [Edu-sig] Firefox ad In-Reply-To: Message from "Kirby Urner" of "Sat, 18 Dec 2004 14:20:26 PST." <20041218222027.2AC8C1E4017@bag.python.org> References: <20041218222027.2AC8C1E4017@bag.python.org> Message-ID: <200412190025.iBJ0P7BA026277@ratthing-b246.strakt.com> In a message of Sat, 18 Dec 2004 14:20:26 PST, "Kirby Urner" writes: > >That's very cool Tim. I congratulate your dad for thinking of such a gre >at >gift. > >I need to find hardcopy of NYT 12/17. Maybe Coffee People still has some >. > >Kirby > >> You know the Firefox ad in the New York Times on the 17th? My dad bought >> me a spot (actually 2 spots) in that (I didn't even know til the day of >> the ad)! Look at my blog and/or the paper to see it; it's Tim Bauman an >d >> Kimaster George (no space; it's sort of spelled wrong). >> >> Tim >> Ah, I live in Sweden, and I have no clue about what 'the Firefox ad in the New York Times on the 17th?' means. From ajsiegel at optonline.net Sun Dec 19 01:32:49 2004 From: ajsiegel at optonline.net (Arthur) Date: Sun Dec 19 01:34:50 2004 Subject: [Edu-sig] Re: Pygeo, platforms, wx and Tk In-Reply-To: References: <1103410299.8651.22.camel@localhost.localdomain> Message-ID: <1103416369.9493.17.camel@localhost.localdomain> On Sat, 2004-12-18 at 15:56 -0800, Scott David Daniels wrote: > Arthur wrote: > > ... to get my bi-directional communication, all I need to do is > > setattr(Display,"control_panel",self) in the __init__ of the Tk ControlPanel > > class, so that now Display has a reference to the ControlPanel by which > > it can send messages of its events back in that direction. > > > > My first ever use of setattr. Knew it was there for something ;) > > Hmmm.... Outside of playing with setattr, why not use: > > Display.control_panel = self Because then the solution to my Big Problem looks *too* simple ;) Interesting, relative to our prior exchange, that I needed to get some handle on the potential next-level-down solutions, before the obvious at-this-level solution dawned on me. Recently had explored what is involved in deepcopying a relatively complex class, before I realized that the actual solution to my actual problem needed no such hairy mechanism. Part of the problem of being half-smart when it comes to these things, is never being sure at what level the solution to my problem lies - the level at which I work comfortably or at a more occult (to me) level. On the other hand I am sometimes forced into some ingenuity in the use of what I *do* know, and feel I sometimes end up with something that avoids being more occult than necessary - whereas someone more comfortable at those levels may have immediately jumped there for a solution. Or not. Art From lac at strakt.com Sun Dec 19 01:38:27 2004 From: lac at strakt.com (Laura Creighton) Date: Sun Dec 19 01:38:32 2004 Subject: [Edu-sig] Firefox ad In-Reply-To: Message from "Kirby Urner" of "Sat, 18 Dec 2004 14:20:26 PST." <20041218222027.2AC8C1E4017@bag.python.org> References: <20041218222027.2AC8C1E4017@bag.python.org> Message-ID: <200412190038.iBJ0cRAI026309@ratthing-b246.strakt.com> In a message of Sat, 18 Dec 2004 14:20:26 PST, "Kirby Urner" writes: > >That's very cool Tim. I congratulate your dad for thinking of such a gre >at >gift. > >I need to find hardcopy of NYT 12/17. Maybe Coffee People still has some >. > >Kirby > >> You know the Firefox ad in the New York Times on the 17th? My dad bough >t >> me a spot (actually 2 spots) in that (I didn't even know til the day of >> the ad)! Look at my blog and/or the paper to see it; it's Tim Bauman an >d >> Kimaster George (no space; it's sort of spelled wrong). >> >> Tim >> Sorry,sorry, hit send too soon. God only knows what went out. Tim: not only do I not live in NYC, but not in the USA either. I live in G?teborg, Sweden. So can you please explain what you are so happy about? Laura From baumanpdx at comcast.net Sun Dec 19 02:03:42 2004 From: baumanpdx at comcast.net (The Bauman Family) Date: Sun Dec 19 02:03:47 2004 Subject: [Edu-sig] Firefox ad In-Reply-To: <200412190038.iBJ0cRAI026309@ratthing-b246.strakt.com> References: <20041218222027.2AC8C1E4017@bag.python.org> <200412190038.iBJ0cRAI026309@ratthing-b246.strakt.com> Message-ID: <41C4D36E.3090505@comcast.net> Laura Creighton wrote: >In a message of Sat, 18 Dec 2004 14:20:26 PST, "Kirby Urner" writes: > > >>That's very cool Tim. I congratulate your dad for thinking of such a gre >>at >>gift. >> >>I need to find hardcopy of NYT 12/17. Maybe Coffee People still has some >>. >> >>Kirby >> >> >> >>>You know the Firefox ad in the New York Times on the 17th? My dad bough >>> >>> >>t >> >> >>>me a spot (actually 2 spots) in that (I didn't even know til the day of >>>the ad)! Look at my blog and/or the paper to see it; it's Tim Bauman an >>> >>> >>d >> >> >>>Kimaster George (no space; it's sort of spelled wrong). >>> >>>Tim >>> >>> >>> > >Sorry,sorry, hit send too soon. God only knows what went out. > >Tim: not only do I not live in NYC, but not in >the USA either. I live in G?teborg, Sweden. So can you please >explain what you are so happy about? > >Laura > > > > -- Visit my website: (and please be a supporter of ... free software, ... free dom, ... by giving others the url) http://kmg.is-a-geek.org Garunteed to be down at least 5% of the time. stff rmed4ur bndwdth "Do you want to reconsider your answer?" "No, I'll remain disconnected." From Scott.Daniels at Acm.Org Sun Dec 19 02:16:22 2004 From: Scott.Daniels at Acm.Org (Scott David Daniels) Date: Sun Dec 19 02:15:07 2004 Subject: [Edu-sig] Re: Pygeo, platforms, wx and Tk In-Reply-To: <1103416369.9493.17.camel@localhost.localdomain> References: <1103410299.8651.22.camel@localhost.localdomain> <1103416369.9493.17.camel@localhost.localdomain> Message-ID: Arthur wrote: > On Sat, 2004-12-18 at 15:56 -0800, Scott David Daniels wrote: >>Arthur wrote: >>>... to get my bi-directional communication, all I need to do is >>>setattr(Display,"control_panel",self) in the __init__ of the Tk ControlPanel... >>>My first ever use of setattr. Knew it was there for something ;) >> >>Hmmm.... Outside of playing with setattr, why not use: >> Display.control_panel = self ... > On the other hand I am sometimes forced into some ingenuity in the use > of what I *do* know, and feel I sometimes end up with something that > avoids being more occult than necessary - whereas someone more > comfortable at those levels may have immediately jumped there for a > solution. OK, I was doing two things, (1) suggesting another simpler (more readable) form, and (2) honestly asking whether this was, in fact, a reasonable substitution, or whether there was a consideration that I hadn't understood. I always wind up with crappy code on my way to programs I like. Writing code, like writing English, is a process of inspiration and rework. I like the process in code, and hate the same process for writing English. Probably for two reasons. First, I have been harassed while writing English so often that I hear all such nonsense when I write. This is really the effect of bad teaching. Second, I am a prolific reader, and I very much appreciate good writing at the caliber of "the dozen best in a century." I read my writing and I notice a dramatic distance between my best and their (published) worst. Tough competition. -- -- Scott David Daniels Scott.Daniels@Acm.Org From drlinux at columbus.rr.com Sun Dec 19 04:04:08 2004 From: drlinux at columbus.rr.com (Dave Reed) Date: Sun Dec 19 04:04:14 2004 Subject: [Edu-sig] Re: Firefox ad In-Reply-To: <200412190038.iBJ0cRAI026309@ratthing-b246.strakt.com> References: <20041218222027.2AC8C1E4017@bag.python.org> <200412190038.iBJ0cRAI026309@ratthing-b246.strakt.com> Message-ID: <200412182204.08293.drlinux@columbus.rr.com> On Saturday 18 December 2004 19:38, Laura Creighton wrote: > Tim: not only do I not live in NYC, but not in > the USA either. I live in G?teborg, Sweden. So can you please > explain what you are so happy about? > > Laura See these two links: http://weblog.infoworld.com/techwatch/archives/000917.html http://www.ectnews.com/images/article_images/firefox_nytimes_552x430.jpg Dave From ajsiegel at optonline.net Sun Dec 19 14:44:49 2004 From: ajsiegel at optonline.net (Arthur) Date: Sun Dec 19 14:45:06 2004 Subject: [Edu-sig] Re: Pygeo, platforms, wx and Tk In-Reply-To: Message-ID: <0I8Z003X126TLB@mta5.srv.hcvlny.cv.net> Scott write - > Arthur wrote: > > On Sat, 2004-12-18 at 15:56 -0800, Scott David Daniels wrote: > >>Arthur wrote: > >>>... to get my bi-directional communication, all I need to do is > >>>setattr(Display,"control_panel",self) in the __init__ of the Tk > ControlPanel... > >>>My first ever use of setattr. Knew it was there for something ;) > >> > >>Hmmm.... Outside of playing with setattr, why not use: > >> Display.control_panel = self > ... > > On the other hand I am sometimes forced into some ingenuity in the use > > of what I *do* know, and feel I sometimes end up with something that > > avoids being more occult than necessary - whereas someone more > > comfortable at those levels may have immediately jumped there for a > > solution. > OK, I was doing two things, (1) suggesting another simpler (more > readable) form, and (2) honestly asking whether this was, in fact, > a reasonable substitution, or whether there was a consideration > that I hadn't understood. I appreciated your comment, and I hope you understand that I was poking fun at myself, because: 1. Your substation is simpler and more readable. 2. I see no reason it doesn't work exactly as well. 3 My post was patting myself on the back for finding a simple solution to my problem, when there was an obvious further simplification staring me in the face, and I was overlooking. > I always wind up with crappy code on my way to programs I like. > Writing code, like writing English, is a process of inspiration > and rework. I like the process in code, and hate the same process > for writing English. Probably for two reasons. PyGeo is on its eightieth round of refactoring. In my case the issue is three fold 1. the normal issues involved in finding one's way to simple, maintainable, readable and efficient code. 2. I am learning as I go - so I can have code refactored down to nearly its best form, based on what I know and find that new possibility open up, when I know more. 3. Python's evolution. Python2.3, e.g., may well present opportunities to simplifier the code that was not present in Python2.2. At my normal billing rates, PyGeo is a $1m project. ;) Art From lac at strakt.com Sun Dec 19 14:58:24 2004 From: lac at strakt.com (Laura Creighton) Date: Sun Dec 19 14:58:27 2004 Subject: [Edu-sig] Re: Firefox ad In-Reply-To: Message from Zajcev Evgeny of "Sun, 19 Dec 2004 11:13:16 +0300." <86fz22904j.fsf@yandex.ru> References: <20041218222027.2AC8C1E4017@bag.python.org> <200412190038.iBJ0cRAI026309@ratthing-b246.strakt.com> <200412182204.08293.drlinux@columbus.rr.com> <86fz22904j.fsf@yandex.ru> Message-ID: <200412191358.iBJDwPQD028333@ratthing-b246.strakt.com> Thank you all very much. This is most interesting. What a cool present. Laura From Scott.Daniels at Acm.Org Sun Dec 19 22:07:29 2004 From: Scott.Daniels at Acm.Org (Scott David Daniels) Date: Sun Dec 19 22:06:09 2004 Subject: [Edu-sig] Re: Firefox ad In-Reply-To: <20041218222027.2AC8C1E4017@bag.python.org> References: <41C47091.8010101@comcast.net> <20041218222027.2AC8C1E4017@bag.python.org> Message-ID: Kirby Urner wrote: > That's very cool Tim. I congratulate your dad for thinking of such a great > gift. > I need to find hardcopy of NYT 12/17. Maybe Coffee People still has some. > Kirby On slashdot, they just noted the ad original is: http://www.mozilla.org/press/nytimes-firefox-final.pdf Which will let you magnify it to the point it is simple to read. -- -- Scott David Daniels Scott.Daniels@Acm.Org From ajsiegel at optonline.net Sat Dec 25 22:26:04 2004 From: ajsiegel at optonline.net (Arthur) Date: Sat Dec 25 22:28:39 2004 Subject: [Edu-sig] Learn to Program in Ten Years Message-ID: <1104009964.23826.38.camel@localhost.localdomain> Some reality from Peter Norvig: http://norvig.com/21-days.html Other finds from a day of lazy exploration (us Jews have time on Christmas): A nice file browser written entirely in Python/pygtk http://claw3.berlios.de/index.php?page=downloads.html which tempts me to make exploring pygtk as an alternative to tkinter a priority, In fact I started a bit. And - So that's probably what Prasan was driving at: Boost *does* have an automated code generation tool: Pyste http://www.boost.org/libs/python/pyste/index.html though I am not sure why that disqualifies Boost for his teaching purposes. VPython's Boost code looks quite hand-coded. For myself, Pyste might actually be sane way to start understanding extension writing with Boost. And non-Python (mostly) but very interesting for those of us who like to work with graphics/3d with some good numerics behind it: """ Lush is an object-oriented programming language designed for researchers, experimenters, and engineers interested in large-scale numerical and graphic applications. """ http://lush.sourceforge.net/index.html It is a Lisp-like dialect with an interactive shell, but can generate C code, and has developed interfaces to major multi-media libraries like openGL,SDL,ALSA. Been around a while, is mature. It is interpreted when given untyped variable information, and compiled when given typed variables. And works nicely with inline C code. Wouldn't that be nice if Python... Not totally off-topic in any case since it does have bindings to the Python C API. The demos are written for Python2.2. I actually got into getting them to run on Python2.3 (change LONG_LONG to PY_LONG_LONG (thank you Google) - but when it got to trying to fix error messages it was generating related to _PyObject_GC_UnTrack I threw in the towel. Especially since I am not sure where the Lush/Python link is supposed to get you. __ A little effort at sharing my finds of the day. I hope no one objects. Art From cben at users.sf.net Sun Dec 26 07:58:59 2004 From: cben at users.sf.net (Beni Cherniavsky) Date: Sun Dec 26 00:59:07 2004 Subject: [Edu-sig] Learn to Program in Ten Years In-Reply-To: <1104009964.23826.38.camel@localhost.localdomain> References: <1104009964.23826.38.camel@localhost.localdomain> Message-ID: <41CE6133.4090703@users.sf.net> Arthur wrote: > Some reality from Peter Norvig: > > http://norvig.com/21-days.html > As far as I can see, this is true indeed. And the advice is very good. Hey, this means I'll be a good programmer soon . -- Beni Cherniavsky , who can only read email on weekends. From urnerk at qwest.net Sun Dec 26 01:02:07 2004 From: urnerk at qwest.net (Kirby Urner) Date: Sun Dec 26 01:02:09 2004 Subject: [Edu-sig] Learn to Program in Ten Years In-Reply-To: <1104009964.23826.38.camel@localhost.localdomain> Message-ID: <20041226000207.CA8BA1E4005@bag.python.org> > Other finds from a day of lazy exploration (us Jews have time on > Christmas): > Tell me about it. I've been napping, browsing... even added a "me" face to my blog (taken aboard a roller coaster of some kind). > SKIPPING DOWN -- lot's of interest, especially Lush... > It is interpreted when given untyped variable information, and compiled > when given typed variables. And works nicely with inline C code. > > Wouldn't that be nice if Python... > I think this idea of a Core Python that doesn't go with typing, makes a lot of sense. Then there could be this annotation which, applied to Python, would take it into static. Maybe even some special commenting would do the trick, e.g.: i = 3 # int j = 4 # int Probably not though. I just don't want Core Python to sprout all these declarations, because the whole point of late binding is you can't really know -- the code makes up new types at runtime, so they can't have been declared (pre runtime, there wouldn't be any words for 'em). Something like that anyway. Declaring types really pins you down and suddenly, it's really not Python. > Not totally off-topic in any case since it does have bindings to the > Python C API. The demos are written for Python2.2. I actually got into > getting them to run on Python2.3 (change LONG_LONG to PY_LONG_LONG > (thank you Google) - but when it got to trying to fix error messages it > was generating related to _PyObject_GC_UnTrack I threw in the towel. > Especially since I am not sure where the Lush/Python link is supposed > to get you. As I was explaining to Tim at our most recent official ILP meeting, in theory, any Turing Complete language can implement any other Turing Complete language. You can interpret Python with a C program, but you could also interpret C with a Python program. That sounds wrong, only because the chip itself (the Intel or AMD or Motorola thingy) is also a Turing Machine, and a really critical one. Languages that go straight to the chip somehow, have to be there. PyPy is an attempt to deepen the Python layer. You could also design a chip that executes Python byte codes natively somehow -- that'd be interesting to think about. > > __ > A little effort at sharing my finds of the day. > > I hope no one objects. > > Art Not at all, good finds. Back to napping. Kirby From Scott.Daniels at Acm.Org Sun Dec 26 01:51:13 2004 From: Scott.Daniels at Acm.Org (Scott David Daniels) Date: Sun Dec 26 01:49:50 2004 Subject: [Edu-sig] Cute link for the Willamette CS Department Message-ID: You'll enjoy this: http://norvig.com/21-days.html --Scott David Daniels Scott.Daniels@Acm.Org From ajsiegel at optonline.net Sun Dec 26 02:02:59 2004 From: ajsiegel at optonline.net (Arthur) Date: Sun Dec 26 02:03:18 2004 Subject: [Edu-sig] Learn to Program in Ten Years In-Reply-To: <20041226000207.CA8BA1E4005@bag.python.org> Message-ID: <0I9B00C331L5S5@mta7.srv.hcvlny.cv.net> Kirby - > > > Other finds from a day of lazy exploration (us Jews have time on > > Christmas): > > > > Tell me about it. I've been napping, browsing... even added a "me" face > to > my blog (taken aboard a roller coaster of some kind). While I had a visit from Santa. My son shows up with his friend Peter, and we get to talking... He is majoring in Technical Writing (apparently there is such a major nowdays) and needs a unpaid internship for the summer. So I am working on seeing if documenting PyGeo - for real - might work for him. Doesn't hurt - his father is an accomplished math educator\text book author now at the NSF. The boys, and friends, are dinking beer in the basement - and though I don't hear much talk of algorithms coming from down there at the moment - this might actually work. Anybody see the Seinfeld episode where Kramer gets an intern? Art From Scott.Daniels at Acm.Org Sun Dec 26 15:24:28 2004 From: Scott.Daniels at Acm.Org (Scott David Daniels) Date: Sun Dec 26 15:23:05 2004 Subject: [Edu-sig] Re: Cute link for the Willamette CS Department In-Reply-To: References: Message-ID: Sorry, I thought I was sending e-mail. (blush) -- Scott David Daniels Scott.Daniels@Acm.Org From urnerk at qwest.net Sun Dec 26 18:43:28 2004 From: urnerk at qwest.net (Kirby Urner) Date: Sun Dec 26 18:43:30 2004 Subject: [Edu-sig] Learn to Program in Ten Years In-Reply-To: <0I9B00C331L5S5@mta7.srv.hcvlny.cv.net> Message-ID: <20041226174329.434941E4005@bag.python.org> > Anybody see the Seinfeld episode where Kramer gets an intern? > > Art > I'm needing to catch up on Seinfeld -- lots of fun when I've caught it. I catch up on stuff with Netflix a lot. Did several seasons of Buffy back to back, my first time to ever see this show. Kitty Kelly says the Bush family are more like the Sopranos than some other family (I forget which) -- but then, I've never seen a single episode of the Sopranos to date. Netflix. Relation to Python? Well, it's probably thanks to my being a programmer for well over 10 years now, that I've had so little time for television (true rumor: he loved Sesame Street). I got started programming on an HP65, which was close to assembler (and some like calculators today), then went through the end of the punch card era at Princeton, but attracted like a moth to the flame to the interactive command line, the terminal shell program. 360/370 VMS (virtural machine). You basically had a whole mainframe to drive, virtually. This was not an intuitive interface, and I ended up just sticking with APL. However, my major at Princeton, after a fast gallop through the Woodrow Wilson School, ended up being Philosophy, although to get all the Wittgenstein I wanted (still want -- always satisfying), I had to go to the other wing of 1879 Hall: the Religion Department, with Vic Preller. Dr. Rorty was my thesis adviser however, along with some British guy, a visiting prof I think he was. We had to compromise on my grade, as my take on LW has always been rather avant garde. And with Vic, I failed to turn in a final paper (just spaced it), so he had no choice but to give me an F. I still recall the chance meeting: "Kirby, why didn't you turn in your final paper and force me to fail you in my course?" He sort of bowed as he said it. I felt like we were two Japanese Sumarai. But I never let philosophy vanquish my love of computer engineering, and as it turns out, that was fortunate. First of all, Wittgenstein was an engineer at heart (and architect). Second of all, my next big philosophers were both engineer-designers as well. Erhard and Fuller. They definitely weren't clones of each other, by a long shot. So tuning in via both was an amazing experience in stereophonics. Sounded like trouble in Gotham City. Kirby here, on the bat phone (philosophers love bats, especially the English philosophers -- a favorite term of endearment of theirs: batty). So after awhile, I gravitated to Americans for Civic Participation, which was a galvanize-the-voters operation. Make 'em care about the issues. Heighten their level of concern. We achieved *nothing* like the levels achieved in this last election. Dang, this time Americans really registered -- like, *really*. Anyway, at Project Vote! (the popular front name), I used a Zorba on my desk top (a portable CP/M jobber), while trucking over to some DC high rise (to the extent DC has any) to deal with a COBOL DBA. We'd feed in our requests, and out would come gobs and gobs of mail labels, on fan-fold, straight from the mainframe line printer. The data had been entered earlier, at our request, directly from public records. Our goal: get the disenfranchised involved, because this is their country too. I still believe that. So, I now had college training in multiple languages from Princeton, and field experience with both a desktop and mainframe. That made me a valuable asset in PDX, when I took a job with CUE (Center for Urban Education). CUE was set up in the aftermath of the Vietnam War, but a coalition of religious organizations and the feds, to help with resettlement of refugees. However, by the time I joined in the mid 1980s, interest in the Southeast Asia chapter was waning, and the funds were being diverted to bigger and better wars ahead. So CUE devolved back into EMO (Ecumenical Ministries of Oregon), and I went into private practice, once again as a programmer. Even up until now, I code for pay. I help with the inner workings of a large hospital system, working on the kind of application Eric Raymond correctly identifies as very prevalent: proprietary not for commercial reasons, but because private organizations are highly vertical, meaning their applications simply make no sense in an outside context. What good would my QUIPP be (Quinton Prolog Parser), if you don't have Quintons (at this point so old as to not be vendor-supported -- upgrade in the works). How many people have Quintons? Usually, expensive cath lab apparatus is special to hospitals. So: no QUIPP on Sourceforge. It just wouldn't make sense. If other hospitals want the code, they're free to contact RHDS. Likewise, I join projects where the code was never conceived of as open source. To many private business rules are hard coded. Open source doesn't mean exposing your internal operations to busy bodies. It means writing code that's generic enough to accommodate a lot of personal settings and configuration decisions, once you've got it. Like, go ahead and customize, and don't feel like your Apache config file has to be on Sourceforge either (like, who does that?). Anyway, it's not my place to then turn around and take something others paid for and worked on, and just decide it's a public asset. It's not mine to give away, basically. So yes, I eyeball private and proprietary code a lot. But it's not stuff that'd make much sense outside where and how it's currently used. I use Python at RHDS, and for other jobs. I used it to support Stu Quimby with stellar graphics for StrangeAttractors, a dynamite toy that few know of, understand, or grok -- except the kids who get it. Kirby From ajsiegel at optonline.net Sun Dec 26 21:49:56 2004 From: ajsiegel at optonline.net (Arthur) Date: Sun Dec 26 21:52:37 2004 Subject: [Edu-sig] Learn to Program in Ten Years In-Reply-To: <0I9C009ROBWF7Q@mta21.srv.hcvlny.cv.net> References: <0I9C009ROBWF7Q@mta21.srv.hcvlny.cv.net> Message-ID: <1104094196.19347.23.camel@localhost.localdomain> On Sun, 2004-12-26 at 09:43 -0800, Kirby Urner wrote: > > Anybody see the Seinfeld episode where Kramer gets an intern? > > > > Art > > > Relation to Python? Well, it's probably thanks to my being a programmer for > well over 10 years now, that I've had so little time for television (true > rumor: he loved Sesame Street).r Well then you may be proud to know that you are conversing with someone whose brother-in-law was the hind-half of Snuffleupagus for a number of years in its early days. I would go to the set to watch the proceedings occasionally. OK. *Now* I am OT. More On T. An open question to me in making a commitment toward learning PyGTK was its status with OpenGL and PyOpenGL. Turns out the situation looks quite good - in that the developer of gtkglext which is the most active, I think, gtk Opengl extension is also himself the developer of its Python binding PyGtkGLExt. I have it installed and working and it looks quite nice. http://gtkglext.sourceforge.net/ Art From urnerk at qwest.net Sun Dec 26 22:09:22 2004 From: urnerk at qwest.net (Kirby Urner) Date: Sun Dec 26 22:09:24 2004 Subject: [Edu-sig] Learn to Program in Ten Years In-Reply-To: <1104094196.19347.23.camel@localhost.localdomain> Message-ID: <20041226210923.0381F1E4009@bag.python.org> > An open question to me in making a commitment toward learning PyGTK was > its status with OpenGL and PyOpenGL. Turns out the situation looks > quite good - in that the developer of gtkglext which is the most active, > I think, gtk Opengl extension is also himself the developer of its > Python binding PyGtkGLExt. I have it installed and working and it looks > quite nice. > > http://gtkglext.sourceforge.net/ > > Art > > I just took a look at the PyGTK 2.0 Tutorial http://www.pygtk.org/pygtk2tutorial/index.html Very encouraging to see that much documentation spelled out in a usable format. However, I'm still curious: do you see PyGTK as a better way to spend your time than with wxPython? Wx has OpenGL bindings as well, has for quite some time. Also, wxPython has that very useful front end: when you download it, you get a huge pile of working code in the form of demos, all wrapped up in a well-organized wx GUI interface. I find that extremely cool. However, since VPython is its own thing, I've never been able to wrap my head around a way to treat VPython from within wx the same way I might treat OpenGL (not that I've done the latter either -- but the demo is persuasive). If wx had some way to establish a VPython window within its own unified event loop, that might lead to a next generation of Pygeo, no? Kirby From ajsiegel at optonline.net Sun Dec 26 22:35:30 2004 From: ajsiegel at optonline.net (Arthur) Date: Sun Dec 26 22:38:52 2004 Subject: [Edu-sig] Learn to Program in Ten Years In-Reply-To: <0I9C0033DLFL6J@mta17.srv.hcvlny.cv.net> References: <0I9C0033DLFL6J@mta17.srv.hcvlny.cv.net> Message-ID: <1104096930.20203.15.camel@localhost.localdomain> > I just took a look at the PyGTK 2.0 Tutorial > http://www.pygtk.org/pygtk2tutorial/index.html > > Very encouraging to see that much documentation spelled out in a usable > format. > > However, I'm still curious: do you see PyGTK as a better way to spend your > time than with wxPython? Wx has OpenGL bindings as well, has for quite some > time. Also, wxPython has that very useful front end: when you download it, > you get a huge pile of working code in the form of demos, all wrapped up in > a well-organized wx GUI interface. I find dat extremely cool. Well I guess I thinking that the investment in learning GTK/Gnome has more potential far-reaching benefit. wxPython - and I am not being denigrating in the slightest - is more the big fish in the littlish Python pond. I did choose to take wxPython-dev list off my "reply all" since I'm not looking to raise hackles, or even defend my choices. The PyGTK thing just happens to be where things are leading me personally. Its partly because VPython on Linux uses GTK and I would like to know it better for that reason. And its partly because ubuntu has helped re-ignite a long dormant interest in Linux as a desktop working environment, and I see GTK/Gnome as the Big Pond in that respect. And you in particular will be happy to know that GTK2 *does* have a skins feature ;) Art From urnerk at qwest.net Sun Dec 26 23:24:47 2004 From: urnerk at qwest.net (Kirby Urner) Date: Sun Dec 26 23:24:48 2004 Subject: [Edu-sig] Learn to Program in Ten Years In-Reply-To: <1104096930.20203.15.camel@localhost.localdomain> Message-ID: <20041226222447.049481E4005@bag.python.org> > Well I guess I thinking that the investment in learning GTK/Gnome has > more potential far-reaching benefit. wxPython - and I am not being > denigrating in the slightest - is more the big fish in the littlish > Python pond. > I haven't reached this conclusion myself. Wx is not a Python technology. It's a C++ library, and a lot of C++ coders use it from within C++. Then you have bindings from other languages, like Python. wxPython is one of these projects. Bittorrent is one of those wildly popular Python applications that uses it. At the OSCONs I've managed to attend (2003, 2004), wxPython attracted a high degree of interest and attendance. We've seen some exciting completed works making use of it. I've not seen similar enthusiasm for pyGTK. This might be the big-fish-in-a-small-pond syndrome, but, as I mentioned, I'm not ready to form a judgment along those lines. Part of what gives me pause is the whole .NET/Mono business. If managed code and IronPython become the new way to code GUI apps cross-platform, then it's the .NET API I should be studying. Under the hood, that might mean GTK+ on Linux. But the API will be essentially the same as Microsoft's. > I did choose to take wxPython-dev list off my "reply all" since I'm not > looking to raise hackles, or even defend my choices. > That's fine with me. I was mainly looking for feedback re the Vpython concept (any way to integrate that into the wx event loop?). > The PyGTK thing just happens to be where things are leading me > personally. Its partly because VPython on Linux uses GTK and I would > like to know it better for that reason. And its partly because ubuntu > has helped re-ignite a long dormant interest in Linux as a desktop > working environment, and I see GTK/Gnome as the Big Pond in that > respect. > This is where my .NET/Mono question surfaces again: behind Gnome is Ximian and behind Ximian is Novelle. And in the middle of it all is Miguel de Icaza. http://www.novell.com/linux/ximian.html What's Miguel going to do? I've seen evidence that he's excited by Python. However, I'm quite distant from the action. I don't trust myself to have informed opinions about all this stuff. > And you in particular will be happy to know that GTK2 *does* have a > skins feature ;) > > Art > Does it support non-rectangular window-like objects? In wx, there's a demo with Tux floating over the desktop, kind of like the my Halflife skin for the Windows Media Player. Tux isn't as tough-looking. But looks can be deceiving. Kirby From ajsiegel at optonline.net Sun Dec 26 23:26:38 2004 From: ajsiegel at optonline.net (Arthur) Date: Sun Dec 26 23:29:16 2004 Subject: [Edu-sig] Learn to Program in Ten Years In-Reply-To: <1104096930.20203.15.camel@localhost.localdomain> References: <0I9C0033DLFL6J@mta17.srv.hcvlny.cv.net> <1104096930.20203.15.camel@localhost.localdomain> Message-ID: <1104099998.20914.14.camel@localhost.localdomain> > The PyGTK thing just happens to be where things are leading me > personally. Its partly because VPython on Linux uses GTK and I would > like to know it better for that reason. And its partly because ubuntu > has helped re-ignite a long dormant interest in Linux as a desktop > working environment, and I see GTK/Gnome as the Big Pond in that > respect. > > And you in particular will be happy to know that GTK2 *does* have a > skins feature ;) A closer look. wxPython *is* using GTK on Linux. So you can theme wxPython. Relief ;) I don't know what my issue here is really. Maybe when I get into it further I'll understand better why it is a good idea to have a layer between, rather than dealing directly with GTK. At one time, one answer may have been crossplatform issues. But it looks to me that GTK is itself becoming crossplatform. There is native OSX support http://gtk-osx.sourceforge.net/ And Windows http://www.gimp.org/~tml/gimp/win32/ And the .Net framework http://gtk-sharp.sourceforge.net/ On the other hand the wxPython does look juicy - PyCrust itself looks like its worth the price of admission. Its just seems so BIG, and beyond the scope of any immediate needs I might have, other than as a runtime for other folks cool stuff. But I am going to stop resisting, and explore it further. Art From drlinux at columbus.rr.com Sun Dec 26 23:30:32 2004 From: drlinux at columbus.rr.com (Dave Reed) Date: Sun Dec 26 23:30:38 2004 Subject: [Edu-sig] Re: Learn to Program in Ten Years In-Reply-To: <1104096930.20203.15.camel@localhost.localdomain> References: <0I9C0033DLFL6J@mta17.srv.hcvlny.cv.net> <1104096930.20203.15.camel@localhost.localdomain> Message-ID: <200412261730.32436.drlinux@columbus.rr.com> On Sunday 26 December 2004 16:35, Arthur wrote: > > I just took a look at the PyGTK 2.0 Tutorial > > http://www.pygtk.org/pygtk2tutorial/index.html > > > > Very encouraging to see that much documentation spelled out in a usable > > format. > > (snip) I've used gtk/pygtk quite a bit and gtkglext with pyopengl a little bit. I suggest you take a look at glade for designing the interface along with libglade for parsing it. You can find a number of articles/tutorials about using it here (yes, one of them is by me and discusses glade/libglade): http://www.pygtk.org/articles.html I've also found the C documentation for gtk is very easy to use when programming in Python. It is very easy to translate the C functions that take a gtk widget as the first parameter into a method of the specificied pygtk widget. I've used it on Linux/Solaris, Windows XP and Mac OS X and it works fine on all of them. If I was coding for Windows only, I'd probably pick a different widget set, but since I have little interest in programming for Windows right now, I think glade/gtk is a great combination. Dave From lac at strakt.com Sun Dec 26 23:50:16 2004 From: lac at strakt.com (Laura Creighton) Date: Sun Dec 26 23:50:18 2004 Subject: [Edu-sig] Learn to Program in Ten Years In-Reply-To: Message from "Kirby Urner" of "Sun, 26 Dec 2004 14:24:47 PST." <20041226222447.049481E4005@bag.python.org> References: <20041226222447.049481E4005@bag.python.org> Message-ID: <200412262250.iBQMoGgV026860@ratthing-b246.strakt.com> In a message of Sun, 26 Dec 2004 14:24:47 PST, "Kirby Urner" writes: >At the OSCONs I've managed to attend (2003, 2004), wxPython attracted a high >degree of interest and attendance. We've seen some exciting completed works >making use of it. I've not seen similar enthusiasm for pyGTK. This might >be the big-fish-in-a-small-pond syndrome, but, as I mentioned, I'm not ready >to form a judgment along those lines. While you are preparing judgements -- both wxPython and The Gnome Desktop, hence the GIMP, GTK and PyGTK are more popular in North America than they are in Europe. We are vastly more likely to use KDE than Gnome. wxWindows is not all that popular here: I am trying to think of a single site that uses is, and coming up empty. But I can think of 10 QT sites off the top of my head. Anecdotal for sure, but I don't think I am useless as a barometer of local popular sentiment. Which reminds me. Nearly everbody I know wants a Mac for Christmas. So perhaps we are only numerating the dinosaurs here. Laura From ajsiegel at optonline.net Mon Dec 27 00:11:05 2004 From: ajsiegel at optonline.net (Arthur) Date: Mon Dec 27 00:13:49 2004 Subject: [Edu-sig] Learn to Program in Ten Years In-Reply-To: <200412262250.iBQMoGgV026860@ratthing-b246.strakt.com> References: <20041226222447.049481E4005@bag.python.org> <200412262250.iBQMoGgV026860@ratthing-b246.strakt.com> Message-ID: <1104102665.22634.11.camel@localhost.localdomain> On Sun, 2004-12-26 at 23:50 +0100, Laura Creighton wrote: > Which reminds me. Nearly everbody I know wants a Mac for Christmas. So perhaps > we are only numerating the dinosaurs here. I actually got myself - or am getting myself - a MAC for Christmas. Actually as hand-me-down from a friend who bought his wife a new one for Christmas. The same friend who, BTW, advised be to buy Apple when it was selling at 15. I didn't listen, of course. And he can afford to buy his wife a new MAC for Christmas. He thinks it (the stock) is still a good buy. It will be nice if the world comes down to a choice between KDE and Gnome. I know that ubuntu is moving toward making available a KDE desktop as an alternative, within their framework. As to wxPython, I'm afraid it just failed a test of some importance to me. VPython does not run interactively from PyShell or PyCrust. It just hangs. It does run interactively from the native prompt and from the Idle prompt. Kirby: I don't know it Patrick listens in here anymomre. You might want to make the wxPython-dev folks aware of this issue. I wonder if it related to the fact that wxPython *is* running over GTK and VPython is a GTK window. Anywhere it's a bit disappointing. Art From urnerk at qwest.net Mon Dec 27 00:27:13 2004 From: urnerk at qwest.net (Kirby Urner) Date: Mon Dec 27 00:27:14 2004 Subject: [Edu-sig] Learn to Program in Ten Years In-Reply-To: <200412262250.iBQMoGgV026860@ratthing-b246.strakt.com> Message-ID: <20041226232713.8F98D1E4005@bag.python.org> > While you are preparing judgements -- both wxPython and The Gnome Desktop, > hence the GIMP, GTK and PyGTK are more popular in North America than they > are in Europe. We are vastly more likely to use KDE than Gnome. > wxWindows is not all that popular here: I am trying to think of a single > site that uses is, and coming up empty. But I can think of 10 QT sites > off the top of my head. Anecdotal for sure, but I don't think I am useless > as a barometer of local popular sentiment. Hey Laura, thanks for sharing that perspective. I'm a KDE user myself these days though I use Gnome at a certain police station. When I did a Needs Assessment for Meyer Memorial, a very large and active charitable trust here in PDX, it came down to Qt and wx as the two most promising platforms for GUI coders who want to use Python. Meyer is an OS X shop, so the ability of both of these to comply with Aqua's user interface standards was an important consideration. Qt currently has license restrictions for the Windows developer. Plus it wasn't clear that Meyer really wanted or needed to underwrite code that'd work on all three platforms, which both of these technologies aim to provide (I left that decision to them -- my job, as I saw it, was to spell out alternatives, not to make all the key decisions for them (the consequences of their decision-making should be theirs, not Free Geek's)). If Python isn't your thing, then of course the playing field opens to other candidates. Java for example. Or, if you're just going to write for OS X, there's always using Cocoa directly. The wx community struggles mightily to force GTK on Linux to comply with all the specs, even while it goes with Carbon on OS X and the win32 GUI API on Windows. It tries to run on both Classic Mac and multiple versions of Windows (with widely varying levels of Unicode support). It's a huge undertaking. > Which reminds me. Nearly everbody I know wants a Mac for Christmas. So > perhaps we are only numerating the dinosaurs here. > > Laura Apple continues to be out of reach for a lot of us. That we have a robust and powerful free Linux available, that runs on recycled Wintel, is what keeps us in the game. I don't think this will change very soon. Plus I'm *glad* that Wintel boxes have value after they've been fully amortized in the Windows world. From a Free Geek standpoint, that keeps the barrier to entry very low (just give us some time, and we'll give you training and a Pentium Freekbox running Debian). Kirby From urnerk at qwest.net Mon Dec 27 00:43:50 2004 From: urnerk at qwest.net (Kirby Urner) Date: Mon Dec 27 00:43:51 2004 Subject: [Edu-sig] Learn to Program in Ten Years In-Reply-To: <1104102665.22634.11.camel@localhost.localdomain> Message-ID: <20041226234350.1551F1E4005@bag.python.org> > As to wxPython, I'm afraid it just failed a test of some importance to > me. VPython does not run interactively from PyShell or PyCrust. It > just hangs. It does run interactively from the native prompt and from > the Idle prompt. > Hence my cc to the wxpython dev list, mentioning VPython, and the "would be nice" prospect of integrating it more effectively. > Kirby: > > I don't know it Patrick listens in here anymomre. You might want to > make the wxPython-dev folks aware of this issue. I wonder if it related > to the fact that wxPython *is* running over GTK and VPython is a GTK > window. Anywhere it's a bit disappointing. > > Art > Probably it's a deeper issue than Patrick tweaking his shell, which sits on top of the wx library. I think getting VPython to show up in a wxWidget (a window), and having mouse clicks go from VPython objects to the wx event loop somehow, would require a lot of digging, a lot of legwork. Or maybe the goal isn't to handle VPython window events (let VPython handle its own events), but merely to support the orderly creation and destruction of a VPython window, plus an ability to send wx events *into* VPython via its native API (e.g. press a button on a wx frame, and watch every sphere in a VPython window turn blue -- or we could have zoom-in/zoom-out buttons). I don't have the expertise to code these things. However, the fact that Vpython runs on Windows, Mac and Linux would make it philosophically consistent with the wxWidgets aim. I can well imagine a VPython demo, right near the OpenGL demo. I don't know if the right way to handle integration with VPython is at the C++ level, within wx, or at the wxPython level, or both. All I know is Pygeo on wxPython would probably be really cool, interface-wise. And keeping the VPython asset, vs. trying to redo it all in OpenGL, would likely save many coder-years of time. Kirby From ajsiegel at optonline.net Mon Dec 27 00:40:28 2004 From: ajsiegel at optonline.net (Arthur) Date: Mon Dec 27 00:44:36 2004 Subject: [Edu-sig] Learn to Program in Ten Years In-Reply-To: <200412262250.iBQMoGgV026860@ratthing-b246.strakt.com> References: <20041226222447.049481E4005@bag.python.org> <200412262250.iBQMoGgV026860@ratthing-b246.strakt.com> Message-ID: <1104104428.22917.6.camel@localhost.localdomain> On Sun, 2004-12-26 at 23:50 +0100, Laura Creighton wrote: > > While you are preparing judgements -- both wxPython and The Gnome Desktop, hence > the GIMP, GTK and PyGTK are more popular in North America than they > are in Europe. We are vastly more likely to use KDE than Gnome. wxWindows > is not all that popular here: I am trying to think of a single site that uses > is, and coming up empty. But I can think of 10 QT sites off the top of my head. > Anecdotal for sure, but I don't think I am useless as a barometer of local > popular sentiment. Novell seems to read the same barometer: http://www.eweek.com/article2/0,1759,1679393,00.asp Taking the same tact as ubuntu, offering either and supporting both. Wonder what determines one's taste here. My preference for Gnome is a strong one. I think it was KDE and efforts at mixed and mixed-up KDE/Gnome efforts that kept me away from the Linux desktop for some time. ubuntu's clean Gnome/GTK got me excited again. Art From lac at strakt.com Mon Dec 27 00:56:37 2004 From: lac at strakt.com (Laura Creighton) Date: Mon Dec 27 00:56:42 2004 Subject: [Edu-sig] Learn to Program in Ten Years In-Reply-To: Message from Arthur of "Sun, 26 Dec 2004 18:40:28 EST." <1104104428.22917.6.camel@localhost.localdomain> References: <20041226222447.049481E4005@bag.python.org> <200412262250.iBQMoGgV026860@ratthing-b246.strakt.com> <1104104428.22917.6.camel@localhost.localdomain> Message-ID: <200412262356.iBQNub1m027071@ratthing-b246.strakt.com> In a message of Sun, 26 Dec 2004 18:40:28 EST, Arthur writes: >Wonder what determines one's taste here. My preference for Gnome is a >strong one. Huge factor: we think Gnome is _really_ _really_ _ugly_. Now why either a) you don't or b) you don't care is one of those _really hard_ questions about cultural differences, that is very hard to answer. The other thing is, of course, that around here, if you want Gnome, you have to ask for it. KDE is what comes up, everywhere. Plenty of people are unaware there is a choice. This cuts two ways -- consulting in the USA, I kept being stopped by people who wanted to know 'what is that window system you are using?' They had never seen it before ... One place I consulted to, 2 days after I started, set out a new policy. 'All people must use Gnome'. I don't think that was in reaction to the amount of work lost in 2 days as it seemed everybody in the office wanted to see KDE, but I could be wrong. At any rate, I cared enough about it -- and things were wrong at that place in enough other ways, that I said 'This isn't going to work out. See you. ' Laura > >Art > From ajsiegel at optonline.net Mon Dec 27 01:11:31 2004 From: ajsiegel at optonline.net (Arthur) Date: Mon Dec 27 01:14:16 2004 Subject: [Edu-sig] Learn to Program in Ten Years In-Reply-To: <0I9C00IBPSL1IA@mta22.srv.hcvlny.cv.net> References: <0I9C00IBPSL1IA@mta22.srv.hcvlny.cv.net> Message-ID: <1104106291.23497.19.camel@localhost.localdomain> On Sun, 2004-12-26 at 15:43 -0800, Kirby Urner wrote: > > As to wxPython, I'm afraid it just failed a test of some importance to > > me. VPython does not run interactively from PyShell or PyCrust. It > > just hangs. It does run interactively from the native prompt and from > > the Idle prompt. > > > > Hence my cc to the wxpython dev list, mentioning VPython, and the "would be > nice" prospect of integrating it more effectively. But I think you are talking about something more ambitious than the issue that is my immediate concern. Simply running VPython as one would anything else from the prompt does not imply any real level of integration. On the contrary, it seems that the shell and VPython need to successfully get out of each others' way. And the problem is they don't. Subprocesses, threads, or something. Anything that moves toward real integration would I suspect need to have most of its work done from the VPython side. Apparently VPython is quirky, greedy as it is - since it gives a lot of things that don't normally have trouble, trouble. PythonWin I think is another example. Closing a VPython window closes the IDE with it. Idle went to some lengths to accommodate VPython and prevent this. But it complicated the Idle architecture considerably. As a response to John's concerns I tried to look at the code that runs a script from Idle - and you have threads talking to subprocesses talking to sockets. Totally out of my league to try to truly follow, which is a kind of a shame. I wonder what, if anything, could be done from the VPython side to make it friendlier, without it losing it's uniqueness. Understanding that part of that uniqueness is the fact that the display is just implicitly there. As you know, >>import visual >>visual.sphere() is sufficient to create not only a sphere() but an entire rendering context and display for itself. I am guessing that is accomplished in ways other programs needing to cooperate with VPython tend not to like. I am at a loss to chip in to finding a solution. But a weekend spent trying to get deeper into boost::python and GTK indicates some real interest in the problem, and at least good intentions ;) Art From urnerk at qwest.net Mon Dec 27 01:24:08 2004 From: urnerk at qwest.net (Kirby Urner) Date: Mon Dec 27 01:24:10 2004 Subject: [Edu-sig] Learn to Program in Ten Years In-Reply-To: <1104106291.23497.19.camel@localhost.localdomain> Message-ID: <20041227002408.7E1EC1E400C@bag.python.org> > But I think you are talking about something more ambitious than the > issue that is my immediate concern. > Yes, true. I'm imagining a version of PyGeo with a fixed frame for VPython, and controls around the edges, more like a traditional app, with everything packed. I'd like to see that version, vs. the current approach of free-floating control panels in Tk. I'm thinking of a more buttoned-down, traditional look. > Simply running VPython as one would anything else from the prompt does > not imply any real level of integration. On the contrary, it seems that > the shell and VPython need to successfully get out of each others' way. > And the problem is they don't. Subprocesses, threads, or something. > Yeah. Competing event loops probably. > Anything that moves toward real integration would I suspect need to have > most of its work done from the VPython side. Apparently VPython is > quirky, greedy as it is - since it gives a lot of things that don't > normally have trouble, trouble. PythonWin I think is another example. > Closing a VPython window closes the IDE with it. Idle went to some > lengths to accommodate VPython and prevent this. But it complicated the > Idle architecture considerably. As a response to John's concerns I > tried to look at the code that runs a script from Idle - and you have > threads talking to subprocesses talking to sockets. Totally out of my > league to try to truly follow, which is a kind of a shame. > Whatever happened to the scenario in which VPython gets a big grant to improve a great deal? Didn't that pan out? It'd seem that one broad category that could use some work, in the VPython side, is "plays well with others." > I wonder what, if anything, could be done from the VPython side to make > it friendlier, without it losing it's uniqueness. Understanding that > part of that uniqueness is the fact that the display is just implicitly > there. As you know, > I have the same question. > >>import visual > >>visual.sphere() > > is sufficient to create not only a sphere() but an entire rendering > context and display for itself. I am guessing that is accomplished in > ways other programs needing to cooperate with VPython tend not to like. > I bet you're right. > I am at a loss to chip in to finding a solution. But a weekend spent > trying to get deeper into boost::python and GTK indicates some real > interest in the problem, and at least good intentions ;) > > Art Yeah, s'been an interesting and productive thread. Thanks for keeping it turning. Kirby From ajsiegel at optonline.net Mon Dec 27 01:33:09 2004 From: ajsiegel at optonline.net (Arthur) Date: Mon Dec 27 01:35:49 2004 Subject: [Edu-sig] Learn to Program in Ten Years In-Reply-To: <200412262356.iBQNub1m027071@ratthing-b246.strakt.com> References: <20041226222447.049481E4005@bag.python.org> <200412262250.iBQMoGgV026860@ratthing-b246.strakt.com> <1104104428.22917.6.camel@localhost.localdomain> <200412262356.iBQNub1m027071@ratthing-b246.strakt.com> Message-ID: <1104107589.23912.9.camel@localhost.localdomain> On Mon, 2004-12-27 at 00:56 +0100, Laura Creighton wrote: > In a message of Sun, 26 Dec 2004 18:40:28 EST, Arthur writes: > >Wonder what determines one's taste here. My preference for Gnome is a > >strong one. > > Huge factor: we think Gnome is _really_ _really_ _ugly_. Now why either > a) you don't or b) you don't care is one of those _really hard_ questions > about cultural differences, that is very hard to answer. I think I do care, and I think that the fact that ubuntu has what I consider to be a very pleasing look and fell to be a good part of why I am enthusiastic about it. That, and finding the Synaptic Package Manager and apt-get providing a solution to many of the issues I had trouble dealing with in other desktops I had tried. Its swell, to coin a technical term. But much of this might in fact have more to do with the aesthetic strengths of the ubuntu folks, more than anything inherent in the tools themselves. But it could be a more Gnu aesthetic that I am in fact responding to. So in that way not totally unrelated. If so, that is still an aesthetic issue, to me. I don't have a political preference. Art From ajsiegel at optonline.net Mon Dec 27 01:58:35 2004 From: ajsiegel at optonline.net (Arthur) Date: Mon Dec 27 02:01:14 2004 Subject: [Edu-sig] Learn to Program in Ten Years In-Reply-To: <0I9C002RAUG7QC@mta26.srv.hcvlny.cv.net> References: <0I9C002RAUG7QC@mta26.srv.hcvlny.cv.net> Message-ID: <1104109115.23912.29.camel@localhost.localdomain> On Sun, 2004-12-26 at 16:24 -0800, Kirby Urner wrote: > > Whatever happened to the scenario in which VPython gets a big grant to > improve a great deal? Didn't that pan out? It'd seem that one broad > category that could use some work, in the VPython side, is "plays well with > others." Well, you're kind of setting me up here. Yes VPython has a substantial NSF grant. Substantial enough to fund Python 3.0, or at least a good ways towards it. But despite the best efforts of the guy actually doing the coding - Jonathan Brandenmeyer - it is still a Bruce project. And though Bruce thought nothing of pressing Guido to accommodate his needs as to Idle issues and division operators, I don't think he sees any need to accommodate anything or anyone else. On the immediate issue we are discussing, Sherwood makes no bones about the fact he sees the interactive prompt as a useless feature. His "data" supports the fact that no one gives a shit about it. Which is why he chooses to have his distribution overwrite a standard Python library file to get his way as to the default start-up of Idle. Asking Bruce to spend a nickel of his funding to try to get this problem solved is useless. In short, Bruce's interest in VPython is narrow. A good part of that interest, I am afraid, may have been satisfied when he *got* his funding. Not a nice thing to say, but the man has gotten to me, big time. Art > > I wonder what, if anything, could be done from the VPython side to make > > it friendlier, without it losing it's uniqueness. Understanding that > > part of that uniqueness is the fact that the display is just implicitly > > there. As you know, > > > > I have the same question. > > > >>import visual > > >>visual.sphere() > > > > is sufficient to create not only a sphere() but an entire rendering > > context and display for itself. I am guessing that is accomplished in > > ways other programs needing to cooperate with VPython tend not to like. > > > > I bet you're right. > > > I am at a loss to chip in to finding a solution. But a weekend spent > > trying to get deeper into boost::python and GTK indicates some real > > interest in the problem, and at least good intentions ;) > > > > Art > > Yeah, s'been an interesting and productive thread. Thanks for keeping it > turning. > > Kirby > > > F From urnerk at qwest.net Mon Dec 27 02:41:19 2004 From: urnerk at qwest.net (Kirby Urner) Date: Mon Dec 27 02:41:19 2004 Subject: [Edu-sig] Learn to Program in Ten Years In-Reply-To: <200412262356.iBQNub1m027071@ratthing-b246.strakt.com> Message-ID: <20041227014118.BF96A1E4006@bag.python.org> > Huge factor: we think Gnome is _really_ _really_ _ugly_. Now why either > a) you don't or b) you don't care is one of those _really hard_ questions > about cultural differences, that is very hard to answer. > I just booted Ubuntu (demo CD) for the first time. Picked up a free copy at Free Geek on Xmas Eve. The demo failed on TMU for some reason, but fired up on 2nd try (fail safe mode) on the Compaq (laptop Presario). I don't have any problem with the basic look and feel. The graphics are pleasing enough. What I find is: once I get acclimated to a system, what's important is functionality. Cosmetics matter, but eventually take a back seat to getting work done -- unless the work itself runs up against the desktop aesthetics in some way, I'm not hugely likely to complain. Variety is the spice of life. I have no really strong prejudice in favor of either KDE or Gnome. For HomeStreet (a client getting an xtreme makeover -- going from Windows to Linux), we went with KDE (we being Free Geek, a local Debian shop). But at the police station, it's RedHat 9 running Gnome on Fedora. I don't have much problem with that. I think Gnome is ahead of KDE in some ways and vice versa. What USAers tend to consider optimal is: competition. We *want* alternative desktops to compete for hearts and minds, because as would-be users, we stand to gain from the rivalry. That may sound primitive, but from experience we know that monopolies breed laziness and lousy service, which in operating systems translates to all kinds of problems, potentially serious ones (not just cosmetic). Kirby From urnerk at qwest.net Mon Dec 27 02:58:02 2004 From: urnerk at qwest.net (Kirby Urner) Date: Mon Dec 27 02:58:03 2004 Subject: [Edu-sig] Learn to Program in Ten Years In-Reply-To: <1104109115.23912.29.camel@localhost.localdomain> Message-ID: <20041227015801.014201E4006@bag.python.org> > In short, Bruce's interest in VPython is narrow. > > A good part of that interest, I am afraid, may have been satisfied when > he *got* his funding. > > Not a nice thing to say, but the man has gotten to me, big time. > > Art > OK. Unlike in the Disney case (Alan Kay, Squeak, SmallTalk et al), I'm not moved to define my own position vis-?-vis the VPython enterprise. I've not investigated, don't have a lot of eggs in that basket. I reserve the right to see the matter differently in future, but I think you're certainly entitled to the judgments you've reached (you care a lot about these things, and have a definite stake, having done lots of work on Pygeo), plus I'm in no mood to play defense lawyer for your opponent. I'm sure he's quite capable of defending himself (or, if not, then not).[1] Also, I don't think it's off-topic or mean-spirited to share assessments such as yours above on edu-sig. I'm not a listowner and don't set policies, but I think the exchange of opinions, in a frank and open manner, is healthy. I wouldn't condone a stupid flame war, but as long as we're talking over issues of substance, that have some bearing on Python in the education sphere, I think it's topical. Just my opinion. Self-servingly, I'm thereby excusing some of my own outbursts as well. But I'm also opening the door to others, and saying they shouldn't fear retribution in the form of being banned or ostracized. Again, I say this in no particularly official capacity -- just giving my sense of what feels appropriate to me. Others may differ (and I welcome their alternative takes). Kirby [1] Aside: that reminds me of a funny story. I asked my daughter to take out the music CD in the player and try another one that was more topical (more Christmas-y in this case). Then I said: "but if we don't like it, we might ask you to take it out too" -- maybe implying that she might get some blame for another bad choice. She said, referring to the CD: "hey, I'm not trying to be this thing's lawyer or anything." I thought that was funny. She's only 10. From lac at strakt.com Mon Dec 27 02:59:43 2004 From: lac at strakt.com (Laura Creighton) Date: Mon Dec 27 02:59:45 2004 Subject: [Edu-sig] Learn to Program in Ten Years In-Reply-To: Message from "Kirby Urner" of "Sun, 26 Dec 2004 17:41:19 PST." <200412270141.iBR1fH1M021830@theraft.strakt.com> References: <200412270141.iBR1fH1M021830@theraft.strakt.com> Message-ID: <200412270159.iBR1xhGO027427@ratthing-b246.strakt.com> In a message of Sun, 26 Dec 2004 17:41:19 PST, "Kirby Urner" writes: >I think Gnome is ahead of KDE in some ways and vice versa. What USAers tend >to consider optimal is: competition. We *want* alternative desktops to >compete for hearts and minds, because as would-be users, we stand to gain >from the rivalry. That may sound primitive, but from experience we know >that monopolies breed laziness and lousy service, which in operating systems >translates to all kinds of problems, potentially serious ones (not just >cosmetic). > >Kirby > That doesn't sound primative at all. I'm on the front line of the 'keep software patents out of Europe' war. It is interesting that it sounds to me profoundly anti-American. But then I am spending a huge amount of time kicking holes in the US Patent Office's argument that unless you reward Americans with a monopoly they won't work, and that monopolies are the only effective way to ensure interoperability and the like. I am very glad to see that the USPO does not speak for all of you, and that sentiments expressed in the October 2003 Federal Trade Commission report "To Promote Innovation: The Proper Balance of Competition and Patent Law and Policy" see http://www.ffii.org.uk/swpat/ftc/ftc.html is more representative of your views. A steady diet of monopolist arguments can badly distort your perceptions ... Thanks Kirby, Laura From urnerk at qwest.net Mon Dec 27 04:10:57 2004 From: urnerk at qwest.net (Kirby Urner) Date: Mon Dec 27 04:11:03 2004 Subject: [Edu-sig] Learn to Program in Ten Years In-Reply-To: <200412270159.iBR1xhGO027427@ratthing-b246.strakt.com> Message-ID: <20041227031101.6958D1E4006@bag.python.org> > That doesn't sound primative at all. I'm on the front line of the 'keep > software patents out of Europe' war. It is interesting that it sounds to > me profoundly anti-American. But then I am spending a huge amount of time > kicking holes in the US Patent Office's argument that unless you reward > Americans with a monopoly they won't work, and that monopolies are the > only effective way to ensure interoperability and the like. Yeah, total BS, I agree. We've already shown that geeks know how to collaborate on extremely precise standards without patent protection. If something works, and works well, it gets adopted. Planning happens. Getting lots of gnarly patents embedded in something so ephemeral as software is a recipe for disaster. Next thing you know, authors will be patenting plot elements, like "the twist" -- pay royalties next time you twist the plot in some way. Silly. Same diff. > I am very glad to see that the USPO does not speak for all of you, and > that sentiments expressed in the October 2003 Federal Trade Commission > report "To Promote Innovation: The Proper Balance of Competition and > Patent Law and Policy" see http://www.ffii.org.uk/swpat/ftc/ftc.html is > more representative of your views. A steady diet of monopolist arguments > can badly distort your perceptions ... > > Thanks Kirby, > Laura Yeah, keep fighting. "Intellectual property" is somewhat oxymoronic, as *every* idea has been synergetically built from others. We're born naked and helpless, with no language to speak of. Putting up fences amidst this free flow of ideas, parceling it all out as if it were real estate, is presuming a flawed analogy. For one things, ideas don't "transfer" they "copy" (I give it to you, I still have it for me). Every human is an edit/recombine studio, taking inputs from the environment, adding value, and putting it back out there. Throwing a lot of roadblocks in front of innovation is what keeps us all living in relative squalor, compared to how it could and should be. Basically, patents are a way to keep others from stealing good ideas. But if that had been enforceable since cave man days, we'd still be in those caves today. GPL and so on is really important to human evolution. Engineers, more than most, know that artificially restricting our freedoms to willingly share and advantage one another is both dangerous and stupid. That being said, I'm not against keeping some things secret or under wraps, until ready for prime time. I still believe in wrapping presents, letting things cook, season and so on. Immature technologies abound. The patent office is overflowing with ideas that went nowhere (some deservedly). To liberalize around intellectual property isn't to suddenly open the flood gates, as you still need people to comprehend, to learn how to operate the stuff, and that takes time. Like, we have all we need to make the world a better place for everyone, and yet here we are, screwing up, day after day. Too slow. Let's pick up the pace here, shall we? Kirby From lac at strakt.com Mon Dec 27 04:40:37 2004 From: lac at strakt.com (Laura Creighton) Date: Mon Dec 27 04:51:34 2004 Subject: [Edu-sig] Learn to Program in Ten Years In-Reply-To: Message from "Kirby Urner" of "Sun, 26 Dec 2004 19:10:57 PST." <200412270310.iBR3Av8s032708@theraft.strakt.com> References: <200412270310.iBR3Av8s032708@theraft.strakt.com> Message-ID: <200412270340.iBR3ebJA027732@ratthing-b246.strakt.com> In a message of Sun, 26 Dec 2004 19:10:57 PST, "Kirby Urner" writes: >That being said, I'm not against keeping some things secret or under wraps, >until ready for prime time. I still believe in wrapping presents, letting >things cook, season and so on. Immature technologies abound. The patent >office is overflowing with ideas that went nowhere (some deservedly). One thing that is not that well understood is that the patent system destroys the business models of those companies that rely on trade secrets as well as those that rely on openness. If your whole strategy is based on 'I know how to do this, you don't, and I'm not telling' then a patent infringement lawsuit is disastrous for you. It is nearly impossible to prove that you are not infringing without revealing what it is that you are doing. Plus some companies launch lawsuits they are convinced they will loose. They figure it is worth it to keep their competitors busy in court. This is less of a problem places where loser pays winner's attorney's fees, but not unheard of there. >Like, we have all we need to make the world a >better place for everyone, and yet here we are, screwing up, day after day. >Too slow. Let's pick up the pace here, shall we? Well said. Laura > >Kirby > From jmillr at umich.edu Mon Dec 27 20:17:31 2004 From: jmillr at umich.edu (John Miller) Date: Mon Dec 27 20:17:40 2004 Subject: [Edu-sig] Re: Learn to Program in Ten Years In-Reply-To: <20041226223109.86BDD1E4013@bag.python.org> References: <20041226223109.86BDD1E4013@bag.python.org> Message-ID: I just wanted to chime in with a quote from a recent spe announcement: http://groups-beta.google.com/group/comp.lang.python/browse_thread/ thread/d71e84bb54aa4d9d ''' - wxGlade: wxGlade is a GUI designer written in Python with the popular GUI toolkit wxPython, that helps you create wxWindows/wxPython user interfaces. As you can guess by the name, its model is Glade, the famous GTK+/GNOME GUI builder, with which wxGlade shares the philosophy and the look & feel (but not a line of code). For more info: http://wxglade.sourceforge.net ''' This doesn't directly address the issue of which gui toolkit to actually use, but might help someone who decided on wxWidgets. John Miller On Dec 26, 2004, Dave Reed wrote: > On Sunday 26 December 2004 16:35, Arthur wrote: >>> I just took a look at the PyGTK 2.0 Tutorial >>> http://www.pygtk.org/pygtk2tutorial/index.html >>> >>> Very encouraging to see that much documentation spelled out in a >>> usable >>> format. >>> > > (snip) > > I've used gtk/pygtk quite a bit and gtkglext with pyopengl a little > bit. > I suggest you take a look at glade for designing the interface along > with libglade for parsing it. You can find a number of > articles/tutorials about using it here (yes, one of them is by me and > discusses glade/libglade): > > http://www.pygtk.org/articles.html > > I've also found the C documentation for gtk is very easy to use when > programming in Python. It is very easy to translate the C functions > that take a gtk widget as the first parameter into a method of the > specificied pygtk widget. > > I've used it on Linux/Solaris, Windows XP and Mac OS X and it works > fine > on all of them. If I was coding for Windows only, I'd probably pick a > different widget set, but since I have little interest in programming > for Windows right now, I think glade/gtk is a great combination. > > Dave > From ajsiegel at optonline.net Mon Dec 27 21:08:47 2004 From: ajsiegel at optonline.net (ajsiegel@optonline.net) Date: Mon Dec 27 21:09:20 2004 Subject: [Edu-sig] Learn to Program in Ten Years Message-ID: <272e12d30a.2d30a272e1@optonline.net> Dave writes: >I've used gtk/pygtk quite a bit and gtkglext with pyopengl a little bit. >I suggest you take a look at glade for designing the interface along >with libglade for parsing it. You can find a number of >articles/tutorials about using it here (yes, one of them is by me and >discusses glade/libglade): Thanks for this tip. And there is this artcle as well, linked from the site you reference: http://primates.ximian.com/~sandino/python-glade/ I find it quite reassuring to see such recent dates on these kinds of articles. And am getting a bit excited about getting hands-on with all this. It's interesting to see that Hilaire Fernandes also wrote some articles on the subject of PyGTK/Glade. I know of him as a worthy competitor - the author of Dr. Geo (http://www.ofset.org/drgeo ) - and a moving force behind The Organization of for Free Software in Education and Teaching http://www.ofset.org/ I did not know of any interest/involvement he had directly with Python before this, however. And related to prior discussion, this CookBook recipe allows one to experiment with building PyGTK GUI components from the interactive prompt: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65109 There is another such python module out there providing this functionality, but I don't find it out the moment. I'll have to try doing VPython inetractively through this mechanism and see if it tells me anything. Art From urnerk at qwest.net Mon Dec 27 23:35:00 2004 From: urnerk at qwest.net (Kirby Urner) Date: Mon Dec 27 23:35:02 2004 Subject: [Edu-sig] More calculus in Python Message-ID: <20041227223501.AC2B11E4007@bag.python.org> This is part of an exchange with math profs over on math-teach*, but I think is of relevance here, given all the Python. KU * http://www.mathforum.com/epigone/math-teach/ghyrturcrerl ============== >On Dec 26, 2004, at 4:01 PM, Kirby Urner wrote: > >> To recapitulate how we'll do some of the early calculus stuff using >> Python, the advantage of top-level functions is you can pass them as >> arguments to other functions. This mirrors the behavior of the >> derivative operator, which Spivak likes to symbolize as D. >> D(f) -> g, means you take a function, f, operate on it (D), and >> spit back another function, g. > >Kirby, > >You may want to check out so-called "automatic differentiation". The >underlying idea is this: We overload the symbols of ordinary algebra, >thus extending algebra to the collection of ordered pairs (u, u'), where >u is a function and u' its derivative: > >(u, u') + (v, v') := (u + v, u' + v'); > >(u, u') * (v, v') := (u * v, u' * v + u * v'), > >etc. > >We embed the reals in this system: the real number a --> (a, 0). > >The identity function (which we abusively write as "x") is embedded as x >--> (x, 1). > >Of course, this can all be hidden from the user if we wish. > >Let's suppose that we have told our computer how to extend addition and >multiplication as above, and that we've given it the image of the >identity function too. > >Note what happens. When the machine uses these definitions to calculate >the squaring function, we get > >(x, 1) * (x, 1) = (x * x, 1 * x + x * 1) = (x^2, 2 x). > >This happens for other things as well, so we don't need to give most of >the formal embeddings. With what we've already done, we're ready to do >polynomial calculus now. With a few more rules [sin x --> (sin x, >cosx), the quotient rule > >(u, u')/(v, v') = (u/v, (u' * v - u * v')/v^2), > >etc.] we can do all of elementary calculus. > Thanks Lou. A first take in Python: write a Pair class to store (u, du) and define the basic four operations, as you've defined them; write a Function class to define the same four ops with respect to generic functions. Even ordinary numbers will be considered functions which "return their own value." class Pair: """ A generic pair (f, f'), both Functions (below), and rules for the four basic ops w/r to Pairs """ def __init__(self, u, du): self.u = u self.du = du def __add__(self, other): return Pair(self.u + other.u, self.du + other.du) def __sub__(self, other): return Pair(self.u - other.u, self.du - other.du) def __mul__(self, other): return Pair(self.u * other.u, \ self.du * other.u + self.u * other.du) def __div__(self, other): return Pair(self.u/other.u, \ (self.du * other.u - self.u * other.du)/other.u**2) class Function: """ A generic wrapper for uni-variable functions, allowing them to be composed using the four operations """ def __init__(self, f): self.f = lambda x: f(x) def __add__(self, other): return Function(lambda x: self.f(x) + other.f(x)) def __sub__(self,other): return Function(lambda x: self.f(x) - other.f(x)) def __mul__(self,other): return Function(lambda x: self.f(x) * other.f(x)) def __div__(self,other): return Function(lambda x: self.f(x) / other.f(x)) def __call__(self,x): """call wrapped function with argument x, return result""" return self.f(x) Now we define the identity function, and unity, per your language game. >>> def ident(x): return x >>> id = Function(ident) # Function-wrapped identity function >>> def one(x): return 1 >>> unity = Function(one) # Function-wrapped one Now we define a Pair (ident, unity) corresponding to your (x, 1). >>> p1 = Pair(id, unity) Multiplying p1 * p1 should return a new pair such that newpair.u is a parabolic or 2nd powering function, and newpair.du is the derivative thereof. >>> newp = p1 * p1 >>> [newp.u(i) for i in range(-5,6)] [25, 16, 9, 4, 1, 0, 1, 4, 9, 16, 25] >>> [newp.du(i) for i in range(-5,6)] [-10, -8, -6, -4, -2, 0, 2, 4, 6, 8, 10] So far so good. Thanks for this brain teaser and opportunity to show off functional programming in Python. Kirby From john.zelle at wartburg.edu Tue Dec 28 05:15:48 2004 From: john.zelle at wartburg.edu (John Zelle) Date: Tue Dec 28 05:19:00 2004 Subject: [Edu-sig] IDLE Instabilities Update Message-ID: <41D0DDF4.1030802@wartburg.edu> For those of you who have been having trouble with IDLE hanging (especially under Windows), I think one nasty glitch has now been ironed out. I posted a bug report on the idle-dev list and got a very prompt and thorough reponse from Kurt Kaiser who is apparently responsible for much (most?) of the current subprocess communication code. It turns out that the problem I found was quite old and not in the subprocess code at all, but a fix has now been checked in. Kurt sent me a patch for the idlelib/PyShell.py file. I have applied it against versions 1.03 and 1.1 of IDLE sucessfully. If you are interested in using this patch before the next version of Python is released, I have put the patch and patched versions of PyShell.py here: http://mcsp.wartburg.edu/zelle/IDLE Kurt believes that IDLE is actually very stable now, and I suspect that a lot of the troubles people have been reporting are the result of this bug that was just squashed (at least the problems that I've noticed in our lab were). I'd encourage any of you who use IDLE to patch your PyShell.py files (or drop in my replacement) and continue using IDLE. There is one remaining known issue on Windows. Due to a quirk in the underlying Windows socket code, it is apparently possible to have multiple (partial) starts of IDLE running at the same time, all bound to the same socket. This is very bad :-). For the moment, you just need to be sure to only have one copy of IDLE running at a time. My standard operating procedure is to start IDLE first, and then just load whatever files I want to work on. I keep IDLE running for my entire session, and have not had any problems. I'd be interested in hearing any feedback on whether this patch has made IDLE more workable for any of you. Also, if you are still finding instabilities in IDLE, we should try hard to track them down. At least some of the IDLE developers are keenly interested in stability. If we can track problems down, I think they will get fixed in realtively short order. Oh, and if you are using my graphics library interactively in IDLE on Windows, the graphics window will be unresponsive any time IDLE is waiting for input. This is annoying, but I haven't had a chance to rework my library yet for the new IDLE (it will probably require multiple threads, another topic of recent interest on edu-sig :-). --John ps. I came into the "learn to program in 10 years" thread late, so I did not bother to post, although there was much there of interest to me. Just for the record: 1. I really, really like KDE. IMHO it's better than aqua (honest) so you can keep your macs; I'll run on the cheap hardware :-) 2. I have noodled around a bit with PyQT (really should be QTPy don't you think ;-), and it seems very nice. The OpenGL widget works as advertised, and you can design GUIs with the standard QTdeveloper tools and convert to Python boiler plate (or parse them dynamically) much like Glade for gtk. 3. There are no license problems at all with QT on any platform, as long as you are not developing commercially. On Windows, you do need to license the widgets for commercial development (it's free on Linux, not sure on Mac). 4. I also want to do some things where VPython is embedded in other apps (specifically a Stereo 3D presentation system). However, Vpython is just one of several packages that I'd like to use. I am probably going to sacrifice portability and use X Window's ability to manipulate other windows (ala a window manager or plugger). Hopefully, some work on this will happen this Spring. 5. Software patents are ludicrous. Mathematical theorems are not patentable, neither should algorithms be. Unfortunately, the USPO has gone so far up this wrong road that it's hard to see how we will extricate ourselves. Let's hope the EU does the right thing. All of us need to keep up the fight on this issue in any small way we can. From urnerk at qwest.net Tue Dec 28 06:20:44 2004 From: urnerk at qwest.net (Kirby Urner) Date: Tue Dec 28 06:20:48 2004 Subject: [Edu-sig] More calculus in Python In-Reply-To: <20041227223501.AC2B11E4007@bag.python.org> Message-ID: <20041228052046.A53151E4002@bag.python.org> Note that instead of wrapping my little functions with Function, per previous post, as of Python 2.4 I have the new decorator syntax with which to accomplish the same thing: #--- calc.py class Function: def __init__(self, f): self.f = lambda x: f(x) def __add__(self, other): return Function(lambda x: self.f(x) + other.f(x)) def __sub__(self,other): return Function(lambda x: self.f(x) - other.f(x)) def __mul__(self,other): return Function(lambda x: self.f(x) * other.f(x)) def __div__(self,other): return Function(lambda x: self.f(x) / other.f(x)) def __call__(self,x): """call wrapped function with argument x, return result""" return self.f(x) class Pair: def __init__(self, u, du): self.u = u self.du = du def __add__(self, other): return Pair(self.u + other.u, self.du + other.du) def __sub__(self, other): return Pair(self.u - other.u, self.du - other.du) def __mul__(self, other): return Pair(self.u * other.u, \ self.du * other.u + self.u * other.du) def __div__(self, other): return Pair(self.u/other.u, \ (self.du * other.u - self.u * other.du)/other.u**2) @Function def ident(x): return x @Function def one(x): return 1 p1 = Pair(ident, one) newp = p1 * p1 * p1 print [newp.u(i) for i in range(-5,6)] print [newp.du(i) for i in range(-5,6)] #--- Testing: >>> import calc [-125, -64, -27, -8, -1, 0, 1, 8, 27, 64, 125] [75, 48, 27, 12, 3, 0, 3, 12, 27, 48, 75] i.e. I get back the functions u(x) = x**3 and du(x) = 3*x**2, per differential calculus. Kirby From urnerk at qwest.net Tue Dec 28 06:36:23 2004 From: urnerk at qwest.net (Kirby Urner) Date: Tue Dec 28 06:36:24 2004 Subject: [Edu-sig] IDLE Instabilities Update In-Reply-To: <41D0DDF4.1030802@wartburg.edu> Message-ID: <20041228053623.44A451E4002@bag.python.org> Thanks John. Patched both my 2.3 and 2.4 with your versions of PyShell.py. I see we agree on many things. Kirby PS: I had this problem with IDLE in Windows not obeying some editing keys after awhile (seemed sporadic); turned out to be caps lock was messing with CTRL-x combos, which it shouldn't. The problem was fixed awhile ago. I went through Sourceforge. https://sourceforge.net/tracker/?func=detail&atid=105470&aid=833957&group_id =5470 From ajsiegel at optonline.net Tue Dec 28 19:07:55 2004 From: ajsiegel at optonline.net (ajsiegel@optonline.net) Date: Tue Dec 28 19:08:55 2004 Subject: [Edu-sig] Software developers - diarists or novelists? Message-ID: <1067c810a815.10a8151067c8@optonline.net> I find Sean McGrath's blog writings, digested on Planet Python http://www.planetpython.org/ consistently interesting. This recent episode I particularly like. http://seanmcgrath.blogspot.com/archives/2004_12_26_seanmcgrath_archive.html#110423453733761425 Art From urnerk at qwest.net Tue Dec 28 20:06:02 2004 From: urnerk at qwest.net (Kirby Urner) Date: Tue Dec 28 20:06:04 2004 Subject: [Edu-sig] Software developers - diarists or novelists? In-Reply-To: <1067c810a815.10a8151067c8@optonline.net> Message-ID: <20041228190603.9594F1E4002@bag.python.org> > I find Sean McGrath's blog writings, digested on Planet Python > Thanks Arthur. I like this one: http://patricklogan.blogspot.com/2004/12/roi-of-optional-type-annotations.ht ml Echoes my own sentiments at: http://mail.python.org/pipermail/edu-sig/2004-December/004292.html Kirby From ajsiegel at optonline.net Tue Dec 28 21:13:29 2004 From: ajsiegel at optonline.net (ajsiegel@optonline.net) Date: Tue Dec 28 21:14:08 2004 Subject: [Edu-sig] Software developers - diarists or novelists? Message-ID: <1318091326fa.1326fa131809@optonline.net> Kirby - > > I find Sean McGrath's blog writings, digested on Planet Python > > > > Thanks Arthur. > > I like this one: > http://patricklogan.blogspot.com/2004/12/roi-of-optional-type- > annotations.html > > Echoes my own sentiments at: > http://mail.python.org/pipermail/edu-sig/2004-December/004292.html Luckily, I don't pretend to have a handle on the issues involved in this one. Though I find just trying to follow the discussion to be an education - lot's of crossreference to other languages, etc. It sounds like Guido has another tough call on his hands. Its not easy being green, for Kermit. Sometimes I suspect its not easy being Guido. Art From ajsiegel at optonline.net Thu Dec 30 02:31:24 2004 From: ajsiegel at optonline.net (Arthur) Date: Thu Dec 30 02:31:42 2004 Subject: [Edu-sig] More calculus in Python In-Reply-To: <20041228052046.A53151E4002@bag.python.org> Message-ID: <0I9I00FM2HKHW7@mta7.srv.hcvlny.cv.net> Kirby writes - > > #--- calc.py snip > > p1 = Pair(ident, one) > > newp = p1 * p1 * p1 > > print [newp.u(i) for i in range(-5,6)] > print [newp.du(i) for i in range(-5,6)] > > #--- > > Testing: > > >>> import calc > [-125, -64, -27, -8, -1, 0, 1, 8, 27, 64, 125] > [75, 48, 27, 12, 3, 0, 3, 12, 27, 48, 75] > > i.e. I get back the functions u(x) = x**3 and du(x) = 3*x**2, per > differential calculus. Finally had a chance to focus on this. Kinda nice. Just set it to music - i.e. graph it - and there lot's to see as well, for those of us who find that added visual element essential for grasping what is happening, and preventing glazing ove. Are you going to take it that far, or shall I. Art From urnerk at qwest.net Thu Dec 30 03:02:32 2004 From: urnerk at qwest.net (Kirby Urner) Date: Thu Dec 30 03:02:37 2004 Subject: [Edu-sig] More calculus in Python In-Reply-To: <0I9I00FM2HKHW7@mta7.srv.hcvlny.cv.net> Message-ID: <20041230020237.76FCE1E4003@bag.python.org> > Are you going to take it that far, or shall I. > > Art > Not either/or, but no concrete plans over here right now. Kirby From john.zelle at wartburg.edu Thu Dec 30 03:47:44 2004 From: john.zelle at wartburg.edu (John Zelle) Date: Thu Dec 30 03:51:29 2004 Subject: [Edu-sig] New graphics library (beta version) Message-ID: <41D36C50.3070406@wartburg.edu> I managed to get a bit of time today to play around with some changes I've been thinking about for my graphics library. Basically, my goal has been to get it to work better with the new IDLE. This new version runs TK in a separate thread so that a graphics window will stay responsive even when experimenting interactively at the IDLE prompt. Unfortunately, I am unable to run Windows at the moment, so I don't know if this works on that platform. I would love it if some of you could try it out and let me know. Specifically, I'd like to know if it "plays well" with the IDLE shell. A word of warning, I have not yet tested this very thoroughly even under Linux; it should be considered early Beta code. I hope to have a colleague test it out in our CS 1 class this winter (I'm not teaching it). Please give this a try if you're interested. Any and all feedback is welcome. --John -------------- next part -------------- A non-text attachment was scrubbed... Name: graphics3.py Type: text/x-python Size: 24571 bytes Desc: not available Url : http://mail.python.org/pipermail/edu-sig/attachments/20041229/cd064833/graphics3-0001.py From urnerk at qwest.net Thu Dec 30 05:59:53 2004 From: urnerk at qwest.net (Kirby Urner) Date: Thu Dec 30 05:59:54 2004 Subject: [Edu-sig] New graphics library (beta version) In-Reply-To: <41D36C50.3070406@wartburg.edu> Message-ID: <20041230045953.98BED1E4003@bag.python.org> > Please give this a try if you're interested. Any and all feedback is > welcome. > > --John I forget if there's a test suite of programs, or something else you run to decide whether it's ready for prime time. I've got some graphics.py dependents around, e.g. that cellular automata stuff we did awhile back, plus other stuff I worked on with Bernie. I've stashed your code in my Python24 site-packages on WinXP. Compaq (Linux) has showed signs of trouble ever since the Ubuntu fiasco. Then there's TMU running Mandrake 10.1 -- haven't fired up Samba on that one yet to make it part of my network neighborhood. Kirby From delza at livingcode.org Thu Dec 30 06:55:05 2004 From: delza at livingcode.org (Dethe Elza) Date: Thu Dec 30 06:55:07 2004 Subject: [Edu-sig] Learn to Program in Ten Years In-Reply-To: <20041226000207.CA8BA1E4005@bag.python.org> References: <20041226000207.CA8BA1E4005@bag.python.org> Message-ID: <5ACEE26B-5A27-11D9-B064-0003939B59E8@livingcode.org> >> It is interpreted when given untyped variable information, and >> compiled >> when given typed variables. And works nicely with inline C code. >> >> Wouldn't that be nice if Python... >> > > Declaring types really pins you down and suddenly, it's really > not Python. Well, Pyrex is basically Python that you can mix in optional types and inline C code, which makes it really easy to a) create Python extensions which run really fast, and b) create Python bindings for libraries coded in C. That's about all I really need any optional types for, and Pyrex seems to be a good fit. Not sure if someone has already mentioned this, as I've been off list and off-line for awhile, just catching up now. > PyPy is an attempt to deepen the Python layer. You could also > design a chip that executes Python byte codes natively somehow -- > that'd be > interesting to think about. PyPy uses a similar approach to Pyrex, called Psyco, which compiles directly to 80x86 machine code (Pyrex compiles to cross-platform C code). This allows PyPy to attempt to be faster than C-Python by creating compiler optimizations. Not sure what the PyPy story is for non-x86 platforms. There is also a project to recreate Python on top of Smalltalk, by L. Peter Deutch, which he expects to be faster than C-Python (and if anyone can do it, he could). Nice to see y'all again. Happy New Year (or Gnu Year?). --Dethe I can't watch television without praying for nuclear holocaust. --Bill Hicks -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2488 bytes Desc: not available Url : http://mail.python.org/pipermail/edu-sig/attachments/20041229/ad98f911/smime.bin