December 02, 2010
> http://en.wikipedia.org/w/index.php?
> title=Template_metaprogramming&diff=64616972&oldid=64616688
>
> The discussion page mentions it doesn't add any value and I can't
> disagree.

They might be clueless to say that, but you?

> Resists? You weren't able to fill it with D propaganda? It already lists
> the DigitalMars pages as only references. And provides 2/3 examples in D.
> What else should it do?

What propaganda are you talking about?
If they are not some populist pricks first thing you would see on that page would be D.

-- 
Using Opera's revolutionary email client: http://www.opera.com/mail/
December 02, 2010
>> If Wikipedia is hostile to D
>
> What is this supposed to mean? Who is Mr Wikipedia not liking D? (I'm not joking -- I would like to know things about wikipedia I do not know yet.)

What is this Mr gamedev not liking D?
Not hard to check.

-- 
Using Opera's revolutionary email client: http://www.opera.com/mail/
December 02, 2010
Thu, 02 Dec 2010 11:10:33 +0200, so wrote:

>> http://en.wikipedia.org/w/index.php? title=Template_metaprogramming&diff=64616972&oldid=64616688
>>
>> The discussion page mentions it doesn't add any value and I can't disagree.
> 
> They might be clueless to say that, but you?

I agree static-if, alias parameters, and the other extensions are worth mentioning, but syntactical changes more or less aren't.

I'd introduce the templates using code written in C++ and then list the differences between C++ and D. After all, C++ and C++ TMP are widely known. Even I have few books of them in my bookshelf and ps/pdf papers discussing C++ TMP. There aren't any books or peer reviewed articles about D's metaprogramming, right? Prioritizing D over C++ doesn't make sense, the citations should emphasize notable relevant sources.

> 
>> Resists? You weren't able to fill it with D propaganda? It already lists the DigitalMars pages as only references. And provides 2/3 examples in D. What else should it do?
> 
> What propaganda are you talking about? If they are not some populist pricks first thing you would see on that page would be D.

It clearly seems that both C++ and D communities think they invented the term CTFE. In C++ the functions are "meta-functions" (templates) [1], in D "ordinary" functions. But the same shit comes with a different name in other languages. It's essentially the same concept of metaprogramming.

[1] http://www.amazon.com/Template-Metaprogramming-Concepts-Techniques- Beyond/dp/0321227255
December 02, 2010
> I'd introduce the templates using code written in C++ and then list the
> differences between C++ and D. After all, C++ and C++ TMP are widely
> known. Even I have few books of them in my bookshelf and ps/pdf papers
> discussing C++ TMP. There aren't any books or peer reviewed articles
> about D's metaprogramming, right? Prioritizing D over C++ doesn't make
> sense, the citations should emphasize notable relevant sources.

Someone in some third world country proved Goldbach's conjecture.
Proof is there and accepted by everyone that understand what/how he does it.
What are you going to do as the all mighty objective wikipedia?
Are you going to wait till that guy get matured enough and write a book about the meaning of life, before you label him as a human being?
Or maybe you want to talk about his proof after a thousand of failed attempts?

> It clearly seems that both C++ and D communities think they invented the
> term CTFE. In C++ the functions are "meta-functions" (templates) [1], in D
> "ordinary" functions. But the same shit comes with a different name in
> other languages. It's essentially the same concept of metaprogramming.
>
> [1] http://www.amazon.com/Template-Metaprogramming-Concepts-Techniques-
> Beyond/dp/0321227255

CTFE in essance meta-programming i agree, but comparing to others like comparing a tree to a forest.
And no one here claimed D is the inventor of meta-programming.

-- 
Using Opera's revolutionary email client: http://www.opera.com/mail/
December 02, 2010
Thu, 02 Dec 2010 12:07:19 +0200, so wrote:

>> I'd introduce the templates using code written in C++ and then list the differences between C++ and D. After all, C++ and C++ TMP are widely known. Even I have few books of them in my bookshelf and ps/pdf papers discussing C++ TMP. There aren't any books or peer reviewed articles about D's metaprogramming, right? Prioritizing D over C++ doesn't make sense, the citations should emphasize notable relevant sources.
> 
> Someone in some third world country proved Goldbach's conjecture. Proof is there and accepted by everyone that understand what/how he does it. What are you going to do as the all mighty objective wikipedia?

Agreed, I don't like some of the Wikipedia's policies or editors, but this isn't the case now. D came a bit late to the party - many books were already written. The D's documentation doesn't discuss metaprogramming in general very extensively. Even when you just want to cite _something_, the C++ literature isn't that bad. The same information implemented in D is scattered around the net in newsgroup articles, dr dobbs journal, Bartosz's blog, TDPL, and so on. You don't have a single authoritative, peer reviewed source about D metaprogramming. There's more to it than langugage syntax and semantics.

> 
>> It clearly seems that both C++ and D communities think they invented
>> the term CTFE. In C++ the functions are "meta-functions" (templates)
>> [1], in D
>> "ordinary" functions. But the same shit comes with a different name in
>> other languages. It's essentially the same concept of metaprogramming.
>>
>> [1] http://www.amazon.com/Template-Metaprogramming-Concepts-Techniques- Beyond/dp/0321227255
> 
> CTFE in essance meta-programming i agree, but comparing to others like comparing a tree to a forest.

Like I said, the articles would need a review. The particular page is already full of unrelated text.

> And no one here claimed D is the inventor of meta-programming.

Bearophile argued that the Wikipedia in general dismisses D harsly due to political reasons. I don't find this true. And like I said, it's not a competition. It's not a magazine where you can post your ads, it's an encyclopedia. More text about D isn't better.

I find this D language advocacy in Wikipedia disgusting - clearly, you should document notable features of D, but the main objective cannot be as much visibility as possible. Some of the related programming articles try to be generic, language agnostic. There's a language independent introduction and examples in various languages. And when there's an examples section, there should be a balance between the languages, e.g. one or two examples per language, not 1 example in other languages and 100 in D, because D has so much more features. I hate this kind of desperate pushing. What the heck we are, a religious cult?

He (or someone else) previously complained that the language shootout guy doesn't include D in the test so he must he D because of some <XXX> reason. I think that if a language has real technical merits, this kind of worrying about the public image is silly. If you worry about D's notability, write more articles about D and more code in D.
December 02, 2010
> There's a language independentintroduction and examples in various languages
> http://en.wikipedia.org/wiki/Man_or_boy_test

You are right.

> More text about D isn't better
> I find this D language advocacy in Wikipedia disgusting

I absolutely agree on these two points, but it is not what i meant.
What i meant is that if your solution is the best, you deserve the best credit.
This is a matter of objectivity.

> I think that if a language has real technical merits, this kind
> of worrying about the public image is silly. If you worry about D's
> notability, write more articles about D and more code in D.

Public image has a huge importance on one thing,
If you are a newbie, it is the first thing you'll face.
On the other hand as the homepage says D is not a "first language", which invalidates this importance.

This discussion is funny.

so
retard
so
retard
...

-- 
Using Opera's revolutionary email client: http://www.opera.com/mail/
December 02, 2010
On 12/2/2010 10:33 AM, Andrew Wiley wrote:
> On Wed, Dec 1, 2010 at 7:14 PM, Mike Parker <aldacron@gmail.com
> <mailto:aldacron@gmail.com>> wrote:
>
>     On 12/2/2010 6:12 AM, Andrew Wiley wrote:
>
>
>
>         On Wed, Dec 1, 2010 at 2:36 PM, bearophile
>         <bearophileHUGS@lycos.com <mailto:bearophileHUGS@lycos.com>
>         <mailto:bearophileHUGS@lycos.com
>         <mailto:bearophileHUGS@lycos.com>>> wrote:
>
>             Franciszek Czekala:
>
>          > How do you set the stack size for D programs?
>
>             On Windows with DMD this is how to set the max stack size to
>         about
>             1.5 GB of the "test.d" module:
>             dmd -L/STACK:1500000000 test.d
>
>             (I'd like D to have a standard syntax (maybe a pragma(...))
>         to tell
>             the other parts of the compilation chain how much stack to use).
>
>
>         If the stack size is only set by the executable on Windows, I
>         don't see
>         how that would be useful.
>
>
>     It's not set by DMD, but by the linker. You need to pass the
>     appropriate flag to the linker on each platform via the -L command
>     line option. bearophile's example is for OPTLINK. On platforms where
>     DMD is backed by the gcc toolchain, you should be able to use
>
>     dmd -L--stack 1500000000 test.d
>
>
> $ ld --stack
> ld: unrecognized option '--stack'
> ld: use the --help option for usage information
>
> The linker doesn't set the stack size on Linux/Unix (seems like OSX is
> an exception). You set the stack size in the environment with 'ulimit -s'

I got that from the ld man page [1]. But on checking again, I see this:

[This option is specific to the i386 PE targeted port of the linker]

Sorry about that.

[1] http://linux.die.net/man/1/ld

December 02, 2010
retard wrote:
> Thu, 02 Dec 2010 12:07:19 +0200, so wrote:

> I find this D language advocacy in Wikipedia disgusting - clearly, you should document notable features of D, but the main objective cannot be as much visibility as possible.

> I think that if a language has real technical merits, this kind of worrying about the public image is silly. If you worry about D's notability, write more articles about D and more code in D.

Well said.

Actually, I don't think broad publicity for D is desirable at this point. Right now, we desperately want library and toolchain developers. But the arrival of hordes of app developers who expect a polished product, would be a disaster for D.
December 03, 2010
On 12/2/10 3:10 AM, so wrote:
>> http://en.wikipedia.org/w/index.php?
>> title=Template_metaprogramming&diff=64616972&oldid=64616688
>>
>> The discussion page mentions it doesn't add any value and I can't
>> disagree.
>
> They might be clueless to say that, but you?

I don't think there's any conspiracy against D on Wikipedia, but the edit mentioned above is actually damaging to people who want to understand metaprogramming.

Static if has been a huge boon for D, and it has been recognized by C++ luminaries that it would be^H^Hhave been a huge boon for C++0x as well. Discussing the stilted C++ implementation exclusively detracts considerably from understanding the true issues at hand.


Andrei

December 03, 2010
Thank you for the information (I should have mentioned that I am interested in Windows). I suspected it should be done via linker and found the /STACK option in optlink info but I thought that one had to invoke the linker separately. Now I know how to do it in one pass. However, I asked the question in the forum because it did not seem to work. After some more experimenting with recursive functions I came to the following conclusion:

1) The minimum stack size is 4*64KB=262144 bytes. Setting a
smaller value via -L/STACK has no effect.
2) The stack size is increased in 64KB chunks. If you specify a
number of bytes which is not a multiple of 64KB you will get the
size of the stack being the smallest multiple of 64KB bigger than
the number you specify. Thus if you have a stack overflow in your
program and increase the stack size by 10000 bytes for example,
you may see no effect.