Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'subject:Python': 0.05; 'debug': 0.05; '(so': 0.07; 'dynamically': 0.07; 'python': 0.09; 'garbage': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'sep': 0.09; 'stating': 0.09; 'subject:using': 0.09; 'language': 0.14; 'languages.': 0.15; 'basic,': 0.16; 'dump': 0.16; 'node,': 0.16; 'offsets': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'which,': 0.16; 'memory': 0.18; '(on': 0.22; "i've": 0.23; 'least': 0.25; 'expand': 0.26; 'supported': 0.26; 'core': 0.27; 'header:X-Complaints-To:1': 0.28; "d'aprano": 0.29; 'steven': 0.29; 'array': 0.29; 'class': 0.29; 'basic': 0.30; 'gets': 0.32; 'structure': 0.32; 'could': 0.32; 'allocated': 0.33; 'interface,': 0.33; 'url:home': 0.33; 'to:addr :python-list': 0.33; 'entry': 0.33; 'version': 0.34; 'project': 0.34; 'done': 0.34; 'list': 0.35; 'open': 0.35; 'subject:?': 0.35; 'received:org': 0.36; 'really': 0.36; 'functional': 0.36; 'should': 0.36; 'charset:us-ascii': 0.36; 'data': 0.37; 'subject:: ': 0.38; 'files': 0.38; 'easier': 0.38; 'to:addr:python.org': 0.39; 'where': 0.40; 'header:Received:5': 0.40; 'free': 0.61; 'skip:n 10': 0.63; 'within': 0.64; 'concerns': 0.65; 'snapshot': 0.84; 'controller': 0.91; 'dennis': 0.91; 'mistake': 0.91; 'received:108': 0.91 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Dennis Lee Bieber Subject: Re: Algorithms using Python? Date: Sat, 22 Sep 2012 00:29:20 -0400 Organization: > Bestiaria Support Staff < References: <505d1424$0$29981$c3e8da3$5496439d@news.astraweb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: adsl-108-79-219-15.dsl.klmzmi.sbcglobal.net X-Newsreader: Forte Agent 3.3/32.846 X-No-Archive: YES X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 36 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1348288170 news.xs4all.nl 6884 [2001:888:2000:d::a6]:32923 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:29719 On 22 Sep 2012 01:28:04 GMT, Steven D'Aprano declaimed the following in gmane.comp.python.general: > > Writing Fortran77 in Python! > Well, if one really wants to learn "linked lists" from the core concept where the links refer directly to offsets within the memory block (array) ; then expand to where the links refer to dynamically allocated memory... Do the same with stacks, queue, and deques... Much easier to debug if all one needs to dump is a snapshot of an array and analyze for "lost free memory" (any array entry that is not "pointed to" when traversing the chain of data nor the chain of free cells) -- since such would be uncollected garbage in lower-level languages. Python masks such concerns -- you unlink a node, and it gets garbage collected... You should have seen the final project in my algorithms class (ca. 1979)... A hashed-head multiple-linked list * ... Done using a version of BASIC that only supported four open files at a time (on top of which, I used chain-loading to move from the master controller (user interface, if you will) to each functional operation). The instructor had made the mistake of stating the project could be done in any language /he/ knew (so he received my BASIC, a lot of FORTRAN-IV, and at least one Meta-Symbol). * And in the last 30+ years, I've seen only ONE non-classroom use of an HHMLL -- the directory structure of AmigaOS! -- Wulfraed Dennis Lee Bieber AF6VN wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/