Re: Programming a Game in D? :D

2014-05-24 Thread ponce 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

Re: Programming a Game in D? :D

2014-05-24 Thread David via Digitalmars-d-learn
On Friday, 23 May 2014 at 17:47:56 UTC, evilrat wrote: why not just use Xamarin Studio with Mono-D? But only the trial of Xamarin Studio is for free, and I used eclipse for Java before and really like it :P

Re: Programming a Game in D? :D

2014-05-24 Thread evilrat via Digitalmars-d-learn
On Saturday, 24 May 2014 at 09:35:01 UTC, David wrote: On Friday, 23 May 2014 at 17:47:56 UTC, evilrat wrote: why not just use Xamarin Studio with Mono-D? But only the trial of Xamarin Studio is for free, and I used eclipse for Java before and really like it :P actually not. you don't

dmd with shared lib

2014-05-24 Thread bioinfornatics via Digitalmars-d-learn
Hi, after building and installing dmd i fail to use generated executable because they are an undefined symbol. $ /opt/dmd/bin/dmd -L-lcurl testDelegate.d $ ./testDelegate ./testDelegate: symbol lookup error: /opt/dmd/lib/libphobos2.so.0.66: undefined symbol: curl_version_info $ ldd

How to debug ?

2014-05-24 Thread Derix via Digitalmars-d-learn
OK, I have the newest Eclipse+DDT on Linux. Debugging capabilies look great : https://github.com/bruno-medeiros/DDT/blob/latest/documentation/Features.md#debugging-functionality However so far I haven't been able to step throug source code. What am I missing ? Is there an option to pass to the

Re: How to debug ?

2014-05-24 Thread bioinfornatics via Digitalmars-d-learn
On Saturday, 24 May 2014 at 10:14:23 UTC, Derix wrote: OK, I have the newest Eclipse+DDT on Linux. Debugging capabilies look great : https://github.com/bruno-medeiros/DDT/blob/latest/documentation/Features.md#debugging-functionality However so far I haven't been able to step throug source

derelict glfw won't set callbacks

2014-05-24 Thread Vlad Levenfeld via Digitalmars-d-learn
Any attempt to set callbacks in GLFW returns a null and the callback doesn't work. The first enforcement fails in this example: DerelictGLFW3.load (); enforce (glfwSetErrorCallback (error_callback)); enforce (glfwInit (), glfwInit failed); window = glfwCreateWindow (screen_dims.x,

Re: derelict glfw won't set callbacks

2014-05-24 Thread Andrej Mitrovic via Digitalmars-d-learn
On 5/24/14, Vlad Levenfeld via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: Any attempt to set callbacks in GLFW returns a null and the callback doesn't work. The first enforcement fails in this example: DerelictGLFW3.load (); enforce (glfwSetErrorCallback (error_callback));

Re: derelict glfw won't set callbacks

2014-05-24 Thread Rene Zwanenburg via Digitalmars-d-learn
On Saturday, 24 May 2014 at 13:31:46 UTC, Vlad Levenfeld wrote: Any attempt to set callbacks in GLFW returns a null and the callback doesn't work. The first enforcement fails in this example: DerelictGLFW3.load (); enforce (glfwSetErrorCallback (error_callback)); enforce (glfwInit (),

Re: derelict glfw won't set callbacks

2014-05-24 Thread Vlad Levenfeld via Digitalmars-d-learn
Haha, I should have read more carefully. Must have looked at that line in the doc a dozed times and never picked up on that detail. Your example worked for me - I wasn't calling glfwPollEvents. Thanks!

Upgrade woes : Eclipse/DDT/Linux , compile takes forever and other caveats

2014-05-24 Thread Derix via Digitalmars-d-learn
I'm on Linux 64-bit. I recently upgraded Eclipse to 4.3.2 and DDT to 0.10.1 ... and at first I couldn't compile a thing anymore. After googling some more, and burning a few more neurons, I finally gathered some clues and narrowed the quest to the dub.json file. I pieced together the following :

Re: How to debug ?

2014-05-24 Thread Derix via Digitalmars-d-learn
To debug you nee to use -g flag to compiler Thanks, but how ?

Re: Programming a Game in D? :D

2014-05-24 Thread Dmitry via Digitalmars-d-learn
On Saturday, 24 May 2014 at 09:49:30 UTC, evilrat wrote: why not just use Xamarin Studio with Mono-D? But only the trial of Xamarin Studio is for free, and I used eclipse for Java before and really like it :P actually not. you don't even need to register at all. just go to

foreach over string

2014-05-24 Thread Kagamin via Digitalmars-d-learn
foreach over string apparently iterates over chars by default instead of dchars. Didn't it prefer dchars? string s=weiß; int i; foreach(c;s)i++; assert(i==5);

Re: foreach over string

2014-05-24 Thread Etienne Cimon via Digitalmars-d-learn
On 2014-05-24 12:46, Kagamin wrote: foreach over string apparently iterates over chars by default instead of dchars. Didn't it prefer dchars? string s=weiß; int i; foreach(c;s)i++; assert(i==5); A string is defined by: alias string = immutable(char)[]; It doesn't add anything to that type

Creating ranges over mutable, const, or immutable data structures.

2014-05-24 Thread w0rp via Digitalmars-d-learn
I have been writing my own hashmap which can provide forward ranges usable in @safe pure nothrow functions, because it's going to be useful for creating graph data structures with the same. I came to writing my ranges and I figured out how to do everything right for just mutable hashmaps, but

How to handle try-catch blocks, nothrow and logfiles

2014-05-24 Thread Tim via Digitalmars-d-learn
I'm working on an application where I want log all exceptions but I'm not sure what's the best way to realize that. Sure I can do the following: void myMethod() nothrow { try { // Do something } catch (Exception e) { // Write log file } } But there are some

Re: How to handle try-catch blocks, nothrow and logfiles

2014-05-24 Thread Ali Çehreli via Digitalmars-d-learn
On 05/24/2014 10:09 AM, Tim wrote: I'm working on an application where I want log all exceptions but I'm not sure what's the best way to realize that. A common solution is to log it in the exception class'es constructor. We even dump the backtrace with libunwind in our C++ application.

Re: foreach over string

2014-05-24 Thread Ali Çehreli via Digitalmars-d-learn
On 05/24/2014 09:46 AM, Kagamin wrote: foreach over string apparently iterates over chars by default instead of dchars. Didn't it prefer dchars? I don't think so. The range algorithms iterate by dchar though. string s=weiß; int i; foreach(c;s)i++; assert(i==5); Ali

Re: Creating ranges over mutable, const, or immutable data structures.

2014-05-24 Thread Ali Çehreli via Digitalmars-d-learn
On 05/24/2014 10:02 AM, w0rp wrote: I have been writing my own hashmap which can provide forward ranges usable in @safe pure nothrow functions, because it's going to be useful for creating graph data structures with the same. I came to writing my ranges and I figured out how to do everything

Re: Programming a Game in D? :D

2014-05-24 Thread evilrat via Digitalmars-d-learn
On Saturday, 24 May 2014 at 16:41:41 UTC, Dmitry wrote: On Saturday, 24 May 2014 at 09:49:30 UTC, evilrat wrote: why not just use Xamarin Studio with Mono-D? But only the trial of Xamarin Studio is for free, and I used eclipse for Java before and really like it :P actually not. you don't even

Re: foreach over string

2014-05-24 Thread John Colvin via Digitalmars-d-learn
On Saturday, 24 May 2014 at 16:46:42 UTC, Kagamin wrote: foreach over string apparently iterates over chars by default instead of dchars. Didn't it prefer dchars? string s=weiß; int i; foreach(c;s)i++; assert(i==5); Nope. if you use foreach(dchar c; s) you will get the iteration by

Network programming

2014-05-24 Thread Andre Kostur via Digitalmars-d-learn
I'm finally making my first concerted foray into D programming. Being a networking guy (and a good history in C and C++) I'm starting with some network code (and trying to use vibe.d as well). However, I'm running into some holes that I'm not sure if I'm overlooking something or just that

Re: Creating ranges over mutable, const, or immutable data structures.

2014-05-24 Thread w0rp via Digitalmars-d-learn
On Saturday, 24 May 2014 at 18:01:43 UTC, Ali Çehreli wrote: On 05/24/2014 10:02 AM, w0rp wrote: I have been writing my own hashmap which can provide forward ranges usable in @safe pure nothrow functions, because it's going to be useful for creating graph data structures with the same. I

Re: foreach over string

2014-05-24 Thread Kagamin via Digitalmars-d-learn
On Saturday, 24 May 2014 at 18:18:37 UTC, John Colvin wrote: if you use foreach(dchar c; s) you will get the iteration by code-point you are looking for. Actually I was trying to prevent decoding :) It just occurred to me it can be tricky in generic code.

Re: How to handle try-catch blocks, nothrow and logfiles

2014-05-24 Thread Tim via Digitalmars-d-learn
On Saturday, 24 May 2014 at 17:55:07 UTC, Ali Çehreli wrote: On 05/24/2014 10:09 AM, Tim wrote: I'm working on an application where I want log all exceptions but I'm not sure what's the best way to realize that. A common solution is to log it in the exception class'es constructor. We even

Re: Network programming

2014-05-24 Thread Andre Kostur via Digitalmars-d-learn
On 2014-05-24, 11:18 AM, Andre Kostur wrote: I'm finally making my first concerted foray into D programming. Being a networking guy (and a good history in C and C++) I'm starting with some network code (and trying to use vibe.d as well). However, I'm running into some holes that I'm not sure

Re: Programming a Game in D? :D

2014-05-24 Thread David via Digitalmars-d-learn
On Saturday, 24 May 2014 at 09:49:30 UTC, evilrat wrote: On Saturday, 24 May 2014 at 09:35:01 UTC, David wrote: On Friday, 23 May 2014 at 17:47:56 UTC, evilrat wrote: why not just use Xamarin Studio with Mono-D? But only the trial of Xamarin Studio is for free, and I used eclipse for Java

Re: How to handle try-catch blocks, nothrow and logfiles

2014-05-24 Thread monarch_dodra via Digitalmars-d-learn
On Saturday, 24 May 2014 at 17:09:24 UTC, Tim wrote: Imagine I've an application where I want log all thrown exceptions. Arguably, that's not something you'd want to do. In a normal application, exceptions get thrown around, and it is completely normal. In particular, the *thrower* has no

Re: How to handle try-catch blocks, nothrow and logfiles

2014-05-24 Thread Kagamin via Digitalmars-d-learn
On Saturday, 24 May 2014 at 17:09:24 UTC, Tim wrote: But doing this in all my methods You shouldn't do it in all methods, only top-level ones, because they are called from 3rd party code, which will do whatever things with the exceptions from nothing to terminating the application. Already