Re: What's C's biggest mistake?

2009-12-30 Thread Sean Kelly
Walter Bright Wrote: > Sean Kelly wrote: > > On seeing this title I was going to interject "using pointers to > > represent arrays!" but it seems you beat me to it. This is > > definitely the biggest problem with C. > > Also here: http://news.ycombinator.com/item?id=1014533 > > I find the respo

Re: What's C's biggest mistake?

2009-12-30 Thread Sean Kelly
retard Wrote: > Fri, 25 Dec 2009 14:54:18 -0500, bearophile wrote: > > > Today D is not a replacement of C, because of its GC and few other > > things (I don't think today you can use D to create 1200 bytes long > > binaries that run on an Arduino CPU), but maybe a reduced-D can be used > > for t

Proposal: generic extensible storage qualifiers

2009-12-30 Thread downs
Hi, recently I ran into a situation where I wanted to keep a freelist of freed textures for every OpenGL context (there can be multiple). I started with static { int[] freelist; } then realized this wouldn't work because there'd be no way to map texture IDs to contexts. To simplify situations

Re: Function meta information

2009-12-30 Thread downs
Eldar Insafutdinov wrote: > Currently we have ParameterTypeTuple for extracting type list of function > arguments. This is not enough. There should be a clean way to extract storage > classes and default arguments if there are any. Any thoughts? Parsing stringof is not required. There's a trick

Re: Go rant

2009-12-30 Thread Charles Hixson
Denis Koroskin wrote: > On Tue, 22 Dec 2009 00:10:44 +0300, Jérôme M. Berger > wrote: > >> Andrei Alexandrescu wrote: >>> Walter Bright wrote: retard wrote: > I have several imperative language programming books and instead of > qsort they introduce the reader to the wonderful wor

Re: Go rant

2009-12-30 Thread retard
Sat, 26 Dec 2009 09:21:55 -0800, Charles Hixson wrote: > Denis Koroskin wrote: > >> On Tue, 22 Dec 2009 00:10:44 +0300, Jérôme M. Berger > >> wrote: >> >>> Andrei Alexandrescu wrote: Walter Bright wrote: > retard wrote: >> I have several imperative language programming books and in

Re: No D in Great Computer Language Shootout?

2009-12-30 Thread Isaac Gouy
On Thu, Dec 17, 2009, Bill Baxter wrote > If it were me, I'd drop everything but the 4-core x64. It can be you - just make the measurements and publish them.

Re: No D in Great Computer Language Shootout?

2009-12-30 Thread Isaac Gouy
Thu, 17 Dec 2009 retard wrote > My point was that the language shootout has a lot more publicity than > some 3rd party mini benchmark site. Almost everyone knows the site. That isn't accidental. Put the effort into making an interesting D benchmark site and making it well known.

Phobos, std.typecons: arrays of Rebindable

2009-12-30 Thread pc
I had problems sorting an array of Rebindable!(..). Please see attached file. Am I completely missing the point or is this a bug? Also, a shown in the file, a hack to make this work may depend on a bug? in std.algoritm's swap function. But I am way over my head. Just trying to help.

Re: Phobos, std.typecons: arrays of Rebindable - with file

2009-12-30 Thread pc
pc Wrote: > I had problems sorting an array of Rebindable!(..). Please see attached > file. > > Am I completely missing the point or is this a bug? Also, a shown in the > file, a hack to make this work may depend on a bug? in std.algoritm's swap > function. But I am way over my head. Just

Re: Phobos, std.typecons: arrays of Rebindable - with DOS file

2009-12-30 Thread pc
pc Wrote: > pc Wrote: > > > I had problems sorting an array of Rebindable!(..). Please see attached > > file. > > > > Am I completely missing the point or is this a bug? Also, a shown in the > > file, a hack to make this work may depend on a bug? in std.algoritm's swap > > function. But I

Re: Phobos, std.typecons: arrays of Rebindable

2009-12-30 Thread Andrei Alexandrescu
pc wrote: I had problems sorting an array of Rebindable!(..). Please see attached file. Am I completely missing the point or is this a bug? Also, a shown in the file, a hack to make this work may depend on a bug? in std.algoritm's swap function. But I am way over my head. Just trying to help.

Re: No D in Great Computer Language Shootout?

2009-12-30 Thread retard
Sat, 26 Dec 2009 20:27:43 +, Isaac Gouy wrote: > Thu, 17 Dec 2009 retard wrote > >> My point was that the language shootout has a lot more publicity than >> some 3rd party mini benchmark site. Almost everyone knows the site. > > That isn't accidental. > > Put the effort into making an inter

opAssign(int) necessitates this(this) for automatic opAssign to work

2009-12-30 Thread Ali Çehreli
I've tested the following with dmd 2.037. The compiler generated opAssign is disabled by the definition of opAssign(int). The compiler rejects the following assignment operation. (The error message is in the comment below.) Is this by design? When I also define post-blit, the compiler genera

Re: Phobos, std.typecons: arrays of Rebindable

2009-12-30 Thread pc
Done. I am only up to chapter 6, but so far, IMHO, TDPL is a really great book. Thanks for writing it. I would like to see a chapter that introduces (to the extent not discussed in the context of generic functions and class), the template related concepts that are manifest in std.traits, std.t

Re: opAssign(int) necessitates this(this) for automatic opAssign to work

2009-12-30 Thread Simen kjaeraas
On Sun, 27 Dec 2009 01:42:07 +0100, Ali Çehreli wrote: I've tested the following with dmd 2.037. The compiler generated opAssign is disabled by the definition of opAssign(int). The compiler rejects the following assignment operation. (The error message is in the comment below.) Is this b

Re: opAssign(int) necessitates this(this) for automatic opAssign to work

2009-12-30 Thread Ali Çehreli
Simen kjaeraas wrote: > On Sun, 27 Dec 2009 01:42:07 +0100, Ali Çehreli wrote: > >> I've tested the following with dmd 2.037. >> >> The compiler generated opAssign is disabled by the definition of >> opAssign(int). The compiler rejects the following assignment >> operation. (The error message i

What is the structure of D arrays?

2009-12-30 Thread Ashok
Actually, I have another question before the one in the subject line: How many types of arrays are there in D? THEN, I would like to know their layout/structure in memory.

Re: What is the structure of D arrays?

2009-12-30 Thread Sean Kelly
Ashok Wrote: > Actually, I have another question before the one in the subject line: How > many types of arrays are there in D? THEN, I would like to know their > layout/structure in memory. There's one type, and its structure is described in the ABI: http://www.digitalmars.com/d/2.0/abi.html

Re: What is the structure of D arrays?

2009-12-30 Thread Ashok
Sean Kelly wrote: > Ashok Wrote: > >> Actually, I have another question before the one in the subject >> line: How many types of arrays are there in D? THEN, I would like to >> know their layout/structure in memory. > > There's one type, and its structure is described in the ABI: > > http://www.dig

Re: What is the structure of D arrays?

2009-12-30 Thread Don
Ashok wrote: Sean Kelly wrote: Ashok Wrote: Actually, I have another question before the one in the subject line: How many types of arrays are there in D? THEN, I would like to know their layout/structure in memory. There's one type, and its structure is described in the ABI: http://www.digi

Re: What is the structure of D arrays?

2009-12-30 Thread Ashok
Don wrote: > Ashok wrote: >> Sean Kelly wrote: >>> Ashok Wrote: >>> Actually, I have another question before the one in the subject line: How many types of arrays are there in D? THEN, I would like to know their layout/structure in memory. >>> There's one type, and its structure is d

Re: Go rant

2009-12-30 Thread Don
retard wrote: Sat, 26 Dec 2009 09:21:55 -0800, Charles Hixson wrote: Denis Koroskin wrote: On Tue, 22 Dec 2009 00:10:44 +0300, Jérôme M. Berger wrote: Andrei Alexandrescu wrote: Walter Bright wrote: retard wrote: I have several imperative language programming books and instead of qs

Re: What is the structure of D arrays?

2009-12-30 Thread Don
Ashok wrote: Don wrote: Ashok wrote: Sean Kelly wrote: Ashok Wrote: Actually, I have another question before the one in the subject line: How many types of arrays are there in D? THEN, I would like to know their layout/structure in memory. There's one type, and its structure is described in

Re: What is the structure of D arrays?

2009-12-30 Thread Ashok
"Don" wrote in message news:hh6v0a$1bc...@digitalmars.com... > Ashok wrote: >> Don wrote: >>> Ashok wrote: Sean Kelly wrote: > Ashok Wrote: > >> Actually, I have another question before the one in the subject >> line: How many types of arrays are there in D? THEN, I would li

Re: Go rant

2009-12-30 Thread Walter Bright
Don wrote: I'd say it's easier. If you watch someone sorting some cards, they'll use either insertion sort or selection sort. Nobody should have ever heard of bubble sort, I'm pleased to hear some schools aren't mentioning it. Such a foolish algorithm. I suppose I'm alone in thinking that en

Re: What is the structure of D arrays?

2009-12-30 Thread downs
Ashok wrote: > "Don" wrote in message > news:hh6v0a$1bc...@digitalmars.com... >> Ashok wrote: >>> Don wrote: Ashok wrote: > Sean Kelly wrote: >> Ashok Wrote: >> >>> Actually, I have another question before the one in the subject >>> line: How many types of arrays are ther

Re: What is the structure of D arrays?

2009-12-30 Thread bearophile
downs: > I have no idea what you're talking about. The good thing is that in this newsgroup there is only one troll to feed (that keeps changing name), so it's not a big burden :-) Bye, bearophile

Re: What is the structure of D arrays?

2009-12-30 Thread Bane
bearophile Wrote: > downs: > > I have no idea what you're talking about. > > The good thing is that in this newsgroup there is only one troll to feed > (that keeps changing name), so it's not a big burden :-) > > Bye, > bearophile The one with randomly broken caps-lock? :))

Re: Go rant

2009-12-30 Thread Kevin Bealer
Don Wrote: > retard wrote: ... > > I'd say it's easier. If you watch someone sorting some cards, they'll > use either insertion sort or selection sort. Nobody should have ever > heard of bubble sort, I'm pleased to hear some schools aren't mentioning > it. Such a foolish algorithm. > > "the bu

Re: Go rant

2009-12-30 Thread bearophile
Walter Bright: > I suppose I'm alone in thinking that engineering school should also > cover designs that don't work and explain why! Knuth doesn't say it's uselsss to teach Bubble sort. Knowing bad algorithms is useful if they are both obvious and slow, to know the basics and to avoid them. And

Re: What's C's biggest mistake?

2009-12-30 Thread Marco
bearophile Wrote: > Walter Bright: > >I find the responses to be very curious, particularly the "not in the spirit > >of C" ones.< > > There are people that think of C as something set in stone, something >that > has a "necessary" design. Few years of discussions in the D >newsgroups teach > t

Re: What's C's biggest mistake?

2009-12-30 Thread bearophile
Marco: >C99 introduced VLAs which was a mistake bolting on a new feature.< I may want those VLAs in D :-) They are more handy than using alloca(). Bye, bearophile

Re: opAssign(int) necessitates this(this) for automatic opAssign to work

2009-12-30 Thread Simen kjaeraas
On Sun, 27 Dec 2009 02:23:47 +0100, Ali Çehreli wrote: Simen kjaeraas wrote: > On Sun, 27 Dec 2009 01:42:07 +0100, Ali Çehreli wrote: > >> I've tested the following with dmd 2.037. >> >> The compiler generated opAssign is disabled by the definition of >> opAssign(int). The compiler re

Re: Go rant

2009-12-30 Thread dsimcha
== Quote from Don (nos...@nospam.com)'s article > "the bubble sort seems to have nothing to recommend it, except a catchy > name " - Knuth. Well, the bubble sort distance is a pretty good metric of how similarly ordered two lists are. It's useful, for example, in statistics such as Kendall's Tau.

Re: Go rant

2009-12-30 Thread dsimcha
== Quote from Walter Bright (newshou...@digitalmars.com)'s article > Don wrote: > > I'd say it's easier. If you watch someone sorting some cards, they'll > > use either insertion sort or selection sort. Nobody should have ever > > heard of bubble sort, I'm pleased to hear some schools aren't mentio

Re: Go rant

2009-12-30 Thread dsimcha
== Quote from Kevin Bealer (kevinbea...@gmail.com)'s article > (Non-software) people doing routine tasks often come up with better algorithms intuitively than my intuition expects them to. > I think a lot of people would do even better than insertion with a deck of > poker cards -- they might grou

Re: Function meta information

2009-12-30 Thread Lutger
On 12/25/2009 03:19 PM, Eldar Insafutdinov wrote: Currently we have ParameterTypeTuple for extracting type list of function arguments. This is not enough. There should be a clean way to extract storage classes and default arguments if there are any. Any thoughts? In addition we need to be abl

Re: Go rant

2009-12-30 Thread Sean Kelly
Walter Bright Wrote: > Don wrote: > > I'd say it's easier. If you watch someone sorting some cards, they'll > > use either insertion sort or selection sort. Nobody should have ever > > heard of bubble sort, I'm pleased to hear some schools aren't mentioning > > it. Such a foolish algorithm. >

Re: Go rant

2009-12-30 Thread Rainer Deyke
Kevin Bealer wrote: > I think a lot of people would do even better than insertion with a > deck of poker cards -- they might group cards by either suit or rank > (or rank groups) (e.g. "Hmm, I'll make three piles of 1-5, 6-10, and > J-A"), then order the "buckets", then stick these ordered sets bac

Re: opAssign(int) necessitates this(this) for automatic opAssign to work

2009-12-30 Thread Ali Çehreli
Simen kjaeraas wrote: > On Sun, 27 Dec 2009 02:23:47 +0100, Ali Çehreli wrote: > >> Simen kjaeraas wrote: >> > On Sun, 27 Dec 2009 01:42:07 +0100, Ali Çehreli >> wrote: >> > >> >> I've tested the following with dmd 2.037. >> >> >> >> The compiler generated opAssign is disabled by the defi

Re: What's C's biggest mistake?

2009-12-30 Thread Mike James
Walter Bright Wrote: > http://www.reddit.com/r/programming/comments/ai9uc/whats_cs_biggest_mistake/ I write a lot of embedded C for microcontrollers. It would be great to have an easy means of accessing bytes in an int or short without having to resort to messy unions. Maybe make it a bit more

Is the automatic opAssign exception-safe?

2009-12-30 Thread Ali Çehreli
Does opAssign still work the way I quote from http://digitalmars.com/d/2.0/struct.html: S* opAssign(S s) { ... bitcopy *this into tmp ... ... bitcopy s into *this ... ... call destructor on tmp ... return this; } The reason for the temporary must be exception safety. Otherwise,

Re: Go rant

2009-12-30 Thread Walter Bright
Sean Kelly wrote: Walter Bright Wrote: I suppose I'm alone in thinking that engineering school should also cover designs that don't work and explain why! I'm sure every US-taught engineer has heard of the Tacoma Narrows Bridge disaster. But it would be nice if there were a bit more time spen

Re: What's C's biggest mistake?

2009-12-30 Thread Walter Bright
Marco wrote: bearophile Wrote: Walter Bright: I find the responses to be very curious, particularly the "not in the spirit of C" ones.< There are people that think of C as something set in stone, something >that has a "necessary" design. Few years of discussions in the D >newsgroups teach tha

Concurrency architecture for D2

2009-12-30 Thread Andrei Alexandrescu
I think we are now in the position of defining a solid set of concurrency primitives for D. This follows many months of mulling over models and options. It would be great to open the participation to the design as broadly as possible, but I think it's realistic to say we won't be able to get

Re: Go rant

2009-12-30 Thread Don
dsimcha wrote: == Quote from Don (nos...@nospam.com)'s article "the bubble sort seems to have nothing to recommend it, except a catchy name " - Knuth. Well, the bubble sort distance is a pretty good metric of how similarly ordered two lists are. It's useful, for example, in statistics such as

Re: What's C's biggest mistake?

2009-12-30 Thread Teemu Pudas
On 27/12/2009 20:29, Mike James wrote: It would be great to have an easy means of accessing bytes in an int or short without having to resort to messy unions. Don't do that. It's undefined behaviour. Yes, I've been bitten by it.

Re: Concurrency architecture for D2

2009-12-30 Thread Jason House
I'd like to participate. Both email and newsgroup are fine. Even IRC or other Internet chatroom would be ok too. Past concurrency/shared discussions on this newsgroup have not suffered from bikeshed issues. I think it's all been too theoretical or outside moat programmers' experience. There's al

Re: Concurrency architecture for D2

2009-12-30 Thread retard
Sun, 27 Dec 2009 14:32:52 -0600, Andrei Alexandrescu wrote: > I think we are now in the position of defining a solid set of > concurrency primitives for D. This follows many months of mulling over > models and options. > > It would be great to open the participation to the design as broadly as >

Re: Concurrency architecture for D2

2009-12-30 Thread Jason House
retard Wrote: > Sun, 27 Dec 2009 14:32:52 -0600, Andrei Alexandrescu wrote: > > > I think we are now in the position of defining a solid set of > > concurrency primitives for D. This follows many months of mulling over > > models and options. > > > > It would be great to open the participation t

the const correctness of the this pointer

2009-12-30 Thread TM
Hello, I was dealing with delegates when I found that the const correctness of the this pointer was 'lost' when accessing a member function of a class through a temporary delegate. Here is an example: class A{ void f () {} } const A a = new A; a.f() //error, this is normal. auto g = &a.f

Re: Concurrency architecture for D2

2009-12-30 Thread retard
Sun, 27 Dec 2009 18:56:09 -0500, Jason House wrote: > retard Wrote: > >> Sun, 27 Dec 2009 14:32:52 -0600, Andrei Alexandrescu wrote: >> >> > I think we are now in the position of defining a solid set of >> > concurrency primitives for D. This follows many months of mulling >> > over models and o

Re: the const correctness of the this pointer

2009-12-30 Thread Jason House
TM Wrote: > Hello, > I was dealing with delegates when I found that the const correctness of the > this pointer was 'lost' when accessing a member function of a class through a > temporary delegate. > > Here is an example: > > class A{ > void f () {} > } > > const A a = new A; > a.f() /

Re: Concurrency architecture for D2

2009-12-30 Thread Robert Clipsham
On 27/12/09 23:56, Jason House wrote: You should at least disallow posting via the web interface - those broken threads start to annoy some people. Do my posts show up as broken threads? I use the web interface almost exclusively. Which web interface do you use? there are 2 of them, maybe on

Re: Concurrency architecture for D2

2009-12-30 Thread Robert Clipsham
On 27/12/09 20:32, Andrei Alexandrescu wrote: I think we are now in the position of defining a solid set of concurrency primitives for D. This follows many months of mulling over models and options. Excellent! The last time I had a real play with D2 this is what I found was missing, particular

Re: Concurrency architecture for D2

2009-12-30 Thread Jason House
Robert Clipsham Wrote: > On 27/12/09 23:56, Jason House wrote: > >> You should at least disallow posting via the web interface - those broken > >> threads start to annoy some people. > > > > Do my posts show up as broken threads? I use the web interface almost > > exclusively. > > Which web inte

Re: Go rant

2009-12-30 Thread Kevin Bealer
dsimcha Wrote: > == Quote from Kevin Bealer (kevinbea...@gmail.com)'s article > > (Non-software) people doing routine tasks often come up with better > > algorithms > intuitively than my intuition expects them to. > > I think a lot of people would do even better than insertion with a deck of > >

Re: Go rant

2009-12-30 Thread Kevin Bealer
Rainer Deyke Wrote: > Kevin Bealer wrote: > > I think a lot of people would do even better than insertion with a > > deck of poker cards -- they might group cards by either suit or rank > > (or rank groups) (e.g. "Hmm, I'll make three piles of 1-5, 6-10, and > > J-A"), then order the "buckets", th

Re: Concurrency architecture for D2

2009-12-30 Thread Kevin Bealer
Andrei Alexandrescu Wrote: > I think we are now in the position of defining a solid set of > concurrency primitives for D. This follows many months of mulling over > models and options. > > It would be great to open the participation to the design as broadly as > possible, but I think it's rea

Re: What is the structure of D arrays?

2009-12-30 Thread Ashok
As if he was "bad". "bearophile" wrote in message news:hh758p$1qd...@digitalmars.com... > downs: >> I have no idea what you're talking about. > > The good thing is that in this newsgroup there is only one troll to feed > (that keeps changing name), so it's not a big burden :-) > > Bye, > bearop

Re: the const correctness of the this pointer

2009-12-30 Thread Steven Schveighoffer
On Sun, 27 Dec 2009 19:02:23 -0500, TM wrote: Hello, I was dealing with delegates when I found that the const correctness of the this pointer was 'lost' when accessing a member function of a class through a temporary delegate. Here is an example: class A{ void f () {} } const A a =

Re: the const correctness of the this pointer

2009-12-30 Thread Jason House
Steven Schveighoffer Wrote: > > This might be a difficult thing to fix, but it definitely *definitely* > needs to be fixed. The problem is that a delegate stores a function > pointer and a context pointer. However, it does not type the context > pointer. For example, if you do this: > >

Re: Concurrency architecture for D2

2009-12-30 Thread Michel Fortin
On 2009-12-27 15:32:52 -0500, Andrei Alexandrescu said: I think we are now in the position of defining a solid set of concurrency primitives for D. This follows many months of mulling over models and options. It would be great to open the participation to the design as broadly as possible,

Re: Concurrency architecture for D2

2009-12-30 Thread Phil Deets
On Sun, 27 Dec 2009 15:32:52 -0500, Andrei Alexandrescu wrote: That's why I'm thinking of creating a mailing list or maybe another group for this. Any ideas on what would be the best approach? I also want to gauge interest from threading experts who'd like to participate. Please advise:

Re: the const correctness of the this pointer

2009-12-30 Thread Steven Schveighoffer
On Mon, 28 Dec 2009 10:50:02 -0500, Jason House wrote: Steven Schveighoffer Wrote: This might be a difficult thing to fix, but it definitely *definitely* needs to be fixed. The problem is that a delegate stores a function pointer and a context pointer. However, it does not type the conte

Re: Concurrency architecture for D2

2009-12-30 Thread Andrei Alexandrescu
Michel Fortin wrote: On 2009-12-27 15:32:52 -0500, Andrei Alexandrescu said: I think we are now in the position of defining a solid set of concurrency primitives for D. This follows many months of mulling over models and options. It would be great to open the participation to the design as

Re: the const correctness of the this pointer

2009-12-30 Thread TM
Jason House Wrote: > Steven Schveighoffer Wrote: > > > > > This might be a difficult thing to fix, but it definitely *definitely* > > needs to be fixed. The problem is that a delegate stores a function > > pointer and a context pointer. However, it does not type the context > > pointer.

Re: the const correctness of the this pointer

2009-12-30 Thread Denis Koroskin
On Mon, 28 Dec 2009 03:02:23 +0300, TM wrote: Hello, I was dealing with delegates when I found that the const correctness of the this pointer was 'lost' when accessing a member function of a class through a temporary delegate. Here is an example: class A{ void f () {} } const A a =

Re: Concurrency architecture for D2

2009-12-30 Thread Leandro Lucarella
Phil Deets, el 28 de diciembre a las 11:09 me escribiste: > On Sun, 27 Dec 2009 15:32:52 -0500, Andrei Alexandrescu > wrote: > > >That's why I'm thinking of creating a mailing list or maybe > >another group for this. Any ideas on what would be the best > >approach? I also want to gauge interest f

Re: the const correctness of the this pointer

2009-12-30 Thread Jason House
TM Wrote: > Jason House Wrote: > > > Steven Schveighoffer Wrote: > > > > > > > > This might be a difficult thing to fix, but it definitely *definitely* > > > needs to be fixed. The problem is that a delegate stores a function > > > pointer and a context pointer. However, it does not type

Re: Concurrency architecture for D2

2009-12-30 Thread retard
Mon, 28 Dec 2009 10:20:53 -0600, Andrei Alexandrescu wrote: > Michel Fortin wrote: >> On 2009-12-27 15:32:52 -0500, Andrei Alexandrescu >> said: >> >>> I think we are now in the position of defining a solid set of >>> concurrency primitives for D. This follows many months of mulling over >>> mod

Re: Go rant

2009-12-30 Thread Simen kjaeraas
Kevin Bealer wrote: I'm curious if the multi-pivot quicksort (I think everyone gets what I mean by this? Divide by more than one pivot on each pass? I can give details if you like ...) has been tried out much. It seems like it must have been, but it also seems like something that would

Re: the const correctness of the this pointer

2009-12-30 Thread TM
Jason House Wrote: > TM Wrote: > > > Jason House Wrote: > > > > > Steven Schveighoffer Wrote: > > > > > > > > > > > This might be a difficult thing to fix, but it definitely *definitely* > > > > needs to be fixed. The problem is that a delegate stores a function > > > > pointer and a cont

Re: the const correctness of the this pointer

2009-12-30 Thread Sönke Ludwig
Am 28.12.2009 18:44, schrieb Denis Koroskin: On Mon, 28 Dec 2009 03:02:23 +0300, TM wrote: Hello, I was dealing with delegates when I found that the const correctness of the this pointer was 'lost' when accessing a member function of a class through a temporary delegate. Here is an example:

Re: the const correctness of the this pointer

2009-12-30 Thread Steven Schveighoffer
On Mon, 28 Dec 2009 15:18:21 -0500, Sönke Ludwig wrote: Actually in both cases the error is not happening when the delegate is called but at the point where the delegate is created. _Creating_ a delegate to a non-const function should simply be impossible when a const object is bound

Tuples, C#, Java, language design

2009-12-30 Thread bearophile
C# will probably not follow the route of stagnation of Java for some more time, thanks to Mono too. I don't like that string interpolation syntax because it looks unsafe, and that design of tuples can be improved, but they are listening to programmes (even if they risk creating a mudball languag

Re: Concurrency architecture for D2

2009-12-30 Thread Tim Matthews
On 29/12/2009 3:48 a.m., Michel Fortin wrote: On 2009-12-27 15:32:52 -0500, Andrei Alexandrescu said: I think we are now in the position of defining a solid set of concurrency primitives for D. This follows many months of mulling over models and options. It would be great to open the particip

Re: Concurrency architecture for D2

2009-12-30 Thread Phil Deets
On Mon, 28 Dec 2009 12:46:25 -0500, Leandro Lucarella wrote: Then you will looove Gmane, because it is exactly that a NNTP gateway for almost any ML: http://www.gmane.org/ (you can add missing mailing lists) Thanks for the link. It looks awesome.

Re: TDPL goes out for preliminary review

2009-12-30 Thread Jason House
Don wrote: > Jason House wrote: >> Maybe the biggest help for those converting to shared would be inclusion >> of >> why a particular variable is shared and causing the error. Shared can be >> viral, and exactly how a piece of code is getting called in shared >> context >> can occasionally be a b

GDC and Tango problem

2009-12-30 Thread revcompgeek
So I tried building Tango trunk a while ago, and it actually built surprisingly well, with only one small error I was able to fix. So I installed the tango library and proceeded to test if tango was really working. So in hello.d: import tango.io.Stdout; void main(){ Stdout("Hello {}!","World").n

Re: Concurrency architecture for D2

2009-12-30 Thread Michel Fortin
On 2009-12-28 11:20:53 -0500, Andrei Alexandrescu said: Michel Fortin wrote: I think it should be as open as possible. If done in a separate smaller group, it may be a good idea to post reports to the general newsgroup more or less regularly so that those who cannot participate in the deta

Re: TDPL goes out for preliminary review

2009-12-30 Thread Don
Jason House wrote: Don wrote: Jason House wrote: Maybe the biggest help for those converting to shared would be inclusion of why a particular variable is shared and causing the error. Shared can be viral, and exactly how a piece of code is getting called in shared context can occasionally be

Re: Concurrency architecture for D2

2009-12-30 Thread Nick B
Andrei Alexandrescu wrote: I think we are now in the position of defining a solid set of concurrency primitives for D. This follows many months of mulling over models and options. [snip] That's why I'm thinking of creating a mailing list or maybe another group for this. Any ideas on what w

Re: Concurrency architecture for D2

2009-12-30 Thread Robert Jacques
On Sun, 27 Dec 2009 12:32:52 -0800, Andrei Alexandrescu wrote: I think we are now in the position of defining a solid set of concurrency primitives for D. This follows many months of mulling over models and options. It would be great to open the participation to the design as broadly as

GDC for Windows 2.014

2009-12-30 Thread Steve Teale
The DMD main page says "Gnu D compiler gdc for several platforms, including Windows and Mac OS X for D versions 1.030 and 2.014". Anyone know where I find Windows GDC 2.014? Thanks

Re: Can we drop static struct initializers?

2009-12-30 Thread Steven Schveighoffer
On Fri, 20 Nov 2009 00:48:28 -0500, Don wrote: Now that we have struct literals, the old C-style struct initializers don't seem to be necessary. The variations with named initializers are not really implemented -- the example in the spec doesn't work, and most uses of them cause compiler s

Re: Concurrency architecture for D2

2009-12-30 Thread Andrei Alexandrescu
Nick B wrote: Andrei Alexandrescu wrote: I think we are now in the position of defining a solid set of concurrency primitives for D. This follows many months of mulling over models and options. [snip] That's why I'm thinking of creating a mailing list or maybe another group for this. Any

Re: GDC for Windows 2.014

2009-12-30 Thread Anders F Björklund
Steve Teale wrote: The DMD main page says "Gnu D compiler gdc for several platforms, including Windows and Mac OS X for D versions 1.030 and 2.014". Anyone know where I find Windows GDC 2.014? Not from that link, at least. It's D1 and 32-bit only. The GDC name is wrong, too. It's the "GCC

Re: Go rant

2009-12-30 Thread Nekuromento
Simen kjaeraas Wrote: > Kevin Bealer wrote: > > > I'm curious if the multi-pivot quicksort (I think everyone gets what I > > mean by this? Divide by more than one pivot on each pass? I can give > > details if you like ...) has been tried out much. It seems like it must > > have been, bu

Re: Go rant

2009-12-30 Thread justme
Nekuromento Wrote: > Simen kjaeraas Wrote: > > > Kevin Bealer wrote: > > > > > I'm curious if the multi-pivot quicksort (I think everyone gets what I > > > mean by this? Divide by more than one pivot on each pass? I can give > > > details if you like ...) has been tried out much. It seem

Re: Go rant

2009-12-30 Thread Denis Koroskin
On Tue, 29 Dec 2009 21:36:25 +0300, justme wrote: Nekuromento Wrote: Simen kjaeraas Wrote: > Kevin Bealer wrote: > > > I'm curious if the multi-pivot quicksort (I think everyone gets what I > > mean by this? Divide by more than one pivot on each pass? I can give > > details if you lik

Re: Go rant

2009-12-30 Thread justme
Denis Koroskin Wrote: > On Tue, 29 Dec 2009 21:36:25 +0300, justme wrote: > > > Nekuromento Wrote: > > > >> Simen kjaeraas Wrote: > >> > >> > Kevin Bealer wrote: > >> > > >> > > I'm curious if the multi-pivot quicksort (I think everyone gets > >> what I > >> > > mean by this? Divide by more

D+Ubuntu+SDL_image said undefined reference

2009-12-30 Thread alisue
Hi. I'm new to D and I tried to use D with SDL_image(actually SDL_mixer as well) but it doesn't work. I used SDL header of D on "D - porting (http://shinh.skr.jp/d/porting.html)" and I could build simple SDL application(Only using SDL, not with SDL_image) in Ubuntu. However when I use SDL_image

Re: Can we drop static struct initializers?

2009-12-30 Thread bearophile
Steven Schveighoffer: > can you do something like this without static initializers? My > recollection is that this is the only way to have a struct array literal. http://codepad.org/8HnF62s2 Bye, bearophile

Re: Tuples, C#, Java, language design

2009-12-30 Thread justme
bearophile Wrote: > C# will probably not follow the route of stagnation of Java for some more > time, thanks to Mono too. I don't like that string interpolation syntax > because it looks unsafe, and that design of tuples can be improved, but they > are listening to programmes (even if they risk

Re: D+Ubuntu+SDL_image said undefined reference

2009-12-30 Thread alisue
alisue Wrote: Wow. Solved. What I did is that compile SDL_video.d and SDL_image.d like: -- $ gdc -c hello.d -ISDL $ gdc -c SDL/SDL_image.d -ISDL $ gdc -c SDL/SDL_video.d -ISDL $ gdc -ohello hello.o SDL_image.o SDL_video.o -lSDL -lSDL

Re: Tuples, C#, Java, language design

2009-12-30 Thread grauzone
justme wrote: bearophile Wrote: C# will probably not follow the route of stagnation of Java for some more time, thanks to Mono too. I don't like that string interpolation syntax because it looks unsafe, and that design of tuples can be improved, but they are listening to programmes (even if

Re: GDC and Tango problem

2009-12-30 Thread grauzone
revcompgeek wrote: So I tried building Tango trunk a while ago, and it actually built surprisingly well, with only one small error I was able to fix. So I installed the tango library and proceeded to test if tango was really working. So in hello.d: import tango.io.Stdout; void main(){ Stdout("H

Re: Can we drop static struct initializers?

2009-12-30 Thread Steven Schveighoffer
On Tue, 29 Dec 2009 15:02:50 -0500, bearophile wrote: Steven Schveighoffer: can you do something like this without static initializers? My recollection is that this is the only way to have a struct array literal. http://codepad.org/8HnF62s2 OK, that makes sense. Last time I remember

  1   2   >