EDDI 0.4.1 : Loops and better assembly generation

I just released the 0.4.1 version of the EDDI compiler.
This version introduce two kind of loops :

the while loop
the for loop, in its general form with three expressions

Moreover, you can now use parenth in mathematical expressions.
That’s it for the new features, but the compiler has been greatly improved. Now the scope of variables is managed, so you can have twice the same variables as …

EDDI 0.4 : Native compilation and swap operator

The version 0.4 of EDDI is released.
There is only one new feature, the swap operator () to swap two variables together, but the biggest news is that now EDDI is not anymore an interpreted language, but is a compiled language.
In fact, I rewritten the compiler in order to output Linux assembly code. For now the code is only 32 bits, but I …

How to profile your applications using the Linux perf tools

When an application encounters some performance issues, we have to find the code that causes the problem to optimize only what really matters.
To find the code we have to optimize, the profilers are really useful. In this post, we’ll use the Linux perf tools to profile a simple C++ application.
The perf tools are integrated in the Linux kernel since the 2.6 version. …

EDDI 0.3 – Branches and conditions if, else if, else

I just pushed a new version of EDDI on the Git repository : EDDI 0.3
This new version adds a new big features : Branches and condition. You can now use else / else if / else statements in EDDI code. So that a code like that will be executed :

if(3 > 2){
Print("That’s true. ");
}
 
if(2 < 1){
Print("Try again");
} else {
Print("Good job");
}
 
if(2 > 3){
Print("Not correct…");
} else …

Book Review : Accelerated C++

Accelerated C++

Because I started a project in C++ and had not a lot of knowledges about this language, I bought some books and just finished the first : Accelerated C++, written by Andrew Koenig and Barbara E. Moo
This book, as its name indicates, will not tell you anything about C++. It will teach you everything you need to know when starting developing applications in C++. …

No more ads on the site !

Hi,
As you have perhaps noticed, there is no more Google Adsense on the site. I removed them for several reasons :

They were not really visually good
They slowed down the site by a factor of two
That gave a bad image of the site
This is not the main goal of the website to make money
They didn’t made enough money to counter the previous disadvantages

So you will …

EDDI 0.2.1 : Integer operations and optimizations

I’ve introduced a new feature in EDDI. You can now make computations on integers and string concatenations.
So you can now write this kind of thing with EDDI :
int i = 4 + 2 * 2;
int j = i + 5 % 6 / 3 * 4;
Print(i + 2);
Print(j % i);
Adding computations has not been very difficult. The difficult thing has been to …

EDDI 0.2 : Integers and variables

I just pushed the last commits of Eddi 0.2.
This new version allows the use of integers. You can declare int variables and pass int values or variables to the Print operation.
I’ve also refactored the compiled to use a kind of parse tree and several phases. But now, I’m not really satisfied with the design. The classes are too strongly coupled and the …

How to install a specific version of GCC on Ubuntu 11.04 (natty)

Sometimes you need to install a specific version of gcc for some reasons, for example when you need to have the same compiler version as the one used by your team.
In that, the package manager doesn’t help because not every version of gcc is packaged in every version of Ubuntu. So you must install it by hand and it can take a little …

EDDI 0.1.1 : Variables

The version 0.1.1 of EDDI is now available.
This new version introduce the feature to put variable on the code. You can now write things like that :
a = “Variable a”;
b = “Variable b”;
Print(a);
Print(b);
And you can also reassign value to a variable and assign the value of a variable to another :
a = b;
b = “New variable b”;
Nothing extraordinary, but it’s …