Complexity Shock Horror II: the Sequel (was Re: MD5 in erlang .)

Robert Virding robert.virding@REDACTED
Fri Apr 4 16:08:37 CEST 2003

I see to remember from my physics days that an assistent professor once told
of a system where all units were dimensionless and scalars. I can't remember
its name though (it was many years ago!).

As your message wasn't a 1/4 a small comment: there are so many measures
that it would be practically impossible to do it. Also would conversions be
automatic? I mean could you match metres with furlongs or seconds with
fortnights and it would convert for you. I like furlongs/fortnight. :-)


----- Original Message -----
From: "Chris Pressey" <cpressey@REDACTED>
To: "Marc Ernst Eddy van Woerkom" <Marc.Vanwoerkom@REDACTED>
Cc: <erlang-questions@REDACTED>
Sent: Wednesday, April 02, 2003 6:42 AM
Subject: Re: Complexity Shock Horror II: the Sequel (was Re: MD5 in erlang

> On Tue, 1 Apr 2003 12:35:05 +0200 (MEST)
> Marc Ernst Eddy van Woerkom <Marc.Vanwoerkom@REDACTED> wrote:
> > BTW dimensional analysis
> >
> >
> >
> > seems to be an instance of abstract interpretation
> >
> >
> >
> > used in physics. :)
> Yes, it does!  Thanks for the links.
> > > For a while I tried designing a new language around measurements.
> >
> > Interesting.
> >
> > Last time I did numerical simulations in engineering (around 1997)
> > there was still FORTRAN in use and things were moving slowly towards
> > C++. The next big thing might be general use of interval arithmetics
> > (where numeric types get proven error bounds annotated for all
> > calculations) in the compilers (Sun is active here).
> > Annotating types with units for unit type safety I have not seen as a
> > big concern yet.
> >
> > Regards,
> > Marc
> Errors (that is, +/- tolerance) were also taken into account in my
> proof-of-concept language - although they're less important in the
> digital domain (i.e. if I call a function to get the size of a file (in
> bytes) I can assume the result is either 100% accurate or entirely
> suspect.  But for other things such as sleep durations, they may still
> have a use.)
> Erlang ought to be a good language in which to introduce measurements,
> if for no other reason than it shares it's name with a unit of
> measurement :)
> The last time I tried introducing them, there was (justifiable)
> resistance because I immediately assumed they should freely intermix
> with regular data using overloaded operators.
> Right now, I'm just presenting them as an ADT like any other.  This is
> for two reasons.  First: solely as an ADT they can provide a use as Twan
> pointed out, to help build applications which deal in measurements.
> Second: they needn't be used directly from Erlang.  A simple parser and
> evaluator could be written so that they could be used as a sublanguage
> (not unlike how SQL is used in many languages.)  This way the
> distasteful subject of operator overloading can be completely avoided -
> at the cost of it only being loosely coupled.  (Gotta start somewhere)
> I dug up my old measurement module, cleaned it up a bit, and put it on
> my website ( ) and in
> the Jungerl, for anyone who's curious.  It could stand improvement.
> Thanks to everyone for your feedback,
> -Chris

More information about the erlang-questions mailing list