Topic: Why is chrono so shortsighted?


Author: carel.combrink@gmail.com
Date: Fri, 26 May 2017 05:08:16 -0700 (PDT)
Raw View
------=_Part_1002_309170949.1495800496250
Content-Type: multipart/alternative;
 boundary="----=_Part_1003_870197933.1495800496251"

------=_Part_1003_870197933.1495800496251
Content-Type: text/plain; charset="UTF-8"

Hi All,

Don't get me wrong, the chrono library added in C++11 is absolutely
brilliant.

BUT: Time is not the only unit that many C++ developers use. Many
developers use other units like distance, frequency, etc.

The way chrono is implemented does not give developers the option to extend
the powerful conversion support implemented in the library.

What I am referring to is the whole duration structure and the associated
templates and functions, that could be commonly used between different
units.

Some suggestions that I found was to define one's own types using duration
as a base, but this solves the conversion issue, but type safety is then a
problem.
For example:
#define std::chrono::duration<int32_t> meters;
The issue is since it is not type safe, one can assign seconds to meters,
which is a problem.

I have played around with this idea and created a very similar
implementation of a base quantity type but using a opaque or phantom type
to ensure type safety (based on a CppCon talk I saw on this).

Currently duration is defined as follow:

   template<typename _Rep, typename _Period = ratio<1>> struct duration;

   typedef duration<int64_t> seconds;


So what I have come up with is a base structure defined as follow:

    template<typename _Rep, typename _Period, typename _Quantity> struct quantity_base;


Which is then used as follow, to redefine the time types (for example and tests):

    struct unit_time;


    template<typename _Rep, typename _Period = std::ratio<1>>

      using duration = quantity_base<_Rep, _Period, unit_time>;


    typedef duration<int64_t, std::milli> milliseconds;

    typedef duration<int64_t> seconds;

    typedef duration<int64_t, std::ratio<60>> minutes;


    template<typename _ToQuantity, typename _Rep, typename _Period>

    constexpr typename __check_unit<unit_time, _ToQuantity>::type

    duration_cast(const duration<_Rep, _Period>& __d)

    {

      return quantity_base_cast<_ToQuantity>(__d);

    }


The rest of the templates are almost exactly the same as from chrono, but it takes into account the _Quantity template argument to ensure one can not mix different quantities;


Using this base implementation one can then add new types as follow, for example distance:


      struct unit_distance;


    template<typename _Rep, typename _Period = std::ratio<1>>

    using distance = quantity_base<_Rep, _Period, unit_distance>;


    template<typename _ToQuantity, typename _Rep, typename _Period>

    constexpr typename __check_unit<unit_distance, _ToQuantity>::type

    distance_cast(const distance<_Rep, _Period>& __d)

    {

      return quantity_base_cast<_ToQuantity>(__d);

    }


    typedef distance<int64_t, std::milli> millimeters;

    typedef distance<int64_t> meters;

    typedef distance<int64_t, std::kilo> kilometers;


This implementation is not nearly as advanced as some other libraries, notably the "Unit Conversion and Dimensional Analysis Library" from Nic Holthaus[1]


Is this something that could possibly be incorporated or is planned for future updates?
Not really suggesting to use my implementation, but more the general idea to add support for more units and/or the ability for users to add other units, without having to code all the detail but reuse the "magic" already there in the chrono library.


[1] Unit Conversion and Dimensional Analysis Library <https://nholthaus.github.io/units/index.html>

--
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/55d6a3ba-619f-4870-b133-8b4618f924fc%40isocpp.org.

------=_Part_1003_870197933.1495800496251
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Hi All,<br><br>Don&#39;t get me wrong, the chrono library =
added in C++11 is absolutely brilliant.=C2=A0<div><br></div><div>BUT: Time =
is not the only unit that many C++ developers use. Many developers use othe=
r units like distance, frequency, etc.=C2=A0</div><div><br></div><div>The w=
ay chrono is implemented does not give developers the option to extend the =
powerful conversion support implemented in the library.=C2=A0</div><div><br=
></div><div>What I am referring to is the whole <font face=3D"courier new, =
monospace" color=3D"#0000ff">duration</font> structure and the associated t=
emplates and functions, that could be commonly used between different units=
..=C2=A0</div><div><br></div><div>Some suggestions that I found was to defin=
e one&#39;s own types using duration as a base, but this solves the convers=
ion issue, but type safety is then a problem.</div><div>For example:<br><fo=
nt face=3D"courier new, monospace" color=3D"#0000ff">#define std::chrono::d=
uration&lt;int32_t&gt; meters;</font></div><div>The issue is since it is no=
t type safe, one can assign <font color=3D"#0000ff">seconds</font> to meter=
s, which is a problem. =C2=A0<br></div><div><br></div><div>I have played ar=
ound with this idea and created a very similar implementation of a base qua=
ntity type but using a opaque or phantom type to ensure type safety (based =
on a CppCon talk I saw on this).=C2=A0</div><div><br></div><div>Currently d=
uration is defined as follow:</div><div><pre><span style=3D" color:#808000;=
">   template</span>&lt;<span style=3D" color:#808000;">typename</span><spa=
n style=3D" color:#c0c0c0;"> </span><span style=3D" color:#800080;">_Rep</s=
pan>,<span style=3D" color:#c0c0c0;"> </span><span style=3D" color:#808000;=
">typename</span><span style=3D" color:#c0c0c0;"> </span><span style=3D" co=
lor:#800080;">_Period</span><span style=3D" color:#c0c0c0;"> </span>=3D<spa=
n style=3D" color:#c0c0c0;"> </span><span style=3D" color:#800080;">ratio</=
span>&lt;<span style=3D" color:#000080;">1</span>&gt;&gt; <span style=3D"fo=
nt-family: Arial, Helvetica, sans-serif; color: rgb(128, 128, 0);">struct</=
span><span style=3D"font-family: Arial, Helvetica, sans-serif; color: rgb(1=
92, 192, 192);"> </span><span style=3D"font-family: Arial, Helvetica, sans-=
serif; color: rgb(128, 0, 128);">duration</span><span style=3D"font-family:=
 Arial, Helvetica, sans-serif;">;</span></pre><pre><span style=3D" color:#8=
08000;">   typedef</span><span style=3D" color:#c0c0c0;"> </span><span styl=
e=3D" color:#800080;">duration</span>&lt;<span style=3D" color:#800080;">in=
t64_t</span>&gt;<span style=3D" color:#c0c0c0;"> </span><span style=3D" col=
or:#800080;">seconds</span>;</pre><pre><span style=3D"font-family: Arial, H=
elvetica, sans-serif;"><br></span></pre><pre><span style=3D"font-family: Ar=
ial, Helvetica, sans-serif;">So what I have come up with is a base structur=
e defined as follow:</span></pre><pre><pre><span style=3D" color:#808000;">=
    template</span>&lt;<span style=3D" color:#808000;">typename</span><span=
 style=3D" color:#c0c0c0;"> </span><span style=3D" color:#800080;">_Rep</sp=
an>,<span style=3D" color:#c0c0c0;"> </span><span style=3D" color:#808000;"=
>typename</span><span style=3D" color:#c0c0c0;"> </span><span style=3D" col=
or:#800080;">_Period</span>,<span style=3D" color:#c0c0c0;"> </span><span s=
tyle=3D" color:#808000;">typename</span><span style=3D" color:#c0c0c0;"> </=
span><span style=3D" color:#800080;">_Quantity</span>&gt; <span style=3D"fo=
nt-family: Arial, Helvetica, sans-serif; color: rgb(128, 128, 0);">struct</=
span><span style=3D"font-family: Arial, Helvetica, sans-serif; color: rgb(1=
92, 192, 192);"> </span><span style=3D"font-family: Arial, Helvetica, sans-=
serif; color: rgb(128, 0, 128);">quantity_base</span><span style=3D"font-fa=
mily: Arial, Helvetica, sans-serif;">;</span></pre><pre><span style=3D"font=
-family: Arial, Helvetica, sans-serif;"><br></span></pre><pre><span style=
=3D"font-family: Arial, Helvetica, sans-serif;">Which is then used as follo=
w, to redefine the time types (for example and tests): </span></pre><pre><s=
pan style=3D" color:#808000;">    struct</span><span style=3D" color:#c0c0c=
0;"> </span><span style=3D" color:#800080;">unit_time</span>;</pre><pre><br=
></pre><pre><pre><span style=3D" color:#808000;">    template</span>&lt;<sp=
an style=3D" color:#808000;">typename</span><span style=3D" color:#c0c0c0;"=
> </span><span style=3D" color:#800080;">_Rep</span>,<span style=3D" color:=
#c0c0c0;"> </span><span style=3D" color:#808000;">typename</span><span styl=
e=3D" color:#c0c0c0;"> </span><span style=3D" color:#800080;">_Period</span=
><span style=3D" color:#c0c0c0;"> </span>=3D<span style=3D" color:#c0c0c0;"=
> </span><span style=3D" color:#800080;">std</span>::<span style=3D" color:=
#800080;">ratio</span>&lt;<span style=3D" color:#000080;">1</span>&gt;&gt;<=
/pre><pre>      using<span style=3D"font-family: Arial, Helvetica, sans-ser=
if; color: rgb(192, 192, 192);"> </span><span style=3D"font-family: Arial, =
Helvetica, sans-serif; color: rgb(128, 0, 128);">duration</span><span style=
=3D"font-family: Arial, Helvetica, sans-serif; color: rgb(192, 192, 192);">=
 </span><span style=3D"font-family: Arial, Helvetica, sans-serif;">=3D</spa=
n><span style=3D"font-family: Arial, Helvetica, sans-serif; color: rgb(192,=
 192, 192);"> </span><span style=3D"font-family: Arial, Helvetica, sans-ser=
if; color: rgb(128, 0, 128);">quantity_base</span><span style=3D"font-famil=
y: Arial, Helvetica, sans-serif;">&lt;</span><span style=3D"font-family: Ar=
ial, Helvetica, sans-serif; color: rgb(128, 0, 128);">_Rep</span><span styl=
e=3D"font-family: Arial, Helvetica, sans-serif;">,</span><span style=3D"fon=
t-family: Arial, Helvetica, sans-serif; color: rgb(192, 192, 192);"> </span=
><span style=3D"font-family: Arial, Helvetica, sans-serif; color: rgb(128, =
0, 128);">_Period</span><span style=3D"font-family: Arial, Helvetica, sans-=
serif;">,</span><span style=3D"font-family: Arial, Helvetica, sans-serif; c=
olor: rgb(192, 192, 192);"> </span><span style=3D"font-family: Arial, Helve=
tica, sans-serif; color: rgb(128, 0, 128);">unit_time</span><span style=3D"=
font-family: Arial, Helvetica, sans-serif;">&gt;;</span></pre><pre><span st=
yle=3D"font-family: Arial, Helvetica, sans-serif;"><br></span></pre><pre><s=
pan style=3D" color:#808000;">    typedef</span><span style=3D" color:#c0c0=
c0;"> </span><span style=3D" color:#800080;">duration</span>&lt;<span style=
=3D" color:#800080;">int64_t</span>,<span style=3D" color:#c0c0c0;"> </span=
><span style=3D" color:#800080;">std</span>::<span style=3D" color:#800080;=
">milli</span>&gt;<span style=3D" color:#c0c0c0;"> </span><span style=3D" c=
olor:#800080;">milliseconds</span>;</pre><pre><span style=3D" color:#808000=
;">    typedef</span><span style=3D" color:#c0c0c0;"> </span><span style=3D=
" color:#800080;">duration</span>&lt;<span style=3D" color:#800080;">int64_=
t</span>&gt;<span style=3D" color:#c0c0c0;"> </span><span style=3D" color:#=
800080;">seconds</span>;</pre><pre><span style=3D" color:#808000;">    type=
def</span><span style=3D" color:#c0c0c0;"> </span><span style=3D" color:#80=
0080;">duration</span>&lt;<span style=3D" color:#800080;">int64_t</span>,<s=
pan style=3D" color:#c0c0c0;"> </span><span style=3D" color:#800080;">std</=
span>::<span style=3D" color:#800080;">ratio</span>&lt;<span style=3D" colo=
r:#000080;">60</span>&gt;&gt;<span style=3D" color:#c0c0c0;"> </span><span =
style=3D" color:#800080;">minutes</span>;</pre><pre><br></pre><pre><pre><sp=
an style=3D" color:#c0c0c0;">    </span><span style=3D" color:#808000;">tem=
plate</span>&lt;<span style=3D" color:#808000;">typename</span><span style=
=3D" color:#c0c0c0;"> </span><span style=3D" color:#800080;">_ToQuantity</s=
pan>,<span style=3D" color:#c0c0c0;"> </span><span style=3D" color:#808000;=
">typename</span><span style=3D" color:#c0c0c0;"> </span><span style=3D" co=
lor:#800080;">_Rep</span>,<span style=3D" color:#c0c0c0;"> </span><span sty=
le=3D" color:#808000;">typename</span><span style=3D" color:#c0c0c0;"> </sp=
an><span style=3D" color:#800080;">_Period</span>&gt;</pre><pre><span style=
=3D" color:#c0c0c0;">    </span><span style=3D" color:#808000;">constexpr</=
span><span style=3D" color:#c0c0c0;"> </span><span style=3D" color:#808000;=
">typename</span><span style=3D" color:#c0c0c0;"> </span><span style=3D" co=
lor:#800080;">__check_unit</span>&lt;<span style=3D" color:#800080;">unit_t=
ime</span>,<span style=3D" color:#c0c0c0;"> </span><span style=3D" color:#8=
00080;">_ToQuantity</span>&gt;::type</pre><pre><span style=3D" color:#c0c0c=
0;">    </span>duration_cast(<span style=3D" color:#808000;">const</span><s=
pan style=3D" color:#c0c0c0;"> </span><span style=3D" color:#800080;">durat=
ion</span>&lt;<span style=3D" color:#800080;">_Rep</span>,<span style=3D" c=
olor:#c0c0c0;"> </span><span style=3D" color:#800080;">_Period</span>&gt;&a=
mp;<span style=3D" color:#c0c0c0;"> </span>__d)</pre><pre><span style=3D" c=
olor:#c0c0c0;">    </span>{</pre><pre><span style=3D" color:#c0c0c0;">     =
 </span><span style=3D" color:#808000;">return</span><span style=3D" color:=
#c0c0c0;"> </span><span style=3D" color:#800080;">quantity_base_cast</span>=
&lt;<span style=3D" color:#800080;">_ToQuantity</span>&gt;(__d);</pre><pre>=
<span style=3D" color:#c0c0c0;">    </span>}</pre></pre><pre><br></pre></pr=
e></pre><pre><font face=3D"Arial, Helvetica, sans-serif">The rest of the te=
mplates are almost exactly the same as from chrono, but it takes into accou=
nt the </font>_Quantity <font face=3D"arial, sans-serif">template argument =
to ensure one can not mix different quantities;</font></pre><pre><font face=
=3D"arial, sans-serif"><br></font></pre><pre><font face=3D"arial, sans-seri=
f">Using this base implementation one can then add new types as follow, for=
 example distance:</font></pre><pre><font face=3D"arial, sans-serif"><br></=
font></pre><pre><font face=3D"arial, sans-serif">    </font>  <span style=
=3D"font-family: Arial, Helvetica, sans-serif; color: rgb(128, 128, 0);">st=
ruct</span><span style=3D"font-family: Arial, Helvetica, sans-serif; color:=
 rgb(192, 192, 192);"> </span><span style=3D"font-family: Arial, Helvetica,=
 sans-serif; color: rgb(128, 0, 128);">unit_distance</span><span style=3D"f=
ont-family: Arial, Helvetica, sans-serif;">;</span></pre>
<pre><br></pre>
<pre><span style=3D" color:#c0c0c0;">    </span><span style=3D" color:#8080=
00;">template</span>&lt;<span style=3D" color:#808000;">typename</span><spa=
n style=3D" color:#c0c0c0;"> </span><span style=3D" color:#800080;">_Rep</s=
pan>,<span style=3D" color:#c0c0c0;"> </span><span style=3D" color:#808000;=
">typename</span><span style=3D" color:#c0c0c0;"> </span><span style=3D" co=
lor:#800080;">_Period</span><span style=3D" color:#c0c0c0;"> </span>=3D<spa=
n style=3D" color:#c0c0c0;"> </span><span style=3D" color:#800080;">std</sp=
an>::<span style=3D" color:#800080;">ratio</span>&lt;<span style=3D" color:=
#000080;">1</span>&gt;&gt;</pre>
<pre><span style=3D" color:#c0c0c0;">    </span><span style=3D" color:#8080=
00;">using</span><span style=3D" color:#c0c0c0;"> </span><span style=3D" co=
lor:#800080;">distance</span><span style=3D" color:#c0c0c0;"> </span>=3D<sp=
an style=3D" color:#c0c0c0;"> </span><span style=3D" color:#800080;">quanti=
ty_base</span>&lt;<span style=3D" color:#800080;">_Rep</span>,<span style=
=3D" color:#c0c0c0;"> </span><span style=3D" color:#800080;">_Period</span>=
,<span style=3D" color:#c0c0c0;"> </span><span style=3D" color:#800080;">un=
it_distance</span>&gt;;</pre>
<pre><br></pre>
<pre><span style=3D" color:#c0c0c0;">    </span><span style=3D" color:#8080=
00;">template</span>&lt;<span style=3D" color:#808000;">typename</span><spa=
n style=3D" color:#c0c0c0;"> </span><span style=3D" color:#800080;">_ToQuan=
tity</span>,<span style=3D" color:#c0c0c0;"> </span><span style=3D" color:#=
808000;">typename</span><span style=3D" color:#c0c0c0;"> </span><span style=
=3D" color:#800080;">_Rep</span>,<span style=3D" color:#c0c0c0;"> </span><s=
pan style=3D" color:#808000;">typename</span><span style=3D" color:#c0c0c0;=
"> </span><span style=3D" color:#800080;">_Period</span>&gt;</pre>
<pre><span style=3D" color:#c0c0c0;">    </span><span style=3D" color:#8080=
00;">constexpr</span><span style=3D" color:#c0c0c0;"> </span><span style=3D=
" color:#808000;">typename</span><span style=3D" color:#c0c0c0;"> </span><s=
pan style=3D" color:#800080;">__check_unit</span>&lt;<span style=3D" color:=
#800080;">unit_distance</span>,<span style=3D" color:#c0c0c0;"> </span><spa=
n style=3D" color:#800080;">_ToQuantity</span>&gt;::type</pre>
<pre><span style=3D" color:#c0c0c0;">    </span>distance_cast(<span style=
=3D" color:#808000;">const</span><span style=3D" color:#c0c0c0;"> </span><s=
pan style=3D" color:#800080;">distance</span>&lt;<span style=3D" color:#800=
080;">_Rep</span>,<span style=3D" color:#c0c0c0;"> </span><span style=3D" c=
olor:#800080;">_Period</span>&gt;&amp;<span style=3D" color:#c0c0c0;"> </sp=
an>__d)</pre>
<pre><span style=3D" color:#c0c0c0;">    </span>{</pre>
<pre><span style=3D" color:#c0c0c0;">      </span><span style=3D" color:#80=
8000;">return</span><span style=3D" color:#c0c0c0;"> </span><span style=3D"=
 color:#800080;">quantity_base_cast</span>&lt;<span style=3D" color:#800080=
;">_ToQuantity</span>&gt;(__d);</pre>
<pre><span style=3D" color:#c0c0c0;">    </span>}</pre>
<pre><br></pre>
<pre><span style=3D" color:#c0c0c0;">    </span><span style=3D" color:#8080=
00;">typedef</span><span style=3D" color:#c0c0c0;"> </span><span style=3D" =
color:#800080;">distance</span>&lt;<span style=3D" color:#800080;">int64_t<=
/span>,<span style=3D" color:#c0c0c0;"> </span><span style=3D" color:#80008=
0;">std</span>::<span style=3D" color:#800080;">milli</span>&gt;<span style=
=3D" color:#c0c0c0;"> </span><span style=3D" color:#800080;">millimeters</s=
pan>;</pre>
<pre><span style=3D" color:#c0c0c0;">    </span><span style=3D" color:#8080=
00;">typedef</span><span style=3D" color:#c0c0c0;"> </span><span style=3D" =
color:#800080;">distance</span>&lt;<span style=3D" color:#800080;">int64_t<=
/span>&gt;<span style=3D" color:#c0c0c0;"> </span><span style=3D" color:#80=
0080;">meters</span>;</pre>
<pre><span style=3D" color:#c0c0c0;">    </span><span style=3D" color:#8080=
00;">typedef</span><span style=3D" color:#c0c0c0;"> </span><span style=3D" =
color:#800080;">distance</span>&lt;<span style=3D" color:#800080;">int64_t<=
/span>,<span style=3D" color:#c0c0c0;"> </span><span style=3D" color:#80008=
0;">std</span>::<span style=3D" color:#800080;">kilo</span>&gt;<span style=
=3D" color:#c0c0c0;"> </span><span style=3D" color:#800080;">kilometers</sp=
an>;</pre><pre><br></pre><pre><font face=3D"arial, sans-serif">This impleme=
ntation is not nearly as advanced as some other libraries, notably the &quo=
t;Unit Conversion and Dimensional Analysis Library&quot; from Nic Holthaus[=
1]</font></pre><pre><font face=3D"arial, sans-serif"><br></font></pre><pre>=
<font face=3D"arial, sans-serif">Is this something that could possibly be i=
ncorporated or is planned for future updates?
Not really suggesting to use my implementation, but more the general idea t=
o add support for more units and/or the ability for users to add other unit=
s, without having to code all the detail but reuse the &quot;magic&quot; al=
ready there in the chrono library.</font></pre><pre><br></pre><pre><font fa=
ce=3D"arial, sans-serif">[1] <a href=3D"https://nholthaus.github.io/units/i=
ndex.html">Unit Conversion and Dimensional Analysis Library</a></font></pre=
></div></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/55d6a3ba-619f-4870-b133-8b4618f924fc%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/55d6a3ba-619f-4870-b133-8b4618f924fc=
%40isocpp.org</a>.<br />

------=_Part_1003_870197933.1495800496251--

------=_Part_1002_309170949.1495800496250--

.


Author: Thiago Macieira <thiago@macieira.org>
Date: Fri, 26 May 2017 08:42:13 -0700
Raw View
On Friday, 26 May 2017 05:08:16 PDT carel.combrink@gmail.com wrote:
> Is this something that could possibly be incorporated or is planned for
> future updates?

It's possible, as long as duration doesn't actually change its kind (it's a
struct today, it shall remain a struct).

--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center

--
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/3573205.hgCLitGUfK%40tjmaciei-mobl1.

.


Author: carel.combrink@gmail.com
Date: Tue, 30 May 2017 11:58:48 -0700 (PDT)
Raw View
------=_Part_3846_1717812960.1496170728801
Content-Type: multipart/alternative;
 boundary="----=_Part_3847_967986822.1496170728801"

------=_Part_3847_967986822.1496170728801
Content-Type: text/plain; charset="UTF-8"



>
> It's possible, as long as duration doesn't actually change its kind (it's
> a
> struct today, it shall remain a struct).
>
>
There are currenlty a few other more complete and complex unit libraries
available, like the one mentioned in the original post and Boost.Units
<http://www.boost.org/doc/libs/1_64_0/doc/html/boost_units.html>. Does it
make sense to try and change the way that chrono works to allow for better
reuse, or should the effort rather go into getting such a complex/complete
library into the standard, if at all possible?


--
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/bb0629a6-b3f4-4c54-b4b9-f53e91b565ba%40isocpp.org.

------=_Part_3847_967986822.1496170728801
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><blockquote class=3D"gmail_quote" style=3D"margin: 0;m=
argin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">
<br>It&#39;s possible, as long as duration doesn&#39;t actually change its =
kind (it&#39;s a=20
<br>struct today, it shall remain a struct).
<br>
<br></blockquote><div><br>There are currenlty a few other more complete and=
 complex unit libraries available, like the one mentioned in the original p=
ost and <a href=3D"http://www.boost.org/doc/libs/1_64_0/doc/html/boost_unit=
s.html">Boost.Units</a>. Does it make sense to try and change the way that =
chrono works to allow for better reuse, or should the effort rather go into=
 getting such a complex/complete library into the standard, if at all possi=
ble?<br><br><br></div></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/bb0629a6-b3f4-4c54-b4b9-f53e91b565ba%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/bb0629a6-b3f4-4c54-b4b9-f53e91b565ba=
%40isocpp.org</a>.<br />

------=_Part_3847_967986822.1496170728801--

------=_Part_3846_1717812960.1496170728801--

.


Author: Thiago Macieira <thiago@macieira.org>
Date: Tue, 30 May 2017 12:14:00 -0700
Raw View
On Tuesday, 30 May 2017 11:58:48 PDT carel.combrink@gmail.com wrote:
> > It's possible, as long as duration doesn't actually change its kind (it's
> > a
> > struct today, it shall remain a struct).
>
> There are currenlty a few other more complete and complex unit libraries
> available, like the one mentioned in the original post and Boost.Units
> <http://www.boost.org/doc/libs/1_64_0/doc/html/boost_units.html>. Does it
> make sense to try and change the way that chrono works to allow for better
> reuse, or should the effort rather go into getting such a complex/complete
> library into the standard, if at all possible?

Your objective was to add more units, so I think you should investigate the
solution that includes more units before you investigate the implementation
details (what needs to change in chrono).

--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center

--
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/2535117.SmVkLhljU8%40tjmaciei-mobl1.

.


Author: Tony V E <tvaneerd@gmail.com>
Date: Tue, 30 May 2017 15:21:15 -0400
Raw View
<html><head></head><body lang=3D"en-US" style=3D"background-color: rgb(255,=
 255, 255); line-height: initial;">                                        =
                                              <div style=3D"width: 100%; fo=
nt-size: initial; font-family: Calibri, 'Slate Pro', sans-serif, sans-serif=
; color: rgb(31, 73, 125); text-align: initial; background-color: rgb(255, =
255, 255);">I hear talk of work on a std::units library.&nbsp;</div><div st=
yle=3D"width: 100%; font-size: initial; font-family: Calibri, 'Slate Pro', =
sans-serif, sans-serif; color: rgb(31, 73, 125); text-align: initial; backg=
round-color: rgb(255, 255, 255);"><br></div><div style=3D"width: 100%; font=
-size: initial; font-family: Calibri, 'Slate Pro', sans-serif, sans-serif; =
color: rgb(31, 73, 125); text-align: initial; background-color: rgb(255, 25=
5, 255);">I think a group of people worked on it at Boostcon / C++Now</div>=
                                                                           =
                                                          <div style=3D"wid=
th: 100%; font-size: initial; font-family: Calibri, 'Slate Pro', sans-serif=
, sans-serif; color: rgb(31, 73, 125); text-align: initial; background-colo=
r: rgb(255, 255, 255);"><br style=3D"display:initial"></div>               =
                                                                           =
                                                                           =
                              <div style=3D"font-size: initial; font-family=
: Calibri, 'Slate Pro', sans-serif, sans-serif; color: rgb(31, 73, 125); te=
xt-align: initial; background-color: rgb(255, 255, 255);">Sent&nbsp;from&nb=
sp;my&nbsp;BlackBerry&nbsp;portable&nbsp;Babbage&nbsp;Device</div>         =
                                                                           =
                                                                           =
                   <table width=3D"100%" style=3D"background-color:white;bo=
rder-spacing:0px;"> <tbody><tr><td colspan=3D"2" style=3D"font-size: initia=
l; text-align: initial; background-color: rgb(255, 255, 255);">            =
               <div style=3D"border-style: solid none none; border-top-colo=
r: rgb(181, 196, 223); border-top-width: 1pt; padding: 3pt 0in 0in; font-fa=
mily: Tahoma, 'BB Alpha Sans', 'Slate Pro'; font-size: 10pt;">  <div><b>Fro=
m: </b>carel.combrink@gmail.com</div><div><b>Sent: </b>Tuesday, May 30, 201=
7 2:58 PM</div><div><b>To: </b>ISO C++ Standard - Future Proposals</div><di=
v><b>Reply To: </b>std-proposals@isocpp.org</div><div><b>Subject: </b>Re: [=
std-proposals] Why is chrono so shortsighted?</div></div></td></tr></tbody>=
</table><div style=3D"border-style: solid none none; border-top-color: rgb(=
186, 188, 209); border-top-width: 1pt; font-size: initial; text-align: init=
ial; background-color: rgb(255, 255, 255);"></div><br><div id=3D"_originalC=
ontent" style=3D""><div dir=3D"ltr"><br><blockquote class=3D"gmail_quote" s=
tyle=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-le=
ft: 1ex;">
<br>It's possible, as long as duration doesn't actually change its kind (it=
's a=20
<br>struct today, it shall remain a struct).
<br>
<br></blockquote><div><br>There are currenlty a few other more complete and=
 complex unit libraries available, like the one mentioned in the original p=
ost and <a href=3D"http://www.boost.org/doc/libs/1_64_0/doc/html/boost_unit=
s.html">Boost.Units</a>. Does it make sense to try and change the way that =
chrono works to allow for better reuse, or should the effort rather go into=
 getting such a complex/complete library into the standard, if at all possi=
ble?<br><br><br></div></div>

<p></p>

-- <br>
You received this message because you are subscribed to the Google Groups "=
ISO C++ Standard - Future Proposals" group.<br>
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/bb0629a6-b3f4-4c54-b4b9-f53e91b565ba%=
40isocpp.org?utm_medium=3Demail&amp;utm_source=3Dfooter">https://groups.goo=
gle.com/a/isocpp.org/d/msgid/std-proposals/bb0629a6-b3f4-4c54-b4b9-f53e91b5=
65ba%40isocpp.org</a>.<br>
<br><!--end of _originalContent --></div></body></html>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/20170530192115.5132369.66310.30565%40=
gmail.com?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.com=
/a/isocpp.org/d/msgid/std-proposals/20170530192115.5132369.66310.30565%40gm=
ail.com</a>.<br />

.


Author: carel.combrink@gmail.com
Date: Tue, 30 May 2017 12:48:50 -0700 (PDT)
Raw View
------=_Part_3952_1500422972.1496173731007
Content-Type: multipart/alternative;
 boundary="----=_Part_3953_398109213.1496173731007"

------=_Part_3953_398109213.1496173731007
Content-Type: text/plain; charset="UTF-8"



> I hear talk of work on a std::units library.
>
> I think a group of people worked on it at Boostcon / C++Now
>

I would be very interested to hear more if someone has some information on
this, from a quick google search I could not find anything.

--
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/28958a0c-07a6-4816-af42-39afb44fe6b0%40isocpp.org.

------=_Part_3953_398109213.1496173731007
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><blockquote class=3D"gmail_quote" style=3D"margin: 0;m=
argin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div styl=
e=3D"background-color:rgb(255,255,255);line-height:initial" lang=3D"en-US">=
                                                                           =
           <div style=3D"width:100%;font-size:initial;font-family:Calibri,&=
#39;Slate Pro&#39;,sans-serif,sans-serif;color:rgb(31,73,125);text-align:in=
itial;background-color:rgb(255,255,255)">I hear talk of work on a std::unit=
s library.=C2=A0</div><div style=3D"width:100%;font-size:initial;font-famil=
y:Calibri,&#39;Slate Pro&#39;,sans-serif,sans-serif;color:rgb(31,73,125);te=
xt-align:initial;background-color:rgb(255,255,255)"><br></div><div style=3D=
"width:100%;font-size:initial;font-family:Calibri,&#39;Slate Pro&#39;,sans-=
serif,sans-serif;color:rgb(31,73,125);text-align:initial;background-color:r=
gb(255,255,255)">I think a group of people worked on it at Boostcon / C++No=
w</div></div></blockquote><div><br>I would be very interested to hear more =
if someone has some information on this, from a quick google search I could=
 not find anything.=C2=A0 <br></div></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/28958a0c-07a6-4816-af42-39afb44fe6b0%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/28958a0c-07a6-4816-af42-39afb44fe6b0=
%40isocpp.org</a>.<br />

------=_Part_3953_398109213.1496173731007--

------=_Part_3952_1500422972.1496173731007--

.


Author: carel.combrink@gmail.com
Date: Tue, 30 May 2017 13:07:13 -0700 (PDT)
Raw View
------=_Part_1780_971759507.1496174834028
Content-Type: multipart/alternative;
 boundary="----=_Part_1781_1290207801.1496174834028"

------=_Part_1781_1290207801.1496174834028
Content-Type: text/plain; charset="UTF-8"



> Your objective was to add more units, so I think you should investigate
> the
> solution that includes more units before you investigate the
> implementation
> details (what needs to change in chrono).
>

In my usage of C++ I need only a very small subset of units but with the
auto conversion between different scales in the same unit.

So yes initially I was only hoping to reuse what was already present in
chrono.

But this is perhaps a bigger topic, what type of unit support would one
like to see in the C++ standard in future:
a) A small(ish) library that contains some base units (time being one) but
with the ability for users to extend the units and add those needed without
too much manual code.
b) Or a more full fledged library that understands most base/common units
and can convert between them when used in dimensional analysis with
mathematical operations?

Boost.Unit and the Unit Conversion and Dimensional Analysis Library are
examples of b. What I was leaning towards was more a.
Both of the above are quite powerful, but in my view have some limitations
that are addressed by the chrono library, such as:
- Chrono will not implicitly convert to a unit with a different scale if
precision will be lost (ns -> s) but will convert implicitly if precision
will not be lost (s -> ns).
- The underlying storage unit in chrono is an integer type which removes
the issue of comparing for equality.

--
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/2e55871c-ed65-4795-96a2-627ce3ad338a%40isocpp.org.

------=_Part_1781_1290207801.1496174834028
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><blockquote class=3D"gmail_quote" style=3D"margin: 0;m=
argin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">Your obje=
ctive was to add more units, so I think you should investigate the=20
<br>solution that includes more units before you investigate the implementa=
tion=20
<br>details (what needs to change in chrono).
<br></blockquote><div><br>In my usage of C++ I need only a very small subse=
t of units but with the auto conversion between different scales in the sam=
e unit. <br><br>So yes initially I was only hoping to reuse what was alread=
y present in chrono. <br><br>But this is perhaps a bigger topic, what type =
of unit support would one like to see in the C++ standard in future:<br>a) =
A small(ish) library that contains some base units (time being one) but wit=
h the ability for users to extend the units and add those needed without to=
o much manual code. <br>b) Or a more full fledged library that understands =
most base/common units and can convert between them when used in dimensiona=
l analysis with mathematical operations?<br><br>Boost.Unit and the Unit Con=
version and Dimensional Analysis Library are examples of b. What I was lean=
ing towards was more a.<br>Both of the above are quite powerful, but in my =
view have some limitations that are addressed by the chrono library, such a=
s:<br>- Chrono will not implicitly convert to a unit with a different scale=
 if precision will be lost (ns -&gt; s) but will convert implicitly if prec=
ision will not be lost (s -&gt; ns).<br>- The underlying storage unit in ch=
rono is an integer type which removes the issue of comparing for equality.<=
br></div></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/2e55871c-ed65-4795-96a2-627ce3ad338a%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/2e55871c-ed65-4795-96a2-627ce3ad338a=
%40isocpp.org</a>.<br />

------=_Part_1781_1290207801.1496174834028--

------=_Part_1780_971759507.1496174834028--

.


Author: "Vicente J. Botet Escriba" <vicente.botet@wanadoo.fr>
Date: Wed, 31 May 2017 00:18:10 +0200
Raw View
This is a multi-part message in MIME format.
--------------404C26EE36853BC2A9C1888E
Content-Type: text/plain; charset="UTF-8"; format=flowed
Content-Transfer-Encoding: quoted-printable

Le 30/05/2017 =C3=A0 22:07, carel.combrink@gmail.com a =C3=A9crit :
>
>     Your objective was to add more units, so I think you should
>     investigate the
>     solution that includes more units before you investigate the
>     implementation
>     details (what needs to change in chrono).
>
>
> In my usage of C++ I need only a very small subset of units but with=20
> the auto conversion between different scales in the same unit.
>
> So yes initially I was only hoping to reuse what was already present=20
> in chrono.
>
> But this is perhaps a bigger topic, what type of unit support would=20
> one like to see in the C++ standard in future:
> a) A small(ish) library that contains some base units (time being one)=20
> but with the ability for users to extend the units and add those=20
> needed without too much manual code.
> b) Or a more full fledged library that understands most base/common=20
> units and can convert between them when used in dimensional analysis=20
> with mathematical operations?
>
> Boost.Unit and the Unit Conversion and Dimensional Analysis Library=20
> are examples of b. What I was leaning towards was more a.
> Both of the above are quite powerful, but in my view have some=20
> limitations that are addressed by the chrono library, such as:
> - Chrono will not implicitly convert to a unit with a different scale=20
> if precision will be lost (ns -> s) but will convert implicitly if=20
> precision will not be lost (s -> ns).
> - The underlying storage unit in chrono is an integer type which=20
> removes the issue of comparing for equality.
I believe that a) will already be quite useful and lighter than b). I've=20
a strong_counter class that is quite close to a dimension-less or=20
uni-dimension quantity. Note that I want also to count the number of=20
orange on a bag.

The problem is that these simple quantities will not play well forcedly=20
with multidimensional quantities in b). If we had a design that allows=20
to have simple dimension-less or uni-dimension quantities that work with=20
multidimensional quantities as well, then this could done step by step.=20
So a) should should show a way to b) with backward compatibility.

If we don't want to changes chrono::duration ABI we could always define=20
implicit conversions from/to quantity<time_dimension>.
In the worst case we could have implicit constructors from the=20
quantities defined in a) and the ones defined in b).

I believe there is a lot of people that will profit from a).

Vicente

--=20
You received this message because you are subscribed to the Google Groups "=
ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/5e83a6ba-0c36-6e04-d2e1-4d0f170decbf%40wanadoo.f=
r.

--------------404C26EE36853BC2A9C1888E
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<html>
  <head>
    <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dutf-8=
">
  </head>
  <body text=3D"#000000" bgcolor=3D"#FFFFFF">
    <div class=3D"moz-cite-prefix">Le 30/05/2017 =C3=A0 22:07,
      <a class=3D"moz-txt-link-abbreviated" href=3D"mailto:carel.combrink@g=
mail.com">carel.combrink@gmail.com</a> a =C3=A9crit=C2=A0:<br>
    </div>
    <blockquote type=3D"cite"
      cite=3D"mid:2e55871c-ed65-4795-96a2-627ce3ad338a@isocpp.org">
      <div dir=3D"ltr"><br>
        <blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left:
          0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">Your
          objective was to add more units, so I think you should
          investigate the <br>
          solution that includes more units before you investigate the
          implementation <br>
          details (what needs to change in chrono).
          <br>
        </blockquote>
        <div><br>
          In my usage of C++ I need only a very small subset of units
          but with the auto conversion between different scales in the
          same unit. <br>
          <br>
          So yes initially I was only hoping to reuse what was already
          present in chrono. <br>
          <br>
          But this is perhaps a bigger topic, what type of unit support
          would one like to see in the C++ standard in future:<br>
          a) A small(ish) library that contains some base units (time
          being one) but with the ability for users to extend the units
          and add those needed without too much manual code. <br>
          b) Or a more full fledged library that understands most
          base/common units and can convert between them when used in
          dimensional analysis with mathematical operations?<br>
          <br>
          Boost.Unit and the Unit Conversion and Dimensional Analysis
          Library are examples of b. What I was leaning towards was more
          a.<br>
          Both of the above are quite powerful, but in my view have some
          limitations that are addressed by the chrono library, such as:<br=
>
          - Chrono will not implicitly convert to a unit with a
          different scale if precision will be lost (ns -&gt; s) but
          will convert implicitly if precision will not be lost (s -&gt;
          ns).<br>
          - The underlying storage unit in chrono is an integer type
          which removes the issue of comparing for equality.<br>
        </div>
      </div>
    </blockquote>
    I believe that a) will already be quite useful and lighter than b).
    I've a strong_counter class that is quite close to a dimension-less
    or uni-dimension quantity. Note that I want also to count the number
    of orange on a bag.<br>
    <br>
    The problem is that these simple quantities will not play well
    forcedly with multidimensional quantities in b). If we had a design
    that allows to have simple dimension-less or uni-dimension
    quantities that work with multidimensional quantities as well, then
    this could done step by step. So a) should should show a way to b)
    with backward compatibility.<br>
    <br>
    If we don't want to changes chrono::duration ABI we could always
    define implicit conversions from/to quantity&lt;time_dimension&gt;.<br>
    In the worst case we could have implicit constructors from the
    quantities defined in a) and the ones defined in b).<br>
    <br>
    I believe there is a lot of people that will profit from a).<br>
    <br>
    Vicente<br>
  </body>
</html>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/5e83a6ba-0c36-6e04-d2e1-4d0f170decbf%=
40wanadoo.fr?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/5e83a6ba-0c36-6e04-d2e1-4d0f170decbf=
%40wanadoo.fr</a>.<br />

--------------404C26EE36853BC2A9C1888E--

.


Author: Arthur O'Dwyer <arthur.j.odwyer@gmail.com>
Date: Tue, 30 May 2017 15:55:30 -0700 (PDT)
Raw View
------=_Part_3967_142726855.1496184931068
Content-Type: multipart/alternative;
 boundary="----=_Part_3968_1180571764.1496184931068"

------=_Part_3968_1180571764.1496184931068
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Tuesday, May 30, 2017 at 12:48:51 PM UTC-7, carel.c...@gmail.com wrote:
>
>
> I hear talk of work on a std::units library.=20
>>
>> I think a group of people worked on it at Boostcon / C++Now
>>
>
> I would be very interested to hear more if someone has some information o=
n=20
> this, from a quick google search I could not find anything. =20
>

I can confirm that yes, one group of participants at Library-in-a-Week was=
=20
exploring the Boost.Units space. I don't know who all was in the group, but=
=20
their most visible member was Peter Sommerlad. He gave a lightning talk one=
=20
morning explaining some terminology.

The thing I remember most about that talk is that the "units" are the easy=
=20
part; one of the many hard parts is "dimension". For example, if you're=20
flying a plane, you actually don't really care about the difference between=
=20
"meters" and "miles" as long as the conversion factors are handled=20
properly; but you *really* care about the difference between "miles of=20
distance" and "miles of altitude".

In fact, you probably *REALLY* care about the difference between "miles=20
above sea level" and "miles above ground level"... and yet, at the same=20
time, you need to be able to do arithmetic computations involving both=20
quantities together.

(By "care about", I mean "implicit conversions between the two would be=20
horrific.")

Anyway, maybe you can ask Peter. His email is easy to find online. That=20
lightning talk from C++Now might even be online somewhere, for all I know.

=E2=80=93Arthur

--=20
You received this message because you are subscribed to the Google Groups "=
ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/1e74c14a-884d-4c4b-b000-a72a8d33e1ec%40isocpp.or=
g.

------=_Part_3968_1180571764.1496184931068
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On Tuesday, May 30, 2017 at 12:48:51 PM UTC-7, carel.c...@=
gmail.com wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin=
-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"lt=
r"><br><blockquote class=3D"gmail_quote" style=3D"margin:0;margin-left:0.8e=
x;border-left:1px #ccc solid;padding-left:1ex"><div style=3D"background-col=
or:rgb(255,255,255);line-height:initial" lang=3D"en-US">                   =
                                                                   <div sty=
le=3D"width:100%;font-size:initial;font-family:Calibri,&#39;Slate Pro&#39;,=
sans-serif,sans-serif;color:rgb(31,73,125);text-align:initial;background-co=
lor:rgb(255,255,255)">I hear talk of work on a std::units library.=C2=A0</d=
iv><div style=3D"width:100%;font-size:initial;font-family:Calibri,&#39;Slat=
e Pro&#39;,sans-serif,sans-serif;color:rgb(31,73,125);text-align:initial;ba=
ckground-color:rgb(255,255,255)"><br></div><div style=3D"width:100%;font-si=
ze:initial;font-family:Calibri,&#39;Slate Pro&#39;,sans-serif,sans-serif;co=
lor:rgb(31,73,125);text-align:initial;background-color:rgb(255,255,255)">I =
think a group of people worked on it at Boostcon / C++Now</div></div></bloc=
kquote><div><br>I would be very interested to hear more if someone has some=
 information on this, from a quick google search I could not find anything.=
=C2=A0 <br></div></div></blockquote><div><br></div><div>I can confirm that =
yes, one group of participants at Library-in-a-Week was exploring the Boost=
..Units space. I don&#39;t know who all was in the group, but their most vis=
ible member was Peter Sommerlad. He gave a lightning talk one morning expla=
ining some terminology.</div><div><br></div><div>The thing I remember most =
about that talk is that the &quot;units&quot; are the easy part; one of the=
 many hard parts is &quot;dimension&quot;. For example, if you&#39;re flyin=
g a plane, you actually don&#39;t really care about the difference between =
&quot;meters&quot; and &quot;miles&quot; as long as the conversion factors =
are handled properly; but you <i>really</i>=C2=A0care about the difference =
between &quot;miles of distance&quot; and &quot;miles of altitude&quot;.</d=
iv><div><br></div><div>In fact, you probably <i><b>REALLY</b></i> care abou=
t the difference between &quot;miles above sea level&quot; and &quot;miles =
above ground level&quot;... and yet, at the same time, you need to be able =
to do arithmetic computations involving both quantities together.</div><div=
><br></div><div>(By &quot;care about&quot;, I mean &quot;implicit conversio=
ns between the two would be horrific.&quot;)</div><div><br></div><div>Anywa=
y, maybe you can ask Peter. His email is easy to find online. That lightnin=
g talk from C++Now might even be online somewhere, for all I know.</div><di=
v><br></div><div>=E2=80=93Arthur</div></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/1e74c14a-884d-4c4b-b000-a72a8d33e1ec%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/1e74c14a-884d-4c4b-b000-a72a8d33e1ec=
%40isocpp.org</a>.<br />

------=_Part_3968_1180571764.1496184931068--

------=_Part_3967_142726855.1496184931068--

.


Author: Patrice Roy <patricer@gmail.com>
Date: Thu, 1 Jun 2017 11:08:55 -0400
Raw View
--001a114e51065f86320550e76acd
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

I'll be meeting a guy named Vincent Ducharme (cc'ed) next week. He's been
maintaining his own units library, which has been used by others for some
scientific work already and has nice usability / performance
characteristics. He contacted me following a visit from Peter (Somerlad) on
his github repo. I'll try to see what making his work meet the chrono
idioms would require; if it's reasonable work and if it looks promising,
I'll push for him to write a proposal.

2017-05-30 18:55 GMT-04:00 Arthur O'Dwyer <arthur.j.odwyer@gmail.com>:

> On Tuesday, May 30, 2017 at 12:48:51 PM UTC-7, carel.c...@gmail.com wrote=
:
>>
>>
>> I hear talk of work on a std::units library.
>>>
>>> I think a group of people worked on it at Boostcon / C++Now
>>>
>>
>> I would be very interested to hear more if someone has some information
>> on this, from a quick google search I could not find anything.
>>
>
> I can confirm that yes, one group of participants at Library-in-a-Week wa=
s
> exploring the Boost.Units space. I don't know who all was in the group, b=
ut
> their most visible member was Peter Sommerlad. He gave a lightning talk o=
ne
> morning explaining some terminology.
>
> The thing I remember most about that talk is that the "units" are the eas=
y
> part; one of the many hard parts is "dimension". For example, if you're
> flying a plane, you actually don't really care about the difference betwe=
en
> "meters" and "miles" as long as the conversion factors are handled
> properly; but you *really* care about the difference between "miles of
> distance" and "miles of altitude".
>
> In fact, you probably *REALLY* care about the difference between "miles
> above sea level" and "miles above ground level"... and yet, at the same
> time, you need to be able to do arithmetic computations involving both
> quantities together.
>
> (By "care about", I mean "implicit conversions between the two would be
> horrific.")
>
> Anyway, maybe you can ask Peter. His email is easy to find online. That
> lightning talk from C++Now might even be online somewhere, for all I know=
..
>
> =E2=80=93Arthur
>
> --
> You received this message because you are subscribed to the Google Groups
> "ISO C++ Standard - Future Proposals" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to std-proposals+unsubscribe@isocpp.org.
> To post to this group, send email to std-proposals@isocpp.org.
> To view this discussion on the web visit https://groups.google.com/a/
> isocpp.org/d/msgid/std-proposals/1e74c14a-884d-4c4b-
> b000-a72a8d33e1ec%40isocpp.org
> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/1e74c14a-88=
4d-4c4b-b000-a72a8d33e1ec%40isocpp.org?utm_medium=3Demail&utm_source=3Dfoot=
er>
> .
>

--=20
You received this message because you are subscribed to the Google Groups "=
ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/CAKiZDp0ms1%2BUJbEti9h2qWXkB%3DTB3xHeYTB8fP330fs=
iLknuyQ%40mail.gmail.com.

--001a114e51065f86320550e76acd
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">I&#39;ll be meeting a guy named Vincent Ducharme (cc&#39;e=
d) next week. He&#39;s been maintaining his own units library, which has be=
en used by others for some scientific work already and has nice usability /=
 performance characteristics. He contacted me following a visit from Peter =
(Somerlad) on his github repo. I&#39;ll try to see what making his work mee=
t the chrono idioms would require; if it&#39;s reasonable work and if it lo=
oks promising, I&#39;ll push for him to write a proposal.<br></div><div cla=
ss=3D"gmail_extra"><br><div class=3D"gmail_quote">2017-05-30 18:55 GMT-04:0=
0 Arthur O&#39;Dwyer <span dir=3D"ltr">&lt;<a href=3D"mailto:arthur.j.odwye=
r@gmail.com" target=3D"_blank">arthur.j.odwyer@gmail.com</a>&gt;</span>:<br=
><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1=
px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><span class=3D"">On Tuesda=
y, May 30, 2017 at 12:48:51 PM UTC-7, <a href=3D"mailto:carel.c...@gmail.co=
m" target=3D"_blank">carel.c...@gmail.com</a> wrote:<blockquote class=3D"gm=
ail_quote" style=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc solid;p=
adding-left:1ex"><div dir=3D"ltr"><br><blockquote class=3D"gmail_quote" sty=
le=3D"margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1e=
x"><div style=3D"background-color:rgb(255,255,255);line-height:initial" lan=
g=3D"en-US">                                                               =
                       <div style=3D"width:100%;font-size:initial;font-fami=
ly:Calibri,&#39;Slate Pro&#39;,sans-serif,sans-serif;color:rgb(31,73,125);t=
ext-align:initial;background-color:rgb(255,255,255)">I hear talk of work on=
 a std::units library.=C2=A0</div><div style=3D"width:100%;font-size:initia=
l;font-family:Calibri,&#39;Slate Pro&#39;,sans-serif,sans-serif;color:rgb(3=
1,73,125);text-align:initial;background-color:rgb(255,255,255)"><br></div><=
div style=3D"width:100%;font-size:initial;font-family:Calibri,&#39;Slate Pr=
o&#39;,sans-serif,sans-serif;color:rgb(31,73,125);text-align:initial;backgr=
ound-color:rgb(255,255,255)">I think a group of people worked on it at Boos=
tcon / C++Now</div></div></blockquote><div><br>I would be very interested t=
o hear more if someone has some information on this, from a quick google se=
arch I could not find anything.=C2=A0 <br></div></div></blockquote><div><br=
></div></span><div>I can confirm that yes, one group of participants at Lib=
rary-in-a-Week was exploring the Boost.Units space. I don&#39;t know who al=
l was in the group, but their most visible member was Peter Sommerlad. He g=
ave a lightning talk one morning explaining some terminology.</div><div><br=
></div><div>The thing I remember most about that talk is that the &quot;uni=
ts&quot; are the easy part; one of the many hard parts is &quot;dimension&q=
uot;. For example, if you&#39;re flying a plane, you actually don&#39;t rea=
lly care about the difference between &quot;meters&quot; and &quot;miles&qu=
ot; as long as the conversion factors are handled properly; but you <i>real=
ly</i>=C2=A0care about the difference between &quot;miles of distance&quot;=
 and &quot;miles of altitude&quot;.</div><div><br></div><div>In fact, you p=
robably <i><b>REALLY</b></i> care about the difference between &quot;miles =
above sea level&quot; and &quot;miles above ground level&quot;... and yet, =
at the same time, you need to be able to do arithmetic computations involvi=
ng both quantities together.</div><div><br></div><div>(By &quot;care about&=
quot;, I mean &quot;implicit conversions between the two would be horrific.=
&quot;)</div><div><br></div><div>Anyway, maybe you can ask Peter. His email=
 is easy to find online. That lightning talk from C++Now might even be onli=
ne somewhere, for all I know.</div><div><br></div><div>=E2=80=93Arthur</div=
></div><span class=3D"">

<p></p>

-- <br>
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br>
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org" target=3D"_=
blank">std-proposals+unsubscribe@<wbr>isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" target=3D"_blank">std-proposals@isocpp.org</a>.<br></span>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/1e74c14a-884d-4c4b-b000-a72a8d33e1ec%=
40isocpp.org?utm_medium=3Demail&amp;utm_source=3Dfooter" target=3D"_blank">=
https://groups.google.com/a/<wbr>isocpp.org/d/msgid/std-<wbr>proposals/1e74=
c14a-884d-4c4b-<wbr>b000-a72a8d33e1ec%40isocpp.org</a><wbr>.<br>
</blockquote></div><br></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/CAKiZDp0ms1%2BUJbEti9h2qWXkB%3DTB3xHe=
YTB8fP330fsiLknuyQ%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter"=
>https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAKiZDp0ms1%2=
BUJbEti9h2qWXkB%3DTB3xHeYTB8fP330fsiLknuyQ%40mail.gmail.com</a>.<br />

--001a114e51065f86320550e76acd--

.


Author: John McFarlane <john@mcfarlane.name>
Date: Fri, 02 Jun 2017 01:31:26 +0000
Raw View
--001a114788664e74710550f01da8
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

I sat in on a few of the sessions at C++Now. A lot of time was spent
exploring the API design space which is remarkably broad. Here is one
prototype that Steven Watanabe shared:
https://github.com/swatanabe/cppnow17-units/

The obviously forum to discuss a units library would be the numeric group
but there is no easily-accessible reflector for that group. I'm working on
a fixed-point numeric type and I see a lot in common between fixed-point
and dimensional types. I aim to conduct some experiments to see if this can
be exploited somehow.

Regarding chrono::duration, I see no reason to assume that a units library
needs to extend or incorporate it. Time is a special case in computing. So
adding a separate time type as part of a units library is worth considering
if it leads to a better solution.

On Thu, Jun 1, 2017 at 8:08 AM Patrice Roy <patricer@gmail.com> wrote:

> I'll be meeting a guy named Vincent Ducharme (cc'ed) next week. He's been
> maintaining his own units library, which has been used by others for some
> scientific work already and has nice usability / performance
> characteristics. He contacted me following a visit from Peter (Somerlad) =
on
> his github repo. I'll try to see what making his work meet the chrono
> idioms would require; if it's reasonable work and if it looks promising,
> I'll push for him to write a proposal.
>
> 2017-05-30 18:55 GMT-04:00 Arthur O'Dwyer <arthur.j.odwyer@gmail.com>:
>
>> On Tuesday, May 30, 2017 at 12:48:51 PM UTC-7, carel.c...@gmail.com
>> wrote:
>>>
>>>
>>> I hear talk of work on a std::units library.
>>>>
>>>> I think a group of people worked on it at Boostcon / C++Now
>>>>
>>>
>>> I would be very interested to hear more if someone has some information
>>> on this, from a quick google search I could not find anything.
>>>
>>
>> I can confirm that yes, one group of participants at Library-in-a-Week
>> was exploring the Boost.Units space. I don't know who all was in the gro=
up,
>> but their most visible member was Peter Sommerlad. He gave a lightning t=
alk
>> one morning explaining some terminology.
>>
>> The thing I remember most about that talk is that the "units" are the
>> easy part; one of the many hard parts is "dimension". For example, if
>> you're flying a plane, you actually don't really care about the differen=
ce
>> between "meters" and "miles" as long as the conversion factors are handl=
ed
>> properly; but you *really* care about the difference between "miles of
>> distance" and "miles of altitude".
>>
>> In fact, you probably *REALLY* care about the difference between "miles
>> above sea level" and "miles above ground level"... and yet, at the same
>> time, you need to be able to do arithmetic computations involving both
>> quantities together.
>>
>> (By "care about", I mean "implicit conversions between the two would be
>> horrific.")
>>
>> Anyway, maybe you can ask Peter. His email is easy to find online. That
>> lightning talk from C++Now might even be online somewhere, for all I kno=
w.
>>
>> =E2=80=93Arthur
>> --
>> You received this message because you are subscribed to the Google Group=
s
>> "ISO C++ Standard - Future Proposals" group.
>> To unsubscribe from this group and stop receiving emails from it, send a=
n
>> email to std-proposals+unsubscribe@isocpp.org.
>> To post to this group, send email to std-proposals@isocpp.org.
>> To view this discussion on the web visit
>> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/1e74c14a-88=
4d-4c4b-b000-a72a8d33e1ec%40isocpp.org
>> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/1e74c14a-8=
84d-4c4b-b000-a72a8d33e1ec%40isocpp.org?utm_medium=3Demail&utm_source=3Dfoo=
ter>
>> .
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "ISO C++ Standard - Future Proposals" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to std-proposals+unsubscribe@isocpp.org.
> To post to this group, send email to std-proposals@isocpp.org.
> To view this discussion on the web visit
> https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAKiZDp0ms1%=
2BUJbEti9h2qWXkB%3DTB3xHeYTB8fP330fsiLknuyQ%40mail.gmail.com
> <https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAKiZDp0ms1=
%2BUJbEti9h2qWXkB%3DTB3xHeYTB8fP330fsiLknuyQ%40mail.gmail.com?utm_medium=3D=
email&utm_source=3Dfooter>
> .
>

--=20
You received this message because you are subscribed to the Google Groups "=
ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/CABPJVnTjk5ixmE59TtMFp9jhRQs-AyNQx%2B63hppuyDbYE=
SJbfQ%40mail.gmail.com.

--001a114788664e74710550f01da8
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div><div><div>I sat in on a few of the sessions at C++Now=
.. A lot of time was spent exploring the API design space which is remarkabl=
y broad. Here is one prototype that Steven Watanabe shared: <a href=3D"http=
s://github.com/swatanabe/cppnow17-units/">https://github.com/swatanabe/cppn=
ow17-units/</a><br><br></div>The obviously forum to discuss a units library=
 would be the numeric group but there is no easily-accessible reflector for=
 that group. I&#39;m working on a fixed-point numeric type and I see a lot =
in common between fixed-point and dimensional types. I aim to conduct some =
experiments to see if this can be exploited somehow.<br><br></div><div>Rega=
rding chrono::duration, I see no reason to assume that a units library need=
s to extend or incorporate it. Time is a special case in computing. So addi=
ng a separate time type as part of a units library is worth considering if =
it leads to a better solution.<br><br><div class=3D"gmail_quote"><div dir=
=3D"ltr">On Thu, Jun 1, 2017 at 8:08 AM Patrice Roy &lt;<a href=3D"mailto:p=
atricer@gmail.com" target=3D"_blank">patricer@gmail.com</a>&gt; wrote:<br><=
/div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-le=
ft:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr">I&#39;ll be meeting a =
guy named Vincent Ducharme (cc&#39;ed) next week. He&#39;s been maintaining=
 his own units library, which has been used by others for some scientific w=
ork already and has nice usability / performance characteristics. He contac=
ted me following a visit from Peter (Somerlad) on his github repo. I&#39;ll=
 try to see what making his work meet the chrono idioms would require; if i=
t&#39;s reasonable work and if it looks promising, I&#39;ll push for him to=
 write a proposal.<br></div><div class=3D"gmail_extra"><br><div class=3D"gm=
ail_quote">2017-05-30 18:55 GMT-04:00 Arthur O&#39;Dwyer <span dir=3D"ltr">=
&lt;<a href=3D"mailto:arthur.j.odwyer@gmail.com" target=3D"_blank">arthur.j=
..odwyer@gmail.com</a>&gt;</span>:<br><blockquote class=3D"gmail_quote" styl=
e=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div di=
r=3D"ltr"><span>On Tuesday, May 30, 2017 at 12:48:51 PM UTC-7, <a href=3D"m=
ailto:carel.c...@gmail.com" target=3D"_blank">carel.c...@gmail.com</a> wrot=
e:<blockquote class=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex;bor=
der-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><br><blockquote =
class=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex;border-left:1px #=
ccc solid;padding-left:1ex"><div style=3D"background-color:rgb(255,255,255)=
;line-height:initial" lang=3D"en-US">                                      =
                                                <div style=3D"width:100%;fo=
nt-size:initial;font-family:Calibri,&#39;Slate Pro&#39;,sans-serif,sans-ser=
if;color:rgb(31,73,125);text-align:initial;background-color:rgb(255,255,255=
)">I hear talk of work on a std::units library.=C2=A0</div><div style=3D"wi=
dth:100%;font-size:initial;font-family:Calibri,&#39;Slate Pro&#39;,sans-ser=
if,sans-serif;color:rgb(31,73,125);text-align:initial;background-color:rgb(=
255,255,255)"><br></div><div style=3D"width:100%;font-size:initial;font-fam=
ily:Calibri,&#39;Slate Pro&#39;,sans-serif,sans-serif;color:rgb(31,73,125);=
text-align:initial;background-color:rgb(255,255,255)">I think a group of pe=
ople worked on it at Boostcon / C++Now</div></div></blockquote><div><br>I w=
ould be very interested to hear more if someone has some information on thi=
s, from a quick google search I could not find anything.=C2=A0 <br></div></=
div></blockquote><div><br></div></span><div>I can confirm that yes, one gro=
up of participants at Library-in-a-Week was exploring the Boost.Units space=
.. I don&#39;t know who all was in the group, but their most visible member =
was Peter Sommerlad. He gave a lightning talk one morning explaining some t=
erminology.</div><div><br></div><div>The thing I remember most about that t=
alk is that the &quot;units&quot; are the easy part; one of the many hard p=
arts is &quot;dimension&quot;. For example, if you&#39;re flying a plane, y=
ou actually don&#39;t really care about the difference between &quot;meters=
&quot; and &quot;miles&quot; as long as the conversion factors are handled =
properly; but you <i>really</i>=C2=A0care about the difference between &quo=
t;miles of distance&quot; and &quot;miles of altitude&quot;.</div><div><br>=
</div><div>In fact, you probably <i><b>REALLY</b></i> care about the differ=
ence between &quot;miles above sea level&quot; and &quot;miles above ground=
 level&quot;... and yet, at the same time, you need to be able to do arithm=
etic computations involving both quantities together.</div><div><br></div><=
div>(By &quot;care about&quot;, I mean &quot;implicit conversions between t=
he two would be horrific.&quot;)</div><div><br></div><div>Anyway, maybe you=
 can ask Peter. His email is easy to find online. That lightning talk from =
C++Now might even be online somewhere, for all I know.</div><div><br></div>=
<div>=E2=80=93Arthur</div></div><span>



-- <br>
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br>
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org" target=3D"_=
blank">std-proposals+unsubscribe@isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" target=3D"_blank">std-proposals@isocpp.org</a>.<br></span>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/1e74c14a-884d-4c4b-b000-a72a8d33e1ec%=
40isocpp.org?utm_medium=3Demail&amp;utm_source=3Dfooter" target=3D"_blank">=
https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/1e74c14a-884d-=
4c4b-b000-a72a8d33e1ec%40isocpp.org</a>.<br>
</blockquote></div><br></div>



-- <br>
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br>
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org" target=3D"_=
blank">std-proposals+unsubscribe@isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" target=3D"_blank">std-proposals@isocpp.org</a>.<br>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/CAKiZDp0ms1%2BUJbEti9h2qWXkB%3DTB3xHe=
YTB8fP330fsiLknuyQ%40mail.gmail.com?utm_medium=3Demail&amp;utm_source=3Dfoo=
ter" target=3D"_blank">https://groups.google.com/a/isocpp.org/d/msgid/std-p=
roposals/CAKiZDp0ms1%2BUJbEti9h2qWXkB%3DTB3xHeYTB8fP330fsiLknuyQ%40mail.gma=
il.com</a>.<br>
</blockquote></div></div></div></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/CABPJVnTjk5ixmE59TtMFp9jhRQs-AyNQx%2B=
63hppuyDbYESJbfQ%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter">h=
ttps://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CABPJVnTjk5ixmE=
59TtMFp9jhRQs-AyNQx%2B63hppuyDbYESJbfQ%40mail.gmail.com</a>.<br />

--001a114788664e74710550f01da8--

.


Author: Howard Hinnant <howard.hinnant@gmail.com>
Date: Thu, 1 Jun 2017 21:51:44 -0400
Raw View
--Apple-Mail=_47102C6B-F836-44B3-83D9-AF35196B42C3
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="UTF-8"

<Disclaimer>  I am only remotely familiar with units libraries. </Disclaime=
r>

I=E2=80=99m not positive, but I believe units libraries deal mainly with un=
its from an engineering perspective, which means the library deals only wit=
h (e.g.) length, and not position.  The chrono library goes to a great deal=
 of trouble to keep =E2=80=9Clength=E2=80=9D (duration) and =E2=80=9Cpositi=
on=E2=80=9D (time_point) separate types.  The advantage is in restricting t=
he algebra of =E2=80=9Cpositions=E2=80=9D.  "Position 1 + Position 2=E2=80=
=9D is non-sensical.  But "Position 1 - Position 2=E2=80=9D makes perfect s=
ense, and is not a position, but a length.

It would be interesting if this algebra could be incorporated into a units =
library.  If it already is, color me impressed.

Howard

--=20
You received this message because you are subscribed to the Google Groups "=
ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/96BDAE8D-D337-460C-A597-FCB9F7752350%40gmail.com=
..

--Apple-Mail=_47102C6B-F836-44B3-83D9-AF35196B42C3
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename=signature.asc
Content-Type: application/pgp-signature;
 name=signature.asc
Content-Description: Message signed with OpenPGP

-----BEGIN PGP SIGNATURE-----

iQIcBAEBCAAGBQJZMMSxAAoJEGbcHCxKqhWCItEP/i1tStm1eM0DEEQfj29OiS1l
kJEHIZlv1LcZwgxVOHVVgQFPLdRSoDNqeUom8BqrzdTyfJ2HxrPGjp+2y2tjHa+N
JHLuENqdLnYEGKQUxtO99qMfVrvt56PaORUwwT10Xse5BBctBz7INjBOg2wEegVt
rJ1BLYLoInFjX3Qno+Y2Uf0Oq8pwKNngaqp36o86u90LxdPfray7HGCWBzX96nCf
Gl1tO2pFTxIqBat1TuGDhSuwbNOpiORGVDTn0BvYNmFQYk6PZGvQigMeiorN0PgM
j9zXttyzxPzjUJkE02GF9S1q+3yLTQN8xS8/Vcdsd1APiv6KaRaPEI7k2/LDy++W
Y0L3QJTM2Ffr1QKXTZiT1t3fiFWMIbY0vEMlSMhi350GIMnfxza1N6ANUN5gtr/i
AsN9L2TVHvGhA+2GQ/TZct4upxwsSbTnoyLA1s55fqInGHcS5XZ5oPQ6BL0w/U2f
kbw7m5JUGmxW5iGjrkItctjHa+1cutfUMzrZ3zPl8w3J1d0kALRVGY7yLFkAqM6j
avnxv+p7rIYxkql8HYOjRwm5WPvMdhQmAoXFi41S5HMTRZQMgjjJ3idaB/0rTuBp
Ah8sG8yIIYroHRiuq3BGgKtT3DQtUFVmmyUF++9XBwzcuW/HqVUSxXdAJRQelsUS
PXSTBPmfR/O/N34EklaX
=/v7F
-----END PGP SIGNATURE-----

--Apple-Mail=_47102C6B-F836-44B3-83D9-AF35196B42C3--

.


Author: Chris Hallock <christopherhallock@gmail.com>
Date: Thu, 1 Jun 2017 21:12:00 -0700 (PDT)
Raw View
------=_Part_260_1791933069.1496376720965
Content-Type: multipart/alternative;
 boundary="----=_Part_261_1524310368.1496376720966"

------=_Part_261_1524310368.1496376720966
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Thursday, June 1, 2017 at 9:51:49 PM UTC-4, Howard Hinnant wrote:
>
> <Disclaimer>  I am only remotely familiar with units libraries.=20
> </Disclaimer>=20
>
> I=E2=80=99m not positive, but I believe units libraries deal mainly with =
units=20
> from an engineering perspective, which means the library deals only with=
=20
> (e.g.) length, and not position.  The chrono library goes to a great deal=
=20
> of trouble to keep =E2=80=9Clength=E2=80=9D (duration) and =E2=80=9Cposit=
ion=E2=80=9D (time_point) separate=20
> types.  The advantage is in restricting the algebra of =E2=80=9Cpositions=
=E2=80=9D.=20
>  "Position 1 + Position 2=E2=80=9D is non-sensical.  But "Position 1 - Po=
sition 2=E2=80=9D=20
> makes perfect sense, and is not a position, but a length.=20
>
> It would be interesting if this algebra could be incorporated into a unit=
s=20
> library.  If it already is, color me impressed.=20
>
> Howard=20
>

The Boost.Units library lets the user declare a "point, not vector" style=
=20
unit with boost::units::absolute=20
<http://www.boost.org/doc/libs/1_64_0/doc/html/boost/units/absolute.html>.

--=20
You received this message because you are subscribed to the Google Groups "=
ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/16fae2f6-8377-46b9-978b-c56f2a73a9d6%40isocpp.or=
g.

------=_Part_261_1524310368.1496376720966
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On Thursday, June 1, 2017 at 9:51:49 PM UTC-4, Howard Hinn=
ant wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left:=
 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">&lt;Disclaimer&gt; =
=C2=A0I am only remotely familiar with units libraries. &lt;/Disclaimer&gt;
<br>
<br>I=E2=80=99m not positive, but I believe units libraries deal mainly wit=
h units from an engineering perspective, which means the library deals only=
 with (e.g.) length, and not position. =C2=A0The chrono library goes to a g=
reat deal of trouble to keep =E2=80=9Clength=E2=80=9D (duration) and =E2=80=
=9Cposition=E2=80=9D (time_point) separate types. =C2=A0The advantage is in=
 restricting the algebra of =E2=80=9Cpositions=E2=80=9D. =C2=A0&quot;Positi=
on 1 + Position 2=E2=80=9D is non-sensical. =C2=A0But &quot;Position 1 - Po=
sition 2=E2=80=9D makes perfect sense, and is not a position, but a length.
<br>
<br>It would be interesting if this algebra could be incorporated into a un=
its library. =C2=A0If it already is, color me impressed.
<br>
<br>Howard
<br></blockquote><div><br>The Boost.Units library lets the user declare a &=
quot;point, not vector&quot; style unit with <a href=3D"http://www.boost.or=
g/doc/libs/1_64_0/doc/html/boost/units/absolute.html"><span style=3D"font-f=
amily: courier new,monospace;">boost::units::absolute</span></a>.<br></div>=
</div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/16fae2f6-8377-46b9-978b-c56f2a73a9d6%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/16fae2f6-8377-46b9-978b-c56f2a73a9d6=
%40isocpp.org</a>.<br />

------=_Part_261_1524310368.1496376720966--

------=_Part_260_1791933069.1496376720965--

.


Author: Nicol Bolas <jmckesson@gmail.com>
Date: Thu, 1 Jun 2017 22:10:34 -0700 (PDT)
Raw View
------=_Part_326_685396770.1496380234797
Content-Type: multipart/alternative;
 boundary="----=_Part_327_1757948200.1496380234797"

------=_Part_327_1757948200.1496380234797
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable



On Friday, June 2, 2017 at 12:12:01 AM UTC-4, Chris Hallock wrote:
>
> On Thursday, June 1, 2017 at 9:51:49 PM UTC-4, Howard Hinnant wrote:
>>
>> <Disclaimer>  I am only remotely familiar with units libraries.=20
>> </Disclaimer>=20
>>
>> I=E2=80=99m not positive, but I believe units libraries deal mainly with=
 units=20
>> from an engineering perspective, which means the library deals only with=
=20
>> (e.g.) length, and not position.  The chrono library goes to a great dea=
l=20
>> of trouble to keep =E2=80=9Clength=E2=80=9D (duration) and =E2=80=9Cposi=
tion=E2=80=9D (time_point) separate=20
>> types.  The advantage is in restricting the algebra of =E2=80=9Cposition=
s=E2=80=9D.=20
>>  "Position 1 + Position 2=E2=80=9D is non-sensical.  But "Position 1 - P=
osition 2=E2=80=9D=20
>> makes perfect sense, and is not a position, but a length.=20
>>
>> It would be interesting if this algebra could be incorporated into a=20
>> units library.  If it already is, color me impressed.=20
>>
>> Howard=20
>>
>
> The Boost.Units library lets the user declare a "point, not vector" style=
=20
> unit with boost::units::absolute=20
> <http://www.boost.org/doc/libs/1_64_0/doc/html/boost/units/absolute.html>=
..
>

That's interesting.

Here's another unusual case. Consider 4x4 transformation matrices. A=20
transformation matrix takes positions/vectors in one space and transforms=
=20
them into another. So for unit analysis, you want to be able to tag=20
positions/vectors with a particular space. When you try to transform them=
=20
by a matrix, if they're not in the same space as the input of the matrix,=
=20
then you get an error. And the result of the transformation is a vector in=
=20
the output space of the matrix.

This also would need to handle transformation composition. If you have two=
=20
matrices A and B, you can only compose B with A if the output space of A=20
matches the input space of B. Inverting a matrix swaps the input and output=
=20
spaces. And so forth.

I don't suppose someone has found a way to resolve something like that.

--=20
You received this message because you are subscribed to the Google Groups "=
ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/fdb3fa42-0490-4440-88ea-a11ff230ca5d%40isocpp.or=
g.

------=_Part_327_1757948200.1496380234797
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><br>On Friday, June 2, 2017 at 12:12:01 AM UTC-4, Chri=
s Hallock wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin=
-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"lt=
r">On Thursday, June 1, 2017 at 9:51:49 PM UTC-4, Howard Hinnant wrote:<blo=
ckquote class=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex;border-le=
ft:1px #ccc solid;padding-left:1ex">&lt;Disclaimer&gt; =C2=A0I am only remo=
tely familiar with units libraries. &lt;/Disclaimer&gt;
<br>
<br>I=E2=80=99m not positive, but I believe units libraries deal mainly wit=
h units from an engineering perspective, which means the library deals only=
 with (e.g.) length, and not position. =C2=A0The chrono library goes to a g=
reat deal of trouble to keep =E2=80=9Clength=E2=80=9D (duration) and =E2=80=
=9Cposition=E2=80=9D (time_point) separate types. =C2=A0The advantage is in=
 restricting the algebra of =E2=80=9Cpositions=E2=80=9D. =C2=A0&quot;Positi=
on 1 + Position 2=E2=80=9D is non-sensical. =C2=A0But &quot;Position 1 - Po=
sition 2=E2=80=9D makes perfect sense, and is not a position, but a length.
<br>
<br>It would be interesting if this algebra could be incorporated into a un=
its library. =C2=A0If it already is, color me impressed.
<br>
<br>Howard
<br></blockquote><div><br>The Boost.Units library lets the user declare a &=
quot;point, not vector&quot; style unit with <a href=3D"http://www.boost.or=
g/doc/libs/1_64_0/doc/html/boost/units/absolute.html" target=3D"_blank" rel=
=3D"nofollow" onmousedown=3D"this.href=3D&#39;http://www.google.com/url?q\x=
3dhttp%3A%2F%2Fwww.boost.org%2Fdoc%2Flibs%2F1_64_0%2Fdoc%2Fhtml%2Fboost%2Fu=
nits%2Fabsolute.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEPddQLZpcqWtcd=
Xapf07Ax2EJj3Q&#39;;return true;" onclick=3D"this.href=3D&#39;http://www.go=
ogle.com/url?q\x3dhttp%3A%2F%2Fwww.boost.org%2Fdoc%2Flibs%2F1_64_0%2Fdoc%2F=
html%2Fboost%2Funits%2Fabsolute.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQj=
CNEPddQLZpcqWtcdXapf07Ax2EJj3Q&#39;;return true;"><span style=3D"font-famil=
y:courier new,monospace">boost::units::absolute</span></a>.<br></div></div>=
</blockquote><div><br>That&#39;s interesting.<br><br>Here&#39;s another unu=
sual case. Consider 4x4 transformation matrices. A transformation matrix ta=
kes positions/vectors in one space and transforms them into another. So for=
 unit analysis, you want to be able to tag positions/vectors with a particu=
lar space. When you try to transform them by a matrix, if they&#39;re not i=
n the same space as the input of the matrix, then you get an error. And the=
 result of the transformation is a vector in the output space of the matrix=
..<br><br>This also would need to handle transformation composition. If you =
have two matrices A and B, you can only compose B with A if the output spac=
e of A matches the input space of B. Inverting a matrix swaps the input and=
 output spaces. And so forth.<br><br>I don&#39;t suppose someone has found =
a way to resolve something like that.<br></div></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/fdb3fa42-0490-4440-88ea-a11ff230ca5d%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/fdb3fa42-0490-4440-88ea-a11ff230ca5d=
%40isocpp.org</a>.<br />

------=_Part_327_1757948200.1496380234797--

------=_Part_326_685396770.1496380234797--

.


Author: Peter Sommerlad <peter.sommerlad@hsr.ch>
Date: Fri, 2 Jun 2017 11:07:08 +0200
Raw View
--Apple-Mail-D47F489E-E4AB-4994-AA46-BA8A86F92398
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Hi=20

Sorry for being late on that thread. I am the one who started the Liaw grou=
p at C++now this year. More Info and participants are at=20
https://wiki.hsr.ch/PeterSommerlad/wiki.cgi?CppNow2017Units

The current plan is to make nic holthaus' library more flexible using Steve=
n watanabes idea on flexible domain analysis. nic's currently limited to 7 =
SI dimensions plus Angles.=20

If you want to learn more email me. Unfortunately I didn't yet have time to=
 work on it. I have about half a dozen proposals in flight that require upd=
ates for Toronto.=20

Regards
Peter

send from a mobile device.
Prof. Peter Sommerlad
peter.Sommerlad@hsr.ch
+41-79-432 23 32

> On 1 Jun 2017, at 17:08, Patrice Roy <patricer@gmail.com> wrote:
>=20
> I'll be meeting a guy named Vincent Ducharme (cc'ed) next week. He's been=
 maintaining his own units library, which has been used by others for some =
scientific work already and has nice usability / performance characteristic=
s. He contacted me following a visit from Peter (Somerlad) on his github re=
po. I'll try to see what making his work meet the chrono idioms would requi=
re; if it's reasonable work and if it looks promising, I'll push for him to=
 write a proposal.
>=20
> 2017-05-30 18:55 GMT-04:00 Arthur O'Dwyer <arthur.j.odwyer@gmail.com>:
>>> On Tuesday, May 30, 2017 at 12:48:51 PM UTC-7, carel.c...@gmail.com wro=
te:
>>>=20
>>>> I hear talk of work on a std::units library.=20
>>>>=20
>>>> I think a group of people worked on it at Boostcon / C++Now
>>>=20
>>> I would be very interested to hear more if someone has some information=
 on this, from a quick google search I could not find anything. =20
>>=20
>> I can confirm that yes, one group of participants at Library-in-a-Week w=
as exploring the Boost.Units space. I don't know who all was in the group, =
but their most visible member was Peter Sommerlad. He gave a lightning talk=
 one morning explaining some terminology.
>>=20
>> The thing I remember most about that talk is that the "units" are the ea=
sy part; one of the many hard parts is "dimension". For example, if you're =
flying a plane, you actually don't really care about the difference between=
 "meters" and "miles" as long as the conversion factors are handled properl=
y; but you really care about the difference between "miles of distance" and=
 "miles of altitude".
>>=20
>> In fact, you probably REALLY care about the difference between "miles ab=
ove sea level" and "miles above ground level"... and yet, at the same time,=
 you need to be able to do arithmetic computations involving both quantitie=
s together.
>>=20
>> (By "care about", I mean "implicit conversions between the two would be =
horrific.")
>>=20
>> Anyway, maybe you can ask Peter. His email is easy to find online. That =
lightning talk from C++Now might even be online somewhere, for all I know.
>>=20
>> =E2=80=93Arthur
>> --=20
>> You received this message because you are subscribed to the Google Group=
s "ISO C++ Standard - Future Proposals" group.
>> To unsubscribe from this group and stop receiving emails from it, send a=
n email to std-proposals+unsubscribe@isocpp.org.
>> To post to this group, send email to std-proposals@isocpp.org.
>> To view this discussion on the web visit https://groups.google.com/a/iso=
cpp.org/d/msgid/std-proposals/1e74c14a-884d-4c4b-b000-a72a8d33e1ec%40isocpp=
..org.
>=20
> --=20
> You received this message because you are subscribed to the Google Groups=
 "ISO C++ Standard - Future Proposals" group.
> To unsubscribe from this group and stop receiving emails from it, send an=
 email to std-proposals+unsubscribe@isocpp.org.
> To post to this group, send email to std-proposals@isocpp.org.
> To view this discussion on the web visit https://groups.google.com/a/isoc=
pp.org/d/msgid/std-proposals/CAKiZDp0ms1%2BUJbEti9h2qWXkB%3DTB3xHeYTB8fP330=
fsiLknuyQ%40mail.gmail.com.

--=20
You received this message because you are subscribed to the Google Groups "=
ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/8A4B965E-D10C-4569-87E2-3FB6EA9B0F7E%40hsr.ch.

--Apple-Mail-D47F489E-E4AB-4994-AA46-BA8A86F92398
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<html><head><meta http-equiv=3D"content-type" content=3D"text/html; charset=
=3Dutf-8"></head><body dir=3D"auto"><div>Hi&nbsp;</div><div id=3D"AppleMail=
Signature"><br></div><div id=3D"AppleMailSignature">Sorry for being late on=
 that thread. I am the one who started the Liaw group at C++now this year. =
More Info and participants are at&nbsp;<br><a href=3D"https://wiki.hsr.ch/P=
eterSommerlad/wiki.cgi?CppNow2017Units">https://wiki.hsr.ch/PeterSommerlad/=
wiki.cgi?CppNow2017Units</a></div><div id=3D"AppleMailSignature"><br></div>=
<div id=3D"AppleMailSignature">The current plan is to make nic holthaus' li=
brary more flexible using Steven watanabes idea on flexible domain analysis=
.. nic's currently limited to 7 SI dimensions plus Angles.&nbsp;</div><div i=
d=3D"AppleMailSignature"><br></div><div id=3D"AppleMailSignature">If you wa=
nt to learn more email me. Unfortunately I didn't yet have time to work on =
it. I have about half a dozen proposals in flight that require updates for =
Toronto.&nbsp;</div><div id=3D"AppleMailSignature"><br></div><div id=3D"App=
leMailSignature">Regards</div><div id=3D"AppleMailSignature">Peter</div><di=
v id=3D"AppleMailSignature"><br><div>send from a mobile device.</div>Prof. =
Peter Sommerlad<div><a href=3D"mailto:peter.Sommerlad@hsr.ch">peter.Sommerl=
ad@hsr.ch</a></div><div>+41-79-432 23 32</div></div><div><br>On 1 Jun 2017,=
 at 17:08, Patrice Roy &lt;<a href=3D"mailto:patricer@gmail.com">patricer@g=
mail.com</a>&gt; wrote:<br><br></div><blockquote type=3D"cite"><div><meta h=
ttp-equiv=3D"Content-Type" content=3D"text/html; charset=3Dutf-8"><div dir=
=3D"ltr">I'll be meeting a guy named Vincent Ducharme (cc'ed) next week. He=
's been maintaining his own units library, which has been used by others fo=
r some scientific work already and has nice usability / performance charact=
eristics. He contacted me following a visit from Peter (Somerlad) on his gi=
thub repo. I'll try to see what making his work meet the chrono idioms woul=
d require; if it's reasonable work and if it looks promising, I'll push for=
 him to write a proposal.<br></div><div class=3D"gmail_extra"><br><div clas=
s=3D"gmail_quote">2017-05-30 18:55 GMT-04:00 Arthur O'Dwyer <span dir=3D"lt=
r">&lt;<a href=3D"mailto:arthur.j.odwyer@gmail.com" target=3D"_blank">arthu=
r.j.odwyer@gmail.com</a>&gt;</span>:<br><blockquote class=3D"gmail_quote" s=
tyle=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div=
 dir=3D"ltr"><span class=3D"">On Tuesday, May 30, 2017 at 12:48:51 PM UTC-7=
, <a href=3D"mailto:carel.c...@gmail.com" target=3D"_blank">carel.c...@gmai=
l.com</a> wrote:<blockquote class=3D"gmail_quote" style=3D"margin:0;margin-=
left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><b=
r><blockquote class=3D"gmail_quote" style=3D"margin:0;margin-left:0.8ex;bor=
der-left:1px #ccc solid;padding-left:1ex"><div style=3D"background-color:rg=
b(255,255,255);line-height:initial" lang=3D"en-US">                        =
                                                              <div style=3D=
"width:100%;font-size:initial;font-family:Calibri,'Slate Pro',sans-serif,sa=
ns-serif;color:rgb(31,73,125);text-align:initial;background-color:rgb(255,2=
55,255)">I hear talk of work on a std::units library.&nbsp;</div><div style=
=3D"width:100%;font-size:initial;font-family:Calibri,'Slate Pro',sans-serif=
,sans-serif;color:rgb(31,73,125);text-align:initial;background-color:rgb(25=
5,255,255)"><br></div><div style=3D"width:100%;font-size:initial;font-famil=
y:Calibri,'Slate Pro',sans-serif,sans-serif;color:rgb(31,73,125);text-align=
:initial;background-color:rgb(255,255,255)">I think a group of people worke=
d on it at Boostcon / C++Now</div></div></blockquote><div><br>I would be ve=
ry interested to hear more if someone has some information on this, from a =
quick google search I could not find anything.&nbsp; <br></div></div></bloc=
kquote><div><br></div></span><div>I can confirm that yes, one group of part=
icipants at Library-in-a-Week was exploring the Boost.Units space. I don't =
know who all was in the group, but their most visible member was Peter Somm=
erlad. He gave a lightning talk one morning explaining some terminology.</d=
iv><div><br></div><div>The thing I remember most about that talk is that th=
e "units" are the easy part; one of the many hard parts is "dimension". For=
 example, if you're flying a plane, you actually don't really care about th=
e difference between "meters" and "miles" as long as the conversion factors=
 are handled properly; but you <i>really</i>&nbsp;care about the difference=
 between "miles of distance" and "miles of altitude".</div><div><br></div><=
div>In fact, you probably <i><b>REALLY</b></i> care about the difference be=
tween "miles above sea level" and "miles above ground level"... and yet, at=
 the same time, you need to be able to do arithmetic computations involving=
 both quantities together.</div><div><br></div><div>(By "care about", I mea=
n "implicit conversions between the two would be horrific.")</div><div><br>=
</div><div>Anyway, maybe you can ask Peter. His email is easy to find onlin=
e. That lightning talk from C++Now might even be online somewhere, for all =
I know.</div><div><br></div><div>=E2=80=93Arthur</div></div><span class=3D"=
">

<p></p>

-- <br>
You received this message because you are subscribed to the Google Groups "=
ISO C++ Standard - Future Proposals" group.<br>
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org" target=3D"_=
blank">std-proposals+unsubscribe@<wbr>isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" target=3D"_blank">std-proposals@isocpp.org</a>.<br></span>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/1e74c14a-884d-4c4b-b000-a72a8d33e1ec%=
40isocpp.org?utm_medium=3Demail&amp;utm_source=3Dfooter" target=3D"_blank">=
https://groups.google.com/a/<wbr>isocpp.org/d/msgid/std-<wbr>proposals/1e74=
c14a-884d-4c4b-<wbr>b000-a72a8d33e1ec%40isocpp.org</a><wbr>.<br>
</blockquote></div><br></div>

<p></p>

-- <br>
You received this message because you are subscribed to the Google Groups "=
ISO C++ Standard - Future Proposals" group.<br>
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br>
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/CAKiZDp0ms1%2BUJbEti9h2qWXkB%3DTB3xHe=
YTB8fP330fsiLknuyQ%40mail.gmail.com?utm_medium=3Demail&amp;utm_source=3Dfoo=
ter">https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAKiZDp0m=
s1%2BUJbEti9h2qWXkB%3DTB3xHeYTB8fP330fsiLknuyQ%40mail.gmail.com</a>.<br>
</div></blockquote></body></html>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/8A4B965E-D10C-4569-87E2-3FB6EA9B0F7E%=
40hsr.ch?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.com/=
a/isocpp.org/d/msgid/std-proposals/8A4B965E-D10C-4569-87E2-3FB6EA9B0F7E%40h=
sr.ch</a>.<br />

--Apple-Mail-D47F489E-E4AB-4994-AA46-BA8A86F92398--

.


Author: Martin Moene <m.j.moene@eld.physics.LeidenUniv.nl>
Date: Fri, 2 Jun 2017 12:49:22 +0200
Raw View
On 02-Jun-17 11:07, Peter Sommerlad wrote:
> Sorry for being late on that thread. I am the one who started the Liaw group
> at C++now this year. More Info and participants are at
> https://wiki.hsr.ch/PeterSommerlad/wiki.cgi?CppNow2017Units
>
Yet another library:

https://github.com/njoy/DimensionalAnalysis (note license)

Martin

--
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/ed7f34a9-9e45-1602-9ad5-111aaf002169%40eld.physics.LeidenUniv.nl.

.


Author: Chris Hallock <christopherhallock@gmail.com>
Date: Fri, 2 Jun 2017 14:02:54 -0700 (PDT)
Raw View
------=_Part_968_1316235796.1496437374454
Content-Type: multipart/alternative;
 boundary="----=_Part_969_849696537.1496437374454"

------=_Part_969_849696537.1496437374454
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Friday, June 2, 2017 at 1:10:34 AM UTC-4, Nicol Bolas wrote:

> Here's another unusual case. Consider 4x4 transformation matrices. A=20
> transformation matrix takes positions/vectors in one space and transforms=
=20
> them into another. So for unit analysis, you want to be able to tag=20
> positions/vectors with a particular space. When you try to transform them=
=20
> by a matrix, if they're not in the same space as the input of the matrix,=
=20
> then you get an error. And the result of the transformation is a vector i=
n=20
> the output space of the matrix.
>
> This also would need to handle transformation composition. If you have tw=
o=20
> matrices A and B, you can only compose B with A if the output space of A=
=20
> matches the input space of B. Inverting a matrix swaps the input and outp=
ut=20
> spaces. And so forth.
>
> I don't suppose someone has found a way to resolve something like that.
>

I think that if you have a sufficiently flexible linear algebra library=20
(one that can handle user-defined element types and that correctly deduces=
=20
the element type of A*B as decltype(a*b) instead of just decltype(a) or=20
decltype(b), where a and b are elements of matrices A and B, respectively),=
=20
you can handle this by having vector and matrix types whose element types=
=20
are quantity types and by using dimensionless "tag" units to denote=20
specific spaces. For example, let's say you want to transform some vector=
=20
*v*, in meters, from space X to space Y (identified by dimensionless units=
=20
"X" and "Y", respectively) with transformation matrix *A*. *v* must=20
initially have units of m*X. The result, *A***v*, must have units of m*Y.=
=20
Therefore, *A* must have units of Y/X =E2=80=93 cancel out the X tag (input=
), tack=20
on the Y tag (output).

--=20
You received this message because you are subscribed to the Google Groups "=
ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/64b7a352-fe39-43a0-bbf1-adccc83a7d05%40isocpp.or=
g.

------=_Part_969_849696537.1496437374454
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On Friday, June 2, 2017 at 1:10:34 AM UTC-4, Nicol Bolas w=
rote:<br><blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left: =
0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"ltr"><div=
>Here&#39;s another unusual case. Consider 4x4 transformation matrices. A t=
ransformation matrix takes positions/vectors in one space and transforms th=
em into another. So for unit analysis, you want to be able to tag positions=
/vectors with a particular space. When you try to transform them by a matri=
x, if they&#39;re not in the same space as the input of the matrix, then yo=
u get an error. And the result of the transformation is a vector in the out=
put space of the matrix.<br><br>This also would need to handle transformati=
on composition. If you have two matrices A and B, you can only compose B wi=
th A if the output space of A matches the input space of B. Inverting a mat=
rix swaps the input and output spaces. And so forth.<br><br>I don&#39;t sup=
pose someone has found a way to resolve something like that.<br></div></div=
></blockquote><div><br>I think that if you have a sufficiently flexible lin=
ear algebra library (one that can handle user-defined element types and tha=
t correctly deduces the element type of A*B as decltype(a*b) instead of jus=
t decltype(a) or decltype(b), where a and b are elements of matrices A and =
B, respectively), you can handle this by having vector and matrix types who=
se element types are quantity types and by using dimensionless &quot;tag&qu=
ot; units to denote specific spaces. For example, let&#39;s say you want to=
 transform some vector <b>v</b>, in meters, from space X to space Y (identi=
fied by dimensionless units &quot;X&quot; and &quot;Y&quot;, respectively) =
with transformation matrix <b>A</b>. <b>v</b> must initially have units of =
m*X. The result, <b>A</b>*<b>v</b>, must have units of m*Y. Therefore, <b>A=
</b> must have units of Y/X =E2=80=93 cancel out the X tag (input), tack on=
 the Y tag (output).<br></div></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/64b7a352-fe39-43a0-bbf1-adccc83a7d05%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/64b7a352-fe39-43a0-bbf1-adccc83a7d05=
%40isocpp.org</a>.<br />

------=_Part_969_849696537.1496437374454--

------=_Part_968_1316235796.1496437374454--

.