Java > Scala

Russel Winder russel at russel.org.uk
Sun Dec 18 08:20:20 PST 2011


On Sun, 2011-12-18 at 10:30 -0500, dsimcha wrote:
[...]
> Please elaborate.  I think D for HPC is a terrific idea.  It's the only 
> language I know of with all of the following four attributes:

For years HPC was Fortran only (*).  Many of the codes used today were
written in the 1970s and Fortran compiler technology revolves around
making those sequential codes run on parallel kit.

During the 1990s there was a move to writing new codes in C++ --
especially in the HEP area.  Of course many of these codes rely on being
able to call into the Fortran codes.

With the rise of data visualization there was a need for a language for
writing GUIs and the like, and they have decided on Python since it
connects to C and C++ trivially.  They also found SciPy and NumPy which
actually leads to prototyping new codes in Python and then rewriting in
Fortran or C++ if there is a need to -- which often there is not.

With PyPy now running faster than CPython there is a possibility that
new codes other than core computation frameworks will always be in
Python.

Given the time and effort it took to get C++ accepted by this Fortran
oriented community.

> 1.  Allows you to program straight down to the bare metal with zero or 
> close to zero overhead, like C and C++.

Or Fortran.

> 2.  Interfaces with C and Fortran legacy code with minimal or no overhead.

This is an essential.  This is Go's biggest problems, it cannot link
easily to existing codes.

> 3.  Has modern convenience/productivity features like GC, a real module 
> system and structural typing via templates.

The bulk of the HEP community might know the words but only if it is in
Fortran -- or C++.

> 4.  Has support for parallelism in the standard library.  (I'm aware of 
> OpenMP, but in my admittedly biased opinion std.parallelism is orders of 
> magnitude more flexible and easier to use.)

The main current tool is MPI for cluster and multicore parallelism using
SPMD and MIMD models, and OpenMP for thread management on multicore
systems.  Fortran, C, C++, and Python all have MPI capability and
Fortran, C, and C++ have  OpenMP -- OpenMP isn't relevant to Python.
This has been the model for 20 years and is likely immovable.  No matter
how good a different model is, it is fighting a war on an entrenched
technology.

The issue is not really a technical one, it is an inertia and
expectation, even political, one.

C++ broke into the Fortran dominated area by fiat of a group of people
in the HEP community.  Also Barton & Nackman "Scientific and Engineering
C++: An Introduction with Advanced Techniques and Examples" was an
important factor.

The question is what is the need and the vector for D to gain traction
in this area where it really does have a USP?


(*) FORTRAN and Fortran are different languages.  The case was changed
formally with the Fortran 1995 standard.
-- 
Russel.
=============================================================================
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder at ekiga.net
41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel at russel.org.uk
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20111218/ed366675/attachment-0001.pgp>


More information about the Digitalmars-d mailing list