Wednesday, July 20, 2005

Revisiting D

After not doing active D coding in a while, I’ve been revisiting it gently in the past weeks. What slowed me of initially was there was nothing I was doing with it productively.

 

For my scripting and generic one-off projects that I see no reason why I need to compile, I use the venerable Python, and at work, I work with C#. And back at the shell, I still use serious Bash scripting. So apart from the proof of concept D sprint that I set for myself, I really didn’t have any project to use it for.

 

Well, it seems that is going to change. Someone on (Dejan@irc.freenode.net#d), suggested the creator of DFL (Vathix@irc.freenode.net#d), do a Linux/Unix port of DFL, utilizing Xlib. So, I’ve jumped the opportunity to put my D to the test.

 

What we’ll be doing is basically porting XLib to D so D GUI toolkits like DFL, can be built easily on Linux.

 

The truth is, what we’re doing (thanks to D being a practical and realistic language), is not as hard as its sounding… infact, all we have to do, first convert all the necessary XLib header files to d modules, then we can work on making the D modules more ‘D-Like’, adding object oriented paradigms etc, but the first part, is actually boring translation if you may J

 

I started somestuff last nite… and my first target is to be able to import X11.Xlib (analogous to #include <X11/Xlib.h>), for this, I have a whole lot of modules to convert. I’ve moved part of X.h to X.d, I’ll continue tonite.. and hopefully in two nites time, I should be able to write a basic XLib app in D.

 

In other news, as I started working on this yesternite, it became clearer how I would approach porting the EFL to D. Infact, I don’t even need the whole EFL right now, I just want to make the test module that comes with e17, be writable in D, then I’ll go from there. I’m not going to code that yet, I’ll wait for things to become clearer from the XLib effort, then I’ll let my inner-coding-monkey™ get to work on that J

 

Essien out.

 

0 Comments:

Post a Comment

<< Home