Timeline for What properties of a programming language make compilation impossible?
Current License: CC BY-SA 3.0
27 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jan 17, 2016 at 18:43 | answer | added | vonbrand | timeline score: 3 | |
Nov 11, 2014 at 4:00 | answer | added | tylerl | timeline score: -1 | |
Sep 23, 2014 at 4:15 | vote | accept | Anderson Nascimento Nunes | ||
Sep 5, 2014 at 11:19 | comment | added | MvG | You might be interested to learn about Befunge which was created specifically to make compilation hard, although apparently there still exist compilers for it. I have no idea how much they actually compile program logic into machine language, and how much is still interpreted at runtime. There are a number of Befunge programs in posts on PCG SE. | |
Sep 4, 2014 at 8:28 | answer | added | Anonymous Coward | timeline score: 1 | |
Sep 4, 2014 at 3:05 | answer | added | Nikos M. | timeline score: 1 | |
Sep 3, 2014 at 18:36 | comment | added | Mooing Duck | @PlasmaHH: Ah, now I see why people are objecting to what I said. I interpreted you as saying self-modifying code could only be done in a scripting language. But instead, you meant exactly what you said: you can't think of a sane way to do it in a compiled language, making no claims about ASM. My bad. | |
Sep 3, 2014 at 18:30 | comment | added | PlasmaHH | @MooingDuck: Sure, but my gwbasic program was modifying gwbasic bytecode. I somewhat doubt that it works unchanged when you compile it to native machine code. | |
Sep 3, 2014 at 16:24 | comment | added | Patrick87 | I find this somewhat curious: "Certain properties of a programming language may require that the only way to get the code written in it be executed is by interpretation. In other words, compilation to a native machine code of a traditional CPU is not possible. What are these properties?" What, I wonder, do they suspect happens to the native binaries when the computer executes them? Perhaps that the bytes run themselves? | |
Sep 3, 2014 at 10:58 | comment | added | Raphael | "but it's a pretty crazy idea" -- oh no, my shell is crazy! On a more serious note, if the application is interactive you just incorporate I/O into the bundle and forward the input to the interpreter. Also, my proposed program does compile: some pre-prepared code and possible dynamically input code are translated into machine instructions executed by the CPU. That said, I think all the comments and answers should be sufficient to show you that your question is ill-posed and one needs to be more careful about what exactly to ask. | |
Sep 3, 2014 at 9:32 | answer | added | Gilles 'SO- stop being evil' | timeline score: 17 | |
Sep 3, 2014 at 8:53 | comment | added | reinierpost | @babou: I'm not disputing the merit of this answer, but I think it overstates its point. Computers are not Turing machines and the difference is what makes this question interesting. Computers can do more than manipulate symbols on a tape; not all programs run on a single machine; not all machine languages are Turing complete; etcetera. | |
Sep 3, 2014 at 6:34 | comment | added | Andrej Bauer | So far nobody here has defined the term "compile". However, the term "interpret" is clear: to interpret language $S$ in language $T$ means that we have a program $i$ in $T$, called the interpreter, such that $i(p)$ does in $T$ whatever $p$ does in $S$, where $p$ is a (syntactic representation of) program in $S$. Now, can someone define "compile" equally well? | |
Sep 3, 2014 at 4:24 | answer | added | Georgie | timeline score: -1 | |
Sep 3, 2014 at 0:47 | comment | added | Ben Voigt | @MooingDuck: So the compiler magically transforms logic for manipulating bytecode into logic for manipulating machine code? I don't think so. All you've proven is that the interpreted language doesn't have any unique capability not achievable in a compiled language... you haven't succeeded in compiling the first. | |
Sep 2, 2014 at 22:58 | answer | added | vzn | timeline score: 8 | |
Sep 2, 2014 at 22:45 | answer | added | Uday Reddy | timeline score: 13 | |
Sep 2, 2014 at 22:23 | comment | added | babou | @reinierpost Raphael is taking a theoretical stand on this issue. It has the merit of showing the conceptual limitations of the question. Compiling is translation from language S to language T. Language T could be an extension of S to which interpreting code in some other languge can be added. So bundling S and its interpreter is a program in language T. It seems absurd to an engineer, but it shows that it is not easy to formulate the question meaningfully. How do you distinguish an acceptable compiling process from an unacceptable one (such as Raphael's) from an engineering point of view? | |
Sep 2, 2014 at 21:49 | comment | added | Mooing Duck | @PlasmaHH: Self Modifying Code goes back to 1948. The first compiler was written in 1952. The concept of self-modifying code was invented in native machine code. | |
Sep 2, 2014 at 20:03 | comment | added | PlasmaHH | In the good old days I had self editing gwbasic programs (gwbasic stores basic programs in a kind of bytecode). I currently can't think of a sane way to compile those to native machine code while retaining their ability to edit themselves. | |
Sep 2, 2014 at 16:53 | comment | added | reinierpost | @Raphael: Nice idea, but ... 1) You're assuming the code is available prior to being executed. That doesn't hold for interactive use. Sure, you can use just-in-time compilation to native code on bash statements or PostScript stack contents, but it's a pretty crazy idea. 2) Your idea doesn't actually compile the code: the bundle isn't a compiled version of the code, but still an interpreter for the code. | |
Sep 2, 2014 at 13:39 | comment | added | Raphael | To add context to my earlier comment: the question is moot because of the existence of a universal Turing machine (which carries over to every (conceptually) Turing-complete language. | |
Sep 2, 2014 at 11:53 | answer | added | babou | timeline score: 63 | |
Sep 2, 2014 at 11:31 | history | tweeted | twitter.com/#!/StackCompSci/status/506766261410594816 | ||
Sep 2, 2014 at 11:04 | comment | added | Raphael | Famously, Perl can't even be parsed. Other than that, the claim seems to be trivially wrong without further assumptions: if there is an interpreter, I can always bundle interpreter and code in one executable, voila. | |
Sep 2, 2014 at 11:02 | history | edited | Raphael | CC BY-SA 3.0 |
edited tags
|
Sep 2, 2014 at 10:19 | history | asked | Anderson Nascimento Nunes | CC BY-SA 3.0 |