Re: Catching C++ Exceptions in D - Windows and Linux

2017-09-11 Thread Nicholas Wilson via Digitalmars-d-learn
On Tuesday, 12 September 2017 at 03:51:45 UTC, Laeeth Isharc wrote: Hi. I'm here in HK with Ilya, Atila, John Colvin, and Jonathan Davis. I wondered what the current state of D catching C++ exceptions was on Linux and Windows. I know that some work was done on making this possible, and my

Re: Override with function overloads

2017-09-11 Thread jmh530 via Digitalmars-d-learn
On Monday, 11 September 2017 at 20:40:30 UTC, nkm1 wrote: I don't know, maybe don't use alias this :) IMO, it's a really dubious feature... I don't think it's an issue of alias this, per se. I think it's just something to be aware of and use your approach of aliasing as necessary. It's

Catching C++ Exceptions in D - Windows and Linux

2017-09-11 Thread Laeeth Isharc via Digitalmars-d-learn
Hi. I'm here in HK with Ilya, Atila, John Colvin, and Jonathan Davis. I wondered what the current state of D catching C++ exceptions was on Linux and Windows. I know that some work was done on making this possible, and my understanding is that it is, more or less - just wondered what the

Re: Ranges seem awkward to work with

2017-09-11 Thread Mike Parker via Digitalmars-d-learn
On Tuesday, 12 September 2017 at 01:13:29 UTC, Hasen Judy wrote: Is this is a common beginner issue? I remember using an earlier version of D some long time ago and I don't remember seeing this concept. Now, a lot of library functions seem to expect ranges as inputs and return ranges as

Re: Ranges seem awkward to work with

2017-09-11 Thread Moritz Maxeiner via Digitalmars-d-learn
On Tuesday, 12 September 2017 at 01:13:29 UTC, Hasen Judy wrote: Is this is a common beginner issue? I remember using an earlier version of D some long time ago and I don't remember seeing this concept. D's ranges can take getting used to, so if you haven't already, these two articles are

[Issue 17824] New: wrong visibility deduced for method

2017-09-11 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17824 Issue ID: 17824 Summary: wrong visibility deduced for method Product: D Version: D2 Hardware: x86 OS: Windows Status: NEW Severity: normal Priority:

Re: Ranges seem awkward to work with

2017-09-11 Thread Jesse Phillips via Digitalmars-d-learn
On Tuesday, 12 September 2017 at 01:18:21 UTC, Nicholas Wilson wrote: On Tuesday, 12 September 2017 at 01:13:29 UTC, Hasen Judy wrote: Is this is a common beginner issue? if `range.save` works use that, otherwise std.csv does not, IIRC. `range.dup` will duplicate the range That isn't a

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

2017-09-11 Thread Moritz Maxeiner via Digitalmars-d-learn
On Monday, 11 September 2017 at 22:38:21 UTC, Walter Bright wrote: If an address is taken to a TLS object, any relocations and adjustments are made at the time the pointer is generated, not when the pointer is dereferenced. Could you elaborate on that explanation more? The way I thought

Re: Ranges seem awkward to work with

2017-09-11 Thread Nicholas Wilson via Digitalmars-d-learn
On Tuesday, 12 September 2017 at 01:13:29 UTC, Hasen Judy wrote: Is this is a common beginner issue? I remember using an earlier version of D some long time ago and I don't remember seeing this concept. Now, a lot of library functions seem to expect ranges as inputs and return ranges as

Ranges seem awkward to work with

2017-09-11 Thread Hasen Judy via Digitalmars-d-learn
Is this is a common beginner issue? I remember using an earlier version of D some long time ago and I don't remember seeing this concept. Now, a lot of library functions seem to expect ranges as inputs and return ranges as output. Even parsing a csv line returns a range. And the funny thing

Re: D-Man emoji

2017-09-11 Thread lobo via Digitalmars-d
On Monday, 11 September 2017 at 23:24:32 UTC, user1234 wrote: On Monday, 11 September 2017 at 23:01:06 UTC, Walter Bright wrote: Here are some D-Man cartoons: https://github.com/dlang/dlang.org/pull/1648 which we sometimes use to decorate D related web pages: http://dlang.org/safed.html

Re: Web servers in D

2017-09-11 Thread Hasen Judy via Digitalmars-d-learn
On Saturday, 2 September 2017 at 09:26:27 UTC, Andrew Chapman wrote: [...] Don't use these components :-) [...] Vibe.d does this - just don't use the automatic API generation feature if you don't like it. Note, you can get access to the request/response objects even if you do use the

How to set connect timeout on a blocking socket?

2017-09-11 Thread tony via Digitalmars-d-learn
Help me! How to set connect timeout on a blocking socket?

Re: LDC 1.4.0

2017-09-11 Thread Moritz Maxeiner via Digitalmars-d-announce
On Monday, 11 September 2017 at 23:32:55 UTC, kinke wrote: Hi everyone, on behalf of the LDC team, I'm glad to announce LDC 1.4.0. The highlights of version 1.4 in a nutshell: * Based on D 2.074.1. [...] Fantastic news, thanks for your work!

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

2017-09-11 Thread Ali Çehreli via Digitalmars-d-learn
On 09/11/2017 03:38 PM, Walter Bright wrote: > If an address is taken to a TLS object, any relocations and adjustments > are made at the time the pointer is generated, not when the pointer is > dereferenced. Hence, the pointer may be passed from thread to thread, > and will still point to the

LDC 1.4.0

2017-09-11 Thread kinke via Digitalmars-d-announce
Hi everyone, on behalf of the LDC team, I'm glad to announce LDC 1.4.0. The highlights of version 1.4 in a nutshell: * Based on D 2.074.1. * Shipping with ldc-build-runtime, a small D tool to easily (cross-)compile the runtime libraries yourself. * Full Android support, incl. emulated TLS.

Re: D-Man emoji

2017-09-11 Thread user1234 via Digitalmars-d
On Monday, 11 September 2017 at 23:01:06 UTC, Walter Bright wrote: Here are some D-Man cartoons: https://github.com/dlang/dlang.org/pull/1648 which we sometimes use to decorate D related web pages: http://dlang.org/safed.html http://dlang.org/dstyle.html It seems we are under-utilizing our

Re: DCompute: First kernels run successfully

2017-09-11 Thread Nicholas Wilson via Digitalmars-d-announce
On Monday, 11 September 2017 at 22:40:02 UTC, Walter Bright wrote: On 9/11/2017 5:23 AM, Nicholas Wilson wrote: I'm pleased to announce that I have run the first dcompute kernel and it was a success! Excellent!

Re: __traits(compileError, {})

2017-09-11 Thread bitwise via Digitalmars-d
On Monday, 11 September 2017 at 11:07:46 UTC, Timon Gehr wrote: The dangerous thing about this suggestion is that it makes the compilation errors DMD implements de facto part of the semantics of the D language. I.e. improving compiler diagnostics becomes a breaking language change. I guess

D-Man emoji

2017-09-11 Thread Walter Bright via Digitalmars-d
Here are some D-Man cartoons: https://github.com/dlang/dlang.org/pull/1648 which we sometimes use to decorate D related web pages: http://dlang.org/safed.html http://dlang.org/dstyle.html It seems we are under-utilizing our mascot, D-Man. Wouldn't it be nice to have a set of D-Man emojis

extern(C) and slices

2017-09-11 Thread Nordlöw via Digitalmars-d-learn
If I have a function like `extern(C) void f(void *x, size_t x_sz)` can I instead declare it as `extern(C) void f(void[] x)` ?

Re: DCompute: First kernels run successfully

2017-09-11 Thread Nicholas Wilson via Digitalmars-d-announce
On Monday, 11 September 2017 at 20:45:43 UTC, kerdemdemir wrote: Hi Wilson, Since I believe GPU-CPU hybrid programming is the future I believe you are doing a great job for your and D lang's future. To successfully run the dcompute CUDA test you will need a very recent LDC (less than two

Re: DCompute: First kernels run successfully

2017-09-11 Thread Walter Bright via Digitalmars-d-announce
On 9/11/2017 5:23 AM, Nicholas Wilson wrote: I'm pleased to announce that I have run the first dcompute kernel and it was a success! Excellent! https://media.licdn.com/mpr/mpr/AAEAAQgvJDY4OTI4MmE0LTVlZDgtNGQzYy1iN2U1LWU5Nzk1NjlhNzIwNg.jpg

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

2017-09-11 Thread Walter Bright via Digitalmars-d-learn
On 9/10/2017 2:38 PM, Cecil Ward wrote: Ali, I have worked on operating systems' development in r+d. My definitions of terms are hopefully the same as yours. If we refer to two threads, if they both belong to the same process, then they share a common address space, by my definition of the

Re: Little app using gtkD, how to make it well?

2017-09-11 Thread Jesse Phillips via Digitalmars-d-learn
On Monday, 11 September 2017 at 20:19:28 UTC, Romain wrote: Hello, I started an application using gtkD and libusb-d. I would love to get some hints about how to make good use of D since I'm a java developper and maybe use too much of it in D code or doing wrong things. The program will

Re: SIMD under LDC

2017-09-11 Thread Igor via Digitalmars-d-learn
On Monday, 11 September 2017 at 11:55:45 UTC, Igor wrote: In the meantime can anyone tell me how to add an attribute to a function only if something is defined, since this doesn't work: version(USE_SIMD_WITH_LDC) { import ldc.attributes; @target("ssse3") } void funcThatUsesSIMD() { ...

[Issue 17821] atomicStore compile error when target is larger than source

2017-09-11 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17821 johanenge...@weka.io changed: What|Removed |Added Component|phobos |druntime

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

2017-09-11 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17821 --- Comment #2 from johanenge...@weka.io --- Fixed in LDC 1.4.0. The remaining issue is compilation error with DMD for: ``` import core.atomic; shared ulong x; atomicStore(x, 0); ``` --

Re: D on devdocs

2017-09-11 Thread Andre Pany via Digitalmars-d-announce
On Monday, 11 September 2017 at 03:23:47 UTC, ANtlord wrote: 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

Re: DCompute: First kernels run successfully

2017-09-11 Thread kerdemdemir via Digitalmars-d-announce
Hi Wilson, Since I believe GPU-CPU hybrid programming is the future I believe you are doing a great job for your and D lang's future. To successfully run the dcompute CUDA test you will need a very recent LDC (less than two days) with the NVPTX backend* enabled along with a CUDA environment

Re: Override with function overloads

2017-09-11 Thread nkm1 via Digitalmars-d-learn
On Monday, 11 September 2017 at 18:15:36 UTC, jmh530 wrote: An interesting example. I'm not sure overriding is the issue so most as what is in the overload set. I think foo(int) is not part of the overload set yet. The compiler is able to cast the long to int and then call the one in class B

Re: Little app using gtkD, how to make it well?

2017-09-11 Thread Romain via Digitalmars-d-learn
On Monday, 11 September 2017 at 20:19:28 UTC, Romain wrote: Hello, I started an application using gtkD and libusb-d. I would love to get some hints about how to make good use of D since I'm a java developper and maybe use too much of it in D code or doing wrong things. The program will

Little app using gtkD, how to make it well?

2017-09-11 Thread Romain via Digitalmars-d-learn
Hello, I started an application using gtkD and libusb-d. I would love to get some hints about how to make good use of D since I'm a java developper and maybe use too much of it in D code or doing wrong things. The program will only work with msi laptop that have a steelseries keyboard, but

Re: Override with function overloads

2017-09-11 Thread jmh530 via Digitalmars-d-learn
On Monday, 11 September 2017 at 17:59:25 UTC, nkm1 wrote: On Monday, 11 September 2017 at 15:13:25 UTC, jmh530 wrote: I suppose my issue is that final should prevent function hijacking because I shouldn't be allowed to override string bar(double d) anyway. It shouldn't be a worry. It has

Re: Override with function overloads

2017-09-11 Thread nkm1 via Digitalmars-d-learn
On Monday, 11 September 2017 at 15:13:25 UTC, jmh530 wrote: I suppose my issue is that final should prevent function hijacking because I shouldn't be allowed to override string bar(double d) anyway. It shouldn't be a worry. It has nothing to do with overriding. Consider: import std.stdio;

Re: Problems with the DLangUI TreeWidget

2017-09-11 Thread pezi_pink via Digitalmars-d-learn
On Monday, 11 September 2017 at 09:00:36 UTC, Vadim Lopatin wrote: On Friday, 8 September 2017 at 15:39:21 UTC, pezi_pink wrote: On Friday, 8 September 2017 at 15:08:27 UTC, Vadim Lopatin wrote: On Friday, 8 September 2017 at 12:10:23 UTC, pezi_pink wrote: [...] It's known issue:

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

2017-09-11 Thread Ali Çehreli via Digitalmars-d-learn
On 09/11/2017 01:51 AM, John Burton wrote: > I wrote this program :- > > import std.stdio; > import std.concurrency; > > int data; > > void display() > { > writeln("Address is ", ); > } > > void main() > { > auto tid1 = spawn(); > auto tid2 = spawn(); > auto tid3 = spawn(); > } >

Re: GDB behaves strange with DMD

2017-09-11 Thread Gorthad via Digitalmars-d-debugger
On Friday, 7 July 2017 at 17:10:23 UTC, Martin Krejcirik wrote: Dne 4. 7. 2017 v 13:46 Gorthad napsal(a): As you see, GDB seems to have wrong info about line numbers. This is acually a regression since 2.072. I'll file a bug report. Could you please send a link to the bug tracker issue

Re: D on devdocs

2017-09-11 Thread Ali Çehreli via Digitalmars-d-announce
On 09/11/2017 09:17 AM, ANtlord wrote: > we should develop only one Scrapper Ali's worthless contribution of the day: It should be Scraper. Ali

Re: GtkD mouse latency issues

2017-09-11 Thread Mike Wey via Digitalmars-d-learn
On 11-09-17 06:29, Joseph wrote: 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

[Issue 17725] [scope] escape from nested function to enclosing local

2017-09-11 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17725 --- Comment #2 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/6189954a3ecf4d854b64bfb9875eba9a32e00e37 fix Issue 17725 - [scope] escape from nested function to

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

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

Re: D on devdocs

2017-09-11 Thread ANtlord via Digitalmars-d-announce
On Monday, 11 September 2017 at 15:02:17 UTC, Moritz Maxeiner wrote: Do you know how much work would it be to reuse devdocs (I see it is open source) as a basis for hosting dub package docs)? I'm sorry, but I can't assess required time because I'm not a Ruby developer. I have learned basics

Re: dub projects generate docs and host on code.dlang.org?

2017-09-11 Thread Steven Schveighoffer via Digitalmars-d
On 9/5/17 5:46 PM, Andrei Alexandrescu wrote: On 09/05/2017 12:05 PM, Seb wrote: On Tuesday, 5 September 2017 at 07:59:09 UTC, denizzzka wrote: On Monday, 4 September 2017 at 10:47:47 UTC, Manu wrote: Suggest; code.dlang.org should attempt to generate ddoc for each hosted project, host it,

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

2017-09-11 Thread Vino.B via Digitalmars-d-learn
On Monday, 11 September 2017 at 08:55:21 UTC, Vino.B wrote: On Sunday, 10 September 2017 at 23:10:20 UTC, Ali Çehreli wrote: 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

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

2017-09-11 Thread jmh530 via Digitalmars-d
On Monday, 11 September 2017 at 05:41:37 UTC, Ilya Yaroshenko wrote: Another small difference is slicing: For example, for contiguous matrix m: 1. m[a .. b] is contiguous 2. m[i] is contiguous 3. m[a .. b, i] is universal (because there are no 1D canonical slices) 4.

Re: DCompute: First kernels run successfully

2017-09-11 Thread jmh530 via Digitalmars-d-announce
On Monday, 11 September 2017 at 12:23:16 UTC, Nicholas Wilson wrote: I'm pleased to announce that I have run the first dcompute kernel and it was a success! Keep up the good work.

Re: LDC 1.4.0-beta1

2017-09-11 Thread jmh530 via Digitalmars-d-announce
On Monday, 11 September 2017 at 14:49:44 UTC, kinke wrote: There's a difference between "doesn't compile" and "asserts". Please always compare to the matching DMD version, 2.074.1 in this case, which produces an empty string as well, I guess because the writer was taken by value in Phobos

Re: Override with function overloads

2017-09-11 Thread jmh530 via Digitalmars-d-learn
On Monday, 11 September 2017 at 04:29:39 UTC, Ali Çehreli wrote: Here, the feature called "name hiding" is in effect. Foo2.bar hides all bars from Foo. This is to avoid "function hijacking"[1]. Ali [1] https://dlang.org/hijack.html I suppose my issue is that final should prevent function

Re: D on devdocs

2017-09-11 Thread Moritz Maxeiner via Digitalmars-d-announce
On Monday, 11 September 2017 at 03:23:47 UTC, ANtlord wrote: 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

Re: LDC 1.4.0-beta1

2017-09-11 Thread kinke via Digitalmars-d-announce
On Sunday, 10 September 2017 at 16:25:52 UTC, jmh530 wrote: The following code compiles on DMD, but not on LDC (tested versions 1.3.0 and the 1.4.0 beta). unittest { import std.array : appender; import std.format : formattedWrite; auto x = appender!(string); typeof(x) y;

Re: std.algorithm.joiner unexpected behavior

2017-09-11 Thread Sergei Degtiarev via Digitalmars-d-learn
On Friday, 1 September 2017 at 00:09:16 UTC, H. S. Teoh wrote: Consider the case where .front returns a subrange. As you state above, copying this subrange does not have defined behaviour. One reason is the difference in semantics between reference types and value types: the assignment

Re: Deimos X11 bindings license question

2017-09-11 Thread rikki cattermole via Digitalmars-d
On 11/09/2017 2:58 PM, Vadim Lopatin wrote: On Monday, 11 September 2017 at 13:41:39 UTC, rikki cattermole wrote: Needs more work but... https://github.com/Devisualization/spew/tree/master/src/utils/cf/spew/bindings/x11 yeah. Have you created this binding yourself w/o using of Deimos code?

Re: Deimos X11 bindings license question

2017-09-11 Thread Vadim Lopatin via Digitalmars-d
On Monday, 11 September 2017 at 13:41:39 UTC, rikki cattermole wrote: Needs more work but... https://github.com/Devisualization/spew/tree/master/src/utils/cf/spew/bindings/x11 yeah. Have you created this binding yourself w/o using of Deimos code?

Re: D on devdocs

2017-09-11 Thread Adil Baig via Digitalmars-d-announce
Bravo. I don't know how many people actually use the service, but lots of web/backend devs use devdocs. This puts D on their map and, hopefully, we get attention from a much larger audience. On Mon, Sep 11, 2017 at 7:23 AM, ANtlord via Digitalmars-d-announce <

Re: Deimos X11 bindings license question

2017-09-11 Thread rikki cattermole via Digitalmars-d
On 11/09/2017 1:36 PM, Vadim Lopatin wrote: On Monday, 4 September 2017 at 17:54:36 UTC, Vadim Lopatin wrote: Contributors to DUB package nomad-software/x11 nomad-software weltensturm Geod24 MartinNowak BBasile rikkimax Additionally, contributors to Deimos/libX11 growlercab bioinfornatics

Re: Passing array as an function argument.

2017-09-11 Thread Vino.B via Digitalmars-d-learn
On Monday, 11 September 2017 at 12:44:00 UTC, wobbles wrote: On Monday, 11 September 2017 at 12:20:08 UTC, Vino.B wrote: On Monday, 11 September 2017 at 12:03:32 UTC, wobbles wrote: On Monday, 11 September 2017 at 11:58:18 UTC, Vino.B wrote: [...] The type returned from Test1() is a

Re: betterC and struct destructors

2017-09-11 Thread Moritz Maxeiner via Digitalmars-d-learn
On Monday, 11 September 2017 at 10:18:41 UTC, Oleg B wrote: Hello. I try using destructor in betterC code and it's work if outer function doesn't return value (void). Code in `scope (exit)` works as same (if func is void all is ok). In documentation I found

Re: Passing array as an function argument.

2017-09-11 Thread wobbles via Digitalmars-d-learn
On Monday, 11 September 2017 at 12:20:08 UTC, Vino.B wrote: On Monday, 11 September 2017 at 12:03:32 UTC, wobbles wrote: On Monday, 11 September 2017 at 11:58:18 UTC, Vino.B wrote: [...] The type returned from Test1() is a `RangeT!(Array!string)`. This is due to the `[]` on the end of

Re: betterC and struct destructors

2017-09-11 Thread Vadim Lopatin via Digitalmars-d-learn
On Monday, 11 September 2017 at 10:18:41 UTC, Oleg B wrote: Hello. I try using destructor in betterC code and it's work if outer function doesn't return value (void). Code in `scope (exit)` works as same (if func is void all is ok). In documentation I found

Re: Deimos X11 bindings license question

2017-09-11 Thread Vadim Lopatin via Digitalmars-d
On Monday, 4 September 2017 at 17:54:36 UTC, Vadim Lopatin wrote: Contributors to DUB package nomad-software/x11 nomad-software weltensturm Geod24 MartinNowak BBasile rikkimax Additionally, contributors to Deimos/libX11 growlercab bioinfornatics skilion CyberShadow Faianca Flamaros

DCompute: First kernels run successfully

2017-09-11 Thread Nicholas Wilson via Digitalmars-d-announce
I'm pleased to announce that I have run the first dcompute kernel and it was a success! There is still a fair bit of polish to the driver needed to make the API sane and more complete, not to mention more similar to the (untested) OpenCL driver API. But it works! (Contributions are of course

Re: Passing array as an function argument.

2017-09-11 Thread Vino.B via Digitalmars-d-learn
On Monday, 11 September 2017 at 12:03:32 UTC, wobbles wrote: On Monday, 11 September 2017 at 11:58:18 UTC, Vino.B wrote: Hi All, Can some one help me on how to pass a container array as a function argument , the below code throws an error, Error: Error: function T3.Test2 (Array!string t1)

[Issue 10444] writeln of a SIMD register

2017-09-11 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=10444 b2.t...@gmx.com changed: What|Removed |Added Depends on||17823 --

[Issue 17823] New: Declaration of a __vector leads to a segfault on OSX 32bits

2017-09-11 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17823 Issue ID: 17823 Summary: Declaration of a __vector leads to a segfault on OSX 32bits Product: D Version: D2 Hardware: x86 OS: Mac OS X Status: NEW

Re: Passing array as an function argument.

2017-09-11 Thread wobbles via Digitalmars-d-learn
On Monday, 11 September 2017 at 11:58:18 UTC, Vino.B wrote: Hi All, Can some one help me on how to pass a container array as a function argument , the below code throws an error, Error: Error: function T3.Test2 (Array!string t1) is not callable using argument types (RangeT!(Array!string))

Passing array as an function argument.

2017-09-11 Thread Vino.B via Digitalmars-d-learn
Hi All, Can some one help me on how to pass a container array as a function argument , the below code throws an error, Error: Error: function T3.Test2 (Array!string t1) is not callable using argument types (RangeT!(Array!string)) import std.stdio: writeln; import std.container; auto

Re: SIMD under LDC

2017-09-11 Thread Igor via Digitalmars-d-learn
On Thursday, 7 September 2017 at 16:45:40 UTC, Igor wrote: On Thursday, 7 September 2017 at 15:24:13 UTC, Johan Engelen wrote: On Wednesday, 6 September 2017 at 20:43:01 UTC, Igor wrote: I opened a feature request on github. I also tried using the gccbuiltins but I got this error: LLVM

Re: __traits(compileError, {})

2017-09-11 Thread Timon Gehr via Digitalmars-d
On 08.09.2017 03:18, 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. Example: class Test

VisualD setup problems

2017-09-11 Thread Igor via Digitalmars-d-learn
I seem to have corrupted something within my installation and I can't find how to fix it. Earlier I was able to setup a breakpoint within some phobos module that I used and step through phobos code but that doesn't work any more. Does anyone know how I can make that work again?

betterC and struct destructors

2017-09-11 Thread Oleg B via Digitalmars-d-learn
Hello. I try using destructor in betterC code and it's work if outer function doesn't return value (void). Code in `scope (exit)` works as same (if func is void all is ok). In documentation I found https://dlang.org/spec/betterc.html#consequences 12 paragraph: Struct deconstructors. Why

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

2017-09-11 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17822 --- Comment #1 from anonymous4 --- Isn't it needed for initializer? What's really not needed is registration in moduleinfo: C++ classes can't support Object.factory. --

[OT] this is why you shouldn't serialize everything

2017-09-11 Thread Kagamin via Digitalmars-d
https://cwiki.apache.org/confluence/display/WW/S2-052 .net can, but WCF requires explicit vetting of types for protocol.

Threads & Message Passing - Best practices ?

2017-09-11 Thread Jonas Mminnberg via Digitalmars-d
I am using the recommended message passing threading model for my project, and it is not always clear how to do things in the best way; 1. receive() pattern matching -- what is common here, always send (int, someData) where int is a value you compare to. Or create dummy types that you can

Re: Problems with the DLangUI TreeWidget

2017-09-11 Thread Vadim Lopatin via Digitalmars-d-learn
On Friday, 8 September 2017 at 15:39:21 UTC, pezi_pink wrote: On Friday, 8 September 2017 at 15:08:27 UTC, Vadim Lopatin wrote: On Friday, 8 September 2017 at 12:10:23 UTC, pezi_pink wrote: [...] It's known issue: https://github.com/buggins/dlangui/issues/278 Not sure if there is any

[Issue 13829] std.uni.byCodePoint for strings has length

2017-09-11 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13829 --- Comment #5 from Dmitry Olshansky --- (In reply to Peter Alexander from comment #3) > In a perfect world, I think it should return a different range, but it's now > a breaking change, and even breaks its documented

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

2017-09-11 Thread Vino.B via Digitalmars-d-learn
On Sunday, 10 September 2017 at 23:10:20 UTC, Ali Çehreli wrote: 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

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

2017-09-11 Thread John Burton via Digitalmars-d-learn
On Sunday, 10 September 2017 at 21:38:03 UTC, Cecil Ward wrote: On Wednesday, 6 September 2017 at 15:55:35 UTC, Ali Çehreli wrote: [...] Ali, I have worked on operating systems' development in r+d. My definitions of terms are hopefully the same as yours. If we refer to two threads, if they