Re: Standing on the Giants shoulders... :-)

Discussion in 'C++' started by James Kanze, May 31, 2008.

  1. James Kanze

    James Kanze Guest

    On May 30, 8:02 pm, kwikius <> wrote:
    > On May 30, 10:18 am, James Kanze <> wrote:


    > > On May 30, 6:00 am, "kwikius" <> wrote:


    > > > quan
    > > >http://tinyurl.com/5lxb3s
    > > > std
    > > >http://tinyurl.com/6k9b7f
    > > > hmm... something smells a bit whiffy ..


    > > Sorry, but I don't follow you. What's the relationship
    > > between the two?


    > The duration type is pretty much of an exact replica of the quan
    > quantity.


    The duration type is pretty much a simple example of a classical
    "units" type. The first time I saw something along those lines
    was at least 15 years ago. It's hardly a new idea. (I actually
    suspect that it's been "invented" independently many times.)

    > From the text the impression one gets is that the design is
    > basically that of Jeff Garland boost date time lib, with
    > some vague reference to Walter Brown, presumably SI units
    > library and implementation by Howard Hinnant.


    The actual design did start out with something from Boost. I'm
    pretty sure of that. Where the author of Boost got his ideas, I
    don't know, but I don't see any reason to think that they come
    from some library no one has basically heard of. (The
    references in the Boost documentation cite some 10 or 15
    different libraries. Presumably if quan had played a role, it
    would be cited there as well.)

    > I believe Walter Brown used compile time rational numbers [1]
    > in SIUnits, as did Barton & Nackman, but they only used
    > compile time rationals for dimensional analysis, not
    > conversion factors (meter to millimeters etc).


    As I said, I have been aware of this possibility for at least 15
    years. And while I don't know of its relationship with Walter's
    SIUnits, I do know that a class with this name was available
    publicly over ten years ago. (But Walter could just as easily
    have come up with the same thing---and the name is rather
    obvious.)

    > The original use of compile time rationals for the units was
    > AFAIK my pqs library, the forerunner of my quan library in the
    > above link. (Originally pqs used 2 separate compile time
    > integers, but it was Brandon Forehand that pointed out that
    > they were in fact acting as a rational number, and pqs was
    > subsequently modified accordingly).


    I'm not too sure what you mean by "compile time rationals", but
    libraries which would support assigning meters to millimeters,
    for example, with automatic scaling, are not particularly new.

    > In fact Mr Garland did use conversion factors in his boost
    > date time lib, but used runtime scaling (in an explicit ctor
    > at least in boost_1.33.0), all values were kept internally in
    > milliseconds in a base class.


    I've seen both techniques, both many years ago. I think both
    date back to the early days of Algol.

    --
    James Kanze (GABI Software) email:
    Conseils en informatique orientée objet/
    Beratung in objektorientierter Datenverarbeitung
    9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34
    James Kanze, May 31, 2008
    #1
    1. Advertising

  2. On 2008-05-31 10:49, James Kanze wrote:
    > On May 30, 8:02 pm, kwikius <> wrote:
    >> On May 30, 10:18 am, James Kanze <> wrote:

    >
    >> > On May 30, 6:00 am, "kwikius" <> wrote:

    >
    >> > > quan
    >> > >http://tinyurl.com/5lxb3s
    >> > > std
    >> > >http://tinyurl.com/6k9b7f
    >> > > hmm... something smells a bit whiffy ..

    >
    >> > Sorry, but I don't follow you. What's the relationship
    >> > between the two?

    >
    >> The duration type is pretty much of an exact replica of the quan
    >> quantity.

    >
    >> From the text the impression one gets is that the design is
    >> basically that of Jeff Garland boost date time lib, with
    >> some vague reference to Walter Brown, presumably SI units
    >> library and implementation by Howard Hinnant.

    >
    >> I believe Walter Brown used compile time rational numbers [1]
    >> in SIUnits, as did Barton & Nackman, but they only used
    >> compile time rationals for dimensional analysis, not
    >> conversion factors (meter to millimeters etc).

    >
    >> In fact Mr Garland did use conversion factors in his boost
    >> date time lib, but used runtime scaling (in an explicit ctor
    >> at least in boost_1.33.0), all values were kept internally in
    >> milliseconds in a base class.


    Ok, so according to you at least two of the authors have some previous
    experiences with writing unit libraries, and a quick search reveals that
    at least one more (Marc Paterno) uses C++ for physics simulation. And
    you somehow find it strange that together they manage to slightly evolve
    some of their previous work? I mean, the step from run-time scaling to
    compile-time is not that large.

    --
    Erik Wikström
    Erik Wikström, May 31, 2008
    #2
    1. Advertising

  3. James Kanze

    kwikius Guest

    On May 31, 10:20 am, Erik Wikström <> wrote:


    > I mean, the step from run-time scaling to
    > compile-time is not that large.


    Yep Its a tiny step, but (though I say so myself) ... brilliant and
    renders the old technique redundant because its both faster and more
    accurate.

    SIUnits ( fermilab --> Walter Brown, hence Marc Patterno <--fermilab)
    has been around for many years and they didnt figure it out, their
    approach loses precision and is slow.

    Makes em look pretty stupid don't it... ?

    Of course when you explain the technique everybody says... well thats
    obvious..I could have thought of that...

    Difference is ... I Did think of that.

    Now it seesm there is a lot of other people running around trying to
    slyly imply that They thought of it.

    :)

    regards
    Andy Little
    kwikius, May 31, 2008
    #3
  4. James Kanze

    kwikius Guest

    On May 31, 9:49 am, James Kanze <> wrote:

    > I'm not too sure what you mean by "compile time rationals", but
    > libraries which would support assigning meters to millimeters,
    > for example, with automatic scaling, are not particularly new.


    No offence intended Mr Kanze, but if you don't know what a "compile
    time rational" is then you really arent qualified to say that the
    technique is "particularly new" or not.

    regards
    Andy Little
    kwikius, May 31, 2008
    #4
  5. James Kanze

    James Kanze Guest

    On May 31, 3:13 pm, kwikius <> wrote:
    > On May 31, 9:49 am, James Kanze <> wrote:


    > > I'm not too sure what you mean by "compile time rationals",
    > > but libraries which would support assigning meters to
    > > millimeters, for example, with automatic scaling, are not
    > > particularly new.


    > No offence intended Mr Kanze, but if you don't know what a
    > "compile time rational" is then you really arent qualified to
    > say that the technique is "particularly new" or not.


    I'm willing to believe that you may have invented the term, but
    all of the techniques described in the standard document you
    cited have been known for at least fifteen years. As I said,
    from what I've read, I gather that they were being considered
    when the original Algol standard was proposed, and I've
    definitely discussed them with people in email some ten or
    fifteen years ago. I also believe that they are "obvious"
    enough that they have probably been independently reinvented
    many times.

    --
    James Kanze (GABI Software) email:
    Conseils en informatique orientée objet/
    Beratung in objektorientierter Datenverarbeitung
    9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34
    James Kanze, Jun 1, 2008
    #5
  6. James Kanze

    kwikius Guest

    On Jun 1, 1:10 am, James Kanze <> wrote:
    > On May 31, 3:13 pm, kwikius <> wrote:
    >
    > > On May 31, 9:49 am, James Kanze <> wrote:
    > > > I'm not too sure what you mean by "compile time rationals",
    > > > but libraries which would support assigning meters to
    > > > millimeters, for example, with automatic scaling, are not
    > > > particularly new.

    > > No offence intended Mr Kanze, but if you don't know what a
    > > "compile time rational" is then you really arent qualified to
    > > say that the technique is "particularly new" or not.

    >
    > I'm willing to believe that you may have invented the term,


    :) ...

    I didnt invent the term, nor claim to have "invented" the compile time
    rational.

    <...>

    >  I also believe that they are "obvious"
    > enough that they have probably been independently reinvented
    > many times.


    Oh Yes.. there's certainly been a fair amount of "reinvention" going
    on

    :)

    Your animation is quite understandable. After all you inhabit the same
    brotherhood as the people that wrote the paper.

    I actually now just find this whole business very amusing, well ...
    and somewhat sad. The truth is the truth and well documented over a
    period of some yers for any one that cares to look. What I find
    fascinating now is the amount of FUD that has been shoved around.

    I wrote pqs, the forerunner to quan to solve a simple problem, because
    I spent a long time looking for a physical quantities library but none
    met my needs. No one had written a library with the "obvious"
    solution, which I found surprising as it is indeed obvious as you
    say...

    well OTOH everything is obvious once it has been demonstrated aint
    it :)

    regards
    Andy Little
    kwikius, Jun 1, 2008
    #6
  7. James Kanze

    James Kanze Guest

    On Jun 1, 4:40 am, kwikius <> wrote:
    > On Jun 1, 1:10 am, James Kanze <> wrote:


    > <...>


    > > I also believe that they are "obvious" enough that they have
    > > probably been independently reinvented many times.


    > Oh Yes.. there's certainly been a fair amount of "reinvention"
    > going on


    > :)


    > Your animation is quite understandable. After all you inhabit
    > the same brotherhood as the people that wrote the paper.


    What brotherhood is that? I'm certainly not involved in any way
    with Boost (although I like a lot---but not everything---of what
    they do). And in the standards committee, my activity is mostly
    in the language section, and except for threading and garbage
    collection, exclusively involved with improving existing
    elements. Of the authors, I've meant Howard once, Walter and I
    are old sparring partners (because I rather think that D is a
    waste of time), and I've never even heard of the other two.

    > I actually now just find this whole business very amusing,
    > well ... and somewhat sad. The truth is the truth and well
    > documented over a period of some years for any one that cares
    > to look.


    You mean like the proposals for Units in Algol.

    --
    James Kanze (GABI Software) email:
    Conseils en informatique orientée objet/
    Beratung in objektorientierter Datenverarbeitung
    9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34
    James Kanze, Jun 1, 2008
    #7
  8. James Kanze

    kwikius Guest

    On Jun 1, 10:34 am, James Kanze <> wrote:
    > On Jun 1, 4:40 am, kwikius <> wrote:


    <...>

    > What brotherhood is that?  I'm certainly not involved in any way
    > with Boost (although I like a lot---but not everything---of what
    > they do).  And in the standards committee, my activity is mostly
    > in the language section, and except for threading and garbage
    > collection, exclusively involved with improving existing
    > elements.  Of the authors, I've meant Howard once, Walter and I
    > are old sparring partners (because I rather think that D is a
    > waste of time), and I've never even heard of the other two.


    err.. hmm... Walter E. Brown, Fermilab, author of SIUnits ... not
    Walter Bright, C++ innovator and author of D, nor even Walter Banks..
    extender of C, Bytecraft.

    > > I actually now just find this whole business very amusing,
    > > well ...  and somewhat sad. The truth is the truth and well
    > > documented over a period of some years for any one that cares
    > > to look.

    >
    > You mean like the proposals for Units in Algol.


    That sounds like a lot of fun :) ... but Without a link to the
    details its FUD and handwaving, so... Care to provide a link to these
    proposals?

    And BTW If anyone can provide good evidence of prior art ( solid
    evidence, not handwaving) in relation to the mechanisms of Units
    conversion in Quan, please don't hold back... I have spent a fair
    amount of time researching this subject and so far havent found
    anything similar prior to pqs the predecessor to quan, despite the
    fact that After I published it everybody seems to say how obvious it
    is...

    Obvious ? Sure.. except that that no one actually seems to have done
    it ... before I did.

    Now there seem to be peple trying to slyly give the impression that
    its all their idea, without actually making a definitive statement
    (funnily enough some of the same people coincidentally having dished a
    lot of dirt out in relation to me and my work.).

    Essentially theres a lot of people trying to pretend I and Quan don't
    exist, and that is downright offensive.

    regards
    Andy Little
    kwikius, Jun 1, 2008
    #8
  9. James Kanze

    James Kanze Guest

    On Jun 1, 4:01 pm, kwikius <> wrote:
    > On Jun 1, 10:34 am, James Kanze <> wrote:


    > > On Jun 1, 4:40 am, kwikius <> wrote:


    > <...>


    > > What brotherhood is that? I'm certainly not involved in any way
    > > with Boost (although I like a lot---but not everything---of what
    > > they do). And in the standards committee, my activity is mostly
    > > in the language section, and except for threading and garbage
    > > collection, exclusively involved with improving existing
    > > elements. Of the authors, I've meant Howard once, Walter and I
    > > are old sparring partners (because I rather think that D is a
    > > waste of time), and I've never even heard of the other two.


    > err.. hmm... Walter E. Brown, Fermilab, author of SIUnits ...
    > not Walter Bright, C++ innovator and author of D, nor even
    > Walter Banks.. extender of C, Bytecraft.


    Oops.

    > > > I actually now just find this whole business very amusing,
    > > > well ... and somewhat sad. The truth is the truth and well
    > > > documented over a period of some years for any one that cares
    > > > to look.


    > > You mean like the proposals for Units in Algol.


    > That sounds like a lot of fun :) ... but Without a link to
    > the details its FUD and handwaving, so... Care to provide a
    > link to these proposals?


    I'm afraid the Web wasn't used much back in the early days of
    Algol.

    [...]
    > Now there seem to be peple trying to slyly give the impression
    > that its all their idea,


    Actually, you seem to be the only one claiming its their idea.
    All of the others seem to consider it as more or less usual
    practice.

    --
    James Kanze (GABI Software) email:
    Conseils en informatique orientée objet/
    Beratung in objektorientierter Datenverarbeitung
    9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34
    James Kanze, Jun 1, 2008
    #9
  10. James Kanze

    kwikius Guest

    On Jun 1, 9:24 pm, James Kanze <> wrote:

    > Actually, you seem to be the only one claiming its their idea.


    Thats because it is my idea.

    regards
    Andy Little
    kwikius, Jun 2, 2008
    #10
  11. James Kanze

    Noah Roberts Guest

    James Kanze wrote:

    > I'm not too sure what you mean by "compile time rationals",


    Then you're actually completely wrong about having been aware of this
    programming method for the last 15 years. The static_rational that Andy
    is talking about is central to his, and many others, units library.
    Noah Roberts, Jun 2, 2008
    #11
  12. James Kanze

    Noah Roberts Guest

    kwikius wrote:
    > On May 31, 10:20 am, Erik Wikström <> wrote:
    >
    >
    >> I mean, the step from run-time scaling to
    >> compile-time is not that large.

    >
    > Yep Its a tiny step, but (though I say so myself) ... brilliant and
    > renders the old technique redundant because its both faster and more
    > accurate.
    >
    > SIUnits ( fermilab --> Walter Brown, hence Marc Patterno <--fermilab)
    > has been around for many years and they didnt figure it out, their
    > approach loses precision and is slow.
    >
    > Makes em look pretty stupid don't it... ?
    >
    > Of course when you explain the technique everybody says... well thats
    > obvious..I could have thought of that...
    >
    > Difference is ... I Did think of that.
    >
    > Now it seesm there is a lot of other people running around trying to
    > slyly imply that They thought of it.


    It's actually an obvious step to do unit conversion at compile time. I
    was working on it independently before I ran into its use in your
    library and decided it was a waste to research a solution to a problem
    that had been solved. The static_rational metafunction, which you admit
    to using from somewhere else, was key to solving the problem. So you
    were standing on others' shoulders as well.
    Noah Roberts, Jun 2, 2008
    #12
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Brent White
    Replies:
    2
    Views:
    379
    =?Utf-8?B?QnJlbnQgV2hpdGU=?=
    Jul 18, 2007
  2. kwikius
    Replies:
    1
    Views:
    266
    James Kanze
    May 30, 2008
  3. kwikius
    Replies:
    2
    Views:
    311
    kwikius
    Jun 2, 2008
  4. Brent Roman
    Replies:
    6
    Views:
    115
    Brent Roman
    Dec 27, 2004
  5. Chris Pearl
    Replies:
    6
    Views:
    123
    David Vallner
    Dec 6, 2006
Loading...

Share This Page