From: Jacek Generowicz
Subject: [OT] Garbage collectors for C++
Date: 
Message-ID: <tyffzo6gazw.fsf@pcepsft001.cern.ch>
[I ask here because I know that there is a number of skilled C++
programmers in this group ... while a scan of C++ fora for the subject
of garbage collection reveals mostly FUD, so I reckon I'll get a
better signal to noise ratio here.]

I'm looking into the possibility of using an add-on garbage collection
system for C++.

Could you relate any relevant experience you have had in using such
systems? I'm interested not only in the technical aspects but also
sociological ones, as I am working in an environment where mentioning
GC in the context of C++ raises eyebrows. (Should I just advocate
Boost smart pointers rather than GC, and thereby save myself a lot of
frustration? :-)

Could you recommend some systems, or give words of warning about them?

Could you point me to some resources on the subject which Google might
miss?


Thank you.

From: John M. Adams
Subject: Re: [OT] Garbage collectors for C++
Date: 
Message-ID: <xaofzo6oh5m.fsf@anarky.stsci.edu>
Jacek Generowicz <················@cern.ch> writes:

> [I ask here because I know that there is a number of skilled C++
> programmers in this group ... while a scan of C++ fora for the subject
> of garbage collection reveals mostly FUD, so I reckon I'll get a
> better signal to noise ratio here.]
> 
> I'm looking into the possibility of using an add-on garbage collection
> system for C++.
> 
> Could you relate any relevant experience you have had in using such
> systems?

You might want to look at Great Circle from Geodesic Systems:

http://www.microway.com.au/catalog/geodesic/products.stm

I used this product several years ago and was pleased.

-- 
John Michael Adams
From: Basile STARYNKEVITCH
Subject: Re: [OT] Garbage collectors for C++
Date: 
Message-ID: <q5rel3q26ig.fsf@hector.lesours>
>>>>> "Jacek" == Jacek Generowicz <················@cern.ch> writes:

    Jacek> [I ask here because I know that there is a number of
    Jacek> skilled C++ programmers in this group ... while a scan of
    Jacek> C++ fora for the subject of garbage collection reveals
    Jacek> mostly FUD, so I reckon I'll get a better signal to noise
    Jacek> ratio here.]

    Jacek> I'm looking into the possibility of using an add-on garbage
    Jacek> collection system for C++.


Obviously you can use conservative garbage collectors, like the famous
Boehm's one available on http://www.hpl.hp.com/personal/Hans_Boehm/gc/

The picky point is what are you using C++ destructors for? If you have
the discipline of only using them to free memory, it is ok; if you are
doing something else in destructor (e.g. significant & unavoidable
computations), you might have problems. You could use finalization in
Boehm collector, but finalization and C++ destructors have different
semantics.

You might also use a copying collector like my Qish; see
http://freshmeat.net/projects/qish/ or
http://starynkevitch.net/Basile/qishintro.html ; for information, Qish
was inspired from a previous proprietary copying garbage collector I
wrote for and in C++ - see
http://www.di.ens.fr/~goubault/papers/icse01.ps.gz for more. Qish does
support (also) finalised objects. It does require a very specific (and
sometimes unconfortable) coding style. Please be kind to email me if
you are interested in Qish!

Since you are from CERN, I assume you want to do intensive numerical
calculations. According to rumors, this might be a case where a
conservative GC might perform poorly (because some numbers on the call
stack could have the same bit pattern as pointers to otherwise dead
objects), while a precise copying GC like Qish don't have such
deficiency (but does require a particular coding style).

Another issue is multithreading (Qish is not multithread capable, but
Boehm's collector does handle multithreading).

An alternative might be to handle high-level stuff in a good garbage
collected language (like Ocaml for example) while leaving low level
but CPU intensive numerical routines in C or C++.

Good luck.
-- 

Basile STARYNKEVITCH         http://starynkevitch.net/Basile/ 
email: basile<at>starynkevitch<dot>net 
aliases: basile<at>tunes<dot>org = bstarynk<at>nerim<dot>net
8, rue de la Fa�encerie, 92340 Bourg La Reine, France
From: Jacek Generowicz
Subject: Re: [OT] Garbage collectors for C++
Date: 
Message-ID: <tyfptnaes1o.fsf@pcepsft001.cern.ch>
Basile STARYNKEVITCH <·········@SPAM+starynkevitch.net.invalid> writes:

> Obviously you can use conservative garbage collectors, like the famous
> Boehm's one available on http://www.hpl.hp.com/personal/Hans_Boehm/gc/

Yup, that's the obvious candidate. I'd appreciate if anyone who has
used it could tell me of his experience, particularly if it involved
interaction with C++ programmers not accustomed to GC.

> Since you are from CERN, I assume you want to do intensive numerical
> calculations.

Heh, I know better than to try to suggest GC for anything numerically
intensive around here.

As it happens, we are also doing rather a lot of Greenspunning (and
other symptoms of not-invented-here syndrome), and building frameworks
for interactive analysis etc., and it is here that I would like to
suggest GC (basically as an alternative to Boost shared_ptr).

> An alternative might be to handle high-level stuff in a good garbage
> collected language (like Ocaml for example) while leaving low level
> but CPU intensive numerical routines in C or C++.

Sorry, we do everything in C++, because it is such a wonderful
language for developing complex interactive systems quickly and
robustly[*]. However, we have discovered Python (tllotbafir[+]), so we
are allowed to wrap bits of our C++ code in the latter. OCaml is
definitely too far off the planet for our use.


[I'll take more time to read (and maybe address) the rest of your post
properly.]

Thanks.




[*] Irony alert.

[+] Terminology shamelessly stolen from Marco Antoniotti.
From: Tim Daly, Jr.
Subject: Re: [OT] Garbage collectors for C++
Date: 
Message-ID: <87n0iebtdt.fsf@tenkan.org>
Jacek Generowicz <················@cern.ch> writes:
...
> robustly[*]. However, we have discovered Python (tllotbafir[+]), so we
...
> [+] Terminology shamelessly stolen from Marco Antoniotti.
...

Okay, what in Buddha's belly is a tllotbafir?  It has the privilege of
being the first acronym that Google couldn't help me with.

-Tim

-- 
From: Thomas F. Burdick
Subject: Re: [OT] Garbage collectors for C++
Date: 
Message-ID: <xcv8ytxq404.fsf@apocalypse.OCF.Berkeley.EDU>
···@tenkan.org (Tim Daly, Jr.) writes:

> Jacek Generowicz <················@cern.ch> writes:
> ...
> > robustly[*]. However, we have discovered Python (tllotbafir[+]), so we
> ...
> > [+] Terminology shamelessly stolen from Marco Antoniotti.
> ...
> 
> Okay, what in Buddha's belly is a tllotbafir?  It has the privilege of
> being the first acronym that Google couldn't help me with.

Maybe this'll help Google: tllotbafir =
the-latest-language-on-the-block-avec-forced-indentation-rules

(BTW, if you'd put ttlotbafir into a google groups search, it would've
been more enlightening)

-- 
           /|_     .-----------------------.                        
         ,'  .\  / | No to Imperialist war |                        
     ,--'    _,'   | Wage class war!       |                        
    /       /      `-----------------------'                        
   (   -.  |                               
   |     ) |                               
  (`-.  '--.)                              
   `. )----'                               
From: Tim Daly, Jr.
Subject: Re: [OT] Garbage collectors for C++
Date: 
Message-ID: <87vfx1l1cf.fsf@tenkan.org>
···@apocalypse.OCF.Berkeley.EDU (Thomas F. Burdick) writes:

> ···@tenkan.org (Tim Daly, Jr.) writes:
> 
> > Jacek Generowicz <················@cern.ch> writes:
> > ...
> > > robustly[*]. However, we have discovered Python (tllotbafir[+]), so we
> > ...
> > > [+] Terminology shamelessly stolen from Marco Antoniotti.
> > ...
> > 
> > Okay, what in Buddha's belly is a tllotbafir?  It has the privilege of
> > being the first acronym that Google couldn't help me with.
> 
> Maybe this'll help Google: tllotbafir =
> the-latest-language-on-the-block-avec-forced-indentation-rules
> 
> (BTW, if you'd put ttlotbafir into a google groups search, it would've
> been more enlightening)
> 


Thanks, I never would've figured that out on my own - particularly
since avec was not in my vocabulary. :) I did search groups, of
course, but I must have missed the post.  

So, should I interpret that as "the latest language having forced
indentation rules" or "the latest language on the block, and it has
forced indentation rules"?  I guess the former, because I think Ruby
is an even later language on the block.  When did scripting languages
become boy bands?


-Tim

-- 
From: Kenny Tilton
Subject: Re: [OT] Garbage collectors for C++
Date: 
Message-ID: <3EAAB34B.3000909@nyc.rr.com>
Tim Daly, Jr. wrote:
> So, should I interpret that as "the latest language having forced
> indentation rules" or "the latest language on the block, and it has
> forced indentation rules"?  I guess the former, because I think Ruby
> is an even later language on the block.  When did scripting languages
> become boy bands?

when they made it the prime design directive to attract hordes of 
squealing groupies.

problem is, what happens when the fans move on?* Hey, maybe as they 
mature they will discover classical music (you know, Lisp).

* Answer: "Spinal Tap"

-- 

  kenny tilton
  clinisys, inc
  http://www.tilton-technology.com/
  ---------------------------------------------------------------
"Everything is a cell." -- Alan Kay
From: Thomas F. Burdick
Subject: Re: [OT] Garbage collectors for C++
Date: 
Message-ID: <xcv65p0wy9z.fsf@famine.OCF.Berkeley.EDU>
Kenny Tilton <·······@nyc.rr.com> writes:

> Tim Daly, Jr. wrote:
> > So, should I interpret that as "the latest language having forced
> > indentation rules" or "the latest language on the block, and it has
> > forced indentation rules"?  I guess the former, because I think Ruby
> > is an even later language on the block.  When did scripting languages
> > become boy bands?
> 
> when they made it the prime design directive to attract hordes of
> squealing groupies.
> 
> problem is, what happens when the fans move on?* Hey, maybe as they
> mature they will discover classical music (you know, Lisp).

Ick, I always thought of Lisp as much more like Jazz.

-- 
           /|_     .-----------------------.                        
         ,'  .\  / | No to Imperialist war |                        
     ,--'    _,'   | Wage class war!       |                        
    /       /      `-----------------------'                        
   (   -.  |                               
   |     ) |                               
  (`-.  '--.)                              
   `. )----'                               
From: Edi Weitz
Subject: Re: [OT] Garbage collectors for C++
Date: 
Message-ID: <87vfx0p2za.fsf@bird.agharta.de>
···@famine.OCF.Berkeley.EDU (Thomas F. Burdick) writes:

> Kenny Tilton <·······@nyc.rr.com> writes:
> 
> > Tim Daly, Jr. wrote:
> > > So, should I interpret that as "the latest language having
> > > forced indentation rules" or "the latest language on the block,
> > > and it has forced indentation rules"?  I guess the former,
> > > because I think Ruby is an even later language on the block.
> > > When did scripting languages become boy bands?
> > 
> > when they made it the prime design directive to attract hordes of
> > squealing groupies.
> > 
> > problem is, what happens when the fans move on?* Hey, maybe as
> > they mature they will discover classical music (you know, Lisp).
> 
> Ick, I always thought of Lisp as much more like Jazz.

Hehe, I wanted to post the same answer last night but somehow forgot
to do it. Just wanted to make sure that Google Groups reports a 2:1
win for Jazz vs. Classical... :)

Cheers,
Edi.
From: Kenny Tilton
Subject: Re: [OT] Garbage collectors for C++
Date: 
Message-ID: <3EAC065E.9060409@nyc.rr.com>
Edi Weitz wrote:
> ···@famine.OCF.Berkeley.EDU (Thomas F. Burdick) writes:
> 
> 
>>Kenny Tilton <·······@nyc.rr.com> writes:
>>
>>
>>>Tim Daly, Jr. wrote:
>>>
>>>>So, should I interpret that as "the latest language having
>>>>forced indentation rules" or "the latest language on the block,
>>>>and it has forced indentation rules"?  I guess the former,
>>>>because I think Ruby is an even later language on the block.
>>>>When did scripting languages become boy bands?
>>>
>>>when they made it the prime design directive to attract hordes of
>>>squealing groupies.
>>>
>>>problem is, what happens when the fans move on?* Hey, maybe as
>>>they mature they will discover classical music (you know, Lisp).
>>
>>Ick, I always thought of Lisp as much more like Jazz.
> 
> 
> Hehe, I wanted to post the same answer last night but somehow forgot
> to do it. Just wanted to make sure that Google Groups reports a 2:1
> win for Jazz vs. Classical... :)

Isn't Duane Rettig on record as favoring the Jazz analogy?

Anyway, youse guys just flunked the Miller Analogy Test! The essential 
idea was "growing out of infatuation with some inferior form to a 
superior form". Which superior form is irrelevant, and focusing now on 
that is a perfect example of Usenet nonrigor. But now that we are 
here... <g>

...the way I program feels more like bangin' on the bongos like a 
chimpanzee.*


* Dire Straits, "Money For Nothing", _Brothers In Arms_.

-- 

  kenny tilton
  clinisys, inc
  http://www.tilton-technology.com/
  ---------------------------------------------------------------
"Everything is a cell." -- Alan Kay
From: Alan Shutko
Subject: Re: [OT] Garbage collectors for C++
Date: 
Message-ID: <87u1cl4719.fsf@wesley.springies.com>
···@apocalypse.OCF.Berkeley.EDU (Thomas F. Burdick) writes:

> (BTW, if you'd put ttlotbafir into a google groups search, it would've
> been more enlightening)

Now it is... before, I couldn't find anything that expanded it.

-- 
Alan Shutko <···@acm.org> - I am the rocks.
Looking for a developer in St. Louis? http://web.springies.com/~ats/
Make like an alligator and drag your butt out of here.
From: Paolo Amoroso
Subject: Re: [OT] Garbage collectors for C++
Date: 
Message-ID: <yU6pPu5mDH394rAB=OL3816=STYI@4ax.com>
On 25 Apr 2003 13:26:59 +0200, Jacek Generowicz <················@cern.ch>
wrote:

> Basile STARYNKEVITCH <·········@SPAM+starynkevitch.net.invalid> writes:
[...]
> > Since you are from CERN, I assume you want to do intensive numerical
> > calculations.
[...]
> Sorry, we do everything in C++, because it is such a wonderful
> language for developing complex interactive systems quickly and
> robustly[*]. However, we have discovered Python (tllotbafir[+]), so we
> are allowed to wrap bits of our C++ code in the latter. OCaml is
> definitely too far off the planet for our use.

What about the group of Lisp users at lisp.cern.ch? Is Lisp used at CERN?


Paolo
-- 
Paolo Amoroso <·······@mclink.it>
From: Jacek Generowicz
Subject: Re: [OT] Garbage collectors for C++
Date: 
Message-ID: <tyfsms2dhgs.fsf@pcepsft001.cern.ch>
Paolo Amoroso <·······@mclink.it> writes:

> On 25 Apr 2003 13:26:59 +0200, Jacek Generowicz <················@cern.ch>
> wrote:
> 
> > Sorry, we do everything in C++, because it is such a wonderful
> > language for developing complex interactive systems quickly and
> > robustly[*]. However, we have discovered Python (tllotbafir[+]), so we
> > are allowed to wrap bits of our C++ code in the latter. OCaml is
> > definitely too far off the planet for our use.
> 
> What about the group of Lisp users at lisp.cern.ch? 

That's, amongst others, me. One of our number, for example, is
fortunate enough to be working on a project which uses Lisp, after
his group evaluated it in context of languages such as OCaml.

My situation is very different from that. Remember that CERN is a
large place, with many different activities going on; in the above my
use of "we" was meant to refer to the groups with which I have direct
contact, where C++ and XML rule.

> Is Lisp used at CERN?

Not on any large scale, that I am aware of.