Re: GUI Library for D2+Phobos

2010-07-01 Thread Trass3r
Strangefully there are 2 different versions in bin and qt/bin. I think the one in qt/bin is loaded because I added qt/bin to PATH which seems to be compiled with MSVC?!

Re: GUI Library for D2+Phobos

2010-07-01 Thread Trass3r
Though it should work. The one in qt/bin has the right mangling. 002FFC64002E0021D8FD _Z17qt_message_output9QtMsgTypePKc

Can someone explain why this is not an error?

2010-07-01 Thread Bernard Helyer
http://www.digitalmars.com/d/2.0/declaration.html "In a declaration declaring multiple symbols, all the declarations must be of the same type:" Yet this compiles: --- void main() { immutable a = 3, b = 4.2, c = true; } --- a, b, and c all have different types. Unless you co

Re: GUI Library for D2+Phobos

2010-07-01 Thread Max Samukha
On 01.07.2010 12:16, Trass3r wrote: Though it should work. The one in qt/bin has the right mangling. 002F FC64 002E 0021D8FD _Z17qt_message_output9QtMsgTypePKc Can you replace generator.exe with http://content5.files.mail.ru/U614WO/14cd74a490b9316173600cd95e161df6 and see if it starts

Re: Can someone explain why this is not an error?

2010-07-01 Thread dolive
Bernard Helyer дµ½: > http://www.digitalmars.com/d/2.0/declaration.html > > "In a declaration declaring multiple symbols, all the declarations must > be of the same type:" > > Yet this compiles: > > --- > void main() > { > immutable a = 3, b = 4.2, c = true; > } > --- > >

Re: Can someone explain why this is not an error?

2010-07-01 Thread Bernard Helyer
On Thu, 01 Jul 2010 06:26:34 -0400, dolive wrote: > immutable int a = 3, b = 4.2, c = true; // is error Uhhh, yes. Yes it is. ?_?

Re: GUI Library for D2+Phobos

2010-07-01 Thread Trass3r
The link doesn't work for me.

Re: Iterating over containers of immutable objects

2010-07-01 Thread Steven Schveighoffer
On Tue, 29 Jun 2010 19:08:13 -0400, Justin Johansson wrote: Steven Schveighoffer wrote: On Tue, 29 Jun 2010 18:42:18 -0400, Justin Johansson wrote: Steven Schveighoffer wrote: There is another solution which requires introducing an extra virtual method (and associated cost thereof) nam

Re: Using ()s in @property functions

2010-07-01 Thread Steven Schveighoffer
On Wed, 30 Jun 2010 00:33:54 -0400, Robert Jacques wrote: I agree with you from a under-the-hood perspective, but I wasn't asking about that. I was asking about the leak in the @property abstraction. Not being able to pass non-ref @properties to functions by ref is a fairly serious (i.

Re: Network I/O and streaming in D2

2010-07-01 Thread Steven Schveighoffer
On Wed, 30 Jun 2010 13:13:33 -0400, Andrei Alexandrescu wrote: Walter Bright wrote: Adam Ruppe wrote: My network thing is very simple: it opens a socket, then wraps it up in a File struct, via FILE*. Then, you can treat it the same way. That's the traditional way to do it, but I'm not so s

Re: GUI Library for D2+Phobos

2010-07-01 Thread Max Samukha
On 01.07.2010 14:04, Trass3r wrote: The link doesn't work for me. This one should work http://d-coding.clanteam.com/generator.zip

Re: GUI Library for D2+Phobos

2010-07-01 Thread Max Samukha
On 07/01/2010 03:12 PM, Max Samukha wrote: On 01.07.2010 14:04, Trass3r wrote: The link doesn't work for me. This one should work http://d-coding.clanteam.com/generator.zip I've created a ticket http://www.dsource.org/projects/qtd/ticket/54. We'd better move the discussion there.

Re: Can someone explain why this is not an error?

2010-07-01 Thread FeepingCreature
On 01.07.2010 11:49, Bernard Helyer wrote: > http://www.digitalmars.com/d/2.0/declaration.html > > "In a declaration declaring multiple symbols, all the declarations must > be of the same type:" > > Yet this compiles: > > --- > void main() > { > immutable a = 3, b = 4.2, c = tru

Re: Can someone explain why this is not an error?

2010-07-01 Thread canalpay
I think : Ýmmutable, type automatic moments. Because, it is StorageClass. Example : import std.stdio; void main() { immutable a = 3, b = 4.2, c = true; writeln(typeof(a).stringof,typeof(b).stringof,typeof(c).stringof); } or import std.stdio; void main() { auto a = 3, b = 4.2, c = t

Re: Better tuples

2010-07-01 Thread Eric Poggel
On 6/30/2010 8:03 PM, bearophile wrote: Eric Poggel: would it make sense to make struct instances and tuples the same thing?< It's a nice idea, but if all structs become tuples, and D needs to support separate compilation, then modules that define structs need to contain the compiled methods

Re: Network I/O and streaming in D2

2010-07-01 Thread Walter Bright
Steven Schveighoffer wrote: I really think D needs to replace FILE * with it's own buffering scheme. That way we can control the underlying buffering and have access to it. We can also take advantage of D features that aren't available in the underlying code, such as thread local storage to a

Re: Can someone explain why this is not an error?

2010-07-01 Thread bearophile
FeepingCreature: > Type deduction is a special case. I think the above was written before we had > it. OK. Special cases in a language are often bad, and I don't think that syntax is significantly handy. So if you agree Bernard Helyer can put it in bugzilla, asking to remove this special case:

Spikes in array capacity

2010-07-01 Thread Ali Çehreli
There is something strange in the array capacity algorithm. import std.stdio; import std.array; void main() { int[] a; size_t oldCapacity; foreach (i; 0 .. 100_000_000) { a ~= i; if (a.capacity != oldCapacity) { writeln("length: ", a.length,

Re: Can someone explain why this is not an error?

2010-07-01 Thread Adam Ruppe
On 7/1/10, Adam Ruppe wrote: > (and auto, which is inferred from the missing type). Nitpicking myself, but I shouldn't have said that; auto is just the default storage class, and it is the missing type that means infer it, not the auto keyword. I think you know what I mean though.

Re: Can someone explain why this is not an error?

2010-07-01 Thread Adam Ruppe
I don't think this is really a special case: they are all sharing the same keywords. immutable a = 1, b = "a"; // both a and b are immutable string a = "a", b = "b"; // both a and b are strings immutable int a = 1, b = 2; // both a and b are immutable ints I'd say the bug is that the documentatio

Re: Network I/O and streaming in D2

2010-07-01 Thread Steven Schveighoffer
On Thu, 01 Jul 2010 12:31:19 -0400, Walter Bright wrote: Steven Schveighoffer wrote: I really think D needs to replace FILE * with it's own buffering scheme. That way we can control the underlying buffering and have access to it. We can also take advantage of D features that aren't av

D: An Up and Coming Embedded Software Language

2010-07-01 Thread Walter Bright
https://spin.atomicobject.com/2010/06/30/d-little-language-that-could?utm_source=social-media&utm_medium=social-media&utm_campaign=technical And on Reddit: http://www.reddit.com/r/programming/comments/ckxjv/d_an_up_and_coming_embedded_software_language/

Re: Spikes in array capacity

2010-07-01 Thread Steven Schveighoffer
On Thu, 01 Jul 2010 12:46:27 -0400, Ali Çehreli wrote: There is something strange in the array capacity algorithm. import std.stdio; import std.array; void main() { int[] a; size_t oldCapacity; foreach (i; 0 .. 100_000_000) { a ~= i; if (a.capacity != oldCap

Re: Spikes in array capacity

2010-07-01 Thread Ali Çehreli
Steven Schveighoffer wrote: On Thu, 01 Jul 2010 12:46:27 -0400, Ali Çehreli wrote: There is something strange in the array capacity algorithm. ... length: 1153022 capacity: 1154045 ratio: 1.00089 length: 1154046 capacity: 1155069 ratio: 1.00089 length: 1155070 capacity: 3153917 ratio: 2.7305

Re: LDC, GDC for D2

2010-07-01 Thread Robert Clipsham
On 30/06/10 22:06, mwarning wrote: On Wed, 30 Jun 2010 18:14:47 +, dsimcha wrote: Now that Andrei's book is out and the D2 spec is (fairly) stable, is there going to be any serious effort to port LDC to D2? Also, regarding GDC, I've noticed that no D2-related checkins have happened in a lo

Re: Part 1 of the Language Reference Docs Review

2010-07-01 Thread Andrej Mitrovic
Okay, I've done some more reviewing and covered these: structs, classes, interfaces, enums, const, functions, contracts. I've not yet touched op-overloading, templates and a bunch of others. Anyways, I've noticed this Tracker in the bug-reports: http://d.puremagic.com/issues/show_bug.cgi?id=677

Re: D: An Up and Coming Embedded Software Language

2010-07-01 Thread bearophile
Walter Bright: > And on Reddit: > http://www.reddit.com/r/programming/comments/ckxjv/d_an_up_and_coming_embedded_software_language/ Someone can write an answer to this: http://www.reddit.com/r/programming/comments/ckxjv/d_an_up_and_coming_embedded_software_language/c0tbaln Some partial comments:

Re: LDC, GDC for D2

2010-07-01 Thread mwarning
On Thu, 01 Jul 2010 18:44:55 +0100, Robert Clipsham wrote: > On 30/06/10 22:06, mwarning wrote: >> On Wed, 30 Jun 2010 18:14:47 +, dsimcha wrote: >> >>> Now that Andrei's book is out and the D2 spec is (fairly) stable, is >>> there going to be any serious effort to port LDC to D2? Also, >>> r

Re: Better tuples

2010-07-01 Thread Philippe Sigaud
On Thu, Jul 1, 2010 at 01:13, bearophile wrote: > I'd like to add five enhancement requests in Bugzilla, related to > std.typecons.Tuple. I show them here first for possible comments or > critiques. > OK, here I go. I don't plan to make you like current D tuples, but I'd like to show some facil

Re: Part 1 of the Language Reference Docs Review

2010-07-01 Thread Leandro Lucarella
Andrej Mitrovic, el 1 de julio a las 14:21 me escribiste: > Okay, I've done some more reviewing and covered these: > > structs, > classes, > interfaces, > enums, > const, > functions, > contracts. > > I've not yet touched op-overloading, templates and a bunch of others. > > Anyways, I've notice

Re: Part 1 of the Language Reference Docs Review

2010-07-01 Thread Andrej Mitrovic
Leandro Lucarella Wrote: > Andrej Mitrovic, el 1 de julio a las 14:21 me escribiste: > > Okay, I've done some more reviewing and covered these: > > > > structs, > > classes, > > interfaces, > > enums, > > const, > > functions, > > contracts. > > > > I've not yet touched op-overloading, template

Bit disappointed with TDPL build quality

2010-07-01 Thread strtr
I just got my (44E) copy of the TDPL and I love the stuff I've read so far. But, the book as an object kind of disappoints me.. I know it isn't a hard-cover, but still: I don't own any book with this kind of translucent pages. It makes all the pages look smudgy and you can actually read the bibli

Re: D: An Up and Coming Embedded Software Language

2010-07-01 Thread Michel Fortin
On 2010-07-01 15:11:07 -0400, bearophile said: Some partial comments: - The usage of override keyword will probably become obligatory in D, even when you don't use -w, see bug 3836. I sure hope it will. In the meanwhile, more and more code is being written in (or ported to) D2 which is pote

Re: D: An Up and Coming Embedded Software Language

2010-07-01 Thread bearophile
Michel Fortin: > I sure hope it will. In the meanwhile, more and more code is being > written in (or ported to) D2 which is potentially missing 'override' > everywhere. Wouldn't it be better to do this sooner rather than later? Both Walter and Andrei want it, so it's a matter of time. It doesn't

Re: Bit disappointed with TDPL build quality

2010-07-01 Thread Jonathan M Davis
On Thursday, July 01, 2010 14:22:30 strtr wrote: > I just got my (44E) copy of the TDPL and I love the stuff I've read so far. > > But, the book as an object kind of disappoints me.. > I know it isn't a hard-cover, but still: > > I don't own any book with this kind of translucent pages. It makes

mangle

2010-07-01 Thread Ellery Newcomer
test.o: In function `_D3std6random156__T11RandomCoverTAiTS3std6random98__T21MersenneTwisterEngineTkVi32Vi624Vi397Vi31Vk2567483615Vi11Vi7Vk2636928640Vi15Vk4022730752Vi18Z21MersenneTwisterEngineZ11RandomCover4saveMFNdZS3std6random156__T11RandomCoverTAiTS3std6random98__T21MersenneTwisterEngineTkVi32V

Re: mangle

2010-07-01 Thread Adam Ruppe
http://dpldocs.info/std.demangle

Re: mangle

2010-07-01 Thread Jonathan M Davis
By the way, why _does_ D mangle its names? What's the advantage? I understood that C++ does it because it was forced to back in the days when it was transformed into C code during compilation but that it's now generally considered a legacy problem that we're stuck with rather than something that

Re: mangle

2010-07-01 Thread Rainer Deyke
On 7/1/2010 19:32, Jonathan M Davis wrote: > By the way, why _does_ D mangle its names? What's the advantage? I understood > that C++ does it because it was forced to back in the days when it was > transformed into C code during compilation but that it's now generally > considered a legacy probl

Re: mangle

2010-07-01 Thread Jonathan M Davis
On Thursday, July 01, 2010 19:13:02 Rainer Deyke wrote: > On 7/1/2010 19:32, Jonathan M Davis wrote: > > By the way, why _does_ D mangle its names? What's the advantage? I > > understood that C++ does it because it was forced to back in the days > > when it was transformed into C code during compil

Re: mangle

2010-07-01 Thread Rainer Deyke
On 7/1/2010 20:34, Jonathan M Davis wrote: > On Thursday, July 01, 2010 19:13:02 Rainer Deyke wrote: >> Because DMD is stuck with a C-age linker. > > Well, I guess that it just goes to show how little I understand about exactly > how linking works when I don't understand what that means. After al

Re: D: An Up and Coming Embedded Software Language

2010-07-01 Thread Justin Spahr-Summers
On Thu, 01 Jul 2010 17:54:54 -0400, bearophile wrote: > > Michel Fortin: > > I sure hope it will. In the meanwhile, more and more code is being > > written in (or ported to) D2 which is potentially missing 'override' > > everywhere. Wouldn't it be better to do this sooner rather than later? >

Re: mangle

2010-07-01 Thread Justin Spahr-Summers
On Thu, 1 Jul 2010 19:34:09 -0700, Jonathan M Davis wrote: > > On Thursday, July 01, 2010 19:13:02 Rainer Deyke wrote: > > On 7/1/2010 19:32, Jonathan M Davis wrote: > > > By the way, why _does_ D mangle its names? What's the advantage? I > > > understood that C++ does it because it was forced t

Re: Bit disappointed with TDPL build quality

2010-07-01 Thread BCS
Hello Strtr, I just got my (44E) copy of the TDPL and I love the stuff I've read so far. But, the book as an object kind of disappoints me.. I know it isn't a hard-cover, but still: I don't own any book with this kind of translucent pages. It makes all the pages look smudgy and you can actuall

Re: Spikes in array capacity

2010-07-01 Thread BCS
Hello Ali, There is something strange in the array capacity algorithm. [...] Is that intended? Ali I'm going to take a guess that the gc is (after some point) allocating into the smallest hole with "enough" capacity. If you re run the test but with something else going on to add some noise

Re: Spikes in array capacity

2010-07-01 Thread Ali Çehreli
BCS wrote: >> There is something strange in the array capacity algorithm. >> [...] >> Is that intended? > I'm going to take a guess that the gc is (after some point) allocating > into the smallest hole with "enough" capacity. You may be right. :) > If you re run the test > but with something e