Re: Question about garbage collection

2024-01-17 Thread Left Right via Python-list
So, here's some info about how to see what's going on with Python's memory allocation: https://docs.python.org/3/library/tracemalloc.html . I haven't looked into this in a long time, but it used to be the case that you needed to compile native modules (and probably Python itself?) so that instrumen

Re: Question about garbage collection

2024-01-16 Thread Frank Millman via Python-list
On 2024-01-17 3:01 AM, Greg Ewing via Python-list wrote: On 17/01/24 1:01 am, Frank Millman wrote: I sometimes need to keep a reference from a transient object to a more permanent structure in my app. To save myself the extra step of removing all these references when the transient object is de

Re: Question about garbage collection

2024-01-16 Thread Greg Ewing via Python-list
On 17/01/24 1:01 am, Frank Millman wrote: I sometimes need to keep a reference from a transient object to a more permanent structure in my app. To save myself the extra step of removing all these references when the transient object is deleted, I make them weak references. I don't see how wea

Re: Question about garbage collection

2024-01-16 Thread Greg Ewing via Python-list
On 17/01/24 4:00 am, Chris Angelico wrote: class Form: def __init__(self): self.elements = [] class Element: def __init__(self, form): self.form = form form.elements.append(self) If you make the reference from Element to Form a weak reference, it won't keep

Re: Question about garbage collection

2024-01-16 Thread Barry via Python-list
> On 16 Jan 2024, at 12:10, Frank Millman via Python-list > wrote: > > My problem is that my app is quite complex, and it is easy to leave a > reference dangling somewhere which prevents an object from being gc'd. What I do to track these problems down is use gc.get_objects() then summerize

Re: Question about garbage collection

2024-01-16 Thread Barry via Python-list
> On 16 Jan 2024, at 13:17, Thomas Passin via Python-list > wrote: > > The usual advice is to call deleteLater() on objects derived from PyQt > classes. I don't know enough about PyQt to know if this takes care of all > dangling reference problems, though. It works well and robustly. Bar

Re: Question about garbage collection

2024-01-16 Thread Chris Angelico via Python-list
On Wed, 17 Jan 2024 at 01:45, Frank Millman via Python-list wrote: > > On 2024-01-16 2:15 PM, Chris Angelico via Python-list wrote: > > > > Where do you tend to "leave a reference dangling somewhere"? How is > > this occurring? Is it a result of an incomplete transaction (like an > > HTTP request

Re: Question about garbage collection

2024-01-16 Thread Frank Millman via Python-list
On 2024-01-16 2:15 PM, Chris Angelico via Python-list wrote: Where do you tend to "leave a reference dangling somewhere"? How is this occurring? Is it a result of an incomplete transaction (like an HTTP request that never finishes), or a regular part of the operation of the server? I have a c

Re: Question about garbage collection

2024-01-16 Thread Thomas Passin via Python-list
On 1/16/2024 4:17 AM, Barry wrote: On 16 Jan 2024, at 03:49, Thomas Passin via Python-list wrote: This kind of thing can happen with PyQt, also. There are ways to minimize it but I don't know if you can ever be sure all Qt C++ objects will get deleted. It depends on the type of object an

Re: Question about garbage collection

2024-01-16 Thread Chris Angelico via Python-list
On Tue, 16 Jan 2024 at 23:08, Frank Millman via Python-list wrote: > > On 2024-01-15 3:51 PM, Frank Millman via Python-list wrote: > > Hi all > > > > I have read that one should not have to worry about garbage collection > > in modern versions of Python - it 'j

Re: Question about garbage collection

2024-01-16 Thread Frank Millman via Python-list
On 2024-01-15 3:51 PM, Frank Millman via Python-list wrote: Hi all I have read that one should not have to worry about garbage collection in modern versions of Python - it 'just works'. I don't want to rely on that. My app is a long-running server, with multiple clients lo

Re: Question about garbage collection

2024-01-16 Thread Barry via Python-list
> On 16 Jan 2024, at 03:49, Thomas Passin via Python-list > wrote: > > This kind of thing can happen with PyQt, also. There are ways to minimize it > but I don't know if you can ever be sure all Qt C++ objects will get deleted. > It depends on the type of object and the circumstances. Whe

Re: Question about garbage collection

2024-01-15 Thread Thomas Passin via Python-list
On 1/15/2024 9:47 PM, Akkana Peck via Python-list wrote: I wrote: Also be warned that some modules (particularly if they're based on libraries not written in Python) might not garbage collect, so you may need to use other methods of cleaning up after those objects. Chris Angelico writes: Go

Re: Question about garbage collection

2024-01-15 Thread Chris Angelico via Python-list
t(), but it can help if you want to get rid of them more promptly. (Python will detect such loops at some point, but not always immediately.) But these are bugs in the module, particularly the first case, and should be considered as such. 2003 is fully two decades ago now, and I would not expect th

Re: Question about garbage collection

2024-01-15 Thread Akkana Peck via Python-list
I wrote: > > Also be warned that some modules (particularly if they're based on > > libraries not written in Python) might not garbage collect, so you may need > > to use other methods of cleaning up after those objects. Chris Angelico writes: > Got any examples of that? The big one for me was

Re: Question about garbage collection

2024-01-15 Thread Chris Angelico via Python-list
On Tue, 16 Jan 2024 at 06:32, Akkana Peck via Python-list wrote: > > > Frank Millman wrote at 2024-1-15 15:51 +0200: > > >I have read that one should not have to worry about garbage collection > > >in modern versions of Python - it 'just works'. > > Diet

Re: Question about garbage collection

2024-01-15 Thread Akkana Peck via Python-list
> Frank Millman wrote at 2024-1-15 15:51 +0200: > >I have read that one should not have to worry about garbage collection > >in modern versions of Python - it 'just works'. Dieter Maurer via Python-list writes: > There are still some isolated cases when not all objec

Re: Question about garbage collection

2024-01-15 Thread Dieter Maurer via Python-list
Frank Millman wrote at 2024-1-15 15:51 +0200: >I have read that one should not have to worry about garbage collection >in modern versions of Python - it 'just works'. There are still some isolated cases when not all objects in an unreachable cycle are destroyed (see e.g.

Re: Question about garbage collection

2024-01-15 Thread Skip Montanaro via Python-list
> I do have several circular references. My experience is that if I do not > take some action to break the references when closing the session, the > objects remain alive. Below is a very simple program to illustrate this. > > Am I missing something? All comments appreciated. Python has normal ref

Question about garbage collection

2024-01-15 Thread Frank Millman via Python-list
Hi all I have read that one should not have to worry about garbage collection in modern versions of Python - it 'just works'. I don't want to rely on that. My app is a long-running server, with multiple clients logging on, doing stuff, and logging off. They can create many o

Re: Copy-on-write friendly Python garbage collection (Posting On Python-List Prohibited)

2018-01-01 Thread Niles Rogoff
> Niles, if you want to claim wxjmfauth is right, you'll have to present > some actual evidence.  He's claimed for years that Python's Unicode > support is buggy (as he does here), without ever demonstrating a bug. > We've long ago tired of trying to reason with him. > > The tradeoffs of memory u

Re: Copy-on-write friendly Python garbage collection (Posting On Python-List Prohibited)

2018-01-01 Thread Ned Batchelder
On 1/1/18 1:49 PM, Niles Rogoff wrote: On Mon, 01 Jan 2018 10:42:58 -0800, breamoreboy wrote: On Monday, January 1, 2018 at 10:14:59 AM UTC, wxjm...@gmail.com wrote: Le lundi 1 janvier 2018 08:35:53 UTC+1, Lawrence D’Oliveiro a écrit : On Monday, January 1, 2018 at 7:52:48 AM UTC+13, Paul Rub

Re: Copy-on-write friendly Python garbage collection

2018-01-01 Thread breamoreboy
://engineering.instagram.com/copy-on-write-friendly-python-garbage-collection-ad6ed5233ddf > >> > >> Appearantly, Erlang is the way to go, when it comes to web frameworks. > > > > What has that got to do with the subject of this thread? > > Well, a little implic

Re: Copy-on-write friendly Python garbage collection (Posting On Python-List Prohibited)

2018-01-01 Thread Niles Rogoff
On Mon, 01 Jan 2018 10:42:58 -0800, breamoreboy wrote: > On Monday, January 1, 2018 at 10:14:59 AM UTC, wxjm...@gmail.com wrote: >> Le lundi 1 janvier 2018 08:35:53 UTC+1, Lawrence D’Oliveiro a écrit : >> > On Monday, January 1, 2018 at 7:52:48 AM UTC+13, Paul Rubin wrote: >> > > I wonder if thing

Re: Copy-on-write friendly Python garbage collection

2018-01-01 Thread Wu Xi
breamore...@gmail.com: > On Sunday, December 31, 2017 at 6:19:13 PM UTC, Wu Xi wrote: >> breamoreboy: >>> An interesting write up on something that is incorporated into Python 3.7 >>> https://engineering.instagram.com/copy-on-write-friendly-python-garbage-collection-ad6

Re: Copy-on-write friendly Python garbage collection

2018-01-01 Thread breamoreboy
On Sunday, December 31, 2017 at 6:19:13 PM UTC, Wu Xi wrote: > breamoreboy: > > An interesting write up on something that is incorporated into Python 3.7 > > https://engineering.instagram.com/copy-on-write-friendly-python-garbage-collection-ad6ed5233ddf > > Appearantly, Er

Re: Copy-on-write friendly Python garbage collection

2018-01-01 Thread INADA Naoki
FYI: https://bugs.python.org/issue31558 INADA Naoki On Mon, Jan 1, 2018 at 12:39 AM, wrote: > An interesting write up on something that is incorporated into Python 3.7 > https://engineering.instagram.com/copy-on-write-friendly-python-garbage-collection-ad6ed5233ddf > > -- >

Re: Copy-on-write friendly Python garbage collection

2017-12-31 Thread Wu Xi
breamore...@gmail.com: > An interesting write up on something that is incorporated into Python 3.7 > https://engineering.instagram.com/copy-on-write-friendly-python-garbage-collection-ad6ed5233ddf Appearantly, Erlang is the way to go, when it comes to web frameworks. -- https://mail.pyth

Re: Copy-on-write friendly Python garbage collection

2017-12-31 Thread Wu Xi
they said they run the largest deployment of Django world-wide. be it as it may... many still consider the web guys to be the "funny people". Why did they not switch over to Erlang ? -- https://mail.python.org/mailman/listinfo/python-list

Re: Copy-on-write friendly Python garbage collection

2017-12-31 Thread Wu Xi
breamore...@gmail.com: > An interesting write up on something that is incorporated into Python 3.7 > https://engineering.instagram.com/copy-on-write-friendly-python-garbage-collection-ad6ed5233ddf kewl py 3.7 does not fully make install here, but it built and works, as far as I ca

Copy-on-write friendly Python garbage collection

2017-12-31 Thread breamoreboy
An interesting write up on something that is incorporated into Python 3.7 https://engineering.instagram.com/copy-on-write-friendly-python-garbage-collection-ad6ed5233ddf -- Kindest regards. Mark Lawrence. -- https://mail.python.org/mailman/listinfo/python-list

Re: Garbage collection problem with generators

2016-12-28 Thread Haochuan Guo
t; > >> This is reproducible with python2.7, but not in python3.5. I've also > tried > >> with `thread` instead of `gevent`, it still happens. I'm guessing it's > >> related to garbage collection of generators. > >> > >> Did I bump into a pyt

Re: Garbage collection problem with generators

2016-12-28 Thread Chris Angelico
th python2.7, but not in python3.5. I've also tried >> with `thread` instead of `gevent`, it still happens. I'm guessing it's >> related to garbage collection of generators. >> >> Did I bump into a python2 bug? Or am I simply wrong about the way to close >> g

Re: Garbage collection problem with generators

2016-12-28 Thread Haochuan Guo
ing the `A` instances by using > `gc.get_objects()`. It turns out there are always two `A` instances. > > This is reproducible with python2.7, but not in python3.5. I've also tried > with `thread` instead of `gevent`, it still happens. I'm guessing it's > re

Garbage collection problem with generators

2016-12-23 Thread Haochuan Guo
.get_objects()`. It turns out there are always two `A` instances. This is reproducible with python2.7, but not in python3.5. I've also tried with `thread` instead of `gevent`, it still happens. I'm guessing it's related to garbage collection of generators. Did I bump into a python

Re: Python garbage collection: not releasing memory to OS!

2016-04-15 Thread Sam
On 04/15/2016 05:25 AM, cshin...@gmail.com wrote: I have written an application with flask and uses celery for a long running task. While load testing I noticed that the celery tasks are not releasing memory even after completing the task. So I googled and found this group discussion.. https:

Re: Python garbage collection: not releasing memory to OS!

2016-04-15 Thread Michael Torrie
On 04/15/2016 04:25 AM, cshin...@gmail.com wrote: > The input was a 4MB file. Even after returning from the 'fileopen' > function the 4MB memory was not released. I checked htop output while > the loop was running, the resident memory stays at 14MB. So unless > the process is stopped the memory sta

Re: Python garbage collection: not releasing memory to OS!

2016-04-15 Thread Oscar Benjamin
On 15 April 2016 at 11:25, wrote: > The input was a 4MB file. Even after returning from the 'fileopen' function > the 4MB memory was not released. I checked htop output while the loop was > running, the resident memory stays at 14MB. So unless the process is stopped > the memory stays with it.

Python garbage collection: not releasing memory to OS!

2016-04-15 Thread cshintov
I have written an application with flask and uses celery for a long running task. While load testing I noticed that the celery tasks are not releasing memory even after completing the task. So I googled and found this group discussion.. https://groups.google.com/forum/#!topic/celery-users/jVc3I

Re: Python leaks in cyclic garbage collection

2011-02-21 Thread n00m
> Wild guess: > maybe when python exits they are called but sys.stdout has already been > closed and nothing gets written on it anymore. Certainly NOT. class Foo(): def __init__(self): self.b = Bar(self) def __del__(self): print "Free Foo" class Bar(): def __init__(

Re: Python leaks in cyclic garbage collection

2011-02-19 Thread moerchendiser2k3
Thanks for your answers! They really helped me out!! :) -- http://mail.python.org/mailman/listinfo/python-list

Re: Python leaks in cyclic garbage collection

2011-02-19 Thread Andrea Crotti
Il giorno 19/feb/2011, alle ore 05.10, moerchendiser2k3 ha scritto: > Hi, I have some problems with Python and the garbage collection. In > the following piece of code I create a simple gargabe collection but I > am still wondering why the finalizers are never called - at least on >

Re: Python leaks in cyclic garbage collection

2011-02-18 Thread Steven D'Aprano
On Fri, 18 Feb 2011 20:49:09 -0800, Chris Rebert wrote: > And following the pointer to gc.garbage's docs: > http://docs.python.org/library/gc.html#gc.garbage : "Objects that have > __del__() methods and are part of a reference cycle ***cause the entire > reference cycle to be uncollectable*** [...

Re: Python leaks in cyclic garbage collection

2011-02-18 Thread Chris Rebert
On Fri, Feb 18, 2011 at 8:10 PM, moerchendiser2k3 wrote: > Hi, I have some problems with Python and the garbage collection. In > the following piece of code I create a simple gargabe collection but I > am still wondering why the finalizers are never called - at least on > exit of Py

Re: Python leaks in cyclic garbage collection

2011-02-18 Thread moerchendiser2k3
Thanks a lot for any help!!! Bye, moerchendiser2k3 -- http://mail.python.org/mailman/listinfo/python-list

Python leaks in cyclic garbage collection

2011-02-18 Thread moerchendiser2k3
Hi, I have some problems with Python and the garbage collection. In the following piece of code I create a simple gargabe collection but I am still wondering why the finalizers are never called - at least on exit of Py they should be called somehow. What do I miss here? I know, there is no

Re: Newbie question about python garbage collection when keeping only a reference to an object's member

2010-11-27 Thread TuckerTherese
Some specialists tell that http://bestfinance-blog.com";>loan help people to live their own way, because they are able to feel free to buy necessary things. Moreover, various banks offer small business loan for young and old people. -- http://mail.python.org/mailman/listinfo/python-list

Where's the bug? (cPickle/thread edition) (was Re: How to optimize and monitor garbage collection?)

2010-11-20 Thread Aahz
In article , Steve Holden wrote: > >[aside: in general, if you think your program is not working because of >a bug in Python, look harder at your program]. Good advice, I certainly agree with you. But sometimes it's not so simple. Right now, my company is running up against a problem with Cher

Re: Newbie question about python garbage collection when keeping only a reference to an object's member

2010-11-12 Thread Emile van Sebille
On 11/12/2010 2:03 PM George Burdell said... My understanding is that any object which is not pointed to by any variable will be automatically deleted. What if I create a class object, but only keep a reference to one of its members, and not a reference to the object itself? What goes on internal

Re: Newbie question about python garbage collection when keeping only a reference to an object's member

2010-11-12 Thread Steve Holden
On 11/12/2010 2:03 PM, George Burdell wrote: > My understanding is that any object which is not pointed to by any > variable will be automatically deleted. What if I create a class > object, but only keep a reference to one of its members, and not a > reference to the object itself? What goes on in

Re: Newbie question about python garbage collection when keeping only a reference to an object's member

2010-11-12 Thread Robert Kern
On 11/12/10 4:03 PM, George Burdell wrote: My understanding is that any object which is not pointed to by any variable will be automatically deleted. What if I create a class object, but only keep a reference to one of its members, and not a reference to the object itself? What goes on internally

Newbie question about python garbage collection when keeping only a reference to an object's member

2010-11-12 Thread George Burdell
My understanding is that any object which is not pointed to by any variable will be automatically deleted. What if I create a class object, but only keep a reference to one of its members, and not a reference to the object itself? What goes on internally in Python? Does Python retain the whole obje

Re: How to optimize and monitor garbage collection?

2010-10-25 Thread Terry Reedy
It is possible, however, that I was not measuring memory consumption adequately. What's the most accurate way to monitor memory consumption in a Python program, and thereby ensure that gc is working properly? Also, are there programming techniques that will result in better garbage coll

Re: How to optimize and monitor garbage collection?

2010-10-24 Thread Steve Holden
On 10/24/2010 8:39 PM, kj wrote: > What's the most accurate way to monitor memory consumption in a > Python program, and thereby ensure that gc is working properly? Trust me, it is. But don't forget that CPython doesn't actually *use* the garbage collector until you start to create cyclic data str

How to optimize and monitor garbage collection?

2010-10-24 Thread kj
that I was not measuring memory consumption adequately. What's the most accurate way to monitor memory consumption in a Python program, and thereby ensure that gc is working properly? Also, are there programming techniques that will result in better garbage collection? For example, would it help to

Re: ctypes and garbage collection

2010-09-06 Thread Joakim Hove
> I'd add an "__owner" field to the node, initialised with the owning > container instance. I will - thank you! Joakim -- http://mail.python.org/mailman/listinfo/python-list

Re: ctypes and garbage collection

2010-09-06 Thread Ulrich Eckhardt
Joakim Hove wrote: > I have used ctypes to wrap a C-library > [...] > Observe that the c_container_get_node() function does _not_ allocate > memory, it just returns a opaque handle to a node structure, still > fully owned by the container structure. [...] > > class Container: > def __init__(

ctypes and garbage collection

2010-09-06 Thread Joakim Hove
Hello, I have used ctypes to wrap a C-library - it has been a really painless experience! The C-library instantiates a quite large "container-like" structure. There are then several functions to inspect the content of the container, get at items and free the whole thing: /* C - code */ c_contain

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-26 Thread Navkirat Singh
On 27-Aug-2010, at 2:14 AM, Brad wrote: > On Aug 25, 4:05 am, Alex McDonald wrote: >> Your example of writing code with >> memory leaks *and not caring because it's a waste of your time* makes >> me think that you've never been a programmer of any sort. > > "Windows applications are immune from

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-26 Thread Brad
On Aug 25, 4:05 am, Alex McDonald wrote: > Your example of writing code with > memory leaks *and not caring because it's a waste of your time* makes > me think that you've never been a programmer of any sort. "Windows applications are immune from memory leaks since programmers can count on regula

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-25 Thread Joshua Maurice
On Aug 25, 4:01 pm, John Passaniti wrote: > On Aug 25, 5:01 pm, Joshua Maurice wrote: > > > I agree. Sadly, with managers, especially non-technical > > managers, it's hard to make this case when the weasel > > guy says "See! It's working.". > > Actually, it's not that hard.  The key to communicat

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-25 Thread John Passaniti
On Aug 25, 5:01 pm, Joshua Maurice wrote: > I agree. Sadly, with managers, especially non-technical > managers, it's hard to make this case when the weasel > guy says "See! It's working.". Actually, it's not that hard. The key to communicating the true cost of software development to non-technic

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-25 Thread John Bokma
John Passaniti writes: > On Aug 24, 8:00 pm, Hugh Aguilar wrote: >> The C programmers reading this are likely wondering why I'm being >> attacked. The reason is that Elizabeth Rather has made it clear to >> everybody that this is what she wants: [http://tinyurl.com/2bjwp7q] > > Hello to those ou

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-25 Thread Joshua Maurice
On Aug 25, 1:44 pm, John Passaniti wrote: > On Aug 24, 9:05 pm, Hugh Aguilar wrote: > > > What about using what I learned to write programs that work? > > Does that count for anything? > > It obviously counts, but it's not the only thing that matters.  Where > I'm employed, I am currently managin

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-25 Thread John Passaniti
On Aug 24, 9:05 pm, Hugh Aguilar wrote: > What about using what I learned to write programs that work? > Does that count for anything? It obviously counts, but it's not the only thing that matters. Where I'm employed, I am currently managing a set of code that "works" but the quality of that cod

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-25 Thread John Passaniti
On Aug 24, 8:00 pm, Hugh Aguilar wrote: > The C programmers reading this are likely wondering why I'm being > attacked. The reason is that Elizabeth Rather has made it clear to > everybody that this is what she wants: [http://tinyurl.com/2bjwp7q] Hello to those outside of comp.lang.forth, where H

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-25 Thread Nick Keighley
On 19 Aug, 16:25, c...@tiac.net (Richard Harter) wrote: > On Wed, 18 Aug 2010 01:39:09 -0700 (PDT), Nick Keighley > wrote: > >On 17 Aug, 18:34, Standish P wrote: > >> How are these heaps being implemented ? Is there some illustrative > >> code or a book showing how to implement these heaps in C

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-25 Thread Anton Ertl
Alex McDonald writes: > Your example of writing code with >memory leaks *and not caring because it's a waste of your time* makes >me think that you've never been a programmer of any sort. Ever. Well, I find his approach towards memory leaks as described in <779b992b-7199-4126-bf3a-7ec40ea80...@j1

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-25 Thread Alex McDonald
On 25 Aug, 01:00, Hugh Aguilar wrote: > On Aug 24, 4:17 pm, Richard Owlett wrote: > > > Hugh Aguilar wrote: > > > [SNIP ;] > > > > The real problem here is that C, Forth and C++ lack automatic garbage > > > collection. If I have a program in which I

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-25 Thread David Kastrup
Hugh Aguilar writes: > On Aug 24, 5:16 pm, Paul Rubin wrote: >> Anyway, as someone else once said, studying a subject like CS isn't done >> by reading.  It's done by writing out answers to problem after problem. >> Unless you've been doing that, you haven't been studying. > > What about using wh

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-24 Thread John Bokma
John Bokma writes: > At an university which languages you see depend a lot on what your > teachers use themselves. A language is just a verhicle to get you from a > to b. Addendum: or to illustrate a concept (e.g. functional programming, oop) [..] > Like you, you mean? You consider yourself qui

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-24 Thread John Bokma
Hugh Aguilar writes: > This is also the attitude that I find among college graduates. They > just believe what their professors told them in college, and there is > no why. Which college is that? It doesn't agree with my experiences. In CS quite a lot has to be proven with a formal proof, exactl

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-24 Thread John Bokma
Hugh Aguilar writes: > On Aug 24, 5:16 pm, Paul Rubin wrote: >> Anyway, as someone else once said, studying a subject like CS isn't done >> by reading.  It's done by writing out answers to problem after problem. >> Unless you've been doing that, you haven't been studying. > > What about using wh

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-24 Thread Hugh Aguilar
On Aug 21, 10:57 pm, Steven D'Aprano wrote: > Anyway, I'm looking forward to hear why overuse of the return stack is a > big reason why people use GCC rather than Forth. (Why GCC? What about > other C compilers?) Me, in my ignorance, I thought it was because C was > invented and popularised by the

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-24 Thread Hugh Aguilar
On Aug 24, 5:16 pm, Paul Rubin wrote: > Anyway, as someone else once said, studying a subject like CS isn't done > by reading.  It's done by writing out answers to problem after problem. > Unless you've been doing that, you haven't been studying. What about using what I learned to write programs

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-24 Thread John Bokma
Paul Rubin writes: > Hugh Aguilar writes: >> I've read a lot of graduate-level CS books. > > Reading CS books doesn't make you a computer scientist any more than > listening to violin records makes you a violinist. Write out answers to > all the exercises in those books, and get your answers to

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-24 Thread Paul Rubin
Hugh Aguilar writes: > I've read a lot of graduate-level CS books. Reading CS books doesn't make you a computer scientist any more than listening to violin records makes you a violinist. Write out answers to all the exercises in those books, and get your answers to the more difficult ones checke

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-24 Thread Richard Owlett
Hugh Aguilar wrote: On Aug 24, 4:17 pm, Richard Owlett wrote: Hugh Aguilar wrote: [SNIP ;] The real problem here is that C, Forth and C++ lack automatic garbage collection. If I have a program in which I have to worry about memory leaks (as described above), I would be better off to ignore

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-24 Thread Hugh Aguilar
On Aug 24, 4:17 pm, Richard Owlett wrote: > Hugh Aguilar wrote: > > [SNIP ;] > > > The real problem here is that C, Forth and C++ lack automatic garbage > > collection. If I have a program in which I have to worry about memory > > leaks (as described above), I w

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-24 Thread John Bokma
t > runs, generates the gcode and PostScript, and then it is done. I don't > really worry about memory leaks except with programs that are run > continuously and have a user-interface, because they can eventually > run out of memory. Oh boy, I think you just made my point for me...

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-24 Thread Hugh Aguilar
On Aug 24, 9:24 am, David Kastrup wrote: > Anybody worth his salt in his profession has a trail of broken things in > his history. When I was employed as a Forth programmer, I worked for two brothers. The younger one told me a funny story about when he was 13 or 14 years old. He bought a radio at

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-24 Thread Richard Owlett
Hugh Aguilar wrote: [SNIP ;] The real problem here is that C, Forth and C++ lack automatic garbage collection. If I have a program in which I have to worry about memory leaks (as described above), I would be better off to ignore C, Forth and C++ and just use a language that supports garbage

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-24 Thread Hugh Aguilar
have a user-interface, because they can eventually run out of memory. The real problem here is that C, Forth and C++ lack automatic garbage collection. If I have a program in which I have to worry about memory leaks (as described above), I would be better off to ignore C, Forth and C++ and jus

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-24 Thread John Bokma
David Kastrup writes: > John Bokma writes: > >> On the other hand: some people I knew during my studies had no problem >> at all with introducing countless memory leaks in small programs (and >> turning off compiler warnings, because it gave so much noise...) > > [...] > >> As for electrical eng

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-24 Thread Hugh Aguilar
On Aug 21, 12:18 pm, ehr...@dk3uz.ampr.org (Edmund H. Ramm) wrote: > In <2d59bfaa-2aa5-4396-bd03-22200df8c...@x21g2000yqa.googlegroups.com> Hugh > Aguilar writes: > > > [...] > > I really recommend that people spend a lot more time writing code, > > and a lot less time with all of this pseudo-int

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-24 Thread Richard Owlett
David Kastrup wrote: John Bokma writes: On the other hand: some people I knew during my studies had no problem at all with introducing countless memory leaks in small programs (and turning off compiler warnings, because it gave so much noise...) [...] As for electrical engineering: done th

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-24 Thread David Kastrup
John Bokma writes: > On the other hand: some people I knew during my studies had no problem > at all with introducing countless memory leaks in small programs (and > turning off compiler warnings, because it gave so much noise...) [...] > As for electrical engineering: done that (BSc) and one o

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-24 Thread Alex McDonald
On 24 Aug, 01:00, Hugh Aguilar wrote: > On Aug 21, 12:32 pm, Alex McDonald wrote: > > > "Scintilla" gets about 2,080,000 results on google; "blather" gets > > about 876,000 results. O Hugh, you pseudo-intellectual you! > > > > with gutter language such as > > > "turd" > > > About 5,910,000 result

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-23 Thread Hugh Aguilar
On Aug 22, 3:40 pm, 1001nuits <1001nu...@gmail.com> wrote: > Another thing you learn in studying in University is the fact that you can   > be wrong, which is quite difficult to accept for self taught people. Yet another thing you learn in studying in University, is the art of apple polishing! LOL

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-23 Thread Hugh Aguilar
On Aug 21, 12:32 pm, Alex McDonald wrote: > "Scintilla" gets about 2,080,000 results on google; "blather" gets > about 876,000 results. O Hugh, you pseudo-intellectual you! > > > with gutter language such as > > "turd" > > About 5,910,000 results. It has a long history, even getting a mention > in

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-22 Thread 1001nuits
Le Sun, 22 Aug 2010 20:12:36 +0200, John Bokma a écrit: David Kastrup writes: John Bokma writes: David Kastrup writes: John Passaniti writes: Amen! All this academic talk is useless. Who cares about things like the big-O notation for program complexity. Can't people just *l

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-22 Thread John Bokma
David Kastrup writes: > John Bokma writes: > >> David Kastrup writes: >> >>> John Passaniti writes: >>> Amen! All this academic talk is useless. Who cares about things like the big-O notation for program complexity. Can't people just *look* at code and see how complex it is?!

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-22 Thread David Kastrup
John Bokma writes: > David Kastrup writes: > >> John Passaniti writes: >> >>> Amen! All this academic talk is useless. Who cares about things like >>> the big-O notation for program complexity. Can't people just *look* >>> at code and see how complex it is?! And take things like the years o

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-21 Thread Steven D'Aprano
Oh, I am so going to regret getting sucked into this tarpit... oh well. On Sat, 21 Aug 2010 09:58:18 -0700, Hugh Aguilar wrote: > The > following is a pretty good example, in which Alex mixes big pseudo- > intellectual words such as "scintilla" with gutter language such as > "turd" in an un

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-21 Thread Brad
On Aug 21, 3:36 am, David Kastrup wrote: > > I think there must be some programmer gene.  It is not enough to be able > to recognize O(n^k) or worse (though it helps having a more exact rather > than a fuzzy notion of them _if_ you have that gene).   Some of the best minds in comp.lang.forth have

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-21 Thread John Bokma
David Kastrup writes: > John Passaniti writes: > >> Amen! All this academic talk is useless. Who cares about things like >> the big-O notation for program complexity. Can't people just *look* >> at code and see how complex it is?! And take things like the years of >> wasted effort computer s

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-21 Thread Alex McDonald
On 21 Aug, 17:58, Hugh Aguilar wrote: > On Aug 21, 5:29 am, Alex McDonald wrote: > > > On 21 Aug, 06:42, Standish P wrote: > > > Admittedly, I am asking a question that would be thought > > > provoking to those who claim to be "experts" but these experts are > > > actually very stingy and mean b

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-21 Thread Hugh Aguilar
On Aug 21, 5:29 am, Alex McDonald wrote: > On 21 Aug, 06:42, Standish P wrote: > > Admittedly, I am asking a question that would be thought > > provoking to those who claim to be "experts" but these experts are > > actually very stingy and mean business people, most certainly worse > > than Bill

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-21 Thread Alex McDonald
g* that *anybody* was saying (especially the OP). > > You didnt understand anything because no one explained anything > coherently. It indicates that you're asking a question that *you don't understand*. I'm continually amazed that people come to Usenet, wikis, websites an

Re: How far can stack [LIFO] solve do automatic garbage collection and prevent memory leak ?

2010-08-21 Thread David Kastrup
John Passaniti writes: > Amen! All this academic talk is useless. Who cares about things like > the big-O notation for program complexity. Can't people just *look* > at code and see how complex it is?! And take things like the years of > wasted effort computer scientists have put into taking

  1   2   3   4   >