Thread overview
D port of the Dynamic Window Manager (DWM)
Jan 05, 2015
stewart h
Jan 11, 2015
Dicebot
Jan 14, 2015
stewarth
Jan 16, 2015
Dicebot
January 05, 2015
Hi,

I've ported DWM to D as a learning exercise and thought I'd share it. The repository can be found here:

https://bitbucket.org/growlercab/ddwm

(Beware, I've only tested it on Arch-Linux 64 bit for about 1 day!)

DWM is a minimalist dynamic window manager from suckless. More details on DWM can be found here

http://dwm.suckless.org/


The "cport" branch is where I've done as little as possible to port the C code to D. It really looks like C code and is basically the DWM code compiling with DMD.

Under the "Downloads" section is a build of ddwm-cport to try out if anyone is interested, or build from source as it's pretty easy with dub.

The master branch is where I'm learning D, trying new Phobos functions and D style coding. I'm then comparing how the D-style version performs with DDWM.cport and the original DWM in terms of speed and memory.

I don't expect the master branch to be stable but cport should work fine.


Cheers,
Stew
January 11, 2015
On Monday, 5 January 2015 at 06:17:03 UTC, stewart h wrote:
> Hi,
>
> I've ported DWM to D as a learning exercise and thought I'd share it. The repository can be found here:
>
> https://bitbucket.org/growlercab/ddwm
>
> (Beware, I've only tested it on Arch-Linux 64 bit for about 1 day!)
>
> DWM is a minimalist dynamic window manager from suckless. More details on DWM can be found here
>
> http://dwm.suckless.org/
>
>
> The "cport" branch is where I've done as little as possible to port the C code to D. It really looks like C code and is basically the DWM code compiling with DMD.
>
> Under the "Downloads" section is a build of ddwm-cport to try out if anyone is interested, or build from source as it's pretty easy with dub.
>
> The master branch is where I'm learning D, trying new Phobos functions and D style coding. I'm then comparing how the D-style version performs with DDWM.cport and the original DWM in terms of speed and memory.
>
> I don't expect the master branch to be stable but cport should work fine.
>
>
> Cheers,
> Stew

Would you be interested in going full fork mode and adding new features to D version? I am big fan of tiling window managers and having one that is written in D and I can easily extend sounds tempting :3
January 14, 2015
On Sunday, 11 January 2015 at 14:08:26 UTC, Dicebot wrote:
> On Monday, 5 January 2015 at 06:17:03 UTC, stewart h wrote:
>> Hi,
>>
>> I've ported DWM to D as a learning exercise and thought I'd share it. The repository can be found here:
>>
>> https://bitbucket.org/growlercab/ddwm
>>
>> (Beware, I've only tested it on Arch-Linux 64 bit for about 1 day!)
>>
>> DWM is a minimalist dynamic window manager from suckless. More details on DWM can be found here
>>
>> http://dwm.suckless.org/
>>
>>
>> The "cport" branch is where I've done as little as possible to port the C code to D. It really looks like C code and is basically the DWM code compiling with DMD.
>>
>> Under the "Downloads" section is a build of ddwm-cport to try out if anyone is interested, or build from source as it's pretty easy with dub.
>>
>> The master branch is where I'm learning D, trying new Phobos functions and D style coding. I'm then comparing how the D-style version performs with DDWM.cport and the original DWM in terms of speed and memory.
>>
>> I don't expect the master branch to be stable but cport should work fine.
>>
>>
>> Cheers,
>> Stew
>
> Would you be interested in going full fork mode and adding new features to D version? I am big fan of tiling window managers and having one that is written in D and I can easily extend sounds tempting :3

That is my long term goal for this project.

I am currently using the project to learn D and Phobos by doing
things like replacing for-loops with std.algorithm calls etc.
It's an unnecessary step but I'm finding it useful coming from
C/C++.

Once I get into the swing of D a bit more I will be looking to
replace whole parts with new D code and adding new features.
First off will probably be run time configuration and very basic
theme support. I'm also keen to experiment with dispatch
mechanism so it uses Phobos std.concurrency or std.signals...or
both!

There are still some unresolved performance issues in D-DWM but
they're low priority ATM. For example the "c-port" branch is
basically DWM compiled with DMD and yet bringing up xterm (it's a
fork()/execvp() in the code) takes far longer with D-DWM than it
does in original C-DWM.

Cheers,
Stew
January 16, 2015
Great, will need to experiment with it a bit!