Re: Server is not active?

2013-09-26 Thread wagtail
On Friday, 27 September 2013 at 01:37:38 UTC, Adam D. Ruppe wrote: hmm, I don't know what the problem is, the socket stuff there looks correct... will have to wait for someone else to have ideas. Thank you for your reply. I'll think it over again.

Re: Server is not active?

2013-09-26 Thread Adam D. Ruppe
hmm, I don't know what the problem is, the socket stuff there looks correct... will have to wait for someone else to have ideas.

Re: Server is not active?

2013-09-26 Thread wagtail
On Friday, 27 September 2013 at 01:04:47 UTC, Adam D. Ruppe wrote: Can you show us any more code? A part of code shown below. /++ Server main() / ushort port = 9876; auto inet = new InternetAddress("0.0.0.0",port);

Re: Server is not active?

2013-09-26 Thread Adam D. Ruppe
Can you show us any more code?

Server is not active?

2013-09-26 Thread wagtail
I tried making simple chat program with std.socket. On starting programs,client program stops. SocketOSException was caught ,so I checked errorCode(). Win7,which I use,tells me error code 10061. I surely think to start server program, and I allow fire wall to connect... Is there any possible caus

Re: Regex matching cause lots of _d_arrayliteralTX calls

2013-09-26 Thread H. S. Teoh
On Fri, Sep 27, 2013 at 12:00:45AM +0200, JR wrote: > I'm working on a toy IRC bot. Much of the logic involved is > translating the incoming raw IRC string into something that makes > sense (so now I have two problems, etc). But I managed to cook up a > regex that so far seems to work well. Time fo

Re: extern(C) bool function type?

2013-09-26 Thread Charles Hixson
I'd forgotten about: int_least8_t I guess that's what I should use. On 09/26/2013 03:06 PM, bearophile wrote: Charles Hixson: So... if C returns an int64_t and I declare it as an int32_t, will this cause problems? What about if C returns an int32_t and I declare it as an int64_t?

Re: Regex matching cause lots of _d_arrayliteralTX calls

2013-09-26 Thread H. S. Teoh
On Fri, Sep 27, 2013 at 01:51:51AM +0200, JR wrote: > On Thursday, 26 September 2013 at 23:04:22 UTC, bearophile wrote: > >I am not sure how a IRC bot could consume more than a tiny > >fraction of the CPU time of a modern multi-GHz processor. > > Nor does it bite into my 8 gigabytes of ram. > > F

Re: Regex matching cause lots of _d_arrayliteralTX calls

2013-09-26 Thread JR
On Thursday, 26 September 2013 at 23:04:22 UTC, bearophile wrote: I am not sure how a IRC bot could consume more than a tiny fraction of the CPU time of a modern multi-GHz processor. Nor does it bite into my 8 gigabytes of ram. Forgive me, but the main culprit in all of this is still me doing

Re: Derelict Assimp RemoveComponent

2013-09-26 Thread David Nadlinger
On Wednesday, 25 September 2013 at 15:32:08 UTC, Lemonfiend wrote: The docs only mention http://assimp.sourceforge.net/lib_html/config_8h.html#afc0a4c00fb90c345eb38fe3f7d7c8637 which is less than helpful.. I'm not sure what the problem is here. Just as the docs say, you have to set the (integ

Re: Regex matching cause lots of _d_arrayliteralTX calls

2013-09-26 Thread bearophile
JR: Is this working as expected? Or am I doing it wrong? I am not sure how a IRC bot could consume more than a tiny fraction of the CPU time of a modern multi-GHz processor. And I am not sure if regular expressions are a good idea to implement a IRC interface. But the author of the curre

Re: new array without auto-initialization

2013-09-26 Thread Matej Nanut
On Thursday, 26 September 2013 at 22:21:58 UTC, Matej Nanut wrote: On Thursday, 26 September 2013 at 22:14:27 UTC, Joseph Rushton Wakeling wrote: It's what I was thinking of, but does that also work with a dynamic array declaration? int[] arr = new int[n]; Check out std.array.uninitialize

Re: new array without auto-initialization

2013-09-26 Thread Matej Nanut
On Thursday, 26 September 2013 at 22:14:27 UTC, Joseph Rushton Wakeling wrote: It's what I was thinking of, but does that also work with a dynamic array declaration? int[] arr = new int[n]; Check out std.array.uninitializedArray. Matej

Re: new array without auto-initialization

2013-09-26 Thread Joseph Rushton Wakeling
On 26/09/13 23:23, H. S. Teoh wrote: You mean: int[10] arr = void; It's what I was thinking of, but does that also work with a dynamic array declaration? int[] arr = new int[n];

Re: extern(C) bool function type?

2013-09-26 Thread bearophile
Charles Hixson: So... if C returns an int64_t and I declare it as an int32_t, will this cause problems? What about if C returns an int32_t and I declare it as an int64_t? Or *is* there a good way to handle this? (I think that there's an error code I could interrogate if I need to just ignor

Regex matching cause lots of _d_arrayliteralTX calls

2013-09-26 Thread JR
I'm working on a toy IRC bot. Much of the logic involved is translating the incoming raw IRC string into something that makes sense (so now I have two problems, etc). But I managed to cook up a regex that so far seems to work well. Time for callgrind! Grouped by source file, most time is spent

Re: extern(C) bool function type?

2013-09-26 Thread Charles Hixson
On 09/26/2013 12:19 PM, bearophile wrote: Charles Hixson: Does anyone know: If an extern(c) function is defined as returning a bool, does D handle the conversion automatically into true and false? Should it be defined as returning an int? On a 64 bit machine? Does this depend on the comp

Re: new array without auto-initialization

2013-09-26 Thread H. S. Teoh
On Thu, Sep 26, 2013 at 11:23:10PM +0200, Joseph Rushton Wakeling wrote: > Hello all, > > Suppose I create a new dynamic array: > > auto arr = new int[10]; > > If I recall right, the values inside arr will be auto-initialized to > int.init (which is 0). > > Again, if I recall right, there's

new array without auto-initialization

2013-09-26 Thread Joseph Rushton Wakeling
Hello all, Suppose I create a new dynamic array: auto arr = new int[10]; If I recall right, the values inside arr will be auto-initialized to int.init (which is 0). Again, if I recall right, there's a simple way to increase performance by not auto-initializing the values, but I can't re

drone.io for D

2013-09-26 Thread Daniel Davidson
Is there an equivalent?

Re: extern(C) bool function type?

2013-09-26 Thread Jacob Carlborg
On 2013-09-26 20:56, Charles Hixson wrote: Does anyone know: If an extern(c) function is defined as returning a bool, does D handle the conversion automatically into true and false? Should it be defined as returning an int? On a 64 bit machine? Does this depend on the compiler used to compile

Re: extern(C) bool function type?

2013-09-26 Thread bearophile
Charles Hixson: Does anyone know: If an extern(c) function is defined as returning a bool, does D handle the conversion automatically into true and false? Should it be defined as returning an int? On a 64 bit machine? Does this depend on the compiler used to compile the library? int32_t

extern(C) bool function type?

2013-09-26 Thread Charles Hixson
Does anyone know: If an extern(c) function is defined as returning a bool, does D handle the conversion automatically into true and false? Should it be defined as returning an int? On a 64 bit machine? Does this depend on the compiler used to compile the library? int32_t? int_64_t? Is th