I am a stupid idiot

2010-12-10 Thread Json
Because so one so far away from me, I love. I am a fucking stupid idiot. And you you have nothing to say about that. So fuck you.

there's a tear in my beer

2010-12-10 Thread Json
I'm gonna keep drinkin til I can't even think

Re: Why Ruby?

2010-12-10 Thread Christopher Nicholson-Sauls
On 12/10/10 19:26, Ary Borenszweig wrote: > http://vimeo.com/17420638 > > A very interesting talk. > > I used to like D. To write code in a high level while at the same > time being very close to the machine, with class invariants, unit > tests and many other features seemed very appealing. But I

Re: Why Ruby?

2010-12-10 Thread Nick Sabalausky
"Andrei Alexandrescu" wrote in message news:iduqor$1kj...@digitalmars.com... > > One is, the talk starts with this extreme syntax exegesis where the > position of literally every space and every letter matters a lot, and how > exactly one choice for each is perfect and no other. Then a large pa

Re: Please vote on std.datetime

2010-12-10 Thread Christopher Nicholson-Sauls
On 12/10/10 18:17, Jonathan M Davis wrote: > On Friday, December 10, 2010 15:29:40 Fawzi Mohamed wrote: >> On 10-dic-10, at 20:07, Jonathan M Davis wrote: >>> On Friday, December 10, 2010 09:55:02 Fawzi Mohamed wrote: On 10-dic-10, at 18:02, Jonathan M Davis wrote: thanks for the ans

Re: Please vote on std.datetime

2010-12-10 Thread Jonathan M Davis
On Friday 10 December 2010 17:10:05 David Nadlinger wrote: > On 12/11/10 1:17 AM, Jonathan M Davis wrote: > > Except then you have to go out of your way to do that. It's no longer the > > default. > > Well, as the user would explicitly import that module anyway, it's just > a few extra characters.

Re: Problems with sort

2010-12-10 Thread Craig Black
Thanks for the help Andrei. I figured it out. I needed an opSlice. -Craig

Re: Why Ruby?

2010-12-10 Thread Andrei Alexandrescu
On 12/10/10 5:41 PM, Ary Borenszweig wrote: Yes, haha, that "unless" part is a bit silly. :-P The interesting part comes when he talks about the testing philosophy, the beauty of code and the focus on the happiness of programmers. I watched the entire talk now. Quite entertaining, but there ar

Re: Destructors, const structs, and opEquals

2010-12-10 Thread Michel Fortin
On 2010-12-10 21:28:43 -0500, Andrei Alexandrescu said: On 12/10/10 6:25 PM, Michel Fortin wrote: One problem I'm starting to realize is that we now have so many available qualifiers for function parameters than it's really easy to get lost. In D1 it was simple: "in" for regular arguments (t

Re: Problems with sort

2010-12-10 Thread Andrei Alexandrescu
On 12/10/10 7:04 PM, Craig Black wrote: This concerns a decision not yet firmed-up on whether objects should be cheap to copy or not. What happens is that sort wants to swap elements at given indices. Your opIndex, I assume, returns by value. (If it returned by reference you'd have no problem

Re: Problems with sort

2010-12-10 Thread Craig Black
This concerns a decision not yet firmed-up on whether objects should be cheap to copy or not. What happens is that sort wants to swap elements at given indices. Your opIndex, I assume, returns by value. (If it returned by reference you'd have no problem sorting.) Then sort makes a number of

Re: Problems with sort

2010-12-10 Thread Andrei Alexandrescu
On 12/10/10 6:37 PM, Craig Black wrote: Thanks for the help guys. I implemented length and opIndex and now I get the following errors: C:\dmd2\windows\bin\..\..\src\phobos\std\algorithm.d(5341): Error: template std.algorithm.swap(T) if (!is(typeof(T.init.proxySwap(T.init does not match any f

Re: Problems with sort

2010-12-10 Thread Craig Black
Thanks for the help guys. I implemented length and opIndex and now I get the following errors: C:\dmd2\windows\bin\..\..\src\phobos\std\algorithm.d(5341): Error: template std.algorithm.swap(T) if (!is(typeof(T.init.proxySwap(T.init does not match any function template declaration C:\dmd

Re: Destructors, const structs, and opEquals

2010-12-10 Thread Andrei Alexandrescu
On 12/10/10 6:25 PM, Michel Fortin wrote: On 2010-12-10 17:12:16 -0500, Don said: Steven Schveighoffer wrote: To summarize for those looking for the C++ behavior, the equivalent would be: void foo(auto ref const Widget) That use of 'auto' is an abomination. One problem I'm starting to re

Re: Destructors, const structs, and opEquals

2010-12-10 Thread Michel Fortin
On 2010-12-10 17:12:16 -0500, Don said: Steven Schveighoffer wrote: To summarize for those looking for the C++ behavior, the equivalent would be: void foo(auto ref const Widget) That use of 'auto' is an abomination. One problem I'm starting to realize is that we now have so many availabl

Re: Destructors, const structs, and opEquals

2010-12-10 Thread Andrei Alexandrescu
On 12/10/10 6:25 PM, Michel Fortin wrote: On 2010-12-10 17:12:16 -0500, Don said: Steven Schveighoffer wrote: To summarize for those looking for the C++ behavior, the equivalent would be: void foo(auto ref const Widget) That use of 'auto' is an abomination. One problem I'm starting to re

Re: Jeff Dean's keynote at LADIS 2009

2010-12-10 Thread Andrej Mitrovic
It must be so cool to have that many machines and be able to experiment with different parallelization techniques. Nice read, thanks. On 12/11/10, Andrei Alexandrescu wrote: > Includes discussion of and insights into problems that are also of high > interest to the D programming language. > > ht

Re: Why Ruby?

2010-12-10 Thread Ary Borenszweig
Yes, haha, that "unless" part is a bit silly. :-P The interesting part comes when he talks about the testing philosophy, the beauty of code and the focus on the happiness of programmers.

Re: Why Ruby?

2010-12-10 Thread Andrei Alexandrescu
On 12/10/10 5:26 PM, Ary Borenszweig wrote: http://vimeo.com/17420638 A very interesting talk. I used to like D. To write code in a high level while at the same time being very close to the machine, with class invariants, unit tests and many other features seemed very appealing. But I always fe

Re: Why Ruby?

2010-12-10 Thread so
On Sat, 11 Dec 2010 03:26:01 +0200, Ary Borenszweig wrote: http://vimeo.com/17420638 A very interesting talk. I used to like D. To write code in a high level while at the same time being very close to the machine, with class invariants, unit tests and many other features seemed very appeali

Re: Why Ruby?

2010-12-10 Thread Andrei Alexandrescu
On 12/10/10 5:26 PM, Ary Borenszweig wrote: http://vimeo.com/17420638 A very interesting talk. I used to like D. To write code in a high level while at the same time being very close to the machine, with class invariants, unit tests and many other features seemed very appealing. But I always fe

Re: Why Ruby?

2010-12-10 Thread Adam D. Ruppe
On Sat, Dec 11, 2010 at 01:26:01AM +, Ary Borenszweig wrote: > http://vimeo.com/17420638 Is that a full hour of a guy preaching to the choir... Got a summary? > with ease) and stop caring about being C-syntax friendly. The world > doesn't need that many semicolons and parenthesis. :-) But t

Why Ruby?

2010-12-10 Thread Ary Borenszweig
http://vimeo.com/17420638 A very interesting talk. I used to like D. To write code in a high level while at the same time being very close to the machine, with class invariants, unit tests and many other features seemed very appealing. But I always felt there was something wrong. About a year ag

Re: Please vote on std.datetime

2010-12-10 Thread David Nadlinger
On 12/11/10 1:17 AM, Jonathan M Davis wrote: Except then you have to go out of your way to do that. It's no longer the default. Well, as the user would explicitly import that module anyway, it's just a few extra characters. You could always team up with bearophile to push only importing the m

Jeff Dean's keynote at LADIS 2009

2010-12-10 Thread Andrei Alexandrescu
Includes discussion of and insights into problems that are also of high interest to the D programming language. http://www.cs.cornell.edu/projects/ladis2009/talks/dean-keynote-ladis2009.pdf Andrei

Re: Problems with sort

2010-12-10 Thread Stanislav Blinov
On 12/11/2010 03:48 AM, Craig Black wrote: The following code gives me this error: algorithm.d(5159): Error: template instance SortedRange!(Range,less) does not match template declaration SortedRange(Range,alias pred = "a < b") if (isRandomAccessRange!(Unqual!(Range))) Any clue as to what is goi

Problems with sort

2010-12-10 Thread Craig Black
The following code gives me this error: algorithm.d(5159): Error: template instance SortedRange!(Range,less) does not match template declaration SortedRange(Range,alias pred = "a < b") if (isRandomAccessRange!(Unqual!(Range))) import std.stdio; import std.algorithm; struct Range(T) { public:

Re: Destructors, const structs, and opEquals

2010-12-10 Thread so
I agree with don. IMHO, this is incredibly silly given Andrei's use case, since D can have instead: void foo(const Widget); and have an optimization inside the compiler for value types to pass by ref. by specifying "const ref" you explicitly require that only a ref to an l-value be provid

ACCEPTED: std.datetime

2010-12-10 Thread Andrei Alexandrescu
The std.datetime Phobos submission has been accepted with a landslide vote that is usually seen only in North Korea. Many thanks to Jonathan for the hard work, and to everybody who helped him knocking this into good shape. Jonathan, please send me your dsource.org user ID so I can add you as

Re: Destructors, const structs, and opEquals

2010-12-10 Thread Andrei Alexandrescu
On 12/10/10 4:10 PM, foobar wrote: Don Wrote: Steven Schveighoffer wrote: To summarize for those looking for the C++ behavior, the equivalent would be: void foo(auto ref const Widget) That use of 'auto' is an abomination. I agree with don. IMHO, this is incredibly silly given Andrei's use

digitalmars-d@puremagic.com

2010-12-10 Thread Craig Black
"Don" wrote in message news:idu7km$5e...@digitalmars.com... Andrei Alexandrescu wrote: On 12/10/10 12:47 PM, Craig Black wrote: auto ref should work for non-templates and generate only one function. The current implementation of auto ref originates in a misunderstanding. Andrei Thanks

Re: Please vote on std.datetime

2010-12-10 Thread Jonathan M Davis
On Friday, December 10, 2010 15:29:40 Fawzi Mohamed wrote: > On 10-dic-10, at 20:07, Jonathan M Davis wrote: > > On Friday, December 10, 2010 09:55:02 Fawzi Mohamed wrote: > >> On 10-dic-10, at 18:02, Jonathan M Davis wrote: > >> > >> thanks for the answers > >> > >>> On Friday 10 December 2010 0

Re: Destructors, const structs, and opEquals

2010-12-10 Thread foobar
Don Wrote: > Steven Schveighoffer wrote: > > To summarize for those looking for the C++ behavior, the equivalent > > would be: > > > > void foo(auto ref const Widget) > > That use of 'auto' is an abomination. I agree with don. IMHO, this is incredibly silly given Andrei's use case, since D ca

Re: Destructors, const structs, and opEquals

2010-12-10 Thread Andrej Mitrovic
On 12/11/10, Andrej Mitrovic wrote: > On 12/11/10, Andrej Mitrovic wrote: >>> Thanks a lot for taking time to explain! >>> >>> Anybody interested see the rationale explained in detail at >>> http://cpp-next.com/archive/2009/08/want-speed-pass-by-value/ >>> >> >> Thanks, I had trouble understandin

Re: Destructors, const structs, and opEquals

2010-12-10 Thread Andrej Mitrovic
On 12/11/10, Andrej Mitrovic wrote: > On 12/11/10, Andrej Mitrovic wrote: >>> Thanks a lot for taking time to explain! >>> >>> Anybody interested see the rationale explained in detail at >>> http://cpp-next.com/archive/2009/08/want-speed-pass-by-value/ >>> >> >> Thanks, I had trouble understandin

Re: Destructors, const structs, and opEquals

2010-12-10 Thread Andrej Mitrovic
On 12/11/10, Andrej Mitrovic wrote: >> Thanks a lot for taking time to explain! >> >> Anybody interested see the rationale explained in detail at >> http://cpp-next.com/archive/2009/08/want-speed-pass-by-value/ >> > > Thanks, I had trouble understanding what this whole rvalue deal is all > about.

Re: Please vote on std.datetime

2010-12-10 Thread Fawzi Mohamed
On 10-dic-10, at 21:14, Kagamin wrote: Fawzi Mohamed Wrote: Last thing, well is something I would have done differently (as I said already in the past), is using doubles expressing number of seconds to represent point in time, durations, and TimeOfDay. I know other differs about this, but

Re: Destructors, const structs, and opEquals

2010-12-10 Thread Andrej Mitrovic
> Thanks a lot for taking time to explain! > > Anybody interested see the rationale explained in detail at > http://thbecker.net/articles/rvalue_references/section_07.html or > http://cpp-next.com/archive/2009/08/want-speed-pass-by-value/ > Thanks, I had trouble understanding what this whole rvalu

digitalmars-d@puremagic.com

2010-12-10 Thread Jonathan M Davis
On Friday, December 10, 2010 15:07:53 Piotr Szturmaj wrote: > Jonathan M Davis wrote: > > On Friday, December 10, 2010 14:31:34 Piotr Szturmaj wrote: > >> Craig Black wrote: > >>> In C++ I could to the following: > >>> > >>> Vector3 cross(const Vector3&a, const Vector3&b) { ... } > >>> > >>> and

Re: Please vote on std.datetime

2010-12-10 Thread Fawzi Mohamed
On 10-dic-10, at 20:07, Jonathan M Davis wrote: On Friday, December 10, 2010 09:55:02 Fawzi Mohamed wrote: On 10-dic-10, at 18:02, Jonathan M Davis wrote: thanks for the answers On Friday 10 December 2010 03:18:29 Fawzi Mohamed wrote: Clock is used as a namespace of sorts specifically to ma

digitalmars-d@puremagic.com

2010-12-10 Thread Piotr Szturmaj
Jonathan M Davis wrote: On Friday, December 10, 2010 14:31:34 Piotr Szturmaj wrote: Craig Black wrote: In C++ I could to the following: Vector3 cross(const Vector3&a, const Vector3&b) { ... } and then call it like this: Vector3 a, b, c; a = cross(b, c); a = cross(b-a, c-a); But in D I have

Re: Destructors, const structs, and opEquals

2010-12-10 Thread Max Samukha
On 12/10/2010 10:58 PM, Andrei Alexandrescu wrote: On 12/10/10 12:46 PM, Steven Schveighoffer wrote: On Mon, 06 Dec 2010 08:34:20 -0500, Steven Schveighoffer wrote: On Sun, 05 Dec 2010 09:18:13 -0500, Andrei Alexandrescu wrote: On 12/5/10 12:04 AM, Steven Schveighoffer wrote: I'm totally

digitalmars-d@puremagic.com

2010-12-10 Thread Jonathan M Davis
On Friday, December 10, 2010 14:31:34 Piotr Szturmaj wrote: > Craig Black wrote: > > In C++ I could to the following: > > > > Vector3 cross(const Vector3 &a, const Vector3 &b) { ... } > > > > and then call it like this: > > > > Vector3 a, b, c; > > a = cross(b, c); > > a = cross(b-a, c-a); > >

Re: Please vote on std.datetime

2010-12-10 Thread David Nadlinger
On 12/10/10 9:49 PM, Andrei Alexandrescu wrote: (klickeverbot: I agree the large file size can become a burden in more than one way going forward, but we can defer the many possible solutions to the time when such problems manifest themselves.) That's the only reasonable choice right now anyway

digitalmars-d@puremagic.com

2010-12-10 Thread Piotr Szturmaj
Craig Black wrote: In C++ I could to the following: Vector3 cross(const Vector3 &a, const Vector3 &b) { ... } and then call it like this: Vector3 a, b, c; a = cross(b, c); a = cross(b-a, c-a); But in D I have to define two functions if I want pass by reference to work: Vector3 cross(ref cons

Re: Destructors, const structs, and opEquals

2010-12-10 Thread Don
Steven Schveighoffer wrote: To summarize for those looking for the C++ behavior, the equivalent would be: void foo(auto ref const Widget) That use of 'auto' is an abomination.

Re: http://d-programming-language.org/ 404 & small proposal

2010-12-10 Thread Lutger Blijdestijn
Andrei Alexandrescu wrote: > On 12/9/10 8:04 PM, Andrej Mitrovic wrote: >> The D website is 404'ing for the library page: >> >> http://d-programming-language.org/phobos/phobos.html >> >> And I've had an idea to make the documentation website a little easier to >> navigate. Here's what the docs loo

digitalmars-d@puremagic.com

2010-12-10 Thread Don
Andrei Alexandrescu wrote: On 12/10/10 12:47 PM, Craig Black wrote: auto ref should work for non-templates and generate only one function. The current implementation of auto ref originates in a misunderstanding. Andrei Thanks for the response. I assume Walter is aware of this problem? What

Re: Destructors, const structs, and opEquals

2010-12-10 Thread Andrei Alexandrescu
On 12/10/10 1:10 PM, Steven Schveighoffer wrote: On Fri, 10 Dec 2010 15:58:17 -0500, Andrei Alexandrescu wrote: On 12/10/10 12:46 PM, Steven Schveighoffer wrote: On Mon, 06 Dec 2010 08:34:20 -0500, Steven Schveighoffer wrote: On Sun, 05 Dec 2010 09:18:13 -0500, Andrei Alexandrescu wrote:

Re: Destructors, const structs, and opEquals

2010-12-10 Thread Steven Schveighoffer
On Fri, 10 Dec 2010 15:58:17 -0500, Andrei Alexandrescu wrote: On 12/10/10 12:46 PM, Steven Schveighoffer wrote: On Mon, 06 Dec 2010 08:34:20 -0500, Steven Schveighoffer wrote: On Sun, 05 Dec 2010 09:18:13 -0500, Andrei Alexandrescu wrote: On 12/5/10 12:04 AM, Steven Schveighoffer wrot

digitalmars-d@puremagic.com

2010-12-10 Thread Andrei Alexandrescu
On 12/10/10 12:47 PM, Craig Black wrote: auto ref should work for non-templates and generate only one function. The current implementation of auto ref originates in a misunderstanding. Andrei Thanks for the response. I assume Walter is aware of this problem? What are the chances that this ge

Re: Please vote on std.datetime

2010-12-10 Thread Dmitry Olshansky
On 10.12.2010 23:42, Steven Schveighoffer wrote: On Fri, 10 Dec 2010 15:21:38 -0500, Jonathan M Davis wrote: Would it be better if I changed the IRange functions so that rather than returning a delegate, they took an interval and returned the range? So, rather than auto interval = Interva

Re: Please vote on std.datetime

2010-12-10 Thread Steven Schveighoffer
On Fri, 10 Dec 2010 15:14:11 -0500, Kagamin wrote: Fawzi Mohamed Wrote: Last thing, well is something I would have done differently (as I said already in the past), is using doubles expressing number of seconds to represent point in time, durations, and TimeOfDay. I know other differs about t

Re: Destructors, const structs, and opEquals

2010-12-10 Thread Andrei Alexandrescu
On 12/10/10 12:46 PM, Steven Schveighoffer wrote: On Mon, 06 Dec 2010 08:34:20 -0500, Steven Schveighoffer wrote: On Sun, 05 Dec 2010 09:18:13 -0500, Andrei Alexandrescu wrote: On 12/5/10 12:04 AM, Steven Schveighoffer wrote: I'm totally confused. I thought the point of auto ref was to pas

Re: Please vote on std.datetime

2010-12-10 Thread Steven Schveighoffer
On Fri, 10 Dec 2010 15:49:24 -0500, Andrei Alexandrescu wrote: In my opinion Jonathan has earned the Phobos invite by displaying reliability, persistence, maturity (danger of drunken commits at 3AM on Saturday is seemingly low) Nobody mentioned this rule to me! Can't we add a checkin tr

Re: Please vote on std.datetime

2010-12-10 Thread Dmitry Olshansky
On 10.12.2010 23:00, Jonathan M Davis wrote: [snip] Overall, I don't really see the benefit of your proposal. The main advantage of fwdRange and bwdRange in the interval types instead of just a single function is that they allow you to verify that you're iterating in the correct direction. In my

Re: Please vote on std.datetime

2010-12-10 Thread Andrei Alexandrescu
On 12/10/10 11:55 AM, Kagamin wrote: Bernard Helyer Wrote: std.gregorian's API doesn't make my normal tasks easy What tasks do you mean? Probably not even worth discussing. std.gregorian was a stub aimed at raising awareness of the necessity of a champion for a date and time framework. Ap

Re: Destructors, const structs, and opEquals

2010-12-10 Thread Steven Schveighoffer
On Mon, 06 Dec 2010 08:34:20 -0500, Steven Schveighoffer wrote: On Sun, 05 Dec 2010 09:18:13 -0500, Andrei Alexandrescu wrote: On 12/5/10 12:04 AM, Steven Schveighoffer wrote: I'm totally confused. I thought the point of auto ref was to pass by value if it's an rvalue (since the data is

digitalmars-d@puremagic.com

2010-12-10 Thread Craig Black
auto ref should work for non-templates and generate only one function. The current implementation of auto ref originates in a misunderstanding. Andrei Thanks for the response. I assume Walter is aware of this problem? What are the chances that this gets fixed soon? -Craig

Re: Please vote on std.datetime

2010-12-10 Thread Steven Schveighoffer
On Fri, 10 Dec 2010 15:21:38 -0500, Jonathan M Davis wrote: Would it be better if I changed the IRange functions so that rather than returning a delegate, they took an interval and returned the range? So, rather than auto interval = Interval!Date(Date(2010, 9, 2), Date(2010, 9, 27)); aut

Re: D's greatest mistakes

2010-12-10 Thread Andrei Alexandrescu
On 12/10/10 10:41 AM, Bruno Medeiros wrote: On 30/11/2010 20:47, Andrei Alexandrescu wrote: Same discussion goes about non-nullable. We don't need the compiler to understand non-nullable types, we need to imbue the compiler with the ability to enforce arbitrary user-defined state invariants, no

digitalmars-d@puremagic.com

2010-12-10 Thread Andrei Alexandrescu
On 12/10/10 9:48 AM, Craig Black wrote: In C++ I could to the following: Vector3 cross(const Vector3 &a, const Vector3 &b) { ... } and then call it like this: Vector3 a, b, c; a = cross(b, c); a = cross(b-a, c-a); But in D I have to define two functions if I want pass by reference to work: V

Re: Please vote on std.datetime

2010-12-10 Thread Jonathan M Davis
On Friday 10 December 2010 12:00:39 Jonathan M Davis wrote: > On Friday 10 December 2010 08:15:09 Dmitry Olshansky wrote: > > On 10.12.2010 3:26, Andrei Alexandrescu wrote: > > > Jonathan M. Davis has diligently worked on his std.datetime proposal, > > > and it has been through a few review cycles

Re: Please vote on std.datetime

2010-12-10 Thread Kagamin
Fawzi Mohamed Wrote: > Last thing, well is something I would have done differently (as I said > already in the past), is using doubles expressing number of seconds to > represent point in time, durations, and TimeOfDay. I know other > differs about this, but I really think that it is a very

Re: Please vote on std.datetime

2010-12-10 Thread Jonathan M Davis
On Friday 10 December 2010 08:15:09 Dmitry Olshansky wrote: > On 10.12.2010 3:26, Andrei Alexandrescu wrote: > > Jonathan M. Davis has diligently worked on his std.datetime proposal, > > and it has been through a few review cycles in this newsgroup. > > > > It's time to vote. Please vote for or ag

Re: Please vote on std.datetime

2010-12-10 Thread Kagamin
Bernard Helyer Wrote: > std.gregorian's API doesn't > make my normal tasks easy What tasks do you mean?

Re: How convince computer teacher

2010-12-10 Thread Ali Çehreli
Fawzi Mohamed wrote: > the language is close enough to other > languages so that it will not be wasted even if they later use another one. That's exactly what I tell beginners when they ask whether they should invest their time in D. D is full of common modern language concepts, some of whic

digitalmars-d@puremagic.com

2010-12-10 Thread Craig Black
Just skimmed over the relevant discussion "Destructors, const structs, and opEquals". So was a final solution ever agreed upon? If so, has Walter agreed to implement the solution? -Craig

Re: Please vote on std.datetime

2010-12-10 Thread Jonathan M Davis
On Friday, December 10, 2010 09:55:02 Fawzi Mohamed wrote: > On 10-dic-10, at 18:02, Jonathan M Davis wrote: > > thanks for the answers > > > On Friday 10 December 2010 03:18:29 Fawzi Mohamed wrote: > > Clock is used as a namespace of sorts specifically to make the code > > clearer. You > > can t

Re: Please vote on std.datetime

2010-12-10 Thread klickverbot
On 12/10/10 1:26 AM, Andrei Alexandrescu wrote: It's time to vote. Please vote for or against inclusion of datetime into Phobos, along with your reasons. Yes, it'd totally like to see this library in Phobos, but I think that we need to be aware of a few issues, mainly caused by the sheer amoun

Re: D's greatest mistakes

2010-12-10 Thread Bruno Medeiros
On 09/12/2010 18:13, Steven Schveighoffer wrote: On Thu, 09 Dec 2010 12:07:28 -0500, Bruno Medeiros wrote: On 29/11/2010 22:53, Walter Bright wrote: Steven Schveighoffer wrote: Because we tried hard and failed != it's impossible. The source to DMD is there. Feel free to try! I spent months

Re: D's greatest mistakes

2010-12-10 Thread Steven Schveighoffer
On Fri, 10 Dec 2010 13:00:01 -0500, Bruno Medeiros wrote: On 09/12/2010 18:12, Steven Schveighoffer wrote: On Thu, 09 Dec 2010 12:01:47 -0500, Bruno Medeiros wrote: On 29/11/2010 21:13, Steven Schveighoffer wrote: On Mon, 29 Nov 2010 15:55:10 -0500, Kagamin wrote: Steven Schveighoffer

Re: D's greatest mistakes

2010-12-10 Thread Bruno Medeiros
On 30/11/2010 20:47, Andrei Alexandrescu wrote: Same discussion goes about non-nullable. We don't need the compiler to understand non-nullable types, we need to imbue the compiler with the ability to enforce arbitrary user-defined state invariants, non-null being one of them. That would be gr

Re: D's greatest mistakes

2010-12-10 Thread Bruno Medeiros
On 09/12/2010 18:12, Steven Schveighoffer wrote: On Thu, 09 Dec 2010 12:01:47 -0500, Bruno Medeiros wrote: On 29/11/2010 21:13, Steven Schveighoffer wrote: On Mon, 29 Nov 2010 15:55:10 -0500, Kagamin wrote: Steven Schveighoffer Wrote: My favorite in recent times is: @tail const(C) tailc

Re: Please vote on std.datetime

2010-12-10 Thread Fawzi Mohamed
On 10-dic-10, at 18:02, Jonathan M Davis wrote: thanks for the answers On Friday 10 December 2010 03:18:29 Fawzi Mohamed wrote: On 10-dic-10, at 01:26, Andrei Alexandrescu wrote: Jonathan M. Davis has diligently worked on his std.datetime proposal, and it has been through a few review cycles

digitalmars-d@puremagic.com

2010-12-10 Thread Craig Black
In C++ I could to the following: Vector3 cross(const Vector3 &a, const Vector3 &b) { ... } and then call it like this: Vector3 a, b, c; a = cross(b, c); a = cross(b-a, c-a); But in D I have to define two functions if I want pass by reference to work: Vector3 cross(ref const Vector3 a, ref con

Re: rationale: [] and ()

2010-12-10 Thread Manfred_Nowak
Steven Schveighoffer wrote: > Essentially sub-linear. ... and I meant "_constant_ runtime in case of arrays". BTW: did you notice, that the modell assumption of an access time independent from the total length of a used slice of memory seems to become wrong? -manfred

Re: Please vote on std.datetime

2010-12-10 Thread Jonathan M Davis
On Friday 10 December 2010 03:18:29 Fawzi Mohamed wrote: > On 10-dic-10, at 01:26, Andrei Alexandrescu wrote: > > Jonathan M. Davis has diligently worked on his std.datetime > > proposal, and it has been through a few review cycles in this > > newsgroup. > > > > It's time to vote. Please vote for

Re: Please vote on std.datetime

2010-12-10 Thread Jonathan M Davis
On Friday 10 December 2010 06:29:40 Jens Mueller wrote: > Andrei Alexandrescu wrote: > > Jonathan M. Davis has diligently worked on his std.datetime > > proposal, and it has been through a few review cycles in this > > newsgroup. > > > > It's time to vote. Please vote for or against inclusion of d

static import of std.signals

2010-12-10 Thread Zbigniew Kostrzewa
Hi When I try to compile following two modules: signal.d: 1 static import std.signals; 2 3 class Signal(T...) { 4 mixin std.signals.Signal!(T); 5 } task.di: 1 import signal; 2 3 interface ITask { 4 alias Signal!(int) OnCompleted; 5 6 void start(); 7 void stop();

Re: Please vote on std.datetime

2010-12-10 Thread Dmitry Olshansky
On 10.12.2010 3:26, Andrei Alexandrescu wrote: Jonathan M. Davis has diligently worked on his std.datetime proposal, and it has been through a few review cycles in this newsgroup. It's time to vote. Please vote for or against inclusion of datetime into Phobos, along with your reasons. Thank

Re: rationale: [] and ()

2010-12-10 Thread Steven Schveighoffer
On Fri, 10 Dec 2010 09:42:51 -0500, Simen kjaeraas wrote: Manfred_Nowak wrote: But because of `opIndex' this assumption has been invalidated a long time ago. No it hasn't. opIndex should still be O(1), it just can't be enforced. er.. make that O(lg(n)) :) Essentially sub-linear. -

Re: rationale: [] and ()

2010-12-10 Thread Simen kjaeraas
Steven Schveighoffer wrote: On Fri, 10 Dec 2010 09:42:51 -0500, Simen kjaeraas wrote: Manfred_Nowak wrote: But because of `opIndex' this assumption has been invalidated a long time ago. No it hasn't. opIndex should still be O(1), it just can't be enforced. er.. make that O(lg(n))

Re: How convince computer teacher

2010-12-10 Thread Fawzi Mohamed
On 10-dic-10, at 03:38, torhu wrote: On 09.12.2010 17:27, Ddev wrote: hi community, How convince my teacher to go in D ? After talk with my teacher, i do not think D is good because after 10 years is not become the big one. she is very skeptical about D. If i could convince my teacher it w

Re: Cannot get thread ID with Thread.getThis() in specific callback functions on Windows

2010-12-10 Thread Haruki Shigemori
Hello. (2010/12/10 17:18), Rainer Schuetze wrote: I tried your code with the additions, and it works (dmd-2.050 on XP/32). Oh, Sorry. It didn't work on Vista/64 (dmd-r795, druntime-r444 and Phobos-r2217). If you are on some 64-bit system: I've seen threads without any TLS set up at all. If y

Re: rationale: [] and ()

2010-12-10 Thread Simen kjaeraas
Manfred_Nowak wrote: What is the rationale for having both: normal and square brackets? Mostly that C has both. Changing this would make the language feel rather more different from C/C++ than it already does. It is also syntactic sugar for element lookup. Rather than having to write some fu

Re: Please vote on std.datetime

2010-12-10 Thread Jens Mueller
Andrei Alexandrescu wrote: > Jonathan M. Davis has diligently worked on his std.datetime > proposal, and it has been through a few review cycles in this > newsgroup. > > It's time to vote. Please vote for or against inclusion of datetime > into Phobos, along with your reasons. I cannot say anythi

Re: Please vote on std.datetime

2010-12-10 Thread Johann MacDonagh
Jonathan M Davis Wrote: > P.S. The most recent code is here: http://is.gd/hYwOV As a lurker I'm sure my vote doesn't count but I vote yes. Very clean and elegant. However I noticed a typo while quickly scanning the docs. std.unittests: "But since the functions in this module are intended to he

rationale: [] and ()

2010-12-10 Thread Manfred_Nowak
What is the rationale for having both: normal and square brackets? I ask because in plain old C I interpreted the lexical difference of funtion calls and accesses to elements of arrays as a permanent hint for linear runtime in case of arrays. But because of `opIndex' this assumption has been in

Re: How convince computer teacher

2010-12-10 Thread Seung-Hui Cho
so Wrote: > On Fri, 10 Dec 2010 01:10:02 +0200, Jean Crystof wrote: > > > so Wrote: > > > >> > In our school Microsoft donates good developer tools (C#, ASP, Web > >> > framework, Ajax, SQL server, Visual Studio) and provides operating > >> > system (Xp or 7). Also quest lectures from Microsoft

Re: uniqueness

2010-12-10 Thread Steven Schveighoffer
On Fri, 10 Dec 2010 07:40:49 -0500, Fawzi Mohamed wrote: On 10-dic-10, at 11:53, Don wrote: Fawzi Mohamed wrote: If one could declare return or out types as unique (note that unique is *not* part of the type, it is like the storage attributes), these methods could be implicitly castable

Re: uniqueness

2010-12-10 Thread Fawzi Mohamed
On 10-dic-10, at 11:53, Don wrote: Fawzi Mohamed wrote: If one could declare return or out types as unique (note that unique is *not* part of the type, it is like the storage attributes), these methods could be implicitly castable to const or immutable, allowing nicer code. Constructors

Re: http://d-programming-language.org/ 404 & small proposal

2010-12-10 Thread Steven Schveighoffer
On Thu, 09 Dec 2010 23:04:22 -0500, Andrej Mitrovic wrote: The D website is 404'ing for the library page: http://d-programming-language.org/phobos/phobos.html And I've had an idea to make the documentation website a little easier to navigate. Here's what the docs look like with their old

Re: Please vote on std.datetime

2010-12-10 Thread Steven Schveighoffer
On Thu, 09 Dec 2010 19:26:13 -0500, Andrei Alexandrescu wrote: Jonathan M. Davis has diligently worked on his std.datetime proposal, and it has been through a few review cycles in this newsgroup. It's time to vote. Please vote for or against inclusion of datetime into Phobos, along with

Re: Please vote on std.datetime

2010-12-10 Thread Fawzi Mohamed
On 10-dic-10, at 01:26, Andrei Alexandrescu wrote: Jonathan M. Davis has diligently worked on his std.datetime proposal, and it has been through a few review cycles in this newsgroup. It's time to vote. Please vote for or against inclusion of datetime into Phobos, along with your reasons

Re: uniqueness

2010-12-10 Thread Michal Minich
V Fri, 10 Dec 2010 11:53:04 +0100, Don wrote: > Any mutable object returned from a strongly pure function, is guaranteed > to be unique. the function should be probably be safe too, to guarentee to not cast const away.

Re: uniqueness

2010-12-10 Thread Don
Fawzi Mohamed wrote: If one could declare return or out types as unique (note that unique is *not* part of the type, it is like the storage attributes), these methods could be implicitly castable to const or immutable, allowing nicer code. Constructors *might* return unique objects (an objec

Re: Please vote on std.datetime

2010-12-10 Thread Lars T. Kyllingstad
On Thu, 09 Dec 2010 16:26:13 -0800, Andrei Alexandrescu wrote: > Jonathan M. Davis has diligently worked on his std.datetime proposal, > and it has been through a few review cycles in this newsgroup. > > It's time to vote. Please vote for or against inclusion of datetime into > Phobos, along with

Re: http://d-programming-language.org/ 404 & small proposal

2010-12-10 Thread duckett
http://d.puremagic.com/issues/show_bug.cgi?id=5339

uniqueness

2010-12-10 Thread Fawzi Mohamed
It is nice that Michel Fortin made the effort to propose a patch trying to address the ability to rebind const objects. Looking at the "uglification" of my code to support const, I saw that many cases I actually had a unique type, or partially unique type. There are several examples of simi

  1   2   >