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: Vibe.d throw link error

2019-01-02 Thread Me via Digitalmars-d-learn
On Thursday, 3 January 2019 at 00:23:50 UTC, greatsam4sure wrote: On Wednesday, 2 January 2019 at 21:46:57 UTC, bauss wrote: Error: linker exit with status 1 Dmd failed with exit code 1 This is all the compiler emit Windows 10 --- got it VibeD project --- got it Error --- got it What

Re: Vibe.d throw link error

2019-01-02 Thread greatsam4sure via Digitalmars-d-learn
On Wednesday, 2 January 2019 at 21:46:57 UTC, bauss wrote: Error: linker exit with status 1 Dmd failed with exit code 1 This is all the compiler emit

Vibe.d throw link error

2019-01-02 Thread greatsam4sure via Digitalmars-d-learn
I am using windows 10. I could not run vibe project. It just give me the error: Error: linker exit with status 1 Dmd failed with exit code 1 I have use different dmd from 0.080 till 0.083. The same error. What is the possible cause and solution to this error?

Re: Two questions

2019-01-02 Thread IM via Digitalmars-d-learn
On Wednesday, 2 January 2019 at 17:49:52 UTC, H. S. Teoh wrote: On Wed, Jan 02, 2019 at 05:38:41PM +, IM via Digitalmars-d-learn wrote: 1- How do I do in D the equivalent of the following C++ macro? #define OUT_VAL(val) (count << #val << " = " << val << endl) In particular the #val above

Re: Two questions

2019-01-02 Thread IM via Digitalmars-d-learn
On Wednesday, 2 January 2019 at 21:56:03 UTC, Steven Schveighoffer wrote: On 1/2/19 12:38 PM, IM wrote: [...] With those ... I have to guess. There are 2 possibilities. Possibility 1: there is a method named 'doSomeWork' which takes at least one parameter. This overrides the UFCS function

Re: Two questions

2019-01-02 Thread Steven Schveighoffer via Digitalmars-d-learn
On 1/2/19 12:38 PM, IM wrote: 2- Yesterday I was experimenting with something and I wrote something like the following: struct MyType {   ... } void doSomeWork(ref MyType o) {    ... } auto t = MyType(...); t.doSomeWork(); // <-- failed to compile. Why did the above UFCS call fail to

Re: Vibe.d throw link error

2019-01-02 Thread bauss via Digitalmars-d-learn
On Wednesday, 2 January 2019 at 20:52:26 UTC, greatsam4sure wrote: I am using windows 10. I could not run vibe project. It just give me the error: Error: linker exit with status 1 Dmd failed with exit code 1 I have use different dmd from 0.080 till 0.083. The same error. What is the

Vibe.d throw link error

2019-01-02 Thread greatsam4sure via Digitalmars-d-learn
I am using windows 10. I could not run vibe project. It just give me the error: Error: linker exit with status 1 Dmd failed with exit code 1 I have use different dmd from 0.080 till 0.083. The same error. What is the possible cause and solution to this error?

Two questions

2019-01-02 Thread IM via Digitalmars-d-learn
1- How do I do in D the equivalent of the following C++ macro? #define OUT_VAL(val) (count << #val << " = " << val << endl) In particular the #val above to the actual macro argument as a string? 2- Yesterday I was experimenting with something and I wrote something like the following:

Re: Weird combo of static function, templates, interfaces (that doesn't link)

2019-01-02 Thread 0xEAB via Digitalmars-d-learn
On Sunday, 30 December 2018 at 18:55:10 UTC, Ali Çehreli wrote: On 12/30/2018 05:05 AM, 0xEAB wrote: >> interface FooAdapter >> { >> FooBundle!(Handle) createSome(Handle)(); >> } Function templates cannot be virtual functions. One reason is the compiler cannot know how large the virtual

Re: D-oriented Syntax Highlighting Plugin for WordPress?

2019-01-02 Thread Ron Tarrant via Digitalmars-d-learn
On Wednesday, 2 January 2019 at 02:09:11 UTC, Mike Parker wrote: It supports D out of the box. Thanks, Mike. Once I downloaded it and dug around, I found the list of supported languages. Odd they don't list these on the about page or wherever.

Re: Low order hashes

2019-01-02 Thread Steven Schveighoffer via Digitalmars-d-learn
On 1/1/19 2:40 PM, Michelle Long wrote: I need to hash a few strings to a byte, short, or int. hashOf works for int only on x86. What would be a nice way to accomplish this? Collisions are not good but not catastrophic. Mainly I need a unique ID to emulate enums. I might just chop off the