Re: Writing pattern matching macros in D.

2017-03-05 Thread sarn via Digitalmars-d-learn
On Monday, 6 March 2017 at 02:20:02 UTC, Deech wrote: Hi all, I've been reading up on D's metaprogramming features and was wondering if it was possible to use them to add pattern matching to the language as a macro. The template mixin feature seems to require putting the new syntax in

Writing pattern matching macros in D.

2017-03-05 Thread Deech via Digitalmars-d-learn
Hi all, I've been reading up on D's metaprogramming features and was wondering if it was possible to use them to add pattern matching to the language as a macro. The template mixin feature seems to require putting the new syntax in strings. I was hoping there's an alternative. Thanks! -deech

Best memory management D idioms

2017-03-05 Thread XavierAP via Digitalmars-d-learn
I was going to name this thread "SEX!!" but then I thought "best memory management" would get me more reads ;) Anyway now that I have your attention... What I want to learn (not debate) is the currently available types, idioms etc. whenever one wants deterministic memory management. Please do

Re: Question about vibe.conf file

2017-03-05 Thread crimaniak via Digitalmars-d-learn
On Sunday, 5 March 2017 at 13:41:23 UTC, Suliman wrote: I had seen some mentions about `vibe.conf` file in vibed docs. But can't understand it's structure and find examples of it's usage. Json file. Real example: ``` { "mqttHost" : "***.***.**.***", "mqttPort" :

Re: Building a project with CMAKE

2017-03-05 Thread Johan Engelen via Digitalmars-d-learn
On Saturday, 4 March 2017 at 18:45:22 UTC, berni wrote: [...] If you think, this program could be usefull for you, I can email it to you... The smaller the testcase, the better. You mentioned that for testcase "B" there is a ~10% performance difference between GDC and LDC, so that's

Question about vibe.conf file

2017-03-05 Thread Suliman via Digitalmars-d-learn
I had seen some mentions about `vibe.conf` file in vibed docs. But can't understand it's structure and find examples of it's usage.

Re: In Expressions

2017-03-05 Thread Basile B. via Digitalmars-d-learn
On Saturday, 4 March 2017 at 19:31:46 UTC, Andrey wrote: On Saturday, 4 March 2017 at 17:57:16 UTC, John Colvin wrote: but to be honest, I would just repeat myself a bit and write if (regionAlign == RegionAlign.top || regionAlign == RegionAlign.bottom) { } That's exactly what I did, just