Re: Unable To Install Debian Package on Deepin Linux (Debian Jessie)

2016-11-16 Thread Paul Backus via Digitalmars-d-learn
On Wednesday, 16 November 2016 at 02:24:26 UTC, azzuwan wrote: It seems that /usr/bin/dman is currently used by deepin-manual. Is there anyway to get around this? Take a look at dpkg-divert(1)

[Vibe.d] Handling event loop manually

2016-11-16 Thread Mike Bierlee via Digitalmars-d-learn
In my application I have already have an event loop running taking care of all sorts of things. Now I want to use Vibe.d to run an asynchronous websocket API to provide some debugging information. Normally Vibe.d's main takes care of handling the event loop. I want to run vibe's event loop

Re: How to create a UTF16 text file on Windows?

2016-11-16 Thread Daniel Kozak via Digitalmars-d-learn
Dne 16.11.2016 v 23:43 lafoldes via Digitalmars-d-learn napsal(a): Hi, I'd like to create a UTF16 text file on Windows 7, using std.stdio.File and std.stdio.File.write... functions (so no binary write, no Win32 functions). I was experimenting with variations of this code…: import std.stdio;

How to create a UTF16 text file on Windows?

2016-11-16 Thread lafoldes via Digitalmars-d-learn
Hi, I'd like to create a UTF16 text file on Windows 7, using std.stdio.File and std.stdio.File.write... functions (so no binary write, no Win32 functions). I was experimenting with variations of this code…: import std.stdio; int main(string[] argv) { auto output = File("wide_text.txt",

Re: Compiling and linking libraries

2016-11-16 Thread Mike Parker via Digitalmars-d-learn
On Wednesday, 16 November 2016 at 14:59:40 UTC, Edwin van Leeuwen wrote: If you are happy to use dub I would just add the GL library as a dependency to my dub.json file. Then if you call dub it will download and compile the necessary file. Example dub.json file: ``` { "name":

Re: Compiling and linking libraries

2016-11-16 Thread Edwin van Leeuwen via Digitalmars-d-learn
On Wednesday, 16 November 2016 at 14:27:41 UTC, Darren wrote: Hey all, This is a very beginner problem, but not one I know how to do on my own. Could anyone give a step-by-step guide on how to compile libraries, and then use them in my project with DUB? If you are happy to use dub I would

Compiling and linking libraries

2016-11-16 Thread Darren via Digitalmars-d-learn
Hey all, This is a very beginner problem, but not one I know how to do on my own. Could anyone give a step-by-step guide on how to compile libraries, and then use them in my project with DUB? For example, I've been using this guide for graphics:

Re: an extremely naive question regarding synchronized...

2016-11-16 Thread Kagamin via Digitalmars-d-learn
static MySingleton get() { if (instance_ is null) { synchronized { if (instance_ is null) { atomicStore(instance_, new MySingleton); } } } return instance_; } This should work fine and faster.

Re: Correct way to create singleton?

2016-11-16 Thread Royce via Digitalmars-d-learn
On Thursday, 10 November 2016 at 17:17:51 UTC, Konstantin Kutsevalov wrote: Hi, what is a correct (and simple) way to create an singleton? This is how I see that now: ``` class ApMessageRouter { static ApMessageRouter instance = null; private this() { } //