Re: Programming by contract.

2023-02-25 Thread Cameron Simpson
On 26Feb2023 02:44, Weatherby,Gerard wrote: The discussion of asserts got me thinking about Programming by Contract. Back in the 90s, I had occasion to learn Eiffel programming language. ( https://en.wikipedia.org/wiki/Eiffel_(programming_language) The concepts are intriguing, although Eiffel

Re: Programming for Everybody (Python)

2014-10-02 Thread Juan Christian
I recommend to everyone. Already took one of his courses on Coursera and he's amazing as a teacher. On Thu, Oct 2, 2014 at 4:24 PM, Seymore4Head wrote: > Starts in 3 days > Coursera.org > > About the Course > This course is specifically designed to be a first programming course > using the popul

Re: Programming puzzle with boolean circuits

2013-12-11 Thread Johannes Bauer
On 09.12.2013 14:25, Chris Angelico wrote: >> I found this puzzle again and was thinking about: How would I code a >> brute-force approach to this problem in Python? > > Ooooh interesting! Ha, I thought so too :-) > Well, here's a start: There's no value in combining the same value in > an AND

Re: Programming puzzle with boolean circuits

2013-12-10 Thread Antoon Pardon
Op 09-12-13 12:49, Johannes Bauer schreef: > Hi group, > > it's somewhat OT here, but I have a puzzle to which I would like a > solution -- but I'm unsure how I should tackle the problem with Python. > But it's a fun puzzle, so maybe it'll be appreciated here. > > The question is: How do you desi

Re: Programming puzzle with boolean circuits

2013-12-10 Thread Chris Angelico
On Tue, Dec 10, 2013 at 1:21 PM, Chris Angelico wrote: > Output: (I tweaked my __repr__ functions to parenthesize for clarity) > > (((not ((($1 and $2) or ($1 and $4)) or ($2 and $4)) and not ((($1 and > $2) and $4) or (not ((($1 and $2) or ($1 and $4)) or ($2 and $4)) and > (($1 or $2) or $4

Re: Programming puzzle with boolean circuits

2013-12-09 Thread Chris Angelico
On Tue, Dec 10, 2013 at 1:03 PM, Joel Goldstick wrote: > Chris, and all.. Since you posted yours, I post this for your pleasure. I > couldn't figure out what you were doing. > [chomp Python implementation of a fairly elegant solution] That's a fairly nice piece of code that comes from a delibera

Re: Programming puzzle with boolean circuits

2013-12-09 Thread Chris Angelico
On Tue, Dec 10, 2013 at 12:25 AM, Chris Angelico wrote: > Unfortunately I haven't been able to prove that the code works, > because even with some changes it's taking way too long. But hey, it's > a crazy fun piece to work with! Well... it eventually solved the problem. I don't know how many CPU

Re: Spoiler alert? (Re: Programming puzzle with boolean circuits)

2013-12-09 Thread Joel Goldstick
On Mon, Dec 9, 2013 at 3:39 PM, John Ladasky wrote: > It has been ages since I've thought about logic gates, but... > > My thought is that with two NOT logic gates, you can only build a > flip-flop memory circuit. That strongly suggests to me that a memory > circuit would actually be used to solv

Spoiler alert? (Re: Programming puzzle with boolean circuits)

2013-12-09 Thread John Ladasky
It has been ages since I've thought about logic gates, but... (Spoiler alert? I'm not sure...) . . . . . . . . . . . . . . . . My thought is that with two NOT logic gates, you can only build a flip-flop memory circuit. That strongly suggests to me that a memory circuit would

Re: Programming puzzle with boolean circuits

2013-12-09 Thread Joel Goldstick
On Mon, Dec 9, 2013 at 6:49 AM, Johannes Bauer wrote: > Hi group, > > it's somewhat OT here, but I have a puzzle to which I would like a > solution -- but I'm unsure how I should tackle the problem with Python. > But it's a fun puzzle, so maybe it'll be appreciated here. > > The question is: How

Re: Programming puzzle with boolean circuits

2013-12-09 Thread Chris Angelico
On Mon, Dec 9, 2013 at 10:49 PM, Johannes Bauer wrote: > The question is: How do you design a boolean circuit that contains at > most 2 NOT gates, but may contain as many AND or OR gates that inverts > three inputs? IOW: Build three inverters by using only two inverters > (and an infinite amount o

Re: programming course

2013-07-29 Thread Chris Angelico
On Sat, Jul 27, 2013 at 1:28 PM, wrote: > Hi, > A good step by step easy book on Python is: "Start Here: Python 3x > Programming Made Fun and Easier," at http://www.quantum-sight.com This is a Usenet group and a mailing list, not a web forum. You do not need to dig up a dozen ancient threads in

Re: programming course

2013-07-27 Thread aliencat777
Hi, A good step by step easy book on Python is: "Start Here: Python 3x Programming Made Fun and Easier," at http://www.quantum-sight.com Aliencat -- http://mail.python.org/mailman/listinfo/python-list

Re: Programming Issues

2012-09-20 Thread Dave Angel
On 09/19/2012 07:01 PM, Nathan Spicer wrote: > Dave, > You sent this response privately, which isn't the way the mailing list works. Private responses are good for thank-yous and for personal remarks of no interest to others. But you're short-circuiting the helping process if you don't let ever

Re: Programming Issues

2012-09-19 Thread Jason Friedman
> Ask the user for the amount of change expressed in cents. Your program must > compute and display the number of half-dollars, quarters, dimes, nickels, > and pennies to be returned. > Return as many half-dollars as possible, then quarters, dimes, nickels, and > pennies, in that order. > Your prog

Re: Programming D. E. Knuth in Python with the Deterministic Finite Automaton construct

2012-03-19 Thread Kiuhnm
On 3/19/2012 6:02, Dennis Lee Bieber wrote: On Mon, 19 Mar 2012 02:02:23 +0100, Kiuhnm declaimed the following in gmane.comp.python.general: Many ASM languages don't have structured control flow statements but only jmps, which are roughly equivalent to gotos. A good decompiler will need to a

Re: Programming D. E. Knuth in Python with the Deterministic Finite Automaton construct

2012-03-18 Thread Kiuhnm
On 3/18/2012 0:28, Michael Torrie wrote: I am familiar with how one might implement a decompiler, as well as a compiler (having written a simple one in the past), but even now I don't see a connection between a decompiler and the process of converting a knuth algorithm into a python python implem

Re: Programming D. E. Knuth in Python with the Deterministic Finite Automaton construct

2012-03-18 Thread Albert van der Horst
In article , Antti J Ylikoski wrote: > >In his legendary book series The Art of Computer Programming, >Professor Donald E. Knuth presents many of his algorithms in the form >that they have been divided in several individual phases, with >instructions to GOTO to another phase interspersed in the t

Re: Programming D. E. Knuth in Python with the Deterministic Finite Automaton construct

2012-03-18 Thread Albert van der Horst
In article <[email protected]>, Steven D'Aprano wrote: >On Sat, 17 Mar 2012 17:28:38 -0600, Michael Torrie wrote: > >> Thank you. Your example makes more clear your assertion about "labels" >> and how really A1 and A5 were the only real labels in the example. >>

Re: Programming D. E. Knuth in Python with the Deterministic Finite Automaton construct

2012-03-17 Thread Evan Driscoll
On 3/17/2012 9:03, Antti J Ylikoski wrote: > > In his legendary book series The Art of Computer Programming, > Professor Donald E. Knuth presents many of his algorithms in the form > that they have been divided in several individual phases, with > instructions to GOTO to another phase interspersed

Re: Programming D. E. Knuth in Python with the Deterministic Finite Automaton construct

2012-03-17 Thread Steven D'Aprano
On Sat, 17 Mar 2012 17:28:38 -0600, Michael Torrie wrote: > Thank you. Your example makes more clear your assertion about "labels" > and how really A1 and A5 were the only real labels in the example. > Though I still do not really see why "states" is not a good equivalence > for labels in this ca

Re: Programming D. E. Knuth in Python with the Deterministic Finite Automaton construct

2012-03-17 Thread Michael Torrie
On 03/17/2012 11:55 AM, Kiuhnm wrote: > Why should I write a treatise on decompilation techniques on this ng? You were the one that said simply, you're doing it wrong followed by a terse statement, do it like a decompiler. I am familiar with how one might implement a decompiler, as well as a comp

Re: Programming D. E. Knuth in Python with the Deterministic Finite Automaton construct

2012-03-17 Thread John Nagle
On 3/17/2012 9:31 AM, Antti J Ylikoski wrote: On 17.3.2012 17:47, Roy Smith wrote: In article, Antti J Ylikoski wrote: I came across the problem, which would be the clearest way to program such algorithms with a programming language such as Python, which has no GOTO statement. Oh, my, I can't

Re: Programming D. E. Knuth in Python with the Deterministic Finite Automaton construct

2012-03-17 Thread Kiuhnm
On 3/17/2012 16:53, Michael Torrie wrote: > On 03/17/2012 09:12 AM, Kiuhnm wrote: >> On 3/17/2012 16:01, Michael Torrie wrote: >>> On 03/17/2012 08:45 AM, Kiuhnm wrote: Your way is easy, but the result is poor. >>> >>> In what way? >> >> The resulting code is inefficient, difficult to comprehe

Re: Programming D. E. Knuth in Python with the Deterministic Finite Automaton construct

2012-03-17 Thread Antti J Ylikoski
On 17.3.2012 17:47, Roy Smith wrote: In article, Antti J Ylikoski wrote: I came across the problem, which would be the clearest way to program such algorithms with a programming language such as Python, which has no GOTO statement. It struck me that the above construction actually is a modi

Re: Programming D. E. Knuth in Python with the Deterministic Finite Automaton construct

2012-03-17 Thread Michael Torrie
On 03/17/2012 09:12 AM, Kiuhnm wrote: > On 3/17/2012 16:01, Michael Torrie wrote: >> On 03/17/2012 08:45 AM, Kiuhnm wrote: >>> Your way is easy, but the result is poor. >> >> In what way? > > The resulting code is inefficient, difficult to comprehend and to mantain. > >> What is your recommended

Re: Programming D. E. Knuth in Python with the Deterministic Finite Automaton construct

2012-03-17 Thread Roy Smith
In article , Antti J Ylikoski wrote: > I came across the problem, which would be the clearest way to program > such algorithms with a programming language such as Python, which has > no GOTO statement. It struck me that the above construction actually > is a modified Deterministic Finite Automa

Re: Programming D. E. Knuth in Python with the Deterministic Finite Automaton construct

2012-03-17 Thread Kiuhnm
On 3/17/2012 16:01, Michael Torrie wrote: On 03/17/2012 08:45 AM, Kiuhnm wrote: Your way is easy, but the result is poor. In what way? The resulting code is inefficient, difficult to comprehend and to mantain. What is your recommended way? One should rewrite the code. There is a reason w

Re: Programming D. E. Knuth in Python with the Deterministic Finite Automaton construct

2012-03-17 Thread Michael Torrie
On 03/17/2012 08:45 AM, Kiuhnm wrote: > Your way is easy, but the result is poor. In what way? What is your recommended way? > Your should try to rewrite it. > Decompilers do exactly that. Decompilers rewrite code for people? That's really neat. -- http://mail.python.org/mailman/listinfo/pyt

Re: Programming D. E. Knuth in Python with the Deterministic Finite Automaton construct

2012-03-17 Thread Kiuhnm
On 3/17/2012 15:03, Antti J Ylikoski wrote: In his legendary book series The Art of Computer Programming, Professor Donald E. Knuth presents many of his algorithms in the form that they have been divided in several individual phases, with instructions to GOTO to another phase interspersed in the

Re: Programming D. E. Knuth in Python with the Deterministic Finite Automaton construct

2012-03-17 Thread Mel Wilson
Antti J Ylikoski wrote: > > In his legendary book series The Art of Computer Programming, > Professor Donald E. Knuth presents many of his algorithms in the form > that they have been divided in several individual phases, with > instructions to GOTO to another phase interspersed in the text of th

Re: Programming Python for Absolute Beginners

2011-07-27 Thread harrismh777
Billy Mays wrote: No one cares and don't spam the list. ... ouch, now I feel really bad... has someone not had their coffee this morning? kind regards, -- m harris FSF ...free as in freedom/ http://webpages.charter.net/harrismh777/gnulinux/gnulinux.htm -- http://mail.python.org/ma

Re: Programming Python for Absolute Beginners

2011-07-27 Thread Billy Mays
On 7/27/2011 11:50 PM, harrismh777 wrote: No one cares and don't spam the list. -- http://mail.python.org/mailman/listinfo/python-list

Re: Programming tips :-)

2011-07-07 Thread Phlip
On Jul 7, 11:36 am, Andrew Berg wrote: > On 2011.07.07 12:22 PM, Martin Schöön wrote:> I just found the following url > in my archives at work and > > thought you might enjoy it: > >http://thc.org/root/phun/unmaintain.html > > That's awesome. That's "How To Write Unmaintainable Code" - a venera

Re: Programming tips :-)

2011-07-07 Thread Andrew Berg
On 2011.07.07 12:22 PM, Martin Schöön wrote: > I just found the following url in my archives at work and > thought you might enjoy it: > http://thc.org/root/phun/unmaintain.html That's awesome. > If a maintenance programmer can't quote entire Monty Python movies > from memory, he or she has *no* b

Re: Programming games in historical linguistics with Python

2010-12-01 Thread Steven D'Aprano
On Tue, 30 Nov 2010 07:03:28 -0800, Dax Bloom wrote: > Is there a way to refer to vowels and consonants as a subcategory of > text? Is there a function to remove all vowels? How should one create > and order the dictionary file for the rules? How to chain several > transformations automatically fr

Re: Programming games in historical linguistics with Python

2010-11-30 Thread Gnarlodious
Have you considered entering all this data into an SQLite database? You could do fast searches based on any features you deem relevant to the phoneme. Using an SQLite editor application you can get started building a database right away. You can add columns as you get the inspiration, along with an

Re: Programming games in historical linguistics with Python

2010-11-30 Thread Vlastimil Brom
2010/11/30 Dax Bloom : > Hello, > > Following a discussion that began 3 weeks ago I would like to ask a > question regarding substitution of letters according to grammatical > rules in historical linguistics. I would like to automate the > transformation of words according to complex rules of phono

Re: programming

2010-09-20 Thread Xavier Ho
On 20 September 2010 17:29, Xavier Ho wrote: > Secondly, that doesn't even compile. Nor does > > xDistance=eval(input("Distance to the stop sign (in feet): ")) > Just correcting myself here. It compiles, but generates an error when you give it a number, which still fails. Cheers, Xav -- http:/

Re: programming

2010-09-20 Thread Xavier Ho
Okay, it looks like you're doing well. I'm just going through your second email now, and it seems many of my comments in the first email is irrelavent to you anymore, because you already knew how to do it. =] Let's have a look. Again, my reply is in Blue. . *And what I've attempted to do so far.

Re: programming

2010-09-20 Thread Xavier Ho
Thanks Jordan. My reply will be in Blue. I apologise if this ever gets hard to read, but it's beginning to. On 20 September 2010 16:51, Jordan Blanton wrote: > "And so he started on a module that estimated the length of a sine wave. > Here is what he wrote: " > ok. what is a module? A Python

Re: programming

2010-09-20 Thread Xavier Ho
On 20 September 2010 16:38, Jordan Blanton wrote: > Honestly, if I knew what was being said, then yes. I posted the directions > to the project and what I've done so far but I have no idea if what I'm > doing is right at all. > > Jordan, correct me if I'm mistaken, but you didn't post the directi

Re: programming

2010-09-19 Thread Xavier Ho
On 20 September 2010 16:25, Jordan Blanton wrote: > its not specific terms that i dont understand. its general directions. but > when i dont understand one or two key points in a sentence, its hard to > understand what the directions are telling me to do. Is it possible for you to share the sen

Re: programming

2010-09-19 Thread Xavier Ho
On 20 September 2010 15:46, Jordan Blanton wrote: > I am in a computer science class in which I am supposed to be creating a > program involving a sine wave and some other functions. I understand the > concept of the problem, but I don't understand any of the "lingo" being > used. The directions

Re: programming

2010-09-19 Thread geremy condra
On Sun, Sep 19, 2010 at 10:46 PM, Jordan Blanton wrote: > I am in a computer science class in which I am supposed to be creating a > program involving a sine wave and some other functions. I understand the > concept of the problem, but I don't understand any of the "lingo" being > used. The direct

Re: Programming Puzzles? What's your favorite puzzle?

2010-08-12 Thread Ian Kelly
On Thu, Aug 12, 2010 at 5:41 AM, Matty Sarro wrote: > Hey All! > Hope your thursday is treating you well. I'm looking for suggestions on > books of programming/engineering puzzles that range from beginners to > advanced and even expert level problems. I know they exist; we had them back > in colle

Re: Programming Puzzles? What's your favorite puzzle?

2010-08-12 Thread Neil Cerutti
On 2010-08-12, Dave Angel wrote: > For puzzles: > > http://projecteuler.net ...if you like math problems. > http://www.pythonchallenge.com ...if you like fooling around with PIL, graphics and bytes. -- Neil Cerutti -- http://mail.python.org/mailman/listinfo/python-list

Re: Programming Puzzles? What's your favorite puzzle?

2010-08-12 Thread Dave Angel
Matty Sarro wrote: Hey All! Hope your thursday is treating you well. I'm looking for suggestions on books of programming/engineering puzzles that range from beginners to advanced and even expert level problems. I know they exist; we had them back in college for practicing before the ACM programmi

Re: Programming intro book ch1 and ch2 (Windows/Python 3) - Request For Comments

2009-12-20 Thread Alf P. Steinbach
Hi, 10 details I forgot in my first response... * John Posner: [...] Chapter 2, which current runs 98 pages! The chapter 2 PDF I posted on http://tinyurl.com/programmingbookP3> was and is (it's not been updated) 101 pages, with an "-EOT-" at page 102. I suspect you may have read the previ

Re: Programming intro book ch1 and ch2 (Windows/Python 3) - Request For Comments

2009-12-20 Thread Steven D'Aprano
On Sun, 20 Dec 2009 08:29:43 +0100, Alf P. Steinbach wrote: > I recently (just weeks > ago) was astounded to see that a C++ "expert" thought that Java had pass > by reference, apparently because in Java only references are passed > around. The Java community, for some bizarre reason, has a tenden

Re: Programming intro book ch1 and ch2 (Windows/Python 3) - Request For Comments

2009-12-19 Thread Alf P. Steinbach
* John Posner: On Fri, 18 Dec 2009 13:00:48 -0500, Alf P. Steinbach wrote: Chapter 2 is about Basic Concepts (of programming). It's the usual: variables, ... 1. Overall suggestion You have a tendency to include non-pertinent asides [1]. But then, rambling a bit endows a manuscript with

Re: Programming intro book ch1 and ch2 (Windows/Python 3) - Request For Comments

2009-12-19 Thread John Posner
On Fri, 18 Dec 2009 13:00:48 -0500, Alf P. Steinbach wrote: Chapter 2 is about Basic Concepts (of programming). It's the usual: variables, ... 1. Overall suggestion You have a tendency to include non-pertinent asides [1]. But then, rambling a bit endows a manuscript with the author's

Re: Programming intro book ch1 and ch2 (Windows/Python 3) - Request For Comments

2009-12-18 Thread Alf P. Steinbach
* Steven D'Aprano: On Sat, 19 Dec 2009 04:29:22 +0100, Alf P. Steinbach wrote: * Steven D'Aprano: On Sat, 19 Dec 2009 01:25:48 +0100, Alf P. Steinbach wrote: That said, and a bit off-tangent to your comment's main thrust, the time spent on coding that repeated-division-by-2 optimization woul

Re: Programming intro book ch1 and ch2 (Windows/Python 3) - Request For Comments

2009-12-18 Thread Alf P. Steinbach
* Steven D'Aprano: On Sat, 19 Dec 2009 04:04:51 +0100, Alf P. Steinbach wrote: * Steven D'Aprano: On Fri, 18 Dec 2009 19:00:48 +0100, Alf P. Steinbach wrote: In fact almost no Python code does, but then it seems that people are not aware of how many of their names are constants and think tha

Re: Programming intro book ch1 and ch2 (Windows/Python 3) - Request For Comments

2009-12-18 Thread Steven D'Aprano
On Sat, 19 Dec 2009 04:29:22 +0100, Alf P. Steinbach wrote: > * Steven D'Aprano: >> On Sat, 19 Dec 2009 01:25:48 +0100, Alf P. Steinbach wrote: >> >>> That said, and a bit off-tangent to your comment's main thrust, the >>> time spent on coding that repeated-division-by-2 optimization would, I >>>

Re: Programming intro book ch1 and ch2 (Windows/Python 3) - RequestFor Comments

2009-12-18 Thread Lie Ryan
On 12/19/2009 12:56 PM, Steven D'Aprano wrote: As far as I know, no programming language provides a standard facility for renaming entities, be they data or routines: The C-preprocessor does to C/C++, in a limited fashion. -- http://mail.python.org/mailman/listinfo/python-list

Re: Programming intro book ch1 and ch2 (Windows/Python 3) - Request For Comments

2009-12-18 Thread Mensanator
On Dec 19, 12:21 am, "Alf P. Steinbach" wrote: > * Mensanator: > > > > >> That said, and a bit off-tangent to your comment's main thrust, the time > >> spent > >> on coding that repeated-division-by-2 optimization would, I think, be > >> better > >> spent googling "Collatz Conjecture"  --  avoid

Re: Programming intro book ch1 and ch2 (Windows/Python 3) - Request For Comments

2009-12-18 Thread Alf P. Steinbach
* Mensanator: That said, and a bit off-tangent to your comment's main thrust, the time spent on coding that repeated-division-by-2 optimization would, I think, be better spent googling "Collatz Conjecture" -- avoiding writing /any/ code. ;-) Ha! I know more about Collatz than you can ever fi

Re: Programming intro book ch1 and ch2 (Windows/Python 3) - Request For Comments

2009-12-18 Thread Mensanator
On Dec 18, 6:25 pm, "Alf P. Steinbach" wrote: > * Mensanator: > > >> The second deviation is that since most names are constants, > > > Really? Does that mean you don't use literals, to save the time > > required to convert them to integers? Isn't that done at compile > > time? > > > So, instead o

Re: Programming intro book ch1 and ch2 (Windows/Python 3) - Request For Comments

2009-12-18 Thread Steven D'Aprano
On Sat, 19 Dec 2009 04:04:51 +0100, Alf P. Steinbach wrote: > * Steven D'Aprano: >> On Fri, 18 Dec 2009 19:00:48 +0100, Alf P. Steinbach wrote: >> >>> In fact almost no Python >>> code does, but then it seems that people are not aware of how many of >>> their names are constants and think that th

Re: Programming intro book ch1 and ch2 (Windows/Python 3) - Request For Comments

2009-12-18 Thread Steven D'Aprano
On Fri, 18 Dec 2009 21:29:27 -0600, John Bokma wrote: > Steven D'Aprano writes: > >> CPython 2.5 and on has a keyhole optimizer that replaces many constant > ^^^ > Shouldn't that be peephole? Alternate names for the same thing. >> expressions with pre-computed va

Re: Programming intro book ch1 and ch2 (Windows/Python 3) - Request For Comments

2009-12-18 Thread Gregory Ewing
Mensanator wrote: Really? Does that mean you don't use literals, to save the time required to convert them to integers? I think all he means is that when he *does* use a named constant, he spells it in lower case rather than upper case, e.g. 'twopi' rather than 'TWOPI'. I don't think there's a

Re: Programming intro book ch1 and ch2 (Windows/Python 3) - Request For Comments

2009-12-18 Thread Steven D'Aprano
On Fri, 18 Dec 2009 15:26:05 -0800, Mensanator wrote: >> The second deviation is that since most names are constants, > > Really? Does that mean you don't use literals, to save the time required > to convert them to integers? Isn't that done at compile time? > > So, instead of doing the Collatz

Re: Programming intro book ch1 and ch2 (Windows/Python 3) - Request For Comments

2009-12-18 Thread Alf P. Steinbach
* Steven D'Aprano: On Sat, 19 Dec 2009 01:25:48 +0100, Alf P. Steinbach wrote: That said, and a bit off-tangent to your comment's main thrust, the time spent on coding that repeated-division-by-2 optimization would, I think, be better spent googling "Collatz Conjecture" -- avoiding writing /a

Re: Programming intro book ch1 and ch2 (Windows/Python 3) - Request For Comments

2009-12-18 Thread John Bokma
Steven D'Aprano writes: > CPython 2.5 and on has a keyhole optimizer that replaces many constant ^^^ Shouldn't that be peephole? > expressions with pre-computed values. And that's called constant folding. Unless I misread your post (or have been out of touch wit

Re: Programming intro book ch1 and ch2 (Windows/Python 3) - Request For Comments

2009-12-18 Thread Alf P. Steinbach
* Steven D'Aprano: On Fri, 18 Dec 2009 19:00:48 +0100, Alf P. Steinbach wrote: In fact almost no Python code does, but then it seems that people are not aware of how many of their names are constants and think that they're uppercasing constants when in fact they're not. E.g. routine arguments

Re: Programming intro book ch1 and ch2 (Windows/Python 3) - Request For Comments

2009-12-18 Thread Steven D'Aprano
On Sat, 19 Dec 2009 01:25:48 +0100, Alf P. Steinbach wrote: > That said, and a bit off-tangent to your comment's main thrust, the time > spent on coding that repeated-division-by-2 optimization would, I think, > be better spent googling "Collatz Conjecture" -- avoiding writing > /any/ code. ;-)

Re: Programming intro book ch1 and ch2 (Windows/Python 3) - Request For Comments

2009-12-18 Thread Steven D'Aprano
On Fri, 18 Dec 2009 19:00:48 +0100, Alf P. Steinbach wrote: > In fact almost no Python > code does, but then it seems that people are not aware of how many of > their names are constants and think that they're uppercasing constants > when in fact they're not. E.g. routine arguments Routine argum

Re: Programming intro book ch1 and ch2 (Windows/Python 3) - Request For Comments

2009-12-18 Thread Alf P. Steinbach
* Mensanator: The second deviation is that since most names are constants, Really? Does that mean you don't use literals, to save the time required to convert them to integers? Isn't that done at compile time? So, instead of doing the Collatz Conjecture as while a>1: f = gmpy.scan1(a,0) i

Re: Programming intro book ch1 and ch2 (Windows/Python 3) - Request For Comments

2009-12-18 Thread Mensanator
> The second deviation is that since most names are constants, Really? Does that mean you don't use literals, to save the time required to convert them to integers? Isn't that done at compile time? So, instead of doing the Collatz Conjecture as while a>1: f = gmpy.scan1(a,0) if f>0: a =

Re: Programming ideas?

2009-09-20 Thread Alan G Isaac
You could learn a lot of Python contributing to docutils or bibstuff, and if you write papers or presentations, it may pay off directly. Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: Programming ideas?

2009-09-14 Thread r
On Sep 12, 9:25 am, "Mark Tolonen" wrote: > "Someone Something" wrote in message > > news:[email protected]... > > >I know you've probably had this question a million and one times but here > >it > > is again. I'm intermediate at C, pretty good at Java (t

Re: Programming ideas?

2009-09-14 Thread Vimal
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 09/12/2009 07:43 PM, Someone Something wrote: > I know you've probably had this question a million and one times but here it > is again. I'm intermediate at C, pretty good at Java (though I really don't > want to program in this), okay at perl and I

Re: Programming ideas?

2009-09-12 Thread Daniel Fetchinson
> I know you've probably had this question a million and one times but here it > is again. I'm intermediate at C, pretty good at Java (though I really don't > want to program in this), okay at perl and I've just learned python. But, I > have no more ideas to write programs/scripts for! Any ideas wi

Re: Programming ideas?

2009-09-12 Thread Dave Angel
Someone Something wrote: I know you've probably had this question a million and one times but here it is again. I'm intermediate at C, pretty good at Java (though I really don't want to program in this), okay at perl and I've just learned python. But, I have no more ideas to write programs/script

Re: Programming ideas?

2009-09-12 Thread exarkun
On 02:30 pm, [email protected] wrote: Thanks a lot! Also, can someone suggest some ideas for a medium sized or small sized project? Here are some things you could do to contribute to an existing project: http://bit.ly/easy-twisted-tickets Jean-Paul -- http://mail.python.org/mailman/listi

Re: Programming ideas?

2009-09-12 Thread Someone Something
Thanks a lot! Also, can someone suggest some ideas for a medium sized or small sized project? On Sat, Sep 12, 2009 at 10:25 AM, Mark Tolonen > wrote: > > "Someone Something" wrote in message > news:[email protected]... > > I know you've probably had t

Re: Programming ideas?

2009-09-12 Thread Mark Tolonen
"Someone Something" wrote in message news:[email protected]... I know you've probably had this question a million and one times but here it is again. I'm intermediate at C, pretty good at Java (though I really don't want to program in this), okay at p

Re: Programming by Contract

2009-08-14 Thread Ethan Furman
Charles Yeomans wrote: On Aug 14, 2009, at 12:09 AM, Scott David Daniels wrote: Charles Yeomans wrote: On Aug 11, 2009, at 3:30 PM, Ethan Furman wrote: Ethan Furman wrote: Greetings! I have seen posts about the assert statement and PbC (or maybe it was DbC), and I just took a very b

Re: Programming by Contract

2009-08-14 Thread Charles Yeomans
On Aug 14, 2009, at 12:09 AM, Scott David Daniels wrote: Charles Yeomans wrote: On Aug 11, 2009, at 3:30 PM, Ethan Furman wrote: Ethan Furman wrote: Greetings! I have seen posts about the assert statement and PbC (or maybe it was DbC), and I just took a very brief look at pycontract (http:

Re: Programming by Contract

2009-08-13 Thread Scott David Daniels
Charles Yeomans wrote: On Aug 11, 2009, at 3:30 PM, Ethan Furman wrote: Ethan Furman wrote: Greetings! I have seen posts about the assert statement and PbC (or maybe it was DbC), and I just took a very brief look at pycontract (http://www.wayforward.net/pycontract/) and now I have at least

Re: Programming by Contract

2009-08-12 Thread shaileshkumar
zope.interface provides extensive support for design by contract. http://pypi.python.org/pypi/zope.interface. This package can be used independently of zope in other projects. - Shailesh On Aug 12, 2:20 am, Ethan Furman wrote: > Charles Yeomans wrote: > > > On Aug 11, 2009, at 3:30 PM, Ethan Furm

Re: Programming by Contract

2009-08-11 Thread Ethan Furman
Charles Yeomans wrote: On Aug 11, 2009, at 3:30 PM, Ethan Furman wrote: Ethan Furman wrote: Greetings! I have seen posts about the assert statement and PbC (or maybe it was DbC), and I just took a very brief look at pycontract (http://www.wayforward.net/pycontract/ ) and now I have at lea

Re: Programming by Contract

2009-08-11 Thread Charles Yeomans
On Aug 11, 2009, at 3:30 PM, Ethan Furman wrote: Ethan Furman wrote: Greetings! I have seen posts about the assert statement and PbC (or maybe it was DbC), and I just took a very brief look at pycontract (http://www.wayforward.net/pycontract/ ) and now I have at least one question: Is this

Re: Programming by Contract

2009-08-11 Thread Ethan Furman
Ethan Furman wrote: Greetings! I have seen posts about the assert statement and PbC (or maybe it was DbC), and I just took a very brief look at pycontract (http://www.wayforward.net/pycontract/) and now I have at least one question: Is this basically another way of thinking about unit testin

Re: Programming language comparison examples?

2009-06-15 Thread Juergen Hermann
pobox.com> writes: > but that's not what I was thinking of. I thought there was a site with a > bunch of smaller examples. http://langref.org/ is another one. -- http://mail.python.org/mailman/listinfo/python-list

Re: Programming language comparison examples?

2009-06-11 Thread Ben Rousch
pobox.com> writes: > > I thought there was a website which demonstrated how to program a bunch of > small problems in a number of different languages. I know about the > Programming Language Shootout: > > http://shootout.alioth.debian.org/ > > but that's not what I was thinking of. I tho

Re: Programming language comparison examples?

2009-06-06 Thread Simon Brunning
2009/6/5 : > someone: >> I thought there was a website which demonstrated how to program a bunch of >> small problems in a number of different languages. > > http://www.rosettacode.org/wiki/Main_Page > http://en.literateprograms.org/LiteratePrograms:Welcome > http://www.codecodex.com/wiki/index.ph

Re: Programming language comparison examples?

2009-06-05 Thread John Machin
On Jun 6, 5:45 am, Chris Rebert wrote: > PLEAC (Programming Language Examples Alike Cookbook) is one > option:http://pleac.sourceforge.net/ """The latest version of Python is 2.4""" Appears to be a translation of parts of the Perl Cookbook: """Examples which translate the original Perl closely

Re: Programming language comparison examples?

2009-06-05 Thread skip
>> http://www.rosettacode.org/wiki/Main_Page >> http://en.literateprograms.org/LiteratePrograms:Welcome >> http://www.codecodex.com/wiki/index.php?title=Main_Page >> http://merd.sourceforge.net/pixel/language-study/scripting-language/ >> http://pleac.sourceforge.net/ >> htt

Re: Programming language comparison examples?

2009-06-05 Thread bearophileHUGS
someone: > I thought there was a website which demonstrated how to program a bunch of > small problems in a number of different languages. http://www.rosettacode.org/wiki/Main_Page http://en.literateprograms.org/LiteratePrograms:Welcome http://www.codecodex.com/wiki/index.php?title=Main_Page http:

Re: Programming language comparison examples?

2009-06-05 Thread Chris Rebert
On Fri, Jun 5, 2009 at 12:20 PM, wrote: > I thought there was a website which demonstrated how to program a bunch of > small problems in a number of different languages.  I know about the > Programming Language Shootout: > >    http://shootout.alioth.debian.org/ > > but that's not what I was think

Re: Programming Praxis

2009-05-29 Thread namekuseijin
Phil Bewig escreveu: Please visit my blog, Programming Praxis, which presents a collection of programming etudes. Newbies will find exercises that extend their programming abilities. Savvy programmers can use the exercises to sharpen their skills or learn a new language. Brave programmers can

Re: Programming in Python with a view to extending in C at a later date.

2009-04-22 Thread Stefan Behnel
Hi, [email protected] wrote: > Say you set out to program in Python knowing that you will be > converting parts of it into C ( or maybe C++) at a later date, but you > do not know which parts. > > Can you give any general Python structure / syntax advice that if > implemented from the s

Re: Programming in Python with a view to extending in C at a later date.

2009-04-21 Thread bobicanprogram
On Apr 20, 2:57 pm, "[email protected]" wrote: > Hi, > > Say you set out to program in Python knowing that you will be > converting parts of it into C ( or maybe C++) at a later date, but you > do not know which parts. > > Can you give any general Python structure / syntax advice that if

Re: Programming in Python with a view to extending in C at a later date.

2009-04-21 Thread Carl Banks
On Apr 20, 11:57 am, "[email protected]" wrote: > Say you set out to program in Python knowing that you will be > converting parts of it into C ( or maybe C++) at a later date, but you > do not know which parts. > > Can you give any general Python structure / syntax advice that if > impl

Re: Programming in Python with a view to extending in C at a later date.

2009-04-20 Thread Terry Reedy
[email protected] wrote: Hi, Say you set out to program in Python knowing that you will be converting parts of it into C ( or maybe C++) at a later date, but you do not know which parts. I presume because you intend to wait for profile results. Good. Of course, you might even find y

Re: Programming in Python with a view to extending in C at a later date.

2009-04-20 Thread Lawson English
Lawson English wrote: Daniel Stutzbach wrote: On Mon, Apr 20, 2009 at 1:57 PM, [email protected] > wrote: Say you set out to program in Python knowing that you will be converting parts of it into C ( or

Re: Programming in Python with a view to extending in C at a later date.

2009-04-20 Thread Lawson English
Daniel Stutzbach wrote: On Mon, Apr 20, 2009 at 1:57 PM, [email protected] > wrote: Say you set out to program in Python knowing that you will be converting parts of it into C ( or maybe C++) at a later d

Re: Programming in Python with a view to extending in C at a later date.

2009-04-20 Thread Scott David Daniels
[email protected] wrote: Say you set out to program in Python knowing that you will be converting parts of it into C ( or maybe C++) at a later date, but you do not know which parts. Can you give any general Python structure / syntax advice that if implemented from the start, will make

  1   2   3   4   >