Re: Size does matter: TDPL reaches the size of Modern C++ Design

2009-11-02 Thread Chad J
Andrei Alexandrescu wrote: > Modern C++ Design has 323 pages including index. I'm glad to report that > just about now TDPL has reached the same size. Let's hope the quality > of TDPL is better! > > Follow TDPL progress in real-time at http://erdani.com. > > I wish I could mark this anniversary

Re: please explain the spec: alias type specialization

2009-11-02 Thread Paul Thompson
== Quote from Russell Lewis (webmas...@villagersonline.com)'s article > I have a set of templates which take alias parameters, and I want to > specialize them based on the type of the aliased symbols. > So I looked at > http://digitalmars.com/d/2.0/template.html#TemplateAliasParameter and > saw the

Memory Management in D: Request for Comment

2009-11-02 Thread dsimcha
During my occasional forays into the dark side of Python and Java, I am often amazed at the extent to which memory management in these languages "just works". D should be like this for all but the most low-level programming tasks, and was intended to be. It seems like most of the other regulars h

Re: DIP8: Templating ClassInfo and TypeInfo

2009-11-02 Thread grauzone
dsimcha wrote: http://prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP8 Abstract: Currently, the layout of D's runtime type info, or RTTI, is defined in object.d. The details of how the fields of each instantiation of these classes are populated are buried deep inside the compiler. If ClassIn

Re: Does DMD produce working programs on Snow Leopard?

2009-11-02 Thread Walter Bright
Justin Whear wrote: Ok, I'll look forward to that. Do you know if 10.6 makes any effort to be backwards compatible? That is, could I build on 10.5 and then distribute to boxes with 10.6 installed? I have no idea. I do know that it was necessary to jump through obscure hoops to get a 10.5 prog

Re: DIP8: Templating ClassInfo and TypeInfo

2009-11-02 Thread dsimcha
== Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s article > dsimcha wrote: > > http://prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP8 > > > > Abstract: > > > > Currently, the layout of D's runtime type info, or RTTI, is defined in > > object.d. The details of how the fields of

Re: DIP8: Templating ClassInfo and TypeInfo

2009-11-02 Thread Andrei Alexandrescu
dsimcha wrote: http://prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP8 Abstract: Currently, the layout of D's runtime type info, or RTTI, is defined in object.d. The details of how the fields of each instantiation of these classes are populated are buried deep inside the compiler. If ClassIn

DIP8: Templating ClassInfo and TypeInfo

2009-11-02 Thread dsimcha
http://prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP8 Abstract: Currently, the layout of D's runtime type info, or RTTI, is defined in object.d. The details of how the fields of each instantiation of these classes are populated are buried deep inside the compiler. If ClassInfo and TypeInfo w

Re: Does DMD produce working programs on Snow Leopard?

2009-11-02 Thread Sean Kelly
10.6 is as backwards-compatible as 10.5, so in theory you should be able to build on either and distribute on either. However, it sounds like this *may* not be possible in this case if the problem between 10.5 and 10.6 involves a change in how object files are processed/generated (assuming a co

Re: Proposal: Replace __traits and is(typeof(XXX)) with a 'magic namespace'.

2009-11-02 Thread Leandro Lucarella
Don, el 2 de noviembre a las 20:19 me escribiste: > >>Names which have been suggested include 'meta', 'traits', > >>'scope', 'compiler'. Personally I think 'meta' is the nicest > >>(and I suggested two of the others ). > > > >Another keyword, sigh... > > > >And I'll be darned if "static" isn't the

Re: Any version of any D compiler that works properly on Mac OS X

2009-11-02 Thread zonk
Anders F Björklund Wrote: > GDC "should" be able to build for Mac OS X 10.6, > if using the legacy gcc-4.0 compiler (gcc-5484) > > http://opensource.apple.com/tarballs/gcc/gcc-5484.tar.gz (Xcode 3.1) > http://downloads.sourceforge.net/gdcmac/gdc-trunk-r229-apple-gcc-5484.patch I'm not sure if I

Re: Any version of any D compiler that works properly on Mac OS X

2009-11-02 Thread zonk
Anders F Björklund Wrote: > GDC "should" be able to build for Mac OS X 10.6, > if using the legacy gcc-4.0 compiler (gcc-5484) > > http://opensource.apple.com/tarballs/gcc/gcc-5484.tar.gz (Xcode 3.1) > http://downloads.sourceforge.net/gdcmac/gdc-trunk-r229-apple-gcc-5484.patch I'm not sure if I

Re: module hijacking

2009-11-02 Thread Leandro Lucarella
Steven Schveighoffer, el 2 de noviembre a las 10:59 me escribiste: > >The opposite of hijacking would be if any duplicates found would > >be an error. > > No, this is also a form of hijacking -- namespace hijacking. > > example: > > I write an application, defining a small internal library foo.

Re: Grokking ranges: some new algorithms and ranges

2009-11-02 Thread Philippe Sigaud
On Mon, Nov 2, 2009 at 10:14, bearophile wrote: > Philippe Sigaud: > > Hello, it seems you have re-done with ranges for D2 a good amount of things > I did for D1: > http://www.fantascienza.net/leonardo/so/libs_d.zip > > Ah yes, I meant to look at your libraries, but forgot to do it. I'll have a l

Re: Grokking ranges: some new algorithms and ranges

2009-11-02 Thread Lutger
Philippe Sigaud wrote: > On Mon, Nov 2, 2009 at 18:20, Lutger wrote: > > >> If you're up to it, something like a 'post-mortem' style article about >> your experiences would be very interesting! >> > > You mean like "How I came to love templates" or "Trying to be > fun(ctional)"? > > > Philip

Re: Grokking ranges: some new algorithms and ranges

2009-11-02 Thread Philippe Sigaud
On Mon, Nov 2, 2009 at 18:20, Lutger wrote: > If you're up to it, something like a 'post-mortem' style article about your > experiences would be very interesting! > You mean like "How I came to love templates" or "Trying to be fun(ctional)"? Philippe

Re: Does DMD produce working programs on Snow Leopard?

2009-11-02 Thread Justin Whear
Ok, I'll look forward to that. Do you know if 10.6 makes any effort to be backwards compatible? That is, could I build on 10.5 and then distribute to boxes with 10.6 installed? Walter Bright Wrote: > Justin Whear wrote: > > All this is with dmd 1.050 on a Mac Mini running Mac OS X 10.6.1. I > >

Re: Grokking ranges: some new algorithms and ranges

2009-11-02 Thread Walter Bright
Lutger wrote: Philippe Sigaud wrote: On Mon, Nov 2, 2009 at 00:47, Walter Bright wrote: ... What you're doing is great fodder for an article. Care to write one? You know, I'm pretty sure my code is no so good to look at. As I said, I'm no professional coder. I guess if all goes well, I can

Re: Does DMD produce working programs on Snow Leopard?

2009-11-02 Thread Walter Bright
Justin Whear wrote: All this is with dmd 1.050 on a Mac Mini running Mac OS X 10.6.1. I believe this is the OS X version that most of my end-users (associates) are using, so I need to target it. Is DMD going to be updated to produce working binaries on this system? Currently, no, dmd only works

Re: Proposal: Replace __traits and is(typeof(XXX)) with a 'magic namespace'.

2009-11-02 Thread dsimcha
== Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s article > Don wrote: > > Andrei Alexandrescu wrote: > >> Don wrote: > >>> [I'm moving this from deep inside a TDPL thread, since I think it's > >>> important] > >>> > >>> is(typeof(XXX)) is infamously ugly and unintuitive > >>> __t

Re: Generating headers with -H

2009-11-02 Thread Denis Koroskin
On Mon, 02 Nov 2009 22:48:59 +0300, grauzone wrote: Andrei Alexandrescu wrote: This question may actually belong in .learn. What's exactly eliminated from the header generated with -H? I tried it just now and was surprised to see that the generated .di file includes the function bodies of

Re: Proposal: Replace __traits and is(typeof(XXX)) with a 'magic namespace'.

2009-11-02 Thread Andrei Alexandrescu
Don wrote: Andrei Alexandrescu wrote: Don wrote: [I'm moving this from deep inside a TDPL thread, since I think it's important] is(typeof(XXX)) is infamously ugly and unintuitive __traits(compiles, XXX) is more comprehensible, but just as ugly. They are giving metaprogramming in D a bad name

Re: Generating headers with -H

2009-11-02 Thread grauzone
Andrei Alexandrescu wrote: This question may actually belong in .learn. What's exactly eliminated from the header generated with -H? I tried it just now and was surprised to see that the generated .di file includes the function bodies of regular (non-template) functions and methods. I was un

Re: Proposal: Replace __traits and is(typeof(XXX)) with a 'magic namespace'.

2009-11-02 Thread Steven Schveighoffer
On Mon, 02 Nov 2009 11:47:53 -0500, Don wrote: [I'm moving this from deep inside a TDPL thread, since I think it's important] is(typeof(XXX)) is infamously ugly and unintuitive __traits(compiles, XXX) is more comprehensible, but just as ugly. They are giving metaprogramming in D a bad name.

Re: The Thermopylae excerpt of TDPL available online

2009-11-02 Thread grauzone
Don wrote: Jason House wrote: Don Wrote: Leandro Lucarella wrote: Justin Johansson, el 30 de octubre a las 08:42 me escribiste: Actually, I think I like that better than 'traits'. -Lars I'm in agreement with whoever suggested 'meta' or just about anything else except 'traits'. 'meta', whi

Re: Proposal: Replace __traits and is(typeof(XXX)) with a 'magic namespace'.

2009-11-02 Thread Don
Andrei Alexandrescu wrote: Don wrote: [I'm moving this from deep inside a TDPL thread, since I think it's important] is(typeof(XXX)) is infamously ugly and unintuitive __traits(compiles, XXX) is more comprehensible, but just as ugly. They are giving metaprogramming in D a bad name. I think we

Re: Proposal: Replace __traits and is(typeof(XXX)) with a 'magic namespace'.

2009-11-02 Thread Andrei Alexandrescu
Steven Schveighoffer wrote: On Mon, 02 Nov 2009 13:17:18 -0500, Andrei Alexandrescu wrote: Don wrote: [I'm moving this from deep inside a TDPL thread, since I think it's important] is(typeof(XXX)) is infamously ugly and unintuitive __traits(compiles, XXX) is more comprehensible, but just a

Re: Proposal: Replace __traits and is(typeof(XXX)) with a 'magic namespace'.

2009-11-02 Thread Moritz Warning
On Mon, 02 Nov 2009 17:47:53 +0100, Don wrote: > [I'm moving this from deep inside a TDPL thread, since I think it's > important] > > is(typeof(XXX)) is infamously ugly and unintuitive __traits(compiles, > XXX) is more comprehensible, but just as ugly. > I like your proposal. __traits is a rats

Re: Proposal: Replace __traits and is(typeof(XXX)) with a 'magic namespace'.

2009-11-02 Thread dsimcha
== Quote from Don (nos...@nospam.com)'s article > [I'm moving this from deep inside a TDPL thread, since I think it's > important] > is(typeof(XXX)) is infamously ugly and unintuitive > __traits(compiles, XXX) is more comprehensible, but just as ugly. > They are giving metaprogramming in D a bad na

Re: Proposal: Replace __traits and is(typeof(XXX)) with a 'magic namespace'.

2009-11-02 Thread Moritz Warning
On Mon, 02 Nov 2009 13:17:36 -0500, Steven Schveighoffer wrote: > On Mon, 02 Nov 2009 13:17:18 -0500, Andrei Alexandrescu > wrote: > >> Don wrote: >>> [I'm moving this from deep inside a TDPL thread, since I think it's >>> important] >>> is(typeof(XXX)) is infamously ugly and unintuitive >>> __

Re: Proposal: Replace __traits and is(typeof(XXX)) with a 'magic namespace'.

2009-11-02 Thread Steven Schveighoffer
On Mon, 02 Nov 2009 13:17:18 -0500, Andrei Alexandrescu wrote: Don wrote: [I'm moving this from deep inside a TDPL thread, since I think it's important] is(typeof(XXX)) is infamously ugly and unintuitive __traits(compiles, XXX) is more comprehensible, but just as ugly. They are giving me

Does DMD produce working programs on Snow Leopard?

2009-11-02 Thread Justin Whear
I've been trying to get some SDL windowing code to run on Snow Leopard and been getting mysterious bus errors. After some poking around, I think the problems are rather more fundamental in nature. Observe the following code: module test1; import std.stdio; void main() { B b = new B(); }

Re: Proposal: Replace __traits and is(typeof(XXX)) with a 'magic

2009-11-02 Thread Justin Johansson
Simen Kjaeraas Wrote: > Don wrote: > > > > > Votes++ > > Meta, I feel, is a very fitting name as well. > > -- > Simen ++Votes Justin

Re: Proposal: Replace __traits and is(typeof(XXX)) with a 'magic namespace'.

2009-11-02 Thread Bill Baxter
On Mon, Nov 2, 2009 at 8:47 AM, Don wrote: > [I'm moving this from deep inside a TDPL thread, since I think it's > important] > > is(typeof(XXX)) is infamously ugly and unintuitive > __traits(compiles, XXX) is more comprehensible, but just as ugly. > > They are giving metaprogramming in D a bad na

Re: Any version of any D compiler that works properly on Mac OS X 10.6?

2009-11-02 Thread Anders F Björklund
zonk wrote: Is anybody developing in D on Snow Leopard? ... • GDC is only for 10.4 and 10.5. GDC "should" be able to build for Mac OS X 10.6, if using the legacy gcc-4.0 compiler (gcc-5484) http://opensource.apple.com/tarballs/gcc/gcc-5484.tar.gz (Xcode 3.1) http://downloads.sourceforge.net

Re: Proposal: Replace __traits and is(typeof(XXX)) with a 'magic namespace'.

2009-11-02 Thread Lutger
Andrei Alexandrescu wrote: > Don wrote: >> [I'm moving this from deep inside a TDPL thread, since I think it's >> important] >> >> is(typeof(XXX)) is infamously ugly and unintuitive >> __traits(compiles, XXX) is more comprehensible, but just as ugly. >> >> They are giving metaprogramming in D a

Re: Generating headers with -H

2009-11-02 Thread Frank Benoit
I think there should be also something added in .di generation: http://d.puremagic.com/issues/show_bug.cgi?id=2795

Re: Proposal: Replace __traits and is(typeof(XXX)) with a 'magic namespace'.

2009-11-02 Thread Max Samukha
On Mon, 02 Nov 2009 17:47:53 +0100, Don wrote: >[I'm moving this from deep inside a TDPL thread, since I think it's >important] > >is(typeof(XXX)) is infamously ugly and unintuitive >__traits(compiles, XXX) is more comprehensible, but just as ugly. > >They are giving metaprogramming in D a bad n

Re: Generating headers with -H

2009-11-02 Thread Andrei Alexandrescu
Steven Schveighoffer wrote: On Mon, 02 Nov 2009 11:53:12 -0500, Andrei Alexandrescu wrote: This question may actually belong in .learn. What's exactly eliminated from the header generated with -H? I tried it just now and was surprised to see that the generated .di file includes the functio

Re: Proposal: Replace __traits and is(typeof(XXX)) with a 'magic namespace'.

2009-11-02 Thread Lutger
This would help so much, I do hope it will make it in D2.

Re: Grokking ranges: some new algorithms and ranges

2009-11-02 Thread Lutger
Philippe Sigaud wrote: > On Mon, Nov 2, 2009 at 00:47, Walter Bright > wrote: ... >> What you're doing is great fodder for an article. Care to write one? >> > > > You know, I'm pretty sure my code is no so good to look at. As I said, I'm > no professional coder. I guess if all goes well, I can w

Re: Proposal: Replace __traits and is(typeof(XXX)) with a 'magic namespace'.

2009-11-02 Thread Andrei Alexandrescu
Don wrote: [I'm moving this from deep inside a TDPL thread, since I think it's important] is(typeof(XXX)) is infamously ugly and unintuitive __traits(compiles, XXX) is more comprehensible, but just as ugly. They are giving metaprogramming in D a bad name. I think we need to get rid of both of

Re: Proposal: Replace __traits and is(typeof(XXX)) with a 'magic namespace'.

2009-11-02 Thread Simen Kjaeraas
Don wrote: Votes++ Meta, I feel, is a very fitting name as well. -- Simen

Re: Proposal: Replace __traits and is(typeof(XXX)) with a 'magic namespace'.

2009-11-02 Thread Robert Jacques
On Mon, 02 Nov 2009 11:47:53 -0500, Don wrote: [I'm moving this from deep inside a TDPL thread, since I think it's important] is(typeof(XXX)) is infamously ugly and unintuitive __traits(compiles, XXX) is more comprehensible, but just as ugly. They are giving metaprogramming in D a bad name.

Re: Generating headers with -H

2009-11-02 Thread Steven Schveighoffer
On Mon, 02 Nov 2009 11:53:12 -0500, Andrei Alexandrescu wrote: This question may actually belong in .learn. What's exactly eliminated from the header generated with -H? I tried it just now and was surprised to see that the generated .di file includes the function bodies of regular (non-t

Re: Proposal: Replace __traits and is(typeof(XXX)) with a 'magic namespace'.

2009-11-02 Thread Lars T. Kyllingstad
Don wrote: [I'm moving this from deep inside a TDPL thread, since I think it's important] is(typeof(XXX)) is infamously ugly and unintuitive __traits(compiles, XXX) is more comprehensible, but just as ugly. They are giving metaprogramming in D a bad name. I think we need to get rid of both of

Generating headers with -H

2009-11-02 Thread Andrei Alexandrescu
This question may actually belong in .learn. What's exactly eliminated from the header generated with -H? I tried it just now and was surprised to see that the generated .di file includes the function bodies of regular (non-template) functions and methods. I was under the impression that gene

Proposal: Replace __traits and is(typeof(XXX)) with a 'magic namespace'.

2009-11-02 Thread Don
[I'm moving this from deep inside a TDPL thread, since I think it's important] is(typeof(XXX)) is infamously ugly and unintuitive __traits(compiles, XXX) is more comprehensible, but just as ugly. They are giving metaprogramming in D a bad name. I think we need to get rid of both of them. A v

Any version of any D compiler that works properly on Mac OS X 10.6?

2009-11-02 Thread zonk
Is anybody developing in D on Snow Leopard? • DMD2 produces executables that crash on startup. • DMD1 sort-of works, but seems to ignore many commandline switches (e.g. I can't get assert() nor unittest{} to work). • GDC is only for 10.4 and 10.5. • LDC doesn't even officially support OS X.

Re: module hijacking

2009-11-02 Thread Steven Schveighoffer
On Mon, 02 Nov 2009 10:40:50 -0500, Andrei Alexandrescu wrote: Steven Schveighoffer wrote: On Sun, 01 Nov 2009 01:28:56 -0400, Andrei Alexandrescu wrote: I ran the following experiment: mkdir deleteme cd deleteme mkdir std touch std/algorithm.d echo 'import std.algorithm; void main(){i

Re: The Thermopylae excerpt of TDPL available online

2009-11-02 Thread Don
Don wrote: Lars T. Kyllingstad wrote: Don wrote: Jason House wrote: Don Wrote: Leandro Lucarella wrote: Justin Johansson, el 30 de octubre a las 08:42 me escribiste: Actually, I think I like that better than 'traits'. -Lars I'm in agreement with whoever suggested 'meta' or just about any

Re: module hijacking

2009-11-02 Thread Andrei Alexandrescu
Steven Schveighoffer wrote: On Sun, 01 Nov 2009 01:28:56 -0400, Andrei Alexandrescu wrote: I ran the following experiment: mkdir deleteme cd deleteme mkdir std touch std/algorithm.d echo 'import std.algorithm; void main(){int a, b;swap(a,b);}' >main.d dmd main The attempt to compile main fa

Re: The Thermopylae excerpt of TDPL available online

2009-11-02 Thread Don
Lars T. Kyllingstad wrote: Don wrote: Jason House wrote: Don Wrote: Leandro Lucarella wrote: Justin Johansson, el 30 de octubre a las 08:42 me escribiste: Actually, I think I like that better than 'traits'. -Lars I'm in agreement with whoever suggested 'meta' or just about anything else e

Re: XML parser for D1 Phobos and Tango and D2 published

2009-11-02 Thread Brad Anderson
Michael Rynn Wrote: > > No one seems to be answering ad...@dsource.org. > > Either they or I am a dead person. Really, it's only a flesh wound. I've searched archives and cannot find an email from you. Can you please resend either to me, or to ad...@dsource.org? I have a long list of emai

Re: The Thermopylae excerpt of TDPL available online

2009-11-02 Thread Leandro Lucarella
Don, el 2 de noviembre a las 11:14 me escribiste: > Jason House wrote: > >Don Wrote: > > > >>Leandro Lucarella wrote: > >>>Justin Johansson, el 30 de octubre a las 08:42 me escribiste: > >Actually, I think I like that better than 'traits'. > > > >-Lars > I'm in agreement with whoev

Re: The Thermopylae excerpt of TDPL available online

2009-11-02 Thread Lars T. Kyllingstad
Don wrote: Jason House wrote: Don Wrote: Leandro Lucarella wrote: Justin Johansson, el 30 de octubre a las 08:42 me escribiste: Actually, I think I like that better than 'traits'. -Lars I'm in agreement with whoever suggested 'meta' or just about anything else except 'traits'. 'meta', whi

Re: module hijacking

2009-11-02 Thread Steven Schveighoffer
On Sun, 01 Nov 2009 01:28:56 -0400, Andrei Alexandrescu wrote: I ran the following experiment: mkdir deleteme cd deleteme mkdir std touch std/algorithm.d echo 'import std.algorithm; void main(){int a, b;swap(a,b);}' >main.d dmd main The attempt to compile main fails with "undefined identifi

Re: The Thermopylae excerpt of TDPL available online

2009-11-02 Thread Don
Jason House wrote: Don Wrote: Leandro Lucarella wrote: Justin Johansson, el 30 de octubre a las 08:42 me escribiste: Actually, I think I like that better than 'traits'. -Lars I'm in agreement with whoever suggested 'meta' or just about anything else except 'traits'. 'meta', whilst perhaps

Re: Grokking ranges: some new algorithms and ranges

2009-11-02 Thread bearophile
Philippe Sigaud: Hello, it seems you have re-done with ranges for D2 a good amount of things I did for D1: http://www.fantascienza.net/leonardo/so/libs_d.zip - bimap/nmap/map: having a single map able to do all that is better. The same for filters. - setComprehension: better to have a set(range