Re: DUB problems

2015-12-31 Thread Rikki Cattermole via Digitalmars-d-learn
On 31/12/15 10:17 PM, Daniel Kozak via Digitalmars-d-learn wrote: V Thu, 31 Dec 2015 09:09:20 + yawniek via Digitalmars-d-learn napsáno: On Thursday, 31 December 2015 at 08:51:42 UTC, Daniel Kozak wrote: I try to build vibe-d Hello world app with dub,

DUB problems

2015-12-31 Thread Daniel Kozak via Digitalmars-d-learn
I try to build vibe-d Hello world app with dub, but I have many problems with dub, nothing works at all Error: Output file 'client.o' for module 'vibe.http.client' collides with previous module 'vibe.db.mongo.client'. See the -oq option and allmost nothing works as expected. How can I do

Re: DUB problems

2015-12-31 Thread Daniel Kozak via Digitalmars-d-learn
V Thu, 31 Dec 2015 09:09:20 + yawniek via Digitalmars-d-learn napsáno: > On Thursday, 31 December 2015 at 08:51:42 UTC, Daniel Kozak wrote: > > I try to build vibe-d Hello world app with dub, but I have many > > problems with dub, nothing works at all > >

Re: DUB problems

2015-12-31 Thread yawniek via Digitalmars-d-learn
On Thursday, 31 December 2015 at 08:51:42 UTC, Daniel Kozak wrote: I try to build vibe-d Hello world app with dub, but I have many problems with dub, nothing works at all Error: Output file 'client.o' for module 'vibe.http.client' collides with previous module 'vibe.db.mongo.client'. See the

Re: DUB problems

2015-12-31 Thread Daniel Kozak via Digitalmars-d-learn
V Thu, 31 Dec 2015 09:09:20 + yawniek via Digitalmars-d-learn napsáno: > On Thursday, 31 December 2015 at 08:51:42 UTC, Daniel Kozak wrote: > > I try to build vibe-d Hello world app with dub, but I have many > > problems with dub, nothing works at all > >

Re: CTFE with C functions not possible?

2015-12-31 Thread Rikki Cattermole via Digitalmars-d-learn
On 01/01/16 1:11 AM, Shriramana Sharma wrote: Shriramana Sharma wrote: What I desire to do is be able to call a C library from a D template like octal to compute a string at compile time. To be more explicit, I wrote a library in C since it's much leaner size-wise than the D code (although

Re: CTFE with C functions not possible?

2015-12-31 Thread Shriramana Sharma via Digitalmars-d-learn
Rikki Cattermole wrote: >> Is this possible or not? > > No, source is not available. Why, is it because the D compiler is already linked to the C library (and hence knows where the functions are located and such), but not to my library? I mean, I even gave -L-lmylib and all that, but of

Re: CTFE with C functions not possible?

2015-12-31 Thread Shriramana Sharma via Digitalmars-d-learn
Shriramana Sharma wrote: > What I desire to do is be able to call a C library from a D template like > octal to compute a string at compile time. To be more explicit, I wrote a library in C since it's much leaner size-wise than the D code (although admittedly much *much* more tedious to write

Re: CTFE with C functions not possible?

2015-12-31 Thread Rikki Cattermole via Digitalmars-d-learn
On 01/01/16 1:29 AM, Shriramana Sharma wrote: Rikki Cattermole wrote: You misunderstand, its hardcoded into the CTFE evaluator. That is what an intrinsic is. What do you mean hardcoded into the CTFE evaluator? Surely you aren't suggesting that the D compiler contains its own implementation

Re: DUB problems

2015-12-31 Thread Rikki Cattermole via Digitalmars-d-learn
On 31/12/15 11:02 PM, Daniel Kozak via Digitalmars-d-learn wrote: V Thu, 31 Dec 2015 22:23:43 +1300 Rikki Cattermole via Digitalmars-d-learn napsáno: On 31/12/15 10:17 PM, Daniel Kozak via Digitalmars-d-learn wrote: V Thu, 31 Dec 2015 09:09:20 + yawniek

Re: CTFE with C functions not possible?

2015-12-31 Thread Rikki Cattermole via Digitalmars-d-learn
On 01/01/16 1:14 AM, Shriramana Sharma wrote: Rikki Cattermole wrote: Is this possible or not? No, source is not available. Why, is it because the D compiler is already linked to the C library (and hence knows where the functions are located and such), but not to my library? I mean, I even

CTFE with C functions not possible?

2015-12-31 Thread Shriramana Sharma via Digitalmars-d-learn
Using DMD 2.0.69.2, the following code: extern (C) double sqrt(double x); enum q = sqrt(4.0); gives the error: Error: sqrt cannot be interpreted at compile time, because it has no available source code But if I do: import std.math; enum q = sqrt(4.0); There is no problem. So two questions:

Re: CTFE with C functions not possible?

2015-12-31 Thread Rikki Cattermole via Digitalmars-d-learn
On 01/01/16 12:52 AM, Shriramana Sharma wrote: Using DMD 2.0.69.2, the following code: extern (C) double sqrt(double x); enum q = sqrt(4.0); gives the error: Error: sqrt cannot be interpreted at compile time, because it has no available source code But if I do: import std.math; enum q =

Re: CTFE with C functions not possible?

2015-12-31 Thread Shriramana Sharma via Digitalmars-d-learn
Rikki Cattermole wrote: > You misunderstand, its hardcoded into the CTFE evaluator. That is what > an intrinsic is. What do you mean hardcoded into the CTFE evaluator? Surely you aren't suggesting that the D compiler contains its own implementation of the functions already implemented in libc?

Re: DUB problems

2015-12-31 Thread Daniel Kozak via Digitalmars-d-learn
V Thu, 31 Dec 2015 22:23:43 +1300 Rikki Cattermole via Digitalmars-d-learn napsáno: > On 31/12/15 10:17 PM, Daniel Kozak via Digitalmars-d-learn wrote: > > V Thu, 31 Dec 2015 09:09:20 + > > yawniek via Digitalmars-d-learn

Re: CTFE with C functions not possible?

2015-12-31 Thread Rikki Cattermole via Digitalmars-d-learn
On 01/01/16 1:05 AM, Shriramana Sharma wrote: Rikki Cattermole wrote: It will make it very hard to split std.math up. I have no desire to split std.math up. :-) I do though. What I desire to do is be able to call a C library from a D template like octal to compute a string at compile

Re: CTFE with C functions not possible?

2015-12-31 Thread Shriramana Sharma via Digitalmars-d-learn
Rikki Cattermole wrote: > It will make it very hard to split std.math up. I have no desire to split std.math up. :-) What I desire to do is be able to call a C library from a D template like octal to compute a string at compile time. Is this possible or not? -- Shriramana Sharma, Penguin

Re: CTFE with C functions not possible?

2015-12-31 Thread Daniel Kozak via Digitalmars-d-learn
On Thursday, 31 December 2015 at 11:52:01 UTC, Shriramana Sharma wrote: Using DMD 2.0.69.2, the following code: extern (C) double sqrt(double x); enum q = sqrt(4.0); gives the error: Error: sqrt cannot be interpreted at compile time, because it has no available source code But if I do:

Re: Variable below zero but if statement doesn't grab?

2015-12-31 Thread Marcel mauss via Digitalmars-d-learn
On Monday, 28 December 2015 at 18:02:53 UTC, jkpl wrote: On Monday, 28 December 2015 at 15:50:06 UTC, Basile B. wrote: On Monday, 28 December 2015 at 15:07:08 UTC, jkpl wrote: On Sunday, 27 December 2015 at 16:00:34 UTC, jkpl wrote: On Sunday, 27 December 2015 at 15:53:55 UTC, TheDGuy wrote:

Re: regex - match/matchAll and bmatch - different output

2015-12-31 Thread Ivan Kazmenko via Digitalmars-d-learn
On Wednesday, 30 December 2015 at 11:06:55 UTC, Ivan Kazmenko wrote: ... As you can see, bmatch (usage discouraged in the docs) gives me the result I want, but match (also discouraged) and matchAll (way to go) don't. Am I misusing matchAll, or is this a bug? Reported as

Re: Storing and Searching large text lists

2015-12-31 Thread Nicholas Wilson via Digitalmars-d-learn
On Friday, 1 January 2016 at 00:41:56 UTC, brian wrote: I have a large list, B, of string items. For each item in that large list, I need to see if it is in the smaller list, A. I have been using a simple string array for the storage of A string[] A and then using foreach to go through all

Storing and Searching large text lists

2015-12-31 Thread brian via Digitalmars-d-learn
I have a large list, B, of string items. For each item in that large list, I need to see if it is in the smaller list, A. I have been using a simple string array for the storage of A string[] A and then using foreach to go through all the items of B and check they are in A

Deducing a template argument from an aliased parameter

2015-12-31 Thread rcorre via Digitalmars-d-learn
In the following example, it seems like the signatures of fun1 and fun2 should be equivalent. Both accept a Vector!(T, 2), the only difference is that fun2 goes through an alias. struct Vector(T, int N) { } alias Vector2(T) = Vector!(T, 2); void fun1(T)(Vector!(T, 2) vec) { } void

Deit Editor

2015-12-31 Thread Jason Jeffory via Digitalmars-d-learn
Vibe.d uses deit files for html generation. Seems nice but haven't dived into it(just removes a but of nonsense and allows code integration for dynamic generation... sounds great!!). But what about visual editing? It's nice to be ale to see the layout of the page directly without all the

Re: Storing and Searching large text lists

2015-12-31 Thread via Digitalmars-d-learn
On 2016-01-01 13:22, Nicholas Wilson via Digitalmars-d-learn wrote: > On Friday, 1 January 2016 at 00:41:56 UTC, brian wrote: > >> I have a large list, B, of string items. For each item in that large list, I >> need to see if it is in the smaller list, A. I have been using a simple >>

Re: socketpair

2015-12-31 Thread sanjayss via Digitalmars-d-learn
On Thursday, 31 December 2015 at 07:48:03 UTC, Vladimir Panteleev wrote: On Thursday, 31 December 2015 at 02:37:07 UTC, sanjayss wrote: OK; one way I realized was to put the network socket select in one thread and the watching for keypress in another thread and then use the concurrency