Jump to page: 1 24  
Page
Thread overview
Blog series to teach and show off D's metaprogramming by creating a JSON serialiser
Oct 31, 2019
SealabJaster
Oct 31, 2019
GreatSam4sure
Oct 31, 2019
SealabJaster
Oct 31, 2019
Walter Bright
Oct 31, 2019
SealabJaster
Oct 31, 2019
Walter Bright
Oct 31, 2019
Paolo Invernizzi
Oct 31, 2019
GreatSam4sure
Oct 31, 2019
Paolo Invernizzi
Oct 31, 2019
SealabJaster
Nov 01, 2019
Jacob Carlborg
Nov 01, 2019
Ethan
Nov 01, 2019
Jacob Carlborg
Nov 01, 2019
Ethan
Nov 01, 2019
SealabJaster
Nov 03, 2019
SealabJaster
Nov 03, 2019
SealabJaster
Nov 03, 2019
JN
Nov 04, 2019
Patrick Schluter
Nov 10, 2019
SealabJaster
Nov 10, 2019
JN
Nov 01, 2019
SealabJaster
Nov 12, 2019
SealabJaster
Nov 23, 2019
SealabJaster
Dec 04, 2019
SealabJaster
Dec 11, 2019
SealabJaster
May 07, 2020
SealabJaster
May 07, 2020
Greatsam4sure
May 07, 2020
jmh530
May 07, 2020
drug
Dec 03, 2019
Jacob Carlborg
October 31, 2019
https://bradley.chatha.dev/Home/Blog?post=JsonSerialiser1

Currently only the first post is out, as I'd like to collect feedback before writing any more.

The series is aimed at people new to D, or people who have heard of D, but haven't really explored its metaprogramming too much, hence certain things such as calling D's metaprogramming "often overlooked" as that tends to be true for non/new users of D.

Sorry in advance if this is the wrong forum group to post to, I didn't know whether to put it here or in the Learn group.

Future plans for this series:
 * Serialising structs (next up).

 * Serialising enums via their names, rather than values (and certain complications such as is(SomeEnum == int) being true).

 * Serialising classes.

 * Using UDAs to let classes and structs customise their fields.

 * Using __traits(compiles) to determine if a struct or class implements a custom (de)serialisation function.

 * Trying to think of how I can shoe horn mixin templates in, just so they're shown off.

I'm welcome to any other ideas to try and fit into the series. The serialiser won't be overly robust in terms of edge cases (such as nested classes/structs needing to be filtered out sometimes), but I'll try to mention them and provide a workaround where possible.

I've also taken to certain decisions in the code snippets, to try and reduce the amount of things I need to explain at once, and to hopefully make things more readable. e.g. Using "const string" instead of just "const" or "enum" (and then having to explain why not to use "enum" for strings), giving all if and else statements brackets to make things more readable (that's the plan at least), etc.

As for release schedule, I'm planning on getting at least one post out a week.

Other than feedback for the actual content of the blog, I'd also appreciate any feedback on visual style of the blog, since I'm quite a novice at CSS, let alone writing things like this.

While I'm not really capable of contributing to D in terms of improving phobos, or writing quality libraries, I'm hoping to at least be able to provide some educational material on what I feel makes D worth it as a way of contribution.
October 31, 2019
On Thursday, 31 October 2019 at 00:05:06 UTC, SealabJaster wrote:
> https://bradley.chatha.dev/Home/Blog?post=JsonSerialiser1
>
> Currently only the first post is out, as I'd like to collect feedback before writing any more.
>
> [...]


This is truly beautiful. Good work, a great tutorial indeed.


Can you pick up the topic of compile time from the ground up.

I will also love tutorial on DasbetterC. No tutorial that i am aware in this aspect of D

Thanks a million times. I am awaiting the rest part of the tutorial
October 31, 2019
Looks like a very nice initiative! Looking forward to more!

A thought - host it on github? That way people can easily contribute suggestions to it. You'd be in charge, of course, with what to do with those suggestions.
October 31, 2019
On Thursday, 31 October 2019 at 00:05:06 UTC, SealabJaster wrote:
> https://bradley.chatha.dev/Home/Blog?post=JsonSerialiser1
>
> Currently only the first post is out, as I'd like to collect feedback before writing any more.
>
> [...]

Great Job, keep pushing!

If you don't know it, I suggest to have a look to the venerable Philippe Sigaud "D Template Tutorial" for inspiration [1]. It was by far the most complete and comprensive tutorial covering every aspect of the D Template programming.

It would be great to have also an updated version of it ...

[1] https://github.com/PhilippeSigaud/D-templates-tutorial
October 31, 2019
On Thursday, 31 October 2019 at 09:02:07 UTC, Paolo Invernizzi wrote:
> On Thursday, 31 October 2019 at 00:05:06 UTC, SealabJaster wrote:
>> https://bradley.chatha.dev/Home/Blog?post=JsonSerialiser1
>>
>> Currently only the first post is out, as I'd like to collect feedback before writing any more.
>>
>> [...]
>
> Great Job, keep pushing!
>
> If you don't know it, I suggest to have a look to the venerable Philippe Sigaud "D Template Tutorial" for inspiration [1]. It was by far the most complete and comprensive tutorial covering every aspect of the D Template programming.
>
> It would be great to have also an updated version of it ...
>
> [1] https://github.com/PhilippeSigaud/D-templates-tutorial


The tutorial you referred to is very comprehensive but i am confess is hard to understand. I have read it twice but i did not understand. It might be my fault but i will prefer a simple start with the newbie in mind

October 31, 2019
On Thursday, 31 October 2019 at 09:07:18 UTC, GreatSam4sure wrote:
> On Thursday, 31 October 2019 at 09:02:07 UTC, Paolo Invernizzi wrote:
>> On Thursday, 31 October 2019 at 00:05:06 UTC, SealabJaster wrote:
>>> https://bradley.chatha.dev/Home/Blog?post=JsonSerialiser1
>>>
>>> Currently only the first post is out, as I'd like to collect feedback before writing any more.
>>>
>>> [...]
>>
>> Great Job, keep pushing!
>>
>> If you don't know it, I suggest to have a look to the venerable Philippe Sigaud "D Template Tutorial" for inspiration [1]. It was by far the most complete and comprensive tutorial covering every aspect of the D Template programming.
>>
>> It would be great to have also an updated version of it ...
>>
>> [1] https://github.com/PhilippeSigaud/D-templates-tutorial
>
>
> The tutorial you referred to is very comprehensive but i am confess is hard to understand. I have read it twice but i did not understand. It might be my fault but i will prefer a simple start with the newbie in mind

I agree with you, a simple start is valuable, so I think it's good to have someone who is covering that, so thanks!

On the other side, I'm missing an updated version of a "advanced" tutorial, mainly because, as you have noticed, advanced template programming is not so easy to learn!

Thanks for your job!
October 31, 2019
On Thursday, 31 October 2019 at 06:35:07 UTC, GreatSam4sure wrote:
> On Thursday, 31 October 2019 at 00:05:06 UTC, SealabJaster wrote:
>> https://bradley.chatha.dev/Home/Blog?post=JsonSerialiser1
>>
>> Currently only the first post is out, as I'd like to collect feedback before writing any more.
>>
>> [...]
>
>
> This is truly beautiful. Good work, a great tutorial indeed.
>
>
> Can you pick up the topic of compile time from the ground up.
>
> I will also love tutorial on DasbetterC. No tutorial that i am aware in this aspect of D
>
> Thanks a million times. I am awaiting the rest part of the tutorial

I'll definitely cover compile time in more depth at some point, but I don't want to put too much on myself right now, so any other topics will have to wait until after this current series is done.

I'll admit I haven't messed around with DasBetterC since I haven't really had a use case for it yet. I'll mess around with it and maybe write something up, but no promises (and of course, it'll wait until after the serialiser series).

Thank you for the kind words as well.
October 31, 2019
On Thursday, 31 October 2019 at 07:38:46 UTC, Walter Bright wrote:
> Looks like a very nice initiative! Looking forward to more!
>
> A thought - host it on github? That way people can easily contribute suggestions to it. You'd be in charge, of course, with what to do with those suggestions.

Happy to say it is on github, https://github.com/SealabJaster/PersonalWebsite

Issue is though, since it's my personal website I never thought anyone else would even look at the source, so it's got a bit of jank in it.

For example, each blog post is going to be hand written HTML https://github.com/SealabJaster/PersonalWebsite/blob/master/PersonalWebsite/Views/BlogPosts/JsonSerialiser1.cshtml

Though I might bother making it so I can write in markdown instead.
October 31, 2019
On Thursday, 31 October 2019 at 09:11:59 UTC, Paolo Invernizzi wrote:
> On Thursday, 31 October 2019 at 09:07:18 UTC, GreatSam4sure wrote:
>> On Thursday, 31 October 2019 at 09:02:07 UTC, Paolo Invernizzi wrote:
>>> On Thursday, 31 October 2019 at 00:05:06 UTC, SealabJaster wrote:
>>>> [...]
>>>
>>> Great Job, keep pushing!
>>>
>>> If you don't know it, I suggest to have a look to the venerable Philippe Sigaud "D Template Tutorial" for inspiration [1]. It was by far the most complete and comprensive tutorial covering every aspect of the D Template programming.
>>>
>>> It would be great to have also an updated version of it ...
>>>
>>> [1] https://github.com/PhilippeSigaud/D-templates-tutorial
>>
>>
>> The tutorial you referred to is very comprehensive but i am confess is hard to understand. I have read it twice but i did not understand. It might be my fault but i will prefer a simple start with the newbie in mind
>
> I agree with you, a simple start is valuable, so I think it's good to have someone who is covering that, so thanks!
>
> On the other side, I'm missing an updated version of a "advanced" tutorial, mainly because, as you have noticed, advanced template programming is not so easy to learn!
>
> Thanks for your job!

Ooh, that's quite the undertaking.

I'll definitely give it some thought though, but as I said in another post, it'll have to be until after the serialiser set of posts are done.

Would be an interesting thing to slowly work on over time though.
October 31, 2019
On 10/31/2019 2:51 AM, SealabJaster wrote:
> On Thursday, 31 October 2019 at 07:38:46 UTC, Walter Bright wrote:
>> Looks like a very nice initiative! Looking forward to more!
>>
>> A thought - host it on github? That way people can easily contribute suggestions to it. You'd be in charge, of course, with what to do with those suggestions.
> 
> Happy to say it is on github, https://github.com/SealabJaster/PersonalWebsite

Excellent!


> Issue is though, since it's my personal website I never thought anyone else would even look at the source, so it's got a bit of jank in it.

Github is an opportunity for you to build your brand and career.


> For example, each blog post is going to be hand written HTML https://github.com/SealabJaster/PersonalWebsite/blob/master/PersonalWebsite/Views/BlogPosts/JsonSerialiser1.cshtml 
> 
> Though I might bother making it so I can write in markdown instead.

Markdown is a good choice. I've done the hand written HTML, it's agony.
« First   ‹ Prev
1 2 3 4