Re: Is there any overhead iterating over a pointer using a slice?

2016-05-31 Thread Adam D. Ruppe via Digitalmars-d-learn
On Tuesday, 31 May 2016 at 18:55:18 UTC, Gary Willoughby wrote: Is there any overhead compared with pointer arithmetic in a for loop? Very very little. The slice will ensure start and stop indexes are in bounds before the loop (and throw an RangeError if it isn't), but inside the loop, it

Re: faster splitter

2016-05-31 Thread qznc via Digitalmars-d
On Tuesday, 31 May 2016 at 18:31:47 UTC, Andrei Alexandrescu wrote: On 5/31/16 1:54 PM, qznc wrote: Using a one-letter needle string is more like a user mistake than something to optimize for. How is splitting on ',' a user mistake? -- Andrei The mistake is to split on "," instead of ','.

Reddit announcements

2016-05-31 Thread o-genki-desu-ka via Digitalmars-d-announce
Many nice announcements here last week. I put some on reddit. https://www.reddit.com/r/programming/comments/4lwufi/d_embedded_database_v01_released/ https://www.reddit.com/r/programming/comments/4lwubv/c_to_d_converter_based_on_clang/

Re: PowerNex - New release of my D kernel

2016-05-31 Thread Joakim Brännström via Digitalmars-d-announce
On Sunday, 29 May 2016 at 23:15:13 UTC, Wild wrote: Hopefully someone will find this interesting. All feedback is appreciated. -Dan Really cool. Good job :)

Re: The Case Against Autodecode

2016-05-31 Thread Jonathan M Davis via Digitalmars-d
On Friday, May 27, 2016 04:31:49 Vladimir Panteleev via Digitalmars-d wrote: > On Thursday, 26 May 2016 at 16:00:54 UTC, Andrei Alexandrescu > >> 9. Autodecode cannot be turned off, i.e. it isn't practical to > >> avoid > >> importing std.array one way or another, and then autodecode is > >>

Re: asm woes...

2016-05-31 Thread Marco Leise via Digitalmars-d-learn
Am Fri, 27 May 2016 10:16:48 + schrieb Era Scarecrow : > On Friday, 27 May 2016 at 10:14:31 UTC, Era Scarecrow wrote: > > inc dword ptr [EAX+Foo.x.offsetof]; > > > So just tested it, and it didn't hang, meaning all unittests > also passed. > > Final solution is:

Re: The Case Against Autodecode

2016-05-31 Thread Jonathan M Davis via Digitalmars-d
On Tuesday, May 31, 2016 14:30:08 Andrei Alexandrescu via Digitalmars-d wrote: > On 5/31/16 2:11 PM, Jonathan M Davis via Digitalmars-d wrote: > > On Tuesday, May 31, 2016 13:21:57 Andrei Alexandrescu via Digitalmars-d wrote: > >> On 05/31/2016 01:15 PM, Jonathan M Davis via Digitalmars-d wrote:

Re: The Case Against Autodecode

2016-05-31 Thread Timon Gehr via Digitalmars-d
On 31.05.2016 20:30, Andrei Alexandrescu wrote: D's Phobos' handling of UTF is at the code unit code point level (like all of Unicode is portably defined).

Re: Horrible DMD startup performance on Windows

2016-05-31 Thread Bruno Medeiros via Digitalmars-d
On 31/05/2016 19:37, Andrei Alexandrescu wrote: On 5/31/16 2:34 PM, Bruno Medeiros wrote: On 31/05/2016 19:21, Martin Krejcirik wrote: On Tuesday, 31 May 2016 at 18:13:05 UTC, Bruno Medeiros wrote: performance on Windows has become horrible. Takes over 3 seconds on my machine just to display

Re: Horrible DMD startup performance on Windows

2016-05-31 Thread Andrei Alexandrescu via Digitalmars-d
On 5/31/16 2:34 PM, Bruno Medeiros wrote: On 31/05/2016 19:21, Martin Krejcirik wrote: On Tuesday, 31 May 2016 at 18:13:05 UTC, Bruno Medeiros wrote: performance on Windows has become horrible. Takes over 3 seconds on my machine just to display the version. Doesn't happen to me. I doubt the

Re: faster splitter

2016-05-31 Thread Andrei Alexandrescu via Digitalmars-d
On 5/31/16 1:54 PM, qznc wrote: On Tuesday, 31 May 2016 at 01:55:16 UTC, Andrei Alexandrescu wrote: I agree it's difficult to characterize the behavior of substring search with one number. There are many dimensions of variation. (But there's no reason for an emotional response.) A few possible

Re: The Case Against Autodecode

2016-05-31 Thread Jonathan M Davis via Digitalmars-d
On Tuesday, May 31, 2016 16:29:33 Joakim via Digitalmars-d wrote: > UTF-8 is an antiquated hack that needs to be eradicated. It > forces all other languages than English to be twice as long, for > no good reason, have fun with that when you're downloading text > on a 2G connection in the

Re: Horrible DMD startup performance on Windows

2016-05-31 Thread Bruno Medeiros via Digitalmars-d
On 31/05/2016 19:21, Martin Krejcirik wrote: On Tuesday, 31 May 2016 at 18:13:05 UTC, Bruno Medeiros wrote: performance on Windows has become horrible. Takes over 3 seconds on my machine just to display the version. Doesn't happen to me. I doubt the problem is in dmd itself. Maybe deep path

Re: faster splitter

2016-05-31 Thread Andrei Alexandrescu via Digitalmars-d
On 5/31/16 1:54 PM, qznc wrote: Using a one-letter needle string is more like a user mistake than something to optimize for. How is splitting on ',' a user mistake? -- Andrei

Re: Transient ranges

2016-05-31 Thread Steven Schveighoffer via Digitalmars-d
On 5/31/16 11:45 AM, Jonathan M Davis via Digitalmars-d wrote: On Monday, May 30, 2016 09:57:29 H. S. Teoh via Digitalmars-d wrote: I'd argue that range-based generic code that assumes non-transience is inherently buggy, because generic code ought not to make any assumptions beyond what the

Re: The Case Against Autodecode

2016-05-31 Thread Andrei Alexandrescu via Digitalmars-d
On 5/31/16 2:11 PM, Jonathan M Davis via Digitalmars-d wrote: On Tuesday, May 31, 2016 13:21:57 Andrei Alexandrescu via Digitalmars-d wrote: On 05/31/2016 01:15 PM, Jonathan M Davis via Digitalmars-d wrote: Saying that operating at the code point level - UTF-32 - is correct is like saying that

Re: PowerNex - New release of my D kernel

2016-05-31 Thread Vadim Lopatin via Digitalmars-d-announce
On Sunday, 29 May 2016 at 23:15:13 UTC, Wild wrote: Hey! I have new release of my D kernel called PowerNex. This release should be a bit more interesting than the last one that I release back in November 2015. This one contains a working memory manager, a custom TTY renderer, BMP image

Re: asm woes...

2016-05-31 Thread Marco Leise via Digitalmars-d-learn
Am Fri, 27 May 2016 10:06:28 + schrieb Guillaume Piolat : > Referencing EBP or ESP yourself is indeed dangerous. Not sure why > the documentation would advise that. Using "this", names of > parameters/locals/field offset is much safer. DMD makes sure that the EBP

Re: How to improve autodecoding? (Was: The Case Against Autodecode)

2016-05-31 Thread Andrei Alexandrescu via Digitalmars-d
On 5/31/16 2:21 PM, Jonathan M Davis via Digitalmars-d wrote: I think that the first step is getting Phobos to work with all ranges of character types - be they char, wchar, dchar, or graphemes. Then the algorithms themselves will work whether we have auto-decoding or not. With that done, we can

Re: Horrible DMD startup performance on Windows

2016-05-31 Thread Martin Krejcirik via Digitalmars-d
On Tuesday, 31 May 2016 at 18:13:05 UTC, Bruno Medeiros wrote: performance on Windows has become horrible. Takes over 3 seconds on my machine just to display the version. Doesn't happen to me. I doubt the problem is in dmd itself. Maybe deep path search, antivirus, or something like that ?

Re: PowerNex - New release of my D kernel

2016-05-31 Thread Bauss via Digitalmars-d-announce
On Sunday, 29 May 2016 at 23:15:13 UTC, Wild wrote: Hey! I have new release of my D kernel called PowerNex. This release should be a bit more interesting than the last one that I release back in November 2015. This one contains a working memory manager, a custom TTY renderer, BMP image

Re: How to improve autodecoding? (Was: The Case Against Autodecode)

2016-05-31 Thread Jonathan M Davis via Digitalmars-d
On Monday, May 30, 2016 14:24:23 Andrei Alexandrescu via Digitalmars-d wrote: > On 05/30/2016 12:34 PM, Jack Stouffer wrote: > > On Monday, 30 May 2016 at 16:25:20 UTC, Nick Sabalausky wrote: > >> D1 -> D2 was a vastly more disruptive change than getting rid of > >> auto-decoding would be. > > > >

Horrible DMD startup performance on Windows

2016-05-31 Thread Bruno Medeiros via Digitalmars-d
I dunno if this was discussed already (I couldn't find any other thread) - but ever since DMD was ported to D, the startup performance on Windows has become horrible. Takes over 3 seconds on my machine just to display the version. ``` $ time ./dmd.exe --version DMD32 D Compiler v2.071.0

Re: Transient ranges

2016-05-31 Thread Steven Schveighoffer via Digitalmars-d
On 5/31/16 10:46 AM, Dicebot wrote: On Monday, 30 May 2016 at 12:53:07 UTC, Steven Schveighoffer wrote: On 5/30/16 5:35 AM, Dicebot wrote: On Sunday, 29 May 2016 at 17:25:47 UTC, Steven Schveighoffer wrote: What problems are solvable only by not caching the front element? I can't think of

Re: The Case Against Autodecode

2016-05-31 Thread Jonathan M Davis via Digitalmars-d
On Tuesday, May 31, 2016 13:21:57 Andrei Alexandrescu via Digitalmars-d wrote: > On 05/31/2016 01:15 PM, Jonathan M Davis via Digitalmars-d wrote: > > Saying that operating at the code point level - UTF-32 - is correct > > is like saying that operating at UTF-16 instead of UTF-8 is correct. > >

Re: faster splitter

2016-05-31 Thread qznc via Digitalmars-d
On Tuesday, 31 May 2016 at 01:55:16 UTC, Andrei Alexandrescu wrote: I agree it's difficult to characterize the behavior of substring search with one number. There are many dimensions of variation. (But there's no reason for an emotional response.) A few possible baselines come to mind: *

Re: faster splitter

2016-05-31 Thread qznc via Digitalmars-d
On Tuesday, 31 May 2016 at 17:31:29 UTC, Wyatt wrote: qznc wins DMD (and is faster than the LDC's best? Careful! These are not absolute numbers, but relative slowdowns. You cannot compare the numbers between LDC and DMD.

Re: faster splitter

2016-05-31 Thread Wyatt via Digitalmars-d
On Tuesday, 31 May 2016 at 08:43:59 UTC, Chris wrote: On Monday, 30 May 2016 at 22:16:27 UTC, qznc wrote: And Desktop: ./benchmark.ldc std: 129 ±24+40 (3121) -17 (6767) manual: 129 ±31+59 (2668) -21 (7244) qznc: 112 ±14+30 (2542) -9 (7312) Chris: 134 ±33

Re: The Case Against Autodecode

2016-05-31 Thread Jonathan M Davis via Digitalmars-d
On Friday, May 27, 2016 16:41:09 Andrei Alexandrescu via Digitalmars-d wrote: > On 05/27/2016 03:43 PM, H. S. Teoh via Digitalmars-d wrote: > > That's what we've been trying to say all along! > > If that's the case things are pretty dire, autodecoding or not. -- Andrei True enough. Correctly

Re: The Case Against Autodecode

2016-05-31 Thread Andrei Alexandrescu via Digitalmars-d
On 05/31/2016 01:15 PM, Jonathan M Davis via Digitalmars-d wrote: The standard library has to fight against itself because of autodecoding! The vast majority of the algorithms in Phobos are special-cased on strings in an attempt to get around autodecoding. That alone should highlight the fact

Re: The Case Against Autodecode

2016-05-31 Thread Andrei Alexandrescu via Digitalmars-d
On 05/31/2016 01:15 PM, Jonathan M Davis via Digitalmars-d wrote: Saying that operating at the code point level - UTF-32 - is correct is like saying that operating at UTF-16 instead of UTF-8 is correct. Could you please substantiate that? My understanding is that code unit is a higher-level

Re: The Case Against Autodecode

2016-05-31 Thread Jonathan M Davis via Digitalmars-d
On Tuesday, May 31, 2016 13:01:11 Andrei Alexandrescu via Digitalmars-d wrote: > On 05/31/2016 12:45 PM, Jonathan M Davis via Digitalmars-d wrote: > > On Tuesday, May 31, 2016 11:07:09 Andrei Alexandrescu via Digitalmars-d wrote: > >> On 5/31/16 3:56 AM, Walter Bright wrote: > >>> If there is an

Re: The Case Against Autodecode

2016-05-31 Thread Jonathan M Davis via Digitalmars-d
On Friday, May 27, 2016 09:40:21 H. S. Teoh via Digitalmars-d wrote: > On Fri, May 27, 2016 at 03:47:32PM +0200, ag0aep6g via Digitalmars-d wrote: > > On 05/27/2016 03:32 PM, Andrei Alexandrescu wrote: > > > > > However the following do require autodecoding: > > > > > > > > > > s.walkLength > > >

Re: The Case Against Autodecode

2016-05-31 Thread Andrei Alexandrescu via Digitalmars-d
On 05/31/2016 12:54 PM, Jonathan M Davis via Digitalmars-d wrote: Equality does not require decoding. Similarly, functions like find don't either. Something like filter generally would, but it's also not particularly normal to filter a string on a by-character basis. You'd probably want to get

Re: The Case Against Autodecode

2016-05-31 Thread Andrei Alexandrescu via Digitalmars-d
On 05/31/2016 12:45 PM, Jonathan M Davis via Digitalmars-d wrote: On Tuesday, May 31, 2016 11:07:09 Andrei Alexandrescu via Digitalmars-d wrote: On 5/31/16 3:56 AM, Walter Bright wrote: If there is an abstraction for strings that is efficient, consistent, useful, and hides the fact that it is

Re: The Case Against Autodecode

2016-05-31 Thread Jonathan M Davis via Digitalmars-d
On Friday, May 27, 2016 23:16:58 David Nadlinger via Digitalmars-d wrote: > On Friday, 27 May 2016 at 22:12:57 UTC, Minas Mina wrote: > > Those should be the same though, i.e compare the same. In order > > to do that, there is normalization. What is does is to _expand_ > > the single codepoint Ä

Re: The Case Against Autodecode

2016-05-31 Thread Jonathan M Davis via Digitalmars-d
On Tuesday, May 31, 2016 07:17:03 default0 via Digitalmars-d wrote: > Thinking about this a bit more - what algorithms are actually > correct when implemented on the level of code units? > Off the top of my head I can only really think of copying and > hashing, since you want to do that on the

Re: The Case Against Autodecode

2016-05-31 Thread Jonathan M Davis via Digitalmars-d
On Tuesday, May 31, 2016 11:07:09 Andrei Alexandrescu via Digitalmars-d wrote: > On 5/31/16 3:56 AM, Walter Bright wrote: > > If there is an abstraction for strings that is efficient, consistent, > > useful, and hides the fact that it is UTF, I am not aware of it. > > It's been mentioned several

Re: The Case Against Autodecode

2016-05-31 Thread Joakim via Digitalmars-d
On Monday, 30 May 2016 at 17:35:36 UTC, Chris wrote: On Monday, 30 May 2016 at 16:03:03 UTC, Marco Leise wrote: *** http://site.icu-project.org/home#TOC-What-is-ICU- I was actually talking about ICU with a colleague today. Could it be that Unicode itself is broken? I've often heard

Re: The Case Against Autodecode

2016-05-31 Thread deadalnix via Digitalmars-d
On Tuesday, 31 May 2016 at 15:07:09 UTC, Andrei Alexandrescu wrote: Consistency with what? Consistent with what? It is a slice type. It should work as a slice type. Every other design stink.

Re: The Case Against Autodecode

2016-05-31 Thread Jonathan M Davis via Digitalmars-d
On Sunday, May 29, 2016 13:47:32 H. S. Teoh via Digitalmars-d wrote: > On Sun, May 29, 2016 at 03:55:22PM -0400, Andrei Alexandrescu via Digitalmars-d wrote: > > So now code points are good? -- Andrei > > It depends on what you're trying to accomplish. That's the point we're > trying to get at.

Re: Why simple code using Rebindable doesn't compile ?

2016-05-31 Thread chmike via Digitalmars-d-learn
On Tuesday, 31 May 2016 at 06:40:31 UTC, Era Scarecrow wrote: On Tuesday, 31 May 2016 at 05:31:59 UTC, chmike wrote: My conclusion is that rebindable is not a satisfying solution to have mutable references to immutable objects. I don't understand the rationale of these immutable references.

Re: Variables should have the ability to be @nogc

2016-05-31 Thread Basile B. via Digitalmars-d
On Tuesday, 31 May 2016 at 14:47:12 UTC, Marco Leise wrote: I "solved" it with a UDA called GcScan in my code. It can be attached to any field or type and is a tri-state. In the undecided case (GcScan.auto) it recursively scans for potential GC pointers, excluding those marked GcScan.no. In

[Issue 16090] popFront generates out-of-bounds array index on corrupted utf-8 strings

2016-05-31 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16090 ag0ae...@gmail.com changed: What|Removed |Added Keywords||pull CC|

Re: Transient ranges

2016-05-31 Thread Jonathan M Davis via Digitalmars-d
On Monday, May 30, 2016 09:57:29 H. S. Teoh via Digitalmars-d wrote: > I'd argue that range-based generic code that assumes non-transience is > inherently buggy, because generic code ought not to make any > assumptions beyond what the range API guarantees. Currently, the range > API does not

Re: PowerNex - New release of my D kernel

2016-05-31 Thread WebFreak001 via Digitalmars-d-announce
On Sunday, 29 May 2016 at 23:15:13 UTC, Wild wrote: I have new release of my D kernel called PowerNex. For those who want to see some screenshots of it but not download or test it yourself, I made some screenshots: Directly after boot: https://i.webfreak.org/f5z9Q8 A few commands:

Re: D, GTK, Qt, wx,…

2016-05-31 Thread albatroz via Digitalmars-d-learn
On Tuesday, 31 May 2016 at 08:57:51 UTC, MGW wrote: QtE5 - is my wrapper for Qt-5 https://www.youtube.com/watch?v=DuOl-4g117E https://github.com/MGWL/QtE5 How can we build QtE5 and/or the examples?

Re: The Case Against Autodecode

2016-05-31 Thread Andrei Alexandrescu via Digitalmars-d
On 5/31/16 10:33 AM, Seb wrote: Explicitly stating the type of iteration in the 132 places with auto-decoding in Phobos doesn't sound that terrible. It is terrible, no two ways about it. We've been very very careful with changes that caused a handful or breakages in Phobos. It really means

Re: Operator overloading through UFCS doesn't work

2016-05-31 Thread Jonathan M Davis via Digitalmars-d-learn
On Tuesday, May 31, 2016 14:11:58 ixid via Digitalmars-d-learn wrote: > On Sunday, 29 May 2016 at 07:18:10 UTC, Jonathan M Davis wrote: > > And the fact that allowing free functions to overload operators > > via UFCS sends us into that territory just highlights the fact > > that they're a horrible

[Issue 15324] symbol is already defined / size of symbol changed

2016-05-31 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15324 Johannes Pfau changed: What|Removed |Added Severity|critical|normal --- Comment

Re: Cross-platform documentation

2016-05-31 Thread Jacob Carlborg via Digitalmars-d
On 2016-05-31 16:08, Adam D. Ruppe wrote: This is another one of the reasons why I made my own doc generator. Compare: http://dpldocs.info/core.attribute You can see it not only saw the declaration, it knew it was in a version block and added that to the doc page. Ah, cool. I see that the

Re: Cross-platform documentation

2016-05-31 Thread Adam D. Ruppe via Digitalmars-d
On Tuesday, 31 May 2016 at 15:01:22 UTC, Jacob Carlborg wrote: I see that the example is not indented properly. Is that a bug in your tool or is that how example is written. I think it is a bit of both... the leading * on the comment confused my indent, so basically my bug. I don't think I

Re: The Case Against Autodecode

2016-05-31 Thread Andrei Alexandrescu via Digitalmars-d
On 5/31/16 3:56 AM, Walter Bright wrote: On 5/30/2016 9:16 PM, Andrei Alexandrescu wrote: On 5/30/16 5:51 PM, Walter Bright wrote: On 5/30/2016 8:34 AM, Marc Schütz wrote: In an ideal world, we'd also want to change the way `length` and `opIndex` work, Why? strings are arrays of code units.

Re: Our Sister

2016-05-31 Thread Manu via Digitalmars-d
On 31 May 2016 at 01:00, Marco Leise via Digitalmars-d wrote: > Am Sat, 28 May 2016 14:15:45 +1000 > schrieb Manu via Digitalmars-d : > >> On 28 May 2016 at 10:16, Adam D. Ruppe via Digitalmars-d >> wrote: >>

Re: The Case Against Autodecode

2016-05-31 Thread Kagamin via Digitalmars-d
On Tuesday, 31 May 2016 at 13:33:14 UTC, Marc Schütz wrote: In an ideal world, the programs someone intuitively writes will do the right thing, and if they can't, they at least refuse to compile. If we agree that it's up to the user whether to iterate over a string by code unit or code points

[Issue 16106] Calling a fiber from itself causes hard-to-debug stack corruption

2016-05-31 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16106 --- Comment #1 from Don --- To clarify: I'm asking for the situation where you call a fiber which is not in state HOLD, to be detected even when compiled without contracts. I'm not asking for fiber.call() to ever be a no-op.

Re: The Case Against Autodecode

2016-05-31 Thread ag0aep6g via Digitalmars-d
On 05/31/2016 04:33 PM, Seb wrote: https://github.com/dlang/phobos/pull/4384 Explicitly stating the type of iteration in the 132 places with auto-decoding in Phobos doesn't sound that terrible. After checking some of those 132 places, they are in generic functions that take ranges.

Re: Variables should have the ability to be @nogc

2016-05-31 Thread Marco Leise via Digitalmars-d
I "solved" it with a UDA called GcScan in my code. It can be attached to any field or type and is a tri-state. In the undecided case (GcScan.auto) it recursively scans for potential GC pointers, excluding those marked GcScan.no. In the decided case (GcScan.yes/no) it simply assumes the user knows

Re: Transient ranges

2016-05-31 Thread Dicebot via Digitalmars-d
On Monday, 30 May 2016 at 12:53:07 UTC, Steven Schveighoffer wrote: On 5/30/16 5:35 AM, Dicebot wrote: On Sunday, 29 May 2016 at 17:25:47 UTC, Steven Schveighoffer wrote: What problems are solvable only by not caching the front element? I can't think of any. As far as I know, currently it

[Issue 16084] Linker error, not failed compilation, with interface final function calling virtual template function

2016-05-31 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16084 Jack Stouffer changed: What|Removed |Added Keywords||accepts-invalid

[Issue 15094] __traits(getMember) fails when the source is a struct/class field

2016-05-31 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15094 Johan Engelen changed: What|Removed |Added CC||jbc.enge...@gmail.com

Re: Why aren't overloaded nested functions allowed?

2016-05-31 Thread Max Samukha via Digitalmars-d-learn
On Tuesday, 31 May 2016 at 11:54:40 UTC, Timon Gehr wrote: On 30.05.2016 18:22, Max Samukha wrote: From the spec (https://dlang.org/spec/function.html#nested): "Nested functions cannot be overloaded." Anybody knows what's the rationale? The rationale is that nobody has implemented it in

Re: The Case Against Autodecode

2016-05-31 Thread Seb via Digitalmars-d
On Tuesday, 31 May 2016 at 13:33:14 UTC, Marc Schütz wrote: On Monday, 30 May 2016 at 21:51:36 UTC, Walter Bright wrote: [...] So, strings are _implemented_ as arrays of code units. But indiscriminately treating them as such in all situations leads to wrong results (just like arrays of code

[Issue 16084] Linker error with interface final function calling virtual function

2016-05-31 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16084 Jack Stouffer changed: What|Removed |Added Keywords||diagnostic ---

[Issue 15094] __traits(getMember) fails when the source is a struct/class field

2016-05-31 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15094 --- Comment #6 from Eyal Lotem --- Even after applying the PR (https://github.com/D-Programming-Language/dmd/pull/5215): ``` struct S { int i; } S s; unittest { import std.meta : Alias; alias GetMember1 =

[Issue 15094] __traits(getMember) fails when the source is a struct/class field

2016-05-31 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15094 Eyal Lotem changed: What|Removed |Added CC||eyal.lo...@gmail.com ---

Re: Button: A fast, correct, and elegantly simple build system.

2016-05-31 Thread Dicebot via Digitalmars-d-announce
Can it be built from just plain dmd/phobos install available? One of major concernc behind discussion that resulted in Atila reggae effort is that propagating additional third-party dependencies is very damaging for build systems. Right now Button seems to fail rather hard on this front (i.e. Lua

[Issue 16106] New: Calling a fiber from itself causes hard-to-debug stack corruption

2016-05-31 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16106 Issue ID: 16106 Summary: Calling a fiber from itself causes hard-to-debug stack corruption Product: D Version: D2 Hardware: x86_64 OS: All Status:

[Issue 16073] Ranges without opDollar not supported

2016-05-31 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16073 --- Comment #2 from Jack Stouffer --- https://github.com/dlang/phobos/pull/4383 --

Re: Operator overloading through UFCS doesn't work

2016-05-31 Thread ixid via Digitalmars-d-learn
On Sunday, 29 May 2016 at 07:18:10 UTC, Jonathan M Davis wrote: And the fact that allowing free functions to overload operators via UFCS sends us into that territory just highlights the fact that they're a horrible idea. - Jonathan M Davis Do you have any examples of UFCS doing bad things?

Re: Cross-platform documentation

2016-05-31 Thread Adam D. Ruppe via Digitalmars-d
On Tuesday, 31 May 2016 at 07:12:06 UTC, Jacob Carlborg wrote: Currently the documentation for Phobos and druntime is generated on (I'm guessing) Linux. This is another one of the reasons why I made my own doc generator. Compare: http://dpldocs.info/core.attribute You can see it not only

Re: Variables should have the ability to be @nogc

2016-05-31 Thread Basile B. via Digitalmars-d
On Tuesday, 31 May 2016 at 13:33:03 UTC, Basile B. wrote: [...] A solution would be, in 'make()', to statically determine if the aggregate contains arrays, pointers or classes. This is very simple, as seen for example in EMSI container library with the 'shouldAddGCRange' template. [...]

Re: The Case Against Autodecode

2016-05-31 Thread Marc Schütz via Digitalmars-d
On Monday, 30 May 2016 at 21:51:36 UTC, Walter Bright wrote: On 5/30/2016 8:34 AM, Marc Schütz wrote: In an ideal world, we'd also want to change the way `length` and `opIndex` work, Why? strings are arrays of code units. So, strings are _implemented_ as arrays of code units. But

Re: Cross-platform documentation

2016-05-31 Thread ZombineDev via Digitalmars-d
On Tuesday, 31 May 2016 at 11:47:48 UTC, Jacob Carlborg wrote: On 2016-05-31 09:19, ZombineDev wrote: The idiom is to use version (CoreDdoc) for druntime or version (StdDdoc) for Phobos and to put inside declarations that you want to be visible in all documentation builds. And then use

[Issue 16085] wrong visibility warning for overloaded alias symbol

2016-05-31 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16085 --- Comment #9 from Martin Nowak --- (In reply to Walter Bright from comment #8) > > The member "reallocate" should effectively hide the private import, yet the > > deprecation message still appears. > > The private import is hidden.

Variables should have the ability to be @nogc

2016-05-31 Thread Basile B. via Digitalmars-d
std.experimental.make allows use to create instances of structs or instances of classes that are not known by the garbage collector. However, I've recently observed that it could leads to severe bugs when the aggregate that's allocated with 'make()' contains at least one member that's

Re: Cross-platform documentation

2016-05-31 Thread Meta via Digitalmars-d
On Tuesday, 31 May 2016 at 07:12:06 UTC, Jacob Carlborg wrote: Currently the documentation for Phobos and druntime is generated on (I'm guessing) Linux. This can sometimes cause problems when platform specific declarations are removed due to them not being available on Linux. Sometimes it

Re: The Case Against Autodecode

2016-05-31 Thread Marco Leise via Digitalmars-d
Am Tue, 31 May 2016 07:17:03 + schrieb default0 : > Thinking about this a bit more - what algorithms are actually > correct when implemented on the level of code units? Calculating the buffer size of a string, validation and fast versions of general algorithms that

Re: Transient ranges

2016-05-31 Thread Steven Schveighoffer via Digitalmars-d
On 5/30/16 11:46 AM, Andrei Alexandrescu wrote: On 05/30/2016 11:22 AM, Steven Schveighoffer wrote: On Monday, 30 May 2016 at 15:12:41 UTC, Andrei Alexandrescu wrote: On 05/30/2016 09:30 AM, Steven Schveighoffer wrote: My iopipe library is 2x as fast. Cool! What is the trick to the speedup?

[Issue 16105] `is` fails for init value of struct with float

2016-05-31 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16105 --- Comment #2 from Don --- This isn't a codegen bug per se, but is rather a design bug. It happens because float.init is a signalling NaN. We should change it to be a quiet NaN. Using signalling NaNs seemed like a good idea

Re: Transient ranges

2016-05-31 Thread Steven Schveighoffer via Digitalmars-d
On 5/30/16 2:32 PM, Alex Parrill wrote: On Monday, 30 May 2016 at 12:53:07 UTC, Steven Schveighoffer wrote: I'm trying to figure out which cases caching makes the solution impossible. One case is wrapping a network stream: a TCP input range that yields ubyte[] chunks of data as they are

Re: Our Sister

2016-05-31 Thread Nick Treleaven via Digitalmars-d
On Friday, 27 May 2016 at 21:25:50 UTC, Andrei Alexandrescu wrote: On 05/27/2016 05:02 PM, Era Scarecrow wrote: With the current state of things, I'll just take your word on it. Reasoning is simple - yes we could safely convert to const(char)[] but that means effectively all refcounting is

Re: Why aren't overloaded nested functions allowed?

2016-05-31 Thread Timon Gehr via Digitalmars-d-learn
On 30.05.2016 18:22, Max Samukha wrote: From the spec (https://dlang.org/spec/function.html#nested): "Nested functions cannot be overloaded." Anybody knows what's the rationale? The rationale is that nobody has implemented it in DMD. https://issues.dlang.org/show_bug.cgi?id=12578

Re: Free the DMD backend

2016-05-31 Thread Johan Engelen via Digitalmars-d
On Monday, 30 May 2016 at 15:06:42 UTC, Saurabh Das wrote: LDC and GDC are quite a bit slower than DMD. Is this gap inherent in the structure of these compilers or can there be an LDC mode which compiles as rapidly as DMD? The difference in time between LDC and DMD is in the machine code

Re: Cross-platform documentation

2016-05-31 Thread Jacob Carlborg via Digitalmars-d
On 2016-05-31 09:19, ZombineDev wrote: The idiom is to use version (CoreDdoc) for druntime or version (StdDdoc) for Phobos and to put inside declarations that you want to be visible in all documentation builds. And then use version (SomePlatform) for the actual definitions. The downside with

[Issue 16094] error: overlapping slice assignment (CTFE)

2016-05-31 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16094 Kenji Hara changed: What|Removed |Added Keywords||pull

[Issue 16100] [REG 2.069] Error with -O of struct enumeration value and comma operator

2016-05-31 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16100 --- Comment #2 from David Nadlinger --- It seems that versions prior to 2.069 at least statically rejected the code. Even though this was probably in error, it's still better than an ICE, so marking as regression. --

[Issue 16100] [REG 2.069] Error with -O of struct enumeration value and comma operator

2016-05-31 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16100 David Nadlinger changed: What|Removed |Added CC||c...@klickverbot.at

[Issue 16093] Trivial case of passing a template function to another template function doesn't compile

2016-05-31 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16093 --- Comment #4 from Max Samukha --- (In reply to Max Samukha from comment #0) > void bar(alias f)() { > f(); > } > > void main() { > void f()() { > } > bar!f(); > } > > Error: function test.main.f!().f is a

Re: Button: A fast, correct, and elegantly simple build system.

2016-05-31 Thread Atila Neves via Digitalmars-d-announce
On Monday, 30 May 2016 at 19:16:50 UTC, Jason White wrote: I am pleased to finally announce the build system I've been slowly working on for over a year in my spare time: snip In fact, there is some experimental support for automatic conversion of Makefiles to Button's build description

Re: Free the DMD backend

2016-05-31 Thread Atila Neves via Digitalmars-d
On Sunday, 29 May 2016 at 10:56:57 UTC, Russel Winder wrote: On Sun, 2016-05-29 at 04:08 +, Joakim via Digitalmars-d wrote: […] It would be nice if that happened, but Walter has said Symantec isn't interested.  Aren't ldc and GDC enough? This is why LDC should be seen in the D

Re: Free the DMD backend

2016-05-31 Thread ag0aep6g via Digitalmars-d
On 05/31/2016 11:32 AM, Michael wrote: On Monday, 30 May 2016 at 15:06:42 UTC, Saurabh Das wrote: On Monday, 30 May 2016 at 14:51:48 UTC, Matthias Klumpp wrote: [...] LDC and GDC are quite a bit slower than DMD. Is this gap inherent in the structure of these compilers or can there be an LDC

Re: Why do some T.init evaluate to true while others to false?

2016-05-31 Thread Marc Schütz via Digitalmars-d-learn
On Monday, 30 May 2016 at 19:06:53 UTC, ArturG wrote: does this count? struct Foo { int x; float f; } void main() { Foo foo; if(foo is typeof(foo).init) "A: does'nt work".writeln; foo = Foo(); if(foo is typeof(foo).init) "B: works".writeln; } This one is a bug in DMD.

[Issue 16105] `is` fails for init value of struct with float

2016-05-31 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16105 --- Comment #1 from Marc Schütz --- Addendum: It works correctly with LDC, so it's probably a codegen bug. --

[Issue 16105] New: `is` fails for init value of struct with float

2016-05-31 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16105 Issue ID: 16105 Summary: `is` fails for init value of struct with float Product: D Version: D2 Hardware: x86_64 URL: https://forum.dlang.org/post/jzgwikubjfmlcdgpierj@foru

Re: The Case Against Autodecode

2016-05-31 Thread deadalnix via Digitalmars-d
On Tuesday, 31 May 2016 at 07:56:54 UTC, Walter Bright wrote: On 5/30/2016 9:16 PM, Andrei Alexandrescu wrote: On 5/30/16 5:51 PM, Walter Bright wrote: On 5/30/2016 8:34 AM, Marc Schütz wrote: In an ideal world, we'd also want to change the way `length` and `opIndex` work, Why? strings are

Re: Free the DMD backend

2016-05-31 Thread Michael via Digitalmars-d
On Monday, 30 May 2016 at 15:06:42 UTC, Saurabh Das wrote: On Monday, 30 May 2016 at 14:51:48 UTC, Matthias Klumpp wrote: The case for DMD though is compile speed. It really changes the way one writes programs and makes it possible to write bash script-like functionality in D because of a

Re: foo => "bar" key/value literals in D!

2016-05-31 Thread Era Scarecrow via Digitalmars-d-announce
On Monday, 23 May 2016 at 19:00:40 UTC, Adam D. Ruppe wrote: Have I gone completely mad?!?! --- void main() { import std.stdio; writeln(obj!( foo => "bar", baz => 12 )); } --- Prints out: { foo: bar baz: 12 } Pretty

Re: D, GTK, Qt, wx,…

2016-05-31 Thread MGW via Digitalmars-d-learn
On Sunday, 29 May 2016 at 11:03:36 UTC, Russel Winder wrote: GKT+ has a reputation for being dreadful on OSX and even worse on Windows. Qt on the other hand has a reputation for being the most portable – though clearly wx is (arguable) the most portable. QtE5 - is my wrapper for Qt-5

Re: The Case Against Autodecode

2016-05-31 Thread Chris via Digitalmars-d
On Monday, 30 May 2016 at 21:39:00 UTC, Walter Bright wrote: On 5/30/2016 12:52 PM, H. S. Teoh via Digitalmars-d wrote: If I ever had to write string-heavy code, I'd probably fork Phobos just so I can get decent performance. Just sayin'. When I wrote Warp, the only point of which was speed,

<    1   2   3   >