Re: I don't even..

2014-01-31 Thread Andrej Mitrovic
On 1/31/14, Meta jared...@gmail.com wrote: You might want to file a bug report as well about the utterly obtuse error message. Yes, please file this as a bug. Thanks!

std.typecons.Rebindable

2014-01-31 Thread Jack Applegame
Why doesn't Rebindable allow associative arrays? import std.typecons; Rebindable!(immutable string[]) data1; // ok Rebindable!(immutable string[string]) data2; // error

Re: How to call opCall as template?

2014-01-31 Thread Frustrated
On Friday, 31 January 2014 at 00:29:20 UTC, Namespace wrote: On Thursday, 30 January 2014 at 22:34:52 UTC, Frustrated wrote: On Thursday, 30 January 2014 at 21:33:09 UTC, Namespace wrote: I think for your example, the first case works fine using deduction. Sure but this is not always

Re: How to call opCall as template?

2014-01-31 Thread Namespace
So, if your notation was implemented, it would no longer be easy to know. The compiler would have to be context sensitive, which is more complex and not perfect. I doubt Walter would go for that so you'll never be able to use an explicit templated opCall... but implicit are ok. I never wanted

Re: Idiomatic D?

2014-01-31 Thread qznc
On Thursday, 30 January 2014 at 22:40:24 UTC, Tofu Ninja wrote: On Thursday, 30 January 2014 at 20:10:01 UTC, Dicebot wrote: On Thursday, 30 January 2014 at 20:05:11 UTC, Tofu Ninja wrote: I hear it thrown around a lot but what does it actually mean? What does the ideal D code look like? What

Re: How to call opCall as template?

2014-01-31 Thread Frustrated
On Friday, 31 January 2014 at 10:31:52 UTC, Namespace wrote: So, if your notation was implemented, it would no longer be easy to know. The compiler would have to be context sensitive, which is more complex and not perfect. I doubt Walter would go for that so you'll never be able to use an

Re: How to call opCall as template?

2014-01-31 Thread Namespace
On Friday, 31 January 2014 at 11:42:54 UTC, Frustrated wrote: On Friday, 31 January 2014 at 10:31:52 UTC, Namespace wrote: So, if your notation was implemented, it would no longer be easy to know. The compiler would have to be context sensitive, which is more complex and not perfect. I doubt

Re: mixin template

2014-01-31 Thread Frustrated
On Friday, 31 January 2014 at 06:26:16 UTC, Dan Killebrew wrote: On Friday, 31 January 2014 at 06:24:27 UTC, Dan Killebrew wrote: mixin template Foo(alias a){ alias Foo=a; } pragma(msg, Foo!2); // error template Bar(alias a){ alias Bar=a; } pragma(msg, Bar!2); // ok As far as I can tell,

Re: Idiomatic D?

2014-01-31 Thread Dicebot
On Thursday, 30 January 2014 at 22:40:24 UTC, Tofu Ninja wrote: There is no official idiomatic style like, for example, in python. When I speak about idiomatic D I usually think about style Phobos is written in (omitting legacy modules) as it is the code that gets most attention from most

Re: How to call opCall as template?

2014-01-31 Thread Frustrated
Are you always so aggressive? :) Not always ;) Just when I feel like it

Re: Magic infinite loop inside foreach

2014-01-31 Thread MrSmith
On Thursday, 30 January 2014 at 23:45:14 UTC, Joseph Rushton Wakeling wrote: On 31/01/14 00:08, MrSmith wrote: Somehow if i comment out //matrix = solveTemp(temp); it works, but this method works fine, and after it done1 is printed. Strange. That does rather suggest that it's that method

Re: Magic infinite loop inside foreach

2014-01-31 Thread MrSmith
On Friday, 31 January 2014 at 14:05:10 UTC, MrSmith wrote: On Thursday, 30 January 2014 at 23:45:14 UTC, Joseph Rushton Wakeling wrote: On 31/01/14 00:08, MrSmith wrote: Somehow if i comment out //matrix = solveTemp(temp); it works, but this method works fine, and after it done1 is printed.

Re: std.typecons.Rebindable

2014-01-31 Thread monarch_dodra
On Friday, 31 January 2014 at 12:43:21 UTC, Frustrated wrote: On Friday, 31 January 2014 at 08:40:30 UTC, Jack Applegame wrote: Why doesn't Rebindable allow associative arrays? import std.typecons; Rebindable!(immutable string[]) data1; // ok Rebindable!(immutable string[string]) data2;

Re: HTTPS, SSL, TLS client on D

2014-01-31 Thread Uranuz
Thanks for response. I think this would help with my problem.

Re: Memory leak in hello world

2014-01-31 Thread Rob
This same question appears to have been answered here, but it's not really conclusive http://stackoverflow.com/questions/14802212/memory-leak-in-minimal-d-program On 2014-01-27 01:44, Thejaswi Puthraya wrote: I have a simple Hello World program (file named tmp.d) written in D import

Parallel thread safety (fun fun)

2014-01-31 Thread Mineko
So, I'm implementing some parallelism in my engine (maybe some concurrency where appropriate later), and I'm having some issues with thread safety, and synchronize ain't cutting it. What I figure is that if I can get the IO class working within a parallel thread then everything else should

Re: Memory leak in hello world

2014-01-31 Thread diahron
On Friday, 31 January 2014 at 21:00:38 UTC, Rob wrote: This same question appears to have been answered here, but it's not really conclusive http://stackoverflow.com/questions/14802212/memory-leak-in-minimal-d-program On 2014-01-27 01:44, Thejaswi Puthraya wrote: I have a simple Hello World

Template types in parameter lists

2014-01-31 Thread Matthew Dudley
So this is the general form of what I'm trying to do: import std.stdio; class Foo(uint something) { Foo opBinary(string op)(Foo rhs) const if (op == *) { writeln(calling Foo.*); } } class Bar : Foo!(3) { // ... } class Baz : Foo!(4) { //... } void main() { auto bar = new

Re: Template types in parameter lists

2014-01-31 Thread bearophile
Matthew Dudley: I'm still fairly new to D, and my google-fu has failed me. I don't understand this error. You have to remember that an instantiated template creates a totally distinct type. There are few different ways to face your problem, this is one of them: import std.stdio; class