Re: dub optional dependency

2017-10-28 Thread Mike Parker via Digitalmars-d-learn
On Sunday, 29 October 2017 at 01:55:22 UTC, evilrat wrote: This is dub design choice, optional requires manual fetching(dub fetch 'package'). I don't see other options, but you can try hack this using 'preBuildCommands' by adding dub fetch. Of course this defeats the purpose. No, they

Re: Removing some of the elements from vibe.core.concurrency.Future[] futurelist

2017-10-28 Thread Nicholas Wilson via Digitalmars-d-learn
On Sunday, 29 October 2017 at 01:44:37 UTC, Nicholas Wilson wrote: Alternatively you could use a singly linked list and splice out elements that pass the filter predicate. I think you'd have to roll your own though. Something like https://github.com/dlang/phobos/pull/5821

Re: dub optional dependency

2017-10-28 Thread Mike Parker via Digitalmars-d-learn
On Saturday, 28 October 2017 at 19:23:42 UTC, ikod wrote: So default version is "std", I can build it w/o vibe-d, but dub anyway fetch vibe-d. I'd like dub fetch vibe-d only when I build with --config vibed. As far as I know, that isn't possible. A package is either optional, or it isn't.

Re: dub optional dependency

2017-10-28 Thread evilrat via Digitalmars-d-learn
On Saturday, 28 October 2017 at 19:23:42 UTC, ikod wrote: So default version is "std", I can build it w/o vibe-d, but dub anyway fetch vibe-d. I'd like dub fetch vibe-d only when I build with --config vibed. I know about "optional": true, it prevent dub to fetch vibe-d for "std" config,

Re: Removing some of the elements from vibe.core.concurrency.Future[] futurelist

2017-10-28 Thread Nicholas Wilson via Digitalmars-d-learn
On Saturday, 28 October 2017 at 13:51:42 UTC, kerdemdemir wrote: I am trying to make non blocking web requests to a web service. vibe.core.concurrency.Future!(UserData)[] futurelist; // I will make http requests in for loop and push them to futureList foreach( elem; elemList ) { //

CSV with empty values for integer fields

2017-10-28 Thread Arun Chandrasekaran via Digitalmars-d-learn
CSV with empty values for integer fields throws (Row: 1, Col: 3) Unexpected end of input when converting from type string to type int Code that parses the CSV: ``` import std.algorithm; import std.array; import std.csv; import std.stdio; import std.conv; import std.range; private struct

Re: What is the best way to use requests and iopipe on gzipped JSON file

2017-10-28 Thread Steven Schveighoffer via Digitalmars-d-learn
On 10/13/17 6:18 PM, Steven Schveighoffer wrote: On 10/13/17 6:07 PM, Steven Schveighoffer wrote: I reproduced, and it comes down to some sort of bug when size_t.max is passed to ensureElems. I will find and eradicate it. I think I know, the buffered input source is attempting to

dub optional dependency

2017-10-28 Thread ikod via Digitalmars-d-learn
Hello, I have dub.json with two configurations: "configurations": [ { "name": "std", "targetType": "library" }, { "name": "vibed",

Re: opCast fails when this is null.

2017-10-28 Thread Mike Wey via Digitalmars-d-learn
On 28-10-17 16:22, Nicholas Wilson wrote: On Saturday, 28 October 2017 at 14:19:01 UTC, Nicholas Wilson wrote: As Basile mentioned, this is compiler sticking checks in behind your back. The reason it works on new LDC is because #6982 was cherry picked to LDC (1.3?) before it was merged into

Re: opCast fails when this is null.

2017-10-28 Thread Nicholas Wilson via Digitalmars-d-learn
On Saturday, 28 October 2017 at 14:19:01 UTC, Nicholas Wilson wrote: As Basile mentioned, this is compiler sticking checks in behind your back. The reason it works on new LDC is because #6982 was cherry picked to LDC (1.3?) before it was merged into dmd (not sure what version, I though it was

Re: opCast fails when this is null.

2017-10-28 Thread Nicholas Wilson via Digitalmars-d-learn
On Saturday, 28 October 2017 at 13:24:49 UTC, Mike Wey wrote: The following code runs correctly when compiled with ldc (1.4.0) but fails with an assert error when compiled with dmd (2.076 and ldc 1.2.0) ``` class A { } class B { T opCast(T)() { return this;

Re: Just starting with D (linking with C++)

2017-10-28 Thread sivakon via Digitalmars-d-learn
On Saturday, 28 October 2017 at 02:20:42 UTC, codephantom wrote: On Friday, 27 October 2017 at 17:14:20 UTC, sivakon wrote: I want to use C++ libraries for machine learning and deep learning. How do I add C++ libraries to my d code. on FreeBSD, I use: for C static binding:

Removing some of the elements from vibe.core.concurrency.Future[] futurelist

2017-10-28 Thread kerdemdemir via Digitalmars-d-learn
I am trying to make non blocking web requests to a web service. vibe.core.concurrency.Future!(UserData)[] futurelist; // I will make http requests in for loop and push them to futureList foreach( elem; elemList ) { // In makeWebRequest I make the httprequest, parse json and push to

Re: opCast fails when this is null.

2017-10-28 Thread Basile B. via Digitalmars-d-learn
On Saturday, 28 October 2017 at 13:24:49 UTC, Mike Wey wrote: The following code runs correctly when compiled with ldc (1.4.0) but fails with an assert error when compiled with dmd (2.076 and ldc 1.2.0) ``` class A { } class B { T opCast(T)() { return this;

opCast fails when this is null.

2017-10-28 Thread Mike Wey via Digitalmars-d-learn
The following code runs correctly when compiled with ldc (1.4.0) but fails with an assert error when compiled with dmd (2.076 and ldc 1.2.0) ``` class A { } class B { T opCast(T)() { return this; } } void main() { A a = null; B b =

Re: How to find the content of core.sys.* ?

2017-10-28 Thread Jacob Carlborg via Digitalmars-d-learn
On 2017-10-28 13:48, user1234 wrote: It's not documented because everything is already well documented either at microsoft, posix reference, c reference etc. It would be copy and paste monkey work to do that. I would be nice to have empty Ddoc comments so the symbols show up in the

Re: How to find the content of core.sys.* ?

2017-10-28 Thread user1234 via Digitalmars-d-learn
On Saturday, 28 October 2017 at 11:41:16 UTC, Ryan Frame wrote: On Tuesday, 17 May 2016 at 06:56:36 UTC, rikki cattermole wrote: On 17/05/2016 6:55 PM, chmike wrote: Hello, The nice and handy documentation of dlang doesn't provide any info on the core.sys. How can I find out all the things

Re: How to find the content of core.sys.* ?

2017-10-28 Thread Ryan Frame via Digitalmars-d-learn
On Tuesday, 17 May 2016 at 06:56:36 UTC, rikki cattermole wrote: On 17/05/2016 6:55 PM, chmike wrote: Hello, The nice and handy documentation of dlang doesn't provide any info on the core.sys. How can I find out all the things that are in there ?