Let's look at this another way. I'll give you a bunch of CPU opcodes, a block of bytes that the CPU could execute/is executing, and I want you to tell me whether it's a Java program or a C++ program. It cannot be done, because it's been repeatedly compiled all the way down to the point where it finishes up just a bunch of opcodes.
I quite agree, and never did disagree with that concept. Nor did I need it explained. Like I tried to point out before, it is a
semantic argument, primarily in that I was not, nor do I believe wakh was ever discussing the fundamentals of how programming works. Why? Because we already know how it works, and there is no need to re-hash that which is explained in programming 101. More importantly, the differences, nuance, and quirks of every given language - that's what is really interesting. All Programming languages gets reduced to ByteCode, well, frankly,
Who Cares? How the language is written, how it is distributed, and how specific compiled optimizations affect the end result, now
that is a discussion. It's simply like coming up and saying that a Ford can sometimes drive faster than a Chevy, and you're tell me how the internal combustion engine works.
cjard said:
Rubbish! Scripting languages, interpretation of HTML tags causing something to appear on screen that it otherwise would not (in that form) - they are all ways of directing the computer to yes or no execute something. Given that you cannot possibly be asserting that the CPU works on HTML directly, I cannot see how you are not getting on with the notion that everything you put into a computer that causes some sort of change in what you see, hear or interact with, ultimately is a result of the CPU processing some opcodes, and those opcodes came to be there as a result of the human input.
I wasn't. You were. Your original quote was:
cjard said:
I'm trying to get you to stop drawing a distinction between what you would call "interpreted languages" and what you would call "compiled languages" - they are all compiled languages
This is why i keep point out
semantics, because i frantically disagree with that statement. They are not all compiled languages. Semantics are a fun an intriguing thing, and hey I quite enjoy the semantic disagreements from time to time, but if you put ten people in the room and they all define the phrase "Serial Port" to mean something completely different, they may not all be wrong, but they'll
never communicate.
To continue though:
cjard said:
For HTML, IE is the start of the compilation process. IE is a compiler. It takes human understandable text and is the start of the process whereby eventually a sequence of opcodes will be whizzing through the CPU/electrons banging around. Note that this descriptor can just as easily be applied to a C++ compiler.
For this I would have to completely disagree, but that is again a "semantic" disagreement. I would define a compiler as an engine that processes a programming lanugage into readily identifyable machine codes and addresses. Having written quite a few "parsers" in my day, IE does not "COMPILE" html, it "INTERPRETS" it. The difference you may wonder? Compiler's produce static final linkable files, (because you may have forgotten, to turn something from C++ to EXE is a two stage process, not a one stage compile) HTML Is not outputted to a static form, it is all at run-time which means it isn't compiled, it is interpreted. Now, if we drop are personal preferences towards one meaning or another, this is where I draw the understanding: Look words up. So I did, just to be sure we understand the difference (semantically) between a Compiled language and an Interpreted Language.
http://en.wikipedia.org/wiki/Compiled_language said:
A compiled language is a programming language whose implementations are typically compilers (translators which generate machine code from source code), and not interpreters (step-by-step executors of source code, where no translation takes place).
I would say the key word in that definition is "translation", because HTML is not "translated" into opcodes, it is interpreted by another program that devises in it's own language the opcodes. As your postulation earlier said, a 200x200 image on the screen and it looks like swing. Okay, so, I write an XML file that contines coordinate information and string text information encapsulated in proper XML tags and elements. And then I write a program in VB that takes that XML file and draws the form on the screen using the information in the XML file. By your description you would call that XML file a Compiled language. It is not. The XML is not translated into a machine code. My VB code does all the drawing, all the processing, the XML file is only a DATA file that is Interpreted.
http://en.wikipedia.org/wiki/Interpreted_language said:
In computer programming an interpreted language is a programming language whose implementation often takes the form of an interpreter. Theoretically, any language may be compiled or interpreted, so this designation is applied purely because of common implementation practice and not some underlying property of a language.
While Java is translated to a form that is intended to be interpreted, just-in-time compilation is often used to generate machine code.
Again this term of translation, however interestingly enough, we find that Java here is in an in between stage of the interpreted and compiled, because it
is translated, but instead of being translated completely, it's reduced partially awaiting the final stage into execution. Like par-baked bread, it's only brought far enough, but not completely, yet, based on the stipulation of
translation it must be conceded that Java is a compiled language but compiled specifically for interpretation by a virtual machine.
The American Heritage® Science Dictionary
Copyright © 2002 by Houghton Mifflin Company. said:
A compiled language is a language in which the set of instructions (or code) written by the programmer is converted into machine language by special software called a compiler prior to being executed. C++ and SmallTalk are examples of compiled languages. ◇ An interpreted language is a language in which the set of instructions (or code) written by the programmer is converted into machine language by special software called a compiler prior to being executed. Most scripting and macro languages are interpreted languages.
And then here the semantics are pretty much the same, depicting the HTML and the C++ to be practically identical, which is again the fun of definition, semantics, denotation and connotation. Which is right/which is wrong? Neither and Both.
cjard said:
Please, step past the "a compiler is a program that takes a bunch of text source code written by a person and turns it into a exe that the operating system runs"
I never had that definition of compiler, and it is, indeed, a fallacy, since a compiler translates source code into readily understandable machine code for a specific processor set. That code cannot run or do anything. It just is. After that, one needs to run a Linker which attaches all underlying byte code of all the compiled files into a processable executable that can be run by the kernel.
The Free On-line Dictionary of Computing said:
A program that combines one or more files containing object code from separately compiled program modules into a single file containing loadable or executable code
This process involves resolving references between the modules and fixing the relocation information used by the operating system kernel when loading the file into memory to run it.
cjard said:
you say later in your post that youre capable of transcending such specifics and thinking in the abstract.. I'm proposing that whole leap from human thought to electron movement, and not drawing a distinction between .NET, Java, ASP, vbscript, C++.. because there really isn't one for the purposes of this discussion.
And there it is the finality of the discussion in that after all this you have admitted what you felt the discussion was about, as well as the your semantic understanding of what is truly abstract and not. I was not discussing that, nor did I ever try to lead anyone to believe I was. I was drawing a distinction between languages because there are distinctions between them, just as there are between German, French, Oxford English, and American English.
Abstract is conceptualization of the mind, it is non-concrete and primarily theoretical - postulation, conjecture, and though it was my impression that originally we were discussing the pitfalls of one language over another it has suddenly becomes a discussion on the existential nature of the Central Processing Unit. Frankly, I don't want to think about the philosophy, or transcendentalism of a silicon diode, but that's me, and additionally the nature of that discussion would also not be
abstract. Your arguments were re-introducing fundamentals, which are, cold, hard, and very
finite. A computer does as a computer does, and if we wanted, we go further into how RISC versus CISC process code and how compilers work for them. But to what end?
I don't disagree with the statement: all programming languages are the same. Because I have argued that point the majority of my life. Nor do I disagree with the statement: the computer (CPU) does not know the difference between C++ and VB.Net. As that is elementary.
But, once we forget about the computer, we realize that we are human, and flawed. Flawed humans that designed the microchip, and flawed humans that created the Intel Processing Instruction Set. And Flawed humans that created the C++ and VB languages, and Flawed humans that created the IDE's and compilers, finally down to the flawed humans in you an me who use these tools and inventions daily.
That, to me, is where the interesting discussions take place, not in the core of the CPU, which is what I felt was the nature of this discussion when it began after the original question had been answered on this thread, and though the layers of abstraction between framework, api, and virtual machines began to enter them they are fundamentally static, no room to maneuver, which is, forgive my ADD, very boring *shrug*, as there is no point in discussing facts.
In the end though, my friends, it has been quite educational, which is the purpose of any discussion. I can say I learned a quite few new things in this topic here, and hope there will be many others in the future. We may not always agree on the semantics, or on what is interesting, but we can always walk away with something positive, and just for minor amusement, perhaps in the future we will relegate such discussions to the "discussion" forum as opposed to the question forum, eh? At least then we can go as far off the deep end as possible.
Cheers!