www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - D Functional garden

reply Seb <seb wilzba.ch> writes:
I have started to learn D lately and as a part of my learning 
process I decided to put my insights into a new, open platform - 
the D Functional Garden.

It maintains a variety of snippets that can be used to learn D or 
help one as a quick reference.

It contrast to Guillaume Piolat's d-idioms [1], all samples are 
valid code and automatically tested on every run - it is 
basically one big unittest suite. Moreover as you might tell from 
the name, it focuses mostly one a functional style within D.

Have a look yourself at:

https://garden.dlang.io/

PS: This project is quite new, so contributions (ideas, snippets) 
are welcome ;-)

[1] https://p0nce.github.io/d-idioms/
Feb 29 2016
next sibling parent reply jmh530 <john.michael.hall gmail.com> writes:
On Monday, 29 February 2016 at 15:09:56 UTC, Seb wrote:
 I have started to learn D lately and as a part of my learning 
 process I decided to put my insights into a new, open platform 
 - the D Functional Garden.
I like. One suggestion. It can be hard to read long chains of calls. When you do it this way, the assert part also looks a little messy. This would give: auto result = [1,2,3,4] .chunks(2) .map!(sum) .array; assert(result == [3, 7]);
Feb 29 2016
parent Seb <seb wilzba.ch> writes:
On Monday, 29 February 2016 at 15:37:06 UTC, jmh530 wrote:
 On Monday, 29 February 2016 at 15:09:56 UTC, Seb wrote:
 I have started to learn D lately and as a part of my learning 
 process I decided to put my insights into a new, open platform 
 - the D Functional Garden.
I like. One suggestion. It can be hard to read long chains of calls. When you do it this way, the assert part also looks a little messy. This would give: auto result = [1,2,3,4] .chunks(2) .map!(sum) .array; assert(result == [3, 7]);
Great idea. You are absolutely right! I changed the snippets accordingly.
 Would it be good to have both getting-used-to-syntax and more 
 effective-problem-solving as well? Then again if the snippets 
 are realistic that would already be there.
I think what you are going for is sth like grouping or categories - yep that definitely makes sense and once I find time, I will add this too :)
Mar 01 2016
prev sibling next sibling parent asdf <a b.c> writes:
On Monday, 29 February 2016 at 15:09:56 UTC, Seb wrote:
 It contrast to Guillaume Piolat's d-idioms [1], all samples are 
 valid code and automatically tested on every run - it is 
 basically one big unittest suite. Moreover as you might tell 
 from the name, it focuses mostly one a functional style within 
 D.

 Have a look yourself at:

 https://garden.dlang.io

 PS: This project is quite new, so contributions (ideas, 
 snippets) are welcome ;-)

 [1] https://p0nce.github.io/d-idioms/
Would it be good to have both getting-used-to-syntax and more effective-problem-solving as well? Then again if the snippets are realistic that would already be there.
Feb 29 2016
prev sibling next sibling parent landaire <landergriffith+dlang gmail.com> writes:
On Monday, 29 February 2016 at 15:09:56 UTC, Seb wrote:
 Have a look yourself at:

 https://garden.dlang.io/
Looks really good. Nice work.
Feb 29 2016
prev sibling parent sigod <sigod.mail gmail.com> writes:
On Monday, 29 February 2016 at 15:09:56 UTC, Seb wrote:
 I have started to learn D lately and as a part of my learning 
 process I decided to put my insights into a new, open platform 
 - the D Functional Garden.

 It maintains a variety of snippets that can be used to learn D 
 or help one as a quick reference.

 It contrast to Guillaume Piolat's d-idioms [1], all samples are 
 valid code and automatically tested on every run - it is 
 basically one big unittest suite. Moreover as you might tell 
 from the name, it focuses mostly one a functional style within 
 D.

 Have a look yourself at:

 https://garden.dlang.io/

 PS: This project is quite new, so contributions (ideas, 
 snippets) are welcome ;-)

 [1] https://p0nce.github.io/d-idioms/
Nice idea. I like it.
Mar 01 2016