Prev: grailbrowser now running under python 2.5 (probably above too)
Next: Naming Conventions, Where's the Convention Waldo?
From: rantingrick on 11 Jul 2010 04:26 On Jul 11, 2:39 am, Paul Rubin <no.em...(a)nospam.invalid> wrote: > rantingrick <rantingr...(a)gmail.com> writes: > > unspeakably ugly code. > > I'd write the code differently to not do all those branches. > I like to use 1-elemnt lists as an option type, instead of using None, > so you can just concatenate them together to get the first non-empty > one. Untested code: <snip code> Hmm, thanks for offering a solution but since functions call's induce so much overhead and you use the len function in each condition i believe the code would run much slower. How much slower, i don't know? Maybe i'll run the test later. I need to come up with some good test cases. Of course i'll want to maximize my side of the argument by producing the most efficient code that really makes your look slow. ;-)
From: Michael Torrie on 11 Jul 2010 12:03 On 07/11/2010 12:50 AM, rantingrick wrote: > Ah yes, when nothing else seems to work fall back to you default > programming... FUD and ad hominem attacks Please stop calling things what they are not. Stephen's post was not an ad hominem attack, nor was it FUD. Someone who is countering your premise and position (IE disagrees with you) is not automatically attacking your character or some characteristic of your person. http://en.wikipedia.org/wiki/Ad_hominem#Common_misconceptions_about_ad_hominem Kudos to Stephen for replying in such a reasonable and even logical fashion to your post. Would that you would reply to his posts in a similar fashion, rather than leveling silly false accusations of "FUD and ad hominem attacks."
From: Mark Dickinson on 11 Jul 2010 14:19 On Jul 11, 6:38 am, rantingrick <rantingr...(a)gmail.com> wrote: > Seems kinda dumb to build a tuple just so a conditional wont blow > chunks! This integer bool-ing need to be fixed right away! Okay. What fix do you propose? Would your fix maintain the identity "0 == False"? For bonus points, explain how you'd deal with any backwards compatibility problems that your fix introduces. Have you considered forking Python? That may be the way forward here. -- Mark
From: rantingrick on 11 Jul 2010 19:22 On Jul 11, 1:19 pm, Mark Dickinson <dicki...(a)gmail.com> wrote: > Okay. What fix do you propose? Would your fix maintain the identity > "0 == False"? No because all integers should bool True. An integer is a value that IS NOT empty and IS NOT None. Therefore the only logical way to handle integer bool-ing is to say they are all True. > For bonus points, explain how you'd deal with any > backwards compatibility problems that your fix introduces. We would't deal with backwards compatibility as this notion of bool(1) == True and bool(0) == False if backwards way of thinking. Sure it saves a few keystrokes but in the end only serves to obfuscate the code and promote bad programming styles. WE SHOULD NEVER BE USING 1 IN PLACE OF True AND 0 IN PLACE OF False! > Have you considered forking Python? That may be the way forward here. I have considered this many times in the past and continue to consider it even today. I believe the Python language to be the best high level language ever created up to this point. I also believe GvR to be a true genius who has forged the path of all 21st century high level languages. However, like all new inventions eventually the bright shiny paint job starts to oxidize and expose the rotten and rusting core that has been slowly disintegrating behind the scenes all along. GvR stood on the shoulders of giants to reach the plateau of elegant bliss that we know today as Python programming. As we all know perfection will never be achieved, only lusted after forever and ever. A perpetual game of cat and mouse. So maybe it is now time for the next genius (Rick?) to stand on Guido's shoulders and reach the next "cookie-jar-of-programming-enlightenment" one shelf higher than Guido's cookies where found. Maybe it was fate that CPython 3000 would disturb so many folks as to create a question in their minds... A splinter lodged deep within the mind constantly tickling new never before thoughts to form... "Is Python all it can be?". A lustful yearning to fix the warts that have been ignored for far too long and were scarified at the alter of the simplistic development cycle. But i think we are now at a crossroads people. We must forge the new path and resist the temptation to circle around the familiar roads endlessly. Heck *maybe* Guido himself is the architect of this change? Maybe he *purposely* sowed discontent in an effort to ignite (or reignite?) a passion for change within this community...? The black monolith is before us. We have reached a crossroads. In the balance hangs the future of high level programming languages. Will we understand what the portal is and take the leap of faith forward, or just bang some bones around like toddlers for another 10,000 years? Only time will tell...? Only time will tell...?
From: geremy condra on 11 Jul 2010 20:00
On Sun, Jul 11, 2010 at 7:22 PM, rantingrick <rantingrick(a)gmail.com> wrote: > On Jul 11, 1:19 pm, Mark Dickinson <dicki...(a)gmail.com> wrote: > >> Okay. What fix do you propose? Would your fix maintain the identity >> "0 == False"? > > No because all integers should bool True. An integer is a value that > IS NOT empty and IS NOT None. Therefore the only logical way to handle > integer bool-ing is to say they are all True. > >> For bonus points, explain how you'd deal with any >> backwards compatibility problems that your fix introduces. > > We would't deal with backwards compatibility as this notion of bool(1) > == True and bool(0) == False if backwards way of thinking. Sure it > saves a few keystrokes but in the end only serves to obfuscate the > code and promote bad programming styles. WE SHOULD NEVER BE USING 1 IN > PLACE OF True AND 0 IN PLACE OF False! > >> Have you considered forking Python? That may be the way forward here. > > I have considered this many times in the past and continue to > consider it even today. I believe the Python language to be the best > high level language ever created up to this point. I also believe GvR > to be a true genius who has forged the path of all 21st century high > level languages. However, like all new inventions eventually the > bright shiny paint job starts to oxidize and expose the rotten and > rusting core that has been slowly disintegrating behind the scenes all > along. > > GvR stood on the shoulders of giants to reach the plateau of elegant > bliss that we know today as Python programming. As we all know > perfection will never be achieved, only lusted after forever and ever. > A perpetual game of cat and mouse. So maybe it is now time for the > next genius (Rick?) to stand on Guido's shoulders and reach the next > "cookie-jar-of-programming-enlightenment" one shelf higher than > Guido's cookies where found. > > Maybe it was fate that CPython 3000 would disturb so many folks as to > create a question in their minds... A splinter lodged deep within the > mind constantly tickling new never before thoughts to form... "Is > Python all it can be?". A lustful yearning to fix the warts that have > been ignored for far too long and were scarified at the alter of the > simplistic development cycle. > > But i think we are now at a crossroads people. We must forge the new > path and resist the temptation to circle around the familiar roads > endlessly. Heck *maybe* Guido himself is the architect of this change? > Maybe he *purposely* sowed discontent in an effort to ignite (or > reignite?) a passion for change within this community...? > > The black monolith is before us. We have reached a crossroads. In the > balance hangs the future of high level programming languages. Will we > understand what the portal is and take the leap of faith forward, or > just bang some bones around like toddlers for another 10,000 years? > Only time will tell...? Only time will tell...? I literally laughed out loud as I read this. Go write some code, might help connect you back to reality. Geremy Condra |