From: John B. Matthews on
In article <9N6dnWfJPsGbPTfWnZ2dnUVZ_qydnZ2d(a)earthlink.com>,
Patricia Shanahan <pats(a)acm.org> wrote:

> Patrick Scheible wrote:
> > Adam Beneschan <adam(a)irvine.com> writes:
> >
> >> On Mar 24, 2:27=A0pm, p...(a)informatimago.com (Pascal J. Bourguignon)
> >> wrote:
> >>
> >>>> True. =A0But P-code was for student use, not production, especially not
> >>>> production in an application where execution time was critical.
> >>> This is wrong.
> >>>
> >>> P-code was designed, and used, exactly like the JVM is today. =A0There
> >>> even were developed processors that executed directly P-code, natively,
> >>> like we have JVM implemented in hardware too.
> >> I think Patrick is essentially correct; the Wikipedia entry for "UCSD
> >> Pascal" says:
> >>
> >> "The University of California, San Diego Institute for Information
> >> Systems developed it in 1978 to provide students with a common
> >> operating system that could run on any of the then available
> >> microcomputers as well as campus DEC PDP-11 minicomputers." [This was
> >> before the IBM PC came out, so I think "then available microcomputers"
> >> meant Terak and maybe Apple II; perhaps there were some others.]
> >
> > I encountered it on a CP/M system. S-100 bus, Z80 processor. Apple
> > II's that I saw didn't run it, but I wouldn't swear that it was
> > impossible.
>
> Apple Pascal was based on UCSD Pascal. I ran it frequently on my Apple
> II. According to the reference manual, it required 48 KB memory, at
> least one Apple II disk drive, and the Apple Language System.

Just for fun I took a screen shot of Apple UCSD-Pascal 1.3 (II.1)
running on an emulator written in Java:

<http://i42.tinypic.com/14nuw1.png>
<http://sourceforge.net/projects/jace/>

The UC regents recently released the original I.5 sources "for
educational, research, and non-profit purposes"

<http://techtransfer.universityofcalifornia.edu/NCD/19327.html>

--
John B. Matthews
trashgod at gmail dot com
<http://sites.google.com/site/drjohnbmatthews>
From: Mike Sieweke on
In article <Xns9D4571C17F76WarrensBlatherings(a)188.40.43.245>,
Warren <ve3wwg(a)gmail.com> wrote:

> Martin Krischik expounded in
> news:op.u916w9k9z25lew(a)macpro-eth1.krischik.com:
>
> > Am 23.03.2010, 17:50 Uhr, schrieb Warren <ve3wwg(a)gmail.com>:
> >
> >> I don't think many people would be surprised by these results.
> >> After all Java, C# and Pascal (variants) are still largely
> >> interpreted languages, even if they use some sort of compiled
> >> intermediate code.
> >
> > I would say the most used Pascal variants these days is Delphi and Ada
> > - both which compile native code.
> >
> > Martin
>
> Ok, sure (apart from old P-code variants). One has to wonder
> then why the Pascal "compiled code" was so miserable in
> their results. I don't recall if they mentioned which
> Pascal compiler they used.
>
> So if there is a surprise in there, Pascal would be it. ;-)
>
> Warren

Did anyone else actually read the paper? It says nothing
of substance about Pascal or Ada. It only compares the
performance of C, C++, C#, and Java. There's only one
mention of Pascal as one of "many choices" in programming
languages.


-- Mike Sieweke
-- "Just a bit of harmless brain alteration, that's all..."
From: Warren on
Adam Beneschan expounded in
news:104cd8d2-d4b4-4e47-9780-30746251da2d(a)a37g2000prd.googlegroups.com:

> On Mar 24, 1:00�pm, Warren <ve3...(a)gmail.com> wrote:
>> Adam Beneschan expounded
>> innews:bf27602c-09c5-45e4-97c1-608bf9729cbb(a)s2g2
> 000prd.googlegroups.com:
>
>> >> I smell an interpreter!
...
>> So by your definition, my "tokenized basic" isn't interpreted either?
>> It saves as an intermediate byte code also. So did GWBASIC IIRC. But
>> nobody would say that GWBASIC wasn't interpreted.
>
> Please read carefully what I wrote earlier: "For that, I'd assume that
> the interpreter reads the original source statements, or some sort of
> tokenized form that bears a close relation to the original source
> statements, while running the program."

Apart from efficiencies, what does "close relation to source" have to
do with it? You still have another program "interpreting" it to
carry out the instructions coded, in the original source.

> .. p-code does not bear any
> such relation to the Pascal source. I know that the question of "how
> close is the byte code to the source" is a fuzzy one.

Yep, but except where you have the interpreter in hardware,
it is still interpreted. Of course hardware often uses
software also (microcode), but usually people draw the
line at that boundary.

>> Sorry, but if any "execution" requires the help of an interpreter,
>> it is "interpreted" at some level(s), even in Java's case.
>>
>> Now if the O/S could load and hand control over control to the
>> loaded code (exec) without involving a separate process, then
>> that would be different. Otherwise, I still smell an interpreted
>> "language".
>
> I think your definition of "interpreted language" is too broad to be
> meaningful.

It's clear cut. If you need another executable to run it, then it's
interpreted. Though I will grant that there are a couple of exceptions
here also- the cobrun command that Open Cobol uses is a main program
stub that dynamically calls a cobol module (as a shared library) to
load and execute it. But the same code can be compiled into a stand
alone executable -- and neither of these are interpreted.

> Suppose I had a Pascal compiler that generated code for a
> processor that is no longer manufactured. So I write a program that
> emulates that processor.

People usually call that "emulation".

> That's effectively an interpreter, but does
> that make Pascal an interpreted language?

No. This is where the word emulator makes a useful distinction.

> And what's the difference if the interpreter is for a
> processor that no longer exists, or for a processor that never existed
> such as the p-machine?

Emulated theoretical concept of a machine code is usually
just viewed interpreted code. However modern usage has also
brought in the idea of a "virtual machine". I think that is
more of a marketing concept than a useful term.

> To relate it back to the topic of discussion: I think it was you that
> claimed that it was meaningless to compare C/C++ results to Java, C#,
> or Pascal (variants) because the latter were "largely interpreted
> languages".

I didn't say it was meaningless- just that there is no surprise
in that (aside prehaps from truly compiled Pascal).

> .. In short, Pascal, as a *language*, is a
> traditional compiled language and there is absolutely no basis for
> putting it into the "interpreted language" category, period.

I'll disagree about the p-code implementation, but would otherwise
generally agree.

> The fact
> that one popular implementation of this language used a virtual
> machine and an interpreter for that machine is irrelevant.
> -- Adam

It's not irrelevant, unless you _qualify_ what you're talking
about. Otherwise some poor saps with a different background
in Pascal may come away with different and incorrect conclusions.

The fact that it was _popular_ means you have to deal with it
when making statements about the language's performance.

Warren
From: Robert A Duff on
Mike Sieweke <msieweke(a)ix.netcom.com> writes:

> Did anyone else actually read the paper?

I skimmed it briefly.

>...It says nothing
> of substance about Pascal or Ada.

Right. That's why it's a little strange that the person
who posted it used the paper as evidence that one should not
use Pascal in performance-critical applications.

>...It only compares the
> performance of C, C++, C#, and Java. There's only one
> mention of Pascal as one of "many choices" in programming
> languages.

It would be interesting to translate some of the examples in
the paper into Ada, and do some timing. (Sorry, I'm not
volunteering -- too busy.)

- Bob
From: Colin Paul Gloster on
On Wed, 24 Mar 2010, Martin Krischik wrote:

|-----------------------------------------------------------------------------|
|"Am 23.03.2010, 17:50 Uhr, schrieb Warren <ve3wwg(a)gmail.com>: |
| |
|> I don't think many people would be surprised by these results. |
|> After all Java, C# and Pascal (variants) are still largely |
|> interpreted languages, even if they use some sort of compiled |
|> intermediate code. |
| |
| |
|I would say the most used Pascal variants these days is Delphi and Ada - both|
|which compile native code. |
| |
|Martin |
| |
|-- |
|Martin Krischik" |
|-----------------------------------------------------------------------------|

Do not forget VHDL.