SSJX.CO.UK
Content

D Programming Language

This section aims to be a permanent home for the programs and guides I have made using D. Some of the content has been on this site before but spread across various sections. Admittedly D is not the primary language in use here, but it is a great language and hopefully this new section will help increase awareness of it.

What is the D Programming Language?

From the D website:

D is a general-purpose programming language with static typing, systems-level access, and C-like syntax. With the D Programming Language, write fast, read fast, and run fast.

The language aims to be fast and reduce errors, both very important features! Reading the aims of the language, there are a lot of things to like about it.

Applications / Programs

The following are D versions of some of the command line programs that are on this site. Source is included with each of them.
Note that some of the programs may be older versions, latest versions for use are in the PC Utilities section.

To keep the download size small, these are provided as a 7zip archives.

Amiga Animation Converter

Anim2Bmp (v0.1)

Converts an Amiga Animation to a sequence of Windows BMP files!
Download Anim2Bmp (177KB 7Zip)


Cybiko Video and Image Converter

Avi2Cvc (v2.8) / Bmp2Cvi (v2.5)

These tools can convert AVI videos and BMP images to a format more suitable for the Cybiko. They also demonstrate how modules can be used to reduce code duplication.
Download (248KB 7Zip) | Read about Porting and Modules


Avi to FLC Video Converter

Avi2Flc (v0.5)

Takes an uncompressed/msvc AVI and converts it to an 8bit FLC file which is compatible with VLC. (All new!)
Download Avi2Flc (178KB 7Zip)


Amiga IFF Image Converter

Iff2Bmp (v0.3)

Converts an Amiga 8bit, 24bit or HAM IFF ILBM image to a Windows BMP file. (All new!)
Download Iff2Bmp! (174KB 7Zip) | Read more!


Converts a 24bit Bitmap to an 8bit Bitmap Image

Bmp2Bmp (v0.1)

Converts a 24bit bitmap to a palette optimised 8bit bitmap! The image to the left was converted to 8bit before resaving as a webp!
Download Bmp2Bmp (174KB 7Zip)


Bitmap to QOI Image Converter

Bmp2Qoi (v0.1)

Converts a 24bit bitmap to a QOI compressed image! The guide give more details about the image format and how it was ported to D.
Download Bmp2Qoi (174KB 7Zip) | Read more!


Path Tracer

Path Tracer (v0.1a)

Port of Andrew Kensler's Path Tracer to D! Read the guide for more about this program and how using D's parallelism made it much faster!
Download Path Tracer (195KB 7Zip) | Read more!


Ray Tracer

Ray Tracer (v0.1)

Port of Andrew Kensler's Ray Tracer to D! Read the guide for benchmarks and more information!
Download Ray Tracer (195KB 7Zip) | Read more!


File Compression Utility

Squish (v0.2)

Command line file compression utility. Experimental, originally used to compress files for the Cybiko. Does a reasonable job with text files.
Download Squish (174KB 7Zip) | Read more!


Programming Guides

Avi2Cvc - Converting from C to D

Avi2Cvc - Converting from C to D

Summary of porting my Cybiko video conversion utility from C to D. The main reasons for this were to improve its memory safety (I had already found one memory issue) and to take advantage of the other benefits that using D provides.

Avi2Cvc / Bmp2Cvi - Using Modules

Avi2Cvc / Bmp2Cvi - Using Modules

How modules were used to reduce code duplication in these two programs making bug fixing and improvements easier.

Folder Processing

Folder Processing

How modules were used to reduce code duplication in these two programs making bug fixing and improvements easier.

Memory Safety - How D Can Prevent Use After Free Errors

How D Prevents Out Of Bound Errors

In C, an out of bounds error / exception occurs if you try to read or write to an area of memory that is outside the amount allocated. This guide shows how D can help prevent this type of error.

Memory Safety - How D Can Prevent Use After Free Errors

How D Can Prevent Use After Free Errors

A 'Use After Free' error is where after giving back (freeing) some memory, you carry on using it, in language like C these can cause security and stability problems. This guide shows how using D can avoid this.

Squish - Performance Optimisation in D

Squish - Performance Optimisation in D

Porting my Squish compression program from C to D initially resulted in terrible performance, this guide shows how I managed to make it nearly 30 times faster!