Re: GoingNative 2012 to be livestreamed tomorrow - part 2

2012-02-10 Thread Jacob Carlborg
On 2012-02-10 13:58, Timon Gehr wrote: On 02/10/2012 08:17 AM, Jacob Carlborg wrote: On 2012-02-10 02:47, bearophile wrote: Some more comments about the conference. -- About Variadic Templates are Funadic by Andrei Alexandrescu fun talk: I have had to see it at only

Re: GoingNative 2012 to be livestreamed tomorrow - part 2

2012-02-10 Thread Artur Skawina
On 02/10/12 14:04, Timon Gehr wrote: On 02/10/2012 02:47 AM, bearophile wrote: An alternative is to give an else to the template constraints, but the error message is at the bottom of the function, making it not easy to find, so I don't like this syntax: int spam(T)(T x) if (IsFoo!T ||

Re: I wrote A starting guide for Newbies

2012-02-10 Thread MattCodr
Well, a friend of mine helped me with some translate errors. So, I uploaded a new version of the first guide. (Same link) I am already writing the second part, which I think will be more interesting. I'll talk about makefile, modules and... hmm let the rest as surprise, all I can say it will

Re: GSoC will open soon

2012-02-10 Thread David Nadlinger
On 2/10/12 4:35 PM, Bruno Medeiros wrote: BTW, is there any summary of how the 2011 D projects went, were all of them finished successfully in GSoC terms? And incorporated into D? I haven't been paying full attention to the newsgroups, so I only saw that blog page about the Thrift one.. The

Re: GoingNative 2012 to be livestreamed tomorrow - part 2

2012-02-10 Thread Timon Gehr
On 02/11/2012 01:47 AM, bearophile wrote: Timon Gehr: I'm not sure what you are saying here. I meant using something like this, instead of a template: bool IsNumberWithError(T, string file=__FILE__, int line=__LINE__)() { enum bool result = is( ... if (!result)

Re: Mac OS X 10.5 support

2012-02-10 Thread Jacob Carlborg
On 2012-02-09 21:12, Sönke Ludwig wrote: Am 09.02.2012 17:20, schrieb Walter Bright: On 2/9/2012 1:37 AM, Sönke Ludwig wrote: I have a project that we actually plan to use in production in the company for which I work. They still require 10.5 support for their products so removing that support

Re: Mac OS X 10.5 support

2012-02-10 Thread Iain Buclaw
On 9 February 2012 09:37, Sönke Ludwig lud...@informatik.uni-luebeck.de wrote: Am 09.02.2012 04:52, schrieb Walter Bright: Lately, dmd seems to have broken support for OS X 10.5. Supporting that system is problematic for us, since we don't have 10.5 systems available for dev/test.

Re: std.uuid is ready for review

2012-02-10 Thread Jacob Carlborg
On 2012-02-10 06:48, Robert Jacques wrote: On Thu, 09 Feb 2012 03:57:21 -0600, Johannes Pfau nos...@example.com wrote: Thanks for your feedback! Comments below: Am Wed, 08 Feb 2012 23:40:14 -0600 schrieb Robert Jacques sandf...@jhu.edu: [snip] All the generators have the function name

Re: std.uuid is ready for review

2012-02-10 Thread Jonathan M Davis
On Friday, February 10, 2012 09:56:36 Jacob Carlborg wrote: On 2012-02-10 06:48, Robert Jacques wrote: On Thu, 09 Feb 2012 03:57:21 -0600, Johannes Pfau nos...@example.com wrote: Thanks for your feedback! Comments below: Am Wed, 08 Feb 2012 23:40:14 -0600 schrieb Robert Jacques

Re: Carmack about static analysis

2012-02-10 Thread deadalnix
Le 10/02/2012 05:37, Walter Bright a écrit : On 2/9/2012 12:09 PM, Bruno Medeiros wrote: Nice article! I particularly liked this comment: The classic hacker disdain for “bondage and discipline languages” is short sighted – the needs of large, long-lived, multi-programmer projects are just

Re: Message passing between threads: Java 4 times faster than D

2012-02-10 Thread Oliver Plow
I wonder how much it helps to just optimize the GC a little. How much does the performance gap close when you use DMD 2.058 beta instead of 2.057? This upcoming release has several new garbage collector optimizations. If the GC is the bottleneck, then it's not surprising Is there a way

Re: Message passing between threads: Java 4 times faster than D

2012-02-10 Thread Jacob Carlborg
On 2012-02-10 14:54, Oliver Plow wrote: I wonder how much it helps to just optimize the GC a little. How much does the performance gap close when you use DMD 2.058 beta instead of 2.057? This upcoming release has several new garbage collector optimizations. If the GC is the bottleneck, then

Re: Message passing between threads: Java 4 times faster than D

2012-02-10 Thread deadalnix
Le 09/02/2012 20:57, Martin Nowak a écrit : On Thu, 09 Feb 2012 16:44:46 +0100, Sean Kelly s...@invisibleduck.org wrote: So a queue per message type? How would ordering be preserved? Also, how would this work for interprocess messaging? An array-based queue is an option however (though it

Re: Message passing between threads: Java 4 times faster than D

2012-02-10 Thread Artur Skawina
On 02/10/12 14:54, Oliver Plow wrote: I wonder how much it helps to just optimize the GC a little. How much does the performance gap close when you use DMD 2.058 beta instead of 2.057? This upcoming release has several new garbage collector optimizations. If the GC is the bottleneck, then

Re: Message passing between threads: Java 4 times faster than D

2012-02-10 Thread Sean Kelly
GC.disable and GC.reserve are applicable. I tested with these and they did help but not a ton. On Feb 10, 2012, at 5:54 AM, Oliver Plow saxo...@gmx.de wrote: I wonder how much it helps to just optimize the GC a little. How much does the performance gap close when you use DMD 2.058 beta

Re: Damn C++ and damn D!

2012-02-10 Thread Kai Meyer
lambda instead of macro? On 02/05/2012 07:57 AM, Timon Gehr wrote: On 02/05/2012 03:53 PM, so wrote: On Sunday, 5 February 2012 at 14:24:20 UTC, Timon Gehr wrote: This should work: #define DOTDOTDOT ... templateclass T void fun(T a){ if(condT::value) { auto var = make(a); DOTDOTDOT; }else{

Re: Carmack about static analysis

2012-02-10 Thread Walter Bright
On 2/10/2012 3:10 AM, deadalnix wrote: Typeless is great when sketching some piece of code, but you'll way more problem at the end. I've heard people say that typeless is just as good, because you load them up with unit tests that verify the types. To me, this doesn't seem like any

Re: Carmack about static analysis

2012-02-10 Thread H. S. Teoh
On Fri, Feb 10, 2012 at 10:19:11AM -0800, Walter Bright wrote: On 2/10/2012 3:10 AM, deadalnix wrote: Typeless is great when sketching some piece of code, but you'll way more problem at the end. I've heard people say that typeless is just as good, because you load them up with unit tests

postblit constructor not called on slice copy

2012-02-10 Thread Benjamin Thaut
I'm copying a slice of an array into the a slice of another array. dmd herefor emmits a call to _d_arraycopy which is defined inside arraycat.d So I'm wondering why is the postblit constructor or assignment operator not called for every element that gets copied? Kind Regards Benjamin Thaut

D-

2012-02-10 Thread Tim Krimm
We have C and C++ How about D- and D? D- would be the have a similar use as today's C compilers. === Why create this language? === Well I would love to have a D compiler that supports microcontrollers. The ones that have say 32 K of RAM and

Re: Carmack about static analysis

2012-02-10 Thread Brad Anderson
On Fri, Feb 10, 2012 at 11:19 AM, Walter Bright newshou...@digitalmars.comwrote: On 2/10/2012 3:10 AM, deadalnix wrote: Typeless is great when sketching some piece of code, but you'll way more problem at the end. I've heard people say that typeless is just as good, because you load them

Re: Message passing between threads: Java 4 times faster than D

2012-02-10 Thread Martin Nowak
On Fri, 10 Feb 2012 15:07:41 +0100, deadalnix deadal...@gmail.com wrote: Le 09/02/2012 20:57, Martin Nowak a écrit : On Thu, 09 Feb 2012 16:44:46 +0100, Sean Kelly s...@invisibleduck.org wrote: So a queue per message type? How would ordering be preserved? Also, how would this work for

Re: Carmack about static analysis

2012-02-10 Thread Bruno Medeiros
On 09/02/2012 22:34, bearophile wrote: Comparing languages with small code snippets doesn't tell you all you want to know about how a language scales for very large programs, of course, so they aren't enough. But such small snippets are very useful any way because large programs are mostly

Re: D-

2012-02-10 Thread Zachary Lund
On 02/10/2012 01:02 PM, Tim Krimm wrote: We have C and C++ How about D- and D? D- would be the have a similar use as today's C compilers. === Why create this language? === Well I would love to have a D compiler that supports microcontrollers.

Re: C++ pimpl

2012-02-10 Thread so
On Monday, 23 January 2012 at 17:09:30 UTC, so wrote: On Mon, 23 Jan 2012 18:09:58 +0200, Robert Caravani jfanati...@gmx.at wrote: Thanks for the links, it was a good read. I think it is the best answer to the problem. What's the destructor limitation? struct S { static S* make(); //

Re: Damn C++ and damn D!

2012-02-10 Thread Timon Gehr
On 02/10/2012 06:49 PM, Kai Meyer wrote: On 02/05/2012 07:57 AM, Timon Gehr wrote: On 02/05/2012 03:53 PM, so wrote: On Sunday, 5 February 2012 at 14:24:20 UTC, Timon Gehr wrote: This should work: #define DOTDOTDOT ... templateclass T void fun(T a){ if(condT::value) { auto var = make(a);

Re: postblit constructor not called on slice copy

2012-02-10 Thread Timon Gehr
On 02/10/2012 07:59 PM, Benjamin Thaut wrote: I'm copying a slice of an array into the a slice of another array. dmd herefor emmits a call to _d_arraycopy which is defined inside arraycat.d So I'm wondering why is the postblit constructor or assignment operator not called for every element that

Re: D-

2012-02-10 Thread Andrei Alexandrescu
On 2/10/12 11:02 AM, Tim Krimm wrote: We have C and C++ How about D- and D? No please. Andrei

Re: D-

2012-02-10 Thread H. S. Teoh
On Fri, Feb 10, 2012 at 08:02:52PM +0100, Tim Krimm wrote: We have C and C++ How about D- and D? [...] Great, just what I need: a D- in programming! :-P T -- PNP = Plug 'N' Pray

Re: D-

2012-02-10 Thread Tim Krimm
On Friday, 10 February 2012 at 20:21:53 UTC, Andrei Alexandrescu wrote: On 2/10/12 11:02 AM, Tim Krimm wrote: We have C and C++ How about D- and D? No please. Andrei Please elaborate.

Re: D-

2012-02-10 Thread Andrei Alexandrescu
On 2/10/12 12:54 PM, Tim Krimm wrote: On Friday, 10 February 2012 at 20:21:53 UTC, Andrei Alexandrescu wrote: On 2/10/12 11:02 AM, Tim Krimm wrote: We have C and C++ How about D- and D? No please. Andrei Please elaborate. The last thing we need is balkanization of the community. You

Re: D-

2012-02-10 Thread Tim Krimm
On Friday, 10 February 2012 at 21:04:26 UTC, Andrei Alexandrescu wrote: On 2/10/12 12:54 PM, Tim Krimm wrote: On Friday, 10 February 2012 at 20:21:53 UTC, Andrei Alexandrescu wrote: On 2/10/12 11:02 AM, Tim Krimm wrote: We have C and C++ How about D- and D? No please. Andrei Please

Re: D-

2012-02-10 Thread Tim Krimm
On Friday, 10 February 2012 at 21:04:26 UTC, Andrei Alexandrescu wrote: On 2/10/12 12:54 PM, Tim Krimm wrote: On Friday, 10 February 2012 at 20:21:53 UTC, Andrei Alexandrescu wrote: On 2/10/12 11:02 AM, Tim Krimm wrote: We have C and C++ How about D- and D? No please. Andrei Please

Re: Carmack about static analysis

2012-02-10 Thread Jonathan M Davis
On Friday, February 10, 2012 12:08:19 Brad Anderson wrote: I actually read an article recently from someone who had written large applications in dynamic languages and had come to the conclusion that the productivity gains you have with the dynamic typing are pretty much lost to the additional

Re: Carmack about static analysis

2012-02-10 Thread Jacob Carlborg
On 2012-02-10 20:08, Brad Anderson wrote: On Fri, Feb 10, 2012 at 11:19 AM, Walter Bright newshou...@digitalmars.com mailto:newshou...@digitalmars.com wrote: On 2/10/2012 3:10 AM, deadalnix wrote: Typeless is great when sketching some piece of code, but you'll way more

Re: D-

2012-02-10 Thread Jonathan M Davis
On Friday, February 10, 2012 13:54:49 H. S. Teoh wrote: Perhaps one solution is to simply have the compiler recognize all valid D constructs, but to give an error when it sees a construct not supported by the target platform. For example: input.d(123): Error: dynamic arrays not supported by

Re: std.uuid is ready for review

2012-02-10 Thread Robert Jacques
On Fri, 10 Feb 2012 02:56:36 -0600, Jacob Carlborg d...@me.com wrote: On 2012-02-10 06:48, Robert Jacques wrote: On Thu, 09 Feb 2012 03:57:21 -0600, Johannes Pfau nos...@example.com wrote: Thanks for your feedback! Comments below: Am Wed, 08 Feb 2012 23:40:14 -0600 schrieb Robert Jacques

Re: Message passing between threads: Java 4 times faster than D

2012-02-10 Thread Sean Kelly
On Feb 9, 2012, at 2:17 PM, Sean Kelly wrote: On Feb 9, 2012, at 11:57 AM, Martin Nowak wrote: I didn't yet got around to polish my lock-free SList/DList implementations, but mutexes should only become a problem with high contention when you need to block. You'd also would need some kind

Re: D-

2012-02-10 Thread Jesse Phillips
On Friday, 10 February 2012 at 19:02:54 UTC, Tim Krimm wrote: We have C and C++ How about D- and D? There has been discussion of having a compiler switch that flags use of the GC. I'm pretty sure Walter agreed it would be good to have. So someone needs to create a pull request so he can

Re: std.uuid is ready for review

2012-02-10 Thread Jonathan M Davis
On Friday, February 10, 2012 16:36:48 Robert Jacques wrote: These functions are _constructors_; ideally, they should be expressed as such. In a managed language, we'd probably for with UUID(random,...). And if explicit template ctors were valid syntax, we'd used UUID!random(...) or

Re: std.uuid is ready for review

2012-02-10 Thread Tobias Pankrath
Jonathan M Davis wrote: On Friday, February 10, 2012 16:36:48 Robert Jacques wrote: These functions are _constructors_; ideally, they should be expressed as such. In a managed language, we'd probably for with UUID(random,...). And if explicit template ctors were valid syntax, we'd used

Re: std.uuid is ready for review

2012-02-10 Thread Timon Gehr
On 02/11/2012 12:26 AM, Tobias Pankrath wrote: Jonathan M Davis wrote: On Friday, February 10, 2012 16:36:48 Robert Jacques wrote: These functions are _constructors_; ideally, they should be expressed as such. In a managed language, we'd probably for with UUID(random,...). And if explicit

Re: std.uuid is ready for review

2012-02-10 Thread Jonathan M Davis
On Saturday, February 11, 2012 00:40:39 Timon Gehr wrote: On 02/11/2012 12:26 AM, Tobias Pankrath wrote: Jonathan M Davis wrote: On Friday, February 10, 2012 16:36:48 Robert Jacques wrote: These functions are _constructors_; ideally, they should be expressed as such. In a managed

Underscores in floating literals

2012-02-10 Thread H. S. Teoh
As an exercise in D programming, I'm writing a D lexer from scratch, based on the online specs posted on DPLO. I'm running into what looks like a discrepancy between the specs and compiler behaviour (I'm using gdc-4.6.2): Spec says: DecimalFloat: LeadingDecimal .

Re: D-

2012-02-10 Thread Marco Leise
Am 10.02.2012, 20:02 Uhr, schrieb Tim Krimm twkr...@yahoo.com: What are your thoughts? There is no way you get a D application into 64K. The language is not powerful enough. Only C can achieve that.

Re: Carmack about static analysis

2012-02-10 Thread bearophile
Jonathan M Davis: I just can't stand the idea that whether an if statement is true or not could change the type of a variable (e.g. it's set to a string in one branch and an int in the other). You have found something that sometimes I like to do in Python, that I can't do in D, a reduced

Re: Underscores in floating literals

2012-02-10 Thread Timon Gehr
On 02/11/2012 01:51 AM, H. S. Teoh wrote: As an exercise in D programming, I'm writing a D lexer from scratch, based on the online specs posted on DPLO. I'm running into what looks like a discrepancy between the specs and compiler behaviour (I'm using gdc-4.6.2): Spec says:

Bug? taskPool.map() with bufSize and writeln() gets stuck

2012-02-10 Thread Ali Çehreli
Sorry for the double-post; I have asked the same question on D.learn earlier but I think this is more of a question to this forum. Tested on Ubuntu 11.10 64-bit dmd. The following program gets stuck during the writeln() call. - Note that the foo() call alone works fine. - Also note that the

Re: D-

2012-02-10 Thread Era Scarecrow
What are your thoughts? There is no way you get a D application into 64K. The language is not powerful enough. Only C can achieve that. I'll need to agree. Porting D to a smaller memory space and with cramped features in all of this is not going to be good no matter how you look at it. I'm

Re: D-

2012-02-10 Thread Tim Krimm
If you make a subset of D, it would most likely be named Mini-D. But at that point you've got an enhanced C without going C++. Yes and that probably would be better than what I have now. Going back and forth programming in C/C++ today, and then switching back to D tomorrow. Let me see if I

Re: D-

2012-02-10 Thread Tim Krimm
On Saturday, 11 February 2012 at 00:58:53 UTC, Marco Leise wrote: Am 10.02.2012, 20:02 Uhr, schrieb Tim Krimm twkr...@yahoo.com: What are your thoughts? There is no way you get a D application into 64K. The language is not powerful enough. Only C can achieve that. It seems to me that if

Re: Bug? taskPool.map() with bufSize and writeln() gets stuck

2012-02-10 Thread MattCodr
On Saturday, 11 February 2012 at 01:31:29 UTC, Ali Çehreli wrote: Sorry for the double-post; I have asked the same question on D.learn earlier but I think this is more of a question to this forum. Tested on Ubuntu 11.10 64-bit dmd. The following program gets stuck during the writeln() call.

Re: D-

2012-02-10 Thread Tim Krimm
On Saturday, 11 February 2012 at 01:46:26 UTC, Era Scarecrow wrote: What are your thoughts? There is no way you get a D application into 64K. The language is not powerful enough. Only C can achieve that. I'll need to agree. Porting D to a smaller memory space and with cramped features in

Re: D-

2012-02-10 Thread Era Scarecrow
This is all just speculation, but I think you get the picture. If you make a subset of D, it would most likely be named Mini-D. But at that point you've got an enhanced C without going C++. Also computer chips are becoming more powerful every day. I think we will soon be needing better tools.

Re: D-

2012-02-10 Thread bcs
On 02/10/2012 11:02 AM, Tim Krimm wrote: We have C and C++ How about D- and D? D- would be the have a similar use as today's C compilers. === Why create this language? === Well I would love to have a D compiler that supports microcontrollers.

Re: D-

2012-02-10 Thread Bernard Helyer
On Saturday, 11 February 2012 at 02:13:19 UTC, Tim Krimm wrote: If you make a subset of D, it would most likely be named Mini-D. But at that point you've got an enhanced C without going C++. Yes and that probably would be better than what I have now. Going back and forth programming in C/C++

Re: DLL Injection

2012-02-10 Thread valente500
Well if I change the DLL_PROCESS_ATTACH case to this: case DLL_PROCESS_ATTACH: MessageBoxA(null, Injected!, DLL, MB_OK); g_hInst = hInstance; dll_process_attach(hInstance, true); try { *cast(int*)0x12FE6C = 1337; }

Re: Arrays - Inserting and moving data

2012-02-10 Thread Marco Leise
Am 09.02.2012, 22:03 Uhr, schrieb MattCodr matheus_...@hotmail.com: On Thursday, 9 February 2012 at 19:49:43 UTC, Timon Gehr wrote: Note that this code does the same, but is more efficient if you don't actually need the array: Yes I know, In fact I need re-think the way I code with this new

Re: What should do a D lint?

2012-02-10 Thread Marco Leise
Am 04.02.2012, 18:37 Uhr, schrieb bioinfornatics bioinfornat...@fedoraproject.org: hi, What should do a D lint? - check if in code the are no mixin between space / tab for indent - check indent (4 spaces as default) complete the list Do you want to collect ideas or advertise the use of 4

Re: Socket: The connection was reset

2012-02-10 Thread nrgyzer
Works perfectly, thanks :) But... how can I read the complete HTTP-header? When I try the following: string header; ubyte[1024] buffer; while (cs.receive(buffer)) header ~= buffer; ... it works as long as the header doesn't have a length like 1024, 2048, 3072... Otherwise

Re: Compiler error with static vars/functions

2012-02-10 Thread Artur Skawina
On 02/10/12 15:18, Don Clugston wrote: On 09/02/12 23:03, Jonathan M Davis wrote: On Thursday, February 09, 2012 14:45:43 bearophile wrote: Jonathan M Davis: Normally, it's considered good practice to give modules names which are all lowercase (particularly since some OSes aren't

Re: Compiler error with static vars/functions

2012-02-10 Thread H. S. Teoh
On Fri, Feb 10, 2012 at 04:08:36PM +0100, Artur Skawina wrote: On 02/10/12 15:18, Don Clugston wrote: On 09/02/12 23:03, Jonathan M Davis wrote: On Thursday, February 09, 2012 14:45:43 bearophile wrote: Jonathan M Davis: Normally, it's considered good practice to give modules names

Re: Compiler error with static vars/functions

2012-02-10 Thread Don Clugston
On 10/02/12 16:08, Artur Skawina wrote: On 02/10/12 15:18, Don Clugston wrote: On 09/02/12 23:03, Jonathan M Davis wrote: On Thursday, February 09, 2012 14:45:43 bearophile wrote: Jonathan M Davis: Normally, it's considered good practice to give modules names which are all lowercase

Re: Compiler error with static vars/functions

2012-02-10 Thread H. S. Teoh
On Fri, Feb 10, 2012 at 04:38:12PM +0100, Artur Skawina wrote: On 02/10/12 16:18, Don Clugston wrote: On 10/02/12 16:08, Artur Skawina wrote: [...] No, having non-lower case filenames would just lead to problems. Like different modules being imported depending on the filesystem being

Immutable immutable strings??

2012-02-10 Thread H. S. Teoh
I'm not sure whether the following a compiler/language bug or a Phobos bug, but it's definitely some kind of bug: auto s = abc; immutable t = def; writeln(typeid(s)); // immutable(char)[] writeln(typeid(t)); // immutable(immutable(char)[])

Re: Immutable immutable strings??

2012-02-10 Thread Marco Leise
Am 10.02.2012, 19:07 Uhr, schrieb H. S. Teoh hst...@quickfur.ath.cx: I'm not sure whether the following a compiler/language bug or a Phobos bug, but it's definitely some kind of bug: auto s = abc; immutable t = def; writeln(typeid(s)); // immutable(char)[]

Re: Immutable immutable strings??

2012-02-10 Thread Artur Skawina
On 02/10/12 19:07, H. S. Teoh wrote: I'm not sure whether the following a compiler/language bug or a Phobos bug, but it's definitely some kind of bug: auto s = abc; immutable t = def; writeln(typeid(s)); // immutable(char)[] writeln(typeid(t)); //

Signature conditions

2012-02-10 Thread H. S. Teoh
I'm trying to write a parametrized class with a type parameter whose existence depends on whether std.utf.decode() exists for that type. What's the syntax to do this? class C(T) if ( /* ??? exists(decode(T)...?) */ ) { ... } Thanks! T -- It is not the employer

Bug? taskPool.map() with bufSize and writeln() gets stuck

2012-02-10 Thread Ali Çehreli
Ubuntu 11.10 64-bit dmd. The following program gets stuck during the writeln() call. - The foo() call alone works fine. - The program works fine when there is no writeln() call nor foo() call. All elements get processed in that case and the results are ignored. Am I using taskPool.map

Re: Signature conditions

2012-02-10 Thread David Nadlinger
On 2/10/12 7:35 PM, David Nadlinger wrote: class(T) if (__traits(compiles, { std.utf.decode(T.init); } )) { … } (untested, you might have to return the value from the delegate to avoid an expression-without-effect error)

Re: Signature conditions

2012-02-10 Thread H. S. Teoh
On Fri, Feb 10, 2012 at 07:36:38PM +0100, David Nadlinger wrote: On 2/10/12 7:35 PM, David Nadlinger wrote: class(T) if (__traits(compiles, { std.utf.decode(T.init); } )) { … } (untested, you might have to return the value from the delegate to avoid an expression-without-effect error) Works

Re: Socket: The connection was reset

2012-02-10 Thread DNewbie
nrgyzer, please check the return value of 'receive'. http://dlang.org/phobos/std_socket.html#receive On Fri, Feb 10, 2012, at 02:06 PM, nrgyzer wrote: Works perfectly, thanks :) But... how can I read the complete HTTP-header? When I try the following: string header;

dmd thrashes fedora

2012-02-10 Thread Ellery Newcomer
when I run dmd -gc -oftopo topo.d multi_index.d replace.d on the contents of http://personal.utulsa.edu/~ellery-newcomer/bad.zip in fedora 16 x86_64 with dmd 2.057 64 bit dmd starts thrashing like there is no tomorrow and generally locks up my entire system. Can anyone confirm this

Re: Socket: The connection was reset

2012-02-10 Thread nrgyzer
Yep, thanks... but I already checked out the return value and the problem is If the socket is blocking, receive waits until there is data to be received.. The following socket blocks and the server doesn't respond: while(true) { Socket cs = s.accept(); ubyte[] header;

Re: Signature conditions

2012-02-10 Thread Timon Gehr
On 02/10/2012 07:50 PM, H. S. Teoh wrote: On Fri, Feb 10, 2012 at 07:36:38PM +0100, David Nadlinger wrote: On 2/10/12 7:35 PM, David Nadlinger wrote: class(T) if (__traits(compiles, { std.utf.decode(T.init); } )) { … } (untested, you might have to return the value from the delegate to avoid

Re: dmd thrashes fedora

2012-02-10 Thread Timon Gehr
On 02/10/2012 08:38 PM, Ellery Newcomer wrote: when I run dmd -gc -oftopo topo.d multi_index.d replace.d on the contents of http://personal.utulsa.edu/~ellery-newcomer/bad.zip in fedora 16 x86_64 with dmd 2.057 64 bit dmd starts thrashing like there is no tomorrow and generally locks up my

Re: Signature conditions

2012-02-10 Thread H. S. Teoh
On Fri, Feb 10, 2012 at 08:53:58PM +0100, Timon Gehr wrote: On 02/10/2012 07:50 PM, H. S. Teoh wrote: [...] On that note, I discovered that if you want signature constraints on a derived class, the syntax is unbearably ugly: class Derived(T) if (/* conditions */)

Re: Arrays - Inserting and moving data

2012-02-10 Thread Jonathan M Davis
On Friday, February 10, 2012 13:32:56 Marco Leise wrote: I know that feeling. I had no exposure to functional programming and options like chain never come to my head. Although map is a concept that I made friends with early. It would benefit your programming in general to learn a functional

Re: dmd thrashes fedora

2012-02-10 Thread Timon Gehr
On 02/11/2012 12:16 AM, Ellery Newcomer wrote: On 02/10/2012 01:59 PM, Timon Gehr wrote: I seem to have more RAM than you. The behavior is apparently caused by a Phobos bug: That is likely. The code is a dustmite reduction, so I don't really care what the error is, just that it shouldn't be

toString multiple overrides

2012-02-10 Thread Ellery Newcomer
dmd 2.057 Two mixin templates, each define toString, mix them in to your class and .. Error: function test.X.T2!().toString multiple overrides of same function So this behavior is new, but is it sensical? Sample code: mixin template T1(){ string toString(){ return 1; } } mixin

Re: DLL Injection

2012-02-10 Thread valente500
Everything works perfectly if I write the DLL in C++ (and I've never had any errors with C++ DLL's before that are similar to this one). If I remove the cast line and MessageBox()'s in the D version, then I still get the error.

Re: toString multiple overrides

2012-02-10 Thread Jonathan M Davis
On Friday, February 10, 2012 22:41:20 Ellery Newcomer wrote: dmd 2.057 Two mixin templates, each define toString, mix them in to your class and .. Error: function test.X.T2!().toString multiple overrides of same function So this behavior is new, but is it sensical? Sample code:

[Issue 7476] Write(ln) functions no longer accept retro range

2012-02-10 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7476 Kevin ke...@brogan.ca changed: What|Removed |Added CC||ke...@brogan.ca --- Comment #1

[Issue 7476] Write(ln) functions no longer accept retro range

2012-02-10 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7476 --- Comment #2 from Kevin ke...@brogan.ca 2012-02-10 00:38:30 PST --- Wait, I'm confused. You said it works on 2.057 (which I can confirm). What version is it not working on? 2.057 is the latest. -- Configure issuemail:

[Issue 7476] Write(ln) functions no longer accept retro range

2012-02-10 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7476 Jonathan M Davis jmdavisp...@gmx.com changed: What|Removed |Added CC|

[Issue 6406] [2.054] Libraries not working on Ubuntu

2012-02-10 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6406 Don clugd...@yahoo.com.au changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 7475] Regression(2.058 beta): Template member erroneously inaccessible

2012-02-10 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7475 --- Comment #1 from github-bugzi...@puremagic.com 2012-02-10 01:32:18 PST --- Commit pushed to master at https://github.com/D-Programming-Language/dmd

[Issue 6406] [2.054] Libraries not working on Ubuntu

2012-02-10 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6406 Don clugd...@yahoo.com.au changed: What|Removed |Added Resolution|FIXED |WORKSFORME -- Configure

[Issue 7475] Regression(2.058 beta): Template member erroneously inaccessible

2012-02-10 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7475 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 7476] Write(ln) functions no longer accept retro range

2012-02-10 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7476 --- Comment #4 from Kevin ke...@brogan.ca 2012-02-10 02:00:32 PST --- Just downloaded the git source and compiled with dmc Works for me on latest version. 2.048 Beta c:\Users\Kevin\Documents\D Projects\ConsoleApp1\ConsoleApp1\bindmd ../main.d

[Issue 7476] Write(ln) functions no longer accept retro range

2012-02-10 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7476 --- Comment #5 from Kevin ke...@brogan.ca 2012-02-10 02:04:28 PST --- I've got to stop typing at 2 in the morning... I mean 2.058 Debug, as shown in the console dump. (In reply to comment #4) Just downloaded the git source and compiled with

[Issue 7479] New: Regression(2.046) ICE(glue.c) with invalid template parameter during gagging

2012-02-10 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7479 Summary: Regression(2.046) ICE(glue.c) with invalid template parameter during gagging Product: D Version: D1 D2 Platform: All OS/Version: All Status: NEW

[Issue 4269] Regression(2.031): invalid type accepted if evaluated while errors are gagged

2012-02-10 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4269 yebblies yebbl...@gmail.com changed: What|Removed |Added Platform|Other |All

[Issue 7479] Regression(2.046) ICE(glue.c) with function.init with errors gagged

2012-02-10 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7479 yebblies yebbl...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 7462] Error message with _error_ in overridden function

2012-02-10 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7462 --- Comment #1 from yebblies yebbl...@gmail.com 2012-02-10 22:29:22 EST --- *** Issue 7479 has been marked as a duplicate of this issue. *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are

[Issue 4269] Regression(2.031): invalid type accepted if evaluated while errors are gagged

2012-02-10 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4269 yebblies yebbl...@gmail.com changed: What|Removed |Added Severity|regression |normal --- Comment #19

[Issue 4269] Regression(2.031): invalid type accepted if evaluated while errors are gagged

2012-02-10 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4269 yebblies yebbl...@gmail.com changed: What|Removed |Added Keywords||wrong-code --- Comment

[Issue 7462] Error message with _error_ in overridden function

2012-02-10 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7462 yebblies yebbl...@gmail.com changed: What|Removed |Added Keywords||pull CC|

[Issue 6327] Internal error: ..\ztc\cgcv.c 206

2012-02-10 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=6327 yebblies yebbl...@gmail.com changed: What|Removed |Added CC||yebbl...@gmail.com ---

[Issue 7476] Write(ln) functions no longer accept retro range

2012-02-10 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7476 timon.g...@gmx.ch changed: What|Removed |Added CC||timon.g...@gmx.ch --- Comment #6

  1   2   >