Re: Dub use local fork

2017-09-22 Thread Mike Parker via Digitalmars-d-learn
On Saturday, 23 September 2017 at 03:13:15 UTC, Nicholas Wilson wrote: my dub.selections.json is currently: { "fileVersion": 1, "versions": { "derelict-cl": "2.0.0", "derelict-cuda": "2.0.1", "derelict-util": "2.1.0",

Re: Dub use local fork

2017-09-22 Thread rikki cattermole via Digitalmars-d-learn
On 23/09/2017 4:13 AM, Nicholas Wilson wrote: I want to use a fork of one of my dub dependencies so I can make sure that it works before I merge the fork into upstream. http://code.dlang.org/advanced_usage says     Path-based dependencies     Package descriptions in the dub.json/dub.sdl can

Dub use local fork

2017-09-22 Thread Nicholas Wilson via Digitalmars-d-learn
I want to use a fork of one of my dub dependencies so I can make sure that it works before I merge the fork into upstream. http://code.dlang.org/advanced_usage says Path-based dependencies Package descriptions in the dub.json/dub.sdl can specify a path instead of a version; this can

Re: Connecting python to D on socket of localhost : target machine actively refuses connection

2017-09-22 Thread rikki cattermole via Digitalmars-d-learn
On 23/09/2017 3:26 AM, Sergei Degtiarev wrote: On Friday, 22 September 2017 at 04:06:08 UTC, Enjoys Math wrote: Here's my minimal D code (server.d): public: this(ushort port, string address="") {     super(& run);     if (address == "")     address = "DESKTOP-T49RGUJ";    

Re: Connecting python to D on socket of localhost : target machine actively refuses connection

2017-09-22 Thread Sergei Degtiarev via Digitalmars-d-learn
On Friday, 22 September 2017 at 04:06:08 UTC, Enjoys Math wrote: Here's my minimal D code (server.d): public: this(ushort port, string address="") { super(& run); if (address == "") address = "DESKTOP-T49RGUJ";

Re: How to list all process directories under /proc/

2017-09-22 Thread angel via Digitalmars-d-learn
On Sunday, 17 September 2017 at 08:15:58 UTC, Ky-Anh Huynh wrote: Hi, I want to list all processes by scanning /proc/. The following code doesn't work [code] foreach (string fstatm; dirEntries("/proc/", "[0-9]*", SpanMode.shallow)) { writefln("pid %s", fstatm); } [/code] as it

Re: What the hell is wrong with D?

2017-09-22 Thread Patrick Schluter via Digitalmars-d-learn
On Tuesday, 19 September 2017 at 18:34:13 UTC, Brad Anderson wrote: On Tuesday, 19 September 2017 at 18:17:47 UTC, jmh530 wrote: On Tuesday, 19 September 2017 at 17:40:20 UTC, EntangledQuanta wrote: Thanks for wasting some of my life... Just curious about who will justify the behavior and

Re: Multidimensional dynamic array of strings initialized with split()

2017-09-22 Thread Ludovit Lucenic via Digitalmars-d-learn
On Thursday, 5 September 2013 at 16:22:46 UTC, Ali Çehreli wrote: Compiling with "DMD64 D Compiler v2.064-devel-52cc287" produces the following errors: * You had byLines in your original code as well. Shouldn't it be byLine? * You are missing the closing brace of the foreach loop as well.

CTFE static array error: cannot modify read-only constant

2017-09-22 Thread Johan via Digitalmars-d-learn
Hi all, ``` auto foo(const int[3] x) { int[3] y = x; y[0] = 1; // line 4 return y; } immutable int[3] a = [0,1,2]; immutable int[3] b = foo(a); // line 8 ``` compiles with an error: ``` 4: Error: cannot modify read-only constant [0, 1, 2] 8:called from here:

Last post from me not displayed on web frontend?

2017-09-22 Thread Martin Tschierschke via Digitalmars-d-learn
This post is to try if it works now. But I got an answer from Adam... Thank you.

Parsing mbox file to display with vibe.d

2017-09-22 Thread Martin Tschierschke via Digitalmars-d-learn
Hello, Parsing mbox file (/var/spool/mail/... on a Ubuntu machine) and splitting to a range or array of mail objects. Has anyone done this with D? please give me hint. (DUB, git, this forum?) Or should I start with formail (-s) as a subprocess? (At first step, I want to run a vibe.d server

Re: How to check if string is available at compile time

2017-09-22 Thread B4s1L3 via Digitalmars-d-learn
On Thursday, 21 September 2017 at 11:42:36 UTC, David Bennett wrote: Hi Guys, Is there an easy way to check if the value of string passed to a template is available at compile time? Yeah , sure and I have such a template in my library:

Re: Problems with function as parameter

2017-09-22 Thread user1234 via Digitalmars-d-learn
On Friday, 22 September 2017 at 04:32:08 UTC, Josh wrote: As an aside, in that doc it says "The .funcptr property of a delegate will return the function pointer value as a function type". So I also tried Mix_ChannelFinished(().funcptr); and this compiled, but caused a segfault when the