March 07, 2018
On Tuesday, 6 March 2018 at 21:09:06 UTC, Jordi Gutiérrez Hermoso wrote:

>
> Posting to Reddit is easier, but I don't have a recognisable account on Reddit to post it from.

I'll post it. There are good times and bad times to post on /r/programming in terms of getting attention. A good time would be in about ~12 hours or so.
March 07, 2018
On Tuesday, 6 March 2018 at 20:37:34 UTC, Steven Schveighoffer wrote:
> What triggers the compile-time execution is the fact that static *initializers* need to be decided at compile time.
>
> So while it is executing the regex building at compile time in your example, there are other ways to do it, and in this case, I'd prefer using an enum. You can also use ctRegex.
>
> The drawback of using static is that it keeps its value between function calls:

What about static immutable? I think enums exist only for compiler but they're not a l-value, so you can't take a reference, am I wrong?

Andrea
March 07, 2018
On Wednesday, 7 March 2018 at 01:07:54 UTC, Mike Parker wrote:
> On Tuesday, 6 March 2018 at 21:09:06 UTC, Jordi Gutiérrez Hermoso wrote:
>
>>
>> Posting to Reddit is easier, but I don't have a recognisable account on Reddit to post it from.
>
> I'll post it. There are good times and bad times to post on /r/programming in terms of getting attention. A good time would be in about ~12 hours or so.

Ah, well. Someone had already submitted it. And completely missed the window :-(
March 07, 2018
On Wednesday, 7 March 2018 at 14:02:19 UTC, Mike Parker wrote:
> On Wednesday, 7 March 2018 at 01:07:54 UTC, Mike Parker wrote:
>> On Tuesday, 6 March 2018 at 21:09:06 UTC, Jordi Gutiérrez Hermoso wrote:
>>
>>>
>>> Posting to Reddit is easier, but I don't have a recognisable account on Reddit to post it from.
>>
>> I'll post it. There are good times and bad times to post on /r/programming in terms of getting attention. A good time would be in about ~12 hours or so.
>
> Ah, well. Someone had already submitted it. And completely missed the window :-(

Oh?

I only see it here:

https://www.reddit.com/r/d_language/comments/82i0s4/advent_of_d/

There don't seem to be duplicate reposts to other subreddits. Where are you seeing it?
March 07, 2018
On Wednesday, 7 March 2018 at 14:43:24 UTC, Jordi Gutiérrez Hermoso wrote:
>
> I only see it here:
>
> https://www.reddit.com/r/d_language/comments/82i0s4/advent_of_d/
>
> There don't seem to be duplicate reposts to other subreddits. Where are you seeing it?

Sorry, should have pasted the link:

https://www.reddit.com/r/programming/comments/82j5m0/advent_of_d_a_good_overview_of_d_programming/
March 07, 2018
On 3/7/18 3:20 AM, Andrea Fontana wrote:
> On Tuesday, 6 March 2018 at 20:37:34 UTC, Steven Schveighoffer wrote:
>> What triggers the compile-time execution is the fact that static *initializers* need to be decided at compile time.
>>
>> So while it is executing the regex building at compile time in your example, there are other ways to do it, and in this case, I'd prefer using an enum. You can also use ctRegex.
>>
>> The drawback of using static is that it keeps its value between function calls:
> 
> What about static immutable? I think enums exist only for compiler but they're not a l-value, so you can't take a reference, am I wrong?

Static immutable works (and makes sense as a static variable) if you can use it as immutable. I'm not sure regex can do that.

enums force the compile time execution, then you need to generate a runtime value from the result. i.e.:

enum Xval = someCTFEfunction(); // run at CTFE.
auto x = Xval; // no calls, just pastes the result there.

-Steve
March 07, 2018
On Wednesday, 7 March 2018 at 14:50:34 UTC, Mike Parker wrote:
> On Wednesday, 7 March 2018 at 14:43:24 UTC, Jordi Gutiérrez Hermoso wrote:
>>
>> I only see it here:
>>
>> https://www.reddit.com/r/d_language/comments/82i0s4/advent_of_d/
>>
>> There don't seem to be duplicate reposts to other subreddits. Where are you seeing it?
>
> Sorry, should have pasted the link:
>
> https://www.reddit.com/r/programming/comments/82j5m0/advent_of_d_a_good_overview_of_d_programming/

Ah, I see. Pity. Maybe it'll get rediscovered in a few months and people will post it again.
March 07, 2018
On 03/07/2018 09:50 AM, Mike Parker wrote:
> On Wednesday, 7 March 2018 at 14:43:24 UTC, Jordi Gutiérrez Hermoso wrote:
>>
>> I only see it here:
>>
>> https://www.reddit.com/r/d_language/comments/82i0s4/advent_of_d/
>>
>> There don't seem to be duplicate reposts to other subreddits. Where are you seeing it?
> 
> Sorry, should have pasted the link:
> 
> https://www.reddit.com/r/programming/comments/82j5m0/advent_of_d_a_good_overview_of_d_programming/ 

The post does not appear on the /r/programming page, so it has been flagged as spam.

All: please coordinate social media announcements of your D-related work with Michael Parker for best results.


Thanks,

Andrei

March 07, 2018
On Tue, 2018-03-06 at 18:09 +0000, Jordi Gutiérrez Hermoso via Digitalmars-d wrote:
> I wrote a blog post about working on Advent of Code in D. You can read it here:
> 
> http://jordi.inversethought.com/blog/advent-of-d/

Another blog post deserving of formal publication in an ACCU journal.

-- 
Russel.
===========================================
Dr Russel Winder      t: +44 20 7585 2200
41 Buckmaster Road    m: +44 7770 465 077
London SW11 1EN, UK   w: www.russel.org.uk


March 08, 2018
On Wednesday, 7 March 2018 at 21:35:06 UTC, Russel Winder wrote:
> On Tue, 2018-03-06 at 18:09 +0000, Jordi Gutiérrez Hermoso via Digitalmars-d wrote:
>> I wrote a blog post about working on Advent of Code in D. You can read it here:
>> 
>> http://jordi.inversethought.com/blog/advent-of-d/
>
> Another blog post deserving of formal publication in an ACCU journal.

Hm, I quickly looked at what that is. Some sort of informal journal? You think if I adapted the blog post for a print publication, they would take it?