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: 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. Th

Re: D-

2012-02-10 Thread Xinok
On 2/10/2012 8:13 PM, 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++ today, and then switching

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 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 al

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 00:58:53 UTC, Marco Leise wrote: Am 10.02.2012, 20:02 Uhr, schrieb Tim Krimm : 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 you are only using

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

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

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 p

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: DecimalFloat:

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: D-

2012-02-10 Thread Marco Leise
Am 10.02.2012, 20:02 Uhr, schrieb Tim Krimm : 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.

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 . Le

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 man

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 te

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 use

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 UUID

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 pull

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

Re: std.uuid is ready for review

2012-02-10 Thread Robert Jacques
On Fri, 10 Feb 2012 02:56:36 -0600, Jacob Carlborg wrote: On 2012-02-10 06:48, Robert Jacques wrote: On Thu, 09 Feb 2012 03:57:21 -0600, Johannes Pfau wrote: Thanks for your feedback! Comments below: Am Wed, 08 Feb 2012 23:40:14 -0600 schrieb "Robert Jacques" : [snip] All the generators h

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

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 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 problem at the end.

Re: D-

2012-02-10 Thread H. S. Teoh
On Fri, Feb 10, 2012 at 01:04:26PM -0800, 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.

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 additio

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 elabo

Re: D-

2012-02-10 Thread maarten van damme
I would love to be able to use D on memory limited devices like arduino but creating a whole new language would certainly add up to the confusion for many new potential users (they can't deal with two standard library's, let alone two language named nearly the same) if one were to do such project I

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 elabo

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 are

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 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 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: 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: 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 ... template void fun(T a){ if(cond::value) { auto var = make(a); DOTDOTDOT;

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 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(); // constructor static

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. Th

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 mad

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 wrote: Le 09/02/2012 20:57, Martin Nowak a écrit : On Thu, 09 Feb 2012 16:44:46 +0100, Sean Kelly 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

Re: Carmack about static analysis

2012-02-10 Thread Brad Anderson
On Fri, Feb 10, 2012 at 11:19 AM, 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 t

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 64K

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

Re: Carmack about static analysis

2012-02-10 Thread Bruno Medeiros
On 10/02/2012 18:19, 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 that verify the types. To

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 un

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 advantage.

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 ... template void fun(T a){ if(cond::value) { auto var = make(a); DOTDOTDOT; }else{ auto tmp

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" 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

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 bottlen

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 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 would mean memmoves on rece

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 it

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 ther

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 diffe

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 > > > > wrote: > >> Thanks for your feedback! Comments below: > >> Am Wed, 08 Feb 2012 23:40:14 -0600 > > > >> schrieb "Robert Jacques" :

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 wrote: Thanks for your feedback! Comments below: Am Wed, 08 Feb 2012 23:40:14 -0600 schrieb "Robert Jacques" : [snip] All the generators have the function name [name]UUID. Instead, make these functi

Re: Mac OS X 10.5 support

2012-02-10 Thread Iain Buclaw
On 9 February 2012 09:37, Sönke Ludwig 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. >> >> Currently, the build/test farm

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