Plug-in systems in C++ are hard because the ABI is not properly defined, and each compiler (or version thereof) follows its own rules. However, COM on Windows shows that it's possible to create a minimal plug-in system that allows programmers with different compilers to create plug-ins for a host application using a simple interface.
L...
Are there any good tools out there for automatically converting non-Java source code into Java source?
I'm not expecting something perfect, just to get the worst of the grunt work out of the way.
I guess there is a sliding scale of difficulty. C# should be relatively easy (so long as you ignore all the libraries). (well written) C++ no...
Anyone know this compiler feature? It seems GCC support that. How does it work? What is the potential gain? In which case it's good? Inner loops?
(this question is specific, not about optimization in general, thanks)
...
Which compiles to faster code: "ans = n * 3" or "ans = n+(n*2)"?
Assuming that n is either an int or a long, and it is is running on a modern Win32 Intel box.
Would this be different if there was some dereferencing involved, that is, which of these would be faster?
long a;
long *pn;
long ans;
...
*pn = some_number;
ans = ...
What compiler (I'm using gcj 4.x) options should I use to generate an "exe" file for my java application to run in windows?
...
I'm building a compiler that targets .NET and I've previously generated CIL directly, but generating DLR trees will make my life a fair amount easier. I'm supporting a few dynamic features, namely runtime function creation and ducktyping, but the vast majority of the code is completely static.
So now that that's been explained, I have ...
Whilst working on a recent project, I was visited by a customer QA representitive, who asked me a question that I hadn't really considered before:
How do you know that the compiler you are using generates machine code that matches the c code's functionality exactly and that the compiler is fully deterministic?
To this question I ha...
I'm developing a compiler framework for .NET and want a flexible way of defining pipelines. I've considered the following options:
WWF
Custom XML pipeline description
Custom pipeline description in code (using Nemerle's macros to define syntax for it)
Other code-based description
Requirements:
Must not depend on functionality only...
I'm using int as an example, but this applies to any value type in .Net
In .Net 1 the following would throw a compiler exception:
int i = SomeFunctionThatReturnsInt();
if( i == null ) //compiler exception here
Now (in .Net 2 or 3.5) that exception has gone.
I know why this is:
int? j = null; //nullable int
if( i == j ) //this s...
Are there any advantages compiling for .NET Framework 3.5 instead of 2.0?
For example less memory consumption, faster startup, better performance...
Personally I don't think so however, I may have missed something.
Edit: Of course there are more features in the 3.5 framework, but these are not the focus of this question.
Edit2: There...
Specifically:
When should we use it?
What is happening at the compiler/linker level that requires us to use it?
How in terms of compilation/linking does this solve the problems which require us to use it?
...
I've recently become interested in learning Scala, my first thought was a simple compiler, but I don't have very good knowledge of Automata theory.
So my question is: what's a good project or tutorial to learn scala with?
...
I'm looking to write a programming language for fun, however most of the resource I have seen are for writing a context free language, however I wish to write a language that, like python, uses indentation, which to my understanding means it can't be context free.
...
How does the compiler know the prototype of sleep function or even printf function, when I did not include any header file in the first place.
Moreover, if I specify sleep(1,1,"xyz") or any arbitrary number of arguments, the compiler still compiles it.
But the strange thing is that gcc is able to find the definition of this funciton at ...
In most C or C++ environments, there is a "debug" mode and a "release" mode compilation.
Looking at the difference between the two, you find that the debug mode adds the debug symbols (often the -g option on lots of compilers) but it also disables most optimizations.
In "release" mode, you usually have all sorts of optimizations turned o...
I would like to know how to infer coercions (a.k.a. implicit conversions) during type inference. I am using the type inference scheme described in Top Quality Type Error Messages by Bastiaan Heeren, but I'd assume that the general idea is probably the same in all Hindley-Milner-esque approaches.
It seems like coercion could be treated a...
Hi,
I want to compile an example code which using google`s webdriver.
I saved webdriver into /home/iyo/webdriver. My code is:
package com.googlecode.webdriver.example;
import com.googlecode.webdriver.By;
import com.googlecode.webdriver.WebDriver;
import com.googlecode.webdriver.WebElement;
import com.googlecode.webdriver.htmlun...
What's the reason for the "No newline at end of file" warning in some C++ compilers?
What's good about having an empty line at the end of a source\header file?
...
I've been a professional web developer for about five years now, and have compiled many many things for servers. I've also written many simple C programs (one or two files).
The main thing which has held me back from creating more complex applications is the fear of leraning to the GNU build tools. The documentation is huge and a bit in...
What are some suggestions for easy to use C++ compilers for a beginner? Free or open-source ones would be preferred.
...