473,386 Members | 1,798 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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

On May 30, 10:18 am, James Kanze <james.ka...@gmail.comwrote:
On May 30, 6:00 am, "kwikius" <a...@servocomm.freeserve.co.ukwrote:
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.

But.....

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).
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).
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.

Compared with quans method this approach has both a poor range and
loss of precision due to the initial division.
As far as Mr Brown is concerned, he appears until very recently to
have found *problematic*, treating quantities with different
conversion factors as different types (rather than using one type and
doing a runtime scaling, the SIUnits approach).

See wg21 n2526 section 4.1, 4.2 4.3 etc. (Quite a funny read
actually :-))

My guess is that he has been swung around, because in use it is
obvious that the approach used by quan is much superior... the
approach in second link. sorry SIUnits.

I spent a large amount of time working out and arguing for the
approach these guys seem to be taking the credit for between 2003-2007
on boost.org amidst a large amount of naive criticism, and where Mr
Garland is a moderator so IOW he must be familiar with my work. Mr
Garland eventually succeeded in initiating a flame war on boost.org
during middle of which he informed me that he was singling my posts
out for moderation, akin to tieing someones hands behind their back
and slapping them about. At which point I left.
.... hence the source of the smell.

regards
Andy Little


note 1
(Unfortunately I wrongly attributed the origin of compile time
rational to Matthias Schabel in quan-0_2_0), but compile time
rationals appears AFAIK in SIUnits and a physical quantities lib,
ebf_units by Eric Ford around 2003, shortly before my earliset pqs
libray, predecessor to quan.)





Jun 27 '08 #1
2 1799
James Kanze wrote:
On Jun 1, 4:01 pm, kwikius <a...@servocomm.freeserve.co.ukwrote:
>On Jun 1, 10:34 am, James Kanze <james.ka...@gmail.comwrote:
On Jun 1, 4:40 am, kwikius <a...@servocomm.freeserve.co.ukwrote:
><...>
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.
An ordinary reference like Author, Year, Title, ... would be cool, too.
Then, one would have a chance to find it in a library.

[...]
>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.
I wonder, whether it is all that clear what "it" is. I don't think that Mr
Little claims to be the first to use converions factors to deal with
different units. There must be something about the internals of his quan
library that he thinks is originall, and while I am not sure what _it_ is,
I suspect it might have escaped you too. Sometimes, thinks look
superficially similar to something well known and the cute trick and twist,
which is actually new, is somewhat hidden.

A guess from elsethread is that "compile time rationals" (whatever that is)
might be the new idea of Mr Little. I am not familiar with Algol, but I
wonder whether it supports templates to the extend necessary to realize
compile time rationals (which probably would have to entail computing GCDs
at compile time).
Best

Kai-Uwe Bux

Jun 27 '08 #2
On Jun 1, 9:39 pm, Kai-Uwe Bux <jkherci...@gmx.netwrote:

<...>
I wonder, whether it is all that clear what "it" is. I don't think that Mr
Little claims to be the first to use converions factors to deal with
different units. There must be something about the internals of his quan
library that he thinks is originall, and while I am not sure what _it_ is,
At the end of the following post of mine on clc++ is some code showing
a highly simplified version of the techniques in quan, this just deals
with simple integer exponents, but gives a flavour...

http://tinyurl.com/5qvnzt

.... but quan actually uses rationals ( a rational exponent and a
rational multiplier per unit (standards proposal can only deal with
multiplier part) where you can have much more flexibility in scaling
values between quantities in different units
Note that the version used in quan-0_2_0 also performs optimised calcs
between scaling factors during compile time to do as much of the calc
in conversions as possible at compiletime not runtime:

http://tinyurl.com/6nuuet
This is the same approach used in the standard proposal, except that
quan can deal with all types of quantities(including non si ones), not
just time, multiply add, divide, pow, etc with huge range, speed and
accuracy. (AFAICS "duration" type in standards proposal only uses a
multiplier, not exponent too as in quan... range in quan is huge
compared, with no cost in runtime space, speed or accuracy... highly
desirable for engineering, aerospace etc, etc.)

regards
Andy Little

Jun 27 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

18
by: Larry Herbinaux | last post by:
I'm having issues with garbage collection with my long-standing service process. If you could review and point me in the right direction it would be of great help. If there are any helpful...
3
NewYorker
by: NewYorker | last post by:
Hello brothers and sisters, Please help me complete this program and get the output shown below. Here is all I have ___________________________________________________________ This...
4
bartonc
by: bartonc | last post by:
Currently, a Google search for http://www.google.com/search?hl=en&q=python+forum brings up the Python Forum on TheScripts.com in 10th place. I have found that simply posting a google link tends to...
1
by: mrjaune | last post by:
Hello Everyone, I want to create an application to do the standing of a race. First part, for each pilot I want to enter: his name, his number, his team, the number of points. Second part, when...
3
by: mrjaune | last post by:
Hi, I'm quite a newbie and I want create an application to generate the standing of a race. 1 - You enter the data relating to the racers: Name Number Points in round 1 Points in round 2 2-...
1
by: kwikius | last post by:
quan http://tinyurl.com/5lxb3s std http://tinyurl.com/6k9b7f hmm... something smells a bit whiffy ..
11
by: James Kanze | last post by:
On May 30, 8:02 pm, kwikius <a...@servocomm.freeserve.co.ukwrote: The duration type is pretty much a simple example of a classical "units" type. The first time I saw something along...
3
by: thesinnerishere | last post by:
this is regarding the last number standing problem. it requires the number in an array to be extracted at a specified position . then the array needs to traverse through the right position of the...
4
by: Michael R | last post by:
Hi everyone. For a coding of something which seem too long to explain, I need to find out, by .recordset or any other way, whether or not I (the user) am standing on the new record row in a form....
0
by: muddasirmunir | last post by:
I have computer CPU Casing in standing style , I want to know if i put my CPU in lying can it affect some things/functions of my computer. I know my cd rom will have some problem as the cd my not sit...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.