I’m not much of a scientist, but I’m interested
in that stuff and believe in promoting it.
Wouldn’t it be cool if Ruby became known as the
language that scientists use, just as Fortran
became associated with engineering and COBOL
with business? Probably won’t happen, but I
can dream.
The docs look good. Only disappointment is that
you didn’t include the speed of light in
furlongs per fortnight.
I had thought of a similar module storing all
the information in the periodic table. But it
falls in the category (I think) of things that
are more fun to do than they are useful. So it
hasn’t been high on my to-do list.
Cheers,
Hal
···
----- Original Message -----
From: “Daniel Carrera” dcarrera@math.umd.edu
To: “ruby-talk ML” ruby-talk@ruby-lang.org
Sent: Saturday, February 08, 2003 4:51 PM
Subject: [ANN] math-const 1.0.0
I just added a Math/const module to RAA. It provides mathematical and
physical constants both in the MKS and CGS system. See:
I like this. Wouldn’t it be nice to be able to write
SPEED_OF_LIGHT.unit
→ m / s
(I think this should be easy by subclassing Float).
I also would like to do calculations on units, so that I can write:
s=FwU.new(100,Unit.m) # shold be shorter, perhaps: s=FwU(100,:m)
t=FwU.new(10,Unit.s)
v=s/t
v → 10
v.unit → [[Unit.m, 1], [Unit.s, -1]]
any ideas to do this nicer?
but I don’t know this is wort bothering (does anyone really need this?)
I also would like to do calculations on units, so that I can write:
s=FwU.new(100,Unit.m) # shold be shorter, perhaps: s=FwU(100,:m)
t=FwU.new(10,Unit.s)
v=s/t
v → 10
v.unit → [[Unit.m, 1], [Unit.s, -1]]