[Issue 14617] PTHREAD_MUTEX_INITIALIZER does not work on OSX

2015-05-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14617 --- Comment #5 from Steven Schveighoffer schvei...@yahoo.com --- Andrei, that's exactly what I did. I just realized, I messed up and left that initializer in the types.d file, when I tried doing it in the pthread.d file. Fixing that, it does work.

Re: Python's features, which requires D

2015-05-24 Thread Dennis Ritchie via Digitalmars-d-learn
On Sunday, 24 May 2015 at 02:43:47 UTC, Idan Arye wrote: I'm a fan of lisp(Clojure being my favorite. Too bad it takes about a century just to load the runtime...), and yet I find it quite ironic that Paul Graham claims lisp to be the most powerful language right after claiming that

Re: Python's features, which requires D

2015-05-24 Thread Idan Arye via Digitalmars-d-learn
On Sunday, 24 May 2015 at 11:07:19 UTC, Dennis Ritchie wrote: On Sunday, 24 May 2015 at 02:43:47 UTC, Idan Arye wrote: I'm a fan of lisp(Clojure being my favorite. Too bad it takes about a century just to load the runtime...), and yet I find it quite ironic that Paul Graham claims lisp to be

Re: is expression with static if matches wrong type

2015-05-24 Thread ZombineDev via Digitalmars-d-learn
On Saturday, 23 May 2015 at 04:40:28 UTC, tcak wrote: [snip] Yup, you need to use == to match the exact type. Btw, you can use enum templates from std.traits, to accomplish the same with less code: public void setMarker(M)( size_t markerIndex, M markerValue ) if(isScalarType!M) {

Re: Uphill

2015-05-24 Thread Paulo Pinto via Digitalmars-d
On Sunday, 24 May 2015 at 09:43:38 UTC, bachmeier wrote: On Sunday, 24 May 2015 at 07:21:19 UTC, Joakim wrote: Rust's syntax dooms it to the same niche as Haskell. They'd have been better off to go with XML. I think the developers got comfortable with the syntax as they went along, and they

Re: is expression with static if matches wrong type

2015-05-24 Thread ZombineDev via Digitalmars-d-learn
On Sunday, 24 May 2015 at 14:46:52 UTC, ZombineDev wrote: [snip] Correction: not exactly the same, because isScalar also allows wchar, dchar and const and immutable versions of those 'scalar' types.

[Issue 14617] PTHREAD_MUTEX_INITIALIZER does not work on OSX

2015-05-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14617 Steven Schveighoffer schvei...@yahoo.com changed: What|Removed |Added Keywords||pull --- Comment

Re: Uphill

2015-05-24 Thread bachmeier via Digitalmars-d
On Sunday, 24 May 2015 at 07:21:19 UTC, Joakim wrote: Rust's syntax dooms it to the same niche as Haskell. They'd have been better off to go with XML. I think the developers got comfortable with the syntax as they went along, and they have no idea just how ugly it is.

Proof of concept - library AA

2015-05-24 Thread Martin Nowak via Digitalmars-d
Would be interesting to get some opinions on this. https://github.com/D-Programming-Language/druntime/pull/1282

Re: Python's features, which requires D

2015-05-24 Thread Dennis Ritchie via Digitalmars-d-learn
On Sunday, 24 May 2015 at 14:15:55 UTC, Idan Arye wrote: This IS ironic, because Paul Graham claims lisp to be the most powerful, but if he have ever encounter a more powerful language he couldn't accept it is more powerful than lisp due to the very same Blub Paradox he describes himself.

ctfe and static arrays

2015-05-24 Thread Jay Norwood via Digitalmars-d-learn
I'm a bit confused by the documentation of the ctfe limitations wrt static arrays due to these seemingly conflicting statements, and the examples didn't seem to clear anything up. I was wondering if anyone has examples of clever things that might be done with static arrays and pointers using

std.multidimarray

2015-05-24 Thread Dennis Ritchie via Digitalmars-d
Hello everyone! I want to know whether there are any plans for the inclusion of such a module in Phobos? Documentation: http://denis-sh.bitbucket.org/unstandard/unstd.multidimarray.html Source:

Re: ctfe and static arrays

2015-05-24 Thread anonymous via Digitalmars-d-learn
On Sunday, 24 May 2015 at 17:35:39 UTC, Jay Norwood wrote: I'm a bit confused by the documentation of the ctfe limitations wrt static arrays due to these seemingly conflicting statements, and the examples didn't seem to clear anything up. I was wondering if anyone has examples of clever

Re: Weird result of getsockopt

2015-05-24 Thread tcak via Digitalmars-d-learn
On Sunday, 24 May 2015 at 16:51:44 UTC, CodeSun wrote: Hello guys, Today, I found a weird problem when I was learning to enable SO_KEEPALIVE for a specific socket. I use setsockopt to enable keepalive firstly, and then use getsockopt to show if it is enabled correctly. My code snippet is

Re: Uphill

2015-05-24 Thread weaselcat via Digitalmars-d
On Sunday, 24 May 2015 at 18:40:49 UTC, Paulo Pinto wrote: On Sunday, 24 May 2015 at 17:22:26 UTC, bachmeier wrote: On Sunday, 24 May 2015 at 11:59:00 UTC, Paulo Pinto wrote: On Sunday, 24 May 2015 at 09:43:38 UTC, bachmeier wrote: On Sunday, 24 May 2015 at 07:21:19 UTC, Joakim wrote: Rust's

[Issue 8914] Wrong `escaping reference` error on returning static array

2015-05-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=8914 John Colvin john.loughran.col...@gmail.com changed: What|Removed |Added CC|

Re: Uphill

2015-05-24 Thread Andrei Alexandrescu via Digitalmars-d
On 5/24/15 1:20 AM, weaselcat wrote: IMO I think the worst thing C++ has done is blatantly ignore features that have been 'killer' in D(see: the reaction to the static_if proposal) http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4461.html -- Andrei

Evaluation order of index expressions

2015-05-24 Thread kinke via Digitalmars-d
code import core.stdc.stdio; static int[] _array = [ 0, 1, 2, 3 ]; int[] array() @property { printf(array()\n); return _array; } int start() @property { printf(start()\n); return 0; } int end() @property { printf(end()\n); return 1; } void main() { array[start..end] = 666;

Re: Proof of concept - library AA

2015-05-24 Thread Vladimir Panteleev via Digitalmars-d
On Sunday, 24 May 2015 at 14:13:26 UTC, Martin Nowak wrote: Would be interesting to get some opinions on this. https://github.com/D-Programming-Language/druntime/pull/1282 Looks like a good step in the right direction. Some questions about: This provides a strong incentive to no longer use

Re: indie game contests

2015-05-24 Thread Vlad Levenfeld via Digitalmars-d
On Saturday, 23 May 2015 at 05:17:13 UTC, Danni Coy wrote: Got very close to a year or so ago. Probably something I would be much more capable of doing now. The only downside is that I enjoy doing asset creation more. That's perfect, actually. Shoot me an email, we can all assemble a D team

Re: ctfe and static arrays

2015-05-24 Thread anonymous via Digitalmars-d-learn
On Sunday, 24 May 2015 at 18:14:19 UTC, anonymous wrote: Static array has a special meaning. It does not mean static variable with an array type. Static arrays are those of the form Type[size]. That is, the size is known statically. PS: You may also see the term fixed-size array which means

Re: Python's features, which requires D

2015-05-24 Thread Idan Arye via Digitalmars-d-learn
On Sunday, 24 May 2015 at 15:40:21 UTC, Dennis Ritchie wrote: On Sunday, 24 May 2015 at 14:15:55 UTC, Idan Arye wrote: This IS ironic, because Paul Graham claims lisp to be the most powerful, but if he have ever encounter a more powerful language he couldn't accept it is more powerful than

Weird result of getsockopt

2015-05-24 Thread CodeSun via Digitalmars-d-learn
Hello guys, Today, I found a weird problem when I was learning to enable SO_KEEPALIVE for a specific socket. I use setsockopt to enable keepalive firstly, and then use getsockopt to show if it is enabled correctly. My code snippet is listed below: Dlang version: import

[Issue 14571] [REG2.064] Large static arrays seem to lock up DMD

2015-05-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14571 --- Comment #20 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/ae31c78687ca24c692e84cc97d5b5f1e975be84b fix Issue 14571 -

Re: std.multidimarray

2015-05-24 Thread Dennis Ritchie via Digitalmars-d
Another good attempt to simplify operations with multidimensional arrays and matrices: https://github.com/k3kaimu/carbon/blob/master/source/carbon/linear.d

[Issue 14571] [REG2.064] Large static arrays seem to lock up DMD

2015-05-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14571 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED

Joseph Wakeling to speak at Dconf

2015-05-24 Thread Walter Bright via Digitalmars-d-announce
http://dconf.org/2015/talks/wakeling.html Joseph has graciously agreed to fill in for Don who is unable to attend. We'll miss Don, but are looking forward to hearing Joseph!

Re: Python's features, which requires D

2015-05-24 Thread Dennis Ritchie via Digitalmars-d-learn
On Sunday, 24 May 2015 at 15:53:24 UTC, Idan Arye wrote: But according to the Blub Paradox, your(Or mine. Or Paul Graham's) opinion on whether or not a stronger language than Lisp has appeared can not be trusted! Based on an article Graham about Blub Paradox, I can conclude that Blub Paradox

Re: Uphill

2015-05-24 Thread Paulo Pinto via Digitalmars-d
On Sunday, 24 May 2015 at 17:22:26 UTC, bachmeier wrote: On Sunday, 24 May 2015 at 11:59:00 UTC, Paulo Pinto wrote: On Sunday, 24 May 2015 at 09:43:38 UTC, bachmeier wrote: On Sunday, 24 May 2015 at 07:21:19 UTC, Joakim wrote: Rust's syntax dooms it to the same niche as Haskell. They'd have

Re: Uphill

2015-05-24 Thread bachmeier via Digitalmars-d
On Sunday, 24 May 2015 at 11:59:00 UTC, Paulo Pinto wrote: On Sunday, 24 May 2015 at 09:43:38 UTC, bachmeier wrote: On Sunday, 24 May 2015 at 07:21:19 UTC, Joakim wrote: Rust's syntax dooms it to the same niche as Haskell. They'd have been better off to go with XML. I think the developers

Re: Evaluation order of index expressions

2015-05-24 Thread Jonathan M Davis via Digitalmars-d
On Sunday, 24 May 2015 at 19:30:54 UTC, kinke wrote: code import core.stdc.stdio; static int[] _array = [ 0, 1, 2, 3 ]; int[] array() @property { printf(array()\n); return _array; } int start() @property { printf(start()\n); return 0; } int end() @property { printf(end()\n); return 1;

Re: Evaluation order of index expressions

2015-05-24 Thread kinke via Digitalmars-d
On Sunday, 24 May 2015 at 19:48:05 UTC, Jonathan M Davis wrote: The original code is clearly wrong. And forcing the order of evaluation so that it's one way or the other just changes under which cases you end up with bugs. Mutating in an expression while using it multiple times in that

Re: ctfe and static arrays

2015-05-24 Thread anonymous via Digitalmars-d-learn
On Sunday, 24 May 2015 at 20:53:03 UTC, Jay Norwood wrote: On Sunday, 24 May 2015 at 18:14:19 UTC, anonymous wrote: [...] 1) static int[5] x; -- x is a static variable with a static array type 2) static int[] x; -- static variable, dynamic array 3) int[5] x; -- non-static variable, static

Re: Weird result of getsockopt

2015-05-24 Thread Daniel Kozak via Digitalmars-d-learn
On Sunday, 24 May 2015 at 16:51:44 UTC, CodeSun wrote: Hello guys, Today, I found a weird problem when I was learning to enable SO_KEEPALIVE for a specific socket. I use setsockopt to enable keepalive firstly, and then use getsockopt to show if it is enabled correctly. My code snippet is

Re: Evaluation order of index expressions

2015-05-24 Thread Iain Buclaw via Digitalmars-d
On 24 May 2015 23:30, Jonathan M Davis via Digitalmars-d digitalmars-d@puremagic.com wrote: On Sunday, 24 May 2015 at 21:18:54 UTC, Timon Gehr wrote: The gcc backend obviously supports ordered operations, because some operations are ordered today. Iain has talked in the past about how

Re: Evaluation order of index expressions

2015-05-24 Thread Andrei Alexandrescu via Digitalmars-d
On 5/24/15 1:29 PM, Timon Gehr wrote: BTW, the documentation contradicts itself on evaluation order: http://dlang.org/expression.html This comes up once in a while. We should stick with left to right through and through. It's a simple matter of getting somebody on the compiler team to find

Re: Evaluation order of index expressions

2015-05-24 Thread Timon Gehr via Digitalmars-d
On 05/25/2015 12:15 AM, Andrei Alexandrescu wrote: On 5/24/15 1:29 PM, Timon Gehr wrote: BTW, the documentation contradicts itself on evaluation order: http://dlang.org/expression.html This comes up once in a while. We should stick with left to right through and through. It's a simple matter

Re: Evaluation order of index expressions

2015-05-24 Thread Timon Gehr via Digitalmars-d
On 05/25/2015 01:49 AM, Andrei Alexandrescu wrote: I think LTR is the most sensible in all cases. -- Andrei It is also what Java and C# do.

Re: Uphill

2015-05-24 Thread Laeeth Isharc via Digitalmars-d
Self-criticism is necessary for improvement. Yes, and what matters is after the storm has passed what you have done with that energy. People with high standards and no immediate ability to change things often complain a lot ;) To this newcomer, at least, the progress is impressive.

Re: Evaluation order of index expressions

2015-05-24 Thread Timon Gehr via Digitalmars-d
On 05/24/2015 10:35 PM, Jonathan M Davis wrote: On Sunday, 24 May 2015 at 20:30:00 UTC, Timon Gehr wrote: On 05/24/2015 09:48 PM, Jonathan M Davis wrote: On Sunday, 24 May 2015 at 19:30:54 UTC, kinke wrote: code import core.stdc.stdio; static int[] _array = [ 0, 1, 2, 3 ]; int[] array()

Re: Weird result of getsockopt

2015-05-24 Thread Daniel Kozak via Digitalmars-d-learn
On Sunday, 24 May 2015 at 21:13:02 UTC, Daniel Kozak wrote: On Sunday, 24 May 2015 at 21:11:34 UTC, Daniel Kozak wrote: On Sunday, 24 May 2015 at 16:51:44 UTC, CodeSun wrote: Hello guys, Today, I found a weird problem when I was learning to enable SO_KEEPALIVE for a specific socket. I use

Re: Uphill

2015-05-24 Thread weaselcat via Digitalmars-d
On Sunday, 24 May 2015 at 20:36:47 UTC, Laeeth Isharc wrote: Weaselcat: FWIW I'm not picking on Rust, I used it for a rather long time(while in beta, obviously) before I switched to D full time for my academic work and I don't regret my decision. I thought Rust would get more improvements

Re: Evaluation order of index expressions

2015-05-24 Thread Iain Buclaw via Digitalmars-d
On 25 May 2015 00:20, Andrei Alexandrescu via Digitalmars-d digitalmars-d@puremagic.com wrote: On 5/24/15 1:29 PM, Timon Gehr wrote: BTW, the documentation contradicts itself on evaluation order: http://dlang.org/expression.html This comes up once in a while. We should stick with left to

[Issue 14619] foreach implicitly slices ranges

2015-05-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14619 Jonathan M Davis issues.dl...@jmdavisprog.com changed: What|Removed |Added CC|

Re: Evaluation order of index expressions

2015-05-24 Thread Timon Gehr via Digitalmars-d
On 05/25/2015 12:36 AM, Iain Buclaw via Digitalmars-d wrote: This comes up once in a while. We should stick with left to right through and through. It's a simple matter of getting somebody on the compiler team to find the time for it. -- Andrei I find it is not as clear cut as that. In

Re: shared libs for OSX

2015-05-24 Thread bitwise via Digitalmars-d
I've read through these now, which I missed the first time around, so sorry for making you guys repeat yourselves ;) Runtime issue on Mac OS X http://comments.gmane.org/gmane.comp.lang.d.runtime/1214 ideas for runtime loading of shared libraries.

Re: Evaluation order of index expressions

2015-05-24 Thread Timon Gehr via Digitalmars-d
On 05/24/2015 09:48 PM, Jonathan M Davis wrote: On Sunday, 24 May 2015 at 19:30:54 UTC, kinke wrote: code import core.stdc.stdio; static int[] _array = [ 0, 1, 2, 3 ]; int[] array() @property { printf(array()\n); return _array; } int start() @property { printf(start()\n); return 0; } int

Re: Request for Features/Ideas: A std.archive package

2015-05-24 Thread Liam McSherry via Digitalmars-d
A first draft of the interfaces is available here: https://github.com/McSherry/phobos/blob/std.archive/std/archive/interfaces.d Please feel free to tear to pieces, make suggestions, etc.

Re: Idiomatic way to call base method in generic code

2015-05-24 Thread ZombineDev via Digitalmars-d-learn
On Sunday, 24 May 2015 at 23:32:52 UTC, ZombineDev wrote: ... Small correction for clarity: void main() { Derived d = new Derived(); d.x = 13; d.y = 15; // 1) writeln(callMethod!(Derived, Derived.toString)(d)); - Should print 15 // 2) writeln(callBaseMethod!(Derived,

Parallelism

2015-05-24 Thread Robbin via Digitalmars-d
I am writing a daemon that parses an ini file and goes about its business. In C++ I create a thread that does an inotify on the ini file and when it changes, it locks the associative array that contains the parsed ini file, reparses it and then does an unlock and goes back to waiting for the

Re: Evaluation order of index expressions

2015-05-24 Thread Jonathan M Davis via Digitalmars-d
On Sunday, 24 May 2015 at 20:30:00 UTC, Timon Gehr wrote: On 05/24/2015 09:48 PM, Jonathan M Davis wrote: On Sunday, 24 May 2015 at 19:30:54 UTC, kinke wrote: code import core.stdc.stdio; static int[] _array = [ 0, 1, 2, 3 ]; int[] array() @property { printf(array()\n); return _array; }

Re: Uphill

2015-05-24 Thread Laeeth Isharc via Digitalmars-d
Weaselcat: FWIW I'm not picking on Rust, I used it for a rather long time(while in beta, obviously) before I switched to D full time for my academic work and I don't regret my decision. I thought Rust would get more improvements than it did. I feel like they made so many poor decisions as

Re: ctfe and static arrays

2015-05-24 Thread Jay Norwood via Digitalmars-d-learn
On Sunday, 24 May 2015 at 18:14:19 UTC, anonymous wrote: Static array has a special meaning. It does not mean static variable with an array type. Static arrays are those of the form Type[size]. That is, the size is known statically. Examples: 1) static int[5] x; -- x is a static variable

Re: shared libs for OSX

2015-05-24 Thread bitwise via Digitalmars-d
On Sun, 24 May 2015 15:40:04 -0400, bitwise bitwise@gmail.com wrote: [snip] So at this point, it seems like these two fixes work as expected, but now, I'm having some new and very strange problems. I have a simple shared library and program I've been using to test this: [main.d]

Re: Uphill

2015-05-24 Thread bachmeier via Digitalmars-d
On Sunday, 24 May 2015 at 20:36:47 UTC, Laeeth Isharc wrote: Without wishing to dwell on the negatives of alternatives, might I ask what made you decide to settle on D? Do you have collaborators who write code and, if so, how did the discussions with them go about this? For your use case,

Re: Evaluation order of index expressions

2015-05-24 Thread Timon Gehr via Digitalmars-d
On 05/24/2015 11:26 PM, Jonathan M Davis wrote: On Sunday, 24 May 2015 at 21:18:54 UTC, Timon Gehr wrote: The gcc backend obviously supports ordered operations, because some operations are ordered today. Iain has talked in the past about how they're forced to work around the backend to force

Re: Parallelism

2015-05-24 Thread Daniel Murphy via Digitalmars-d
Robbin wrote in message news:yykhtfrfflbxdkuka...@forum.dlang.org... Hi Robbin, Problem 1 is defining the thread variable as a member of my ini class. Since I have to use the auto t = thread(parser), I can't figure out what type to make t in the class. auto is no good without a rhs to give

Idiomatic way to call base method in generic code

2015-05-24 Thread ZombineDev via Digitalmars-d-learn
import std.stdio, std.conv, std.traits; class Base { int x; override string toString() const { return x.to!string; } } class Derived : Base { int y; override string toString() const { return y.to!string; } } void callMethod(T, alias Method)(const

Re: std.multidimarray

2015-05-24 Thread Laeeth Isharc via Digitalmars-d
On Sunday, 24 May 2015 at 17:46:40 UTC, Dennis Ritchie wrote: Another good attempt to simplify operations with multidimensional arrays and matrices: https://github.com/k3kaimu/carbon/blob/master/source/carbon/linear.d You might take a look at Vlad Levenfeld's work too, although I think he

Re: Weird result of getsockopt

2015-05-24 Thread Daniel Kozak via Digitalmars-d-learn
On Sunday, 24 May 2015 at 21:11:34 UTC, Daniel Kozak wrote: On Sunday, 24 May 2015 at 16:51:44 UTC, CodeSun wrote: Hello guys, Today, I found a weird problem when I was learning to enable SO_KEEPALIVE for a specific socket. I use setsockopt to enable keepalive firstly, and then use getsockopt

Re: Evaluation order of index expressions

2015-05-24 Thread Jonathan M Davis via Digitalmars-d
On Sunday, 24 May 2015 at 21:18:54 UTC, Timon Gehr wrote: The gcc backend obviously supports ordered operations, because some operations are ordered today. Iain has talked in the past about how they're forced to work around the backend to force the order of operations for those cases, and

[Issue 14619] New: foreach implicitly slices ranges

2015-05-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14619 Issue ID: 14619 Summary: foreach implicitly slices ranges Product: D Version: D2 Hardware: All OS: All Status: NEW Keywords: wrong-code Severity:

Re: std.multidimarray

2015-05-24 Thread Dennis Ritchie via Digitalmars-d
On Sunday, 24 May 2015 at 20:45:56 UTC, Laeeth Isharc wrote: You might take a look at Vlad Levenfeld's work too, although I think he would say that it is still at an early stage (if I understand correctly - looks very interesting to me, although I have not yet properly had time to explore it

Re: Evaluation order of index expressions

2015-05-24 Thread Andrei Alexandrescu via Digitalmars-d
On 5/24/15 3:36 PM, Iain Buclaw via Digitalmars-d wrote: On 25 May 2015 00:20, Andrei Alexandrescu via Digitalmars-d digitalmars-d@puremagic.com mailto:digitalmars-d@puremagic.com wrote: On 5/24/15 1:29 PM, Timon Gehr wrote: BTW, the documentation contradicts itself on evaluation order:

Re: Uphill

2015-05-24 Thread Iain Buclaw via Digitalmars-d
On 24 May 2015 23:45, weaselcat via Digitalmars-d digitalmars-d@puremagic.com wrote: On Sunday, 24 May 2015 at 20:36:47 UTC, Laeeth Isharc wrote: Weaselcat: FWIW I'm not picking on Rust, I used it for a rather long time(while in beta, obviously) before I switched to D full time for my

[Issue 7454] Add file and line numbers to Linux stack traces using addr2line

2015-05-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=7454 Maurice van der Pot griffo...@kfk4ever.com changed: What|Removed |Added Keywords||bounty ---

This Week in D: ... not much, actually

2015-05-24 Thread Adam D. Ruppe via Digitalmars-d-announce
I suspect many of us have DConf on the mind and aren't quite as active on the forums, my impression was this was a pretty quiet week and none of the merged PRs jumped out at me either. http://arsdnet.net/this-week-in-d/may-24.html I still have to do a dconf talk outline myself! Hopefully I'll

Re: Checking template parameter types of class

2015-05-24 Thread Jonathan M Davis via Digitalmars-d-learn
On Monday, May 25, 2015 03:42:22 tcak via Digitalmars-d-learn wrote: On Monday, 25 May 2015 at 03:35:22 UTC, Jonathan M Davis wrote: On Monday, May 25, 2015 03:19:29 tcak via Digitalmars-d-learn wrote: Is there any syntax for something like that: class Resource(T) if( is(T:

Re: Checking template parameter types of class

2015-05-24 Thread Jonathan M Davis via Digitalmars-d-learn
On Monday, May 25, 2015 03:19:29 tcak via Digitalmars-d-learn wrote: Is there any syntax for something like that: class Resource(T) if( is(T: FileResource) ){ } I tried it as above, but it is not accepted. Maybe I am following a wrong syntax. I tried class Resource(T: FileResource){ }

Re: Request for Features/Ideas: A std.archive package

2015-05-24 Thread Rikki Cattermole via Digitalmars-d
On 25/05/2015 9:32 a.m., Liam McSherry wrote: A first draft of the interfaces is available here: https://github.com/McSherry/phobos/blob/std.archive/std/archive/interfaces.d Please feel free to tear to pieces, make suggestions, etc. I'm impressed an interface has been started! Anyway, take

Re: Checking template parameter types of class

2015-05-24 Thread tcak via Digitalmars-d-learn
On Monday, 25 May 2015 at 03:35:22 UTC, Jonathan M Davis wrote: On Monday, May 25, 2015 03:19:29 tcak via Digitalmars-d-learn wrote: Is there any syntax for something like that: class Resource(T) if( is(T: FileResource) ){ } I tried it as above, but it is not accepted. Maybe I am following

[Issue 14617] PTHREAD_MUTEX_INITIALIZER does not work on OSX

2015-05-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14617 --- Comment #7 from Steven Schveighoffer schvei...@yahoo.com --- Yep, still fails in the autotester. What do we want to do? a) just fix pthread.d so PTHREAD_MUTEX_INITIALIZER is proper, but pthread_mutex_t.init is not b) fix the Makefile so it

Re: Checking template parameter types of class

2015-05-24 Thread tcak via Digitalmars-d-learn
On Monday, 25 May 2015 at 04:07:06 UTC, Jonathan M Davis wrote: On Monday, May 25, 2015 03:42:22 tcak via Digitalmars-d-learn wrote: Well, if I do not check the line number of error, this happens. It was giving error on the line of creating a new instance. Line 243: auto fileResourceList =

Re: Weird result of getsockopt

2015-05-24 Thread CodeSun via Digitalmars-d-learn
On Sunday, 24 May 2015 at 21:11:34 UTC, Daniel Kozak wrote: On Sunday, 24 May 2015 at 16:51:44 UTC, CodeSun wrote: Hello guys, Today, I found a weird problem when I was learning to enable SO_KEEPALIVE for a specific socket. I use setsockopt to enable keepalive firstly, and then use getsockopt

Re: How to append range to array?

2015-05-24 Thread Steven Schveighoffer via Digitalmars-d-learn
On 5/23/15 4:27 AM, Jonathan M Davis via Digitalmars-d-learn wrote: On Saturday, May 23, 2015 07:03:33 Vladimir Panteleev via Digitalmars-d-learn wrote: int[] arr = [1, 2, 3]; auto r = iota(4, 10); // ??? assert(equal(arr, iota(1, 10))); Hopefully in one GC allocation (assuming we know the

Re: How to append range to array?

2015-05-24 Thread Jonathan M Davis via Digitalmars-d-learn
On Sunday, May 24, 2015 22:13:25 Steven Schveighoffer via Digitalmars-d-learn wrote: On 5/23/15 4:27 AM, Jonathan M Davis via Digitalmars-d-learn wrote: On Saturday, May 23, 2015 07:03:33 Vladimir Panteleev via Digitalmars-d-learn wrote: int[] arr = [1, 2, 3]; auto r = iota(4, 10); //

Checking template parameter types of class

2015-05-24 Thread tcak via Digitalmars-d-learn
Is there any syntax for something like that: class Resource(T) if( is(T: FileResource) ){ } I tried it as above, but it is not accepted. Maybe I am following a wrong syntax. I tried class Resource(T: FileResource){ } But it is not accepted as well.

[Issue 14614] PDB File Not Generated

2015-05-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14614 --- Comment #2 from Michael Hewitt mich...@hewitts.us --- VS 2013 Community Edition is working fine for now. Thank you for the pointer. --

Re: Uphill

2015-05-24 Thread Joakim via Digitalmars-d
On Saturday, 23 May 2015 at 14:20:40 UTC, Russel Winder wrote: On Fri, 2015-05-22 at 16:00 +, Jonathan M Davis via Digitalmars-d wrote: On Friday, 22 May 2015 at 14:11:49 UTC, H. S. Teoh wrote: +1, finally, something other than the usual bickering on the forum. ;-) LOL. Don't worry.

Re: Uphill

2015-05-24 Thread Jonathan M Davis via Digitalmars-d
On Sunday, 24 May 2015 at 07:21:19 UTC, Joakim wrote: It's a good sign that C++ has been copying D features recently, it means they're feeling the heat. I suspect that it's not so much that they're really feeling any pressure from D so much as that when they see a cool feature that they

Re: Uphill

2015-05-24 Thread weaselcat via Digitalmars-d
On Sunday, 24 May 2015 at 08:05:37 UTC, Jonathan M Davis wrote: On Sunday, 24 May 2015 at 07:21:19 UTC, Joakim wrote: It's a good sign that C++ has been copying D features recently, it means they're feeling the heat. I suspect that it's not so much that they're really feeling any pressure