Re: Help with concurrency - traversing a DAG

2013-10-18 Thread tbttfox
As far as I understand you just want something working right now? Then my suggestion would be to look into std.parallelism [0]. Create a task for each node without a parent. Let the tasks create new tasks for their children. Yeah, I'm just trying to get something working right now, so I will

Re: Warnings/What should I know?

2013-10-18 Thread Jesse Phillips
On Friday, 18 October 2013 at 06:13:38 UTC, DDD wrote: I'm learning D. I'm curious about surprises I may get. I typically use C++, C# and javascript D doesn't have the library count other popular languages have. And there is a graveyard of projects/libraries which is more noticeable than more p

Re: Help with concurrency - traversing a DAG

2013-10-18 Thread qznc
On Friday, 18 October 2013 at 16:31:13 UTC, tbttfox wrote: My not currently not working implementation has the workers make a pull request from the master. As far as I understand you just want something working right now? Then my suggestion would be to look into std.parallelism [0]. Create a

Re: Warnings/What should I know?

2013-10-18 Thread Adam D. Ruppe
On Friday, 18 October 2013 at 17:09:18 UTC, H. S. Teoh wrote: I thought classes do have default ctors? yeah but you still have to new them. Class c; // c is null, unlike C++ Class c =new Class(); // cool

Re: Warnings/What should I know?

2013-10-18 Thread H. S. Teoh
On Fri, Oct 18, 2013 at 08:56:45AM +0200, monarch_dodra wrote: > On Friday, 18 October 2013 at 06:13:38 UTC, DDD wrote: > >I'm learning D. I'm curious about surprises I may get. I typically > >use C++, C# and javascript > > Off the top of my head, I think the biggest one is that D doesn't > offer

Re: Can't compile on 64 bit Windows

2013-10-18 Thread Erik van Velzen
(late I know but it may help someone) The linker is trying to link against x86 libraries instead of x64. If you followed the tutorial to the letter, you need to check if "%DEV_DIR_WINSDK%\Lib\x64" resolves correctly (paste in cmd or windows explorer).

Re: D on Windows - linker question

2013-10-18 Thread Benjamin Thaut
Am 18.10.2013 18:40, schrieb Erik van Velzen: Hello, I have set up my enviroment according to these instructions: http://wiki.dlang.org/Installing_DMD_on_64-bit_Windows_7_%28COFF-compatible%29 When I compile a small tutorial program I get this error: error LNK2019: unresolved external symbol Me

D on Windows - linker question

2013-10-18 Thread Erik van Velzen
Hello, I have set up my enviroment according to these instructions: http://wiki.dlang.org/Installing_DMD_on_64-bit_Windows_7_%28COFF-compatible%29 When I compile a small tutorial program I get this error: error LNK2019: unresolved external symbol MessageBoxW referenced in function WinMain I ha

Re: Help with concurrency - traversing a DAG

2013-10-18 Thread tbttfox
On Friday, 18 October 2013 at 11:40:24 UTC, qznc wrote: On Friday, 18 October 2013 at 07:20:07 UTC, tbttfox wrote: So I've got a project in mind, and at the core of that project is a DAG with lots of nodes. This seems to be a great candidate for concurrent evaluation. The problem is that a nod

Re: Learning D - first steps and best practices

2013-10-18 Thread Gary Willoughby
On Sunday, 29 September 2013 at 07:13:26 UTC, Stefan Larsson wrote: Hello, I have started my journey to learn D after using C/C++ and Python for many years. I am studying the book "The D-Programming Language" by Andrei Alexandrescu and I have tried to search the D-newsgroups for proper advice

Re: Error: cannot call public/export function someFunction from invariant

2013-10-18 Thread Andrej Mitrovic
On 10/18/13, Jonathan M Davis wrote: > If you want to call a member function from an invariant, it > should be static, or it should be a free function. I can also be private, the diagnostic is pretty clear about that. :)

Re: matrix business in D

2013-10-18 Thread Geancarlo Rocha
Why not stick with scipy+numpy in python? Writing numerical code is painfully time consuming. It's also unlikely that your code will be more performant than those libraries', it takes a lot of expertise. On Thursday, 17 October 2013 at 20:31:38 UTC, Yura wrote: Dear D programmers, I am very

Re: matrix business in D

2013-10-18 Thread bearophile
Daniel Davidson: Please follow through with finding a D solution. But if you have not seen it yet, have a look at http://julialang.org/ as well. It may also fit your needs with more focus on mathematical programming. Julia is a very new language, quite newer than D. I don't think it's a good

Re: matrix business in D

2013-10-18 Thread Daniel Davidson
On Thursday, 17 October 2013 at 20:31:38 UTC, Yura wrote: Dear D programmers, I am very new to D programming language. I just started to learn it as an alternative to python since the latter sometimes is too slow. My question is whether there some simple ways to solve linear algebra problems

Re: Help with concurrency - traversing a DAG

2013-10-18 Thread qznc
On Friday, 18 October 2013 at 07:20:07 UTC, tbttfox wrote: So I've got a project in mind, and at the core of that project is a DAG with lots of nodes. This seems to be a great candidate for concurrent evaluation. The problem is that a node can only be evaluated after all of its parents have.

Re: Error: cannot call public/export function someFunction from invariant

2013-10-18 Thread simendsjo
On Friday, 18 October 2013 at 09:08:53 UTC, Jonathan M Davis wrote: On Friday, October 18, 2013 11:04:25 bearophile wrote: simendsjo: > See topic. Why is this not allowed? The function in question > is > not virtual. > > struct S { > > void someFunction() const {} > const invariant(

Re: Error: cannot call public/export function someFunction from invariant

2013-10-18 Thread Jonathan M Davis
On Friday, October 18, 2013 11:04:25 bearophile wrote: > simendsjo: > > See topic. Why is this not allowed? The function in question is > > not virtual. > > > > struct S { > > > > void someFunction() const {} > > const invariant() { someFunction(); } > > > > } > > void main() { > > > >

Re: Error: cannot call public/export function someFunction from invariant

2013-10-18 Thread bearophile
simendsjo: See topic. Why is this not allowed? The function in question is not virtual. struct S { void someFunction() const {} const invariant() { someFunction(); } } void main() { S s; } It being not virtual is not important. In what cases is invariant() called, simendsjo? I s

Re: Warnings/What should I know?

2013-10-18 Thread Maxim Fomin
On Friday, 18 October 2013 at 06:56:49 UTC, monarch_dodra wrote: On Friday, 18 October 2013 at 06:13:38 UTC, DDD wrote: I'm learning D. I'm curious about surprises I may get. I typically use C++, C# and javascript Off the top of my head, I think the biggest one is that D doesn't offer "defaul

Re: Warnings/What should I know?

2013-10-18 Thread simendsjo
On Friday, 18 October 2013 at 06:13:38 UTC, DDD wrote: I'm learning D. I'm curious about surprises I may get. I typically use C++, C# and javascript Some stuff from the top of my head. Remember that you're asking for gotchas and surprises rather than the nice features of D :) * D has built-i

Help with concurrency - traversing a DAG

2013-10-18 Thread tbttfox
So I've got a project in mind, and at the core of that project is a DAG with lots of nodes. This seems to be a great candidate for concurrent evaluation. The problem is that a node can only be evaluated after all of its parents have. I'm really new to D and static typing in general (coming fro

Re: Warnings/What should I know?

2013-10-18 Thread Jonathan M Davis
On Friday, October 18, 2013 09:02:49 simendsjo wrote: > On Friday, 18 October 2013 at 06:56:49 UTC, monarch_dodra wrote: > (...) > > > struct S > > { > > > > this(int i = 5) > > {} > > > > } > > S s = S(); //Does *not* call the constructor with the value 5. > > I didn't know that. In th

Error: cannot call public/export function someFunction from invariant

2013-10-18 Thread simendsjo
See topic. Why is this not allowed? The function in question is not virtual. struct S { void someFunction() const {} const invariant() { someFunction(); } } void main() { S s; }

Re: Warnings/What should I know?

2013-10-18 Thread simendsjo
On Friday, 18 October 2013 at 06:56:49 UTC, monarch_dodra wrote: (...) struct S { this(int i = 5) {} } S s = S(); //Does *not* call the constructor with the value 5. I didn't know that. In that case, I think struct ctors with only optional parameters should be illegal - how is it possi

Re: Warnings/What should I know?

2013-10-18 Thread monarch_dodra
On Friday, 18 October 2013 at 06:13:38 UTC, DDD wrote: I'm learning D. I'm curious about surprises I may get. I typically use C++, C# and javascript Off the top of my head, I think the biggest one is that D doesn't offer "default constructors". Instead, it only has a default value initializat