Re: reggae v0.5.0: new features in the D meta-build system
Am 26.09.2015 um 10:23 schrieb Andy Smith: HI Atilla, Dub's looking interesting! Some of the links are broken when browsing from code.dlang.org though. From http://code.dlang.org/packages/reggae click on, say, 'detailed documentation'. ( Where I wanted to go!). Get .. 404 - Not Found Not Found Internal error information: No routes match path '/packages/doc/index.md' Not sure if that's problem with reggae's layout of the site Cheers, A. That was due to a missing feature (special handling for relative links) of code.dlang.org. Fixed now.
Re: reggae v0.5.0: new features in the D meta-build system
On 2015-09-26 01:53, anonymous wrote: Compiling one file at a time is yet another thing. 1) Compile everything into one object file: dmd -c -ofresult.o foo.d bar.d 2) Compile to multiple object files in one run: dmd -c foo.d bar.d 3) Compile to multiple object files in multiple runs: dmd -c foo.d; dmd -c bar.d Since you didn't know about 2, I take it that you measured 1 vs 3. 3 is bound to be slower when the modules share dependencies, because they have to be parsed again and again. 2 may be faster or slower than 1, I don't know, a quick check didn't show a difference. When the template instantiation issue ever gets fixed, I wouldn't be surprised if 2 got slower than 1. Of course, any slowness of 2 must then be weighed against 1 compiling more than necessary. In theory 2 should be faster when it comes to recompiling because fewer files need to be recompiled. -- /Jacob Carlborg
Re: Scriptlike v0.9.4 - Perl-like interpolated strings, full examples and more.
On 2015-09-25 23:28, H. S. Teoh via Digitalmars-d-announce wrote: It's to work around a dmd bug that doesn't allow overloads between templates and non-templates. But I just checked, looks like that bug may have been fixed since, so now the following overloads would work: void writefln(string format, A...)(A args) { ... } // current void writefln(A...)(string format, A args) { ... } // new 1. "writefln" is already a template [1]: void writefln(Char, A...)(in Char[] fmt, A args) 2. Both of your above examples are templates 3. The easiest way to workaround that bug is to make the non-template function a template function without arguments: void foo()(int a); void foo(T)(T a, T b); But if the bug is fixed, then that's great :) [1] https://github.com/D-Programming-Language/phobos/blob/master/std/stdio.d#L1362 -- /Jacob Carlborg
Re: OneDrive Client written in D
On Saturday, 26 September 2015 at 08:31:02 UTC, Dmitry Olshansky wrote: I hope that was ([^"]*) Right. I should not post anything without testing it first.
Re: OneDrive Client written in D
On 25-Sep-2015 22:37, skilion wrote: On Friday, 25 September 2015 at 07:40:18 UTC, Dmitry Olshansky wrote: Removing anonymous groups and using raw-literal: regex(`^\s*(\w+)\s*=\s*"(.*)"\s*$`) Looks simpler I guess. Good advice, thanks. Though if key="value" is expected I'd suggest to use lazy .* - `"(.*?)"` to stop on first " if any. After playing a bit with it, I realized that it doesn't work in this case (a="a"a" still match). The right solution would be "(.[^"])" I hope that was ([^"]*) Yeah, .*? won't work because of '$' at the end of the pattern. Anyway to allow classical escapes in string literal I'd go for: `"(?:[^"]+|\")*"` -- Dmitry Olshansky
Re: OneDrive Client written in D
On 26-Sep-2015 11:31, Dmitry Olshansky wrote: On 25-Sep-2015 22:37, skilion wrote: On Friday, 25 September 2015 at 07:40:18 UTC, Dmitry Olshansky wrote: Removing anonymous groups and using raw-literal: regex(`^\s*(\w+)\s*=\s*"(.*)"\s*$`) Looks simpler I guess. Good advice, thanks. Though if key="value" is expected I'd suggest to use lazy .* - `"(.*?)"` to stop on first " if any. After playing a bit with it, I realized that it doesn't work in this case (a="a"a" still match). The right solution would be "(.[^"])" I hope that was ([^"]*) Yeah, .*? won't work because of '$' at the end of the pattern. Anyway to allow classical escapes in string literal I'd go for: `"(?:[^"]+|\")*"` i.e. `"(?:[^"]+|\\")*"` to defeat regex escaping. -- Dmitry Olshansky
Re: reggae v0.5.0: new features in the D meta-build system
On Saturday, 26 September 2015 at 08:23:46 UTC, Andy Smith wrote: HI Atilla, Dub's looking interesting! Some of the links are broken when browsing from code.dlang.org though. From http://code.dlang.org/packages/reggae click on, say, 'detailed documentation'. ( Where I wanted to go!). Get .. 404 - Not Found Not Found Internal error information: No routes match path '/packages/doc/index.md' Not sure if that's problem with reggae's layout of the site Cheers, A. ^dub^reggae^ :-) Doh! - morning coffee hasn't kicked in yet! Cheers, A.
Re: reggae v0.5.0: new features in the D meta-build system
HI Atilla, Dub's looking interesting! Some of the links are broken when browsing from code.dlang.org though. From http://code.dlang.org/packages/reggae click on, say, 'detailed documentation'. ( Where I wanted to go!). Get .. 404 - Not Found Not Found Internal error information: No routes match path '/packages/doc/index.md' Not sure if that's problem with reggae's layout of the site Cheers, A.