Re: Error compiling test code

2014-05-23 Thread Larry Hemsley via Digitalmars-d-learn
Sometimes I am such a dunce. That is exactly what I did. Fixed now. Somehow I read import stdio.d as import std.stdio.d must have been a late night. On Tuesday, 20 May 2014 at 03:21:52 UTC, Rikki Cattermole wrote: On 20/05/2014 3:17 p.m., Larry Hemsley wrote: I just installed dmd on Mint Linu

Re: runtime loading D shared library as a standalone (with it's own GC etc)

2014-05-23 Thread Martin Nowak via Digitalmars-d-learn
Filed as https://issues.dlang.org/show_bug.cgi?id=12792.

Re: Programming a Game in D? :D

2014-05-23 Thread Namespace via Digitalmars-d-learn
On Thursday, 22 May 2014 at 15:39:36 UTC, David wrote: Hey, I'm really new to D, and pretty new to programming overall too, But I want to make a 3d Game, (just sth. small). I really like D and want to do it in D, but in the Internet there is no shit about programming a game in D ^^ Is there an

Re: Programming a Game in D? :D

2014-05-23 Thread Benjamin Thaut via Digitalmars-d-learn
Am 22.05.2014 17:39, schrieb David: Hey, I'm really new to D, and pretty new to programming overall too, But I want to make a 3d Game, (just sth. small). I really like D and want to do it in D, but in the Internet there is no shit about programming a game in D ^^ Is there any engine written in D?

Re: Programming a Game in D? :D

2014-05-23 Thread evilrat via Digitalmars-d-learn
On Friday, 23 May 2014 at 14:43:30 UTC, David wrote: On Friday, 23 May 2014 at 14:11:26 UTC, David wrote: Ok so I installed DDT for eclipse now but have a problem :D First the imports are changed, std.studio is now std.stdio (or its something completly else) And if I try to run the file now it

Re: Bounds check

2014-05-23 Thread bearophile via Digitalmars-d-learn
Chris: The following: import std.stdio; void main() { int[5] arg; arg[10] = 3; // Compiler says (of course): Error: array index 10 is out of bounds arg[0 .. 5] } import std.stdio; void main() { int[5] arg; foreach (i; 0..10) { arg[i] = i; } } Compiler says nothi

Re: Using custom attribute for a general parser. Is possible in D ?

2014-05-23 Thread bioinfornatics via Digitalmars-d-learn
On Friday, 23 May 2014 at 15:17:52 UTC, bioinfornatics wrote: I bask originally this qustion in this thread : http://forum.dlang.org/post/rsnswykpjfzenpliv...@forum.dlang.org but another thread is better as that is not exactly same topic. I would like to use custom annotate/attribute on member

Re: Bounds check

2014-05-23 Thread John Colvin via Digitalmars-d-learn
On Friday, 23 May 2014 at 15:14:47 UTC, Chris wrote: The following: import std.stdio; void main() { int[5] arg; arg[10] = 3; // Compiler says (of course): Error: array index 10 is out of bounds arg[0 .. 5] } import std.stdio; void main() { int[5] arg; foreach (i; 0..10)

Re: Bounds check

2014-05-23 Thread Chris via Digitalmars-d-learn
On Friday, 23 May 2014 at 15:25:37 UTC, Meta wrote: On Friday, 23 May 2014 at 15:14:47 UTC, Chris wrote: The following: import std.stdio; void main() { int[5] arg; arg[10] = 3; // Compiler says (of course): Error: array index 10 is out of bounds arg[0 .. 5] } import std.stdio

Re: Bounds check

2014-05-23 Thread Meta via Digitalmars-d-learn
On Friday, 23 May 2014 at 15:14:47 UTC, Chris wrote: The following: import std.stdio; void main() { int[5] arg; arg[10] = 3; // Compiler says (of course): Error: array index 10 is out of bounds arg[0 .. 5] } import std.stdio; void main() { int[5] arg; foreach (i; 0..10)

Using custom attribute for a general parser. Is possible in D ?

2014-05-23 Thread bioinfornatics via Digitalmars-d-learn
I bask originally this qustion in this thread : http://forum.dlang.org/post/rsnswykpjfzenpliv...@forum.dlang.org but another thread is better as that is not exactly same topic. I would like to use custom annotate/attribute on members as: struct A { @Parser( start = "(

Bounds check

2014-05-23 Thread Chris via Digitalmars-d-learn
The following: import std.stdio; void main() { int[5] arg; arg[10] = 3; // Compiler says (of course): Error: array index 10 is out of bounds arg[0 .. 5] } import std.stdio; void main() { int[5] arg; foreach (i; 0..10) { arg[i] = i; } } Compiler says nothing, but w

Re: Issue with contracts and assertions

2014-05-23 Thread Andre via Digitalmars-d-learn
Am 23.05.2014 16:44, schrieb Rene Zwanenburg: On Friday, 23 May 2014 at 14:38:27 UTC, Andre wrote: Am 23.05.2014 16:34, schrieb Rene Zwanenburg: In case there is a reason that the assertion is not run, if feels very dangerous for me that all assertions can be disabled by mistake just by adding a

Re: Issue with contracts and assertions

2014-05-23 Thread Rene Zwanenburg via Digitalmars-d-learn
On Friday, 23 May 2014 at 14:38:27 UTC, Andre wrote: Am 23.05.2014 16:34, schrieb Rene Zwanenburg: In case there is a reason that the assertion is not run, if feels very dangerous for me that all assertions can be disabled by mistake just by adding an interface to a class. At least a compiler me

Re: Programming a Game in D? :D

2014-05-23 Thread David via Digitalmars-d-learn
On Friday, 23 May 2014 at 14:11:26 UTC, David wrote: Ok so I installed DDT for eclipse now but have a problem :D First the imports are changed, std.studio is now std.stdio (or its something completly else) And if I try to run the file now it says that the exe file of my file doesn't exsist wich

Re: Issue with contracts and assertions

2014-05-23 Thread Andre via Digitalmars-d-learn
Am 23.05.2014 16:34, schrieb Rene Zwanenburg: On Friday, 23 May 2014 at 13:45:07 UTC, Andre wrote: Hi, for the attached code I noticed some strange behaviors. I compile the programm with: dmd main -unittest The expected assertion of the method c pre condition is not raised. It is only raised if

Re: Issue with contracts and assertions

2014-05-23 Thread Rene Zwanenburg via Digitalmars-d-learn
On Friday, 23 May 2014 at 13:45:07 UTC, Andre wrote: Hi, for the attached code I noticed some strange behaviors. I compile the programm with: dmd main -unittest The expected assertion of the method c pre condition is not raised. It is only raised if class A not implements interface I. On the ot

Re: Programming a Game in D? :D

2014-05-23 Thread David via Digitalmars-d-learn
Ok so I installed DDT for eclipse now but have a problem :D First the imports are changed, std.studio is now std.stdio (or its something completly else) And if I try to run the file now it says that the exe file of my file doesn't exsist wich I actully thought I creat by clicking on run? In Ja

Re: How to get struct's members ?

2014-05-23 Thread bioinfornatics via Digitalmars-d-learn
On Friday, 23 May 2014 at 01:17:18 UTC, bioinfornatics wrote: Dear, I would like to get struct's members and zip them with an action as struct A { int a; int b; } std.range.zip( __traits( allmembers, A ), [(x) => x == 0, (y) => y > 3] ); like this i could apply an action to each field.

Issue with contracts and assertions

2014-05-23 Thread Andre via Digitalmars-d-learn
Hi, for the attached code I noticed some strange behaviors. I compile the programm with: dmd main -unittest The expected assertion of the method c pre condition is not raised. It is only raised if class A not implements interface I. On the otherside the commented assertion in the invariant is wo

Re: How to get struct's members ?

2014-05-23 Thread monarch_dodra via Digitalmars-d-learn
On Friday, 23 May 2014 at 08:20:05 UTC, Philippe Sigaud via Digitalmars-d-learn wrote: On Fri, May 23, 2014 at 8:44 AM, monarch_dodra via Digitalmars-d-learn wrote: On Friday, 23 May 2014 at 01:17:18 UTC, bioinfornatics wrote: I would like to get struct's members and zip them with an actio

Re: How to get struct's members ?

2014-05-23 Thread bioinfornatics via Digitalmars-d-learn
On Friday, 23 May 2014 at 08:20:05 UTC, Philippe Sigaud via Digitalmars-d-learn wrote: On Fri, May 23, 2014 at 8:44 AM, monarch_dodra via Digitalmars-d-learn wrote: On Friday, 23 May 2014 at 01:17:18 UTC, bioinfornatics wrote: I would like to get struct's members and zip them with an actio

Re: DerelictAL with alut?

2014-05-23 Thread Rene Zwanenburg via Digitalmars-d-learn
On Friday, 23 May 2014 at 09:30:17 UTC, Mike Parker wrote: On 5/23/2014 6:11 PM, Rene Zwanenburg wrote: http://kcat.strangesoft.net/alure-docs/files/alure-cpp.html Hrm. I looked all over the ALURE homepage for a link to online docs. Thanks for posting it. Yeah it's a bit hidden. You can fi

Re: DerelictAL with alut?

2014-05-23 Thread Mike Parker via Digitalmars-d-learn
On 5/23/2014 6:11 PM, Rene Zwanenburg wrote: http://kcat.strangesoft.net/alure-docs/files/alure-cpp.html Hrm. I looked all over the ALURE homepage for a link to online docs. Thanks for posting it.

Re: DerelictAL with alut?

2014-05-23 Thread Mike Parker via Digitalmars-d-learn
On 5/23/2014 6:01 PM, Jack wrote: On Friday, 23 May 2014 at 08:36:29 UTC, Rene Zwanenburg wrote: On Friday, 23 May 2014 at 08:17:28 UTC, Jack wrote: Erm excuse me. Does the current DerelictAL come with alut bindings? If not, does it come with libaudio then? I saw this very old page on the inte

Re: DerelictAL with alut?

2014-05-23 Thread Jack via Digitalmars-d-learn
On Friday, 23 May 2014 at 09:11:45 UTC, Rene Zwanenburg wrote: On Friday, 23 May 2014 at 09:01:24 UTC, Jack wrote: On Friday, 23 May 2014 at 08:36:29 UTC, Rene Zwanenburg wrote: On Friday, 23 May 2014 at 08:17:28 UTC, Jack wrote: Erm excuse me. Does the current DerelictAL come with alut bindin

Re: DerelictAL with alut?

2014-05-23 Thread Rene Zwanenburg via Digitalmars-d-learn
On Friday, 23 May 2014 at 09:01:24 UTC, Jack wrote: On Friday, 23 May 2014 at 08:36:29 UTC, Rene Zwanenburg wrote: On Friday, 23 May 2014 at 08:17:28 UTC, Jack wrote: Erm excuse me. Does the current DerelictAL come with alut bindings? If not, does it come with libaudio then? I saw this very ol

Re: DerelictAL with alut?

2014-05-23 Thread Jack via Digitalmars-d-learn
On Friday, 23 May 2014 at 08:36:29 UTC, Rene Zwanenburg wrote: On Friday, 23 May 2014 at 08:17:28 UTC, Jack wrote: Erm excuse me. Does the current DerelictAL come with alut bindings? If not, does it come with libaudio then? I saw this very old page on the internet about DerelictAL having some

Re: DerelictAL with alut?

2014-05-23 Thread Rene Zwanenburg via Digitalmars-d-learn
On Friday, 23 May 2014 at 08:17:28 UTC, Jack wrote: Erm excuse me. Does the current DerelictAL come with alut bindings? If not, does it come with libaudio then? I saw this very old page on the internet about DerelictAL having some alut bindings: http://svn.dsource.org/projects/derelict/trunk/doc

DerelictAL with alut?

2014-05-23 Thread Jack via Digitalmars-d-learn
Erm excuse me. Does the current DerelictAL come with alut bindings? If not, does it come with libaudio then? I saw this very old page on the internet about DerelictAL having some alut bindings: http://svn.dsource.org/projects/derelict/trunk/docs/al.html But I can't find any alut functions.

Re: How to get struct's members ?

2014-05-23 Thread Philippe Sigaud via Digitalmars-d-learn
On Fri, May 23, 2014 at 8:44 AM, monarch_dodra via Digitalmars-d-learn wrote: > On Friday, 23 May 2014 at 01:17:18 UTC, bioinfornatics wrote: >> I would like to get struct's members and zip them with an action > tupleof will do what you need (mostly). However, I don't think there will be > any