The compilers tag has no wiki summary.
8
votes
6answers
625 views
Why C++ to write a compiler?
I was wondering why C++ is a good choice to write a compiler. Of course C is good for this purpose too, because many compilers are written either in C or C++ but I am more interested in C++ this time. ...
0
votes
0answers
133 views
What is the reason compilers for embedded devices are often outdated? [closed]
I have noticed that people compiling for embedded devices are forced to use outdated compilers. I don't understand this.
Isn't the only thing required to run on a different architecture is porting ...
2
votes
0answers
131 views
CoffeeScript translates to JavaScript. Is there something like it for C? [closed]
Possible Duplicate:
Is there a language that transcompiles to C with a better syntax?
There are many language implementations which compile to C. However, most of them have some language ...
1
vote
3answers
166 views
Integer sign and compilation via C
I'm writing a compiler that uses the time-honored strategy of using a C compiler as the back end, and I'm trying to figure out exactly how to handle integer sign.
I'm using machine word integers as ...
7
votes
9answers
537 views
Why are virtual machines required?
Instead of compiling the source code for the respective OS (on which it is targeted), you compile once and run everywhere.
For the sake of this question, I would call it VM (for example, both for ...
4
votes
3answers
301 views
Is there a language that transcompiles to C with a better syntax?
CoffeeScript is a language with a very clean Ruby-like syntax that transcompiles to JavaScript. Does the same thing exists with C? Then writing more readable and as fast as original C programs would ...
-1
votes
3answers
210 views
Programming Languages supported (out-of-the-box) by Mac OS X 10.6+ [closed]
So, which are the languages for which there is already an interpreter/compiler installed in a default Mac OS X 10.6+ installation (with Xcode installed) ?
I mean I know : Perl, Python, PHP,...
Do ...
2
votes
5answers
369 views
How should I evaluate new browser languages?
In these days there are many projects whose aim is to bring new languages to the browser by compiling them to JavaScript. Among the others one can mention ClojureScript, CoffeScript, Dart, haXe, ...
7
votes
8answers
467 views
Are there any concrete examples of where a paralellizing compiler would provide a value-adding benefit?
Paul Graham argues that:
It would be great if a startup could give us something of the old
Moore's Law back, by writing software that could make a large number
of CPUs look to the developer ...
2
votes
2answers
94 views
Syntax tree dump format
When writing a compiler, it is useful to include the ability to dump the abstract syntax tree in a human readable format, for debugging purposes. This output might also be useful for other tools like ...
3
votes
1answer
83 views
What would be the best way to learn about compilers, and executable formats? [closed]
I want to write my own compiler for my own language. Yes, it's going to be hard, and it will take long, but I think it will be worth it.
I have looked into OSDev.org, and read about executable ...
8
votes
5answers
341 views
Interpreted vs Compiled: A useful distinction?
A lot of questions get asked here about interpreted vs compiled language implements. I'm wondering whether the distinction actually makes any sense. (Actually the questions are usually about ...
7
votes
3answers
747 views
Why doesn't Python need a compiler?
Just wondering (now that I've started with C++ which needs a compiler) why Python doesn't need a compiler?
I just enter the code, save it as an exec, and run it. In C++ I have to make builds and all ...
4
votes
0answers
158 views
Visualizing a CUP grammar
I am implementing a grammar in CUP, and it would often be helpful to see everything at a glance. This could also be useful in finding errors quickly.
Are there any programs out there that will ...
11
votes
2answers
561 views
Anyone know of any parallelizing compilers following the approach of the Dragon Book?
In Compilers: Principles, Techniques, & Tools, Aho et al describe an approach for optimizing for parallelism (chapter 11 in the second edition). Is anyone aware of any existing compilers which ...
10
votes
1answer
417 views
Are there any podcasts (not lectures) about compiler development?
There are several podcasts with lectures from universities. I am looking for "other" podcasts.
So are there any non-lecture podcasts about compiler development?
1
vote
1answer
207 views
Google Closure Compiler - what does the name mean?
I am curious about the Google Closure Compiler. Why did they name it that? Does it have anything to do with lexical closures?
EDIT: I tried researching it in the FAQ and documentation, as well as ...
0
votes
4answers
426 views
Computation Program Not Running at 100% CPU Utilization
I have a program which has a GUI and performs some very heavy mathematical computations for a couple of minutes and then outputs a result. When I try to directly interface it through its DLL's, it ...
3
votes
4answers
489 views
Writing a lexer in C++
What are good resources on how to write a lexer in C++ (books, tutorials, documents), what are some good techniques and practices?
I have looked on the internet and everyone says to use a lexer ...
0
votes
2answers
382 views
How Does A Compiler Work? [closed]
Note: I am surprised that this hasn't been asked before, and if it has I could not find it in a search.
I've been on tons of websites, I've read tons of articles, and I have heard tons of ...
4
votes
4answers
381 views
Why aren't VM languages compiled just once?
(First of all, I should make clear that compilers and virtual machines (aka) are a completely unknown field for me)
As I understand it, every time a Java/C#/... application is run, a VM is invoked ...
7
votes
6answers
354 views
What is the industry definition of an interpreter (as opposed to a compiler)?
In my compiler design courses, I have learned about and worked with a clear academic definition of an interpreter and a compiler, with an interpreter being
a program Pi from a language M capable ...
3
votes
3answers
369 views
Do You Have To Know CIL To Make A Compiler for .NET?
Assume one wants to create a simple .NET language, or slightly more difficult, a compiler for an existing .NET language. Do you absolutely need to be familiar with the CIL (Common Intermediate ...
1
vote
4answers
221 views
What programs emit C++ code and pass it to mainstream compilers?
I suspect there're programs that instead of emitting machine code instead emit C++ code and then start a mainstream C++ compiler to compile it to machine code.
I can't find any notable examples ...
3
votes
1answer
269 views
Io (Language) IDE/Compiler
Can you recommend a free compiler/IDE for writing some simple Io programs?
I want to learn the language at home in my spare time.
2
votes
3answers
160 views
Is it worth evaluating compiler optimization on trivial cases?
I'm currently testing Visual C++ 10 on some trivial pieces of code. For example, like this one (taken from here):
int main()
{
int i;
clrscr();
...
7
votes
3answers
929 views
How could the first C++ compiler be written in C++?
I'd always thought the first C++ compiler was written in assembly, until I found this:
The first C++ compiler (Cfront) was written in C++
I believe the rest of the paragraph in that page is trying ...
9
votes
7answers
1k views
Are compilers used outside of development?
As far as my understanding goes, compilers are meant for developers compiling their code into executable (machine-code) files. Compilers don't extend to a client's machine or end-user system.
...
7
votes
1answer
2k views
Which compilers support what C++11 features?
If one wanted to start using C++11 features, where would one find detailed information on the features supported by the major compilers? Like "In version X we support move semantics now, but haven't ...
4
votes
6answers
476 views
How can variables be created at runtime?
Is it possible to define variables dynamically?
Last night I was writing some code (C and VB2010) and I ran into a problem related to defining variables in my program. The variables needed depend on ...
10
votes
2answers
338 views
What is the relationship between the Dynamic Language Runtime and C# 4.0?
Let's say I wanted to create a dynamic language compiler/interpreter, a Scheme interpreter perhaps, on the .NET platform as it exists today. Would I be better off using the Dynamic Language Runtime ...
6
votes
4answers
817 views
Will all compilers start supporting C++0x as soon as it is officially out?
It's sometimes frustrating to know that one particular feature is working in one compiler and not in another. Even after downloading latest gcc4.6 few weeks back some C++0x features are not working.
...
4
votes
3answers
173 views
Role of linking, object files and executables
For a C or assembly program that does not require any other library, will linking
be necessary? In other words, will conversion from C to Assembly and/or from Assembly to an object file be enough ...
1
vote
1answer
217 views
Understanding Application binary interface (ABI)
I am trying to understand the concept of Application binary interface (ABI).
From The Linux Kernel Primer:
An ABI is a set of conventions that allows a linker to combine
separately compiled ...
6
votes
2answers
250 views
How does a static type system affect the design of a prototype-based language?
The Wikipedia article on prototype-based languages contains the following paragraph:
Almost all prototype-based systems are based on interpreted and dynamically typed languages. Systems based on ...
2
votes
3answers
272 views
Compiler/OS Design - Where to start
I have a fairly strong background in C and Assembly and I am starting to look into basic compiler and operating systems design, but my biggest problem is where I should really start, seeing as both ...
3
votes
2answers
365 views
Is Objective-C an Interpreted or Compiled language?
I want to know if Objective-C is an interpreted or a compiled language.
10
votes
7answers
486 views
Which computer science subjects are required to follow introductory course in compilers?
I am non computer science undergraduate and work as a web-developer(java, python, AS3 etc.) as a professional. I take 1 course per semester at my local university. I had taken Artificial ...
3
votes
4answers
254 views
Does a prose to code compiler exist?
I have seen some horrible code in my time including people virtually duplicating the code in comments
// add 4 to x
x+=4;
// for each i in 0 to 9
for (int i = 0; i < 10; i++) {
// multiply x ...
2
votes
1answer
231 views
Is it possible to take a binary compiled for ARMv7 architecture and convert it to ARMv6?
Is it possible to take a binary compiled for ARMv7 architecture and convert it to ARMv6 ?
Are there any tools that can do this?
3
votes
2answers
207 views
How do you write a code analysis & refactoring tool to interface with Visual Studio?
Recently while working on a project of mine and doing some refactoring I got an idea to write a custom tool to help me analyze my code in a very specific context and perform some very custom ...
9
votes
5answers
470 views
Basic features for a basic language? DSL suggestions?
I've finally begun to understand the complexity behind creating an interpreter and a compiler. I've built several versions of TinyBasic, 1964 (Dartmouth) Basic, and my own expansions on those ...
4
votes
3answers
543 views
5
votes
8answers
409 views
How useful are compile-time functions?
How useful are compile time functions? Personally I haven't worked in any language that supports them but they seem nifty in some cases.
For those who don't what I mean, a compile-time function is ...
1
vote
6answers
261 views
What should be done when upgrading compiler introduces bug in existing project?
We've 4 embedded firmware at hand. Two of them are released, are in maintenance phase. Other two are going to be released. The released product uses OKI 411 micro, where as yet to be released products ...
3
votes
2answers
139 views
Best Online resources to learn about Compilers?
I have a course this semester on Compilers. Eventhough I have text book about this, I guess this would not help me to understand fully.
I have searched google for this but didn't find any online ...
8
votes
5answers
1k views
Do Fortran compilers really generate faster code than C compilers?
When I was studying in the university I often heard the idea that Fortran compilers produced faster code than C compilers for an equivalent program.
The key reasoning went like this: a Fortran ...
11
votes
5answers
1k views
Are C++ templates just a kind of glorified macros?
From different comparisons among C++ templates and C#/Java generics like this one-
...
40
votes
19answers
2k views
How come compilers are so reliable?
We use compilers on a daily basis as if their correctness is a given, but compilers are programs too, and can potentially contain bugs. I always wondered about this infallible robustness. Have you ...
11
votes
14answers
854 views
Is it true that first versions of C compilers ran for dozens of minutes and required swapping floppy disks between stages?
Inspired by this question.
I heard that some very very early versions of C compilers for personal computers (I guess it's around 1980) resided on two or three floppy disks and so in order to compile ...