Thread overview
Call to action: updating the D Wiki Cookbook
Jul 16, 2020
WebFreak001
Jul 16, 2020
Patrick Schluter
Jul 16, 2020
WebFreak001
Jul 16, 2020
tastyminerals
July 16, 2020
Currently there is a lot of outdated code which no longer works, links to the now-dead dpaste website and code which can be improved a lot on https://wiki.dlang.org/Cookbook

Just now I rewrote and upgraded

https://wiki.dlang.org/Using_string_mixins_for_logging

to

https://wiki.dlang.org/Logging_mechanisms


Let's update the cookbook section to the newest standards and fill the current WIP pages with content. If you work on something I think it might be best if you also post it here so people know what is being worked on and can pick different things.

For best results use as many language idioms as make sense and are useful, use the standard library instead of writing boiler plate code and write easy to understand / documented code.

Things that need work:

- new content
- upgrade dpaste links to run.dlang.io
- add/update Wiki metadata (mark unfinished pages as Draft)
- proofreading
- finally promoting pages from Draft to Established

This section of the Wiki is directly linked on the front page of the Wiki and could become a central spot to share code idioms and example code. It is currently in quite a bad shape and needs some polishing, however it has a good starting foundation.
July 16, 2020
On Thursday, 16 July 2020 at 13:28:43 UTC, WebFreak001 wrote:
> Currently there is a lot of outdated code which no longer works, links to the now-dead dpaste website and code which can be improved a lot on https://wiki.dlang.org/Cookbook
>
> [...]

Why no mention of [std.experimental.logger]?
I use it and it works quite well and it's just one import.

[std.experimental.logger]: https://dlang.org/phobos/std_experimental_logger.html
July 16, 2020
On Thursday, 16 July 2020 at 14:41:50 UTC, Patrick Schluter wrote:
> On Thursday, 16 July 2020 at 13:28:43 UTC, WebFreak001 wrote:
>> Currently there is a lot of outdated code which no longer works, links to the now-dead dpaste website and code which can be improved a lot on https://wiki.dlang.org/Cookbook
>>
>> [...]
>
> Why no mention of [std.experimental.logger]?
> I use it and it works quite well and it's just one import.
>
> [std.experimental.logger]: https://dlang.org/phobos/std_experimental_logger.html

well because it's in experimental I didn't want to mention it as it could go away any release. I do use it everywhere too but technically that's bad.
July 16, 2020
On Thursday, 16 July 2020 at 13:28:43 UTC, WebFreak001 wrote:
> Currently there is a lot of outdated code which no longer works, links to the now-dead dpaste website and code which can be improved a lot on https://wiki.dlang.org/Cookbook
>
> Just now I rewrote and upgraded
>
> https://wiki.dlang.org/Using_string_mixins_for_logging
>
> to
>
> https://wiki.dlang.org/Logging_mechanisms
>
>
> Let's update the cookbook section to the newest standards and fill the current WIP pages with content. If you work on something I think it might be best if you also post it here so people know what is being worked on and can pick different things.
>
> For best results use as many language idioms as make sense and are useful, use the standard library instead of writing boiler plate code and write easy to understand / documented code.
>
> Things that need work:
>
> - new content
> - upgrade dpaste links to run.dlang.io
> - add/update Wiki metadata (mark unfinished pages as Draft)
> - proofreading
> - finally promoting pages from Draft to Established
>
> This section of the Wiki is directly linked on the front page of the Wiki and could become a central spot to share code idioms and example code. It is currently in quite a bad shape and needs some polishing, however it has a good starting foundation.

I recently saw some cool D one-liner mentions for console in https://forum.dlang.org/post/zneiemciembtbfhkhvbk@forum.dlang.org

echo 'import std; void main() { File("emu.sift","r").byLine.map!(a => a.splitter(" ").front.to!double).maxElement.writeln; }' | dmd -run -

Original author "Jordan Wilson".

This can be also added.