Re: Evaluation order of index expressions

2015-05-25 Thread Iain Buclaw via Digitalmars-d
On 25 May 2015 01:10, Timon Gehr via Digitalmars-d digitalmars-d@puremagic.com wrote: On 05/25/2015 12:36 AM, Iain Buclaw via Digitalmars-d wrote: This comes up once in a while. We should stick with left to right through and through. It's a simple matter of getting somebody on the

Re: Checking template parameter types of class

2015-05-25 Thread Ali Çehreli via Digitalmars-d-learn
On 05/24/2015 09:14 PM, tcak wrote: Line 243: auto fileResourceList = new shared FileResourceList( 2 ); main.d(243): Error: class main.FileResourceList(T) if (is(T : FileResource)) is used as a type struct and class templates do not have automatic type deduction; function templates do.

Re: Uphill

2015-05-25 Thread ketmar via Digitalmars-d
On Mon, 25 May 2015 00:24:26 +0200, Iain Buclaw via Digitalmars-d wrote: I find the situation being like at university looking for grants or funding, and constantly being told. #39;Oh yes, it is important what you are doing, and you must keep doing it as it is pivotal for future success. 

Re: Evaluation order of index expressions

2015-05-25 Thread Jonathan M Davis via Digitalmars-d
On Monday, 25 May 2015 at 07:33:49 UTC, ketmar wrote: On Sun, 24 May 2015 19:30:52 +, kinke wrote: So for the 2nd assignment's left-hand-side, the index is evaluated before evaluating the container! Please don't tell me that's by design. : it is. at least this is what i was told when i

Re: Checking template parameter types of class

2015-05-25 Thread thedeemon via Digitalmars-d-learn
On Monday, 25 May 2015 at 04:15:00 UTC, tcak wrote: main.d(243): Error: class main.FileResourceList(T) if (is(T : FileResource)) is used as a type The error message is not indicating directly this, though logically it is still correct. Compiler means template is used as a type which is an

Re: Idiomatic way to call base method in generic code

2015-05-25 Thread ketmar via Digitalmars-d-learn
On Sun, 24 May 2015 23:32:50 +, ZombineDev wrote: I know I can call a base implementation of a method like in 3), but I need to do it generically like in 2). Does anybody now how I can achieve this? i don't know why you want that, but something like this may do: auto

Re: Evaluation order of index expressions

2015-05-25 Thread ketmar via Digitalmars-d
On Sun, 24 May 2015 19:30:52 +, kinke wrote: So for the 2nd assignment's left-hand-side, the index is evaluated before evaluating the container! Please don't tell me that's by design. : it is. at least this is what i was told when i faced the similar issue. WONTIFX, STFU. signature.asc

[Issue 14469] file.readText on Win64 doesn't work for files 4GB.

2015-05-25 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14469 --- Comment #3 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/95fd043dc6d0c945c171f8874761e1399a11252c Fix Issue 14469 -

[Issue 14469] file.readText on Win64 doesn't work for files 4GB.

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

Re: Idiomatic way to call base method in generic code

2015-05-25 Thread ZombineDev via Digitalmars-d-learn
On Monday, 25 May 2015 at 07:57:49 UTC, ketmar wrote: i don't know why you want that, but something like this may do: auto callBaseMethod(string MTN, C, Args...) (inout C self, Args args) { alias FSC = BaseClassesTuple!(C)[0]; return mixin(`self.`~FSC.stringof~`.`~MTN~(args)); }

Re: indie game contests

2015-05-25 Thread Manu via Digitalmars-d
Awww Danni, you've forsaken me! :P On 25 May 2015 at 03:47, Vlad Levenfeld via Digitalmars-d digitalmars-d@puremagic.com wrote: On Saturday, 23 May 2015 at 05:17:13 UTC, Danni Coy wrote: Got very close to a year or so ago. Probably something I would be much more capable of doing now. The only

Re: Evaluation order of index expressions

2015-05-25 Thread via Digitalmars-d
On Monday, 25 May 2015 at 08:00:15 UTC, Jonathan M Davis wrote: it is, a slight change to the code could change the order. So, the kind of stuff that you're complaining about not being able to do really shouldn't be done regardless of how well-defined the order of evaluation is. It's just

Re: Uphill

2015-05-25 Thread via Digitalmars-d
On Sunday, 24 May 2015 at 16:03:30 UTC, Andrei Alexandrescu wrote: On 5/24/15 1:20 AM, weaselcat wrote: IMO I think the worst thing C++ has done is blatantly ignore features that have been 'killer' in D(see: the reaction to the static_if proposal)

Re: Uphill

2015-05-25 Thread via Digitalmars-d
On Sunday, 24 May 2015 at 19:06:28 UTC, weaselcat wrote: Furthermore, I strongly dislike that Rust has made it completely impossible to opt out of bounds checking without annotating your code with unsafe. But this is exactly the situation in D, isn't it? As soon as you use `arr.ptr[i]`,

Regex-Fu

2015-05-25 Thread Chris via Digitalmars-d-learn
I'm a bit at a loss here. I cannot get the longest possible match. I tried several versions with eager operators and stuff, but D's regex engine(s) always seem to return the shortest match. Is there something embarrassingly simple I'm missing? void main() { import std.regex : regex,

Re: Regex-Fu

2015-05-25 Thread novice2 via Digitalmars-d-learn
I cannot get the longest possible it match longest for first group ([a-z]+) try ^([a-z]+?)(hula|ula)$

Re: Regex-Fu

2015-05-25 Thread Chris via Digitalmars-d-learn
On Monday, 25 May 2015 at 11:20:46 UTC, novice2 wrote: I cannot get the longest possible it match longest for first group ([a-z]+) try ^([a-z]+?)(hula|ula)$ Namespace, novice2: Ah, I see. The problem was with the first group that was too greedy, not with the second. I was focusing on the

Re: Request for Features/Ideas: A std.archive package

2015-05-25 Thread Liam McSherry via Digitalmars-d
On Monday, 25 May 2015 at 03:33:37 UTC, Rikki Cattermole wrote: Anyway, take a look at e.g. IWritableCapsuleArchive. There is a LOT more whitespace needed to be added in that file. Could you elaborate? Functions/etc in the interfaces are grouped by purpose (opIndexAssign/opSliceAssign are

Autotester FreeBSD: Cycle detected between modules with ctors/dtors

2015-05-25 Thread via Digitalmars-d
The autotester complains about cycles between module ctors on FreeBSD 32/64 for this PR: https://github.com/D-Programming-Language/phobos/pull/3233 The modules are std.digest.hmac (added in the PR), and std.digest.digest. However, neither of them even has a module ctor or dtor. I remember

Re: Regex-Fu

2015-05-25 Thread Namespace via Digitalmars-d-learn
On Monday, 25 May 2015 at 11:11:50 UTC, Chris wrote: I'm a bit at a loss here. I cannot get the longest possible match. I tried several versions with eager operators and stuff, but D's regex engine(s) always seem to return the shortest match. Is there something embarrassingly simple I'm

[Issue 14554] [REG2.066] dmd generate wrong error message for multiple template with same name

2015-05-25 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14554 --- Comment #2 from Daniel Kozak kozz...@gmail.com --- https://github.com/D-Programming-Language/dmd/pull/4681 --

DMD Symbol Reference Analysis Pass

2015-05-25 Thread via Digitalmars-d
Does DMD currently do any analysis of references to a symbol in a given scope? If not where could this information be extracted (in which visitor/callback) and in what structure should it, if so, be stored? Reason: After having read about Rust's data-flow (and in turn escape) analysis I'm very

Re: Request for Features/Ideas: A std.archive package

2015-05-25 Thread Rikki Cattermole via Digitalmars-d
On 25/05/2015 10:48 p.m., Liam McSherry wrote: On Monday, 25 May 2015 at 03:33:37 UTC, Rikki Cattermole wrote: Anyway, take a look at e.g. IWritableCapsuleArchive. There is a LOT more whitespace needed to be added in that file. Could you elaborate? Functions/etc in the interfaces are grouped

Re: Idiomatic way to call base method in generic code

2015-05-25 Thread Meta via Digitalmars-d-learn
On Monday, 25 May 2015 at 09:24:58 UTC, ZombineDev wrote: On Monday, 25 May 2015 at 07:57:49 UTC, ketmar wrote: i don't know why you want that, but something like this may do: auto callBaseMethod(string MTN, C, Args...) (inout C self, Args args) { alias FSC = BaseClassesTuple!(C)[0];

Re: Evaluation order of index expressions

2015-05-25 Thread kinke via Digitalmars-d
On Monday, 25 May 2015 at 08:00:15 UTC, Jonathan M Davis wrote: It might be completely well-defined and consistent, but it may not be what you expect, and even if it is, a slight change to the code could change the order. If the behavior isn't what I expect (and I don't think that's often

[Issue 13433] Request: Clock.currTime option to use CLOCK_REALTIME_COARSE / CLOCK_REALTIME_FAST

2015-05-25 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13433 --- Comment #15 from Sobirari Muhomori dfj1es...@sneakemail.com --- BTW, Windows 8 has GetSystemTimePreciseAsFileTime function for time reading with better precision. --

Re: Request for Features/Ideas: A std.archive package

2015-05-25 Thread Liam McSherry via Digitalmars-d
On Monday, 25 May 2015 at 11:50:25 UTC, Rikki Cattermole wrote: Basically there is no lines between one function declaration and another. I've added some extra white-space.

Re: Expanding asm.dlang.org

2015-05-25 Thread Mike via Digitalmars-d
On Monday, 25 May 2015 at 14:54:59 UTC, Mike wrote: On Monday, 25 May 2015 at 14:41:51 UTC, Mike wrote: I can add any cross compilers hosted on gdcproject.org. What do you need from me? Or did you mean any compiler from the finite list here:

Re: Uphill

2015-05-25 Thread Iain Buclaw via Digitalmars-d
On 25 May 2015 09:45, ketmar via Digitalmars-d digitalmars-d@puremagic.com wrote: On Mon, 25 May 2015 00:24:26 +0200, Iain Buclaw via Digitalmars-d wrote: I find the situation being like at university looking for grants or funding, and constantly being told. #39;Oh yes, it is important

Re: This Week in D: ... not much, actually

2015-05-25 Thread Kagamin via Digitalmars-d-announce
Or a long review for more content.

[dconf] Share a ride SLC-hotel?

2015-05-25 Thread Andrei Alexandrescu via Digitalmars-d
I'm arriving in SLC on Tue at 11:39 pm. Anyone up for sharing a ride? I'm thinking http://www.expressshuttleutah.com/. -- Andrei

Re: Uphill

2015-05-25 Thread Andrei Alexandrescu via Digitalmars-d
On 5/25/15 3:51 AM, Marc =?UTF-8?B?U2Now7x0eiI=?= schue...@gmx.net wrote: On Sunday, 24 May 2015 at 16:03:30 UTC, Andrei Alexandrescu wrote: On 5/24/15 1:20 AM, weaselcat wrote: IMO I think the worst thing C++ has done is blatantly ignore features that have been 'killer' in D(see: the reaction

Re: Evaluation order of index expressions

2015-05-25 Thread Andrei Alexandrescu via Digitalmars-d
On 5/24/15 11:13 PM, Iain Buclaw via Digitalmars-d wrote: The context here involves concurrency where bar() calls yield and makes changes to foo before returning to assign the updated results. We're not addressing that. += is not supposed to do concurrency magic. -- Andrei

Re: Replacing nested loops foreach using map/each/etc

2015-05-25 Thread Meta via Digitalmars-d-learn
On Monday, 25 May 2015 at 15:46:54 UTC, Dennis Ritchie wrote: On Monday, 25 May 2015 at 15:06:45 UTC, Alex Parrill wrote: Hint: Use `cartesianProduct` [1] with three iota ranges to replace the foreachs, and `filter` to replace the if [1]

Re: Evaluation order of index expressions

2015-05-25 Thread Andrei Alexandrescu via Digitalmars-d
On 5/25/15 1:00 AM, Jonathan M Davis wrote: foo(++i, ++i); More complete example: table[++i] = objTable[++i].funcTable[++i](++i, ++i); should be well defined and evaluate left to right. Andrei

Expanding asm.dlang.org

2015-05-25 Thread Mike via Digitalmars-d
We currently have 4 different online compiler/disassembers all forked from the same GCC Explorer, and all apparently hosted by different individuals. http://asm.dlang.org (DMD) http://d.godbolt.org/ (GDC) http://explore.dgnu.org/ (GDC) http://ldc.acomirei.ru/ (LDC) Judging by the announcement

Replacing nested loops foreach using map/each/etc

2015-05-25 Thread Dennis Ritchie via Digitalmars-d-learn
Hi, Is it possible to write such a construction that could push immediately to a conditional statement without using nested loops? Ie organize search directly in the iterator if provided by a map / each / iota and other support functions. Ie I want to write this code shorter :) import

Re: Expanding asm.dlang.org

2015-05-25 Thread Iain Buclaw via Digitalmars-d
On 25 May 2015 16:30, Mike via Digitalmars-d digitalmars-d@puremagic.com wrote: We currently have 4 different online compiler/disassembers all forked from the same GCC Explorer, and all apparently hosted by different individuals. http://asm.dlang.org (DMD) http://d.godbolt.org/ (GDC)

Re: Expanding asm.dlang.org

2015-05-25 Thread Iain Buclaw via Digitalmars-d
On 25 May 2015 at 18:45, Andrei Alexandrescu via Digitalmars-d digitalmars-d@puremagic.com wrote: On 5/25/15 7:36 AM, Iain Buclaw via Digitalmars-d wrote: I can add any cross compilers hosted on gdcproject.org http://gdcproject.org. You'd need to go through Godbolt to get it on his host.

Re: Expanding asm.dlang.org

2015-05-25 Thread Iain Buclaw via Digitalmars-d
On 25 May 2015 at 17:02, Iain Buclaw ibuc...@gdcproject.org wrote: On 25 May 2015 16:55, Mike via Digitalmars-d digitalmars-d@puremagic.com wrote: On Monday, 25 May 2015 at 14:41:51 UTC, Mike wrote: I can add any cross compilers hosted on gdcproject.org. What do you need from me?

Re: D needs...

2015-05-25 Thread Namespace via Digitalmars-d-announce
On Monday, 18 May 2015 at 21:51:49 UTC, Namespace wrote: Knee-jerk response: if no return attribute on a function it should be safe to bind rvalues to ref parameters. Of course that's impractical as a default so explicit auto ref would be needed. -- Andrei Would it be to hasty if someone

Re: Request for Features/Ideas: A std.archive package

2015-05-25 Thread Rikki Cattermole via Digitalmars-d
On 26/05/2015 1:39 a.m., Liam McSherry wrote: On Monday, 25 May 2015 at 11:50:25 UTC, Rikki Cattermole wrote: Basically there is no lines between one function declaration and another. I've added some extra white-space. Awesome thanks, it'll make it a little easier to get it through review.

Re: Autotester FreeBSD: Cycle detected between modules with ctors/dtors

2015-05-25 Thread Steven Schveighoffer via Digitalmars-d
On 5/25/15 6:18 AM, Marc =?UTF-8?B?U2Now7x0eiI=?= schue...@gmx.net wrote: The autotester complains about cycles between module ctors on FreeBSD 32/64 for this PR: https://github.com/D-Programming-Language/phobos/pull/3233 The modules are std.digest.hmac (added in the PR), and std.digest.digest.

Re: Replacing nested loops foreach using map/each/etc

2015-05-25 Thread Dennis Ritchie via Digitalmars-d-learn
On Monday, 25 May 2015 at 15:06:45 UTC, Alex Parrill wrote: Hint: Use `cartesianProduct` [1] with three iota ranges to replace the foreachs, and `filter` to replace the if [1] http://dlang.org/phobos/std_algorithm_setops.html#.cartesianProduct Thank you. Is it possible to replace the loop

Re: Evaluation order of index expressions

2015-05-25 Thread Jonathan M Davis via Digitalmars-d
On Monday, 25 May 2015 at 12:38:29 UTC, kinke wrote: On Monday, 25 May 2015 at 08:00:15 UTC, Jonathan M Davis wrote: It might be completely well-defined and consistent, but it may not be what you expect, and even if it is, a slight change to the code could change the order. If the behavior

Re: Expanding asm.dlang.org

2015-05-25 Thread Iain Buclaw via Digitalmars-d
On 25 May 2015 at 17:06, Mike via Digitalmars-d digitalmars-d@puremagic.com wrote: On Monday, 25 May 2015 at 15:03:06 UTC, Iain Buclaw wrote: On 25 May 2015 16:55, Mike via Digitalmars-d digitalmars-d@puremagic.com wrote: On Monday, 25 May 2015 at 14:41:51 UTC, Mike wrote: I can add any

Re: Uphill

2015-05-25 Thread ketmar via Digitalmars-d
On Mon, 25 May 2015 16:59:48 +0200, Iain Buclaw via Digitalmars-d wrote: On 25 May 2015 09:45, ketmar via Digitalmars-d digitalmars-d@puremagic.com wrote: On Mon, 25 May 2015 00:24:26 +0200, Iain Buclaw via Digitalmars-d wrote: I find the situation being like at university looking for

[Issue 14617] PTHREAD_MUTEX_INITIALIZER does not work on OSX

2015-05-25 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14617 --- Comment #8 from Andrei Alexandrescu and...@erdani.com --- I now understand. Let's leave types.d be code-free for now (in fact it could be renamed to types.di) and only fix PTHREAD_MUTEX_INITIALIZER at least for now. --

Re: Uphill

2015-05-25 Thread Iain Buclaw via Digitalmars-d
On 25 May 2015 at 18:14, ketmar via Digitalmars-d digitalmars-d@puremagic.com wrote: On Mon, 25 May 2015 16:59:48 +0200, Iain Buclaw via Digitalmars-d wrote: On 25 May 2015 09:45, ketmar via Digitalmars-d digitalmars-d@puremagic.com wrote: On Mon, 25 May 2015 00:24:26 +0200, Iain

Re: Expanding asm.dlang.org

2015-05-25 Thread Mike via Digitalmars-d
I can add any cross compilers hosted on gdcproject.org. What do you need from me?

Re: Expanding asm.dlang.org

2015-05-25 Thread Mike via Digitalmars-d
On Monday, 25 May 2015 at 14:41:51 UTC, Mike wrote: I can add any cross compilers hosted on gdcproject.org. What do you need from me? Or did you mean any compiler from the finite list here: http://forum.dlang.org/post/satkcwpjqogloqlrj...@forum.dlang.org?

Re: shared libs for OSX

2015-05-25 Thread bitwise via Digitalmars-d
I've been reading through the Mach-O docs[1], and it seems that dynamic libs are treated the same as static libs in that exported symbols can only be defined once, even across dynamically loaded libraries. This is why calling rt_init from my dylib ended up calling the one that was already

Re: Replacing nested loops foreach using map/each/etc

2015-05-25 Thread Alex Parrill via Digitalmars-d-learn
On Monday, 25 May 2015 at 14:25:52 UTC, Dennis Ritchie wrote: Hi, Is it possible to write such a construction that could push immediately to a conditional statement without using nested loops? Ie organize search directly in the iterator if provided by a map / each / iota and other support

Re: Expanding asm.dlang.org

2015-05-25 Thread Mike via Digitalmars-d
On Monday, 25 May 2015 at 15:03:06 UTC, Iain Buclaw wrote: On 25 May 2015 16:55, Mike via Digitalmars-d digitalmars-d@puremagic.com wrote: On Monday, 25 May 2015 at 14:41:51 UTC, Mike wrote: I can add any cross compilers hosted on gdcproject.org. What do you need from me? Or did you

Re: Replacing nested loops foreach using map/each/etc

2015-05-25 Thread Dennis Ritchie via Digitalmars-d-learn
On Monday, 25 May 2015 at 16:41:35 UTC, Meta wrote: import std.algorithm; import std.range; import std.stdio; void main() { const x = 12, y = 65, z = 50, s = 1435; auto a = iota(0, x + 1); cartesianProduct(a, a, a) .filter!(i = i[0] * (y + 3 * z) + i[1] * (y + 2

Re: Evaluation order of index expressions

2015-05-25 Thread Johannes Pfau via Digitalmars-d
Am Mon, 25 May 2015 09:40:34 -0700 schrieb Andrei Alexandrescu seewebsiteforem...@erdani.org: On 5/24/15 11:13 PM, Iain Buclaw via Digitalmars-d wrote: The context here involves concurrency where bar() calls yield and makes changes to foo before returning to assign the updated results.

Re: Expanding asm.dlang.org

2015-05-25 Thread Iain Buclaw via Digitalmars-d
On 25 May 2015 16:55, Mike via Digitalmars-d digitalmars-d@puremagic.com wrote: On Monday, 25 May 2015 at 14:41:51 UTC, Mike wrote: I can add any cross compilers hosted on gdcproject.org. What do you need from me? Or did you mean any compiler from the finite list here:

Re: Expanding asm.dlang.org

2015-05-25 Thread Andrei Alexandrescu via Digitalmars-d
On 5/25/15 7:36 AM, Iain Buclaw via Digitalmars-d wrote: I can add any cross compilers hosted on gdcproject.org http://gdcproject.org. You'd need to go through Godbolt to get it on his host. asm.dlang.org http://asm.dlang.org is a no go because it has been tailored for dmd only. The right

Re: How to append range to array?

2015-05-25 Thread John Colvin via Digitalmars-d-learn
On Saturday, 23 May 2015 at 07:03:35 UTC, Vladimir Panteleev wrote: int[] arr = [1, 2, 3]; auto r = iota(4, 10); // ??? assert(equal(arr, iota(1, 10))); Hopefully in one GC allocation (assuming we know the range's length). I tried std.range.primitives.put but its behavior seems a little

Re: Replacing nested loops foreach using map/each/etc

2015-05-25 Thread Meta via Digitalmars-d-learn
On Monday, 25 May 2015 at 17:05:35 UTC, Dennis Ritchie wrote: On Monday, 25 May 2015 at 16:41:35 UTC, Meta wrote: import std.algorithm; import std.range; import std.stdio; void main() { const x = 12, y = 65, z = 50, s = 1435; auto a = iota(0, x + 1); cartesianProduct(a, a, a)

Re: Evaluation order of index expressions

2015-05-25 Thread kinke via Digitalmars-d
On Monday, 25 May 2015 at 17:21:05 UTC, Johannes Pfau wrote: import std.stdio; void main() { int a = 0; int bar() { a++; return a; } a += bar(); // = a = a + bar() writeln(a); } DMD: 2 GDC: 1 which one is correct? So what about my previous example?

Re: Replacing nested loops foreach using map/each/etc

2015-05-25 Thread Dennis Ritchie via Digitalmars-d-learn
On Monday, 25 May 2015 at 19:16:04 UTC, anonymous wrote: On Monday, 25 May 2015 at 17:52:09 UTC, Dennis Ritchie wrote: But why is the solution breaks down when `s = 1` ? :) import std.stdio, std.algorithm, std.range; int c; const x = 12, y = 65, z = 50, s = 10; Which is it, now? 4

Re: [dconf] Share a ride SLC-hotel?

2015-05-25 Thread Steven Schveighoffer via Digitalmars-d
On 5/25/15 12:39 PM, Andrei Alexandrescu wrote: I'm arriving in SLC on Tue at 11:39 pm. Anyone up for sharing a ride? I'm thinking http://www.expressshuttleutah.com/. -- Andrei Just make sure you call, because they told me after hours (which I think was after midnight) requires an additional

Re: [dconf] Share a ride SLC-hotel?

2015-05-25 Thread Walter Bright via Digitalmars-d
On 5/25/2015 9:39 AM, Andrei Alexandrescu wrote: I'm arriving in SLC on Tue at 11:39 pm. Anyone up for sharing a ride? I'm thinking http://www.expressshuttleutah.com/. -- Andrei Chuck says the shuttle is $38 one way and $68 round trip.

Re: Evaluation order of index expressions

2015-05-25 Thread Daniel Murphy via Digitalmars-d
Andrei Alexandrescu wrote in message news:mjvlv5$vch$1...@digitalmars.com... which one is correct? GDC. -- Andrei I don't think it matters too much if we pick strict LTR, or keep dmd's existing exception for assign expressions. IIRC Walter is in favour of keeping the exception[1].

Re: Evaluation order of index expressions

2015-05-25 Thread Iain Buclaw via Digitalmars-d
On 25 May 2015 21:00, Daniel Murphy via Digitalmars-d digitalmars-d@puremagic.com wrote: Andrei Alexandrescu wrote in message news:mjvlv5$vch$1...@digitalmars.com. .. which one is correct? GDC. -- Andrei I don't think it matters too much if we pick strict LTR, or keep dmd's existing

Re: Evaluation order of index expressions

2015-05-25 Thread Iain Buclaw via Digitalmars-d
On 25 May 2015 at 21:02, kinke via Digitalmars-d digitalmars-d@puremagic.com wrote: On Monday, 25 May 2015 at 17:21:05 UTC, Johannes Pfau wrote: import std.stdio; void main() { int a = 0; int bar() { a++; return a; } a += bar(); // = a = a + bar()

Re: std.multidimarray

2015-05-25 Thread Vlad Levenfeld via Digitalmars-d
On Monday, 25 May 2015 at 18:33:57 UTC, Dennis Ritchie wrote: Yes, that's what I mean. Some common questions about working with multidimensional arrays need to be addressed. For example, the cycle `foreach` multiple iterators, etc. Cycle was tough. I was using T[2] to track slice boundaries

Re: Replacing nested loops foreach using map/each/etc

2015-05-25 Thread anonymous via Digitalmars-d-learn
On Monday, 25 May 2015 at 17:52:09 UTC, Dennis Ritchie wrote: But why is the solution breaks down when `s = 1` ? :) import std.stdio, std.algorithm, std.range; int c; const x = 12, y = 65, z = 50, s = 10; Which is it, now? 4 or 5 zeros? void solve(Range)(Range r) {

Re: Evaluation order of index expressions

2015-05-25 Thread Timon Gehr via Digitalmars-d
On 05/25/2015 09:14 PM, Iain Buclaw via Digitalmars-d wrote: So what about my previous example? int b = 0; ((++b *= 5) *= 2) += ++b * (b -= 6); DMD 2.067.1: 60, latest LDC: 65, GDC: ? If the litmus test is What does GDC do?, then LDC is doing it the correct way. :-) Even

Re: Evaluation order of index expressions

2015-05-25 Thread Andrei Alexandrescu via Digitalmars-d
On 5/25/15 10:21 AM, Johannes Pfau wrote: Am Mon, 25 May 2015 09:40:34 -0700 schrieb Andrei Alexandrescu seewebsiteforem...@erdani.org: On 5/24/15 11:13 PM, Iain Buclaw via Digitalmars-d wrote: The context here involves concurrency where bar() calls yield and makes changes to foo before

Re: shared libs for OSX

2015-05-25 Thread Jacob Carlborg via Digitalmars-d
On 2015-05-25 16:33, bitwise wrote: I've been reading through the Mach-O docs[1], and it seems that dynamic libs are treated the same as static libs in that exported symbols can only be defined once, even across dynamically loaded libraries. This is why calling rt_init from my dylib ended up

Re: Evaluation order of index expressions

2015-05-25 Thread kinke via Digitalmars-d
On 05/25/2015 09:14 PM, Iain Buclaw via Digitalmars-d wrote: If the litmus test is What does GDC do?, then LDC is doing it the correct way. :-) Perfect. :) On Monday, 25 May 2015 at 19:17:48 UTC, Timon Gehr wrote: Even if it isn't. ;) It is - on its merge-2.067 branch. ;)

Re: Evaluation order of index expressions

2015-05-25 Thread Iain Buclaw via Digitalmars-d
On 25 May 2015 21:35, Timon Gehr via Digitalmars-d digitalmars-d@puremagic.com wrote: On 05/25/2015 09:28 PM, kinke wrote: On 05/25/2015 09:14 PM, Iain Buclaw via Digitalmars-d wrote: If the litmus test is What does GDC do?, then LDC is doing it the correct way. :-) Perfect. :) On

Re: Evaluation order of index expressions

2015-05-25 Thread Daniel Murphy via Digitalmars-d
Timon Gehr wrote in message news:mjvtqm$17d8$1...@digitalmars.com... A related issue is that the rewrites documented at http://dlang.org/operatoroverloading.html don't all preserve the order of subexpressions. However, ideally, the order of evaluation would be preserved. As operator

Re: Replacing nested loops foreach using map/each/etc

2015-05-25 Thread Dennis Ritchie via Digitalmars-d-learn
On Monday, 25 May 2015 at 17:19:27 UTC, Meta wrote: `each` doesn't support braces. There are 4 ways to write a function/delegate literal in D (with a few minor variations): Short form: function(int i) = i; (int i) = i (i) = i i = i Long form: function(int i) { return i; } (int i) { return i;

Re: std.multidimarray

2015-05-25 Thread Dennis Ritchie via Digitalmars-d
On Monday, 25 May 2015 at 18:11:32 UTC, Vlad Levenfeld wrote: The matrix implementation is really just a placeholder, when I have more time I would like to fill it out with compile-time swappable backend implementations using the same matrix frontend (eg forwarding arithmetic operations to gsl

[Issue 14617] PTHREAD_MUTEX_INITIALIZER does not work on OSX

2015-05-25 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14617 --- Comment #9 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/D-Programming-Language/druntime https://github.com/D-Programming-Language/druntime/commit/ab78a534dc017efecbe86f79f5d4559b85ef8619 fix issue 14617 -

Re: Evaluation order of index expressions

2015-05-25 Thread Timon Gehr via Digitalmars-d
On 05/25/2015 09:28 PM, kinke wrote: On 05/25/2015 09:14 PM, Iain Buclaw via Digitalmars-d wrote: If the litmus test is What does GDC do?, then LDC is doing it the correct way. :-) Perfect. :) On Monday, 25 May 2015 at 19:17:48 UTC, Timon Gehr wrote: Even if it isn't. ;) It is - on its

Re: Evaluation order of index expressions

2015-05-25 Thread Daniel Murphy via Digitalmars-d
Timon Gehr wrote in message news:mjvvq2$19hd$1...@digitalmars.com... As operator overloading is defined in terms of lowering to function calls, I think it's reasonable to decide the order of evaluation after the lowering. This will still be consistent across compilers and platforms. But

[Issue 13433] Request: Clock.currTime option to use CLOCK_REALTIME_COARSE / CLOCK_REALTIME_FAST

2015-05-25 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13433 Steven Schveighoffer schvei...@yahoo.com changed: What|Removed |Added Status|NEW |RESOLVED

Re: deserialization: creating a class instance without calling constructor

2015-05-25 Thread timotheecour via Digitalmars-d-learn
On Thursday, 21 May 2015 at 19:06:35 UTC, Jacob Carlborg wrote: On 2015-05-21 11:06, Timothee Cour via Digitalmars-d-learn wrote: Can I create an instance of A without calling a constructor? (see below) Use case: for generic deserialiaztion, when the deserialization library encounters a class

Re: shared libs for OSX

2015-05-25 Thread Martin Nowak via Digitalmars-d
On Monday, 25 May 2015 at 14:33:43 UTC, bitwise wrote: At this point, my impression is that it would be very impractical, if not impossible to have separate druntimes for each shared library. Even when you do link separate runtimes, dyld still treats all the exported symbols as shared. Yes,

Re: std.multidimarray

2015-05-25 Thread Dennis Ritchie via Digitalmars-d
On Monday, 25 May 2015 at 19:14:05 UTC, Vlad Levenfeld wrote: Cycle was tough. I was using T[2] to track slice boundaries but had to retrofit the library with an Interval!(L,R) type to admit the possibility of unbounded dimensions. This has resulted in a fairly easy implementation for cycle,

Re: std.multidimarray

2015-05-25 Thread Dennis Ritchie via Digitalmars-d
On Monday, 25 May 2015 at 19:14:05 UTC, Vlad Levenfeld wrote: https://github.com/evenex/autodata/blob/master/source/spaces/cyclic.d And I think that the symbol `ℕ` in your code you need to replace some words.

[Issue 7454] Add file and line numbers to Linux stack traces using addr2line

2015-05-25 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=7454 Martin Nowak c...@dawg.eu changed: What|Removed |Added CC||c...@dawg.eu --- Comment #3 from

Re: shared libs for OSX

2015-05-25 Thread Martin Nowak via Digitalmars-d
On Monday, 25 May 2015 at 19:40:52 UTC, bitwise wrote: 1) _dyld_register_func_for_add_image should be taken care of with the above two fixes You still cannot unregister the callback, so it can't be used for dynamically loading druntime. Last time we talked about this problem, we found some

Re: indie game contests

2015-05-25 Thread Danni Coy via Digitalmars-d
@Manu - if by that you mean do game jams without you - that horse has already bolted the stable :p I would be happy to a try the October Game Jam again this year and I thoroughly recommend the global (much more laid back). extrawurst - danni@gmail.com On Mon, May 25, 2015 at 8:06 PM, Manu

Re: Evaluation order of index expressions

2015-05-25 Thread Timon Gehr via Digitalmars-d
On 05/25/2015 07:21 PM, Johannes Pfau wrote: Am Mon, 25 May 2015 09:40:34 -0700 schrieb Andrei Alexandrescu seewebsiteforem...@erdani.org: On 5/24/15 11:13 PM, Iain Buclaw via Digitalmars-d wrote: The context here involves concurrency where bar() calls yield and makes changes to foo before

Re: std.multidimarray

2015-05-25 Thread Vlad Levenfeld via Digitalmars-d
On Sunday, 24 May 2015 at 22:42:12 UTC, Dennis Ritchie wrote: On Sunday, 24 May 2015 at 20:45:56 UTC, Laeeth Isharc wrote: You might take a look at Vlad Levenfeld's work too, although I think he would say that it is still at an early stage (if I understand correctly - looks very interesting to

Re: shared libs for OSX

2015-05-25 Thread bitwise via Digitalmars-d
On Mon, 25 May 2015 14:39:37 -0400, Jacob Carlborg d...@me.com wrote: On 2015-05-25 16:33, bitwise wrote: I've been reading through the Mach-O docs[1], and it seems that dynamic libs are treated the same as static libs in that exported symbols can only be defined once, even across dynamically

Re: Evaluation order of index expressions

2015-05-25 Thread Timon Gehr via Digitalmars-d
On 05/24/2015 09:30 PM, kinke wrote: code import core.stdc.stdio; static int[] _array = [ 0, 1, 2, 3 ]; int[] array() @property { printf(array()\n); return _array; } int start() @property { printf(start()\n); return 0; } int end() @property { printf(end()\n); return 1; } void main() {

Re: D for Android

2015-05-25 Thread Joakim via Digitalmars-d
On Monday, 18 May 2015 at 15:47:07 UTC, Joakim wrote: Sure, have fun with your new devices. :) Hopefully, I'll get Android/ARM working before then, but I don't and won't have any AArch64 devices to test. Not that it matters, as 64-bit ARM has even less share than x86 right now. Earlier this

Re: Evaluation order of index expressions

2015-05-25 Thread Timon Gehr via Digitalmars-d
On 05/25/2015 10:02 PM, Daniel Murphy wrote: Timon Gehr wrote in message news:mjvtqm$17d8$1...@digitalmars.com... A related issue is that the rewrites documented at http://dlang.org/operatoroverloading.html don't all preserve the order of subexpressions. However, ideally, the order of

Re: Evaluation order of index expressions

2015-05-25 Thread Andrei Alexandrescu via Digitalmars-d
On 5/25/15 11:58 AM, Daniel Murphy wrote: Andrei Alexandrescu wrote in message news:mjvlv5$vch$1...@digitalmars.com... which one is correct? GDC. -- Andrei I don't think it matters too much if we pick strict LTR, or keep dmd's existing exception for assign expressions. IIRC Walter is in

Re: Evaluation order of index expressions

2015-05-25 Thread Timon Gehr via Digitalmars-d
On 05/26/2015 01:45 AM, Andrei Alexandrescu wrote: On 5/25/15 11:58 AM, Daniel Murphy wrote: Andrei Alexandrescu wrote in message news:mjvlv5$vch$1...@digitalmars.com... which one is correct? GDC. -- Andrei I don't think it matters too much if we pick strict LTR, or keep dmd's existing

Re: Status of Deimos bindings

2015-05-25 Thread Laeeth Isharc via Digitalmars-d
On Monday, 25 May 2015 at 21:43:18 UTC, rsw0x wrote: On Monday, 25 May 2015 at 21:33:15 UTC, FreeSlave wrote: What's the current status of Deimos? I don't think that this kind of bindings is useless, since not everyone always wants dynamic bindings. E.g. for the sake of simplicity or static

Re: Evaluation order of index expressions

2015-05-25 Thread Timon Gehr via Digitalmars-d
On 05/25/2015 10:30 PM, Daniel Murphy wrote: Timon Gehr wrote in message news:mjvvq2$19hd$1...@digitalmars.com... As operator overloading is defined in terms of lowering to function calls, I think it's reasonable to decide the order of evaluation after the lowering. This will still be

Re: DIP66 1.2 (Multiple) alias this. Continuation of work.

2015-05-25 Thread IgorStepanov via Digitalmars-d
On Tuesday, 31 March 2015 at 20:01:14 UTC, Andrei Alexandrescu wrote: On 3/31/15 7:28 AM, IgorStepanov wrote: On Monday, 30 March 2015 at 18:33:17 UTC, Andrei Alexandrescu wrote: On 3/30/15 8:04 AM, Steven Schveighoffer wrote: On 3/29/15 1:34 PM, IgorStepanov wrote: 1. We should reject types

Re: std.multidimarray

2015-05-25 Thread Vlad Levenfeld via Digitalmars-d
On Monday, 25 May 2015 at 20:52:33 UTC, Dennis Ritchie wrote: On Monday, 25 May 2015 at 19:14:05 UTC, Vlad Levenfeld wrote: https://github.com/evenex/autodata/blob/master/source/spaces/cyclic.d And I think that the symbol `ℕ` in your code you need to replace some words. Ok, done.

  1   2   >