Boost logo

Boost :

From: David Bergman (davidb_at_[hidden])
Date: 2002-09-05 12:44:00


I assume you have tried all different forms of work postures, but
friends of mine, suffering from something similar to RSI, do use desks
that you can raise up to a standing position, so that they stand up for
two, three hours a day. Well, anyway, I hope we have not wasted those
hours on these allocation arguments.

This is what I (in my not-so-subtle way, sorry) found a bit sad: that
all discussions dealt with memory allocation. That seemed (and seems)
weird in a library dealing with demangling C++ names. I would like to
have seen discussions about the accuracy and/or efficiency of the
demangling, and the interface to demangle (excluding allocator issues)
names, and perhaps proposed additions, such as to be able to mangle
names. But, it could be the case that all the demangling functionality
is already at perfection, leaving nothing else but a side-issue to drive
this thread...

Hope you made it to dinner,


-----Original Message-----
From: boost-bounces_at_[hidden]
[mailto:boost-bounces_at_[hidden]] On Behalf Of Carlo Wood
Sent: Thursday, September 05, 2002 1:24 PM
To: boost_at_[hidden]
Subject: Re: [boost] Demangler, summary.

On Thu, Sep 05, 2002 at 11:20:29AM -0400, David Abrahams wrote:
> Please, everybody step back and take a few breaths. Exercise patience
> with your Boost colleagues, and I'm sure a great solution will emerge.

But he is right that I should explain - allow me to give
an listing of facts - in order to get our minds lined up again.

* I have severe form of RSI (Repitive Strain Injury). This means
  that I can only work 4 hours per day at most while having work
  for 12 hours. I need to take breaks every 10 minutes and then
  emmerge my arms in hot water in order to make sure I get enough
  blood in them (again). This gives me a very bad temper (I already
  suffer from this for 1.5 years now) even less patience then I
  normally have a good reason to use the phrase "I have no time
  for this".

* I wrote C++ debugging support library (libcwd) - this took me
  several years (full time - one of the reasons I got RSI).
  I got no money whatsoever for it; so all value that I assign to
  it emotional.

* For this library I needed a demangler. I wrote a demangler from
  scratch because I to be able to pass an Allocator to it (and
  because there was a license issue: I am using the QPL and the
  existing public available demangler has a GPL license, which
  are not compatible).

* Many people asked me to use my demangler, mostly because it is
  better than the GNU one (they even want to replace theirs with
  mine, which bounced on the fact that the FSF was incapable of
  sending me an email with the promise that they would not publish
  my real name on a website (I have to give them the copy rights
  of my code if I want to contribute, and therefore sign something
  with my real name).

* David Abrahams asked me to contribute my demangler code to boost.
  I still don't know how he did it, but he convinced me somehow.

* I am willing to give away my hard work, but only when the following
  demands are met:
  - I want to keep the copyright (and that is normal with boost,
    unlike the FSF).
  - My name must be at the top (again, normal for boost).
  - I want to continue to be the maintainer BECAUSE I want to make
    sure that everything below we continue to stay that way:
  - I want to be able to use the boost version directly with libcwd.
  - I don't have to (re)write a demangler from scratch, because
    I "have no time" for that.

Now the more technical facts:

* Every demangler needs temporary storage.

* I want this temporary storage to be (allowed to be) dynamic
  (arbitrarily large) because the actually needed ammount of
  memory is depending on the input and thus arbitrary. With
  my name above the demangler code I don't want it not to work
  under certain circumstances.

* Libcwd needs a very special customized allocator to be used.

* The most commonly used input to demangle will be typeid().name()
  which is a char const*, the (existing) demangler code uses
  the fact that the input is a contigious char array and I have
  no time to rewrite that.

All these things together lead to the my final conclusion,
as mailed before, that the interface has to be:

  template<typename Allocator>
    struct demangler {
      static std::basic_string<char, std::char_traits<char>, Allocator>
        type(char const* in);
      static std::basic_string<char, std::char_traits<char>, Allocator>
        symbol(char const* in);

Once that is approved, I am willing to add ANY number of wrappers around
that to give you any interface you want.

Having typed much longer than 10 minutes (!@!%$@%$!%#$) and feeling that
:((, and having missed my dinner as well (I eat out doors, and they
close at 19:30 - now it is 19:23),

Carlo Wood <carlo_at_[hidden]>
Unsubscribe & other changes:

Boost list run by bdawes at, gregod at, cpdaniel at, john at