comp.lang.ada
 help / color / mirror / Atom feed
* SI units updated
@ 2018-09-29 20:51 AdaMagica
  2018-10-01 19:24 ` Shark8
  2018-11-05 14:10 ` Simon Wright
  0 siblings, 2 replies; 17+ messages in thread
From: AdaMagica @ 2018-09-29 20:51 UTC (permalink / raw)


This is a package for computing with physical dimensions. Units are given in strings (case sensitive). All symbols and prefixed as defined in SI may be used.

Unit syntax improved: 1.0*"W/(m*K)", the former "W/m/K" (very ugly) is now illegal.

http://www.christ-usch-grein.homepage.t-online.de/Ada/Dimension/SI.html

Enjoy - Christoph

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: SI units updated
  2018-09-29 20:51 SI units updated AdaMagica
@ 2018-10-01 19:24 ` Shark8
  2018-10-02 11:26   ` AdaMagica
  2018-11-05  8:47   ` reinert
  2018-11-05 14:10 ` Simon Wright
  1 sibling, 2 replies; 17+ messages in thread
From: Shark8 @ 2018-10-01 19:24 UTC (permalink / raw)


On Saturday, September 29, 2018 at 2:51:57 PM UTC-6, AdaMagica wrote:
> This is a package for computing with physical dimensions. Units are given in strings (case sensitive). All symbols and prefixed as defined in SI may be used.
> 
> Unit syntax improved: 1.0*"W/(m*K)", the former "W/m/K" (very ugly) is now illegal.
> 
> http://www.christ-usch-grein.homepage.t-online.de/Ada/Dimension/SI.html
> 
> Enjoy - Christoph

Thank you for posting this; I was just assessing the possibility of having to use SI units in my new job, and this looks like it would save a lot of time and effort reinventing the wheel.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: SI units updated
  2018-10-01 19:24 ` Shark8
@ 2018-10-02 11:26   ` AdaMagica
  2018-10-02 14:36     ` Shark8
  2018-11-05  8:47   ` reinert
  1 sibling, 1 reply; 17+ messages in thread
From: AdaMagica @ 2018-10-02 11:26 UTC (permalink / raw)


Am Montag, 1. Oktober 2018 21:24:40 UTC+2 schrieb Shark8:
> Thank you for posting this; I was just assessing the possibility of having to use SI units in my new job, and this looks like it would save a lot of time and effort reinventing the wheel.

If you do use this method, please drop me a line about your experiences.
Thanx.
Chr.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: SI units updated
  2018-10-02 11:26   ` AdaMagica
@ 2018-10-02 14:36     ` Shark8
  2018-10-02 20:12       ` AdaMagica
  0 siblings, 1 reply; 17+ messages in thread
From: Shark8 @ 2018-10-02 14:36 UTC (permalink / raw)


On Tuesday, October 2, 2018 at 5:26:27 AM UTC-6, AdaMagica wrote:
> Am Montag, 1. Oktober 2018 21:24:40 UTC+2 schrieb Shark8:
> > Thank you for posting this; I was just assessing the possibility of having to use SI units in my new job, and this looks like it would save a lot of time and effort reinventing the wheel.
> 
> If you do use this method, please drop me a line about your experiences.
> Thanx.
> Chr.

Will do; there's a *lot* of other considerations in this project, among which are (1) time, (2) possibly geo-location, (3) stellar-coordinates, (4) various physical measurements, (5) several soft real-time processes, (6) at least one hard real-time process, likely two or three, and (7) possibly distribution via Annex E.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: SI units updated
  2018-10-02 14:36     ` Shark8
@ 2018-10-02 20:12       ` AdaMagica
  2018-10-02 21:43         ` Shark8
  0 siblings, 1 reply; 17+ messages in thread
From: AdaMagica @ 2018-10-02 20:12 UTC (permalink / raw)


I just found out that NIST is aiming to redefine SI in November this year, so I updated the values of the natural constants to the latest values as displayed by NIST.
Kilogram and a few other units will then be redefined via Planck's constant.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: SI units updated
  2018-10-02 20:12       ` AdaMagica
@ 2018-10-02 21:43         ` Shark8
  2018-10-03  5:48           ` J-P. Rosen
                             ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Shark8 @ 2018-10-02 21:43 UTC (permalink / raw)


On Tuesday, October 2, 2018 at 2:12:04 PM UTC-6, AdaMagica wrote:
> I just found out that NIST is aiming to redefine SI in November this year, so I updated the values of the natural constants to the latest values as displayed by NIST.
> Kilogram and a few other units will then be redefined via Planck's constant.

Interesting; though I'm not sure what advantage that [using Planck's Constant] would have.

I've heard that ISO 8601 [representing time, intervals, periods, etc] is going to be updated this year. Since this is something that my current project will need, albeit tangentially, I'm planning on making an implementation of it (though possibly augmented w/ scheduling).


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: SI units updated
  2018-10-02 21:43         ` Shark8
@ 2018-10-03  5:48           ` J-P. Rosen
  2018-10-03  7:21           ` Dmitry A. Kazakov
  2018-10-03 17:37           ` AdaMagica
  2 siblings, 0 replies; 17+ messages in thread
From: J-P. Rosen @ 2018-10-03  5:48 UTC (permalink / raw)


Le 02/10/2018 à 23:43, Shark8 a écrit :
> Interesting; though I'm not sure what advantage that [using Planck's Constant] would have.
FWIW: the Kilogram is the only remaining unit defined by a physical
piece: the "standard kilogram" in France.

Given the accuracy of measurements nowadays, the tiny sublimation of
iridium became non-neglectible... An absolute standard was needed.

-- 
J-P. Rosen
Adalog
2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEX
Tel: +33 1 45 29 21 52, Fax: +33 1 45 29 25 00
http://www.adalog.fr

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: SI units updated
  2018-10-02 21:43         ` Shark8
  2018-10-03  5:48           ` J-P. Rosen
@ 2018-10-03  7:21           ` Dmitry A. Kazakov
  2018-10-03 14:40             ` Shark8
  2018-10-03 17:33             ` AdaMagica
  2018-10-03 17:37           ` AdaMagica
  2 siblings, 2 replies; 17+ messages in thread
From: Dmitry A. Kazakov @ 2018-10-03  7:21 UTC (permalink / raw)


On 2018-10-02 23:43, Shark8 wrote:
> On Tuesday, October 2, 2018 at 2:12:04 PM UTC-6, AdaMagica wrote:
>> I just found out that NIST is aiming to redefine SI in November this year, so I updated the values of the natural constants to the latest values as displayed by NIST.
>> Kilogram and a few other units will then be redefined via Planck's constant.
> 
> Interesting; though I'm not sure what advantage that [using Planck's Constant] would have.
> 
> I've heard that ISO 8601 [representing time, intervals, periods, etc] is going to be updated this year. Since this is something that my current project will need, albeit tangentially, I'm planning on making an implementation of it (though possibly augmented w/ scheduling).

Time is no physical dimensioned value. Only duration is, though the 
forms ISO 8601 uses for duration are no SI's dimensioned values, not 
even properly spelled irregular duration values, e.g. 25h.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: SI units updated
  2018-10-03  7:21           ` Dmitry A. Kazakov
@ 2018-10-03 14:40             ` Shark8
  2018-10-03 17:33             ` AdaMagica
  1 sibling, 0 replies; 17+ messages in thread
From: Shark8 @ 2018-10-03 14:40 UTC (permalink / raw)


On Wednesday, October 3, 2018 at 1:21:45 AM UTC-6, Dmitry A. Kazakov wrote:
> On 2018-10-02 23:43, Shark8 wrote:
> > On Tuesday, October 2, 2018 at 2:12:04 PM UTC-6, AdaMagica wrote:
> >> I just found out that NIST is aiming to redefine SI in November this year, so I updated the values of the natural constants to the latest values as displayed by NIST.
> >> Kilogram and a few other units will then be redefined via Planck's constant.
> > 
> > Interesting; though I'm not sure what advantage that [using Planck's Constant] would have.
> > 
> > I've heard that ISO 8601 [representing time, intervals, periods, etc] is going to be updated this year. Since this is something that my current project will need, albeit tangentially, I'm planning on making an implementation of it (though possibly augmented w/ scheduling).
> 
> Time is no physical dimensioned value.
Who said it was? I was commenting on updating standards.


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: SI units updated
  2018-10-03  7:21           ` Dmitry A. Kazakov
  2018-10-03 14:40             ` Shark8
@ 2018-10-03 17:33             ` AdaMagica
  2018-10-03 19:47               ` Dmitry A. Kazakov
  1 sibling, 1 reply; 17+ messages in thread
From: AdaMagica @ 2018-10-03 17:33 UTC (permalink / raw)


Am Mittwoch, 3. Oktober 2018 09:21:45 UTC+2 schrieb Dmitry A. Kazakov:
> Time is no physical dimensioned value.

Interesting. What's it then?

Augustinus: "Quid est ergo tempus? si nemo ex me quaerat, scio; si quaerenti explicare velim, nescio."
If nobody asks, I know. I someone asks to explain, I don't know.


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: SI units updated
  2018-10-02 21:43         ` Shark8
  2018-10-03  5:48           ` J-P. Rosen
  2018-10-03  7:21           ` Dmitry A. Kazakov
@ 2018-10-03 17:37           ` AdaMagica
  2 siblings, 0 replies; 17+ messages in thread
From: AdaMagica @ 2018-10-03 17:37 UTC (permalink / raw)


Am Dienstag, 2. Oktober 2018 23:43:55 UTC+2 schrieb Shark8:
> Interesting; though I'm not sure what advantage that [using Planck's Constant] would have.

I guess you can feel ths difficulty measuring an atom by using a block of metal.

Measuring instruments have become so precise that a precise unit is needed, not a block of matter that loses atoms by sublimation.


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: SI units updated
  2018-10-03 17:33             ` AdaMagica
@ 2018-10-03 19:47               ` Dmitry A. Kazakov
  0 siblings, 0 replies; 17+ messages in thread
From: Dmitry A. Kazakov @ 2018-10-03 19:47 UTC (permalink / raw)


On 2018-10-03 19:33, AdaMagica wrote:
> Am Mittwoch, 3. Oktober 2018 09:21:45 UTC+2 schrieb Dmitry A. Kazakov:
>> Time is no physical dimensioned value.
> 
> Interesting. What's it then?

Not everything is a dimensioned value, obviously. For one time point has 
identity. Physical values do not. Two equal values are just same. Time 
is like location of some object. Co-ordinates of the location are 
physical values. 3D vector of the location is a physical value. The 
location itself is not. Similarly duration is a physical value, epoch is 
not.

Answering the question I would say that time is a 3D surface in 4D 
time-space of some frame of reference.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: SI units updated
  2018-10-01 19:24 ` Shark8
  2018-10-02 11:26   ` AdaMagica
@ 2018-11-05  8:47   ` reinert
  2018-11-15 11:46     ` AdaMagica
  1 sibling, 1 reply; 17+ messages in thread
From: reinert @ 2018-11-05  8:47 UTC (permalink / raw)


Great attempt! I have been looking after something like this. But you did not consider enumeration variables instead of strings?

But will you modify the "Time" issue? "Time" in Ada is "Calendar time" which is thought about as duration since a magic "year 0" on Earth (Middle East?)?  "Time" in physics is normally thought about as duration before/after a reference "event"/point in time/space - or "duration between two events/points in time/space. 

I have though not so far investigated you use of "Ada.Real_Time".

reinert

mandag 1. oktober 2018 21.24.40 UTC+2 skrev Shark8 følgende:
> On Saturday, September 29, 2018 at 2:51:57 PM UTC-6, AdaMagica wrote:
> > This is a package for computing with physical dimensions. Units are given in strings (case sensitive). All symbols and prefixed as defined in SI may be used.
> > 
> > Unit syntax improved: 1.0*"W/(m*K)", the former "W/m/K" (very ugly) is now illegal.
> > 
> > http://www.christ-usch-grein.homepage.t-online.de/Ada/Dimension/SI.html
> > 
> > Enjoy - Christoph
> 
> Thank you for posting this; I was just assessing the possibility of having to use SI units in my new job, and this looks like it would save a lot of time and effort reinventing the wheel.


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: SI units updated
  2018-09-29 20:51 SI units updated AdaMagica
  2018-10-01 19:24 ` Shark8
@ 2018-11-05 14:10 ` Simon Wright
  2018-11-15 12:41   ` AdaMagica
  1 sibling, 1 reply; 17+ messages in thread
From: Simon Wright @ 2018-11-05 14:10 UTC (permalink / raw)


AdaMagica <christ-usch.grein@t-online.de> writes:

> This is a package for computing with physical dimensions. Units are
> given in strings (case sensitive). All symbols and prefixed as defined
> in SI may be used.
>
> Unit syntax improved: 1.0*"W/(m*K)", the former "W/m/K" (very ugly) is
> now illegal.
>
> http://www.christ-usch-grein.homepage.t-online.de/Ada/Dimension/SI.html

test_checked_si_units failed; last few lines of output were

kilogram                  1.00000E-03*kg                             OK
speed                     1.00000E+00*m*s**(-1)                      OK

raised TEST_CHECKED_SI_UNITS.SI.ILLEGAL_UNIT :
checked_si-generic_strings-get_item.adb:85 instantiated at
checked_si.adb:58 instantiated at test_checked_si_units.adb:59

Also, GNAT bug [R813-027 public] note in test_checked_si_math: bug is
extant in GCC 9.0.0 20180927.


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: SI units updated
  2018-11-05  8:47   ` reinert
@ 2018-11-15 11:46     ` AdaMagica
  0 siblings, 0 replies; 17+ messages in thread
From: AdaMagica @ 2018-11-15 11:46 UTC (permalink / raw)


Am Montag, 5. November 2018 09:47:02 UTC+1 schrieb reinert:
> Great attempt! I have been looking after something like this. But you did not consider enumeration variables instead of strings?

You mean enum literals? They're case-insensitive. Note the difference in mS and Ms!

> 
> But will you modify the "Time" issue? "Time" in Ada is "Calendar time" which is thought about as duration since a magic "year 0" on Earth (Middle East?)?  "Time" in physics is normally thought about as duration before/after a reference "event"/point in time/space - or "duration between two events/points in time/space. 

I cannot see what an item with dimension time in some physical equation has to do with Ada.Real_Time.


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: SI units updated
  2018-11-05 14:10 ` Simon Wright
@ 2018-11-15 12:41   ` AdaMagica
  2018-11-15 16:13     ` Simon Wright
  0 siblings, 1 reply; 17+ messages in thread
From: AdaMagica @ 2018-11-15 12:41 UTC (permalink / raw)


Am Montag, 5. November 2018 15:10:08 UTC+1 schrieb Simon Wright:
> test_checked_si_units failed; last few lines of output were
> 
> kilogram                  1.00000E-03*kg                             OK
> speed                     1.00000E+00*m*s**(-1)                      OK
> 
> raised TEST_CHECKED_SI_UNITS.SI.ILLEGAL_UNIT :

Thanks for the report. This was a bug in the test unit and is corrected now.

> Also, GNAT bug [R813-027 public] note in test_checked_si_math: bug is
> extant in GCC 9.0.0 20180927.

I got a note from AdaCore (6 Sep 2018) that this now behaves properly in the development version of GNAT.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: SI units updated
  2018-11-15 12:41   ` AdaMagica
@ 2018-11-15 16:13     ` Simon Wright
  0 siblings, 0 replies; 17+ messages in thread
From: Simon Wright @ 2018-11-15 16:13 UTC (permalink / raw)


AdaMagica <christ-usch.grein@t-online.de> writes:

>> Also, GNAT bug [R813-027 public] note in test_checked_si_math: bug is
>> extant in GCC 9.0.0 20180927.
>
> I got a note from AdaCore (6 Sep 2018) that this now behaves properly
> in the development version of GNAT.

Looks like it won't be fixed in FSF GCC 9 - i.e. now in Stage 3, and not
fixed in the 20181103 version.

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2018-11-15 16:13 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-29 20:51 SI units updated AdaMagica
2018-10-01 19:24 ` Shark8
2018-10-02 11:26   ` AdaMagica
2018-10-02 14:36     ` Shark8
2018-10-02 20:12       ` AdaMagica
2018-10-02 21:43         ` Shark8
2018-10-03  5:48           ` J-P. Rosen
2018-10-03  7:21           ` Dmitry A. Kazakov
2018-10-03 14:40             ` Shark8
2018-10-03 17:33             ` AdaMagica
2018-10-03 19:47               ` Dmitry A. Kazakov
2018-10-03 17:37           ` AdaMagica
2018-11-05  8:47   ` reinert
2018-11-15 11:46     ` AdaMagica
2018-11-05 14:10 ` Simon Wright
2018-11-15 12:41   ` AdaMagica
2018-11-15 16:13     ` Simon Wright

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox