From ajsiegel at optonline.net Thu Jan 1 10:52:50 2004 From: ajsiegel at optonline.net (Arthur) Date: Thu Jan 1 10:52:56 2004 Subject: [Edu-sig] re: promoting computer literacy through programming python Message-ID: <0HQT00DV1ISCQG@mta6.srv.hcvlny.cv.net> John - >I also ignored all the personal interactions ... Yeah. That would be the novel, not the dissertation. But the beat goes on. And as much as I enjoyed the dissertation (and I did) and I am disappointed that one theme, advocated strenuously by one AS, was implicitly rejected without analysis, evidence, or comment. The "Disadvantages of Python" section includes both case sensitivity (with some equivocation) and zero based list indexing. There is also discussion of integer division with accepts in all respects the thinking that links the issue as a significant barrier to entry for beginners. My consistent position has been that these entry level barriers are demonstrably trivial next to the true and significant barriers inherent in the process of learning to program, as well expressed in Dethe's "Programming is hard" quote introducing Chapter 2. The particular "barriers" under analysis can as well be seen to represent aspects of a gentle introduction to the inherent uniqueness of the programming milieu, as distinct from the natural language or mathematical milieu. The adjustment to which is a necessity. Remove all trivial barriers, and we are only left with the significant ones. There is a wall, rather than a ramp leading over a wall. My Zen on the issues, and nothing more. But I feel strongly, and I think there is enough merit to require some evidence, counter-argument to reject out-of-hand in a study attempting some scientific grounding. Art From urnerk at qwest.net Thu Jan 1 13:57:29 2004 From: urnerk at qwest.net (Kirby Urner) Date: Thu Jan 1 13:57:32 2004 Subject: [Edu-sig] re: promoting computer literacy through programming python In-Reply-To: <0HQT00DV1ISCQG@mta6.srv.hcvlny.cv.net> Message-ID: > My Zen on the issues, and nothing more. But I feel strongly, and I think > there is enough merit to require some evidence, counter-argument to reject > out-of-hand in a study attempting some scientific grounding. > > Art I didn't quite get your point Art. It sounds to me like you were agreeing with Dethe that programming is difficult, beyond the trivial things like 0-based indexing or case sensitivity. But I thought John took that up, as a kind of tension, e.g. in math class how relevant would it be to move towards the "most concise" form of an algorithm, once you've already got a working version? He made the analogy to rhetoric. Perhaps in math class, we just don't have time to always buff and polish our rough and ready efforts. I'd tend to agree. Were you perhaps alluding to other difficulties we've discussed, such as Python's "by reference" approach, and the resultant confusions about "same as" versus "copy of" that might arise, say, when you go 'm = [1,2,3]' and then 'n = m' (so now n and m both reference the very same object)? If so, I think you should be less elliptical. Kirby From ajsiegel at optonline.net Thu Jan 1 16:31:52 2004 From: ajsiegel at optonline.net (Arthur) Date: Thu Jan 1 16:31:56 2004 Subject: [Edu-sig] re: promoting computer literacy through programming python Message-ID: <0HQT00BCMYH4G2@mta11.srv.hcvlny.cv.net> Kirby writes - >Were you perhaps alluding to other difficulties we've discussed, such as >Python's "by reference" approach, and the resultant confusions about "same >as" versus "copy of" that might arise, say, when you go 'm = [1,2,3]' and >then 'n = m' (so now n and m both reference the very same object)? >If so, I think you should be less elliptical. I am talking about hosts of things, best summed upped quoteth Mr. Elza: """ Python *is* hard, because programming is hard. """ And if I made the effort I could couch what I am trying to say by coining appropriately elliptical and weighty language - "cognitive gestalt", I think sounds cool. But I think I am saying things that are incredibly simple, to the point of being self-evident. And frankly only worth saying at all because I read a study that has a list of "Disadvantages of Python" and prominently mentions zero based indexing. Presumably because it is less intuitive to someone who has never programmed than 1 based indexing. As if that common sense observation was sufficient to conclude on the matter. It seems to me that Python would be a worse language in *all* respects, were it to decide to go its on way, on this issue - among others. Again, as Mr. Elza says - we are trying to talk to transistors. Some adjustments to our normal methods of communication might only be expected. A fact we can hide only so long. And when we are down to talking about things like zero based indexing we are at a point where we are simply far removed from talking about anything that represents the true barriers to getting into communication with the transistors. Red herrings are bad. And, if you want elliptical: Pickled herring is good. Art From jason.cunliffe at verizon.net Thu Jan 1 16:55:27 2004 From: jason.cunliffe at verizon.net (Jason Cunliffe) Date: Thu Jan 1 17:01:04 2004 Subject: [Edu-sig] None potato, one potato, two potato, more.. References: <0HQT00BCMYH4G2@mta11.srv.hcvlny.cv.net> Message-ID: <001301c3d0b1$f83c5c40$6501a8c0@vaio> Well it would be interesting one of our parallel edu-sig futures if everyone were taught basic counting as "0, 1, 2 3, 4" and Cities named their streets that way and George Washingon was inaiguratied proudly as the Zeroth president of the USA etc.. And children could merrily sing: "Zero Potato, one potato, two potato, more..." The BIG problem imo is that zero is not None and especially when it is used an *adjective* which is typical in human counting and speech. Programming *is* hard. But it's also much harder than it ought to be, and often intially for many pretty basic counter-intuitive reasons. And if not counter-intuitive, at least contra-status quo. In natural speech we all say : The FIRST item on the agenda... etc. FIRST chop some onions and garlic [cooking recipes as programming] So who's is nuts and being unnecessarily difficult - programmers who invent zero indexes or humans who write great stories: Act One, Scene One [playwriting/screenplay/books as programming] ? But I suppose its now too late in may respects, and Zeroth must be accepted like QWERTY as strange gift of history. And in 40years time "zeroth" may be widelty used everyday adjective because its programming context will be a common experience in elementary education. What other programming constructs to you think will enter everyday speech ? - Jason From jason.cunliffe at verizon.net Thu Jan 1 17:04:52 2004 From: jason.cunliffe at verizon.net (Jason Cunliffe) Date: Thu Jan 1 17:10:30 2004 Subject: [Edu-sig] None potato, one potato, two potato, more.. References: <0HQT00BCMYH4G2@mta11.srv.hcvlny.cv.net> <001301c3d0b1$f83c5c40$6501a8c0@vaio> Message-ID: <003901c3d0b3$485bb940$6501a8c0@vaio> ..and I forgot to mention the odd language contructs favored by the pentagon or media who morph adjectives, nouns, and verbs with peculiar abandon. "Ground Zero" being a prime example that "zeroth" will become ubiquitous 21st century idea/word. - Jason From ajsiegel at optonline.net Thu Jan 1 17:56:58 2004 From: ajsiegel at optonline.net (Arthur) Date: Thu Jan 1 17:57:01 2004 Subject: [Edu-sig] re: None potato, one potato, two potato, more.. Message-ID: <0HQU00EWC2EH41@mta3.srv.hcvlny.cv.net> JC writes - >But it's also much harder than it ought to be, and often intially for many >pretty basic counter-intuitive reasons. And if not counter-intuitive, at >least contra-status quo. So we can focus on the point at hand let's (and I will never argue with it as toggle option): >>> from __future__ import division We know " ** " is the power operator and want to raise to a fractional power: first try: >>> 16**3/4 1024.0 Which is clearly not the answer I am expecting second try: >>> 16**(3/4) 8.0 Which is. And I am sure long debates could ensue about which is more intuitive and whether the language could be improved by adjusting the parser to recognize what I meant in try one, i.e. adjust the operator precedence order. But my second try is good enough for me, and I now know the rules for my 3rd to 3 millionth try. The burden now is where it rightly belongs, with me. And if I choose to give up programming in disgust with the fact it took me two tries - well that's up to me. But Guido can relax and enjoy his New Year, I hope. Art From jason.cunliffe at verizon.net Thu Jan 1 18:19:39 2004 From: jason.cunliffe at verizon.net (Jason Cunliffe) Date: Thu Jan 1 18:25:36 2004 Subject: [Edu-sig] re: None potato, one potato, two potato, more.. References: <0HQU00EWC2EH41@mta3.srv.hcvlny.cv.net> Message-ID: <000f01c3d0bd$bb20ef40$6501a8c0@vaio> > So we can focus on the point at hand let's (and I will never argue with it > as toggle option): Hi Art, No argument with your example, but it misses completely the [fresh] point at hand I was hoping to discuss. Not where the burden lies, but rather the implications and influence of computational literacy upon everyday language and culture. No blame to programmers or language developers intended. We've been over that ground too many times already I think. But from a media-culture/language perspective, yes programming expects learned behaviors which could be construed as [almost] in denial of contemporary speech and use of language. The bait in my post was use of the word 'human'. Python of course is as 100% a human language as much as English is. But since we all learn to speak [and count] before we can program, there are implicit precedents set there/then. These lead to the some of the 'counter-intuitive allegations about programming. The axis of happy new year question is what happens if/when /programming is learned early enough that it is a fundamental part of literacy and language. How might everyday language be changed? And reverse-engineering the thought, how differently might programming languages be learnt, taught and improved...? - Jason From ajsiegel at optonline.net Thu Jan 1 18:57:01 2004 From: ajsiegel at optonline.net (Arthur) Date: Thu Jan 1 18:57:05 2004 Subject: [Edu-sig] re: None potato, one potato, two potato, more.. Message-ID: <0HQU00FIR56KDD@mta3.srv.hcvlny.cv.net> JC writes - >The axis of happy new year question is what happens if/when /programming >is learned early enough that it is a fundamental part of literacy and >language. >How might everyday language be changed? We learned arithmetic bases, and the importance of base 2 in "talking" to computers, 40 years ago in school. Before having a computer *in* school was a thought. But, I believe it was introduced into the curricula because, even then, computer science was influencing an approach to science and education, generally. And I think some of Kirby's curricula in respect to objects and the like could find there way into early math curricula, as seed concepts, and outside of a programming curricula or even the hands on use of computers. Because these are concepts of general utility, with the added bonus of laying some groundwork for the introduction of more computer programming specific application of these concepts, later on. How will language be changed. Interesting subject, the evolution of language based on technological change. My son understands what I mean when I say something about "dialing" a telephone number. But I am not sure why. Art From jason.cunliffe at verizon.net Thu Jan 1 19:22:59 2004 From: jason.cunliffe at verizon.net (Jason Cunliffe) Date: Thu Jan 1 19:29:04 2004 Subject: [Edu-sig] promoting computer literacy through programming python References: <604E5D38-3BE1-11D8-B381-00039303967A@umich.edu> Message-ID: <000d01c3d0c6$94a43f80$6501a8c0@vaio> Hi John http://www-personal.umich.edu/~jmillr/miller_dissertation.pdf (1.25 MB) Congratulations and thank you! Enouraging and valuable work.. What's next for you ? best wishes - Jason From urnerk at qwest.net Thu Jan 1 19:36:10 2004 From: urnerk at qwest.net (Kirby Urner) Date: Thu Jan 1 19:36:13 2004 Subject: [Edu-sig] re: promoting computer literacy through programming python In-Reply-To: <0HQT00BCMYH4G2@mta11.srv.hcvlny.cv.net> Message-ID: > >If so, I think you should be less elliptical. > > I am talking about hosts of things, best summed upped quoteth Mr. Elza: > > """ > Python *is* hard, because programming is hard. > """ > > And if I made the effort I could couch what I am trying to say by coining > appropriately elliptical and weighty language - "cognitive gestalt", I > think sounds cool. It's just that I picked up from your tone that you felt John had left out something supremely important and relevant. Yet so far, you're echoing points he *did* make. Thinking like a programmer requires some mental habits that might seem alien at first. Yep, no question. > But I think I am saying things that are incredibly simple, to the point of > being self-evident. And frankly only worth saying at all because I read a > study that has a list of "Disadvantages of Python" and prominently > mentions zero based indexing. Presumably because it is less intuitive to > someone who has never programmed than 1 based indexing. Yes, I think you presume correctly. Also, many programming languages in fact use 1-based indexing. Python in many ways displays its C-language heritage, which is not a bad thing. > As if that common sense observation was sufficient to conclude on the > matter. OK, so you think more should be said. Sounds good to me. > It seems to me that Python would be a worse language in *all* respects, > were it to decide to go its on way, on this issue - among others. At this point, it'd be very difficult, and foolish, to changing the indexing model, to say the least. But it wouldn't be alone among programming languages had it started out using 1-based indexing. Changing the division model was likewise difficult, and not foolish because the case for making the change was more compelling (and wasn't about pandering to beginners). > Again, as Mr. Elza says - we are trying to talk to transistors. Some > adjustments to our normal methods of communication might only be expected. > A fact we can hide only so long. I don't think the transistors compel the semantics in this instance. > And when we are down to talking about things like zero based indexing we > are at a point where we are simply far removed from talking about > anything that represents the true barriers to getting into communication > with the transistors. OK, sounds like you agree. The decision to go with 0-based indexing wasn't directly about hardware (hardware is known to permit otherwise) -- except Python is written in C and C uses 0-based indexing and is low level (high level assembler). The thing with 0-based indexing is it focuses attention on start points. Array[0] begins at the 0 mark and fills up to the first word (or whatever). That 0 mark is so important because it's where Array actually starts, and starting memory addresses are what the computer cares about when retrieving Array. Like even an ordinary ruler starts at 0. We could have called that first inch the 0th inch, because we're so fixated on the start points of every inch. But when it comes to rulers, we go by the end points, and that first inch is called 1 (the mark at the other end). > Red herrings are bad. > > And, if you want elliptical: > > Pickled herring is good. > > Art So your point, if I may attempt a summary, was that it's somewhat misleading to confuse the difficulties of learning Python, with the requirements of hardware? Programming is hard, but we can only blame so much on the transistors for these difficulties? And I agree about pickled herring. Kirby From urnerk at qwest.net Thu Jan 1 19:48:11 2004 From: urnerk at qwest.net (Kirby Urner) Date: Thu Jan 1 19:48:15 2004 Subject: [Edu-sig] re: None potato, one potato, two potato, more.. In-Reply-To: <0HQU00EWC2EH41@mta3.srv.hcvlny.cv.net> Message-ID: > > >>> 16**3/4 > 1024.0 > > Which is clearly not the answer I am expecting > Fits my expectations. 16**3 is "one thing" and /4 comes after. So I see that as (16*16*16)/4. I guess I must parse the way Python does. > second try: > > >>> 16**(3/4) > 8.0 > > Which is. > > And I am sure long debates could ensue about which is more intuitive and > whether the language could be improved by adjusting the parser to > recognize what I meant in try one, i.e. adjust the operator precedence > order. Exponentiation has higher precedence in all languages that I know about, where precedence is used at all (it's not used in J). It has higher precedence in ordinary math notation too, but the superscript notation resolves a lot of the ambiguity even without parentheses. More likely to trip people up (or did me) is: >>> -1**2 -1 As a unary operator, - has less precedence than **. > But my second try is good enough for me, and I now know the rules for my > 3rd to 3 millionth try. The burden now is where it rightly belongs, with > me. We agree here. You encounter a language, you learn its quirks (or accept them as perfectly normal as the case may be) and move on. Everyday math notation has its own quirks and weirdnesses. Nothing is above criticism. > And if I choose to give up programming in disgust with the fact it took me > two tries - well that's up to me. > We agree again. > But Guido can relax and enjoy his New Year, I hope. > > Art Maybe you say "but" because you believe Guido is afraid of ever losing a beginner and thinks his job is to bend over backwards to accommodate them. Just guessing. I don't really know why you say "But". Kirby From ajsiegel at optonline.net Thu Jan 1 20:40:40 2004 From: ajsiegel at optonline.net (Arthur) Date: Thu Jan 1 20:40:44 2004 Subject: [Edu-sig] re: promoting computer literacy through programming python Message-ID: <0HQU00FOG9ZSYC@mta11.srv.hcvlny.cv.net> Kirby - >So your point, if I may attempt a summary, was that it's somewhat >misleading to confuse the difficulties of learning Python, with the >requirements of hardware? Programming is hard, but we can only blame so >much on the transistors for these difficulties? Help. If anything the opposite. That the difficulties are inherent in attempting to open up such communications. And should be accepted. And discussion of going this way, or that way, on an issue like list indexes is simply irrelevant to the heart of matters. And is not a "Disadvantage of Python", worthy of mention. Despite that it might not be the first instinct of how things should be to someone entering the arena. "None potato, one potato,,,," But we are programming, not singing or counting. Why should we not fully expect and accept that things are different here. Viva la difference!! >And I agree about pickled herring. I happen to be a 'with cream sauce' kind of guy. Art From ajsiegel at optonline.net Thu Jan 1 20:54:41 2004 From: ajsiegel at optonline.net (Arthur) Date: Thu Jan 1 20:54:44 2004 Subject: [Edu-sig] re: None potato, one potato, two potato, more.. Message-ID: <0HQU00IIVAMOJJ@mta3.srv.hcvlny.cv.net> > But Guido can relax and enjoy his New Year, I hope. > > Art >>Maybe you say "but" because you believe Guido is afraid of ever losing a >>beginner and thinks his job is to bend over backwards to accommodate them. >>Just guessing. I don't really know why you say "But". >>Kirby Well, if zero based indexing is in fact a disadvantage of Python, it is within Guido's power to fix it. At least in Python3.0. And if a "juried" dissertation makes that claim, well maybe its something he needs to ruminate about a bit. I'm hoping he doesn't. I have better things for him to ruminate about ;) Art From urnerk at qwest.net Thu Jan 1 21:19:57 2004 From: urnerk at qwest.net (Kirby Urner) Date: Thu Jan 1 21:20:01 2004 Subject: [Edu-sig] re: promoting computer literacy through programming python In-Reply-To: <0HQU00FOG9ZSYC@mta11.srv.hcvlny.cv.net> Message-ID: > Help. If anything the opposite. That the difficulties are inherent in > attempting to open up such communications. And should be accepted. And > discussion of going this way, or that way, on an issue like list indexes > is simply irrelevant to the heart of matters. And is not a "Disadvantage > of Python", worthy of mention. Despite that it might not be the first > instinct of how things should be to someone entering the arena. > OK, thanks, clearer now. It's the word "disadvantage" that somewhat rankles. "This is just how it is, get over it" is more what you're saying. Students should be broad-minded enough to realize that a cultural convention is just a cultural convention. If they can't even accommodate 0-based indexing in their lives, how narrow their little lives will be. I note that in some mathematics texts, A-sub-zero is the first term in a sequence, i.e. 0-based indexing is not unknown to math-based text book writers. In MathCad, there's a global setting you can flip and go either way. My preference would be to have students become aware of these two widely-used options. > > I happen to be a 'with cream sauce' kind of guy. > > Art I like 'em both. Kirby From brian at macnevin.net Fri Jan 2 08:32:18 2004 From: brian at macnevin.net (BJ MacNevin) Date: Fri Jan 2 08:32:21 2004 Subject: [Edu-sig] Python for Windows running on CD-ROM ... problem 2 References: Message-ID: <001301c3d134$d7ca9bb0$90e3e50c@laptop> Thanks everyone for the help I received last time when I wanted to get Python onto CD-ROM and run it from there. To recap my situation: I teach at a middle school and I want to bring some computer programming into the curriculum. Currently they consider the ability to do e-mail, use Word, and navigate Excel to constitute computer literacy; and they are paranoid about installing new software on their Windows Networking network. DOH! Because of how my school computers are set-up (BIOS boot sequences), running a Windows version of Python on CD-ROM is my only option (machines won't boot to CD-ROM for Knoppix, etc.). So I am trying to create a CD-ROM distribution that we can just plop into the tray, open, and launch. Following peoples' suggestions, I burned a copy of a Python directory onto CD-ROM and included the DLL's from the system folder. The result: the command-prompt works great. IDLE, however, does not. This is a stumbling block, unfortunately. In order to do the graphics thingies that I wanted to with the kids (and utilize the livewires packages for more advanced, self-wound learners), I need to get IDLE up and running. The command-prompt option is kind of hard to use compared to the change-save-run paradigm of IDLE. So I thought: hey! What if I organize the CD-ROM with a root-level shortcut to IDLE on the CD-ROM; complete with the IDLE start strings, etc. I tried it at home: worked billiantly. Took it to school and tried it: no go. First of all, the shortcut is absolute to the CD-ROM drive letter allocation on my machine. Secondly, those darn DLL's aren't loading (they were still in my home computer's system folder). So these are my questions now: If anyone can give me some useful pointers, I'd appreciate it! 1) Is there a way to specify a relative path for the shortcut on the CD-ROM so that it always goes to the same disk that the shortcut is located on? I tried "/Python23/"... and all sorts of other path descriptions. No avail so far. 2) Is it possible to use IDLE off the CD-ROM? The DLL's appear necessary for it, but perhaps there's a way to bypass them, or include them in a path? I really have no idea. Thanks for any insight or suggestions! BJ MacNevin From brian at macnevin.net Fri Jan 2 08:41:04 2004 From: brian at macnevin.net (BJ MacNevin) Date: Fri Jan 2 08:41:07 2004 Subject: [Edu-sig] Literacy folks can get it! WAS "promoting computer literacy through programming python" References: <604E5D38-3BE1-11D8-B381-00039303967A@umich.edu> Message-ID: <002901c3d136$115702a0$90e3e50c@laptop> John, Thanks so much for letting us see and read your dissertation! I read through the beginning sections so far and at every point I was thinking: YES! This is ammunition that I need for explaining to my district why computer programming is important! I teach at a middle-school in a VERY literacy-based district. When I brought up that I wanted to teach some programming, the head of our IT dept. replied: well he can come up with a proposal, but really it's a shame he doesn't just use what we already have available on the network. What that meant is that she wanted me to teach kids more Excel, Word, Powerpoint, etc. So if my IT head is clueless, then you can imagine my entire district! What I love so far about your dissertaion is that you have captured the process of computer programming and have described it in terms of relevance and using vocabulary that these literacy-focussed people will be able to understand and categorize. I realize that they are clueless about why programming is key to true computer literacy and your work gives me the words and vocabulary to help them understand what I mean. Thanks again! BJ MacNevin ----- Original Message ----- From: "John Miller" To: Sent: Wednesday, December 31, 2003 2:33 PM Subject: [Edu-sig] promoting computer literacy through programming python Hi, and a Happy New Year to everyone. For the past year or so, I've been working on my doctoral dissertation in Educational Technology at the University of Michigan. I've finally finished (passed the oral exam on Dec. 17th) and I've posted it in .pdf format at: http://www-personal.umich.edu/~jmillr/miller_dissertation.pdf (1.25 MB) The reason I mention it here is that I decided to do a qualitative analysis of the messages posted to this newsgroup. Here is the topic that I was pursuing: What considerations are most important in teaching Python as a first programming language in a secondary school setting? I thought that the messages posted here would provide sufficient material to approximate a reasonable answer to the question. I'd like to stress the fact that I only considered a fraction of the total material; there was simply too much to include all the interesting and provocative ideas that have been addressed over the past four years. I also ignored all the personal interactions and focused instead on the ideas being presented. I'd also like to thank everyone who posted to this newsgroup with their insightful perspectives on the difficulties of promoting Python programming in educational settings. I have learned much from reading and analyzing these archives. I hope that this dissertation will prove useful to others who share these concerns. If anyone is inclined to take a look at it, but won't be able to read the entire 288 pages, I suggest that Chapter 4 might be the most interesting as it most directly deals with the messages and ideas of the newsgroup, along with Chapter 5 which provides the conclusions drawn from the results of the fourth chapter. Finally, here is the abstract of the dissertation: """ Computer programming contributes an essential aspect to a well-rounded computer literacy, analogous to the role of writing in the domain of traditional print literacy. Many computer languages are unwieldy for rapid prototyping; however, the open-source Python language was designed to be easy for beginners to learn and is appropriate as a first computer language. This dissertation explores what considerations are most important in teaching Python as a first programming language in a secondary school setting. The data examined was three years worth of messages publicly posted to the online Python edu-sig newsgroup. These messages were filtered to obtain only those that were contained in meaningful threads; that is, threads of mean length or longer containing a mean number or more of unique posters. The filtered threads were then categorized by a) subject header and b) phrases identified by an automated keyword algorithm, and further reduced by choosing categories most germane to this dissertation?s topic. The selected threads were then subjected to a qualitative content analysis. The data revealed numerous issues that teachers who may want to incorporate programming into their classroom may need to deal with, including, whether to establish a standalone programming class or integrate programming exercises with other subjects; the importance of establishing programming teams and involving the students? interests; how to present both procedural and object-oriented programming styles; differences in mathematical notation compared with traditional classes; encouraging a healthy programming aesthetic; and teaching algorithmic thinking. Three major conclusions were derived from the results: a) computer programming is a bona fide form of writing that combines well-formed arguments with good stories, and is central to a complete mastery of computer literacy; b) learning to program enables programming to learn; that is, the major purpose of learning computer programming in school settings is to develop the means of using programming to promote learning in other subject areas; and c) computer programming fosters a variety of executable notations that alters what is worth knowing in other subject areas. """ John Miller _______________________________________________ Edu-sig mailing list Edu-sig@python.org http://mail.python.org/mailman/listinfo/edu-sig From lac at strakt.com Fri Jan 2 09:32:28 2004 From: lac at strakt.com (Laura Creighton) Date: Fri Jan 2 09:32:41 2004 Subject: [Edu-sig] re: promoting computer literacy through programming python In-Reply-To: Message from "Kirby Urner" of "Thu, 01 Jan 2004 18:19:57 PST." References: Message-ID: <200401021432.i02EWS2f010003@ratthing-b246.strakt.com> In a message of Thu, 01 Jan 2004 18:19:57 PST, "Kirby Urner" writes: > >It's the word "disadvantage" that somewhat rankles. "This is just how it >is, get over it" is more what you're saying. Students should be >broad-minded enough to realize that a cultural convention is just a cultural >convention. If they can't even accommodate 0-based indexing in their lives, >how narrow their little lives will be. I realise that you are rephrasing what you think Arthur meant, so neither of you may believe that but 0-based indexing is 'just a cultural convention', but it is not. It has to do with how you visualise the entire problem. If you are counting, starting with 0, then you are almost certainly doing it wrong. Here it helps to have a language which declines its nouns differently based on whether they are countable or not. What you need to get into your head, is not some simple rule, (e.g. start counting and then subtract 1) so that you can think of sequences as countable collections of symbols, but as a continuous quantity with countable marks, and with the numbers in the middle between them. The important thing is to get people to be able to see numbers this way. That way you can join the ends and see slicing all around. If you don't make this visualisation, then you have a burden of more abstract symbolic rules to simply memorise, and you have to recall a rule in order to use it -- you cannot simply see it -- at least until you have done it enough times that it becomes an automatic habit. I think that it is this factor 'more arbitrary gunk to memorise' which more than anything else contributes to making computer languages hard to learn. This means that the people who are advocating 1 based indexing as 'easier to learn' only have it half-right. They think that it is easier because it is what the students expect. But all I think that this means is that 'they don't have to memorise some more arbitrary stuff'. So, if you start teaching sequences and slicing with scissors, construction paper, and marking pens, where you really CONSTRUCT sequences and SLICE them ... you will end up with students who expect sequences to start with 0, and never had to memorise any abstract rules to get there. This is easy to do with 8 to 10 year olds. But somehow the construction paper seems undignified when teaching adults. I think that this is part of where we have a cultural problem in education. Somewhere along the line, we decided to teach people by stuffing them with abstract knowledge, and reward those who can regurgitate it the best. Along the way we managed to equate 'being smart' with 'being abstract' and made a decent ability to memorise a prerequisite for good marks. This came with a steady deprecation of the concrete, or the not-abstract. I think that this was intentional, but in any case, children's books have pictures, adults have not, and the language is more and more abstract the higher you go, until eventually people think that it is childish, undignified, to not be taught in an abstract fashion. Books about teaching how to read talk about 'reading readiness'. Take a young child, and teach him or her the alphabet (we are dealing with children whose language is phonetic) and teach them the sounds that each letter makes, and show them words, and get them used to the idea that 'the words in the book' == 'the story I am reading you' and show them animals, one per letter ... and then you have to sit and wait. You have given the child all the background bit he or she needs to learn how to read, and (assuming that the child _likes_ stories, and has any desire to read on his or her own) something will go _pop_ and the child will get it, and start reading. I think that there is something rather similar going on with _reasoning_, and indeed with programming, and you need to have some basic 'pre-reasoning' concepts in you before you can put it all together. But by the time you traditionally learn programming, i.e. as an adolescent, you have had plenty of enough time for your mathematical education to have been a shambles. And this, I think, is one part of the reason that people still say 'to be good at programming you have to be good at math'. It is not the case that programming has very much to do with mathematics. But mathematics also teaches you how to reason. And if your get good marks in mathematics, it almost certainly means that your ability to reason has developed in good fashion. (But not inevitably -- people with eidic memories can manage to handle mathematics by skills of memorisation, and manage to not learn to reason, which is why you have to look for them in class. They need unusual, and extra special treatment.) I think that there are some sort of basic set of 'reasoning readiness' ideas that have to be floating around in the mind of somebody who is learning how to reason, just as you need to have some knowledge of phonics and alphabets in order to learn how to read. I think that knowing the difference between a 'uncountable' and a 'countable' -- -- or, in English -- when to say 'less' and when to say 'fewer' is one of the things that you need to know in order to reason. If, for some reason, a child doesn't find this out by themselves, then they are going to have a very hard time having certain thoughts. So the -- start with 0 or 1 is not some arbitrary rule. It has to do with the mental representation you have in your head as you think the problem -- until, of course, it is an automatic habit that you do 'without thinking' -- at least automatically, without paying attention. If you learn it as an arbitrary rule, then with repetition it can also become automatic. But your thiking ability may have a hole in it -- you may still have not learned countable/uncountable. If that isn't fixed, then your ability to reason will be impaired, and you won't even be aware of _why_. (And you may need to go back to construction paper to learn it, even if you are an adult.) I wish we knew more about why it is that people find things hard to learn. I think that, learning disabilities aside, it often comes down to not having some prerequisite concept. But identifying them is hard. >I note that in some mathematics texts, A-sub-zero is the first term in a >sequence, i.e. 0-based indexing is not unknown to math-based text book >writers. In MathCad, there's a global setting you can flip and go either >way. > >My preference would be to have students become aware of these two >widely-used options. > >> >> I happen to be a 'with cream sauce' kind of guy. >> >> Art > >I like 'em both. Pickled herring in various sauces, some of them creamy is a Jul tradition around here. Maybe you should come over :-) Laura > >Kirby > > > >_______________________________________________ >Edu-sig mailing list >Edu-sig@python.org >http://mail.python.org/mailman/listinfo/edu-sig From hancock at anansispaceworks.com Fri Jan 2 11:49:52 2004 From: hancock at anansispaceworks.com (Terry Hancock) Date: Fri Jan 2 11:42:15 2004 Subject: In defense of 0, was Re: [Edu-sig] None potato, one potato, two potato, more.. In-Reply-To: <001301c3d0b1$f83c5c40$6501a8c0@vaio> References: <0HQT00BCMYH4G2@mta11.srv.hcvlny.cv.net> <001301c3d0b1$f83c5c40$6501a8c0@vaio> Message-ID: I have always had a tendency to think in "real number" terms when it comes to indexes. That may be an artifact of the fact that my experience with programming is largely with scientific and image-processing tasks, where the array (or "list" as Python calls it) is a *sampling* of a *continuum* instead of a collection of things. But whatever the reason, I personally find that Python's indexing is the MOST intuitive of all schemes I've yet seen, particularly as regards "slices" and ranges. If you think of an array as being depicted like a numberline, with the spaces between the numbers as the "boxes" into which data values are put, then the notation makes immediate sense: * Underline what you want. * The endpoints of the underline are the python slice values. So if you want the first element only, you want [0:1], if you want the next 4 you want [1:5]. Also, the size of the array is (intuitively! everybody believes this until they are taught otherwise) the subtraction of the two quoted indices -- len(a[1:5]) = 5-1 = 4. I.e. it works just like a real-number range, not like integers. Also, [0:0] means the empty list, as it seems like it should. Now, of course, I *know* the importance of actual integer math, and I can't quite forget about it because of this -- but it does mean that I don't have to think about it every single time I use an index in Python. Generally, I just have to think about on the few occasions when these kind of details are actually important. By contrast, I had endless headaches with both FORTRAN (1 to N) and C (1 to N-1) indexing schemes, especially with regard to image and spectrum processing routines. Ironic that these are the preferred choices for scientific programming. Python's scheme is brilliant, because I almost never have to use i+1 or i-1 notations. The number of classic "off by one" errors that I make today is vastly lower than it used to be. I used to spend hours tracking things like that down. The other thing that helps so much is Python's negative index slicing -- where negative indexes are determined from the end of the array. That's a terrific help, since it avoids all the tedious nonsense of finding out the length of the array and figuring out offsets from it directly. It's much easier to just write [-4:] and know you're getting the last four elements. Once again, this saves me from "a[len(a)-1]" and similar obfuscation. Cheers, Terry -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com From lha2 at columbia.edu Fri Jan 2 12:26:04 2004 From: lha2 at columbia.edu (Lloyd Hugh Allen) Date: Fri Jan 2 12:26:09 2004 Subject: [Edu-sig] re: zero-based indexing Message-ID: <3FF5A9AC.6090801@columbia.edu> Along the way, I did some time observing instruction at Bronx Science. As a math major, I was amused that their ground-floor is labeled as the zeroth floor. But then, I went to a school where very few buildings had a first floor at ground level (usually you would walk in and be on the fourth or so), so it didn't bother me at all. It is difficult to say what is "easy" for students to understand. If you use one exclusively, then the other will seem weird. For higher level math and science, we definitely want students to be comfortable with zero-based. At the same time, when I teach and review matrices in the classroom, I use one-based--because the TI that each student uses is one-based. I think that I am conscientious about telling them that zero-based exists, and what it looks like. On the other hand, when I teach sequence and summation, I try to generally use zero-based. As far as the "you shouldn't count starting at zero" (I use the digests, so I don't remember who said it and won't quote the entire email), surely most of us have seen the Sierpinski (usually, I think) anecdote related on (among other places) http://wuarchive.wustl.edu/aminet/pix/unrl/sierp.readme From arkamir at softhome.net Fri Jan 2 12:55:19 2004 From: arkamir at softhome.net (Conrad Koziol) Date: Fri Jan 2 12:55:13 2004 Subject: [Edu-sig] Re: Edu-sig Digest, Vol 6, Issue 3 In-Reply-To: References: Message-ID: <1073066118.7382.12.camel@quercus> Hey BJ, when you have your cd python distro working can you post it on the internet?? I have the same problem with a no-go on knoppix and i'm not supposed *grin* to install python in my home folder... I took it off recently to avoid angering the it person, and so I'm stuck without python at school. :( Thanks Conrad From dethe.elza at blastradius.com Fri Jan 2 14:42:53 2004 From: dethe.elza at blastradius.com (Dethe Elza) Date: Fri Jan 2 14:42:45 2004 Subject: [Edu-sig] Python for Windows running on CD-ROM ... problem 2 In-Reply-To: <001301c3d134$d7ca9bb0$90e3e50c@laptop> References: <001301c3d134$d7ca9bb0$90e3e50c@laptop> Message-ID: PythonWare has a python installer which puts Python + some libraries on your system without touching the registry, you may want to have a look at it. The latest version is for python 2.1.1, unfortunately. You can try installing it from the exe and see if you can move the python it installs to a CD. If that works, you can take a closer look at how it is arranged with regard to DLLs, etc. http://www.pythonware.com/products/python/index.htm The purpose of the PythonWare installer is to have a Python which can co-exist with other Python(s) already on your system, but it may be helpful for what you're trying to do. Best of luck! --Dethe "Trusting a scientist on questions of metaphysics is like paying someone else to worship God for you." -- Bill Welton From tjd at sfu.ca Fri Jan 2 15:21:07 2004 From: tjd at sfu.ca (Toby Donaldson) Date: Fri Jan 2 15:21:18 2004 Subject: In defense of 0, was Re: [Edu-sig] None potato, one potato, In-Reply-To: Message-ID: <001201c3d16d$f45be750$a47074ce@bigduck> > Message: 6 > Date: Fri, 2 Jan 2004 10:49:52 -0600 > From: Terry Hancock > Subject: In defense of 0, was Re: [Edu-sig] None potato, one potato, > two potato, more.. > To: edu-sig@python.org > Message-ID: > Content-Type: text/plain; charset="iso-8859-1" > > I have always had a tendency to think in "real number" > terms when it comes to indexes. That may be an artifact > of the fact that my experience with programming is largely > with scientific and image-processing tasks, where the array > (or "list" as Python calls it) is a *sampling* of a > *continuum* instead of a collection of things. > > But whatever the reason, I personally find that Python's > indexing is the MOST intuitive of all schemes I've yet seen, > particularly as regards "slices" and ranges. > > If you think of an array as being depicted like a > numberline, with the spaces between the numbers as the > "boxes" into which data values are put, then the notation > makes immediate sense: > > * Underline what you want. > * The endpoints of the underline are the python slice > values. > > So if you want the first element only, you want [0:1], > if you want the next 4 you want [1:5]. Also, the size of > the array is (intuitively! everybody believes this until > they are taught otherwise) the subtraction of the two > quoted indices -- len(a[1:5]) = 5-1 = 4. I.e. it works > just like a real-number range, not like integers. Also, > [0:0] means the empty list, as it seems like it should. > > Now, of course, I *know* the importance of actual > integer math, and I can't quite forget about it because > of this -- but it does mean that I don't have to think > about it every single time I use an index in Python. > > Generally, I just have to think about on the few occasions > when these kind of details are actually important. > > By contrast, I had endless headaches with both FORTRAN (1 > to N) and C (1 to N-1) indexing schemes, especially with > regard to image and spectrum processing routines. Ironic > that these are the preferred choices for scientific > programming. Python's scheme is brilliant, because I > almost never have to use i+1 or i-1 notations. The number > of classic "off by one" errors that I make today is vastly > lower than it used to be. I used to spend hours tracking > things like that down. > > The other thing that helps so much is Python's negative > index slicing -- where negative indexes are determined > from the end of the array. That's a terrific help, since it > avoids all the tedious nonsense of finding out the length > of the array and figuring out offsets from it directly. > It's much easier to just write [-4:] and know you're > getting the last four elements. Once again, this saves > me from "a[len(a)-1]" and similar obfuscation. I've always told students that the advantages of 0-based indexing are: - it's slightly simpler to implement when you are using the C model of memory (i.e. array locations are offsets from a base address) - when you are using modular arithmetic to calculate index values, like (i % num_rows), then it is often convenient to have the array start at 0 because the % function naturally returns a 0 - when you want to calculate the length of the slice lst[a:b] (where a and b are non-negative), its simply b - a - 0-based indexing makes the most sense if you think of the index values as distance measures from the start of the array, just like a ruler (as Kirby mentioned). With 0-based indices, programmers must come to grips with ugly statements like "lst[0] is the first element of lst". - 1-based indexing makes more sense if you think of the index value as ordinals, i.e. if you want to count the elements of the array. This is traditional in CS, e.g. see Knuth's The Art of Computer Programming. Exercise 19 of section 2.2.2 asks readers to convert some of the 1-based indexing to 0-based indexing. Toby -- Dr. Toby Donaldson Assistant Professor School of Interactive Arts and Technology Simon Fraser University From ajsiegel at optonline.net Fri Jan 2 17:19:39 2004 From: ajsiegel at optonline.net (Arthur) Date: Fri Jan 2 17:19:42 2004 Subject: [Edu-sig] re: zero-based indexing Message-ID: <0HQV00NACVCR04@mta11.srv.hcvlny.cv.net> Lloyd writes - >Along the way, I did some time observing instruction at Bronx Science. >As a math major, I was amused that their ground-floor is labeled as the >zeroth floor. My OT Bronx Science story, which I told here once before, but feel like retelling: A friend Steve had been an Industrial Arts teacher there for some 25 years. A devoted and talented craftsman, Smithsonian trained in restoration, a clocksmith, a tinkerer's tinkerer - whose lessons, I think, were always more about craftsmanship, than about any particular craft. Was told his shop was being closed and to take a "sabbatical" year to learn Java well enough to teach it - or retire. Not in a position to retire, he is now an admittedly mediocre, at best, programming instructor. There is lots of this going on, and its worth keeping in mind - IMO. Art From urnerk at qwest.net Fri Jan 2 18:13:44 2004 From: urnerk at qwest.net (Kirby Urner) Date: Fri Jan 2 18:13:46 2004 Subject: In defense of 0, was Re: [Edu-sig] None potato, one potato, two potato, more.. In-Reply-To: Message-ID: Terry: > By contrast, I had endless headaches with both FORTRAN (1 > to N) and C (1 to N-1) indexing schemes, especially with C is zero-based, like Python, no? I like Python's slicing too -- very intuitive and powerful syntax, for something one often needs. Kirby From urnerk at qwest.net Fri Jan 2 18:27:31 2004 From: urnerk at qwest.net (Kirby Urner) Date: Fri Jan 2 18:27:32 2004 Subject: [Edu-sig] re: promoting computer literacy through programming python In-Reply-To: <200401021432.i02EWS2f010003@ratthing-b246.strakt.com> Message-ID: > -----Original Message----- > From: Laura Creighton [mailto:lac@strakt.com] > Sent: Friday, January 02, 2004 6:32 AM > To: Kirby Urner > I realise that you are rephrasing what you think Arthur meant, so > neither of you may believe that but 0-based indexing is 'just a > cultural convention', but it is not. It has to do with how you > visualise the entire problem. If you are counting, starting with 0, > then you are almost certainly doing it wrong. > Hi Laura -- I would agree insofar as I should not have used the word "just" (as in "merely") when saying "cultural convention." Such conventions go deep, and do involve perceiving differently, just as you say. What I said in an earlier post I think fits with your presentation of the difference: The thing with 0-based indexing is it focuses attention on start points. Array[0] begins at the 0 mark and fills up to the first word (or whatever). That 0 mark is so important because it's where Array actually starts, and starting memory addresses are what the computer cares about when retrieving Array. Like even an ordinary ruler starts at 0. We could have called that first inch the 0th inch, because we're so fixated on the start points of every inch. But when it comes to rulers, we go by the end points, and that first inch is called 1 (the mark at the other end). I'll add a picture: |<-- 0th -|<--1st --|<-- 2nd -|<-- etc.-| |---------|---------|---------|---------|---------|---------|---------| 0 1 2 3 4 5 6 7 |--1st -->|--2nd -->|--3rd -->|--etc.-->| I think it pays to read some about memory storage, fetching and retrieving from RAM, address bus, data bus, clock bus -- all that inner guts stuff -- to get some sense of it. Of course to many language designers this is an anathema as their whole thing is how you *should never have to* delve deeply into computer guts to "get it" about a language. Rather, the language should help you focus on the "problem space" (not on the computer). But the fact remains, the computer itself IS the problem space in the beginning (when languages are being born). I think John's thesis is good on this, talking about how one of the advantageous of learning to think like a computer scientist (or a programmer in particular), is you come to appreciate what the machinery is and is not capable of (or better: what humans can and cannot accomplish, given these tools and limitations). Kirby From hancock at anansispaceworks.com Fri Jan 2 19:49:19 2004 From: hancock at anansispaceworks.com (Terry Hancock) Date: Fri Jan 2 19:41:38 2004 Subject: In defense of 0, was Re: [Edu-sig] None potato, one potato, two potato, more.. In-Reply-To: References: Message-ID: On Friday 02 January 2004 05:13 pm, Kirby Urner wrote: > Terry: > > By contrast, I had endless headaches with both FORTRAN (1 > > to N) and C (1 to N-1) indexing schemes, especially with > > C is zero-based, like Python, no? Yes it is. But it doesn't have anything comparable to Python's slice notation, nor the negative indexes. So as a result you have to think about the last element being a[len(a) - 1]. This is technically true in Python, but I never have to call the last element that way, I just use a[-1]. Similarly, Python range() function interprets the values the same way as the slice notation. Terry -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com From ogncqjudxgxke at hongkong.com Fri Jan 2 19:57:03 2004 From: ogncqjudxgxke at hongkong.com (Tracy Lorraine) Date: Fri Jan 2 19:47:46 2004 Subject: [Edu-sig] Re: BXQNSG, notably the opening Message-ID: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit satiable analogy spangle cityscape breastwork get breeze bruise discus bebop preposterous hun moduli covary shuck ascription -------------- next part -------------- Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 8bit

Free CableTV!No more pay!%RND_SYB

pentecostal alliterate suffragette perle nilpotent hassle mechanist tumble curricular samuelson pumice blob decent bratwurst ceremony superbly countersink birdlike bishop cognate
onrush expansive occultate walkover amiss medford dwelt clyde thymus artichoke argot conduct grimace glycerinate psychoacoustic curate baird borg confucianism fault hiatus upstand complementary habib alumni gawk elate diabetes eyed junctor formaldehyde pirate humble sybarite burl
-------------- next part -------------- From qcdqaxgoplb at hongkong.com Sat Jan 3 11:13:19 2004 From: qcdqaxgoplb at hongkong.com (Melissa) Date: Fri Jan 2 23:12:05 2004 Subject: [Edu-sig] Re: HZVAJT, the window opened Message-ID: lunate foldout caliper transcendental blue barium hypochlorite arsenate dewar vest catfish palo mulligan delicti rotten chantey cross bishopric feeble commodious ache narcotic -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/edu-sig/attachments/20040103/d5df4a25/attachment-0001.html From hcnkywzlobfib at china.com Sat Jan 3 12:57:53 2004 From: hcnkywzlobfib at china.com (Bouchard Sydney) Date: Sat Jan 3 00:53:44 2004 Subject: [Edu-sig] Re: ZA, ivan nikolaevichs apprehensions Message-ID: ritter gouda agnes cecilia applaud asteroidal inanimate gallantry occident sixty tuttle caliphate fraudulent mckinney threefold consider crossbow architectonic floridian conscript fascist beautiful conspiracy dazzle intercalate -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/edu-sig/attachments/20040103/fb06544b/attachment.html From 406yboyeq at www-pool.de Sat Jan 3 10:21:49 2004 From: 406yboyeq at www-pool.de (Randell Gay) Date: Sat Jan 3 06:34:02 2004 Subject: [Edu-sig] (Returned) - g Message-ID: <3$31-ma5w-86@t7u.6r0tp18lt9> An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/edu-sig/attachments/20040103/9592c827/attachment.html From ajsiegel at optonline.net Sat Jan 3 08:34:02 2004 From: ajsiegel at optonline.net (Arthur) Date: Sat Jan 3 08:34:05 2004 Subject: [Edu-sig] Re: HZVAJT, the window opened Message-ID: <0HQX00BXE1OZIA@mta1.srv.hcvlny.cv.net> Melissa writes: >lunate foldout caliper transcendental >blue barium hypochlorite arsenate dewar vest catfish palo mulligan >delicti rotten chantey cross bishopric feeble commodious ache narcotic I am supposing the catfish comment is in response to the herring thread. But even I consider the wording a bit elliptical. Art From portal at ontologystream.com Sat Jan 3 20:12:44 2004 From: portal at ontologystream.com (portal) Date: Sat Jan 3 20:11:09 2004 Subject: [Edu-sig] Python "3" and National Project to establish the Knowledge Sciences as an Academic Discipline Message-ID: This is a multiple part communication regarding the the development of a Python 3 language... that follows the suggestions and scholarhsip presented in the thesis by John Miller http://www-personal.umich.edu/~jmillr/miller_dissertation.pdf (1.25 MB) and some initial work developed under some DARPA funding http://www.python.org/doc/essays/cp4e.html I have joined the e-forum at: http://mail.python.org/mailman/listinfo/edu-sig and hope to engage the members of this e-fourm in a new discussion leading to a Python/Linix Knowledge Technology Toolkit for Kids (K-12) CD http://www.bcngroup.org/python3/home.htm and to a National Project to establish the Knowledge Sciences as an Academic Discipline. http://www.bcngroup.org/area2/KSF/nationalProject.htm **** We are including individuals who MAY speak for The Union Institute www.tui.com and the Euopean Organization of International Schools (IBO) http://web3.ibo.org/ibo/index.cfm?page=/ibo/about/donors&language=EN *** Members from the cc may join this discussion by subscription to the Edu-sig mailing list Edu-sig@python.org http://mail.python.org/mailman/listinfo/edu-sig I look forward to a thoughtful discussion. ************************************************* It takes a Community to Create a National Project ************************************************* *********************************** Dr. Paul S. Prueitt Research Professor The George Washington University Founder and Director, (1992) BCNGroup.org Founder and CEO, (2000) OntologyStream Inc Founder, (2003) dataRenewal Inc Founder, (2004) InOrb Technologies Inc Knowledge Scientist Cell: 703-981-2676 paul@ontologystream.com *********************************** From ajsiegel at optonline.net Sat Jan 3 21:07:39 2004 From: ajsiegel at optonline.net (Arthur) Date: Sat Jan 3 21:07:42 2004 Subject: [Edu-sig] re: Python "3" and National Project to establish the Knowledge Sciences as an Academic Discipline Message-ID: <0HQY00CL90KV1I@mta7.srv.hcvlny.cv.net> Dr. Prueitt writes: >I have joined the e-forum at: >http://mail.python.org/mailman/listinfo/edu-sig Welcome. If I understand correctly, this is related to Mike McLay's initiated funding agenda. Mike is a long-time member of the community, and I am sure there is general support in the community for his efforts. I am the resident edu-sig pain-in the-ass. >http://www.ontologystream.com/prueitt/home.htm >Professional Experience >Dr. Prueitt has worked on retrieval technology, data modeling and database >interface design and coding using Oracle, SQL Server, Access, FoxPro, VB, >Objective C, C, C# and C++. He has designed, prototyped and implemented >scaleable commercial software systems targeted at integrating retrieval >technologies, transaction analysis, data mining and text/image >technologies. Python? Do you understand the structure of the community? Do you understand Python? If I am not mistaken, Mike had to explain to your group who this guy Tim Peters is, a few weeks ago. And of course you understand that Python3 can only be in Guido's (firm, to say the least) hands. At: http://www.bcngroup.org/area2/KSF/nationalProject.htm You discuss a National Movement, without making bones about the fact that it is at least in some sense a political movement. Can you help me digest what you are trying to achieve, and why Python is in the middle of it all, and on what basis you are purporting to talk about Python3 as a project with which you and your colleagues are to be in some crucial role? If I sound suspicious, it is because I am. I have visited http://www.bcngroup.org/python3/home.htm And besides having no idea why I am going to www.bcngroup.org to read about Python3, I cannot make much sense out of much of it. I am not a stupid or uneducated man, I don't think. But there seems to be a private language being spoken. Is the National Movement that we all learn to speak this language? All that being said, I am willing to learn, be educated, and back off. And frankly, the fact that you have joined the list here, and therefore seem willing to subject yourself to the above toned crap that one needs to expect if operating in an open community (Guido has put up with much), is an appreciated first step to helping at least me come to terms a bit. Art From portal at ontologystream.com Sat Jan 3 21:45:03 2004 From: portal at ontologystream.com (portal) Date: Sat Jan 3 21:43:33 2004 Subject: [Edu-sig] Python "3" and National Project to establish the Knowledge Sciences as an Academic Discipline In-Reply-To: Message-ID: Art and the edu-sig The focus of the effort of the BCNGroup (Behavioral Computational Neuroscience Group) has been to make a delineation between formal models (including connectionist models of cognitive processes) and the actual science that is developed experimentally by an extended research community. In John Miller's thesis he talks about the two paradigms, symbolic processing and connectionism, and yet our group holds that connectionism is one step (only) towards a stratified theory of physical processes that accounts for the experimental literatures called quantum neurodynamics (primary centered around the works of Karl Pribram, Stu Hameroff, and Roger Penrose). And yes there is some controversy here. So, our primary educational objective is to teach about the limitations of computer science, when one is attempting to use the computer as a means to assist in community based knowledge management. The position is that our society will be better off when computer technology is easier to understand and more generally accessable (and this is in the spirit of Python - as well as other languages.) The Orb technology is one possible inclusion in the Knowledge Technology Toolkit. We are, however, looking for assistance in developing multiple user domain (MUD) environments that support both peer-to-peer communication and the machine representation of indicators of subject matter (such as we find from the Orbs (Ontology Referential Base) models of linguistic variation.) It is our expectation that a discussion can develop in which if there is a question then we will have an opportunity to answer the question, in a scholarly fashion, and a discussion in which our group, BCNGroup, of primary scientists can listen to the comments of this edu-sig group. I do not intersperse text because I find it easier to have a discussion by just speaking to the issues, at least some of them. And I have in the past not wished to have discussions in forums where interspersing is used a lot, but I am very interested in having a discussion with your community. So I will go with the social practice, what ever it is. I understand that this is often a touchy issue. portal is my email address that I am using now.. When one has been a mathematician, computer scientist and scientist for a few decades one's knowledge of the computer is likely sufficient. Python does not have to be in the middle of the proposal for a National Project, this is why we ask for this discussion - to make a determination. And no, I still do not know who Tim Peters is, but would be able to talk with him on the phone (703-981-2676) or anyone else who wishes to talk on the phone with me. Paul S. Prueitt From ajsiegel at optonline.net Sat Jan 3 22:37:45 2004 From: ajsiegel at optonline.net (Arthur) Date: Sat Jan 3 22:37:49 2004 Subject: [Edu-sig] re: Python "3" and National Project to establish the Knowledge Sciences as an Academic Discipline Message-ID: <0HQY00H054QW91@mta2.srv.hcvlny.cv.net> >Art and the edu-sig Thanks for the reply. I have gotten use to the interspersed practice, and will follow it. But, for one, have no strong feelings about it one way or other. I would vote that you communicate in the way you are most comfortable. Python community fact 1: I, Art, do not speak for it in any possible sense. My standing is marginal, in fact. I speak for myself. And often, not well. >So, our primary educational objective is to teach about the limitations of >computer science, when one is attempting to use the computer as a means to >assist in community based knowledge management. The position is that our >society will be better off when computer technology is easier to understand >and more generally accessible (and this is in the spirit of Python - as >well as other languages.) >The Orb technology is one possible inclusion in the Knowledge Technology >Toolkit. I am a bit the resident Luddite. Sharing the general goal of technological literacy, and being unconvinced that technology itself can be a major factor in achieving it. Python points in the direction of what may be achievable. But there is no credible evidence I have seen to indicate that teaching and learning something like Python is not an essentially low tech endeavor, inherently. But I don't know whether that sentiment is oppositional to your own, and in any case, it is certainly does not represent any kind of prevailing sentiment at edu-sig. In fact you can safely ignore the last paragraph. >We are, however, looking for assistance in developing multiple user domain >(MUD) environments that support both peer-to-peer communication and the >machine representation of indicators of subject matter (such as we find >from the Orbs (Ontology Referential Base) models of linguistic variation.) >It is our expectation that a discussion can develop in which if there is a >question then we will have an opportunity to answer the question, in a >scholarly fashion, and a discussion in which our group, BCNGroup, of >primary scientists can listen to the comments of this edu-sig group. >Python does not have to be in the middle of the proposal for a National >Project, this is why we ask for this discussion - to make a determination. Edu-sig is a group of diverse - sometimes wildy diverse opinion. Obviously it is Mr. Guido van Rossum and other members of the Python Software Foundation http://www.python.org/psf/ with whom you need to be speaking. Certainly there is no reason I see for your group not to explore the possibilities of the use of Python in achieving your goals. It has a liberal license for use it any project of this kind. At the same time I see every reason not to do so in a manner that purports to be speaking on behalf of anyone in or out of the Python community who hasn't explicitly signed on. I am gathering Guido has not at this point explicitly signed on. Which is why I am baffled at the Python3 component of the discussion. >And no, I still do not know who Tim Peters is... Nobody very important really Art From urnerk at qwest.net Sun Jan 4 00:11:20 2004 From: urnerk at qwest.net (Kirby Urner) Date: Sun Jan 4 00:11:19 2004 Subject: [Edu-sig] re: Python "3" and National Project to establish the Knowledge Sciences as an Academic Discipline In-Reply-To: <0HQY00H054QW91@mta2.srv.hcvlny.cv.net> Message-ID: Hi Art -- Looks kind of introspective at this stage. Maybe just let In-Q-Tel deal with it (or not). I see some investment in Perl, so if Perl fits, then surely Python could play a role (they're different, but not on opposite sides of the moon). Anyway, I'm not speaking for anyone but me right now. Shutting up now (until my next one).** Introspectively, Kirby ** I suspect I was one of those "outliers" in John's thesis -- I post so much I don't even fit on the bar graph From ajsiegel at optonline.net Sun Jan 4 09:37:49 2004 From: ajsiegel at optonline.net (Arthur) Date: Sun Jan 4 09:37:51 2004 Subject: [Edu-sig] re: Python "3" and National Project to establish the Knowledge Sciences as an Academic Discipline Message-ID: <0HQY0010EZAZ27@mta2.srv.hcvlny.cv.net> Kirby - >Anyway, I'm not speaking for anyone but me right now. Just to make sure that I stay marginal: What disturbs me most about this proposal, and even the dissertation, is that they serve as further evidence, to me, that perception and "marketing" are outrunning anything grounded in evidence - as to Python's true accessibility. Certainly as to anything or anyone at the pre-high school level. And at the high school level, for anyone other than committed students (read geeks). In at least one recent interview I read, Guido mentions that his intended audience at the initial stages of Python's development was C programmers. This despite its ABC roots. Which makes sense to me. There is no reason not to make experimental efforts to begin to understand Python's true accessibility at all levels of age and interest. I personally suspect true study would find that both factors are highly relevant. So that the younger the audience, the greater needs be the internal (over which there is little control) level of interest and determination. Which we will find exists, but only in isolated cases. Not the basis for a mass movement Renaissance. And certainly not something that is going to change in any significant way by a better IDE or a rethinking of semantics or syntax. All this serving to divert attention from the arena where, it seems to me, there is considerable evidence that Python is provably useful. In the college science curricula, and even there, for those students far enough along to know that they are moving in the direction of a science related career, or serious science related study. In the end, reality wins these kinds of battles. And I don't know what a substantially established "product" such as Python gains by betting its reputation on highly speculative endeavors. And please don't shoot the messenger. Art From portal at ontologystream.com Sun Jan 4 10:36:55 2004 From: portal at ontologystream.com (portal) Date: Sun Jan 4 10:35:31 2004 Subject: [Edu-sig] Knowledge Technology Toolkit In-Reply-To: <0HQY00H054QW91@mta2.srv.hcvlny.cv.net> Message-ID: Art said: (I am) unconvinced that technology itself can be a major factor in achieving it. Python points in the direction of what may be achievable. But there is no credible evidence I have seen to indicate that teaching and learning something like Python is not an essentially low tech endeavor, inherently. Our, the BCNGroup, position is quite different. We claim that modern computer science is confused to the point of creating false dysfunction. We say "false" here because much of the IT dysfunction can not be rationally understood based only on a shallow analysis. One has to look at economic and political forces to understand why our society does not distribute control over information except in the form of shallow advertising and political spin. I sense that you agree with this in principle. The practical aspects is what is at issue. Yes? Education is deeply influenced by the same economic and cultural general systems properties that have created the American TV news media. Other than providing a good living for a rather odd bunch of folks in TV, this influence is mostly not healthy. The confusion which is modern computer science is very deep, and goes to an affinity between scientific reductionism (which leads to false science) and computer science which is properly understood only in a 100% reductionist paradigm (all things are reducible to bits and bytes). So the fundamental difference between a natural system and a computer model is a core issue that needs to be in any knowledge science or computer science curriculum (even in K-12). Human action perception "cycles" leads us into cognitive neuroscience - which is where we need new curriculum (K-12). http://www.bcngroup.org/area3/pprueitt/kmbook/Chapter2.htm Your position that Python is not a solution is a potentially damaging one to my efforts, because it really is a position of inhibiting any solution from addressing complex underlying causes of what are deeply controlled inhibition. We cannot and will not long suffer absolutely skepticism - as we have long ago come to understand that there is no purpose in most skepticism We are looking for a good solution that allows kids to control computers so that we, the educators and the students, can talk about what is not talked about - and these are cultural and social issues related to information control in our modern society. So we would include the Ontology Referential Base (Orb) technology within a MUD (multiple user domain) and target chat and e-forums with externally generated subject matter taxonomy so that kids and educators can see what is the thematic structure of social discourse. http://www.bcngroup.org/area2/KnowledgeEcologies.htm We address a similar cultural problem that has to do with learn-ed disability in arithmetic and algebra, where children learn to NOT be able to do elementary mathematics because of the way it is taught and because of the cultural conditioning that is uniformly experienced by children while in school. http://www.ontologystream.com/beads/QuestionOfAccess/AQA.htm This scholarly work on an almost universally present cognitive disability, that is conditioned by experience in school, can be also applied to the teaching of analytic skills in the form of good computer science instruction (and most is very poor). So we would have the Knowledge Technology Toolkit teach the history of mathematics, number theory, set theory, discrete mathematics, and foundations to non-standard logics. The purpose of the Toolkit is to train a generation of citizens who control information for self use. Then, we would teach arithmetic and the foundations of mathematics (not algebra and the calculus - but the structure and nature of mathematics) in arbitary bases so that kids would see and appreciate what the counting numbers are and how to use them in innovative ways: http://www.ontologystream.com/cA/index.htm in computer science. With respects and appreciation for your kindness, I ask that you hold off on the discussion regarding who has signed off, etc. I look forward to talking with Guido. Neither I, nor the BCNGroup, am asking for anyone's permission or endorsement. We are exploring the issues and would like to use the AIC model to first establish an appreciative social field. I enjoy Fourth myself, and would use it over Python if I have my choice. But we are considering the social issues and the strength that Python has assumed within the Open Source Software community. From portal at ontologystream.com Sun Jan 4 11:04:23 2004 From: portal at ontologystream.com (portal) Date: Sun Jan 4 11:03:08 2004 Subject: [Edu-sig] intell adoption problem In-Reply-To: Message-ID: Kirby, I know Dr. Bruce Lund at In-Q-Tel. I have worked for various agencies, Offices of Declassification, in the past. Bruce got his PhD at Georgetown in 1992 in computational linguists while I was Director of the Neural Network Research Facility at GU. Methods we call knowledge technologies proposed by SAIC/OntologyStream was deemed fundable by NIMA's Novelty Detection in Massive Databases program last year, and yet no funding occurred. We are in the final round of the DARPA REAL competition. The adoption problem is that the types of technology we have is transparent, simple, powerful and fast; and does not need J-Boss or .NET infrastructure to work. We do not need Cobra, or net services. We have the perfect Python set up, in that a number of powerful engines need to be binary executables and to exist in an environment where a command line can bring these into the execution space. So very simple interfaces to the engines exist in all cases. Everything is ASCII or very simple XML. The knowledge technology is simply not understood by those who can block funding decisions. Many do understand the technology and advocate for funding, but there are a few who somehow feel that our technology commits a moral sin. This is what we have focused on the National Project: http://www.bcngroup.org/area2/KSF/nationalProject.htm The increased power to latent semantic indexing engines by my invention of an ontology lens http://www.bcngroup.org/procurementModel/to-be/lens.htm is completely ignored because of the absence of a business model. This is a problem that will last until my group produces a success in the business world. The ontology lens is only one of many un-adopted deep technologies that has been developed by a world wide community (Core Talk from California, poly-logics from Germany, quasi-axiomatic theory from Russian, natural language generation from ontology work in Australia, etc.) But the business proposition is not there at this time, and thus In-Q-Tel can do nothing by charter. I also know Brian Moon (Friends of the IC) and may attend his upcoming NIST workshop. The Orb work uses Python, Perl and the Berkeley DB (the hash table management part of this "DB"). http://www.inorb.com/services.html However my number theoretic I-RIB (In-memory Referential Information Base) infringes on a powerful patent (www.primentia.com) and I use a version of this invention (Bjorn Gruenwald's) to create what is actually a key-less hash with no need for empty hash containers and no possibility for collisions. Bjorn is not happy about this, but I am not using it commercially, only to teach about scatter-gather methods. (The key-less has table can be demonstrated... it exists and does make sense. The hash function simple takes an ASCII string and "regards" the string as a base 64 number (this is the invention that PTO awarded to Bjorn in 2003). Then some magic happens. The current use of the Berkeley DB rather than the I-RIBs is in preparation for a commercial venture. From portal at ontologystream.com Sun Jan 4 11:26:01 2004 From: portal at ontologystream.com (portal) Date: Sun Jan 4 11:24:37 2004 Subject: [Edu-sig] learn-ed disability is counter evidence In-Reply-To: <0HQY0010EZAZ27@mta2.srv.hcvlny.cv.net> Message-ID: Art, The point of the research in learn-ed disability is counter evidence to what I take as you point I personally suspect true study would find that both factors are highly relevant. So that the younger the audience, the greater needs be the internal (over which there is little control) level of interest and determination. With respect, you are not being marginal here, (and should not claim to be acting marginally), but absolutely claiming as a truth something for which there is evidence that there is an illusion here. What you want to do is not what I want to do. We should talk about the evidence. Perhaps we can see together why there is a difference in motivation. Educational theory has ALWAYS had to deal with the professional educators' limiting view of children's capability to learn. Two cases: case one: when the adults have something transparent and valuable. case two: when no one not even the teachers can justify what is taught (such as most high school mathematics). (this is a complex issues here.) I have taught over 60 freshman level mathematics classes in the university and have some experience with what are clearly psychological problems that are due to a social philosophy that justifies learn-ed disability in very simple arithmetic tasks. This is not natural. If you were to get irrationally angry if someone asked you to add 1/3 and 3/4 then you likely have this learned cognitive disorder. So I can ask for help on this point from teachers who have been frustrated by the professional educator's authority that says most kids can not learn because they are not interested. This is on the face absurd and can not stand up to real behavioral science. (Would you agree?) So the problem is not about the kids but about the teachers? Mathematics and computer science education is not providing access to the concepts that ALL children are capable and interested in knowing. (This is the claim.) Further, the type of knowledge and how it is presented turns kids off in what is an natural and reasonable rejection of non-sense. (This is the claim.) And by the time children have experienced high school, they have a memetic disorder... at least this is the hypotheses that we develop at: http://www.ontologystream.com/beads/QuestionOfAccess/AQA.htm In your words In the college science curricula, and even there, for those students far enough along to know that they are moving in the direction of a science related career, or serious science related study. <\quote> the learn-ed disability is fully entrenched. Only those who are approaching science in a odd way have not catch this memetic virus (to use Blackmore and Dawkins term "meme" or conceptual replicator). (Again, this is the hypothesis and not a philosophical point.) The purpose of Python is not to continue a programmer caste system but to open access to knowledge of how a computer works to everyone. (Yes?) From ajsiegel at optonline.net Sun Jan 4 11:42:48 2004 From: ajsiegel at optonline.net (Arthur) Date: Sun Jan 4 11:42:51 2004 Subject: [Edu-sig] re: Knowledge Technology Toolkit Message-ID: <0HQZ0012A53C4I@mta1.srv.hcvlny.cv.net> Paul writes - >Our, the BCNGroup, position is quite different. We claim that modern >computer science is confused to the point of creating false dysfunction. >We say "false" here because much of the IT dysfunction can not be >rationally understood based only on a shallow analysis. One has to look at >economic and political forces to understand why our society does not >distribute control over information except in the form of shallow >advertising and political spin. I sense that you agree with this in >principle. The practical aspects is what is at issue. Yes? We agree that power structures are relevant, and mass delusions are sometimes, in part, induced in conformity with the influence of those power structures. (I don't see evil lurkers, I see 'natural' phenomena - but more a sand storm, here, than a sunny day) But by my instinct and analysis, the perception of the saving power of technology in the realm of education is tending toward delusion, and for the very reasons that can be ascertained by your own analysis. Which is why I have a bit of a perceivable chip on my shoulder when getting a first impression of what the BCNGroup is about. And quite in contrary to your statement I have no beef with the "control of information in our society". A red herring, if ever there was one. Google one's way to anything. The problem is sifting that information in a manor that has a chance of separating the meaningful, from the ego-full. Obviously, if information is to remain as wonderfully free as it now is, that is a task for each of us to try to undertake - for ourselves and for those to whom we might have a custodial role in some sense - as best we can in our own way. Isn't that exactly what free information has to necessarily exactly demand. >So the fundamental difference between a natural system and a computer model >is a core issue that needs to be in any knowledge science or computer >science curriculum (even in K-12). I perceive the issue. But how about we skip the computer model entirely in most of the K-12 range, and focus on the natural system. We then save the time and expense of building the knowledge systems necessary to assure that the distinction between the computer models we insist on presenting them, and the natural systems, are adequately drawn. We emphasize the natural system radically, in fact, as a counter influence to the video games, mass media, and other "mass hypnosis" phenomena about which we seem to share concern. And save lots of $, to boot. I don't need to marry that alternative. I need to see it seriously considered in a serious look at the issues and alternatives. >Your position that Python is not a solution is a potentially damaging one >to my efforts, because it really is a position of inhibiting any solution >from addressing complex underlying causes of what are deeply controlled >inhibition. In my view, I don't have a position so much, as a realistic view of the available evidence. New evidence will mean new positions. An approach burdened, I guess, by having been an English major ;). ART From ajsiegel at optonline.net Sun Jan 4 12:47:28 2004 From: ajsiegel at optonline.net (Arthur) Date: Sun Jan 4 12:47:30 2004 Subject: [Edu-sig] re: learn-ed disability is counter evidence Message-ID: <0HQZ00G6S833D0@mta10.srv.hcvlny.cv.net> Paul writes - >The purpose of Python is not to continue a programmer caste system but to >open access to knowledge of how a computer works to everyone. (Yes?) I guess only Guido can speak to the purpose of Python. But even his intentions do not control the situation in any real way. And it is unfortunate polemics to make this kind of argument. What I perceive as realistic to expect from Python is a statement of perception of reality, not an ideological wish list. And in my cosmos represents one of approximately 4 billion zillion (my last count) cases where reality disappoints. Reality, not Python. I do believe - reality based, in my view of it - that Python is unique enough to make a real contribution in the educational arena, targeted properly. And believe - I know I am in effect repeating myself - that by overstating the case radically, we risk largely missing the opportunity for maximizing the reality based opportunities. Please - everybody - do prove me wrong. But do *prove* me wrong. Art From jason.cunliffe at verizon.net Sun Jan 4 12:51:05 2004 From: jason.cunliffe at verizon.net (Jason Cunliffe) Date: Sun Jan 4 12:53:48 2004 Subject: [Edu-sig] Nation Project - help translation please Message-ID: <003801c3d2eb$54396160$6501a8c0@vaio> Help! I am overwhlemed by the density of language used... Please can someone translate into simple english what this is really about..? thank you very much -Jason -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/edu-sig/attachments/20040104/42830e48/attachment.html From lac at strakt.com Sun Jan 4 12:59:34 2004 From: lac at strakt.com (Laura Creighton) Date: Sun Jan 4 12:59:58 2004 Subject: [Edu-sig] Knowledge Technology Toolkit In-Reply-To: Message from "portal" of "Sun, 04 Jan 2004 10:36:55 EST." References: Message-ID: <200401041759.i04HxY0U015031@ratthing-b246.strakt.com> In a message of Sun, 04 Jan 2004 10:36:55 EST, "portal" writes: >We are looking for a good solution that allows kids to control computers so >that we, the educators and the students, can talk about what is not talked >about - and these are cultural and social issues related to informationial >Base (Orb) technology within a MUD (multiple user domain) and target chat >and e-forums with externally generated subject matter taxonomy so that kids >and educators can see what is the thematic structure of social discourse. > >http://www.bcngroup.org/area2/KnowledgeEcologies.htm You will probably get further if you use less jargon, especially among people who already think that MUDs are Multi-User dungeons and ORBs are Object Request Brokers. If I understand you, I think that you are mistaken in believing that more technology will get you anywhere in your struggle to inform people of the thematic structure of social discourse. For that you need courses in media manipulation, and the like. I suppose you already know about http://www.media-awareness.ca/ Canadians have been studying this and teaching it in their high schools for years .... Laura Creighton From ajsiegel at optonline.net Sun Jan 4 12:59:47 2004 From: ajsiegel at optonline.net (Arthur) Date: Sun Jan 4 13:00:35 2004 Subject: In defense of 0, was Re: [Edu-sig] None potato, one potato, two potato, more.. Message-ID: <0HQZ0030H8OUUX@mta2.srv.hcvlny.cv.net> Kirby writes - >C is zero-based, like Python, no? K-12 is also zero based, effectively. Art From jason.cunliffe at verizon.net Sun Jan 4 12:59:13 2004 From: jason.cunliffe at verizon.net (Jason Cunliffe) Date: Sun Jan 4 13:01:57 2004 Subject: [Edu-sig] Knowledge Technology Toolkit References: Message-ID: <004401c3d2ec$7671f340$6501a8c0@vaio> Paul wrote: > Neither I, nor the BCNGroup, am asking for anyone's permission or > endorsement. We are exploring the issues and would like to use the AIC > model to first establish an appreciative social field. I enjoy Fourth > myself, and would use it over Python if I have my choice. But we are > considering the social issues and the strength that Python has assumed > within the Open Source Software community. um.. don't you mean "Forth" -- as in Charles Moore's brilliant beautiful creationsm, and the foundation of Adobe Postcript, Sun's OpenBoot and much more? http://www.forth.org/ http://www.colorforth.com/bio.html http://www.colorforth.com/ http://www.google.com/search?hl=en&ie=UTF-8&q=FORTH+charles+moore&spell=1 - Jason From urnerk at qwest.net Sun Jan 4 13:30:51 2004 From: urnerk at qwest.net (Kirby Urner) Date: Sun Jan 4 13:30:47 2004 Subject: [Edu-sig] RE: intell adoption problem In-Reply-To: Message-ID: Do you invest in DAML technology? http://www.daml.org/ Your lingo seems partially overlapping. A science fiction scenario wherein your technology has been implemented and is on the job, doing its thing, might be useful, in terms of getting across what you want to accomplish, and using more outside-the-beltway layman terms. Is it Google on steroids, with the ability to retrieve web pages based on natural language heuristics? At least Google is a business model that people already understand (sort of), and Python is used. I'm not sure why your angle on Python needs to focus on "Python 3" i.e. are there some specific features missing from 2.3 that you'd need to get your work done? The "new features" thread is not front and center on this list I think it's safe to say, although we've recently had a thread on getting a new decimal type included (Guido has announced in other venues that this is already a goal). Perl 6 might have some features you'd consider exciting. Are you looking ahead to that? Kirby From portal at ontologystream.com Sun Jan 4 13:34:21 2004 From: portal at ontologystream.com (portal) Date: Sun Jan 4 13:32:57 2004 Subject: [Edu-sig] conversation is unnecessarily burdened In-Reply-To: <0HQZ00G6S833D0@mta10.srv.hcvlny.cv.net> Message-ID: Art, my sense is that we, or at least my group, have other things to do than to prove you wrong. I am not even sure which point you might be addressing. Some things you say seems ok to me, and other things seems obviously incorrect or at least based on misunderstanding (either mine or yours). The "distrust" in the BCNGroup Charter seems just weird. If the distrust is because you do not have the specific background that is required to understand most of the issues, then this can be addressed by working with myself or others to learn what your background is missing. If the material that is missing is not considered important to you, than perhaps this conversation need not have ever happened. It would be your choice. Perhaps you might let others in the group express their opinion and interest? There are many things that one can become a master of , and I can acknowledge that you have a good mind and a scholarly sense - but that you do not understand something might rather lead to an interest in what you do not know rather than a communication of distrust. ? I am not really interested in your defining the discussion space in this way. We have seen this before, it is most often wasteful. It is possible that the effort is being wasted, and should be discontinued unless anyone else is speaking for this Python community? We do not need permission and we may choose to not use Python. The conversation is unnecessarily burdened at this point to see into the nature of the proposition that the National Project brings. From paul at ontologystream.com Sun Jan 4 14:05:41 2004 From: paul at ontologystream.com (Paul Prueitt) Date: Sun Jan 4 14:04:17 2004 Subject: [Edu-sig] resigning Message-ID: I will retire from this conversation. My time is needed on some other thoughts and I can see that the nature of the community here is not going to allow the type of discussion that I had hoped for. I do not criticize anyone, I just do not have time for this. best wishes to all for the New Year. anyone wishing to have a different discussion with my self and those whom I am speaking for, please join the bcngroup e-forum www.bcngroup.org if you wish to have the membership fee waived please just send a request to nathan@ontologystream.com again my respects to the community here. From tim.one at comcast.net Sun Jan 4 14:25:02 2004 From: tim.one at comcast.net (Tim Peters) Date: Sun Jan 4 14:25:05 2004 Subject: [Edu-sig] intell adoption problem In-Reply-To: Message-ID: [portal] > ... > (The key-less has table can be demonstrated... it exists and does make > sense. The hash function simple takes an ASCII string and "regards" > the string as a base 64 number (this is the invention that PTO > awarded to Bjorn in 2003). Then some magic happens. Is this the patent? http://tinyurl.com/3dj49 (if the USPTO search system changes, that's a compressed reference to US patent 6,542,896, awarded April 1, 2003 -- and that specific date seems somehow appropriate ). From lac at strakt.com Sun Jan 4 14:33:11 2004 From: lac at strakt.com (Laura Creighton) Date: Sun Jan 4 14:33:33 2004 Subject: [Edu-sig] Knowledge Technology Toolkit In-Reply-To: Message from "portal" of "Sun, 04 Jan 2004 13:40:03 EST." References: Message-ID: <200401041933.i04JXBjY015244@ratthing-b246.strakt.com> In a message of Sun, 04 Jan 2004 13:40:03 EST, "portal" writes: >I speak in my langauge, and do the best that I can. The jargon that I use I >explain so why is there a problem? We aren't understanding very well, so something is not working. I think it is too much language-which-you-use-to-mean-concept-A while the rest of us use the same language to mean something not-A. This is what happens with jargon -- people working in a field end up using a subset of the language in an extremely specialised fashion. It is precise within members of the field. But the people within the field have a tendancy to forget that they ever used the words to mean something different. Then when they go and try to communicate their ideas to people who are outside of the field, they get incomprehension, of the particular frustrating sort where not only do you not understand, but you don't even know what it is that you do not understand -- all the phrases make sense up until a point, but the whole lot does not come together. It becomes a game of 'guess which words he is using in a non-standard way'. If you have ever played with Markov Chains, then you know that this can be a lot of fun as a game -- to try to find meanings for generated things -- but if your real life conversations sound like Markov chains to the uninitiated, then you are deep within the realm of jargon, and non-standard word usage. This is what I think is happening here. We'd like the 'explanation for 10 year olds'. What are you trying to do, and why? Laura Creighton From urnerk at qwest.net Sun Jan 4 15:09:32 2004 From: urnerk at qwest.net (Kirby Urner) Date: Sun Jan 4 15:09:27 2004 Subject: [Edu-sig] resigning In-Reply-To: Message-ID: > I will retire from this conversation. My time is needed on some other > thoughts and I can see that the nature of the community here is not going > to allow the type of discussion that I had hoped for. Hi Jason, Do you think he was upset cuz you called him on "Fourth"? Kirby From jason.cunliffe at verizon.net Sun Jan 4 15:38:31 2004 From: jason.cunliffe at verizon.net (Jason Cunliffe) Date: Sun Jan 4 15:41:29 2004 Subject: [Edu-sig] resigning References: Message-ID: <00bd01c3d302$b7abf0c0$6501a8c0@vaio> > Do you think he was upset cuz you called him on "Fourth"? Kirby, I really hope not.. Maybe because I asked for a simple translation -- but that was both a direct comment and a sincere request on my part. "Fourth" could have been an innocent/freudian typo. [I'm sorry I know my own posts are painfully full of them] Else there is another language "Fourth" I've not heard of. Myth has it that FORTH was spelled that way because max 5 characters were allowed. Forth was my first love in programming and fueled my recent enthusiasm for Rebol which is forth like in some nice ways, including use of : in word definitions. Rebol is like a more readable Forth. The forth I studied was the more expansive Amiga JForth which operated much like Python -- interactive shell with imported text scripts. JForth had abandoned original FORTH's block code minimalism.. I got into it because it was used in HMSL, a musicians meta language toolkit now reborn in Java as JMSL. Phil Burke was the main author and maintainer of JForth and HMSL. His latest is JSyn, the superb Java audio synthesis tool now added to 'Processing' open toolbox by Amit Pitaru as 'Sonia'. Perhaps coolest non-adopted Forth offspring I ever came across was John Walker's "ATLAST" JForth http://home.tampabay.rr.com/jforth/ HMSL http://www.softsynth.com/hmsl/ JMSL http://www.algomusic.com/jmsl/ JSyn http://www.softsynth.com/jsyn/ Processing http://proce55ing.net/ Sonia http://www.pitaru.com/sonia/ ATLAST http://www.fourmilab.ch/nav/topics/components.html http://www.fourmilab.ch/atlast/README John Walker - FourmiLab http://www.fourmilab.ch/ - Jason From psdwg at mail.ru Sun Jan 4 15:35:07 2004 From: psdwg at mail.ru (Rachel) Date: Sun Jan 4 15:42:33 2004 Subject: [Edu-sig] Re: HGGL, room and dining Message-ID: crimp cumberland hermeneutic laboratory smaller grievance diploid dichotomy silica conrail frivolous porcelain cochineal vista dartmouth aback -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/edu-sig/attachments/20040105/2105f02d/attachment.html From ajsiegel at optonline.net Sun Jan 4 18:34:27 2004 From: ajsiegel at optonline.net (Arthur) Date: Sun Jan 4 18:34:30 2004 Subject: [Edu-sig] re: conversation is unnecessarily burdened Message-ID: <0HQZ00D7NO4WPS@mta3.srv.hcvlny.cv.net> Paul writes - >There are many things that one can become a master of , and I can >acknowledge that you have a good mind and a scholarly sense - but that you >do not understand something might rather lead to an interest in what you do >not know rather than a communication of distrust. ? I can only respond that a communication of distrust is just that - an effort to communicate. And should be seen as preferable to and more respectful than uncommunicated mistrust. And while there is very rarely general consensus around edu-sig, there seems to be some general consensus, that the BNCGroup might well take some responsibility for an inability of others to grasp its agenda. Part of the distrust, in my case, derives from the fact that there is zero (or null) effort to state objectives and ideas in ways that could reasonable be expected to be grasped by an interested, but uninitiated, observer. So yes, I quite believe that you have "seen this before". And as much bandwidth as I might consume, there is plenty of unconsumed bandwidth as well (as I think Kirby, in effect, once observed). I don't perceive myself as attempting to do more than say what I have to say. And can't find a reason to believe doing so is effectively limiting anyone else from having their say. In terms of talking to someone who can speak for the Python community - impossible, thank goodness. In terms of speaking for folks who can speak for the Python Software Foundation, I pointed clearly in the appropriate direction. Best I can do. Art From trent at oliphant.org Mon Jan 5 01:44:36 2004 From: trent at oliphant.org (Trent A. Oliphant) Date: Mon Jan 5 01:52:51 2004 Subject: [Edu-sig] Confusion with slice notation Message-ID: <00d001c3d358$79bb32c0$c500a8c0@mshome.net> Here is where I get caught each time with list notation. (I realized as I was writing this it isn't the slice notation but the index notation that gets me) x[:3] returns a list with the first three elements in it. x[-3:] returns a list with the last three elements in it. x[2] returns the third element in a list, but x[-3] returns the third to the last element in a list To illustrate it another way x = [1,2,3,4,5,6,7,8,9] y = [9,8,7,6,5,4,3,2,1] The way I look at it (and this may be where the problem lies) is that the [-n] notation is an inverse of sorts of the [n] notation. Slicing does work that way: x[:3] = [1,2,3] (3 elements) y[-3:] = [3,2,1] (3 elements) However, indexing doesn't x[3] = 4 (0 based indexing) y[-3] = 3 (could be viewed as -1 based indexing) So, I can't take my model for the slices and translate it to indexing, even though the notation is very similar. It just seems a bit inconsistent to me, and as I said earlier, I haven't been able to get it. I am not very good at just memorizing something and saying that's just the way it is, I need more, and I haven't figured out what that more is for this issue. Just some food for thought. Trent Oliphant From trent at oliphant.org Mon Jan 5 01:44:18 2004 From: trent at oliphant.org (Trent A. Oliphant) Date: Mon Jan 5 01:52:53 2004 Subject: [Edu-sig] Thoughts from a lurker Message-ID: <00cf01c3d358$78f1c840$c500a8c0@mshome.net> I just want to add how much I appreciate all of the effort that a few go to in these discussions that I gain so much from. I am only a part-time hack programmer (a little of VBA in Access) and a little Python when I get a chance (Both self-taught). And my input in education is as a home-schooling father (unschooling being my choice of methodology). But I am greatly interested in both of these areas and thus have been subscribed to this list for quite a long period of time. The fact that these discussions are taking place, help me to understand things better myself, not just of Python, but of the learning process and how computers and technology fits in to that. The recent discussion on 0 vs 1 based indexing has been very helpful to me in that regard. (Although, I still have to think each time I want to take a slice from the end of a list. For some reason I haven't quite "understood" exactly what the notation means. I can get it each time - but I don't "know" it enough for it to come naturally, I'll send a separate post to explain my confusion each time.). I have often been frustrated over the general sense that any computer "training" is just how to do tasks, with no explanation of why. This is especially true in the business world, which is why I have avoided taking any classes to learn about computers. I would hope that a Computer Science program would be different, but having never taken a course I wouldn't know. (I have been a software trainer myself and when I had the opportunity, I tried to develop cirriculum that included the why of doing things.) One thing that I have noticed about most computer cirriculum - especially books, is that I am able to understand them very well (and quickly) up to a certain point. Then it seems as if there is a huge leap - as if there is a chapter or two missing (or more). Unfortunately, I don't have any specific examples at this point - I will try to find them. I end up feeling like Alice upon hearing "The Jabberwocky" - it seems as if it should make sense, but it just doesn't. >From an edu-sig standpoint, is this experience typical? If so, why? And can anything be done about it? Is it a matter of "computer literacy readiness"? That is the one reason I joined this SIG - to find out how to make learning these things more accessible to me, and hopefully to others as well. Trent Oliphant From jason.cunliffe at verizon.net Mon Jan 5 04:38:59 2004 From: jason.cunliffe at verizon.net (Jason Cunliffe) Date: Mon Jan 5 04:43:04 2004 Subject: [Edu-sig] Guardian Unlimited The Guardian Stay still, will you Message-ID: <000901c3d36f$bfb8dd60$6501a8c0@vaio> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: Guardian Unlimited The Guardian Stay still, will you.url Type: application/octet-stream Size: 186 bytes Desc: not available Url : http://mail.python.org/pipermail/edu-sig/attachments/20040105/699fb779/GuardianUnlimitedTheGuardianStaystillwillyou.obj From ajsiegel at optonline.net Mon Jan 5 08:12:45 2004 From: ajsiegel at optonline.net (Arthur) Date: Mon Jan 5 08:12:47 2004 Subject: [Edu-sig] Morphix Message-ID: <0HR0003XAQ196P@mta1.srv.hcvlny.cv.net> Great minds think alike ;) The BNCGroup's Knowledge Technology Toolkit would be a Knoppix based bootable CD. The content of which....? The concept of such a resource in this media, providing easy access to the curious of Python related educational resources has been suggested by AS here before. It would clearly, IMO, be a wonderful resource to have available. Morphix is a Knoppix based distribution that is specifically designed for easy reconfiguration to allow customized distribution. For example, a distribution highlighting Python related educational resources. http://morphix.sourceforge.net/modules/news/ While it would quite swell to have a $2 mil budget to put something like this together, a start might be reasonably made with a $0 budget. I have a lot on my plate, and don't think this is something I will get very far with - again, trying to be realistic - working on my own. One alternative I can think of is to simply open a sourceforge project, make a python-list announcement, and see if any community interest is generated. Any thoughts, interest, words of encouragement? Art From mmclay at comcast.net Mon Jan 5 11:10:04 2004 From: mmclay at comcast.net (Michael McLay) Date: Mon Jan 5 11:00:38 2004 Subject: [Edu-sig] RE: intell adoption problem In-Reply-To: References: Message-ID: <200401051110.04844.mmclay@comcast.net> On Sunday 04 January 2004 01:30 pm, Kirby Urner wrote: > Do you invest in DAML technology? > http://www.daml.org/ > Your lingo seems partially overlapping. > > A science fiction scenario wherein your technology has been implemented and > is on the job, doing its thing, might be useful, in terms of getting across > what you want to accomplish, and using more outside-the-beltway layman > terms. > > Is it Google on steroids, with the ability to retrieve web pages based on > natural language heuristics? At least Google is a business model that > people already understand (sort of), and Python is used. > > I'm not sure why your angle on Python needs to focus on "Python 3" i.e. are > there some specific features missing from 2.3 that you'd need to get your > work done? Getting education related proposals funded appears to be much easier than getting pure CS language development funded. (The largest block of grants are education related grants, so this isn't too suprising.) The Python 3 reference is included because the funding request is piggybacking the Python 3.0 development costs on the larger education centric proposal. The improvements to the language would presumably benefit the education process that uses Python 3.0, so adding the cost of the language improvements onto the project is legimate. It provides a concrete example of how the language improvements are a justifiable investment to a grant giving organization. > The "new features" thread is not front and center on this list I think it's > safe to say, although we've recently had a thread on getting a new decimal > type included (Guido has announced in other venues that this is already a > goal). Decimal numbers are very important. Many other Python 3.0 features have also been discussed on the python-dev mailing list. The list needs to be developed. I made a first stab at this about a year ago, but that list is far from complete. Someone on python-dev was going to start a list of Python 3.0 features (I think it might have been Brett.) From mats at laplaza.org Mon Jan 5 11:01:35 2004 From: mats at laplaza.org (Mats Wichmann) Date: Mon Jan 5 11:02:10 2004 Subject: [Edu-sig] Morphix In-Reply-To: <0HR0003XAQ196P@mta1.srv.hcvlny.cv.net> Message-ID: <5.1.0.14.1.20040105085856.025c35d0@mail.laplaza.org> Art write: >Morphix is a Knoppix based distribution that is specifically designed for >easy reconfiguration to allow customized distribution. For example, a >distribution highlighting Python related educational resources. > >http://morphix.sourceforge.net/modules/news/ > >While it would quite swell to have a $2 mil budget to put something like >this together, a start might be reasonably made with a $0 budget. > >I have a lot on my plate, and don't think this is something I will get very >far with - again, trying to be realistic - working on my own. > >One alternative I can think of is to simply open a sourceforge project, make >a python-list announcement, and see if any community interest is generated. > >Any thoughts, interest, words of encouragement? Since it won't put much strain on the $0 budget, why not just do it... From com-nospam at ccraig.org Mon Jan 5 10:56:13 2004 From: com-nospam at ccraig.org (Christopher A. Craig) Date: Mon Jan 5 11:10:13 2004 Subject: [Edu-sig] Re: In defense of 0, was Re: None potato, one potato, two potato, more.. References: <0HQZ0030H8OUUX@mta2.srv.hcvlny.cv.net> Message-ID: Arthur writes: > Kirby writes - > >C is zero-based, like Python, no? > > K-12 is also zero based, effectively. > Okay, I'm a bit off topic here, but that's a historical artifact. If pre-k were added in it would be effectively -1 based, which would still be irrelevant. Coming slightly back to topic the important to thing remember about teaching 0 based indexing (and I'm admittedly a programmer, and only teach to my Boy Scouts) is that array indexing measures the _distance_ from the beginning and not the number of the item. So we can imagine we have a (metric) ruler and a set of items, each one cm long and denoted here by letters: 0 a 1 b 2 c 3 d 4 e 5 Then everything makes perfect sense (except for why they chose such a screwy indexing scheme which won't make sense until much later): [0] would indicate the item sitting 0cm from the beginning (a) [2] would indicate the item sitting 2cm from the beginning (c) [0:3] would indicate the items from the beginning (0) to 3 cm from the beginning (i.e. a,b,c) [-1] indicates the item sitting 1cm from the end (e) -- Christopher A. Craig "By rights we shouldn't be here." -- Sam in Peter Jackson's "The Two Towers" while standing in Osgiliath, where he shouldn't be. From urnerk at qwest.net Mon Jan 5 11:30:39 2004 From: urnerk at qwest.net (Kirby Urner) Date: Mon Jan 5 11:30:34 2004 Subject: [Edu-sig] Re: In defense of 0, was Re: None potato, one potato, two potato, more.. In-Reply-To: Message-ID: > [2] would indicate the item sitting 2cm from the beginning (c) > > [0:3] would indicate the items from the beginning (0) to 3 cm from the > beginning (i.e. a,b,c) > >From 0 to 2 cm from the beginning, no? Kirby From com-nospam at ccraig.org Mon Jan 5 11:45:19 2004 From: com-nospam at ccraig.org (Christopher A. Craig) Date: Mon Jan 5 11:45:26 2004 Subject: [Edu-sig] Re: In defense of 0, was Re: None potato, one potato, two potato, more.. References: Message-ID: "Kirby Urner" writes: > > [2] would indicate the item sitting 2cm from the beginning (c) > > > > [0:3] would indicate the items from the beginning (0) to 3 cm from the > > beginning (i.e. a,b,c) > > > > From 0 to 2 cm from the beginning, no? > No, though 'c' lies 2cm from the beginning, it does not fall between 0 and 2cm because if you stop at 2cm you haven't yet passed it (since we're imagining each item being 1cm wide and it lies between 2cm and 3cm). 0 a 1 b 2 c 3 d 4 e 5 -- Christopher A. Craig "There is no subject, however complex, which--if studied with patience and intelligence--will not become more complex." New Speaker's Handbook From trent at oliphant.org Mon Jan 5 12:25:09 2004 From: trent at oliphant.org (Trent Oliphant) Date: Mon Jan 5 12:14:30 2004 Subject: [Edu-sig] Re: In defense of 0, was Re: None potato, one potato, two potato, more.. In-Reply-To: References: Message-ID: <3FF99DF5.90708@oliphant.org> >>>[2] would indicate the item sitting 2cm from the beginning (c) >>> >>>[0:3] would indicate the items from the beginning (0) to 3 cm from the >>>beginning (i.e. a,b,c) >>> >> >>From 0 to 2 cm from the beginning, no? >> > > > No, though 'c' lies 2cm from the beginning, it does not fall between 0 > and 2cm because if you stop at 2cm you haven't yet passed it (since > we're imagining each item being 1cm wide and it lies between 2cm and > 3cm). > > 0 a 1 b 2 c 3 d 4 e 5 > > So the indexing notation [n] could be considered shorthand for [n:n+1]? You are taking a slice of len 1 starting at n? Trent Oliphant From trent at oliphant.org Mon Jan 5 12:58:44 2004 From: trent at oliphant.org (Trent Oliphant) Date: Mon Jan 5 12:48:06 2004 Subject: [Edu-sig] Re: In defense of 0, was Re: None potato, one potato, two potato, more.. In-Reply-To: References: <3FF99994.9050409@oliphant.org> Message-ID: <3FF9A5D4.6000203@oliphant.org> > >>So the indexing notation [n] could be considered shorthand for [n:n+1]? You >>are taking a slice of len 1 starting at n? >> >> > > > I would say it's the object that lays n cm from the beginning, but > since each item is 1cm wide the effect is the same. The first object > is, of course, 0cm from the beginning. > I know this is nit picking, and you yourself said you only use it explain to your scouts. I would argue that the use of the model without the explaination of it being a form of shorthand would be contradictory with the fact that it takes a beginning and an ending to describe anything of any width. The effect is indeed the same, but I think it makes other things much easier to understand if you complete the model. Since you describe that each item has a width. I think it makes slices easier to understand the notation. I do like the model, because I have now been able to resolve the inconsitencies with the negative notation. For example: If I look at [-2] as shorthand for [-2:-1], it is no longer based on 0 or 1 based indexing, but the item that starts at position 2 from the end of length one. ([-1] would be shorthand for [-1:]) Trent From urnerk at qwest.net Mon Jan 5 12:55:28 2004 From: urnerk at qwest.net (Kirby Urner) Date: Mon Jan 5 12:55:22 2004 Subject: [Edu-sig] Re: In defense of 0, was Re: None potato, one potato, two potato, more.. In-Reply-To: Message-ID: > > > [2] would indicate the item sitting 2cm from the beginning (c) > > > > > > [0:3] would indicate the items from the beginning (0) to 3 cm from the > > > beginning (i.e. a,b,c) > > > > > > > From 0 to 2 cm from the beginning, no? > > > > No, though 'c' lies 2cm from the beginning, it does not fall between 0 > and 2cm because if you stop at 2cm you haven't yet passed it (since > we're imagining each item being 1cm wide and it lies between 2cm and > 3cm). > > 0 a 1 b 2 c 3 d 4 e 5 > I think of it somewhat differently then. I think of [0:3] as similar to range(0,3) which means [0,1,2] i.e. the 3 is not included. If we go [mylist(i) for i in range(0,3)], we get the same as mylist[0:3]. With the negative indexes, I think of len(mylist) as an implicit argument i.e. if you go: >>> mylist = ['a','b','c','d'] then mylist[len(mylist)] is out of range, because len() returns the actual number of members, whereas indexing is 0-based. However, mylist[len(mylist) - 1] would get you the last element, and so I see mylist[-1] as shorthand for that. mylist[:-1] is likewise non-inclusive of the last element, is similar to [mylist[i] for i in range(0,len(mylist)-1)] Kirby From fred at ontosys.com Mon Jan 5 12:59:00 2004 From: fred at ontosys.com (Fred Yankowski) Date: Mon Jan 5 12:59:05 2004 Subject: [Edu-sig] Re: In defense of 0, was Re: None potato, one potato, two potato, more.. In-Reply-To: <3FF99DF5.90708@oliphant.org> References: <3FF99DF5.90708@oliphant.org> Message-ID: <20040105175900.GA14672@ontosoft.com> On Mon, Jan 05, 2004 at 10:25:09AM -0700, Trent Oliphant wrote: > So the indexing notation [n] could be considered shorthand for [n:n+1]? > You are taking a slice of len 1 starting at n? But where [n:n+1] is a sequence of length 1, [n] is the object in that sequence. >>> x = ['a', 'b', 'c', 'd'] >>> x[2:3] ['c'] >>> x[2] 'c' If Python had a 'first' method for sequences, similar to 'car' in Lisp, then x[n] would be roughly equivalent to x[n:n+1].first(). -- Fred Yankowski fred@ontosys.com tel: +1.630.879.1312 OntoSys, Inc PGP keyID: 7B449345 fax: +1.630.879.1370 www.ontosys.com 38W242 Deerpath Rd, Batavia, IL 60510-9461, USA From com-nospam at ccraig.org Mon Jan 5 13:08:22 2004 From: com-nospam at ccraig.org (Christopher A. Craig) Date: Mon Jan 5 13:08:26 2004 Subject: [Edu-sig] Re: In defense of 0, was Re: None potato, one potato, two potato, more.. References: Message-ID: "Kirby Urner" writes: > > No, though 'c' lies 2cm from the beginning, it does not fall between 0 > > and 2cm because if you stop at 2cm you haven't yet passed it (since > > we're imagining each item being 1cm wide and it lies between 2cm and > > 3cm). > > > > 0 a 1 b 2 c 3 d 4 e 5 > > > > I think of it somewhat differently then. I think of [0:3] as similar to > range(0,3) which means [0,1,2] i.e. the 3 is not included. > > If we go [mylist(i) for i in range(0,3)], we get the same as > mylist[0:3]. That doesn't end with differing effect. [0:3] would still be the first three items in my example (and thus the same as range(0,3) -- Christopher A. Craig "Microprocessors cost $700 -- far too much for a tiny slice of refined, impurity-laced beach sand." Steve Gibson From trent at oliphant.org Mon Jan 5 13:22:21 2004 From: trent at oliphant.org (Trent Oliphant) Date: Mon Jan 5 13:11:40 2004 Subject: [Edu-sig] Re: In defense of 0, was Re: None potato, one potato, two potato, more.. In-Reply-To: <20040105175900.GA14672@ontosoft.com> References: <3FF99DF5.90708@oliphant.org> <20040105175900.GA14672@ontosoft.com> Message-ID: <3FF9AB5D.3040903@oliphant.org> > >>So the indexing notation [n] could be considered shorthand for [n:n+1]? >> You are taking a slice of len 1 starting at n? > > > But where [n:n+1] is a sequence of length 1, [n] is the object in that > sequence. > > >>> x = ['a', 'b', 'c', 'd'] > >>> x[2:3] > ['c'] > >>> x[2] > 'c' > > If Python had a 'first' method for sequences, similar to 'car' in > Lisp, then x[n] would be roughly equivalent to x[n:n+1].first(). > Of course you are correct that they are not truly equivalent. That is the problem with any model - at some point it breaks down. I know that I have a tendency to create models that work for me to understand - and then I know the limitation of the model. Isn't that one of the challenges of teaching - finding a common ground for understanding? Trent From dblank at brynmawr.edu Mon Jan 5 13:14:29 2004 From: dblank at brynmawr.edu (Douglas S. Blank) Date: Mon Jan 5 13:14:33 2004 Subject: [Edu-sig] Confusion with slice notation In-Reply-To: <00d001c3d358$79bb32c0$c500a8c0@mshome.net> References: <00d001c3d358$79bb32c0$c500a8c0@mshome.net> Message-ID: <3FF9A985.2070404@brynmawr.edu> Trent A. Oliphant wrote: > Here is where I get caught each time with list notation. > > (I realized as I was writing this it isn't the slice notation but the index > notation that gets me) I don't think it is the slice or the index notation that confuses many, but the fact that the negative numbers are distances to a line outside the array, and positive numbers are distances to the first element in the array. Or, negative numbers are distances, and positive numbers are positions. Here is your example again, in a slightly different form. First column, positions from the start. Second column is distances from the end. Then the values from the x and y arrays: x y ------------- end/top 8 -1 9 1 7 -2 8 2 6 -3 7 3 5 -4 6 4 4 -5 5 5 3 -6 4 6 2 -7 3 7 1 -8 2 8 0 -9 1 9 ---- start/bottom Why did they do it this way? Why not in a more symmetric way? If they made it so that they were both zero-based, then x[-0] would be the last element. But -0 == 0, so that doesn't work. If they made it so that they were both one-based, then lots of old C coders would have off-by-one errors :) Seriously though, if you think of the positive number as being a distance from the start of the array, then you can just take the address of the array and add the position to it (times the size of an element), and that will give you the address of that element. That explanation seems outdated, though. But that is why they are asymmetric. -Doug > > > x[:3] returns a list with the first three elements in it. > x[-3:] returns a list with the last three elements in it. > > x[2] returns the third element in a list, but > x[-3] returns the third to the last element in a list > > To illustrate it another way > > x = [1,2,3,4,5,6,7,8,9] > y = [9,8,7,6,5,4,3,2,1] > > The way I look at it (and this may be where the problem lies) is that the > [-n] notation is an inverse of sorts of the [n] notation. > > Slicing does work that way: > x[:3] = [1,2,3] (3 elements) > y[-3:] = [3,2,1] (3 elements) > > However, indexing doesn't > x[3] = 4 (0 based indexing) > y[-3] = 3 (could be viewed as -1 based indexing) > > So, I can't take my model for the slices and translate it to indexing, even > though the notation is very similar. > > It just seems a bit inconsistent to me, and as I said earlier, I haven't > been able to get it. I am not very good at just memorizing something and > saying that's just the way it is, I need more, and I haven't figured out > what that more is for this issue. > > Just some food for thought. > > Trent Oliphant > > > _______________________________________________ > Edu-sig mailing list > Edu-sig@python.org > http://mail.python.org/mailman/listinfo/edu-sig > > -- Douglas S. Blank, Assistant Professor dblank@brynmawr.edu, (610)526-6501 Bryn Mawr College, Computer Science Program 101 North Merion Ave, Park Science Bld. Bryn Mawr, PA 19010 dangermouse.brynmawr.edu From fred at ontosys.com Mon Jan 5 13:16:36 2004 From: fred at ontosys.com (Fred Yankowski) Date: Mon Jan 5 13:16:41 2004 Subject: [Edu-sig] Re: In defense of 0, was Re: None potato, one potato, two potato, more.. In-Reply-To: References: Message-ID: <20040105181636.GB14672@ontosoft.com> Another way to think of [i:j] is as a HALF-OPEN INTERVAL: all values from i to j, not including j. I first encountered this notion in math long ago when considering ranges of real numbers. IIRC the notation was such that the dilimiters "[" and "]" indicated a closed end and "(" and ")" an open end. Then, for example, the (non-python) notation "[a,b)" meant "all real numbers a such that a <= x < b. Such half-open intervals have the nice property that (continuing with the non-python syntax) "[a,b)" and "[b, c)" partition the interval "[a,c)" -- they cover the interval with no overlap, since point b appears only in the second component interval. Similarly in Python, x[a:b] + x[b:c] is the same as x[a:c]. This equivalence is helpful in many applications. -- Fred Yankowski fred@ontosys.com tel: +1.630.879.1312 OntoSys, Inc PGP keyID: 7B449345 fax: +1.630.879.1370 www.ontosys.com 38W242 Deerpath Rd, Batavia, IL 60510-9461, USA From com-nospam at ccraig.org Mon Jan 5 14:11:30 2004 From: com-nospam at ccraig.org (Christopher A. Craig) Date: Mon Jan 5 14:11:36 2004 Subject: [Edu-sig] Re: Confusion with slice notation References: <00d001c3d358$79bb32c0$c500a8c0@mshome.net> <3FF9A985.2070404@brynmawr.edu> Message-ID: "Douglas S. Blank" writes: > I don't think it is the slice or the index notation that confuses many, but > the fact that the negative numbers are distances to a line outside the array, > and positive numbers are distances to the first element in the array. Or, > negative numbers are distances, and positive numbers are positions. Or they are both the position of the start of the element from the start or end of the list. Which is why I like my way of doing things. If we overlay 6 1cm items on a ruler and number in centimeters from the start and from the end we have something like this: ItemA ItemB ItemC ItemD ItemE ItemF | | | | | | | 0 1cm 2cm 3cm 4cm 5cm 6cm -6cm -5cm -4cm -3cm -2cm -1cm -0 Then with positive indexes the first three items would be the items between 0cm and 3cm ([0:3]) and with negative they would be the items between -6cm and -3cm ([-6:-3]). I think most people are used to saying that things reside at their starting point, so it's reasonable to say that ItemF is at -5cm ([5]) or -1cm ([-1]) but [-1:-1] isn't anything, because there isn't anything betweeen -1cm and -1cm. -- Christopher A. Craig "In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move." Douglas Adams From com-nospam at ccraig.org Mon Jan 5 14:23:40 2004 From: com-nospam at ccraig.org (Christopher A. Craig) Date: Mon Jan 5 14:23:45 2004 Subject: [Edu-sig] Re: Confusion with slice notation References: <00d001c3d358$79bb32c0$c500a8c0@mshome.net> <3FF9A985.2070404@brynmawr.edu> Message-ID: com-nospam@ccraig.org (Christopher A. Craig) writes: > Or they are both the position of the start of the element from the > start or end of the list. Which is why I like my way of doing > things. Sorry to reply to myself, but I thought it important to note that this (not coincidentally) is very similar to how indexing actually works. A list is a list of pointers (lets say 32 bits (4 bytes) for the sake of argument) and a[0:3] returns a list containing the contents of the pointers between the start of the list and 3*4-bytes after the start. Similarly a[-3:-1] returns a list containing the contents of the pointers between 3*4-bytes before the end and 1*4-bytes before the end and a[2] returns the contents of the pointer which begins 2*4bytes after the start of the list. (Which, also not coincidentally, is why C did it that way, a[3] is changed by the compiler to +(3*).) -- Christopher A. Craig ed is the standard text editor From hancock at anansispaceworks.com Mon Jan 5 16:59:00 2004 From: hancock at anansispaceworks.com (Terry Hancock) Date: Mon Jan 5 16:51:21 2004 Subject: [Edu-sig] Re: Confusion with slice notation In-Reply-To: References: <00d001c3d358$79bb32c0$c500a8c0@mshome.net> <3FF9A985.2070404@brynmawr.edu> Message-ID: On Monday 05 January 2004 01:11 pm, Christopher A. Craig wrote: > Or they are both the position of the start of the element from the > start or end of the list. And this is perfectly symmetrical. Which is why I find Python's indexing and slicing more intuitive than any of its predecessors. I think the "half open interval" notion mentioned above is equally useful. Note that both are related to "real number thinking" and not "integer thinking": i.e. they are distances or positions, not "numbers of things". BTW, I think this is more on-topic for the list --- this is the way to teach Python indexing: as "distances". Cheers, Terry -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com From urnerk at qwest.net Mon Jan 5 16:52:05 2004 From: urnerk at qwest.net (Kirby Urner) Date: Mon Jan 5 16:51:58 2004 Subject: [Edu-sig] Re: In defense of 0, was Re: None potato, one potato, two potato, more.. In-Reply-To: Message-ID: > > I think of it somewhat differently then. I think of [0:3] as similar to > > range(0,3) which means [0,1,2] i.e. the 3 is not included. > > > > If we go [mylist(i) for i in range(0,3)], we get the same as > > mylist[0:3]. > > That doesn't end with differing effect. [0:3] would still be the > first three items in my example (and thus the same as range(0,3) > Yes, but in your ruler analogy re mylist[0:3], you deemed it important that the 3 meant '3 cm' and that '3 cm' was necessary to include the element starting at 2 cm (i.e. 'c'). I find this confusing because mylist[2] is 'c' is 2 cm (according to your model), so 3 cm should *not* enter into it when we write mylist[0:3], which ends at 'c' as well. You only need to mention where 'c' *starts* in order to yank it in. Its ending point isn't important -- in *either case* (standalone index of [2], or range-slice of [0:3]). >From my point of view, mylist[0,1,2] (not real Python syntax) does not include any '3 cm' and nor does range(0,3) and nor does mylist[0:3]. Negative indexes implicitly subtract from len(mylist). Whether negative or positive, the 2nd item in a list is not included (as in range), but we have the option of leaving it blank (as in mylist[-3:]), in which case we still get everything through the last element. Kirby From trent at oliphant.org Mon Jan 5 17:43:42 2004 From: trent at oliphant.org (Trent Oliphant) Date: Mon Jan 5 17:33:01 2004 Subject: [Edu-sig] Re: Confusion with slice notation In-Reply-To: References: <00d001c3d358$79bb32c0$c500a8c0@mshome.net> <3FF9A985.2070404@brynmawr.edu> Message-ID: <3FF9E89E.3050100@oliphant.org> > On Monday 05 January 2004 01:11 pm, Christopher A. Craig wrote: > >>Or they are both the position of the start of the element from the >>start or end of the list. > > > And this is perfectly symmetrical. Which is why I find > Python's indexing and slicing more intuitive than any > of its predecessors. > > I think the "half open interval" notion mentioned above is > equally useful. Note that both are related to "real number > thinking" and not "integer thinking": i.e. they are distances > or positions, not "numbers of things". > > BTW, I think this is more on-topic for the list --- this is the > way to teach Python indexing: as "distances". > I would tend to agree that using "distances" is a very powerful method for teaching indexing and slicing in Python. I think that it lends itself very well to understanding what the compuuter is actually doing, as illustrated by Christopher's explanation. Every item in the list does indeed have a "size" (in memory) but in practice, it is an indivisible size of 1. However, as Kirby points out, this isn't the only appropriate way to teach it. Some people would actually be confused by the model. If this list is truly about bringing about the goals of CP4E, then we need to discuss more these types of issues with learning specific concepts. We had a little bit of discussion like this with the using calculator vs. spreadsheet discussion. However, I'm not sure we ever really discussed how different learning styles come into play with teaching computer literacy. Besides the issue of learning styles, you have the whole issue of computer "readiness" - specific background information - that will differ from person to person. I do want to thank everyone for their input, I think I finally "get it" now, although I will only be able to know for sure the next time I go to do some reverse indexing on a list. Trent From urnerk at qwest.net Mon Jan 5 17:48:09 2004 From: urnerk at qwest.net (Kirby Urner) Date: Mon Jan 5 17:48:02 2004 Subject: [Edu-sig] Re: Confusion with slice notation In-Reply-To: <3FF9E89E.3050100@oliphant.org> Message-ID: > However, as Kirby points out, this isn't the only appropriate way to > teach it. Some people would actually be confused by the model. > I like the distances/offset picture just fine, and introduced it complete with "ascii ruler". I quote (myself): ============ |<-- 0th -|<--1st --|<-- 2nd -|<-- etc.-| |---------|---------|---------|---------|---------|---------|---------| 0 1 2 3 4 5 6 7 |--1st -->|--2nd -->|--3rd -->|--etc.-->| I think it pays to read some about memory storage, fetching and retrieving from RAM, address bus, data bus, clock bus -- all that inner guts stuff -- to get some sense of it. ============ It's just that ['a','b','c','d'][0:3] is the same as [['a','b','c','d'][i] for i in [0,1,2]] meaning we don't need anything but the start positions on the ruler, to grab what hangs thereon. > Besides the issue of learning styles, you have the whole issue of > computer "readiness" - specific background information - that will > differ from person to person. > Good point to raise. Kirby From lmub34b at earthlink.net Sat Jan 3 19:45:51 2004 From: lmub34b at earthlink.net (Jimmie Boswell) Date: Mon Jan 5 18:29:29 2004 Subject: [Edu-sig] Re: that he came h Message-ID:

cfhalnqnggswl dqpiqge k p n fsw dn ygddd qa aipwftvx xrkrqv rsvra gu

 

HI,Edu-sig

I have been receiving emails saying that I'm contributing to the "moral decay of society" by selling the Banned C D. That may be, but I feel Strongly that you have a right to benefit from this hard-to-find information. So I am giving you ONE LAST CHANCE to order the Banned C D! With this powerful C D, you will be able to investigate your friends, enemies and lovers in just minutes using the Internet You can track down old flames from college, or you can dig up some dirt on your boss to make sure you get that next promotion!
Or maybe you want a fake diploma to hang on your bedroom wall. You'll find addresses for companies that make these diplomas on the Banned C D. Need to disappear fast and never look back? No problem! Using the BannedCD, you will learn how to build a completely new identity. Obviously, the Powers That Be don't want you to have the BannedCD. They have threatened me with lawsuits, fines, and even imprisonment unless I stop selling it immediately. But I feel that YOU have a Constitutional right to access this type of information, and I can't be intimidated. Uncle Sam and your creditors are horrified that I am still selling this product! There must be a price on my head!
Why are they so upset? Because this C D gives you freedom. And you can't buy freedom at your local Walmart. You will have the freedom to avoid Zreditors, judgments, lawsuits, IRS tax collectors, criminal indictments, your greedy ex-wife or ex-husband, and MUCH more!


see now

zpli zvjk udcru pxowsieh   n o m a i l
catastrophe m ikcyqro nsub x yyta rddqg ukhcuaff ohc k kh From ajsiegel at optonline.net Mon Jan 5 20:05:34 2004 From: ajsiegel at optonline.net (Arthur) Date: Mon Jan 5 20:05:47 2004 Subject: [Edu-sig] RE: intell adoption problem Message-ID: <0HR10005VN0RNX@mta3.srv.hcvlny.cv.net> Michael writes - >The Python 3 reference is included because the funding request is >piggybacking the Python 3.0 development costs on the larger education >centric proposal Just understand that someone like myself is put in a funny position, because the degree of involvement of Guido and the PSF is a total unknown. So it all comes off a bit peculiar. I am sure you can understand why that would be. That aside, all my instincts are sending up red flags. But I have been working in close quarters with myself for quite some time, and have found my instincts to be quite fallible. I keep a dossier, in fact ;) Art From ajsiegel at optonline.net Mon Jan 5 20:24:57 2004 From: ajsiegel at optonline.net (Arthur) Date: Mon Jan 5 20:25:11 2004 Subject: [Edu-sig] re: Morphix Message-ID: <0HR100DKRNXLSA@mta5.srv.hcvlny.cv.net> Mats writes - >>Any thoughts, interest, words of encouragement? >Since it won't put much strain on the $0 budget, why >not just do it... I'll take that as a ringing endorsement of the idea ;) Having had a few moments to look more closely at Morphix today, I see that its seems to have made the creation of a custom livecd so brain dead simple that I am tempted keep it under my hat. And do something where I retain editorial control. "PyGeo and Friends" has a nice ring to it. But more seriously, it seems that if one did something quite core - Numeric. wxPython, pygame, and the like and made it available for people to continue to Morph on from there for more specific purposes, it would be an approach more in the spirit of what Morph is about. Rather than stuffing a distribution full of stuff. I don't think I get excited real easily. Knoppix was exciting enough, when I found it. The Morph take-off on Knoppix is a knock-out. I know how Jason feels when he finds the next Big Thing. This, to me, is the next Big Thing. Art From mmclay at comcast.net Mon Jan 5 22:49:41 2004 From: mmclay at comcast.net (Michael McLay) Date: Mon Jan 5 22:40:09 2004 Subject: [Edu-sig] RE: intell adoption problem In-Reply-To: <0HR10005VN0RNX@mta3.srv.hcvlny.cv.net> References: <0HR10005VN0RNX@mta3.srv.hcvlny.cv.net> Message-ID: <200401052249.41323.mmclay@comcast.net> On Monday 05 January 2004 08:05 pm, Arthur wrote: > Michael writes - > > >The Python 3 reference is included because the funding request is > >piggybacking the Python 3.0 development costs on the larger education > >centric proposal > > Just understand that someone like myself is put in a funny position, > because the degree of involvement of Guido and the PSF is a total unknown. > So it all comes off a bit peculiar. I am sure you can understand why that > would be. > > That aside, all my instincts are sending up red flags. But I have been > working in close quarters with myself for quite some time, and have found > my instincts to be quite fallible. No need for red flags. As BDFL, Guido remains in control. He isn't interested in writing grants (and he shouldn't waste his time on such menial tasks). If by chance we happen to get funding for the PSF to develop Python 3.0, then Guido will be the one making the final decisions about what makes it into the next major release. (Assuming he isn't hit by a bus:-) The proposals are being developed with the hope of getting funding to accelerate the process. The grant would fund the core Python developers to experiment and submit code that will make Python 3.0 happen sooner rather than later. From ajsiegel at optonline.net Tue Jan 6 08:08:31 2004 From: ajsiegel at optonline.net (Arthur) Date: Tue Jan 6 08:08:34 2004 Subject: [Edu-sig] RE: intell adoption problem In-Reply-To: <200401052249.41323.mmclay@comcast.net> Message-ID: <0HR200MIZKHRK2@mta8.srv.hcvlny.cv.net> Michael - > No need for red flags. That's a matter of opinion. Funding is like most things connected to $. It's largely a matter of what you are willing to do for it. BNCGroup has an agenda they are unashamed to call poltical. I have no problem with that Escept that they are in effect telling us that hooking up with Python is a tactical move in furtherance of *their* agenda. It appears that's the beginning and end to their interest in Python - its sex appeal in a funding proposal. And you are saying that, in effect, you don't need to support (or understand) the BNCGroup's agenda to support the effort, since by your lights, it is good for Python. But what is really being talked about is influencing the direction of K-12 education. Except we are not really allowed to understand how and in what direction. Unless we are willing to take a semester of two off, and learn a new language. Except this is edu-sig. We are supposed to have an interest in the subject. To some of us, it outweighs our interest in Python. No red flags? Art From jeff at elkner.net Tue Jan 6 08:58:12 2004 From: jeff at elkner.net (Jeffrey Elkner) Date: Tue Jan 6 08:58:14 2004 Subject: [Edu-sig] John Miller's Doctoral Thesis Message-ID: <1073397417.5328.51.camel@mdeicaza> John Miller has written a dissertation entitled "Promoting Computer Literacy Through Programming Python", which provides a wonderful analysis of the discussion archives of the edu-sig. If you haven't seen it yet, you can get it at: http://www-personal.umich.edu/~jmiller/miller_dissertation.pdf John is willing to make a presentation of his work at PyCon this year, and I was thinking we could make it the openning presentation in the edu track at the conference. Ideally John would like an hour for the presentation. I haven't heard yet how presentations will be structured, but John's presentation will be a great way to get discussion going at the conference. -- Jeffrey Elkner Open Book Project From fred at ontosys.com Tue Jan 6 10:48:58 2004 From: fred at ontosys.com (Fred Yankowski) Date: Tue Jan 6 10:49:02 2004 Subject: [Edu-sig] John Miller's Doctoral Thesis In-Reply-To: <1073397417.5328.51.camel@mdeicaza> References: <1073397417.5328.51.camel@mdeicaza> Message-ID: <20040106154858.GA10331@ontosoft.com> On Tue, Jan 06, 2004 at 08:58:12AM -0500, Jeffrey Elkner wrote: > http://www-personal.umich.edu/~jmiller/miller_dissertation.pdf That URL doesn't work. I believe you meant to give this: http://www-personal.umich.edu/~jmillr/miller_dissertation.pdf -- Fred Yankowski fred@ontosys.com tel: +1.630.879.1312 OntoSys, Inc PGP keyID: 7B449345 fax: +1.630.879.1370 www.ontosys.com 38W242 Deerpath Rd, Batavia, IL 60510-9461, USA From jeremy at alum.mit.edu Tue Jan 6 11:09:22 2004 From: jeremy at alum.mit.edu (Jeremy Hylton) Date: Tue Jan 6 11:14:10 2004 Subject: [Edu-sig] Re: [Pycon-organizers] John Miller's Doctoral Thesis In-Reply-To: <1073397417.5328.51.camel@mdeicaza> References: <1073397417.5328.51.camel@mdeicaza> Message-ID: <1073405361.2589.62.camel@localhost.localdomain> On Tue, 2004-01-06 at 08:58, Jeffrey Elkner wrote: > Ideally John would like an hour for the presentation. I haven't heard > yet how presentations will be structured, but John's presentation will > be a great way to get discussion going at the conference. I think John should submit a proposal using the standard mechanism: http://submit.pycon.org/. It sounds like an interesting talk. Jeremy From urnerk at qwest.net Tue Jan 6 11:55:27 2004 From: urnerk at qwest.net (Kirby Urner) Date: Tue Jan 6 11:55:22 2004 Subject: [Edu-sig] John Miller's Doctoral Thesis In-Reply-To: <20040106154858.GA10331@ontosoft.com> Message-ID: > > On Tue, Jan 06, 2004 at 08:58:12AM -0500, Jeffrey Elkner wrote: > > http://www-personal.umich.edu/~jmiller/miller_dissertation.pdf > > That URL doesn't work. I believe you meant to give this: > http://www-personal.umich.edu/~jmillr/miller_dissertation.pdf The thesis is also now archived at the python.org website (with John's permission of course) and there's a link to that copy from http://www.python.org/sigs/edu-sig I also updated the entry for Dr. Zelle, indicating that his much anticipated book is now available. Kirby From ahtauxszkewkq at india.com Wed Jan 7 02:22:10 2004 From: ahtauxszkewkq at india.com (Abraham Farmer) Date: Wed Jan 7 02:16:50 2004 Subject: [Edu-sig] Re: ZEQYEMCC, stone cliff over Message-ID: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit monologue acre vt pollster kiva checksumming rivet applique obverse corps chit sympathy donovan convair dodo brunch leukemia hen gunny dogma -------------- next part -------------- Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 8bit

Free CableTV!No more pay!%RND_SYB

pilot icon broaden bindweed betel belly peasanthood aphrodite columbine aerobic all auric diacritical cavendish etude affluence current embodiment oint addle stanza viaduct noreen extensible kiwi deja chimeric adoptive balletic grandma keep banach pinxter booklet crinkle blueberry abstention lsi college bloodstain
godwin abram shock useful bulldoze laudatory lysine trihedral companionway reciprocity admiral kinney germicide pig cranelike futile paucity wavy buchanan hydrocarbon beefsteak iodine arcade len legatee qatar caspian hotelman pronounce bibliophile matilda renaissance
-------------- next part -------------- From nnyxofb at mail.ru Wed Jan 7 03:27:57 2004 From: nnyxofb at mail.ru (Maher) Date: Wed Jan 7 03:39:47 2004 Subject: [Edu-sig] Re: CMIMGZJL, heres the money! Message-ID: aeneas erasmus literacy sentence saturn patrick blue datsun toxin valve anyone ciceronian depressive billboard doppler dodecahedron eve garth bard essential breakup arkansan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/edu-sig/attachments/20040107/4966d7bd/attachment.html From xotuvwwy at el-nacional.com Fri Jan 9 22:00:49 2004 From: xotuvwwy at el-nacional.com (Shea Annie) Date: Fri Jan 9 22:09:06 2004 Subject: [Edu-sig] Re: MAFPF, anyone his passport Message-ID: edelweiss confederacy protease vascular closet lillian rickets already petrology berwick biracial demon fifty attribute hendricks bourn waist custody gloomy chancel adonis ninefold stevedore -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/edu-sig/attachments/20040110/22d9eada/attachment.html From qr070f at web.de Sat Jan 10 11:47:58 2004 From: qr070f at web.de (Moises Espinosa) Date: Sat Jan 10 11:50:37 2004 Subject: [Edu-sig] Re: the gent dont fvn zjay Message-ID: An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/edu-sig/attachments/20040110/26fc9f00/attachment.html From urnerk at qwest.net Sun Jan 11 01:24:49 2004 From: urnerk at qwest.net (Kirby Urner) Date: Sun Jan 11 01:24:46 2004 Subject: [Edu-sig] More functional programming in Python In-Reply-To: Message-ID: Python 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on win32 Type "copyright", "credits" or "license()" for more information. **************************************************************** Personal firewall software may warn about the connection IDLE makes to its subprocess using this computer's internal loopback interface. This connection is not visible on any external interface and no data is sent to or received from the Internet. **************************************************************** IDLE 1.0.2 >>> def compose(f,g): """ Return a function f(g(x)) given two functions f,g """ def h(x): return f(g(x)) return h Example: >>> def f(x): return x+1 >>> def g(x): return 2*x >>> s = compose(f,g) >>> s(3) 7 >>> f(g(3)) 7 >>> s = compose(g,f) >>> s(3) 8 >>> g(f(3)) 8 >>> def power(f,n): """ Return a function of f composed with itself n times """ def e(x): return x # n=0 returns identity function if n == 0: return e r = f # n=1 returns f itself for i in range(n-1): r = compose(r,f) return r >>> f(f(f(f(f(f(f(f(f(f(1)))))))))) # f composed with itself 10 times 11 >>> t = power(f,10) >>> t(1) 11 >>> t = power(f,0) # t = e(x), identity >>> t(1) 1 >>> t = power(f,1) # t = f(x), i.e. f(x) = x+1 in this example >>> t(1) 2 >>> t = power(g,5) >>> 6*2**5 # 2 * 2 * 2 * 2 * 2 * 6 192 >>> g(g(g(g(g(6))))) 192 >>> t(6) # g(g(g(g(g(x))))) 192 >>> def complist(funclist): """ Compose a list of functions, right to left """ return reduce(compose,funclist) >>> r = complist([g,g,f,f,g,f,g]) >>> r(17) 288 >>> g(g(f(f(g(f(g(17))))))) 288 >>> def m(x): return 'm(%s)' % x >>> def n(x): return 'n(%s)' % x >>> r = complist([m, m, n, m]) >>> r(1) 'm(m(n(m(1))))' >>> r = power(m, 5) >>> r(1) 'm(m(m(m(m(1)))))' Kirby From urnerk at qwest.net Sun Jan 11 01:46:09 2004 From: urnerk at qwest.net (Kirby Urner) Date: Sun Jan 11 01:46:06 2004 Subject: [Edu-sig] More functional programming in Python In-Reply-To: Message-ID: Variations (perhaps improvements): >>> def compose(f,g): """ Return a function f(g(x)) given two functions f,g """ return lambda x: f(g(x)) Advantage: no mention of 'h' in resulting function >>> def complist(funclist): """ Compose a list of functions, right to left """ def e(x): return x if len(funclist)==0: return e return reduce(compose,funclist) Advantage: complist([]) returns identity function >>> def power(f,n): return complist([f] * n) Advantage: much simpler, makes use of complist ==== >>> def m(x): return 'm(%s)' % x >>> complist([m,m,m,m]) at 0x00ADE030> >>> r = complist([m,m,m,m]) >>> r(1) 'm(m(m(m(1))))' >>> s = power(m,4) >>> s(1) 'm(m(m(m(1))))' >>> s = power(m,1) >>> s(1) 'm(1)' >>> s = power(m,0) >>> s(1) 1 >>> s('1') '1' Kirby From sxogsavrdzthe at china.com Sun Jan 11 00:10:58 2004 From: sxogsavrdzthe at china.com (Freeman) Date: Sun Jan 11 12:13:22 2004 Subject: [Edu-sig] Re: YJ, been sitting here Message-ID: brookhaven sony leftmost adelia declination slocum codomain filamentary barnet chasm sphagnum mummy judicious deja vomit receipt affect dandy anastigmat cemetery declaim solicitude crankshaft -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/edu-sig/attachments/20040111/a259c4b5/attachment.html From xyfdarauct at el-nacional.com Sun Jan 11 13:05:57 2004 From: xyfdarauct at el-nacional.com (Boris Murphy) Date: Sun Jan 11 12:53:51 2004 Subject: [Edu-sig] Re: OL, of my retinue Message-ID: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit fungus parishioner eastern dash antagonist effeminate upper buick bead aside eider agglomerate effluvia selena demitting biotic compress striven altitude submitted dorset -------------- next part -------------- Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 8bit

Free CableTV!No more pay!%RND_SYB

winthrop mandrake charisma technology angular daylight cornwall thick binary flurry rotund perceptible objectify conferrable decade tulane denounce deny beaver catenate buttrick evenhanded engle mantis spooky
hendrickson oar aurelius daytime whenever cursory crosswort terrier ringside aspirant derogatory catatonia bean foulmouth fight landau pierre pulse suey wattle synod trial manhole secretive capacitive accidental landis coexistent conduit equivalent dub gage deregulate
-------------- next part -------------- From bx7lkvgdk at china.com Fri Jan 9 17:04:14 2004 From: bx7lkvgdk at china.com (Callie Kirby) Date: Sun Jan 11 15:47:36 2004 Subject: [Edu-sig] Re: faust by taking fw gnsmiqmathe Message-ID: <4cvn13ea74169c1m14fb08u7@5obrf.wl> An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/edu-sig/attachments/20040109/79c84632/attachment.html From rrjlsbowznz at canada.com Mon Jan 12 16:10:34 2004 From: rrjlsbowznz at canada.com (Brandie Stringer) Date: Mon Jan 12 04:03:14 2004 Subject: [Edu-sig] Re: OK, seen quite distinctly Message-ID: bing jerusalem bungle convent deacon annoyance hawkins beplaster coerce dear artwork trundle royal deleterious sea adhere reuben dupe annalen bobbie macmillan turk meadow en carboxylic -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/edu-sig/attachments/20040112/19b04c30/attachment.html From 34t at msn.com Mon Jan 12 12:22:43 2004 From: 34t at msn.com (Lauren Leary) Date: Mon Jan 12 09:28:38 2004 Subject: [Edu-sig] Watch her leave you? Never happen with alpha. whaovm vzyyx Message-ID: An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/edu-sig/attachments/20040112/710629a3/attachment.html From kent at kentsjohnson.com Mon Jan 12 21:04:07 2004 From: kent at kentsjohnson.com (Kent Johnson) Date: Mon Jan 12 21:04:11 2004 Subject: [Edu-sig] Learning Python for the absolute beginner Message-ID: I recently received a copy of Michael Dawson's Python Programming for the absolute beginner, and the second edition of Learning Python by Lutz and Ascher. I am evaluating both of them for use in an adult education class for absolute beginners, and I thought I would post my opinions, both for your amusement and so you can tell me how I am wrong :-). I like Learning Python a lot but for all the wrong reasons. It appeals to the geek in me. It explains with exhaustive detail all the ins and outs and traps and wrinkles to all the basics of Python. For example, the book spends 25 pages (!) explaining different ways to run Python programs (IDLE, command line, double-clicking...) This book tells the truth, the whole truth and nothing but the truth. I learned Python from the first edition of the book and I remember it being a bit overwhelming. I had many years of programming experience and several languages under my belt at the time. It's hard to imagine someone who is not familiar with some kind of programming - or at least a fairly sophisticated computer user - enjoying this book. On the other hand Dawson's book is deceptively simple. At first I was constantly editorializing about what he was leaving out, how I would have written that bit of code, etc. The programming examples are all games. The first few programs are very basic. They are not much as entertainment but they demonstrate print and quoted strings and variables. He presents material in very small bites, but there is plenty of meat and he includes enough detail to keep going and avoid the major pitfalls. Each new idea is introduced in the context of a working program. The programs become increasingly complex, ranging from a simple guess-the-number game to tic-tac-toe to an arcade game. Along the way there are snippets of good programming practice interjected, like how to write good variable names and why globals are best avoided. Like the coding itself, these tips are simple but should help a beginner get off on the right foot when writing his own programs. So, for another programmer who wants to learn Python, I would recommend Learning Python. But for a rank beginner I think Python Programming for the absolute beginner is a better choice. Best regards, Kent -- Kent S Johnson http://www.kentsjohnson.com From ubxwi at hongkong.com Mon Jan 12 23:26:18 2004 From: ubxwi at hongkong.com (Leola Pearce) Date: Tue Jan 13 11:25:38 2004 Subject: [Edu-sig] Re: XKFCHMT, since gone into Message-ID: eagan covetous fleece defeat megaword demonic metropolis faulkner capitoline solstice decimate aniseikonic clearance cyclic bland dump chateau atheism pattern paramagnetic -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/edu-sig/attachments/20040113/540b203f/attachment.html From 7ylyblmogg at altavista.net Wed Jan 14 03:03:58 2004 From: 7ylyblmogg at altavista.net (Fannie Schroeder) Date: Wed Jan 14 06:13:57 2004 Subject: [Edu-sig] Male X'X'X' stars thankful for this ! uoty Message-ID: <3-c$xeui3p5k2nrcwutr5-0l@7zlpxbxkg> An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/edu-sig/attachments/20040114/c92f8728/attachment.html From fmqukjy at china.com Wed Jan 14 14:19:41 2004 From: fmqukjy at china.com (Schneider Carson) Date: Thu Jan 15 02:21:05 2004 Subject: [Edu-sig] Re: DNVJTMAO, not the very Message-ID: cady dissuade shotgun arcadia connie moliere agnes magician thesaurus lane accelerate counterpoise eagan compilation hillside kalmuk chard salon -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/edu-sig/attachments/20040114/a662a0af/attachment.html From h071edvqvs at webtv.net Thu Jan 15 03:33:48 2004 From: h071edvqvs at webtv.net (Marsha Gallagher) Date: Thu Jan 15 05:34:46 2004 Subject: [Edu-sig] .Me...n lo..ng time s.c.cess dotrtwr Message-ID: <8fh$xb-et$4g02bv3p4@1u02.o6.6o9z3m> An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/edu-sig/attachments/20040115/b35b7cc4/attachment.html From urnerk at qwest.net Thu Jan 15 14:03:49 2004 From: urnerk at qwest.net (Kirby Urner) Date: Thu Jan 15 14:03:53 2004 Subject: [Edu-sig] More group theory with Python In-Reply-To: Message-ID: Here I am posting to math-teach, archived at the Math Forum, as I've been wont to do numerous times over the years (my inventory of posts at the Math Forum may well exceed the inventory here at python.org -- but I haven't counted): http://www.mathforum.com/epigone/math-teach/vysompherl This is in many ways a restatement of stuff I've posted before, but the source code has gotten cleaner/easier, even as the math fluency has upped a bit. I.e., practice makes mo betta. Kirby From likpq at china.com Thu Jan 15 05:49:10 2004 From: likpq at china.com (Reeves Foster) Date: Thu Jan 15 17:51:17 2004 Subject: [Edu-sig] Re: ML, i swear it!' Message-ID: alexandre wither convulsive noah tiny glad coexistent fiefdom firsthand include aaa piano hettie accede spurious refract criterion alsatian obedient -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/edu-sig/attachments/20040115/68376750/attachment.html From cgzbdj at earthlink.net Fri Jan 16 01:54:34 2004 From: cgzbdj at earthlink.net (Connell) Date: Fri Jan 16 02:03:38 2004 Subject: [Edu-sig] i want you to see this Message-ID: An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/edu-sig/attachments/20040116/1618fef6/attachment.html From fcdsfolswt at el-nacional.com Sat Jan 17 00:02:25 2004 From: fcdsfolswt at el-nacional.com (Stokes) Date: Fri Jan 16 12:02:08 2004 Subject: [Edu-sig] Re: CRLIK, about militsa andreevna Message-ID: stenotype southward ribald britannica boil fosterite struck apprehensive yuki cysteine injun afterimage colette cholesterol tuttle kapok kennedy cousin indelible own demultiplex lucid lipread crimea hailstorm shamble framework machine carburetor -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/edu-sig/attachments/20040117/072b01d8/attachment.html From ouzwrfatc at msn.ca Fri Jan 16 17:45:22 2004 From: ouzwrfatc at msn.ca (Madeleine Hammer) Date: Fri Jan 16 18:41:52 2004 Subject: [Edu-sig] Re: but all things k vgfd Message-ID: <8j6aaunu9ckd07x4bbb18q39hy33@o3vhpzpp2qfta> An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/edu-sig/attachments/20040117/c71a8538/attachment.html From urnerk at qwest.net Fri Jan 16 19:30:03 2004 From: urnerk at qwest.net (Kirby Urner) Date: Fri Jan 16 19:30:05 2004 Subject: [Edu-sig] RE: More group theory with Python Message-ID: I wonder if all the python.org sig lists are getting so much spam. I'll raise the issue on pydotorg. Kirby From ajsiegel at optonline.net Sat Jan 17 10:55:24 2004 From: ajsiegel at optonline.net (Arthur) Date: Sat Jan 17 10:55:34 2004 Subject: [Edu-sig] New Findings Shake Up Open-Source Debate Message-ID: <0HRN00GOZ5KI9R@mta1.srv.hcvlny.cv.net> """ New Findings Shake Up Open-Source Debate By Mike Martin NewsFactor Network September 18, 2003 1:26PM Our model "shows that closed-source projects are always slower to converge to a bug-free state than bazaar open-source projects," say theoretical physicists Damien Challet and Yann Le Du. """ http://sci.newsfactor.com/story.xhtml?story_id=22319 Which is, I think, relevant to my sense of the growing significance of Python to the scientific community. The related academic community. Own of the researchers on the project is a research fellow in theoretical physics, at Oxford. And a Python user - though the article doesn't mention Python directly. I know this, because (I am proud to say) he contacted me regarding PyGeo. Which is why/how I came across the article. Art From ajsiegel at optonline.net Sat Jan 17 11:12:24 2004 From: ajsiegel at optonline.net (Arthur) Date: Sat Jan 17 11:14:31 2004 Subject: [Edu-sig] re: New Findings Shake Up Open-Source Debate Message-ID: <0HRN00KQI6COLP@mta7.srv.hcvlny.cv.net> >I know this, because (I am proud to say) he contacted me >regarding PyGeo. Which is why/how I came across the article. Though, presumably, PyGeo was not included in the sample on which he concluded on the convergence of open source software to a bug free state :) My favorite is that the little stab I took at custom error reporting in the code is itself sorely broken. So instead of getting the kind of error reporting that was intended, you get a standard Python error message complaining, in essence, that the error reporting code is broken. And I always seem to have something more fun to do than fix it. Though I am sure it would not take much. I am getting more serious about a new release, and will be forced to deal with it, though. Art From l98ota at msn.com Sun Jan 18 02:14:35 2004 From: l98ota at msn.com (Alyson Dunn) Date: Sun Jan 18 03:19:59 2004 Subject: [Edu-sig] Re: thrown them together mwdy lzt tz Message-ID: An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/edu-sig/attachments/20040118/a014f7f7/attachment.html From infoHaugen at golfgod.net Sun Jan 18 09:15:12 2004 From: infoHaugen at golfgod.net (Vallee) Date: Sun Jan 18 11:54:18 2004 Subject: [Edu-sig] Info regarding vigra Message-ID: how Vigra? works. So you can better understand, what Vigra can do for you. If you are sensible about your health, reflect on what you can do for your seual health, to keep the chances that you will need Vigra as low as possible. fleecy connote Englewood, political. Inrease Seks Drive Bost Seual Performance Fuller & Harder Erecions Inrease Stamna & Endurance Quicker Rechages http://www.securemedpills.com/index.php?pid=pharmaboss combined denounces scrutiny, Morse. furnished outruns bricklayer, inhaler. Thanks, frightful From urnerk at qwest.net Sun Jan 18 19:14:40 2004 From: urnerk at qwest.net (Kirby Urner) Date: Sun Jan 18 19:14:38 2004 Subject: [Edu-sig] re spam on edu-sig In-Reply-To: <0HRN00KQI6COLP@mta7.srv.hcvlny.cv.net> Message-ID: Here's an email I got in response to my question about spam on python.org mail lists. There are steps we might take. Kirby ============================ Kirby Urner wrote: > At edu-sig (a python.org discussion list), we're getting more spams > than legit posts, which is actually a new phenomenon. > > I was just wondering, without visiting a bunch of list archives, if > this is par for the course. In my experience, yes, it is. We were starting to get more noise than signal in the docutils-*@lists.sourceforge.net lists (also MailMan-powered). > I don't think we're limiting posts to members only. Is this also > the usual thing? I think most spam-filled lists are the same. I recently switched the lists to member-posting-only and the spam problem went away. In exchange, I now have a bit more work to do; I have to approve legitimate non-member posts and deny spam. However, it gets easier over time; details below. > I'm not the listowner for edu-sig (I just maintain the web page), > but I am curious nevertheless. It's easy to share the load. Get the list owner to share the list admin password with you. On the MailMan administration interface "General Options" page, add your email address on a new line to the "list admin's email address" field. On the "Privacy Options" page, under "General posting filters", set member_posting_only to Yes. Whenever a non-member post comes in, you'll be notified by email. For obvious spam, I just let the notifications pile up, and handle them in batch mode. Whenever there's a legitimate post, I copy the poster's email address, allow the message and paste the poster's email address into the "Addresses of members accepted for posting to this list without implicit approval requirement" field (below member_posting_only on the "Privacy Options" page). If you get multiple posts from non-members, you'll only have to do this once per address. The downside to this approach is that it's more work for the list admins. But I was getting annoying auto-replies from spam filters on far-flung mail servers, saying "you sent us spam", and I determined that the extra effort was worth it to remove the primary and secondary spam. I was reluctant to switch to member-posting-only because it's not obvious from the MailMan interface that non-member posts are *not* discarded automatically, but are in fact put in a queue for approval. Had I known that, I would have switched over much sooner. -- David Goodger http://python.net/~goodger For hire: http://python.net/~goodger/cv _______________________________________________ Pydotorg mailing list Pydotorg@python.org http://mail.python.org/mailman/listinfo/pydotorgon.org/mailman/listinfo/edu- sig From britney21procuring at yahoo.com Mon Jan 19 09:04:34 2004 From: britney21procuring at yahoo.com (Ers-owner) Date: Mon Jan 19 05:03:08 2004 Subject: [Edu-sig] Fwd: Want to have S E X, 20 times a day ? Message-ID: An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/edu-sig/attachments/20040119/60285d42/attachment.html From ckaxxr at china.com Sun Jan 18 17:34:59 2004 From: ckaxxr at china.com (Arron) Date: Mon Jan 19 05:41:16 2004 Subject: [Edu-sig] Re: WZJKBL, impressing it upon Message-ID: stagy chutney costume assist world dossier skillful cyanate stripe track fennel quadrilateral territory divine toss tabloid bichromate inordinate sacrifice cognizant don ballyhoo perceptual proposition -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/edu-sig/attachments/20040118/605cbf4d/attachment.html From urnerk at qwest.net Mon Jan 19 12:23:40 2004 From: urnerk at qwest.net (Kirby Urner) Date: Mon Jan 19 12:23:40 2004 Subject: [Edu-sig] spam on edu-sig Message-ID: Hi Timothy -- Have you been following the thread re spam on python.org e-lists and what might be done about it, list-owner wise? Mostly on pydotorg but I copied one to edu-sig. If you need any help as a spam slayer, I hope you'll ask for it (my daughter and I have been watching 'Buffy' CDs from Netflix). Kirby From wilson at visi.com Mon Jan 19 15:02:39 2004 From: wilson at visi.com (Tim Wilson) Date: Mon Jan 19 15:02:42 2004 Subject: [Edu-sig] Solution to edu-sig spam Message-ID: Hi everyone, Kirby Urner and I are wondering if the time has come to restrict posting to the edu-sig list to list subscribers. This should cure 99.471% of the spam problem. We thought it wise to send out this notice and see if there are any strong reactions for or against this change. If the group consensus is for the restriction, I will go in and "flip the switch." -Tim -- Tim Wilson Twin Cities, Minnesota, USA Educational technology guy, Linux and OS X fan, Grad. student, Daddy mailto: wilson@visi.com aim: tis270 public key: 0x8C0F8813 From urnerk at qwest.net Mon Jan 19 15:31:23 2004 From: urnerk at qwest.net (Kirby Urner) Date: Mon Jan 19 15:31:19 2004 Subject: [Edu-sig] Solution to edu-sig spam In-Reply-To: Message-ID: Addendum: as Tim and I have been discussing, I think he'll also have a way, through the mailman interface, to clear certain email addresses as valid posters, even if they're not members. That way, if (e.g.) some valued person within the Python community wants to toss us a bone, but without having to sign on as a member to do so, it wouldn't be hard (for the poster, or for Tim). Once an address was white-listed, Tim wouldn't have to worry about that person's input getting piled up in the spam bucket. Seems the best of both worlds. Kirby > -----Original Message----- > From: edu-sig-bounces@python.org [mailto:edu-sig-bounces@python.org] On > Behalf Of Tim Wilson > Sent: Monday, January 19, 2004 12:03 PM > To: edu-sig@python.org > Subject: [Edu-sig] Solution to edu-sig spam > > Hi everyone, > > Kirby Urner and I are wondering if the time has come to restrict posting > to > the edu-sig list to list subscribers. This should cure 99.471% of the spam > problem. We thought it wise to send out this notice and see if there are > any > strong reactions for or against this change. If the group consensus is for > the restriction, I will go in and "flip the switch." > > -Tim > > -- > Tim Wilson > Twin Cities, Minnesota, USA > Educational technology guy, Linux and OS X fan, Grad. student, Daddy > mailto: wilson@visi.com aim: tis270 public key: 0x8C0F8813 > > > _______________________________________________ > Edu-sig mailing list > Edu-sig@python.org > http://mail.python.org/mailman/listinfo/edu-sig From ajsiegel at optonline.net Mon Jan 19 20:45:28 2004 From: ajsiegel at optonline.net (Arthur) Date: Mon Jan 19 20:45:31 2004 Subject: [Edu-sig] re: spam Message-ID: <0HRR00204M7Q3L@mta10.srv.hcvlny.cv.net> Tim writes - >We thought it wise to send out this notice and see if there are any >strong reactions for or against this change. If the group consensus is for >the restriction, I will go in and "flip the switch." I guess this a test post to see if the flip has been switched :) Considering my posting volume it might be strange to know I am not a list member. I read the archives. There is no good reason for this, and I will simply join-up. And would like to see the spam cut-off. Since I already have sex 20 times a day, those messages are of no interest to me. Though my prowess is only exhibited on alternative days, and in an alternative universe. Art From dyoo at hkn.eecs.berkeley.edu Tue Jan 20 01:47:12 2004 From: dyoo at hkn.eecs.berkeley.edu (Danny Yoo) Date: Tue Jan 20 01:47:22 2004 Subject: [Edu-sig] RE: More group theory with Python In-Reply-To: Message-ID: On Fri, 16 Jan 2004, Kirby Urner wrote: > I wonder if all the python.org sig lists are getting so much spam. > I'll raise the issue on pydotorg. Hi Kirby, For tutor@python.org, we moderate all nonsubscribers posts. All unmoderated messages end up in a queue in Mailman so that one of the admins can look at it and cull out the spam. It's extra work for me and Wesley Chun, but at least no spam gets into Tutor (... without us being negligent, of course. *grin*) We're getting about 10 spams a day, so my job now is to occasionally go in there and just clear the moderation queue every so often. (In the past few days, the number of spams has definitely skyrocketed; I wonder why?) If you're using the new Mailman, the option is under the "generic_nonmember_action" flag in Privacy/Sender filters from the Mailman administrative page. Hope this helps! From clean_actrepaying at wildmail.com Tue Jan 20 14:33:58 2004 From: clean_actrepaying at wildmail.com (I18n-sig-request) Date: Tue Jan 20 10:10:51 2004 Subject: [Edu-sig] Don't get busted ! ! . . . . . . . . . aviary Message-ID: An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/edu-sig/attachments/20040120/1ac7ae59/attachment.html From ykbqjbd at cnnic.net.cn Tue Jan 20 16:53:51 2004 From: ykbqjbd at cnnic.net.cn (Andres Kincaid) Date: Tue Jan 20 16:47:09 2004 Subject: [Edu-sig] Re: RLJ, bar and gives Message-ID: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit testimonial expectorant barbecue legatee crestview disparage harem carleton bodybuilder slap uncouth agamemnon immodesty rueful strobe eyeball malaise sallow trapezoid confront -------------- next part -------------- Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 8bit

Free CableTV!No more pay!%RND_SYB

orthoclase enthusiast bowel variable choir centigrade babel midshipman snare rifle pm smelt fact anabaptist etude cavalcade abbey tie cryptography
panel receptacle rio azimuthal rhombohedral daugherty reception anomalous symbiotic panjandrum antares dreg longevity boastful emaciate notate foodstuff afghanistan excision brunhilde bacillus spine assail chesterton trigonometry waterline harm puppet respite trichrome strict verbatim brunette vacuolate nook mandarin beecham buddhism
-------------- next part -------------- From lha2 at columbia.edu Tue Jan 20 19:27:32 2004 From: lha2 at columbia.edu (Lloyd Hugh Allen) Date: Tue Jan 20 19:27:36 2004 Subject: [Edu-sig] Solution to edu-sig spam Message-ID: <400DC774.1010609@columbia.edu> It used to be that because my outgoing and incoming email addresses were different (I couldn't figure out how to get the smtp server to authenticate me with a different return address under my old mail client), I had to take the "sending" account, register it to the list, and then turn off delivery. That should still probably work for folks who prefer to read the archives, or to just send an occasional "Hey, saw this thing in a journal" post. From arkamir at softhome.net Tue Jan 20 20:44:35 2004 From: arkamir at softhome.net (arkamir@softhome.net) Date: Tue Jan 20 20:44:38 2004 Subject: [Edu-sig] Non-member posting Message-ID: I dont think there are many people who post that arent signed up. Though its ultimately up too you and whoever will be checking the mail. Just make sure you put some well known names on the white list. Thats my 2 cents at least. Conrad From jason.cunliffe at verizon.net Tue Jan 20 23:49:56 2004 From: jason.cunliffe at verizon.net (Jason Cunliffe) Date: Tue Jan 20 23:52:36 2004 Subject: [Edu-sig] test References: Message-ID: <002701c3dfda$05317de0$6501a8c0@vaio> Just testing if I can still post here.. - Jason From xsuzlvqppcow at web.de Wed Jan 21 11:36:23 2004 From: xsuzlvqppcow at web.de (Jody Maloney) Date: Wed Jan 21 11:39:39 2004 Subject: [Edu-sig] Re: NPPRH, yesterday knocking about Message-ID: bradbury befuddle limb jacobs giveaway embarcadero prosecutor mac tapeworm sorrow laurel systematic saturater honeywell raceway debate formatting niger stingy loki quickstep pedagogue -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/edu-sig/attachments/20040121/2d5f6a16/attachment.html From urnerk at qwest.net Wed Jan 21 12:32:00 2004 From: urnerk at qwest.net (Kirby Urner) Date: Wed Jan 21 12:31:48 2004 Subject: [Edu-sig] Solution to edu-sig spam In-Reply-To: Message-ID: > If the group consensus is for the restriction, I will go in and "flip the > switch." > > -Tim > OK, I think we're ready when you are. Kirby From wilson at visi.com Wed Jan 21 12:38:16 2004 From: wilson at visi.com (Tim Wilson) Date: Wed Jan 21 12:38:13 2004 Subject: [Edu-sig] Non-member posts now held for approval Message-ID: Hi everyone, I've just changed the edu-sig list behavior so that all posts from non-subscribers will be held for approval instead of sent out right away. If you have been posting to edu-sig from an account other than the one you subscribed from, your posts will no longer go through. We may find in the coming days or weeks that the configuration will need to be modified. I will be happy to address concerns as they come up. Please pardon the interruption and carry on with your business. :-) -Tim -- Tim Wilson Twin Cities, Minnesota, USA Educational technology guy, Linux and OS X fan, Grad. student, Daddy mailto: wilson@visi.com aim: tis270 public key: 0x8C0F8813 From jason.cunliffe at verizon.net Wed Jan 21 14:01:22 2004 From: jason.cunliffe at verizon.net (Jason Cunliffe) Date: Wed Jan 21 14:04:57 2004 Subject: [Edu-sig] Non-member posts now held for approval References: Message-ID: <002801c3e050$f61ff1c0$6501a8c0@vaio> > I've just changed the edu-sig list behavior so that all posts from > non-subscribers will be held for approval instead of sent out right away. If > you have been posting to edu-sig from an account other than the one you > subscribed from, your posts will no longer go through. We may find in the > coming days or weeks that the configuration will need to be modified. I will > be happy to address concerns as they come up. Please pardon the interruption > and carry on with your business. :-) Great. Can you add some notice to people about the subsrciber only policy, what to do, where to contact in case they have trouble. http://mail.python.org/mailman/listinfo/edu-sig thanks - Jason From mhanna at pvcsd.org Thu Jan 22 10:57:52 2004 From: mhanna at pvcsd.org (mhanna@pvcsd.org) Date: Thu Jan 22 10:59:31 2004 Subject: [Edu-sig] HS Example problems Message-ID: <1074787072.400ff300a6921@mail.pvcsd.org> Hello all, I am new to the list and Python in general. I want to start using Python in my Into to CS Class in High School. I have previewed a number of books but am having difficulties finding a decent source for: 1) a detailed curriculum (basic class for 100% new programming students) 2) Good examples and problems for projects On another note: I am using OSX 10.2 and am having problem setting up the computers to run a decent IDE. I have tried MacPython and Pyoxide. Any help would be deeply appreciated. Thanks, Mike Hanna From urnerk at qwest.net Thu Jan 22 13:38:46 2004 From: urnerk at qwest.net (Kirby Urner) Date: Thu Jan 22 13:38:32 2004 Subject: [Edu-sig] HS Example problems In-Reply-To: <1074787072.400ff300a6921@mail.pvcsd.org> Message-ID: > Hello all, > I am new to the list and Python in general. I want to start using Python > in my > Into to CS Class in High School. I have previewed a number of books but am > having difficulties finding a decent source for: > 1) a detailed curriculum (basic class for 100% new programming students) Hi Mike -- Have you already looked through the resources listed at: http://www.python.org/sigs/edu-sig/ (e.g. Background materials)? > 2) Good examples and problems for projects > On another note: > I am using OSX 10.2 and am having problem setting up the computers to run > a > decent IDE. I have tried MacPython and Pyoxide. Any help would be deeply > appreciated. Wish I could help you more here, but I don't have a Mac :-( http://homepages.cwi.nl/~jack/macpython/download.html indicates that there's a binary installer MacPython-OSX specifically for 10.2. According to http://homepages.cwi.nl/~jack/macpython/macpython-osx.html it contains an IDE (PythonIDE). Is that the version you already tried? Kirby From john.zelle at wartburg.edu Thu Jan 22 14:45:51 2004 From: john.zelle at wartburg.edu (John Zelle) Date: Thu Jan 22 14:48:28 2004 Subject: [Edu-sig] HS Example problems References: <1074787072.400ff300a6921@mail.pvcsd.org> Message-ID: <4010286F.3080301@wartburg.edu> Mike, mhanna@pvcsd.org wrote: >Hello all, >I am new to the list and Python in general. I want to start using Python in my >Into to CS Class in High School. I have previewed a number of books but am >having difficulties finding a decent source for: >1) a detailed curriculum (basic class for 100% new programming students) >2) Good examples and problems for projects > If you've not already checked it out, my CS1 textbook might be appropriate for you. See http://mcsp.wartburg.edu/zelle/python if you're interested. >On another note: >I am using OSX 10.2 and am having problem setting up the computers to run a >decent IDE. I have tried MacPython and Pyoxide. Any help would be deeply >appreciated. > We use IDLE for our intro classes, and it works well. Unfortunately IDLE uses the Tkinter package, which is not included in the default OSX python. I have a colleague who is using IDLE and Python on his Mac by running XDarwin and the Python available from the fink project (http://fink.sourceforge.net). It works great for him, but I can't vouch for how it would work in a lab setting. I believe it is also possible to do a native install of Python and tcl/tk from source under OSX, but I have not had a chance to try that out yet. --John >-- > John M. Zelle, Ph.D. | Wartburg College > Associate Prof. of CS | Dept. Math/CS/Physics > john.zelle@wartburg.edu | Waverly, Iowa > > From kent37 at tds.net Thu Jan 22 15:36:58 2004 From: kent37 at tds.net (Kent Johnson) Date: Thu Jan 22 15:37:02 2004 Subject: [Edu-sig] HS Example problems Message-ID: <200401222036.i0MKawhH028935@outbound1.mail.tds.net> If you use the MacPython installer it should include the MacPython IDE out of the box. I have IDLE running on my Macs. I first installed Tcl/TkAqua, then rebuilt Python from source using the MacOSX instructions to do a framework build. You might have better luck with this question on the MacPython mailing list. Kent > >On another note: > >I am using OSX 10.2 and am having problem setting up the computers to run a > >decent IDE. I have tried MacPython and Pyoxide. Any help would be deeply > >appreciated. > > From dyoo at hkn.eecs.berkeley.edu Thu Jan 22 15:39:04 2004 From: dyoo at hkn.eecs.berkeley.edu (Danny Yoo) Date: Thu Jan 22 15:39:14 2004 Subject: [Edu-sig] HS Example problems [Programming Challenges] In-Reply-To: <4010286F.3080301@wartburg.edu> Message-ID: > >2) Good examples and problems for projects > > > If you've not already checked it out, my CS1 textbook might be > appropriate for you. See http://mcsp.wartburg.edu/zelle/python if you're > interested. By the way, has anyone seen "Programming Challenges" yet? http://www.programming-challenges.com/pg.php?page=index Springer has recently published a book of "challenges", and so far, all the challenges I've read are interesting and approachable. The material focuses on concrete problems and techniques that programmers encounter all the time. And many of the examples motivate the programmer to use techniques like sentinels, sorting, and good case analysis. Please forgive me for gushing so much, but I'm very impressed by the concrete content in the book. I feel that the exercises are perfectly applicable for someone who's learning Python. Hope this helps! From jason.cunliffe at verizon.net Thu Jan 22 18:03:45 2004 From: jason.cunliffe at verizon.net (Jason Cunliffe) Date: Thu Jan 22 18:08:50 2004 Subject: [Edu-sig] HS Example problems References: <200401222036.i0MKawhH028935@outbound1.mail.tds.net> Message-ID: <00a801c3e13b$fd253520$6501a8c0@vaio> > I have IDLE running on my Macs. I first installed Tcl/TkAqua, then rebuilt Python from source using the MacOSX instructions to do a framework build. I installed IDLE the same way about 6 months ago on Mac OSX 10.2 Was fairly painless. - jason From john.zelle at wartburg.edu Fri Jan 23 11:55:43 2004 From: john.zelle at wartburg.edu (John Zelle) Date: Fri Jan 23 11:58:25 2004 Subject: [Edu-sig] HS Example problems References: <200401222036.i0MKawhH028935@outbound1.mail.tds.net> <00a801c3e13b$fd253520$6501a8c0@vaio> Message-ID: <4011520F.4020807@wartburg.edu> Jason (and other Mac users), I am very interested in helping folks get IDLE and my graphics package running on the Mac with minimal hassles. I have seen numerous references to the native Tcl/Tk and Python build under Aqua (rather than using XDarwin), but I have not found either: 1) A binary package made available by someone who has done this to make it easy for others to follow that route or 2) Step-by-Step instructions for getting the build done right. I have built Python many times on Linux systems, but I have no Mac experience. I do not even really know where to start. Do have pointers to some resources that would allow less Mac-proficient folks to get this done with a minimum of muss and fuss? By the way, I have also seen some references indicating that the Tk-Aqua port may not yet be ready for primetime. Have you used your setup enough to know how stable it is? --John Jason Cunliffe wrote: >>I have IDLE running on my Macs. I first installed Tcl/TkAqua, then rebuilt >> >> >Python from source using the MacOSX instructions to do a framework build. > >I installed IDLE the same way about 6 months ago on Mac OSX 10.2 >Was fairly painless. > >- jason > > >_______________________________________________ >Edu-sig mailing list >Edu-sig@python.org >http://mail.python.org/mailman/listinfo/edu-sig > > > > -- John M. Zelle, Ph.D. | Wartburg College Associate Prof. of CS | Dept. Math/CS/Physics john.zelle@wartburg.edu | Waverly, Iowa From jason.cunliffe at verizon.net Fri Jan 23 13:39:33 2004 From: jason.cunliffe at verizon.net (Jason Cunliffe) Date: Fri Jan 23 13:45:35 2004 Subject: [Edu-sig] HS Example problems References: <200401222036.i0MKawhH028935@outbound1.mail.tds.net> <00a801c3e13b$fd253520$6501a8c0@vaio> <4011520F.4020807@wartburg.edu> Message-ID: <00b601c3e1e0$3eef4d20$6501a8c0@vaio> > By the way, I have also seen some references indicating that the Tk-Aqua > port may not yet be ready for primetime. Have you used your setup enough > to know how stable it is? No Mac here these days, so I can't offer suitable hands-on advice with verification. I was lent a Mac G3 for 6 months last year. My first interest focused to upgrading from 0S9, then explore OSX 10.2, and determine cross-platform status of some of my favorite applications. I successfully installed and ran three programs which all use Tk -- Python/IDLE, Leo and PD [Pure Data]. I did not run any of them extensively, so can't confirm how stable, but I do not recall any problems. As best I remember, once Tk/Aqua was in place, the other apps installed well. Leo http://webpages.charter.net/edreamleo/front.html PD [Pure Data] http://www.pure-data.org/ - Jason From jason.cunliffe at verizon.net Fri Jan 23 13:45:51 2004 From: jason.cunliffe at verizon.net (Jason Cunliffe) Date: Fri Jan 23 13:51:54 2004 Subject: [Edu-sig] HS Example problems References: <200401222036.i0MKawhH028935@outbound1.mail.tds.net><00a801c3e13b$fd253520$6501a8c0@vaio> <4011520F.4020807@wartburg.edu> Message-ID: <00ca01c3e1e1$20452740$6501a8c0@vaio> I forgot to add that many PD [Pure Data] fans use Mac OSX. A lively and responsive community, so they may be best equipped to answer Tk/Aqua questions. There is a busy mailing list where you can ask http://iem.at/cgi-bin/mailman/listinfo/pd-list hth - Jason From urnerk at qwest.net Fri Jan 23 14:56:51 2004 From: urnerk at qwest.net (Kirby Urner) Date: Fri Jan 23 14:57:02 2004 Subject: [Edu-sig] Reversing dictionaries, closures, permutations etc. In-Reply-To: <00ca01c3e1e1$20452740$6501a8c0@vaio> Message-ID: How to reverse a dictionary? The dict class has no .reverse() method, which makes sense, as keys must be immutable so there's no guarantee the reverse is even valid (throwing an exception would be the way to go in this case). Anyway, a straightforward way to do it in code would be: >>> phonebook = {'John Smith':'223-2312', 'Beverly Stein':'610-231-2222'} >>> def reverse(d): newdict = {} for k in d: newdict[d[k]] = k return newdict >>> reverse(phonebook) {'223-2312': 'John Smith', '610-231-2222': 'Beverly Stein'} Note that we no longer have to write 'for k in d.keys()' as 'for k in d' is now defined to iterate over d's keys. Here's another way, which I also like: >>> def reverse2(d): return dict([(val, key) for key, val in d.items()]) >>> reverse2(phonebook) {'223-2312': 'John Smith', '610-231-2222': 'Beverly Stein'} So what's a "closure"? The Camel Book (a holy book in Perldom) talks about closures in terms of manufacturing subroutines with some of the guts defined, but with other guts to be passed as arguments when the subroutine is actually used. The pre-defined guts bind some of the variables, while leaving others for later definition. Here's the Perl example (pg. 253): ====== sub newprint { my $x = shift; return sub {my $y = shift; print "$x, $y!\n; }; } $h = newprint("Howdy"); $g = newprint("Greetings"); # Time passes... &$h("world"); &$g("earthlings"); This prints: Howdy, world! Greetings, earthlings! ====== Here's the same example in Python, in shell mode: >>> def newprint(x): def anon(y): print "%s, %s!" % (x,y) return anon >>> h = newprint("Howdy") >>> g = newprint("Greetings") >>> # Time passes... >>> h("world") Howdy, world! >>> g("earthlings") Greetings, earthlings! ======= I use 'anon' for anonymous function, but that's sort of an oxymoron, as 'anon' is the function's name, insofar as functions have a name. If you ask for string representations of these references, you get: >>> g >>> h If you want to make it clear in a different way, that these functions are anonymous, you could use lambda like this: >>> def newprint(x): def anon(y): print "%s, %s!" % (x,y) return lambda y: anon(y) >>> h = newprint("Howdy") >>> g = newprint("Greetings") >>> h at 0x00ACEB70> >>> g at 0x00ACEE30> I guess I have no strong preference for either format. However, this does show it's easy for lambda to represent functions of any length, with print statements included. * * * * Tying these two threads together, I might define a "closure" that takes a specific dictionary as a given. When invoked as a function, it simply does a lookup: >>> def makefunc(d): def anon(y): return d[y] return lambda y: anon(y) >>> f1 = makefunc(phonebook) >>> f2 = makefunc(reverse2(phonebook)) >>> f1('John Smith') '223-2312' >>> f2('223-2312') 'John Smith' Where I'm going with this is now I might use a "wrapper class" to make f1 and f2 usable with operator overloading. f1 * f2 would return a new object representing f1(f2(x)) for any x. E.g.: >>> class P: def __init__(self,f): self.f = f def __mul__(self,other): return P(self._compose(self.f, other.f)) def _compose(klass,f,g): return lambda x: f(g(x)) def __call__(self,x): return self.f(x) _compose = classmethod(_compose) >>> p1 = P(f1) >>> p2 = P(f2) >>> p3 = p1 * p2 >>> p1('John Smith') '223-2312' >>> p2('223-2312') 'John Smith' >> p3('223-2312') '223-2312' If we know in advance that our class P is supposed to work exclusively with "dictionary functions" of the type returned by makefunc (above), then an __invert__ method could be defined which automatically creates an "inverse P" from P, e.g. pinv = ~p1, such that pinv * p1 is the identity permutation (P is for permutation). I'll save that for later. Kirby From bcox at virtualschool.edu Fri Jan 23 14:49:43 2004 From: bcox at virtualschool.edu (Brad Cox) Date: Fri Jan 23 15:03:39 2004 Subject: [Edu-sig] ANN: Action Learning Environment In-Reply-To: <1074787072.400ff300a6921@mail.pvcsd.org> References: <1074787072.400ff300a6921@mail.pvcsd.org> Message-ID: This list may be interested in the alpha release of Active Learning Environment (ALE) at http://virtualschool.edu/ale. Its an ambitious application of Java, XML and Velocity for web-based experiential learning. This is relevant to Python for historical reasons, to education for obvious ones. The first version was in Perl, the second in Zope, the third in Java and Jython (via the BSD bridge). On yes, there was a Ruby version along the way somewhere. Gave up on Jython when the Jython-Java bridge proved fragile and slow and returned to the Java+Velocity approach I tried just after Perl. I'm not really a fan of Velocity (or Java for that matter), but the current approach seems to be working out well and avoids the bridge issues I had with Jython. Users see a dynamically checked environment; java developers a compile-time-checked one, which seems like the right compromise. Your comments and suggestions would be MOST appreciated! Still working on the tutorial and installation instructions but most of the system is there now. -- Brad J. Cox, PhD, 703 361 4751, http://virtualschool.edu http://virtualschool/ale Action Learning Environment http://virtualschool.edu/mybank Digital Rights Management System http://virtualschool.edu/jco Java Cryptographic Objects (JCO) http://virtualschool.edu/jwaa Java Web Application Architecture (JWAA) http://virtualschool.edu/java+ Java Preprocessor (Java+) From guido at python.org Fri Jan 23 15:55:24 2004 From: guido at python.org (Guido van Rossum) Date: Fri Jan 23 15:52:10 2004 Subject: [Edu-sig] Reversing dictionaries, closures, permutations etc. In-Reply-To: Your message of "Fri, 23 Jan 2004 11:56:51 PST." References: Message-ID: <200401232055.i0NKtOo01795@c-24-5-183-134.client.comcast.net> > How to reverse a dictionary? The dict class has no .reverse() method, which > makes sense, as keys must be immutable so there's no guarantee the reverse > is even valid (throwing an exception would be the way to go in this case). I believe this is usually called "inverse". In Python, "reverse" means reversing the order of the elements of a list, e.g. lst.reverse() and in 2.4 the reversed() built-in. --Guido van Rossum (home page: http://www.python.org/~guido/) From hancock at anansispaceworks.com Fri Jan 23 17:04:47 2004 From: hancock at anansispaceworks.com (Terry Hancock) Date: Fri Jan 23 16:55:34 2004 Subject: [Edu-sig] Reversing dictionaries, closures, permutations etc. In-Reply-To: References: Message-ID: On Friday 23 January 2004 01:56 pm, Kirby Urner wrote: > How to reverse a dictionary? The dict class has no .reverse() method, which > makes sense, as keys must be immutable so there's no guarantee the reverse > is even valid (throwing an exception would be the way to go in this case). >a straightforward way to do it in code would be: Be aware also that the reverse (or inverse) may also be degenerate, unless you have a strict 1:1 correspondence between keys and values. There are cases of use of course, and bear in mind that the inverse of the inverse of dictionary is *guaranteed* to be 1:1. I use something like this when I need to have such a guarantee and want a reversible mapping. Cheers, Terry -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com From urnerk at qwest.net Fri Jan 23 19:21:26 2004 From: urnerk at qwest.net (Kirby Urner) Date: Fri Jan 23 19:21:27 2004 Subject: [Edu-sig] Reversing dictionaries, closures, permutations etc. In-Reply-To: <200401232055.i0NKtOo01795@c-24-5-183-134.client.comcast.net> Message-ID: > I believe this is usually called "inverse". In Python, "reverse" > means reversing the order of the elements of a list, > e.g. lst.reverse() and in 2.4 the reversed() built-in. > > --Guido van Rossum (home page: http://www.python.org/~guido/) OK. It's a bit of a namespace collision actually (between Python usage and the wider world), as there's a popular notion of a "reverse phone directory" wherein you lookup names by phone number instead of phone number by name e.g. http://www.reversephonedirectory.com/ (just found myself by number). So is 2.4 mylist.reversed() something that returns a list, vs. reverses it in place? Is there a parallel mylist.sorted()? Kirby From guido at python.org Fri Jan 23 20:22:58 2004 From: guido at python.org (Guido van Rossum) Date: Fri Jan 23 20:19:45 2004 Subject: [Edu-sig] Reversing dictionaries, closures, permutations etc. In-Reply-To: Your message of "Fri, 23 Jan 2004 16:21:26 PST." References: Message-ID: <200401240122.i0O1Mwp02551@c-24-5-183-134.client.comcast.net> > > I believe this is usually called "inverse". In Python, "reverse" > > means reversing the order of the elements of a list, > > e.g. lst.reverse() and in 2.4 the reversed() built-in. > > > > --Guido van Rossum (home page: http://www.python.org/~guido/) > > OK. > > It's a bit of a namespace collision actually (between Python usage and the > wider world), as there's a popular notion of a "reverse phone directory" > wherein you lookup names by phone number instead of phone number by name > e.g. http://www.reversephonedirectory.com/ (just found myself by number). OTOH I believe in math you talk about the inverse function (e.g. tan <-> atan) and not the reverse function. And my car has a reverse. :-) > So is 2.4 mylist.reversed() something that returns a list, > vs. reverses it in place? Is there a parallel mylist.sorted()? No. reversed() and sorted() are builtins; reversed() returns an iterator that iterates over a sequence in reverse; sorted() returns a new list that is sorted: >>> for i in reversed([1,2,3]): print i 3 2 1 >>> for i in sorted([1,3,2]): print i 1 2 3 >>> --Guido van Rossum (home page: http://www.python.org/~guido/) From urnerk at qwest.net Fri Jan 23 20:50:01 2004 From: urnerk at qwest.net (Kirby Urner) Date: Fri Jan 23 20:50:02 2004 Subject: [Edu-sig] Reversing dictionaries, closures, permutations etc. In-Reply-To: Message-ID: > Be aware also that the reverse (or inverse) may also be degenerate, unless > you have a strict 1:1 correspondence between keys and values. There are > cases of use of course, and bear in mind that the inverse of the inverse > of dictionary is *guaranteed* to be 1:1. I use something like this when I > need to have such a guarantee and want a reversible mapping. > > Cheers, > Terry Yes, good point. It's not just the immutability of the values that's required for inverting, but their uniqueness. Without that, the inverse dictionary drops pairs (which in some applications might be OK): >>> adict = {1:2, -1:2} >>> invdict(adict) {2: -1} This is akin to functions like def f(x): return x**2, in that f(-2) and f(2) both return 4, yet given def g(x): return math.sqrt(x), g(4) returns 2 only. So g is not truly f's inverse (f has no true inverse, because it's many-to-one). What I'm thinking about in this thread is a way to define functions and inverse functions in a namespace, then pass them to a class P so that operator overloading will allow: (1) using p(x) to get back y, where x:y is in a function's dictionary (2) composition using the * operator (e.g. p3 = p1 * p2) (3) using ~p after defining p, where ~p uses an inverse function A special case application of this framework would be permutations, which simply maps the elements of a set to a reordering of the same set. Such functions are guaranteed to be bidirectional, so the degenerate inverse won't be a problem. If invf is the inverse of f, and invg is the inverse of g, what's the inverse of f*g (i.e. f(g(x)) for any x)? It needs to be invg * invf yes? That way, invg(invf(f(g(x)) = x for all x. This presumes associativity, but not commutativity (which is the case for permutations in general). Here's some source code: class P: """ Class wants both function and inverse function for construction. User builds these before instantiating """ def __init__(self, f, invf): self.f = f self.invf = invf def __mul__(self, other): # composition f = self._compose(self.f, other.f) invf = self._compose(other.invf, self.invf) return P(f, invf) def __call__(self, x): return self.f(x) def __invert__(self): return P(self.invf, self.f) def _compose(self, f, g): return lambda x: f(g(x)) def invdict(adict): """ Invert a dictionary """ return dict([(val, key) for key, val in adict.items()]) def makefunc(adict): """ Build a function, given a dictionary """ def anon(y): return adict[y] return lambda y: anon(y) def randomdict(alist): """ Generate a random permutation mapping alist to itself Returns a dictionary """ from random import shuffle alist2 = alist[:] shuffle(alist2) return dict(zip(alist,alist2)) def test(): d = randomdict(range(6)) f1, invf1 = makefunc(d), makefunc( invdict(d) ) p1 = P(f1, invf1) print 'p1: ' , [(i, p1(i)) for i in range(6)] print '~pi: ' , [(i, (~p1)(i)) for i in range(6)] print 'p1 * ~p1: ' , [(i, (p1 * ~p1)(i)) for i in range(6)] Usage: >>> from mathstuff.perm import * >>> test() p1: [(0, 3), (1, 1), (2, 0), (3, 2), (4, 4), (5, 5)] ~pi: [(0, 2), (1, 1), (2, 3), (3, 0), (4, 4), (5, 5)] p1 * ~p1: [(0, 0), (1, 1), (2, 2), (3, 3), (4, 4), (5, 5)] >>> test() p1: [(0, 2), (1, 0), (2, 3), (3, 4), (4, 5), (5, 1)] ~pi: [(0, 1), (1, 5), (2, 0), (3, 2), (4, 3), (5, 4)] p1 * ~p1: [(0, 0), (1, 1), (2, 2), (3, 3), (4, 4), (5, 5)] >>> test() p1: [(0, 5), (1, 3), (2, 2), (3, 4), (4, 0), (5, 1)] ~pi: [(0, 4), (1, 5), (2, 2), (3, 1), (4, 3), (5, 0)] p1 * ~p1: [(0, 0), (1, 1), (2, 2), (3, 3), (4, 4), (5, 5)] Kirby From urnerk at qwest.net Fri Jan 23 22:18:28 2004 From: urnerk at qwest.net (Kirby Urner) Date: Fri Jan 23 22:18:30 2004 Subject: [Edu-sig] Reversing dictionaries, closures, permutations etc. In-Reply-To: <200401240122.i0O1Mwp02551@c-24-5-183-134.client.comcast.net> Message-ID: > OTOH I believe in math you talk about the inverse function (e.g. tan > <-> atan) and not the reverse function. And my car has a reverse. :-) > Yes, that further tips the scales in favor of inverse. > > So is 2.4 mylist.reversed() something that returns a list, > > vs. reverses it in place? Is there a parallel mylist.sorted()? > > No. reversed() and sorted() are builtins; reversed() returns an > iterator that iterates over a sequence in reverse; sorted() returns a > new list that is sorted: > So dir([]) will not show 'sorted' as a list method? I should just go read the PEP. I have to keep reminding myself that Python ain't SmallTalk, and we have built-in top-level functions that don't show up anywhere in the object hierarchy as class or instance methods -- that bit me before when I tried to see int(x) always in terms of some x.__int__() method. E.g. >>> int('123') 123 But: >>> '123'.__int__() Traceback (most recent call last): File "", line 1, in -toplevel- '123'.__int__() AttributeError: 'str' object has no attribute '__int__' > >>> for i in reversed([1,2,3]): print i > So that wouldn't extend to generators (which can be iterated over, but "in reverse" would make no sense). Again, I need to read the PEP. Out of date over here. Looking forward to 2.4 Thanks for the preview! Kirby From kent at kentsjohnson.com Fri Jan 23 23:41:40 2004 From: kent at kentsjohnson.com (Kent Johnson) Date: Fri Jan 23 23:41:48 2004 Subject: [Edu-sig] Python and Tk on MacOSX Message-ID: OK, I'll take a stab at this. I just ran through this to upgrade from 2.3.1 to 2.3.3 (under MacOSX 10.2.6) so this should be pretty accurate... - Download and install TclTkAqua from http://www.maths.mq.edu.au/~steffen/tcltk/TclTkAqua/ I used the 8.4.4 Batteries Included installer but I only installed Tcl and Tk. The plain-vanilla TclTkAqua installer would probably be fine as well. - Download and uncompress the source distribution of Python, the one listed as "for Unix or OS X compile" - If you are building under MacOSX 10.2, you have to make a change to /Python-2.3.3/Mac/OSX/Makefile. Uncomment line 14 (remove the #) and comment line 16 (add a #) - In Terminal, enter the commands ./configure --enable-framework make sudo make frameworkinstall This should build /Library/Frameworks/Python.framework and /Applications/MacPython. At this point I can - run python and pythonw from Terminal as usual - Run PythonIDE (the Mac IDE) by double-clicking the launcher in the MacPython folder - Run IDLE by double-clicking the launcher in the MacPython folder (The IDLE launcher didn't work for me with 2.3.1. But the command 'pythonw idle' where idle is in the current directory, will worked for me to launch IDLE. Or just look at the idle file and type the two lines yourself.) Note that to run ANY Python GUI on MacOSX, you have to run with pythonw or PythonLauncher. HTH, Kent PS to John Zelle - your graphics.py works fine for me on MacOSX. >Jason (and other Mac users), > >I am very interested in helping folks get IDLE and my graphics >package running on the Mac with minimal hassles. I have seen >numerous references to the native Tcl/Tk and Python build under Aqua >(rather than using XDarwin), but I have not found either: >1) A binary package made available by someone who has done this to >make it easy for others to follow that route >or >2) Step-by-Step instructions for getting the build done right. > >I have built Python many times on Linux systems, but I have no Mac >experience. I do not even really know where to start. Do have >pointers to some resources that would allow less Mac-proficient >folks to get this done with a minimum of muss and fuss? > >By the way, I have also seen some references indicating that the >Tk-Aqua port may not yet be ready for primetime. Have you used your >setup enough to know how stable it is? > >--John > >Jason Cunliffe wrote: > >>>I have IDLE running on my Macs. I first installed Tcl/TkAqua, then rebuilt >>> >>> >>Python from source using the MacOSX instructions to do a framework build. >> >>I installed IDLE the same way about 6 months ago on Mac OSX 10.2 >>Was fairly painless. >> >>- jason >> >> >>_______________________________________________ >>Edu-sig mailing list >>Edu-sig@python.org >>http://mail.python.org/mailman/listinfo/edu-sig >> >> >> > >-- > John M. Zelle, Ph.D. | Wartburg College > Associate Prof. of CS | Dept. Math/CS/Physics >john.zelle@wartburg.edu | Waverly, Iowa > > > > >_______________________________________________ >Edu-sig mailing list >Edu-sig@python.org >http://mail.python.org/mailman/listinfo/edu-sig -- Kent S Johnson http://www.kentsjohnson.com From hancock at anansispaceworks.com Sat Jan 24 09:56:14 2004 From: hancock at anansispaceworks.com (Terry Hancock) Date: Sat Jan 24 09:47:00 2004 Subject: [Edu-sig] Reversing dictionaries, closures, permutations etc. In-Reply-To: References: Message-ID: On Friday 23 January 2004 07:50 pm, Kirby Urner wrote: > What I'm thinking about in this thread is a way to define functions and > inverse functions in a namespace, then pass them to a class P so that > operator overloading will allow: I have to confess that you lost me somewhere below this point (I'll reread it until I get it), but this is the sort of thing UserDict is for, right? I know Zope subclasses it to get the PersistentMapping class -- it gives you the basic dictionary interface, which you can then build on. Cheers, Terry -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com From john.zelle at wartburg.edu Sat Jan 24 10:07:12 2004 From: john.zelle at wartburg.edu (John Zelle) Date: Sat Jan 24 10:09:55 2004 Subject: [Edu-sig] Python and Tk on MacOSX References: Message-ID: <40128A20.6020101@wartburg.edu> Kent, Thanks! I took a stab at this before your message and had things partially working. Your instructions clearly show where I went wrong. I'll try this out on Monday and report back if I run into any problems. By the way, can anyone tell me how to make a binary package of this once I have it setup. It would be nice if I could just provide a Mac package that does the install. My hunch is that most Mac users are not accustomed to building from source. --John Kent Johnson wrote: > OK, I'll take a stab at this. I just ran through this to upgrade from > 2.3.1 to 2.3.3 (under MacOSX 10.2.6) so this should be pretty accurate... > > - Download and install TclTkAqua from > http://www.maths.mq.edu.au/~steffen/tcltk/TclTkAqua/ > > I used the 8.4.4 Batteries Included installer but I only installed Tcl > and Tk. The plain-vanilla TclTkAqua installer would probably be fine > as well. > > - Download and uncompress the source distribution of Python, the one > listed as "for Unix or OS X compile" > > - If you are building under MacOSX 10.2, you have to make a change to > /Python-2.3.3/Mac/OSX/Makefile. Uncomment line 14 (remove the #) and > comment line 16 (add a #) > > - In Terminal, enter the commands > > ./configure --enable-framework > make > sudo make frameworkinstall > > This should build /Library/Frameworks/Python.framework and > /Applications/MacPython. At this point I can > > - run python and pythonw from Terminal as usual > - Run PythonIDE (the Mac IDE) by double-clicking the launcher in the > MacPython folder > - Run IDLE by double-clicking the launcher in the MacPython folder > (The IDLE launcher didn't work for me with 2.3.1. But the command > 'pythonw idle' where idle is in the current directory, will worked for > me to launch IDLE. Or just look at the idle file and type the two > lines yourself.) > > Note that to run ANY Python GUI on MacOSX, you have to run with > pythonw or PythonLauncher. > > HTH, > Kent > > PS to John Zelle - your graphics.py works fine for me on MacOSX. > > -- John M. Zelle, Ph.D. | Wartburg College Associate Prof. of CS | Dept. Math/CS/Physics john.zelle@wartburg.edu | Waverly, Iowa From kent37 at tds.net Sat Jan 24 11:01:36 2004 From: kent37 at tds.net (Kent Johnson) Date: Sat Jan 24 11:01:41 2004 Subject: [Edu-sig] Python and Tk on MacOSX Message-ID: <200401241601.i0OG1ahH006061@outbound1.mail.tds.net> There are instructions for building a binary distribution outlined in /Python-2.3.3/Mac/OSX/README and detailed in /Python-2.3.3/Mac/OSX/Dist/README.txt. I haven't tried it but they make it sound easy :-) The MacPython-SIG might be a better place to get help with this, that is where the MacPython pros hang out...I'm happy to help but I'm not an expert. I'm kind of surprised that there isn't a distribution available with Tk support. I think you are right that building from source is more than most Mac users would consider. Though maybe not such a stretch for a developer. Kent > By the way, can anyone tell me how to make a binary package of this once > I have it setup. It would be nice if I could just provide a Mac package > that does the install. My hunch is that most Mac users are not > accustomed to building from source. > > --John From urnerk at qwest.net Sat Jan 24 12:51:53 2004 From: urnerk at qwest.net (Kirby Urner) Date: Sat Jan 24 12:51:52 2004 Subject: [Edu-sig] Reversing dictionaries, closures, permutations etc. In-Reply-To: Message-ID: > > What I'm thinking about in this thread is a way to define functions and > > inverse functions in a namespace, then pass them to a class P so that > > operator overloading will allow: > > I have to confess that you lost me somewhere below this point (I'll > reread it until I get it), but this is the sort of thing UserDict is for, > right? > I know Zope subclasses it to get the PersistentMapping class -- it > gives you the basic dictionary interface, which you can then build > on. > > Cheers, > Terry > The way I factored it, I wanted the P-class to accept /any/ pair of functions f, invf, where invf is the inverse of f. If f is based on a dictionary lookup (e.g. a permutations), then invf could be defined using a dictionary inverter (example in previous post). But f might just be an algebraic rule, e.g.: >>> def f(x): return 2.0 * x >>> def invf(x): return x / 2.0 >>> p1 = P(f,invf) # <-- wrapping in P-class to get operator overloading >>> p1(4) # <-- using __call__ 8.0 >>> p2 = ~p1 # <-- using __invert__ >>> p2(8.0) 4.0 >>> p3 = (p2 * p1 * ~p2) # <-- using __mul__ to call self.compose() >>> p3(10) 20.0 >>> map((p1 * ~p1), [4,3,9,10,0.5,-9.1]) <-- ditto [4.0, 3.0, 9.0, 10.0, 0.5, -9.0999999999999996] The last command reminds us that f(decimal)->binary does not itself have an exact inverse function in the floating point numbers. Kirby From sandysj at juno.com Mon Jan 26 18:39:20 2004 From: sandysj at juno.com (Jeff Sandys) Date: Mon Jan 26 18:58:01 2004 Subject: [Edu-sig] Re: ..., closures, ... Message-ID: <4015A528.E81CB0A3@juno.com> Kirby said: > Here's the same example in Python, in shell mode: > > >>> def newprint(x): > def anon(y): > print "%s, %s!" % (x,y) > return anon > > >>> h = newprint("Howdy") > >>> g = newprint("Greetings") > > >>> # Time passes... > > >>> h("world") > Howdy, world! > > >>> g("earthlings") > Greetings, earthlings! > > ======= > > I use 'anon' for anonymous function, but that's sort of an oxymoron, as > 'anon' is the function's name, insofar as functions have a name. If > you ask for string representations of these references, you get: > > > >>> g > > >>> h > > > If you want to make it clear in a different way, that these functions > are anonymous, you could use lambda like this: > > >>> def newprint(x): > def anon(y): > print "%s, %s!" % (x,y) > return lambda y: anon(y) > > >>> h = newprint("Howdy") > >>> g = newprint("Greetings") > >>> h > at 0x00ACEB70> > >>> g > at 0x00ACEE30> > > I guess I have no strong preference for either format. However, this > does show it's easy for lambda to represent functions of any length, > with print statements included. > Since lambda means anonymous you don't need to, def anon(y): >>> def newpr(x): ... return lambda y : "%s, %s!" % (x,y) ... >>> h = newpr("Howdy") >>> g = newpr("Greetings") >>> h("World") 'Howdy, World!' >>> g("earthlings") 'Greetings, earthlings!' >>> g at 0x200f35b0> >>> h at 0x200ecf70> Of course this method returns a string instead of printing the message. If you want to print the message you need to, def anon(x): because print is not a valid lambda expression (why?, I don't know): >>> def newprint(x): def newprint(x): ... return lambda y : print "%s, %s" % (x,y) File "", line 2 return lambda y : print "%s, %s" % (x,y) ^ SyntaxError: invalid syntax >>> Closures are cool, Thanks, Jeff Sandys From urnerk at qwest.net Mon Jan 26 20:10:01 2004 From: urnerk at qwest.net (Kirby Urner) Date: Mon Jan 26 20:09:55 2004 Subject: [Edu-sig] Re: ..., closures, ... other weirdness In-Reply-To: <4015A528.E81CB0A3@juno.com> Message-ID: > Of course this method returns a string instead of printing the message. > If you want to print the message you need to, def anon(x): > because print is not a valid lambda expression (why?, I don't know): Yes, right. Plus you'll also need to define anon if you want your closure to consist of more than one line of code (li'l lambda is just for one-liners). > Closures are cool, > Thanks, > Jeff Sandys Here's something else I learned about Python recently. This is weird, non-idiomatic stuff: a pseudo-generator (of sorts) using function attributes: >>> def weird(): '''List consecutive Fibonacci numbers per each call''' weird.x, weird.y = weird.y, weird.x + weird.y return weird.x >>> weird.x = 1 >>> weird.y = 1 >>> for i in range(8): print weird(), 1 2 3 5 8 13 21 34 But wait, there's more: You can wrap this function with iter(callable, sentinel) to make it an iterable: >>> weird.x = 1 >>> weird.y = 1 >>> wi = iter(weird,89) >>> for i in wi: print i, 1 2 3 5 8 13 21 34 55 So I guess in Python 2.4 we'll be able to go: >>> weird.x = 1 >>> weird.y = 1 >>> wi = reversed(iter(weird,89)) >>> for i in wi: print i, 55 34 21 13 8 5 3 2 1 And now, to round out this little detour into arcane Python, let's make weird() self-initializing, i.e. we don't want to have to assign weird.x and weird.y before first use: >>> def weird(x=1,y=1): '''List consecutive Fibonacci numbers per each call''' try: weird.x except: weird.x = x try: weird.y except: weird.y = y weird.x, weird.y = weird.y, weird.x + weird.y return weird.x >>> wi = iter(weird,89) # note: no "initialization" of weird needed >>> for i in wi: print i, 1 2 3 5 8 13 21 34 55 Weird. Kirby From dethe.elza at blastradius.com Tue Jan 27 01:21:13 2004 From: dethe.elza at blastradius.com (Dethe Elza) Date: Tue Jan 27 10:58:36 2004 Subject: [Edu-sig] Re: ..., closures, ... other weirdness In-Reply-To: References: Message-ID: <017BFA7C-5091-11D8-B769-0003939B59E8@blastradius.com> >> Of course this method returns a string instead of printing the >> message. >> If you want to print the message you need to, def anon(x): >> because print is not a valid lambda expression (why?, I don't know): Lambdas are limited to a single expression by design. It would be nice if there was an alternate form of "def" which returned an anonymous function : anon = def(x,y): return x + y But Python doesn't work that way (Javascript "function" does). > Here's something else I learned about Python recently. This is weird, > non-idiomatic stuff: a pseudo-generator (of sorts) using function > attributes: [snip] >>>> def weird(x=1,y=1): > '''List consecutive Fibonacci numbers per each call''' > try: weird.x > except: weird.x = x > try: weird.y > except: weird.y = y > weird.x, weird.y = weird.y, weird.x + weird.y > return weird.x > >>>> wi = iter(weird,89) # note: no "initialization" of weird needed > >>>> for i in wi: print i, > > 1 2 3 5 8 13 21 34 55 While function attributes are indeed cool (and weird), I'd probably use them more if they didn't need to know their own name (i.e., if there was something like "self" which means "this is me, the function" from within functions. On the other hand, your example is probably simpler as a genuine, iterable, generator: def weird(): x,y = 1,1 while True: yield x x,y = y, x+y from itertools import islice wi = islice(weird(), 20) for i in wi: print i, We use islice to prevent iterating forever, as this will happily give you every fibonnacci number until the end of time otherwise. --Dethe "Ambiguity, calculated or generative, as a means of discontinuous organization, at first seems familiar to us" -- Pain Not Bread, An introduction to Du Fu From urnerk at qwest.net Tue Jan 27 11:56:30 2004 From: urnerk at qwest.net (Kirby Urner) Date: Tue Jan 27 11:56:23 2004 Subject: [Edu-sig] Re: ..., closures, ... other weirdness In-Reply-To: <017BFA7C-5091-11D8-B769-0003939B59E8@blastradius.com> Message-ID: > On the other hand, your example is probably simpler as a genuine, > iterable, generator: > > def weird(): > x,y = 1,1 > while True: > yield x > x,y = y, x+y > > from itertools import islice > wi = islice(weird(), 20) > for i in wi: print i, > > We use islice to prevent iterating forever, as this will happily give > you every fibonnacci number until the end of time otherwise. > > --Dethe Yes, the generator syntax is clearly more straightforward than using function attributes. As Martelli points out in '..in a Nutshell', anything making use of function attributes heavily is more idiomatically (and easily) implemented using class syntax. Thanks for showing the islice trick. Have you made a study of itertools? I'd be interested in learning other such tips, if you've got the time. Kirby From dethe.elza at blastradius.com Tue Jan 27 12:56:05 2004 From: dethe.elza at blastradius.com (Dethe Elza) Date: Tue Jan 27 12:56:09 2004 Subject: [Edu-sig] Itertools In-Reply-To: <200401271656.i0RGuII74735@hub.blastradius.com> References: <200401271656.i0RGuII74735@hub.blastradius.com> Message-ID: <1417028E-50F2-11D8-B769-0003939B59E8@blastradius.com> > Thanks for showing the islice trick. Have you made a study of > itertools? > I'd be interested in learning other such tips, if you've got the time. My pleasure. I'm really looking forward to Python 1.4 generator expressions, which will make the itertools module even more interesting. Calling generators is more efficient (down in the guts of Python) than calling functions, and because they are lazily evaluated, they tend to be more efficient in both memory and time than lists are, while maintaining much of the same ease of use. All of this is taken from the python docs, which covers all of the following functions and provides some useful examples. Like the fibonacci generator, many of these functions return an unbounded (infinite) number of results, and should only be used in functions, loops, or other iterators which truncate the stream somehow (like islice in the example). chain(iterable, [iterable,] ...) Chain takes a list of iterables and returns one which will iterate over the first iterable until it is exhausted, then the second until it is exhausted, and so on. count([n]) count will return consecutive integers until n is reached cycle(iterable) cycle will run through an iterable and save the values. When the iterable is exhausted it repeats using the saved values, turning a finite iterable into an infinite one. dropwhile(predicate, iterable) dropwhile is a latch function. It discards the results of the iterable as long as predictate(iterable.next()) returns true. Once the predictate becomes false it will return the rest of the results. ifilter(predicate, iterable) only returns iterable results for which the predicate is true. Equivalent to the builtin filter, but for iterables (and thus lazily evaluated) ifilterfalse(predicate, iterable) like ifilter but only returns iterator results for which the predicate is false imap(function, iterable [, iterable] ...) imap is like the builtin map function, but takes a list of iterables rather than a list of sequences, and applys the function to the results of the iterable(s) islice(iterable, [start], stop, [step]) islice takes a slice of an iterable, with optional start and step arguments. Because iterables can be infinite in length it does not permit negative numbers for stop, start, or step arguments. izip(iterable, [iterable], ...) izip is like the builtin zip function, but takes a list of iterables rather than sequences repeat(object, [times]) repeat returns an iterable which will return the same object over and over starmap(function, iterable) starmap is to imap as function(*args) is to function(a,b,c). It expects a tuple from the iterable, which is passed in as the args of function. takewhile(predicate, iterable) takewhile returns an iterable of the results of its iterable, truncated at the first result which evaluates false in the predicate function. All of that sounds very long-winded and obtuse perhaps. The basic concept is that rather than having a list, where all the elements of the list are known and can be manipulated, you have a stream and the elements can be manipulated as you receive them from the stream. I hope that's helpful. I'm willing to clarify any confusions I've created with it. --Dethe "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it. " --Brian Kernighan From urnerk at qwest.net Tue Jan 27 20:41:09 2004 From: urnerk at qwest.net (Kirby Urner) Date: Tue Jan 27 20:41:29 2004 Subject: [Edu-sig] Itertools In-Reply-To: <1417028E-50F2-11D8-B769-0003939B59E8@blastradius.com> Message-ID: > count([n]) > > count will return consecutive integers until n is reached > Actually, I think this one iterates *from* n. It has no stopping parameter. <> > I hope that's helpful. I'm willing to clarify any confusions I've > created with it. > > --Dethe > Helpful indeed! Thank you. Kirby From dethe.elza at blastradius.com Wed Jan 28 09:48:34 2004 From: dethe.elza at blastradius.com (Dethe Elza) Date: Wed Jan 28 09:49:15 2004 Subject: [Edu-sig] Itertools In-Reply-To: <200401280140.i0S1evI75839@hub.blastradius.com> References: <200401280140.i0S1evI75839@hub.blastradius.com> Message-ID: <0C798D37-51A1-11D8-B769-0003939B59E8@blastradius.com> On 27-Jan-04, at 5:41 PM, Kirby Urner wrote: >> count([n]) >> >> count will return consecutive integers until n is reached >> > > Actually, I think this one iterates *from* n. It has no stopping > parameter. You're right, I didn't skim closely enough. Thanks for catching that. --Dethe This past week, everyday when I opened my Wall Street Journal, I was met with a full page ad from Microsoft. This ad was dominated by three simple words "Protect your PC." This strikes me as something akin to the Saudi government running ads in the New York Times in mid-September of 2001 saying "Protect your Tall Buildings." --Russ McGuire From urnerk at qwest.net Wed Jan 28 14:35:08 2004 From: urnerk at qwest.net (Kirby Urner) Date: Wed Jan 28 14:35:03 2004 Subject: [Edu-sig] Brainstorming a Math-with-Programming Class In-Reply-To: <0C798D37-51A1-11D8-B769-0003939B59E8@blastradius.com> Message-ID: Brainstorming the kind of course I'd like to see offered, including to high schoolers. Just a rough outline. Several more like this, partially overlapping, would give a pretty good background in many math concepts AND computer science. =================================== Algebra with Programming (Rough Draft) Target: High School or College Course incl Adult Ed Time frame: Various options Computer Language: Python (including Pygame) Course Outline: Programming Unit: Orientation Data Structures Sets, Lists, Associative Lists Programming Unit: Data Structures Notational Apparatus: Lists, Arrays, Indexing Programming Unit: Type Systems Number Sets: N, Z, Q, R, C Programming Unit: Floating Point, Big Integers and more Programming Unit: Extending the Type System Building a Rational Number Class (Q) Operations: Unary vs Binary Commutativity vs Associativity (intro) Programming Unit: Extending Rational Number Class with Operator Overloading Functions and Relations Mapping chars to ASCII/Unicode Sequences (rule based) types of sequences convergent divergent oscillatory chaotic Programming Unit: Sequences of Figurate Numbers Programming Unit: Fibonacci Numbers and Recursion Programming Unit: Sequences and Pseudo-Random Numbers Programming Unit: Chaotic Sequences Inverse Functions and Operations Unary Inverse Ops: negation, reciprocation Powers and Roots Exponentiation and Logs Programming Unit: Extending the Rational Number Object Dictionaries and Permutations Substitution Ciphers Composition as an Operation Commutativity vs Associativity (continued) Properties of a Group (intro) Permutations and Combinations Factorial Pascal's Triangle Triangular and Tetrahedral numbers Binomial Distribution Binomial Theorem (intro) More Functions and Inverse Functions Trig functions (intro) Multiplying Complex Numbers Arithmetic Operations Modulo N Programming Unit: Exploring Complex Numbers with Trig Functions Programming Unit: Building a Modulo Arithemetic Class Group, Ring, Field Groups of Totatives Modulo N Fields of Totatives Modulo Prime Programming Unit: Extending a Modulo Arithemetic Class Graphing Functions and Relations Programming Unit: Points, Edges and Plotting Programming Unit: An Intro to PyGame for Plotting Parametric Equations and Curves Programming Unit: A Polynomial Class Factoring and Solving Equations Quadratic Equations Completing the Square Quadratic Equation Higher Degree Equations Binomial Theorem (continued) Ring of Polynomials Programming Unit: Extending the Polynomial Class From glingl at aon.at Wed Jan 28 17:33:59 2004 From: glingl at aon.at (Gregor Lingl) Date: Wed Jan 28 17:33:09 2004 Subject: [Edu-sig] what? (late nite entertainment) (*) Message-ID: <401838D7.2000000@aon.at> What is this? Another version of the well known ... def what(n): x,y = range(n), [0]*n x[1]= 0 z = 0 while z*z <= n: z+=1 if x[z]: x[z*z:n:z]=y[z*z:n:z] return [z for z in x if z] Regards, Gregor (*) at least in good old Europe From delza at blastradius.com Wed Jan 28 23:57:20 2004 From: delza at blastradius.com (Dethe Elza) Date: Thu Jan 29 00:08:52 2004 Subject: [Edu-sig] what? (late nite entertainment) (*) In-Reply-To: <401838D7.2000000@aon.at> References: <401838D7.2000000@aon.at> Message-ID: <9E967B83-5217-11D8-A1EA-0003939B59E8@blastradius.com> Well, it seems to generate primes less than n, but breaks if n < 2 (perhaps it should return an empty list?) Another entry for obfuscated python... %-) --Dethe On 28-Jan-04, at 2:33 PM, Gregor Lingl wrote: > def what(n): > x,y = range(n), [0]*n > x[1]= 0 > z = 0 > while z*z <= n: > z+=1 > if x[z]: x[z*z:n:z]=y[z*z:n:z] > return [z for z in x if z] > This past week, everyday when I opened my Wall Street Journal, I was met with a full page ad from Microsoft. This ad was dominated by three simple words "Protect your PC." This strikes me as something akin to the Saudi government running ads in the New York Times in mid-September of 2001 saying "Protect your Tall Buildings." --Russ McGuire -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2371 bytes Desc: not available Url : http://mail.python.org/pipermail/edu-sig/attachments/20040128/518b2ced/smime.bin From stephen at abr.com.au Thu Jan 29 00:22:37 2004 From: stephen at abr.com.au (Stephen Thorne) Date: Thu Jan 29 00:22:54 2004 Subject: [Edu-sig] what? (late nite entertainment) (*) In-Reply-To: <9E967B83-5217-11D8-A1EA-0003939B59E8@blastradius.com> References: <401838D7.2000000@aon.at> <9E967B83-5217-11D8-A1EA-0003939B59E8@blastradius.com> Message-ID: <4018989D.8030808@abr.com.au> More correctly, it generates a list of numbers less than n, then removes all numbers from that list that aren't prime. Also, it breaks if n < 3. Its definately an interesting implementation. I'm not sure I like the 'y' variable. Stephen. Dethe Elza wrote: > Well, it seems to generate primes less than n, but breaks if n < 2 > (perhaps it should return an empty list?) > > Another entry for obfuscated python... %-) > > --Dethe > > On 28-Jan-04, at 2:33 PM, Gregor Lingl wrote: > >> def what(n): >> x,y = range(n), [0]*n >> x[1]= 0 >> z = 0 >> while z*z <= n: >> z+=1 >> if x[z]: x[z*z:n:z]=y[z*z:n:z] >> return [z for z in x if z] >> > This past week, everyday when I opened my Wall Street Journal, I was > met with a full page ad from Microsoft. This ad was dominated by three > simple words "Protect your PC." This strikes me as something akin to > the Saudi government running ads in the New York Times in > mid-September of 2001 saying "Protect your Tall Buildings." --Russ > McGuire > >------------------------------------------------------------------------ > >_______________________________________________ >Edu-sig mailing list >Edu-sig@python.org >http://mail.python.org/mailman/listinfo/edu-sig > > From glingl at aon.at Thu Jan 29 01:09:38 2004 From: glingl at aon.at (Gregor Lingl) Date: Thu Jan 29 01:08:40 2004 Subject: [Edu-sig] Re: [Tutor] what? (late nite entertainment) (*) In-Reply-To: <5.1.0.14.0.20040129104059.0395f220@192.168.1.1> References: <5.1.0.14.0.20040129104059.0395f220@192.168.1.1> Message-ID: <4018A3A2.6080103@aon.at> Now: early morning corrections ... Alfred Milgrom wrote: > Hi Gregor: > > Hard to work out what is what :) as there seems to be a typo in one > line of your code: > > if x[z]: x[z*z:n:z]=y[z*z:n:z] > > (At least it doesn't work on my machine with Python 2.2) > Yeah, I had the idea when playing around with some new features of Python 2.3, as I do sometimes late at night - before shutting down my computer. This one I found at: http://www.python.org/doc/2.3.3/whatsnew/section-slices.html and I looked for an example for use of "assignment with extended slices" ... > Also the subroutine breaks for n = 1 or less. > Maybe you need a line at the start to say > if n <2 : return [0] > what() was intended to generate all primes less than n. (In fact it's an implementation of the sieve of Eratosthenes). The bugs came not only from not beeing interested in primes less than 2 ;-) but also from beeing a little tired already. Sorry. I think the following version repairs that - and hopefully uses less obfuscating variable names (which in fact originally was part of the "riddle"): def primes(n): sieve, zeros = range(n), [0]*n sieve[:2]= 0,0 i = 1 while i*i < n: if sieve[i]: sieve[i*i:n:i]=zeros[i*i:n:i] i += 1 return [p for p in sieve if p] Regards, Gregor > From urnerk at qwest.net Thu Jan 29 03:51:00 2004 From: urnerk at qwest.net (Kirby Urner) Date: Thu Jan 29 03:50:49 2004 Subject: [Edu-sig] Re: [Tutor] what? (late nite entertainment) (*) In-Reply-To: <4018A3A2.6080103@aon.at> Message-ID: > def primes(n): > sieve, zeros = range(n), [0]*n > sieve[:2]= 0,0 > i = 1 > while i*i < n: > if sieve[i]: sieve[i*i:n:i]=zeros[i*i:n:i] > i += 1 > return [p for p in sieve if p] > > Regards, > Gregor Very nice. Here's a slight variation: def primes(n): sieve = [1]*n sieve[:2]= 0,0 i = 1 while i*i < n: if sieve[i]: sieve[i*i:n:i] = len(sieve[i*i:n:i]) * [0] i += 1 return [p for p in range(n) if sieve[p]] Kirby From hancock at anansispaceworks.com Thu Jan 29 08:31:48 2004 From: hancock at anansispaceworks.com (Terry Hancock) Date: Thu Jan 29 08:22:11 2004 Subject: [Edu-sig] what? (late nite entertainment) (*) In-Reply-To: <4018989D.8030808@abr.com.au> References: <401838D7.2000000@aon.at> <9E967B83-5217-11D8-A1EA-0003939B59E8@blastradius.com> <4018989D.8030808@abr.com.au> Message-ID: On Wednesday 28 January 2004 11:22 pm, Stephen Thorne wrote: > More correctly, it generates a list of numbers less than n, then removes > all numbers from that list that aren't prime. Also, it breaks if n < 3. It also breaks with Python <= 2.2. Try this instead if you are so encumbered, like me: def what(n): x,y = range(n), [0]*n x[1]= 0 z = 0 while z*z <= n: z+=1 if x[z]: for i in range(z*z, n, z): x[i]=y[i] return [z for z in x if z] -- Terry Hancock ( hancock at anansispaceworks.com ) Anansi Spaceworks http://www.anansispaceworks.com From trent at oliphant.org Thu Jan 29 11:25:54 2004 From: trent at oliphant.org (Trent Oliphant) Date: Thu Jan 29 11:28:46 2004 Subject: [Edu-sig] what? (late nite entertainment) (*) In-Reply-To: <4018A3A2.6080103@aon.at> References: <5.1.0.14.0.20040129104059.0395f220@192.168.1.1> <4018A3A2.6080103@aon.at> Message-ID: <40193412.60702@oliphant.org> Thank you for this little puzzle intro to extended slice notation. I didn't fully understand what it was doing until I walked through it line by line in the interpreter and inserted a print statement for each step in the while loop. Now, I won't claim to be a mathmetician (I'm not even sure I spelled it correctly), and so won't chime in on the 1 being prime issue, but if you wanted to include it in the return - you could do the following: def primes(n): sieve, zeros = range(n), [0]*n i = 2 while i*i < n: if sieve[i]: sieve[i*i:n:i]=zeros[i*i:n:i] i += 1 return [p for p in sieve if p] Trent > what() was intended to generate all primes less than n. (In fact it's > an implementation of the sieve of Eratosthenes). The bugs came not > only from not beeing interested in primes less than 2 ;-) but also from > beeing a little tired already. Sorry. > > I think the following version repairs that - and hopefully uses less > obfuscating variable names (which in fact originally was part of the > "riddle"): > > def primes(n): > sieve, zeros = range(n), [0]*n > sieve[:2]= 0,0 > i = 1 > while i*i < n: > if sieve[i]: sieve[i*i:n:i]=zeros[i*i:n:i] > i += 1 > return [p for p in sieve if p] > > Regards, > Gregor >