March 14, 2016 Re: RFC: Units of measurement for D (Phobos?) | ||||
---|---|---|---|---|
| ||||
Posted in reply to Nordlöw | On Monday, 14 March 2016 at 09:04:28 UTC, Nordlöw wrote: > http://klickverbot.at/code/units/std_units.html#PrefixSystem Should be: http://klickverbot.at/code/units/std_si.html |
March 14, 2016 Re: RFC: Units of measurement for D (Phobos?) | ||||
---|---|---|---|---|
| ||||
Posted in reply to Nordlöw | On Monday, 14 March 2016 at 09:10:21 UTC, Nordlöw wrote:
> http://klickverbot.at/code/units/std_si.html
One more thing: Angular units: I suggest non-SI-derived units for `Radian` and `Steradian` instead. Then, degrees and other derived angular units shall be expressed as scaled versions of these.
I don't see the point in defining these as meter/meter and meter^^2/meter^^2 in the type system.
Destroy!
|
March 14, 2016 Re: RFC: Units of measurement for D (Phobos?) | ||||
---|---|---|---|---|
| ||||
Posted in reply to Nordlöw | On Monday, 14 March 2016 at 09:37:10 UTC, Nordlöw wrote: > One more thing: Angular units: I suggest non-SI-derived units for `Radian` and `Steradian` instead. Then, degrees and other derived angular units shall be expressed as scaled versions of these. Oops, already defined here: http://klickverbot.at/code/units/std_si.html#radian Thanks, David. |
March 14, 2016 Re: RFC: Units of measurement for D (Phobos?) | ||||
---|---|---|---|---|
| ||||
Posted in reply to Nordlöw | On Mon, 14 Mar 2016 09:04:28 +0000, Nordlöw wrote:
> I've gained time and energy to take up this task again. It seems like David Nadlinger's solution is very complete:
>
> https://github.com/klickverbot/phobos/tree/undefined
>
> http://klickverbot.at/code/units/std_si.html
Ohm my, that's awesome. Watt needs to happen to get this into Phobos?
|
March 14, 2016 Re: RFC: Units of measurement for D (Phobos?) | ||||
---|---|---|---|---|
| ||||
Posted in reply to Chris Wright | have a look at this! https://github.com/biozic/quantities |
March 15, 2016 Re: RFC: Units of measurement for D (Phobos?) | ||||
---|---|---|---|---|
| ||||
Posted in reply to Chris Wright | On Monday, 14 March 2016 at 18:51:45 UTC, Chris Wright wrote:
> Ohm my, that's awesome. Watt needs to happen to get this into Phobos?
I'm cleaning up David's work right and will put up a PR today.
|
March 15, 2016 Re: RFC: Units of measurement for D (Phobos?) | ||||
---|---|---|---|---|
| ||||
Posted in reply to Robert burner Schadek | On Monday, 14 March 2016 at 19:08:18 UTC, Robert burner Schadek wrote:
> have a look at this!
>
> https://github.com/biozic/quantities
Could you briefly outline why you prefer this over David's work?
|
March 15, 2016 Re: RFC: Units of measurement for D (Phobos?) | ||||
---|---|---|---|---|
| ||||
Posted in reply to Nordlöw | On Monday, 14 March 2016 at 09:04:28 UTC, Nordlöw wrote:
> http://klickverbot.at/code/units/std_units.html
> http://klickverbot.at/code/units/std_units.html#PrefixSystem
No module name in Phobos is currently in plural form. I suggest we stick to that standard a name these
std.experimental.unit
std.experimental.unit.si
One thing. How should these modules be represented on the file system?
Destroy!
|
March 15, 2016 Re: RFC: Units of measurement for D (Phobos?) | ||||
---|---|---|---|---|
| ||||
Posted in reply to Nordlöw | On Tuesday, 15 March 2016 at 09:13:10 UTC, Nordlöw wrote: > On Monday, 14 March 2016 at 09:04:28 UTC, Nordlöw wrote: >> http://klickverbot.at/code/units/std_units.html >> http://klickverbot.at/code/units/std_units.html#PrefixSystem > > No module name in Phobos is currently in plural form. std.traits std.signals std.typecons ;-) > I suggest we stick to that standard a name these > > std.experimental.unit > std.experimental.unit.si > > One thing. How should these modules be represented on the file system? std/experimental/unit/package.d std/experimental/unit/si.d For some other modules, Andrei has insisted that package.d must publicly import all subpackages, but I see no reason for this. std.experimental.unit can contain the basic general functionality, and std.experimental.unit.si the SI specific ones. |
March 15, 2016 Re: RFC: Units of measurement for D (Phobos?) | ||||
---|---|---|---|---|
| ||||
Posted in reply to Nordlöw | On Tuesday, 15 March 2016 at 09:13:10 UTC, Nordlöw wrote:
> On Monday, 14 March 2016 at 09:04:28 UTC, Nordlöw wrote:
>> http://klickverbot.at/code/units/std_units.html
>> http://klickverbot.at/code/units/std_units.html#PrefixSystem
>
> No module name in Phobos is currently in plural form. I suggest we stick to that standard a name these
>
> std.experimental.unit
> std.experimental.unit.si
>
> One thing. How should these modules be represented on the file system?
>
> Destroy!
Is it able to manage quantities with a non-linear transformations, for example when dealing with octet and byte ?
(1024)!"byte" == 1!"kbyte";
|
Copyright © 1999-2021 by the D Language Foundation