New tango conference movies

2009-02-25 Thread Peter Modzelewski
Sorry for not giving any signs of life for so long but new job made me all occupied and I had little time to do anything else. But here I am - back with bunch of goodies: http://petermodzelewski.blogspot.com/2009/02/tango-conference-2008-rolling-dice.html

Re: Inline Functions

2009-02-25 Thread Tomas Lindquist Olsen
On Wed, Feb 25, 2009 at 8:42 AM, Walter Bright newshou...@digitalmars.com wrote: Mason Green (Zzzzrrr) wrote: When I remove -inline there doesn't seem to be much of a difference in execution speed. Try running obj2asm to see if the functions you want inlined are actually inlined or not.

Re: Inline Functions

2009-02-25 Thread Walter Bright
Tomas Lindquist Olsen wrote: perhaps a verbose mode could be added in dmd that prints the pretty printed declaration when a function is inlined. then it would be a simple grep to make sure. dmd -vi foo.d | grep 'foo\.inc' telling people to inspect the obj2asm output seems to be popular, but

Re: Old problem with performance

2009-02-25 Thread Don
Weed wrote: Don пишет: That must mean that you inherit that class only to avoid duplicating code. And that is easily done with template mixins. It is possible that this polymorphism is not needed and should be prohibited for operations by value. The class is ready, why it should not be used

Re: Use case for std.bind

2009-02-25 Thread Lars Kyllingstad
Andrei Alexandrescu wrote: Daniel Keep wrote: The problem I have with these suggestions are that you're basically arguing for an incredibly inflexible, context-dependant, completely unintuitive syntax for something you already have working syntax for. I just don't see the point. I'd agree

Re: Old problem with performance

2009-02-25 Thread Weed
Christopher Wright пишет: Weed wrote: As a result, classes will be slow, or require more code to achieve speeds comparable to C++. That is actually a model of classes D harder than C++. Yes, C++ offers more unsafe optimizations than D. Straight to the point! I am choosing unsafe but fast

Re: Old problem with performance

2009-02-25 Thread Weed
Don пишет: Weed wrote: Don пишет: That must mean that you inherit that class only to avoid duplicating code. And that is easily done with template mixins. It is possible that this polymorphism is not needed and should be prohibited for operations by value. The class is ready, why it should

Re: Mixin virtual functions -- overloads

2009-02-25 Thread Michel Fortin
On 2009-02-23 18:09:54 -0500, Justin mrjn...@gmail.com said: Compilation breaks at the second line with these errors: A.d(122): function alias A.BindableProperty.Register called with argument types: (char[5u],TypeInfo,Duck,uint) matches both:

Re: Old problem with performance

2009-02-25 Thread bearophile
Weed: We do not schoolgirls! :) Who is afraid of the complexity should use BASIC. I like D1 mostly because it's quite less complex that C++, that's the first thing I ask to a new language like D. Complexity kills. You probably don't want D, you want ATS: http://www.ats-lang.org/ Bye,

Re: Old problem with performance

2009-02-25 Thread Weed
bearophile пишет: Weed: We do not schoolgirls! :) Who is afraid of the complexity should use BASIC. I like D1 mostly because it's quite less complex that C++, that's the first thing I ask to a new language like D. Complexity kills. I am cite myself: That is actually a model of classes D

Re: Use case for std.bind

2009-02-25 Thread Jason House
Andrei Alexandrescu Wrote: Daniel Keep wrote: The problem I have with these suggestions are that you're basically arguing for an incredibly inflexible, context-dependant, completely unintuitive syntax for something you already have working syntax for. I just don't see the point. I'd

Re: Is implicit string literal concatenation a good thing?

2009-02-25 Thread Miles
Frank Benoit wrote: Find the bug: static string[] KEYWORDS = [ abstract, alias, align, asm, Out of curiosity, are you trying to create a D parser? Because private:, protected:, public: and ~this are not keywords.

Re: Old problem with performance

2009-02-25 Thread Andrei Alexandrescu
Weed wrote: Don пишет: Language complexity. We do not schoolgirls! :) I guess superdan might disagree here :o). Andrei

Re: Inline Functions

2009-02-25 Thread Jarrett Billingsley
On Wed, Feb 25, 2009 at 3:26 AM, Walter Bright newshou...@digitalmars.com wrote: Also, if you are trying to optimize the code by trying various tweaks at the statement level, it's much like shooting skeet blindfolded if you don't look at the asm output. It's time consuming and unlikely to be

Re: Use case for std.bind

2009-02-25 Thread Andrei Alexandrescu
Jason House wrote: Andrei Alexandrescu Wrote: int plus(int x, int y} { return x + y; } auto plus5 = curry!(plus)(5); assert(plus5(10) == 15); typeof(plus5) will be a little struct that may be cumbersome to pass around, in which case you do want to take the toll of the indirect call by writing:

Re: Inline Functions

2009-02-25 Thread Jarrett Billingsley
On Wed, Feb 25, 2009 at 9:09 AM, Jarrett Billingsley jarrett.billings...@gmail.com wrote: On Wed, Feb 25, 2009 at 3:26 AM, Walter Bright newshou...@digitalmars.com wrote: Also, if you are trying to optimize the code by trying various tweaks at the statement level, it's much like shooting

Re: Old problem with performance

2009-02-25 Thread Daniel Keep
bearophile wrote: Weed: We do not schoolgirls! :) Who is afraid of the complexity should use BASIC. I like D1 mostly because it's quite less complex that C++, that's the first thing I ask to a new language like D. Complexity kills. You probably don't want D, you want ATS:

Re: Old problem with performance

2009-02-25 Thread Daniel Keep
Weed wrote: bearophile пишет: Weed: We do not schoolgirls! :) Who is afraid of the complexity should use BASIC. I like D1 mostly because it's quite less complex that C++, that's the first thing I ask to a new language like D. Complexity kills. I am cite myself: That is actually a model

Re: Old problem with performance

2009-02-25 Thread Weed
Daniel Keep пишет: Weed wrote: bearophile пишет: Weed: We do not schoolgirls! :) Who is afraid of the complexity should use BASIC. I like D1 mostly because it's quite less complex that C++, that's the first thing I ask to a new language like D. Complexity kills. I am cite myself: That

Re: Is implicit string literal concatenation a good thing?

2009-02-25 Thread Frank Benoit
Miles schrieb: Frank Benoit wrote: Find the bug: static string[] KEYWORDS = [ abstract, alias, align, asm, Out of curiosity, are you trying to create a D parser? Because private:, protected:, public: and ~this are not keywords. Thats just a snippets I got from a dwt user. After pasting

Re: Old problem with performance

2009-02-25 Thread Bill Baxter
On Wed, Feb 25, 2009 at 11:47 PM, Daniel Keep daniel.keep.li...@gmail.com wrote: bearophile wrote: Weed: We do not schoolgirls! :) Who is afraid of the complexity should use BASIC. I like D1 mostly because it's quite less complex that C++, that's the first thing I ask to a new language

Re: Inline Functions

2009-02-25 Thread Mason Green
Hi, I made a few fixes to my demo, and it now appears to run on par with Java. It seems I made a very rookie mistake on my main demo loop. Check out Blaze demo #3: http://svn.dsource.org/projects/blaze/downloads/blazeDemos.zip Cycle through (with arrows) and compare it to the Java pyramid

Re: Inline Functions

2009-02-25 Thread Daniel Keep
Mason Green wrote: Hi, I made a few fixes to my demo, and it now appears to run on par with Java. It seems I made a very rookie mistake on my main demo loop. Check out Blaze demo #3: http://svn.dsource.org/projects/blaze/downloads/blazeDemos.zip Cycle through (with arrows) and

Re: Inline Functions

2009-02-25 Thread bearophile
Mason Green: I made a few fixes to my demo, and it now appears to run on par with Java. It seems I made a very rookie mistake on my main demo loop. Check out Blaze demo #3: http://svn.dsource.org/projects/blaze/downloads/blazeDemos.zip Why do you use lines with a thickness of 2?

Re: Old problem with performance

2009-02-25 Thread Kagamin
Daniel Keep Wrote: You probably don't want D, you want ATS: http://www.ats-lang.org/ Bye, bearophile http://www.ats-lang.org/EXAMPLE/MISC/listquicksort.dats Dear god. I think... I think I'm going to go cry in the corner... Is it common for functional languages to love 1-letter

Now it works. Weird

2009-02-25 Thread Justin
I tried it again and it works just fine. My unittest must have been screwy at the time. If you're curious about what I was doing, I've attached the source. If you're familiar with .Net, think DependencyProperty. module epic.bindableobject; /** * The Bindable Property System. * A part of the

Re: Now it works. Weird

2009-02-25 Thread BCS
Hello Justin, I tried it again and it works just fine. My unittest must have been screwy at the time. If you're curious about what I was doing, I've attached the source. If you're familiar with .Net, think DependencyProperty. what is it?

Re: Now it works. Weird

2009-02-25 Thread BCS
Hello BCS, Hello Justin, I tried it again and it works just fine. My unittest must have been screwy at the time. If you're curious about what I was doing, I've attached the source. If you're familiar with .Net, think DependencyProperty. what is it? as in what where were you talking about

Re: Now it works. Weird

2009-02-25 Thread Justin
Sorry, that was in re my thread about mixin overloads. BCS Wrote: Hello Justin, I tried it again and it works just fine. My unittest must have been screwy at the time. If you're curious about what I was doing, I've attached the source. If you're familiar with .Net, think

Re: Use case for std.bind

2009-02-25 Thread Denis Koroskin
On Wed, 25 Feb 2009 17:19:30 +0300, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: Jason House wrote: Andrei Alexandrescu Wrote: int plus(int x, int y} { return x + y; } auto plus5 = curry!(plus)(5); assert(plus5(10) == 15); typeof(plus5) will be a little struct that may be

Re: Use case for std.bind

2009-02-25 Thread Georg Wrede
Andrei Alexandrescu wrote: I tried to launch a thread asking people for designs, met with a thundering silence (in contrast, ironically, there's been a lot of interest in creating ad-hoc syntax). If you're referring to your post earlier in this thread, where you wrote: So, I'm renaming this

Anyone want to maintain Planet D?

2009-02-25 Thread Anders Bergh
Hi, I need someone to take over Planet D because I don't have time for maintaining it. I use Planet Planet to generate static HTML which is uploaded to dsource, so there's no web hosting involved. All it needs to work is Python, cron and ncftp. Adding new feeds is very simple, it's just a

Re: Use case for std.bind

2009-02-25 Thread Walter Bright
Jason House wrote: I'd give better examples/details if I wasn't typing this with my thumb into a cell phone... You do caps, quotes, special characters, correct grammar with your thumb on a cell phone?! I'm impressed! I can't bother with that without a full keyboard. Doing text on a phone

Re: Use case for std.bind

2009-02-25 Thread Jarrett Billingsley
On Wed, Feb 25, 2009 at 5:50 PM, Walter Bright newshou...@digitalmars.com wrote: You do caps, quotes, special characters, correct grammar with your thumb on a cell phone?! I'm impressed! I can't bother with that without a full keyboard. Doing text on a phone keypad is agony for me. There are

Re: Old problem with performance

2009-02-25 Thread Christopher Wright
Weed wrote: Christopher Wright пишет: Weed wrote: As a result, classes will be slow, or require more code to achieve speeds comparable to C++. That is actually a model of classes D harder than C++. Yes, C++ offers more unsafe optimizations than D. Straight to the point! I am choosing

Re: Use case for std.bind

2009-02-25 Thread Walter Bright
Jarrett Billingsley wrote: There are cell phones with QWERTY keypads (or touchscreens) now, you know ;) I am soo obsolete g! My cell phone has a number pad on it. When I even bother to put a charge on it.

Re: Use case for std.bind

2009-02-25 Thread Andrei Alexandrescu
Jason House wrote: The first follow-up to your reply captured the kind of messiness bind can bring in C++. So far, all your examples are trivial (lack argument reordering, function composition, etc...). It's true that your examples look clean, but the devil will be in the details. I see. The

Re: Old problem with performance

2009-02-25 Thread Ellery Newcomer
Bill Baxter wrote: On Wed, Feb 25, 2009 at 11:47 PM, Daniel Keep daniel.keep.li...@gmail.com wrote: bearophile wrote: Weed: We do not schoolgirls! :) Who is afraid of the complexity should use BASIC. I like D1 mostly because it's quite less complex that C++, that's the first thing I ask to

Re: Use case for std.bind

2009-02-25 Thread Christopher Wright
Walter Bright wrote: Jason House wrote: I'd give better examples/details if I wasn't typing this with my thumb into a cell phone... You do caps, quotes, special characters, correct grammar with your thumb on a cell phone?! I'm impressed! I can't bother with that without a full keyboard.

Re: Old problem with performance

2009-02-25 Thread Christopher Wright
Kagamin wrote: Daniel Keep Wrote: You probably don't want D, you want ATS: http://www.ats-lang.org/ Bye, bearophile http://www.ats-lang.org/EXAMPLE/MISC/listquicksort.dats Dear god. I think... I think I'm going to go cry in the corner... Is it common for functional languages to love

Re: Use case for std.bind

2009-02-25 Thread Bill Baxter
On Thu, Feb 26, 2009 at 9:21 AM, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: Jason House wrote: The first follow-up to your reply captured the kind of messiness bind can bring in C++. So far, all your examples are trivial (lack argument reordering, function composition, etc...).

Re: Use case for std.bind

2009-02-25 Thread Jason House
Andrei Alexandrescu wrote: Jason House wrote: The first follow-up to your reply captured the kind of messiness bind can bring in C++. So far, all your examples are trivial (lack argument reordering, function composition, etc...). It's true that your examples look clean, but the devil will be

Re: Use case for std.bind

2009-02-25 Thread Jason House
Walter Bright wrote: Jason House wrote: I'd give better examples/details if I wasn't typing this with my thumb into a cell phone... You do caps, quotes, special characters, correct grammar with your thumb on a cell phone?! I'm impressed! I can't bother with that without a full keyboard.

Re: Old problem with performance

2009-02-25 Thread dsimcha
== Quote from Christopher Wright (dhase...@gmail.com)'s article Kagamin wrote: Daniel Keep Wrote: You probably don't want D, you want ATS: http://www.ats-lang.org/ Bye, bearophile http://www.ats-lang.org/EXAMPLE/MISC/listquicksort.dats Dear god. I think... I think I'm going

Re: Inline Functions

2009-02-25 Thread Walter Bright
Jarrett Billingsley wrote: In this case it's not entirely helpful that DMD's inlining rules are completely opaque. Do you have a list of what DMD will and won't inline, and their justifications? If not, could you make one? In the immortal words of Oggie-Ben-Doggie, use the source, Luke. In

Re: Use case for std.bind

2009-02-25 Thread Daniel Keep
Christopher Wright wrote: Walter Bright wrote: Jason House wrote: I'd give better examples/details if I wasn't typing this with my thumb into a cell phone... You do caps, quotes, special characters, correct grammar with your thumb on a cell phone?! I'm impressed! I can't bother with that

Re: Inline Functions

2009-02-25 Thread Walter Bright
Jarrett Billingsley wrote: Also, looking at the DMD frontend source is *not* an acceptable option. I knew you'd say that g. On the other hand, inlining or not is, like register allocation and any other optimizations, highly implementation dependent. If you're going to micro-optimize at that

Re: Old problem with performance

2009-02-25 Thread Simen Kjaeraas
dsimcha dsim...@yahoo.com wrote: I find linear algebra impossible to grok largely because some genius mathematician decided to overload a bunch of operators to mean completely different things when dealing with matrices than when dealing with scalars. Heck, the multiplication operator

Re: Old problem with performance

2009-02-25 Thread Andrei Alexandrescu
dsimcha wrote: == Quote from Christopher Wright (dhase...@gmail.com)'s article Kagamin wrote: Daniel Keep Wrote: You probably don't want D, you want ATS: http://www.ats-lang.org/ Bye, bearophile http://www.ats-lang.org/EXAMPLE/MISC/listquicksort.dats Dear god. I think... I think I'm

Re: Inline Functions

2009-02-25 Thread Jarrett Billingsley
On Wed, Feb 25, 2009 at 8:59 PM, Walter Bright newshou...@digitalmars.com wrote: Jarrett Billingsley wrote: Also, looking at the DMD frontend source is *not* an acceptable option. I knew you'd say that g. I knew you'd suggest it ;) On the other hand, inlining or not is, like register

Re: Use case for std.bind

2009-02-25 Thread Michel Fortin
On 2009-02-25 14:36:43 -0500, Denis Koroskin 2kor...@gmail.com said: With built-in D delegate syntax, there is no ambiguity and mistake: auto x = (int x) { foo(x, 42); }; That's *the best* syntax I can think of. Just keep it and let the std.bind go. Don't waste your precious time of fixing

Re: Inline Functions

2009-02-25 Thread Walter Bright
Jarrett Billingsley wrote: True. However defining what the compiler does in these optimizations is not just in the interest of performance, but also in the interest of correctness and other implementations. Optimization should have nothing to do with correctness. If everyone can see what

Beginning with D

2009-02-25 Thread Prestidigitator
Is D as good at game programming as C++? Also, would it be better to use 1.0 or 2.0?

Re: Beginning with D

2009-02-25 Thread Daniel Keep
Prestidigitator wrote: Is D as good at game programming as C++? Also, would it be better to use 1.0 or 2.0? D is a good language, and there are people writing games with it; just look at Deadlock [1] or Mayhem Intergalactic [2] (the latter of which is on sale right now!). As for the D

Re: Beginning with D

2009-02-25 Thread Nick Sabalausky
Daniel Keep daniel.keep.li...@gmail.com wrote in message news:go520b$1o5...@digitalmars.com... Prestidigitator wrote: Is D as good at game programming as C++? Also, would it be better to use 1.0 or 2.0? D is a good language, and there are people writing games with it; just look at

Re: Beginning with D

2009-02-25 Thread Rainer Deyke
Prestidigitator wrote: Is D as good at game programming as C++? Also, would it be better to use 1.0 or 2.0? My opinion: D 1.0 is, on the whole, worse than C++. D 2.0 is shaping up to be, on the whole, better than C++. However, D 2.0 is unstable to the point of being unusable at the moment.

Re: Beginning with D

2009-02-25 Thread Bill Baxter
On Thu, Feb 26, 2009 at 2:25 PM, Rainer Deyke rain...@eldwood.com wrote: Prestidigitator wrote: Is D as good at game programming as C++? Also, would it be better to use 1.0 or 2.0? My opinion: D 1.0 is, on the whole, worse than C++.  D 2.0 is shaping up  to be, on the whole, better than C++.

Nick Sabalausky

2009-02-25 Thread Brad Roberts
Hey Nick, Sorry to send this publicly, but due to lack of a valid email address it's hard to keep it from being spam for everyone else. You registered with d's bugzilla using an email address that's no longer valid and I'm getting a bounce for each message it tries to send to you. Would you

Re: Beginning with D

2009-02-25 Thread Bill Baxter
On Thu, Feb 26, 2009 at 3:17 PM, Rainer Deyke rain...@eldwood.com wrote: Bill Baxter wrote: There are many categories in which D is behind C++, but as far as the core language goes, I would choose to use D1.0 over C++ any day. I would not.  To this C++ programmer, using D 1.0 feels like

Re: Any way to track memory allocations?

2009-02-25 Thread Sean Kelly
Jarrett Billingsley wrote: On Tue, Feb 24, 2009 at 12:00 PM, wade Shen swadena...@gmail.com wrote: Is there a way to track down where memory is being allocated if I'm using phobos? Any recommendations would be appreciated. This is something I have *always* wanted. Unfortunately I don't

Re: Generic functions to convert to void* and from void*

2009-02-25 Thread TSalm
Le Wed, 25 Feb 2009 01:03:32 +0100, Daniel Keep daniel.keep.li...@gmail.com a écrit: TSalm wrote: In my case, there's also no possibility to get the wrong type, because it is managed by the type of the ColumnMem. You still have to get the code right. There's a surprising number of corner

chaining

2009-02-25 Thread Brian
I want to use a chaining system for easy setting of object attributes, which would work great for a single object, unfortunately derived classes cannot inherit the chained functions implicitly, whats the best way around this? class Base { int x; Base foo(int x_) {

Re: chaining

2009-02-25 Thread BCS
Reply to Brian, I want to use a chaining system for easy setting of object attributes, which would work great for a single object, unfortunately derived classes cannot inherit the chained functions implicitly, whats the best way around this? class Base { int x; Base foo(int x_) { this.x = x_;

[Issue 675] %a format has an out-by-1 bug for denormals.

2009-02-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=675 clugd...@yahoo.com.au changed: What|Removed |Added Summary|%a format is wrong for |%a format has an out-by-1

OSX stream seek/read problem

2009-02-25 Thread wade
The following code behaves differently on OSX than LINUX (DMD 1.040): import std.stdio; import std.stream; import std.file; int Lines(Stream f) { int ln = 0; foreach (char[] line; f) ln++; return ln; } void main(char[][] args) { auto f = new BufferedFile(args[1]); int l = Lines(f);

[Issue 2689] New: seek behaves incorrectly on MAC OSX

2009-02-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2689 Summary: seek behaves incorrectly on MAC OSX Product: D Version: 1.040 Platform: Macintosh OS/Version: Mac OS X Status: NEW Severity: normal Priority: P2

Re: OSX stream seek/read problem

2009-02-25 Thread Kagamin
wade Wrote: Seek not working properly perhaps? May be related... http://www.opendarwin.info/opendarwin.org/en/faq/ch04.html#lseek

Re: OSX stream seek/read problem

2009-02-25 Thread Kagamin
Kagamin Wrote: wade Wrote: Seek not working properly perhaps? May be related... http://www.opendarwin.info/opendarwin.org/en/faq/ch04.html#lseek seems like phobos needs some error handling.

[Issue 2690] New: DMD aborts with MALLOC_CHECK_ set

2009-02-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2690 Summary: DMD aborts with MALLOC_CHECK_ set Product: D Version: 1.040 Platform: Other OS/Version: Linux Status: NEW Keywords: ice-on-invalid-code Severity:

Re: [Issue 2690] New: DMD aborts with MALLOC_CHECK_ set

2009-02-25 Thread Lutger
Also happens in dmd 2.025 When MALLOC_CHECK_ set to 1, I get the following message: *** glibc detected *** dmd: realloc(): invalid pointer: 0x08d2c6a8 *** Segmentation fault

Re: [Issue 2690] New: DMD aborts with MALLOC_CHECK_ set

2009-02-25 Thread Jarrett Billingsley
On Wed, Feb 25, 2009 at 7:05 PM, Denis Koroskin 2kor...@gmail.com wrote: On Thu, 26 Feb 2009 02:27:43 +0300, Lutger lutger.blijdest...@gmail.com wrote: Also happens in dmd 2.025 When MALLOC_CHECK_ set to 1, I get the following message: *** glibc detected *** dmd: realloc(): invalid

Re: [Issue 2690] New: DMD aborts with MALLOC_CHECK_ set

2009-02-25 Thread Denis Koroskin
On Thu, 26 Feb 2009 03:24:06 +0300, Jarrett Billingsley jarrett.billings...@gmail.com wrote: On Wed, Feb 25, 2009 at 7:05 PM, Denis Koroskin 2kor...@gmail.com wrote: On Thu, 26 Feb 2009 02:27:43 +0300, Lutger lutger.blijdest...@gmail.com wrote: Also happens in dmd 2.025 When

[Issue 2691] New: Property syntax does not work with template methods

2009-02-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2691 Summary: Property syntax does not work with template methods Product: D Version: 1.00 Platform: PC OS/Version: Linux Status: NEW Keywords: rejects-valid Severity:

[Issue 2575] gdb can not show code

2009-02-25 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2575 --- Comment #8 from mihail.zen...@gmail.com 2009-02-25 20:46 --- It undocumented but widely used. IMHO better use them for mangled name than DW_AT_name. Current way violates DWARF: Because the names of program objects described by