Thread overview | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
December 01, 2010 Re: Setting the stack size | ||||
---|---|---|---|---|
| ||||
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).
Bye,
bearophile
|
December 01, 2010 Re: Setting the stack size | ||||
---|---|---|---|---|
| ||||
Posted in reply to bearophile Attachments:
| On Wed, Dec 1, 2010 at 2:36 PM, bearophile <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.
|
December 02, 2010 Re: Setting the stack size | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrew Wiley | 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>> 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
|
December 02, 2010 Re: Setting the stack size | ||||
---|---|---|---|---|
| ||||
Posted in reply to Mike Parker Attachments:
| On Wed, Dec 1, 2010 at 7:14 PM, Mike Parker <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>> 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'
|
December 02, 2010 D on Wikipedia [Was: Re: Setting the stack size] | ||||
---|---|---|---|---|
| ||||
Posted in reply to bearophile | > 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 D is good for allowing to add the last values to the results table for n up to 25: http://en.wikipedia.org/wiki/Man_or_boy_test The reference to D was later removed by someone, of course. They have even removed D examples from the template metaprogramming page, etc. The page about CTFE resists still: http://en.wikipedia.org/wiki/Compile_time_function_execution Wikipedia looks like a fair place based on rules and laws, but in truth a lot of its contents are determined by politics. If there are enough people interested in keeping a page/topic alive, then it survives. So you are able to find many page about single Pokemon characters (some of them are cute, but they cultural importance is not huge), but no pages (because they have deleted it) about some useful software. Bye, bearophile |
December 02, 2010 Re: D on Wikipedia [Was: Re: Setting the stack size] | ||||
---|---|---|---|---|
| ||||
Posted in reply to bearophile | == Quote from bearophile (bearophileHUGS@lycos.com)'s article > http://en.wikipedia.org/wiki/Man_or_boy_test > The reference to D was later removed by someone, of course. > They have even removed D examples from the template metaprogramming page, etc. The page about CTFE > resists still: > http://en.wikipedia.org/wiki/Compile_time_function_execution > Wikipedia looks like a fair place based on rules and laws, but in truth a lot of its contents are > determined by politics. If there are enough people interested in keeping a page/topic alive, then it > survives. So you are able to find many page about single Pokemon characters (some of them are cute, > but they cultural importance is not huge), but no pages (because they have deleted it) about some useful > software. > > Bye, > bearophile If Wikipedia is hostile to D, maybe the content should be offered to other venues. I'm sure that there are many websites that could benefit from some interesting articles about programming concepts that could include D code examples, such as: * http://knol.google.com/ * http://www.mywikibiz.com/ * http://rosettacode.org/ (I know that there are many other websites that could be mentioned. I just wanted to list a few websites to illustrate my idea.) jcc7 |
December 02, 2010 Re: D on Wikipedia [Was: Re: Setting the stack size] | ||||
---|---|---|---|---|
| ||||
Posted in reply to bearophile | > The reference to D was later removed by someone, of course. > They have even removed D examples from the template metaprogramming page, etc. The page about CTFE resists still: Even CTFE example is hostile. If i search line/sphere ... first thing i see in wikipedia is a almost perfect computer generated image, not the hand made one. Good to know about this, thank you! -- Using Opera's revolutionary email client: http://www.opera.com/mail/ |
December 02, 2010 Re: D on Wikipedia [Was: Re: Setting the stack size] | ||||
---|---|---|---|---|
| ||||
Posted in reply to bearophile | Wed, 01 Dec 2010 20:52:47 -0500, bearophile wrote: >> 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 > > D is good for allowing to add the last values to the results table for n up to 25: http://en.wikipedia.org/wiki/Man_or_boy_test The reference to D was later removed by someone, of course. Nothing D specific really, they argued that the article should remain clean since the test was designed for *Algol*, not D. It's not a language competition, people only want to know what the 'Man or boy test' is. By your logic, all those programming articles should include 500+ implementations of the algorithm in various languages to avoid any kind of discrimination. It's a general purpose encyclopedia, not a language competition, understand that? Write your competition code to sites like rosettacode. The implementations are here: http://en.wikipedia.org/wiki/Wikipedia_talk:Articles_for_creation/ Submissions/Man_or_boy_test_implementations They haven't yet decided whether they're worth a new article. > They have even removed D > examples from the template metaprogramming page, etc. etc. ? What else? The generic programming constructs of D have already been discussed here: http://en.wikipedia.org/wiki/Generic_programming#Templates_in_D Repeating the same shit provides little additional value IMHO. I think the whole template metaprogramming article is redundant and all the metaprogramming articles should have a better organization. The particular D code that was removed was: 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. The article should really go through review. It also discusses static polymorphism which isn't only related to templates. CRTP is also possible in Java, C#, Scala etc. It should be removed from that page. It actually already has a new page: http://en.wikipedia.org/wiki/Curiously_recurring_template_pattern > The page about CTFE resists still: http://en.wikipedia.org/wiki/Compile_time_function_execution 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? > Wikipedia > looks like a fair place based on rules and laws, but in truth a lot of > its contents are determined by politics. You aren't helping that with that FUD. > If there are enough people > interested in keeping a page/topic alive, then it survives. Notability guidelines. > So you are > able to find many page about single Pokemon characters (some of them are > cute, but they cultural importance is not huge), but no pages (because > they have deleted it) about some useful software. But pikamen are notable! > > Bye, > bearophile |
December 02, 2010 Re: D on Wikipedia [Was: Re: Setting the stack size] | ||||
---|---|---|---|---|
| ||||
Posted in reply to bearophile | On Wed, 01 Dec 2010 20:52:47 -0500
bearophile <bearophileHUGS@lycos.com> wrote:
> D is good for allowing to add the last values to the results table for n up to 25:
> http://en.wikipedia.org/wiki/Man_or_boy_test
> The reference to D was later removed by someone, of course.
> They have even removed D examples from the template metaprogramming page, etc. The page about CTFE resists still:
> http://en.wikipedia.org/wiki/Compile_time_function_execution
> Wikipedia looks like a fair place based on rules and laws, but in truth a lot of its contents are determined by politics.
Could you expand on this? (I mean especially in the case of D)?
Denis
-- -- -- -- -- -- --
vit esse estrany ☣
spir.wikidot.com
|
December 02, 2010 Re: D on Wikipedia [Was: Re: Setting the stack size] | ||||
---|---|---|---|---|
| ||||
Posted in reply to Justin C Calvarese | On Thu, 2 Dec 2010 05:13:27 +0000 (UTC)
Justin C Calvarese <jccalvarese@gmail.com> wrote:
> 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.)
Denis
-- -- -- -- -- -- --
vit esse estrany ☣
spir.wikidot.com
|
Copyright © 1999-2021 by the D Language Foundation