Thread overview |
---|
November 23, 2015 Example: wc | ||||
---|---|---|---|---|
| ||||
I was looking under "Books & Articles" and one of the submenu items is titled "Example: wc". So I thought it must be a heck of an example, but upon clicking, I saw a program with a bunch of nested foreach statements and no explanations. Why is this on the front page sidebar at all? It certainly doesn't belong under "Books & Articles" because it's just code. Is this something we can move to the wiki? I will make the change, but I'm hoping somebody will say something if it belongs there. |
November 23, 2015 Re: Example: wc | ||||
---|---|---|---|---|
| ||||
Posted in reply to bachmeier | On Monday, 23 November 2015 at 11:10:29 UTC, bachmeier wrote:
> I was looking under "Books & Articles" and one of the submenu items is titled "Example: wc". So I thought it must be a heck of an example, but upon clicking, I saw a program with a bunch of nested foreach statements and no explanations. Why is this on the front page sidebar at all? It certainly doesn't belong under "Books & Articles" because it's just code.
>
> Is this something we can move to the wiki? I will make the change, but I'm hoping somebody will say something if it belongs there.
It used to be the code example displayed on the start page, if I remember correctly. Shouldn't it be put there (with some text that explains what's going on), if not already done so?
Looks like it was temporarily "parked" under "Books & Articles" and forgotten.
|
November 23, 2015 Re: Example: wc | ||||
---|---|---|---|---|
| ||||
Posted in reply to Chris | On Monday, 23 November 2015 at 12:19:08 UTC, Chris wrote:
> On Monday, 23 November 2015 at 11:10:29 UTC, bachmeier wrote:
>> I was looking under "Books & Articles" and one of the submenu items is titled "Example: wc". So I thought it must be a heck of an example, but upon clicking, I saw a program with a bunch of nested foreach statements and no explanations. Why is this on the front page sidebar at all? It certainly doesn't belong under "Books & Articles" because it's just code.
>>
>> Is this something we can move to the wiki? I will make the change, but I'm hoping somebody will say something if it belongs there.
>
> It used to be the code example displayed on the start page, if I remember correctly. Shouldn't it be put there (with some text that explains what's going on), if not already done so?
>
> Looks like it was temporarily "parked" under "Books & Articles" and forgotten.
Okay. Do you know how to add it as a code example? It doesn't make a good first impression.
|
November 23, 2015 Re: Example: wc | ||||
---|---|---|---|---|
| ||||
Posted in reply to bachmeier | On Monday, 23 November 2015 at 12:44:55 UTC, bachmeier wrote:
> On Monday, 23 November 2015 at 12:19:08 UTC, Chris wrote:
>> On Monday, 23 November 2015 at 11:10:29 UTC, bachmeier wrote:
>>> I was looking under "Books & Articles" and one of the submenu items is titled "Example: wc". So I thought it must be a heck of an example, but upon clicking, I saw a program with a bunch of nested foreach statements and no explanations. Why is this on the front page sidebar at all? It certainly doesn't belong under "Books & Articles" because it's just code.
>>>
>>> Is this something we can move to the wiki? I will make the change, but I'm hoping somebody will say something if it belongs there.
>>
>> It used to be the code example displayed on the start page, if I remember correctly. Shouldn't it be put there (with some text that explains what's going on), if not already done so?
>>
>> Looks like it was temporarily "parked" under "Books & Articles" and forgotten.
>
> Okay. Do you know how to add it as a code example? It doesn't make a good first impression.
The code doesn't look up to date and maybe it's been replaced with a more up to date example (i.e. with range chaining). It uses ulong instead of size_t. I dunno, maybe it should be dropped completely.
|
November 23, 2015 Re: Example: wc | ||||
---|---|---|---|---|
| ||||
Posted in reply to Chris | On Monday, 23 November 2015 at 14:10:35 UTC, Chris wrote:
>
> The code doesn't look up to date and maybe it's been replaced with a more up to date example (i.e. with range chaining). It uses ulong instead of size_t. I dunno, maybe it should be dropped completely.
ulong is appropriate here; the maximum word count should not be dependent on the system's memory limits, since it's streaming from an (arbitrary large) file.
|
November 23, 2015 Re: Example: wc | ||||
---|---|---|---|---|
| ||||
Posted in reply to Chris | On Monday, 23 November 2015 at 14:10:35 UTC, Chris wrote: > The code doesn't look up to date and maybe it's been replaced with a more up to date example (i.e. with range chaining). It uses ulong instead of size_t. I dunno, maybe it should be dropped completely. https://github.com/D-Programming-Language/dlang.org/pull/1157 |
Copyright © 1999-2021 by the D Language Foundation