Re: observation: D getting a bit complex

2015-08-30 Thread Jack Stouffer via Digitalmars-d-learn
On Sunday, 30 August 2015 at 02:42:30 UTC, Spacen Jasset wrote: immutable(ElementEncodingType!(ElementType!Range))[] buildPath(Range)(Range segments) if (isInputRange!Range isSomeString!(ElementType!Range)); pure nothrow @safe immutable(C)[] buildPath(C)(const(C)[][] paths...) if

Re: Challenge

2015-08-30 Thread Russel Winder via Digitalmars-d
On Sun, 2015-08-30 at 10:38 +, John Colvin via Digitalmars-d wrote: On Sunday, 30 August 2015 at 10:15:14 UTC, John Colvin wrote: import std.algorithm, std.range; auto foo(R)(R a, immutable int b) { return a.map!(x = x + b); } unittest @nogc @safe { int[] test =

Re: OT: Hack (Type design features to improve legibility in the harsh conditions of the screen)

2015-08-30 Thread Vladimir Panteleev via Digitalmars-d
On Sunday, 30 August 2015 at 11:06:42 UTC, Nick B wrote: an interesting set of features http://sourcefoundry.org/hack/ destroy ? Nick . https://news.ycombinator.com/item?id=10141120

Re: dmd codegen improvements

2015-08-30 Thread Laeeth Isharc via Digitalmars-d
On Sunday, 30 August 2015 at 02:16:13 UTC, Adam D. Ruppe wrote: On Sunday, 30 August 2015 at 01:48:06 UTC, Ola Fosheim Grostad wrote: When people work on FOUR compilers then you cannot complain about lack of resources. You then need to see if you can do something to unite efforts. They

Challenge

2015-08-30 Thread John Colvin via Digitalmars-d
import std.algorithm, std.range; auto foo(R)(R a, immutable int b) { return a.map!(x = x + b); } unittest @nogc @safe { int[] test = [1,2,3]; assert(test.foo(3).equal(only(4,5,6))); } Challenge: reimplement `foo` such that above unittest will compile. No cheating with malloc etc.

Re: Challenge

2015-08-30 Thread John Colvin via Digitalmars-d
On Sunday, 30 August 2015 at 11:21:34 UTC, Russel Winder wrote: On Sun, 2015-08-30 at 10:38 +, John Colvin via Digitalmars-d wrote: On Sunday, 30 August 2015 at 10:15:14 UTC, John Colvin wrote: [...] Ok, so now I feel stupid. Not only was the unittest I gave above broken anyway, I

Re: Error Compiling with -debug swtich

2015-08-30 Thread BBasile via Digitalmars-d-learn
On Thursday, 27 August 2015 at 22:09:07 UTC, Jordan Wilson wrote: Hello, Just wondering why compiling the following fails with the -debug switch, but appears to compile and execute fine without it: import std.stdio; import std.algorithm; import std.container; int main(string[] args) {

Re: GC-proof resource classes

2015-08-30 Thread ponce via Digitalmars-d
On Saturday, 29 August 2015 at 16:12:52 UTC, skoppe wrote: I don't think it is a good idea to call create_handle() in the constructor. Why not just pass a handle into the Resource? This isn't related to the topic.

Re: observation: D getting a bit complex

2015-08-30 Thread BBasile via Digitalmars-d-learn
On Sunday, 30 August 2015 at 10:42:24 UTC, Spacen Jasset wrote: On Sunday, 30 August 2015 at 07:36:55 UTC, BBasile wrote: On Sunday, 30 August 2015 at 02:42:30 UTC, Spacen Jasset wrote: immutable(ElementEncodingType!(ElementType!Range))[] buildPath(Range)(Range segments) if (isInputRange!Range

Re: [RFC] try to import.clang.c.index.d when there is no clang/c/index.d

2015-08-30 Thread Daniel N via Digitalmars-d
On Sunday, 30 August 2015 at 04:42:20 UTC, Sergey Korshunoff wrote: Hi all I use a modified version of the D compiler v1 which looks for files like clang.c/index.d clang.c.index.d if there is no file clang/c/index.d present It is a personal preference. It is not fun to inspect sources

Re: Reading and converting binary file 2 bits at a time

2015-08-30 Thread Gary Willoughby via Digitalmars-d-learn
On Sunday, 30 August 2015 at 00:02:16 UTC, anonymous wrote: On Saturday, 29 August 2015 at 23:34:47 UTC, Gary Willoughby wrote: But it might not be safe: http://forum.dlang.org/thread/ztefzijqhwrouzlag...@forum.dlang.org That link just takes me to this thread here again. Here's the correct

Re: observation: D getting a bit complex

2015-08-30 Thread Dominikus Dittes Scherkl via Digitalmars-d-learn
On Sunday, 30 August 2015 at 07:36:55 UTC, BBasile wrote: On Sunday, 30 August 2015 at 02:42:30 UTC, Spacen Jasset wrote: immutable(ElementEncodingType!(ElementType!Range))[] buildPath(Range)(Range segments) if (isInputRange!Range isSomeString!(ElementType!Range)); pure nothrow @safe

Re: Challenge

2015-08-30 Thread John Colvin via Digitalmars-d
On Sunday, 30 August 2015 at 10:15:14 UTC, John Colvin wrote: import std.algorithm, std.range; auto foo(R)(R a, immutable int b) { return a.map!(x = x + b); } unittest @nogc @safe { int[] test = [1,2,3]; assert(test.foo(3).equal(only(4,5,6))); } Challenge: reimplement `foo` such

Re: OT: Hack (Type design features to improve legibility in the harsh conditions of the screen)

2015-08-30 Thread rsw0x via Digitalmars-d
On Sunday, 30 August 2015 at 11:52:23 UTC, Vladimir Panteleev wrote: On Sunday, 30 August 2015 at 11:06:42 UTC, Nick B wrote: an interesting set of features http://sourcefoundry.org/hack/ destroy ? Nick . https://news.ycombinator.com/item?id=10141120 Was going to say, that sure looks a

[Issue 14981] New: Missing nothrow attribute in dbgVerifySorted()

2015-08-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14981 Issue ID: 14981 Summary: Missing nothrow attribute in dbgVerifySorted() Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal

Re: dmd codegen improvements

2015-08-30 Thread Iain Buclaw via Digitalmars-d
On 30 Aug 2015 4:45 am, rsw0x via Digitalmars-d digitalmars-d@puremagic.com wrote: On Sunday, 30 August 2015 at 02:13:59 UTC, Adam D. Ruppe wrote: On Saturday, 29 August 2015 at 23:10:29 UTC, Jonathan M Davis wrote: It's the reference compiler, so it's what folks are going to grab first and

Re: GC-proof resource classes

2015-08-30 Thread rsw0x via Digitalmars-d
On Saturday, 29 August 2015 at 23:08:45 UTC, Timon Gehr wrote: On 08/29/2015 04:45 PM, rsw0x wrote: On Saturday, 29 August 2015 at 14:32:27 UTC, Timon Gehr wrote: On 08/29/2015 04:20 PM, cym13 wrote: On Saturday, 29 August 2015 at 14:17:10 UTC, rsw0x wrote: [...] After reading all that, I

Re: Challenge

2015-08-30 Thread rsw0x via Digitalmars-d
On Sunday, 30 August 2015 at 10:15:14 UTC, John Colvin wrote: import std.algorithm, std.range; auto foo(R)(R a, immutable int b) { return a.map!(x = x + b); } unittest @nogc @safe { int[] test = [1,2,3]; assert(test.foo(3).equal(only(4,5,6))); } Challenge: reimplement `foo` such

Re: Moving forward with work on the D language and foundation

2015-08-30 Thread Andrei via Digitalmars-d-announce
On Monday, 24 August 2015 at 18:43:01 UTC, Andrei Alexandrescu wrote: Hello everyone, Following an increasing desire to focus on working on the D language and foundation, I have recently made the difficult decision to part ways with Facebook, my employer of five years and nine months.

Re: GC-proof resource classes

2015-08-30 Thread skoppe via Digitalmars-d
On Sunday, 30 August 2015 at 09:54:31 UTC, ponce wrote: On Saturday, 29 August 2015 at 16:12:52 UTC, skoppe wrote: I don't think it is a good idea to call create_handle() in the constructor. Why not just pass a handle into the Resource? This isn't related to the topic. By putting

[Issue 3243] instantiated 'static this()' bring on a compiler message ': __gate is thread local'

2015-08-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=3243 bb.t...@gmx.com changed: What|Removed |Added CC||bb.t...@gmx.com --

Re: observation: D getting a bit complex

2015-08-30 Thread BBasile via Digitalmars-d-learn
On Sunday, 30 August 2015 at 02:42:30 UTC, Spacen Jasset wrote: immutable(ElementEncodingType!(ElementType!Range))[] buildPath(Range)(Range segments) if (isInputRange!Range isSomeString!(ElementType!Range)); pure nothrow @safe immutable(C)[] buildPath(C)(const(C)[][] paths...) if

[Issue 14938] std.net.curl tests should use localhost or stub any networking

2015-08-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14938 --- Comment #4 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/4a496c848c9ab5dff49ba4887900abd6acf7c160 fix Issue 14938 -

Re: observation: D getting a bit complex

2015-08-30 Thread cym13 via Digitalmars-d-learn
On Sunday, 30 August 2015 at 09:55:02 UTC, Dominikus Dittes Scherkl wrote: And the constraints you need not read - unless you want to understand why your call to the function failed. C++ is just lacking without them. Having them avoids that you always have to handle ridiculous input within

Re: Challenge

2015-08-30 Thread rsw0x via Digitalmars-d
On Sunday, 30 August 2015 at 10:21:20 UTC, rsw0x wrote: On Sunday, 30 August 2015 at 10:15:14 UTC, John Colvin wrote: import std.algorithm, std.range; auto foo(R)(R a, immutable int b) { return a.map!(x = x + b); } unittest @nogc @safe { int[] test = [1,2,3];

OT: Hack (Type design features to improve legibility in the harsh conditions of the screen)

2015-08-30 Thread Nick B via Digitalmars-d
an interesting set of features http://sourcefoundry.org/hack/ destroy ? Nick .

[Issue 14982] New: nogc inconsistency

2015-08-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14982 Issue ID: 14982 Summary: nogc inconsistency Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority: P1

[Issue 14983] AUTO_BOOTSTRAP download never happens.

2015-08-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14983 John Colvin john.loughran.col...@gmail.com changed: What|Removed |Added Summary|auto_bootstrap download |AUTO_BOOTSTRAP

Re: stuck on opDiv / opBinary

2015-08-30 Thread Spacen Jasset via Digitalmars-d-learn
On Sunday, 30 August 2015 at 18:12:40 UTC, BBasile wrote: On Sunday, 30 August 2015 at 17:02:58 UTC, Spacen Jasset wrote: [...] try --- Vector3 opBinary(string op)(Vector3 rhs) { static if (op ==/){} else static assert(0, op ~ not implemented); } --- you used the char litteral

Re: GC-proof resource classes

2015-08-30 Thread ponce via Digitalmars-d
On Sunday, 30 August 2015 at 17:00:23 UTC, ZombineDev wrote: On Saturday, 29 August 2015 at 13:14:26 UTC, ponce wrote: ensureNotInGC() is implemented like this: void ensureNotInGC(string resourceName) nothrow { debug { import core.exception;

Re: declarations as template parameters

2015-08-30 Thread Adam D. Ruppe via Digitalmars-d
On Sunday, 30 August 2015 at 16:31:17 UTC, Daniel N wrote: I guess it could be possible to solve using UDA:s instead... maybe I'll try that next, just checking if I'm the only one dreaming about declarations as template parameters. What I would love would be being able to pass an anonymous

[Issue 14431] [REG 2.067.0] huge slowdown of compilation speed

2015-08-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14431 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 14431] [REG 2.067.0] huge slowdown of compilation speed

2015-08-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14431 --- Comment #14 from github-bugzi...@puremagic.com --- Commits pushed to stable at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/6c14fadca403a61a578795ec0fb71f9340c7b543 fix Issue 14431 - huge

[Issue 14901] [reg 2.067/2.068] template static shared this() run multiple times with separate compilation

2015-08-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14901 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 14541] duplicate COMDAT linker error with the template forward reference in Tuple.opAssign

2015-08-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14541 --- Comment #4 from github-bugzi...@puremagic.com --- Commit pushed to stable at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/cd29d5f34cbacebd83ecdb9727ab1b93f7fa6af1 Merge pull request #4814

Re: How to get the current Timezone

2015-08-30 Thread Jonathan M Davis via Digitalmars-d-learn
On Saturday, August 29, 2015 05:25:33 rumbu via Digitalmars-d-learn wrote: On Friday, 28 August 2015 at 23:03:16 UTC, Jonathan M Davis wrote: I _really_ wish that Microsoft would just use the TZ database like everyone else... - Jonathan M Davis Starting with Windows 8.1, it does, but

Re: GC-proof resource classes

2015-08-30 Thread ZombineDev via Digitalmars-d
On Sunday, 30 August 2015 at 20:44:17 UTC, ponce wrote: In the case the destructor isn't called by the GC, the call must succeed. GC.malloc(1) fits the bill but it's a waste of time and memory indeed. GC.free(invalid-adress) would fail in both cases if I understand correctly. As you can see

Re: stuck on opDiv / opBinary

2015-08-30 Thread BBasile via Digitalmars-d-learn
On Sunday, 30 August 2015 at 17:02:58 UTC, Spacen Jasset wrote: I have just added an opDiv to this class, but it doesn't seem to pick it up. math/vector.d(30): Error: 'this /= mag' is not a scalar, it is a Vector3 I can't see why that is, becuase my opMul works in the same place. Can anyone

[Issue 14901] [reg 2.067/2.068] template static shared this() run multiple times with separate compilation

2015-08-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14901 --- Comment #6 from github-bugzi...@puremagic.com --- Commit pushed to stable at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/5b464f3393980a0229c079ff6e646ef843681996 fix Issue 14901 - template

Re: What is the D way to map a binary file to a structure?

2015-08-30 Thread Atila Neves via Digitalmars-d-learn
On Saturday, 29 August 2015 at 12:56:08 UTC, cym13 wrote: Hi, Let's say I have a simple binary file whose structure is well-known. Here is an example which stores points: struct Point { long x; long y; long z; } struct BinFile { uintmagicNumber; // Some identifier

Re: observation: D getting a bit complex

2015-08-30 Thread Spacen Jasset via Digitalmars-d-learn
On Sunday, 30 August 2015 at 07:36:55 UTC, BBasile wrote: On Sunday, 30 August 2015 at 02:42:30 UTC, Spacen Jasset wrote: immutable(ElementEncodingType!(ElementType!Range))[] buildPath(Range)(Range segments) if (isInputRange!Range isSomeString!(ElementType!Range)); pure nothrow @safe

Re: observation: D getting a bit complex

2015-08-30 Thread anonymous via Digitalmars-d-learn
On Sunday 30 August 2015 04:42, Spacen Jasset wrote: immutable(ElementEncodingType!(ElementType!Range))[] buildPath(Range)(Range segments) if (isInputRange!Range isSomeString!(ElementType!Range)); pure nothrow @safe immutable(C)[] buildPath(C)(const(C)[][] paths...) if (isSomeChar!C);

Re: stuck on opDiv / opBinary

2015-08-30 Thread John Colvin via Digitalmars-d-learn
On Sunday, 30 August 2015 at 17:02:58 UTC, Spacen Jasset wrote: I have just added an opDiv to this class, but it doesn't seem to pick it up. math/vector.d(30): Error: 'this /= mag' is not a scalar, it is a Vector3 I can't see why that is, becuase my opMul works in the same place. Can anyone

Re: declarations as template parameters

2015-08-30 Thread Timon Gehr via Digitalmars-d
On 08/30/2015 08:43 PM, Adam D. Ruppe wrote: On Sunday, 30 August 2015 at 16:31:17 UTC, Daniel N wrote: I guess it could be possible to solve using UDA:s instead... maybe I'll try that next, just checking if I'm the only one dreaming about declarations as template parameters. What I would

Re: observation: D getting a bit complex

2015-08-30 Thread H. S. Teoh via Digitalmars-d-learn
On Sun, Aug 30, 2015 at 07:36:53AM +, BBasile via Digitalmars-d-learn wrote: On Sunday, 30 August 2015 at 02:42:30 UTC, Spacen Jasset wrote: immutable(ElementEncodingType!(ElementType!Range))[] buildPath(Range)(Range segments) if (isInputRange!Range isSomeString!(ElementType!Range));

Re: D-Day for DMD is today!

2015-08-30 Thread Adam D. Ruppe via Digitalmars-d-announce
On Sunday, 30 August 2015 at 18:44:48 UTC, Jacob Carlborg wrote: No, this is a tool for generating C/C++ header files from D modules, DStep does the opposite. I did one to the point where it basically worked for the support dmd had for C++ interop a couple years ago, but since that's changed

Re: declarations as template parameters

2015-08-30 Thread Daniel N via Digitalmars-d
On Sunday, 30 August 2015 at 18:43:32 UTC, Adam D. Ruppe wrote: On Sunday, 30 August 2015 at 16:31:17 UTC, Daniel N wrote: I guess it could be possible to solve using UDA:s instead... maybe I'll try that next, just checking if I'm the only one dreaming about declarations as template

Re: stuck on opDiv / opBinary

2015-08-30 Thread Timon Gehr via Digitalmars-d-learn
On 08/30/2015 07:02 PM, Spacen Jasset wrote: I have just added an opDiv to this class, but it doesn't seem to pick it up. math/vector.d(30): Error: 'this /= mag' is not a scalar, it is a Vector3 I can't see why that is, becuase my opMul works in the same place. Can anyone point out what I have

Re: GC-proof resource classes

2015-08-30 Thread ponce via Digitalmars-d
On Sunday, 30 August 2015 at 21:52:37 UTC, ZombineDev wrote: On Sunday, 30 August 2015 at 20:44:17 UTC, ponce wrote: In the case the destructor isn't called by the GC, the call must succeed. GC.malloc(1) fits the bill but it's a waste of time and memory indeed. GC.free(invalid-adress) would

Re: GC-proof resource classes

2015-08-30 Thread Jim Hewes via Digitalmars-d
On 8/29/2015 8:20 AM, cym13 wrote: I think there should be a separation of concerns that isn't possible right now. Freeing ressources and freeing memory isn't the same thing and they should be decoupled. I think a destructor is there to free ressources, and the GC is there to free memory. If the

Re: GC-proof resource classes

2015-08-30 Thread rsw0x via Digitalmars-d
On Sunday, 30 August 2015 at 18:21:17 UTC, Jim Hewes wrote: Regarding the garbage collector, if the destructor isn't guaranteed to be called, then I have to assume the worst case that it won't be called. That means I should not use destructors in these cases. It seems to me that should be

[Issue 14894] mangling of mixins and lambdas can change w/ -unittest or other versions

2015-08-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14894 --- Comment #6 from Martin Nowak c...@dawg.eu --- (In reply to Martin Nowak from comment #4) We still need a long-term solution to make the mangling not dependent on flags like -unittest or -release. Using source position (line and col) doesn't

Re: GC-proof resource classes

2015-08-30 Thread Timon Gehr via Digitalmars-d
On 08/30/2015 12:10 PM, rsw0x wrote: On Saturday, 29 August 2015 at 23:08:45 UTC, Timon Gehr wrote: On 08/29/2015 04:45 PM, rsw0x wrote: On Saturday, 29 August 2015 at 14:32:27 UTC, Timon Gehr wrote: On 08/29/2015 04:20 PM, cym13 wrote: On Saturday, 29 August 2015 at 14:17:10 UTC, rsw0x

[Issue 14984] Make it illegal (or at least a warning) to modify the iteration variable in foreach

2015-08-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14984 yebblies yebbl...@gmail.com changed: What|Removed |Added CC||yebbl...@gmail.com --- Comment

Re: observation: D getting a bit complex

2015-08-30 Thread bachmeier via Digitalmars-d-learn
On Sunday, 30 August 2015 at 02:42:30 UTC, Spacen Jasset wrote: The following reminds me of the good old C++ template errors the C++ compiler spits out. Whilst D has fixed that problem, some things have gotten more complex. I just wanted to find a replacement for D1 path join, and found

Re: Challenge

2015-08-30 Thread anonymous via Digitalmars-d
On Sunday 30 August 2015 12:21, rsw0x wrote: import std.algorithm, std.range; auto foo(R)(R a, immutable int b) { return a.map!(x = x + b); } @nogc @safe unittest { int[3] test = [1,2,3]; assert(test[].foo(3).equal(only(4,5,6))); } does this count? I think this

[Issue 14982] nogc inconsistency

2015-08-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14982 ag0ae...@gmail.com changed: What|Removed |Added CC||ag0ae...@gmail.com --- Comment #1 from

[Issue 14979] [REG2.068] Wrong tempCString result on x64 with ternary operator

2015-08-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14979 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||wrong-code --- Comment #2

Possible solution for export : `unittest export`?

2015-08-30 Thread Dicebot via Digitalmars-d
Follow-up to old http://forum.dlang.org/thread/m9lhc3$1r1v$1...@digitalmars.com thread by Benjamin Short reminder of the issue: Currently unsolved issue with finishing `export` implementation is lack of convenient semantics for its interaction with templates. If template function is marked

[Issue 14745] Qualifiers rejected for delegate literals

2015-08-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14745 --- Comment #2 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/6b42d4df211895b225866f52bdef4e156949c6ce fix Issue 14745 -

Re: dmd codegen improvements

2015-08-30 Thread via Digitalmars-d
On Sunday, 30 August 2015 at 06:07:25 UTC, Laeeth Isharc wrote: To make the observation that someone unhappy with a state of affairs has the option to contribute the time to help move the world in the direction they think good is not quite the same thing as complaining about a lack of

[Issue 14984] Make it illegal (or at least a warning) to modify the iteration variable in foreach

2015-08-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14984 --- Comment #3 from Marc Schütz schue...@gmx.net --- @Kenji Hara: Yes, I know that. My point is that it's too easy to forget to add `const`. --

Re: Benchmarking suite

2015-08-30 Thread qznc via Digitalmars-d
On Sunday, 30 August 2015 at 14:56:34 UTC, Dmitry Olshansky wrote: Was one of the first benchmarks where std.regex destroyed the competition. It may still do so ;) Rust has compile-time regex as well now. http://doc.rust-lang.org/regex/regex/index.html#the-regex!-macro

[Issue 14984] New: Make it illegal (or at least a warning) to modify the iteration variable in foreach

2015-08-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14984 Issue ID: 14984 Summary: Make it illegal (or at least a warning) to modify the iteration variable in foreach Product: D Version: D2 Hardware: x86_64 OS: Linux

[Issue 14818] Unhelpful does not match template overload set error

2015-08-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14818 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 14818] Unhelpful does not match template overload set error

2015-08-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14818 --- Comment #2 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/76c6ac64f25ac651c86837dd36056bc2c13b71f1 fix Issue 14818 - Unhelpful

[Issue 14983] New: auto_bootstrap download never happens.

2015-08-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14983 Issue ID: 14983 Summary: auto_bootstrap download never happens. Product: D Version: D2 Hardware: x86_64 OS: Mac OS X Status: NEW Severity: enhancement

[Issue 14984] Make it illegal (or at least a warning) to modify the iteration variable in foreach

2015-08-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14984 --- Comment #2 from Kenji Hara k.hara...@gmail.com --- Currently it's intentional. When you declare a index variable in foreach statement, it works like an auto variable scoped in the foreach body. If you need non-mutable index variable, you can

Re: Benchmarking suite

2015-08-30 Thread qznc via Digitalmars-d
On Saturday, 29 August 2015 at 12:05:18 UTC, qznc wrote: Maybe somebody has already fixed or improved benchmark programs? As of now, most things work. Only meteor.d is broken. Crashes at runtime. Ldc and gdc sometimes fail, because they are behind dmd. regexdna.cpp fails, because re2 is not

Re: Benchmarking suite

2015-08-30 Thread qznc via Digitalmars-d
On Saturday, 29 August 2015 at 19:17:47 UTC, Dmitry Olshansky wrote: On 29-Aug-2015 21:14, qznc wrote: On Saturday, 29 August 2015 at 12:35:14 UTC, Dmitry Olshansky wrote: Well, here is the regex-dna one with 3 versions including C-T regex:

stuck on opDiv / opBinary

2015-08-30 Thread Spacen Jasset via Digitalmars-d-learn
I have just added an opDiv to this class, but it doesn't seem to pick it up. math/vector.d(30): Error: 'this /= mag' is not a scalar, it is a Vector3 I can't see why that is, becuase my opMul works in the same place. Can anyone point out what I have done wrong? Class Matrix { void

Re: Benchmarking suite

2015-08-30 Thread Dmitry Olshansky via Digitalmars-d
On 30-Aug-2015 19:57, qznc wrote: On Sunday, 30 August 2015 at 14:56:34 UTC, Dmitry Olshansky wrote: Was one of the first benchmarks where std.regex destroyed the competition. It may still do so ;) Rust has compile-time regex as well now.

Re: GC-proof resource classes

2015-08-30 Thread ZombineDev via Digitalmars-d
On Saturday, 29 August 2015 at 13:14:26 UTC, ponce wrote: ensureNotInGC() is implemented like this: void ensureNotInGC(string resourceName) nothrow { debug { import core.exception; try { import core.memory;

[Issue 14771] Hidden @nogc violation around closure creation

2015-08-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14771 ag0ae...@gmail.com changed: What|Removed |Added CC||ag0ae...@gmail.com --- Comment #2 from

Re: Challenge

2015-08-30 Thread rsw0x via Digitalmars-d
On Sunday, 30 August 2015 at 13:36:45 UTC, anonymous wrote: On Sunday 30 August 2015 12:21, rsw0x wrote: [...] I think this shouldn't compile and it only does so because of issue 14771. https://issues.dlang.org/show_bug.cgi?id=14771 The delegate in foo uses a local variable and it's

Re: Benchmarking suite

2015-08-30 Thread Dmitry Olshansky via Digitalmars-d
On 30-Aug-2015 16:21, qznc wrote: On Saturday, 29 August 2015 at 19:17:47 UTC, Dmitry Olshansky wrote: On 29-Aug-2015 21:14, qznc wrote: On Saturday, 29 August 2015 at 12:35:14 UTC, Dmitry Olshansky wrote: Well, here is the regex-dna one with 3 versions including C-T regex:

Re: dpaste web site

2015-08-30 Thread BBasile via Digitalmars-d
On Wednesday, 26 August 2015 at 05:54:44 UTC, nazriel wrote: On Thursday, 20 August 2015 at 20:28:48 UTC, Steven Schveighoffer wrote: dpaste.dzfl.pl is severely out of date. Who maintains this and can we get it updated? It's going to start hurting us pretty severely if we use it as our go-to

[Issue 13203] conflicting aliases allowed with static if

2015-08-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13203 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 13203] conflicting aliases allowed with static if

2015-08-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13203 --- Comment #2 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/520156c295d2ea1ad71200b6e6000d6c83f61d50 fix Issue 13203 -

Re: Moving forward with work on the D language and foundation

2015-08-30 Thread FrankLike via Digitalmars-d-announce
On Sunday, 30 August 2015 at 11:48:26 UTC, Andrei wrote: On Monday, 24 August 2015 at 18:43:01 UTC, Andrei Alexandrescu wrote: Hello everyone, Following an increasing desire to focus on working on the D language and foundation, I have recently made the difficult decision to part ways with

[Issue 14510] Bad tail call optimization with static arrays

2015-08-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14510 tbanelweb...@free.fr changed: What|Removed |Added CC||tbanelweb...@free.fr --- Comment #5

Re: GC-proof resource classes

2015-08-30 Thread ponce via Digitalmars-d
On Sunday, 30 August 2015 at 11:45:36 UTC, skoppe wrote: On Sunday, 30 August 2015 at 09:54:31 UTC, ponce wrote: On Saturday, 29 August 2015 at 16:12:52 UTC, skoppe wrote: I don't think it is a good idea to call create_handle() in the constructor. Why not just pass a handle into the

[Issue 14745] Qualifiers rejected for delegate literals

2015-08-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14745 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 13244] Wrong code with -inline and foreach/map/all

2015-08-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13244 --- Comment #8 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/7dd243d69d4d2525eebc7e73f94f9df215fbeb3a fix Issue 13244 - Wrong

[Issue 13244] Wrong code with -inline and foreach/map/all

2015-08-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13244 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED

Re: OT: Hack (Type design features to improve legibility in the harsh conditions of the screen)

2015-08-30 Thread tcak via Digitalmars-d
On Sunday, 30 August 2015 at 11:06:42 UTC, Nick B wrote: an interesting set of features http://sourcefoundry.org/hack/ destroy ? Nick . I would encourage you to check Input Mono [0]. At first, it might look too square compared to Hack, but in a short time, I really liked it and still

[Issue 14962] [REG2.068] compiler inference of attributes for nested map seems broken

2015-08-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14962 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 14781] [REG2.067] impure delegate to pure function context should be able to modify context

2015-08-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14781 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 14962] [REG2.068] compiler inference of attributes for nested map seems broken

2015-08-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14962 --- Comment #4 from github-bugzi...@puremagic.com --- Commits pushed to stable at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/0c9f5a272bf47e1ad81d2a8a4c56adfd3461fde7 fix Issue 14962 - compiler

[Issue 14781] [REG2.067] impure delegate to pure function context should be able to modify context

2015-08-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14781 --- Comment #9 from github-bugzi...@puremagic.com --- Commits pushed to stable at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/922d79a43ff60ed324e32e2f4be1430de209746f fix Issue 14781 - impure

Re: Challenge

2015-08-30 Thread anonymous via Digitalmars-d
On Sunday 30 August 2015 16:43, rsw0x wrote: Is there any reason that closure in this particular example can't be created on the stack? Seems a bit weird. It may be possible to store it on the stack somehow, or as part of the map struct. I don't know. The point is, that's not what happens.

[Issue 3243] instantiated 'static this()' bring on a compiler message ': __gate is thread local'

2015-08-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=3243 github-bugzi...@puremagic.com changed: What|Removed |Added Status|REOPENED|RESOLVED

[Issue 3243] instantiated 'static this()' bring on a compiler message ': __gate is thread local'

2015-08-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=3243 --- Comment #7 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/01979b088cd967e5d8e02f7cc2e742400179dc64 fix Issue 3243 -

declarations as template parameters

2015-08-30 Thread Daniel N via Digitalmars-d
Frequently when trying to implement missing language-features in the library, it grinds to a halt because it's not possible to send declarations as template parameters. i.e. ex!(int i); Phobos solved this in a for me very undesirable way, ex: mixin(bitfields!(uint, x, 1)); It no longer

Re: stuck on opDiv / opBinary

2015-08-30 Thread Spacen Jasset via Digitalmars-d-learn
On Sunday, 30 August 2015 at 20:09:25 UTC, Timon Gehr wrote: On 08/30/2015 07:02 PM, Spacen Jasset wrote: [...] import std.math: sqrt; import std.algorithm: map,sum,canFind; struct Vector3{ float[3] xyz; void normalise(){ this/=magnitude(); } float magnitude(){ return

how does vibe's PrivateAccessProxy work

2015-08-30 Thread yawniek via Digitalmars-d-learn
can someone explain a bit how the @before hooks works in detail, i mainly have problems understanding why ensureAuth in belows example refers to SampleService. as an instance:

[Issue 14985] New: [REG2.068.1-b1] Link failure for const TypeInfo of speculative instantiated struct

2015-08-30 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14985 Issue ID: 14985 Summary: [REG2.068.1-b1] Link failure for const TypeInfo of speculative instantiated struct Product: D Version: D2 Hardware: All OS: All

Re: OT: Hack (Type design features to improve legibility in the harsh conditions of the screen)

2015-08-30 Thread Jonathan M Davis via Digitalmars-d
On Sunday, 30 August 2015 at 11:06:42 UTC, Nick B wrote: an interesting set of features http://sourcefoundry.org/hack/ destroy ? Wow, that site really hurts my eyes - probably mostly because of that weird dot effect that they use at the top (probably trying to look like an old monitor or

Re: What is the D way to map a binary file to a structure?

2015-08-30 Thread mzfhhhh via Digitalmars-d-learn
On Saturday, 29 August 2015 at 12:56:08 UTC, cym13 wrote: Hi, Let's say I have a simple binary file whose structure is well-known. Here is an example which stores points: struct Point { long x; long y; long z; } struct BinFile { uintmagicNumber; // Some identifier

Re: GC-proof resource classes

2015-08-30 Thread Brian Schott via Digitalmars-d
On Sunday, 30 August 2015 at 21:59:59 UTC, ponce wrote: I'm not sure there is even a need for synchronization since other threads that wan't to allocate try to take the GC lock while the GC-hijacked thread calls destructors. And if the destructor isn't called by the GC, I don't see a problem

  1   2   >