February 23, 2006 Re: Runtime unit lib | ||||
---|---|---|---|---|
| ||||
Posted in reply to Thomas Kuehne | Thomas Kuehne wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> BCS schrieb am 2006-02-23:
>
>>WOW!! Thanks! That is impressive. If I may ask, how did you make that? Some sort of script I assume?
>
>
> No script, just one hundred and one monkeys typing all day ;)
>
>
>>I ask because the Phobos source en-total is 1MB and 647k is kinda large. Can you think of any way to cut down the code size using a data table of some kind?
>
>
> How about 40K?
>
> Thomas
>
>
> -----BEGIN PGP SIGNATURE-----
>
> iD8DBQFD/Xmz3w+/yD4P9tIRAognAJ9htrCXzYmDCOjRygLkkMfF3WsJsgCgohwt
> uSKoGesdYlzAUbGXNBs0qO8=
> =6E2G
> -----END PGP SIGNATURE-----
Sweet!!! That's about what I was expecting. Thanks!!
Two things (more curiosity than anything):
-> How long did the first version take to compile for you? On my box (Linux 550MHz P-III) DMD ran for ~ 70 sec.
-> What did you use for a convention table? I want to pout that in the doc comments.
A fixed version (inch, cal and hp corrected) of the lib will be up in a few minutes.
|
February 23, 2006 Re: Runtime unit lib | ||||
---|---|---|---|---|
| ||||
Posted in reply to BCS Attachments: | BCS schrieb am 2006-02-23: [snip] > Two things (more curiosity than anything): > -> How long did the first version take to compile for you? On my box (Linux > 550MHz P-III) DMD ran for ~ 70 sec. ca. 29 sec (with some backround activity) > -> What did you use for a convention table? I want to put that in the doc comments. units version 1.80 the data file lists following sources: # Most units data was drawn from # 1. NIST Special Publication 811, 1995 Edition # 2. CRC Handbook of Chemistry and Physics 70th edition # 3. Oxford English Dictionary # 4. Websters New Universal Unabridged Dictionary # 5. Units of Measure by Stephen Dresner # 6. A Dictionary of English Weights and Measures by Ronald Zupko # 7. British Weights and Measures by Ronald Zupko # 8. Realm of Measure by Isaac Asimov # 9. United States standards of weights and measures, their # creation and creators by Arthur H. Frazier. # 10. French weights and measures before the Revolution: a # dictionary of provincial and local units by Ronald Zupko # 11. Weights and Measures: their ancient origins and their # development in Great Britain up to AD 1855 by FG Skinner # 12. The World of Measurements by H. Arthur Klein # 13. For Good Measure by William Johnstone # 14. NTC's Encyclopedia of International Weights and Measures # by William Johnstone # 15. Sizes by John Lord # 16. Sizesaurus by Stephen Strauss # 17. CODATA Recommended Values of Physical Constants available at # http://physics.nist.gov/cuu/Constants/index.html # 18. How Many? A Dictionary of Units of Measurement. Available at # http://www.unc.edu/~rowlett/units/index.html # 19. Numericana. http://www.numericana.com # Thomas |
February 23, 2006 Re: Runtime unit lib | ||||
---|---|---|---|---|
| ||||
Posted in reply to Thomas Kuehne | In article <geh1d3-v56.ln1@birke.kuehne.cn>, Thomas Kuehne says... > >-----BEGIN PGP SIGNED MESSAGE----- >Hash: SHA1 > >BCS schrieb am 2006-02-23: > >[snip] > >> Two things (more curiosity than anything): >> -> How long did the first version take to compile for you? On my box (Linux >> 550MHz P-III) DMD ran for ~ 70 sec. > >ca. 29 sec (with some backround activity) what kind of system? > >> -> What did you use for a convention table? I want to put that in the doc comments. > >units version 1.80 Crumbs! That's where I got the _new_ valuse for the convertions from. Now I have to find a new scource. > >the data file lists following sources: > ># Most units data was drawn from ># 1. NIST Special Publication 811, 1995 Edition ># 2. CRC Handbook of Chemistry and Physics 70th edition ># 3. Oxford English Dictionary ># 4. Websters New Universal Unabridged Dictionary ># 5. Units of Measure by Stephen Dresner ># 6. A Dictionary of English Weights and Measures by Ronald Zupko ># 7. British Weights and Measures by Ronald Zupko ># 8. Realm of Measure by Isaac Asimov ># 9. United States standards of weights and measures, their ># creation and creators by Arthur H. Frazier. ># 10. French weights and measures before the Revolution: a ># dictionary of provincial and local units by Ronald Zupko ># 11. Weights and Measures: their ancient origins and their ># development in Great Britain up to AD 1855 by FG Skinner ># 12. The World of Measurements by H. Arthur Klein ># 13. For Good Measure by William Johnstone ># 14. NTC's Encyclopedia of International Weights and Measures ># by William Johnstone ># 15. Sizes by John Lord ># 16. Sizesaurus by Stephen Strauss ># 17. CODATA Recommended Values of Physical Constants available at ># http://physics.nist.gov/cuu/Constants/index.html ># 18. How Many? A Dictionary of Units of Measurement. Available at ># http://www.unc.edu/~rowlett/units/index.html ># 19. Numericana. http://www.numericana.com ># > >Thomas > > >-----BEGIN PGP SIGNATURE----- > >iD8DBQFD/haw3w+/yD4P9tIRAg9YAJ4sdDt8Sbdgn+UyR+fAGAMZzy3GxwCgqQSa >6j6MksKajqf4g4aUCf50T3E= >=ydtA >-----END PGP SIGNATURE----- |
February 24, 2006 Library submition (was: Runtime unit lib) | ||||
---|---|---|---|---|
| ||||
Posted in reply to BCS | A new version of the units lib is up at http://www.webpages.uidaho.edu/~shro8822/unit.d Several other libs are also up at: http://www.webpages.uidaho.edu/~shro8822/point_math.d http://www.webpages.uidaho.edu/~shro8822/point_lib.d I would like to submit them all for inclusion in Phobos |
February 25, 2006 Re: Runtime unit lib | ||||
---|---|---|---|---|
| ||||
Posted in reply to BCS | BCS wrote:
> I have put together a runtime unit type library. While I was writing the unittest I recognized that the most likely error is an error in the convention table (something that can't be checked by the person who wrote that part). Therefor, Would someone please (without looking at my table of conversion factors) finish writing the unittest for the lib?
>
> It shouldn't be hard, just get the file and a units conversion table and add some more lines like those around line 644.
>
> here it is:
>
> http://www.webpages.uidaho.edu/~shro8822/unit_.d
>
While I'm sure your units code will be great as part of phobos, I'm actually more interested (surprised rather) in where your file is hosted. I believe we go to school in the same state. :)
I'm in the middle of my second year at Boise State University.
Chris
|
February 25, 2006 Re: Library submition (was: Runtime unit lib) | ||||
---|---|---|---|---|
| ||||
Posted in reply to BCS | Great, I always wanted to write one! Actually I already have one but it is more like an units interpreter. However, my library has an additional feature, it can take fractional powers of dimensions in p/q form where p and q are integers. I am interested in adding this feature to your library, its easy. This feature is very useful for engineers, especially mechanical engineers where fractional power of dimensions appear every where. eg. time period of a simple pendulum. So, do you mind if I take a whack at it ? One question, why you left out angle and candela from fundamental units ? later one is used a lot in optics. my units interpreter is at: http://mechsys4.me.udel.edu/home/banala/units.html its not very userfriendly as of yet, just ported it to D and DWT. Sai In article <dto5k2$10iq$1@digitaldaemon.com>, BCS says... > >A new version of the units lib is up at > >http://www.webpages.uidaho.edu/~shro8822/unit.d > >Several other libs are also up at: > >http://www.webpages.uidaho.edu/~shro8822/point_math.d http://www.webpages.uidaho.edu/~shro8822/point_lib.d > >I would like to submit them all for inclusion in Phobos |
February 25, 2006 Re: Library submition (was: Runtime unit lib) | ||||
---|---|---|---|---|
| ||||
Posted in reply to Sai | In article <dtprks$1m30$1@digitaldaemon.com>, Sai says... > >Great, I always wanted to write one! Actually I already have one but it is more like an units interpreter. However, my library has an additional feature, it can take fractional powers of dimensions in p/q form where p and q are > integers. > >I am interested in adding this feature to your library, its easy. This feature is very useful for engineers, especially mechanical engineers where fractional power of dimensions appear every where. eg. time period of a simple pendulum. > Go ahead, fine by me. I was thinking of adding integer powers my self. One request, I have tried to keep the unit control part as separable as possible so that it would be easy to strip out for performance reasons. >So, do you mind if I take a whack at it ? > >One question, why you left out angle and candela from fundamental units ? later one is used a lot in optics. > Each fundamental unit used adds a int to the struct and adds more overhead to programs using this library. While not quite as handy, angles can be treated as unit-less (IIRC SI does this) and the candela can be treated as power per area (CGS, US and MKS do this). > >my units interpreter is at: http://mechsys4.me.udel.edu/home/banala/units.html > >its not very userfriendly as of yet, just ported it to D and DWT. > >Sai > This whole lib is rely a bit of a kluge because most of the time units can be determined statically and should be checked statically. I have plans for a template to do this but it will require implicit template specialization, so that's on hold for now. >In article <dto5k2$10iq$1@digitaldaemon.com>, BCS says... >> >>A new version of the units lib is up at >> >>http://www.webpages.uidaho.edu/~shro8822/unit.d >> >>Several other libs are also up at: >> >>http://www.webpages.uidaho.edu/~shro8822/point_math.d http://www.webpages.uidaho.edu/~shro8822/point_lib.d >> >>I would like to submit them all for inclusion in Phobos > > |
February 27, 2006 [OT]Re: Runtime unit lib | ||||
---|---|---|---|---|
| ||||
Posted in reply to Chris Lajoie | Chris Lajoie wrote:
> BCS wrote:
>
>>
>> http://www.webpages.uidaho.edu/~shro8822/unit_.d
>>
>
> While I'm sure your units code will be great as part of phobos, I'm actually more interested (surprised rather) in where your file is hosted. I believe we go to school in the same state. :)
> I'm in the middle of my second year at Boise State University.
>
> Chris
I found a while ago that one of the contributers to another (internet wide) project I'm ocationaly involved in works right here in town.
"It's a small world after all ..."
|
Copyright © 1999-2021 by the D Language Foundation