From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,70414f56d810c10c X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.11.199 with SMTP id s7mr38489208pbb.5.1317284773530; Thu, 29 Sep 2011 01:26:13 -0700 (PDT) Path: lh7ni7366pbb.0!nntp.google.com!news1.google.com!news3.google.com!feeder1.cambriumusenet.nl!feed.tweaknews.nl!193.201.147.78.MISMATCH!feeder.news-service.com!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: discriminant questions Date: Thu, 29 Sep 2011 10:26:03 +0200 Organization: cbb software GmbH Message-ID: <1vb9afcggqs8b$.prrlzbnf51p$.dlg@40tude.net> References: <9f37b726-d80b-4d24-bf3f-28a14255f7fd@s20g2000yql.googlegroups.com> <1tpl2pc36ptr4$.txv4v3wmkjlm.dlg@40tude.net> <1malv6h6q31j3.uz9ws5j0glnm.dlg@40tude.net> <4e81a2f4$0$7624$9b4e6d93@newsspool1.arcor-online.net> <4e81e788$0$6542$9b4e6d93@newsspool4.arcor-online.net> <4e8210ab$0$6550$9b4e6d93@newsspool4.arcor-online.net> <4e83b568$0$7620$9b4e6d93@newsspool1.arcor-online.net> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: FbOMkhMtVLVmu7IwBnt1tw.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Xref: news1.google.com comp.lang.ada:18191 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Date: 2011-09-29T10:26:03+02:00 List-Id: On Thu, 29 Sep 2011 02:01:44 +0200, Georg Bauhaus wrote: > On 27.09.11 21:06, Dmitry A. Kazakov wrote: > >>> I had been talking about programming constructs, not specialized >>> mathematical functions that may or may not be expressed in terms >>> of more primitive mathematical functions. >> >> A difference? > > Huge difference. A programming language such as Ada is about > a universal computing apparatus. Mathematical language can do > without such an apparatus, Come on, it is not XIX century. Mathematical language is all about such apparatus: axiomatic frameworks + inference, nothing else. All major achievements of XX century mathematics lay in understanding of multiplicity and studying the limitations of such apparatuses. > an Ada program is typically written > to need one. Also, square root has no place in the core of a > general purpose programming language, because its purpose is > not general; it is from some application domain with such a language. I don't understand this. Has the number 12.3 general purpose, or specific to the domain of numbers smaller than 13? >> like >> containers. That means that the language should allow to "override" not >> only the loop's body, but also its continue-or-exit part. > > I'm not sure I understand. A for-loop consists of its body and its "header". In Ada you can define the body of such loop as whatever pleases you. But the loop header Ada fails to abstract it properly, e.g. as: for Index in Indicator-Set loop >> Sorry, but this is what parallel programming is about. > > Nitpick: Parallel programs do not seem so interesting insofar as parallel > programs don't communicate. No, communication is a solution. The key word is synchronization. Independent components of a parallel program traverse certain states coherently. Communication is a method to uphold the coherence. > But with tasks, perhaps I have a different meaning of "primitive" in > my mind: a task type can be a primitive of some Ada concurrency model. > But seen from the viewpoint of concurrency theory (not that I know > that much about it), insofar as it is about controlling the cooperation > of a set of "primitive" universal computers, Ada task types already > handle too much detail to be called "primitive". A "primitive universal computer" runs what? [answer: one or more tasks] Task in the meaning "subject of scheduling" is not only primitive, it is atomic, semantically there is nothing a task could be divided into. > (Else no one > would have discussed "abstraction inversion" in Ada tasking?) (In Ada 83 days I used tasks to pass subprogram as a parameter) > The level of detail in a concept is the biggest factor in "heavy" IMO. > Heavy things might be useful, they might feel right, they might be > efficient (or free). Again, "heavy" is meaningless outside one of three contexts: 1) computational environment ("hardware language"), 2) the programming language, 3) the problem domain. Is sqrt "heavy"? >> Don't confuse language construction with the Hilbert's program! > > Building upwards from "primitive thoughts" influences the way programming > languages develop, but which thoughts are allowed as primitive thoughts? Minimal complete sets. > But Ada is a general purpose programming > language made for the primitive electrical things in particular. Electrical things = electromagnetic fields? (:-)) In 40-50's there was a term for what you meant: systems of relays. Electrical switches (tubes, transistors) is an example of. But of course Ada was not made for that. > That's a useful hint at what general purpose should mean, and how > general purpose drives the choice of core primitives of the language. Nope. General purpose means what it says, an ability to use this language for developing a most wide set of applications. > For example, in Ada, there is no built-in mechanism for scanning a database > of facts like there is in Prolog. Prolog was not made for "electrical things"? (:-)) To put it into relation, you can implement Prolog inference engine in Ada, you also can use Prolog inference to implement, say, Ada's fixed point arithmetic. The difference is only in how much source code it takes and how simple would be to maintain such code. This has nothing to do with hardware. Machine code is not general purpose language. General purpose, see above, means that the efforts needed to complete a programming tasks are approximately same for different application domains. > "Delay" is a key word of Ada the language (and not in Ada > the library) whereas this is not usually the case with other languages: > their "primitive thoughts" have been different, and have not considered > the same requirements of control. > > Should there be an "interface" that allows programmers to implement > the meaning of "delay" instead of the language doing it? These are two different issues here: 1. Syntactic shape of delay 2. Its semantics (e.g. user-defined) 1. The shape of delay is irrelevant (e.g. can be a subprogram) IF delay is not composable. As you know delay do participate in things which cannot be expressed by means of procedural decomposition. Example: timed entry call. 2. The semantics of delay is fixed in real-time systems and need not to be redefined. But, considering simulation systems, where time is simulated, it would be thinkable to have Duration, Time user-defined and delay overridden. What was the point? -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de