comp.lang.ada
 help / color / mirror / Atom feed
From: Georg Bauhaus <rm.dash-bauhaus@futureapps.de>
Subject: Re: fyi, very interesting Ada paper OOP vs. Readability
Date: Wed, 16 May 2012 20:01:56 +0200
Date: 2012-05-16T20:01:56+02:00	[thread overview]
Message-ID: <4fb3eb94$0$9505$9b4e6d93@newsspool1.arcor-online.net> (raw)
In-Reply-To: <jp0fec$1hu$1@speranza.aioe.org>

On 16.05.12 17:00, NatarovVI wrote:
>>> in the modern parallel world, functional way better than imperative.
>>> because data flows in parallel program will be clearer and more
>>> deterministic.

Modern parallel world is what I'm asking about: the modern world
has a small niche, that of scientific computations, socio-economic
modelling, image processing and the like. But at large, any computation
in a modern world includes two mathematically sound variables in every
problem statement to be solved by programming: TIME and SPACE.
So does Harper (at existentialtype.wordpress.com). See below.
Which is what I am asking about.

Sometimes, well, most of the time, these notions need to be
more precise than those of general efficiency classes O(f(...)).
The modern world poses many problem statements that have more
specific time bounds. Examples:

- Stop the car/train/plain/ship/oven/recorder/saw, and turn
things 1 .. M off.
Now. You have 650 milliseconds for your algorithm, and
the budget allows for at most p processors, buses etc.

- How many traders will likely sell before tomorrow?

These examples include potentially parallel, not concurrent,
sub-computations, and see below what Harper actually says
about how to arrive at parallel.

Note that Harper mentions the "fork-join structure" of
a Quicksort example, and that Randy Brukardt mentions
the overhead that Harper delegates to "the engineers".
The overhead appears vaguely (somewhat imprecisely one might say)
in the following theorem mentioned by Harper.

To quote:

"*Theorem* A computation with work w and depth d can be
 implemented in a p-processor PRAM in time O(max(w/p, d))."

My question then translates into: How precise can O be
for each p?
Because the *problem* statement *requires* that we make
predictions of a certain precision, as outlined in
the modern real world examples above.

>> In all fairness, contemporary parallelism frequently needs to handle
>> signals, and emit signals, at well defined points in time, and in an
>> order dictated by the purpose of the program. The signals are results of
>> the program's parallel computations.
>> In which ways does monadic IO simplify predictability of effects?
> 
> "parallelism is not concurrency"
> look at existentialtypes.wordpress.com for terminology explanation.

That's existstentialtype<del>s</del> where, worth mentioning,
Prof Rober Harper, well known and respected ML guy, offers thoughts.
More specifically, the terminology is here

http://existentialtype.wordpress.com/2011/03/17/parallelism-is-not-concurrency/

From which I quote:

"Now I can hear you object, but isn’t concurrency
 required to implement parallelism?  Well, yes, it is,
 (...)! The point is that concurrency is not relevant
 to parallelism, even if the engineers who build our
 parallel computing platforms must deal with concurrency."

Paraphrased: How can we parallel programmers rid us of the
real work of implementing hardware and software for our parallel
programs and delegate the not-so-entertaining programming
and computer construction to "the concurrency engineers"?

Don't get me wrong. I rather like the idea of language-based
model of [parallel] computation that assigns "costs to the
steps of the program we actually write". I rather like that.
It is roughly equivalent to my question about predictability.
(Note: not determinism. Predictability of time, storage, and
effects.) And it is an ages old dream.

Note that Ada is between the "horrendous" programming
without language support about which Harper is complaining,
and the envisioned language that has parallel
constructs without all the concurrency things.
Ada, more than other languages, lets you define constructs
made from language that operate in parallel (not concurrent).
Without resorting to "locks, monitors, deadlock, dining
philosophers, …" 


> FP <> Haskell!
> i not sayed one word about monads or damned Haskell.

OK. ML has reference types. (Why?) Again, if they some day 
arrive at a language-based solution that will allow the
removal of reference types etc, and still allow precise
considerations of efficiency of parallel sub-computations,
and further processing of the results of sub-computations,
in time, in the modern world, perfect!




  reply	other threads:[~2012-05-16 18:02 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-09 13:06 fyi, very interesting Ada paper OOP vs. Readability Nasser M. Abbasi
2012-05-09 13:19 ` Nasser M. Abbasi
2012-05-09 13:36   ` Dmitry A. Kazakov
2012-05-09 13:39     ` Patrick
2012-05-09 13:55       ` Egil Høvik
2012-05-10  2:33 ` Randy Brukardt
2012-05-10  6:33   ` Simon Wright
2012-05-12  0:37     ` Randy Brukardt
2012-05-30  2:09       ` BrianG
2012-05-30  7:29         ` Niklas Holsti
2012-05-30  7:54           ` Yannick Duchêne (Hibou57)
2012-05-30  7:59             ` Dmitry A. Kazakov
2012-05-30 12:45               ` stefan-lucks
2012-05-30 13:12                 ` Dmitry A. Kazakov
2012-05-30 19:11           ` Jeffrey Carter
2012-05-30 23:00           ` BrianG
2012-06-21 16:06             ` Randy Brukardt
2012-05-10  8:43   ` Maciej Sobczak
2012-05-15  6:16     ` Simon Wright
2012-05-10 11:46   ` Dmitry A. Kazakov
2012-05-10 14:23     ` Georg Bauhaus
2012-05-10 14:47       ` Nasser M. Abbasi
2012-05-10 15:11         ` Adam Beneschan
2012-05-10 16:06         ` Georg Bauhaus
2012-05-10 18:41           ` Niklas Holsti
2012-05-11  8:20             ` Georg Bauhaus
2012-05-10 20:11           ` Nasser M. Abbasi
2012-05-10 21:17             ` tmoran
2012-05-10 18:07         ` Jeffrey Carter
2012-05-11  7:32         ` Maciej Sobczak
2012-05-10 12:31 ` J-P. Rosen
2012-05-10 13:32 ` Yannick Duchêne (Hibou57)
2012-05-10 13:38   ` Nasser M. Abbasi
2012-05-10 23:42     ` Zhu Qun-Ying
2012-05-11  6:05   ` J-P. Rosen
2012-05-11  3:01 ` NatarovVI
2012-05-11  7:14   ` Dmitry A. Kazakov
2012-05-11  7:32     ` Nasser M. Abbasi
2012-05-11  7:58       ` Dmitry A. Kazakov
2012-05-13  3:11         ` NatarovVI
2012-05-13 10:03           ` Georg Bauhaus
2012-05-16 15:00             ` NatarovVI
2012-05-16 18:01               ` Georg Bauhaus [this message]
2012-05-21 16:35                 ` NatarovVI
2012-05-21 17:56                   ` Georg Bauhaus
2012-05-23 16:01                     ` NatarovVI
2012-05-23 16:12                       ` NatarovVI
2012-05-16 15:31     ` NatarovVI
2012-05-16 16:40       ` Dmitry A. Kazakov
2012-05-21 17:23         ` NatarovVI
2012-05-21 18:53           ` Dmitry A. Kazakov
2012-05-21 19:21             ` Nasser M. Abbasi
2012-05-23 17:59               ` NatarovVI
2012-05-23 18:45                 ` Dmitry A. Kazakov
2012-05-23 17:39             ` NatarovVI
2012-05-23 18:39               ` Dmitry A. Kazakov
2012-05-11  3:09 ` NatarovVI
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox