Re: Problem receiving UDP broadcast packets.

2011-04-20 Thread Sherm Pendley
Grant Edwards  writes:

> I'm trying to implement a device discovery/configuration protocol that
> uses UDP broadcast packets to discover specific types of devices on
> the local Ethernet segment.  The management program broadcasts a
> discovery command to a particular UDP port.  All devices who get that
> packet are expected to answer regardless of thier current IP address.

Have you looked at the source for Apple's Bonjour?

  <http://developer.apple.com/opensource/>
  <http://opensource.apple.com/source/mDNSResponder/mDNSResponder-258.18/>

Might be interesting to see how it does announcement/discovery. Or maybe
just use it directly, if this happens to be a case of "gee, I didn't
know that wheel had already been invented." :-)

sherm--

-- 
Sherm Pendley
   <http://camelbones.sourceforge.net>
Cocoa Developer
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: value of pi and 22/7

2011-03-18 Thread Sherm Pendley
Stefan Behnel  writes:

> Neil Cerutti, 18.03.2011 13:17:
>> On 2011-03-18, peter  wrote:
>>> The Old Testament (1 Kings 7,23) says ... "And he made a molten
>>> sea, ten cubits from the one brim to the other: it was round
>>> all about, and his height was five cubits: and a line of thirty
>>> cubits did compass it round about. ".  So pi=3.  End Of.
>>
>> RIIght.  What's a cubit?
>
> http://en.wikipedia.org/wiki/Cubit
>
> I think that particular author of that particular part of the bible
> just used it to make the text appear older than it was at the time.

Sigh. Doesn't *anyone* know Cosby any more? Kids today, no appreciation
for the classics. :-(

sherm--

-- 
Sherm Pendley
   <http://camelbones.sourceforge.net>
Cocoa Developer
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python 32-bit on Windows 64-bit

2011-02-11 Thread Sherm Pendley
"Martin v. Loewis"  writes:

> Am 11.02.2011 19:41, schrieb Craig Yoshida:
>> what kind of memory limitations to processes running on 32-bit python
>> (with 32-bit C extensions like scipy) have on 64-bit Windows?   I'm
>> having occasional MemoryErrors when running a python program on
>> 64-bit Windows 7 that runs fine on my OS X machine.  Both machines
>> are using a 64-bit OS and have 4GB of RAM.
>
> In addition to the limitations Michel reports: on a 32-bit system,
> objects are typically limited to using at most 2GiB, per object
> (of course, you could have at most two objects that come close to
> this size, since the whole address space would not be larger than
> 4GiB).

IIRC, 32-bit Windows programs are limited to 2GiB, reserving the rest
of the virtual address space for Windows' own use.

Also, 32-bit apps remain 32-bit, even if they're running on a 64-bit
capable OS. Assuming you're running Snow Leopard on your Mac, you're
using a 64-bit Python interpreter *and* a 64-bit OS. You need to have
both to take advantage of a 64-bit memory space.

sherm--

-- 
Sherm Pendley
   <http://camelbones.sourceforge.net>
Cocoa Developer
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: __pycache__, one more good reason to stck with Python 2?

2011-01-19 Thread Sherm Pendley
H₂0.py  writes:

> On Jan 18, 4:04 am, Peter Otten <__pete...@web.de> wrote:
>>
>> What's the advantage of 'find ... | xargs ...' over 'find ... -exec ...'?
>
> Portability. Running the '-exec' version will work fine in a directory
> with a relatively small number of files, but will fail on a large one.

How? -exec passes each file name to a separate invocation of the given
command - it doesn't build one large command line with multiple args.

sherm--

-- 
Sherm Pendley
   <http://camelbones.sourceforge.net>
Cocoa Developer
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: __pycache__, one more good reason to stck with Python 2?

2011-01-18 Thread Sherm Pendley
Peter Otten <__pete...@web.de> writes:

> Carl Banks wrote:
>
>> Well the former deletes all the pyc files in the directory tree
>> whereas the latter only deletes the top level __pycache__, not the
>> __pycache__ for subpackages.  To delete all the __pycache__s you'd
>> have to do something like this:
>> 
>> file . -name __pycache__ -prune -exec rm -rf {} \;
>> 
>> or, better,
>> 
>> file . -name __pycache__ -prune | xargs rm -rf
>> 
>> Still not anything really difficult.  (I don't think a lot of people
>> know about -prune; it tells find don't recursively descend.)
>
> What's the advantage of 'find ... | xargs ...' over 'find ... -exec ...'?

Exec launches a new instance of 'rm' for each found file, while xargs
launches a single instance, and passes the list of found files as arg-
uments.

Probably not a big deal in this case, but if you're passing a long list
of files to a script that has a long startup time, it can make a big
difference.

sherm--

-- 
Sherm Pendley
   <http://camelbones.sourceforge.net>
Cocoa Developer
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: [OT] Python like lanugages

2011-01-17 Thread Sherm Pendley
Tim Harig  writes:

> Functional programming has been around a long time; but, it only regained
> conciousness outside of academia because of its hyped abilities to
> make threading easier.

I believe the widespread use of some functional techniques in JavaScript
had a lot to do with that as well.

sherm--

-- 
Sherm Pendley
   <http://camelbones.sourceforge.net>
Cocoa Developer
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: do you know what's CGI? (web history personal story)

2011-01-15 Thread Sherm Pendley
"Captain Obvious"  writes:

> XL> ... i recall, i stopped doing Mathematica in 1998 because it's a
> XL> career dead-end as a programing lang, and dived into the utterly
> XL> idiotic Perl & unix & mysql world. (See: The Unix Pestilence ◇ Xah
> XL> Lee's Computing Experience (Impression Of Lisp from Mathematica).)
>
> I guess you're calling "idiotic" everything you're too lazy to understand.

That's Xah for you.

> XL> today were under 10 in the 1990s. They wouldn't know what was CGI, and
> XL> no amount of explanation can tell them exactly it was like, because it
> XL> has become HISTORY — if you didn't live it, you can't feel it.
>
> CGI is still used in some places today, hello?

Yeah, James Cameron made a *ton* of money using it to make Avatar.

What? Why is everyone looking at me that way? ;-)

sherm--

-- 
Sherm Pendley
   <http://camelbones.sourceforge.net>
Cocoa Developer
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Trying to parse a HUGE(1gb) xml file

2010-12-28 Thread Sherm Pendley
"BartC"  writes:

>> Roy Smith, 28.12.2010 00:21:
>>> To go back to my earlier example of
>>>
>>>  FALSE
>>>
>
> Isn't it possible for XML to define a shorter alias for these tags? Isn't
> there a shortcut available for  in simple examples like
> this (I seem to remember something like this)?

Yes, you can define your own entities in a DTD:

  FALSE">
  TRUE">

Later, in your document:

  &paf;
  &pat;

Although, this is a bit of a contrived example - if space is such a
major concern, one wouldn't be so wasteful of it to begin with, but
might instead use a short tag form whose value attribute defaults to
"FALSE".

  
  

Later, in your document:

  
  

To save even more space, one could instead define a "pa" attribute as
part of the "movie" element, with a default value that would then take
no space at all:

  

Later, in your document:

  
  

When you see someone doing stupid things with a tool, it's usually not
the tool's fault. Far more often, it's someone using the wrong tool for
the task at hand, or using the right tool the wrong way.

> And why not use 1 and 0 for TRUE and FALSE?

Sounds reasonable in general, although a parental advisory would more
often be a range of possible values (G, PG, R, MA, etc.) rather than a
boolean.

sherm--

-- 
Sherm Pendley
   <http://camelbones.sourceforge.net>
Cocoa Developer
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: toy list processing problem: collect similar terms

2010-09-26 Thread Sherm Pendley
Jürgen Exner  writes:

> livibetter  wrote:
>>Here is mine for Python:
>
> What the f*** does Python have to do with Perl?

Xah is a cross-posting troll. Please don't feed the troll.

sherm--

-- 
Sherm Pendley
   <http://camelbones.sourceforge.net>
Cocoa Developer
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: toy list processing problem: collect similar terms

2010-09-26 Thread Sherm Pendley
Jürgen Exner  writes:

> Alexander Burger  wrote:
>>In PicoLisp:
>
> What the f does PicoLisp have to with Perl?

It's Xah. He cross-posts in an attempt to start a language feud.

Please don't feed the troll.

sherm--

-- 
Sherm Pendley
   <http://camelbones.sourceforge.net>
Cocoa Developer
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: SQLObject 0.9.1

2007-07-26 Thread Sherm Pendley
Steve Holden <[EMAIL PROTECTED]> writes:

> Sherm Pendley wrote:
>> Steve Holden <[EMAIL PROTECTED]> writes:
>>
>>> Sherm Pendley wrote:
>>>> Gerardo Herzig <[EMAIL PROTECTED]> writes:
>>>>
>>>>> So..at 11:23 we got version 0.7.8...at 11:30 was version 0.8.5...now
>>>>> there is  a 0.9.1 version?? Have a coffe dude
>>>> Sounds more to me like he needs to lay off the coffee, or at least switch
>>>> to decaffeinated for a while. :-)
>>>>
>>> Come on, give Oleg a break. He's maintaining three separate versions
>>> in parallel.
>>
>> What part of ":-)" did you not understand?
>>
> The part that completely bypassed my sense of humor, I guess. Feel
> free to ignore me until further notice :-)

If I'm ignoring you, how will I get the notice? :-)

I'll stop now... this is getting too silly for even me...

sherm--

-- 
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: SQLObject 0.9.1

2007-07-26 Thread Sherm Pendley
Steve Holden <[EMAIL PROTECTED]> writes:

> Sherm Pendley wrote:
>> Gerardo Herzig <[EMAIL PROTECTED]> writes:
>>
>>> So..at 11:23 we got version 0.7.8...at 11:30 was version 0.8.5...now
>>> there is  a 0.9.1 version?? Have a coffe dude
>>
>> Sounds more to me like he needs to lay off the coffee, or at least switch
>> to decaffeinated for a while. :-)
>>
> Come on, give Oleg a break. He's maintaining three separate versions
> in parallel.

What part of ":-)" did you not understand?

sherm--

-- 
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: SQLObject 0.9.1

2007-07-26 Thread Sherm Pendley
Gerardo Herzig <[EMAIL PROTECTED]> writes:

> So..at 11:23 we got version 0.7.8...at 11:30 was version 0.8.5...now
> there is  a 0.9.1 version?? Have a coffe dude

Sounds more to me like he needs to lay off the coffee, or at least switch
to decaffeinated for a while. :-)

sherm--

-- 
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: I am giving up perl because of assholes on clpm -- switching to Python

2007-07-26 Thread Sherm Pendley
Steve Holden <[EMAIL PROTECTED]> writes:

> On c.l.py there are standards of behavior, and we encourage people to
> observe them (while attempting to engage politely with those who
> don't).

We also do that on c.l.perl.misc.

The problems tend to arise when people get defensive and argumentative in
reaction to the polite reminder. For example, "Please don't top-post here.
Have you read the posting guidelines?" is as polite as it gets - but I've
lost track of the number of children who respond with variants of "Don't
tell me how to post! What's with the jerks in this group anyway?"

Just like in any other group, you reap what you sow in c.l.perl.misc.

> I suppose, in fairness, I should admit that the tone of your
> post is actually far more polite than that of the one you were
> responding to. I shudder to think what Martha underwent to make her
> vent like that ...

As far as I can find, it's "her" first post to the group. That, and the
fact that it was cross-posted, leads me to think it's just trolling.

sherm--

-- 
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: I am giving up perl because of assholes on clpm -- switching to Python

2007-07-26 Thread Sherm Pendley
Ben Finney <[EMAIL PROTECTED]> writes:

> [EMAIL PROTECTED] writes:
>
>> Python is a better language, with php support, anyway, but I am fed
>> up with attitudes of comp.lang.perl.misc.
>
> Please, if you must fred the troll, drop comp.lang.python from the
> discussion (i.e. post trplies only to the newsgroup this message
> relates to).

Grow up. This troll doesn't relate to *either* group.

Redirecting responses towards a group you don't read is just as trollish
as the original. Ignoring it is best, but if you *must* feed it, respond
to all the listed groups. Encouraging the troll while at the same time
foisting it off upon someone else is just as rude as the original.

sherm--

-- 
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Build EXE on Mac OsX 10.4

2007-06-13 Thread Sherm Pendley
"Gabriel Genellina" <[EMAIL PROTECTED]> writes:

> En Wed, 13 Jun 2007 17:35:19 -0300, Paul McNett <[EMAIL PROTECTED]> escribió:
>
>> Tempo wrote:
>>> Has anyone sucesfully built a *.exe file on a mac operating system
>>> before from a *.py file? I have been trying to do this with
>>> pyinstaller, but I keep getting errors and I don't know how to
>>> install  [...]
>>
>> You need to build Mac Apps on Mac, Windows EXE's on Windows, and Linux
>> ELF's on Linux. You can't build a windows.exe from Mac, just as you
>> can't build a mac.app from Windows.
>
> That's not entirely true. gcc on linux can generate a Windows EXE, and
> using: python setup.py bdist_wininst, you can generate a complete
> binary  installer for Windows. I'm not sure if this can be done on a
> Mac too.

In principle, certainly - there's even a MacPort package for a complete
cygwin installation. I've built a number of packages with it - SDL and
several related libraries, for instance. There are also ELF cross-compiler
MacPort packages, presumably for building Linux binaries.

On the other hand, I *haven't* tried any of those compilers with setup.py,
and I have no idea if it can support those targets in practice. :-(

sherm--

-- 
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: test

2007-05-11 Thread Sherm Pendley
Joe Eagar <[EMAIL PROTECTED]> writes:

> sorry just a test.

Sorry, you failed. You missed alt.test by a mile.

sherm--

-- 
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: SEO - Search Engine Optimization - Seo Consulting

2007-04-29 Thread Sherm Pendley
"Juan T. Llibre" <[EMAIL PROTECTED]> writes:

> Top or bottom posting is a user choice.

Yes, one can choose to be polite and follow established usenet
conventions, or one can choose to be rude and self-centered.

Those who choose rudeness over courtesy can expect to be called down
for it - which is arguably rude in itself, but on usenet one reaps what
one sows. Someone who can't deal with that, shouldn't be on usenet.

sherm--

-- 
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: SEO - Search Engine Optimization - Seo Consulting

2007-04-29 Thread Sherm Pendley
"Alvin Bruney [MVP]"  writes:

>>Top posting
> Did not. I replied to the message at the bottom of the thread.

Congratulations, you've now made a fool of yourself in public.

Top posting has nothing to do with where your reply is placed with
respect to other messages. Top posting is when you add your text
above the quoted material in your reply - as you did once again in
what I'm replying to.

When you open a book, do you start at the bottom of the page and
read up? I didn't think so.

>>Call yourself an MVP, that's a joke Slick.
> Yup, I do call myself an MVP, it's not a joke either.

It is when you don't have a clue.

sherm--

-- 
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: bitwise shift?

2007-04-25 Thread Sherm Pendley
John Machin <[EMAIL PROTECTED]> writes:

> On 26/04/2007 7:10 AM, Sherm Pendley wrote:
>
>> Shift left is *not* the same as multiplying by k. It is the same as multi-
>> plying by 2^k. 
>
> Where I come from, ^ is the exclusive-or operator. Of course YMMV in WV :-)

Make that YMMV in VB. :-(

Funny thing is, I haven't written in VB since '95 or thereabouts. Let that be
a lesson for the youngsters - touch not the unclean beast called VB, lest its
vileness stain thy code for all time!

sherm--

-- 
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: bitwise shift?

2007-04-25 Thread Sherm Pendley
desktop <[EMAIL PROTECTED]> writes:

> for k in range(10, 25):
>   n = 1 << k;
>
> I have never read Python before but is it correct that 1 get
> multiplied with the numbers 10,11,12,12,...,25 assuming that 1 << k
> means "1 shift left by k" which is the same as multiplying with k.

Shift left is *not* the same as multiplying by k. It is the same as multi-
plying by 2^k. That is, 1<<10 = 1024, 1<<11 = 2048, 1<<12 = 4096, etc.

sherm--

-- 
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python Feature Request: Allow changing base of member indices to 1

2007-04-14 Thread Sherm Pendley
"Paddy" <[EMAIL PROTECTED]> writes:

> I don't think we should add it to Python
> because it would make porting VB code easier.

Great Cthulhu no!

I chimed in because your first comment regarding Perl implied that it's
commonplace for Perl programmers to fiddle with the index base. It can
be done, for historical reasons, but it's far from common.

I have to wonder, if the OP wants VB so badly, why is he using Python to
begin with?

sherm--

-- 
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python Feature Request: Allow changing base of member indices to 1

2007-04-14 Thread Sherm Pendley
"Paddy" <[EMAIL PROTECTED]> writes:

> Having more than one index start point would be a maintenance
> nightmare best avoided.

Quite right.

> (It can be done in Perl).

When was the last time you used Perl? It was allowed in Perl 4 and earlier,
because many Perl users were moving from Awk, which uses an array base of 1.
Even then, having multiple index start points within a single program wasn't
the idea; the idea was to allow programs originally written in Awk to be
ported to Perl with minimal updating.

It was deprecated as of 5.0 though - which was released in '94. It still
works, for the sake of backwards compatibility, but its use in new code is
highly discouraged.

sherm--

-- 
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Hide the python-script from user

2007-04-08 Thread Sherm Pendley
[EMAIL PROTECTED] (Jason F. McBrayer) writes:

> A determined and technically savvy user will surely find
> the key (not least by debugging the start-script).

... and then write a patch that disables the key, and distribute that to
a few million of his not so determined or savvy friends.

> Basically, this doesn't work for the same reason that DRM doesn't
> work.

That reason being, it only needs to be cracked once. The odds are heavily
stacked in the crackers' favor.

sherm--

-- 
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Why NOT only one class per file?

2007-04-05 Thread Sherm Pendley
Bruno Desthuilliers <[EMAIL PROTECTED]> writes:

> Sherm Pendley a écrit :
>> Bruno Desthuilliers <[EMAIL PROTECTED]> writes:
>>
>>
>>>Sherm Pendley a écrit :
>>>
>>>In my book, it's huge classes and methods that are usually a smell of
>>>a design problem.
>>
>>
>> Obviously we're reading different books.
>
> Obviously. But I didn't gain this knowledge from books.

Obviously, you have no sense of humor.

> FWIW, I'd be interested if you'd let us know about any book pretending
> that monster classes are good design !-)

You've already decided that "monster classes" are bad design, and that
anything conflicting with your belief is mere pretense. Why should I waste
my time debating when you've already made up your mind?

>> But that's OK - I'm not on a crusade to convince everyone to work my way.
>> If "one class per file" doesn't work well for you, don't write that way.
>> All I'm saying is, what works well for you isn't necessarily what works
>> well for everyone.
>
> It seems that it works well for almost anyone having some real-world
> experience with languages like Python.

I didn't say otherwise. You're arguing a false dichotomy; the fact that one
approach works well does not prove that others won't work equally well. I'm
not saying that your preferred style is wrong; I'm just saying that it's a
matter of preference, not a universal truth.

sherm--

-- 
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Why NOT only one class per file?

2007-04-05 Thread Sherm Pendley
"Nate Finch" <[EMAIL PROTECTED]> writes:

> As to the guy who writes 1000+ line classes  dude, refactor some.
> You're trying to make the class do too much, almost by definition.

You haven't even seen my code, you don't even know what language it's in,
but you're telling me it's wrong?

Wow - and I thought *I* was arrogant.

sherm--

-- 
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Why NOT only one class per file?

2007-04-05 Thread Sherm Pendley
Bruno Desthuilliers <[EMAIL PROTECTED]> writes:

> Sherm Pendley a écrit :
>
> In my book, it's huge classes and methods that are usually a smell of
> a design problem.

Obviously we're reading different books.

But that's OK - I'm not on a crusade to convince everyone to work my way.
If "one class per file" doesn't work well for you, don't write that way.
All I'm saying is, what works well for you isn't necessarily what works
well for everyone.

sherm--

-- 
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Why NOT only one class per file?

2007-04-05 Thread Sherm Pendley
Bruno Desthuilliers <[EMAIL PROTECTED]> writes:

> Sherm Pendley a écrit :
>
>> It's a stylistic thing, nothing more. 
>
> A bit more than just 'stylistic' IMHO. It's a matter of
> convenience. Having to manage hundreds of files each with a dozen
> lines of code is a PITA.

Yes, but the pain in that case comes from having hundreds of trivial
classes, not from the way in which the source for them is organized.

> Having to retype the same import statements
> in hundreds of files is a PITA - and a good way to waste time and
> forget something when one has to fix these import statements (yes,
> even with the appropriate tediting tools). I wouldn't call such
> considerations "nothing more than stylistic".

Neither would I. But then, I would describe the existence of all those
files as just the symptom - the real problem being the design that needs
all of those hundreds of trivial classes in the first place.

Granted, I know very little of Python. It may be the case that Python
encourages the use of hundreds of "little classes" - and if that is the
case, then I agree, storing each one in its own file would be rather
absurd.

I'm more accustomed to writing classes that tend to be larger - hundreds
if not thousands of lines each, or more - and in that case, storing them
one per file is a reasonable way to organize one's sources.

sherm--

-- 
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Why NOT only one class per file?

2007-04-05 Thread Sherm Pendley
Steven Howe <[EMAIL PROTECTED]> writes:

> On class per file was easier to do when Java was developed (remember
> it was develop to control vending machines

Not quite. Java grew out of a set-top box at Sun, code-named "Oak".

>; scary. Reminds me of the movie 'Tron'

Vending machines in "Tron" were pussycats compared to the one in "Maximum
Overdrive." :-)

sherm--

-- 
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Why NOT only one class per file?

2007-04-04 Thread Sherm Pendley
Bruno Desthuilliers <[EMAIL PROTECTED]> writes:

> Chris Lasher a écrit :
>
>> so I thought I'd ask here to
>> see why the Python idiom is the way it is: why should we NOT be
>> placing classes in their own separate files?
>
> Because it just sucks.

...

> Just ask him why Java insists on 'one-(public)-class-per-file', and
> why it's considered good form in C++. I mean, the real *technical*
> reasons...

Yeah, as if "because it just sucks" is a technical reason. :-)

It's a stylistic thing, nothing more. There's no technical basis for it,
just personal preference.

sherm--

-- 
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: ISO programming projects

2007-04-01 Thread Sherm Pendley
kj <[EMAIL PROTECTED]> writes:

> I'm looking for a collection of useful programming projects, at
> the "hobbyist" level.
>
> My online search did turn up a few collections (isolated projects
> are less useful to me at the moment), but these projects are either
> more difficult than what I'm looking for (e.g. code a C compiler)
> or not terribly useful to the average person (e.g. a function that
> efficiently computes the n-th Fibonacci number).
>
> Any pointers would be much appreciated.

Sourceforge.net and Savannah both have "help wanted" pages for open
source projects:




sherm--

-- 
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Idiom for running compiled python scripts?

2007-03-25 Thread Sherm Pendley
Mark <[EMAIL PROTECTED]> writes:

> Of course I realise the modern mantra that "premature optimisation is
> the root of all evil" but I don't subscribe to it.

Note the first word - premature. It's an important distinction, and you've
entirely missed it.

Optimization is premature if you haven't yet ensured that your program is
correct. Worry about getting it right first - and that includes selecting
the appropriate algorithms.

Optimization is premature if you haven't yet profiled your code to identify
precisely *what* code is a bottleneck.

Once you've identified your code's bottleneck(s), and verified that your
algorithm(s) is (are) ideal - then it's time to optimize the implementation
of the algorithm(s), if you still need to. (Most of the time you won't; in
my experience, bottlenecks are the result of badly-chosen algorithms in at
least nine out of ten cases.)

> Programmers have been
> "encouraged" to not give a toss about efficiency

Nonsense. Efficiency is about making the best use of limited resources, and
in most cases the most limited resource is people. Saving $x in hardware
cost by spending $x*10 on programmer salary is not efficient.

> and the outcome is all
> too apparent - most software today looks and runs like a pile of crap.

Most software today is written by comparitive amateurs who use "clever" code
that tries to compensate for badly-chosen algorithms, who guess at where
bottlenecks "might" be instead of profiling their code to see exactly where
they *are*, and who scoff at Knuth's "mantra" because they've misunderstood
what he meant by both "premature" and "optimization".

In other words, premature optimization is quite often the reason why software
often looks and runs like a pile of crap.

sherm--

-- 
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: On Java's Interface (the meaning of interface in computer programing)

2007-03-23 Thread Sherm Pendley
Lew <[EMAIL PROTECTED]> writes:

> But if Xah were being trollish, why didn't they jump on my response
> and call me names?

Xah never replies to the threads he starts. At least, I've never known him
to do so.

> I still think that analysis of the original post is a useful exercise
> to learn Java.

Maybe so - I don't know enough Java to comment on that. But there's nothing
useful to cross-posting the original to a fistful of non-Java lists.

> The more subtle Xah or other
> minions of Satan get in their presentations, the more interesting the
> forensic exercise to dig out the truth.

The truth is that Xah wants to start an argument. He cross-posts for that
reason, so that the "forensic exercise" you're speaking of then becomes an
argument among proponents of the various languages about which language is
closer to the "truth".

Don't take my word for it though - check Google Groups. You'll find he's
been doing this for a long time.

sherm--

-- 
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: On Java's Interface (the meaning of interface in computer programing)

2007-03-22 Thread Sherm Pendley
Lew <[EMAIL PROTECTED]> writes:

> Jim Burton wrote:
>> Or you could stop feeding the trolls.
>
> Does not apply. The OP was not being trollish

You obviously don't know Xah. He's been doing this for years, cross-
posting to various language groups trying to start an argument between
them. He even brags about being a troll on his web site.

sherm--

-- 
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Computer Language Popularity Trend

2006-09-27 Thread Sherm Pendley
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes:

> Xah Lee wrote:
>> Computer Language Popularity Trend
>>
>
> Careful there with the sweeping generalizations and quick judgments

Such things are all Xah does. Look at the distribution list for this
message - of what possible use is cross-posting something like this to
five different language groups, unless you're trying to start a cross-
group argument?

In short - Please don't feed the trolls.

sherm--

-- 
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Xah's Edu Corner: Examples of Quality Technical Writing

2005-12-06 Thread Sherm Pendley
Ulrich Hobelmann <[EMAIL PROTECTED]> writes:

> btw, why is this posted to every newsgroup EXCEPT a PHP one?

Xah's a pretty well-known troll in these parts. I suppose he thinks someone
is going to take the bait and rush to "defend" the other languages or some
such nonsense.

sherm--

-- 
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Daisy Daisy, give me your answer do

2005-10-09 Thread Sherm Pendley
"Xah Lee" <[EMAIL PROTECTED]> writes:

> there is a MacPerl program posted in 1998 that uses Mac's speech synth
> to sing Daisy Bell.
> See:
>
> http://bumppo.net/lists/macperl/1998/11/msg00412.html
>
> can anyone modify it so it runs out of the box on today's OS X?

For pre-Tiger OS versions you'll need to install the Mac::Carbon module from
CPAN, if you haven't done so already. Tiger ships with it pre-installed.

Aside from that, only trivial modification are needed to update the script.
Just Replace #!perl with #!/usr/bin/perl, and remove the last line, which
calls MacPerl::Quit().

sherm--

-- 
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: check html file size

2005-10-05 Thread Sherm Pendley
Richard Gration <[EMAIL PROTECTED]> writes:

> Are you fucking seriously fucking expecting some fucking moron to
> translate your tech geeking fucking code moronicity? Fucking try writing
> it fucking properly in fucking Perl first.

Good fucking job! That's the funniest fucking response I've ever fucking seen
to Xah's fucking moronistic fucking nonsense.

Lenny Bruce would be so fucking proud.

sherm--

-- 
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: check html file size

2005-10-05 Thread Sherm Pendley
Ulrich Hobelmann <[EMAIL PROTECTED]> writes:

> Richard Gration wrote:
>> Are you fucking seriously fucking expecting some fucking moron to
>> translate your tech geeking fucking code moronicity? Fucking try writing
>> it fucking properly in fucking Perl first.
>
> Fucking excuse me?
>
> Fucking maybe you should fucking go fucking fuck your fucking self...
>
> Seriously, Xah might be a troll, but this is just pathetic.

I'm guessing you didn't get the joke then. I think Richard's response was a
parody of Xah's "style" - a funny parody, at that.

sherm--

-- 
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: OT: Phases of the moon

2005-10-01 Thread Sherm Pendley
Bart Lateur <[EMAIL PROTECTED]> writes:

> As a similar example: I've been told by various women independently,
> that "there are more babies born near a full moon."
>
> So... is there a correlation between insanity and babies being born?  :)

If you weren't insane before the baby was born, you will be soon after. ;-)

sherm--

-- 
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: OT: Phases of the moon

2005-09-30 Thread Sherm Pendley
Steven D'Aprano <[EMAIL PROTECTED]> writes:

> On Fri, 30 Sep 2005 18:02:14 -0400, Sherm Pendley wrote:
>
>> [EMAIL PROTECTED] writes:
>> 
>>> I wonder if his postings are related to the phases of the moon? It
>>> might explain a lot.
>> 
>> Yes, it would. Note that the word lunatic is derived from the Latin word
>> luna, meaning moon.
>
> Yes, lunatic is derived from luna, but that doesn't mean the two are
> connected. The ancients believed a lot of crap

*whoosh*

That, my friend, was the sound of a joke flying past and completely
missing you. ;-)

sherm--

-- 
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: A Moronicity of Guido van Rossum

2005-09-30 Thread Sherm Pendley
[EMAIL PROTECTED] writes:

> I wonder if his postings are related to the phases of the moon? It
> might explain a lot.

Yes, it would. Note that the word lunatic is derived from the Latin word
luna, meaning moon.

sherm--

-- 
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: A Moronicity of Guido van Rossum

2005-09-29 Thread Sherm Pendley
"Matt" <[EMAIL PROTECTED]> writes:

> OK... your post seems to indicate a belief that everyone else is
> somehow incompetent.

Xah's just a troll - best to just ignore him. He posts these diatribes
to multiple groups hoping to start a fight.

sherm--

-- 
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org
-- 
http://mail.python.org/mailman/listinfo/python-list