Re: I have a patch to let lldb demangle D symbols ; help welcome to improve it

2018-03-08 Thread Timothee Cour via Digitalmars-d
> I'm pretty sure Timothee based his patch onto LLDB/LLVM trunk. indeed, see instructions here: https://github.com/timotheecour/dtools/blob/master/dtools/lldbdplugin.d > Seems like they prefer a shared library and not rewriting it in C++ [1]. indeed, I would not support something that requires

Re: extern (c) struct ?

2018-03-08 Thread Robert M. Münch via Digitalmars-d-learn
On 2018-03-08 16:03:57 +, Adam D. Ruppe said: How are you accessing it? If it is by pointer only passing it to methods, you can simply: struct my_cpp_struct; and define functions: extern(C) void foo(my_cpp_struct* arg); Hi, :-/ seems I was a bit confused by all the backs and forth on

Re: Embedded Linux really needs Dlang for the IOT market

2018-03-08 Thread dangbinghoo via Digitalmars-d
On Friday, 9 March 2018 at 05:56:50 UTC, Joakim wrote: [...] And given how many embedded toolchains are out there, I doubt we can ever cover many of them beforehand. We could probably put out a tutorial for some popular toolchain, but first we need to get it completely working, which AFAIK

Re: Embedded Linux really needs Dlang for the IOT market

2018-03-08 Thread dangbinghoo via Digitalmars-d
On Friday, 9 March 2018 at 06:13:01 UTC, Andre Pany wrote: On Friday, 9 March 2018 at 03:09:16 UTC, dangbinghoo wrote: [...] I have a tutorial for raspberry py cross compilation from windows. It is on german but Google translator does give you a good English translation.

mysql-native v2.2.1: Bugfixes

2018-03-08 Thread Nick Sabalausky (Abscissa) via Digitalmars-d-announce
An all-D MySQL/MariaDB client library: https://github.com/mysql-d/mysql-native == Tagged bugfix release, 'v2.2.1'. Full changelog: https://github.com/mysql-d/mysql-native/blob/master/CHANGELOG.md This fixes a pretty big regression (for vibe.d users) from

[Issue 18575] making delegate from member function can lead to unsafe code

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

Re: Embedded Linux really needs Dlang for the IOT market

2018-03-08 Thread Andre Pany via Digitalmars-d
On Friday, 9 March 2018 at 03:09:16 UTC, dangbinghoo wrote: hi all, I think the D community should make more effort to make Dlang more easier to use on embedded Linux(mostly are arm and mips, powerpc). currently, LDC seems to be more complete, but we can only see a hundred words on the

Re: Why not flag away the mistakes of the past?

2018-03-08 Thread Jonathan M Davis via Digitalmars-d
On Friday, March 09, 2018 03:16:03 Taylor Hillegeist via Digitalmars-d wrote: > I wasn't so much asking about auto-decoding in particular more > about the mentality and methods of breaking changes. > > In a way any change to the compiler is a breaking change when it > comes to the configuration.

Re: Embedded Linux really needs Dlang for the IOT market

2018-03-08 Thread Joakim via Digitalmars-d
On Friday, 9 March 2018 at 03:09:16 UTC, dangbinghoo wrote: hi all, I think the D community should make more effort to make Dlang more easier to use on embedded Linux(mostly are arm and mips, powerpc). currently, LDC seems to be more complete, but we can only see a hundred words on the

Re: "Advent of D" article on Reddit

2018-03-08 Thread sarn via Digitalmars-d-announce
On Friday, 9 March 2018 at 05:34:31 UTC, bauss wrote: Lmao I love Reddit. The D hate has moved onto a new level. Instead of hating on D, it's now geared towards the amount of upvotes a D post on reddit gets. What an amusement. To be fair, some things get posted to /r/programming that

Re: mysql-native v2.1.0

2018-03-08 Thread bauss via Digitalmars-d-announce
On Thursday, 8 March 2018 at 16:24:22 UTC, Steven Schveighoffer wrote: On 3/8/18 11:14 AM, bauss wrote: On Thursday, 8 March 2018 at 15:09:07 UTC, Steven Schveighoffer wrote: The point of a pool is to avoid some costly setup. In my case, I'm not even closing the connection because I feel the

Re: "Advent of D" article on Reddit

2018-03-08 Thread bauss via Digitalmars-d-announce
On Thursday, 8 March 2018 at 21:19:25 UTC, Ali Çehreli wrote: Reposting here from the main newsgroup: https://www.reddit.com/r/programming/comments/82xyu6/advent_of_d_learning_d_with_advent_of_code/ Ali Lmao I love Reddit. The D hate has moved onto a new level. Instead of hating on D,

Re: Embedded Linux really needs Dlang for the IOT market

2018-03-08 Thread rikki cattermole via Digitalmars-d
On 09/03/2018 4:09 PM, dangbinghoo wrote: hi all, I think the D community should make more effort to make Dlang more easier to use on embedded Linux(mostly are arm and mips, powerpc). currently, LDC seems to be more complete, but we can only see a hundred words on the wiki about the

Re: Vtable for virtual functions in D

2018-03-08 Thread sarn via Digitalmars-d
On Thursday, 8 March 2018 at 22:56:27 UTC, Henrik wrote: why do I have to put the @nogc on the constructor and destructor separately? You can make things slightly better by putting @nogc in the struct itself: struct S { @nogc: void member1() { } void member2() { } } But,

Re: Why not flag away the mistakes of the past?

2018-03-08 Thread Taylor Hillegeist via Digitalmars-d
On Thursday, 8 March 2018 at 17:14:16 UTC, Jonathan M Davis wrote: On Thursday, March 08, 2018 16:34:11 Guillaume Piolat via Digitalmars-d wrote: On Wednesday, 7 March 2018 at 13:24:25 UTC, Jonathan M Davis wrote: > On Wednesday, March 07, 2018 12:53:16 Guillaume Piolat via > > Digitalmars-d

Embedded Linux really needs Dlang for the IOT market

2018-03-08 Thread dangbinghoo via Digitalmars-d
hi all, I think the D community should make more effort to make Dlang more easier to use on embedded Linux(mostly are arm and mips, powerpc). currently, LDC seems to be more complete, but we can only see a hundred words on the wiki about the cross-compiling for arm. I'm working in a

Re: Generic Property Implementation

2018-03-08 Thread Mike Franklin via Digitalmars-d-learn
On Friday, 9 March 2018 at 01:22:15 UTC, Mike Franklin wrote: I would like to know if this can be improved to support the following: * binary assignment operators (e.g. +=) * unary assignment operators (e.g. ++) * @safe, @nogc, and -betterC compatible * at least as good code generation as

Re: Generic Property Implementation

2018-03-08 Thread Mike Franklin via Digitalmars-d-learn
On Tuesday, 20 February 2018 at 14:34:53 UTC, bauss wrote: Would there be a reason why this wouldn't be a good implementation? If so what and how could it be improved? Are there flaws in an implementation like this? [... snip ...] I am very interested in this as a potential alternative to

Re: docs/definition: !object

2018-03-08 Thread Nick Sabalausky (Abscissa) via Digitalmars-d-learn
On 03/08/2018 05:31 AM, Steven Schveighoffer wrote: On 3/8/18 1:00 AM, Nick Sabalausky (Abscissa) wrote: But are we CERTAIN that's all there is to it? I have a non-reduced situation right now where outputting the address of a class reveals a non-null address, and yet

Re: Why not flag away the mistakes of the past?

2018-03-08 Thread Henrik via Digitalmars-d
On Thursday, 8 March 2018 at 17:35:11 UTC, H. S. Teoh wrote: On Thu, Mar 08, 2018 at 10:14:16AM -0700, Jonathan M Davis via Digitalmars-d wrote: [...] [...] [...] [...] Yeah, the only reason autodecoding survived in the beginning was because Andrei (wrongly) thought that a Unicode code

does the shared keyword work with mutable structs?

2018-03-08 Thread WhatMeWorry via Digitalmars-d-learn
I read where shared classes have not been implemented yet. So I'm using just a struct e below: But the output below is showing that sharing is not happening between Struct in main() and the various spawned threads. I'm I doing something wrong? creating queue in EventBuffer constructor

Re: Vtable for virtual functions in D

2018-03-08 Thread Henrik via Digitalmars-d
On Wednesday, 7 March 2018 at 22:02:17 UTC, sarn wrote: On Wednesday, 7 March 2018 at 12:49:40 UTC, Guillaume Piolat wrote: If you know enough D maybe you can implement your own virtual functions on top of D structs. It seems no one has made it yet. When I wrote Xanthe a year ago, I rolled my

Re: D for microservices

2018-03-08 Thread aberba via Digitalmars-d
On Thursday, 8 March 2018 at 09:35:08 UTC, Andrew Benton wrote: On Thursday, 8 March 2018 at 07:54:29 UTC, Jacob Carlborg wrote: On Thursday, 8 March 2018 at 07:20:53 UTC, Radu wrote: This guys says that vide.d works https://forum.dlang.org/thread/gikoeutmdyvolfshp...@forum.dlang.org Yes,

Re: Release: nanovega.d rendering lib like html5 canvas

2018-03-08 Thread Adam D. Ruppe via Digitalmars-d-announce
On Thursday, 8 March 2018 at 22:16:50 UTC, aberba wrote: Why is there NVG* everything? That's code noise. It is a fork and port from a C codebase. Fairly little of that is used in the public api though.

Re: Release: nanovega.d rendering lib like html5 canvas

2018-03-08 Thread aberba via Digitalmars-d-announce
On Thursday, 8 March 2018 at 03:55:35 UTC, Adam D. Ruppe wrote: https://github.com/adamdruppe/arsd nanovega.d [...] Why is there NVG* everything? That's code noise. Anyways, its well documented.

Re: Vtable for virtual functions in D

2018-03-08 Thread sarn via Digitalmars-d
On Thursday, 8 March 2018 at 04:37:08 UTC, Mike Franklin wrote: Nice! I was thinking about something almost exactly like this recently since 2.079.0 has features to further decouple the language from the runtime. It would be nice to read a blog post about this technique. Mike I didn't

Re: Release: nanovega.d rendering lib like html5 canvas

2018-03-08 Thread aberba via Digitalmars-d-announce
On Thursday, 8 March 2018 at 19:24:43 UTC, WebFreak001 wrote: On Thursday, 8 March 2018 at 03:55:35 UTC, Adam D. Ruppe wrote: https://github.com/adamdruppe/arsd nanovega.d [...] AMAZING! I think this will revolutionize how we do GUI and rendering in D, especially nogc. You can make really

Re: dub / win 64 / unresolved externals from run-time lib?

2018-03-08 Thread Robert M. Münch via Digitalmars-d-learn
On 2018-03-08 17:24:32 +, kinke said: On Thursday, 8 March 2018 at 17:03:18 UTC, Robert M. Münch wrote: Using Dub and pretty simple setup, that links in 3 C/C++ static libraries, I get these linker errors: libyogacore.lib(Yoga.obj) : error LNK2019: unresolved external symbol __imp_fmodf

"Advent of D" article on Reddit

2018-03-08 Thread Ali Çehreli via Digitalmars-d-announce
Reposting here from the main newsgroup: https://www.reddit.com/r/programming/comments/82xyu6/advent_of_d_learning_d_with_advent_of_code/ Ali

Re: D and C++ undefined reference when namespace

2018-03-08 Thread Steven Schveighoffer via Digitalmars-d
On 3/8/18 2:01 PM, Steven Schveighoffer wrote: On 3/8/18 1:56 PM, Markus wrote: I tested dmd (2.079.0), gdc and ldc2. All got the same result. Which makes me think, that it's not a bug, but a "feature" :) This is DEFINITELY a bug. https://issues.dlang.org/show_bug.cgi?id=18582 -Steve

Re: Advent of D

2018-03-08 Thread Ali Çehreli via Digitalmars-d
On 03/07/2018 09:26 AM, Andrei Alexandrescu wrote: > The post does not appear on the /r/programming page, so it has been > flagged as spam. On the first page right now. Ali

[Issue 18582] New: C++ namespace mangling from multiple modules doesn't use sequence ids

2018-03-08 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18582 Issue ID: 18582 Summary: C++ namespace mangling from multiple modules doesn't use sequence ids Product: D Version: D2 Hardware: All OS: All Status:

Re: Advent of D

2018-03-08 Thread Jordi Gutiérrez Hermoso via Digitalmars-d
On Wednesday, 7 March 2018 at 21:35:06 UTC, Russel Winder wrote: On Tue, 2018-03-06 at 18:09 +, Jordi Gutiérrez Hermoso via Digitalmars-d wrote: I wrote a blog post about working on Advent of Code in D. You can read it here: http://jordi.inversethought.com/blog/advent-of-d/ Another blog

[Issue 18581] New: Segmentation fault with dmd -X if static foreach inside template

2018-03-08 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18581 Issue ID: 18581 Summary: Segmentation fault with dmd -X if static foreach inside template Product: D Version: D2 Hardware: x86 OS: Mac OS X Status:

[Issue 18581] Segmentation fault with dmd -X if static foreach inside template

2018-03-08 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18581 Ali Ak changed: What|Removed |Added Severity|enhancement |normal --

Re: I didn't succeed in creating an empty project for a long time

2018-03-08 Thread Sönke Ludwig via Digitalmars-d
Am 08.03.2018 um 10:15 schrieb Sueko: On Monday, 15 January 2018 at 11:15:41 UTC, Brian wrote: zoujiaqing@Brian-XPS MINGW64 /d/Projects $ dub init serializable -v Using dub registry url 'https://code.dlang.org/' Refreshing local packages (refresh existing: true)... Looking for local package map

Re: Release: nanovega.d rendering lib like html5 canvas

2018-03-08 Thread WebFreak001 via Digitalmars-d-announce
On Thursday, 8 March 2018 at 03:55:35 UTC, Adam D. Ruppe wrote: https://github.com/adamdruppe/arsd nanovega.d [...] AMAZING! I think this will revolutionize how we do GUI and rendering in D, especially nogc. You can make really cool effects and renders very quickly. Got some cool project

Re: D and C++ undefined reference when namespace

2018-03-08 Thread Steven Schveighoffer via Digitalmars-d
On 3/8/18 1:56 PM, Markus wrote: You are right. $ dmd -c main.d $ nm main.o | grep some U _ZN4ns_a13some_functionEPN4ns_a7class_aE $ nm lib.o | grep some T _ZN4ns_a13some_functionEPNS_7class_aE But when i merge the main.d and other.d I get $ nm main.o | grep

Re: D and C++ undefined reference when namespace

2018-03-08 Thread Steven Schveighoffer via Digitalmars-d
On 3/8/18 1:56 PM, Markus wrote: I tested dmd (2.079.0), gdc and ldc2. All got the same result. Which makes me think, that it's not a bug, but a "feature" :) This is DEFINITELY a bug. -Steve

Re: D and C++ undefined reference when namespace

2018-03-08 Thread kinke via Digitalmars-d
On Thursday, 8 March 2018 at 18:56:04 UTC, Markus wrote: I tested dmd (2.079.0), gdc and ldc2. All got the same result. Which makes me think, that it's not a bug, but a "feature" :) C++ mangling is part of the DMD front-end shared by all 3 compilers, so no surprises there:

Re: D and C++ undefined reference when namespace

2018-03-08 Thread Markus via Digitalmars-d
On Thursday, 8 March 2018 at 17:04:02 UTC, Steven Schveighoffer wrote: On 3/8/18 11:35 AM, Markus wrote: When I do this locally on my mac, I get a similar error. When I nm the main.o file vs. the lib.o file, I see different mangled names. It appears that the D mangled name is not doing back

Re: Release D 2.079.0

2018-03-08 Thread Martin Nowak via Digitalmars-d-announce
On Monday, 5 March 2018 at 15:16:14 UTC, Atila Neves wrote: Is is just me or did this release just break the latest non-beta vibe.d? Is the Jenkins build testing the dub packages on master instead of the latest tag? Also this offer still stands

Re: Gtk-D API Documentation now on dpldocs.info

2018-03-08 Thread Adam D. Ruppe via Digitalmars-d-announce
On Thursday, 8 March 2018 at 18:11:47 UTC, Mike Wey wrote: Only glib (http://gtk-d.dpldocs.info/glib.html) seems to be broken / missing. Yeah, the index broke for some reason. But the files are there: http://gtk-d.dpldocs.info/glib.ArrayG.ArrayG.html and once you get inside you can navigate

Re: LDC 1.8.0

2018-03-08 Thread Martin Nowak via Digitalmars-d-announce
On Sunday, 4 March 2018 at 22:37:21 UTC, kinke wrote: Hi everyone, on behalf of the LDC team, I'm glad to announce LDC 1.8. The highlights of this version in a nutshell: * Based on D 2.078.3. Thanks for the efforts.

Re: Gtk-D API Documentation now on dpldocs.info

2018-03-08 Thread Mike Wey via Digitalmars-d-announce
On 08-03-18 02:27, Adam D. Ruppe wrote: GtkD is a D wrapper to the GTK library. It has plenty of doc comments attached... but they are in a special GTK syntax and all the cross references refer to C structs and functions instead of to D classes and methods. Well, adrdox got some special-case

Re: State of D 2018 Survey

2018-03-08 Thread Martin Nowak via Digitalmars-d-announce
On Sunday, 4 March 2018 at 21:12:30 UTC, Kagamin wrote: D just doesn't follow semver. If it did, we would have D79 now, nothing else even comes close to this. And I suspect it won't adopt semver because major number would be so ridiculously high and will advertize something else.

[Issue 18580] std.conv.to!(ubyte[])(void[]) should work

2018-03-08 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18580 ag0ae...@gmail.com changed: What|Removed |Added CC||ag0ae...@gmail.com --- Comment #4 from

[Issue 18580] std.conv.to!(ubyte[])(void[]) should work

2018-03-08 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18580 --- Comment #3 from Jack Stouffer --- (In reply to Jonathan M Davis from comment #2) > Ah, the title gave what you were trying to do. I missed that. I'm not sure > that I agree that it should work though, since it's unsafe and

Re: how do I pass this callback?

2018-03-08 Thread Marc via Digitalmars-d-learn
On Thursday, 8 March 2018 at 17:06:05 UTC, Marc wrote: How do I define the callback so that it can be used in RegisterWaitForSingleObject()? I've tried pass as argument: myFunc myFunc.ptr none worked. Here's my code: [...] Function call: [...] Error: [...] Solved! I shall rather

[Issue 18580] std.conv.to!(ubyte[])(void[]) should work

2018-03-08 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18580 --- Comment #2 from Jonathan M Davis --- Ah, the title gave what you were trying to do. I missed that. I'm not sure that I agree that it should work though, since it's unsafe and arguably should look that way, which is

[Issue 18580] std.conv.to!(ubyte[])(void[]) should work

2018-03-08 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18580 Jonathan M Davis changed: What|Removed |Added CC|

Re: Why not flag away the mistakes of the past?

2018-03-08 Thread H. S. Teoh via Digitalmars-d
On Thu, Mar 08, 2018 at 10:14:16AM -0700, Jonathan M Davis via Digitalmars-d wrote: > On Thursday, March 08, 2018 16:34:11 Guillaume Piolat via Digitalmars-d > wrote: [...] > > I'd agree with you, hate the special casing. However it seems to > > me this has been debated to death already, and

Re: dub / win 64 / unresolved externals from run-time lib?

2018-03-08 Thread kinke via Digitalmars-d-learn
On Thursday, 8 March 2018 at 17:03:18 UTC, Robert M. Münch wrote: Using Dub and pretty simple setup, that links in 3 C/C++ static libraries, I get these linker errors: libyogacore.lib(Yoga.obj) : error LNK2019: unresolved external symbol __imp_fmodf referenced in function "void __cdecl

Re: Why not flag away the mistakes of the past?

2018-03-08 Thread Jonathan M Davis via Digitalmars-d
On Thursday, March 08, 2018 16:34:11 Guillaume Piolat via Digitalmars-d wrote: > On Wednesday, 7 March 2018 at 13:24:25 UTC, Jonathan M Davis > > wrote: > > On Wednesday, March 07, 2018 12:53:16 Guillaume Piolat via > > > > Digitalmars-d wrote: > >> On Wednesday, 7 March 2018 at 06:00:30 UTC,

Re: DWT API Documentation now on dpldocs.info

2018-03-08 Thread Jacob Carlborg via Digitalmars-d-announce
On 2018-03-08 14:51, Adam D. Ruppe wrote: You need to go all to the way to the top level by clicking the topmost link on the left nav: http://dwt.dpldocs.info/org.html http://dwt.dpldocs.info/java.html Aha, I see. * No inheritance chain * No implemented interfaces They are in the

how do I pass this callback?

2018-03-08 Thread Marc via Digitalmars-d-learn
How do I define the callback so that it can be used in RegisterWaitForSingleObject()? I've tried pass as argument: myFunc myFunc.ptr none worked. Here's my code: extern (C) void OnExited(void* context, BOOLEAN isTimeOut); extern(Windows): BOOL RegisterWaitForSingleObject(

Re: D and C++ undefined reference when namespace

2018-03-08 Thread Steven Schveighoffer via Digitalmars-d
On 3/8/18 11:35 AM, Markus wrote: error: main.o: In function `_Dmain': main.d:(.text._Dmain[_Dmain]+0xa): undefined reference to `ns_a::some_function(ns_a::class_a*)' collect2: error: ld returned 1 exit status Error: linker exited with status 1 symbols: nm --demangle libissue.so |

dub / win 64 / unresolved externals from run-time lib?

2018-03-08 Thread Robert M. Münch via Digitalmars-d-learn
Using Dub and pretty simple setup, that links in 3 C/C++ static libraries, I get these linker errors: libyogacore.lib(Yoga.obj) : error LNK2019: unresolved external symbol __imp_fmodf referenced in function "void __cdecl YGRoundToPixelGrid(struct YGNode * const,float,float,float)"

Re: D and C++ undefined reference when namespace

2018-03-08 Thread Steven Schveighoffer via Digitalmars-d
On 3/8/18 11:23 AM, Markus wrote: On Thursday, 8 March 2018 at 15:27:31 UTC, Markus wrote: Hi I got the following c++ code [lib.cpp]: namespace ns_a {   class class_a {   };   void some_function(class_a*) {;} } and the following d code [main.d]: extern (C++, namespace_a) {     class class_a

Re: D and C++ undefined reference when namespace

2018-03-08 Thread Markus via Digitalmars-d
On Thursday, 8 March 2018 at 16:19:40 UTC, Steven Schveighoffer wrote: On 3/8/18 10:27 AM, Markus wrote: Hi I got the following c++ code [lib.cpp]: namespace ns_a {   class class_a {   };   void some_function(class_a*) {;} } and the following d code [main.d]: extern (C++, namespace_a) {

Re: Why not flag away the mistakes of the past?

2018-03-08 Thread Guillaume Piolat via Digitalmars-d
On Wednesday, 7 March 2018 at 13:24:25 UTC, Jonathan M Davis wrote: On Wednesday, March 07, 2018 12:53:16 Guillaume Piolat via Digitalmars-d wrote: On Wednesday, 7 March 2018 at 06:00:30 UTC, Taylor Hillegeist wrote: > That way the breaking change was easily fixable, and the > mistakes of the

[Issue 18580] New: std.conv.to!(ubyte[])(void[]) should work

2018-03-08 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18580 Issue ID: 18580 Summary: std.conv.to!(ubyte[])(void[]) should work Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement

Re: D and C++ undefined reference when namespace

2018-03-08 Thread Markus via Digitalmars-d
On Thursday, 8 March 2018 at 15:27:31 UTC, Markus wrote: Hi I got the following c++ code [lib.cpp]: namespace ns_a { class class_a { }; void some_function(class_a*) {;} } and the following d code [main.d]: extern (C++, namespace_a) { class class_a {} void some_function(class_a);

Re: mysql-native v2.1.0

2018-03-08 Thread Steven Schveighoffer via Digitalmars-d-announce
On 3/8/18 11:14 AM, bauss wrote: On Thursday, 8 March 2018 at 15:09:07 UTC, Steven Schveighoffer wrote: The point of a pool is to avoid some costly setup. In my case, I'm not even closing the connection because I feel the "cost" of allocating a connection from the heap isn't worth worrying

Re: D and C++ undefined reference when namespace

2018-03-08 Thread Steven Schveighoffer via Digitalmars-d
On 3/8/18 10:27 AM, Markus wrote: Hi I got the following c++ code [lib.cpp]: namespace ns_a {   class class_a {   };   void some_function(class_a*) {;} } and the following d code [main.d]: extern (C++, namespace_a) { did you mean ns_a? -Steve

Re: mysql-native v2.1.0

2018-03-08 Thread bauss via Digitalmars-d-announce
On Thursday, 8 March 2018 at 15:09:07 UTC, Steven Schveighoffer wrote: The point of a pool is to avoid some costly setup. In my case, I'm not even closing the connection because I feel the "cost" of allocating a connection from the heap isn't worth worrying about. But I also limit the pool so

Re: extern (c) struct ?

2018-03-08 Thread Adam D. Ruppe via Digitalmars-d-learn
On Thursday, 8 March 2018 at 15:51:53 UTC, Robert M. Münch wrote: I have a pretty complex struct with C++ typed private members etc. in it which I want to use from D. How are you accessing it? If it is by pointer only passing it to methods, you can simply: struct my_cpp_struct; and define

OCaml RAII proposal

2018-03-08 Thread Ali via Digitalmars-d
Just sharing this resource here https://hal.inria.fr/hal-01724997 might be of interest to some this is just a proposal clearly

extern (c) struct ?

2018-03-08 Thread Robert M. Münch via Digitalmars-d-learn
I have a pretty complex struct with C++ typed private members etc. in it which I want to use from D. Obviously I don't want to/can't rebuild the struct definiton in D and I don't need access to all the members just some simple C API ones are enough. How can I get access to this struct from

Re: Why not flag away the mistakes of the past?

2018-03-08 Thread Dukc via Digitalmars-d
On Wednesday, 7 March 2018 at 16:29:33 UTC, Seb wrote: Well, I tried that already: https://github.com/dlang/phobos/pull/5513 In short: very easy to do, but not much interest at the time. No. The main problem with that (and the idea of using a compiler flag in general) is that it affects the

D and C++ undefined reference when namespace

2018-03-08 Thread Markus via Digitalmars-d
Hi I got the following c++ code [lib.cpp]: namespace ns_a { class class_a { }; void some_function(class_a*) {;} } and the following d code [main.d]: extern (C++, namespace_a) { class class_a {} void some_function(class_a); } void main() { namespace_a.class_a instance_a;

Re: Thread Function does not executes

2018-03-08 Thread Vino via Digitalmars-d-learn
On Tuesday, 6 March 2018 at 09:01:55 UTC, Vino wrote: On Monday, 5 March 2018 at 13:50:28 UTC, Vino wrote: [...] Hi All, On further analysis, as to why the function deleteAgedDir is not getting executed, found that if this function finds a folder to be deleted then it should delete the

Re: Article: Why Const Sucks

2018-03-08 Thread Steven Schveighoffer via Digitalmars-d-announce
On 3/8/18 9:58 AM, joe wrote: On Monday, 5 March 2018 at 10:57:35 UTC, Jonathan M Davis wrote: Here's something I wrote up on const: /snip May be not entirely related, but a little gotcha. given: interface XY {} class Foo: XY {} class Bar: XY {} void doSomething(in XY sth) {   auto foo =

Re: mysql-native v2.1.0

2018-03-08 Thread Steven Schveighoffer via Digitalmars-d-announce
On 3/8/18 6:57 AM, bauss wrote: On Thursday, 8 March 2018 at 06:49:52 UTC, Nick Sabalausky (Abscissa) wrote: On 03/07/2018 02:32 PM, bauss wrote: Wait why has it been updated to array() ? So it's not a real range anymore? Or was it always represented as an array behind the scenes? I just

Re: Article: Why Const Sucks

2018-03-08 Thread joe via Digitalmars-d-announce
On Monday, 5 March 2018 at 10:57:35 UTC, Jonathan M Davis wrote: Here's something I wrote up on const: /snip May be not entirely related, but a little gotcha. given: interface XY {} class Foo: XY {} class Bar: XY {} void doSomething(in XY sth) { auto foo = cast(Foo)sth; // error in @safe

Re: VsCode tutorial

2018-03-08 Thread bauss via Digitalmars-d-learn
On Wednesday, 7 March 2018 at 21:39:09 UTC, Apocalypto wrote: Are there any tutorials about D in vscode? Which are the minimal plugins to install to have code completion, syntax highlighting and code formatting? Are there any app templates that i can invoke to not start every project from

Re: mysql-native v2.1.0

2018-03-08 Thread bauss via Digitalmars-d-announce
On Thursday, 8 March 2018 at 13:33:32 UTC, Nick Sabalausky (Abscissa) wrote: Sonke figured out just a few hours ago, and I confirmed, that #170 is caused by a bug in MySQLPool.lockConnection introduced in v2.1.0. I plan to have that fixed with a new release today. That bug turned out to be

Re: Elegant way to use dynamic bindings

2018-03-08 Thread Dennis via Digitalmars-d-learn
On Friday, 9 February 2018 at 20:19:33 UTC, Dennis wrote: I'd still like to find a nice way to generate the boilerplate code for dynamic loading, if I come up with something I'll post it here. So I ended up using an import library for a while, but I then wanted to get the handle of the DLL,

Re: DWT API Documentation now on dpldocs.info

2018-03-08 Thread Adam D. Ruppe via Digitalmars-d-announce
On Thursday, 8 March 2018 at 08:25:10 UTC, Jacob Carlborg wrote: * It doesn't seem to be possible to navigate between the top level packages, i.e. "java" and "org" You need to go all to the way to the top level by clicking the topmost link on the left nav: http://dwt.dpldocs.info/org.html

[Issue 18579] No group separators for floating point number formatted with zero decimal digits

2018-03-08 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18579 --- Comment #1 from github-bugzi...@puremagic.com --- Commit pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/de376769790ddd5cd7c2bc38dcfa4a765685ef67 Fix Issue 18579 - Fix digits grouping in formatValue()

Re: mysql-native v2.1.0

2018-03-08 Thread Nick Sabalausky (Abscissa) via Digitalmars-d-announce
On 03/08/2018 06:57 AM, bauss wrote: But if you can't store the pools anywhere, how are you supposed to use them with vibe.d? You can store the pools wherever you need to, just don't hold onto a Connection past the end of a vibe task. Creating a new pool for every thread seems expensive

dub project/library scaffolding/blueprint/template [was: Re: Bootstrap D template]

2018-03-08 Thread Martin Nowak via Digitalmars-d-announce
On Monday, 29 January 2018 at 11:04:19 UTC, Seb wrote: Just giving this a different title as I'm having troubles finding this topic. https://github.com/wilzbach/d-bootstrap

Re: Vtable for virtual functions in D

2018-03-08 Thread Guillaume Piolat via Digitalmars-d
On Wednesday, 7 March 2018 at 22:02:17 UTC, sarn wrote: On Wednesday, 7 March 2018 at 12:49:40 UTC, Guillaume Piolat wrote: If you know enough D maybe you can implement your own virtual functions on top of D structs. It seems no one has made it yet. When I wrote Xanthe a year ago, I rolled my

Re: Generic test bit function (core.bitop)

2018-03-08 Thread Pierre via Digitalmars-d-learn
On Wednesday, 7 March 2018 at 13:26:06 UTC, Alex wrote: From this point of view, size_t is not fixed, but capable to point to any place in memory. Therefore, pointer of any type have by definition exactly the defined size of size_t. Thank you,I thougth that pointer aliasing wasn't allowed.

Re: mysql-native v2.1.0

2018-03-08 Thread bauss via Digitalmars-d-announce
On Thursday, 8 March 2018 at 06:49:52 UTC, Nick Sabalausky (Abscissa) wrote: On 03/07/2018 02:32 PM, bauss wrote: Wait why has it been updated to array() ? So it's not a real range anymore? Or was it always represented as an array behind the scenes? I just feel like allocating it into an

Re: Diamond Full-stack MVC / Template Engine - v2.7.0 Released!

2018-03-08 Thread bauss via Digitalmars-d-announce
On Wednesday, 7 March 2018 at 22:51:10 UTC, Adam D. Ruppe wrote: And api documentation for the new version! http://diamond.dpldocs.info/v2.7.0/index.html Thanks for updating it! On Thursday, 8 March 2018 at 01:38:55 UTC, Mike Parker wrote: On Wednesday, 7 March 2018 at 22:37:36 UTC, bauss

Re: Hamburg meets D

2018-03-08 Thread Stephan via Digitalmars-d-announce
On Tuesday, 6 March 2018 at 01:46:26 UTC, Mike Parker wrote: On Monday, 5 March 2018 at 19:40:12 UTC, Stephan wrote: Hello fellow Dlers, thanks to last years DConf some German D developers agreed to meet for drinks in Hamburg. What time? TL;DR 6 pm! Sorry for the late reply. Since I will

[Issue 16037] assigning delegate to a scope variable shouldn't allocate closure

2018-03-08 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16037 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 16037] assigning delegate to a scope variable shouldn't allocate closure

2018-03-08 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16037 --- Comment #4 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/4b93ddef41508453c6e83b11e62f97ae870c8c98 fix Issue 16037 - assigning delegate to a scope variable

[Issue 18571] Missing functions in std.complex

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

Re: D for microservices

2018-03-08 Thread Radu via Digitalmars-d
On Thursday, 8 March 2018 at 09:28:02 UTC, Andrew Benton wrote: On Thursday, 8 March 2018 at 08:07:23 UTC, Joakim wrote: [...] I built out LDC on Alpine using the v1.8.0 LDC release. It's available now through Docker Hub and Github. Docker:

Re: docs/definition: !object

2018-03-08 Thread Steven Schveighoffer via Digitalmars-d-learn
On 3/8/18 1:00 AM, Nick Sabalausky (Abscissa) wrote: On 03/08/2018 12:05 AM, ketmar wrote: Nick Sabalausky (Abscissa) wrote: I'm having trouble finding the documentation for what exactly the unary "not" operator does when applied to a class/interface object. Does this documentation exist

[Issue 18571] Missing functions in std.complex

2018-03-08 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18571 Simen Kjaeraas changed: What|Removed |Added CC|

DIP: Binary assignment operators for properties -- Draft Review

2018-03-08 Thread Mike Parker via Digitalmars-d-announce
The DIP process is on again. I'll be publishing a blog post soon describing the changes and their motivation. In the meantime, the primary candidate to become DIP 1013 [1] needs a good going over for the Draft Review to shake out any structural or technical issues. Please see the new Procedure

Re: Two things I thought would be simple

2018-03-08 Thread Steven Schveighoffer via Digitalmars-d
On 3/8/18 3:29 AM, Shachar Shemesh wrote: On 07/03/18 17:11, Steven Schveighoffer wrote: Well, you could do it with templates, but obviously that is less desirable: void func2(Args...)(Args args) if(is(typeof(func(args { return func(args); } I never understood why anyone would use "is"

Re: Can't "is null" an interface?!?! Incompatible types???

2018-03-08 Thread Jacob Carlborg via Digitalmars-d-learn
On Thursday, 8 March 2018 at 08:04:54 UTC, Nick Sabalausky (Abscissa) wrote: Interesting. I was using vibe.d 'v0.8.3-rc.1' (which doesn't appear to work on run.dlang.io). But it does seem to work for me if I use 'v0.8.3-alpha.1'. I wonder what could have changed to result in this? It's a

Re: Official Dub package for DWT

2018-03-08 Thread Jacob Carlborg via Digitalmars-d-announce
On Thursday, 8 March 2018 at 09:17:53 UTC, IM wrote: This is great, thanks! Any plans to make it link with gtk3 instead of 2? I remember gtk2 had issues with HiDPI support. DWT is a port of the Java library SWT. This particular version, 3.4, of SWT only supports GTK2. Later versions of SWT

Re: D for microservices

2018-03-08 Thread Andrew Benton via Digitalmars-d
On Thursday, 8 March 2018 at 07:54:29 UTC, Jacob Carlborg wrote: On Thursday, 8 March 2018 at 07:20:53 UTC, Radu wrote: This guys says that vide.d works https://forum.dlang.org/thread/gikoeutmdyvolfshp...@forum.dlang.org Yes, it's pretty straightforward: 1. Build on Ubuntu, or some other

[Issue 18577] Loose isForwardRange

2018-03-08 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=18577 Simen Kjaeraas changed: What|Removed |Added Status|NEW |RESOLVED

Re: D for microservices

2018-03-08 Thread Andrew Benton via Digitalmars-d
On Thursday, 8 March 2018 at 08:07:23 UTC, Joakim wrote: On Thursday, 8 March 2018 at 06:49:07 UTC, Andrew Benton wrote: On Monday, 5 March 2018 at 17:58:25 UTC, Joakim wrote: [snip] What is the exact error? Maybe report it here: https://github.com/lindt/docker-dmd/issues/1 I built out LDC

  1   2   >