Re: Crash handler with stack trace

2009-09-25 Thread Kagamin
Jeremie Pelletier Wrote: I forked the original D1 gc and rewrote it almost entirely. Did you try to address bug 2093?

Re: Crash handler with stack trace

2009-09-25 Thread Jeremie Pelletier
Kagamin wrote: Jeremie Pelletier Wrote: I forked the original D1 gc and rewrote it almost entirely. Did you try to address bug 2093? I just did a quick compile of the bug's test case and it worked correctly. I wasn't even aware of that bug to tell the truth.

Re: Why not move cast to the standard library?

2009-09-25 Thread Don
language_fan wrote: Thu, 24 Sep 2009 21:13:48 +0200, downs thusly wrote: language_fan wrote: Thu, 24 Sep 2009 13:47:21 -0400, Steven Schveighoffer thusly wrote: I actually prefer the compiler to handle the casting versus templates to cut down on template instantiation bloat. I wonder how D

Re: Is typedef an alien?

2009-09-25 Thread Chad J
Chad J wrote: H, there's a lot of hating on typedef. I've found it rather useful for at least one thing: typedef uint ColorFormat; enum : ColorFormat { RGB, RGBA, HSV, CMYK, // etc } Now you have an enum that is type safe but doesn't require a

Re: DFL IDE Editor ?

2009-09-25 Thread dolive
cemiller дµ½: Compiling D Scintilla for DFL... D:\D\dflD:\D\dmd2\windows\bin\dfl -c -debug -O -inline -I.. scintilla Error checking versions; use switch -ver for details D:\D\dmd2\windows\bin\dmd.exe -c -debug -O -inline -I.. scintilla -version=DFL_E XE

property keyword

2009-09-25 Thread Gzp
Hello, I'm quite new to D, and it seems to be a great language for me. But I've some questions: Why is it good to treat functions as property, it make the code quite unreadable. With a simple property keyword the things were much clear, like: class Foo { property prop { int get {

Re: property keyword

2009-09-25 Thread Lars T. Kyllingstad
Gzp wrote: Hello, I'm quite new to D, and it seems to be a great language for me. But I've some questions: Why is it good to treat functions as property, it make the code quite unreadable. With a simple property keyword the things were much clear, like: Hello, and welcome! :) There was a

Re: property keyword

2009-09-25 Thread Lars T. Kyllingstad
Lars T. Kyllingstad wrote: Gzp wrote: Hello, I'm quite new to D, and it seems to be a great language for me. But I've some questions: Why is it good to treat functions as property, it make the code quite unreadable. With a simple property keyword the things were much clear, like: Hello,

Re: Is typedef an alien?

2009-09-25 Thread Rainer Deyke
Chad J wrote: typedef uint ColorFormat; enum : ColorFormat { RGB, RGBA, HSV, CMYK, // etc } I always do the opposite in C++: namespace color_formats { enum ColorFormat { RGB, RGBA, HSV, CMYK, // ... }; } using

Re: property keyword

2009-09-25 Thread Gzp
Thanks, i've found it. Gzp

Re: should protected imply package?

2009-09-25 Thread Max Samukha
Don wrote: Andrei Alexandrescu wrote: In Java, protected-level protection implies package-level protection (see e.g. http://java.sun.com/docs/books/tutorial/java/javaOO/accesscontrol.html). Should we copy that behavior in D, or take advantage of the package keyword and require it as in

Re: Rich Hickey's slides from jvm lang summit - worth a read?

2009-09-25 Thread Rich Hickey
bearophile Wrote: Walter Bright: Executive summary: pure functions and immutable data structures help manage program complexity. There's something missing in most of the articles I've read that praise pure functions and immutable data structures. When I write a 500-lines long Python

Re: Rich Hickey's slides from jvm lang summit - worth a read?

2009-09-25 Thread bearophile
Rich Hickey: You might find this interesting: http://clojure.org/transients It supports using the exact same immutable data structures in/out of your (externally pure) function, as well as the exact same functional shape of your code when using transients (roughly, mutables) internally.

Re: Why not move cast to the standard library?

2009-09-25 Thread Robert Jacques
On Fri, 25 Sep 2009 03:29:21 -0400, Don nos...@nospam.com wrote: [snip] A bit of history: A macro system was planned for D2, and 'macro' was made a reserved word. But in discussions at the end of the first D conference, I demonstrated that the combination of CTFE + string mixins, even in

Re: Why not move cast to the standard library?

2009-09-25 Thread Adam D. Ruppe
On Fri, Sep 25, 2009 at 09:29:21AM +0200, Don wrote: I demonstrated that the combination of CTFE + string mixins, even in D1, was dramatically more powerful than the proposed macros. It became clear that we didn't have a macro design that was anywhere near powerful enough, and macros were

Re: property keyword

2009-09-25 Thread Chad J
http://prowiki.org/wiki4d/wiki.cgi?DocComments/Property

The Non-Virtual Interface idiom in D

2009-09-25 Thread Andrei Alexandrescu
In this article: http://www.gotw.ca/publications/mill18.htm Herb Sutter makes a powerful argument that overridable functions (customization points) should actually not be the same as the publically available interface. This view rhymes with the Template Method pattern as well. This leads

Re: Rich Hickey's slides from jvm lang summit - worth a read?

2009-09-25 Thread Rich Hickey
bearophile Wrote: Rich Hickey: You might find this interesting: http://clojure.org/transients It supports using the exact same immutable data structures in/out of your (externally pure) function, as well as the exact same functional shape of your code when using transients

Re: Pure dynamic casts?

2009-09-25 Thread language_fan
Thu, 24 Sep 2009 22:58:51 -0600, Rainer Deyke thusly wrote: language_fan wrote: The cost of e.g. doubling computing power depends on the domain. If you are building desktop end user applications, they usually should scale from single core atoms to 8-core high-end enthusiastic game computers.

Re: Pure dynamic casts?

2009-09-25 Thread Jeremie Pelletier
language_fan wrote: Thu, 24 Sep 2009 22:58:51 -0600, Rainer Deyke thusly wrote: language_fan wrote: The cost of e.g. doubling computing power depends on the domain. If you are building desktop end user applications, they usually should scale from single core atoms to 8-core high-end

Re: Rich Hickey's slides from jvm lang summit - worth a read?

2009-09-25 Thread Walter Bright
bearophile wrote: Walter Bright: Executive summary: pure functions and immutable data structures help manage program complexity. At the moment in D there aren't many immutable data structures available, but of course they can be written. Such data structures often put the GC under some/high

Re: Rich Hickey's slides from jvm lang summit - worth a read?

2009-09-25 Thread Walter Bright
Rich Hickey wrote: Rich (Early Zortech user and fan, btw) Thanks, and thanks for stopping by and commenting in this thread.

Re: Rich Hickey's slides from jvm lang summit - worth a read?

2009-09-25 Thread Jason House
Walter Bright Wrote: bearophile wrote: Walter Bright: Executive summary: pure functions and immutable data structures help manage program complexity. At the moment in D there aren't many immutable data structures available, but of course they can be written. Such data

Re: Pure dynamic casts?

2009-09-25 Thread Rainer Deyke
language_fan wrote: I do not believe the market works this way. According to that logic popularity correlates with expenses. So if you have e.g. 1 billion users, even $1 in per-user hardware costs causes a billion dollar losses to customers. Is that unacceptable? On the other hand a program

Re: Rich Hickey's slides from jvm lang summit - worth a read?

2009-09-25 Thread Walter Bright
Jason House wrote: Walter Bright Wrote: bearophile wrote: Walter Bright: Executive summary: pure functions and immutable data structures help manage program complexity. At the moment in D there aren't many immutable data structures available, but of course they can be written. Such data

Re: Pure dynamic casts?

2009-09-25 Thread Jarrett Billingsley
On Fri, Sep 25, 2009 at 7:31 PM, Jeremie Pelletier jerem...@gmail.com wrote: language_fan wrote: A used 2.5 GHz Athlon XP with 1GB of RAM and 100GB of disk costs about $100. Anything below that is obsolete these days. Good luck selling anything to people who use older computers, they are

Re: Rich Hickey's slides from jvm lang summit - worth a read?

2009-09-25 Thread bearophile
Rich Hickey: No, I don't. The post is for Clojure users and shows them a relative comparison they care about, persistent vs transient. Unless that code is returning a persistent vector and provides thread isolation, it is not doing the same job. Sorry, I didn't mean to offend you in any way.

Re: Rich Hickey's slides from jvm lang summit - worth a read?

2009-09-25 Thread bearophile
Walter Bright: I've been thinking of transitioning dmd's semantic analysis to using immutable data structures because it will reduce allocations, not increase them. As usual I am ignorant about such matters, so I can't give you a good answer. But from what I've seen in immutable-based

Re: Why not move cast to the standard library?

2009-09-25 Thread bearophile
Adam D. Ruppe: macro max(int a, int b) { return a ~~ b ~ ? ~ a ~ : ~ b; } In std.metastrings there's Format that allows to use a basic form of string templating, that I find a little more readable than many string concats: return a ~~ b ~ ? ~ a ~ : ~ b; ==

Re: property keyword

2009-09-25 Thread BCS
Hello Gzp, Hello, I'm quite new to D, and it seems to be a great language for me. But I've some questions: Hi! Why is it good to treat functions as property, it make the code quite unreadable. With a simple property keyword the things were much clear, like: class Foo { property prop {

Re: The Non-Virtual Interface idiom in D

2009-09-25 Thread Justin Johansson
Andrei Alexandrescu Wrote: In this article: http://www.gotw.ca/publications/mill18.htm Herb Sutter makes a powerful argument that overridable functions (customization points) should actually not be the same as the publically available interface. This view rhymes with the Template

Re: Rich Hickey's slides from jvm lang summit - worth a read?

2009-09-25 Thread Walter Bright
bearophile wrote: Walter Bright: I've been thinking of transitioning dmd's semantic analysis to using immutable data structures because it will reduce allocations, not increase them. As usual I am ignorant about such matters, so I can't give you a good answer. But from what I've seen in

Re: The Non-Virtual Interface idiom in D

2009-09-25 Thread Walter Bright
Andrei Alexandrescu wrote: This feature would require changing some protection rules, I think for the better. What do you think? 1. what are those changes? 2. did you mean to add executable code to an interface?

Re: The Non-Virtual Interface idiom in D

2009-09-25 Thread Rainer Deyke
Andrei Alexandrescu wrote: interface Cloneable(T) if (is(T == class)) { private T doClone(); // must implement but can't call T clone()// this is what everybody can call { auto result = doClone(); assert(typeof(result) == typeof(this));

Re: Rich Hickey's slides from jvm lang summit - worth a read?

2009-09-25 Thread bearophile
Walter Bright: Some languages generate lots of allocations for other reasons, such as lack of value aggregates that can be put on the stack. This is true. But I have no idea how much Haskell/Clojure/F#/OCaML/etc use the stack to allocate temporary things. I'd like to know more about this.

Re: The Non-Virtual Interface idiom in D

2009-09-25 Thread Andrei Alexandrescu
Rainer Deyke wrote: Andrei Alexandrescu wrote: interface Cloneable(T) if (is(T == class)) { private T doClone(); // must implement but can't call T clone()// this is what everybody can call { auto result = doClone(); assert(typeof(result) ==

Re: template parameters

2009-09-25 Thread BCS
Hello Ellery, Hello. Today I was looking at the grammar for template value parameters and realized I didn't know what the conditional expression is for in TemplateValueParameter = BasicType Declarator : ConditionalExpression So what does it do? (I assume = ConditionalExpression is the

Re: template parameters

2009-09-25 Thread Jarrett Billingsley
On Fri, Sep 25, 2009 at 6:48 PM, Ellery Newcomer ellery-newco...@utulsa.edu wrote: Christopher Wright wrote: Ellery Newcomer wrote: Okay, let me rephrase that: When you have a something preceded by a colon in a template value parameter, what are its semantics? Is it the same as a default

Re: What if gc.disable at all

2009-09-25 Thread Sam Hu
Daniel Keep Wrote: How about by reading the error message? Error 42:Symbol Undefined _D5tango4core6Memory2GC6addrOfFpvZPv -- Error 42:Symbol Undefined void* tango.core.Memory.GC.addrOf(void*) Ergo, you didn't link in tango.core.Memory, which it wants. Thanks a lot.But may I ask...so

Re: template parameters

2009-09-25 Thread BCS
Hello Ellery, BCS wrote: Hello Ellery, Hello. Today I was looking at the grammar for template value parameters and realized I didn't know what the conditional expression is for in TemplateValueParameter = BasicType Declarator : ConditionalExpression So what does it do? (I assume =

[Issue 3342] New: TLS on dynamically loaded DLLs fails on Windows earlier than Vista

2009-09-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3342 Summary: TLS on dynamically loaded DLLs fails on Windows earlier than Vista Product: D Version: 2.034 Platform: Other URL: http://www.nynaeve.net/?p=187

[Issue 3343] New: Crash by auto main(){}

2009-09-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3343 Summary: Crash by auto main(){} Product: D Version: 2.032 Platform: Other OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: DMD

[Issue 3343] Crash by auto main(){}

2009-09-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3343 Don clugd...@yahoo.com.au changed: What|Removed |Added Keywords||patch CC|

[Issue 3344] New: Internal error: e2ir.c 644 by a strange return statement

2009-09-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3344 Summary: Internal error: e2ir.c 644 by a strange return statement Product: D Version: 2.032 Platform: Other OS/Version: Windows Status: NEW Severity:

[Issue 3344] ICE(e2ir.c) returning a void function from main()

2009-09-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3344 Don clugd...@yahoo.com.au changed: What|Removed |Added Keywords||ice-on-valid-code

[Issue 3325] ICE(func.c) function literal with post-contract

2009-09-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3325 --- Comment #3 from Sobirari Muhomori ma...@pochta.ru 2009-09-25 05:50:49 PDT --- Hmm... is dmd able to preserve contract info in function pointer type? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ---

[Issue 3325] ICE(func.c) function literal with post-contract

2009-09-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3325 --- Comment #4 from Don clugd...@yahoo.com.au 2009-09-25 05:52:00 PDT --- (In reply to comment #3) Hmm... is dmd able to preserve contract info in function pointer type? No, but this is a function literal, not a function pointer. --

[Issue 3325] ICE(func.c) function literal with post-contract

2009-09-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3325 Sobirari Muhomori ma...@pochta.ru changed: What|Removed |Added Depends on||302 --- Comment #5

[Issue 3325] ICE(func.c) function literal with post-contract

2009-09-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3325 Don clugd...@yahoo.com.au changed: What|Removed |Added Depends on|302 | --- Comment #6 from Don

[Issue 3305] Segfault(expression.c) with recursive struct template alias expressions

2009-09-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=3305 Don clugd...@yahoo.com.au changed: What|Removed |Added Keywords||patch --- Comment #1 from

[Issue 2796] Dependency on libstdc++-v3

2009-09-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2796 Bruno Deligny bruno.deli...@gmail.com changed: What|Removed |Added CC|