Re: How to compile against GitHub fork of Phobos?

2017-03-06 Thread Q. Schroll via Digitalmars-d-learn
On Tuesday, 7 March 2017 at 02:30:21 UTC, ketmar wrote: Q. Schroll wrote: On Tuesday, 7 March 2017 at 01:45:48 UTC, Adam D. Ruppe wrote: You pass your modified file to the compiler: dmd yourfile.d format.d The format.d there can be a copy of the one from phobos (or a fork or whatever) and s

Re: How to compile against GitHub fork of Phobos?

2017-03-06 Thread ketmar via Digitalmars-d-learn
Q. Schroll wrote: On Tuesday, 7 March 2017 at 01:45:48 UTC, Adam D. Ruppe wrote: You pass your modified file to the compiler: dmd yourfile.d format.d The format.d there can be a copy of the one from phobos (or a fork or whatever) and since you passed it explicitly on the command line, it ta

Re: How to compile against GitHub fork of Phobos?

2017-03-06 Thread Q. Schroll via Digitalmars-d-learn
On Tuesday, 7 March 2017 at 01:45:48 UTC, Adam D. Ruppe wrote: You pass your modified file to the compiler: dmd yourfile.d format.d The format.d there can be a copy of the one from phobos (or a fork or whatever) and since you passed it explicitly on the command line, it takes precedence over

Re: How to compile against GitHub fork of Phobos?

2017-03-06 Thread Adam D. Ruppe via Digitalmars-d-learn
On Tuesday, 7 March 2017 at 01:14:28 UTC, Q. Schroll wrote: I have a fork of the standard-library in the folder "phobos". In version 2.072.1 of the compiler, I could use code like void main() { import phobos.std.format; That should never have worked unless you changed the modu

How to compile against GitHub fork of Phobos?

2017-03-06 Thread Q. Schroll via Digitalmars-d-learn
I have a fork of the standard-library in the folder "phobos". In version 2.072.1 of the compiler, I could use code like void main() { import phobos.std.format; /* code for checking my changes to format */ } compiled with $ dmd -I"phobos" test_format.d in the pare

Re: Writing pattern matching macros in D.

2017-03-06 Thread Jacob Carlborg via Digitalmars-d-learn
On 2017-03-06 17:27, Deech wrote: I was thinking something on the order of Scala's pattern matching using apply/unapply methods. http://www.artima.com/pins1ed/extractors.html. That should be possible. Although not as a macro and not with the same nice syntax. Something like this should be pos

Re: Writing pattern matching macros in D.

2017-03-06 Thread Deech via Digitalmars-d-learn
On Monday, 6 March 2017 at 08:27:13 UTC, David Nadlinger wrote: On Monday, 6 March 2017 at 02:20:02 UTC, Deech wrote: […] add pattern matching to the language as a macro. D doesn't have macros per se. However, template metaprogramming and mixins can replace them in many cases. Which particu

Re: Why doesn't this chain of ndslices work?

2017-03-06 Thread Ilya Yaroshenko via Digitalmars-d-learn
On Sunday, 15 May 2016 at 12:30:03 UTC, Stiff wrote: On Sunday, 15 May 2016 at 08:31:17 UTC, 9il wrote: On Saturday, 14 May 2016 at 21:59:48 UTC, Stiff wrote: Here's the code that doesn't compile: import std.stdio, std.experimental.ndslice, std.range, std.algorithm; [...] Coming soon htt

Re: index of ddocs

2017-03-06 Thread Christian Köstlin via Digitalmars-d-learn
On 06/03/2017 11:29, rikki cattermole wrote: > On 06/03/2017 11:25 PM, Christian Köstlin wrote: >> Hi, >> >> I have a small dub-based application project with several modules (it's >> not a vibe.d project). I can easily create ddocs for the modules by >> running dub build --build=docs. >> >> I am m

Re: Best memory management D idioms

2017-03-06 Thread XavierAP via Digitalmars-d-learn
On Monday, 6 March 2017 at 08:26:53 UTC, Eugene Wissner wrote: The memory management in D is becoming a mess. I am aware this is a hot topic, hence the opening joke. But I just want to learn what toolboxes are currently available, not really discuss how adequate they are, or how often GC is a

Re: index of ddocs

2017-03-06 Thread rikki cattermole via Digitalmars-d-learn
On 06/03/2017 11:25 PM, Christian Köstlin wrote: Hi, I have a small dub-based application project with several modules (it's not a vibe.d project). I can easily create ddocs for the modules by running dub build --build=docs. I am missing at the moment a page, that shows the contents of the whol

index of ddocs

2017-03-06 Thread Christian Köstlin via Digitalmars-d-learn
Hi, I have a small dub-based application project with several modules (it's not a vibe.d project). I can easily create ddocs for the modules by running dub build --build=docs. I am missing at the moment a page, that shows the contents of the whole package. Did I miss something here? Best regards

Re: Writing pattern matching macros in D.

2017-03-06 Thread David Nadlinger via Digitalmars-d-learn
On Monday, 6 March 2017 at 02:20:02 UTC, Deech wrote: […] add pattern matching to the language as a macro. D doesn't have macros per se. However, template metaprogramming and mixins can replace them in many cases. Which particular form of pattern matching do you have in mind? You won't get

Re: Best memory management D idioms

2017-03-06 Thread Eugene Wissner via Digitalmars-d-learn
On Sunday, 5 March 2017 at 20:54:06 UTC, XavierAP wrote: 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. whenev

Re: Split Real / Float into Mantissa, Exponent, and Base

2017-03-06 Thread Marc Schütz via Digitalmars-d-learn
On Friday, 3 March 2017 at 18:09:02 UTC, Jonathan M. Wilbur wrote: I have tried to come up with a good way to get the mantissa, exponent, and base from a real number, and I just can't come up with a good cross-platform way of doing it. I know about std.math.frexp(), but that function only gives