Category Archives: Uncategorized

Your online privacy matters!

“I have nothing to hide”

is what many people will reply when being told government surveillance is against their privacy.

Like Edward Snowden has said, “Arguing that you don’t care about the right to privacy because you have nothing to hide is no different than saying you don’t care about free speech because you have nothing to say.”

Schneier also argued “Too many wrongly characterize the debate as “security versus privacy.” The real choice is liberty versus control.(emphasis mine)

If you believe mass surveillance is good thing in order to stop terrorism, sorry, but you are wrong. Terrorists use encrypted communication.

So please, do not use that kind of argument.
Your online privacy is a right, claim it.

Read more on Wikipedia.

Using D with Eclipse

Before continuing, make sure you have installed:

  1. A D compiler (DMD, GDC, LDC)
  2. dub (D’s package manager)
  3. Java
  4. Eclipse

1. Open Eclise

Open eclipse. You will be presented the following screen (or similar, if you ‘re using a different version).
eclipse Mars 1 welcome screen

2. Install the DDT plugin

Install the DDT plugin by following the instructions here.

3. Create a project

3.1 Create project

To create a new project, select File → New → Project...

3.2 Select project type

Expand the D section and select DUB project

3.3 Set project name

Enter a name for the project

That’s it, the project has been created!

4. Configure the plugin

By default, the editor does not show auto-completion as you type (only when you press .).
To enable it, select Window → Preferences

Expand DDT and then Editor from the menu on the left. Check Enable alphabetic characters as trigger.

Check Enable alphabetic characters as trigger to enable syntax auto-completion as you type.

5. Run the project

To run the project, select Run → Run.

However, the first time you try to run, an error will occur “The selection cannot be launched, and there are no recent launches.”. To fix this, select Run → Run As → D Application.

6. Debug the project

Eclipse can debug D applications and provides a nice GUI for viewing the call stack, values of variables etc.

6.1 Setting a break point

To set a break point, double click on the desired line number in the editor.

6.2 Debugging

To debug, select Run → Debug. Eclipse will prompt you to switch to debugging mode – select yes.

Eclipse’s debug perspective. Call stack is located at the top left, values of variables at the top right.

Using D with CodeBlocks

Before continuing, make sure you have installed:

  1. A D compiler (DMD, GDC, LDC)
  2. Code::Blocks IDE. If you are on a Linux system, Code::Blocks should be in your distribution’s default packages. E.g. on Ubuntu, you can install it by executing sudo apt-get install codeblocks. Otherwise, download and install it from the Code::Blocks website.

1. Create a Code::Blocks

If Code::Blocks is installed on your machine, you will see the following screen:

To create a new project, select File → New → Project....

Then, select D application and click Go.
Select D application to create a D project

The new D project wizard will be shown.

Nothing to see here, press Next

Set the project’s name and location in this screen

Finally, choose the compiler you wish. I only have DMD installed at this time, so I chose that one.

That’s it! Your new project is ready.

2. Using the IDE

Code::Blocks does not offer much as an IDE. No code completion, no refactorings, no dub support. What is does have, is debugging support within the IDE. It’s a bit ugly, but it works.

To set a breakpoint, click in the space between the line number and the editor.
Click just after the line number to set a breakpoint

To start the debugger, select Debug → Start / Continue

At the bottom of the window, you can type debugger commands. On my system, the default debugger is GDB.
You can execute debugger commands within the IDE