Re: RFC: SI Units facility for Phobos

2011-01-06 Thread Andrei Alexandrescu
On 1/5/11 9:55 PM, BCS wrote: After a little more thinking I'm wondering if I'm targeting a different use case than other people are thinking about. The case I'm designing for, is where you have a relatively small number of inputs (that may be in a mishmash of units and systems), a relatively

Re: RFC: SI Units facility for Phobos

2011-01-05 Thread BCS
Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: On 1/5/11 12:26 AM, BCS wrote: * I suggest doing away with abstract unit names (Distance, Time, Mass etc.) and use concrete plural units (Meters, Seconds, Kilograms etc) instead. I agree that at a level operating with the abstract

Re: RFC: SI Units facility for Phobos

2011-01-05 Thread Andrei Alexandrescu
On 1/5/11 10:32 AM, BCS wrote: Andrei Alexandrescuseewebsiteforem...@erdani.org wrote: [snip] Ah. I see what you are getting at. OTOH I'm still not convinced it's any better. A quick check shows that 1 light years = 9.4605284 ¡Ñ 10^25 angstroms. A mere 25 orders of magnitude differences,

Re: RFC: SI Units facility for Phobos

2011-01-05 Thread BCS
In conclusion (yes I know this normally goes at the bottom) I think we are wanting different and contradictorily things from this library. Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: On 1/5/11 10:32 AM, BCS wrote: Andrei Alexandrescuseewebsiteforem...@erdani.org wrote: [snip]

Re: RFC: SI Units facility for Phobos

2011-01-05 Thread Andrei Alexandrescu
On 1/5/11 4:06 PM, BCS wrote: In conclusion (yes I know this normally goes at the bottom) I think we are wanting different and contradictorily things from this library. I almost didn't read the rest thinking that that's all you inserted. All: there's more, scroll down! One additional

Re: RFC: SI Units facility for Phobos

2011-01-05 Thread BCS
Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: On 1/5/11 4:06 PM, BCS wrote: In conclusion (yes I know this normally goes at the bottom) I think we are wanting different and contradictorily things from this library. I almost didn't read the rest thinking that that's all you

Re: RFC: SI Units facility for Phobos

2011-01-05 Thread Jonathan M Davis
On Wednesday, January 05, 2011 15:40:37 BCS wrote: Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: (c) Numeric issues as I described (and no amount of rhetoric will set that straight; FWIW given the obvious question of scaling you need to prove it works, not me to prove it doesn't)

Re: RFC: SI Units facility for Phobos

2011-01-05 Thread Walter Bright
Jonathan M Davis wrote: On Wednesday, January 05, 2011 15:40:37 BCS wrote: Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: (c) Numeric issues as I described (and no amount of rhetoric will set that straight; FWIW given the obvious question of scaling you need to prove it works, not me

Re: RFC: SI Units facility for Phobos

2011-01-05 Thread BCS
Jonathan M Davis jmdavisp...@gmx.com wrote: On Wednesday, January 05, 2011 15:40:37 BCS wrote: Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: (c) Numeric issues as I described (and no amount of rhetoric will set that straight; FWIW given the obvious question of scaling you need

Re: RFC: SI Units facility for Phobos

2011-01-04 Thread BCS
Hello Andrei, Benjamin Shropshire wrote an SI Units implementation which he refers to here: http://d.puremagic.com/issues/show_bug.cgi?id=3725 For convenience, here are direct links to the code: http://www.dsource.org/projects/scrapple/browser/trunk/units/si2.d

Re: RFC: SI Units facility for Phobos

2011-01-04 Thread Andrei Alexandrescu
On 1/5/11 12:26 AM, BCS wrote: * I suggest doing away with abstract unit names (Distance, Time, Mass etc.) and use concrete plural units (Meters, Seconds, Kilograms etc) instead. I agree that at a level operating with the abstract names seems to be more pure, but at a concrete level you need to

RFC: SI Units facility for Phobos

2011-01-01 Thread Andrei Alexandrescu
Benjamin Shropshire wrote an SI Units implementation which he refers to here: http://d.puremagic.com/issues/show_bug.cgi?id=3725 For convenience, here are direct links to the code: http://www.dsource.org/projects/scrapple/browser/trunk/units/si2.d

Re: RFC: SI Units facility for Phobos

2011-01-01 Thread bearophile
Andrei: Benjamin Shropshire wrote an SI Units implementation which he refers to here: Frink is a little language that uses units or measure a lot: http://futureboy.us/frinkdocs/ Bye, bearophile

Re: RFC: SI Units facility for Phobos

2011-01-01 Thread Simon
On 01/01/2011 20:24, Andrei Alexandrescu wrote: * In the proposed design the user can define a lot of distinct types, such as Miles, Yards, and Lbs, which are strictly unnecessary (Kilometers, Meters, and Kilograms could be used instead, with appropriate I/O conversions to and from other

Re: RFC: SI Units facility for Phobos

2011-01-01 Thread Andrei Alexandrescu
On 1/1/11 3:56 PM, Simon wrote: On 01/01/2011 20:24, Andrei Alexandrescu wrote: * In the proposed design the user can define a lot of distinct types, such as Miles, Yards, and Lbs, which are strictly unnecessary (Kilometers, Meters, and Kilograms could be used instead, with appropriate I/O