Re: phobo's std.file is completely broke!

2018-09-15 Thread Rubn via Digitalmars-d
On Saturday, 15 September 2018 at 12:59:25 UTC, Josphe Brigmo wrote: This is the typical mindset with D. There are all these "minor" problems that people(the D community pretends are all that big a deal but when you couple all these problems together it results in a very unpleasant programming

Re: Is there any good reason why C++ namespaces are "closed" in D?

2018-08-03 Thread Rubn via Digitalmars-d
On Friday, 3 August 2018 at 21:20:37 UTC, Walter Bright wrote: On 8/2/2018 2:26 AM, Daniel N wrote: Personally I would never *bind* to two different namespaces in a single file, You'd be amazed at what people do and then set their entire store based on it. If the language spec allows it, peop

Re: Is there any good reason why C++ namespaces are "closed" in D?

2018-08-02 Thread Rubn via Digitalmars-d
On Thursday, 2 August 2018 at 04:59:52 UTC, Walter Bright wrote: On 8/1/2018 7:09 PM, Rubn wrote: On Wednesday, 1 August 2018 at 23:04:01 UTC, Walter Bright wrote: An example of silent hijacking:    extern (C++, "ab") void foo(long); // original code    ... lots of code ...    extern (C++, "cd

Re: Is there any good reason why C++ namespaces are "closed" in D?

2018-08-01 Thread Rubn via Digitalmars-d
On Wednesday, 1 August 2018 at 23:04:01 UTC, Walter Bright wrote: An example of silent hijacking: extern (C++, "ab") void foo(long); // original code ... lots of code ... extern (C++, "cd") void foo(int); // added later by intern, should have been

Re: Is there any good reason why C++ namespaces are "closed" in D?

2018-07-31 Thread Rubn via Digitalmars-d
On Tuesday, 31 July 2018 at 16:23:55 UTC, Manu wrote: On Tue., 31 Jul. 2018, 3:40 am Jacob Carlborg via Digitalmars-d, < digitalmars-d@puremagic.com> wrote: On 2018-07-31 10:12, Manu wrote: > Given your favourite example: > > module a; > extern(C++, ns) void foo(); > > module b; > e

Re: On Forum Moderation

2018-05-26 Thread Rubn via Digitalmars-d
On Saturday, 26 May 2018 at 03:34:50 UTC, Walter Bright wrote: From time to time, the issue comes up. The standard here is professional demeanor. For what professional demeanor is, see: https://www.amazon.com/Etiquette-Society-Business-Politics-Home/dp/1497339979 Unprofessional demeanor will

Re: Support alias this in module scope?

2018-05-24 Thread Rubn via Digitalmars-d
On Wednesday, 23 May 2018 at 03:44:36 UTC, Manu wrote: Okay, I'm still really angry about the stupid stupid decision to make C++ namespaces into scopes rather than just a detail used for mangling, with absolutely no consultation of the community, in particular the target audience, who are unan

Re: D's Destructors are What Scott Meyers Warned Us About

2018-05-23 Thread Rubn via Digitalmars-d
On Wednesday, 23 May 2018 at 22:47:21 UTC, sarn wrote: On Wednesday, 23 May 2018 at 02:13:13 UTC, rikki cattermole wrote: I would consider the current state with classes a bug. So ticket please, it should not require a DIP to change (although Walter may disagree). Unfortunately, the way __dto

Re: DIP 1014:Hooking D's struct move semantics--Community Review Round 1

2018-05-18 Thread Rubn via Digitalmars-d
On Thursday, 17 May 2018 at 20:25:26 UTC, Shachar Shemesh wrote: Obviously, Something can be an enum or a boolean. If it is, however, then we have to perform a condition to select the correct value. The problem with conditionals is that if the CPU misses a guess about what they are (and in our

Re: Why is 64-bit dmd not built as part of the Windows release?

2018-05-16 Thread Rubn via Digitalmars-d
On Wednesday, 16 May 2018 at 11:21:21 UTC, Atila Neves wrote: On Tuesday, 15 May 2018 at 19:41:25 UTC, Rubn wrote: On Tuesday, 15 May 2018 at 16:01:28 UTC, Atila Neves wrote: [...] Which DMD version are you using to compile with? There was an issue in DMD a while back that prevented the 64-b

Re: Why is 64-bit dmd not built as part of the Windows release?

2018-05-15 Thread Rubn via Digitalmars-d
On Tuesday, 15 May 2018 at 16:01:28 UTC, Atila Neves wrote: I don't know why even bother with 32-bit dmd to begin with, but at least there should be an option. I just spent 45min trying to build 64-bit dmd on Windows. It wasn't fun. "Isn't it just make -f win64.mak?", I hear you ask. Yes. If

Re: Two really good looking GUI libraries that can work for D

2018-05-12 Thread Rubn via Digitalmars-d
On Saturday, 12 May 2018 at 19:03:50 UTC, aberba wrote: On Friday, 11 May 2018 at 23:13:06 UTC, Rubn wrote: On Friday, 11 May 2018 at 21:43:24 UTC, aberba wrote: [...] If you are going to mention that then you might as well mention the (imo better) alternative ImGui. https://github.com/oc

Re: Two really good looking GUI libraries that can work for D

2018-05-11 Thread Rubn via Digitalmars-d
On Friday, 11 May 2018 at 21:43:24 UTC, aberba wrote: General Usage: Nuklear is a minimal state immediate mode graphical user interface toolkit written in ANSI C and licensed under public domain. It was designed as a simple embeddable user interface for application and does not have any depend

Re: [DUB][DLS] building package dls doesn't finish

2018-05-10 Thread Rubn via Digitalmars-d
On Thursday, 10 May 2018 at 09:32:38 UTC, Kamil Koczurek wrote: Hello, I installed an atom extension for D support, but it requires dls package to be installed and built. When I fetch and attempt to build it (with --build=release) it just says that it's building and doesn't change even if I le

Re: D compiles fast, right? Right??

2018-04-03 Thread Rubn via Digitalmars-d
On Tuesday, 3 April 2018 at 19:07:54 UTC, Jonathan Marler wrote: On Tuesday, 3 April 2018 at 10:24:15 UTC, Atila Neves wrote: On Monday, 2 April 2018 at 18:52:14 UTC, Jonathan Marler wrote: My point was that if you want to compare "compile-time" performance, you should not include the unittests

Re: #dbugfix Issue 16486 200$

2018-03-30 Thread Rubn via Digitalmars-d
On Friday, 30 March 2018 at 06:11:22 UTC, 9il wrote: Hello, Bugfix for the Issue 16486 [1] (originally [2]) is required for mir-algorithm types [3], [4]. For example, packed triangular matrix can be represented as Slice!(Contiguous, [1], StairsIterator!(T*)) Slice!(Contiguous, [1], RetroIte

Re: rvalues -> ref (yup... again!)

2018-03-29 Thread Rubn via Digitalmars-d
On Thursday, 29 March 2018 at 20:22:47 UTC, Dgame wrote: On Thursday, 29 March 2018 at 20:05:48 UTC, Rubn wrote: On Thursday, 29 March 2018 at 19:11:30 UTC, Dgame wrote: Just to be sure it does not got los: You know that you can avoid the temp/copy if you add one method to your struct, yes? -

Re: rvalues -> ref (yup... again!)

2018-03-29 Thread Rubn via Digitalmars-d
On Thursday, 29 March 2018 at 19:11:30 UTC, Dgame wrote: Just to be sure it does not got los: You know that you can avoid the temp/copy if you add one method to your struct, yes? import std.stdio; struct Big { string name; float[1000] values; this(string name) { this.

Re: rvalues -> ref (yup... again!)

2018-03-27 Thread Rubn via Digitalmars-d
On Wednesday, 28 March 2018 at 00:56:29 UTC, kinke wrote: On Tuesday, 27 March 2018 at 23:59:09 UTC, Rubn wrote: Just adding a few writeln it isn't able to remove the function entirely anymore and can't optimize it out. Well writeln() here involves number -> string formatting, GC, I/O, templa

Re: rvalues -> ref (yup... again!)

2018-03-27 Thread Rubn via Digitalmars-d
On Tuesday, 27 March 2018 at 23:35:44 UTC, kinke wrote: On Tuesday, 27 March 2018 at 21:52:25 UTC, Rubn wrote: It happens with LDC too, not sure how it would be able to know to do any kind of optimization like that unless it was able to inline every single function called into one function and

Re: rvalues -> ref (yup... again!)

2018-03-27 Thread Rubn via Digitalmars-d
On Tuesday, 27 March 2018 at 20:38:35 UTC, H. S. Teoh wrote: On Tue, Mar 27, 2018 at 08:25:36PM +, Rubn via Digitalmars-d wrote: [...] _D7example__T3fooTSQr3FooZQnFNbNiNfQrZv: push rbp mov rbp, rsp sub rsp, 3104 lea rax, [rbp + 16] lea rdi, [rbp - 2048] lea rcx, [rbp - 1024

Re: rvalues -> ref (yup... again!)

2018-03-27 Thread Rubn via Digitalmars-d
On Tuesday, 27 March 2018 at 15:50:37 UTC, Atila Neves wrote: It's fine for references to just be references in D. We're not struggling to make references move-able in D, that's not a thing, we already have move semantics. Any extension of this conversation about references into C++ rvalue-ref

Re: rvalues -> ref (yup... again!)

2018-03-27 Thread Rubn via Digitalmars-d
On Tuesday, 27 March 2018 at 07:33:12 UTC, Atila Neves wrote: On Tuesday, 27 March 2018 at 00:30:24 UTC, Rubn wrote: On Monday, 26 March 2018 at 14:40:03 UTC, Atila Neves wrote: C++ T&& (Rvalue reference) -> D T Not really, in C++ it is an actual reference and you get to choose which functio

Re: rvalues -> ref (yup... again!)

2018-03-26 Thread Rubn via Digitalmars-d
On Monday, 26 March 2018 at 14:40:03 UTC, Atila Neves wrote: C++ T&& (Rvalue reference) -> D T Not really, in C++ it is an actual reference and you get to choose which function actually does the move. In D it just does the copy when passed to the function. So you can't do this in D. void ba

Re: rvalues -> ref (yup... again!)

2018-03-26 Thread Rubn via Digitalmars-d
On Monday, 26 March 2018 at 22:48:38 UTC, Walter Bright wrote: On 3/26/2018 12:24 PM, Manu wrote: On 26 March 2018 at 07:40, Atila Neves via Digitalmars-d C++ const T& -> D T Yeah, no... T may be big. Copying a large thing sucks. Memory copying is the slowest thing computers can do. As an A

Re: Binding rvalues to ref parameters

2018-03-25 Thread Rubn via Digitalmars-d
On Sunday, 25 March 2018 at 14:28:30 UTC, Andrei Alexandrescu wrote: On 3/25/18 9:40 AM, Rubn wrote: On Saturday, 24 March 2018 at 12:51:07 UTC, Andrei Alexandrescu wrote: Filing a DIP is like filing a police report: once it's in the system, we're obligated to work on it. There's a guarantee of

Re: Binding rvalues to ref parameters

2018-03-25 Thread Rubn via Digitalmars-d
On Saturday, 24 March 2018 at 12:51:07 UTC, Andrei Alexandrescu wrote: Filing a DIP is like filing a police report: once it's in the system, we're obligated to work on it. There's a guarantee of a response. https://wiki.dlang.org/DIP36 Guess there's no point in writing another one then is the

Re: Am I reading this wrong, or is std.getopt *really* this stupid?

2018-03-25 Thread Rubn via Digitalmars-d
On Sunday, 25 March 2018 at 09:27:31 UTC, Walter Bright wrote: On 3/23/2018 10:55 PM, Chris Katko wrote: Last question though, is there any kind of list of features, and minor features and fixes that can or need to be done? Perhaps it already exists, And here it is: https://issues.dlang.org/

Re: rvalues -> ref (yup... again!)

2018-03-24 Thread Rubn via Digitalmars-d
On Sunday, 25 March 2018 at 01:43:43 UTC, Jonathan M Davis wrote: On Sunday, March 25, 2018 00:34:38 Rubn via Digitalmars-d wrote: On Saturday, 24 March 2018 at 23:03:36 UTC, John Colvin wrote: > Auto ref allows the unnecessary copy to be avoided for > lvalues and creates a temporary (a

Re: rvalues -> ref (yup... again!)

2018-03-24 Thread Rubn via Digitalmars-d
On Saturday, 24 March 2018 at 23:03:36 UTC, John Colvin wrote: Here is a small proof of concept I made to demonstrate how easy it seems to be to use `auto ref` to call a C++ virtual const& function without incurring any more copies than would happen with the same calls from C++. I'm sure it cou

Re: rvalues -> ref (yup... again!)

2018-03-24 Thread Rubn via Digitalmars-d
On Saturday, 24 March 2018 at 23:03:36 UTC, John Colvin wrote: Auto ref allows the unnecessary copy to be avoided for lvalues and creates a temporary (as part of passing the value) for rvalues. It has downsides (virtual functions and extern(C++), but it does directly address the problem you're

Re: rvalues -> ref (yup... again!)

2018-03-24 Thread Rubn via Digitalmars-d
On Saturday, 24 March 2018 at 11:57:25 UTC, John Colvin wrote: I understand what you want, but I'm struggling to understand why it's such a huge deal. The reason you want to pass by reference is for performance, to avoid copying the data at the call boundary. It's pretty simple: float foo()

Re: #dbugfix Issue 5710

2018-03-19 Thread Rubn via Digitalmars-d
On Tuesday, 20 March 2018 at 00:00:22 UTC, ciechowoj wrote: Digging out and old yet important issue. That's one of those bugs that even if a solution gets implemented, it won't get accepted and pulled in. Soweone up top needs to figure out how they want it to be implemented in an acceptable

Re: CTFE ^^ (pow)

2018-03-18 Thread Rubn via Digitalmars-d
On Sunday, 18 March 2018 at 04:37:32 UTC, ketmar wrote: Manu wrote: What is so hard about implementing a pow intrinsic that CTFE can use? It's ridiculous that we can't CTFE any non-linear function... It's one of those blocker bugs that's been there almost 10 years. nobody bothered. it is al

Re: implicit construction operator

2018-02-27 Thread Rubn via Digitalmars-d
On Monday, 26 February 2018 at 19:32:44 UTC, ketmar wrote: WebFreak001 wrote: Now before you would have only been able to do this: --- Nullable!Foo a; foo(a, Nullable!int(5)); --- but now you should also be able to do: --- Nullable!Foo x = null; Nullable!Foo y = 5; foo(null, 5); please no

Re: Slow code, slow

2018-02-23 Thread Rubn via Digitalmars-d
On Friday, 23 February 2018 at 21:10:25 UTC, H. S. Teoh wrote: On Fri, Feb 23, 2018 at 08:51:20PM +, Rubn via Digitalmars-d wrote: [...] This slowdown for this specific example isn't cause by templates, it's caused by having to parse all the extra lines of code from phobos. I

Re: Slow code, slow

2018-02-23 Thread Rubn via Digitalmars-d
On Friday, 23 February 2018 at 20:52:47 UTC, H. S. Teoh wrote: On Fri, Feb 23, 2018 at 08:35:44PM +, Rubn via Digitalmars-d wrote: [...] It's not that big of a slow down. Using "fast" you don't import any modules so they never have to be parsed. That's pretty muc

Re: Slow code, slow

2018-02-23 Thread Rubn via Digitalmars-d
On Friday, 23 February 2018 at 20:41:17 UTC, bauss wrote: On Friday, 23 February 2018 at 20:35:44 UTC, Rubn wrote: On Friday, 23 February 2018 at 20:15:12 UTC, H. S. Teoh wrote: Now that I got your attention: https://issues.dlang.org/show_bug.cgi?id=18511 tl;dr: A trivial piece of cod

Re: Slow code, slow

2018-02-23 Thread Rubn via Digitalmars-d
On Friday, 23 February 2018 at 20:15:12 UTC, H. S. Teoh wrote: Now that I got your attention: https://issues.dlang.org/show_bug.cgi?id=18511 tl;dr: A trivial piece of code, written as ostensibly "idiomatic D" with std.algorithm and std.range templates, compiles *an order of magnitude*

Re: Vulkan

2018-02-16 Thread Rubn via Digitalmars-d
On Friday, 16 February 2018 at 22:58:30 UTC, Ivan Trombley wrote: On Wednesday, 14 February 2018 at 02:40:18 UTC, Mike Parker wrote: What [does] it mean to say they don't work? Have you reported any issues? I don't see any in the DerelictVulkan repo. If something's broken, please report it so i

Re: A betterC base

2018-02-09 Thread Rubn via Digitalmars-d
On Friday, 9 February 2018 at 02:09:57 UTC, Jonathan M Davis wrote: On Thursday, February 08, 2018 23:57:45 Rubn via Digitalmars-d wrote: On Thursday, 8 February 2018 at 18:06:38 UTC, Walter Bright wrote: > I.e. it isn't an issue of us D guys being dumb about the GC. So you could sa

Re: A betterC base

2018-02-08 Thread Rubn via Digitalmars-d
On Thursday, 8 February 2018 at 18:06:38 UTC, Walter Bright wrote: I.e. it isn't an issue of us D guys being dumb about the GC. So you could say it's a design flaw of D, attempting to use a GC where it isn't suited? If going malloc didnt lose you a bunch of features and bring a bunch of oth

Re: Annoyance with new integer promotion deprecations

2018-02-05 Thread Rubn via Digitalmars-d
On Tuesday, 6 February 2018 at 01:07:21 UTC, Meta wrote: On Tuesday, 6 February 2018 at 00:18:08 UTC, Jonathan M Davis wrote: On Monday, February 05, 2018 15:27:45 H. S. Teoh via Digitalmars-d wrote: On Mon, Feb 05, 2018 at 01:56:33PM -0800, Walter Bright via Digitalmars-d wrote: > The idea is

Re: My choice to pick Go over D ( and Rust ), mostly non-technical

2018-02-03 Thread Rubn via Digitalmars-d
On Saturday, 3 February 2018 at 23:07:30 UTC, Norm wrote: On Saturday, 3 February 2018 at 15:22:37 UTC, Rubn wrote: On Saturday, 3 February 2018 at 08:18:57 UTC, H. S. Teoh wrote: On Fri, Feb 02, 2018 at 08:16:25PM -0800, Walter Bright via Digitalmars-d wrote: On 2/2/2018 7:06 AM, Benny wrote:

Re: My choice to pick Go over D ( and Rust ), mostly non-technical

2018-02-03 Thread Rubn via Digitalmars-d
On Saturday, 3 February 2018 at 08:18:57 UTC, H. S. Teoh wrote: On Fri, Feb 02, 2018 at 08:16:25PM -0800, Walter Bright via Digitalmars-d wrote: On 2/2/2018 7:06 AM, Benny wrote: > Other languages have slogans, they have selling points. > > When i hear Go, you hear uniformal, fast, simple synta

Re: My choice to pick Go over D ( and Rust ), mostly non-technical

2018-02-02 Thread Rubn via Digitalmars-d
On Friday, 2 February 2018 at 15:06:35 UTC, Benny wrote: HTTP: If you are focusing on Http then yah Go is probably the better choice, it looks like it is entire geared towards http development. I wouldn't use D for http just like I wouldn't use C++ for http.

Re: Dscanner - DCD - Dfix ... Editor support or the lack of it.

2018-01-26 Thread Rubn via Digitalmars-d
On Friday, 26 January 2018 at 15:37:15 UTC, Benny wrote: On Friday, 26 January 2018 at 03:40:26 UTC, Rubn wrote: You seem to be short tempered You think after two days trying to get a series of plugins to work? you tried 2 plugins rather quickly, without even trying to see if there were co

Re: Dscanner - DCD - Dfix ... Editor support or the lack of it.

2018-01-25 Thread Rubn via Digitalmars-d
On Thursday, 25 January 2018 at 21:18:23 UTC, Benny wrote: It seems to be that they understand the value of better tooling and friendly platform support. Whereas its my impression that a lot of resources get focused on making D its compiler / language better but the rest seems to be ignored.

Re: Tuple DIP

2018-01-12 Thread Rubn via Digitalmars-d
Should include an example of returning a tuple from a function. I know one of the pains with variadic templates is that they can't be returned. So maybe something that goes over the following use case: auto returnTuple(Args...)(Args args) { return args; } (int a, float b) = returnTuple(

Re: Dll support: testers needed

2018-01-06 Thread Rubn via Digitalmars-d
Looks good. If you want testers though, providing binaries would be beneficial. Compiling dmd/druntime/phobos on Windows can be a pain.

Re: Alias Vs. Enum?

2018-01-06 Thread Rubn via Digitalmars-d
Tab + Enter + No Delete/Edit = :/ template valueOf(alias v) // <-- alias { alias valueOf = v; } alias aa = valueOf!(10 == 10); enum ee = 10 == 10; alias err = 10 == 10; // error Can't alias just be extended to support enum values as well instead of having this workaround with templates

Alias Vs. Enum?

2018-01-06 Thread Rubn via Digitalmars-d
Is there a reason for the differences between Enum and Alias? For the most part enums are only used for things that have a value, but alias is used more for types. But with templates you can get around this and you basically get the funcitonality of Enum for alias. Oddly enough from the templat