Discussion:
[hercules-os380] declarative language
kerravon86@yahoo.com.au [hercules-os380]
2018-09-08 14:52:06 UTC
Permalink
I have often seen people refer to code as
being a "procedural language". I never
particularly knew what that meant, but now
I can guess - you tell the computer what to
do.

But I am wondering whether we could have
a computer language that can be used to
have precise conversations. E.g. instead of
saying:

Q. How long do elephants live for?
A. Males live an average of 30 years,
and females 35 years.

we would instead have:

question: lifespan attribute ref elephants
answer: elephant sub-category male value 30 years,
elephant sub-category female value 35 years

We would then have a lot of work to do to
convert our human languages into
declarative computer languages.

I am shocked that google home mini is
already able to understand English, as I
would have thought it would require
artificial intelligence to convert from a
human language to a computer language.

BFN. Paul.
Amrith amrith_100_k@yahoo.com [hercules-os380]
2018-09-08 15:54:11 UTC
Permalink
Isn't that natural language processing. I think ibm Watson. Provided web services to exploit them.
--------------------------------------------
On Sat, 9/8/18, ***@yahoo.com.au [hercules-os380] <hercules-***@yahoogroups.com> wrote:

Subject: [hercules-os380] declarative language
To: hercules-***@yahoogroups.com
Date: Saturday, September 8, 2018, 2:52 PM


 









I have often seen people refer to code as

being a "procedural language". I never

particularly knew what that meant, but now

I can guess - you tell the computer what to

do.



But I am wondering whether we could have

a computer language that can be used to

have precise conversations. E.g. instead of

saying:



Q. How long do elephants live for?

A. Males live an average of 30 years,

and females 35 years.



we would instead have:



question: lifespan attribute ref elephants

answer: elephant sub-category male value 30 years,

elephant sub-category female value 35 years



We would then have a lot of work to do to

convert our human languages into

declarative computer languages.



I am shocked that google home mini is

already able to understand English, as I

would have thought it would require

artificial intelligence to convert from a

human language to a computer language.



BFN. Paul.











#yiv2994874968 #yiv2994874968 --
#yiv2994874968ygrp-mkp {
border:1px solid #d8d8d8;font-family:Arial;margin:10px
0;padding:0 10px;}

#yiv2994874968 #yiv2994874968ygrp-mkp hr {
border:1px solid #d8d8d8;}

#yiv2994874968 #yiv2994874968ygrp-mkp #yiv2994874968hd {
color:#628c2a;font-size:85%;font-weight:700;line-height:122%;margin:10px
0;}

#yiv2994874968 #yiv2994874968ygrp-mkp #yiv2994874968ads {
margin-bottom:10px;}

#yiv2994874968 #yiv2994874968ygrp-mkp .yiv2994874968ad {
padding:0 0;}

#yiv2994874968 #yiv2994874968ygrp-mkp .yiv2994874968ad p {
margin:0;}

#yiv2994874968 #yiv2994874968ygrp-mkp .yiv2994874968ad a {
color:#0000ff;text-decoration:none;}
#yiv2994874968 #yiv2994874968ygrp-sponsor
#yiv2994874968ygrp-lc {
font-family:Arial;}

#yiv2994874968 #yiv2994874968ygrp-sponsor
#yiv2994874968ygrp-lc #yiv2994874968hd {
margin:10px
0px;font-weight:700;font-size:78%;line-height:122%;}

#yiv2994874968 #yiv2994874968ygrp-sponsor
#yiv2994874968ygrp-lc .yiv2994874968ad {
margin-bottom:10px;padding:0 0;}

#yiv2994874968 #yiv2994874968actions {
font-family:Verdana;font-size:11px;padding:10px 0;}

#yiv2994874968 #yiv2994874968activity {
background-color:#e0ecee;float:left;font-family:Verdana;font-size:10px;padding:10px;}

#yiv2994874968 #yiv2994874968activity span {
font-weight:700;}

#yiv2994874968 #yiv2994874968activity span:first-child {
text-transform:uppercase;}

#yiv2994874968 #yiv2994874968activity span a {
color:#5085b6;text-decoration:none;}

#yiv2994874968 #yiv2994874968activity span span {
color:#ff7900;}

#yiv2994874968 #yiv2994874968activity span
.yiv2994874968underline {
text-decoration:underline;}

#yiv2994874968 .yiv2994874968attach {
clear:both;display:table;font-family:Arial;font-size:12px;padding:10px
0;width:400px;}

#yiv2994874968 .yiv2994874968attach div a {
text-decoration:none;}

#yiv2994874968 .yiv2994874968attach img {
border:none;padding-right:5px;}

#yiv2994874968 .yiv2994874968attach label {
display:block;margin-bottom:5px;}

#yiv2994874968 .yiv2994874968attach label a {
text-decoration:none;}

#yiv2994874968 blockquote {
margin:0 0 0 4px;}

#yiv2994874968 .yiv2994874968bold {
font-family:Arial;font-size:13px;font-weight:700;}

#yiv2994874968 .yiv2994874968bold a {
text-decoration:none;}

#yiv2994874968 dd.yiv2994874968last p a {
font-family:Verdana;font-weight:700;}

#yiv2994874968 dd.yiv2994874968last p span {
margin-right:10px;font-family:Verdana;font-weight:700;}

#yiv2994874968 dd.yiv2994874968last p
span.yiv2994874968yshortcuts {
margin-right:0;}

#yiv2994874968 div.yiv2994874968attach-table div div a {
text-decoration:none;}

#yiv2994874968 div.yiv2994874968attach-table {
width:400px;}

#yiv2994874968 div.yiv2994874968file-title a, #yiv2994874968
div.yiv2994874968file-title a:active, #yiv2994874968
div.yiv2994874968file-title a:hover, #yiv2994874968
div.yiv2994874968file-title a:visited {
text-decoration:none;}

#yiv2994874968 div.yiv2994874968photo-title a,
#yiv2994874968 div.yiv2994874968photo-title a:active,
#yiv2994874968 div.yiv2994874968photo-title a:hover,
#yiv2994874968 div.yiv2994874968photo-title a:visited {
text-decoration:none;}

#yiv2994874968 div#yiv2994874968ygrp-mlmsg
#yiv2994874968ygrp-msg p a span.yiv2994874968yshortcuts {
font-family:Verdana;font-size:10px;font-weight:normal;}

#yiv2994874968 .yiv2994874968green {
color:#628c2a;}

#yiv2994874968 .yiv2994874968MsoNormal {
margin:0 0 0 0;}

#yiv2994874968 o {
font-size:0;}

#yiv2994874968 #yiv2994874968photos div {
float:left;width:72px;}

#yiv2994874968 #yiv2994874968photos div div {
border:1px solid
#666666;min-height:62px;overflow:hidden;width:62px;}

#yiv2994874968 #yiv2994874968photos div label {
color:#666666;font-size:10px;overflow:hidden;text-align:center;white-space:nowrap;width:64px;}

#yiv2994874968 #yiv2994874968reco-category {
font-size:77%;}

#yiv2994874968 #yiv2994874968reco-desc {
font-size:77%;}

#yiv2994874968 .yiv2994874968replbq {
margin:4px;}

#yiv2994874968 #yiv2994874968ygrp-actbar div a:first-child {
margin-right:2px;padding-right:5px;}

#yiv2994874968 #yiv2994874968ygrp-mlmsg {
font-size:13px;font-family:Arial, helvetica, clean,
sans-serif;}

#yiv2994874968 #yiv2994874968ygrp-mlmsg table {
font-size:inherit;font:100%;}

#yiv2994874968 #yiv2994874968ygrp-mlmsg select,
#yiv2994874968 input, #yiv2994874968 textarea {
font:99% Arial, Helvetica, clean, sans-serif;}

#yiv2994874968 #yiv2994874968ygrp-mlmsg pre, #yiv2994874968
code {
font:115% monospace;}

#yiv2994874968 #yiv2994874968ygrp-mlmsg * {
line-height:1.22em;}

#yiv2994874968 #yiv2994874968ygrp-mlmsg #yiv2994874968logo {
padding-bottom:10px;}


#yiv2994874968 #yiv2994874968ygrp-msg p a {
font-family:Verdana;}

#yiv2994874968 #yiv2994874968ygrp-msg
p#yiv2994874968attach-count span {
color:#1E66AE;font-weight:700;}

#yiv2994874968 #yiv2994874968ygrp-reco
#yiv2994874968reco-head {
color:#ff7900;font-weight:700;}

#yiv2994874968 #yiv2994874968ygrp-reco {
margin-bottom:20px;padding:0px;}

#yiv2994874968 #yiv2994874968ygrp-sponsor #yiv2994874968ov
li a {
font-size:130%;text-decoration:none;}

#yiv2994874968 #yiv2994874968ygrp-sponsor #yiv2994874968ov
li {
font-size:77%;list-style-type:square;padding:6px 0;}

#yiv2994874968 #yiv2994874968ygrp-sponsor #yiv2994874968ov
ul {
margin:0;padding:0 0 0 8px;}

#yiv2994874968 #yiv2994874968ygrp-text {
font-family:Georgia;}

#yiv2994874968 #yiv2994874968ygrp-text p {
margin:0 0 1em 0;}

#yiv2994874968 #yiv2994874968ygrp-text tt {
font-size:120%;}

#yiv2994874968 #yiv2994874968ygrp-vital ul li:last-child {
border-right:none !important;
}
#yiv2994874968
'Bill Turner, WB4ALM' wb4alm@arrl.net [hercules-os380]
2018-09-08 17:55:16 UTC
Permalink
Procedural Programming is a method of programming frequently written in
a top-down fashion, and importance is often given to the flow of the
program rather than on the data that the various functions and
subroutines operate on.

In procedural programming, Subroutine and functions are often used to
centralize the programming code necessary to support a particular type
of data, or where it may be necessary to validate, change or otherwise
process a particular form of data from multiple places within the
program. Procedural Languages are generally not EVENT driven, although
they can be.


Object Oriented languages, on the other hand, are often the result of a
bottom-up approach and where Functions are written to handle data types.
When a particular object (or piece of data) is encountered, various
functions and subroutines are called into play to work on that data.
Object Oriented languages are usually event driven.

Examples of Procedural Languages are Fortran, Cobol, Basic, Pascal and C.

Examples of Object Oriented language are Java, C++.

The ooRexx language (object oriented Rexx) is a hybrid. It supports both
a Procedural Coding style and an Object Oriented style of coding. In
fact, both styles can be used interchangeably in the same program.

- - -

in 1963, I was part of a research project that developed a computer
language that could be used for Programmed Inquiry, Learning or Teaching
in a psuedo-conversational manner.

(Many teachers that created material using one of the variations of
PILOT often preferred the final "T" to mean "Testing" rather than
Teaching, because the student's responses could be words, phrases or
sentences of the student's choosing.)

That language was called PILOT, and was developed under the leadership
of Dr. John A. Starkweather of the University of California in San
Francisco.

The PILOT language was also used as a conversational assist for "new
users" in developing very complicated JCL and programming option control
statements necessary to run a very sophisticated statistical analysis
program used to analyze collected research data... ...after a short
conversation, the PILOT dialog would then ask if the user wanted the job
submitted to the Medical Centers Mainframe computers for processing.

/s/ Bill Turner, wb4alm


On Sat, 9/8/18, ***@yahoo.com.au [hercules-os380]
<hercules-***@yahoogroups.com> wrote:


I have often seen people refer to code as
being a "procedural language". I never
particularly knew what that meant, but now
I can guess - you tell the computer what to
do.

But I am wondering whether we could have
a computer language that can be used to
have precise conversations. E.g. instead of
saying:

Q. How long do elephants live for?
A. Males live an average of 30 years,
and females 35 years.

we would instead have:

question: lifespan attribute ref elephants
answer: elephant sub-category male value 30 years,
elephant sub-category female value 35 years

We would then have a lot of work to do to
convert our human languages into
declarative computer languages.

I am shocked that google home mini is
already able to understand English, as I
would have thought it would require
artificial intelligence to convert from a
human language to a computer language.

BFN. Paul.
Vince Coen vbcoen@gmail.com [hercules-os380]
2018-09-08 18:30:52 UTC
Permalink
Post by 'Bill Turner, WB4ALM' ***@arrl.net [hercules-os380]
In procedural programming, Subroutine and functions are often used to
centralize the programming code necessary to support a particular type
of data, or where it may be necessary to validate, change or otherwise
process a particular form of data from multiple places within the
program. Procedural Languages are generally not EVENT driven, although
they can be.
Object Oriented languages, on the other hand, are often the result of a
bottom-up approach and where Functions are written to handle data types.
When a particular object (or piece of data) is encountered, various
functions and subroutines are called into play to work on that data.
Object Oriented languages are usually event driven.
Examples of Procedural Languages are Fortran, Cobol, Basic, Pascal and C.
Examples of Object Oriented language are Java, C++.
Cobol has been available as a Object Oriented language for many year
even on M/F's compilers for os390 and zOS, - AdvantageAge?? and Enterprise,

Micro focus since Net Cobol and may be before, Fujitsu and others, and
no never learnt OO as it was not suitable to the projects I worked on -
far too small..

Vince
Tony Harminc tharminc@gmail.com [hercules-os380]
2018-09-11 22:46:02 UTC
Permalink
Post by 'Bill Turner, WB4ALM' ***@arrl.net [hercules-os380]
Procedural Programming is a method of programming frequently written in
a top-down fashion, and importance is often given to the flow of the
program rather than on the data that the various functions and
subroutines operate on.
....
Post by 'Bill Turner, WB4ALM' ***@arrl.net [hercules-os380]
Object Oriented languages, on the other hand, are often the result of a
bottom-up approach and where Functions are written to handle data types.
When a particular object (or piece of data) is encountered, various
functions and subroutines are called into play to work on that data.
Object Oriented languages are usually event driven.
I'm not sure I would contrast Procedural and OO languages very
strongly. I'd say if there's an "opposite" of Procedural it would be
Declarative.

JCL is mostly a declarative language. Obviously job steps run in a
sequence that is to some extent controllable, but e.g. DD statements
are not "executed" in order - they are a statement of what you want
done. Of course there are less strange and more general purpose
declarative languages than JCL.

Tony H.
Tony Harminc tharminc@gmail.com [hercules-os380]
2018-09-12 19:22:45 UTC
Permalink
Post by ***@yahoo.com.au [hercules-os380]
I am shocked that google home mini is
already able to understand English, as I
would have thought it would require
artificial intelligence to convert from a
human language to a computer language.
Why do you think it doesnt?

You might be interested in this guy http://www.williamtp.com . I first
bumped into him almost 20 years ago when I bought a copy of his
Anagram Genius program (mailed on diskette) and quickly realized that
it was much more than just a matter of searching and shuffling
dictionary words. I still use it on occasion. Next, he produced a
program to solve cryptic crosswords. He then went on to found an
outfit that eventually produced the back end (not the speech
recognition part) for Amazon's Alexa, which is a lot like Google Home.

Tony H.

Continue reading on narkive:
Loading...