Re: performance issues with SIMD function

2023-11-04 Thread Guillaume Piolat via Digitalmars-d-learn
On Friday, 3 November 2023 at 15:11:31 UTC, Bogdan wrote: Can anyone help me to understand what I am missing? Your loop is likely dominated by sin() calls, And the rest of the loop isn't complicated enough to outperform the compiler. What you could do is use the intrinsics to implement a

Re: performance issues with SIMD function

2023-11-04 Thread Bogdan via Digitalmars-d-learn
On Friday, 3 November 2023 at 15:32:08 UTC, Sergey wrote: On Friday, 3 November 2023 at 15:11:31 UTC, Bogdan wrote: Hi everyone, I was playing around with the intel-intrinsics library, trying to improve the speed of a simple area function. I could not see any performance improvements from

Re: performance issues with SIMD function

2023-11-03 Thread Sergey via Digitalmars-d-learn
On Friday, 3 November 2023 at 15:11:31 UTC, Bogdan wrote: Hi everyone, I was playing around with the intel-intrinsics library, trying to improve the speed of a simple area function. I could not see any performance improvements from the non-SIMD implementation. The SIMD version is a little

Re: performance issues with SIMD function

2023-11-03 Thread Imperatorn via Digitalmars-d-learn
On Friday, 3 November 2023 at 15:17:43 UTC, Imperatorn wrote: On Friday, 3 November 2023 at 15:11:31 UTC, Bogdan wrote: Hi everyone, I was playing around with the intel-intrinsics library, trying to improve the speed of a simple area function. I could not see any performance improvements

Re: performance issues with SIMD function

2023-11-03 Thread Imperatorn via Digitalmars-d-learn
On Friday, 3 November 2023 at 15:11:31 UTC, Bogdan wrote: Hi everyone, I was playing around with the intel-intrinsics library, trying to improve the speed of a simple area function. I could not see any performance improvements from the non-SIMD implementation. The SIMD version is a little

performance issues with SIMD function

2023-11-03 Thread Bogdan via Digitalmars-d-learn
Hi everyone, I was playing around with the intel-intrinsics library, trying to improve the speed of a simple area function. I could not see any performance improvements from the non-SIMD implementation. The SIMD version is a little bit slower even with LDC2 and --o3. Can anyone help me to

Issues in the gprof output report

2023-06-24 Thread Pavankumar S V via Digitalmars-d-learn
Hello, I have followed these steps to generate a profiling data from gprof: 1) -pg flag added for both compiler and linker while compiling. Also added compiler flags like -fno-inline-functions, -fno-builtin, -no-pie as suggested in many online forums. 2) Executed the program and got the

Re: My programs issues

2022-08-12 Thread frame via Digitalmars-d-learn
On Friday, 12 August 2022 at 20:16:26 UTC, pascal111 wrote: I tried under Windows using alt+9 or 6 but with no hoped result, they printed another characters. Maybe this wasn't clear. I meant keep pressing [Alt] and then [9], [6] (in turn) and then release [Alt]. It should print the

Re: My programs issues

2022-08-12 Thread pascal111 via Digitalmars-d-learn
On Friday, 12 August 2022 at 19:18:38 UTC, frame wrote: On Friday, 12 August 2022 at 18:43:14 UTC, pascal111 wrote: On Friday, 12 August 2022 at 16:06:09 UTC, frame wrote: On Thursday, 11 August 2022 at 20:30:54 UTC, pascal111 wrote: https://github.com/pascal111-fra/D/blob/main/proj08.d

Re: My programs issues

2022-08-12 Thread pascal111 via Digitalmars-d-learn
On Friday, 12 August 2022 at 19:18:38 UTC, frame wrote: On Friday, 12 August 2022 at 18:43:14 UTC, pascal111 wrote: On Friday, 12 August 2022 at 16:06:09 UTC, frame wrote: On Thursday, 11 August 2022 at 20:30:54 UTC, pascal111 wrote: https://github.com/pascal111-fra/D/blob/main/proj08.d

Re: My programs issues

2022-08-12 Thread frame via Digitalmars-d-learn
On Friday, 12 August 2022 at 18:43:14 UTC, pascal111 wrote: On Friday, 12 August 2022 at 16:06:09 UTC, frame wrote: On Thursday, 11 August 2022 at 20:30:54 UTC, pascal111 wrote: https://github.com/pascal111-fra/D/blob/main/proj08.d btw letters :D Please use ` (ASCII: 0x60) instead of '

Re: My programs issues

2022-08-12 Thread pascal111 via Digitalmars-d-learn
On Friday, 12 August 2022 at 16:06:09 UTC, frame wrote: On Thursday, 11 August 2022 at 20:30:54 UTC, pascal111 wrote: https://github.com/pascal111-fra/D/blob/main/proj08.d btw letters :D Please use ` (ASCII: 0x60) instead of ' (0x27) for the markdown format header, eg.: ```D ...```

Re: My programs issues

2022-08-12 Thread frame via Digitalmars-d-learn
On Thursday, 11 August 2022 at 20:30:54 UTC, pascal111 wrote: https://github.com/pascal111-fra/D/blob/main/proj08.d btw letters :D Please use ` (ASCII: 0x60) instead of ' (0x27) for the markdown format header, eg.: ```D ...``` otherwise it won't be recognized here.

Re: My programs issues

2022-08-12 Thread pascal111 via Digitalmars-d-learn
On Friday, 12 August 2022 at 07:02:32 UTC, Antonio wrote: On Wednesday, 10 August 2022 at 13:13:20 UTC, Adam D Ruppe wrote: On Wednesday, 10 August 2022 at 12:36:42 UTC, pascal111 wrote: 1) I used "exit()" from "core.stdc.stdlib;" module, but someone can say this isn't the D way to exit the

Re: My programs issues

2022-08-12 Thread Antonio via Digitalmars-d-learn
On Wednesday, 10 August 2022 at 13:13:20 UTC, Adam D Ruppe wrote: On Wednesday, 10 August 2022 at 12:36:42 UTC, pascal111 wrote: 1) I used "exit()" from "core.stdc.stdlib;" module, but someone can say this isn't the D way to exit the program. It is better to simply return a value from main

Re: My programs issues

2022-08-11 Thread pascal111 via Digitalmars-d-learn
This is a program for duplicating files, I made some changes on it, and liked to share it may that I get a new advice on it: '''D module main; // D programming language import std.stdio; import std.string; import std.algorithm; import dcollect; int main(string[] args) { string s; //char[]

Re: My programs issues

2022-08-11 Thread pascal111 via Digitalmars-d-learn
Next code receiving an input from the user and reprint it in capital letters with a separator between each letter, but I think that there is more to add or to modify the way this program working with: '''D module main; import std.stdio; import std.uni; import std.string; import

Re: My programs issues

2022-08-10 Thread pascal111 via Digitalmars-d-learn
On Wednesday, 10 August 2022 at 14:45:05 UTC, Andrey Zherikov wrote: On Wednesday, 10 August 2022 at 14:08:59 UTC, pascal111 wrote: This version has modern features, it's 1) functional 2) goto-less. There is nothing modern ;-D Take a look in this linear programming and you will know what's

Re: My programs issues

2022-08-10 Thread Andrey Zherikov via Digitalmars-d-learn
On Wednesday, 10 August 2022 at 14:08:59 UTC, pascal111 wrote: This version has modern features, it's 1) functional 2) goto-less. There is nothing modern ;-D

Re: My programs issues

2022-08-10 Thread pascal111 via Digitalmars-d-learn
On Wednesday, 10 August 2022 at 14:03:53 UTC, Andrey Zherikov wrote: On Wednesday, 10 August 2022 at 13:34:53 UTC, pascal111 wrote: So, the program will be like this: Is this clearer? ```d import std.stdio; import std.algorithm; import std.range; double getNumber() { double x;

Re: My programs issues

2022-08-10 Thread Andrey Zherikov via Digitalmars-d-learn
On Wednesday, 10 August 2022 at 13:34:53 UTC, pascal111 wrote: So, the program will be like this: Is this clearer? ```d import std.stdio; import std.algorithm; import std.range; double getNumber() { double x; write("Enter a number: "); readf(" %s\n", ); writeln; return

Re: My programs issues

2022-08-10 Thread pascal111 via Digitalmars-d-learn
On Wednesday, 10 August 2022 at 13:22:03 UTC, rikki cattermole wrote: On 11/08/2022 12:36 AM, pascal111 wrote: 2) I used "goto", I heard from someone before that using "goto" isn't good programming feature. This is mostly a historical debate at this point. Back 40 years ago, goto wasn't

Re: My programs issues

2022-08-10 Thread pascal111 via Digitalmars-d-learn
On Wednesday, 10 August 2022 at 13:13:20 UTC, Adam D Ruppe wrote: On Wednesday, 10 August 2022 at 12:36:42 UTC, pascal111 wrote: 1) I used "exit()" from "core.stdc.stdlib;" module, but someone can say this isn't the D way to exit the program. It is better to simply return a value from main

Re: My programs issues

2022-08-10 Thread rikki cattermole via Digitalmars-d-learn
On 11/08/2022 12:36 AM, pascal111 wrote: 2) I used "goto", I heard from someone before that using "goto" isn't good programming feature. This is mostly a historical debate at this point. Back 40 years ago, goto wasn't typically limited within a procedure and doesn't have any checks in

Re: My programs issues

2022-08-10 Thread Adam D Ruppe via Digitalmars-d-learn
On Wednesday, 10 August 2022 at 12:36:42 UTC, pascal111 wrote: 1) I used "exit()" from "core.stdc.stdlib;" module, but someone can say this isn't the D way to exit the program. It is better to simply return a value from main instead. 2) I used "goto", I heard from someone before that using

My programs issues

2022-08-10 Thread pascal111 via Digitalmars-d-learn
In next program 1) I used "exit()" from "core.stdc.stdlib;" module, but someone can say this isn't the D way to exit the program. 2) I used "goto", I heard from someone before that using "goto" isn't good programming feature. '''D module proj07; import std.stdio; import std.algorithm;

Re: DUB issues

2022-04-19 Thread bauss via Digitalmars-d-learn
On Tuesday, 19 April 2022 at 09:37:49 UTC, Mike Parker wrote: On Tuesday, 19 April 2022 at 08:58:02 UTC, bauss wrote: On Monday, 18 April 2022 at 13:41:04 UTC, Mike Parker wrote: On Monday, 18 April 2022 at 05:27:32 UTC, Danny Arends wrote: Any ideas how to get into contact/fix this issue ?

Re: DUB issues

2022-04-19 Thread Mike Parker via Digitalmars-d-learn
On Tuesday, 19 April 2022 at 08:58:02 UTC, bauss wrote: On Monday, 18 April 2022 at 13:41:04 UTC, Mike Parker wrote: On Monday, 18 April 2022 at 05:27:32 UTC, Danny Arends wrote: Any ideas how to get into contact/fix this issue ? I've emailed Sönke and pointed him to this thread. Wouldn't

Re: DUB issues

2022-04-19 Thread bauss via Digitalmars-d-learn
On Monday, 18 April 2022 at 13:41:04 UTC, Mike Parker wrote: On Monday, 18 April 2022 at 05:27:32 UTC, Danny Arends wrote: Any ideas how to get into contact/fix this issue ? I've emailed Sönke and pointed him to this thread. Wouldn't the appropriate thing to do be dub being officially a

Re: DUB issues

2022-04-18 Thread Marcone via Digitalmars-d-learn
The dub creator shouldn't even remember creating this anymore. It makes me sad when I see that things in D are old, forgotten, outdated, abandoned. D is the best programming language in the world. But nobody appreciates it. It makes me sad when I see the repositories for over 10 years without

Re: DUB issues

2022-04-18 Thread Mike Parker via Digitalmars-d-learn
On Monday, 18 April 2022 at 05:27:32 UTC, Danny Arends wrote: Any ideas how to get into contact/fix this issue ? I've emailed Sönke and pointed him to this thread.

Re: DUB issues

2022-04-18 Thread BoQsc via Digitalmars-d-learn
On Monday, 18 April 2022 at 05:27:32 UTC, Danny Arends wrote: Hey All, For some reason I cannot reset my password to get into dub (https://code.dlang.org/), after trying I never receive the email to reset my password. I was unsure at first if I had signed up at all, but trying to make a

DUB issues

2022-04-17 Thread Danny Arends via Digitalmars-d-learn
Hey All, For some reason I cannot reset my password to get into dub (https://code.dlang.org/), after trying I never receive the email to reset my password. I was unsure at first if I had signed up at all, but trying to make a new account tells me my email address is already in use. Any

Linker issues with DMD and LDC

2021-11-12 Thread Thomas Gregory via Digitalmars-d-learn
I get this error when trying to compile a program using [dhtslib](https://github.com/blachlylab/dhtslib) with DMD or any LDC version < 1.25.0. ``` _D39TypeInfo_S7dhtslib3sam6record9SAMRecord6__initZ: error: undefined reference to `_D7dhtslib3sam6record9SAMRecord15__fieldPostblitMFNbNiNlNeZv'

Re: Linker issues with struct postblit

2021-11-01 Thread Thomas Gregory via Digitalmars-d-learn
/blachlylab/dhtslib) package and I have been running into issues with a new implementation of reference counting we are using. [...] Postblit? https://dlang.org/spec/struct.html#struct-postblit I imagine Imperatorn is quite familiar with postblit and was pointing out that it is strange

Re: Linker issues with struct postblit

2021-10-30 Thread James Blachly via Digitalmars-d-learn
On 10/29/21 7:10 AM, Stanislav Blinov wrote: On Friday, 29 October 2021 at 11:05:14 UTC, Imperatorn wrote: On Thursday, 28 October 2021 at 01:39:10 UTC, Thomas Gregory wrote: I am a maintainer of the [dhtslib](https://github.com/blachlylab/dhtslib) package and I have been running into issues

Re: Linker issues with struct postblit

2021-10-29 Thread Stanislav Blinov via Digitalmars-d-learn
On Friday, 29 October 2021 at 11:05:14 UTC, Imperatorn wrote: On Thursday, 28 October 2021 at 01:39:10 UTC, Thomas Gregory wrote: I am a maintainer of the [dhtslib](https://github.com/blachlylab/dhtslib) package and I have been running into issues with a new implementation of reference

Re: Linker issues with struct postblit

2021-10-29 Thread Imperatorn via Digitalmars-d-learn
On Thursday, 28 October 2021 at 01:39:10 UTC, Thomas Gregory wrote: I am a maintainer of the [dhtslib](https://github.com/blachlylab/dhtslib) package and I have been running into issues with a new implementation of reference counting we are using. [...] Postblit?

Linker issues with struct postblit

2021-10-27 Thread Thomas Gregory via Digitalmars-d-learn
I am a maintainer of the [dhtslib](https://github.com/blachlylab/dhtslib) package and I have been running into issues with a new implementation of reference counting we are using. Below is the implementation (which is basically our replacement for `RefCounted`). ```d /// Template struct

Re: BetterC issues with ErupteD Vulkan binding typedef handles

2020-12-20 Thread ParticlePeter via Digitalmars-d-learn
[snip] Forgot to add another question. The mentioned error message is not too helpful in locating the real offended code. Is there a way to get more information or additional hints about the actual cause of the problem?

Re: BetterC issues with ErupteD Vulkan binding typedef handles

2020-12-20 Thread ParticlePeter via Digitalmars-d-learn
On Sunday, 20 December 2020 at 15:52:39 UTC, Adam D. Ruppe wrote: On Sunday, 20 December 2020 at 15:45:59 UTC, ParticlePeter wrote: VkSemaphore[] wait_semaphores = [], // error: TypeInfo required does it still error if you just use = null? they work the same way but

Re: BetterC issues with ErupteD Vulkan binding typedef handles

2020-12-20 Thread Adam D. Ruppe via Digitalmars-d-learn
On Sunday, 20 December 2020 at 15:45:59 UTC, ParticlePeter wrote: VkSemaphore[] wait_semaphores = [], // error: TypeInfo required does it still error if you just use = null? they work the same way but might avoid the annoying error.

BetterC issues with ErupteD Vulkan binding typedef handles

2020-12-20 Thread ParticlePeter via Digitalmars-d-learn
Hello, I am experimenting with betterC and Vulkan through Erupted [0] binding, but unfortunately I find myself hunting down these kind of errors: ..\ErupteD\source\erupted\types.d-mixin-77(77,1): Error: `TypeInfo` cannot be used with -betterC The issue is with Vulkan type handles. One such

Re: Fixing race issues the right way

2020-04-20 Thread solidstate1991 via Digitalmars-d-learn
On Sunday, 5 April 2020 at 22:33:50 UTC, Stefan Koch wrote: Look at your program in a debugger and see if it does spawn threads. If it does find out where and why they are spawned. Thanks for the answer, but it seems the issue was the lack of the ability of unittesting such a large

Re: Fixing race issues the right way

2020-04-05 Thread Mathias LANG via Digitalmars-d-learn
On Sunday, 5 April 2020 at 22:24:27 UTC, solidstate1991 wrote: My game engine is currently broken due to some race issue I don't really know how to resolve. It seems that the compiler tries to skip instructions that are not locked with a `writeln()` or something similar. Usually I can safely

Re: Fixing race issues the right way

2020-04-05 Thread Stefan Koch via Digitalmars-d-learn
On Sunday, 5 April 2020 at 22:24:27 UTC, solidstate1991 wrote: My game engine is currently broken due to some race issue I don't really know how to resolve. It seems that the compiler tries to skip instructions that are not locked with a `writeln()` or something similar. Usually I can safely

Fixing race issues the right way

2020-04-05 Thread solidstate1991 via Digitalmars-d-learn
My game engine is currently broken due to some race issue I don't really know how to resolve. It seems that the compiler tries to skip instructions that are not locked with a `writeln()` or something similar. Usually I can safely remove the writeln after compiling it once with that way.

Re: Issues creating a dynamic libary with dub

2020-03-24 Thread mitchell via Digitalmars-d-learn
On Wednesday, 25 March 2020 at 04:04:09 UTC, rikki cattermole wrote: When I see -fPIC I think something is wrong with your compiler+runtime setup. Use -v to see the commands dub is using. This should not be dub related. It seems you're correct. I looked through some of the older projects

Re: Issues creating a dynamic libary with dub

2020-03-24 Thread rikki cattermole via Digitalmars-d-learn
When I see -fPIC I think something is wrong with your compiler+runtime setup. Use -v to see the commands dub is using. This should not be dub related.

Issues creating a dynamic libary with dub

2020-03-24 Thread mitchell via Digitalmars-d-learn
Hello, I'm having issues creating a dynamic library with dub. The dub config file contains (with the exception of the names and such) only targetType "dynamicLibrary" When I attempt to buld the library, I get: common ~master: building configuration "library"

Re: Issues with std.net.curl on Win 10 x64

2019-03-25 Thread Boris Carvajal via Digitalmars-d-learn
On Monday, 25 March 2019 at 16:25:37 UTC, cptgrok wrote: Am I doing something wrong or is there some issue with curl or something else? I'm pretty new to D and I'm not sure if I need to go right down to raw sockets and re-invent the wheel or if there is some other library that can help. If I

Re: Issues with std.net.curl on Win 10 x64

2019-03-25 Thread Seb via Digitalmars-d-learn
=x86_64, thanks! Sadly I don't see any change. I'm not having luck finding known curl issues similar to what I am experiencing. I have a sneaking suspicion that the web service I am using is doing some nonsense in the background. Might try a packet capture to better see what's up. Alternatively

Re: Issues with std.net.curl on Win 10 x64

2019-03-25 Thread cptgrok via Digitalmars-d-learn
not having luck finding known curl issues similar to what I am experiencing. I have a sneaking suspicion that the web service I am using is doing some nonsense in the background. Might try a packet capture to better see what's up.

Re: Issues with std.net.curl on Win 10 x64

2019-03-25 Thread Andre Pany via Digitalmars-d-learn
On Monday, 25 March 2019 at 16:25:37 UTC, cptgrok wrote: I need to review syslogs for over 160 systems monthly, and I am trying to write a utility to automate bulk downloads from a custom web service where they are hosted. I need to calculate a date range for the prior month, add start and end

Issues with std.net.curl on Win 10 x64

2019-03-25 Thread cptgrok via Digitalmars-d-learn
ork), but that seems like sweeping something under the rug, probably leading to future issues. I'm using the 32bit binary from libcurl-7.64.0-WinSSL-zlib-x86-x64.zip on the release archive, and DMD 2.085.0. I've tried curl 7.63 and 7.57 but the behavior is the same. Am I doing something wr

Re: 2 class issues

2019-03-07 Thread ag0aep6g via Digitalmars-d-learn
On 07.03.19 11:38, spir wrote: -1- How to enforce that subclasses implement given methods without using "abstract", which seems to make the whole class abstract? Not, as far as I can tell. You can't force derived classes to override an existing implementation. And you can't omit the

Re: 2 class issues

2019-03-07 Thread Johannes Loher via Digitalmars-d-learn
Am 07.03.19 um 11:38 schrieb spir: > Hello, > > First, I am not very experimented with the combination of static lang > (alloc & typing) and OO (class-based). I'm implementing a library for > lexical analysis (lexing), with 2 minor issues: > > -1- How to enforce that s

Re: 2 class issues -- PS

2019-03-07 Thread spir via Digitalmars-d-learn
from [https://dlang.org/spec/attribute.html#abstract] : --- abstract Attribute An abstract member function must be overridden by a derived class. Only virtual member functions may be declared abstract; non-virtual member functions and free-standing functions cannot be declared

2 class issues

2019-03-07 Thread spir via Digitalmars-d-learn
Hello, First, I am not very experimented with the combination of static lang (alloc & typing) and OO (class-based). I'm implementing a library for lexical analysis (lexing), with 2 minor issues: -1- How to enforce that subclasses implement given methods without using "abstract"

Re: Building Libraries in the face of API and ABI changes [was Understanding SIGSEGV issues]

2019-01-13 Thread Jacob Carlborg via Digitalmars-d-learn
On 2019-01-11 06:31, Russel Winder wrote: DStep generated bindings tend to need some manual tweaking that cannot be automated, which is surprising given that bindgen can do things without manual intervention for Rust. It's not surprising at all. Different tools, different approaches,

Re: Building Libraries in the face of API and ABI changes [was Understanding SIGSEGV issues]

2019-01-10 Thread Russel Winder via Digitalmars-d-learn
On Thu, 2019-01-10 at 13:09 -0500, Steven Schveighoffer via Digitalmars-d- learn wrote: > […] > That is one problem with linking against C or C++ code -- changes to > certain things (e.g. struct layout) don't change the mangling. I am having nightmares trying to decide what to do with the Rust

Re: Understanding SIGSEGV issues

2019-01-10 Thread H. S. Teoh via Digitalmars-d-learn
On Thu, Jan 10, 2019 at 01:09:22PM -0500, Steven Schveighoffer via Digitalmars-d-learn wrote: > On 1/10/19 12:30 PM, Russel Winder wrote: > > On Thu, 2019-01-10 at 10:00 -0500, Steven Schveighoffer via Digitalmars-d- > > learn wrote: > > […] > > > Hm... your description of having the problem

Re: Understanding SIGSEGV issues

2019-01-10 Thread Steven Schveighoffer via Digitalmars-d-learn
On 1/10/19 12:30 PM, Russel Winder wrote: On Thu, 2019-01-10 at 10:00 -0500, Steven Schveighoffer via Digitalmars-d- learn wrote: […] Hm... your description of having the problem happen at the end of main seems to suggest it has something to do with destruction. It seems that there was a

Re: Understanding SIGSEGV issues

2019-01-10 Thread Russel Winder via Digitalmars-d-learn
On Thu, 2019-01-10 at 10:00 -0500, Steven Schveighoffer via Digitalmars-d- learn wrote: […] > > Hm... your description of having the problem happen at the end of main > seems to suggest it has something to do with destruction. > It seems that there was a change in one file of libdvbv5 1.14.x →

Re: Understanding SIGSEGV issues

2019-01-10 Thread Russel Winder via Digitalmars-d-learn
On Thu, 2019-01-10 at 07:36 +, Nicholas Wilson via Digitalmars-d-learn wrote: […] > Hmm, if you think the binding could be the problem you could try > using app as an alternative, see if it makes any difference. I did a proper update of the generated files of the binding, and magically

Re: Understanding SIGSEGV issues

2019-01-10 Thread Steven Schveighoffer via Digitalmars-d-learn
On 1/9/19 11:39 AM, Russel Winder wrote: On Tue, 2019-01-08 at 09:59 -0500, Steven Schveighoffer via Digitalmars-d- learn wrote: […] Russel, make sure your destructor both checks whether the underlying resource is set, and clears it to invalid when freeing it. Even types that can't be

Re: Understanding SIGSEGV issues

2019-01-09 Thread Nicholas Wilson via Digitalmars-d-learn
On Wednesday, 9 January 2019 at 16:48:47 UTC, Russel Winder wrote: It really is totally weird. My new Rust binding to libdvbv5 and associated version of the same application works fine. So libdvbv5 itself is not the cuprit. This has to mean it is something about the D compilers that has

Re: Understanding SIGSEGV issues

2019-01-09 Thread Russel Winder via Digitalmars-d-learn
On Wed, 2019-01-09 at 20:03 +, Johannes Loher via Digitalmars-d-learn wrote: > […] > If debugger integration is that important to you, you might want > to try out visual studio code with the corresponding plugins (you > need a separate plugin for debugger support). I found it to work >

Re: Understanding SIGSEGV issues

2019-01-09 Thread Johannes Loher via Digitalmars-d-learn
On Wednesday, 9 January 2019 at 16:48:47 UTC, Russel Winder wrote: On Tue, 2019-01-08 at 11:51 +, Nicholas Wilson via Digitalmars-d-learn wrote: [...] […] [...] [...] If debugger integration is that important to you, you might want to try out visual studio code with the corresponding

Re: Understanding SIGSEGV issues

2019-01-09 Thread Russel Winder via Digitalmars-d-learn
On Tue, 2019-01-08 at 11:51 +, Nicholas Wilson via Digitalmars-d-learn wrote: > […] > Ahh. Good that you've found that, I can't help you much more with > that then. Indeed. :-) Your hep to get to this point though has been invaluable. Thanks you for putting in the time and effort. […] >

Re: Understanding SIGSEGV issues

2019-01-09 Thread Russel Winder via Digitalmars-d-learn
On Tue, 2019-01-08 at 09:59 -0500, Steven Schveighoffer via Digitalmars-d- learn wrote: > […] > > Russel, make sure your destructor both checks whether the underlying > resource is set, and clears it to invalid when freeing it. > > Even types that can't be copied can be moved, or temporarily

Re: Understanding SIGSEGV issues

2019-01-08 Thread Steven Schveighoffer via Digitalmars-d-learn
On 1/5/19 6:33 AM, Russel Winder wrote: On Sat, 2019-01-05 at 10:52 +, Russel Winder wrote: On Sat, 2019-01-05 at 10:31 +, Nicholas Wilson via Digitalmars-d-learn wrote: […] Maybe it is a problem with copying a File_Ptr (e.g. missing a increase of the reference count)? Like, `auto a =

Re: Understanding SIGSEGV issues

2019-01-08 Thread Nicholas Wilson via Digitalmars-d-learn
On Tuesday, 8 January 2019 at 10:23:30 UTC, Russel Winder wrote: Actually that is not a worry since the TransmitterData instance is only needed to call the scan function which creates a ChannelsData instance that holds no references to the TransmitterData instance. It turns out that whilst

Re: Understanding SIGSEGV issues

2019-01-08 Thread Russel Winder via Digitalmars-d-learn
On Sat, 2019-01-05 at 13:14 +, Nicholas Wilson via Digitalmars-d-learn wrote: > […] > Your problem possibly (probably?) stems from > > auto channelsData = TransmitterData(args[1]).scan(frontendId); > > The temporary TransmitterData(args[1]) is, well, temporary and > its destructor runs

Re: Understanding SIGSEGV issues

2019-01-05 Thread Nicholas Wilson via Digitalmars-d-learn
On Saturday, 5 January 2019 at 12:14:15 UTC, Russel Winder wrote: Indeed. I should do that to see if I can reproduce the problem to submit a proper bug report. File_Ptr is wrapping a dvb_file * from libdvbv5 to try and make things a bit for D and to ensure RAII. libdvbv5 is a C API with

Re: Understanding SIGSEGV issues

2019-01-05 Thread Russel Winder via Digitalmars-d-learn
On Sat, 2019-01-05 at 11:30 +, Nicholas Wilson via Digitalmars-d-learn wrote: > […] > Could you post a minimised example? Its a bit hard to guess > without one. Indeed. I should do that to see if I can reproduce the problem to submit a proper bug report. […] > From the name, File_Ptr

Re: Understanding SIGSEGV issues

2019-01-05 Thread Nicholas Wilson via Digitalmars-d-learn
On Saturday, 5 January 2019 at 10:52:48 UTC, Russel Winder wrote: I found the problem and then two minutes later read your email and bingo we have found the problem. Well done. Previously I had used File_Ptr* and on this occasion I was using File_Ptr and there was no copy constructor because

Re: Understanding SIGSEGV issues

2019-01-05 Thread Russel Winder via Digitalmars-d-learn
On Sat, 2019-01-05 at 10:52 +, Russel Winder wrote: > On Sat, 2019-01-05 at 10:31 +, Nicholas Wilson via Digitalmars-d-learn > wrote: > […] > > Maybe it is a problem with copying a File_Ptr (e.g. missing a > > increase of the reference count)? Like, `auto a = File_Ptr(); { > > auto b =

Re: Understanding SIGSEGV issues

2019-01-05 Thread Russel Winder via Digitalmars-d-learn
On Sat, 2019-01-05 at 10:31 +, Nicholas Wilson via Digitalmars-d-learn wrote: […] > > Maybe it is a problem with copying a File_Ptr (e.g. missing a > increase of the reference count)? Like, `auto a = File_Ptr(); { > auto b = a; }` and b calls the destructor on scope exit. > That would be

Re: Understanding SIGSEGV issues

2019-01-05 Thread Nicholas Wilson via Digitalmars-d-learn
On Saturday, 5 January 2019 at 07:34:17 UTC, Russel Winder wrote: TransmitterData has a destructor defined but with no code in it. This used to work fine – but I cannot be certain which version of LDC that was. The problem does seem to be in the construction of the TransmitterData object

Re: Understanding SIGSEGV issues

2019-01-04 Thread Russel Winder via Digitalmars-d-learn
On Thu, 2019-01-03 at 11:23 +, Nicholas Wilson via Digitalmars-d-learn wrote: > On Thursday, 3 January 2019 at 08:35:17 UTC, Russel Winder wrote: > > Sorry about that, fairly obvious that the backtrace is needed > > in hindsight. :- ) > > > > #0 __GI___libc_free (mem=0xa) at malloc.c:3093 >

Re: Understanding SIGSEGV issues

2019-01-03 Thread Nicholas Wilson via Digitalmars-d-learn
On Thursday, 3 January 2019 at 08:35:17 UTC, Russel Winder wrote: Sorry about that, fairly obvious that the backtrace is needed in hindsight. :- ) #0 __GI___libc_free (mem=0xa) at malloc.c:3093 #1 0x5558f174 in dvb_file_free (dvb_file=0x555a1320) at dvb_file.d:282 #2

Re: Understanding SIGSEGV issues

2019-01-03 Thread Russel Winder via Digitalmars-d-learn
On Thu, 2019-01-03 at 07:52 +, Nicholas Wilson via Digitalmars-d-learn wrote: > On Thursday, 3 January 2019 at 06:25:46 UTC, Russel Winder wrote: > > So I have a D program that used to work. I come back to it, > > recompile it, and: > > > > [...] > > __GI___libc_free (mem=0xa) at

Re: Understanding SIGSEGV issues

2019-01-02 Thread Nicholas Wilson via Digitalmars-d-learn
On Thursday, 3 January 2019 at 06:25:46 UTC, Russel Winder wrote: So I have a D program that used to work. I come back to it, recompile it, and: [...] __GI___libc_free (mem=0xa) at malloc.c:3093 You've tried to free a pointer that, while not null, was derived from a pointer that was,

Understanding SIGSEGV issues

2019-01-02 Thread Russel Winder via Digitalmars-d-learn
So I have a D program that used to work. I come back to it, recompile it, and: |> dub run -- ~/lib/DigitalTelevision/DVBv5/uk-CrystalPalace__RW Performing "debug" build using /usr/bin/ldc2 for x86_64. libdvbv5_d 0.1.1: target for configuration "library" is up to date. dvb-tune ~master: target

Re: Issues with undefined symbols when using Vibe on Windows

2018-07-04 Thread kinke via Digitalmars-d-learn
On Wednesday, 4 July 2018 at 20:36:55 UTC, Chris M. wrote: On Tuesday, 3 July 2018 at 18:35:43 UTC, kinke wrote: On Tuesday, 3 July 2018 at 17:54:08 UTC, Seb wrote: [...] AFAICT, the issue is that MinGW is used, as opposed to MinGW-w64 (a confusingly separate project unfortunately AFAIK).

Re: Issues with undefined symbols when using Vibe on Windows

2018-07-04 Thread Chris M. via Digitalmars-d-learn
On Tuesday, 3 July 2018 at 18:35:43 UTC, kinke wrote: On Tuesday, 3 July 2018 at 17:54:08 UTC, Seb wrote: [...] AFAICT, the issue is that MinGW is used, as opposed to MinGW-w64 (a confusingly separate project unfortunately AFAIK). There's no SetWindowLongPtr for Win32, it's #defined as

Re: Issues with undefined symbols when using Vibe on Windows

2018-07-03 Thread kinke via Digitalmars-d-learn
On Tuesday, 3 July 2018 at 17:54:08 UTC, Seb wrote: BTW in case someone has a bit of time to look at the MinGW headers. They are built as part of the `build-mingw-libs` branch at the installer repo: https://github.com/dlang/installer/blob/build-mingw-libs/windows/build_mingw.bat This is

Re: Issues with undefined symbols when using Vibe on Windows

2018-07-03 Thread rikki cattermole via Digitalmars-d-learn
On 04/07/2018 6:24 AM, Chris M. wrote: Looks like there's a user32.def file in the src package that does not have these two functions defined. Not too sure how this vcvars64.bat file builds the 64-bit libraries from this, but I think I'll have to open a ticket with the mingw devs to have them

Re: Issues with undefined symbols when using Vibe on Windows

2018-07-03 Thread Chris M. via Digitalmars-d-learn
On Tuesday, 3 July 2018 at 18:24:47 UTC, Chris M. wrote: On Tuesday, 3 July 2018 at 17:54:08 UTC, Seb wrote: [...] https://sourceforge.net/projects/mingw/files/MinGW/Base/w32api/w32api-5.0.2/ Looks like there's a user32.def file in the src package that does not have these two functions

Re: Issues with undefined symbols when using Vibe on Windows

2018-07-03 Thread Chris M. via Digitalmars-d-learn
On Tuesday, 3 July 2018 at 17:54:08 UTC, Seb wrote: On Tuesday, 3 July 2018 at 15:10:34 UTC, Chris M. wrote: On Tuesday, 3 July 2018 at 14:38:53 UTC, Mike Parker wrote: On Tuesday, 3 July 2018 at 13:32:21 UTC, Chris M. wrote: After hashing it out with some people on the Discord, I'm fairly

Re: Issues with undefined symbols when using Vibe on Windows

2018-07-03 Thread Seb via Digitalmars-d-learn
On Tuesday, 3 July 2018 at 15:10:34 UTC, Chris M. wrote: On Tuesday, 3 July 2018 at 14:38:53 UTC, Mike Parker wrote: On Tuesday, 3 July 2018 at 13:32:21 UTC, Chris M. wrote: After hashing it out with some people on the Discord, I'm fairly certain we narrowed it down to the 64-bit user32.lib

Re: Issues with undefined symbols when using Vibe on Windows

2018-07-03 Thread Chris M. via Digitalmars-d-learn
On Tuesday, 3 July 2018 at 14:38:53 UTC, Mike Parker wrote: On Tuesday, 3 July 2018 at 13:32:21 UTC, Chris M. wrote: After hashing it out with some people on the Discord, I'm fairly certain we narrowed it down to the 64-bit user32.lib from mingw missing these functions.

Re: Issues with undefined symbols when using Vibe on Windows

2018-07-03 Thread Mike Parker via Digitalmars-d-learn
On Tuesday, 3 July 2018 at 13:32:21 UTC, Chris M. wrote: After hashing it out with some people on the Discord, I'm fairly certain we narrowed it down to the 64-bit user32.lib from mingw missing these functions. https://issues.dlang.org/show_bug.cgi?id=19051 So are the mingw libs only

Re: Issues with undefined symbols when using Vibe on Windows

2018-07-03 Thread Chris M. via Digitalmars-d-learn
On Tuesday, 3 July 2018 at 05:36:12 UTC, Seb wrote: On Monday, 2 July 2018 at 23:00:08 UTC, Chris M. wrote: On Monday, 2 July 2018 at 21:20:26 UTC, Seb wrote: On Monday, 2 July 2018 at 19:24:38 UTC, Chris M. wrote: On Monday, 2 July 2018 at 18:48:16 UTC, Jonathan M Davis wrote: [...]

Re: Issues with undefined symbols when using Vibe on Windows

2018-07-02 Thread Seb via Digitalmars-d-learn
On Monday, 2 July 2018 at 23:00:08 UTC, Chris M. wrote: On Monday, 2 July 2018 at 21:20:26 UTC, Seb wrote: On Monday, 2 July 2018 at 19:24:38 UTC, Chris M. wrote: On Monday, 2 July 2018 at 18:48:16 UTC, Jonathan M Davis wrote: [...] Downloaded the DMD and DMC zip files, extracted and added

Re: Issues with undefined symbols when using Vibe on Windows

2018-07-02 Thread Mike Parker via Digitalmars-d-learn
On Monday, 2 July 2018 at 23:00:08 UTC, Chris M. wrote: On Monday, 2 July 2018 at 21:20:26 UTC, Seb wrote: I thought for 64-bit the bundled lld linker and mingw runtime are used? https://dlang.org/changelog/2.079.0.html#lld_mingw So in fact you shouldn't even need DMC? Ah, okay. I'm mostly

Re: Issues with undefined symbols when using Vibe on Windows

2018-07-02 Thread Chris M. via Digitalmars-d-learn
On Monday, 2 July 2018 at 21:20:26 UTC, Seb wrote: On Monday, 2 July 2018 at 19:24:38 UTC, Chris M. wrote: On Monday, 2 July 2018 at 18:48:16 UTC, Jonathan M Davis wrote: On Monday, July 02, 2018 18:26:27 Chris M. via Digitalmars-d-learn wrote: On Monday, 2 July 2018 at 17:33:20 UTC, Bauss

Re: Issues with undefined symbols when using Vibe on Windows

2018-07-02 Thread Jonathan M Davis via Digitalmars-d-learn
On Monday, July 02, 2018 21:20:26 Seb via Digitalmars-d-learn wrote: > On Monday, 2 July 2018 at 19:24:38 UTC, Chris M. wrote: > > On Monday, 2 July 2018 at 18:48:16 UTC, Jonathan M Davis wrote: > >> On Monday, July 02, 2018 18:26:27 Chris M. via > >> > >> Digitalmars-d-learn wrote: > >>> On

Re: Issues with undefined symbols when using Vibe on Windows

2018-07-02 Thread Seb via Digitalmars-d-learn
On Monday, 2 July 2018 at 19:24:38 UTC, Chris M. wrote: On Monday, 2 July 2018 at 18:48:16 UTC, Jonathan M Davis wrote: On Monday, July 02, 2018 18:26:27 Chris M. via Digitalmars-d-learn wrote: On Monday, 2 July 2018 at 17:33:20 UTC, Bauss wrote: > [...] Thanks for checking, I have no idea

  1   2   3   4   >