Re: Override with function overloads

2017-09-10 Thread Ali Çehreli via Digitalmars-d-learn
On 09/10/2017 08:14 PM, jmh530 wrote: > In the code below, the second to the last line fails to compile. As far > as I can tell it is because the override also overrides all overloads. I > could imagine why it would occur with a virtual member function, but I > would think it wouldn't be

Re: C++ / Why Iterators Got It All Wrong

2017-09-10 Thread Ilya Yaroshenko via Digitalmars-d
On Thursday, 7 September 2017 at 20:46:22 UTC, jmh530 wrote: On Thursday, 7 September 2017 at 12:28:00 UTC, jmh530 wrote: On Thursday, 7 September 2017 at 12:27:19 UTC, jmh530 wrote: auto x = data.sliced(2, 3).universal; Err, (3, 4) not (2, 3) All kinds of screwed up. This is what I get

GtkD mouse latency issues

2017-09-10 Thread Joseph via Digitalmars-d-learn
I have a GTK paned element and when I click to drag the handler, it does not respond immediately. I have to hold the left mouse button down for about 1 second and not move it before it "catches" and lets me drag, else I does not move. I'm using Glade and the most simple example of a paned

Re: __traits(compileError, {})

2017-09-10 Thread Jonathan M Davis via Digitalmars-d
On Monday, September 11, 2017 00:41:12 bitwise via Digitalmars-d wrote: > On Monday, 11 September 2017 at 00:15:08 UTC, Jonathan M Davis > > In the case of your suggestion, I'd argue that it would simply > > be better to improve the compiler-generated error messages if > > they're not good enough.

Re: Deprecation: std.container.array.RangeT(A) is not visible from module Size

2017-09-10 Thread Vino.B via Digitalmars-d-learn
On Sunday, 10 September 2017 at 15:46:46 UTC, Ali Çehreli wrote: On 09/10/2017 04:54 AM, Vino.B wrote: > Thank you very much, as stated by you i used the auto function and now > i am get the output without any warnings That's because now you're taking advantage of D's type inference. Although

Re: LDC 1.4.0-beta1

2017-09-10 Thread jmh530 via Digitalmars-d-announce
On Saturday, 26 August 2017 at 22:35:11 UTC, kinke wrote: Hi everyone, on behalf of the LDC team, I'm glad to announce LDC 1.4.0-beta1. The highlights of version 1.4 in a nutshell: The following code compiles on DMD, but not on LDC (tested versions 1.3.0 and the 1.4.0 beta). unittest {

Re: -betterC and extern(C++) classes

2017-09-10 Thread Moritz Maxeiner via Digitalmars-d
On Sunday, 10 September 2017 at 15:12:12 UTC, Yuxuan Shui wrote: On Sunday, 10 September 2017 at 14:42:42 UTC, Moritz Maxeiner wrote: On Sunday, 10 September 2017 at 14:04:20 UTC, rikki cattermole wrote: On 10/09/2017 2:19 PM, Moritz Maxeiner wrote: If TypeInfo for extern(C++) classes is

Re: -betterC and extern(C++) classes

2017-09-10 Thread Moritz Maxeiner via Digitalmars-d
On Sunday, 10 September 2017 at 15:08:50 UTC, Yuxuan Shui wrote: By the way, can we dynamic_cast extern(C++) classes in C++? It doesn't work for me OOTB with dmd 2.075, at least (though I may be missing something): --- classes.d --- import core.memory; extern(C++) class Parent { char

Re: Deprecation: std.container.array.RangeT(A) is not visible from module Size

2017-09-10 Thread Ali Çehreli via Digitalmars-d-learn
On 09/10/2017 04:54 AM, Vino.B wrote: > Thank you very much, as stated by you i used the auto function and now > i am get the output without any warnings That's because now you're taking advantage of D's type inference. Although it doesn't cover the entire story, you may want to read about

Re: -betterC and extern(C++) classes

2017-09-10 Thread rikki cattermole via Digitalmars-d
On 10/09/2017 2:19 PM, Moritz Maxeiner wrote: If TypeInfo for extern(C++) classes is removed, couldn't final extern(C++) classes without base class and which don't implement any interfaces omit the vtable so that the following assert holds: --- final extern(C++) class Foo {} static assert

Re: -betterC and extern(C++) classes

2017-09-10 Thread Yuxuan Shui via Digitalmars-d
By the way, can we dynamic_cast extern(C++) classes in C++? If not, what are we generating these TypeInfo_Class for?

Re: -betterC and extern(C++) classes

2017-09-10 Thread Moritz Maxeiner via Digitalmars-d
On Sunday, 10 September 2017 at 14:04:20 UTC, rikki cattermole wrote: On 10/09/2017 2:19 PM, Moritz Maxeiner wrote: If TypeInfo for extern(C++) classes is removed, couldn't final extern(C++) classes without base class and which don't implement any interfaces omit the vtable so that the

Re: -betterC and extern(C++) classes

2017-09-10 Thread Yuxuan Shui via Digitalmars-d
On Sunday, 10 September 2017 at 14:42:42 UTC, Moritz Maxeiner wrote: On Sunday, 10 September 2017 at 14:04:20 UTC, rikki cattermole wrote: On 10/09/2017 2:19 PM, Moritz Maxeiner wrote: If TypeInfo for extern(C++) classes is removed, couldn't final extern(C++) classes without base class and

[Issue 17818] Deprecation: std.container.array.RangeT(A) is not visiable

2017-09-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17818 Vino changed: What|Removed |Added Status|RESOLVED|REOPENED

Re: Testing whether static foreach is available

2017-09-10 Thread jmh530 via Digitalmars-d
On Sunday, 10 September 2017 at 10:43:24 UTC, Petar Kirov [ZombineDev] wrote: Since Phobos always uses the latest compiler frontend, there's nothing to check ;) Here's an example of what I mean. In D 2.074.0, std.format added some compile-time format string functionality. So if I compile

Re: -betterC and extern(C++) classes

2017-09-10 Thread Yuxuan Shui via Digitalmars-d
On Sunday, 10 September 2017 at 09:31:55 UTC, Walter Bright wrote: On 9/10/2017 1:40 AM, Yuxuan Shui wrote: I was experimenting with -betterC and found out that C++ classes doesn't work. Because the resulting object file needs a symbol "_D14TypeInfo_Class6__vtblZ" which is in druntime. I

Re: -betterC and extern(C++) classes

2017-09-10 Thread rikki cattermole via Digitalmars-d
On 10/09/2017 9:40 AM, Yuxuan Shui wrote: I was experimenting with -betterC and found out that C++ classes doesn't work. Because the resulting object file needs a symbol "_D14TypeInfo_Class6__vtblZ" which is in druntime. I suppose this is to support T.classinfo? Nope. Could we remove

Re: Deprecation: std.container.array.RangeT(A) is not visible from module Size

2017-09-10 Thread Vino.B via Digitalmars-d-learn
On Friday, 8 September 2017 at 23:48:14 UTC, Ali Çehreli wrote: On 09/08/2017 11:21 AM, Vino.B wrote: > One final help on how to print the below > output , just in case if this issue is fixed in next release, > > Output: > [Tuple!string("C:\\Temp\\sapnas2\\BACKUP\\dir1"), >

[Issue 17821] atomicStore is buggy when target is larger than source

2017-09-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17821 Tomer Filiba (weka) changed: What|Removed |Added Keywords||industry --

Re: Testing whether static foreach is available

2017-09-10 Thread Moritz Maxeiner via Digitalmars-d
On Sunday, 10 September 2017 at 01:49:42 UTC, Mike Parker wrote: On Saturday, 9 September 2017 at 16:53:19 UTC, jmh530 wrote: version(DLANGSEMVER >= 2.076.0) { //include static foreach code. } but we can't do conditionals in version blocks, so you'd need a static if. Alternately, we'd

Re: -betterC and extern(C++) classes

2017-09-10 Thread Paulo Pinto via Digitalmars-d
On Sunday, 10 September 2017 at 08:56:11 UTC, rikki cattermole wrote: On 10/09/2017 9:40 AM, Yuxuan Shui wrote: I was experimenting with -betterC and found out that C++ classes doesn't work. Because the resulting object file needs a symbol "_D14TypeInfo_Class6__vtblZ" which is in druntime. I

Re: -betterC and extern(C++) classes

2017-09-10 Thread Adam D. Ruppe via Digitalmars-d
On Sunday, 10 September 2017 at 09:31:55 UTC, Walter Bright wrote: Yes, we do want to move towards "Better C++" working in an analogous manner, and that means removing the typeinfo dependency. TypeInfo is cheap and useful with classes. You shouldn't be removing it, just stripping it to the

Re: Testing whether static foreach is available

2017-09-10 Thread via Digitalmars-d
On Sunday, 10 September 2017 at 02:13:58 UTC, jmh530 wrote: On Sunday, 10 September 2017 at 01:49:42 UTC, Mike Parker wrote: But Adam's point about the false branch still holds, so: static if(__VERSION__ >= 2076) mixin(`static foreach(i; 0..3) writeln(i);`); else writeln("Version too

[Issue 17821] New: atomicStore is buggy when target is larger than source

2017-09-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17821 Issue ID: 17821 Summary: atomicStore is buggy when target is larger than source Product: D Version: D2 Hardware: All URL: http://dlang.org/ OS: All

Re: Going on std.regex & std.uni bug-fixing hunt

2017-09-10 Thread Dmitry Olshansky via Digitalmars-d
On Sunday, 10 September 2017 at 00:16:10 UTC, Chad Joan wrote: On Tuesday, 5 September 2017 at 10:50:46 UTC, Dmitry Olshansky wrote: My burndown list for std.regex:

Re: D for Android beta

2017-09-10 Thread thinwybk via Digitalmars-d-announce
On Friday, 8 September 2017 at 11:52:48 UTC, Joakim wrote: rdmd and dub are now bundled with the native ldc package for Termux, so you can easily write small scripts in D on your phone or build and run tools like DScanner from the D package repository at code.dlang.org. Cool: pkg search ldc

Re: GitBook about D on embedded ARM Linux

2017-09-10 Thread thinwybk via Digitalmars-d-announce
On Thursday, 31 August 2017 at 14:43:22 UTC, thinwybk wrote: The project is in sync with a GitBook page https://fkromer.gitbooks.io/d-on-embedded-linux-arm/content/. d-on-embedded-linux-arm.de

A D blog post about my web server

2017-09-10 Thread Danny Arends via Digitalmars-d-announce
Hey all, Don't know if this is the right place to put this (delete if needed) I made some updates to my web server (written in the D language), and thought some of you might find it interesting: https://www.dannyarends.nl/Compression%20and%20encryption See the project here:

-betterC and extern(C++) classes

2017-09-10 Thread Yuxuan Shui via Digitalmars-d
I was experimenting with -betterC and found out that C++ classes doesn't work. Because the resulting object file needs a symbol "_D14TypeInfo_Class6__vtblZ" which is in druntime. I suppose this is to support T.classinfo? Could we remove T.classinfo and make classes work under -betterC? Or is

Re: Testing whether static foreach is available

2017-09-10 Thread via Digitalmars-d
On Saturday, 9 September 2017 at 16:30:51 UTC, Jean-Louis Leroy wrote: Is there a way to test whether 'static foreach' is available, e.g. via a version symbol? Also, is it possible to conditionally compile depending on the compiler's version, not only the compiler (I mean, not compile a

[Issue 17821] atomicStore is buggy when target is larger than source

2017-09-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17821 Eyal changed: What|Removed |Added CC||e...@weka.io, to...@weka.io --

Re: -betterC and extern(C++) classes

2017-09-10 Thread 9il via Digitalmars-d
On Sunday, 10 September 2017 at 08:56:11 UTC, rikki cattermole wrote: On 10/09/2017 9:40 AM, Yuxuan Shui wrote: I was experimenting with -betterC and found out that C++ classes doesn't work. Because the resulting object file needs a symbol "_D14TypeInfo_Class6__vtblZ" which is in druntime. I

Re: -betterC and extern(C++) classes

2017-09-10 Thread rikki cattermole via Digitalmars-d
On 10/09/2017 10:03 AM, 9il wrote: On Sunday, 10 September 2017 at 08:56:11 UTC, rikki cattermole wrote: On 10/09/2017 9:40 AM, Yuxuan Shui wrote: I was experimenting with -betterC and found out that C++ classes doesn't work. Because the resulting object file needs a symbol

Re: -betterC and extern(C++) classes

2017-09-10 Thread Walter Bright via Digitalmars-d
On 9/10/2017 1:40 AM, Yuxuan Shui wrote: I was experimenting with -betterC and found out that C++ classes doesn't work. Because the resulting object file needs a symbol "_D14TypeInfo_Class6__vtblZ" which is in druntime. I suppose this is to support T.classinfo? Could we remove T.classinfo and

Re: -betterC and extern(C++) classes

2017-09-10 Thread Moritz Maxeiner via Digitalmars-d
On Sunday, 10 September 2017 at 09:31:55 UTC, Walter Bright wrote: On 9/10/2017 1:40 AM, Yuxuan Shui wrote: I was experimenting with -betterC and found out that C++ classes doesn't work. Because the resulting object file needs a symbol "_D14TypeInfo_Class6__vtblZ" which is in druntime. I

Re: Going on std.regex & std.uni bug-fixing hunt

2017-09-10 Thread Chad Joan via Digitalmars-d
On Sunday, 10 September 2017 at 11:47:02 UTC, Dmitry Olshansky wrote: On Sunday, 10 September 2017 at 00:16:10 UTC, Chad Joan wrote: I was working on std.regex a bit myself, so I created this bug report to capture some of the findings/progress: https://issues.dlang.org/show_bug.cgi?id=17820

[Issue 17821] atomicStore is buggy when target is larger than source

2017-09-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17821 johanenge...@weka.io changed: What|Removed |Added CC||johanenge...@weka.io --- Comment #1

Re: Going on std.regex & std.uni bug-fixing hunt

2017-09-10 Thread Dmitry Olshansky via Digitalmars-d
On Sunday, 10 September 2017 at 18:54:21 UTC, Chad Joan wrote: On Sunday, 10 September 2017 at 11:47:02 UTC, Dmitry Olshansky wrote: Yeah, well known problem. Solution is to keep a bit of memory cached eg in TLS variable. Indeed. Is there another issue I can mark it as a duplicate of?

[Issue 17822] [betterC] Do not emit reference to TypeInfo_Class for C++ or COM classes

2017-09-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17822 Walter Bright changed: What|Removed |Added Keywords||betterC --

[Issue 17822] New: [betterC] Do not emit reference to TypeInfo_Class for C++ or COM classes

2017-09-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17822 Issue ID: 17822 Summary: [betterC] Do not emit reference to TypeInfo_Class for C++ or COM classes Product: D Version: D2 Hardware: All OS: All

Re: __traits(compileError, {})

2017-09-10 Thread bitwise via Digitalmars-d
On Monday, 11 September 2017 at 00:15:08 UTC, Jonathan M Davis wrote: On Sunday, September 10, 2017 23:25:59 bitwise via Digitalmars-d wrote: On Friday, 8 September 2017 at 01:18:46 UTC, bitwise wrote: > [...] Does anyone even follow procedures of any kind for additions this trivial, or do

[Issue 17776] highlight error in betterC assert messages

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

Re: __traits(compileError, {})

2017-09-10 Thread bitwise via Digitalmars-d
On Friday, 8 September 2017 at 01:18:46 UTC, bitwise wrote: Lately, I've been hit by several compilation errors when phobos fails to construct an instance of a class or struct I've pass it. Regardless of what the exact failure is, phobos usually gives you some generic error that isn't helpful.

Re: Address of data that is static, be it shared or tls or __gshared or immutable on o/s

2017-09-10 Thread Cecil Ward via Digitalmars-d-learn
On Wednesday, 6 September 2017 at 15:55:35 UTC, Ali Çehreli wrote: On 09/06/2017 08:27 AM, Cecil Ward wrote: > If someone has some static data somewhere, be it in tls or marked shared > __gshared or immutable or combinations (whatever), and someone takes the > address of it and pass that address

Re: -betterC and extern(C++) classes

2017-09-10 Thread Walter Bright via Digitalmars-d
On 9/10/2017 7:01 AM, Yuxuan Shui wrote: Is there a plan? Are there any simple tasks I can take/help? I filed an enhancement request: https://issues.dlang.org/show_bug.cgi?id=17822 The rest is kinda up to me.

Re: -betterC and extern(C++) classes

2017-09-10 Thread Walter Bright via Digitalmars-d
On 9/10/2017 8:08 AM, Yuxuan Shui wrote: By the way, can we dynamic_cast extern(C++) classes in C++? No. Generally, one would need C++ RTTI for that to work, and that: 1. is specific to the particular C++ compiler 2. is undocumented, half-documented, or wrongly documented 3. requires the C++

[Issue 17787] Add a BetterC predefined version so libraries can adapt

2017-09-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17787 Walter Bright changed: What|Removed |Added CC|

[Issue 17787] Add a BetterC predefined version so libraries can adapt

2017-09-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17787 --- Comment #2 from Walter Bright --- https://github.com/dlang/dlang.org/pull/1892 --

[Issue 17778] Creating a static array with duplicates in betterC causes "undefined reference to _memset32" linker failure

2017-09-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17778 Walter Bright changed: What|Removed |Added Keywords||betterC

[Issue 17787] Add a BetterC predefined version so libraries can adapt

2017-09-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17787 --- Comment #3 from github-bugzi...@puremagic.com --- Commit pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/ca27ec4de2f7054aab3ae1fd5aae21639952bf26 Merge pull request #7132 from WalterBright/D_betterC fix

[Issue 17787] Add a BetterC predefined version so libraries can adapt

2017-09-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17787 --- Comment #4 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/dlang.org https://github.com/dlang/dlang.org/commit/30f3b8e062b0a497aa45368fdc35757851cbf0df fix Issue 17787 - Add a BetterC predefined

[Issue 17787] Add a BetterC predefined version so libraries can adapt

2017-09-10 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17787 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED

Re: Deprecation: std.container.array.RangeT(A) is not visible from module Size

2017-09-10 Thread Ali Çehreli via Digitalmars-d-learn
On 09/10/2017 09:53 AM, Vino.B wrote: > auto coSizeDirList (string FFs, int SizeDir) { > //alias DirSizeList = typeof(coSizeDirList()); I worked with a version of coSizeDirList() that did not take any parameters. (Could be from an earlier post of yours.) In this case, you can must use a

Re: __traits(compileError, {})

2017-09-10 Thread Jonathan M Davis via Digitalmars-d
On Sunday, September 10, 2017 23:25:59 bitwise via Digitalmars-d wrote: > On Friday, 8 September 2017 at 01:18:46 UTC, bitwise wrote: > > Lately, I've been hit by several compilation errors when phobos > > fails to construct an instance of a class or struct I've pass > > it. Regardless of what the

Override with function overloads

2017-09-10 Thread jmh530 via Digitalmars-d-learn
In the code below, the second to the last line fails to compile. As far as I can tell it is because the override also overrides all overloads. I could imagine why it would occur with a virtual member function, but I would think it wouldn't be necessary with a final one. @system unittest {

D on devdocs

2017-09-10 Thread ANtlord via Digitalmars-d-announce
Hello. I'm not sure that you know, but documentation of D language has become to devdocs.io. It is web service provides offline documentation. We've got a useful tool for documentation viewing and reading. The next step is an implementation of version support. Don't compare anything to D.