Questions tagged [phobos]

Phobos is the official runtime and standard library of the D programming language.

97 questions
1
vote
3 answers

D redirect stdout to function

I want to redirect all console output to my own GUI console, including all calls to C write functions. Things I've tried: Creating a new stream class, but stdio.stdout is a file and you can't assign a stream to it Creating a new file class…
weltensturm
  • 2,164
  • 16
  • 17
1
vote
1 answer

Unicode conversion

Config: OS: Windows 7 (32 bits) DMD 2.58 using Phobos standard library My Intent: I began to port a old package (10 modules) written back in 2007. It featured a full unicode support and I want to keep that capability. Its author has written a…
menjaraz
  • 7,551
  • 4
  • 41
  • 81
1
vote
2 answers

d language concurrency with recursion

I have been trying to implement a factorial function using the actor model with the d language. My objective is to use to create actor to calculate each part alone e spawn a new actor to make the next. I am just a beginner with D, so I'm just…
Fred
  • 417
  • 6
  • 14
0
votes
3 answers

Do a multilanguage application?

I would like to know how do a multilanguage application. It seem it is possible by using flag -J but they are no document for this feature. link given in this page http://www.digitalmars.com/d/2.0/dmd-linux.html seem to be wrong if you can do a…
bioinfornatics
  • 1,749
  • 3
  • 17
  • 36
0
votes
1 answer

Make array from a range in D language

In D language, what is the shortest way to construct an array from a given range? Let I have an iterator i. How to make an array of its elements (in order)?
porton
  • 5,214
  • 11
  • 47
  • 95
0
votes
1 answer

Why std lib from GDC is not the same that phobos from DMD

For example, I can not compile using GDC 5.2.0 (2016-02-05T11:17:49.3234388) a program importing std.meta because that file is not found. I was comparing the include folders between GDC and DMD and I found a great mismatch of…
0
votes
1 answer

std.json - Any way to check if a JSONValue has a particular field

Suppose I have an unknown bit of JSON, and I want to check if it has a form similar to this: { "foo": stuff "bar": stuff } where stuff is anything - integer, object, whatever. If I do something like this: auto json = parseJSON("{}"); auto…
Koz Ross
  • 3,040
  • 2
  • 24
  • 44
1 2 3 4 5 6
7