Re: Nested function scope problem

2006-08-06 Thread Edmond Dantes
Dennis Lee Bieber wrote:

 On Sat, 5 Aug 2006 07:24:51 -0300, Gerhard Fiedler [EMAIL PROTECTED]
 declaimed the following in comp.lang.python:
 
 I know. It's just that your explicit analogy made this better visible, so
 I wanted to add that to it. But I guess this thing is getting into the
 dead horse state -- if it hasn't been there for a while now :)

 Needs more aging to tenderize G

Keep the MSG out of it!!!

-- 
-- Edmond Dantes, CMC
And Now for something Completely Different:
  http://floral-bouquets.prosperitysprinkler.com
  http://ridgeback.KindPets.com
  http://credit.Internet69.com
  http://Atkins.blackboystuff.com
  http://cutting-tools.Auto1Parts.com
  http://limousine.weddingbelljoy.com
  http://creativity.WomanMinutes.com


 Posted Via Usenet.com Premium Usenet Newsgroup Services
--
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
--
http://www.usenet.com
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Windows vs. Linux

2006-08-01 Thread Edmond Dantes
Dan wrote:

 But taken out of that context, I'll challenge it.  I was first exposed
 to Python about five or six years ago--my boss asked me to consider it.
 What I found was that the current version of Python was V2.2, but newest
 version (that I could find) that ran on VMS was V1.4.  I decided to
 stick with Perl, which provides excellent support for VMS.

What, you couldn't just take the latest source for Python and compile it
under VMS?

:-)

I say that in jest, but I am surprised there were no Unix/Linux libraries
available for VMS, which would've made the port easier -- and more up to
date.

-- 
-- Edmond Dantes, CMC
And Now for something Completely Different:
  http://settee.funiturenow.com
  http://floor-lamp.WhatDoYouHungerFor.com
  http://walkway.HomeImprovementBase.com
  http://can-opener.WhatDoYouHungerFor.com
  http://dog-chews.PetzFriendz.com
  http://skin-care.whitegirlstuff.com
  http://baby-lulu.ShadowKids.com


 Posted Via Usenet.com Premium Usenet Newsgroup Services
--
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
--
http://www.usenet.com
-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Programming newbie coming from Ruby: a few Python questions

2006-08-01 Thread Edmond Dantes
Ravi Teja wrote:

  'Clever is not considered a compliment in Python.' (don't know where I
 read that...)
 
 On a similar note.
 
 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 of C

Well, if you are talking about C, that is *definitely* true. I would think
that would be less the case for languages like Java, Python, PHP, etc.

Of course, it's all what you really mean by clever. To me, being clever
partly means writing code without bugs in the first place, so there is
nothing that needs debugging

Well, if anyone can pull that sword from the stone...!

-- 
-- Edmond Dantes, CMC
And Now for something Completely Different:
  http://bridal-registry.weddingbelljoy.com
  http://3D.CraftyMen.com
  http://lapis.StellarChemistry.com
  http://civil.LesbianGetTogether.com
  http://workstation.funiturenow.com
  http://cosmetics.whitegirlstuff.com
  http://strapless.WomanNightlife.com

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: micro authoritative dns server

2006-07-24 Thread Edmond Dantes
Jean-Paul Calderone wrote:

...
 Twisted includes a DNS server which is trivially configurable to perform
 this task.  Take a look.
 
   http://twistedmatrix.com/
   http://twistedmatrix.com/projects/names/documentation/howto/names.html
 
 Jean-Paul

On a tangential note:

If you want a DNS server to be updatable in real time from a database, then
you want PowerDNS:

http://www.powerdns.com/

I've been using this for quite some time now and it's great to be able to
add zones, etc. just by a new entry or two in the MySQL database.

It can interface to other databases as well. 

-- 
-- Edmond Dantes, CMC
And Now for something Completely Different:
  http://beadwork.SelfMadeDream.com
  http://dealership.anyhottips.com
  http://beanie.hugmykids.com
  http://jockey.AreYouTaken.com
  http://headset.GadgetRUs.com
  http://lighting.desktopgod.com
  http://portfolio.desktopgod.com


 Posted Via Usenet.com Premium Usenet Newsgroup Services
--
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
--
http://www.usenet.com
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: New to threads. How do they work?

2006-07-22 Thread Edmond Dantes
Dennis Lee Bieber wrote:

 On Sat, 22 Jul 2006 17:19:22 +1200, Lawrence D'Oliveiro
 [EMAIL PROTECTED] declaimed the following in
 comp.lang.python:
 
 
 Perhaps because with threads, data is shared by default. Whereas with
 processes, it is private by default, and needs to be explicitly shared if
 you want that.
 
 Or just that the name thread was a late-comer for some of us...
 
 The Amiga had tasks at the lowest level (these were what the core
 OS library managed -- that core handled task switching, memory
 allocation, and IPC [event flags, message ports]). Processes were
 scheduled by the executive, but had additional data -- like stdin/stdout
 and environment variables... all the stuff one could access from a
 command line. Or, confusing for many... Processes were DOS level,
 Tasks were OS level.

On the Amiga, everything was essentially a thread. There was *no* memory
protection whatsoever, which made for a wickedly fast -- and unstable --
OS.

Now, before Commordore went the way of the Dodo Bird, there was some
discussion about adding memory protection to the OS, but that was a very
difficult proposition since most if not all of the OS control structures
were just that -- basically c structs, with live memory pointers handed
around from application to kernel and back.

I think we could've done it eventually, but that ship sank. All because of
the idiots there that was upper management. But I digress.
 
-- 
-- Edmond Dantes, CMC
And Now for something Completely Different:
  http://baskets.giftsantiquescollectables.com
  http://vacation-packages.YouDeserveItNow.com
  http://cold-remedy.WomenLite.com
  http://investments.BankOrLoan.com
  http://coils.IndustrialMetalz.com
  http://brackets.Auto1Parts.com
  http://windmill.industrialtips.com


 Posted Via Usenet.com Premium Usenet Newsgroup Services
--
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
--
http://www.usenet.com
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: 3d simulation

2006-07-13 Thread Edmond Dantes
placid wrote:

 
 alimoe wrote:
  Genetic Programming or Genetic Algorithms?

 whats the difference?
 
 
 Genetic Programming:
 is an automated methodology inspired by biological evolution to find
 computer programs that best perform a user-defined task.
 
 http://en.wikipedia.org/wiki/Genetic_Programming
 
 Genetic Algorithms: search technique used in computer science to find
 approximate solutions to optimization and search problems.
 
 http://en.wikipedia.org/wiki/Genetic_algorithms

I would tend to think that Lisp is more suited for Genetic Programming than
Python is. However, it is possible to do. Heck, I even had the crazy idea
of doing Genetic Programming in C++ once, however ugly that would've
been!

Actually, there is an AI project that I'm doing in Python rather than Lisp
because Python is much better supported. A pity, really, since Lisp has so
much more power and expressiveness. Alas, Python has extensive libraries
and are well documented to boot. Only an academic would have the time to do
anything with Lisp. :-(

-- 
-- Edmond Dantes, CMC
And Now for something Completely Different:
  http://experience.MyInfiniteSuccess.com
  http://sheetrock.searchborg.com
  http://footwear.AreYouTaken.com
  http://handmade-invitations.giftsantiquescollectables.com
  http://screws.SlamItYourself.com
  http://sex-education.WomenLite.com
  http://scratching.KindPets.com


 Posted Via Usenet.com Premium Usenet Newsgroup Services
--
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
--
http://www.usenet.com
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Tabs versus Spaces in Source Code

2006-05-17 Thread Edmond Dantes
Oliver Bandel wrote:

 [EMAIL PROTECTED] opalinski from opalpaweb wrote:
...
 Yes, as I started programming I also preferred tabs.
 And with growing experience on how to handle this in true life
 (different editors/systems/languages...) I saw, that
 converting the so fine tabs was annoying.
 
 The only thing that always worked were spaces.
 Tab: nice idea but makes programming an annoyance.
 
 Ciao,
 Oliver

It all depends on your editor of choice. Emacs editing of Lisp (and a few
other languages, such as Python) makes the issue more or less moot. I
personally would recommend choosing one editor to use with all your
projects, and Emacs is wonderful in that it has been ported to just about
every platform imaginable. 

The real issue is, of course, that ASCII is showing its age and we should
probably supplant it with something better. But I know that will never fly,
given the torrents of code, configuration files, and everything else in
ASCII. Even Unicode couldn't put a dent in it, despite the obvious growing
global development efforts. Not sure how many compilers would be able to
handle Unicode source anyway. I suspect the large majority of them would
would choke big time.

Oh well...

-- 
-- Edmond Dantes, CMC
And Now for something Completely Different:
  http://gift-basket.prosperitysprinkler.com
  http://sewing-machine.womencraft.com
  http://coveralls.whiteboystuff.com
  http://eyewear.blackboystuff.com
  http://dinette.funiturenow.com
  http://wheels.whiteboystuff.com
  http://patio.funiturenow.com


 Posted Via Usenet.com Premium Usenet Newsgroup Services
--
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
--
http://www.usenet.com
-- 
http://mail.python.org/mailman/listinfo/python-list