Talk:Programming language/Archive 4

message: Ideogram, it is somewhat frustrating that you keep insisting that the other POV has no citations.  I have provided a number of citations where the term "programming language" is used to refer to a non-Turing complete language.  I am not sure what would satisfy you.  Sources that does not think that Turing-completeness is not a prerequisite for a programming language will not necessarily have a sentence saying "a programming language need not necessarily be Turing-complete"; if an author believes that Turing-completeness is irrelevant, then that author will most likely simply not mention it.  In a similar fashion, sources that do not consider intelligent design relevant to evolutionary biology will not mention the absence of a designer; they will simply discuss evolutionary biology.  Nevertheless, I will humor you and provide a few more citations, in addition to the ones I have already provided.
:Programming languages are notations.  They are used for specifying, organizing, and reasoning about computations.  Just as English compositions range from notes to sonnets, programs range from prototypes that are used once and forgotten to production tools that are shared and supported.  This range of needs has motivated the creation of hundreds of programming languages.
:Language designers balance
:*making computing convenient for people with
:*making efficient use of computing machines.
:Convenience comes first.  Without it, efficiency is irrelevant.
:---Ravi Sethi, Programming Languages: Concepts and Constructs
Nothing about Turing-completeness there, nor in the whole textbook ("Turing" does not even appear in the index.)  Also consider this:
:Programming languages are the medium of expression in the art of computer programming.  An ideal programming language will make it easy for programmers to write programs succinctly and clearly.  Because programs are meant to be understood, modified, and maintained over their lifetime, a good programming language will help others read programs and understand how they work.
:---John C. Mitchell, Concepts in Programming Languages
Nothing about Turing-completeness there either.  Mitchell does write, later:
:Computability theory establishes some important ground rules for programming language design and implementation.  ...[deletia]... All standard general-purpose programming languages give us the same class of computable functions (p.16)
However, note that Mitchell felt the need to qualify this statement with the adjective "general-purpose".  Mitchell could easily have omitted this qualifier, but then his statement would have been false.  At best, the above statement only claims that general-purpose programming languages need to be Turing complete (although I still insist that this is a rather curious claim in the face of FORTRAN-77, which had neither a heap nor a stack).
k.lee 22:23, 19 June 2006 (UTC)
replies: text: The scope of SIGPLAN is the theory, design, implementation, description, and application of computer programming languages - languages that permit the specification of a variety of different computations, thereby providing the user with significant control (immediate or delayed) over the computer's operation.
Note that SIGPLAN represents the combined authority of virtually every serious programming language researcher on the planet.  If there is any reasonable citation for a "consensus" definition of programming languages, SIGPLAN's definition is it.  There is nothing about Turing-completeness here. k.lee 22:28, 19 June 2006 (UTC)

text: I'm not trying to exclude your POV.  I'm asking you not to exclude mine.  Ideogram 22:41, 19 June 2006 (UTC)
thread_title: Citations

message: I still think a footnote is better, but I yield to Derek on his preference for inline text.
: I suspect that most readers will be surprised by these examples.  Also I have seen instances where people have jumped in and edited material without reading the footnotes.  An 'idiot proof' article cuts down on the maintenance.  Derek farn 02:04, 18 June 2006 (UTC)
replies: text: I think Joe Smoe will have heard of html, might have heard of sql and is very unlikely to have heard of sed (care to bet that an 'expert' windows programmer edits out that entry within 24 hours?).  Derek farn 02:04, 18 June 2006 (UTC)
replies: text: If so, I'll restore it.  Readership is mixed; it's general audience sure, but use of *nix systems is not "non-general".  I don't want to belabor the issue of the exact computational power of 'sed' (which I believe should be equivalent to a regular grammar; or maybe even more than that), but mentioning something fairly well-known and at a meaningfully "intermediate" level of power is worthwhile.  It's only a half-dozen words, if readers want to know more, they can follow the sed link. LotLE×talk 04:12, 18 June 2006 (UTC)
replies: text: As it turns out, sed is apparently Turing complete. --Allan McInnes (talk) 20:29, 19 June 2006 (UTC)
replies: text: Oh, that seems right.  I had forgotten about the 'b' instruction since... well, when I use sed it's almost always just 's/foo/bar/'. LotLE×talk 20:41, 19 June 2006 (UTC)

text: Which of the definitions of programming language would you apply to sed scripts?   Derek farn 02:04, 18 June 2006 (UTC)
replies: text: Of the bullets, the first three all clearly apply to sed scripts, especially to scripts that are more than one-liners.  The last bullet isn't exactly a definition: it says there are these different levels of computational power, and lots of things are Turing-equivalent, but it doesn't realy define the language in terms of computability. LotLE×talk 04:16, 18 June 2006 (UTC)

text: As I recall the BlooP/FlooP discussion had nothing to do with Turing completness (I cannot recall whether it was about Chomsky's four levels of grammar or first order logic vs. propositional calculus.  I will have to go and dig my copy of GEB out from under a big pile of boxes in the garrage.  Look at the definition of Turing machine to see that a test and jump loop is all that is needed (plus of course store/recall).  Derek farn 20:38, 19 June 2006 (UTC)
replies: text: BlooP has a loop, but it's something like "Loop no more than N times".  N is itself unbounded, but must be specified in the construct.  That's enough to make it not-quite-Turing.  Obviously, if it had a GOTO, that would also be strong enough, but it doesn't. LotLE×talk 20:44, 19 June 2006 (UTC)
thread_title:  The Turing bit in "Definitions" 

message: It's not a terribly important point, but the third bullet in "Definitions" lists flow control as part of the description.  On might be inclined to think that sed does not include flow control.  However, this is not so.  While you cannot loop in sed, you can branch.  For example, let's implement this pseudo-code IF block:
 FOR LINE in FILE:
   IF contains_digits(LINE):
     use_ampersand(LINE)
Here's my sed version:
 $ cat test.data 
 Spam and 37 eggs
 Spam and twenty-one eggs
 $ cat test.sed
 s/\(.*\)\([0-9]\)/(HAS NUM)\1\2/
 s/^\((HAS NUM)\)\(.*\)\(and\)\(.*\)/\2\&\4/
 $ sed -f test.sed test.data 
 Spam & 37 eggs
 Spam and twenty-one eggs
In particular, I create a placeholder prefix on the line in order to effectively have an "IF" test on the next line of the sed script.  More complex arrangements are possible with such placeholders, but this shows the concept.
Also, as written, the article describes the need for a looping construct to be Turing complete.  While something like a loop (including recursion, though calling that a loop feels a bit pedantic to me) is necessary, it is not sufficient.  You need a specific kind of loop.  The example BlooP was constructed specifically to show that a loop can be "too weak" for Turing completeness.  This isn't the article to get into a lot of detail on that, but I wonder if maybe a word or two couldn't be changed to be slightly more accurate (what it says isn't false, but it's slightly misleading). LotLE×talk 05:09, 18 June 2006 (UTC)
replies: text: As I recall the BlooP/FlooP discussion had nothing to do with Turing completness (I cannot recall whether it was about Chomsky's four levels of grammar or first order logic vs. propositional calculus.  I will have to go and dig my copy of GEB out from under a big pile of boxes in the garrage.  Look at the definition of Turing machine to see that a test and jump loop is all that is needed (plus of course store/recall).  Derek farn 20:38, 19 June 2006 (UTC)
replies: text: BlooP has a loop, but it's something like "Loop no more than N times".  N is itself unbounded, but must be specified in the construct.  That's enough to make it not-quite-Turing.  Obviously, if it had a GOTO, that would also be strong enough, but it doesn't. LotLE×talk 20:44, 19 June 2006 (UTC)
thread_title:  Digression on branching and loops 

message: "program" is not defined in the article (A list of instructions performed by a computing machine). "Programming" is not defined in the article (The creation of such a list of instructions).  "Language" is defined early but reference to it is preceed by "artificial" which is wholly insubstantial because there is nothing artificial about a list of instructions.  A programming language is the most direct and best method of communicating with a machine and the purpose of a language is always communication.  "Artifical" should be struck from the first line.  "Program" should be placed first in the list of definitions.  The article also mispresents, I believe, the commonality of modernly used languages.  Its first paragraphs create a confusion of "thousands of languages" with no starting point for a person to begin to understand that a programming language is a method by which a person instructs a machine to perform a series of operations. Terryeo 08:58, 19 June 2006 (UTC)
thread_title:  Frankly, the article lacks some critical points 

message: I note that Macrakis has again reverted the mention of Ada as a general-purpose programming language. In order to forestall another revert war, I'd like to point out the following, which support Macrakis:
# The Ada programming language article specfically states that Ada was originally created for embedded systems.
# The Ada Steelman language requirements document contains the following, which also confirms Macrakis' assertion that Ada was created a an embedded language rather than a general-purpose language
::The technical requirements for a common DoD high order programming language given here are a synthesis of the requirements submitted by the Military Departments. They specify a set of constraints on the design of languages that are appropriate for embedded computer applications (i.e., command and control, communications, avionics, shipboard, test equipment, software development and maintenance, and support applications). (emph. mine)
--Allan McInnes (talk) 20:20, 19 June 2006 (UTC)
thread_title:  Ada 

message: For your reference, templates like  and  may be useful.  Ideogram 14:13, 20 June 2006 (UTC)
thread_title:  Citation format 

message: I notice you removed the breaks I inserted.  I don't know about your browser, but on mine (firefox) there seems to be a formatting bug that runs all three paragraphs in the lead into one paragraph.  I don't know how to fix this.  Ideogram 17:11, 20 June 2006 (UTC)
replies: text: This appears to be a problem cause by the CSCOTW template. Since it's been more than a week since this article became CSCOTW I've simply removed the template. Not sure exactly what the problem was though. I'll have to take a look at the template. --Allan McInnes (talk) 17:19, 20 June 2006 (UTC)
replies: text: I suspect when you moved the footnote ahead of the period it fixed the bug.  I've noticed this before when a footnote ends a paragraph.  Ideogram 17:27, 20 June 2006 (UTC)

text: I don't know how to remove Programming language from the box on Wikipedia:WikiProject Computer Science/Collaboration of the Week.  Ideogram 17:47, 20 June 2006 (UTC)
replies: text: Ok, I've made the fix. I've also added a "change current CSCOTW" link to the template in question, so any time you want to chnage the article to a new one you can just click the link and make your edit. --Allan McInnes (talk) 18:40, 20 June 2006 (UTC)
thread_title:  formatting bug 

message: Thanks for that ISBN.  I really should have done it myself since I have it right in front of me. Ideogram 18:56, 20 June 2006 (UTC)
thread_title:  Thanks for ISBN Allan 

message: The fourth entry is like Euclid's parallel lines postulate:  it's way longer and more clunky than the others.  Ideogram 19:49, 20 June 2006 (UTC)
thread_title:  Definitions section 

message: SQL is not a computational language.  It's a query language.  Ideogram 22:47, 20 June 2006 (UTC)
replies: text: Charity is not a computational language. It's a programming language. --Allan McInnes (talk) 23:34, 20 June 2006 (UTC)
replies: text: Well I don't know what adjective applies to them both.  I tried "artificial", feel free to suggest something.  Ideogram 23:53, 20 June 2006 (UTC)
replies: text: Er. "Programming language"? Recall that some authors restrict the term "programming language" to Turing complete languages, not all authors. That's the whole point of giving those examples in the first place. --Allan McInnes (talk) 23:58, 20 June 2006 (UTC)
replies: text: There is disagreement whether they are programming languages.  A NPOV wouldn't take sides by calling them programming languages.  Ideogram 00:00, 21 June 2006 (UTC)
replies: text: Perhaps the "expressive power" bullet-point needs to be modified to make it more clear that although some people consider Turing-completeness a criteria for being called a "programming language" there are things like SQL and Charity that are considered by many to be programming languages but are not Turing complete. --Allan McInnes (talk) 00:01, 21 June 2006 (UTC)
replies: text: Ok I took a stab at it.  See what you think.  Ideogram 00:10, 21 June 2006 (UTC)

text: The ANSI/ISO thing is very good.  Specific and informative.  But I do have a problem with "and some other computational languages"; it seems vague, wordy, and hard to understand without adding much.  I'd really prefer just to delete (I know you hate that word) it.  Ideogram 01:51, 21 June 2006 (UTC)
replies: text: Well, five words.  I don't necessarily find that exact phrase mellifluous, but I think it's important to let readers know that the list that includes SQL, Charity is not meant as an exhaustive one.  As it read, it felt like a suggestion that only those two languages were "not-Turing".  I don't really care about the specific examples (though SQL is pretty familiar), but only about the indefinite-size quality of the list.  Other examples might include some macro languages, or RPN calculators (I'm pretty confident on that case now that I've read a bit more), or the deliberately limited BlooP, etc. LotLE×talk 02:46, 21 June 2006 (UTC)
replies: text: Try that.  Ideogram 02:52, 21 June 2006 (UTC)
replies: text: Looks good.  "Examples" is a nice word (I think it was there before, but in a slightly different sentence). LotLE×talk 02:54, 21 June 2006 (UTC)
replies: text: Works for me! Nice job, both of you. --Allan McInnes (talk) 03:02, 21 June 2006 (UTC)
replies: text: It's nice to see Lulu and I can still agree on something :-).  Ideogram 03:03, 21 June 2006 (UTC)
thread_title:  SQL