From guido@python.org Mon May 1 19:26:08 2000 From: guido@python.org (Guido van Rossum) Date: Mon, 01 May 2000 14:26:08 -0400 Subject: [Edu-sig] RE: articles of possible interest In-Reply-To: Your message of "Sun, 30 Apr 2000 07:45:51 PDT." <200004301445.HAA23452@rock.west.ora.com> References: <200004301416.HAA23225@rock.west.ora.com> <200004301445.HAA23452@rock.west.ora.com> Message-ID: <200005011826.OAA21714@eric.cnri.reston.va.us> > Ah, and one more, MOOP, this one found lurking in the vaults. > > http://www.accessoft.com/moop/ > > It has a more pleasant acronym. Since it also has Joe Strout as the first contributor, I believe it may just be a renaming of poo. --Guido van Rossum (home page: http://www.python.org/~guido/) From pdx4d@teleport.com Mon May 1 20:10:02 2000 From: pdx4d@teleport.com (Kirby Urner) Date: Mon, 01 May 2000 12:10:02 -0700 Subject: [Edu-sig] Re Python's role (one of them) In-Reply-To: References: <200004292225.PAA04102@cr366361-a.crdva1.bc.wave.home.com> Message-ID: <3.0.3.32.20000501121002.031e01e0@pop.teleport.com> Although I think David wrote intelligently and accurately about the "movable line" between "intelligible code" versus "black box" (with an API/interface between the two), there's a way to generalize this which takes us out of the realm of computer codes and hardware. I think where I've mostly come down in my use of Python in the curriculum (not to the exclusion of, nor at the expense of other approaches), is to help deobfuscate and demystify what may come across, at first (and even second) reading, as rather cryptic mathematical notations. In other words, the "black box" I want to shine a light into, is pre-computer in origin, is "legacy code" on paper, not in some magnetic or laser-pitted medium (although that's where a lot of it will be going). I think many individuals besides myself have sometimes found the FORTRAN or BASIC implementation of some algorithm really clarifies what seemed rather inaccessible when just encoded as text book squiggles, in some notation advertised as "internationally accepted" but which is nevertheless rather "crypto-compressed" plus infested with ancient greek symbols. But in the early days, computer languages were still too mired in machine dependent details, had too much syntax devoted to irrelevant hardware concerns, to really rise to the level of an alternative "math notation" -- a set of symbols suitable for both explaining and implementing math-related concepts. This really started to change when core syntax was distilled from platform concerns, the latter being encapsulated in libraries, hidden away from programmers. This was done in the name of "portability" and C is a primary example of this architecture. A major pioneer in bridging between "computer langauge" and "math notation" was Kenneth Iverson's A Programming Language (APL). This language originally evolved as a chalkboard notation, and looks an awful lot like some geeky ancient greek -- lots of specialized symbols that serve as primitive operators in an interpretive, interactive environment. APL was the first real computer language I ever learned (not counting my experience with the HP65 in the Philippines). Princeton had APL terminals scattered around campus, including in my dorm and Firestone Library (this was 1976) and I taught it to myself, outside of any formal computer class (although I enrolled in quite a few of those as well). In a lot of ways, I realize I'm coming at Python as a kind of APL. The range() primitive is a lot like the lower-case i (I don't remember all those symbols any more). And I'm looking at Python as a kind of math notation, another way to get across what's going on in that "black box" of vector algebra, for example. Like, lets look at vectors. The curriculum as presently designed does number lines and Cartesian coordinates without mentioning vectors. Then it backs up and goes over the same territory again, this time with the vector concept phased in. Seems wasteful and redundant in a lot of ways, plus has the effect of making vectors seem a bit superfluous -- like why do we need them now if we didn't need them then? We're doing the same 3D traces in space, after all. Or, conversely, if they were so important from the beginning, why were they kept from us until now? I think the curriculum contains a lot of these twists and turns, which accrue through history by happenstance, and then stay there. People don't really go back and sort it all out, rationalize the structure. Like, I think we really _could_ do vectors right from the beginning, and Python's object-orientation makes this especially easy: vectors are a kind of object, contain data and methods. Here is the data, here are the methods, and we're done. Pretty straightforward, especially when kids are already quite familiar with language primitives like tuples, lists, range() etc. Consider the Wolfram Research web page on the tetrahedron, we find the following formula for its volume: V = (1/6)[a dot (b cross c)] [1] In Python, if we've already defined our vector object, we can write: V = (1.0/6.0) * ( a.dot(b.cross(c)) ) Not that much different. We see a,b,c as objects, with dot and cross as methods internal to these objects. Inside the Python vector class, we find the corresponding function defs: def dot(self,v1): # return the dot product of self with another vector # return a scalar scalar = 0 for i in range(3): scalar = scalar + v1.coords[i] * self.coords[i] return scalar def cross(self,v1): # return the cross product of self with another vector # return a vector newcoords = [0,0,0] newcoords[0] = self.coords[1]*v1.coords[2]-self.coords[2]*v1.coords[1] newcoords[1] = self.coords[2]*v1.coords[0]-self.coords[0]*v1.coords[2] newcoords[2] = self.coords[0]*v1.coords[1]-self.coords[1]*v1.coords[0] return Vector(newcoords) It's clear, from reading the above, that dot returns a scalar, while cross returns a vector. coords is just a 3-member tuple, storing the (x,y,z) coordinates of vector v such that v = xi + yj + zk where i,j,k are the 3 unit vectors along the x,y and z axes of the Cartesian apparatus. We instantiate vectors like this: >>> v1 = Vector((2,1,0)) >>> v2 = Vector((-1,0,3)) and then use our methods: >>> v1.angle(v2) 106.42994 >>> v1.dot(v2) -2 >>> v3 = v1.cross(v2) >>> v3.coords (3, -6, 1) >>> v3.dot(v1) 0 >>> v3.dot(v2) 0 Students learn that v1.cross(v2) returns a vector pependicular to both v1 and v2, and that a dot product of 0 indicates this orthogonal relationship in Cartesian space i.e. v3.dot(v1) and v3.dot(v2) are both 0, as expected, given v3 is orthogonal to both v1 and v2. Notice that we haven't really done much with graphics so far. That's all part of the presentation of course, but a lot of the insights come from just working at the command line, putting in values, and getting values back. You have that immediate reinforcement of an answer and/or error (both kinds of feedback helpful). In sum, where I see Python being useful is as a way of making crypto-compressed math notations more understandable. Familiarity with the Python language will give students was to see the vectors "spelled out" in familiar object-oriented notation, and to operate with them interactively. With this kind of background, operations like dot and cross product will seem like old friends even at the high school level, and vector calculus concepts like grad, div and curl will not present the high hurdles they do today, given the twisted/tangled obstacle course we present, as if this mess had anything much to do with training clear thinkers [2]. Kirby [1] http://mathworld.wolfram.com/Tetrahedron.html [2] in fact, the present-day math curriclum produces the opposite, and thereby feeds bureaucracies, which thrive on keeping _all_ thinking, including math- related, as "fuzzy" as possible (because a chief function of bureaucracies is to give phonies a safe place to hide their incompetence from scrutiny) From pdx4d@teleport.com Mon May 1 20:59:33 2000 From: pdx4d@teleport.com (Kirby Urner) Date: Mon, 01 May 2000 12:59:33 -0700 Subject: [Edu-sig] Re Python's role (one of them) In-Reply-To: <3.0.3.32.20000501121002.031e01e0@pop.teleport.com> References: <200004292225.PAA04102@cr366361-a.crdva1.bc.wave.home.com> Message-ID: <3.0.3.32.20000501125933.031f16c8@pop.teleport.com> Apropos to the above, here are 3 posts to another list, also of today, showing how I'm integrating Python into my presentation of vector algebra concepts: http://www.egroups.com/message/synergeo/618 http://www.egroups.com/message/synergeo/620 http://www.egroups.com/message/synergeo/621 People on this list may not be Python gurus (I'm not guru- level myself), but given some are programmers, including professionally, just having the Python syntax in the picture is helpful in getting across a lot of the main ideas. Of course the more people get into Python, the more they get from such Python-invested exegesis. Kirby From jelkner@yorktown.arlington.k12.va.us Tue May 2 10:50:42 2000 From: jelkner@yorktown.arlington.k12.va.us (Jeffrey Elkner) Date: Tue, 2 May 2000 05:50:42 -0400 Subject: [Edu-sig] Computer Programming for EVERYONE... In-Reply-To: References: Message-ID: <00050206200900.16452@tpaine.yorktown.arlington.k12.va.us> I want to thank Dorothea Salo for her important and thought provoking contribution to this discussion list (CP4E, Including Women (or Why More Women Aren't Hackers) - April 27, 2000). She single handedly woke up the list with a very important problem that demands our attention. I am a high school teacher who is really excited about Computer Programming for Everybody. Information technology is becoming ever more important in our world, and access to and an understanding of information technology will be requisite to access to opportunity and power in society in general. If the world of the future is going to be a just and democratic world, then access to the tools of power must likewise be just and democratic. It troubles me in this regard that the students in my computer science classes so little resemble the school community at large. 9 of my 102 students are female, and a similar imbalance is evident if race and economic background are considered. The "digital divide" is indeed very real. This reality has led me to think a lot about what can be done about this situation, which is one of the things that attracted me to Computer Programming for Everyone. A simplified breakdown of how to bridge the digital divide would involve three things: 1. Access - there are many unnecessary barriers which are placed in the way of those wanting to get involved with information technology, and the removal of those barriers is an important first step. I see using Python in my computer science classes as an example of reducing barriers. 2. Inclusion - Once barriers to entry are lowered and folks begin to come, they need to be made to feel welcome. There is a very exclusive "boys club" culture and mentality in CS circles that is actively alienating to women. Those of us in CS need to be conscious of what we are doing. 3. Affirmative Action - "Inclusion" will not be enough to bridge the gap. Positive action needs to be taken to set up computer classes and programs specifically targeted at underrepresented groups. All of us benefit from addressing this problem by helping to create a better world. It is also the only way that CP4E can be truly effective. jeff elkner yorktown high school arlington, va From djmitche@midway.uchicago.edu Tue May 2 21:20:47 2000 From: djmitche@midway.uchicago.edu (Dustin James Mitchell) Date: Tue, 2 May 2000 15:20:47 -0500 (CDT) Subject: [Edu-sig] Computer Programming for EVERYONE... In-Reply-To: <00050206200900.16452@tpaine.yorktown.arlington.k12.va.us> Message-ID: On Tue, 2 May 2000, Jeffrey Elkner wrote: > I want to thank Dorothea Salo for her important and thought provoking > contribution to this discussion list (CP4E, Including Women (or Why More Women > Aren't Hackers) - April 27, 2000). She single handedly woke up the list with a > very important problem that demands our attention. > All of us benefit from addressing this problem by helping to create a better > world. It is also the only way that CP4E can be truly effective. I couldn't agree more. I've long been casting about, trying to see how CP4E can really make a difference (I know, I'm young, I still like that phrase...). Here's a gzipped core dump: CP4E is a federally funded program, the lucky recipient of a very selective grant. This isn't a $10,000 grant from a state board of education, or even from the DOE. It's a $2 million grant from DARPA. We shouldn't be developing just another curriculum -- it has been and is being done already. Look through the web, starting from e.g. the DOE page, the Edu-Sig homepage, or the CPS homepage [1]. I'm sure we could develop a 'killer app' curriculum, complete with lesson plans, support code, development environments, visual aids, mathematical relevancy, scientific modeling, and engaging graphics. But I think that even such a 'killer app' will fail to usher in an era of 'Computer Programming For Everybody'. It's going to lose out in a few ways: (-) the curriculum will not be universally adopted; (-) the digital divide is a much larger problem, and can't be solved by schools, let alone by a curriculum; [2] and (-) gender discrimination must, as Jeffrey Elkner says, be addressed explicitly. Which is not to say I know what we should do. But I think we should take the popular support that Python has, and use it as a tool for social change. Perhaps we could start in on some popular utilities, adding scriptability to them, and writing quantities of documentation describing how to script them. For instance, a scriptable IRC client would be mighty useful to irc people. If we can manage to get a good number of products out there with "Python Inside" stickers, and perhaps encourage some sort of integration between them (supporting OLE/COM/DCOM/ActiveX/ on Windows, for instance), then users would see it as to their advantage to pick up a little bit of this Python stuff, because one little bit will have broad applicability. So I've said my piece. Comments? References: [1] http://www.cps.k12.il.us/ [2] James Traub, "Schools Are Not the Answer." New York Times Magazine, January 16, 2000. --------------------------------------------------------------------- | Dustin Mitchell )O( | --------------------------------------------------------------------- From bryan.hann@pobox.com Wed May 3 05:59:38 2000 From: bryan.hann@pobox.com (Bryan Hann) Date: Wed, 03 May 2000 05:59:38 +0100 Subject: [Edu-sig] Write Programs to Learn Mathematics References: <200004292225.PAA04102@cr366361-a.crdva1.bc.wave.home.com> <3.0.3.32.20000501121002.031e01e0@pop.teleport.com> Message-ID: <390FB23A.F39BF00B@pobox.com> Although I have some interest in introducing students to equations of lines by means of software that will plot (eg) "y=mx+b" and let the students observe the line changing as the parameters change, I have more interest in having them figure out how to program a machine to draw a straight line between two points on the screen. I see no reason why without some programing guidance, a student should not be able to derive the equations they need to learn. With prospects of a grade 8 teaching position this Fall, this is taking on new urgency, so I an unlurking to share my thoughts and (I hope) find helpful suggestions, or perhaps others who might wish to do something similar this Fall. Some of the things I would be intersted in doing (at different stages) would be: - to introduce trigonometry through the problem of writing software to draw circles; have them carefully measure a large circle and hand-generate a table; introduce a series of polynomial terms that will generate the numbers; hear the 'oohs' and 'aahs' (I hope!) - to introduce and develop linear algebra through operations needed to remap coordinates on the screen via linear trans- formations (eg moving the origin from the top left corner of the screen to the middle, and have the y-axis 'positive up'; when used to affine transformations, perhaps some fractal image compression? - to introduce different algebraic systems through their construction from simpler systems (integers as pairs of naturals with appropriatly defined equivalency and operations; positive rationals as pairs of integers with *different* equivalency and operations; Gaussian (complex) integers as pairs of integers with different operations still, etc). What would otherwise be dryly abstract can be made very concrete by having students write functions that will compare two pairs and determine if they are in the same equivalency class, functions that will perform the desired operations, and functions that will take an arbitrary pair and return an equivalent pair in some canonical form. These are the kinds of constructions that are commonplace in higher algebra (eg imbedding a ring in a field). Making it concrete enough for them to get it in their blood at an early stage seems a good thing. - introduce logarithms by having them play the guessing game (I am thinking of a number between 0 and 100. You guess repeatedly, and I will tell you if your guess is low or high.) What strategy do you use? Both sides of the guessing game are easily programmed. Have students program both sides and make proceses play each other over a network. Compile statistics for games of different sizes. Plot the results. How many guesses does it talke to win a game of a certain size? When n is not a power of two, ln(n) is not an outcome but an expectation. Probability? These are just some of the avenues I would like to follow. I suspect that by making the abstract concrete, programming will allow many ideas to be introduced (with a kind of clarity and rigour!) at an earlier age than is otherwise feasable. Comments? Criticisms? Are any of you doping similar things now? Do any of you have interest in exploring these things with me? - Bryan Hann From pdx4d@teleport.com Tue May 2 23:27:55 2000 From: pdx4d@teleport.com (Kirby Urner) Date: Tue, 02 May 2000 15:27:55 -0700 Subject: [Edu-sig] Re: catenaries vs. parabolas Message-ID: <3.0.3.32.20000502152755.03302b10@pop.teleport.com> Earlier today, Adam Stinchcombe wrote: >Not one suspension bridge in the world was built without a precise >mathematical understanding of the shape of Martha's hanging chain. >This might be an interesting thing to look into, and if I have >the time, I'll get back to the group about my findings. Dating >the catenary to the famous Bernoullis is easy enough. Some of you researching this interesting topic have probably found: http://www-groups.dcs.st-andrews.ac.uk/~history/Curves/Catenary.html Plus students might need more background re cosh (hyperbolic cosine): http://www.ping.be/~ping1339/hyp.htm#The-hyperbolic-funct Less directly math-oriented, but still part of our technological world, I also consider the following to be relevant: http://consumerlawpage.com/article/overhead.shtml (about kids electrocuting themselves on the overhead catenary lines, and Conrail paying damages, for gross negligence in this regard). This is because of my "math as storyteller" model, i.e. using math to "connect the dots" in a more narratively-based format.[1] I.e. getting into the railroading business is a good excuse to: (a) study the etymology of "catenary" (first use of the term attributed to Christiaan Huygens, 1629-1695) and then (b) look at the application and the dangers associated therewith (perhaps even useful reinforcement for survival reasons, if your students live in urban areas Plus trains are going to come up elsewhere, maybe metaphorically (as in "great circle railroad tracks") i.e. when we study networks (graph theory), transportation problems etc. The idea is to "overload" these dips into trains with a lot of "extraneous" lore -- partly so that students attention remains entrained (because we're talking about more than "just the math", are weaving in a lot of culture). More good train imagery: http://lackawanna.railfan.net/hoboken4.htm http://www.info-4u.com/modelmemories/polepic.htm http://www.railway-technology.com/contractors/electrification/ Note: especially important is the pantograph, which maintains contact with the wire to maintain contact with the line, which is only very shallowly catenary (i.e. dips up and down with far less amplitude than an overhead telephone line). I think what's obvious from my approach is that the web is making a difference. This is in support of my thesis, advanced on the AMTE listserv: that textbooks need to be supplemented with cyberspace materials if we're to keep math relevant. This is because the "upgrade cycle" as inertially weighed down by the very slow-turning wheels of the mass-publishing industry is simply unable to keep pace -- and kids know this, at least intuitively. We need to use cyberspace to drive the upgrade cycle more quickly, and bring the curriculum back into synch with the real world. A textbook publisher could never afford the time, space (or expensive permissions) associated with diving into "trains" or "suspension bridges" in any great detail, as we're passing through the catenary topic (not a big focus -- the whole "curves" topic is a pale shadow of what it used to be). A few word problems, with a shred of realism attached, is about all there's room for in your standard text book. But with the web, teachers are in position to _source_ a lot of new curriculum, simply by using a search engine and some imagination. As educators can go where no text book publisher would or could -- and we should, because this is a way to help satisfy the deep hunger for relevant content which many kids feel. Also on AMTE, I circled over-reliance on calculators as symptomatic of curriculum impoverishment. Computers do so much more, are easier to program, give us access to alpha/character-focused algorithms (e.g. "Hamming Distance"), plus get us "beyond flatland" (off the XY plane). I don't mind using the calculator interface as a useful guide to what are the most important primitive functions, distilled over the centuries. Let's tour all the keys and figure out what they do (including the hyperbolic trig stuff -- on most scientific calculators). But let's not _stop_ with the calculator for gosh sakes. At least one programming language should be a part of every math-learning course of study. Numeracy and computer literacy are convergent goals. And so here's another reason not to rely too heavily on text books: they're largely out of date on the computer front, stuck back in the days of BASIC or Logo, missing the object-oriented boat, which is where objects like Vectors (even Quaternions) come into their own. We just can't afford to wait another five years for McGraw-Hill to finally come out with its Python-focussed math ed series (if that's even on the drawing board -- not saying I really know (I used to work in McGraw-Hill's K-12 computer department, but that was over 15 years ago)). Those of you familiar with my 'Numeracy + Computer Literacy' pages know that I'm into using Python as an alternative (self-executing) math notation.[2] Python has easy syntax and there's a growing body of literature aimed at communicating it to kids, including downloadable lessons (linked from the For Further Reading section at the bottom of Part 1 of my 4-part essay). Using Python, we could explore the catenary as follows: >>> import math # native module >>> math.e # contains built-in value for e 2.71828182846 >>> math.cosh(10) # as well a built-in hyperbolic cosine 11013.2329201 >>> def newcosh(n): # ... but let's define our own (using e) return (math.e**n + math.e**(-n))/2.0 >>> newcosh(10) # ... and confirm: same result 11013.2329201 Given a function is a set of (domain, range) pairs, we'd like to pass a domain to catenary() and get back a set of tuples (pairs): >>> def catenary(domain,a): # accept list of domain values, constant a, # return (domain,range) pairs of corresponding # catenary function pairs = [] for x in domain: # for each member of domain... range = math.cosh(x/a) # ... compute range pairs.append((x,range)) # append tuple return pairs >>> def mkdomain(low, high, interval): # create list of domain values, from low to high # stepping by interval output = [] # the output list i=0 while 1: # just keep looping... output.append(low + i*interval) i=i+1 if output[-1]>=high: break # ...until high reached return output >>> domain = mkdomain(-1.0,1.0,0.1) >>> domain [-1.0, -0.9, -0.8, -0.7, -0.6, -0.5, -0.4, -0.3, -0.2, -0.1, 0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0] So let's get the tuples for this function, with some value for a: >>> function = catenary(domain,0.5) # a = 1/2 >>> function [(-1.0, 3.76219569108), (-0.9, 3.10747317632), (-0.8, 2.57746447119), (-0.7, 2.15089846539), (-0.6, 1.81065556732), (-0.5, 1.54308063482), (-0.4, 1.3374349463), (-0.3, 1.18546521824), (-0.2, 1.08107237184), (-0.1, 1.02006675562), (0.0, 1.0), (0.1, 1.02006675562), (0.2, 1.08107237184), (0.3, 1.18546521824), (0.4, 1.3374349463), (0.5, 1.54308063482), (0.6, 1.81065556732), (0.7, 2.15089846539), (0.8, 2.57746447119), (0.9, 3.10747317632), (1.0, 3.76219569108)] Now of ourse we'll eventually want to graph the thing. Here's how I do it, using Python + Povray: >>> import functions, povray # add more tools to our namespace >>> catpix = povray.Povray("mycat.pov") # open a draw file >>> functions.xyzaxes(catpix,3) # output some colorful xyz axes >>> graphit(function,catpix) # see note [3] for more detail >>> catpix.close() # close the file And here's the picture I get, using tools developed at my website: http://www.inetarena.com/~pdx4d/ocn/graphics/catenary.gif Kirby PS: http://www.bfi.org/catenary.htm is also relevant (and closer to "home" (cite "ET math")) NOTES: [1] http://fire1b.math.utk.edu/hypermail/mathedcc/0011.html or, after May 31, 2000 try: http://fire1b.math.utk.edu/hypermail/mathedcc/may00/0011.html [2] http://www.inetarena.com/~pdx4d/ocn/cp4e.html#python [3] Here's my graphit function: >>> def graphit(myfunc, myfile): for i in range(len(myfunc)-1): v1 = Vector((myfunc[i][0],myfunc[i][1],0)) v2 = Vector((myfunc[i+1][0],myfunc[i+1][1],0)) myfile.edge(v1,v2) # draw edge between the two makes use of a Vector class in coords.py module. More background info re vector algebra w/ Python at: http://www.python.org/pipermail/edu-sig/2000-May/000380.html http://www.python.org/pipermail/edu-sig/2000-May/000381.html From pdx4d@teleport.com Wed May 3 00:25:05 2000 From: pdx4d@teleport.com (Kirby Urner) Date: Tue, 02 May 2000 16:25:05 -0700 Subject: [Edu-sig] testing colorized code sharing Message-ID: <3.0.3.32.20000502162505.03141d30@pop.teleport.com> I'm testing the ability of edu-sig list server to handle colorized Python code (on my screen, code fragments below are in color): ffff,0000,ffff def 0000,0000,ffffmkdomain(low, high, interval): ffff,0000,0000# create list of domain values, from low to high ffff,0000,0000# stepping by interval output = [] # the output list i=0 ffff,0000,ffffwhile 1: ffff,0000,0000# just keep looping... output.append(low + i*interval) i=i+1 ffff,0000,ffffif output[-1]>=high: break ffff,0000,0000# ...until high reached ffff,0000,ffffreturn output I wanted to use IDLE colors, but my Eudora doesn't include orange (for def, if, while, return) -- fuchsia a poor substitute. One thing I'd like to see is a .py module that reads Python source.py files and colorizes it with IDLE-consistent HTML font tags (between <
 <
at file top/bottom). Even cooler would be an add-on in IDLE which saves code in this format (HTML extension, color box checked). This'd be great for cutting and pasting to web pages or even email clients (especially if this text works -- wonder how it'll show up in the archives). Adds to readability and would probably spur more folks to quote Python directly on their web pages (keeping the untagged source in a separate download file, for those wanting to actually execute the stuff). I've been doing color-coding by hand -- could write code to do it, but I'd be inefficient at doing so. Kirby From pdx4d@teleport.com Wed May 3 00:31:35 2000 From: pdx4d@teleport.com (Kirby Urner) Date: Tue, 02 May 2000 16:31:35 -0700 Subject: [Edu-sig] testing colorized code sharing In-Reply-To: <3.0.3.32.20000502162505.03141d30@pop.teleport.com> Message-ID: <3.0.3.32.20000502163135.031a9cb0@pop.teleport.com> Came back to my Eudora reader in color, but in the archives it's not very readable: ffff,0000,ffff def 0000,0000,ffffmkdomain(low, high, interval): etc. etc. I'm guessing varying results in other email clients. Probably not a good idea to colorize in emails (too time-consuming anyway). Oh well... I still think an auto-tagging colorizer would be useful, for those of us sharing Python source code on web pages. Perhaps such a utility already exists? Kirby From guido@python.org Wed May 3 03:35:07 2000 From: guido@python.org (Guido van Rossum) Date: Tue, 02 May 2000 22:35:07 -0400 Subject: [Edu-sig] testing colorized code sharing In-Reply-To: Your message of "Tue, 02 May 2000 16:25:05 PDT." <3.0.3.32.20000502162505.03141d30@pop.teleport.com> References: <3.0.3.32.20000502162505.03141d30@pop.teleport.com> Message-ID: <200005030235.WAA02693@eric.cnri.reston.va.us> Kirby, There's some code around that can help with the colorization. The code in IDLE is hard to adapt because it works under near-real-time constraints and is consequently convoluted; however my brother wrote a module PyFontify that I found was recently used in a PDF generator. It doesn't generate HTML but that's the easy part -- recognizing Python syntax is the hard part. He'll gladly point you to a copy at just@letterror.com. --Guido van Rossum (home page: http://www.python.org/~guido/) From tim_one@email.msn.com Wed May 3 05:25:39 2000 From: tim_one@email.msn.com (Tim Peters) Date: Wed, 3 May 2000 00:25:39 -0400 Subject: [Edu-sig] testing colorized code sharing In-Reply-To: <200005030235.WAA02693@eric.cnri.reston.va.us> Message-ID: <000001bfb4b7$a30cc080$622d153f@tim> [Guido, replying to Kirby] > There's some code around that can help with the colorization. > ... > my brother wrote a module PyFontify that I found was recently used > in a PDF generator. It doesn't generate HTML but that's the easy part -- > recognizing Python syntax is the hard part. And Marc-Andre Lemburg did the easy part . Look for py2html.py at http://starship.python.net/crew/lemburg/ It builds on Just van Rossum's PyFontify.py. To see it in action, M-A's page has a box in which you can enter the URL of any Python script on the web. Of course you can also grab the py2html.py source code too. From pdx4d@teleport.com Wed May 3 06:32:20 2000 From: pdx4d@teleport.com (Kirby Urner) Date: Tue, 02 May 2000 22:32:20 -0700 Subject: [Edu-sig] testing colorized code sharing In-Reply-To: <000001bfb4b7$a30cc080$622d153f@tim> References: <200005030235.WAA02693@eric.cnri.reston.va.us> Message-ID: <3.0.3.32.20000502223220.03144e54@pop.teleport.com> At 12:25 AM 05/03/2000 -0400, Tim Peters wrote: >[Guido, replying to Kirby] >> There's some code around that can help with the colorization. >> ... >> my brother wrote a module PyFontify that I found was recently used >> in a PDF generator. It doesn't generate HTML but that's the easy part -- >> recognizing Python syntax is the hard part. > >And Marc-Andre Lemburg did the easy part . Look for py2html.py at > > http://starship.python.net/crew/lemburg/ > >It builds on Just van Rossum's PyFontify.py. Actually I guess it _depends on_ what Just did -- have to download PyFontify.py separately, but the provided URL doesn't work, which probably explains why the CGI script doesn't either (?). Anyway, this looks like _exactly_ what I'm looking for. Once I locate Just's PyFontify (I've already downloaded py2html.py), I should be able to avoid hand-coloring my HTML-published Python from now on. Yippee! My hearty thanks to the Python gurus among us (Guido, Tim, and Just). Kirby From just@letterror.com Wed May 3 07:52:51 2000 From: just@letterror.com (Just van Rossum) Date: Wed, 3 May 2000 07:52:51 +0100 Subject: [Edu-sig] testing colorized code sharing In-Reply-To: <3.0.3.32.20000502223220.03144e54@pop.teleport.com> References: <000001bfb4b7$a30cc080$622d153f@tim> <200005030235.WAA02693@eric.cnri.reston.va.us> Message-ID: At 10:32 PM -0700 02-05-2000, Kirby Urner wrote: >Actually I guess it _depends on_ what Just did -- have to download >PyFontify.py separately, but the provided URL doesn't work, which >probably explains why the CGI script doesn't either (?). Dunno, it's still there on my starship page. However, since I currently have no access to the starship, I can't post the updated version. Two buglets were recently fixed. I've uploaded a version to http://www.petr.nl/just/PyFontify.py Just From tim_one@email.msn.com Wed May 3 07:11:54 2000 From: tim_one@email.msn.com (Tim Peters) Date: Wed, 3 May 2000 02:11:54 -0400 Subject: [Edu-sig] testing colorized code sharing In-Reply-To: <3.0.3.32.20000502223220.03144e54@pop.teleport.com> Message-ID: <000601bfb4c6$7b5bc7c0$622d153f@tim> >> And Marc-Andre Lemburg did the easy part . Look for py2html.py at >> >> http://starship.python.net/crew/lemburg/ >> >> It builds on Just van Rossum's PyFontify.py. [Kirby] > Actually I guess it _depends on_ what Just did -- have to download > PyFontify.py separately, but the provided URL doesn't work, which > probably explains why the CGI script doesn't either (?). Rats. The Starship suffered total hard disk failure a short time ago, and I assume Just simply hasn't been able to reproduce his pages there yet. > Anyway, this looks like _exactly_ what I'm looking for. Don't know -- but it is exactly what you asked for . From pdx4d@teleport.com Wed May 3 07:38:00 2000 From: pdx4d@teleport.com (Kirby Urner) Date: Tue, 02 May 2000 23:38:00 -0700 Subject: [Edu-sig] testing colorized code sharing In-Reply-To: References: <3.0.3.32.20000502223220.03144e54@pop.teleport.com> <000001bfb4b7$a30cc080$622d153f@tim> <200005030235.WAA02693@eric.cnri.reston.va.us> Message-ID: <3.0.3.32.20000502233800.03151ed4@pop.teleport.com> At 07:52 AM 05/03/2000 +0100, Just van Rossum wrote: >At 10:32 PM -0700 02-05-2000, Kirby Urner wrote: >>Actually I guess it _depends on_ what Just did -- have to download >>PyFontify.py separately, but the provided URL doesn't work, which >>probably explains why the CGI script doesn't either (?). > >Dunno, it's still there on my starship page. However, since I currently >have no access to the starship, I can't post the updated version. Two >buglets were recently fixed. I've uploaded a version to >http://www.petr.nl/just/PyFontify.py > >Just Thanks Just! Worked like a charm. Probably an access issue for me too, re Starship. For those of you tracking on edu-sig: http://www.inetarena.com/~pdx4d/ocn/python/shapes.py http://www.inetarena.com/~pdx4d/ocn/python/shapes.html give before and after pictures. shapes.py was the input file, and shapes.html came out automatically, as a result of running the downloaded code. Here's some nuts and bolts for running from Windows IDLE (my environment): >>> import py2html >>> import PyFontify >>> c = py2html.PrettyPrint(PyFontify.fontify) >>> c.file_filter(".\ocn\series.py",".\ocn\series.html") That's it. Last line provides input and output files, with path. Also, in order to use the same color scheme as Windows IDLE, I tweeked the PrettyPrint class. The default color scheme is pretty too, but it's cool that I could easily customize to match what I've already been doing. Below the commented out 'formats' dictionary is the default, with my preferred colorizing scheme immediately following... def set_mode_html_color(self): # self.formats = { # 'all':('
','
'), # 'comment':('',''), # 'keyword':('',''), # 'parameter':('',''), # 'identifier':( lambda x,strip=string.strip: # '' % (strip(x)), # ''), # 'string':('','') # } self.formats = { 'all':('
','
'), 'comment':('',''), 'keyword':('',''), 'parameter':('',''), 'identifier':( lambda x,strip=string.strip: '' % (strip(x)), ''), 'string':('','') } set_mode_rawhtml_color = set_mode_html_color Thanks to all for helping. Made my day (week even!). Kirby PS: re Tim's note, just in, I hope that wasn't me re the Starship crash. All I did with enter an URL in that CGI blank, really! From pdx4d@teleport.com Wed May 3 08:50:55 2000 From: pdx4d@teleport.com (Kirby Urner) Date: Wed, 03 May 2000 00:50:55 -0700 Subject: [Edu-sig] Even more re: catenaries vs. parabolas In-Reply-To: <3.0.3.32.20000502152755.03302b10@pop.teleport.com> Message-ID: <3.0.3.32.20000503005055.03144e54@pop.teleport.com> Earlier today I wrote: >Note: especially important is the pantograph, which maintains >contact with the wire to maintain contact with the line, which >is only very shallowly catenary (i.e. dips up and down with >far less amplitude than an overhead telephone line). Even aside from the garbled sentence, I was a bit confused about the overhead caternary design. There's an upper wire with a pronounced dip, the true catenary, suspended from which is the actual high voltage line, which is in theory parallel to the track at all times (although the spring-loaded pantograph will accommodate some deviations, no?). So it's more like having a lot of miniature suspension bridges between the poles. So I'd like to do another graphic, with the catenary on top (not as deep-dipping as before -- bigger 'a'), and a horizontal line (different color) below. Then I'll add some vertical rods, evenly spaced, to indicate that my lower line is suspended from the upper one. The old + new pictures, with some Python-colorized Python code, is at: http://www.inetarena.com/~pdx4d/ocn/catenary.html You may wonder why I'm putting so much time into this rather obscure topic (cued my posts by Martha Haehl, Abraham S. Mantell et al on the MATHEDCC listserv).[1] Well, finding all those train links under "overhead catenary systems" made my little heart go pitter pat, given all the train metaphors already operative at one of my websites (Design Science Central): http://www.inetarena.com/~pdx4d/ [2] I guess I just couldn't resist! Kirby Curriculum writer Oregon Curriculum Network http://www.inetarena.com/~pdx4d/ocn/ [1] http://archives.math.utk.edu/hypermail/mathedcc/ [2] this site still very much under construction. I got the idea of using trains to link websites from the people behind The Rail: see "track link" at the bottom of my http://www.teleport.com/~pdx4d/hypertoon.html -- one of the original "great circles" (good use of metaphor). From ping@lfw.org Wed May 3 11:12:34 2000 From: ping@lfw.org (Ka-Ping Yee) Date: Wed, 3 May 2000 03:12:34 -0700 (PDT) Subject: [Edu-sig] Articles of possible interest In-Reply-To: Message-ID: On Thu, 27 Apr 2000, Dorothea Salo wrote: > > Part of the problem. But I said that. :) You have more women in > your audience than you probably realize, and you'll have more (and more > vocal) women if you make them feel welcome. I agree heartily. > My point is more that kids might find text processing *immediately > useful* in a way that robots aren't. Text processing can be way fun. I think a great elementary pedagogical example could be a simple random-sentence generator (hey, what do you know, you just used recursion!) -- and a Markov-chain gibberish generator is very easy to write in Python and *tremendously* entertaining! Pattern-matching can be fun too. (I recently played around trying to figure out how difficult it would be to swap the genders of all the pronouns in a piece of text, or replace them all with gender-neutral pronouns. If i ever get that figured out, i plan to create a new gender-neutral view on the Web, in the same way the http://www.lfw.org/jminc/ creates an insane view on the whole Web.) > Playing with strings can actually be a lot of fun. The "aha moment" > that brought me to Python was learning about regular expressions. Most > programmers, I think, find regexes as boring and difficult as I find > computational math games. Me, I *love* constructing regexes, do it all the > time and have done really pretty amazing things with them -- and I think > there are LOTS of people who would catch onto them quickly and find them as > fascinating as I do. Have you seen my "rxb" module? It sounds like you might enjoy it. It's too slow at constructing regular expressions if you need performance, but i think it's a good attempt at making the process of constructing regular expressions friendlier and more lucid: http://www.lfw.org/python/ >>> import rxb >>> rxb.welcome() >>> letter >>> either(some(digits), some(letters) + 3*digit) >>> "spam[" + some(digits) + "]" Turning patterns into objects lets you build complex patterns out of small reusable components: >>> ident = some(letters) >>> number = some(digits) >>> pat = label.name(ident) + "[" + label.index(number) + "]" >>> pat [A-Za-z]+)\\[(?P[0-9]+)\\]> >>> pat.search("spam and eggs[42] with ham") >>> _.name, _.index ('eggs', '42') -- ?!ng "To be human is to continually change. Your desire to remain as you are is what ultimately limits you." -- The Puppet Master, Ghost in the Shell From rabit126@yahoo.com Wed May 3 20:58:55 2000 From: rabit126@yahoo.com (kathrine smith) Date: Wed, 3 May 2000 12:58:55 -0700 (PDT) Subject: [Edu-sig] My Opinion Message-ID: <20000503195855.20982.qmail@web1605.mail.yahoo.com> 5/3/2000 Hi everyone! My name is Katherine. I am one of Mr. Jeffrey Elkner's many great students. :) (Sorry, Mr. Elkner, but I had to let the cat out of the bag.) I recently read with interest an article called "Why Women Aren't Hackers" well written by Dorothea Salo. One of her many points was that there was a low percentage of females in the computer science field. I am curious as to why. I believe one reason is because females are brought up with a different atmosphere compared to males. Another reason is that computers don't spark many girls' interests. Maybe it is because girls (and women) do not want to risk being called a computer geek. I believe that much of the female gender cares a lot about their image . . . and to be called a geek would be horrible. A possible solution for this problem could be to run more fun computer camps. A camp for kids from ages 8-12 is great! The younger the kids the more fascination. (I recently helped many girls learn to use fun programs like Microsoft Power Point. You won't believe how awed they were!) I started going to these great camps three years ago. Last year I went to an awesome robotics day camp. I was the only girl there out of 10 students. A couple weeks before that I went to another awesome computer camp with 7 girls out of 25 students. I am a little baffled as to why computers do spark the female interest but many don't pursue the interest. Maybe, as my friend Robert said, some girls are afraid to "tinker" around with machines. I hope that soon changes if it is true. Please let me know what your opinion is. I would enjoy reading your response(s). ~Katherine __________________________________________________ Do You Yahoo!? Send instant messages & get email alerts with Yahoo! Messenger. http://im.yahoo.com/ From rabit126@yahoo.com Wed May 3 21:10:49 2000 From: rabit126@yahoo.com (kathrine smith) Date: Wed, 3 May 2000 13:10:49 -0700 (PDT) Subject: [Edu-sig] Computer Programming for EVERYONE... Message-ID: <20000503201049.22417.qmail@web1606.mail.yahoo.com> --- Dustin James Mitchell wrote: > On Tue, 2 May 2000, Jeffrey Elkner wrote: > > > I want to thank Dorothea Salo for her important > and thought provoking > > contribution to this discussion list (CP4E, > Including Women (or Why More Women > > Aren't Hackers) - April 27, 2000). She single > handedly woke up the list with a > > very important problem that demands our attention. > > > All of us benefit from addressing this problem by > helping to create a better > > world. It is also the only way that CP4E can be > truly effective. > > I couldn't agree more. I've long been casting > about, trying to see how > CP4E can really make a difference (I know, I'm > young, I still like that > phrase...). Here's a gzipped core dump: > > > CP4E is a federally funded program, the lucky > recipient of a very > selective grant. This isn't a $10,000 grant from a > state board of > education, or even from the DOE. It's a $2 million > grant from DARPA. > > We shouldn't be developing just another curriculum > -- it has been and is > being done already. Look through the web, starting > from e.g. the DOE > page, the Edu-Sig homepage, or the CPS homepage [1]. > I'm sure we could > develop a 'killer app' curriculum, complete with > lesson plans, support > code, development environments, visual aids, > mathematical relevancy, > scientific modeling, and engaging graphics. > > But I think that even such a 'killer app' will fail > to usher in an era of > 'Computer Programming For Everybody'. It's going to > lose out in a few > ways: > > (-) the curriculum will not be universally adopted; > (-) the digital divide is a much larger problem, and > can't be solved by > schools, let alone by a curriculum; [2] and > (-) gender discrimination must, as Jeffrey Elkner > says, be addressed > explicitly. > > Which is not to say I know what we should do. But I > think we should take > the popular support that Python has, and use it as a > tool for social > change. Perhaps we could start in on some popular > utilities, adding > scriptability to them, and writing quantities of > documentation describing > how to script them. For instance, a scriptable IRC > client would be mighty > useful to irc people. If we can manage to get a > good number of products > out there with "Python Inside" stickers, and perhaps > encourage some sort > of integration between them (supporting > OLE/COM/DCOM/ActiveX/ week> on Windows, for instance), then users would > see it as to their > advantage to pick up a little bit of this Python > stuff, because one little > bit will have broad applicability. > > > So I've said my piece. Comments? > > References: > > [1] http://www.cps.k12.il.us/ > [2] James Traub, "Schools Are Not the Answer." New > York Times Magazine, > January 16, 2000. > > --------------------------------------------------------------------- > | Dustin Mitchell > )O( | > --------------------------------------------------------------------- > 5/3/2000 Hi everyone! My name is Katherine. I am one of Mr. Jeffrey Elkner's many great students. :) (Sorry, Mr. Elkner, but I had to let the cat out of the bag.) I recently read with interest an article called "Why Women Aren't Hackers" well written by Dorothea Salo. One of her many points was that there was a low percentage of females in the computer science field. I am curious as to why. I believe one reason is because females are brought up with a different atmosphere compared to males. Another reason is that computers don't spark many girls' interests. Maybe it is because girls (and women) do not want to risk being called a computer geek. I believe that much of the female gender cares a lot about their image . . . and to be called a geek would be horrible. A possible solution for this problem could be to run more fun computer camps. A camp for kids from ages 8-12 is great! The younger the kids the more fascination. (I recently helped many girls learn to use fun programs like Microsoft Power Point. You won't believe how awed they were!) I started going to these great camps three years ago. Last year I went to an awesome robotics day camp. I was the only girl there out of 10 students. A couple weeks before that I went to another awesome computer camp with 7 girls out of 25 students. I am a little baffled as to why computers do spark the female interest but many don't pursue the interest. Maybe, as my friend Robert said, some girls are afraid to "tinker" around with machines. I hope that soon changes if it is true. Please let me know what your opinion is. I would enjoy reading your response(s). ~Katherine > > > > > > > _______________________________________________ > Edu-sig mailing list > Edu-sig@python.org > http://www.python.org/mailman/listinfo/edu-sig > __________________________________________________ Do You Yahoo!? Send instant messages & get email alerts with Yahoo! Messenger. http://im.yahoo.com/ From dscherer@cmu.edu Wed May 3 23:19:40 2000 From: dscherer@cmu.edu (David Scherer) Date: Wed, 3 May 2000 18:19:40 -0400 Subject: [Edu-sig] My Opinion In-Reply-To: <20000503195855.20982.qmail@web1605.mail.yahoo.com> Message-ID: Katherine wrote: > I recently read with interest an article called "Why > Women Aren't Hackers" well written by Dorothea Salo. > One of her many points was that there was a low > percentage of females in the computer science field. > I am curious as to why. Carnegie Mellon has studied the problem: http://www.cs.cmu.edu/~gendergap/Reports.html http://www.cs.cmu.edu/~gendergap/working.html So has MIT: http://www.ai.mit.edu/people/ellens/Gender/pap/pap.html Here's a somewhat relevant student project: http://cse.stanford.edu/classes/cs201/Projects/gender-gap-in-education/ and another paper: http://www.resnet.wm.edu/~slharr/WomenCsci.html This issue does get attention, but there isn't widespread agreement about how it can be solved. Unfortunately, it can be hard to separate cause from effect in a positive feedback loop. I hope there is some way for CP4E to help. Unfortunately, improving computer science classes isn't likely to help much, because there aren't many women IN the classes. I'm in a CS program now, but I learned programming and became interested in computer science on my own. In fact, I received my first programming lessons in BASIC from a woman (my aunt). Does anyone have ideas about how to reach women *outside* school? Dave From kentsin@poboxes.com Thu May 4 00:10:52 2000 From: kentsin@poboxes.com (Sin Hang Kin) Date: Thu, 4 May 2000 07:10:52 +0800 Subject: [Edu-sig] Re: Edu-sig digest, Vol 1 #72 - 7 msgs References: <20000428160042.7AF541CDCB@dinsdale.python.org> Message-ID: <003101bfb554$dd84a000$770da8c0@bbs> > Guido van Rossum writes: > > Interestingly enough, I believe that programming itself, > > i.e. expressing the intended operation of a computer program, is best > > done through text. I guess that means that I believe that text > > (symbols) is more powerful than images; while a picture may be worth a > > thousand words, in my experience, most meaningful collections of a > > thousand words are hard to capture in a picture. (You can also see > > a program as a two-dimensional picture made up out of symbols.) I have to point out it is not true. TEXT is simpler and easier to serialize, but other forms are difficult but more powerful. I certainly not seeing computering programming in multimedia form. But consider makeing a comparision of textbook and multimedia education kit. The media kit is much powerful than text version. However, it is also much more difficult to make (right). In communication, the multimedia form is much much more powerful, comparision reading a book and going through a movie, you will find the movie version make the content into you and the book have more room for you to choose. Consider programming in text and programming in graphic or multimedia, I do believe that graphic and multimedia is more powerful. Only the problem is that currently, we do not have the knowledge to handle that well. The CP4E project should take more look into the learning process other than the computing process. Language is a tool of through, certainly PYTHON is a good, but if we would wanted to make it into the classroom especially as the first programming language, we should care more about the setting it would forced into the student's mind in the rest of his life. I have been put through some logic class, and that change my mind completely. I should also assume the computer programming experience will change your view of the would dramatically. However, if we could teach a child in early years to program, it will certainly change the habit of thinking for the rest of their life. I know that is beyond this project, but it need a deep through before implement it widely. Rgs, KentSin From siegel@eico.com Thu May 4 00:13:42 2000 From: siegel@eico.com (Arthur Siegel) Date: Wed, 3 May 2000 19:13:42 -0400 Subject: [Edu-sig] My Opinion Message-ID: >I hope there is some way for CP4E to help. Unfortunately, improving >computer science classes isn't likely to help much, because there aren't >many women IN the classes. True. Which in my mind supports an argument that an introduction to programming should not be considered a stand-alone subject, but integrated into other curriculum. Integration with math and science curricula seems extremely natural - but there is no good reason why it would need to end there. One needs to be able write in science class - why would doing text-processing, for example, in English class be so stange. Was it here the point was made about an analysis of a poet's work based on a search of his work for the re-use of certain words or phrases? In my mind, the importance of Python is exactly because it is a tool that can realisticly be creatively introduced into integrated curricula. Kirby's approach, for example, is a curricula with no clear dividing line between math and programming. Seems quite natural to me. To me, it almost takes effort to keep programming out of a math curricula at this stage. So I would expect that curriculas like Kirby's will find acceptance. And we go from there. From pdx4d@teleport.com Thu May 4 07:44:31 2000 From: pdx4d@teleport.com (Kirby Urner) Date: Wed, 03 May 2000 23:44:31 -0700 Subject: [Edu-sig] My Opinion In-Reply-To: <20000503195855.20982.qmail@web1605.mail.yahoo.com> Message-ID: <3.0.3.32.20000503234431.031aacf0@pop.teleport.com> >computers don't spark many girls' interests. Maybe it >is because girls (and women) do not want to risk being >called a computer geek. I believe that much of the >female gender cares a lot about their image . . . and >to be called a geek would be horrible. I think of Sandra Bullock in 'The Net', or the Seven-of-Nine character in 'Voyager' -- geeks?[1][2] It's not just computing, but across the board in engineering, that we have a shortage of women wanting to play with what have stereotypically been typecast as "boy toys" (many exceptions of course). I think the demographics are changing, and we have a lot more examples of women in technology fields every day. Am I right? If high tech goes more towards the civilian sector, providing more attractive alternatives to weaponry training, maybe the situation will continue to improve. Historically, the best, highest tech toys have tended to be intimately involved in killingry (vs. livingry). Violence and mayhem have usually been more guy-oriented, given they seem to be the more dispensible/replacable half of the species. Kirby [1] http://images.amazon.com/images/P/0800141768.01.LZZZZZZZ.gif [2] http://www.sherylfranklin.com/trekwomen_seven.html From pdx4d@teleport.com Thu May 4 07:44:49 2000 From: pdx4d@teleport.com (Kirby Urner) Date: Wed, 03 May 2000 23:44:49 -0700 Subject: [Edu-sig] new catenary web page improved In-Reply-To: <39108051.75E19720@harper.cc.il.us> References: Message-ID: <3.0.3.32.20000503234449.031e4b94@pop.teleport.com> I've improved my new catenary web page: http://www.inetarena.com/~pdx4d/ocn/catenary.html More explanation/information, with Python behind the scenes. Used some of the URLs posters here have generously shared. Thank you. Also tacked on the arc length part (calculus). Kirby From pdx4d@teleport.com Thu May 4 08:00:38 2000 From: pdx4d@teleport.com (Kirby Urner) Date: Thu, 04 May 2000 00:00:38 -0700 Subject: [Edu-sig] My Opinion In-Reply-To: Message-ID: <3.0.3.32.20000504000038.031a93e0@pop.teleport.com> >To me, it almost takes effort to keep programming out of a math >curricula at this stage. So I would expect that curriculas like >Kirby's will find acceptance. > >And we go from there. I hope you're right Arthur -- seems natural to me as well, to continue converging computer languages with math languages. Looks like Bryan Hann is also starting down this same road. But we don't need to interpret "math" too narrowly. Like all this stuff about regular expressions (I'm a newbie, looking forward to moving up the learning curve) -- very good to see these other symbol games being proposed, even though not customarily considered in 1900s math classes (but could be in the 2000s). It's the broader notion of "logical rule-following" or "following rules logically" that computer potentially bring into everyday experience. But even if we find a lot of agreement for converging numeracy and computer literacy, symbol games and logic, there's still the nitty gritty of implementation. It's going to be the same as ever: lots of trial and error, with occasional breakthroughs. Kirby PS: one influence I think computer languages are having in math world is on variable names -- they're getting longer. Like in my http://www.inetarena.com/~pdx4d/ocn/catenary.html -- in the calculus stuff at the bottom, I use variables named 'high' and 'low', even with the integral symbol. Pre-computer math books always used single letters, like a,b in these contexts. It's these kinds of subtle changes which synergy fomets, along with the more obvious and overt kinds of changes. From matthias@rice.edu Thu May 4 17:18:32 2000 From: matthias@rice.edu (Matthias Felleisen) Date: Thu, 4 May 2000 11:18:32 -0500 (CDT) Subject: [Edu-sig] nerds, geeks, women, image of cs In-Reply-To: <20000504160045.BEFA61CDD6@dinsdale.python.org> (edu-sig-request@python.org) References: <20000504160045.BEFA61CDD6@dinsdale.python.org> Message-ID: <200005041618.LAA22903@africa.cs.rice.edu> Kirby writes: I think of Sandra Bullock in 'The Net', or the Seven-of-Nine character in 'Voyager' -- geeks?[1][2] So who's going to write the script for a smash-hit TV series on why programming is cool, why people don't just sit around all day and stare at computer screens, etc? And who's going to pay for the product placement for Python or DrScheme before MS buys in with VisualBasic or Sun with Java :-) -- Matthias From pdx4d@teleport.com Fri May 5 19:40:10 2000 From: pdx4d@teleport.com (Kirby Urner) Date: Fri, 05 May 2000 11:40:10 -0700 Subject: [Edu-sig] Update from Urner In-Reply-To: <20000505045200.94361.qmail@hotmail.com> Message-ID: <3.0.3.32.20000505114010.0321cab0@pop.teleport.com> An Update from Urner May 5, 2000 I've been continuing my web-based curriculum writing projects, which these days focus on the interface between traditional text book approaches and the newer technologies.[1] For example, I've continued to explore the useful Python + Povray synergy, using Python to implement vector algebra in a way to drives a back-end ray tracer. Both of these packages are freeware, as is my source code showing how one might accomplish this union.[2] Part of my mission is to find ways to take advantage of the computer's ability to get us off the XY plane and into space. Polyhedral geometry is typically "back of the book" type stuff in high school these days, and kids rarely get to it. That's unfortunate, from my point of view, because a lot of curriculum innovations that most excite me (e.g. the concentric hiearchy + sphere packing synergy) don't really become relevant unless we're already in a spatial/volumetric context. On the AMTE listserv I talked about "buckyballs as my canary in a mine shaft" test as to whether a curriculum is "in synch" enough with the real world. Like, if K-12 math teachers aren't prepared to take advantage of buckyballs-in-the-news (e.g. on March 21 of this year, when NASA came out with its "buckyballs riding the dino-killer asteroid" hypothesis/evidence -- a potentially very hot topic from kid viewpoint (NASA! dinos!)) then we're clearly not yet up to par when it comes to polyhedral geometry in the classroom.[3] From my point of view, the hegemony of TI calculators in math ed is in some ways more a part of the problem than part of the solution. It's not that I have anything against calculators (although I always preferred HP's RPN calculators to the TIs), but I do consider them a somewhat artificial stopping point, a plataeu in the evolution of math education, not the final frontier. Calculators are useful because they're cheap and portable, but computers are omnipresent in the workplace and essential tools for just about all math-science professionals, practitioners of the other liberal arts as well. We need to use them more effectively in math ed, I have no doubt about that. Plus the story of computers, the timeline behind them, is a wonderful source of stories, presents opportunities for tying together artifacts and thought down through the ages -- kind of like Bucky does with maritime technology. Plus we have some female superstars to celebrate along this time line: e.g. Ada Byron (first computer programmer) and Grace Hopper (inventor of the compiler). On the Python edu-sig, we're looking for ways disspell whatever it is that dooms computers into seeming so exclusively like "guy things" (how do we lift the curse?). Given my "math teacher as storyteller model" (making the invisible visible, as Keith Devlin puts it), I can't see bleeping over the opportunity to make connections, to integrate content, which computers and computing devices represent (starting with the abacus and place value notation). I regard numeracy and computer literacy as convergent goals. As PyGeo's author Arthur Siegel puts it: "To me, it almost takes effort to keep programming out of a math curricula at this stage."[4] My "buckyballs = canary in a mine shaft" equation was originally greeted with some derision on AMTE (that's a highly charged list, given it's a front lines in the math wars). One California-based teacher in particular thought I was just talking about doing some pretty/fuzzy art projects, didn't realize I was into proving some hard facts about omnitri- angulated polyhedra, or making use of Euler's Law and 10 f^2 + 2 to connect chemistry to virology to micro/macro architecture and nanotech -- using the icosasphere bridge.[5] This teacher (also initially derisive towards my choice of Python as a good learning language) later emailed some more positive feedback, but I made the mistake of thinking he intended those remarks to be public, and I had to apologize publicly for responding to him via the AMTE listserv.[6] Like I said, this is a highly charged list (a math wars front line).[7] My curriculum writing is heavily subsidized by other jobs, which means I have to juggle my schedule quite a bit -- I've had to become pretty lean and mean (as a small business) in order to stay on task and above water. Like, just this week I had to put 14 hours into rescuing the Fire Department, City of Vancouver Washington, which was drowning in unpurged incident reports -- the T1 pipes were clogged, users at a standstill. Mission accomplished. Plus I'm rewriting a parser to translate cath lab data, obtained at the point of care, into PATS format (PATS = Patient Analysis & Tracking System, a MUMPS-based product that talks to Windows through a VBX). And the Oregon Food Bank is still on my case re some dino dBase I wrote for them years ago... (that's a complicated picture, with politics clouding the scenery). So, back to my jobs. Stay tuned for more curriculum writing as time/energy permits. Note: I think American Lit might be my next focus area, given my math-oriented approach is an uphill battle and not getting results quickly enough. Students will likely get exposure to the concentric hierarchy in a more timely fashion if we pick up that New England Transcendentalist thread (Emerson, Thoreau, Margaret Fuller...). Nevermind if it looks more like lit than like math -- we can always explain that philosophy is the interface between these two (has been for a long time). Kirby Urner Curriculum writer Oregon Curriculum Network http://www.inetarena.com/~pdx4d/ocn/ Notes: [1] Most recent curriclum writing is: "Computing with Curves" http://www.inetarena.com/~pdx4d/ocn/catenary.html [2] Vector algebra using Python + Povray http://www.inetarena.com/~pdx4d/ocn/numeracy1.html also http://www.inetarena.com/~pdx4d/ocn/oop.html for more background (including w/ other languages) [3] http://mathforum.com/epigone/amte/kingchedwo [4] http://www.python.org/pipermail/edu-sig/2000-May/000400.html [5] http://mathforum.com/epigone/k12.ed.math/stitulveh note erratum: http://mathforum.com/epigone/k12.ed.math/dwayclingquul [6] http://mathforum.com/epigone/amte/parsnyproi (see my Apr 14 reply to Greg Goodknight -- and this isn't my only screw-up regarding private/public relations) [7] http://mathforum.com/epigone/amte/gandphelskah http://mathforum.com/epigone/amte/chalskilwhee From ajs@ix.netcom.com Sun May 7 02:49:11 2000 From: ajs@ix.netcom.com (Arthur Siegel) Date: Sat, 6 May 2000 21:49:11 -0400 Subject: [Edu-sig] Update from Urner References: <3.0.3.32.20000505114010.0321cab0@pop.teleport.com> Message-ID: <000701bfb7c6$72821ac0$64e26dd1@oemcomputer> >Nevermind if it looks more like lit than like math -- we can > always explain that philosophy is the interface between >these two (has been for a long time). In fact a couple of references by you and others on the EDU-SIG list have gotten me into looking at Wittgenstein. Turns out projective geometry - at least by way of analogy to language issues - is central to his thought. Projective geometry is something I never encountered in school - found it by myself mostly in dusty old books. And become fascinated by it. PyGeo was built most fundamentally to help myself visualize projective geometry concepts. The PyGeo page starts by showing-off a five-point conic construction - a fundamental projective geometry concept. The duality of points and planes in three-space spun me about when I was getting at it. Can't try to explain the excitement I got from getting some grasp of that concept. The fundamentals of projective grow out of what were originally artistic investigations. Where, why and when was all this purged from the the curricula? Looks to me like it was core, standard stuff early in the century? From matthias@rice.edu Sun May 7 17:11:32 2000 From: matthias@rice.edu (Matthias Felleisen) Date: Sun, 7 May 2000 11:11:32 -0500 (CDT) Subject: [Edu-sig] Re: projective geometry through programming In-Reply-To: <20000507160035.270391CE3E@dinsdale.python.org> (edu-sig-request@python.org) References: <20000507160035.270391CE3E@dinsdale.python.org> Message-ID: <200005071611.LAA24278@africa.cs.rice.edu> The EdScheme (www.scheme.com) project has had a huge success with 3D and projective geometry. It's a high school project that started at a magnet school in the 1970s as a math project. In the 80s they included Logo. Starting in 1987 or so, they started teaching Scheme (based on The Little LISPer at the time) and have continually added things. At first they covered logic foc computing (up to Goedel's incompleteness theorem), then abstract algebra (and Galois), and eventually 3D geometry and things. They distribute their books to many other high schools and colleges. It might be worth studying what they have done, if you wish to pursue this systematically. A few years ago (1995) they presented their work at a workshop on programming education. They clearly got the most attention, and people were unbelievably impressed. -- Matthias P.S. My own project is complementary to theirs. I wish to reach *all* students not just magnet schools (or whatever they are called in other states) and I focus on program construction, not math-thru-programming. But that doesn't mean these people have something to offer in terms of hints and evidence and so on. From dscherer@cmu.edu Sun May 7 19:51:56 2000 From: dscherer@cmu.edu (David Scherer) Date: Sun, 7 May 2000 14:51:56 -0400 Subject: [Edu-sig] Re: projective geometry through programming In-Reply-To: <200005071611.LAA24278@africa.cs.rice.edu> Message-ID: > The EdScheme (www.scheme.com) project I think you mean www.schemers.com Dave From ajs@ix.netcom.com Sun May 7 21:00:44 2000 From: ajs@ix.netcom.com (Arthur Siegel) Date: Sun, 7 May 2000 16:00:44 -0400 Subject: [Edu-sig] Re: projective geometry through programming References: Message-ID: <001001bfb85e$f04a48e0$f0e06dd1@oemcomputer> > > The EdScheme (www.scheme.com) project > >> I think you mean www.schemers.com > Thanks much for the cite. It is of course of great interest to me. Checked it out and have downloaded some of what they have developed to teach programming/math using Scheme and 3D. The folks behind Schemers have I see set up there own institute for supplementary K-12 education, with four locations in Florida - IMACS (Institute for Mathematics and Computer Science). It is also interesting to see how plugged in they seem to be to a general community using Scheme in education - which is more extensive and long-standing than I had heretofar understood. The Schemers themselves are clearly targeting gifted children, rather than 'everyone'. Which is another contoversary maybe EDU-SIG needs to face. We've addressed the CP4M issue, at least by discussion. We've discussed the issue of unequal access to the tools. No solutions, but we know the issue exists. Has there been any discussion of another 'everyone' issue - I guess what might be referred to as the tracking issue. Can one programming curricula fit all? From ajs@ix.netcom.com Mon May 8 12:18:19 2000 From: ajs@ix.netcom.com (Arthur Siegel) Date: Mon, 8 May 2000 07:18:19 -0400 Subject: [Edu-sig] Things to come References: <20000507160035.270391CE3E@dinsdale.python.org> <200005071611.LAA24278@africa.cs.rice.edu> Message-ID: <001101bfb8df$1e0f4c00$63e06dd1@oemcomputer> FWIW - Watching golf on TV yesterday - the Compaq Open or some such from New Orleans. At commercial - we are in a classroom. Looks like maybe junior high. Kids are presenting something in front of the class, hard to say exactly what . Everybody is involved and energetic. "Disney Learning" is the voice over. Not much else said. I am not dogmatically anti-corporate. Then why do I consider that a very scary 15 seconds? From matthias@rice.edu Mon May 8 17:17:27 2000 From: matthias@rice.edu (Matthias Felleisen) Date: Mon, 8 May 2000 11:17:27 -0500 (CDT) Subject: [Edu-sig] Re: In-Reply-To: <20000508160033.E48311CDEF@dinsdale.python.org> (edu-sig-request@python.org) References: <20000508160033.E48311CDEF@dinsdale.python.org> Message-ID: <200005081617.LAA25079@africa.cs.rice.edu> Thanks for the correction about www.schemers.com. It is also interesting to see how plugged in they seem to be to a general community using Scheme in education - which is more extensive and long-standing than I had heretofar understood. Two small words of caution: 1. The list of "Scheme in Education" that www.schemers.com publishes is a monotonic list. They don't take off courses when they switch to Java. The good news is that we're picking up others, too. 2. Most of the schools on their list of secondary schools are actually DrScheme schools. No big deal, but don't just add our list of schools to theirs. Still, it is true that Scheme is plugged into about - 70 to 80 domestic universities - 60 to 80 domestic high schools - 30 to 50 European universities, mostly France and Germany - the national 'class preparatoire' curriculum in France - a dozen or so high schools in Germany -- Matthias From siegel@eico.com Tue May 9 15:57:10 2000 From: siegel@eico.com (Arthur Siegel) Date: Tue, 9 May 2000 10:57:10 -0400 Subject: [Edu-sig] Being relentless In-Reply-To: <4491C7789374D076852568BB00214550.00214592852568BB@eico.com> Message-ID: I had written - > The duality of points and planes in three-space spun > me about when I was getting at it. Can't try to explain > the excitement I got from getting some grasp of that concept. A private response - I fully agree with your feelings. If there is something such as the Mytery of God (tm), then duality in projective geometry is one of its best portraits. One might also say that duality is math's perspective on the war of the big-endians and little-endians in Gulliver's Travels. The relevenace to EDU-SIG: Mathias writes - >The EdScheme (www.scheme.com) project has had a huge success with 3D and >projective geometry. But EdScheme is Scheme, not Python. With full apologies to the the Scheme folks, who not only are doing great things in their own right, but contributing here as well - I still believe that Python represents a major step forward for this kind of effort. And we see that math, but as synthetic geometry, is very much a liberal art, easy to make non-geekish - and relevant to art, history , literature, philosophy, science, etc. So I've learned a lot by participating here. And have done some listening as well as a lot of talking. And yet am more convinced than ever that PyGeo, or a variant, or a successor - in all immodesty - should have tremendous significance here. And I again express some disappointment that in all the discussion here, there is not one indication that anyone participating has actually opened it up and looked at it. Maybe they have, and are being kind by refraining from comment. So I'll phrase it as a question. Short of quitting my day job and devoting myself full-time to something that I have no interest in benefitting from financially - how might I proceed to get PyGeo some attention, attract some collaboration, get it out there, explored, improved and used? From gherman@darwin.in-berlin.de Tue May 9 16:00:55 2000 From: gherman@darwin.in-berlin.de (Dinu C. Gherman) Date: Tue, 09 May 2000 17:00:55 +0200 Subject: [Edu-sig] testing colorized code sharing References: <3.0.3.32.20000502162505.03141d30@pop.teleport.com> Message-ID: <39182827.D04163C2@darwin.in-berlin.de> Kirby Urner wrote: > > I'm testing the ability of edu-sig list server to handle > colorized Python code (on my screen, code fragments below > are in color): > > [...] > > This'd be great for cutting and pasting to web pages or > even email clients (especially if this text works -- > wonder how it'll show up in the archives). Adds to > readability and would probably spur more folks to > quote Python directly on their web pages (keeping the > untagged source in a separate download file, for those > wanting to actually execute the stuff). Sorry for joining a little late, but I had first to finish a release of a little module that will do what you descri- be, but create PDF files instead of HTML ones! I wrote this mostly for providing embellished and (inden- tation-)fool-proof versions of Python source code for ma- gazine publishers, but quickly found out it would be use- ful for teaching/presenting/reviewing/printing Python code, too. A nice new feature in 0.5 is the ability of browsing more intelligently through the code using PDF bookmarks that will point you directly to all class/method/function defi- nitions, at least in Acrobat Reader. You'll find py2pdf 0.5 (with lots of examples) either in the eGroups.com vault of the ReportLab users group in the same place (you'll need to become a group member first) or in my temporary home for stuff that has been lost after the Starship disaster: http://www.egroups.com/files/reportlab-users/dinu http://me.in-berlin.de:8080/members/DinuGherman Needless to say, I appreciate all feedback, especially from this SIG as I hope py2pdf will be of some particular value to people lurking around here... Regards, Dinu -- Dinu C. Gherman ................................................................ "The only possible values [for quality] are 'excellent' and 'in- sanely excellent', depending on whether lives are at stake or not. Otherwise you don't enjoy your work, you don't work well, and the project goes down the drain." (Kent Beck, "Extreme Programming Explained") From gherman@darwin.in-berlin.de Tue May 9 17:04:03 2000 From: gherman@darwin.in-berlin.de (Dinu C. Gherman) Date: Tue, 09 May 2000 18:04:03 +0200 Subject: [Edu-sig] Things to come References: <20000507160035.270391CE3E@dinsdale.python.org> <200005071611.LAA24278@africa.cs.rice.edu> <001101bfb8df$1e0f4c00$63e06dd1@oemcomputer> Message-ID: <391836F3.B8343036@darwin.in-berlin.de> Arthur Siegel wrote: > > "Disney Learning" is the voice over. Not much else said. > I am not dogmatically anti-corporate. > Then why do I consider that a very scary 15 seconds? Maybe because you already heard about "Disney Living" before? Here in Europe I've once seen a TV report about a supposedly "ideal" village called "Celebration" in Florida, U.S. (see e.g. http://celebration.nm1.net) where people move in voluntarily to let a cartoon corporation decide how they should spend their daily lives. Now, how scary is that?! Although I do think that common sense is more common in some places than in others, I also believe that all this is more of a logical consequence of corporations using their wealth for missions they don't have a mandate for. Regards, Dinu -- Dinu C. Gherman ................................................................ "The only possible values [for quality] are 'excellent' and 'in- sanely excellent', depending on whether lives are at stake or not. Otherwise you don't enjoy your work, you don't work well, and the project goes down the drain." (Kent Beck, "Extreme Programming Explained") From pdx4d@teleport.com Tue May 9 20:30:10 2000 From: pdx4d@teleport.com (Kirby Urner) Date: Tue, 09 May 2000 12:30:10 -0700 Subject: [Edu-sig] more chatter re OOP + PolyGeom In-Reply-To: <3.0.3.32.20000508153520.031c8508@pop.teleport.com> References: <3.0.3.32.20000508120933.032ea3cc@pop.teleport.com> <3.0.3.32.20000507170015.03199220@pop.teleport.com> Message-ID: <3.0.3.32.20000509123010.0332c88c@pop.teleport.com> At 03:35 PM 05/08/2000 -0700, I wrote: >The power of object oriented programming seems especially >clear to me in that I ended up making no changes to my >Quaternion class, which contains stuff like > <> Sigh. Not unusually, just when I thought I had it all nailed down, I found a bug in my coords.py module, which made cross product asymmetric depending on whether you were doing Vector.cross(Qvector) or Qvector.cross(Vector). Note: Qvectors are quadrays, defined as 4-tuples vis-a-vis the 4 basis vectors of a "home base" tetrahedron defined by intertangent equi-radius spheres (tetrahedron edges = 1, tetrahedron volume = 1). The problem showed up when I got ambitious and decided to incorporate my quaternions-based rotation method within my generic shapes.Shape class -- will allow you to rotate any shape subclass around X,Y or Z axis by theta (degrees). Well, after so incorporating, I discovered my tetrahedra were getting all distorted by the rotation method, which led to backtracking and bug-fixing. So now there's a new cross product method in coords.Vector that's more explicitly XYZ-based (to make sure the cross-breeding of hybrid vector types doesn't create any mutants). Now I'm feeling confidant again, and have uploaded the new code, along with a substantial rewrite of http://www.inetarena.com/~pdx4d/ocn/numeracy1.html -- which is about my vector algebra implementation, including the backend into POV-ray (Persistance of Vision Ray Tracer)[1]. I also added a Cube shape, and split off some of the methods used to study the Jitterbug relationship in a class by itself, allowing only _some_ shapes to inherit them -- a multiple inheritance situation, which Python allows. I've been inviting a pre-college audience to check out this material, and perhaps get into the nitty gritty at some point.[2] I think this implementation gives a lot of insight into object-oriented design i.e. shows the power of inheritance, late binding, method overriding and so on. This has been my goal all along: to use spatial geometry, with the attractive graphics this entails, as a hook into the mysteries of OOP (object oriented programming), with polyhedra as paradigm objects.[3] Also, as it so happens that I'm a Fuller Schooler, my spatial geometry just takes all that concentric hierarchy + sphere packing and jitterbug stuff for granted, with quadrays fitting rather seamlessly into this context.[4] Kirby [1] http://www.povray.org/ [2] http://mathforum.com/epigone/geometry-pre-college/skendsnehgly [3] http://www.inetarena.com/~pdx4d/ocn/trends2000.html [4] For more on the concentric hierarchy: http://www.teleport.com/~pdx4d/volumes.html http://www.teleport.com/~pdx4d/volumes2.html From pdx4d@teleport.com Tue May 9 23:55:00 2000 From: pdx4d@teleport.com (Kirby Urner) Date: Tue, 09 May 2000 15:55:00 -0700 Subject: [Edu-sig] Archived letter to community college prof In-Reply-To: <3.0.3.32.20000509123010.0332c88c@pop.teleport.com> References: <3.0.3.32.20000508153520.031c8508@pop.teleport.com> <3.0.3.32.20000508120933.032ea3cc@pop.teleport.com> <3.0.3.32.20000507170015.03199220@pop.teleport.com> Message-ID: <3.0.3.32.20000509155500.03355170@pop.teleport.com> Here's an example of a letter sharing about an aspect of CP4E: math through programming. Certainly this isn't the only angle of interest to this edu-sig, but I'm posting this here as representative of what I put our re the "Urner approach" to numeracy + computer literacy i.e. the goals I'm pursuing in my own curriculum writing. The following was to an Associate Professor of Mathematics at a community college, regarding a paper she'd helped write, assessing the impact of technology on pedagogy. Her paper includes the following passages: New models of teaching will capitalize on dynamic interactivity to build connections between symbolic, graphic, tabular, and written representations of math using web browsers such as Live Math (See Link 9 and (get plug-in to See Link 10.), Scientific Notebook (See Link 11), and JAVA scripted models on the web (See Link 12 and See Link 13). In these students can animate graphs and models as well as manipulate computational algebra systems to explore mathematical patterns. The classroom of the future will integrate this software into every level even developmental courses. (Link14 to description of a math classroom of the future).[1] Link14 points to a posting of mine to a listserv archives: http://archives.math.utk.edu/hypermail/mathedcc/nov99/0082.html Unfortunately, this is one of those posts with a lot of =20s at the ends of lines. For a related email, sent to another community college math professor last April, see the copy archived at: http://www.egroups.com/message/synergeo/555 You'll find a high degree of consistency between the above letter and the one copied below, i.e. I'm in the habit of making a lot of the same points over and over (so what else is new?). Kirby [1] http://www.tc.cc.va.us/planning/strategi/whitepap/math.PDF ====================== Hi Marcia -- I've been reading your paper and consider it a valuable resource, as it focuses on a real, and some might say typical, community college, with all its plusses and minuses. I'm especially interested in the math section. I think one respect in which my curriculum writing diverges from the mainstream is I have this "math through programming" ideal, wherein students learn math at the same time they're learning a computer language, with the former providing most of the raw material (e.g. series, prime numbers, functions), and the latter providing a structured language that runs parallel to traditional notations, but also adds its own layer of intelligence (i.e. object orientation, and all that entails). For example, students of my approach would appreciate that polyhedra might be developed in a "class hierarchy", with generic code for rotation and translation in the "root class", with specific shapes providing their own coordinates, and in some cases "overriding" parent methods. Internally to polyhedra, we make use of vectors, and here again, there's a class hierarchy, with some kinds of vectors defined as subclasses of others.[1] My underlying assumption driving my approach is that computer languages are affecting math concepts in many subtle ways. It's not a one-way street with math being "pure theory" and computer science being "applied". On the contrary, both disciplines work to inform the other, and the synergies become most pronounced when we allow them to interpenetrate.[2] Thanks again for making a link to my posting to the Mathedcc archives. Kirby [1] example discussion on another list: http://www.python.org/pipermail/edu-sig/2000-May/000415.html [2] This is the thesis I develop in more detail at http://www.inetarena.com/~pdx4d/ocn/trends2000.html ====================== From siegel@eico.com Wed May 10 15:12:41 2000 From: siegel@eico.com (Arthur Siegel) Date: Wed, 10 May 2000 10:12:41 -0400 Subject: [Edu-sig] Guido's article In-Reply-To: <4491C7789374D076852568BB00214550.00214592852568BB@eico.com> Message-ID: Read Guido's article for Linux Journal. The strangest thing to me about it is that it is not in the least bit about Python. Obviously the article is in a Python supplement, so I don't want to stretch the point. But I do believe that with Guido's focus on interface, we are losing our best spokesman for the potential importance of Python in education - interface notwithstanding. From pdx4d@teleport.com Wed May 10 16:32:09 2000 From: pdx4d@teleport.com (Kirby Urner) Date: Wed, 10 May 2000 08:32:09 -0700 Subject: [Edu-sig] Re: [synergeo] more chatter re OOP + PolyGeom In-Reply-To: <3.0.3.32.20000509123010.0332c88c@pop.teleport.com> References: <3.0.3.32.20000508153520.031c8508@pop.teleport.com> <3.0.3.32.20000508120933.032ea3cc@pop.teleport.com> <3.0.3.32.20000507170015.03199220@pop.teleport.com> Message-ID: <3.0.3.32.20000510083209.031bed3c@pop.teleport.com> >Although I don't know the programs you are discussing I do >love geometry and I will look into them further. Your example of using Logo and geoboards to teach geometry sounds closest to what I'm doing -- using a different language, Python, free and cross-platform, and rapidly gaining in popularity.[1] One of my goals is to explore the mysteries of "object oriented programming" (what's that all about?) even as we study vectors and polyhedra (as paradigm "objects" -- in both the OOP _and_ conventional senses).[2] In "math through programming", we don't try to teach how to write full-blown applications, or how to write robust code for the general public. It's more like moving to the next step beyond a calculator, where you're freed from many constraints -- including freed from the XY plane (we have full XYZ rendering here). Plus you can study algorithms that are alpha-based, not just numeric, but still logical/rigorous enough to be interesting to mathematics. I think the object oriented paradigm brings interesting perspective to many mathematical concepts, so in introducing it to math ed, I'm not so much straying far afield as I am cross-pollinating to develop promising new strains of computer-savvy math curricula. Python also helps formalize the notion of a "namespace", which is basically a dictionary of key terms. This is useful in math education because we often see the same key terms used in different contexts (e.g. "dimension"). The idea of "namespace" (developed in a hands-on environment) helps reinforce the idea of "context". Speaking of geoboards, and freedom from the XY plane, my curriculum gets into sphere packing much earlier than is typical (K-12 is currently devoid of sphere packing). My polyhedra get "tuned in" within this sphere packing matrix or lattice (ccp).[3] For example, four intertangent ccp spheres define a tetrahedron. This is my geoboard, in other words, and you can slice through it to get both triangular and square planar packings. Which gets me back to Logo: I introduce "random walks in the matrix" using the idea of a "sea turtle" (swims omnidirectionally). A turtle constrained to move from sphere center to sphere center in the ccp has 12 directions to choose from at each turn. Four such turtles, all taking off from the origin and randomly swimming [for] awhile, will end up defining the corners of some random tetrahedron with ccp vertices. Turns out _all_ such tetrahedra have a whole number volume, _if_ we count the original ccp tetrahedron (defined by four intertangent matrix spheres) as "unit volume".[4] I would have my students note that "turtle" and "matrix" both have other uses. Their meaning here is relative to a "namespace" (again, thanks to Guido and his "snake language" for bringing "namespace" and "dictionary" into such close proximity -- very useful in math ed as well).[5] Kirby [1] http://noframes.linuxjournal.com/lj-issues/issue73/lstoc.html [2] http://www.inetarena.com/~pdx4d/ocn/cp4e.html [3] http://www.chem.ox.ac.uk/icl/heyes/structure_of_solids/Lecture1/Lec1.html [4] http://www.inetarena.com/~pdx4d/ocn/numeracy4.html [5] Python is actually named for "Monty Python" -- but the O'Reilley book has a snake on the cover, plus in Windows we get a little snake icon for all the .py files. So there's plenty of room to develop snake aesthetics in tandem with all the other silliness. From urban.anjar@ng.hik.se Thu May 11 06:59:15 2000 From: urban.anjar@ng.hik.se (Urban Anjar) Date: Thu, 11 May 2000 07:59:15 +0200 Subject: [Edu-sig] Guido's article References: Message-ID: <391A4C33.F465FA0F@ng.hik.se> Hi! I´m not shure I get your point there. Is adding a GUI to Python a problem? Is the problen technical, political, emotional or what? I think Guidos article was great. (I´m sorry I´m new on this list and maybe I should shut up ´n lurk for some weeks first, but I couldn´t...) Urban Anjar Arthur Siegel wrote: > > Read Guido's article for Linux Journal. (...) > But I do believe that with Guido's focus on interface, we are losing our > best spokesman > for the potential importance of Python in education - interface > notwithstanding. -- http://www.skollinux.net From siegel@eico.com Thu May 11 14:52:12 2000 From: siegel@eico.com (Arthur Siegel) Date: Thu, 11 May 2000 09:52:12 -0400 Subject: [Edu-sig] RE: Guido's article Message-ID: >Is adding a GUI to Python a problem? Absolutely none. A raving fan of IDLE, in fact - especially in the context of CP4E. We're talking 100% open source Python code. The medium is now the message. From my perspective, that's better than good. That's great, key. Certain customization options will be disabled in my class, true. My class will reflect my taste, of course. And, of course, behind IDLE we will be running the world's first fully executable textbook. Perhaps I'm a little over-anxious in trying to get a peek at it. ART From flexsz@hotmail.com Fri May 12 06:20:59 2000 From: flexsz@hotmail.com (philip szeto) Date: Thu, 11 May 2000 22:20:59 PDT Subject: [Edu-sig] Re: [synergeo] Update from Urner Message-ID: <20000512052059.87833.qmail@hotmail.com>

This being my favorite url. Here's one for
the group. Everybody probably already seen
it, any, so here: IT'S SIMPLY _POVA RAY DEE_

http://www.insite.com.br/rodrigo/bucky/geodome.html/

---------------------------------------------------------------


Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
From siegel@eico.com Fri May 12 17:24:29 2000 From: siegel@eico.com (Arthur Siegel) Date: Fri, 12 May 2000 12:24:29 -0400 Subject: [Edu-sig] Things to come In-Reply-To: <8CE7FB278EDAC243852568CF005DCBC8.005DCBDE852568CF@eico.com> Message-ID: FWIW - When I had posted up: >"Disney Learning" is the voice over. Not much else said. >I am not dogmatically anti-corporate. >Then why do I consider that a very scary 15 seconds? I had no idea of the Squeak/Disney connection - in fact had no idea of Squeak - which I just came upon in a round-about away via Stephens site to: http://segfault.org/story.phtml?id=391ae457-08fa7b40 Looked quickly at the Squeak world. It seems in fact to be taken quite seriously in academic and educational circles. Am I in Chinatown, or what? ART From pdx4d@teleport.com Fri May 12 17:51:31 2000 From: pdx4d@teleport.com (Kirby Urner) Date: Fri, 12 May 2000 09:51:31 -0700 Subject: [Edu-sig] Things to come In-Reply-To: References: <8CE7FB278EDAC243852568CF005DCBC8.005DCBDE852568CF@eico.com> Message-ID: <3.0.3.32.20000512095131.031b59a8@pop.teleport.com> >Am I in Chinatown, or what? > >ART Squeak is big, no question, although I thought CinCom's SmallTalk more professional (I guess that's not the point). A lot of the Squeak stuff is hype/vaporware at this time, but that's not necessarily bad. You gotta dream and those in the prophetic arts tend to bank on theirs becoming self-fulfilling. I'm not advocating that any one language try to establish itself is "the" one and only. Evolutionary patterns would suggest such approaches waste energy, at the expense of lost ground against competitors (while you're busy establishing hegemony, the less vocal are quickly undermining your claims behind the scenes). Python is a wonderful language and will provide a real boost to those who invest in it -- because it's good "mind food". But that doesn't for a moment mean that other languages are any less advantaging, to those who commit to their study. For me, it comes back to paradigms, and whether you language has a clean and clear one. I think Python does, in its namespace/dictionary approach to OOP. Scheme and SmallTalk do as well -- the thinking behind them is of a high order (plus I've always been a fan of APL). Kirby From siegel@eico.com Fri May 12 19:09:37 2000 From: siegel@eico.com (Arthur Siegel) Date: Fri, 12 May 2000 14:09:37 -0400 Subject: [Edu-sig] Things to come Message-ID: > Squeak is big, no question, although I thought CinCom's > SmallTalk more professional (I guess that's not the point). > So can we say that curricula should lead - not language or interface? If one wants one can say that my interest in a Python based curricula is an irrational decision. Certainly I have done no real study of of the benefits of Python over alternatives - Scheme, Squeak, etc. Python worked for me, I believe it will work for others. That's what I'm going on - and for myself that's good enough. But my frustration on this list. I don't understand the point of the greatest teaching language and interface on the planet, without a curriculum. Other than cottage industry efforts like Kirby's and mine - how does that happen, short of going hat-in-hand to Disney. If Disney just wanted to quietly hand out endowments to the worthy, great. But their advertisement on Sunday afternoon said nothing (other than 'Disney' and 'Learning') and would have funded maybe a 100 computer labs. More polemic. 100 inner-city computer labs. To me it would be tremendously naive to believe that the extent of their interest in education in America is as a concerned corporate citizen, even if they might believe it themselves - today. This analysis is not coming from a left or anarchist view-point. But I am re-thinking my pro-voucher position. From pdx4d@teleport.com Fri May 12 19:51:24 2000 From: pdx4d@teleport.com (Kirby Urner) Date: Fri, 12 May 2000 11:51:24 -0700 Subject: [Edu-sig] Things to come In-Reply-To: Message-ID: <3.0.3.32.20000512115124.03263120@pop.teleport.com> >Other than cottage industry efforts like Kirby's and mine - how does >that happen, short of going hat-in-hand to Disney. How about going hat-in-hand to DARPA? Worked for Guido. :-D Kirby From guido@python.org Fri May 12 19:50:24 2000 From: guido@python.org (Guido van Rossum) Date: Fri, 12 May 2000 14:50:24 -0400 Subject: [Edu-sig] Things to come In-Reply-To: Your message of "Fri, 12 May 2000 11:51:24 PDT." <3.0.3.32.20000512115124.03263120@pop.teleport.com> References: <3.0.3.32.20000512115124.03263120@pop.teleport.com> Message-ID: <200005121850.OAA08086@eric.cnri.reston.va.us> > >Other than cottage industry efforts like Kirby's and mine - how does > >that happen, short of going hat-in-hand to Disney. > > How about going hat-in-hand to DARPA? Worked for Guido. :-D Actually, not as well as I'd hoped. :-) --Guido van Rossum (home page: http://www.python.org/~guido/) From pdx4d@teleport.com Fri May 12 20:00:07 2000 From: pdx4d@teleport.com (Kirby Urner) Date: Fri, 12 May 2000 12:00:07 -0700 Subject: [Edu-sig] Things to come In-Reply-To: <200005121850.OAA08086@eric.cnri.reston.va.us> References: <3.0.3.32.20000512115124.03263120@pop.teleport.com> Message-ID: <3.0.3.32.20000512120007.03261b98@pop.teleport.com> At 02:50 PM 05/12/2000 -0400, Guido van Rossum wrote: >> >Other than cottage industry efforts like Kirby's and mine - how does >> >that happen, short of going hat-in-hand to Disney. >> >> How about going hat-in-hand to DARPA? Worked for Guido. :-D > >Actually, not as well as I'd hoped. :-) > Sigh. Would-be funders always want a song and dance -- so many hoops to jump through. Maybe if you polished your Woody-Wood- Pecker imitation? (http://www.python.org/~guido/guido.au) Kirby From jelkner@yorktown.arlington.k12.va.us Fri May 12 19:05:36 2000 From: jelkner@yorktown.arlington.k12.va.us (Jeffrey Elkner) Date: Fri, 12 May 2000 14:05:36 -0400 Subject: [Edu-sig] Things to come In-Reply-To: References: Message-ID: <00051214382002.03123@tpaine.yorktown.arlington.k12.va.us> On Fri, 12 May 2000, Arthur Siegel wrote: > So can we say that curricula should lead - not language or interface? I'm not exactly sure what this means (lead what?) but since it mentions curricula and I'm a teacher, I felt compelled to reply ;-) Actually, I think Python the language is fully suitable as it is as a language for teaching programming. That doesn't mean it shouldn't be made better, only that it doesn't need to be to be used as a teaching language. The interface needs more work, but is still far and away better than its alternatives (C++, Java, VB, etc.) Curricula, on the other hand are still sorely lacking, and Python will not be adapted widely in schools without it. The question then is what to do to overcome this lack. I am really interested to see how this develops. One of the things most attractive to me is the opportunity to be part of a development effort that has the possibility of being collaborative in nature and focused on the legitament needs of learners rather than profit driven and characterized by salesmanship and hype. I want it to be successful and I am willing to put a lot of my own time into it for that reason. I've already met and am working with others who feel the same way. If anyone has any time on their hands and wants to help out, it would be a big help to me if we could get the livewires course materials put into some web ready format. These excellent middle school level materials can be found at: http://yhslug.tux.org/obp/livewires I have two students working on converting them into HTML. They are volunteers and the work is proceeding slower than I would like. I will be learning to use DocBook this summer, and will try to write Python tools to convert them into DocBook, but I don't know yet how that will go. Thanks in advance for all the help that I know is forthcoming ;-) jeff elkner yorktown high school arlington, va From smorris@nexen.com Fri May 12 20:46:00 2000 From: smorris@nexen.com (Steve Morris) Date: Fri, 12 May 2000 15:46:00 -0400 (EDT) Subject: [Edu-sig] Things to come In-Reply-To: <00051214382002.03123@tpaine.yorktown.arlington.k12.va.us> References: <00051214382002.03123@tpaine.yorktown.arlington.k12.va.us> Message-ID: <200005121946.PAA19288@brocade.nexen.com> Jeffrey Elkner writes: > If anyone has any time on their hands and wants to help out, it would be a big > help to me if we could get the livewires course materials put into some web > ready format. Does anyone else wish that people would stop publishing things in .pdf format. It is the second most user unfriendly way of distributing information electronically, second only to bitmap images. The content is no longer available in any form except graphically. You can't even do a text search to find relevent sections. pdf is a compressed and scalable way of distributing graphics that might incidentally contain fonts. Actually there are tools that attempt to strip text out of pdf files but the results are indifferent for any but the simplest files. It is usually slightly better than OCR'ing scanned images. From siegel@eico.com Fri May 12 20:56:20 2000 From: siegel@eico.com (Arthur Siegel) Date: Fri, 12 May 2000 15:56:20 -0400 Subject: [Edu-sig] Things to come In-Reply-To: Message-ID: >Curricula, on the other hand are still sorely lacking, and Python will >not be adapted widely in schools without it. That is all and exactly what I was trying to say. >One of the things most attractive to me is the opportunity to be part of a >development effort that has the possibility of being collaborative in >nature and focused on the legitament needs of learners rather than profit driven and >characterized by salesmanship and hype. Amen. >If anyone has any time on their hands and wants to help out, it would be a >big help to me if we could get the livewires course materials put into some web >ready format. I'll looked at it to assess if I can be of help - or put my son on it - if you promise to open PyGeo. You don't have to like it. You don't have to contribute to it. I want to know you opened it. Tell me you already have - and that works too. Fair enough? From arta@x-stream.nl Fri May 12 21:13:13 2000 From: arta@x-stream.nl (A[r]TA) Date: Fri, 12 May 2000 22:13:13 +0200 Subject: [Edu-sig] ports Message-ID: <000e01bfbc4e$873176a0$a9c48bd4@vincent> Hi, Is there a way in Python to read and write ports?? So port 80 for HTTP en PORT 21 for FTP and more... A[r]TA We shall not cease from exploration, and the end of all our exploring will be to arrive where we started and know the place for the first time. - T. S. Eliot From smorris@nexen.com Fri May 12 21:18:08 2000 From: smorris@nexen.com (Steve Morris) Date: Fri, 12 May 2000 16:18:08 -0400 (EDT) Subject: [Edu-sig] ports In-Reply-To: <000e01bfbc4e$873176a0$a9c48bd4@vincent> References: <000e01bfbc4e$873176a0$a9c48bd4@vincent> Message-ID: <200005122018.QAA19372@brocade.nexen.com> A[r]TA writes: > Hi, > > Is there a way in Python to read and write ports?? > So port 80 for HTTP en PORT 21 for FTP and more... What you are locking for are sockets. You open a socket on a port but the software talks to a socket. Here is a pointer to the documentation: http://www.python.org/doc/howto/sockets/sockets.html From arta@x-stream.nl Fri May 12 21:23:14 2000 From: arta@x-stream.nl (A[r]TA) Date: Fri, 12 May 2000 22:23:14 +0200 Subject: [Edu-sig] ports References: <000e01bfbc4e$873176a0$a9c48bd4@vincent> <200005122018.QAA19372@brocade.nexen.com> Message-ID: <002801bfbc4f$e6cd0f60$a9c48bd4@vincent> > > > A[r]TA writes: > > Hi, > > > > Is there a way in Python to read and write ports?? > > So port 80 for HTTP en PORT 21 for FTP and more... > > What you are locking for are sockets. You open a socket on a port but > the software talks to a socket. > > Here is a pointer to the documentation: > > http://www.python.org/doc/howto/sockets/sockets.html > No, not with sockets. Like firewalls do... They haven't got an IP-adress but they simply check if someone try's to scan or log on to a port. How do I do that?? A[r]TA From pdx4d@teleport.com Fri May 12 23:28:19 2000 From: pdx4d@teleport.com (Kirby Urner) Date: Fri, 12 May 2000 15:28:19 -0700 Subject: [Edu-sig] Halley's Method for nth root of P In-Reply-To: References: <8CE7FB278EDAC243852568CF005DCBC8.005DCBDE852568CF@eico.com> Message-ID: <3.0.3.32.20000512152819.03348fa4@pop.teleport.com> Here's an interesting function that returns the nth root of P. Usage: >>> halley(2,2) # 2nd root of 2 1.41421356237 >>> 2.0**0.5 # check 1.41421356237 >>> halley(7,3) # 3rd root of 7 1.91293118277 >>> 7.0**(1./3.) # check 1.91293118277 >>> halley(1000,4) # 4th root of 1000 (duh) 10.0 Maybe the math module is even using something similar (or C internally)? Kirby # thanks to Domingo G=F3mez Mor=EDn # http://www.etheron.net/usuarios/dgomez/Roots.htm def halley(P,n,d=3D10,x=3D1.0): # P -- find nth root of this number # n -- whole number root # d -- level of depth for recursion (default 10) # x -- initial value of x (default 1) if d>1: =09 newx =3D ((n+1.0)*P*x + (n-1)*(x**(n+1)))/((n-1)*P + (n+1)*x**n) return halley(P,n,d-1,newx) =20 else: return x Return-Path: Delivered-To: edu-sig@python.org Received: from mail.eico.com (unknown [216.216.41.149]) by dinsdale.python.org (Postfix) with SMTP id A4C461CD1F for ; Fri, 12 May 2000 19:12:00 -0400 (EDT) Received: from siegel ([209.109.224.69]) by mail.eico.com (Lotus SMTP MTA v4.6.4 (830.2 3-23-1999)) with SMTP id 852568DD.007E3246; Fri, 12 May 2000 18:58:24 -0400 From: "Arthur Siegel" To: "Jeffrey Elkner" , "PythonEd" Date: Fri, 12 May 2000 19:07:54 -0400 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) Importance: Normal In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 Subject: [Edu-sig] Unsubscribe Sender: edu-sig-admin@python.org Errors-To: edu-sig-admin@python.org X-BeenThere: edu-sig@python.org X-Mailman-Version: 2.0beta3 Precedence: bulk List-Id: Python in education I was going to wait until Monday, but now prefer to face the week-end with a clearer head. I had written - >>Fair enough? I certainly thought so. But I will take silence as a no in this case. So I guess I've seen this through to the end. I am proud of at least that. Guido: Please remove the EDU-SIG link to PyGeo. It's busted anyway David Ascher: Thanks for listening. To Starship: Please consider my February something (my e-mail archives don't go back far enough to pinpoint) request for a crew account, delivered according to instructions, in good order with receipt acknowledged - withdrawn. To Stephen: I'll settle for the consolation prize. $300, I believe. You have the address. To Kirby: Love to hear Urner on the Transcendentalists. Will be checking your site. From Econoprof@aol.com Sat May 13 04:49:34 2000 From: Econoprof@aol.com (Econoprof@aol.com) Date: Fri, 12 May 2000 23:49:34 EDT Subject: [Edu-sig] Speaking of summer hols...and the curriculum conundrum Message-ID: <4c.5676421.264e2ace@aol.com> Does anyone know of any camps for kids (in the US this summer) which will be teaching python to ten year olds? I'm discouraged by the price of something called "American Computer Experience" that is advertising programs at Universities all over the country; they want over $500 for one week of DAY CAMP. I'd like to add that you won't get general acceptance until you have plans as well as a critical mass of teachers who can do Python. At the elementary level, many teachers still don't have much math training. The computer programs I've seen are often run by the "Technology Resource Specialist" who may be waiting still for HTML training, much less OO-anything. Meanwhile, there are pockets of kids chomping at the bit to learn programming, with no one to teach them. So they teach themselves, as much as possible. Or they bug their parents. My child learns this stuff so quickly, I can't begin to keep up. Also, a gentle reminder. Try running some of the Alice demos on an old box that crashes every few selections! I know that advanced modeling is cool stuff, but make sure there are beginner's options for kids with old gear. That goes for the HTML versions of everything, as well. And what about some Linux-style installathons? What about testing the various curriculum proposals/materials in public library facilities? Free programming classes in public schools at night? Joan From pdx4d@teleport.com Sat May 13 06:37:14 2000 From: pdx4d@teleport.com (Kirby Urner) Date: Fri, 12 May 2000 22:37:14 -0700 Subject: [Edu-sig] Halley's Method for nth root of P In-Reply-To: <3.0.3.32.20000512152819.03348fa4@pop.teleport.com> References: <8CE7FB278EDAC243852568CF005DCBC8.005DCBDE852568CF@eico.com> Message-ID: <3.0.3.32.20000512223714.03397878@pop.teleport.com> From the same web page source, this one converges faster than Halley's looks like. def if1(P,n,d=10,x=1.0): if d>1: newx = (((2.0*n-1)*P*x**n + P**2) / ((x**(2*n-1))+(2*n-1)*P*x**(n-1))) return if1(P,n,d-1,newx) else: return x For computing the nth root of P, as in >>> if1(500,2) # 2nd root of 500 22.360679775 >>> 500 ** 0.5 22.360679775 Kirby From pdx4d@teleport.com Sat May 13 07:58:05 2000 From: pdx4d@teleport.com (Kirby Urner) Date: Fri, 12 May 2000 23:58:05 -0700 Subject: [Edu-sig] Long Integer Fractions In-Reply-To: <3.0.3.32.20000512223714.03397878@pop.teleport.com> References: <3.0.3.32.20000512152819.03348fa4@pop.teleport.com> <8CE7FB278EDAC243852568CF005DCBC8.005DCBDE852568CF@eico.com> Message-ID: <3.0.3.32.20000512235805.03398290@pop.teleport.com> >From the same web page source, this one converges >faster than Halley's looks like. ... except if1() seems to spiral out of control for P > 100=20 or so. Hmmmmm... Halley's more stable. Maybe I'm doing=20 something wrong. I think it's SmallTalk that does integer fractions, i.e.=20 allows calcs with numerators and denominators staying=20 separate. Does Scheme do this too? I forget just now (I practiced with it for awhile, but am still focussed on a math curriculum with Python the main computer=20 language). Anyway, I wrote a Fraction class that sort of does=20 this (computes with fractions) -- maybe I'm reinventing=20 a wheel or two here. Fraction in action: >>> from roots import Fraction >>> a =3D Fraction(1,6) # i.e. 1/6 >>> b =3D Fraction(2,3) # i.e. 2/3 >>> c =3D a+b # add fractions >>> c.str() '5L/6L' >>> c =3D a-b # subtract fractions >>> c.str() '-3L/6L' >>> c.simplify() >>> c.str() '-1L/2L' =20 >>> c=3D(a*b).str() # multiply factions (divide OK too) >>> c.str() =20 '2L/18L' >>> c.simplify() >>> c.str() '1L/9L' I used my primes.py module for its gcd and lcm functions=20 (greatest common divisor, lowest common multiple). One=20 could make 'simplify' more "built-in" upon initialization (making a separate call unnecessary), but I'm still=20 working through Domingo G=F3mez Mor=EDn's web page and didn't=20 want to simplify automatically. Using my Fraction class and one of Domingo's algorithms,=20 I was able to get some impressive long integer fractions=20 for 3rd root of 2, 3rd root of 10: 3rd root of 2 is approx =3D 65379522 --------- 51891761 3rd root of 10 is approx =3D 91969780593702397138462508494860 --------------------------------- 42688590663356403236303435376201 Kirby From jelkner@umd5.umd.edu Sat May 13 20:50:04 2000 From: jelkner@umd5.umd.edu (Jeffrey Elkner) Date: Sat, 13 May 2000 15:50:04 -0400 Subject: [Edu-sig] How best to publish?... In-Reply-To: <200005121946.PAA19288@brocade.nexen.com> References: <00051214382002.03123@tpaine.yorktown.arlington.k12.va.us> <200005121946.PAA19288@brocade.nexen.com> Message-ID: <00051316054103.00755@robeson.elkner.net> I have a question that I think is of importance to our efforts. What format is best suited to creating content that can be both web ready and generate good looking printed copy from the same source? At this point I have settled on learning DocBook, but the big problem with DocBook is that the tools needed to use it affectively are propriatary and expensive. Looking into my crystal ball (or is it mearly wishful thinking ;-) I see a not too distant day when DocBook XML is completed and I wealth of really cool tools (written in Python, of course!) are available for it. Any comments? It is really important for me that I figure out the right way to do this. I don't have the time I need to do what I'm trying to do already, so I can't afford to just look around and check things out. I am willing to learn and use any format, but I want to learn and use only one, and I want it to be the one that the Python community is most likely to rally around and support. Am I dreaming, or is there such a format? jeff elkner On Fri, 12 May 2000, Steve Morris wrote: > Jeffrey Elkner writes: >> If anyone has any time on their hands and wants to help out, it would be a big >> help to me if we could get the livewires course materials put into some web >> ready format. > > Does anyone else wish that people would stop publishing things in .pdf > format. It is the second most user unfriendly way of distributing > information electronically, second only to bitmap images. The content > is no longer available in any form except graphically. You can't even > do a text search to find relevent sections. pdf is a compressed and > scalable way of distributing graphics that might incidentally contain > fonts. From pdx4d@teleport.com Sat May 13 22:14:10 2000 From: pdx4d@teleport.com (Kirby Urner) Date: Sat, 13 May 2000 14:14:10 -0700 Subject: [Edu-sig] Things to come In-Reply-To: <00051214382002.03123@tpaine.yorktown.arlington.k12.va.us> References: Message-ID: <3.0.3.32.20000513141410.03162124@pop.teleport.com> At 02:05 PM 05/12/2000 -0400, Jeffrey Elkner wrote: >On Fri, 12 May 2000, Arthur Siegel wrote: >> So can we say that curricula should lead - not language or interface? >Curricula, on the other hand are still sorely lacking, and Python will >not be adapted widely in schools without it. The question then is >what to do to overcome this lack. I am really interested to see how >this develops. Me too. Sitting around waiting for mass-publishing to catch up is NOT the way to go however. That's just being lazy. Seems you agree. >One of the things most attractive to me is the opportunity to be >part of a development effort that has the possibility of being >collaborative in nature and focused on the legitament needs of >learners rather than profit driven and characterized by salesmanship >and hype. Yep. >I want it to be successful and I am willing to put a lot of my >own time into it for that reason. This is what I've been doing. >I've already met and am working with others who feel the same way. Great. >If anyone has any time on their hands and wants to help out, it >would be a big help to me if we could get the livewires course >materials put into some web ready format. I'm working on developing my own curriculum materials, but best wishes with that effort. BTW, I don't consider PDFs all that web-unready (despite previous poster's remarks). Just download and print. Sure, you can't easily change the text, but not all published documents are open source code in that sense. As an author/writer, I produce finished products, as well as works in progress. The concept of plagiarism still holds (i.e. if it's not your own work, don't pretend that it is; credit your sources). >These excellent middle school level materials can be found at: > >http://yhslug.tux.org/obp/livewires Yep. >I have two students working on converting them into HTML. Did you see the Python source-code colorizor posted about here? Great to show Python source in color-coded HTML, using same colors as IDLE, AND make it downloadable as .py files (zipped or as tar-balls). >They are volunteers and the work is proceeding slower >than I would like. I will be learning to use DocBook this >summer, and will try to write Python tools to convert them >into DocBook, but I don't know yet how that will go. Why so much energy into rehashing Livewires stuff into these various other formats? Better to source your own curriculum materials, no?, given there's a shortage of good Python-centric literature right now. I don't see pouring old wine into new skins as the same thing as curriculum writing. >Thanks in advance for all the help that I know is forthcoming ;-) Kirby From pdx4d@teleport.com Sat May 13 22:27:38 2000 From: pdx4d@teleport.com (Kirby Urner) Date: Sat, 13 May 2000 14:27:38 -0700 Subject: [Edu-sig] Speaking of summer hols...and the curriculum conundrum In-Reply-To: <4c.5676421.264e2ace@aol.com> Message-ID: <3.0.3.32.20000513142738.0316636c@pop.teleport.com> >I'd like to add that you won't get general acceptance until >you have plans as well as a critical mass of teachers who >can do Python. At the elementary level, many teachers still >don't have much math training. The computer programs I've >seen are often run by the "Technology Resource Specialist" >who may be waiting still for HTML training, much less OO-anything. Not useful to wait. Should be learning. Sets a poor example for resource specialists to sit around waiting for training while meanwhile expecting kids to be self-starters, learners capable of independent study. >Meanwhile, there are pockets of kids chomping at the bit to >learn programming, with no one to teach them. So they teach >themselves, as much as possible. Or they bug their parents. >My child learns this stuff so quickly, I can't begin to keep >up. Or they find lots of good teaching materials in cyberspace. Really, if you're a kid, there's no sense sitting around waiting for your teachers to get a clue. Chances are, they're not going to learn what you need to know any time soon. So the strategy is to pump useful materials out to the kids via the web, in ways that bypass teachers altogether (not all teachers -- many support these efforts to rescue kids from getting stuck with burn-out nonprofessionals, have dynamite websites of their own to share). If teachers want to be bottlenecks, to be more part of the problem than part of the solution, that's their choice. But no way kids should have to pay the price. They'll find other teachers who have the "right stuff" if they can. Put useful knowledge on the web, and the students will come (if, that is, they realize it's their own responsibility to get an education, that this is not really about dodging authority trippers while getting away with doing as little work as possible -- that only hurts your self). >Also, a gentle reminder. Try running some of the Alice >demos on an old box that crashes every few selections! Why bother? Sounds horrible. I'd never do it. >I know that advanced modeling is cool stuff, but make sure >there are beginner's options for kids with old gear. But Alice isn't one of them. Just straight Python is all they need, a few other goodies. Or they should get better gear (not top of the line necessarily, just better). It's really cheap in many parts of the world. Maybe fire some of those deadweight teachers who haven't kept up to free up some budget (I know, I know -- the unions'd never permit it). >That goes for the HTML versions of everything, as well. > >And what about some Linux-style installathons? What >about testing the various curriculum proposals/materials >in public library facilities? Free programming classes >in public schools at night? > >Joan I think the free programming classes is a good idea. Adults are in dire need of this stuff as well, not just kids. Education is life-long, after all. But of course we live in a culture that brands any schemes to provide free services as socialist (or some other bad word). More likely, we'll just keep charging what the market will bear, and most adults will fall further and further behind (which is what makes it easy for those with the training to earn top dollar doing what any 14 year old could do, given some schooling). Kirby From pdx4d@teleport.com Sat May 13 22:40:17 2000 From: pdx4d@teleport.com (Kirby Urner) Date: Sat, 13 May 2000 14:40:17 -0700 Subject: [Edu-sig] How best to publish?... In-Reply-To: <00051316054103.00755@robeson.elkner.net> References: <200005121946.PAA19288@brocade.nexen.com> <00051214382002.03123@tpaine.yorktown.arlington.k12.va.us> <200005121946.PAA19288@brocade.nexen.com> Message-ID: <3.0.3.32.20000513144017.03165140@pop.teleport.com> At 03:50 PM 05/13/2000 -0400, Jeffrey Elkner wrote: >I have a question that I think is of importance to our efforts. > >What format is best suited to creating content that can be both >web ready and generate good looking printed copy from the same >source? At this point I have settled on learning DocBook, but >the big problem with DocBook is that the tools needed to use it >affectively are propriatary and expensive. Given the desk-top publishing tools we almost all have access to, I think local authorship of lots of curriculum materials is the likely trend. Teachers have their own creativity and ideas about what they'd like to share with students, so I think it's unnecessary to work on the model of a mass-publisher, thinking "what I do and put on the web is going to be used in exactly this form by other teachers." I mean, you can do that, but I think you're probably wasting energy. Best is to put really good ideas, and working Python stuff, in the public domain, with the expectation that other teachers will edit/recombine, crediting you of course, if you're a source, but desk-top publishing their own materials for local distribution, materials which incorporate their own thinking and attitudes. The whole point of cyberspace curricula is that you're NOT tied to some centralized bureaucracy with a one-size-fits-all mass publishing approach. I've got my 4-part 'Numeracy + Computer Literacy' essay showing how I do it.[1] Lots of excellent graphics, many of them made using the very techniques I share in the materials, lots of color-coded source, downloadable zips, links to related resources. But I'm not really expecting teachers to print out and use this material verbatim with students (for one thing, it's really written for other teachers, more than it is for kids) -- although they might download and run the source code. It's the ideas that are important, and that I value when I find them on other teacher websites. I don't really care if they've archived a lot of camera-ready hand-outs, because I can easily author similar materials myself, customized to my needs, am not really depending on others for such "end user" aids (like I've made a whole book of nifty color overhead transparencies, using my Epson Stylus and special 3M cels). Kirby [1] http://www.inetarena.com/~pdx4d/ocn/cp4e.html From lexberezhny@msn.com Sat May 13 23:09:30 2000 From: lexberezhny@msn.com (lexberezhny) Date: Sat, 13 May 2000 18:09:30 -0400 Subject: [Edu-sig] How best to publish?... References: <200005121946.PAA19288@brocade.nexen.com><00051214382002.03123@tpaine.yorktown.arlington.k12.va.us><200005121946.PAA19288@brocade.nexen.com> <3.0.3.32.20000513144017.03165140@pop.teleport.com> Message-ID: <005901bfbd27$ea3e7840$8f280a3f@matrix> > At 03:50 PM 05/13/2000 -0400, Jeffrey Elkner wrote: > >I have a question that I think is of importance to our efforts. > > > >What format is best suited to creating content that can be both > >web ready and generate good looking printed copy from the same > >source? At this point I have settled on learning DocBook, but > >the big problem with DocBook is that the tools needed to use it > >affectively are propriatary and expensive. > > Given the desk-top publishing tools we almost all have > access to, I think local authorship of lots of curriculum > materials is the likely trend. Teachers have their own > creativity and ideas about what they'd like to share with > students, so I think it's unnecessary to work on the model > of a mass-publisher, thinking "what I do and put on the > web is going to be used in exactly this form by other > teachers." I mean, you can do that, but I think you're > probably wasting energy. > > Best is to put really good ideas, and working Python stuff, > in the public domain, with the expectation that other > teachers will edit/recombine, crediting you of course, if > you're a source, but desk-top publishing their own materials > for local distribution, materials which incorporate their > own thinking and attitudes. The whole point of cyberspace > curricula is that you're NOT tied to some centralized > bureaucracy with a one-size-fits-all mass publishing > approach. But wouldnt that be nice. If you have a common format for materials, preferably in XML/DocBook, you can easily reference materials by keywords, and categories contained within the documents them selves. Following some standards may make it easy for teachers to find materials. But the most important aspect is having a format which can be read by many tools, and from this common format you can easily generate HTML, PostScript, or what have you. In order for this to be possible there needs to be a commonly used format for publishing this type of material! > It's the ideas that are important, and that I value when > I find them on other teacher websites. I don't really > care if they've archived a lot of camera-ready hand-outs, > because I can easily author similar materials myself, > customized to my needs, am not really depending on > others for such "end user" aids (like I've made a whole > book of nifty color overhead transparencies, using my > Epson Stylus and special 3M cels). Not all teachers have the know-how or even the time to do these things. And having a common format may help teachers by limiting the number of tools they must learn, in order to use these materials. From pdx4d@teleport.com Sat May 13 23:56:44 2000 From: pdx4d@teleport.com (Kirby Urner) Date: Sat, 13 May 2000 15:56:44 -0700 Subject: [Edu-sig] How best to publish?... In-Reply-To: <005901bfbd27$ea3e7840$8f280a3f@matrix> References: <200005121946.PAA19288@brocade.nexen.com> <00051214382002.03123@tpaine.yorktown.arlington.k12.va.us> <200005121946.PAA19288@brocade.nexen.com> <3.0.3.32.20000513144017.03165140@pop.teleport.com> Message-ID: <3.0.3.32.20000513155644.031c188c@pop.teleport.com> >In order for this to be possible there needs to be a commonly used >format for publishing this type of material! I suppose -- but sounds like one of those elusive holy grail type goals. DocBooks sounds expensive/proprietary, so that eliminates it as a candidate in my book. If we're really wanting to make user-friendly materials, we don't go with a proprietary format. And just because its called XML doesn't make it non-proprietary, as any business can customize its own tags for inhouse consumption. It can take a lot of work to translate between tag sets. >Not all teachers have the know-how or even the time to do >these things. I know, but I'm not interested in encouraging the status quo here. We're liberating ourselves from mass-publishing and getting back to the days when teachers _source_ curriculum, aren't just passive consumers of stuff put together by others. If you don't source curriculum (which includes editing/recombining what you get from others), you're probably not a teacher, at least in my book (but probably have the potential, if the school was willing to let you really do the job). Kirby From charlie@intelligenesis.net Sun May 14 00:39:09 2000 From: charlie@intelligenesis.net (Charlie Derr) Date: Sat, 13 May 2000 19:39:09 -0400 Subject: [Edu-sig] How best to publish?... In-Reply-To: <3.0.3.32.20000513155644.031c188c@pop.teleport.com> Message-ID: ~ >In order for this to be possible there needs to be a commonly used ~ >format for publishing this type of material! ~ ~ I suppose -- but sounds like one of those elusive holy ~ grail type goals. DocBooks sounds expensive/proprietary, ~ so that eliminates it as a candidate in my book. If we're ~ really wanting to make user-friendly materials, we don't ~ go with a proprietary format. And just because its called ~ XML doesn't make it non-proprietary, as any business can ~ customize its own tags for inhouse consumption. It can ~ take a lot of work to translate between tag sets. So why not work toward an open-source type of XML format that can remain free? ~c (i don't know enough details about how to properly "license" a "format", so forgive me if "open-source" is technically the wrong phrase - it should be obvious what i mean :-]) From pdx4d@teleport.com Sun May 14 00:57:55 2000 From: pdx4d@teleport.com (Kirby Urner) Date: Sat, 13 May 2000 16:57:55 -0700 Subject: [Edu-sig] How best to publish?... In-Reply-To: References: <3.0.3.32.20000513155644.031c188c@pop.teleport.com> Message-ID: <3.0.3.32.20000513165755.03163ad4@pop.teleport.com> >So why not work toward an open-source type of XML format that >can remain free? Well, HTML (a subset of SGML, of which XML is a streamlined version), is already such a public domain tag language. Your browser (likely a free download) knows what to do with those tags. So HTML is much better than we've ever had, in terms of being able to share formatted materials in the public domain. From the point of view of the 1960s, we're already there. But then of course we always raise our standards to the next level, assuring eternal dissatisfaction with what we've got (aye, there's the rub). As we've learned from experience, any time someone sets down a trully useful standard, it gets caught in a tug-o-war as innovators overlay it with their own specialized enchancements. This has happened with HTML. XML doesn't prevent it either, just makes it easier for everyone to extend their tag sets as they please, with no upper limits (the standard defines the syntax, so automatic parsers can verify code at a low level, and people take it from there). Coming up with standards that actually propagate is really difficult, except maybe under dictatorships. It's very easy to say "let's all agree". But then what? It's not really easy at all, because, ultimately, no one is in control at the top (just principles operating on auto- pilot, like gravity). I just don't think it wise to have our Python-informed curriculum efforts get side-tracked into some "how do we do this the right way the first time" investigations. Like, I think Elkner is asking good questions and his heart is certainly in the right place, but at the end of the day, people are gonna do what they're gonna do. Personally, I thought the PDF versions of the LiveWires stuff was adequate, and question the need for HTMLized versions of all the same stuff. But maybe I just don't understand the big picture here. Anyway, my view is we should just get stuff out there, using whatever existing standards. Even use Microsoft Word that's what you know. Even if you don't have it, someone in your network probably does, and will download and convert it for you. Leave it to the informal grape vines to mix 'n match as needed. Not important to always use lowest common denominator, which might be straight ASCII (but how does that work for Kanji, plus we need lotsa graphics plus...). Speaking of kanji, keep in mind that we're on the brink of going to way more characters, given unicode. A lot of teachers doing Python-informed curriculum writing will be doing so using characters that Roman alphabet people can't decipher easily. So even if they use the most open source of all formats (e.g. HTML), there's no way a lot of us are going to be able to use their materials directly (or vice versa). Such is life in the big city. My personal practice is to use HTML for most of my public domain curriculum writing. It suits my needs and will persist as a standard for a long time to come, even with XML in the picture. When JPython applets become easier to create, I expect we'll see a lot more of those. But it's not critical that everything you're doing with Python be doable over the web or sharable in some HTML-embedded form. With Adobe Distiller, you can convert your web pages into PDFs, but I've never found a good reason for doing that. Lastly, let me put in a plug for video (with audio). A lot of what I personally want to teach is bottlenecked behind the fact that I have no access to a well- equipped media lab. And I include real life teachers, lecturing or taking questions, as part of what goes under the heading of "TV" (whether that be streaming, PAL/NTSC or whatever). Take Bill Nye the Science Guy for example -- now _there's_ a real teacher (better than I'll ever be). Some of this Python stuff could well be imparted with videos. I'm not just talking about staring at some screen while people type code. That'd be a small part of it. I'm talking about creative mixes of live action, interviews, over-the-shoulder views of coding sessions, and other stuff, to give students the flavor of real world, working situations in which Python (and math in general) is of vital importance (gets back to the PR problems we're having with the women -- if we make the TV shows right, this will stop being a problem after awhile). Kirby From djmitche@midway.uchicago.edu Sun May 14 01:16:41 2000 From: djmitche@midway.uchicago.edu (Dustin James Mitchell) Date: Sat, 13 May 2000 19:16:41 -0500 (CDT) Subject: [Edu-sig] Things to come In-Reply-To: Message-ID: Art, I'm afraid I lose you after the second paragraph of the following. Can you explain a little bit of what you mean? My jury's still out on the voucher issue too, so I'd like to understand your viewpoint here. Dustin On Fri, 12 May 2000, Arthur Siegel wrote: > I don't understand the point of the greatest teaching language and > interface on the planet, without a curriculum. > > Other than cottage industry efforts like Kirby's and mine - how does > that happen, short of going hat-in-hand to Disney. > > If Disney just wanted to quietly hand out endowments to the worthy, great. > > But their advertisement on Sunday afternoon said nothing (other than > 'Disney' and 'Learning') > and would have funded maybe a 100 computer labs. More polemic. 100 > inner-city computer labs. > > To me it would be tremendously naive to believe that the extent of their > interest in education in America is as a concerned corporate citizen, even > if they > might believe it themselves - today. > > This analysis is not coming from a left or anarchist view-point. > > But I am re-thinking my pro-voucher position. > > > > > _______________________________________________ > Edu-sig mailing list > Edu-sig@python.org > http://www.python.org/mailman/listinfo/edu-sig > --------------------------------------------------------------------- | Dustin Mitchell )O( | --------------------------------------------------------------------- From djmitche@midway.uchicago.edu Sun May 14 01:52:22 2000 From: djmitche@midway.uchicago.edu (Dustin James Mitchell) Date: Sat, 13 May 2000 19:52:22 -0500 (CDT) Subject: [Edu-sig] How best to publish?... In-Reply-To: <00051316054103.00755@robeson.elkner.net> Message-ID: On Sat, 13 May 2000, Jeffrey Elkner wrote: > Any comments? It is really important for me that I figure out the > right way to do this. I don't have the time I need to do what I'm > trying to do already, so I can't afford to just look around and check > things out. I am willing to learn and use any format, but I want to > learn and use only one, and I want it to be the one that the Python > community is most likely to rally around and support. Am I dreaming, > or is there such a format? I know this has been answered by several others, but I wanted to concur with Kirby in saying that HTML has been, is, and will be the standard for interoperable Open-Source publishing. HTML has its problems -- it's been laden with extra features, it's difficult to tell exactly what output will look like, etc. -- but it's what we have. My advice would be this: don't spend the time to learn something that's proprietary, and that will require people to buy / download viewers. Spend your time learning the tips and tricks of good HTML coding, making things render attractively on many browsers. For instance, see Kirby's lesson (sorry, no reference -- check any one of Kirby's posts for a link). He's using only HTML, but has worked very hard (including what I'm led to believe was HAND COLORING of the python code?) to make it render attractively on many browsers, and be fairly printer-friendly. HTML's like Othello: a minute to learn, a lifetime to master. Dustin --------------------------------------------------------------------- | Dustin Mitchell )O( | --------------------------------------------------------------------- From pdx4d@teleport.com Sun May 14 02:01:40 2000 From: pdx4d@teleport.com (Kirby Urner) Date: Sat, 13 May 2000 18:01:40 -0700 Subject: [Edu-sig] How best to publish?... In-Reply-To: References: <00051316054103.00755@robeson.elkner.net> Message-ID: <3.0.3.32.20000513180140.0317c5f0@pop.teleport.com> >For instance, see Kirby's lesson (sorry, no reference -- check >any one of Kirby's posts for a link). http://www.inetarena.com/~pdx4d/ocn/cp4e.html >He's using only HTML, but has worked very hard (including >what I'm led to believe was HAND COLORING of the python code?) Originally hand-colored yes. But then the Python gurus around here pointed me to the tools to do this automatically, and ever since I've been going wild, HTMLizing hundreds of lines of color-coded code for the web. This is a utility well worth adding to your arsenal, er toolbox, if you're doing curriculum writing around Python in any way. Kirby From lexberezhny@msn.com Sun May 14 02:13:42 2000 From: lexberezhny@msn.com (lexberezhny) Date: Sat, 13 May 2000 21:13:42 -0400 Subject: [Edu-sig] How best to publish?... References: <3.0.3.32.20000513155644.031c188c@pop.teleport.com> <3.0.3.32.20000513165755.03163ad4@pop.teleport.com> Message-ID: <00fe01bfbd41$a5e90920$8f280a3f@matrix> > > >So why not work toward an open-source type of XML format that > >can remain free? > > Well, HTML (a subset of SGML, of which XML is a streamlined > version), is already such a public domain tag language. > Your browser (likely a free download) knows what to do > with those tags. > > So HTML is much better than we've ever had, in terms of > being able to share formatted materials in the public > domain. From the point of view of the 1960s, we're > already there. But then of course we always raise our > standards to the next level, assuring eternal > dissatisfaction with what we've got (aye, there's the > rub). > > As we've learned from experience, any time someone sets > down a trully useful standard, it gets caught in a tug-o-war > as innovators overlay it with their own specialized > enchancements. This has happened with HTML. XML doesn't > prevent it either, just makes it easier for everyone to > extend their tag sets as they please, with no upper limits > (the standard defines the syntax, so automatic parsers > can verify code at a low level, and people take it from > there). Actually I think I agree with you on this one. HTML stands for Hyper Text Markup Language, so isnt that what we are doing, we are putting our documents into a standard format using a common markup language. I guess the only advantage we would have had from using DocBook is the tools that already exist, and make it easy to actually publish stuff other then just display content. DocBook will generate a table of contents, and make it easy to search certain chapters with specific topics, etc. If any of you are familiar with Zope, a DocBook product has just come out which is free and actually works. > Coming up with standards that actually propagate is really > difficult, except maybe under dictatorships. It's very > easy to say "let's all agree". But then what? It's not > really easy at all, because, ultimately, no one is in > control at the top (just principles operating on auto- > pilot, like gravity). > > I just don't think it wise to have our Python-informed > curriculum efforts get side-tracked into some "how do we > do this the right way the first time" investigations. > Like, I think Elkner is asking good questions and his > heart is certainly in the right place, but at the end > of the day, people are gonna do what they're gonna do. > > Personally, I thought the PDF versions of the LiveWires > stuff was adequate, and question the need for HTMLized > versions of all the same stuff. But maybe I just don't > understand the big picture here. > > Anyway, my view is we should just get stuff out there, > using whatever existing standards. Even use Microsoft > Word that's what you know. Even if you don't have it, > someone in your network probably does, and will download > and convert it for you. Leave it to the informal grape > vines to mix 'n match as needed. Not important to > always use lowest common denominator, which might be > straight ASCII (but how does that work for Kanji, plus > we need lotsa graphics plus...). > > Speaking of kanji, keep in mind that we're on the brink > of going to way more characters, given unicode. A lot > of teachers doing Python-informed curriculum writing > will be doing so using characters that Roman alphabet > people can't decipher easily. So even if they use > the most open source of all formats (e.g. HTML), there's > no way a lot of us are going to be able to use their > materials directly (or vice versa). Such is life > in the big city. > > My personal practice is to use HTML for most of my > public domain curriculum writing. It suits my needs and > will persist as a standard for a long time to come, even > with XML in the picture. When JPython applets become > easier to create, I expect we'll see a lot more of > those. But it's not critical that everything you're > doing with Python be doable over the web or sharable > in some HTML-embedded form. > > With Adobe Distiller, you can convert your web pages > into PDFs, but I've never found a good reason for > doing that. > > Lastly, let me put in a plug for video (with audio). > A lot of what I personally want to teach is bottlenecked > behind the fact that I have no access to a well- > equipped media lab. > > And I include real life teachers, lecturing or taking > questions, as part of what goes under the heading of > "TV" (whether that be streaming, PAL/NTSC or whatever). > Take Bill Nye the Science Guy for example -- now > _there's_ a real teacher (better than I'll ever be). > > Some of this Python stuff could well be imparted with > videos. I'm not just talking about staring at some > screen while people type code. That'd be a small > part of it. I'm talking about creative mixes of > live action, interviews, over-the-shoulder views of > coding sessions, and other stuff, to give students > the flavor of real world, working situations in which > Python (and math in general) is of vital importance > (gets back to the PR problems we're having with the > women -- if we make the TV shows right, this will > stop being a problem after awhile). Hey that sounds like a great idea. I wonder if Jeffery Elkner would be interested in cooking up something like that. We have all of the equipment needed. And Guido is comming to our school soon, so we can include an interview with him. And from my understanding we have some students who have been doing a lot of television broadcasting at our career center, so we have some qualified people. So if any one has suggestions of how this should be done, please speak up. Thanks. (and if we dont do this, someone will...) - Lex ps. I am one of Elkner's students :-) just though i would leave my two cents here From infonuovo@email.com Mon May 15 01:17:39 2000 From: infonuovo@email.com (Dennis E. Hamilton) Date: Sun, 14 May 2000 17:17:39 -0700 Subject: [Edu-sig] How best to publish?... In-Reply-To: <3.0.3.32.20000513144017.03165140@pop.teleport.com> Message-ID: Well, I am not sure where the idea that DocBook is a proprietary format or requires proprietary tools came up. The DocBook materials are all available on-line, and even the book, DocBook, is an open-source publication (created using DocBook). Everything is available on-line in open-source forms. The CD-ROM that comes with the O'Reilly printed version of the book has a selection of tools to use with it, and I notice there is slow progress in having more of them. There is certainly room to provide more, and especially take advantage of the DocBook XML DTD. Nevertheless, I agree that HTML is very appealing as a basic source format. Using HTML is a very low cost-of-entry approach and I like that. In my work it is also appealing to be able to make Microsoft HTML Help documents (basically HTML pages compiled into a special-single file much the way PDF is used), and either HTML or DocBook as the editable, authored form works for this. See the *.chm file of the DocBook book for an example that I like. Since *.chm files can contain scripts, there is also the prospect of including worked python examples and being able to operate / demonstrate them from within the *.chm compilation. I am intrigued by that. -- Dennis AIIM DMware Technical Coordinator I am traveling until June 1, 2000, and am best reached via E-mail. Dennis E. Hamilton ---------------------------- InfoNuovo mailto:infonuovo@email.com http://www.infonuovo.com -----Original Message----- From: edu-sig-admin@python.org [mailto:edu-sig-admin@python.org]On Behalf Of Kirby Urner Sent: Saturday, 13 May 2000 14:40 To: Jeffrey Elkner Cc: PythonEDU; Steve Morris Subject: Re: [Edu-sig] How best to publish?... At 03:50 PM 05/13/2000 -0400, Jeffrey Elkner wrote: >I have a question that I think is of importance to our efforts. [ ... ] >the big problem with DocBook is that the tools needed to use it >affectively are propriatary and expensive. [ ... ] Best is to put really good ideas, and working Python stuff, in the public domain, with the expectation that other teachers will edit/recombine, crediting you of course, if you're a source, but desk-top publishing their own materials for local distribution, materials which incorporate their own thinking and attitudes. The whole point of cyberspace curricula is that you're NOT tied to some centralized bureaucracy with a one-size-fits-all mass publishing approach. [ ... ] Kirby [1] http://www.inetarena.com/~pdx4d/ocn/cp4e.html _______________________________________________ Edu-sig mailing list Edu-sig@python.org http://www.python.org/mailman/listinfo/edu-sig From pdx4d@teleport.com Sun May 14 17:14:59 2000 From: pdx4d@teleport.com (Kirby Urner) Date: Sun, 14 May 2000 09:14:59 -0700 Subject: [Edu-sig] How best to publish?... In-Reply-To: References: <3.0.3.32.20000513144017.03165140@pop.teleport.com> Message-ID: <3.0.3.32.20000514091459.031cf46c@pop.teleport.com> At 05:17 PM 05/14/2000 -0700, Dennis E. Hamilton wrote: >Well, > >I am not sure where the idea that DocBook is a proprietary format or >requires proprietary tools came up. The DocBook materials are all >available on-line, and even the book, DocBook, is an open-source >publication (created using DocBook). Everything is available on-line in >open-source forms. OK, sounds like I should check out DocBook some more before I write it off or say further negative things about it. Thanks for educating me on this topic. Kirby From jelkner@umd5.umd.edu Sun May 14 16:38:56 2000 From: jelkner@umd5.umd.edu (Jeffrey Elkner) Date: Sun, 14 May 2000 11:38:56 -0400 Subject: [Edu-sig] How best to publish?... In-Reply-To: References: Message-ID: <00051412254401.00689@robeson.elkner.net> Hi All! I appreciate all the discussion in reply to my query. It was definitely helpful to me in figuring out where we are and what needs to be done to get where I want to go... A few more comments on DocBook. For anyone interested, here are some links: http://www.docbook.org http://metalab.unc.edu/godoy/using-docbook/using-docbook.html # here are some of the tools available for DocBook: http://www.oasis-open.org/docbook/tools/index.html My interest in DocBook is a very practical one. I am working on writing "How to Think Like a Computer Scientist", Python version: http://yhslug.tux.org/obp/thinkCS/thinkCSpy/index.htm I want to have an on-line version, but I am also interested in having printed versions to issue to students who take my class. It has been a lot of long and tedious work in getting the book from Dr. Allen Downey's original LaTex format into the HTML that I am using. I don't look forward to having to go back to LaTex in order to be able to produce a printable version. I am already using HTML, which is what the majority of you'all recommended that I do, but that does not address the problem of how to get a printable version out without a lot of tedious work. With the Livewires materials we have the opposite problem. We have printable versions, but the on-line versions are taking us a long time to produce. It would be REALLY helpful to me if I could produce both printable AND on-line versions from the same source. That is why I began looking into DocBook. On Sun, 14 May 2000, Dennis Hamilton wrote: > I am not sure where the idea that DocBook is a proprietary format or > requires proprietary tools came up. The DocBook materials are all > available on-line, and even the book, DocBook, is an open-source > publication (created using DocBook). Everything is available on-line in > open-source forms. The CD-ROM that comes with the O'Reilly printed > version of the book has a selection of tools to use with it, and I > notice there is slow progress in having more of them. There is > certainly room to provide more, and especially take advantage of the > DocBook XML DTD. DocBook is certainly an open format, but (and please correct me if I am wrong) free tools to convert DocBook source to a printable form (Post Script, for example) are not well developed. I was thinking that Python tools could be developed to do this, but I am totally ignorant as to the existance or short term prospects for such tools. On Sun, 14 May 2000, Kirby Urner wrote: > I just don't think it wise to have our Python-informed > curriculum efforts get side-tracked into some "how do we > do this the right way the first time" investigations. > Like, I think Elkner is asking good questions and his > heart is certainly in the right place, but at the end > of the day, people are gonna do what they're gonna do. Thanks, Kirby, but your missing the point. What I am trying to figure out is what I'm gonna do at the end of today ;-) > Best is to put really good ideas, and working Python stuff, > in the public domain, with the expectation that other > teachers will edit/recombine, crediting you of course, if > you're a source, but desk-top publishing their own materials > for local distribution, materials which incorporate their > own thinking and attitudes. The whole point of cyberspace > curricula is that you're NOT tied to some centralized > bureaucracy with a one-size-fits-all mass publishing > approach. It is VERY important that we get some real contact with real schools in this effort. While it is certainly true that some of the more innovative teachers will want to do their own lessons, if we expect Python to be used to teach "Computer Programming for Everyone" than we can not expect ALL teachers to do that. For most teachers, given the practical day to day difficulties already built into their jobs (and lacking the fanatical zeal that drives some of us to do crazy things like try to develop our own curriculum from scratch ;-) You are giving them the choice between: 1. Here is your Visual Basic course... It includes textbook, quizzes and tests with answer keys, lab activities and sample lesson plans. 2. Why not try Python. All you need to do is go out and learn desktop publishing, hunt around the web for some sample code, and put together your own textbook, quizzes and tests, lab activities, and lesson plans, all in the comfort of your spare time :-( Need I say more? jeff elkner From arta@x-stream.nl Sun May 14 17:03:18 2000 From: arta@x-stream.nl (A[r]TA) Date: Sun, 14 May 2000 18:03:18 +0200 Subject: [Edu-sig] ports References: <000e01bfbc4e$873176a0$a9c48bd4@vincent><200005122018.QAA19372@brocade.nexen.com><002801bfbc4f$e6cd0f60$a9c48bd4@vincent> <200005122037.QAA19418@brocade.nexen.com> Message-ID: <001101bfbdcf$fffcc9e0$a7c58bd4@vincent> > You have to be more clear. Explain in more detail. I am a networking > developer and can't tell which of many networking functionality you > are talking about. Regardless I suggest you take this off of edu-sig > since it is way off topic. At best it is a python developer question > which is not a topic for the list. At worst it is not a python > question at all. Sorry, I will. > > Sockets do indeed check to see if someone attempts to open a > port. Sockets are client/server. A server socket waits for a client to > connect. Yeah, I know. > Almost everything the user sees on the net goes through sockets. FTP > and HTTP are socket level protocols. > > Firewalls do indeed have an IP address. Firewall functionality is > usually filtering. They act as routers/gateways and refuse to route > packets depending on various packet characteristics. You are not > realistically going to do anything like this in python mostly for > speed reasons. Speed isn't that important. But I assume Python has the abbilities?? >It is also very platform specific where as sockets are > portable. I just want to write a simple firewall. Just to learn from it and how they work. It could be quite handy if you can block all ports except the usual ones. Like 21 en 80 for FTP and HTTP. The other ports aren't server-sockets but they can "connect" to them with a TELNET-client or with portscanners and stuff like that. How do you block that? Or how do you can read the ports and print a message so you know someone is scanning your ports or is trying to connect with a lame trojan. Again, sorry, for my stupid short mails. I hope someone can help me a bit... A[r]TA We shall not cease from exploration, and the end of all our exploring will be to arrive where we started and know the place for the first time. - T. S. Eliot From pdx4d@teleport.com Sun May 14 20:29:27 2000 From: pdx4d@teleport.com (Kirby Urner) Date: Sun, 14 May 2000 12:29:27 -0700 Subject: [Edu-sig] How best to publish?... In-Reply-To: <00051412254401.00689@robeson.elkner.net> References: Message-ID: <3.0.3.32.20000514122927.0322aa60@pop.teleport.com> >> Like, I think Elkner is asking good questions and his >> heart is certainly in the right place, but at the end >> of the day, people are gonna do what they're gonna do. > >Thanks, Kirby, but your missing the point. What I am trying to >figure out is what I'm gonna do at the end of today ;-) Got it. Likewise from a purely selfish perspective, my answer is: doesn't really matter to me a whole lot what format you use, as its your good and original ideas that I'll be using, more than verbatim copies of anything (except maybe Python source code -- whatever you see fit to make available (and we'll want to tweek that too of course)). >It is VERY important that we get some real contact with >real schools in this effort. While it is certainly true >that some of the more innovative teachers will want to >do their own lessons, if we expect Python to be used to >teach "Computer Programming for Everyone" than we can >not expect ALL teachers to do that. I'm more focussed on students learning, less on teachers teaching i.e. I'm not necessarily presuming the schools will ever be a primary source for this material. We have the web now, e.g. some kids will stay home and learn programming (parents permitting) or hang out with friends at the local internet cafe vs. going to school and wasting time not learning much that's trully useful. >1. Here is your Visual Basic course... It includes >textbook, quizzes and tests with answer keys, lab >activities and sample lesson plans. And here are your net-savvy students, who have done some homework and know they'd rather be learning Python than VB. That's what all the cool kids are learning. VB is lame. Parents have a say too. >2. Why not try Python. All you need to do is go >out and learn desktop publishing, hunt around the web >for some sample code, and put together your own >textbook, quizzes and tests, lab activities, and >lesson plans, all in the comfort of your spare time :-( And don't forget HTML -- gotta learn that too, so you can show kids how to do their own websites. And if your school doesn't value your ability to source curriculum, maybe find some other institution that does -- no one said we have to depend on schools when it comes to pumping valuable materials out to the kids. I'm mostly looking at a DVD + web combo these days. My Oregon Curriculum Website is designed from the ground up with homeschoolers in mind. Kirby From infonuovo@email.com Mon May 15 05:42:06 2000 From: infonuovo@email.com (Dennis E. Hamilton) Date: Sun, 14 May 2000 21:42:06 -0700 Subject: [Edu-sig] How best to publish?... In-Reply-To: Message-ID: Oops, I just read the DocBook book Copyright notice and the book itself is not open-source, even though it is published on-line. (It doesn't provide an automatic license for redistribution or derivative works, hence the failure to be open-source.) I don't think that is a defect with regard to the availability of the DocBook DTD, the definition of the format, etc., all being publicly available, as well as a number of tools that are available as open-source. By the way, DocBook is adopted as a recommended format by the Open-Source Writers Group, people who want to promote and interchange open-source documentation of open-source software. -----Original Message----- From: Dennis E. Hamilton [mailto:infonuovo@email.com] Sent: Sunday, 14 May 2000 17:18 To: Kirby Urner; Jeffrey Elkner Cc: PythonEDU; Steve Morris Subject: RE: [Edu-sig] How best to publish?... [ ... ] even the book, DocBook, is an open-source publication (created using DocBook). From infonuovo@email.com Mon May 15 05:42:34 2000 From: infonuovo@email.com (Dennis E. Hamilton) Date: Sun, 14 May 2000 21:42:34 -0700 Subject: [Edu-sig] What about CP4E in the inner city? In-Reply-To: <3.0.3.32.20000512235805.03398290@pop.teleport.com> Message-ID: When I return on June 1 from traveling in Italy, I am arranging to provide some algebra tutoring over the summer at the high school I attended over 40 years ago in Tacoma, Washington. I hadn't lived in the Northwest from shortly after high school until last September, and now I want to do something with and for the kids in my old school. I am not a teacher, but a contact of mine in the school is very anxious to have successful alumni be available as tutors and mentors at a school in what has essentially become the inner-city high school. I am looking forward to tutoring some kids in algebra. I want to see what they are up against and also what would have them be interested in having some mastery in this area. Presently, the only exposure I have to that is my 10-year-old grand nephew, who I see, already ending the 5th grade, becoming so poorly practiced at early arithmetic skills that new topics (e.g., ratios) are becoming increasingly inaccessible to him. I have mentioned CP4E to my contact, but we haven't discussed it much. There are others in the school to talk to about computers, math education, and so on. I would like to do that, and if I could support a CP4E project in the school, I want to do that. It will take a lot for me to give up what I already know about computing to be able to relate to what these kids may require to get over any obstacles they have. I don't have any ideas about this beyond what I have just said. I will learn more when I meet people at the school. I also wanted to consult with this newsgroup and see what thoughts there already are about using CP4E approaches in schools where mathematics may be more something to survive than to master and exploit. I am sure I will find some kids who are keen on computers. I am just thinking out loud and also looking for your thinking. Regards, -- Dennis AIIM DMware Technical Coordinator I am traveling until June 1, 2000, and am best reached via E-mail. Dennis E. Hamilton ---------------------------- InfoNuovo mailto:infonuovo@email.com http://www.infonuovo.com From pdx4d@teleport.com Sun May 14 22:13:45 2000 From: pdx4d@teleport.com (Kirby Urner) Date: Sun, 14 May 2000 14:13:45 -0700 Subject: [Edu-sig] What about CP4E in the inner city? In-Reply-To: References: <3.0.3.32.20000512235805.03398290@pop.teleport.com> Message-ID: <3.0.3.32.20000514141345.0325b9b4@pop.teleport.com> >I don't have any ideas about this beyond what I have just said. I will >learn more when I meet people at the school. I also wanted to consult >with this newsgroup and see what thoughts there already are about using >CP4E approaches in schools where mathematics may be more something to >survive than to master and exploit. I am sure I will find some kids who >are keen on computers. I am just thinking out loud and also looking for >your thinking. > >Regards, > >-- Dennis I commend you for your willingness to consider this undertaking. If I were in your shoes, a first thing I'd want to assess is the hardware/infrastructure picture. Ideally, an instructor has a way to project what's on her computer to a big screen in front. Few schools are so equipped. What's fun about Python is having access to an interactive command line. Seeing something up front, and then doing it yourself, is what's best. But if there's just one or two computers in the class, and kids take turns running their favorite CDs, then it's a very different picture. Re Python itself, it'd have to be via the IDLE interface I think. That's the only friendly-enough environment. I'd do a lot of interactive one-liners, to give kids a sense of the "I type, computer replies" environment. Maybe just the concept of "average": >>> (3+2+1+4+6)/5.0 3.2 ... get into all that calculator stuff. >>> 3*3*3 27 >>> 3**3 27 Then simple programs: >>> def add1(n): return n+1 >>> add1(10) 11 Pretty soon, you're ready to talk about other syntax, like >>> for i in [1,2,3]: print i 1 2 3 And then you're ready for functions, which are ordered pairs of (domain, range) values (now we're really starting to do some math)! >>> domain = [1,2,3,4,5] >>> def f(x): return x**2 >>> range = map(f,domain) >>> range [1, 4, 9, 16, 25] That's enough for one day (heh). Kirby From pdx4d@teleport.com Mon May 15 00:15:56 2000 From: pdx4d@teleport.com (Kirby Urner) Date: Sun, 14 May 2000 16:15:56 -0700 Subject: [Edu-sig] What about CP4E in the inner city? In-Reply-To: <3.0.3.32.20000514141345.0325b9b4@pop.teleport.com> References: <3.0.3.32.20000512235805.03398290@pop.teleport.com> Message-ID: <3.0.3.32.20000514161556.03195818@pop.teleport.com> More ideas: Function consists of (domain,range) pairs, usually with some rule taking every domain input to its range output (but a rule is not really required). You never have the same domain value paired with two different range values in a function, although you may in a relation. Quiz: Which if the following is not a function? (a) [(a,b),(d,b),(e,c)] (b) [(1,2),(2,4),(3,9)] (c) [(1,a),(2,a),(1,b)] (d) [(0,0),(0,0),(2,0)] Answer: c (because (1,a) and (1,b) point the same domain value to different range values. Notice how the above question uses lists of tuples. Functions are a subclass of Relation. >>> domain = [1,2,3,4,5] >>> def f(x): return x**2 # raise input to 2nd power >>> range = map(f,domain) >>> range [1, 4, 9, 16, 25] >>> def g(x): return x + 1 # another function, add 1 to input >>> g(f(10)) # show f(g(x)) is not same as... 101 >>> f(g(10)) # g(f(x)) -- composition of functions 121 >>> domain = ['RE','DEA','HEA','FE'] # inputs needn't be numbers >>> def addD(arg): return arg + 'D' # here's the "add 'D'" function >>> range = map(addD,domain) >>> range ['RED', 'DEAD', 'HEAD', 'FED'] Let's have a program that accepts a rule, a domain, and returns the (domain, range) pairs. We'll call it makepairs. >>> def makepairs(rule,domain): outlist = [] for x in domain: outlist.append((x,rule(x))) return outlist >>> def f(x): return x**2 >>> makepairs(f,[1,2,3,4,5]) [(1, 1), (2, 4), (3, 9), (4, 16), (5, 25)] >>> makepairs(addD,['RE','DEA','HEA','FE']) [('RE', 'RED'), ('DEA', 'DEAD'), ('HEA', 'HEAD'), ('FE', 'FED')] Notice how we're passing a rule as a parameter. You can define any number of rules, and makepairs will do the same thing with all of them: apply it to each domain element and append the resulting (domain,range) tuple to a list. Note that the rule might just be a random number, with the domain having no roll in the computation. Introduct the Python 'choice' function in the random module. It simply picks randomly from a list. Lets run it 10 times against ice cream flavors (could be 31): >>> flavors = [['chocolate','vanilla','strawberry'] >>> for i in range(10): choice(flavors) 'chocolate' 'vanilla' 'strawberry' 'strawberry' 'chocolate' 'chocolate' 'chocolate' 'vanilla' 'chocolate' 'chocolate' Make a rule based on choice, and make (input,output) pairs: >>> def pickone(x): return choice(range(x)) >>> makepairs(pickone, [5,5,5,5,5]) [(5, 2), (5, 2), (5, 2), (5, 0), (5, 3)] >>> makepairs(pickone, [5,5,5,5,5]) [(5, 3), (5, 0), (5, 4), (5, 0), (5, 3)] >>> makepairs(pickone, [5,5,5,5,5]) [(5, 3), (5, 0), (5, 0), (5, 0), (5, 0)] We're definitely getting relations here, not functions. Introduce the concept of "inverse function". If f(domain)->range and g(range)->domain, then f and g are inverses. Example: >>> def f(x): return 3.0*x + 2 >>> def g(x): return (x-2)/3.0 >>> f(3) # f takes you to 11 11.0 >>> g(11) # g brings you back 3.0 >>> f(234309) # f(domain)->range 702929.0 >>> g(702929) # g(range)->domain 234309.0 Notice that a function that takes two domain values to the same range value, will not have an inverse function, only an inverse relation. Functions with inverse functions are known as one-to-one, meaning every domain value maps to a unique range value. Quiz: Which if the following is a 1-to-1 function? (a) [(a,b),(d,b),(e,c)] (b) [(1,2),(2,4),(3,9)] (c) [(1,a),(2,a),(1,b)] (d) [(0,0),(0,0),(2,0)] Answer: b What is the inverse function? Answer: [(2,1),(4,2),(9,3)] Let's write a utility to switch pairs, called makeinverse: >>> def makeinverse(inlist): outlist = [] for pair in inlist: newpair = (pair[1],pair[0]) outlist.append(newpair) return outlist >>> function = makepairs(addD,['RE','DEA','HEA','FE']) >>> function [('RE', 'RED'), ('DEA', 'DEAD'), ('HEA', 'HEAD'), ('FE', 'FED')] >>> makeinverse(function) [('RED', 'RE'), ('DEAD', 'DEA'), ('HEAD', 'HEA'), ('FED', 'FE')] And so on, on and on... Notice how we keep reusing the same rules and domains, over and over, gradually building up concepts, of domain, range, rule, function, relation, composition of functions, inverse function -- all core concepts in mathematics, and all easily implemented and sharable interactively in a Python-enabled environment. Kirby From faassen@vet.uu.nl Mon May 15 12:49:02 2000 From: faassen@vet.uu.nl (Martijn Faassen) Date: Mon, 15 May 2000 13:49:02 +0200 Subject: [Edu-sig] How best to publish?... In-Reply-To: <3.0.3.32.20000513155644.031c188c@pop.teleport.com> References: <200005121946.PAA19288@brocade.nexen.com> <00051214382002.03123@tpaine.yorktown.arlington.k12.va.us> <200005121946.PAA19288@brocade.nexen.com> <3.0.3.32.20000513144017.03165140@pop.teleport.com> <005901bfbd27$ea3e7840$8f280a3f@matrix> <3.0.3.32.20000513155644.031c188c@pop.teleport.com> Message-ID: <20000515134902.A1586@vet.uu.nl> Kirby Urner wrote: > > >In order for this to be possible there needs to be a commonly used > >format for publishing this type of material! > > I suppose -- but sounds like one of those elusive holy > grail type goals. DocBooks sounds expensive/proprietary, > so that eliminates it as a candidate in my book. It may sound expensive/proprietary, but actually it's an open standard used all over the free software/open source world. For instance by the Linux Documentation Project. http://www.oasis-open.org/docbook/ There are definitely free tools to work with DocBook; RedHat 6.2 comes with built-in docbook tools. (and as was mentioned earlier, there's a docbook component for Zope in development) DocBook may still be a bit of a hassle right now, and the tagset is huge, but it's not a closed standard. There's even a book on it online. Regards, Martijn From guido@python.org Mon May 15 14:30:54 2000 From: guido@python.org (Guido van Rossum) Date: Mon, 15 May 2000 09:30:54 -0400 Subject: [Edu-sig] ports In-Reply-To: Your message of "Sun, 14 May 2000 18:03:18 +0200." <001101bfbdcf$fffcc9e0$a7c58bd4@vincent> References: <000e01bfbc4e$873176a0$a9c48bd4@vincent><200005122018.QAA19372@brocade.nexen.com><002801bfbc4f$e6cd0f60$a9c48bd4@vincent> <200005122037.QAA19418@brocade.nexen.com> <001101bfbdcf$fffcc9e0$a7c58bd4@vincent> Message-ID: <200005151330.JAA10387@eric.cnri.reston.va.us> > I just want to write a simple firewall. Just to learn from it and > how they work. It could be quite handy if you can block all ports > except the usual ones. Like 21 en 80 for FTP and HTTP. The other > ports aren't server-sockets but they can "connect" to them with a > TELNET-client or with portscanners and stuff like that. How do you > block that? Or how do you can read the ports and print a message so > you know someone is scanning your ports or is trying to connect with > a lame trojan. A firewall is a difficult thing to try to build! It needs to be a dedicated computer with two internet interfaces -- one outside (connected to the Internet) and one inside (connected to your local area network). Then, you need to look at all packets as they come in (from both sides!), classify them according to their headers, and ship them out the other side (maybe after changing some header fields), or discard them, or send an error back. There's lots more to doing it efficiently. I would recommend that you find a good book on IP-level protocols first -- alas, I have no recommendations, since I have all this information from hearsay myself. You *may* be able to do some of this on a dual-ported Linux box using raw sockets with the ethernet cards in promiscuous mode. All this requires root permission and is very tricky... --Guido van Rossum (home page: http://www.python.org/~guido/) From fig@oreilly.com Mon May 15 15:26:17 2000 From: fig@oreilly.com (Stephen R. Figgins) Date: Mon, 15 May 2000 07:26:17 -0700 Subject: [Edu-sig] ports In-Reply-To: Your message of "Mon, 15 May 2000 09:30:54 EDT." <200005151330.JAA10387@eric.cnri.reston.va.us> References: <000e01bfbc4e$873176a0$a9c48bd4@vincent><200005122018.QAA19372@brocade.nexen.com><002801bfbc4f$e6cd0f60$a9c48bd4@vincent> <200005122037.QAA19418@brocade.nexen.com> <001101bfbdcf$fffcc9e0$a7c58bd4@vincent> <200005151330.JAA10387@eric.cnri.reston.va.us> Message-ID: <200005151426.HAA27197@rock.west.ora.com> >A firewall is a difficult thing to try to build! How about a packet sniffer or a port blocker? Those might be easier to start out with. You would still need to work with packets at the IP level. Although, these tasks are usually very process intensive. I know whenever we run a packetsniffer CPU cycles go way up and the system slows down a lot. Python might not be the most appropriate language for this kind of thing. I doubt there is a Python module for it. The only thing I have read about dealing with this low level network stuff is Appendix E of Unix Systems Programming for SVR4 (O'Reilly 1996). It describes the Data Link Provider Interface (DLPI) available on SVR4 systems. I suspect that the Linux kernel has an API to work directly with the kernel as well, and that might be even faster. Windows probably has its own API as well. If you know C, you could try getting a packet sniffing program and see how it was written. One using DLPI can be found in the example code from Unix Systems Programming for SVR4. ftp://ftp.oreilly.com/pub/examples/nutshell/sys.prog/ I love playing with low level stuff, you learn a lot that way. Stephen R. Figgins fig@oreilly.com From smorris@nexen.com Mon May 15 16:27:40 2000 From: smorris@nexen.com (Steve Morris) Date: Mon, 15 May 2000 11:27:40 -0400 (EDT) Subject: [Edu-sig] Things to come In-Reply-To: <3.0.3.32.20000513141410.03162124@pop.teleport.com> References: <00051214382002.03123@tpaine.yorktown.arlington.k12.va.us> <3.0.3.32.20000513141410.03162124@pop.teleport.com> Message-ID: <200005151527.LAA20899@brocade.nexen.com> Kirby Urner writes: > BTW, I don't consider PDFs all that web-unready (despite > previous poster's remarks). Just download and print. Sure, > you can't easily change the text, but not all published > documents are open source code in that sense. As "previous poster" mentioned above allow me to comment. I didn't say that PDF's were web unready. PDF is an excellent format for paper replacer electronic publishing where copyright protection is the issue and the author wishes to protect and control content. PDF is a graphical format which strips all intellectual content from electronic representation and turns it into a picture. This is a feature if you want to limit electronic access to the data (editing, searching, copy and paste etc.) Also PDF is a portable graphical format that can be represented on any OS and printer. I am not an FSF fanatic that thinks all intellectual property should be free. There is a place for protecting access and control of copyright material. It is an important part of commerce AND innovation. The creator and/or owner of intellectual property has the legal right to put controls on that property and this is a good thing. The point I want to make is that using PDF `IS' a control on user access and probably shouldn't be used if that is not the intent. Specifically (although perhaps not clearly) what I was suggesting is that PDF is a poor format for collaborative efforts where the users might be expected to modify and enhance the materials (translate to other formats etc) and perhaps contribute the enhancements back to the community. Thus it is a poor format for documentation intended for the public domain or its various sourceware equivalents. Putting it another way pdf is the documentation equivalent of distributing software as executables and not source code. > As an author/writer, I produce finished products, as well > as works in progress. The concept of plagiarism still > holds (i.e. if it's not your own work, don't pretend that > it is; credit your sources). Hmmm... I will give the benefit of the doubt and assume that this comment was general and not a characterization of people who dislike pdf file format; even though the juxtaposition made me a little queasy when I read it. I'm from the old school. I believe that when students cheat they should be expelled and only allowed back in with reasonable proof of contrition. Equivalent fate should follow professional plagarism or other forms of misrepresentation. From gherman@darwin.in-berlin.de Mon May 15 18:00:23 2000 From: gherman@darwin.in-berlin.de (Dinu C. Gherman) Date: Mon, 15 May 2000 19:00:23 +0200 Subject: [Edu-sig] Things to come References: <00051214382002.03123@tpaine.yorktown.arlington.k12.va.us> <3.0.3.32.20000513141410.03162124@pop.teleport.com> <200005151527.LAA20899@brocade.nexen.com> Message-ID: <39202D27.34D27029@darwin.in-berlin.de> Hello, although I do not see *that much* value in discussing formats on this list at length, I'd like to add some short comments about PDF. I'm certainly not an expert, but I did something like a semi-useful PDF parser and used some tools that others maybe haven't. PDF was never designed to be a collaborative editing format. It was designed to blurr the lines between paper and web, while improving certain multimedia capabilities that Post- Script did not have at all. Eventually, it is still a paper description language like PS, although much enricheded by now. So, one can hardly blame PDF/PS for not being something it never pretended to be. The comparison with executable binaries is closer to the truth, although it is not impossible at all to do something else but print a PDF on paper or watch it onscreen. In fact, there is a whole "prepress" industry of companies providing PDF modification tools, AGFA being one of the bigger fish in the pool. While this is likely often limited to color and font manipu- lation (PDF does *not* only contain graphics), it is absolute- ly *not* impossible to do more to PDF. As I promissed to be brief just that much: about 5 years ago I was using an appli- cation called Taylor on NeXTSTEP that would let you edit PS code *graphically* on something like a Pentium-90, and PDF is more or less just wrapped enriched PostScript... PDF is a proprietary format only in the sense that it was largely (fully?) developped by one company. But with the en- tire format being openly specified I can see no point in say- ing this is some evil thing limiting people's freedom to edit a PDF document. Nobody in the world prevents you from writing your PDF generation kit, that will put the same text that you see on the visible part of the file into some hidden compres- sed, searchable (?) ASCII stream that you can rather easily extract with even simple Python tools... So, let's not make this a religious war without a good reason. Regards, Dinu -- Dinu C. Gherman ................................................................ "The only possible values [for quality] are 'excellent' and 'in- sanely excellent', depending on whether lives are at stake or not. Otherwise you don't enjoy your work, you don't work well, and the project goes down the drain." (Kent Beck, "Extreme Programming Explained") Steve Morris wrote: > > Kirby Urner writes: > > BTW, I don't consider PDFs all that web-unready (despite > > previous poster's remarks). Just download and print. Sure, > > you can't easily change the text, but not all published > > documents are open source code in that sense. > > As "previous poster" mentioned above allow me to comment. I didn't say > that PDF's were web unready. PDF is an excellent format for paper > replacer electronic publishing where copyright protection is the issue > and the author wishes to protect and control content. PDF is a > graphical format which strips all intellectual content from electronic > representation and turns it into a picture. This is a feature if you > want to limit electronic access to the data (editing, searching, copy > and paste etc.) Also PDF is a portable graphical format that can be > represented on any OS and printer. > > I am not an FSF fanatic that thinks all intellectual property should > be free. There is a place for protecting access and control of > copyright material. It is an important part of commerce AND > innovation. The creator and/or owner of intellectual property has the > legal right to put controls on that property and this is a good > thing. The point I want to make is that using PDF `IS' a control on user > access and probably shouldn't be used if that is not the intent. > > Specifically (although perhaps not clearly) what I was suggesting is > that PDF is a poor format for collaborative efforts where the users > might be expected to modify and enhance the materials (translate to > other formats etc) and perhaps contribute the enhancements back to the > community. Thus it is a poor format for documentation intended for the > public domain or its various sourceware equivalents. > > Putting it another way pdf is the documentation equivalent of > distributing software as executables and not source code. > > > As an author/writer, I produce finished products, as well > > as works in progress. The concept of plagiarism still > > holds (i.e. if it's not your own work, don't pretend that > > it is; credit your sources). > > Hmmm... I will give the benefit of the doubt and assume that this > comment was general and not a characterization of people who dislike > pdf file format; even though the juxtaposition made me a little queasy > when I read it. I'm from the old school. I believe that when students > cheat they should be expelled and only allowed back in with reasonable > proof of contrition. Equivalent fate should follow professional > plagarism or other forms of misrepresentation. From pdx4d@teleport.com Mon May 15 18:05:28 2000 From: pdx4d@teleport.com (Kirby Urner) Date: Mon, 15 May 2000 10:05:28 -0700 Subject: [Edu-sig] Things to come In-Reply-To: <200005151527.LAA20899@brocade.nexen.com> References: <3.0.3.32.20000513141410.03162124@pop.teleport.com> <00051214382002.03123@tpaine.yorktown.arlington.k12.va.us> <3.0.3.32.20000513141410.03162124@pop.teleport.com> Message-ID: <3.0.3.32.20000515100528.03196ec4@pop.teleport.com> >Hmmm... I will give the benefit of the doubt and assume that this >comment was general and not a characterization of people who dislike >pdf file format; even though the juxtaposition made me a little queasy That's correct. "People who dislike the pdf file format" is not a category I've ever done any thinking with. A PDF has a lot in common with an everyday book you find in the library or in a book store. Unless you electronify these in some way, they're basically "graphics" in the sense you mean, and therefore "stripped of intellectual content" (again in the sense you mean -- sounds a bit strange, applied to Plato or Shakespeare). Of course you can photocopy books -- but you can print and photocopy PDFs too (this is how the LiveWires stuff was intended to be used -- has handouts in classrooms (and what I've been saying here on edu-sig is I'm personally more interested in good ideas than such camera ready content)). Certainly it's very easy to find good ideas in books, and reuse them, usually with some citation back to your source (not necessarily "the" source). When a community shares books and papers in this way to advance knowledge, I still call that "collaboration," even if there's not a lot of direct cutting and pasting per se. Note that the GNU license agreement, and many other copyleft schemes, aren't blanket "do any thing you want with this" agreements -- otherwise why have a "license" of any kind? In most of these schemes, you're agreeing to leave public what started public, and to making your modifications public as well (and I'm not "against" any of this -- these are fine conventions with a lot of good thinking behind them). Also, I don't think a PDF is really quite as "graphical" as you portray in most cases. You can easily search them by character string (once you've pulled them into a reader -- true, a web crawler won't do this), and cut and paste paragraphs from them (e.g. into Word). In a lot of ways, what they're good for is providing more control over appearance than HTML easily allows. I've you've gone to all the trouble to use Adobe PageMaker for something, and you want to share that with others, a PDF is often the way to go (I'm doing this today in fact -- complicated registration forms with grids that would be extremely difficult to do in HTML -- except as embedded GIFs). Kirby From smorris@nexen.com Mon May 15 19:23:32 2000 From: smorris@nexen.com (Steve Morris) Date: Mon, 15 May 2000 14:23:32 -0400 (EDT) Subject: [Edu-sig] Things to come In-Reply-To: <39202D27.34D27029@darwin.in-berlin.de> References: <00051214382002.03123@tpaine.yorktown.arlington.k12.va.us> <3.0.3.32.20000513141410.03162124@pop.teleport.com> <200005151527.LAA20899@brocade.nexen.com> <39202D27.34D27029@darwin.in-berlin.de> Message-ID: <200005151823.OAA21150@brocade.nexen.com> "Dinu C. Gherman" writes: > PDF was never designed to be a collaborative editing format. Exactly! ... > So, one can hardly blame PDF/PS for not being something >it never pretended to be. I guess I am not making myself clear. It is not a matter of blaming or criticising pdf. I just don't think it is right for collaborative projects. You don't seem to disagree in spite of your strenuous rebuttal. > The comparison with executable binaries is closer to the > truth, although it is not impossible at all to do something > else but print a PDF on paper or watch it onscreen. In fact, > there is a whole "prepress" industry of companies providing > PDF modification tools, AGFA being one of the bigger fish in > the pool. The comparison is even closer than you might think. I've dissasembled and even decompiled binary executables. :-) As you know the process isn't all that different from what PDF extraction and modification tools do. I've written simple postscript text extractors myself (in Postscript.) I originally mentioned this in my post but decided it would distract from the point and edited it out. I'm too wordy as it is. > So, let's not make this a religious war without a good reason. I'm not sure where you see a religious war happening. Do you disagree that pdf is less accessable than say html or DocBook? Do you disagree that that makes it less desirable as a collaboration language? Do you disagree that these are significant concerns when deciding how to publish in a collaborative project? Right or wrong these are my points and I fail to see how attempting to make these points (apparently unsuccessfully) makes me irrationally religious on a matter where simple facts should prevail. I think postscript is a great language in its place. I often write postscript code to create special purpose documents, documents that others might create in a drawing package. I love the almost object oriented graphics state with its gsave/grestore. A lot of good scull sweat went into designing Postscript. A fair number of older postscript (compatible :-) ) printers in the world have some of my software in them. One of them even has an undocumented builtin word that allowed me to more quickly calculate Mandelbrot images directly on the printer (my own private Easter Egg.) I think everything should be written in a format that can translate to pdf when desirable. It is just not a good sourcing language and that's what you need for collaborative documents. If a document is released on only one format it probably shouldn't be pdf. Regards Steve Morris From L. Humbert" Hi Jeffrey Elkner, I read your Mail in the Python-Edu-sig-Maillist. You may give=20 html2ps a try. It's written in Perl (8-; but you can use it to produce Textbooks out of HTML-Pages VERSION This manpage describes html2ps version 1.0 beta1. AVAILABILITY http://www.tdb.uu.se/~jan/html2ps.html ftp://ftp.tdb.uu.se/pub/WWW/html2ps/ AUTHOR Jan Karrman (jan@tdb.uu.se) =09I hope, it helps =09L. Humbert =20 PS:=20 ZOPE made another attempt in converting structured texts in diverse formats (PDF, I think) I didn't look closer, but you may find it on www.zope.org -- PPS: I am working with LyX (www.lyx.org) when I want to produce texts: fine layout and presentation --> latex --> PS=20 and PDF (with pdflatex): =20 http://www.elec.uq.edu.au/~rae/LyX/=20 I took a closer look at http://www.ReportLab.com http://www.ReportLab.com/demos/gallery.html It pytonish (;-) From gherman@darwin.in-berlin.de Tue May 16 11:07:25 2000 From: gherman@darwin.in-berlin.de (Dinu C. Gherman) Date: Tue, 16 May 2000 12:07:25 +0200 Subject: [Edu-sig] Things to come References: <00051214382002.03123@tpaine.yorktown.arlington.k12.va.us> <3.0.3.32.20000513141410.03162124@pop.teleport.com> <200005151527.LAA20899@brocade.nexen.com> <39202D27.34D27029@darwin.in-berlin.de> <200005151823.OAA21150@brocade.nexen.com> Message-ID: <39211DDD.9368A05E@darwin.in-berlin.de> Steve Morris wrote: > > I guess I am not making myself clear. It is not a matter of blaming or > criticising pdf. I just don't think it is right for collaborative > projects. You don't seem to disagree in spite of your strenuous > rebuttal. Ok, as it seems we have more in common than expected we should be able to settle this rather sooner than later... ;-) I guess what irritated me most was your comment about illegi- ble PDF files that were almost as bad as graphic bitmaps. I then tried to point out that you can actually do more to PDFs then your posting would let people believe. Let's not forget Jeff's original question: "What format is best suited to creating content that can be both web ready and gene- rate good looking printed copy from the same source?" Up to here the answer is, in all likelihood, PDF. If you add the requirement of collaborative editing and/or directly edit- able content, you're stepping, most likely, into the ?-ML world. My point, that I did not make yet, is that (human-)editable content that is web-ready and printer-friendly does not exist, unless you install a tag and escape-sequence filtering plugin into your brain ;-) (as you see I'm not putting enough trust in tools, here). If you do you will find out that LaTeX is, perhaps, as good a choice as other "tag sets". If we can agree on this, too, it all comes to some ASCII or UTF-8 format, minimally enriched with some of the tags that are currently en vogue, plus a set of tools to start conver- ting this "real content" into whatever you like or need or think you need, be it PDF, ?-ML, JPEG, paper, flying rugs... > I'm not sure where you see a religious war happening. Do you disagree > that pdf is less accessable than say html or DocBook? Do you disagree > that that makes it less desirable as a collaboration language? Do you > disagree that these are significant concerns when deciding how to > publish in a collaborative project? As I hope I clearified by now, PDF is great to distribute and "publish" documentation. It is almost as accessible as paper; certainly less than any pure ASCII/UTF-8-based format (but more than flying rugs). It is certainly hard to "colla- boratively" edit a PDF directly and it does not make sense. I *do* have trouble seeing is why ?-ML is *fundamentally* more appropriate (and not just more convenient) for that pur- pose than the good old vanilla ASCII/CVS combination (yes, I know it can better enforce structure, anything else?)? My guess is that any sophisticated ?-ML solution is going to sacrifice "easy collaboration" and "content editing" for rigid structure enforcing mechanisms. In any case, we'll need the tools anyway, but as Kirby said, it's the content that matters. If you want collaboration at the extreme go looking for web tools like Zope combined with products like ZWiki[1] (still premature, but already quite nice) and its siblings[2] in or- der to work on the "pure" content. While the emphasis is much less on structure (by definition) it will get you going much faster than any set of a few zillion tags. Having-it-all-at-once-is-never-easy'ly, Dinu [1] http://joyful.com/zwiki [2] http://c2.com/cgi-bin/wiki?WikiWikiClones (seems down right now...) -- Dinu C. Gherman ................................................................ "The only possible values [for quality] are 'excellent' and 'in- sanely excellent', depending on whether lives are at stake or not. Otherwise you don't enjoy your work, you don't work well, and the project goes down the drain." (Kent Beck, "Extreme Programming Explained") From pdx4d@teleport.com Wed May 17 16:00:11 2000 From: pdx4d@teleport.com (Kirby Urner) Date: Wed, 17 May 2000 08:00:11 -0700 Subject: [Edu-sig] Long Integer Fractions In-Reply-To: <3.0.3.32.20000512235805.03398290@pop.teleport.com> References: <3.0.3.32.20000512223714.03397878@pop.teleport.com> <3.0.3.32.20000512152819.03348fa4@pop.teleport.com> <8CE7FB278EDAC243852568CF005DCBC8.005DCBDE852568CF@eico.com> Message-ID: <3.0.3.32.20000517080011.03176f90@pop.teleport.com> On Fri, 12 May 2000 23:58:05 -0700 I wrote: >Anyway, I wrote a Fraction class that sort of does >this (computes with fractions) -- maybe I'm reinventing >a wheel or two here. Here's the code. Sorta rough. Also, depends on primes.py, which is zipped inside of python101.zip and linked from my math-thru-programming essay at: http://www.inetarena.com/~pdx4d/ocn/numeracy2.html I'll probably just end up sticking the Fraction class inside of primes.py eventually, as one more example application of its methods (gcd and lcm, which depend on getfactor which depends on isprime). The class has its limitations i.e. even though it deals with long integers, my getfactor method relies on prime factorizations, and this gets impractical using the brute force "trial by division" algorithm I'm using (I feature some other prime tests, such as Euler's and Fermat's, but they all have loop holes). Could be this Fraction idea is already in some module, but I haven't seen it yet, nor in the books I've looked at. As I recall, SmallTalk has native integer fractions. Scheme too? Given my "math through programming" focus, having the capability to do basic ops with long integer fractions might come in handy. Part of the idea is kids are learning Python as part of their basic math instruction. So they'll be able to see/read/comprehend the technique for dividing one fraction by another as: def __div__(self,n): # divide self by another fraction f = self.mkfract(n) recip = Fraction(f.denom,f.numer) return self.__mul__(recip) In other words, whereas a pre-Python conventional text might say "multiply by the reciprocal", here we see the __mul__ method being invoked, after creating Fraction recip with denom and numer reversed. One of the things traditionalists scream about when reading reformist math texts is that "dividing fractions" seems to be given short shrift. So these folks should be happy to see that I'm bringing it back -- albiet in a different notation (self-executing). ========================= roots.py ================= import primes class Fraction: numerator = 1L denominator = 1L def mkfract(self,n): # this method is to allow ops that mix Fractions # with non-decimal numbers e.g. 25 * (3/7) if type(n).__name__ in ['int','float','long int']: return Fraction(n) else: return n def __init__(self,num=1L,den=1L): self.numer = long(num) self.denom = long(den) self.simplify() def __mul__(self,n): f = self.mkfract(n) return Fraction(self.numer*f.numer, self.denom*f.denom) def __div__(self,n): # divide self by another fraction f = self.mkfract(n) recip = Fraction(f.denom,f.numer) return self.__mul__(recip) def simplify(self): # reduce numerator/denominator to lowest terms divisor = primes.gcd(abs(self.numer),abs(self.denom)) if divisor > 1: self.numer = self.numer/divisor self.denom = self.denom/divisor def __add__(self,n): # add self to another fraction f = self.mkfract(n) common = primes.lcm(self.denom,f.denom) sum = self.numer * common/self.denom sum = sum + f.numer * common/f.denom return Fraction(sum,common) def __sub__(self,n): # subtract another fraction from self return self.__add__(-n) def __neg__(self): # negate self return Fraction(-self.numer,self.denom) __rmul__ = __mul__ def str(self): return str(self.numer)+"/"+str(self.denom) def list(self): return [self.numer,self.denom] def float(self): return (self.numer*1.0)/(self.denom*1.0) Fraction in action (this version auto-simplifies): Python 1.5.2 (#0, Apr 13 1999, 10:51:12) [MSC 32 bit (Intel)] on win32 Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam IDLE 0.5 -- press F1 for help >>> from roots import Fraction >>> a = Fraction(2,3) >>> b = Fraction(3,2) >>> c = a+b >>> c.str() # str() is for seeing as string, nnn/ddd format '13L/6L' >>> c.float() # ...or you can output the decimal equivalent with float() 2.16666666667 >>> c=a-b >>> c.str() '-5L/6L' >>> a = Fraction(300,10) >>> a.str() # note autosimplification, i.e. 300/10 is now 30/1 '30L/1L' >>> (a*b).str() '45L/1L' >>> d=25*b # integer x Fraction OK >>> d.str() '75L/2L' Kirby PS: thanks to Stan Heckman for catching this typo: Fri May 12 22:28:33 2000 >>> halley(1000,4) # 4th root of 1000 (duh) 10.0 Shoulda been >>> halley(10000,4) # 4th root of 1000 (duh) 10.0 (double duh) From pdx4d@teleport.com Wed May 17 17:24:53 2000 From: pdx4d@teleport.com (Kirby Urner) Date: Wed, 17 May 2000 09:24:53 -0700 Subject: [Edu-sig] Example of math-thru-programming homework Message-ID: <3.0.3.32.20000517092453.0318419c@pop.teleport.com> Read: http://mathworld.wolfram.com/RiemannZetaFunction.html Write: a short program to approximate the Riemann Zeta function, rzeta. Show rzeta(n) where n = 2,3,4,5,6 and compare with results given on the above web page. Your function should match to at least 8 decimal places. Some teachers looking at the above would say "but this is NOT high school level" (because we don't study the Riemann Zeta function in hs). But the point is to learn math notation, just to know what the operators do. In this case, SIGMA is enough. And if you've been studying Python, you know that SIGMAs may be implemented as loops of the form: sum = 0 for i in range(1,n): sum = sum + f(i) return sum where f is some rule, perhaps passed as a parameter (see earlier postings re functions, relations etc.) So exactly how the Riemann Zeta function relates to the Gamma function and prime numbers is just "noise" from the point of view of extracting the info needed to write the program. We're teaching kids how to "dismiss the irrelevant" (which is another definition of thinking). They're learning to eyeball complicated math pages, infested with Greek letters, and not be intimidated. One possible answer: def rzeta(n): # approximate Riemann zeta function sum = 0.0 n = float(n) for i in range(1,100000): sum = sum + 1.0/i**n return sum Testing: >>> primes.rzeta(2) # math.pi**2/6.0 1.6449240668 >>> primes.rzeta(3) 1.20205690311 >>> primes.rzeta(4) # math.pi**4/90.0 1.08232323371 >>> primes.rzeta(5) 1.03692775514 >>> primes.rzeta(6) # math.pi**6/945.0 1.01734306198 From matthias@rice.edu Wed May 17 18:11:18 2000 From: matthias@rice.edu (Matthias Felleisen) Date: Wed, 17 May 2000 12:11:18 -0500 (CDT) Subject: [Edu-sig] Re: Long Integer Fractions In-Reply-To: <20000517160041.447C31CDAC@dinsdale.python.org> (edu-sig-request@python.org) References: <20000517160041.447C31CDAC@dinsdale.python.org> Message-ID: <200005171711.MAA29536@africa.cs.rice.edu> As I recall, SmallTalk has native integer fractions. Scheme too? Scheme has had precise rational arithmetic from the beginning. You should also know that the first AP case study for the C++ exam focused on large ints. If you approach schools with this material, you must know what exists. Otherwise AP teachers will think you're uninformed and you're just trying to push a new syntax on them. In general, you should know that the teachers on this list are not representative of teachers, esp AP teachers, in general. Most teachers are too undertrained and too busy to understand the fine details of languages, programming principles, and so on. (I suspect most would work in industry if they had more training. There are some dedicated teacher-souls.) Read up on your competition. -- Matthias From mkeller@cybercable.fr Wed May 17 21:21:18 2000 From: mkeller@cybercable.fr (Marc Keller) Date: Wed, 17 May 2000 22:21:18 +0200 Subject: [Edu-sig] Long Integer Fractions References: <3.0.3.32.20000512223714.03397878@pop.teleport.com> <3.0.3.32.20000512152819.03348fa4@pop.teleport.com> <8CE7FB278EDAC243852568CF005DCBC8.005DCBDE852568CF@eico.com> <3.0.3.32.20000517080011.03176f90@pop.teleport.com> Message-ID: <3922FF3E.38FCBEED@cybercable.fr> Kirby Urner wrote: > On Fri, 12 May 2000 23:58:05 -0700 I wrote: > >Anyway, I wrote a Fraction class that sort of does > >this (computes with fractions) -- maybe I'm reinventing > >a wheel or two.... Just to mention two such modules : surd.py (1995) and yarn.py (1996) found at Vaults of Parnassus http://www.vex.net/parnassus/ in the Maths resources. From pdx4d@teleport.com Wed May 17 21:16:37 2000 From: pdx4d@teleport.com (Kirby Urner) Date: Wed, 17 May 2000 13:16:37 -0700 Subject: [Edu-sig] Long Integer Fractions In-Reply-To: <3922FF3E.38FCBEED@cybercable.fr> References: <3.0.3.32.20000512223714.03397878@pop.teleport.com> <3.0.3.32.20000512152819.03348fa4@pop.teleport.com> <8CE7FB278EDAC243852568CF005DCBC8.005DCBDE852568CF@eico.com> <3.0.3.32.20000517080011.03176f90@pop.teleport.com> Message-ID: <3.0.3.32.20000517131637.031d57cc@pop.teleport.com> At 10:21 PM 05/17/2000 +0200, Marc Keller wrote: >Kirby Urner wrote: > >> On Fri, 12 May 2000 23:58:05 -0700 I wrote: >> >Anyway, I wrote a Fraction class that sort of does >> >this (computes with fractions) -- maybe I'm reinventing >> >a wheel or two.... > >Just to mention two such modules : surd.py (1995) and yarn.py (1996) >found at Vaults of Parnassus > http://www.vex.net/parnassus/ >in the Maths resources. Yep, I was reinventing a wheel. Not surprised. yarn.py looks good. gcd() is especially fine: def gcd(a, b): """Return GCD of two numbers. Duh! """ while b: a, b = b, a % b return a (That's Lanny's duh, not mine). Kirby From pdx4d@teleport.com Wed May 17 21:21:30 2000 From: pdx4d@teleport.com (Kirby Urner) Date: Wed, 17 May 2000 13:21:30 -0700 Subject: [Edu-sig] Re: Long Integer Fractions In-Reply-To: <200005171711.MAA29536@africa.cs.rice.edu> References: <20000517160041.447C31CDAC@dinsdale.python.org> <20000517160041.447C31CDAC@dinsdale.python.org> Message-ID: <3.0.3.32.20000517132130.031817d0@pop.teleport.com> At 12:11 PM 05/17/2000 -0500, Matthias Felleisen wrote: > > As I recall, SmallTalk has native integer fractions. Scheme too? > >Scheme has had precise rational arithmetic from the beginning. Yes, that was my recollection. Thanks. >You should also know that the first AP case study for the C++ exam focused >on large ints. If you approach schools with this material, you must know >what exists. Otherwise AP teachers will think you're uninformed and you're >just trying to push a new syntax on them. Yes, point taken. Please note that I'm not pushing anything re AP computer science. I'm simply prototyping how to teach a regular, garden variety mathematics curriculum with some computer language as part of the mix. This is the next step after the current "graphing calculator" craze is over. >Read up on your competition. Good advice, thanks again. Note that my competition is less C/C++ and more TI (Texas Instruments). Kirby From pdx4d@teleport.com Thu May 18 02:26:12 2000 From: pdx4d@teleport.com (Kirby Urner) Date: Wed, 17 May 2000 18:26:12 -0700 Subject: [Edu-sig] Long Integer Fractions In-Reply-To: <3.0.3.32.20000517131637.031d57cc@pop.teleport.com> References: <3922FF3E.38FCBEED@cybercable.fr> <3.0.3.32.20000512223714.03397878@pop.teleport.com> <3.0.3.32.20000512152819.03348fa4@pop.teleport.com> <8CE7FB278EDAC243852568CF005DCBC8.005DCBDE852568CF@eico.com> <3.0.3.32.20000517080011.03176f90@pop.teleport.com> Message-ID: <3.0.3.32.20000517182612.032d618c@pop.teleport.com> >Yep, I was reinventing a wheel. Not surprised. > >yarn.py looks good. gcd() is especially fine: > >def gcd(a, b): > """Return GCD of two numbers. Duh! > """ > while b: > a, b = b, a % b > return a > >(That's Lanny's duh, not mine). > >Kirby The above algorithm isn't original with Lanny however. Euclid wrote it up in Book 7, Propositions 1 and 2 of Elements, but Knuth thinks it goes even further back. Maybe Lanny wrote "Duh!" because this is one of the oldest algorithms on record, and would be recognized by just about anyone with training in computer science and numerical methods. Ergo, every K-12er should know it too, as per my evolving math-through-programming approach to CP4E (numeracy + computer literacy). Today was my birthday, and as a present to myself, I finally bought a copy of 'The Art of Computer Programming' by Donald E. Knuth, 3rd Edition, 1998, Addison Wesley -- a classic work in the field. I couldn't afford all 3 volumes though, just got volume 2. The gcd() stuff is in section 4.5.2. Kirby From tony@lsl.co.uk Thu May 18 11:44:40 2000 From: tony@lsl.co.uk (Tony J Ibbs (Tibs)) Date: Thu, 18 May 2000 11:44:40 +0100 Subject: [Edu-sig] Long Integer Fractions In-Reply-To: <3.0.3.32.20000517182612.032d618c@pop.teleport.com> Message-ID: <003a01bfc0b6$11d8b960$f0c809c0@lslp7o.lsl.co.uk> After looking at the doc string for the function gcd: >def gcd(a, b): > """Return GCD of two numbers. Duh! > """ Kirby Urner wrote: > Maybe Lanny wrote "Duh!" because this is one of the > oldest algorithms on record, and would be recognized > by just about anyone with training in computer science > and numerical methods. Umm - surely the "Duh" is because the doc string is rather meaningless? (on the lines of "well, I believe in writing doc strings, but heh, you already *knew* this was called "gcd" - what did you *think* it did?" - that is, recognising the function *name* rather than the algorithm...) (and assuming the doc string is aimed at someone querying what the function is for through an IDE of some sort, rather than at the person reading the code) Tibs -- Tony J Ibbs (Tibs) http://www.tibsnjoan.demon.co.uk/ Give a pedant an inch and they'll take 25.4mm (once they've established you're talking a post-1959 inch, of course) My views! Mine! Mine! (Unless Laser-Scan ask nicely to borrow them.) From pdx4d@teleport.com Thu May 18 18:46:18 2000 From: pdx4d@teleport.com (Kirby Urner) Date: Thu, 18 May 2000 10:46:18 -0700 Subject: [Edu-sig] Long Integer Fractions In-Reply-To: <003a01bfc0b6$11d8b960$f0c809c0@lslp7o.lsl.co.uk> References: <3.0.3.32.20000517182612.032d618c@pop.teleport.com> Message-ID: <3.0.3.32.20000518104618.032db19c@pop.teleport.com> >(on the lines of "well, I believe in writing doc strings, but >heh, you already *knew* this was called "gcd" - what did you >*think* it did?" - that is, recognising the function *name* >rather than the algorithm...) Yeah, that's a good explanation. I don't think the algorithm itself merits a "duh", even though it's simple to code. Still working on a paragraph to make it more intuitively obvious. My earlier edition of primes.py relied on having prime factorizations of a,b in order to get their gcd. Given prime factorizations are difficult to come by, my gcd method was inherently inefficient, though still useful from a pedagogical point of view (for students learning about primes, the concepts vs. the need for efficiency in computing). I've kept my old approach as the method 'incommon', but substituted Euclid's gcd() as per this thread -- already had an lcm() based on gcd(). Kirby From infonuovo@email.com Fri May 19 03:52:39 2000 From: infonuovo@email.com (Dennis E. Hamilton) Date: Thu, 18 May 2000 19:52:39 -0700 Subject: [Edu-sig] Long Integer Fractions In-Reply-To: <3.0.3.32.20000517182612.032d618c@pop.teleport.com> Message-ID: The Euclidian GCD algorithm is also the very first algorithm introduced in Volume 1. It is used for the initial discussion of what constitutes an algorithm, the conditions that an algorithm satisfies, and so on. (In the 3d edition of volume 1, Fermat's last theorem is indeed downgraded from difficulty [M50]. I can't remember if that leaves any [M50] problems in the book!) At some point, I would recommend section 1 of Volume 1 because it also establishes the mathematical concepts needed for the series of books, including basic number theory and other topics that are applied to great advantage in volume 2 and beyond. This might fit your interests perfectly. There is also a book on concrete mathematics that Knuth and a couple of his buddies put together, but the material in Volume 1 strikes me (no mathematician) as pretty challenging and interesting already. Meanwhile, happy birthday! For a long time, ACP vol.2 was one of the most dog-eared and referenced books in my personal library. -- Dennis -----Original Message----- From: edu-sig-admin@python.org [mailto:edu-sig-admin@python.org]On Behalf Of Kirby Urner Sent: Wednesday, 17 May 2000 18:26 To: edu-sig@python.org Subject: Re: [Edu-sig] Long Integer Fractions >Yep, I was reinventing a wheel. Not surprised. > >yarn.py looks good. gcd() is especially fine: > >def gcd(a, b): > """Return GCD of two numbers. Duh! > """ > while b: > a, b = b, a % b > return a > >(That's Lanny's duh, not mine). > >Kirby The above algorithm isn't original with Lanny however. Euclid wrote it up in Book 7, Propositions 1 and 2 of Elements, but Knuth thinks it goes even further back. Maybe Lanny wrote "Duh!" because this is one of the oldest algorithms on record, and would be recognized by just about anyone with training in computer science and numerical methods. Ergo, every K-12er should know it too, as per my evolving math-through-programming approach to CP4E (numeracy + computer literacy). Today was my birthday, and as a present to myself, I finally bought a copy of 'The Art of Computer Programming' by Donald E. Knuth, 3rd Edition, 1998, Addison Wesley -- a classic work in the field. I couldn't afford all 3 volumes though, just got volume 2. The gcd() stuff is in section 4.5.2. Kirby _______________________________________________ Edu-sig mailing list Edu-sig@python.org http://www.python.org/mailman/listinfo/edu-sig From pdx4d@teleport.com Thu May 18 19:45:00 2000 From: pdx4d@teleport.com (Kirby Urner) Date: Thu, 18 May 2000 11:45:00 -0700 Subject: [Edu-sig] More thoughts on CP4E (what it means to me) In-Reply-To: References: <3.0.3.32.20000517182612.032d618c@pop.teleport.com> Message-ID: <3.0.3.32.20000518114500.032de6e8@pop.teleport.com> At 07:52 PM 05/18/2000 -0700, Dennis E. Hamilton wrote: >The Euclidian GCD algorithm is also the very first algorithm introduced >in Volume 1. It is used for the initial discussion of what constitutes >an algorithm, the conditions that an algorithm satisfies, and so on. (In >the 3d edition of volume 1, Fermat's last theorem is indeed downgraded >from difficulty [M50]. I can't remember if that leaves any [M50] >problems in the book!) Yeah, I've been noticing the references to Euclid's Algorithm in Volume 1. I think I'd like to own Volume 1 eventually as well, eventually. Volume 3 too. >Meanwhile, happy birthday! For a long time, ACP vol.2 was one of the >most dog-eared and referenced books in my personal library. > >-- Dennis Thanks. Knuth's volumes are obviously a gold mine. I've looked at them before, but never owned or studied them in a lot of depth. I think a lot of what's in Knuth can/should be translated into to math-through-programming approach simply because now we have simpler languages (e.g. Python) and don't have to think in terms of the assembler-style MIX language he's using (important for computer science, but again, I'm looking through the eyes of a garden variety math teacher/student). Back when cars were new/rare, you had a lot of "professional drivers" around, many of them into racing, but also driving for others (i.e. as chauffers -- still requires a special license). And of course we _still_ have lots of pro drivers in the picture, but we also just have a lot of people who just drive cars (without being pros or anything). When people ask me what it is I do, I don't say "I'm a driver" (even though that's part of what I do). By analogy, I think CP4E means a lot more people programming computers, but not thinking of themselves as "professional programmers" (in the sense of being "software engineers"). It's not even the same thing as being an "amateur" exactly. I'm not an "amateur gourmet chef" just because I know how to follow a recipe. It's just a basic skill, and I'm as good at preparing food as I need to be at this time in my life. Just because I can change a light bulb doesn't make me an "amateur electrician" either. I type, but don't think of myself as a "professional typist". Likewise, we'll have a lot more people who feel competent to type some of their own code into a computer, maybe mixed with code by others, run it, debug it, and get results, without really thinking of themselves as "amateur software engineers" -- no, they're just able to program some, just like they can drive, scramble eggs, change a light bulb, put up a web page. No big deal. Part of what every kid learns. And there will also be those who study the art of computer programming in more depth, aspire to be pros. In sum, I don't think CP4E necessarily means "teaching more kids to become programmers" in the sense of "professional programmers" (although I expect that'd be a side-benefit). I think it means looking at programming as just one of those things people may do from time to time, like gardening. Sociologically speaking, I think this is happening with or without any funded initiatives such as CP4E. What we're seeing is a lot of retirees with computing skills, acquired in their professional lives, and now hanging out with their grandchildren. The kids see older folks enjoy "puttering around on their computers" much as they used to see older folks "puttering in their gardens". They get the idea that computer programming is something you do for fun, along with playing electronic games. It's a recreational activity. And part of the fun is teaching programming skills to younger people, watching them learn. In this way, an art or science percolates outward and into popular culture. A next generation grows up without the bias that you need some special qualifications or training to engage in activity X. No, you just needed to have a parent or grandparent who was into it, and had the time to show you the ropes. We've seen this pattern repeated throughout time. Kirby From Econoprof@aol.com Fri May 19 03:10:44 2000 From: Econoprof@aol.com (Econoprof@aol.com) Date: Thu, 18 May 2000 22:10:44 EDT Subject: [Edu-sig] More thoughts on CP4E (what it means to {Kirby}) Message-ID: Turn the telescope around the other way. (Sorry, this idea of amateurs not being professionals has me thinking of the very formal relationship between serious amateur astronomers and professionals. ) The reality of it is, the grandkids are teaching the grandparents who WEREN'T techies, how to do things like make web sites, fiddle the graphics, etc. THese are things the kids have figured out how to do on their own. The web has to serve as the missing techie grandma, as has already been pointed out here by others, for kids who don't have someone around to show them how to program. The professional programming world has pretty much adopted the idea of one-on-one mentoring of beginners. Unfortunately, any model of CP4E that relies on one-to-one skills transfers is setting itself up for failure. You could get a lot of people involved by having a volunteer in a local public library at night even one or two nights a month to answer questions that the parents or other involved adults can't answer. You have to publicize it widely. Or have an online equivalent. The Educational Program for Gifted Youth (EPGY) at Stanford has an online classroom that works really well. That same model could work for teaching programming on a one-to-many basis. Joan From matthias@rice.edu Fri May 19 04:59:05 2000 From: matthias@rice.edu (Matthias Felleisen) Date: Thu, 18 May 2000 22:59:05 -0500 (CDT) Subject: [Edu-sig] Re: Long Integer Fractions In-Reply-To: <20000518160042.F2DE41CE74@dinsdale.python.org> (edu-sig-request@python.org) References: <20000518160042.F2DE41CE74@dinsdale.python.org> Message-ID: <200005190359.WAA00297@africa.cs.rice.edu> Please note that I'm not pushing anything re AP computer science. I'm simply prototyping how to teach a regular, garden variety mathematics curriculum with some computer language as part of the mix. This is the next step after the current "graphing calculator" craze is over. Of course, *I* know and understand what you're doing. The problem is that others won't. We wrote a proposal to NSF in 1996 to re-do the mathematics curriculum with Scheme. We also threw in physical sciences and the dismal science. As soon as you mention "computer" you're no longer considered a "math" person. They need to bring in a "computer specialists" even if they agree that what you do looks like math. Of course, the CS person won't have a clue about this funny stuff you're doing. But then again, this fraction stuff looks like exact real arithmetic and, oh yes, btw, that was done in the AP CS case study from 1994.7 to 2000.5, so you're behind. See how it works? Been there. Done that. Next? -- Matthias From pdx4d@teleport.com Fri May 19 05:37:00 2000 From: pdx4d@teleport.com (Kirby Urner) Date: Thu, 18 May 2000 21:37:00 -0700 Subject: [Edu-sig] Re: Long Integer Fractions In-Reply-To: <200005190359.WAA00297@africa.cs.rice.edu> References: <20000518160042.F2DE41CE74@dinsdale.python.org> <20000518160042.F2DE41CE74@dinsdale.python.org> Message-ID: <3.0.3.32.20000518213700.0320900c@pop.teleport.com> >See how it works? Been there. Done that. Next? -- Matthias > Hah hah. Yeah, I agree, it's totally impossible, this fantasy of having a computer language just be part of regular, garden variety math course. That's just not how it's done. End of story. Kirby From pdx4d@teleport.com Fri May 19 06:04:19 2000 From: pdx4d@teleport.com (Kirby Urner) Date: Thu, 18 May 2000 22:04:19 -0700 Subject: [Edu-sig] More thoughts on CP4E In-Reply-To: Message-ID: <3.0.3.32.20000518220419.03205c64@pop.teleport.com> > = Joan = Kirby >The reality of it is, the grandkids are teaching the >grandparents who WEREN'T techies, how to do things >like make web sites, fiddle the graphics, etc. >THese are things the kids have figured out how to >do on their own. Yes, very true, this happens as well. Either way, a lot of new skills and abilities are seeping into kid culture, even if regular schooling is not the source. I used to quote a kid's website about rotation matrices. He put it up for peers interested in writing computer games. "They don't teach this in high school much, so we'll just have to teach each other" was his drift. >The web has to serve as the missing techie >grandma, as has already been pointed out here >by others, for kids who don't have someone around >to show them how to program. If they've got the web, yes. >The professional programming world has pretty much >adopted the idea of one-on-one mentoring of beginners. Is that so? I wasn't aware of that. One-on-one is great when you can get it (or can be -- you might get paired with someone incompatible), but one-to-many is the more usual mode, at least in the early stages of a discipline. >Unfortunately, any model of CP4E that relies on >one-to-one skills transfers is setting itself up >for failure. Agreed. >You could get a lot of people involved by having >a volunteer in a local public library at night >even one or two nights a month to answer questions >that the parents or other involved adults can't >answer. You have to publicize it widely. Or >have an online equivalent. The Educational >Program for Gifted Youth (EPGY) at Stanford has >an online classroom that works really well. That >same model could work for teaching programming >on a one-to-many basis. > >Joan These are good suggestions. Our Computer Center at Princeton did free classes (this was 1976-1980 for me, dunno if it's still like that today), and people from the community could just come learn. It really helps to have the right set-up, i.e. a projected monitor so the presenter can show stuff, including alpha-numeric, in big type. My view is that if you plan to pen kids inside an institution for 12 years (called a "school"), you should plan to make at least some computer programming a part of everyone's experience, and not just as some special "advance subject" off in a corner. Math class looks like a logical place to phase it in. Right now, they're using calculators a lot in math class, but I think that's an artificially limiting approach. But as Matthius points out, this is a really difficult idea to get across. Given the slowness of the text book upgrade cycle, innovations of this kind take maybe 20 years to implement, or more. And it's even worse than that. We have innovations having to do with polyhedra and sphere packing, that could make spatial geometry a whole lot more accessible and relevant to students. It's already been 20 years on those. Still no change. When I was I kid, Sputnik happened and that shook things up some. People were willing to try new things, to acknowledge that the curriculum was falling behind, needed to be suffused with new ideas. I'm not sure what the next Sputnik will be. Seems educators are pretty complacent about the status quo these days. Or maybe that's just my biased perspective. Kirby From tim_one@email.msn.com Fri May 19 09:10:20 2000 From: tim_one@email.msn.com (Tim Peters) Date: Fri, 19 May 2000 04:10:20 -0400 Subject: [Edu-sig] Long Integer Fractions In-Reply-To: Message-ID: <000701bfc169$ad23e1c0$722d153f@tim> [Dennis E. Hamilton] > ... > At some point, I would recommend section 1 of Volume 1 because it also > establishes the mathematical concepts needed for the series of books, > including basic number theory and other topics that are applied to great > advantage in volume 2 and beyond. This might fit your interests > perfectly. > > There is also a book on concrete mathematics that Knuth and a couple of > his buddies put together, but the material in Volume 1 strikes me (no > mathematician) as pretty challenging and interesting already. "Concrete Mathematics", by Graham, Knuth and Patashnik. A *much* better choice than Knuth Vol 1: CM was written because Vol 1 proved too telegraphic and intense for most students to master. CM pays much more attention to motivation, skips the highly esoteric results, and fills in some of the many gaps in Vol 1. Even so, the subject matter is difficult at points and the book makes no apologies for that, or for its refusal to "dummy it down". Most of it remains college-level material. somebody-should-teach-uncle-don-how-to-use-a-computer-ly y'rs - tim From gherman@darwin.in-berlin.de Fri May 19 09:17:08 2000 From: gherman@darwin.in-berlin.de (Dinu C. Gherman) Date: Fri, 19 May 2000 10:17:08 +0200 Subject: [Edu-sig] More thoughts on CP4E In-Reply-To: <3.0.3.32.20000518220419.03205c64@pop.teleport.com> References: <3.0.3.32.20000518220419.03205c64@pop.teleport.com> Message-ID: <958724228.3924f884df0b4@webmail.in-berlin.de> Kirby Urner wrote: > > When I was I kid, Sputnik happened and that shook > things up some. People were willing to try new > things, to acknowledge that the curriculum was > falling behind, needed to be suffused with new > ideas. I'm not sure what the next Sputnik will be. > Seems educators are pretty complacent about the > status quo these days. Or maybe that's just my > biased perspective. This is an entirely different point, IMHO, and much rooted in the "surrounding" culture experiencing the shock. What about this way of looking at it: Sputnik was a shock west of Greenwich, because it was laun- ched east of it? For NASA programs like Mercuri, Ge- mini, Apollo this was a good thing! But still, it was a political shock coming from outside that was lead- ing people to do something. Without judging if this kind of externel impetus is to be preferred over other ones, I don't see anything like this in the IT world of today. Maybe when indus- trial systems will eventually be so big and incompre- hensible that their development, integration and maintenance costs surpass the total of this planet's human workforce or maybe when the simplest things are made "intelligent" enough so they need to be program- mable "4E" there will be some shock again? At the moment I have more "confidence" in the former, after working for three years in telecom software, but this might change when I'll get my first fully pro- grammable mobile phone/organizer/remote control/posi- tion tracker... Pray with me it's going to be some- thing like Python under the hood, maybe with an ad- vanced voice interface from Tim Peters!? ;-) Kind regards, Dinu From tony@lsl.co.uk Fri May 19 12:01:24 2000 From: tony@lsl.co.uk (Tony J Ibbs (Tibs)) Date: Fri, 19 May 2000 12:01:24 +0100 Subject: Ramble - was RE: [Edu-sig] Long Integer Fractions In-Reply-To: <000701bfc169$ad23e1c0$722d153f@tim> Message-ID: <004701bfc181$92c9bda0$f0c809c0@lslp7o.lsl.co.uk> Dennis E. Hamilton mentioned Knuth's work on concrete mathematics, and Tim Peters enlarged: > "Concrete Mathematics", by Graham, Knuth and Patashnik. A *much* better > choice than Knuth Vol 1: CM was written because Vol 1 proved too > telegraphic and intense for most students to master. CM pays much more > attention to motivation, skips the highly esoteric results, and fills in > some of the many gaps in Vol 1. I bought it some while back, and its on my list of "projects for when I have lots of time" [1] - it definitely looks like something an ordinary person might have a chance with, whereas Knuth's "master tomes" are definitely not[2] - I've always found them irritating because they often address a problem domain I'm interested in, but I want an *answer*, not some Mixin code I have to back-translate into a real language (with the potential errors inherent in such a process), and then worry about not having understood the maths that went with it - and anyway the actual answer I want (in all such books) is often the result of one of the excercises. Humph (wanders off grumbling to himself). There is a serious point buried at the end there, though. The "useful" books we're sometimes referred to for algorithms, etc., are too often academically inclined - that is, they're aimed at education courses, rather than at people seeking immediate gratification(!). With infinite leisure time, that's no problem, but if you're trying to find an answer because you need to use it, finding that the book leads almost all the way and leaves the rest to be solved in an excercise is, shall we say, frustrating. Not the author's fault if a book doesn't match one's expectations, of course, but an irritation nonetheless. Is that last of relevance to the SIG? I feel somehow it should be (oddities of maths curricula won't start to be of great direct interest to me until our older son starts school later this year, and even then the system in the US is only likely to be of marginal interest...) Ah - I knew there was something I actually wanted to say that WAS of relevance: Please, whatever country you're from (I'll include mine as well!) can you remember that year NAMES for students don't mean anything outside your country? Things like "first grade" or "freshman", or even terms like "high school" or "college", don't mean anything outwith the national context. Saying what AGE you're talking about is a lot more useful (although even then it's not necessarily too much help - my son will start formal school at age 4, but I believe in Germany it wouldn't be until age 7, so talking about requirements for a 5 year old might be odd). Tibs [1] This is currently scheduled to be in about 18 years time, I think, given the children's ages (I'm an optimist!) along with learning to do kumihimo (braid) weaving, getting round to making a fairing for the recumbent trike, and all those esoteric Python things I never have time for. Hopefully more mundane projects like updating our web pages, finishing the mxTextTools meta language, writing a parser using it for the BikeCode, finalising the Joan Aiken bibliography, etc., will happen rather sooner. Hah. [2] The TeX book, on the other hand, is fun! (hmm - "The TeX book" is ambiguous - thinking about it, I mean both the book about TeX, and also the printed version of the tangled source code (or whatever the term is)) -- Tony J Ibbs (Tibs) http://www.tibsnjoan.demon.co.uk/ "Bounce with the bunny, strut with the duck Spin with the chickens now - CLUCK CLUCK CLUCK!" Sandra Boynton, Barnyard Dance! My views! Mine! Mine! (Unless Laser-Scan ask nicely to borrow them.) From pdx4d@teleport.com Fri May 19 15:48:59 2000 From: pdx4d@teleport.com (Kirby Urner) Date: Fri, 19 May 2000 07:48:59 -0700 Subject: Ramble - was RE: [Edu-sig] Long Integer Fractions In-Reply-To: <004701bfc181$92c9bda0$f0c809c0@lslp7o.lsl.co.uk> References: <000701bfc169$ad23e1c0$722d153f@tim> Message-ID: <3.0.3.32.20000519074859.032338c4@pop.teleport.com> >Please, whatever country you're from (I'll include mine as well!) can you >remember that year NAMES for students don't mean anything outside your >country? Things like "first grade" or "freshman", or even terms like "high >school" or "college", don't mean anything outwith the national context. >Saying what AGE you're talking about is a lot more useful (although even >then it's not necessarily too much help - my son will start formal school at >age 4, but I believe in Germany it wouldn't be until age 7, so talking about >requirements for a 5 year old might be odd). > >Tibs Good point. I remember how mystified I was going from 2nd grade into the 1st form at the Junior English School (Rome, Italy). Given I don't think we're talking very many school systems here, it might be easier to just learn the differences, and internally translate from jargon to jargon. Here's the US system: P Preschool K Kindergarden Grade Age (average) 1 6 2 7 3 8 Elementary School 4 9 5 10 6 11 7 12 Middle School (or Junior High) 8 13 9 14 Freshman 10 15 Sophomore High School 11 16 Junior 12 17 Senior 13 18 Freshman 14 19 Sophomore College 15 20 Junior 16 21 Senior Some variations exist. Your mileage may vary. Kirby From pdx4d@teleport.com Fri May 19 17:19:23 2000 From: pdx4d@teleport.com (Kirby Urner) Date: Fri, 19 May 2000 09:19:23 -0700 Subject: [Edu-sig] Long Integer Fractions In-Reply-To: <000701bfc169$ad23e1c0$722d153f@tim> References: Message-ID: <3.0.3.32.20000519091923.0323f4c0@pop.teleport.com> Tim Peters wrote (in part): >Even so, the subject matter is difficult at points and the >book makes no apologies for that, or for its refusal to >"dummy it down". Most of it remains college-level material. > >somebody-should-teach-uncle-don-how-to-use-a-computer-ly y'rs - tim OK, sounds like "Concrete Mathematics" (CM) is my next investment (along with more RAM for my wife -- she's got some RAM-hog bookkeeping software that's really bogging down). No doubt CM is college level, but the point of a well- designed curriculum is to "lower a ladder" consisting of "grades" or "rungs", such that by the time you get to the tough stuff, it's within reach, i.e. you're well prepared for it. The metaphors of "steepness" ("stepness") apply: learning curve, on-ramp, higher learning. These days, it seems to me that the conventional math curriculum is too slanted _away_ from engineering. Is it a class thing? Seems a lot of effete aristo-bluebloods who can't abide getting their hands dirty in anything like "machinery" (ooo, dirty) must have concocted the current cafeteria plan: "like, would you like some more calculus with your pre-calculus?" I have nothing (much) against calculus, but not if we divorce it from discrete math so completely that we can't do some delta-x alongside our dx, some SIGMA alongside or Riemann sums. Why not some simple Python in grade 11 (age 16): def mkderiv(domain,f,h): # function derivative builder (discrete) pairs = [] for x in domain: # for each member of domain... rvalue = (f(x+h)-f(x-h))/(2*h) pairs.append((x,rvalue)) # append tuple return pairs I'd like to open doors to OOP, cryptology (links between RSA and prime numbers), spatial geometry (rotation matrices, vector ops), number theory (Fermat's "little theorem") even spherical trig, sooner rather than later. Not in some elective AP rivulet, but in the main stream. Spending a whole year doing AP calculus, all that chain rule stuff, integrating by parts, seems way too much nuts and bolts specialization -- like, let's wait and see if you're really going to _use_ the calculus on the job (and _how_ will you use it?) and stop using this one neck of the woods as your "killing field" wherein to sort out "those with potential" from "those we feed pablum" in the math-sciences. That's a cruel design, plus seems increasingly unable to justify itself (the cost is way too high, given the "turn off" factor). Personally, I'm for letting the kids victimized by this obsolete system having their revenge (no, I'm not speaking from personal bitterness, I did fine in AP calc and taught it for two years at the HS level). thinking-it's-time-to-swing-the-wrecking-ball-ly yrs Kirby From jeremy@alum.mit.edu Sat May 20 02:18:23 2000 From: jeremy@alum.mit.edu (Jeremy Hylton) Date: Fri, 19 May 2000 18:18:23 -0700 (PDT) Subject: [Edu-sig] ports In-Reply-To: <200005151426.HAA27197@rock.west.ora.com> References: <000e01bfbc4e$873176a0$a9c48bd4@vincent> <200005122018.QAA19372@brocade.nexen.com> <002801bfbc4f$e6cd0f60$a9c48bd4@vincent> <200005122037.QAA19418@brocade.nexen.com> <001101bfbdcf$fffcc9e0$a7c58bd4@vincent> <200005151330.JAA10387@eric.cnri.reston.va.us> <200005151426.HAA27197@rock.west.ora.com> Message-ID: <14629.59359.414960.404942@localhost.localdomain> I think tcpdump and libpcap are the right place to start. The latter is a portable library for low-level network monitoring. See http://www.tcpdump.org/. I imagine it would be fairly easy to write a Python interface on top, probably using SWIG. Richard Stevens Unix Network Programming (or whatever the newest edition is called) is a good reference on these sorts of networking details. There is still a security problem. Capturing packets or using raw IP sockets, e.g. for sending ping or traceroute probe packets, requires setuid root programs on all (or nearly all) Unix systems. It is hard and inconvenient to write scripts that are setuid. If someone is still interested in this project, get in touch with me. I might be willing to lend a hand. Jeremy PS Why are we talking about this on the edu-sig? Is it a potential student project? If not, it probably makes sense to take the discussion elsewhere -- comp.lang.python? From pdx4d@teleport.com Tue May 23 17:39:01 2000 From: pdx4d@teleport.com (Kirby Urner) Date: Tue, 23 May 2000 09:39:01 -0700 Subject: [Edu-sig] Concrete Mathematics In-Reply-To: <3.0.3.32.20000519091923.0323f4c0@pop.teleport.com> References: <000701bfc169$ad23e1c0$722d153f@tim> Message-ID: <3.0.3.32.20000523093901.031b7bbc@pop.teleport.com> >OK, sounds like "Concrete Mathematics" (CM) is my next >investment Bought this book yesterday.[1] Looks good -- like Tim says, not as "intense and telegraphic" as 'The Art of Computer Programming', but with Knuth an author, bringing the same expertise. This is a text book for an actual course at Stanford. My initial reaction on reading these books is pleasurable, given how much it positively reinforces what I'd come up with in the 'Numeracy + Computer Literacy' series.[2] I'd sort of intuitively gravitated to Pascal's Triangle as a conceptual nexus, a "grand central station", and that's what these books do too, in the same context of talking about series. Knuth's Volume 1 even shows the tetrahedral packing of spheres (exploded view), a geometric interpretation of one of the Pascal columns. What's different about my Oregon Curriculum Network approach is that I develop this geometric connection more intensively, making use of Buckminster Fuller's concentric hierarchy as defined by 26 data points, plus a jitterbugging thereof -- which points I have the option to express in whole number coordinates, given the newfangled quadrays apparatus.[3][4] In going with polyheda as paradigm objects (in the OOP sense), I'm bringing in Computer Game Programming 101 (e.g. rotation matrices, even quaternions -- the 'Tomb Raider' engine is quaternion-based) which is more obviously relevant to a lot of kids -- as is spatial geometry in general (after all, we live in it). Also, whereas CM is earmarked as grad schooler or upper level, I'm pretty clear we have the option to alter the mix in the lower grades (pre-college) as we follow the CP4E thread where it most naturally leads (including into the math classroom). We already touch on a lot of these same topics at these earlier levels, but don't elaborate much (e.g. mention primes, but not Fermat's "little theorem" or the link to RSA encryption) because everything is geared towards an intensive calculus experience, for which you need precalc. Again, I have nothing against teaching calculus (was a calculus teacher myself for two years), and CM is full of Riemann sums, right along with the SIGMAs. And I didn't mean to say we should bleep over the chain rule or integration by parts, merely that it should be an option to NOT spend a _whole year_ doing calculus at the pre-college level AND to nevertheless be considered a top performing math student. In other words, if you want to be a "star" in math, you might do something more along the lines of CM (and my essay, ahem), and less along the lines of today's conventional AP calc course. These kinds of "remixings" happen all the time. Math ed is like music -- you go through phases, things come into vogue. I'm not saying we should get suckered by the latest fads (a lot of what the traditionalists are fighting as "fuzzy math" seems pretty faddish to me), but on the other hand, we need to be aware that long term trends alter the landscape in math, as in every other discipline. Change happens. My view is that pre-college math is out of synch with what kids could most use and benefit from. Calculus is over-stressed. Fluency with calculus ideas should be developed with an eye towards looking at other topics (a proof of relevance), with more intensive drilling in this subject saved for those most likely to need it professionally. Too much other good stuff is falling by the wayside in the rush to cram calculus into the final year of pre- college. We need a more accelerated path (i.e. a "first pass" tour of duty) through that material that doesn't get so bogged down in the nitty gritty and leave too many students turned off math for life. In making more room for other topics, we'll have the opportunity to phase in computer languages, Python included (it has a lot going for it, as do some of the others). Text books are too slow to match these needs. My approach is going to be based in cyberspace as the primary source medium, not text books. Some of our materials will be more like "finished goods", for teachers who want those (e.g. PDF handouts). But I'm primarily interested in ideas, with teachers customizing content to fit their local needs and students. A lot of this will be private sector and commercial, with curriculum supplies being sold via the same websites. Also working the DVD jukebox angle. Kirby 4D Solutions PS: I see Knuth has his own ideas about calculus reform, which I'm curious to read. Just have to find a way to get TeX files deciphered in Windows (or BeOS). [1] Ronald L. Graham, Donald E. Knuth, Oren Patashnik, Concrete Mathematics (2nd Edition), Addison-Wesley, 1994. [2] http://www.inetarena.com/~pdx4d/ocn/cp4e.html#python [3] http://www.inetarena.com/~pdx4d/ocn/oop7.html [4] http://www.teleport.com/~pdx4d/quadrays.html From pdx4d@teleport.com Tue May 23 19:43:32 2000 From: pdx4d@teleport.com (Kirby Urner) Date: Tue, 23 May 2000 11:43:32 -0700 Subject: [Edu-sig] Re: [synergeo] Concrete Mathematics In-Reply-To: <3.0.3.32.20000523093901.031b7bbc@pop.teleport.com> References: <3.0.3.32.20000519091923.0323f4c0@pop.teleport.com> <000701bfc169$ad23e1c0$722d153f@tim> Message-ID: <3.0.3.32.20000523114332.031eca24@pop.teleport.com> >PS: I see Knuth has his own ideas about calculus reform, >which I'm curious to read. Just have to find a way to >get TeX files deciphered in Windows (or BeOS). OK, I got the TeX thing figured out, and read/printed Knuth's ocalc.tex from http://www-cs-faculty.stanford.edu/~knuth/preprints.html (under miscellaneous). He's advocating earlier introduction of O-notation, a way of writing a quantity that isn't too specific (just right for some purposes). He wants to introduce the derivative in conjunction with O-notation (which CM introduces, as well as Volume 1 of TAOCP). For TeX on Win98, I'm using Christian Schenk's freeware, downloadable from http://www.miktex.de/ -- seems to work well. Kirby From pdx4d@teleport.com Sat May 27 22:36:41 2000 From: pdx4d@teleport.com (Kirby Urner) Date: Sat, 27 May 2000 14:36:41 -0700 Subject: [Edu-sig] Math Through Programming (newsgroup post) In-Reply-To: <3.0.3.32.20000523114332.031eca24@pop.teleport.com> References: <3.0.3.32.20000523093901.031b7bbc@pop.teleport.com> <3.0.3.32.20000519091923.0323f4c0@pop.teleport.com> <000701bfc169$ad23e1c0$722d153f@tim> Message-ID: <3.0.3.32.20000527143641.032399e8@pop.teleport.com> From: Kirby Urner To: koblitz@math.washington.edu, pdx4d@teleport.com Newsgroups: alt.education Subject: Math Through Programming Date: Sat, 27 May 2000 14:10:41 -0700 Reply-To: urner@alumni.Princeton.EDU Greetings sir -- I was just reading your "The Case Against Computers in K-13 Math Education (Kindergarten through Calculus)" at http://www.math.washington.edu/~koblitz/mi.html and wanted to respond. I would agree that the trade-offs may make computers an unwise investment, if that means axing music or art. Plus I'd agree with your point that computer science isn't the same thing as sitting down to use a computer. I haven't read Pea and Kurland's research, which you cite, and maybe their findings would deter me from the kind of curriculum writing I've been doing, the agenda I've been pressing. I don't know yet. I'm advocating a math-through-programming approach, wherein students have access to an interactive command line and learn to code algorithms. I go further, and suggest that the computer science notion of "objects" is worth porting over into mathematics more generally, including in K-12. A lot depends on pedagogy of course. You may see me as trying to resurrect an already failed approach, but I'm seeing enough successes to feel encouraged. Anyway, given you've obviously put a lot of thought into this topic, I wouldn't mind exchanging views. Here's a link to my post of earlier today at the Glenn Commission discussion area: http://webx.ed.gov/cgi-bin/WebX?14@^2321@.ee6b2ea/8 Kirby From wilson@visi.com Sun May 28 02:17:17 2000 From: wilson@visi.com (Timothy Wilson) Date: Sat, 27 May 2000 20:17:17 -0500 (CDT) Subject: [Edu-sig] Python in physics class Message-ID: Hi everyone, I'm a high school physics teacher, and I'd like to try some Python programming in my class next year. Be advised, I teach the math-lite version of our physics class. This will be the students' first exposure to computer programming, and many of them are less than stellar math students. I'm thinking that some basic programming would be an interesting way to introduce some of the mathematical reasoning and methods that they'll need. Does anyone have any experience with something like this, or any ideas for activities? -Tim -- Tim Wilson | Visit Sibley online: | Check out: Henry Sibley HS | http://www.isd197.k12.mn.us/ | http://www.zope.org/ W. St. Paul, MN | | http://slashdot.org/ wilson@visi.com | | http://linux.com/ From urner@alumni.Princeton.EDU Sun May 28 17:14:26 2000 From: urner@alumni.Princeton.EDU (Kirby Urner) Date: Sun, 28 May 2000 09:14:26 -0700 Subject: [Edu-sig] Not well supported on the Mac? Message-ID: In a thread starting at: http://forum.swarthmore.edu/epigone/geometry-research/pefrorsken Clifford J. Nelson advises me to forsake a Python-based approach for another language called Clean, because "Python is not supported well for the Mac." I thought I'd run that by comp.lang.python, as well as the Python edu-sig. Given the importance of Mac technology in the schools, limitations re Python on that platform are of some relevance to the "Computer Programming for Everyone" (CP4E) thread. Please reply cc: pdx4d@teleport.com -- no need to post a reply to the thread mentioned above, as that's a pure geometry research list and doesn't need to get bogged down in technical discussions re Mac OS, Tkinter, IDLE or whatever (I've already posted enough along those lines, will maybe summarize feedback I get re Mac). Kirby From pdfernhout@kurtz-fernhout.com Sun May 28 20:24:21 2000 From: pdfernhout@kurtz-fernhout.com (Paul Fernhout) Date: Sun, 28 May 2000 15:24:21 -0400 Subject: [Edu-sig] Not well supported on the Mac? References: Message-ID: <39317265.59AA6467@kurtz-fernhout.com> Kirby- This is the reason I raised the issue of cross-platform support on this list on Feb 4, 2000 ("Common Graphical Framework for Python Tutorials?"). From what I read in comp.lang.python, TK support on the Mac has historically been questionable (although the base command line system otherwise works well). My personal feeling is that widespread acceptance of CP4E absolutely requires addressing seamless cross-platform support at the GUI level (like Squeak or LearningWorks), as well as incorporating numerous advanced features found to varying degrees in other systems (like Squeak, LearningWorks, or Dr. Scheme). http://www.squeak.org http://learningworks.neometron.com/ http://www.cs.rice.edu/CS/PLT/packages/drscheme/ Some discussion on edu-sig of needed features in Python to support CP4E has been discouraged as "vaporware". There is much truth to comments made here that people posting suggestions may have no plans or desire to implement them any time soon. But I feel that it is equally true that it is useful at the beginning to have some level of collaborative discussion of system needs and features (and prior art) before it make sense for anyone to make a big commitment to CP4E-specific implementation. Many people who are not implementers can contribute to such discussions based on their previous experience in education or with educational software (in a sense, as "requirements analysts"). There is also much value in just discussing what one can do easily on the PC with the existing implementation. I have greatly enjoyed your posts on your personal experiences and examples doing so. In many open ended systems with a body of useful scripts there are three categories of participants. Users: 90% use what is there (and complain/suggest and tell their friends). Authors: 9% write simple things and make minor improvements in existing scripts. They know what the important/feasible issues are, and do much of the support of the 90% in answering common questions, and making simple fixes and changes. Gurus: 1% understand the system through and through and do the bulk of the implementation, and do much of the support of the 9%. All three types of participants contribute in their own ways to making a system a success. Each level recruits from the previous level (World->User, User->Author, Author->Guru). In the case of CP4E, this would imply: Users: 90% of educators would use Python based materials that already exist (scripts, tutorials, and exercises). This group explains to the rest of the world why Python makes sense for education and where to get materials. They make creative suggestions they can't implement (like "Python should have a cross-platform GUI"), but in effect, these suggestions and complaints are producing "requirements". Authors: 9% of educators might write simple new materials, or improve a script or extend an exercise. This group helps support the 90% with minor customizations, and encourages some users to become authors. Gurus: 1% of educators are going to make significant changes or additions to Python and related educational materials to support CP4E. Much of these improvements are driven by observation of the 90% and more direct interaction with the 9%. This group encourages some authors to do bigger projects (especially if they complain or suggest too much :-) and take over aspects of system maintenance (becoming gurus). In the case of the Mac issue, which is a deep issue, only 1% of educators could do something about this, and only a fraction will be interested. So, this means we probably need about 1000 educators involved with CP4E to get this Mac support issue resolved (900 users, 90 authors, and 10 gurus, of which one guru will be a Mac enthusiast and also interested in resolving cross-platform issues). -Paul Fernhout Kurtz-Fernhout Software ========================================================= Developers of custom software and educational simulations Creators of the Garden with Insight(TM) garden simulator http://www.kurtz-fernhout.com Kirby Urner wrote: > > In a thread starting at: > http://forum.swarthmore.edu/epigone/geometry-research/pefrorsken > > Clifford J. Nelson advises me to forsake a Python-based > approach for another language called Clean, because > "Python is not supported well for the Mac." > > I thought I'd run that by comp.lang.python, as well as > the Python edu-sig. Given the importance of Mac technology > in the schools, limitations re Python on that platform > are of some relevance to the "Computer Programming for > Everyone" (CP4E) thread. > [snip] > > Kirby From dscherer@cmu.edu Sun May 28 21:19:28 2000 From: dscherer@cmu.edu (David Scherer) Date: Sun, 28 May 2000 16:19:28 -0400 Subject: [Edu-sig] Python in physics class Message-ID: > I'm a high school physics teacher, and I'd like to try some Python > programming in my class next year. Be advised, I teach the > math-lite version of our physics class. > I'm thinking that some basic programming would be an interesting way to > introduce some of the mathematical reasoning and methods that > they'll need. I'm developing "Visual," a 3D graphics library for Python that will be used next year for student programming in the "Matter and Interactions" introductory physics course at Carnegie Mellon University (see http://cil.andrew.cmu.edu/mi.html). Matter and Interactions is a college course that is more advanced than your "math-lite" high school course, but Visual is designed to be as easy to use as possible. Here's a Python program for a 3D animation of a bouncing ball. Notice the lack of explicit graphics code, apart from the creation of the "floor" and "ball" objects: ---------------------------- from visual import * floor = box(length=5, height=0.5, width=5, color=color.purple) ball = sphere(pos=(0,4,0), color=color.red) ball.velocity = vector(0,-1,0) dt = 0.01 while 1: rate(100) ball.pos = ball.pos + ball.velocity*dt if ball.y < 1: ball.velocity.y = -ball.velocity.y else: ball.velocity.y = ball.velocity.y - 9.8*dt ---------------------------- Notice that ball.pos and ball.velocity are vectors; Visual's vector type takes care of the details of vector arithmetic. rate() is a helpful function that limits the number of simulation steps per second, so that the animation runs at the same speed on all machines. A public alpha release of Visual, complete with physics-oriented example programs, will be available within a few days. Since we need to provide students with a single installer, Visual will come packaged with its own Python 1.5.2 installation and a version of IDLE modified to suit our needs. A bare module will also eventually be available. Visual currently runs on Windows and Linux, and we are planning a (hopefully "well-supported," Kirby :) Macintosh version as well. I'll post a link when I have one. Dave From pdx4d@teleport.com Sun May 28 23:45:50 2000 From: pdx4d@teleport.com (Kirby Urner) Date: Sun, 28 May 2000 15:45:50 -0700 Subject: [Edu-sig] Not well supported on the Mac? In-Reply-To: <39317265.59AA6467@kurtz-fernhout.com> References: Message-ID: <3.0.3.32.20000528154550.00737844@pop.teleport.com> At 03:24 PM 05/28/2000 -0400, Paul Fernhout wrote: >Kirby- > >This is the reason I raised the issue of cross-platform support on this >list on Feb 4, 2000 ("Common Graphical Framework for Python >Tutorials?"). Yes, I understand this better now. When I say Python is already finished enough to support my math-through-programming approach, I'm more thinking of the Windows/Linux implementation as the paradigm. Yet schools have a lot of Macs. It still sounds like what I'm up to would work on a Mac, since I'm not doing anything multi-threaded or Tk-based (yet). Mostly, I'm just focussing on math students/teachers who already use calculators a lot, and suggesting Python's interactive environment as a next logical step (i.e. when moving from calculators to computers, let's not focus on spreadsheets, or dynamic geometry software to the exclusion of any real programming language). For this approach to work, you need, at minimum, an interactive command line, and a suitable text editor for writing/saving modules (programming interactively by typing defs at the command line is insufficient). Having keyword color coding in your editor sure helps kids learning the language -- at the command line too, as per IDLE. If the Mac doesn't have this, that's a problem from my point of view. Most of the stuff I'm doing would transfer to DrScheme easily. The one thing I'm not sure about is the lingo of objects as methods + data. DrScheme seems to use the paradigm of "data types" vs. "objects" and the implementation of objects is considered an advanced topic. But I prefer a way of conceptualizing that makes something called "objects" accessible near the bottom of the learning curve, because I want to talk about "vector objects" and "matrix objects" (no, not "types") without waiting for students to reach any guru level in the language. It may be a nomenclature issue. All that being said, I'm entirely in agreement with you that we need to attract a critical mass of new gurus with a commitment to the Mac platform, so that we don't so much rely on the 1% who do all the core enchancements. If, that is, we're serious about CP4E making inroads in schools. Either that, or wait for the UNIX-based MacOS (but that will be a slow upgrade process I think). Kirby From pdx4d@teleport.com Mon May 29 21:06:24 2000 From: pdx4d@teleport.com (Kirby Urner) Date: Mon, 29 May 2000 13:06:24 -0700 Subject: [Edu-sig] Quadray Coordinates: A Python Implementation In-Reply-To: <3.0.3.32.20000528235830.0073f03c@pop.teleport.com> References: <3932102A.1A8A8EF5@teleport.com> <39317A4B.A794CE8B@teleport.com> <3931E52F.F3029D37@usit.net> <3.0.3.32.20000528231758.0073c854@pop.teleport.com> Message-ID: <3.0.3.32.20000529130624.03234db4@pop.teleport.com> New essay re Quadrays & Python -- more "math through programming" i.e. another example of my "numeracy + computer literacy" approach. Kirby Oregon Curriculum Network ============================== From: Kirby Urner To: pdx4d@teleport.com Newsgroups: comp.lang.python,sci.math Subject: Quadray Coordinates: A Python Implementation Date: Mon, 29 May 2000 13:01:23 -0700 I've just put up a first web-ready edition of: Quadray Coordinates: A Python Implementation http://www.inetarena.com/~pdx4d/ocn/pyqvectors.html Thanks to those of you who offered suggestions for improvements (draft text posted earlier to this newsgroup). Kirby From dscherer@cmu.edu Tue May 30 04:10:59 2000 From: dscherer@cmu.edu (David Scherer) Date: Mon, 29 May 2000 23:10:59 -0400 Subject: [Edu-sig] Announcement: Visual Message-ID: The public alpha of the Visual library that I promised yesterday is now available at http://download.sourceforge.net/visualpython/visualpython-0.1.exe (Win32 binary). Visual is a retained-mode 3D graphics library designed for extreme ease-of-use in scientific applications. We will be using it in an introductory physics course, where we need to teach students without prior programming experience to write graphical simulations in just two lectures. Visual will hopefully prove useful for other purposes, too. The package includes a lot of things: - A Python 1.5.2 installation - The Visual library - A few example programs for Visual - Numerical Python - An unshared Tcl/Tk library (like Python 1.6) - A modified version of IDLE - executes scripts in a separate process for stability - excludes system modules from tracebacks - usability changes, including reorganized menus - working HTML documentation (F1) - A pseudomodule that changes Python's division semantics: import floatdivision print 3/4 # 0.75 Still in the works: - Packages for Linux - Source code in CVS - A separate download for the Visual module alone - Macintosh support - More features for Visual, of course This is intended to be an all-in-one installation program for our students. We are calling the whole distribution "Visual Python." It might be a good start for anyone else planning to use Python in a pedagogical setting, regardless of whether they plan to use Visual itself. At present you can't get the Visual module except by uninstalling Python 1.5.2 and installing this distribution instead. I apologize if that's inconvenient for you. Bugs or feature requests should go in the bug tracking system at http://sourceforge.net/bugs/?group_id=6013 For everything else, contact me (mailto:dscherer@cmu.edu) Dave From pdx4d@teleport.com Tue May 30 19:58:23 2000 From: pdx4d@teleport.com (Kirby Urner) Date: Tue, 30 May 2000 11:58:23 -0700 Subject: [Edu-sig] Example exercise for learning Python In-Reply-To: Message-ID: <3.0.3.32.20000530115823.0073f6f4@pop.teleport.com> Here's an exercise for learning Python syntax -- a subclass of "multiple ways of getting the same result" (in general a useful approach). Some of you may have seen this as a thread on comp.lang.python where I asked for ideas for compactly generating a list of n lists with m 0s in each. Or, as a pictogram: m m m m m m n [[0,0,0,0,0,0], n [0,0,0,0,0,0], n [0,0,0,0,0,0], n [0,0,0,0,0,0]] Example: >>> output = zeromatrix(3,3) # 3 lists of 3 members each >>> output [[0,0,0],[0,0,0],[0,0,0]] >>> output = zeromatrix(3,4) # 3 lists of 4 members each >>> output [[0,0,0,0],[0,0,0,0],[0,0,0,0]] def zeromatrix(n,m): # my first attempt output = [0]*n for i in range(n): output[i]=[0]*m return output def zeromatrix(n,m): # slightly better output = [] for i in range(n): output.append([0]*m) return output from copy import copy def zeromatrix (n, m): # from Alex, interesting line = n * [0] matrix = map (copy, m * [line]) return matrix def zeroMatrix(rows, cols): # from Edward, getting shorter return map(lambda x, c=cols: [0]*c, [0]*rows) def zeromatrix(m, n): # from Tamito Kajiyama, concise to the # point of cryptic (fun!) return map(lambda x: [0]*x, [n]*m) Of course some people just told me to use NumPy's zero matrix function, but that'd be missing the experience of rolling your own. Note that the follow WILL NOT work: def zeromatrix(n,m): return [[0]*m]*n because it's actually reusing the same object n times. So, using the above def, if you go: >>> output = zeromatrix(3,3) >>> output [[0,0,0],[0,0,0],[0,0,0]] >>> output[0][0] = 5 >>> output [[5, 0, 0], [5, 0, 0], [5, 0, 0]] ... which is NOT the behavior I want. Kirby From pdx4d@teleport.com Tue May 30 20:10:59 2000 From: pdx4d@teleport.com (Kirby Urner) Date: Tue, 30 May 2000 12:10:59 -0700 Subject: [Edu-sig] Announcement: Visual In-Reply-To: Message-ID: <3.0.3.32.20000530121059.0073f3e8@pop.teleport.com> >At present you can't get the Visual module except by uninstalling Python >1.5.2 and installing this distribution instead. I apologize if that's >inconvenient for you. Interesting, same approach as Arthur Siegel's for PyGeo i.e. customize an IDLE for a front end. See: http://www.python.org/pipermail/edu-sig/2000-February/000190.html Maybe IDLE is designed with application-developer customization in mind? I thought Arthur's approach sounded kinda idiosyncratic, but since IDLE is one of the key ways in which user experience of Python is mediated, I guess it makes some sense to mess with it. Arthur says PyGeo code is not tied to an old Python, i.e. his code should run under Python 1.6. This idea of uninstalling a current Python in order to run a Python-based application doesn't sit well with me. Seems a custom IDLE should/could roll forward (and go in its own directory, so I wouldn't have to touch the working generic IDLE). BTW, I never could get PyOpenGL to install properly on Win98. The web notes say Win98ers might encounter a certain error message, which I did, and the workaround didn't seem to work. Kirby From dscherer@cmu.edu Tue May 30 20:44:22 2000 From: dscherer@cmu.edu (David Scherer) Date: Tue, 30 May 2000 15:44:22 -0400 Subject: [Edu-sig] Announcement: Visual In-Reply-To: <3.0.3.32.20000530121059.0073f3e8@pop.teleport.com> Message-ID: > Interesting, same approach as Arthur Siegel's for PyGeo i.e. > customize an IDLE for a front end. We are customizing IDLE because we need features that the "official" IDLE will probably have someday, but we can't wait. It's our hope that eventually either our changes or equivalent functionality will find their way into the official IDLE, and we can distribute the "standard" version. However, edu-sig isn't the right place to discuss this. > This idea of uninstalling a current Python in order to run > a Python-based application doesn't sit well with me. As I said in my announcement, this is an alpha release of an installer targeted at students in Matter & Interactions, the vast majority of whom will not already have Python. It's also a concrete proposal for how Python might be distributed to educational audiences. This is highly relevant to "Python in Education" - right now just the process of installing and supporting Python, Tcl/Tk, a late version of IDLE, Numeric, other libraries you happen to need, and your course materials, on 30 computers in a school lab is painful enough to discourage someone from using Python. > Seems a custom IDLE should/could > roll forward (and go in its own directory, so I wouldn't have > to touch the working generic IDLE). All of the individual components of the Visual distribution could be, and eventually will be, distributed separately. However, I haven't yet had time to package them that way, and I assure you that it would take you much more time to install all of them separately than to replace your 1.5.2 distribution with ours; and in the end you would probably have exactly the same things on your disk. I suggest you try it - you will probably find it an improvement, and it should be a perfectly good superset of a stock 1.5.2 installation. If you find a way in which it isn't, I would appreciate the bug report! If you are worried about keeping the old version of IDLE, make a copy of your Tools\IDLE directory; it will work fine. Dave From pdx4d@teleport.com Tue May 30 21:03:44 2000 From: pdx4d@teleport.com (Kirby Urner) Date: Tue, 30 May 2000 13:03:44 -0700 Subject: [Edu-sig] Announcement: Visual In-Reply-To: References: <3.0.3.32.20000530121059.0073f3e8@pop.teleport.com> Message-ID: <3.0.3.32.20000530130344.006b4840@pop.teleport.com> >I suggest you try it - you will probably find it an improvement, and it >should be a perfectly good superset of a stock 1.5.2 installation. If you >find a way in which it isn't, I would appreciate the bug report! If you are >worried about keeping the old version of IDLE, make a copy of your >Tools\IDLE directory; it will work fine. > >Dave I'm interested in your project, and have no doubt that the issues you raise are indeed relevant to Python in education (i.e. the number of puzzle pieces one might need to assemble). What I'm worried about keeping is a new version of IDLE. I'm using Python 1.6a exclusively these days (works OK for my needs, I've blown away 1.5.2). Will I be able to install your package in a separate tree on my G: drive without messing with 1.6? Kirby From dscherer@cmu.edu Tue May 30 21:29:12 2000 From: dscherer@cmu.edu (David Scherer) Date: Tue, 30 May 2000 16:29:12 -0400 Subject: [Edu-sig] Announcement: Visual In-Reply-To: <3.0.3.32.20000530130344.006b4840@pop.teleport.com> Message-ID: > Will I be able to install your package in a separate tree on > my G: drive without messing with 1.6? I've now tried this myself. visualpython-0.1 and py16a2 installations appear to coexist peacefully, and their default installation paths (c:\Python and c:\Python16, respectively) do not conflict. Dave