A Pattern for Head-mutable Structures

Posted on

When Andrei Alexandrescu introduced ranges to the D programming language, the gap between built-in and user-defined types (UDTs) narrowed, enabling new abstractions and greater composability. Even today, though, UDTs are still second-class citizens in D. One example of this is support for head mutability—the ability to manipulate a reference without changing the referenced value(s). This … Continue reading A Pattern for Head-mutable Structures

Read more...

A Look at Chapel, D, and Julia Using Kernel Matrix Calculations

Posted on

Introduction It seems each time you turn around there is a new programming language aimed at solving some specific problem set. Increased proliferation of programming languages and data are deeply connected in a fundamental way, and increasing demand for “data science” computing is a related phenomenon. In the field of scientific computing, Chapel, D, and … Continue reading A Look at Chapel, D, and Julia Using Kernel Matrix Calculations

Read more...

DustMite: The General-Purpose Data Reduction Tool

Posted on

If you’ve been around for a while, or are a particularly adventurous developer who enjoys mixing language features in interesting ways, you may have run into one compiler bug or two: Implementation bugs are inevitably a part of using cutting-edge programming languages. Should you run into one, the steps to proceed are generally as follows: … Continue reading DustMite: The General-Purpose Data Reduction Tool

Read more...

Tracing D Applications

Posted on

At one time or another during application development you need to make a decision: does your application work like it should and, if not, what is wrong with it? There are different techniques to help you decide, some of which are logging, tracing, and profiling. How are they different? One way to look at it … Continue reading Tracing D Applications

Read more...

wc in D: 712 Characters Without a Single Branch

Posted on

After reading “Beating C With 80 Lines Of Haskell: Wc”, which I found on Hacker News, I thought D could do better. So I wrote a wc in D. The Program It consists of one file and has 34 lines and 712 characters. import std.stdio : writefln, File; import std.algorithm : map, fold, splitter; import … Continue reading wc in D: 712 Characters Without a Single Branch

Read more...

D For Data Science: Calling R from D

Posted on

D is a good language for data science. The advantages include a pleasant syntax, interoperability with C (in many cases as simple as adding an #include directive to import a C header file via the dpp tool), C-like speed, a large standard library, static typing, built-in unit tests and documentation generation, and a garbage collector … Continue reading D For Data Science: Calling R from D

Read more...

Saving Money by Switching from PHP to D

Posted on

2night was born in 2000 as an online magazine focused on nightlife and restaurants in Italy. Over the years, we have evolved into a full-blown experiential marketing agency, keeping up our vocation of spreading what’s cool to do when you go out, but specialized in producing brand events and below-the-line unconventional marketing campaigns. We started … Continue reading Saving Money by Switching from PHP to D

Read more...

Fuzzing Your D Application with LDC and AFL

Posted on

Fuzzing, or fuzz testing, is a powerful method to find hidden bugs in your application. The basic idea is to present random input to your application and monitor how it behaves. If it crashes or shows some other unusual behavior then you have found a bug. The use of true random input is not very … Continue reading Fuzzing Your D Application with LDC and AFL

Read more...

Flexible Default Function Parameters via structs with Nullable Fields

Posted on

The problem Sometimes we need to combine an aggregate of a set of values with an aggregate of the corresponding set of default values to create a combined result. The result for each member is either the explicitly specified value or, where no value is specified, the default value. This is similar to default function … Continue reading Flexible Default Function Parameters via structs with Nullable Fields

Read more...

DStep 1.0.0

Posted on

DStep is a tool for automatically generating D bindings for C and Objective-C libraries. This is implemented by processing C or Objective-C header files and outputting D modules. DStep uses the Clang compiler as a library (libclang) to process the header files. Background The first version of DStep was released on the 7th of July, … Continue reading DStep 1.0.0

Read more...