Re: A New Import Idiom`

2017-02-14 Thread kinke via Digitalmars-d-announce
On Tuesday, 14 February 2017 at 02:32:33 UTC, Jerry wrote: Anyways yes this is kind of cool and fascinating how it works, but that aside I hope I never see this used in phobos. Does anyone else feel this way? Yes. +1

Re: Alias type with different initialiser.

2017-02-14 Thread Bastiaan Veelo via Digitalmars-d-learn
Thanks again. On Tuesday, 14 February 2017 at 14:08:31 UTC, John Colvin wrote: I would recommend making `template from(string moduleName)` global (maybe in a utils module?), there's no reason for it to be a member of Initial. Yes, I think there is high chance it will be part of Phobos, if

Re: syntax sugar: std.path::buildPath instead of from!"std.path".buildPath

2017-02-14 Thread bachmeier via Digitalmars-d
On Tuesday, 14 February 2017 at 19:08:53 UTC, bachmeier wrote: I am not familiar with all of the past discussion of this issue, but something that I have wondered is why we can't do something like alias fooConstraint = (s != SwapStrategy.stable && isBidirectionalRange!Range &&

Re: syntax sugar: std.path::buildPath instead of from!"std.path".buildPath

2017-02-14 Thread Adam D. Ruppe via Digitalmars-d
On Tuesday, 14 February 2017 at 19:08:53 UTC, bachmeier wrote: I am not familiar with all of the past discussion of this issue, but something that I have wondered is why we can't do something like alias fooConstraint = (s != SwapStrategy.stable You can do that, it would just be a helper

Re: syntax sugar: std.path::buildPath instead of from!"std.path".buildPath

2017-02-14 Thread Jack Stouffer via Digitalmars-d
On Tuesday, 14 February 2017 at 19:08:53 UTC, bachmeier wrote: I am not familiar with all of the past discussion of this issue, but something that I have wondered is why we can't do something like Because at that point, it's no longer a set of lego's being put together (design by

Re: syntax sugar: std.path::buildPath instead of from!"std.path".buildPath

2017-02-14 Thread bachmeier via Digitalmars-d
On Tuesday, 14 February 2017 at 19:15:06 UTC, H. S. Teoh wrote: This is already possible: enum fooConstraint(R) = isBidirectionalRange!Range && hasLvalueElements!Range && ... ; Range remove(SwapStrategy s, R)(...) if (fooConstraint!R) { ... } T

Re: Alias type with different initialiser.

2017-02-14 Thread Bastiaan Veelo via Digitalmars-d-learn
On Monday, 13 February 2017 at 22:59:11 UTC, John Colvin wrote: Why not use a constructor instead of static opCall? I don't know, this comes from http://dlang.org/spec/struct.html#dynamic_struct_init. Your constructor looks a lot better. Am I missing a test case where static opCall would be

Re: syntax sugar: std.path::buildPath instead of from!"std.path".buildPath

2017-02-14 Thread Johannes Pfau via Digitalmars-d
Am Tue, 14 Feb 2017 10:23:51 + schrieb Daniel N : > On Tuesday, 14 February 2017 at 10:21:03 UTC, Johannes Pfau wrote: > > Am Mon, 13 Feb 2017 19:49:28 -0800 > > schrieb Timothee Cour via Digitalmars-d > > : > > > >> What about allowing syntax

pragma(mangle,"name") for a type?

2017-02-14 Thread Timothee Cour via Digitalmars-d
How do I define pragma(mangle,"name") for a type? Use case: I'd like to avoid the complications involved in https://github.com/dlang/druntime/pull/1316/files [Addition of C++ std::string, std::vector to D #1316] by directly defining the desired mangle for a c++ std::string (+ other similar use

[Issue 17180] to!string('\0') makes "\0" which breaks concatination

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

[Issue 13183] C++ namespace should not conflict with import root package

2017-02-14 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13183 --- Comment #8 from anonymous4 --- AIU, this can't work because C++ namespaces are added to D symbol table. Manu proposed to not add C++ namespaces to D symbol table, use them for mangling only, this would also allow

[Issue 17130] [Reg 2.074] ambiguous implicit super call when inheriting core.sync.mutex.Mutex

2017-02-14 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17130 --- Comment #7 from Martin Nowak --- https://github.com/dlang/dmd/pull/6541 --

[Issue 13183] C++ namespace should not conflict with import root package

2017-02-14 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13183 Walter Bright changed: What|Removed |Added Status|NEW |RESOLVED

Re: syntax sugar: std.path::buildPath instead of from!"std.path".buildPath

2017-02-14 Thread Jacob Carlborg via Digitalmars-d
On 2017-02-14 04:49, Timothee Cour via Digitalmars-d wrote: What about allowing syntax sugar as an alternative to relying on the new `from/Module` inline import idiom: ``` void fun(T)(std.stdio::File input, T value) if (std.traits::isIntegral!T) {...} ``` instead of: ``` void

Re: syntax sugar: std.path::buildPath instead of from!"std.path".buildPath

2017-02-14 Thread Daniel N via Digitalmars-d
On Tuesday, 14 February 2017 at 09:55:51 UTC, Jacob Carlborg wrote: Why? It looks awful. The signatures we already have in Phobos is quite ridiculous, this will not improve. Isn't this and the whole idea of DIP 1005 just a workaround for the compiler not lazily analyzing the symbols. Even

Re: syntax sugar: std.path::buildPath instead of from!"std.path".buildPath

2017-02-14 Thread Daniel N via Digitalmars-d
On Tuesday, 14 February 2017 at 10:21:03 UTC, Johannes Pfau wrote: Am Mon, 13 Feb 2017 19:49:28 -0800 schrieb Timothee Cour via Digitalmars-d : What about allowing syntax sugar as an alternative to relying on the new `from/Module` inline import idiom: ``` void

Re: Mallocator and 'shared'

2017-02-14 Thread Johannes Pfau via Digitalmars-d-learn
Am Mon, 13 Feb 2017 17:44:10 + schrieb Moritz Maxeiner : > > Thread unsafe methods shouldn't be marked shared, it doesn't > > make sense. If you don't want to provide thread-safe interface, > > don't mark methods as shared, so they will not be callable on a > > shared

Re: CTFE Status

2017-02-14 Thread Jacob Carlborg via Digitalmars-d
On 2017-02-14 10:51, Stefan Koch wrote: I have now rebuild the new structures partially. It turns out that I was missing a few bailouts. However those should have been necessary before as well, so I am still puzzled. 301 posts (302 with this one). Time for a new thread? -- /Jacob Carlborg

Re: pragma(mangle,"name") for a type?

2017-02-14 Thread kinke via Digitalmars-d
Side note: Microsoft uses a different C++ mangling...

Re: Policy-based design in D

2017-02-14 Thread TheFlyingFiddle via Digitalmars-d-learn
On Tuesday, 14 February 2017 at 06:48:33 UTC, TheGag96 wrote: Tonight I stumbled upon Andrei's concept of policy-based design (https://en.wikipedia.org/wiki/Policy-based_design) and tried to implement their example in D with the lack of multiple inheritance in mind.

Re: D future ...

2017-02-14 Thread Ola Fosheim Grøstad via Digitalmars-d
On Saturday, 11 February 2017 at 18:51:31 UTC, Russel Winder wrote: Interesting, but the current competition is between Go, Rust, C++, and D. I don't know, which fields are you thinking about? I believe the market is changing. On OSX/iOS: Swift + Metal is the alternative, throw in some bits

Re: syntax sugar: std.path::buildPath instead of from!"std.path".buildPath

2017-02-14 Thread Jonathan M Davis via Digitalmars-d
On Tuesday, February 14, 2017 10:55:51 Jacob Carlborg via Digitalmars-d wrote: > On 2017-02-14 04:49, Timothee Cour via Digitalmars-d wrote: > > What about allowing syntax sugar as an alternative to relying on the new > > `from/Module` inline import idiom: > > > > ``` > > void

Re: CTFE Status

2017-02-14 Thread Stefan Koch via Digitalmars-d
On Monday, 13 February 2017 at 21:09:40 UTC, Stefan Koch wrote: On Monday, 13 February 2017 at 12:26:14 UTC, Stefan Koch wrote: I am currently working on && again, So far I hit a curious situation when handling (b1 && b2 && b3) everything works fine except that b3 will be evaluated 3 times.

Re: syntax sugar: std.path::buildPath instead of from!"std.path".buildPath

2017-02-14 Thread Johannes Pfau via Digitalmars-d
Am Mon, 13 Feb 2017 19:49:28 -0800 schrieb Timothee Cour via Digitalmars-d : > What about allowing syntax sugar as an alternative to relying on the > new `from/Module` inline import idiom: > > ``` > void fun(T)(std.stdio::File input, T value) if >

Re: Alias type with different initialiser.

2017-02-14 Thread Bastiaan Veelo via Digitalmars-d-learn
On Tuesday, 14 February 2017 at 01:31:10 UTC, John Colvin wrote: On Monday, 13 February 2017 at 22:59:11 UTC, John Colvin wrote: [ snip ] sorry, made a typo, that should have been alias int1 = Initial!(int, 1); static assert(int1.initial == 1); // typeof(int1.initial) == int

Book your flights soon for DConf 2017

2017-02-14 Thread Walter Bright via Digitalmars-d-announce
I just got mine booked, and noticed the more convenient flights were nearly full.

Re: can't use extern(C++,std) in a module that imports std.whatever

2017-02-14 Thread Walter Bright via Digitalmars-d
On 2/13/2017 12:21 AM, Timothee Cour via Digitalmars-d wrote: what's a workaround? See https://issues.dlang.org/show_bug.cgi?id=13183

Re: Creating an array of immutable objects

2017-02-14 Thread Jacob Carlborg via Digitalmars-d-learn
On 2017-02-14 01:59, David Zhang wrote: Hi, I have a struct with two immutable members, and I want to make an array of them. How do I to this? I'm using allocators for this. string[] paths; struct FileDesc { immutable string path; immutable uint index; } _fileDesc = /*something*/;

[Issue 13183] C++ namespace should not conflict with import root package

2017-02-14 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13183 --- Comment #7 from Timothee Cour --- what do you mean by `The workaround looks good.`? It makes it difficult to integrate; that prevents any direct `import foo` which could in turn import `std.something` so forces one to

Re: syntax sugar: std.path::buildPath instead of from!"std.path".buildPath

2017-02-14 Thread Daniel N via Digitalmars-d
On Tuesday, 14 February 2017 at 10:23:51 UTC, Daniel N wrote: -- Johannes my_module:File is it a label followed by File or File inside my_module? This would be unambiguous AFAIK, since labels can't start with "import." import.my_module:File

Re: syntax sugar: std.path::buildPath instead of from!"std.path".buildPath

2017-02-14 Thread Daniel Kozak via Digitalmars-d
Dne 14.2.2017 v 11:21 Johannes Pfau via Digitalmars-d napsal(a): Am Mon, 13 Feb 2017 19:49:28 -0800 schrieb Timothee Cour via Digitalmars-d : What about allowing syntax sugar as an alternative to relying on the new `from/Module` inline import idiom: ``` void

Re: syntax sugar: std.path::buildPath instead of from!"std.path".buildPath

2017-02-14 Thread Sebastiaan Koppe via Digitalmars-d
On Tuesday, 14 February 2017 at 09:55:51 UTC, Jacob Carlborg wrote: Why? It looks awful. The signatures we already have in Phobos is quite ridiculous, this will not improve. Isn't this and the whole idea of DIP 1005 just a workaround for the compiler not lazily analyzing the symbols. This.

Re: Mallocator and 'shared'

2017-02-14 Thread Moritz Maxeiner via Digitalmars-d-learn
On Tuesday, 14 February 2017 at 13:01:44 UTC, Moritz Maxeiner wrote: Of course, I just wanted to point out that Kagamin's post scriptum is a simplification I cannot agree with. As a best practice? Sure. As a "never do it"? No. Sorry for the double post, error in the above, please use this

Re: Mallocator and 'shared'

2017-02-14 Thread Moritz Maxeiner via Digitalmars-d-learn
On Tuesday, 14 February 2017 at 10:52:37 UTC, Johannes Pfau wrote: The compiler of course can't require shared methods to be thread-safe as it simply can't prove thread-safety in all cases. This is like shared/trusted: You are supposed to make sure that a function behaves as expected. The

Re: Alias type with different initialiser.

2017-02-14 Thread John Colvin via Digitalmars-d-learn
On Tuesday, 14 February 2017 at 10:49:19 UTC, Bastiaan Veelo wrote: On Tuesday, 14 February 2017 at 01:31:10 UTC, John Colvin wrote: On Monday, 13 February 2017 at 22:59:11 UTC, John Colvin wrote: [ snip ] sorry, made a typo, that should have been alias int1 = Initial!(int, 1);

Re: Mallocator and 'shared'

2017-02-14 Thread Kagamin via Digitalmars-d-learn
On Tuesday, 14 February 2017 at 10:52:37 UTC, Johannes Pfau wrote: But if the interrupt accesses a variable and a normal function accesses the variable as well, the access needs to be 'volatile' (not cached into a register by the compiler; not closely related to this discussion) and atomic, as

Re: Workaround for DIP 1005

2017-02-14 Thread John Colvin via Digitalmars-d
On Thursday, 9 February 2017 at 05:40:01 UTC, Jonathan M Davis wrote: with(import std.datetime) auto foo(SysTime st1, SysTime st2, Duration d); There is of course the middle way: with(from!q{std.datetime}) I would love to be able to use `with` and have the language accept it in a wider range

[Issue 17180] to!string('\0') makes "\0" which breaks concatination

2017-02-14 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17180 j...@red.email.ne.jp changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

Re: Mallocator and 'shared'

2017-02-14 Thread Johannes Pfau via Digitalmars-d-learn
Am Tue, 14 Feb 2017 13:01:44 + schrieb Moritz Maxeiner : > > It's not supposed to. Also, your example does not implement the > same semantics as what I posted and yes, in your example, there's > no need for memory barriers. In the example I posted, > synchronization

Re: macOS: debugging hell - strange behavior in lldb and gdb

2017-02-14 Thread John Colvin via Digitalmars-d-debugger
On Sunday, 12 February 2017 at 10:27:38 UTC, Relja Ljubobratovic wrote: Hey guys, I've had zero luck with debuggers on macOS. Here's the story: [...] You might find adding symbolic debug info will be useful, which is done with -g or -gc. You might also want to experiment with the

Re: syntax sugar: std.path::buildPath instead of from!"std.path".buildPath

2017-02-14 Thread Andrei Alexandrescu via Digitalmars-d
On 02/14/2017 10:49 AM, Jacob Carlborg wrote: On 2017-02-14 15:37, Andrei Alexandrescu wrote: How are they so, Example [1]. That signature spans 8 lines, it took me 10 seconds to find the actual function name. Copying here to make things easier: Range remove (SwapStrategy s =

Re: Updating Windows SDK static libraries of the DMD distribution

2017-02-14 Thread kinke via Digitalmars-d
On Tuesday, 14 February 2017 at 14:11:31 UTC, Sönke Ludwig wrote: It's a quite frequent issue to get unresolved externals on Windows, because the lib files of the Windows platform SDK are still stuck at Windows XP age. It would make a lot of sense to update those to the latest Windows 10 SDK,

Re: Mallocator and 'shared'

2017-02-14 Thread Johannes Pfau via Digitalmars-d-learn
Am Tue, 14 Feb 2017 14:38:32 + schrieb Kagamin : > On Tuesday, 14 February 2017 at 10:52:37 UTC, Johannes Pfau wrote: > > I remember some discussions about this some years ago and IIRC > > the final decision was that the compiler will not magically > > insert any barriers for

Re: syntax sugar: std.path::buildPath instead of from!"std.path".buildPath

2017-02-14 Thread Jacob Carlborg via Digitalmars-d
On 2017-02-14 15:37, Andrei Alexandrescu wrote: How are they so, Example [1]. That signature spans 8 lines, it took me 10 seconds to find the actual function name. Example [2], 5 lines. Adding attributes on top of that would increase the length of the signature even more. Fortunately

Re: Policy-based design in D

2017-02-14 Thread TheGag96 via Digitalmars-d-learn
On Tuesday, 14 February 2017 at 10:05:19 UTC, TheFlyingFiddle wrote: (snip) Oh, I didn't know you could name mixin template instantiations like that! Thanks for the tip, that makes things work nicely!

Re: Mallocator and 'shared'

2017-02-14 Thread Moritz Maxeiner via Digitalmars-d-learn
On Tuesday, 14 February 2017 at 14:27:05 UTC, Kagamin wrote: On Monday, 13 February 2017 at 17:44:10 UTC, Moritz Maxeiner wrote: To be clear: While I might, in general, agree that using shared methods only for thread safe methods seems to be a sensible restriction, neither language nor

Re: syntax sugar: std.path::buildPath instead of from!"std.path".buildPath

2017-02-14 Thread Jack Stouffer via Digitalmars-d
On Tuesday, 14 February 2017 at 09:55:51 UTC, Jacob Carlborg wrote: Why? It looks awful. The signatures we already have in Phobos is quite ridiculous, this will not improve. Isn't this and the whole idea of DIP 1005 just a workaround for the compiler not lazily analyzing the symbols.

Re: link.exe Error: 'Offset 38C42H Record Type 00C3'

2017-02-14 Thread realNoob via Digitalmars-d-learn
On Tuesday, 14 February 2017 at 14:04:39 UTC, Adam D. Ruppe wrote: On Tuesday, 14 February 2017 at 09:00:37 UTC, realNoob wrote: Error 1: Previous Definition Different : _D4xaru8ezFilterFAAyaAyaZAAya That is saying the function module xaru; string[] ezFilter(string[], string); is defined

Re: syntax sugar: std.path::buildPath instead of from!"std.path".buildPath

2017-02-14 Thread Jack Stouffer via Digitalmars-d
On Tuesday, 14 February 2017 at 14:37:39 UTC, Andrei Alexandrescu wrote: what steps can we take to improve them. You really can't unfortunately. Verbose-ness is a nessesary component of type-safe duck typing.

link.exe Error: 'Offset 38C42H Record Type 00C3'

2017-02-14 Thread realNoob via Digitalmars-d-learn
Hello. I got a problem this: [LDC(ldmd2)] -- Success. C:\MyFolders\src>ldmd2 --version LDC - the LLVM D compiler (1.1.0): based on DMD v2.071.2 and LLVM 3.9.1 built with LDC - the LLVM D compiler (1.1.0) Default target:

Re: syntax sugar: std.path::buildPath instead of from!"std.path".buildPath

2017-02-14 Thread Walter Bright via Digitalmars-d
Please fix your newsreader client to send as text, not as html. The html is both excessively large, and has randomly changing fonts embedded in it.

Re: syntax sugar: std.path::buildPath instead of from!"std.path".buildPath

2017-02-14 Thread bachmeier via Digitalmars-d
On Tuesday, 14 February 2017 at 16:25:17 UTC, Andrei Alexandrescu wrote: Range remove (SwapStrategy s = SwapStrategy.stable, Range, Offset...) (Range range, Offset offset) if (s != SwapStrategy.stable && isBidirectionalRange!Range && hasLvalueElements!Range && hasLength!Range &&

Re: syntax sugar: std.path::buildPath instead of from!"std.path".buildPath

2017-02-14 Thread H. S. Teoh via Digitalmars-d
On Tue, Feb 14, 2017 at 07:14:08PM +, bachmeier via Digitalmars-d wrote: > On Tuesday, 14 February 2017 at 19:08:53 UTC, bachmeier wrote: > > > I am not familiar with all of the past discussion of this issue, but > > something that I have wondered is why we can't do something like > > > >

Re: syntax sugar: std.path::buildPath instead of from!"std.path".buildPath

2017-02-14 Thread Walter Bright via Digitalmars-d
On 2/14/2017 8:25 AM, Andrei Alexandrescu wrote: Range remove (SwapStrategy s = SwapStrategy.stable, Range, Offset...) (Range range, Offset offset) if (s != SwapStrategy.stable && isBidirectionalRange!Range && hasLvalueElements!Range && hasLength!Range && Offset.length >= 1);

Re: Book your flights soon for DConf 2017

2017-02-14 Thread Walter Bright via Digitalmars-d-announce
On 2/14/2017 6:08 AM, Nicholas Wilson wrote: Mind there won't any "convenient" flights any, yay long flights and 7 hours of jet lag. Convenience is definitely relative :-) Interestingly, the older I get, the less jet lag bothers me.

Re: Alias type with different initialiser.

2017-02-14 Thread Jonathan M Davis via Digitalmars-d-learn
On Monday, February 13, 2017 22:59:11 John Colvin via Digitalmars-d-learn wrote: > Also, it's > generally a bad idea to define `.init` for any type as code > generally expects this to be the compiler-generated property > (e.g. a value of type Initial!(int, 1) not of type int). And there's

[Issue 17181] New: Local imports in templates should be added to imported modules list of module that instantiated it

2017-02-14 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17181 Issue ID: 17181 Summary: Local imports in templates should be added to imported modules list of module that instantiated it Product: D Version: D2 Hardware: All

Re: syntax sugar: std.path::buildPath instead of from!"std.path".buildPath

2017-02-14 Thread Lurker via Digitalmars-d
On Tuesday, 14 February 2017 at 16:25:17 UTC, Andrei Alexandrescu wrote: Range remove (SwapStrategy s = SwapStrategy.stable, Range, Offset...) (Range range, Offset offset) if (s != SwapStrategy.stable && isBidirectionalRange!Range && hasLvalueElements!Range && hasLength!Range &&

Re: syntax sugar: std.path::buildPath instead of from!"std.path".buildPath

2017-02-14 Thread Jonathan M Davis via Digitalmars-d
On Tuesday, February 14, 2017 09:37:39 Andrei Alexandrescu via Digitalmars-d wrote: > On 02/14/2017 04:55 AM, Jacob Carlborg wrote: > > The signatures we already have in Phobos is quite ridiculous > > How are they so, and what steps can we take to improve them. Could you > please give a few

[Issue 17181] Local imports in templates should be added to imported modules list of module that instantiated it

2017-02-14 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17181 Andrei Alexandrescu changed: What|Removed |Added CC||and...@erdani.com

Re: syntax sugar: std.path::buildPath instead of from!"std.path".buildPath

2017-02-14 Thread bachmeier via Digitalmars-d
On Tuesday, 14 February 2017 at 19:27:36 UTC, Adam D. Ruppe wrote: But the problems is: what name do you give it? Quite often it would just be `fooConstraint` or `removable` or other non-reusable things... you'd just be *adding* complication because you'd need to forward all the arguments and

Re: macOS: debugging hell - strange behavior in lldb and gdb

2017-02-14 Thread John Colvin via Digitalmars-d-debugger
On Tuesday, 14 February 2017 at 18:08:18 UTC, Relja Ljubobratovic wrote: On Tuesday, 14 February 2017 at 15:37:34 UTC, John Colvin wrote: On Sunday, 12 February 2017 at 10:27:38 UTC, Relja Ljubobratovic wrote: Hey guys, I've had zero luck with debuggers on macOS. Here's the story: [...]

Re: Announcement: DConf 2017 Hackathon May 7

2017-02-14 Thread Walter Bright via Digitalmars-d-announce
I'll be there. Looking forward to it!

Re: Updating Windows SDK static libraries of the DMD distribution

2017-02-14 Thread Jonathan M Davis via Digitalmars-d
On Tuesday, February 14, 2017 17:15:59 kinke via Digitalmars-d wrote: > On Tuesday, 14 February 2017 at 14:11:31 UTC, Sönke Ludwig wrote: > > It's a quite frequent issue to get unresolved externals on > > Windows, because the lib files of the Windows platform SDK are > > still stuck at Windows XP

Re: syntax sugar: std.path::buildPath instead of from!"std.path".buildPath

2017-02-14 Thread Walter Bright via Digitalmars-d
On 2/14/2017 12:46 PM, Walter Bright wrote: A further improvement in the documentation would be to add links to isBidirectionalRange and hasLvalueElements. For reference: http://dlang.org/phobos/std_algorithm_mutation.html#.remove

Announcement: DConf 2017 Hackathon May 7

2017-02-14 Thread Walter Bright via Digitalmars-d-announce
I am happy to announce that there will be a special addition to this year's DConf. The conference will not end after the three days of talks but continue on into Sunday for a hackathon during which people can collaboratively focus on long-lasting problems and pain points in the D

[Issue 13183] C++ namespace should not conflict with import root package

2017-02-14 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13183 --- Comment #10 from Walter Bright --- (In reply to Timothee Cour from comment #7) > what do you mean by `The workaround looks good.`? It's a workable solution. > It makes it difficult to integrate; that prevents any

[Issue 13183] C++ namespace should not conflict with import root package

2017-02-14 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13183 --- Comment #9 from Walter Bright --- (In reply to anonymous4 from comment #8) > AIU, this can't work because C++ namespaces are added to D symbol table. > Manu proposed to not add C++ namespaces to D symbol table, use them

Re: Announcement: DConf 2017 Hackathon May 7

2017-02-14 Thread Walter Bright via Digitalmars-d-announce
On 2/14/2017 2:11 PM, Jonathan M Davis via Digitalmars-d-announce wrote: LOL. I booked my flight and hotel back in December, and my flight was for Sunday. Fortunately, after seeing this, I was able to change it, even if it wasn't free (though the flight was actually cheaper on Monday, so that

Re: syntax sugar: std.path::buildPath instead of from!"std.path".buildPath

2017-02-14 Thread Walter Bright via Digitalmars-d
On 2/14/2017 2:01 PM, H. S. Teoh via Digitalmars-d wrote: This is a good idea. +1. Please take this on! https://issues.dlang.org/show_bug.cgi?id=17183

Re: macOS: debugging hell - strange behavior in lldb and gdb

2017-02-14 Thread Relja Ljubobratovic via Digitalmars-d-debugger
On Tuesday, 14 February 2017 at 20:32:53 UTC, John Colvin wrote: The docs say it is, but they could be wrong. Could you run dub with -v (and without any manually added -gc) and share the output? Sure, here's what I'd think is the relevant part: Performing "debug" build using ldc2 for x86_64.

D Compiler as Docker Image

2017-02-14 Thread Stefan via Digitalmars-d-announce
Want to share the outcome of a vivid discussion today at the Munich D Meetup with you. Installation of a D Compiler is ok-ish. But sometime you don't want to install it. Sometimes you want a very clean compiler-environment. Sometimes you want to compile your projects in the cloud and not on

Re: syntax sugar: std.path::buildPath instead of from!"std.path".buildPath

2017-02-14 Thread H. S. Teoh via Digitalmars-d
On Tue, Feb 14, 2017 at 12:46:17PM -0800, Walter Bright via Digitalmars-d wrote: [...] > Range remove > (SwapStrategy s = SwapStrategy.stable, Range, Offset...) > (Range range, Offset offset) > if (s != SwapStrategy.stable > && isBidirectionalRange!Range > &&

Re: Creating an array of immutable objects

2017-02-14 Thread David Zhang via Digitalmars-d-learn
Thanks for your answers. Out of curiosity though, how could something like this be done with classes instead?

Re: syntax sugar: std.path::buildPath instead of from!"std.path".buildPath

2017-02-14 Thread kinke via Digitalmars-d
On Tuesday, 14 February 2017 at 20:03:13 UTC, Jonathan M Davis wrote: That being said, at some point, you have to ask whether each added feature is worth the cost when you consider how it's going to clutter up function signatures even further. And while I do think that there is value in DIP

Re: A New Import Idiom`

2017-02-14 Thread Dmitry Olshansky via Digitalmars-d-announce
On 2/14/17 3:32 AM, Jerry wrote: Anyways yes this is kind of cool and fascinating how it works, but that aside I hope I never see this used in phobos. Does anyone else feel this way? +1 Let's not make Phobos as scary as C++ STL. --- Dmitry Olshansky

[Issue 17183] New: Improve std.algorithm.mutate.remove documentation

2017-02-14 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17183 Issue ID: 17183 Summary: Improve std.algorithm.mutate.remove documentation Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement

Re: macOS: debugging hell - strange behavior in lldb and gdb

2017-02-14 Thread John Colvin via Digitalmars-d-debugger
On Tuesday, 14 February 2017 at 23:35:15 UTC, Relja Ljubobratovic wrote: On Tuesday, 14 February 2017 at 20:32:53 UTC, John Colvin wrote: The docs say it is, but they could be wrong. Could you run dub with -v (and without any manually added -gc) and share the output? Sure, here's what I'd

Re: Announcement: DConf 2017 Hackathon May 7

2017-02-14 Thread Jonathan M Davis via Digitalmars-d-announce
On Tuesday, February 14, 2017 13:17:02 Walter Bright via Digitalmars-d- announce wrote: > I am happy to announce that there will be a special addition to this > year's DConf. > > The conference will not end after the three days of talks but > continue on into Sunday for a hackathon

Re: A New Import Idiom`

2017-02-14 Thread Jonathan M Davis via Digitalmars-d-announce
On Wednesday, February 15, 2017 00:01:42 Dmitry Olshansky via Digitalmars-d- announce wrote: > On 2/14/17 3:32 AM, Jerry wrote: > > Anyways yes this is kind of cool and fascinating how it works, but that > > aside I hope I never see this used in phobos. Does anyone else feel this > > way? > > +1 >

[Issue 17107] Runnign phobos unittests do not work with PIE

2017-02-14 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17107 greenify changed: What|Removed |Added CC||greeen...@gmail.com ---

[Issue 17182] New: dconf.org's thankyou page is missing

2017-02-14 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17182 Issue ID: 17182 Summary: dconf.org's thankyou page is missing Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority: P1

[Issue 17183] Improve std.algorithm.mutate.remove documentation

2017-02-14 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17183 Walter Bright changed: What|Removed |Added Keywords||bootcamp --

Re: syntax sugar: std.path::buildPath instead of from!"std.path".buildPath

2017-02-14 Thread Chris Wright via Digitalmars-d
On Tue, 14 Feb 2017 19:08:53 +, bachmeier wrote: > I am not familiar with all of the past discussion of this issue, but > something that I have wondered is why we can't do something like > > alias fooConstraint = (s != SwapStrategy.stable >&& isBidirectionalRange!Range &&

Re: Announcement: DConf 2017 Hackathon May 7

2017-02-14 Thread rikki cattermole via Digitalmars-d-announce
On 15/02/2017 10:17 AM, Walter Bright wrote: I am happy to announce that there will be a special addition to this year's DConf. The conference will not end after the three days of talks but continue on into Sunday for a hackathon during which people can collaboratively focus on

Re: syntax sugar: std.path::buildPath instead of from!"std.path".buildPath

2017-02-14 Thread Chris Wright via Digitalmars-d
On Tue, 14 Feb 2017 21:33:00 +, Lurker wrote: > On Tuesday, 14 February 2017 at 16:25:17 UTC, Andrei Alexandrescu wrote: >> Range remove (SwapStrategy s = SwapStrategy.stable, Range, Offset...) >> (Range range, Offset offset) >> if (s != SwapStrategy.stable >> &&

Re: A New Import Idiom`

2017-02-14 Thread Arun Chandrasekaran via Digitalmars-d-announce
On Tuesday, 14 February 2017 at 23:01:42 UTC, Dmitry Olshansky wrote: On 2/14/17 3:32 AM, Jerry wrote: Anyways yes this is kind of cool and fascinating how it works, but that aside I hope I never see this used in phobos. Does anyone else feel this way? +1 Let's not make Phobos as scary as

Re: pragma(mangle,"name") for a type?

2017-02-14 Thread Nicholas Wilson via Digitalmars-d
On Tuesday, 14 February 2017 at 11:15:26 UTC, Timothee Cour wrote: How do I define pragma(mangle,"name") for a type? Use case: I'd like to avoid the complications involved in https://github.com/dlang/druntime/pull/1316/files [Addition of C++ std::string, std::vector to D #1316] by directly

extern(C) and mangling type names

2017-02-14 Thread Mike Parker via Digitalmars-d
``` module mang; extern(C): struct Foo; void bar(); int x; pragma(msg, Foo.mangleof); pragma(msg, bar.mangleof); pragma(msg, x.mangleof); ``` Obviously, x and bar are seen by the linker and mangling is turned off for them. I've always believed it was the same for type declarations

Re: extern(C) and mangling type names

2017-02-14 Thread Walter Bright via Digitalmars-d
On 2/14/2017 7:40 PM, Mike Parker wrote: So, should extern(C) turn off mangling for types? In C, it is common to have opaque types like `struct Foo;` all over the place, and maybe `struct Foo { ... };` appear in multiple times. This works in C. It doesn't work in D, even if the name is set

Re: extern(C) and mangling type names

2017-02-14 Thread Mike Parker via Digitalmars-d
On Wednesday, 15 February 2017 at 04:49:07 UTC, Walter Bright wrote: On 2/14/2017 7:40 PM, Mike Parker wrote: So, should extern(C) turn off mangling for types? In C, it is common to have opaque types like `struct Foo;` all over the place, and maybe `struct Foo { ... };` appear in multiple

[Issue 17184] New: error should show import chain leading to (first) problemic file

2017-02-14 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17184 Issue ID: 17184 Summary: error should show import chain leading to (first) problemic file Product: D Version: D2 Hardware: x86 OS: All Status: NEW

Re: syntax sugar: std.path::buildPath instead of from!"std.path".buildPath

2017-02-14 Thread Adam D. Ruppe via Digitalmars-d
On Tuesday, 14 February 2017 at 20:46:17 UTC, Walter Bright wrote: A further improvement in the documentation would be to add links to isBidirectionalRange and hasLvalueElements. Kneel before your god! http://dpldocs.info/experimental-docs/std.algorithm.mutation.remove.1.html Take a look at

[Issue 17182] dconf.org's thankyou page is missing

2017-02-14 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17182 Jacob Carlborg changed: What|Removed |Added CC||d...@me.com --- Comment #1

Re: Creating an array of immutable objects

2017-02-14 Thread Jacob Carlborg via Digitalmars-d-learn
On 2017-02-15 01:08, David Zhang wrote: Thanks for your answers. Out of curiosity though, how could something like this be done with classes instead? You mean if FileDesc was a class? It's basically the same. You would need: Mutable array: 1. Add a constructor which sets all immutable

Re: extern(C) and mangling type names

2017-02-14 Thread Timothee Cour via Digitalmars-d
I should've said 'related', not actually a dup. Walter, could you please shed some light on this other thread? Any workaround in the meantime would be highly appreciated http://forum.dlang.org/thread/mailman.445.1487070970.31550.digitalmar...@puremagic.com pragma(mangle,"name") for a type?

[Issue 17183] Improve std.algorithm.mutate.remove documentation

2017-02-14 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17183 Adam D. Ruppe changed: What|Removed |Added CC|

Re: A New Import Idiom`

2017-02-14 Thread Dominikus Dittes Scherkl via Digitalmars-d-announce
On Monday, 13 February 2017 at 14:28:20 UTC, Mike Parker wrote: Daniel Nielsen put together a post describing the import idiom that came to light in a recent forum discussion regarding DIP 1005 [3]. The relevant links are at [1] and [2]. [1]

Re: extern(C) and mangling type names

2017-02-14 Thread Timothee Cour via Digitalmars-d
looks like a dup of this: http://forum.dlang.org/thread/mailman.445.1487070970.31550.digitalmar...@puremagic.com pragma(mangle,"name") for a type? On Tue, Feb 14, 2017 at 7:40 PM, Mike Parker via Digitalmars-d < digitalmars-d@puremagic.com> wrote: > ``` > module mang; > extern(C): >

Re: Updating Windows SDK static libraries of the DMD distribution

2017-02-14 Thread Mike Parker via Digitalmars-d
On Tuesday, 14 February 2017 at 20:14:32 UTC, Jonathan M Davis wrote: I would point out that we technically don't support Windows XP. If you use D with it, and it works for you, great, but you're on your own. Which is why the OMF libs need to be updated. They're ancient! That being

  1   2   >