Re: missing HexString documentation

2018-02-08 Thread Steven Schveighoffer via Digitalmars-d
On 2/8/18 9:44 AM, Adam D. Ruppe wrote: On Thursday, 8 February 2018 at 13:06:44 UTC, Steven Schveighoffer wrote: So you think it should go into druntime? I don't see why it wasn't in there in the first place to be honest. Yeah, probably. I might even publically import it when you import the

Re: A betterC base

2018-02-08 Thread Adam D. Ruppe via Digitalmars-d
ooh better last sentence D's GC implementation follows in the footsteps of industry giants without compromising experts' ability to realize maximum potential from the machine.

Re: A betterC base

2018-02-08 Thread Adam D. Ruppe via Digitalmars-d
On Thursday, 8 February 2018 at 11:06:15 UTC, ixid wrote: It feels like D has not overcome at least two major issues in the public mind, the built-in GC D is a pragmatic language aimed toward writing fast code, fast. Garbage collection has proved to be a smashing success in the industry,

[Issue 17752] Switch skips over declaration issued for explicitly uninitialized variables

2018-02-08 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17752 Martin Krejcirik changed: What|Removed |Added CC||m...@krej.cz See

[Issue 16578] bogus deprecation - switch skips declaration of variable

2018-02-08 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16578 Martin Krejcirik changed: What|Removed |Added See Also||https://issues.dlang.org/sh

Re: what's the point of function template declarations if they can't be defined?

2018-02-08 Thread Adam D. Ruppe via Digitalmars-d-learn
On Thursday, 8 February 2018 at 09:42:08 UTC, Timothee Cour wrote: I guess you mean `version(StdDdoc)` ? On that note, I see things like this, which are not DRY: This is actually one of the reasons why I abandoned dmd for my dpldocs.info fork and used an independent parser. dmd tries to

Re: missing HexString documentation

2018-02-08 Thread Adam D. Ruppe via Digitalmars-d
On Thursday, 8 February 2018 at 13:06:44 UTC, Steven Schveighoffer wrote: So you think it should go into druntime? I don't see why it wasn't in there in the first place to be honest. Yeah, probably. I might even publically import it when you import the posix header so it just works in the

Re: missing HexString documentation

2018-02-08 Thread Adam D. Ruppe via Digitalmars-d
On Thursday, 8 February 2018 at 10:52:35 UTC, Kagamin wrote: Or have a function specifically for unix permissions, like int unix(int r, int w, int x, int gr, int gw, int gx, int ur, int uw, int ux); It might be even more readable. I actually personally prefer binary: 0b_1_111_101_000 which

Re: option -ignore_pure for temporary debugging (or how to wrap an unpure function inside a pure one)?

2018-02-08 Thread Steven Schveighoffer via Digitalmars-d
On 2/8/18 8:32 AM, Steven Schveighoffer wrote: On 2/7/18 10:32 PM, Timothee Cour wrote: same question with how to wrap a gc function inside a nogc shell, if not, allowing a flag -ignore_nogc that'd enable this (again, for debugging purposes) If you wrap the call in a debug block, it will

Re: option -ignore_pure for temporary debugging (or how to wrap an unpure function inside a pure one)?

2018-02-08 Thread Steven Schveighoffer via Digitalmars-d
On 2/7/18 10:32 PM, Timothee Cour wrote: same question with how to wrap a gc function inside a nogc shell, if not, allowing a flag -ignore_nogc that'd enable this (again, for debugging purposes) If you wrap the call in a debug block, it will work. int foo() pure { debug writeln("yep, this

[Issue 18397] Poor implementation of std.conv.hexString results in unintended bloat

2018-02-08 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18397 Steven Schveighoffer changed: What|Removed |Added Summary|Poor implementation of |Poor

Re: missing HexString documentation

2018-02-08 Thread Steven Schveighoffer via Digitalmars-d
On 2/8/18 1:10 AM, Walter Bright wrote: On 2/7/2018 9:45 PM, Ralph Doncaster wrote: > While the fix is a huge improvement, it doesn't match the code generated by the hex literals.  hexString!"deadbeef" stores the null-terminated string in the data section of the object file, while

Re: missing HexString documentation

2018-02-08 Thread Steven Schveighoffer via Digitalmars-d
On 2/7/18 3:24 PM, Adam D. Ruppe wrote: On Wednesday, 7 February 2018 at 18:59:38 UTC, Steven Schveighoffer wrote: Not even close. Octal literals are a disaster, because putting a leading 0 should never change the base of a number. I agree the leading 0 is terrible. But that's not the real

Re: A betterC base

2018-02-08 Thread Mike Franklin via Digitalmars-d
On Thursday, 8 February 2018 at 11:06:15 UTC, ixid wrote: How difficult would it be for D at this point to move towards a pay for what you use system that out of the box is betterC and requires the garbage collector to be explicitly imported? I'm not sure if this is what you're looking for,

[Issue 16472] Spurious "is used as a type" when aliasing enum template as default parameter

2018-02-08 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16472 Nick Treleaven changed: What|Removed |Added CC||n...@geany.org

Re: Heads-up: upcoming instabilities in std.experimental.allocator, and what to do

2018-02-08 Thread Nathan S. via Digitalmars-d
On Thursday, 30 November 2017 at 19:01:02 UTC, Andrei Alexandrescu wrote: So we may switch to ubyte[] Hooray!

[Issue 14722] Improve " is used as a type" error message

2018-02-08 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14722 Nick Treleaven changed: What|Removed |Added Status|NEW |RESOLVED

Re: what's the point of function template declarations if they can't be defined?

2018-02-08 Thread Jacob Carlborg via Digitalmars-d-learn
On 2018-02-07 22:39, Timothee Cour wrote: ``` void fun_bad3(T)(T a); // declaration [1] void fun_bad3(T)(T a){}; // definition [2] void test(){ fun_bad3(1); } ``` Error: test_all.fun_bad3 called with argument types (int) matches both: main.d(11): test_all.fun_bad3!int.fun_bad3(int a)

Re: Official Dub package for DWT

2018-02-08 Thread Jacob Carlborg via Digitalmars-d-announce
On 2018-02-08 00:22, lobo wrote: Thanks for this effort. I looked at DWT a while back but settled on GtkD because it was easier to build. Either way, I will have to revisit this library and give it another go in my new project. Looking at the examples I imagine it wouldn't be too difficult

Re: are scope guards (scope(exit, success, failure)) zero-cost abstractions?

2018-02-08 Thread Seb via Digitalmars-d-learn
On Thursday, 8 February 2018 at 11:23:43 UTC, Daniel Kozak wrote: I mean scope(success), for scope(exit) there is no speed penalty On Thu, Feb 8, 2018 at 12:03 PM, Daniel Kozak wrote: Yes, it add, but is almost zero On Thu, Feb 8, 2018 at 12:00 PM, Timothee Cour via

[Issue 18399] src/core/simd.d(53): Deprecation: 32 byte vector types are only supported with -mcpu=avx

2018-02-08 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18399 Seb changed: What|Removed |Added CC||greensunn...@gmail.com ---

Re: are scope guards (scope(exit, success, failure)) zero-cost abstractions?

2018-02-08 Thread Seb via Digitalmars-d-learn
On Thursday, 8 February 2018 at 10:44:37 UTC, Mike Parker wrote: On Thursday, 8 February 2018 at 10:09:12 UTC, Timothee Cour wrote: I'm curious whether scope guards add any cost over the naive way, eg: ``` void fun(){ ... scope(success) {bar;} ... } ``` vs: ``` void fun(){ ...

Re: A betterC base

2018-02-08 Thread Seb via Digitalmars-d
On Thursday, 8 February 2018 at 11:06:15 UTC, ixid wrote: How difficult would it be for D at this point to move towards a pay for what you use system that out of the box is betterC and requires the garbage collector to be explicitly imported? https://github.com/dlang/druntime/pull/2057 It

Re: Bye bye, fast compilation times

2018-02-08 Thread H. S. Teoh via Digitalmars-d
On Wed, Feb 07, 2018 at 10:59:51PM -0500, Nick Sabalausky (Abscissa) via Digitalmars-d wrote: [...] > On 02/06/2018 08:47 PM, jmh530 wrote: > > > > Would it help to take the approach of mir, i.e. putting > > version(mir_test) before all the unittests? > > That used to be a very common idiom.

Re: mysql-native v2.0.0-rc1: Release Candidate: Redesigned Prepared

2018-02-08 Thread bauss via Digitalmars-d-announce
On Monday, 5 February 2018 at 04:47:07 UTC, Nick Sabalausky (Abscissa) wrote: An all-D MySQL/MariaDB client library: https://github.com/mysql-d/mysql-native -- I've tagged a release candidate ("v2.0.0-rc1") which, among other various enhancements and cleanups,

Re: are scope guards (scope(exit, success, failure)) zero-cost abstractions?

2018-02-08 Thread Daniel Kozak via Digitalmars-d-learn
Yes, it add, but is almost zero On Thu, Feb 8, 2018 at 12:00 PM, Timothee Cour via Digitalmars-d-learn < digitalmars-d-learn@puremagic.com> wrote: > I know that, my question is whether it adds any runtime overhead over > naive way (which is to call the "bar" finalizer before each return >

Re: Bye bye, fast compilation times

2018-02-08 Thread Martin Tschierschke via Digitalmars-d
On Monday, 5 February 2018 at 21:27:57 UTC, H. S. Teoh wrote: One of my D projects for the past while has been taking unusually long times to compile. This morning, I finally decided to sit down and figure out exactly why. What I found was rather disturbing: -- import std.regex; void

Re: are scope guards (scope(exit, success, failure)) zero-cost abstractions?

2018-02-08 Thread Daniel Kozak via Digitalmars-d-learn
I mean scope(success), for scope(exit) there is no speed penalty On Thu, Feb 8, 2018 at 12:03 PM, Daniel Kozak wrote: > Yes, it add, but is almost zero > > On Thu, Feb 8, 2018 at 12:00 PM, Timothee Cour via Digitalmars-d-learn < > digitalmars-d-learn@puremagic.com> wrote: >

Re: Vibe.d rest & web service?

2018-02-08 Thread Nicholas Wilson via Digitalmars-d-learn
On Thursday, 8 February 2018 at 10:51:39 UTC, Arjan wrote: On Wednesday, 7 February 2018 at 20:23:10 UTC, Nicholas Wilson wrote: On Wednesday, 7 February 2018 at 19:50:31 UTC, Jacob Carlborg wrote: Have you tried this? No. But apart from the fact that I forgot to make the class inherit from

A betterC base

2018-02-08 Thread ixid via Digitalmars-d
How difficult would it be for D at this point to move towards a pay for what you use system that out of the box is betterC and requires the garbage collector to be explicitly imported? It feels like D has not overcome at least two major issues in the public mind, the built-in GC and, more

Re: are scope guards (scope(exit, success, failure)) zero-cost abstractions?

2018-02-08 Thread Timothee Cour via Digitalmars-d-learn
I know that, my question is whether it adds any runtime overhead over naive way (which is to call the "bar" finalizer before each return statement) in the case where no exception is thrown On Thu, Feb 8, 2018 at 2:44 AM, Mike Parker via Digitalmars-d-learn

Re: missing HexString documentation

2018-02-08 Thread Kagamin via Digitalmars-d
Or have a function specifically for unix permissions, like int unix(int r, int w, int x, int gr, int gw, int gx, int ur, int uw, int ux); It might be even more readable.

Re: Vibe.d rest & web service?

2018-02-08 Thread Arjan via Digitalmars-d-learn
On Wednesday, 7 February 2018 at 20:23:10 UTC, Nicholas Wilson wrote: On Wednesday, 7 February 2018 at 19:50:31 UTC, Jacob Carlborg wrote: Have you tried this? No. But apart from the fact that I forgot to make the class inherit from an interface to that the rest interface would actually

Re: missing HexString documentation

2018-02-08 Thread Kagamin via Digitalmars-d
On Wednesday, 7 February 2018 at 17:01:54 UTC, Adam D. Ruppe wrote: http://dpldocs.info/experimental-docs/source/core.sys.posix.fcntl.d.html#L123 version (X86) { enum O_CREAT= 0x40; // octal 0100 enum O_EXCL = 0x80; // octal 0200

Re: Official Dub package for DWT

2018-02-08 Thread Andrea Fontana via Digitalmars-d-announce
On Wednesday, 7 February 2018 at 21:33:22 UTC, Jacob Carlborg wrote: This has been long overdue but I would like to announce that I've just released an official Dub package for the DWT library [1]. For a usage example, please see the GitHub page [2]. Great news!

Re: are scope guards (scope(exit, success, failure)) zero-cost abstractions?

2018-02-08 Thread Mike Parker via Digitalmars-d-learn
On Thursday, 8 February 2018 at 10:09:12 UTC, Timothee Cour wrote: I'm curious whether scope guards add any cost over the naive way, eg: ``` void fun(){ ... scope(success) {bar;} ... } ``` vs: ``` void fun(){ ... if(foo1){ bar; // add this before each return return; }

[Issue 18399] New: src/core/simd.d(53): Deprecation: 32 byte vector types are only supported with -mcpu=avx

2018-02-08 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18399 Issue ID: 18399 Summary: src/core/simd.d(53): Deprecation: 32 byte vector types are only supported with -mcpu=avx Product: D Version: D2 Hardware: x86 OS: Mac OS

Re: Heads-up: upcoming instabilities in std.experimental.allocator, and what to do

2018-02-08 Thread Seb via Digitalmars-d
On Friday, 1 December 2017 at 02:30:29 UTC, Seb wrote: On Thursday, 30 November 2017 at 19:01:02 UTC, Andrei Alexandrescu wrote: Hi all, Eduard, Alexandru Jercaianu and I are working on improving allocators' design and implementation. This entails a few breaking changes. In order to make

Re: are scope guards (scope(exit, success, failure)) zero-cost abstractions?

2018-02-08 Thread Timothee Cour via Digitalmars-d-learn
likewise, will scope(exit) add any overhead over naive code in the case where no exception is thrown? ``` void fun(){ ... scope(success) {bar;} ... } vs void fun(){ ... if(foo1){ bar; // add this before each return return; } ... bar; return; } ``` On Thu, Feb 8, 2018

[Issue 12708] DMD threaded code running slower than single-threaded code

2018-02-08 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12708 Atila Neves changed: What|Removed |Added Status|NEW |RESOLVED

are scope guards (scope(exit, success, failure)) zero-cost abstractions?

2018-02-08 Thread Timothee Cour via Digitalmars-d-learn
I'm curious whether scope guards add any cost over the naive way, eg: ``` void fun(){ ... scope(success) {bar;} ... } ``` vs: ``` void fun(){ ... if(foo1){ bar; // add this before each return return; } ... bar; return; } ``` For scope(success) and scope(failure), the

[Issue 18273] Better C: wrong exit code from main()

2018-02-08 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18273 --- Comment #1 from Walter Bright --- https://github.com/dlang/dmd/pull/7851 --

[Issue 18397] Poor implementation of std.conf.hexString results in unintended bloat

2018-02-08 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18397 --- Comment #3 from anonymous4 --- Why it creates sting literal instead of string itself? Then you could just do --- enum string hexString = hexStrImpl(hexData); --- --

[Issue 18398] std.datetime.stopwatch documented examples could be better

2018-02-08 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18398 --- Comment #1 from Nathan S. --- Pull request: https://github.com/dlang/phobos/pull/6139 --

[Issue 18398] New: std.datetime.stopwatch documented examples could be better

2018-02-08 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18398 Issue ID: 18398 Summary: std.datetime.stopwatch documented examples could be better Product: D Version: D2 Hardware: All OS: All Status: NEW

[Issue 18388] std.experimental.logger slow performance

2018-02-08 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18388 --- Comment #2 from anonymous4 --- AFAIK, default logger implementations are simplistic and are not meant to be very fast. Fast logging requires a bit of design and is supposed to be 3rd party library, while

Re: Status status = __traits(compilesReportError, {string b=10; }) => status.msg=Error: cannot....

2018-02-08 Thread Atila Neves via Digitalmars-d
On Wednesday, 7 February 2018 at 20:29:44 UTC, Timothee Cour wrote: is there any way to get error from speculative execution (`__traits( compiles, ...)`)? would be useful in tests; If not currently how hard would that be to implement? eg: ``` struct Status{bool ok; string msg;} Status

Re: what's the point of function template declarations if they can't be defined?

2018-02-08 Thread Timothee Cour via Digitalmars-d-learn
> It's been my understanding that it's always been illegal to provide a definition for a function that was declared previously unless it was declared in a .di file Compiler has always allowed that: ``` void fun(); void fun(){} ``` (but see details in bug report) > It's useful with stuff like

Re: Official Dub package for DWT

2018-02-08 Thread Bastiaan Veelo via Digitalmars-d-announce
On Thursday, 8 February 2018 at 08:32:14 UTC, JN wrote: Can you explain how the EPL license works? I am not familiar with that license. Is DWT and anything using it considered a derivative work off Eclipse? Do I need to share source for my project if I use DWT in my project? From

Re: Official Dub package for DWT

2018-02-08 Thread JN via Digitalmars-d-announce
On Wednesday, 7 February 2018 at 21:33:22 UTC, Jacob Carlborg wrote: This has been long overdue but I would like to announce that I've just released an official Dub package for the DWT library [1]. For a usage example, please see the GitHub page [2]. Great to see this project on Dub. It was

Re: Bye bye, fast compilation times

2018-02-08 Thread Stefan Koch via Digitalmars-d
On Wednesday, 7 February 2018 at 22:00:48 UTC, Bastiaan Veelo wrote: On Wednesday, 7 February 2018 at 09:27:47 UTC, Stefan Koch wrote: Another Thing that can be done is reviewing the code and alerting me to potential problems. i.e. Missing or indecipherable comments as well as spelling

Re: free func "front" is not picked up as a candidate when doing range.front(...)

2018-02-08 Thread aliak via Digitalmars-d-learn
On Thursday, 8 February 2018 at 07:16:43 UTC, Jonathan M Davis wrote: It would be a disaster if free functions could override member functions. For starters, it would be impossible to call the member function if that were allowed, whereas you can always call a free function by not using UFCS.

Re: Bye bye, fast compilation times

2018-02-08 Thread Stefan Koch via Digitalmars-d
On Wednesday, 7 February 2018 at 22:00:48 UTC, Bastiaan Veelo wrote: On Wednesday, 7 February 2018 at 09:27:47 UTC, Stefan Koch wrote: Another Thing that can be done is reviewing the code and alerting me to potential problems. i.e. Missing or indecipherable comments as well as spelling

<    1   2