From: Tayssir John Gabbour
Subject: Re: A programming language is...
Date: 
Message-ID: <cfot38$fsv@odak26.prod.google.com>
Mike Cox wrote:
> ...anything that has a loop.  Since HTML doesn't have a loop
> anywhere, it is not a programming language.  Simple as that.
No?
http://symbol.pentaside.org/article/loop.html

From: Jeff
Subject: Re: A programming language is...
Date: 
Message-ID: <HWTTc.264304$%_6.213498@attbi_s01>
Tayssir John Gabbour wrote:

> Mike Cox wrote:
> > ...anything that has a loop.  Since HTML doesn't have a loop
> > anywhere, it is not a programming language.  Simple as that.
> No?
> http://symbol.pentaside.org/article/loop.html

I cannot believe how seriously silly this thread is. HTML is no more a
programming language than a makefile is. It is a method of storing
data. Just as a makefile is a method of storing rules.

The HTML cannot produce different data than what it contains. It is
incapable of creating data at all. It requires that a programming
language be embedded into it (ala PHP, Javascript, etc) to do this.

Jeff
From: Pascal Costanza
Subject: Re: A programming language is...
Date: 
Message-ID: <cfq09m$s0v$1@newsreader2.netcologne.de>
Jeff wrote:

> I cannot believe how seriously silly this thread is.

Either it's silly, or one of us doesn't get it. Do you know something 
about metacircular evaluation? This is not a rhetorical question, so do you?

> HTML is no more a
> programming language than a makefile is. It is a method of storing
> data. Just as a makefile is a method of storing rules.

So what do you think happens when you call make? What element in the 
process controls the outcome of that call?


Pascal

-- 
Tyler: "How's that working out for you?"
Jack: "Great."
Tyler: "Keep it up, then."
From: Rob Warnock
Subject: Re: A programming language is...
Date: 
Message-ID: <_NSdnVubCZa5BL3cRVn-pg@speakeasy.net>
Pascal Costanza  <········@web.de> wrote:
+---------------
| Jeff wrote:
| > HTML is no more a programming language than a makefile is.
| > It is a method of storing data. Just as a makefile is a method
| > of storing rules.
| 
| So what do you think happens when you call make?
| What element in the process controls the outcome of that call?
+---------------

*HERE* is the element that controls that process:

    % cd /usr/src/usr.bin/make
    % ls
    Makefile        cond.c          job.c           make.c          suff.c
    Makefile.dist   config.h        job.h           make.h          targ.c
    PSD.doc         dir.c           list.h          nonints.h       util.c
    arch.c          dir.h           lst.h           parse.c         var.c
    buf.c           for.c           lst.lib         pathnames.h
    buf.h           hash.c          main.c          sprite.h
    compat.c        hash.h          make.1          str.c
    % 

And, yes, like building CMUCL ( ;-} ), it's a self-building tool.
The very first anyone ever built "make" they had to type the "cc"
and "ld" commands themselves, but now you get to type "make make".  ;-}


-Rob

-----
Rob Warnock			<····@rpw3.org>
627 26th Avenue			<URL:http://rpw3.org/>
San Mateo, CA 94403		(650)572-2607
From: Kristof Bastiaensen
Subject: Re: A programming language is...
Date: 
Message-ID: <pan.2004.08.17.18.31.16.388916@vleeuwen.org>
On Mon, 16 Aug 2004 01:17:27 +0000, Jeff wrote:
> 
> I cannot believe how seriously silly this thread is. HTML is no more a
> programming language than a makefile is. It is a method of storing data.
> Just as a makefile is a method of storing rules.
> 
> Jeff

Agreed about HTML.  HTML is not a programming language because it doesn't
describe a change of state.  The only state is the html page itself.  Of
course one could say that a link is a change of state.  But the user still
has to click the link to be able to change the state, the computer cannot
do it out of itself.

I am not sure about make, perhaps it could be considered as a programming
language.  The fact that isn't meant as a programming language doesn't
mean it isn't. Postscript and Tex are both programming languages (and text
formatting languages). Also sed can be considered as a programming
language.  Someone has even written an unlambda interpreter in sed.

KB
From: Kaz Kylheku
Subject: Re: A programming language is...
Date: 
Message-ID: <cf333042.0408171517.69f8630a@posting.google.com>
Kristof Bastiaensen <·······@vleeuwen.org> wrote in message news:<······························@vleeuwen.org>...
> On Mon, 16 Aug 2004 01:17:27 +0000, Jeff wrote:
> > 
> > I cannot believe how seriously silly this thread is. HTML is no more a
> > programming language than a makefile is. It is a method of storing data.
> > Just as a makefile is a method of storing rules.
> > 
> > Jeff
> 
> Agreed about HTML.  HTML is not a programming language because it doesn't
> describe a change of state. 

A purely functional expression also doesn't describe a change of
state. It can be parametrized: different inputs can produce different
outputs. But a functional program with no inputs is still a program.
An expression with no inputs that produces the first 10 rows of
Pascal's Triangle is code, is it not?

What distinguishes code from data? Ignoring for a moment the
possibility that something can be both, there is a continuum.
Completely pure data stands for itself. Or, rather, its meaning is
simple in the sense that it represents a structure that is naively
isomorphic to that data so that we can shift between the two with
relative ease. The punched cards going into the Jacquard loom are pure
data. They stand for something that trivially resembles them: the
weaving patterns of black and white silk. Some needle drops into a
hole, I imagine, and causes a thread to move in such a way that a
black dot results when the shuttle passes through and the weave is
compacted. Moreover, the cards are all treated equally. You can omit
some of them randomly, and the corresponding deletions occur in the
output.

Pure code, on the other hand, doesn't resemble at all the structure
that emerges when it is interpreted, unless it's deliberately
contrived to do so (a quine) in which case we are pleasantly surprised
because we don't expect a program to compute something that resembles
its own image, let alone reproduces it exactly. What is computed may
be much larger than the program itself: a program that, upon
interpretation, turns into the first million digits of pi isn't
anywhere near one million characters long.

Then there are things in between. For example, what about text that
contains a set of trivial definitions whereby pieces of text are
assigned to names, and then recalled for substitution by mention of
these names. In other words, macro preprocessed text. Is that code? Or
just compressed data? There is some context now; you can't start
interpreting the text just anywhere, because you have to know whether
some section is pure text, or whether it's a definition. If you
encounter a substitution symbol, you must have previously processed
the definition or you have to raise an error about an undefined
symbol.

How sophisticated does the compression have to be before we conclude
that the compressed data is actually program code?
From: Jeff
Subject: Re: A programming language is...
Date: 
Message-ID: <u7BUc.143306$8_6.55393@attbi_s04>
Kaz Kylheku wrote:

> Kristof Bastiaensen <·······@vleeuwen.org> wrote in message
> news:<······························@vleeuwen.org>...
> > On Mon, 16 Aug 2004 01:17:27 +0000, Jeff wrote:
> > > 
> > > I cannot believe how seriously silly this thread is. HTML is no
> > > more a programming language than a makefile is. It is a method of
> > > storing data.  Just as a makefile is a method of storing rules.
> > > 
> > > Jeff
> > 
> > Agreed about HTML.  HTML is not a programming language because it
> > doesn't describe a change of state. 
> 
> A purely functional expression also doesn't describe a change of
> state. It can be parametrized: different inputs can produce different
> outputs. But a functional program with no inputs is still a program.
> An expression with no inputs that produces the first 10 rows of
> Pascal's Triangle is code, is it not?

No doubt. No argument there. But, this cannot be done in HTML. You
could create a Pascal triangle in HTML, but it would involve making a
table a and then filling in each row yourself with the appropriate data.

My argument has nothing to do with state. It has to do with the fact
that HTML cannot create data. HTML can take input, (mouse clicks, input
fields), but cannot actually /do/ anything with that data other than
pass it onto another program which can.

This may be my own opinion, but a program (and subsequently a
programming language is that which can be used to create a program) is
something which has the ability to create data that it was not supplied
with.

Jeff
From: Kristof Bastiaensen
Subject: Re: A programming language is...
Date: 
Message-ID: <pan.2004.08.18.21.38.18.843937@vleeuwen.org>
On Tue, 17 Aug 2004 16:17:20 -0700, Kaz Kylheku wrote:

> Kristof Bastiaensen <·······@vleeuwen.org> wrote in message
> news:<······························@vleeuwen.org>...
>> On Mon, 16 Aug 2004 01:17:27 +0000, Jeff wrote:
>> > 
>> > I cannot believe how seriously silly this thread is. HTML is no more a
>> > programming language than a makefile is. It is a method of storing
>> > data. Just as a makefile is a method of storing rules.
>> > 
>> > Jeff
>> 
>> Agreed about HTML.  HTML is not a programming language because it
>> doesn't describe a change of state.
> 
> A purely functional expression also doesn't describe a change of state. It
> can be parametrized: different inputs can produce different outputs. But a
> functional program with no inputs is still a program. 

Pure lambda calculus is not a programming language. 
It is a mathematical basis for computing.  A functional
expression without inputs (or other side-effects) can be considered equal
to its outcome, just as 2 + 2 is equal to 4.  However this
is not useful for a programming language.  A functional programming
language must also be able to perform those transformations on
the input.  As such, a functional programming language does
describe a change in state, only not explicitly.  The change in 
state is a result from computing the functional expression.

> An expression with
> no inputs that produces the first 10 rows of Pascal's Triangle is code, is
> it not?

An expression that produces the first 10 rows of Pascal's Triangle
is not necessarily code (just as an equation isn't code), but if
that expression is put into a form that a computing device can
use to calculate the result, it is code.  What would you think
of the following line?  Is it code?

  "Hello world"

> 
> What distinguishes code from data? Ignoring for a moment the possibility
> that something can be both, there is a continuum. Completely pure data
> stands for itself. Or, rather, its meaning is simple in the sense that
> it represents a structure that is naively isomorphic to that data so
> that we can shift between the two with relative ease. The punched cards
> going into the Jacquard loom are pure data. They stand for something
> that trivially resembles them: the weaving patterns of black and white
> silk. Some needle drops into a hole, I imagine, and causes a thread to
> move in such a way that a black dot results when the shuttle passes
> through and the weave is compacted. Moreover, the cards are all treated
> equally. You can omit some of them randomly, and the corresponding
> deletions occur in the output.
> 
> Pure code, on the other hand, doesn't resemble at all the structure that
> emerges when it is interpreted, unless it's deliberately contrived to do
> so (a quine) in which case we are pleasantly surprised because we don't
> expect a program to compute something that resembles its own image, let
> alone reproduces it exactly. What is computed may be much larger than
> the program itself: a program that, upon interpretation, turns into the
> first million digits of pi isn't anywhere near one million characters
> long.
> 
> Then there are things in between. For example, what about text that
> contains a set of trivial definitions whereby pieces of text are
> assigned to names, and then recalled for substitution by mention of
> these names. In other words, macro preprocessed text. Is that code? Or
> just compressed data? There is some context now; you can't start
> interpreting the text just anywhere, because you have to know whether
> some section is pure text, or whether it's a definition. If you
> encounter a substitution symbol, you must have previously processed the
> definition or you have to raise an error about an undefined symbol.
> 
> How sophisticated does the compression have to be before we conclude
> that the compressed data is actually program code?

That's true, it can be difficult to say wether a language
can be considered as a programming language, or if it merely 
describes data.  The best way would be to call only turing
complete languages a programming language.  But that would
leave out languages that are considered to be also programming
languages (like your punchcard example).  In that case it
is more the purpose that counts.  The lack of a concrete
defenition for a programming language would enable anything
to be called a programming language (for example english).
This is just silly, and obviously false in the case of HTML,
because of it's lack to describe a change in state.

KB
From: Pascal Costanza
Subject: Re: A programming language is...
Date: 
Message-ID: <cg0lod$p1i$1@newsreader2.netcologne.de>
Kristof Bastiaensen wrote:

> Pure lambda calculus is not a programming language. 

OK, let me try again from a different angle: What do you gain by 
excluding things from the list of what you would consider a programming 
language. (Kristof, I don't mean you personally, but everyone who thinks 
that restricted views of what is possible are in any way meaningful.)

Pascal

P.S.: Did I mention that people should read about metacircular evaluation?

-- 
Tyler: "How's that working out for you?"
Jack: "Great."
Tyler: "Keep it up, then."
From: Jeff
Subject: Re: A programming language is...
Date: 
Message-ID: <HiSUc.281498$%_6.254800@attbi_s01>
Pascal Costanza wrote:

> 
> Kristof Bastiaensen wrote:
> 
> > Pure lambda calculus is not a programming language. 
> 
> OK, let me try again from a different angle: What do you gain by
> excluding things from the list of what you would consider a
> programming language?

What do I get by saying that 4=5? Nothing. But it is still wrong.
From: Pascal Costanza
Subject: Re: A programming language is...
Date: 
Message-ID: <cg22at$5b3$1@newsreader2.netcologne.de>
Jeff wrote:

> Pascal Costanza wrote:
> 
>>Kristof Bastiaensen wrote:
>>
>>>Pure lambda calculus is not a programming language. 
>>
>>OK, let me try again from a different angle: What do you gain by
>>excluding things from the list of what you would consider a
>>programming language?
> 
> What do I get by saying that 4=5? Nothing.

Next time you go shopping you'll notice. ;)

> But it is still wrong.

So let's see. What's the difference between

<point>
   <x>46</x>
   <y>11</y>
</point>

...and...

(make-instance 'point
   :x 46
   :y 11)

There are people working at Microsoft to include the former as 
acceptable object literals in programming languages. [1] (IIUC, 
something like #.(make-instance 'point :x 46 :y 11) in Common Lisp.)

Whether that's a good idea is besides the point.

There is also a quote cited by Guy Steele at a panel discussion [2, at 
about 22:10]: "A data structure is a very stupid programming language."

He cites TeX and Word as examples of formats that started as pure data 
structures, but eventually turned out as fully programmable.

The point that I am trying to make is that it is very hard to draw the 
fine line between pure date structure and "real" programming language. 
Much harder than to draw the line between correct and incorrect 
arithmetics. Probably more along the lines of distinguishing between day 
and night. (Is dawn more day or more night?)

There are fields where language designers are trying hard to make a 
language less expressive. See for example ACL2 that only accepts 
recursions (and iterations) that provably terminate. This is used in 
real-world applications, for example for proving the correctness of 
CPUs. It's probably nearly impossible to program a sufficiently 
interactive program in such a system. So would you still consider this a 
programming language or not?

What you always have in software is a description of what you want and 
an interpreter that takes this description and executes it. (Including 
such interpreters like CPUs for machine code, i.e. bytes or words of 
pure data.) There is no way around it. Your classification of something 
as a programming language or a data format is only based by looking at 
one side of this duality. You forget that you always need both sides. As 
soon as you take both sides into account, it will become clear that this 
classification is not meaningful. It's like taking a sheet of music and 
claiming that it really isn't music because you cannot put it into your 
CD player and listen to it.


BTW, the notion that programs and data are the same is the essence of 
metacircular evaluation. It really, really, really helps to read 
something about it.


Pascal


[1] http://research.microsoft.com/~emeijer/Papers/XML2003/xml2003.html
[2] http://technetcast.ddj.com/tnc_play_stream.html?stream_id=643

-- 
Tyler: "How's that working out for you?"
Jack: "Great."
Tyler: "Keep it up, then."
From: Curt
Subject: Re: A programming language is...
Date: 
Message-ID: <slrnci9ho8.1f2.curty@einstein.electron.net>
On 2004-08-19, Pascal Costanza <········@web.de> wrote:

> The point that I am trying to make is that it is very hard to draw the 
> fine line between pure date structure and "real" programming language. 
> Much harder than to draw the line between correct and incorrect 
> arithmetics. Probably more along the lines of distinguishing between day 
> and night. (Is dawn more day or more night?)

The ultimate tendancy of dawn is day and of dusk is night.

The ultimate tendancy of a programming language is to provide a systematic, 
coherent, rich and capacious medium of communication with a computer; if one 
embraces this sense, html would be eliminated from the category of 
programming languages.  The point of eliminating it is to sharpen our 
definition so that it is keener, finer, more meaningful, rather than broaden 
it so that it becomes a loose sac that can hold nearly anything, or 
just about everything.  

  
From: Joost Kremers
Subject: Re: A programming language is...
Date: 
Message-ID: <slrnci9ipn.d5.joostkremers@j.kremers4.news.arnhem.chello.nl>
Curt wrote:
> The ultimate tendancy of dawn is day and of dusk is night.
>
> The ultimate tendancy of a programming language is to provide a systematic, 
> coherent, rich and capacious medium of communication with a computer;

but that kinda begs the question: what is "communicating with a computer"?
IMO clicking your way through a wizard to accomplish a task can also be
regarded as "communicating with a computer". yet i wouldn't call the
wizard a programming language.

> if one 
> embraces this sense, html would be eliminated from the category of 
> programming languages.

not under a slightly wider definition of "communicating with a computer"...

-- 
Joost Kremers                                      ············@yahoo.com
Selbst in die Unterwelt dringt durch Spalten Licht
EN:SiS(9)
From: Mikael Brockman
Subject: Re: A programming language is...
Date: 
Message-ID: <87vfffcdph.fsf@igloo.phubuh.org>
Joost Kremers <············@yahoo.com> writes:

> Curt wrote:
> > The ultimate tendancy of dawn is day and of dusk is night.
> >
> > The ultimate tendancy of a programming language is to provide a
> > systematic, coherent, rich and capacious medium of communication
> > with a computer;
> 
> but that kinda begs the question: what is "communicating with a
> computer"?  IMO clicking your way through a wizard to accomplish a
> task can also be regarded as "communicating with a computer". yet i
> wouldn't call the wizard a programming language.
> 
> > if one embraces this sense, html would be eliminated from the
> > category of programming languages.
> 
> not under a slightly wider definition of "communicating with a
> computer"...

Do you consider a wizard ``systematic, coherent, rich and capacious''?

  mikael
From: Joost Kremers
Subject: Re: A programming language is...
Date: 
Message-ID: <slrnci9n6j.d5.joostkremers@j.kremers4.news.arnhem.chello.nl>
Mikael Brockman wrote:
> Joost Kremers <············@yahoo.com> writes:
>
>> Curt wrote:
>> > The ultimate tendancy of dawn is day and of dusk is night.
>> >
>> > The ultimate tendancy of a programming language is to provide a
>> > systematic, coherent, rich and capacious medium of communication
>> > with a computer;
>> 
>> but that kinda begs the question: what is "communicating with a
>> computer"?  IMO clicking your way through a wizard to accomplish a
>> task can also be regarded as "communicating with a computer". yet i
>> wouldn't call the wizard a programming language.
>> 
>> > if one embraces this sense, html would be eliminated from the
>> > category of programming languages.
>> 
>> not under a slightly wider definition of "communicating with a
>> computer"...
>
> Do you consider a wizard ``systematic, coherent, rich and capacious''?

these are all pretty subjective properties, so why not?

yeah, i know, intuitively Curt's definition makes sense. but it's not
quantifiable, so in the end it won't help much.

not that i have anything better to offer, of course... :-/

-- 
Joost Kremers                                      ············@yahoo.com
Selbst in die Unterwelt dringt durch Spalten Licht
EN:SiS(9)
From: Curt
Subject: Re: A programming language is...
Date: 
Message-ID: <slrncia12h.1vs.curty@einstein.electron.net>
On 2004-08-19, Joost Kremers <············@yahoo.com> wrote:
 
>>> but that kinda begs the question: what is "communicating with a
>>> computer"?  IMO clicking your way through a wizard to accomplish a
>>> task can also be regarded as "communicating with a computer". yet i
>>> wouldn't call the wizard a programming language.
 
>>> > if one embraces this sense, html would be eliminated from the
>>> > category of programming languages.
 
>>> not under a slightly wider definition of "communicating with a
>>> computer"...

>> Do you consider a wizard ``systematic, coherent, rich and capacious''?

> these are all pretty subjective properties, so why not?

Can I say that French is a richer system for communicating ideas and
feelings than pidgin?  Will you then attempt to demonstrate that "A la
recherche du temps perdu" and "Mati�re et m�moire" are perfectly expressible
in the latter, albeit more "laboriously"? 

The wizard possesses no magic, and we know the hand behind the wand.  We
also know that his expressive power is stilted -- he is programmed to
communicate a limited number of things, and can say no others.  This
limitation is in opposition to the language which created the wizard whose 
only expressive limit is that which it is possible to express.

> yeah, i know, intuitively Curt's definition makes sense. but it's not
> quantifiable, so in the end it won't help much.

> not that i have anything better to offer, of course... :-/
From: Joost Kremers
Subject: Re: A programming language is...
Date: 
Message-ID: <slrncia2cs.j0m.joostkremers@j.kremers4.news.arnhem.chello.nl>
Curt wrote:
> Can I say that French is a richer system for communicating ideas and
> feelings than pidgin?  Will you then attempt to demonstrate that "A la
> recherche du temps perdu" and "Mati�re et m�moire" are perfectly expressible
> in the latter, albeit more "laboriously"? 

again with the subjectiveness! give me a good (i.e. measurable,
quantifiable, non-subjective) definition of "pidgin" and i'll see if i can
accept your challenge. ;-P

> The wizard possesses no magic, and we know the hand behind the wand.  We
> also know that his expressive power is stilted -- he is programmed to
> communicate a limited number of things, and can say no others.  This
> limitation is in opposition to the language which created the wizard whose 
> only expressive limit is that which it is possible to express.

obviously, a wizard is not a programming language. but not because you
cannot use it to program, because you can, albeit in a terribly limited
way. it's not a programming language because it's not a language. i.e.,
it's not a system of arbitrary symbols with a syntax (i.e., rules for
combining the arbitrary symbols) and a semantics (rules for interpreting
the non-arbitrary combinations of the arbitrary symbols).

-- 
Joost Kremers                                      ············@yahoo.com
Selbst in die Unterwelt dringt durch Spalten Licht
EN:SiS(9)
From: Pascal Costanza
Subject: Re: A programming language is...
Date: 
Message-ID: <cg5107$56i$1@newsreader2.netcologne.de>
Curt wrote:

> On 2004-08-19, Pascal Costanza <········@web.de> wrote:
> 
>>The point that I am trying to make is that it is very hard to draw the 
>>fine line between pure date structure and "real" programming language. 
>>Much harder than to draw the line between correct and incorrect 
>>arithmetics. Probably more along the lines of distinguishing between day 
>>and night. (Is dawn more day or more night?)
> 
> The ultimate tendancy of dawn is day and of dusk is night.
> 
> The ultimate tendancy of a programming language is to provide a systematic, 
> coherent, rich and capacious medium of communication with a computer; if one 
> embraces this sense, html would be eliminated from the category of 
> programming languages.  The point of eliminating it is to sharpen our 
> definition so that it is keener, finer, more meaningful, rather than broaden 
> it so that it becomes a loose sac that can hold nearly anything, or 
> just about everything.  

Are you saying that it's in the eye of the beholder whether something is 
a programming language or not (at least for the corner cases)?


Pascal

-- 
Tyler: "How's that working out for you?"
Jack: "Great."
Tyler: "Keep it up, then."
From: Kristof Bastiaensen
Subject: Re: A programming language is...
Date: 
Message-ID: <pan.2004.08.19.10.25.32.915282@vleeuwen.org>
On Thu, 19 Aug 2004 00:38:03 +0200, Pascal Costanza wrote:

> 
> Kristof Bastiaensen wrote:
> 
>> Pure lambda calculus is not a programming language.
> 
> OK, let me try again from a different angle: What do you gain by excluding
> things from the list of what you would consider a programming language.

Perhaps the notion that when talking about programming languages,
we are talking about the same thing.  If someone would do a job
interview, and would be asked which programming languages he knows,
he would probably look very silly if he responded html and algebra :)
Though the interviewer would be happy that the candidate knows 
algebra and html, he would also think that the candidate doesn't know 
what he is talking about.

> (Kristof, I don't mean you personally, but everyone who thinks that
> restricted views of what is possible are in any way meaningful.)
> 
> 
> P.S.: Did I mention that people should read about metacircular evaluation?

Hm, if I understand it correctly, a metacircular evaluator could be
written in any turing complete language.  What does that have to
do with html?

Regards,
KB
From: Eric Daniel
Subject: Re: A programming language is...
Date: 
Message-ID: <10iangdhg14075@corp.supernews.com>
In article <············@newsreader2.netcologne.de>, Pascal Costanza wrote:
>  
>  P.S.: Did I mention that people should read about metacircular evaluation?
>  

OK, I'll bite... While I don't want to be involved in this
is-html-a-language discussion, I did look up metacircular evaluation, and
all I came up with is how to write lisp evaluators in lisp (or scheme).
I'm not sure I understand hwo this is relevant to the topic (unless your
point is that one can write an HTML renderer in HTML but I find that hard
to grasp), so I'm probably missing something important here.  Would you
mind pointing me towards an appropriate reference?

-- 
Eric Daniel
From: David Steuber
Subject: Re: A programming language is...
Date: 
Message-ID: <87fz6i1j7x.fsf@david-steuber.com>
It might be more useful to define what a program is.  I would say that
a program accepts input and produces output.  Given that, a
programming language is something that can be used to write a
program.  A program accepts a production created in the programming
language and produces a program.

Is that round enough?

-- 
An ideal world is left as an excercise to the reader.
   --- Paul Graham, On Lisp 8.1
From: Joe Marshall
Subject: Re: A programming language is...
Date: 
Message-ID: <u0uxx3we.fsf@ccs.neu.edu>
David Steuber <·····@david-steuber.com> writes:

> It might be more useful to define what a program is.  

A program is a description of a process that is formal enough that a
machine can carry it out.  The description may be as low-level as
individual state transitions or as high-level as simply describing the
desired outcome.

How's that?
From: Joost Kremers
Subject: Re: A programming language is...
Date: 
Message-ID: <slrncic8lh.j0m.joostkremers@j.kremers4.news.arnhem.chello.nl>
Joe Marshall wrote:
> A program is a description of a process that is formal enough that a
> machine can carry it out.

that may be true for "traditional" procedural programs, but what about
object-oriented programming, GUI programming? when i write some code that
puts a window on the screen, waiting for the user to click some buttons or
whatever, that hardly seems a "description of a process". more a
description of a "world" that consists of objects and processes.

-- 
Joost Kremers                                      ············@yahoo.com
Selbst in die Unterwelt dringt durch Spalten Licht
EN:SiS(9)
From: Joe Marshall
Subject: Re: A programming language is...
Date: 
Message-ID: <isbdwrrw.fsf@ccs.neu.edu>
Joost Kremers <············@yahoo.com> writes:

> Joe Marshall wrote:
>> A program is a description of a process that is formal enough that a
>> machine can carry it out.
>
> that may be true for "traditional" procedural programs, but what about
> object-oriented programming, GUI programming? when i write some code that
> puts a window on the screen, waiting for the user to click some buttons or
> whatever, that hardly seems a "description of a process". more a
> description of a "world" that consists of objects and processes.

That's what the second sentence is supposed to cover.
From: David Steuber
Subject: Re: A programming language is...
Date: 
Message-ID: <87llg9j80r.fsf@david-steuber.com>
Joe Marshall <···@ccs.neu.edu> writes:

> David Steuber <·····@david-steuber.com> writes:
> 
> > It might be more useful to define what a program is.  
> 
> A program is a description of a process that is formal enough that a
> machine can carry it out.  The description may be as low-level as
> individual state transitions or as high-level as simply describing the
> desired outcome.
> 
> How's that?

It is probably better than my definition was.

I'm certainly not yet convinced that HTML constitutes a programing
language.  Even with the argument that it tells an interpreter how to
display text I'm not convinced.  Different HTML processors produce
different output from the exact same source.  Maybe that is allowd
with a program, but it is not a property I would want in something
that calculates my bank balance.  Well, I guess I wouldn't mind if my
balance was increased each time it was computed.

Even though you can heat up the CPU with the Pi program, I would still
argue that useful programs should accept input.  Pi is a constant and
the Ruby example could just be considered a form of compression.  The
output is always going to be the same.

In the Pi example, the Ruby program itself is taking the input of the
Ruby language text to produce the output of Pi.  So at another level,
there is some I/O going on.

-- 
An ideal world is left as an excercise to the reader.
   --- Paul Graham, On Lisp 8.1
From: Jens Axel Søgaard
Subject: Re: A programming language is...
Date: 
Message-ID: <4126f997$0$239$edfadb0f@dread11.news.tele.dk>
David Steuber wrote:
> Joe Marshall <···@ccs.neu.edu> writes:
>>David Steuber <·····@david-steuber.com> writes:
>>>It might be more useful to define what a program is.  

>>A program is a description of a process that is formal enough that a
>>machine can carry it out.  The description may be as low-level as
>>individual state transitions or as high-level as simply describing the
>>desired outcome.

>>How's that?

> It is probably better than my definition was.

> I'm certainly not yet convinced that HTML constitutes a programing
> language.  Even with the argument that it tells an interpreter how to
> display text I'm not convinced.  Different HTML processors produce
> different output from the exact same source.  Maybe that is allowd
> with a program, but it is not a property I would want in something
> that calculates my bank balance.  

My personal conclusion of this discussion is that I have to decide
whether you are wearing a theoretical or practical hat before answering
the question.

The theoretical hat tells me: HTML can be thought of as a contrived
language with no other language constructs than string datums. A
concrete page is then a program take the empty string as input and
produces the same constant string as output each time it is run.

My practical hat focuses on programming as a thought process, and
programming languages as a way to express ideas and computations.
Since HTML only can express constant computations it doesn't *feel*
right to call it a programming language.

-- 
Jens Axel Søgaard
From: Abdulaziz Ghuloum
Subject: Re: A programming language is...
Date: 
Message-ID: <cg895i$32j$1@hood.uits.indiana.edu>
Jens Axel S�gaard has the following interesting thought:

> The theoretical hat tells me: HTML can be thought of as a contrived
> language with no other language constructs than string datums. A
> concrete page is then a program take the empty string as input and
> produces the same constant string as output each time it is run.

My theoretical hat tells me more:

Your description of html assumes one page without links.  All you can do 
is view it.

If you add hyper links to it, then html can cover the class of regular 
languages.  Every page is a state in your DFA and links are the arcs 
connecting states.  You start with a string in mind in the start page. 
Every page says ``if your string is empty, click here, otherwise click 
in the first letter of your string (A B C D)''.

If you add the ability to `open link in new tab', then you cover the 
class of deterministic context-free languages where the current page is 
your current state and the opened tabs are your stack!

> My practical hat focuses on programming as a thought process, and
> programming languages as a way to express ideas and computations.
> Since HTML only can express constant computations it doesn't *feel*
> right to call it a programming language.
From: Pascal Costanza
Subject: Re: A programming language is...
Date: 
Message-ID: <cg7h0g$k9m$1@newsreader2.netcologne.de>
David Steuber wrote:

> Joe Marshall <···@ccs.neu.edu> writes:
>  
>>David Steuber <·····@david-steuber.com> writes:
>>
>>>It might be more useful to define what a program is.  
>>
>>A program is a description of a process that is formal enough that a
>>machine can carry it out.  The description may be as low-level as
>>individual state transitions or as high-level as simply describing the
>>desired outcome.
>>
>>How's that?
> 
> It is probably better than my definition was.

I also like it. For example, Joe was very cautious to say "formal 
enough" instead of just "formal", which is an important difference IMHO.

> I'm certainly not yet convinced that HTML constitutes a programing
> language.  Even with the argument that it tells an interpreter how to
> display text I'm not convinced.  Different HTML processors produce
> different output from the exact same source.  Maybe that is allowd
> with a program, but it is not a property I would want in something
> that calculates my bank balance.  Well, I guess I wouldn't mind if my
> balance was increased each time it was computed.

You have mentioned a "domain" in which exactness is very important. 
However, there are other domains in which it is not so important, 
sometimes even to the contrary. Say, Google doesn't produce exact 
answers, yet it is still a very useful program. If it were more exact, 
you would probably not get the answers in an acceptable period of time.

> Even though you can heat up the CPU with the Pi program, I would still
> argue that useful programs should accept input.  Pi is a constant and
> the Ruby example could just be considered a form of compression.  The
> output is always going to be the same.

It seems to me that people are talking about the question of what the 
term "computation" means instead of what the term "programming language" 
means, hence the shift towards discussing what a program is (and the 
discussion of Turing completeness and Universal Turing Machines, etc.) I 
think that's besides the point. A program doesn't have to be complex in 
order to be useful, yet people here seem to accept only programs that 
perform computations beyond a certain level of complexity. Things get 
complicated when you want to describe the boundary between sufficiently 
complex and not complex enough, and people have different opinions here.

An important notion that programming in Lisp enables (and, I think, even 
promotes) is domain-specific programming. The idea here is that you 
create domain-specific languages that help you to express solutions to 
problems in terms that are more or less the same than those that are 
used in that domain. There is no requirement for those domain-specific 
languages to be Turing complete, or even resemble general purpose 
languages. They only need to be as complex as the domain requires. I 
think it's perfectly acceptable to regard HTML as a domain-specific 
language for describing contents of web pages. It is not Turing 
complete, it doesn't accept input, it always produces constant output, 
but so what? These things are not needed anyway in that domain. Or to 
put it differently: Imagine a specification that asks you to build a 
domain-specific programming language for creating static texts with some 
markup, would you come up with something fundamentally different from 
HTML (except for that stupid syntax, of course ;).

Of course, it could be that every domain-specific language eventually 
turns out to be Turing complete sooner or later. Maybe that's a position 
one can take, but then HTML is not a good example anyway. (In fact, HMTL 
has already crossed that line long time ago, if you take its 
capabilities to embed applets and plugins, and of course JavaScript, 
into account. Maybe these things are not strictly part of HTML, but who 
cares when these things are used most of the time? They could as well be 
part of HTML if someone worked out the details, couldn't they?)

Anyway, the main point I wanted to make in this posting is this: When 
you start to discuss what "computation" means, you will be in deep 
trouble. As far as I can see, people haven't been able to come up with a 
good definition. It's hard for some people to accept that the 
foundations of our field are really very fuzzy.

There is a paper by Brian Cantwell Smith about "The foundations of 
computing" that has quite a few interesting things to say about this 
issue. Google for it.

(To make this a little bit more related to Lisp again: Brian Smith has 
implemented the first reflective language on top of Lisp, and thus 
defined the field of reflection (AFAICT), which eventually led to 
architectures like the CLOS Metaobject Protocol.)


Pascal

-- 
Tyler: "How's that working out for you?"
Jack: "Great."
Tyler: "Keep it up, then."
From: Vassil Nikolov
Subject: Re: A programming language is...
Date: 
Message-ID: <lzsmagrx9b.fsf@janus.vassil.nikolov.names>
Pascal Costanza <········@web.de> writes:

> [...]
> Anyway, the main point I wanted to make in this posting is this: When
> you start to discuss what "computation" means, you will be in deep
> trouble. As far as I can see, people haven't been able to come up with
> a good definition. It's hard for some people to accept that the
> foundations of our field are really very fuzzy.


  Like the fact that the Church-Turing thesis is just a thesis, not a
  theorem?  Tackling the question of what a programming language is
  won't probably do better than that, either, except that it is more
  of an engineering than a scientific question.

  Of course, there is that famous answer, "I cannot define it but I
  can recognize it when I see it..."

  ---Vassil.


-- 
Vassil Nikolov <········@poboxes.com>

Hollerith's Law of Docstrings: Everything can be summarized in 72 bytes.
From: David Steuber
Subject: Re: A programming language is...
Date: 
Message-ID: <87oel3ixs2.fsf@david-steuber.com>
Pascal Costanza <········@web.de> writes:

> Anyway, the main point I wanted to make in this posting is this: When
> you start to discuss what "computation" means, you will be in deep
> trouble. As far as I can see, people haven't been able to come up with
> a good definition. It's hard for some people to accept that the
> foundations of our field are really very fuzzy.

Cogito ergo sum.  I compute therefor I am. ;-)

The points you make are good ones.  However, I guess I will never feel
like something is a programing language (or a machine) without the
equivalent of JNZ.

I imagine we can at least agree that Lisp is a programing language.

-- 
An ideal world is left as an excercise to the reader.
   --- Paul Graham, On Lisp 8.1
From: Pascal Costanza
Subject: Re: A programming language is...
Date: 
Message-ID: <cga4jt$4b4$1@newsreader2.netcologne.de>
David Steuber wrote:

> The points you make are good ones.  However, I guess I will never feel
> like something is a programing language (or a machine) without the
> equivalent of JNZ.

What's "JNZ"? Do you mean "jump if not zero"? (That's the only thing 
Google returned that seems to make sense in this context.)

> I imagine we can at least agree that Lisp is a programing language.

Not only that. It's even a programmable programming language. ;)


Pascal

-- 
Tyler: "How's that working out for you?"
Jack: "Great."
Tyler: "Keep it up, then."
From: David Steuber
Subject: Re: A programming language is...
Date: 
Message-ID: <87wtzq66uv.fsf@david-steuber.com>
Pascal Costanza <········@web.de> writes:

> David Steuber wrote:
> 
> > The points you make are good ones.  However, I guess I will never feel
> > like something is a programing language (or a machine) without the
> > equivalent of JNZ.
> 
> What's "JNZ"? Do you mean "jump if not zero"? (That's the only thing
> Google returned that seems to make sense in this context.)

That's the one.  It's an ancient x86 instruction.  I think even the
8080 used it.  Many a loop was compiled using that instruction.

-- 
An ideal world is left as an excercise to the reader.
   --- Paul Graham, On Lisp 8.1
From: Karl A. Krueger
Subject: Re: A programming language is...
Date: 
Message-ID: <cg4t5v$k09$2@baldur.whoi.edu>
David Steuber <·····@david-steuber.com> wrote:
> It might be more useful to define what a program is.  I would say that
> a program accepts input and produces output.  Given that, a
> programming language is something that can be used to write a
> program.  A program accepts a production created in the programming
> language and produces a program.

Hello World is a program, but a language that can only express Hello
World is not a programming language.  :)

-- 
Karl A. Krueger <········@example.edu>
Woods Hole Oceanographic Institution
Email address is spamtrapped.  s/example/whoi/
"Outlook not so good." -- Magic 8-Ball Software Reviews
From: Abdulaziz Ghuloum
Subject: Re: A programming language is...
Date: 
Message-ID: <cg4v3d$2mn$1@hood.uits.indiana.edu>
Karl A. Krueger wrote:

> David Steuber <·····@david-steuber.com> wrote:
> 
>>It might be more useful to define what a program is.  I would say that
>>a program accepts input and produces output.  Given that, a
>>programming language is something that can be used to write a
>>program.  A program accepts a production created in the programming
>>language and produces a program.
> 
> 
> Hello World is a program, but a language that can only express Hello
> World is not a programming language.  :)
> 

Actually, by the above definition, Hello World is not a program as it 
does not accept input.
From: Ron Garret
Subject: Re: A programming language is...
Date: 
Message-ID: <rNOSPAMon-163652.08062220082004@nntp1.jpl.nasa.gov>
In article <············@hood.uits.indiana.edu>,
 Abdulaziz Ghuloum <········@c-s-remove-dashes.indiana.edu> wrote:

> Karl A. Krueger wrote:
> 
> > Hello World is a program, but a language that can only express Hello
> > World is not a programming language.  :)
> > 
> 
> Actually, by the above definition, Hello World is not a program as it 
> does not accept input.

Of course it does, it just doesn't do anything with its input.

rg
From: Joost Kremers
Subject: Re: A programming language is...
Date: 
Message-ID: <slrncic024.d8.joostkremers@j.kremers4.news.arnhem.chello.nl>
Abdulaziz Ghuloum wrote:
> Karl A. Krueger wrote:
>
>> David Steuber <·····@david-steuber.com> wrote:
>> 
>>>It might be more useful to define what a program is.  I would say that
>>>a program accepts input and produces output.  Given that, a
>>>programming language is something that can be used to write a
>>>program.  A program accepts a production created in the programming
>>>language and produces a program.
>> 
>> Hello World is a program, but a language that can only express Hello
>> World is not a programming language.  :)
>> 
> Actually, by the above definition, Hello World is not a program as it 
> does not accept input.

maybe that's a good thing:

<html>
<p>Hello World!</p>
</html>

i'm not so sure we *want* Hello World! to be a program. ;-)

-- 
Joost Kremers                                      ············@yahoo.com
Selbst in die Unterwelt dringt durch Spalten Licht
EN:SiS(9)
From: Pascal Costanza
Subject: Re: A programming language is...
Date: 
Message-ID: <cg50tk$5jo$1@newsreader2.netcologne.de>
Joost Kremers wrote:
> Abdulaziz Ghuloum wrote:
> 
>>Karl A. Krueger wrote:
>>
>>>David Steuber <·····@david-steuber.com> wrote:
>>>
>>>>It might be more useful to define what a program is.  I would say that
>>>>a program accepts input and produces output.  Given that, a
>>>>programming language is something that can be used to write a
>>>>program.  A program accepts a production created in the programming
>>>>language and produces a program.
>>>
>>>Hello World is a program, but a language that can only express Hello
>>>World is not a programming language.  :)
>>
>>Actually, by the above definition, Hello World is not a program as it 
>>does not accept input.
> 
> maybe that's a good thing:
> 
> <html>
> <p>Hello World!</p>
> </html>
> 
> i'm not so sure we *want* Hello World! to be a program. ;-)

The page 
http://www.ntecs.de/old-hp/uu9r/lang/html/ruby.en.html#_Calculate%20PI 
shows a program to calculate pi. It doesn't take any arguments.


Pascal

-- 
Tyler: "How's that working out for you?"
Jack: "Great."
Tyler: "Keep it up, then."
From: Karl A. Krueger
Subject: Re: A programming language is...
Date: 
Message-ID: <cg524f$lq2$1@baldur.whoi.edu>
Abdulaziz Ghuloum <········@c-s-remove-dashes.indiana.edu> wrote:
> Karl A. Krueger wrote:
>> Hello World is a program, but a language that can only express Hello
>> World is not a programming language.  :)
> 
> Actually, by the above definition, Hello World is not a program as it 
> does not accept input.

So much the worse for the definition.  :)

I recall reading somewhere recently an article which asserted that Hello
World is a bad "first program", in part for that very reason.

What is expected of many "real" programs today is not that they do a
bunch of processing, dump out some output, and halt.  Rather, they must
interact with other agents (be these programs or users) over an
indefinite runtime.

The article proposed that a better "first program" would be the echo
program, which loops forever -- waiting for input then outputting
whatever it is given.  In CL, (LOOP (PRINT (READ-LINE))).


I have to wonder about the implications of this view of programs.  It
seems to imply that "halting" -- the traditional stand-in for program
correctness in proofs -- is not always relevant.  We learn in basic CS
that we cannot prove the correctness of arbitrary programs because of
the halting problem -- that is, that it cannot be algorithmically
verified that an arbitrary program halts on arbitrary input.

But the echo program, when behaving correctly, doesn't halt.  Neither
does a Web server -- it may spawn child threads that do halt, but we
want the Web server to run forever.  Same, for that matter, with an OS
kernel -- though realistically we want it to be able to shut down the
system (say, if the power fails or we need to replace the kernel),
ideally we want it to run forever.

Would it be terribly odd to say that Hello World is a program (or an
algorithm) but a Web server is not, since it never halts successfully
but only in failure?  :)

-- 
Karl A. Krueger <········@example.edu>
Woods Hole Oceanographic Institution
Email address is spamtrapped.  s/example/whoi/
"Outlook not so good." -- Magic 8-Ball Software Reviews
From: Pascal Bourguignon
Subject: Re: A programming language is...
Date: 
Message-ID: <87oel54qst.fsf@thalassa.informatimago.com>
"Karl A. Krueger" <········@example.edu> writes:
> [...]
> The article proposed that a better "first program" would be the echo
> program, which loops forever -- waiting for input then outputting
> whatever it is given.  In CL, (LOOP (PRINT (READ-LINE))).
> 
> 
> I have to wonder about the implications of this view of programs.  It
> seems to imply that "halting" -- the traditional stand-in for program
> correctness in proofs -- is not always relevant.  We learn in basic CS
> that we cannot prove the correctness of arbitrary programs because of
> the halting problem -- that is, that it cannot be algorithmically
> verified that an arbitrary program halts on arbitrary input.
> [...]

Algorithmics and users are concerned that the function F terminate:
    
        (LOOP (PRINT (F (READ-LINE))))


You can always ensure a function F terminates using the WITh-TIME-LIMIT
operator:

   (LOOP 
      (PRINT
        (LET ((INPUT (READ-LINE)))
           (WITH-TIME-LIMIT (15 :SECOND)
                (F INPUT)
                "Could not complete in less than 15 seconds."))))


BUT note that ALL programs are run with an implicit but omnipresent:

    (WITH-TIME-LIMIT (15E9 :YEAR) ;; some say (200E9 :YEAR)
            (ANY-PROGRAM) 
            "The end of the universe.")

So mathematicians may have their closet monsters, but physicists and
practical programmers don't.

-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

Our enemies are innovative and resourceful, and so are we. They never
stop thinking about new ways to harm our country and our people, and
neither do we.
From: Ron Garret
Subject: Re: A programming language is...
Date: 
Message-ID: <rNOSPAMon-F0C561.12154820082004@nntp1.jpl.nasa.gov>
In article <··············@thalassa.informatimago.com>,
 Pascal Bourguignon <····@thalassa.informatimago.com> wrote:

> "Karl A. Krueger" <········@example.edu> writes:
> > [...]
> > The article proposed that a better "first program" would be the echo
> > program, which loops forever -- waiting for input then outputting
> > whatever it is given.  In CL, (LOOP (PRINT (READ-LINE))).
> > 
> > 
> > I have to wonder about the implications of this view of programs.  It
> > seems to imply that "halting" -- the traditional stand-in for program
> > correctness in proofs -- is not always relevant.  We learn in basic CS
> > that we cannot prove the correctness of arbitrary programs because of
> > the halting problem -- that is, that it cannot be algorithmically
> > verified that an arbitrary program halts on arbitrary input.
> > [...]
> 
> Algorithmics and users are concerned that the function F terminate:
>     
>         (LOOP (PRINT (F (READ-LINE))))
> 
> 
> You can always ensure a function F terminates using the WITh-TIME-LIMIT
> operator:
> 
>    (LOOP 
>       (PRINT
>         (LET ((INPUT (READ-LINE)))
>            (WITH-TIME-LIMIT (15 :SECOND)
>                 (F INPUT)
>                 "Could not complete in less than 15 seconds."))))
> 
> 
> BUT note that ALL programs are run with an implicit but omnipresent:
> 
>     (WITH-TIME-LIMIT (15E9 :YEAR) ;; some say (200E9 :YEAR)
>             (ANY-PROGRAM) 
>             "The end of the universe.")
> 
> So mathematicians may have their closet monsters, but physicists and
> practical programmers don't.

Maybe physicists don't, but practical programmers ought to worry about 
things like:

(progn (operating-system) "kernel panic")

rg
From: Vassil Nikolov
Subject: Re: A programming language is...
Date: 
Message-ID: <lzwtztrz8b.fsf@janus.vassil.nikolov.names>
"Karl A. Krueger" <········@example.edu> writes:

> [...]
> I have to wonder about the implications of this view of programs.  It
> seems to imply that "halting" -- the traditional stand-in for program
> correctness in proofs -- is not always relevant.  We learn in basic CS
> that we cannot prove the correctness of arbitrary programs because of
> the halting problem -- that is, that it cannot be algorithmically
> verified that an arbitrary program halts on arbitrary input.
>
> But the echo program, when behaving correctly, doesn't halt.  Neither
> does a Web server -- it may spawn child threads that do halt, but we
> want the Web server to run forever.  Same, for that matter, with an OS
> kernel -- though realistically we want it to be able to shut down the
> system (say, if the power fails or we need to replace the kernel),
> ideally we want it to run forever.
>
> Would it be terribly odd to say that Hello World is a program (or an
> algorithm) but a Web server is not, since it never halts successfully
> but only in failure?  :)


  Proving that a program terminates applies to that (theoretical)
  notion of programs that do not do I/O.  (All the input a Turing
  machine gets is placed on the tape before the machine is started,
  and then only the machine writes to the tape while it is running.)

  For (the other kind of) programs that do I/O, at least intuitively
  speaking, proving that "it" terminates applies where "it" is a
  fragment of the program between two input points.  I surely don't
  want the REPL to terminate, but I surely want the EP to terminate,
  and the next R to take place, after a finite amount of time.


  ---Vassil.

-- 
Vassil Nikolov <········@poboxes.com>

Hollerith's Law of Docstrings: Everything can be summarized in 72 bytes.
From: Pascal Costanza
Subject: Re: A programming language is...
Date: 
Message-ID: <cg51ab$63o$1@newsreader2.netcologne.de>
Eric Daniel wrote:

> In article <············@newsreader2.netcologne.de>, Pascal Costanza wrote:
> 
>> P.S.: Did I mention that people should read about metacircular evaluation?
> 
> OK, I'll bite... While I don't want to be involved in this
> is-html-a-language discussion, I did look up metacircular evaluation, and
> all I came up with is how to write lisp evaluators in lisp (or scheme).
> I'm not sure I understand hwo this is relevant to the topic (unless your
> point is that one can write an HTML renderer in HTML but I find that hard
> to grasp), so I'm probably missing something important here.  Would you
> mind pointing me towards an appropriate reference?

The metacircularity is not the important part here (sorry for that). The 
notion that programs and data are the same is. An interpreter for HTML 
is not fundamentally different from an interpreter for any other language.

My two favorite references for metacircular interpretation are 
http://www.paulgraham.com/rootsoflisp.html and 
ftp://publications.ai.mit.edu/ai-publications/pdf/AIM-453.pdf Other 
people recommend Chapter 4 in SICP - see http://mitpress.mit.edu/sicp/

Pascal

-- 
Tyler: "How's that working out for you?"
Jack: "Great."
Tyler: "Keep it up, then."
From: Ron Garret
Subject: Re: A programming language is...
Date: 
Message-ID: <rNOSPAMon-EA8A91.08155020082004@nntp1.jpl.nasa.gov>
In article <············@newsreader2.netcologne.de>,
 Pascal Costanza <········@web.de> wrote:

> The metacircularity is not the important part here (sorry for that). The 
> notion that programs and data are the same is. An interpreter for HTML 
> is not fundamentally different from an interpreter for any other language.

Actually, the metacircularity is important because to write a 
metacircular interpreter you (typically) need a Turing-complete 
language, which HTML is not.  HTML is a "programming language" for a 
finite-state machine.  In that way HTML is fundamentally different from 
(most) of the things that are considered programming languages.  You can 
write (some) programs in HTML; for example, you could write the original 
Crowther and Woods "Dungeon" game in HTML.  But you couldn't write, say, 
a Scheme interpreter in HTML.

rg
From: Ron Garret
Subject: Re: A programming language is...
Date: 
Message-ID: <rNOSPAMon-85A217.22521620082004@nntp1.jpl.nasa.gov>
In article <···················@ram.dialup.fu-berlin.de>,
 ···@zedat.fu-berlin.de (Stefan Ram) wrote:

> Ron Garret <·········@flownet.com> writes:
> >But you couldn't write, say, a Scheme interpreter in HTML.
> 
>   A Scheme interpreter on a real computer is a finite state
>   machine (because the real computer has a finite memory).

You obviously haven't been following the price of disk drives lately.

;-,

rg
From: Pascal Bourguignon
Subject: Re: A programming language is...
Date: 
Message-ID: <87brh54jfj.fsf@thalassa.informatimago.com>
···@zedat.fu-berlin.de (Stefan Ram) writes:

> Ron Garret <·········@flownet.com> writes:
> >But you couldn't write, say, a Scheme interpreter in HTML.
> 
>   A Scheme interpreter on a real computer is a finite state
>   machine (because the real computer has a finite memory). The
>   HTML-source code for a Scheme interpreter, however, might be
>   quite large and the "Scheme interpreter" implemented by it
>   might not have a pleasant user interface.

No.

You're right mathematically, but you're wrong in a universe where the
number of particules is bounded, and less than 10^80, while the
smallest computer money can buy today comes with at least 2^1073741824
different states.

There is no way you could build in this universe's ressources an HTML
page with that many states.

 
>   The user interface for an arbitrary HTML program might display
>   a keyboard and the user might activate a key, which is
>   implemented by a link. This will lead to the next state, which
>   will display any possible output and another keyboard and so
>   on. An HTML file for any reasonable application would be so
>   large that it might be practically impossible, while in theory
>   one can imagine it.

-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

Our enemies are innovative and resourceful, and so are we. They never
stop thinking about new ways to harm our country and our people, and
neither do we.
From: Eric Daniel
Subject: Re: A programming language is...
Date: 
Message-ID: <10icpbi7di75bae@corp.supernews.com>
In article <············@newsreader2.netcologne.de>, Pascal Costanza wrote:
[...]
>  
>  My two favorite references for metacircular interpretation are 
>  http://www.paulgraham.com/rootsoflisp.html and 
>  ftp://publications.ai.mit.edu/ai-publications/pdf/AIM-453.pdf Other 
>  people recommend Chapter 4 in SICP - see http://mitpress.mit.edu/sicp/
>  
>  Pascal
>  

Many thanks! The Graham article in particular is a very good exposition.

-- 
Eric Daniel
From: Matthew Danish
Subject: Re: A programming language is...
Date: 
Message-ID: <20040820200125.GB8087@mapcar.org>
On Wed, Aug 18, 2004 at 11:38:19PM +0200, Kristof Bastiaensen wrote:
> Pure lambda calculus is not a programming language. 

That is a ridiculous statement.

> It is a mathematical basis for computing.  A functional
> expression without inputs (or other side-effects) can be considered equal
> to its outcome, just as 2 + 2 is equal to 4.  However this
> is not useful for a programming language.  A functional programming
> language must also be able to perform those transformations on
> the input.  As such, a functional programming language does
> describe a change in state, only not explicitly.  The change in 
> state is a result from computing the functional expression.

What in the world are you talking about?  There is no state and there is
no change of state in a functional programming language.  You are mixing
up the machine with the model.  How can a mathematical basis for
computing not form a programming language?

> That's true, it can be difficult to say wether a language
> can be considered as a programming language, or if it merely 
> describes data.  The best way would be to call only turing
> complete languages a programming language.  But that would
> leave out languages that are considered to be also programming
> languages (like your punchcard example).  In that case it
> is more the purpose that counts.  The lack of a concrete
> defenition for a programming language would enable anything
> to be called a programming language (for example english).
> This is just silly, and obviously false in the case of HTML,
> because of it's lack to describe a change in state.

There is a very easy and formal definition of a programming language, in
the sense that we mean it.  Our computer systems are based on the notion
of the Turing Machine, and the Universal Turing Machine is the one which
can simulate all Turing Machines.  So, a simple definition of `general
purpose programming language' is a formal language and model which can
describe a Universal Turing Machine[1].  `Lesser programming languages'
can only be used to describe some proper subset of the Turing Machines.
The pure lambda calculus is a well known formal model of computation
which can describe and be described by a Universal Turing Machine, for
example.



[1] Ignoring the physical limitations of our machines.

-- 
;;;; Matthew Danish -- user: mrd domain: cmu.edu
;;;; OpenPGP public key: C24B6010 on keyring.debian.org
From: Kumar Balachandran
Subject: Re: A programming language is...
Date: 
Message-ID: <TxAVc.30702$nx2.19559@newsread2.news.atl.earthlink.net>
Matthew Danish wrote:
> On Wed, Aug 18, 2004 at 11:38:19PM +0200, Kristof Bastiaensen wrote:
> 

> What in the world are you talking about?  There is no state and there is
> no change of state in a functional programming language.  You are mixing
> up the machine with the model.  How can a mathematical basis for
> computing not form a programming language?
> 
> 
>>That's true, it can be difficult to say wether a language
>>can be considered as a programming language, or if it merely 
>>describes data.  The best way would be to call only turing
>>complete languages a programming language.  But that would
>>leave out languages that are considered to be also programming
>>languages (like your punchcard example).  In that case it
>>is more the purpose that counts.  The lack of a concrete
>>defenition for a programming language would enable anything
>>to be called a programming language (for example english).
>>This is just silly, and obviously false in the case of HTML,
>>because of it's lack to describe a change in state.
> 
> 
> There is a very easy and formal definition of a programming language, in
> the sense that we mean it.  Our computer systems are based on the notion
> of the Turing Machine, and the Universal Turing Machine is the one which

I submit:

A programming language is a formalisation that allows specification of 
the behaviour of a system, allowing the control or observation of zero 
or more states of that same system via that very specification.

Note:
There is no necessity for observability or controllability
There is no necessity for Turing assumptions
There is no implication of causality
There is no implication of sequence
There is no notion of finiteness
There is no notion of logic
In short, my submission is a bunch of words that may or may not make 
sense to you machines. Are you programmed to observe?

There is a notion of a system or a universe where the behaviour is 
understood
Formalisation implies a grammar, although not a syntax
Control includes inputs
Observing implies outputs
Controllability and observability do not require the presence of a 
controller or an observer

Now we can have a discussion whether a programming language is the only 
formalisation that allows my definition or whether there are others.

S'long,
Kumar

PS Unless you were talking about computer programming:-)
From: Joost Kremers
Subject: Re: A programming language is...
Date: 
Message-ID: <slrncieueb.j0m.joostkremers@j.kremers4.news.arnhem.chello.nl>
Kumar Balachandran wrote:
> Formalisation implies a grammar, although not a syntax

just out of curiosity, what to you is the difference between a grammar and
a syntax?

the reason i ask is that in human language, grammar is the combination of
syntax, morphology and phonology. since a computer language doesn't usually
have the latter two, only syntax seems to be left.

-- 
Joost Kremers                                      ············@yahoo.com
Selbst in die Unterwelt dringt durch Spalten Licht
EN:SiS(9)
From: Jim Newton
Subject: Re: A programming language is...
Date: 
Message-ID: <2opigpFd617qU1@uni-berlin.de>
i'm not sure about this but syntax deals with parsability.
something like
'(+ 1 + 2 + 3) is parsable and syntactically correct as a
quoted list... however it does not make since according
to the grammar of addition.

Do i have a wrong understanding here?

-jim

Joost Kremers wrote:
> Kumar Balachandran wrote:
> 
>>Formalisation implies a grammar, although not a syntax
> 
> 
> just out of curiosity, what to you is the difference between a grammar and
> a syntax?
> 
> the reason i ask is that in human language, grammar is the combination of
> syntax, morphology and phonology. since a computer language doesn't usually
> have the latter two, only syntax seems to be left.
> 
From: Kumar Balachandran
Subject: Re: A programming language is...
Date: 
Message-ID: <TeNVc.6969$2L3.4891@newsread3.news.atl.earthlink.net>
Joost Kremers has a valid point, although the error in the annotations 
do not affect the actual definition of a "Programming Language." Here is 
my second try:

	Formalisation implies semantic consistency, although not a 	
	defined syntax.
Syntax and language can be natural constructs, not merely human ones 
e.g., trees send chemical messages to one another in a forest due to 
evolutionary programming using a language with well defined tools and 
components. [I can see the howls of protest starting ...]

Do gene sequences classify as a programming language -- I say yes. Why? 
This is because the environment can interact with a sequence to express 
behaviour.

HTML is a programming language, albeit a very primitive one. Remember, 
it is capable of causing behavioural change in a browser. Program, data, 
what's the difference? If representation has meaning, and can lead to 
good stuff happening, call it an orange.

S'long,
Kumar.
PS. OTOH, it's not really an animal; it is a cockroach.

Jim Newton wrote:
> i'm not sure about this but syntax deals with parsability.
> something like
> '(+ 1 + 2 + 3) is parsable and syntactically correct as a
> quoted list... however it does not make since according
> to the grammar of addition.
> 
> Do i have a wrong understanding here?
> 
> -jim
> 
> Joost Kremers wrote:
> 
>> Kumar Balachandran wrote:
>>
>>> Formalisation implies a grammar, although not a syntax
>>
>>
>>
>> just out of curiosity, what to you is the difference between a grammar 
>> and
>> a syntax?
>>
>> the reason i ask is that in human language, grammar is the combination of
>> syntax, morphology and phonology. since a computer language doesn't 
>> usually
>> have the latter two, only syntax seems to be left.
From: Joost Kremers
Subject: Re: A programming language is...
Date: 
Message-ID: <slrncih1p8.j0m.joostkremers@j.kremers4.news.arnhem.chello.nl>
Kumar Balachandran wrote:
> 	Formalisation implies semantic consistency, although not a 	
> 	defined syntax.

after having typed a long-winding explanation of what syntax and semantics
means to me, i suddenly understood what you mean here. so i've deleted my
ramblings again, just to add this one remark: in linguistics, a language
that has no grammar is usually not considered a "real" language, because it
lacks the so-called "combinatory property", i.e., it has no means of
forming new expressions by combining existing ones, and therefore it cannot
extend the range of its meanings. as such, it is useless for almost
everything that humans do with language beyond basic survival.

-- 
Joost Kremers                                      ············@yahoo.com
Selbst in die Unterwelt dringt durch Spalten Licht
EN:SiS(9)
From: Kumar Balachandran
Subject: Re: A programming language is...
Date: 
Message-ID: <nqGWc.2392$Y%3.1719@newsread2.news.atl.earthlink.net>
Joost Kremers wrote:

> in linguistics, a language
> that has no grammar is usually not considered a "real" language, because it
> lacks the so-called "combinatory property", i.e., it has no means of
> forming new expressions by combining existing ones, and therefore it cannot
> extend the range of its meanings. as such, it is useless for almost
> everything that humans do with language beyond basic survival.
> 

By your definition, you seem to agree with me -- recombinant genes 
constitute a grammar. In some sense, an ecological system can be said to 
implement a grammar due to the ability for change. In short, an ant is 
not capable of language, but an entire ant hill is (mangling Hofstadter 
for my own nefarious purposes). For any system, one can probably elevate 
oneself to some meta level where there is structure to information flow, 
and the mutability of the structural basis of that information flow may 
be considered a language, n'est ce pas?
From: Joost Kremers
Subject: Re: A programming language is...
Date: 
Message-ID: <slrncih09k.j0m.joostkremers@j.kremers4.news.arnhem.chello.nl>
Jim Newton wrote:
> i'm not sure about this but syntax deals with parsability.
> something like
> '(+ 1 + 2 + 3) is parsable and syntactically correct as a
> quoted list... however it does not make since according
> to the grammar of addition.
>
> Do i have a wrong understanding here?

perhaps what you're trying to say is that '(+ 1 + 2 + 3) is not a correct
lisp expression for adding the numbers 1, 2 and 3. this is true, but not so
much because its syntax is wrong. if the symbol + has a value as variable,
the list (+ 1 + 2 + 3) *can* be evaluated by lisp as an addition:

CL-USER> (let ((+ 5))
	   (+ 1 + 2 + 3))
16

in the end it of course depends on the way you define your terms. to me,
the grammar of a language is made up of its syntax, its morphology and its
phonology. IOW, "grammar" and "syntax" are not synonymous, but in the realm
of computer languages they practically become so,[1] because computer
languages rarely have morphology (the only exception i know of is here:
<http://www.csse.monash.edu.au/~damian/papers/HTML/Perligata.html>) and
probably never have a phonology.

[1] not entirely, though. "grammar" always refers to the full set of
syntactic (and morphological and phonological) rules. so i cannot say "the
grammar of this expression", only "the grammar of this language". "syntax",
on the other hand, *can* refer to a (contextually defined) subset of all
syntax rules; i.e., "the syntax of this expression" is perfectly fine.

-- 
Joost Kremers                                      ············@yahoo.com
Selbst in die Unterwelt dringt durch Spalten Licht
EN:SiS(9)
From: Björn Lindberg
Subject: Re: A programming language is...
Date: 
Message-ID: <hcs7jrxfow2.fsf@my.nada.kth.se>
Kristof Bastiaensen <·······@vleeuwen.org> writes:

> I am not sure about make, perhaps it could be considered as a programming
> language.  The fact that isn't meant as a programming language doesn't
> mean it isn't. Postscript and Tex are both programming languages (and text
> formatting languages). Also sed can be considered as a programming
> language.  Someone has even written an unlambda interpreter in sed.

Sed is, I believe, turing complete, and so is definitely a programming
language.


Bj�rn
From: John Thingstad
Subject: Re: A programming language is...
Date: 
Message-ID: <opscvcrbc6pqzri1@mjolner.upc.no>
I don't think anyone here would consider writing a program in HTML.
I am not convinced it is not possible but it is certainly not practicle.
However it is your arrogant style of writing that pisses peaple off enough
to respond. Saying that html is not a language because it does not contain
loop is a falsum. It is not a general purpose programming language.
It is a text formatting language. But a language all the same.

On 15 Aug 2004 16:54:16 -0700, Tayssir John Gabbour  
<···········@yahoo.com> wrote:

> Mike Cox wrote:
>> ...anything that has a loop.  Since HTML doesn't have a loop
>> anywhere, it is not a programming language.  Simple as that.
> No?
> http://symbol.pentaside.org/article/loop.html
>



-- 
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
From: Joost Kremers
Subject: Re: A programming language is...
Date: 
Message-ID: <slrnci3kdf.j0m.joostkremers@j.kremers4.news.arnhem.chello.nl>
John Thingstad wrote:
> to respond. Saying that html is not a language because it does not contain
> loop is a falsum. It is not a general purpose programming language.
> It is a text formatting language. But a language all the same.

i don't think anyone disputed the idea that html is a "language". the
question is whether it's a *programming* language.

which means the real question is not so much what a programming language
is, but rather what programming is. are you programming when you're writing
html? my intuition says no, but my intuition also says that it will be
extremely difficult, if not impossible, to come up with a feasible
definition of "programming" that excludes html-writing...

-- 
Joost Kremers                                      ············@yahoo.com
Selbst in die Unterwelt dringt durch Spalten Licht
EN:SiS(9)
From: Pascal Costanza
Subject: Re: A programming language is...
Date: 
Message-ID: <cfsntf$r33$1@newsreader2.netcologne.de>
Joost Kremers wrote:

> i don't think anyone disputed the idea that html is a "language". the
> question is whether it's a *programming* language.

I know people who are comfortable with the notion of programming their 
VCRs or their washing machines. Could we just stop this nonsense?

*Please* make yourself acquainted with metacircular evaluation!


Pascal

-- 
Tyler: "How's that working out for you?"
Jack: "Great."
Tyler: "Keep it up, then."