Skip to main content

Questions tagged [d]

D is a systems programming language developed by Walter Bright and since 2006 Andrei Alexandrescu. Its focus is on combining the power and high performance of C and C++ with the programmer productivity of modern languages like Ruby and Python. Special attention is given to the needs of concurrency, reliability, documentation, quality assurance, management and portability.

0 votes
1 answer
69 views

A D wrapper around a C function

Any problems with this D wrapper around libcomcom_run_command() C function from C library libcomcom? Does it work as expected? Is it idiomatic? Is it the right way ...
porton's user avatar
  • 101
1 vote
2 answers
121 views

Recursive range iteration

I decided to do Advent of Code this year in D, and the following is my solution to day 8. Algorithm aside, I was specifically wondering if there was a better way to use ranges in a recursive manner ...
LordAro's user avatar
  • 231
4 votes
1 answer
124 views

Minimalist config file reader/writer

I have written a simple configuration file reader and writer in D that is intended to parse string[string] associative arrays (the whole file is one array) and ...
Jacob Birkett's user avatar
4 votes
1 answer
78 views

D minMax function implementation

I happened to need to find both the maximum and the minimum of an array, so I decided to implement a minMax function in D. Questions: Is this an efficient ...
Conor O'Brien's user avatar
5 votes
1 answer
140 views

Lexer for a small language in D

I am writing an interpreter for a simple mathematical programming language. Below is a simple program written in it that prints 41.22: ...
kangaroo's user avatar
  • 153
2 votes
0 answers
192 views

D trie implementation

I just started to learn D and ported my a bit over-templated trie. It looks way better than on C++. I'm sure there is still room for improvement and to make it be real D code. I checked an the array ...
Dietr1ch's user avatar
  • 321
3 votes
2 answers
207 views

Haskell's intersperse in D

I am learning D. I'm trying to implement Haskell's intersperse in D. I want to use ranges. I feel that the intermediate "interspersed" value is wrong. Additionally, I suspect the ...
Jeremy Wright's user avatar
3 votes
1 answer
61 views

Journal Application in D

Started picking up D recently. I wrote an application to create journal entries (text files) based on user input. ...
Jeff's user avatar
  • 469
5 votes
1 answer
92 views

"event_foo" method event system in D

The goal is to be able to call an event_<name> method on an object if it implements it, or otherwise do nothing, without needing to explicitly define and ...
Colonel Thirty Two's user avatar
0 votes
1 answer
182 views

Null-delimited to printf %b converter

I wrote a D implementation of the nul2pfb utility from here, as the link to the source code was broken and I wanted to try to learn D. I noticed that it was rather slow (could barely keep up with the ...
Demi's user avatar
  • 325
10 votes
1 answer
1k views

C++ vs D - Algorithm Optimization/Conversion (Using vectors/arrays)

OK, I've been playing with D for a while (and been in love with its expressive power and simplicity, to be honest). However, since I'm still new to D, I'm facing a few issues. Let's take the ...
Dr.Kameleon's user avatar
0 votes
2 answers
318 views

How code be this piece of code be refactored?

I use DMD 1.056 with Tango 0.99.9 to build a GPX document using API. I am a beginner in D language. Usage DMD 1.056 with Tango 0.99.9 is compulsory as a requirement The GPX data are here hardcoded ...
user avatar
10 votes
1 answer
441 views

Mixin and template-heavy code for a Silverlight clone

I've made a mock version of Silverlight in D2. It is meant to output HTML, but since I don't know HTML yet, its current output is in. HTML is not the reason I'm here, though. The goal of my project ...
Jean-Bernard Pellerin's user avatar