Re: Memory Corruption with AAs

2010-04-03 Thread Andrei Alexandrescu
On 04/02/2010 03:53 PM, Walter Bright wrote: dsimcha wrote: I almost never do this with any data structure other than an array because, even if it works for now, I consider it a horrible violation of encapsulation because you're relying on the details of how the data structure manipulates memory

Re: Compile-time class instances

2010-04-03 Thread bearophile
This idea can be related to the section "Pointer Hydration" written by Walter, the main difference is that it's done by the compiler, so for the programmer it's safer and simpler to use :-) http://www.artima.com/cppsource/backyard.html Such loading of already initialized class instances is comm

Pattern matching example

2010-04-03 Thread bearophile
I'm not currently asking to implement pattern matching in D3 (as present for example in Scala), but it's positive to think how to solve similar problems in D2, because even if pattern matching is not available in D2, the problems it is asked to solve solve can be real. Walter or Andrei has rece

Compile-time class instances

2010-04-03 Thread bearophile
This is a (possibly silly) idea for a low-priority enhancement, to allow the allocation of class instances at compile-time. This can be useful because their creation time can be moved from run-time to compile-time. When a class is instantiated at compile-time, it can be used and it can even get

Re: The D programming language newsgroup should lift its game

2010-04-03 Thread Nick Sabalausky
"Walter Bright" wrote in message news:hp89e7$146...@digitalmars.com... > Nick Sabalausky wrote: >> It's the exact same size I use in my NG reader and it's perfectly >> readable to me. Maybe your resolution is too high. If it's changed, other >> people may find it too big, so it's hard to say th

Re: The D programming language newsgroup should lift its game

2010-04-03 Thread Adam D. Ruppe
On Sat, Apr 03, 2010 at 01:45:59PM -0700, Walter Bright wrote: > What about this thread? Without the newsreader, given the 50 or so messages > here, how would I know that the one on the end specifically replies to that > one of mine? That's what the quotations are for. Though, threaded vs linea

Re: The D programming language newsgroup should lift its game

2010-04-03 Thread Walter Bright
Michel Fortin wrote: It's just a link with a "news:"; URL. Try this one: news://news.digitalmars.com/digitalmars.D Aggh, in 10 years of running this forum nobody told me about that!

Re: The D programming language newsgroup should lift its game

2010-04-03 Thread Walter Bright
Mathias Laurenz Baumann wrote: It's the protocol part of the link, the "news" in news://news.php.net/php.announce if a handler for that protocol is registered to the browser, it will try to use it. For example, my opera tries to subscribe immidiatly. Yup, I just figured that out, too. I'll

Re: The D programming language newsgroup should lift its game

2010-04-03 Thread Walter Bright
Nick Sabalausky wrote: It's the exact same size I use in my NG reader and it's perfectly readable to me. Maybe your resolution is too high. If it's changed, other people may find it too big, so it's hard to say that it's the page's fault. As far as portables, I can't imagine any portable that w

Re: The D programming language newsgroup should lift its game

2010-04-03 Thread BobR
Walter Bright wrote: > Don wrote: >> I have to say, most forums seem incredibly amateurish to me. I'm >> amazed that absolute garbage like phpBB is actually still in use. Is >> there any *good* forum software out there? It doesn't seem like it >> would be hard to beat a newsgroup. But... > > That a

Re: The D programming language newsgroup should lift its game

2010-04-03 Thread Michel Fortin
On 2010-04-03 15:31:51 -0400, Walter Bright said: Now, the most interesting thing is if you go to: http://www.php.net/mailing-lists.php and under the "Newsgroup" column, click on one of the "yes" links, and it will fire up your newsreader and attempt to configure it to read the newsgroups f

Re: The D programming language newsgroup should lift its game

2010-04-03 Thread Mathias Laurenz Baumann
It's the protocol part of the link, the "news" in news://news.php.net/php.announce if a handler for that protocol is registered to the browser, it will try to use it. For example, my opera tries to subscribe immidiatly. --Marenz Am 03.04.2010, 21:31 Uhr, schrieb Walter Bright : Lars

Re: The D programming language newsgroup should lift its game

2010-04-03 Thread Walter Bright
Lars T. Kyllingstad wrote: You can expect them to learn to use a programming language like D, but not how to install a news reader? I found some interesting things. PHP is pretty popular, so I looked at their 'forum' software: http://news.php.net/group.php?group=php.general which is pretty

Re: The D programming language newsgroup should lift its game

2010-04-03 Thread Nick Sabalausky
"Walter Bright" wrote in message news:hp81er$nk...@digitalmars.com... > > http://www.simplemachines.org/community/index.php?topic=374244.0 > ... > and in a painfully small font, too. If you've got a small screen, like on > say a portable, it's hopeless. > It's the exact same size I use in my NG

Re: The D programming language newsgroup should lift its game

2010-04-03 Thread Walter Bright
Lars T. Kyllingstad wrote: You can expect them to learn to use a programming language like D, but not how to install a news reader? The instructions are here: http://www.digitalmars.com/NewsGroup.html#how-to-install The problem is, it takes a bit of effort.

Re: Having problems using __traits

2010-04-03 Thread bearophile
The first is now bug 4058. The second I don't know if it's the same bug... Bye, bearophile

Re: The D programming language newsgroup should lift its game

2010-04-03 Thread Lars T. Kyllingstad
Mike Parker wrote: Jordi wrote: Kyle Mallory wrote: On 4/1/10 10:51 PM, Justin Johansson wrote: Nick Sabalausky Wrote: Kyle I second all this. I understand D is not a "corporative" project backed up by a huge marketing team or anything like that, but better managing of its image and

Re: The D programming language newsgroup should lift its game

2010-04-03 Thread Walter Bright
Mike Parker wrote: A big start would be ditching the newsgroups for proper forum software. I know a lot of people here prefer the newsgroups, but like it or not this is 2010. Newsgroups are from yesteryear. People who weren't online in their heyday don't expect to have to use them (for that mat

Re: The D programming language newsgroup should lift its game

2010-04-03 Thread Walter Bright
Mike Parker wrote: My favorite is SMF [1], which you can see in action at [2] and [3]. Here's a link: http://www.simplemachines.org/community/index.php?topic=374244.0 It is typical of web forum software and has the usual problems: 1. no threaded display, it's difficult to see who is replying

Re: Having problems using __traits

2010-04-03 Thread bearophile
Daniel Ribeiro Maciel: > Hello! I'm currently having this issue using __traits. Can anyone tell me > what am I doing wrong, or whether this is a compiler bug or not?< At the moment DMD2 has holes likes Swiss cheese. You have hit one, two, or more than two different bugs. This is the first bug:

Re: The D programming language newsgroup should lift its game

2010-04-03 Thread Walter Bright
Don wrote: I have to say, most forums seem incredibly amateurish to me. I'm amazed that absolute garbage like phpBB is actually still in use. Is there any *good* forum software out there? It doesn't seem like it would be hard to beat a newsgroup. But... That also continually surprises me, how

Re: Need help fixing "The linker can't handle *.d.obj" issue

2010-04-03 Thread Daniel Ribeiro Maciel
Hey, thanks a lot, I'm gonna try that! Heromyth Wrote: > Daniel Ribeiro Maciel Wrote: > > > Hey guys! > > > > The linker can't handle *.d.obj files: > > > > http://d.puremagic.com/issues/show_bug.cgi?id=2886 > > > > I really need this issue fixed, so can any of you guys point me in the > > r

Having problems using __traits

2010-04-03 Thread Daniel Ribeiro Maciel
Hello! I'm currently having this issue using __traits. Can anyone tell me what am I doing wrong, or whether this is a compiler bug or not? Thanks! Source code is attached to this message. S:\Repositorios\tpp\trunk\script.d(15): Error: string expected as second argument of __traits getMember ins

Re: The D programming language newsgroup should lift its game

2010-04-03 Thread Mike Parker
Mike Parker wrote: Another I like is vBulletin [4], which I use regularly at [5] and elsewhere. Unlike SFML, it's a commercial offering and I've never seen That should read: Unlike SMF... the admin side. Personally, though, SMF is my favorite, both as a user and an admin. [1] http://www

Re: The D programming language newsgroup should lift its game

2010-04-03 Thread Mike Parker
Don wrote: Mike Parker wrote: A big start would be ditching the newsgroups for proper forum software. I know a lot of people here prefer the newsgroups, but like it or not this is 2010. Newsgroups are from yesteryear. I have to say, most forums seem incredibly amateurish to me. I'm amazed

Re: Are anonymous enums mostly available for performance reasons?

2010-04-03 Thread Mike Parker
bearophile wrote: Mike Parker: Also, and this is a big one for me, anonymous enums generate no TypeInfo, which can save a lot of space in the binary over named enums.< This is interesting. How much size differences do you see? I haven't actually had occasion to replace any named enums with

Re: The D programming language newsgroup should lift its game

2010-04-03 Thread Don
Mike Parker wrote: Jordi wrote: Kyle Mallory wrote: On 4/1/10 10:51 PM, Justin Johansson wrote: Nick Sabalausky Wrote: Kyle I second all this. I understand D is not a "corporative" project backed up by a huge marketing team or anything like that, but better managing of its image and

Re: Need help fixing "The linker can't handle *.d.obj" issue

2010-04-03 Thread Heromyth
Daniel Ribeiro Maciel Wrote: > Hey guys! > > The linker can't handle *.d.obj files: > > http://d.puremagic.com/issues/show_bug.cgi?id=2886 > > I really need this issue fixed, so can any of you guys point me in the right > direction? Where can I find its source code and where to begin and stuff

Re: Fatal flaw in D design which is holding back widespread adoption

2010-04-03 Thread Simen kjaeraas
Pelle Månsson wrote: Am I the only one using 4 tabs for indentation? I do that! With a tab size of 1. -- Simen

Re: The D programming language newsgroup should lift its game

2010-04-03 Thread Simen kjaeraas
Mike Parker wrote: Jordi wrote: Kyle Mallory wrote: On 4/1/10 10:51 PM, Justin Johansson wrote: Nick Sabalausky Wrote: Kyle I second all this. I understand D is not a "corporative" project backed up by a huge marketing team or anything like that, but better managing of its image a

Re: Are anonymous enums mostly available for performance reasons?

2010-04-03 Thread bearophile
Mike Parker: >Also, and this is a big one for me, anonymous enums generate no TypeInfo, >which can save a lot of space in the binary over named enums.< This is interesting. How much size differences do you see? LDC compiler seems designed for practical usage, it has: pragma(no_typeinfo) You can

Re: Are anonymous enums mostly available for performance reasons?

2010-04-03 Thread Mike Parker
BobR wrote: When are anonymous enums preferred over named enums? Maybe they are in the language for historical reasons? Or are they truly useful enough to warrant having a 2 kinds of enums? I use them to create D bindings to C libraries. They are useful for translating both C enums and #d

Re: The D programming language newsgroup should lift its game

2010-04-03 Thread Mike Parker
Jordi wrote: Kyle Mallory wrote: On 4/1/10 10:51 PM, Justin Johansson wrote: Nick Sabalausky Wrote: Kyle I second all this. I understand D is not a "corporative" project backed up by a huge marketing team or anything like that, but better managing of its image and communication channe

Re: Fatal flaw in D design which is holding back widespread adoption

2010-04-03 Thread Pelle Månsson
Am I the only one using 4 tabs for indentation?

Re: Memory Corruption with AAs

2010-04-03 Thread Walter Bright
Steve Teale wrote: On Sat, 03 Apr 2010 06:24:20 +, Steve Teale wrote: On Fri, 02 Apr 2010 23:01:48 -0700, Walter Bright wrote: Since it is single-threaded, it should crash in the same place in the same way every time. This means you can put an assert on the crashing data (even without g

Re: Memory Corruption with AAs

2010-04-03 Thread Jordi
Steve Teale wrote: On Sat, 03 Apr 2010 06:24:20 +, Steve Teale wrote: On Fri, 02 Apr 2010 23:01:48 -0700, Walter Bright wrote: Since it is single-threaded, it should crash in the same place in the same way every time. This means you can put an assert on the crashing data (even without g