"Almost there" version of TDPL updated on Safari Rough Cuts

2009-12-10 Thread Andrei Alexandrescu
http://my.safaribooksonline.com/roughcuts The current version includes virtually the entire book except (a) overloaded operators, (b) qualifiers, (c) threads. In the meantime I have finished the new design and wrote the chapter on overloaded operators. The design got Walter's seal of approval

Re: dmd 1.053 and 2.037 release

2009-12-12 Thread Andrei Alexandrescu
Bill Baxter wrote: On Fri, Dec 11, 2009 at 9:34 PM, Don wrote: Walter Bright wrote: Don wrote: Yeah. Actually the CPU problem is an accepts-invalid bug. It worked on my Pentium M, but it shouldn't have. The problem is what DMD does to the "uninitialized assignments". float x; gets changed i

TDPL goes out for preliminary review

2009-12-16 Thread Andrei Alexandrescu
TDPL, currently counting 398 pages including a small index, has entered editorial review this morning. The book draft includes everything except the threading chapter. I've marked the personal record of writing one chapter in one night :o). Andrei

Re: dmd 1.054 and 2.038 release

2010-01-01 Thread Andrei Alexandrescu
Steven Schveighoffer wrote: On Thu, 31 Dec 2009 16:20:08 -0500, Walter Bright wrote: Steven Schveighoffer wrote: (I'm assuming bug 1961('scoped const') is considered to be fixed). Sadly, it's not fixed yet :( struct S { int x; inout(int)* getX() inout { return &x;} } void main()

Re: D-IDE now has a debugger!

2010-01-21 Thread Andrei Alexandrescu
Walter Bright wrote: A Bothe wrote: Hello everyone, I just want to announce my new D-IDE version 1.0.3.7 which has an integrated debugger now! http://alexanderbothe.com/?id=27 Thank you! Great work! Looks fit to publish a link to it on digitalmars.com. Andrei

Re: D compiler as part of GCC

2010-01-27 Thread Andrei Alexandrescu
Eldar Insafutdinov wrote: Jerry Quinn Wrote: [also posted to D.gnu] Hi, folks, I'm interested in creating a D front end for GCC that would be part of the GCC codebase. My feeling is that a GDC that is part of GCC distributions will likely have more life than one that must be updated whenev

Re: D compiler as part of GCC

2010-01-27 Thread Andrei Alexandrescu
Eldar Insafutdinov wrote: Andrei Alexandrescu Wrote: Eldar Insafutdinov wrote: Google's Go will be in GCC. http://gcc.gnu.org/ml/gcc/2010-01/msg00500.html . They are pushing it very hard. Who is "they"? Andrei Good question. Not sure if it is actually Google, or some

Re: D compiler as part of GCC

2010-01-28 Thread Andrei Alexandrescu
Leandro Lucarella wrote: Andrei Alexandrescu, el 27 de enero a las 17:40 me escribiste: Eldar Insafutdinov wrote: Andrei Alexandrescu Wrote: Eldar Insafutdinov wrote: Google's Go will be in GCC. http://gcc.gnu.org/ml/gcc/2010-01/msg00500.html . They are pushing it very hard. Who is

Re: D compiler as part of GCC

2010-01-28 Thread Andrei Alexandrescu
Leandro Lucarella wrote: Andrei Alexandrescu, el 28 de enero a las 09:49 me escribiste: Just see the next message: http://gcc.gnu.org/ml/gcc/2010-01/msg00501.html 2010-01-26 Ian Lance Taylor * MAINTAINERS: Add myself as Go frontend maintainer. If you think Google is not pushing Go

Re: dmd 1.056 and 2.040 release

2010-01-30 Thread Andrei Alexandrescu
Ary Borenszweig wrote: Walter Bright wrote: http://www.digitalmars.com/d/1.0/changelog.html http://ftp.digitalmars.com/dmd.1.056.zip http://www.digitalmars.com/d/2.0/changelog.html http://ftp.digitalmars.com/dmd.2.040.zip Thanks to the many people who contributed to this update! Very nice!

Re: getopt that automatically prints usage

2010-02-07 Thread Andrei Alexandrescu
Igor Lesik wrote: I like how boost program_options library allows to keep together options and the help strings and automatically generate help message. So I did something similar by writing a wrapper around std.getopt.getopt that automatically generates help/usage message; just would like to s

CfP: WGP 2010

2010-02-17 Thread Andrei Alexandrescu
polymorphism, * object-oriented generic programming, * and so on. Organizers -- Co-Chair Bruno C. d. S. Oliveira, Seoul National University Co-Chair Marcin Zalewski, Indiana University Programme Committee --- Alley Stoughton, Kansas State University Andrei

Re: dmd 1.057 and 2.041 release

2010-03-08 Thread Andrei Alexandrescu
Walter Bright wrote: Lots of meat and potatoes here, and a cookie! (spelling checker for error messages) http://www.digitalmars.com/d/1.0/changelog.html http://ftp.digitalmars.com/dmd.1.057.zip http://www.digitalmars.com/d/2.0/changelog.html http://ftp.digitalmars.com/dmd.2.041.zip Thanks to

Re: dmd 1.057 and 2.041 release

2010-03-08 Thread Andrei Alexandrescu
Walter Bright wrote: Lots of meat and potatoes here, and a cookie! (spelling checker for error messages) http://www.digitalmars.com/d/1.0/changelog.html http://ftp.digitalmars.com/dmd.1.057.zip http://www.digitalmars.com/d/2.0/changelog.html http://ftp.digitalmars.com/dmd.2.041.zip Thanks to

Re: dmd 1.057 and 2.041 release

2010-03-08 Thread Andrei Alexandrescu
bearophile wrote: Andrei Alexandrescu: $(LI std.conv: changed the default array formatting from "[a, b, c]" to "a b c") That's a regression!!! (And I think in the past it was [a,b,c] instead of [a, b, c], because it's better to save some screen space, it cost

Re: dmd 1.057 and 2.041 release

2010-03-08 Thread Andrei Alexandrescu
Steven Schveighoffer wrote: On Mon, 08 Mar 2010 14:27:36 -0500, Andrei Alexandrescu wrote: bearophile wrote: Andrei Alexandrescu: $(LI std.conv: changed the default array formatting from "[a, b, c]" to "a b c") That's a regression!!! (And I think in the past

Re: dmd 1.057 and 2.041 release

2010-03-08 Thread Andrei Alexandrescu
bearophile wrote: Andrei Alexandrescu: Sorry, this stays. Then I'm not going to use the Phobos printing in all my future D2 programs. As I was not using it in D1. I'm not going to change idea on this. (e.g. the comma may be a decimal point in some languages, so is [1,2] in a Ger

Re: dmd 1.057 and 2.041 release

2010-03-08 Thread Andrei Alexandrescu
Steven Schveighoffer wrote: On Mon, 08 Mar 2010 14:49:33 -0500, Andrei Alexandrescu wrote: bearophile wrote: Andrei Alexandrescu: Sorry, this stays. Then I'm not going to use the Phobos printing in all my future D2 programs. As I was not using it in D1. I'm not going to chan

Re: dmd 1.057 and 2.041 release

2010-03-08 Thread Andrei Alexandrescu
Steven Schveighoffer wrote: On Mon, 08 Mar 2010 15:56:14 -0500, Andrei Alexandrescu wrote: Steven Schveighoffer wrote: On Mon, 08 Mar 2010 14:49:33 -0500, Andrei Alexandrescu wrote: bearophile wrote: Andrei Alexandrescu: Sorry, this stays. Then I'm not going to use the P

Re: dmd 1.057 and 2.041 release

2010-03-08 Thread Andrei Alexandrescu
Robert Clipsham wrote: On 08/03/10 22:03, bearophile wrote: 2) What's the best way to translate this to the new operator regime? T foo(T)(T s) if (__traits(hasMember, T, "opAdd")) { return s + s; } I have not found a good solution yet. This solution looks buggy (also because fixed-sized

Re: dmd 1.057 and 2.041 release

2010-03-08 Thread Andrei Alexandrescu
Robert Clipsham wrote: On 08/03/10 22:53, Andrei Alexandrescu wrote: What I usually do is: T foo(T)(T s) if (is(typeof(s + s))) { } Andrei That's far nicer, I keep forgetting about is(typeof()), thanks :) It'll be hard to forget once TDPL will be out there, the idiom is

Re: dmd 1.057 and 2.041 release

2010-03-09 Thread Andrei Alexandrescu
Ellery Newcomer wrote: On 03/09/2010 05:53 AM, Steven Schveighoffer wrote: On Mon, 08 Mar 2010 17:52:25 -0500, Andrei Alexandrescu wrote: Printing values with spaces between them is entirely fine for e.g. all numbers. You know what, you are right. Why should phobos cater to people

Re: April 13th: Presenting D at the Beijing Linux User Group

2010-03-09 Thread Andrei Alexandrescu
Lionello Lunesu wrote: On 10-3-2010 8:35, Walter Bright wrote: Lionello Lunesu wrote: I'll be presenting the D Programming Language at the next monthly BLUG meeting. It'll mostly be for people who haven't heard of D yet. There'll be a fair chunk of D1 in there, but I'm hoping to touch some of D

Re: April 13th: Presenting D at the Beijing Linux User Group

2010-03-10 Thread Andrei Alexandrescu
On 03/10/2010 01:55 AM, Lionello Lunesu wrote: Walter's advice is good. Plus: make sure through rehearsing that your material fits within the allotted time. Well, I noticed that most other presentations I've attended did indeed go over time and not by a small amount either. So, apparently it's

Re: April 13th: Presenting D at the Beijing Linux User Group

2010-03-10 Thread Andrei Alexandrescu
On 03/10/2010 12:12 PM, Walter Bright wrote: Andrei Alexandrescu wrote: On 03/10/2010 01:55 AM, Lionello Lunesu wrote: I don't have a watch, but it seems that I might need one then. Wouldn't hurt. You can always borrow one from an attendee. Heck, you can get one for $10 from

Re: Visual D released

2010-04-18 Thread Andrei Alexandrescu
On 04/18/2010 10:06 AM, Rainer Schuetze wrote: Hello, I'd like to announce the initial release of Visual D, a Visual Studio package providing both project management and language services for integration of the D programming language into Visual Studio. Whoa, this is awesome. It's so surprisin

Re: Visual D released

2010-04-18 Thread Andrei Alexandrescu
On 04/18/2010 12:45 PM, Rainer Schuetze wrote: Thanks. here's a very short tour: http://www.dsource.org/projects/visuald/wiki/ScreenShots Rainer This is a major contribution, and it comes right in time. There's been talk about a VS add-on for years. Thanks, Rainer! Andrei

Re: Visual D released

2010-04-19 Thread Andrei Alexandrescu
On 04/19/2010 10:24 AM, Mike Parker wrote: Andrei Alexandrescu wrote: On 04/18/2010 12:45 PM, Rainer Schuetze wrote: This is a major contribution, and it comes right in time. There's been talk about a VS add-on for years. Thanks, Rainer! FYI, I posted about this announcement on my

TDPL is #75 on the bestselling list at bestbookbuys.com

2010-04-20 Thread Andrei Alexandrescu
http://www.bestwebbuys.com/books/bestsellers There are only three programming books on their Top 100 list. The other two are Modern C++ Design (#12) and C++ Coding Standards (#28). This all sounds great, but it must be because my homepage links to bestbookbuys.com. :o) Andrei

Re: MessagePack for D released

2010-04-25 Thread Andrei Alexandrescu
On 04/25/2010 07:20 AM, Masahiro Nakagawa wrote: > I release a serialization library for Phobos(D2). > > Project repository: http://www.bitbucket.org/repeatedly/msgpack4d > > MessagePack is a binary-based serialization spec. > See official site for details: http://msgpack.sourceforge.net/ > Some

Masahiro Nakagawa and SHOO invited to join Phobos developers

2010-04-28 Thread Andrei Alexandrescu
Hello, Following the great work that Masahiro Nakagawa and SHOO offered to Phobos, we are inviting them to join the Phobos developer ranks. Once the community review of the proposed libraries concludes with approval, Masahiro and SHOO will be able to commit the modules to Phobos themselves.

Less than 30 days to bound copies of TDPL

2010-04-28 Thread Andrei Alexandrescu
I put a countdown on my website (http://erdani.com/) displaying the days left to final bound dead-tree copies of TDPL. Also, the book cover (front and back) is now available for preview at http://erdani.com/tdpl/cover.pdf. Andrei

Re: Masahiro Nakagawa and SHOO invited to join Phobos developers

2010-04-29 Thread Andrei Alexandrescu
On 04/29/2010 03:02 AM, SHOO wrote: Andrei Alexandrescu さんは書きました: Hello, Following the great work that Masahiro Nakagawa and SHOO offered to Phobos, we are inviting them to join the Phobos developer ranks. Once the community review of the proposed libraries concludes with approval, Masahiro

Re: Masahiro Nakagawa and SHOO invited to join Phobos developers

2010-04-29 Thread Andrei Alexandrescu
On 04/29/2010 04:55 AM, Masahiro Nakagawa wrote: > On Wed, 28 Apr 2010 22:49:56 +0900, Andrei Alexandrescu > wrote: > >> Hello, >> >> >> Following the great work that Masahiro Nakagawa and SHOO offered to >> Phobos, we are inviting them to join the

Re: Masahiro Nakagawa and SHOO invited to join Phobos developers

2010-04-29 Thread Andrei Alexandrescu
On 04/29/2010 09:39 AM, SHOO wrote: Andrei Alexandrescu さんは書きました: Thanks! You are now a Phobos developer. I'm happy to join member of Phobos developer! > Unfortunately you cannot commit your changes to std.date because it infringes on Tango's license. Andrei What did I

Re: Masahiro Nakagawa and SHOO invited to join Phobos developers

2010-04-30 Thread Andrei Alexandrescu
On 04/30/2010 08:55 AM, Moritz Warning wrote: On Fri, 30 Apr 2010 09:07:06 -0400, Steven Schveighoffer wrote: On Fri, 30 Apr 2010 09:02:32 -0400, Moritz Warning wrote: have you thought about just asking the authors of the Tango code in question? I would imagine they would say that they only

Re: Can we all please stop overreacting?

2010-04-30 Thread Andrei Alexandrescu
On 04/30/2010 08:14 AM, Daniel Keep wrote: #1: Tango didn't block SHOO's code. I cannot find any indication that anyone representing Tango /ever/ said "SHOO copied from us." Based on what Kris has said in IRC [1] and from asking Lars, the intent, if not the specific content, was this: "At casu

Re: Can we all please stop overreacting?

2010-04-30 Thread Andrei Alexandrescu
On 04/30/2010 10:28 AM, FeepingCreature wrote: On 30.04.2010 17:22, Andrei Alexandrescu wrote: I think, given the situation, that a phone call is bound to mean something. Well .. what does it mean? I mean, what do you mean it means. Not saying what you mean is just mean. Now, could we all

Re: Can we all please stop overreacting?

2010-04-30 Thread Andrei Alexandrescu
On 04/30/2010 10:46 AM, retard wrote: Fri, 30 Apr 2010 10:22:59 -0500, Andrei Alexandrescu wrote: Now, could we all please stop with the personal attacks and demonisation of the "other side"? This isn't a war, for Pete's sake. You're making the situation look sy

Re: Can we all please stop overreacting?

2010-04-30 Thread Andrei Alexandrescu
On 04/30/2010 02:01 PM, traveling mirror salesman wrote: Andrei Alexandrescu Wrote: On 04/30/2010 10:46 AM, retard wrote: Fri, 30 Apr 2010 10:22:59 -0500, Andrei Alexandrescu wrote: Now, could we all please stop with the personal attacks and demonisation of the "other side"? Th

Re: Masahiro Nakagawa and SHOO invited to join Phobos developers

2010-04-30 Thread Andrei Alexandrescu
On 04/30/2010 03:07 PM, Moritz Warning wrote: On Fri, 30 Apr 2010 10:12:53 -0500, Andrei Alexandrescu wrote: On 04/30/2010 08:55 AM, Moritz Warning wrote: On Fri, 30 Apr 2010 09:07:06 -0400, Steven Schveighoffer wrote: On Fri, 30 Apr 2010 09:02:32 -0400, Moritz Warning wrote: have you

Re: d2tags - converts DMD2's JSON output to Exuberant Ctags format

2010-05-06 Thread Andrei Alexandrescu
MIURA Masahiro wrote: > Hi, > > Being happy to see issue 3415 (broken JSON format) fixed, > I have written a utility to convert DMD2's JSON output > to Exuberent Ctags format. This enables you to tagjump in Vim > and other editors/IDEs. It's just 150+ lines, thanks to D2's > powerful string hand

Re: d2tags - converts DMD2's JSON output to Exuberant Ctags format

2010-05-06 Thread Andrei Alexandrescu
Pelle wrote: On 05/06/2010 06:48 PM, Andrei Alexandrescu wrote: I wonder if this is of enough general utility to warrant inclusion within the D distribution, along with rdmd. Thoughts? Yes please, rdmd --tags would be great. I was thinking of including the utility as a separate program

Shin Fujishiro joins Phobos

2010-05-12 Thread Andrei Alexandrescu
Please join me in welcoming Shin Fujishiro to Phobos. Shin has done excellent work on the black hole/white hole challenge that was discussed in this group almost a year ago (see thread "Please test: black holes and white holes"). I've never gotten to integrate his extensive additions into Phob

Re: dcollections 1.0 and 2.0a beta released

2010-05-19 Thread Andrei Alexandrescu
On 05/19/2010 11:09 AM, Steven Schveighoffer wrote: After much work and toil, I have created dcollections for D2. Awesome! I'm looking through it, unfortunately after wandering in the trunk for a while (I was like, wait, what?). But that was after all good because I saw a lot of awesome impro

Re: dcollections 1.0 and 2.0a beta released

2010-05-19 Thread Andrei Alexandrescu
On 05/19/2010 04:37 PM, Steven Schveighoffer wrote: Andrei Alexandrescu Wrote: I'm not sure where this leaves us. I'm tempted to post a list of "grievances" with the current design, but it's difficult to make Let me start by asking this: on a scale of 0 ("no chang

Re: dcollections 1.0 and 2.0a beta released

2010-05-20 Thread Andrei Alexandrescu
On 05/19/2010 07:21 PM, bearophile wrote: Andrei Alexandrescu: Destroy me :o). You ideas are surely interesting, but I don't think there's a simple way to change his code according to your ideas. People can use the dcollections in the following weeks and months, and when

Re: dcollections 1.0 and 2.0a beta released

2010-05-21 Thread Andrei Alexandrescu
I'll now slowly answer the great replies I got in this thread, in chronological order. Since I read them all before replying, I might sometimes refer to future posts. Hopefully that won't be too confusing. Andrei

Re: dcollections 1.0 and 2.0a beta released

2010-05-21 Thread Andrei Alexandrescu
On 05/19/2010 07:21 PM, bearophile wrote: Andrei Alexandrescu: Destroy me :o). You ideas are surely interesting, but I don't think there's a simple way to change his code according to your ideas. People can use the dcollections in the following weeks and months, and when you have i

Re: dcollections 1.0 and 2.0a beta released

2010-05-21 Thread Andrei Alexandrescu
On 05/19/2010 07:57 PM, Bill Baxter wrote: On Wed, May 19, 2010 at 4:01 PM, Andrei Alexandrescu wrote: My vision, in very brief, is to foster a federation of independent containers abiding to identical names for similar functionality. Then a few concept checks (a la std.range checks) can

Re: dcollections 1.0 and 2.0a beta released

2010-05-21 Thread Andrei Alexandrescu
On 05/19/2010 08:42 PM, Steven Schveighoffer wrote: Andrei Alexandrescu Wrote: To get back to one of my earlier points, the fact that the container interfaces are unable to express iteration is a corollary of the design's problem and an climactic disharmony. My vision, in very brief,

Re: dcollections 1.0 and 2.0a beta released

2010-05-21 Thread Andrei Alexandrescu
On 05/19/2010 08:53 PM, Steven Schveighoffer wrote: bearophile Wrote: Andrei Alexandrescu: Destroy me :o). You ideas are surely interesting, but I don't think there's a simple way to change his code according to your ideas. I don't think the ideas are mutually exclusive.

Re: dcollections 1.0 and 2.0a beta released

2010-05-21 Thread Andrei Alexandrescu
On 05/19/2010 09:48 PM, Michel Fortin wrote: On 2010-05-19 19:01:51 -0400, Andrei Alexandrescu said: I wrote a solution to the problem in native D. It goes like this: alias Container!(int, addable | purgeable) Messerschmidt; void messWith(Messerschmidt i) { ... use i's capabilities t

Re: dcollections 1.0 and 2.0a beta released

2010-05-21 Thread Andrei Alexandrescu
On 05/19/2010 09:59 PM, Robert Jacques wrote: On Wed, 19 May 2010 21:42:35 -0400, Steven Schveighoffer wrote: Andrei Alexandrescu Wrote: To get back to one of my earlier points, the fact that the container interfaces are unable to express iteration is a corollary of the design's proble

Re: dcollections 1.0 and 2.0a beta released

2010-05-21 Thread Andrei Alexandrescu
On 05/20/2010 05:34 AM, Steven Schveighoffer wrote: Robert Jacques Wrote: On Wed, 19 May 2010 21:42:35 -0400, Steven Schveighoffer Does that make sense? -Steve Yes and No. I understand where your coming from, but I think it's a bad idea. First, I think it needlessly expands the radius of c

Re: dcollections 1.0 and 2.0a beta released

2010-05-21 Thread Andrei Alexandrescu
On 05/20/2010 08:22 AM, Steven Schveighoffer wrote: Michel Fortin Wrote: On 2010-05-20 06:34:42 -0400, Steven Schveighoffer said: I understand these points, but I'm already using interfaces to copy data between containers. I don't have to, I could have used generic code, but this way, only

Re: dcollections 1.0 and 2.0a beta released

2010-05-21 Thread Andrei Alexandrescu
On 05/20/2010 06:17 AM, Michel Fortin wrote: On 2010-05-20 06:34:42 -0400, Steven Schveighoffer said: I understand these points, but I'm already using interfaces to copy data between containers. I don't have to, I could have used generic code, but this way, only one function is instantiated to

Re: dcollections 1.0 and 2.0a beta released

2010-05-21 Thread Andrei Alexandrescu
On 05/20/2010 09:14 AM, Pelle wrote: On 05/20/2010 03:22 PM, Steven Schveighoffer wrote: One thing I just thought of -- in dcollections, similar types can be compared to one another. For example, you can check to see if a HashSet is equal to a TreeSet. But that would not be possible without inte

Re: dcollections 1.0 and 2.0a beta released

2010-05-21 Thread Andrei Alexandrescu
On 05/20/2010 09:41 AM, Michel Fortin wrote: On 2010-05-20 08:30:59 -0400, bearophile said: Michel Fortin: Surely going through all those virtual calls slows things down a lot.< Right. But the purpose of a good compiler is to kill those, devirtualizing. LLVM devs are working on this too. S

Re: dcollections 1.0 and 2.0a beta released

2010-05-21 Thread Andrei Alexandrescu
On 05/20/2010 02:47 PM, bearophile wrote: Michel Fortin: Devirtualization is only possible in certain cases: when the function knows exactly which type it'll get.< You are wrong, in most cases there are ways to de-virtualize, even when the runtime type isn't exactly known, but sometimes to do

Re: dcollections 1.0 and 2.0a beta released

2010-05-21 Thread Andrei Alexandrescu
On 05/21/2010 01:34 PM, Walter Bright wrote: Andrei Alexandrescu wrote: I wrote a solution to the problem in native D. It goes like this: alias Container!(int, addable | purgeable) Messerschmidt; void messWith(Messerschmidt i) { ... use i's capabilities to add and purge ... } I agree

Re: dcollections 1.0 and 2.0a beta released

2010-05-22 Thread Andrei Alexandrescu
On 05/19/2010 03:07 PM, Steven Schveighoffer wrote: Ellery Newcomer Wrote: Are the collections supposed to not have isEmpty members? No. Use length == 0. O(1) length is always supported for all collections. One thing before I forget: I think any good collection abstraction must be concret

Re: dcollections 1.0 and 2.0a beta released

2010-05-22 Thread Andrei Alexandrescu
On 05/22/2010 09:07 PM, Sean Kelly wrote: Andrei Alexandrescu Wrote: One thing before I forget: I think any good collection abstraction must be concretized back to the classic collection instances. Singly-linked lists definitely can't be left off the list! It would be an epic failure. Im

Bug fix week

2010-05-23 Thread Andrei Alexandrescu
We've had a tremendous infusion of talent and energy in Phobos, and lately work has picked up in unprecedented ways, both in terms of new features and bug fixes. I can't say how happy I am about that! At the end of this starting week, on Friday May 28, TDPL will be out on trucks to bookstores.

struct vs. class containers (was: Re: dcollections 1.0 and 2.0a beta released)

2010-05-23 Thread Andrei Alexandrescu
I've thought for a very long time about the class vs. struct choice in a container, and I came to a startling conclusion: it (almost) doesn't matter. Could be either, and the tradeoffs involved are nonessential. Here they are: 1. Using a class makes implementing members easier because there's

Re: struct vs. class containers

2010-05-23 Thread Andrei Alexandrescu
On 05/23/2010 05:06 PM, bearophile wrote: Andrei Alexandrescu: 1. Using a class makes implementing members easier because there's no need to do work through an additional member. With a struct, you need a pimpl approach. For example: struct Array { struct

Re: dcollections 1.0 and 2.0a beta released

2010-05-24 Thread Andrei Alexandrescu
On 05/24/2010 06:54 AM, Steven Schveighoffer wrote: length is allowed to return NO_LENGTH_SUPPORT if O(1) length isn't possible, Do you agree that's an awkwardness? but all dcollections define length. I was hoping we're on the verge of agreeing to yank all interfaces and let the collection

Re: Bug fix week

2010-05-24 Thread Andrei Alexandrescu
On 05/24/2010 09:08 AM, Don wrote: Andrei Alexandrescu wrote: We've had a tremendous infusion of talent and energy in Phobos, and lately work has picked up in unprecedented ways, both in terms of new features and bug fixes. I can't say how happy I am about that! At the end of thi

Re: dcollections 1.0 and 2.0a beta released

2010-05-24 Thread Andrei Alexandrescu
On 05/24/2010 06:54 AM, Steven Schveighoffer wrote: I am not familiar with tries, Missed that upon the first read. I suggest you look at tries and the following other structures as good examples that it's futile to fit collections into hierarchies. http://en.wikipedia.org/wiki/Trie http://l

Re: dcollections 1.0 and 2.0a beta released

2010-05-24 Thread Andrei Alexandrescu
On 05/24/2010 10:01 AM, Steven Schveighoffer wrote: On Fri, 21 May 2010 13:42:14 -0400, Andrei Alexandrescu wrote: On 05/19/2010 08:42 PM, Steven Schveighoffer wrote: Andrei Alexandrescu Wrote: I.e. there aren't many kinds of HashMaps that derive from each other. But the interfaces ar

Re: dcollections 1.0 and 2.0a beta released

2010-05-24 Thread Andrei Alexandrescu
On 05/24/2010 10:23 AM, Steven Schveighoffer wrote: On Mon, 24 May 2010 10:10:51 -0400, Andrei Alexandrescu wrote: On 05/24/2010 06:54 AM, Steven Schveighoffer wrote: length is allowed to return NO_LENGTH_SUPPORT if O(1) length isn't possible, Do you agree that's an awkwardness?

Re: dcollections 1.0 and 2.0a beta released

2010-05-24 Thread Andrei Alexandrescu
On 05/24/2010 10:39 AM, Steven Schveighoffer wrote: On Mon, 24 May 2010 11:21:20 -0400, Andrei Alexandrescu wrote: On 05/24/2010 06:54 AM, Steven Schveighoffer wrote: I am not familiar with tries, Missed that upon the first read. I suggest you look at tries and the following other

Re: struct vs. class containers (was: Re: dcollections 1.0 and 2.0a beta released)

2010-05-24 Thread Andrei Alexandrescu
On 05/24/2010 10:58 AM, Steven Schveighoffer wrote: On Sun, 23 May 2010 17:36:52 -0400, Andrei Alexandrescu wrote: I've thought for a very long time about the class vs. struct choice in a container, and I came to a startling conclusion: it (almost) doesn't matter. Could be eithe

Re: dcollections 1.0 and 2.0a beta released

2010-05-24 Thread Andrei Alexandrescu
On 05/24/2010 11:14 AM, Steven Schveighoffer wrote: On Mon, 24 May 2010 11:45:44 -0400, Andrei Alexandrescu wrote: On 05/24/2010 10:23 AM, Steven Schveighoffer wrote: On Mon, 24 May 2010 10:10:51 -0400, Andrei Alexandrescu wrote: On 05/24/2010 06:54 AM, Steven Schveighoffer wrote: length

Re: Bug fix week

2010-05-24 Thread Andrei Alexandrescu
On 05/24/2010 11:53 AM, dennis luehring wrote: Am 24.05.2010 16:08, schrieb Don: > 4056 Template instantiation with bare parameter not documented why don't remove this feature? it isn't syntactic sugar just an "alternative" syntax (how many other alternative syntaxes needed?) FWIW I swear by

Re: dcollections 1.0 and 2.0a beta released

2010-05-24 Thread Andrei Alexandrescu
On 05/24/2010 12:11 PM, bearophile wrote: Steven Schveighoffer: Is it unreasonable to expect to be able to iterate the keys in a trie? (I don't really know, I've never worked with them) On tries you can iterate on all keys or on a sorted range of the keys. There's one more way of iteration

Re: dcollections 1.0 and 2.0a beta released

2010-05-24 Thread Andrei Alexandrescu
On 05/24/2010 01:12 PM, Steven Schveighoffer wrote: On Mon, 24 May 2010 13:36:01 -0400, Andrei Alexandrescu wrote: On 05/24/2010 12:11 PM, bearophile wrote: Steven Schveighoffer: Is it unreasonable to expect to be able to iterate the keys in a trie? (I don't really know, I've ne

Re: dcollections 1.0 and 2.0a beta released

2010-05-24 Thread Andrei Alexandrescu
On 05/24/2010 01:49 PM, Steven Schveighoffer wrote: On Mon, 24 May 2010 12:27:10 -0400, Andrei Alexandrescu wrote: A pointer to the end element would be required for both appending and back(). This further erodes my confidence. Size needs to be maintained _and_ a pointer to the last element

Re: dcollections 1.0 and 2.0a beta released

2010-05-24 Thread Andrei Alexandrescu
On 05/24/2010 02:01 PM, Pelle wrote: On 05/24/2010 06:27 PM, Andrei Alexandrescu wrote: struct List { int v; List * next; } While I do agree with that design for a list, that is no reference type. List* is. My point was that the pressure for a really simple hand-rolled SLL is huge. A

Re: dcollections 1.0 and 2.0a beta released

2010-05-24 Thread Andrei Alexandrescu
On 05/24/2010 02:29 PM, bearophile wrote: Steven Schveighoffer: Look at D's arrays. Is appending with D's arrays the fastest it possibly could be? Hell no, but it's good enough for most situations, and safe. Append in D dynamic arrays is awful, it's slow and requires complex code (and curre

Re: dcollections 1.0 and 2.0a beta released

2010-05-24 Thread Andrei Alexandrescu
On 05/24/2010 03:18 PM, Steven Schveighoffer wrote: On Mon, 24 May 2010 15:58:46 -0400, Andrei Alexandrescu wrote: On 05/24/2010 01:12 PM, Steven Schveighoffer wrote: On Mon, 24 May 2010 13:36:01 -0400, Andrei Alexandrescu wrote: On 05/24/2010 12:11 PM, bearophile wrote: Steven

Re: dcollections 1.0 and 2.0a beta released

2010-05-24 Thread Andrei Alexandrescu
On 05/24/2010 04:08 PM, Steven Schveighoffer wrote: On Mon, 24 May 2010 16:27:46 -0400, Andrei Alexandrescu wrote: Sorry. Yes, by-key iteration should be possible. OK, so we should be able to iterate keys. And the keys are not stored in the trie structure itself. So how does one iterate the

Re: dcollections 1.0 and 2.0a beta released

2010-05-24 Thread Andrei Alexandrescu
On 05/24/2010 04:38 PM, Steven Schveighoffer wrote: On Mon, 24 May 2010 17:35:11 -0400, Andrei Alexandrescu wrote: On 05/24/2010 04:08 PM, Steven Schveighoffer wrote: On Mon, 24 May 2010 16:27:46 -0400, Andrei Alexandrescu wrote: Sorry. Yes, by-key iteration should be possible. OK, so

This just in: authorless TDPL becomes collector's edition

2010-06-01 Thread Andrei Alexandrescu
Due to a pretty odd mistake at the printer, the first 1000 copies of TDPL will not have the name of the author on their cover. (The name still appears on the back cover and the spine.) The history of printing is rife with rare printing mistakes that have become collector's editions. Preorder n

Re: This just in: authorless TDPL becomes collector's edition

2010-06-01 Thread Andrei Alexandrescu
On 06/01/2010 01:04 PM, Steven Schveighoffer wrote: On Tue, 01 Jun 2010 13:59:32 -0400, Andrei Alexandrescu wrote: Due to a pretty odd mistake at the printer, the first 1000 copies of TDPL will not have the name of the author on their cover. (The name still appears on the back cover and the

Re: This just in: authorless TDPL becomes collector's edition

2010-06-01 Thread Andrei Alexandrescu
On 06/01/2010 01:21 PM, Robert Clipsham wrote: On 01/06/10 18:59, Andrei Alexandrescu wrote: Due to a pretty odd mistake at the printer, the first 1000 copies of TDPL will not have the name of the author on their cover. (The name still appears on the back cover and the spine.) The history of

Re: This just in: authorless TDPL becomes collector's edition

2010-06-01 Thread Andrei Alexandrescu
On 06/01/2010 01:44 PM, Robert Clipsham wrote: On 01/06/10 19:26, Andrei Alexandrescu wrote: Most assuredly, unless you're outside of the US. The publisher is trying to avoid sending any copy outside the States so as to not confuse foreign markets. I think I should try to actually convin

Re: dmd 1.062 and 2.047 release

2010-06-13 Thread Andrei Alexandrescu
Lutger wrote: Great, thank you! I noticed both std.concurrency and std.json are not (yet?) included in the documentation. Does that have any bearing on their status, are they usable and / or stable? std.container too. There are some other modules without documentation like std.openrj and st

Re: dmd 1.062 and 2.047 release

2010-06-14 Thread Andrei Alexandrescu
bearophile wrote: I am back. From the v2.047 changelog: std.conv: Added file and line information to conversion errors; added brackets '[' and ']' around arrays and associative arrays as defaults; added emplace() for non-class types.< This program: import std.stdio: writeln; import std.con

Re: This just in: authorless TDPL becomes collector's edition

2010-06-22 Thread Andrei Alexandrescu
On 06/22/2010 07:45 AM, Jacob Carlborg wrote: On 2010-06-21 21:23, Mike James wrote: Got my "collectors item" delivered today from Amazon UK. Looks good. I like the bonus of being able to download a PDF version of TDPL. Thanks for all the hard work Andrei. -=mike=- "Andr

Re: D rpm packages for Linux

2010-06-24 Thread Andrei Alexandrescu
On 06/24/2010 12:09 PM, Walter Bright wrote: D rpm packages now available http://www.digitalmars.com/d/download.html thanks to Jordi Sayol. Yay! I should mention that Ellery Newcomer also had an independent solution. (Sorry Ellery; I'm sure the learning experience was still useful.) Andrei

Re: D rpm packages for Linux

2010-06-24 Thread Andrei Alexandrescu
On 06/24/2010 12:56 PM, Ellery Newcomer wrote: On 06/24/2010 12:22 PM, Andrei Alexandrescu wrote: On 06/24/2010 12:09 PM, Walter Bright wrote: D rpm packages now available http://www.digitalmars.com/d/download.html thanks to Jordi Sayol. Yay! I should mention that Ellery Newcomer also had an

Re: D rpm packages for Linux

2010-06-24 Thread Andrei Alexandrescu
On 06/24/2010 03:44 PM, Ellery Newcomer wrote: On 06/24/2010 12:09 PM, Walter Bright wrote: D rpm packages now available http://www.digitalmars.com/d/download.html thanks to Jordi Sayol. Also, what about hosting a yum repository? Is that the thing that allows me to insert a line in the Synap

Re: D rpm packages for Linux

2010-06-25 Thread Andrei Alexandrescu
On 06/25/2010 03:46 AM, Jordi Sayol i Salomó wrote: En/na Ellery Newcomer ha escrit: On 06/24/2010 01:14 PM, Jordi Sayol i Salomó wrote: En/na Ellery Newcomer ha escrit: Also note that mine doesn't fail on x86_64 (you need to add glibc-devel(x86-32) specifically as a dependency) Can You b

Re: D web site facelift

2010-07-02 Thread Andrei Alexandrescu
Walter Bright wrote: David Gileadi was kind enough to spend some time redesigning the look of the D web site. A preview of it is up on d-programming-language.org. This isn't about the content, just the look/style/feel. Comments welcome. Please don't put links to anything other than the front

Re: D web site facelift

2010-07-02 Thread Andrei Alexandrescu
Steven Schveighoffer wrote: On Fri, 02 Jul 2010 20:55:33 -0400, Walter Bright wrote: David Gileadi was kind enough to spend some time redesigning the look of the D web site. A preview of it is up on d-programming-language.org. This isn't about the content, just the look/style/feel. Commen

Re: D web site facelift

2010-07-02 Thread Andrei Alexandrescu
BCS wrote: Hello Walter, bearophile wrote: Please looks at your site with Firefox too. I did, it looks the same. What is the dot pitch of your monitor? Suggestion: attach screenshots. Andrei

Re: D web site facelift

2010-07-03 Thread Andrei Alexandrescu
Walter Bright wrote: Walter Bright wrote: Michel Fortin wrote: On a side note, I've noticed on other websites that Google Translation doesn't attempt to translate code inside a element. So I would suggest the website uses ... for its code blocks, and ... for keywords and other code-relate

Re: D web site facelift

2010-07-04 Thread Andrei Alexandrescu
Walter Bright wrote: Nick Sabalausky wrote: "Walter Bright" wrote in message news:i0nula$bk...@digitalmars.com... Nick Sabalausky wrote: I didn't see any of the glitchiness or google-translate stuff that other people saw (on IE7, FF2, or Iron). Although, from the screenshot someone else post

Re: D web site facelift

2010-07-05 Thread Andrei Alexandrescu
On 07/05/2010 09:08 AM, David Gileadi wrote: On 7/2/10 5:55 PM, Walter Bright wrote: David Gileadi was kind enough to spend some time redesigning the look of the D web site. A preview of it is up on d-programming-language.org. This isn't about the content, just the look/style/feel. Comments wel

<    4   5   6   7   8   9   10   11   12   13   >