Re: DMD now does Dwarf style exception handling!

2016-01-05 Thread Jonathan M Davis via Digitalmars-d
On Tuesday, 5 January 2016 at 01:39:51 UTC, Temtaime wrote: On Sunday, 3 January 2016 at 02:05:38 UTC, Walter Bright wrote: On 1/2/2016 4:17 PM, Jack Stouffer wrote: What is involved in catching C++ exceptions? Was this the hard part of the whole thing? DMD doesn't catch them yet. But C++

Re: DMD now does Dwarf style exception handling!

2016-01-05 Thread Iain Buclaw via Digitalmars-d
On 3 Jan 2016 1:20 am, "Jack Stouffer via Digitalmars-d" < digitalmars-d@puremagic.com> wrote: > > On Saturday, 2 January 2016 at 21:16:38 UTC, Walter Bright wrote: >> >> What I've been working on for the last month or so. >> >> https://github.com/D-Programming-Language/dmd/pull/5324 >> >> For

Re: DMD now does Dwarf style exception handling!

2016-01-05 Thread wobbles via Digitalmars-d
On Tuesday, 5 January 2016 at 01:39:51 UTC, Temtaime wrote: On Sunday, 3 January 2016 at 02:05:38 UTC, Walter Bright wrote: On 1/2/2016 4:17 PM, Jack Stouffer wrote: What is involved in catching C++ exceptions? Was this the hard part of the whole thing? DMD doesn't catch them yet. But C++

Re: DMD now does Dwarf style exception handling!

2016-01-05 Thread Jacob Carlborg via Digitalmars-d
On 2016-01-05 12:21, Ola Fosheim Grøstad wrote: 2. Modern performant C++ libraries use templating through and through... D has not strategy for interfacing with these. How are you going to solve that with D? D's C++ support will be obsolete before it is finished. D can already interface with

Re: DMD now does Dwarf style exception handling!

2016-01-05 Thread Ola Fosheim Grøstad via Digitalmars-d
On Tuesday, 5 January 2016 at 13:45:53 UTC, Jacob Carlborg wrote: On 2016-01-05 14:30, Ola Fosheim Grøstad wrote: I assume I can use it for interfacing indirectly with Swift on Linux as well?? It's not possible to interface Swift and C++ directly. One needs to go though Objective-C++.

Re: DMD now does Dwarf style exception handling!

2016-01-05 Thread watcher via Digitalmars-d
On Tuesday, 5 January 2016 at 01:39:51 UTC, Temtaime wrote: On Sunday, 3 January 2016 at 02:05:38 UTC, Walter Bright wrote: On 1/2/2016 4:17 PM, Jack Stouffer wrote: What is involved in catching C++ exceptions? Was this the hard part of the whole thing? DMD doesn't catch them yet. But C++

Re: DMD now does Dwarf style exception handling!

2016-01-05 Thread Jacob Carlborg via Digitalmars-d
On 2016-01-05 14:30, Ola Fosheim Grøstad wrote: I assume I can use it for interfacing indirectly with Swift on Linux as well?? It's not possible to interface Swift and C++ directly. One needs to go though Objective-C++. There's a tool that can automatically generate bindings [1]. I have no

Re: DMD now does Dwarf style exception handling!

2016-01-05 Thread Jacob Carlborg via Digitalmars-d
On 2016-01-05 14:49, Ola Fosheim Grøstad wrote: Yes, which is why I wrote "indirectly". ;-) Ah, I missed that. But does it work for Swift on Linux? Is Objective-C++ and Swift compatible on Linux yet? Hmm. From this blog post [1]: "Swift on Linux does not depend on the Objective-C runtime

Re: DMD now does Dwarf style exception handling!

2016-01-05 Thread Walter Bright via Digitalmars-d
On 1/5/2016 3:21 AM, Ola Fosheim Grøstad wrote: Nope. Objective-C++ has full C++ support. It's the other way around. O-C++ is a C++ compiler that supports O-C extensions. This is amply illustrated by Swift's total lack of C++ interoperability.

Re: DMD now does Dwarf style exception handling!

2016-01-05 Thread Walter Bright via Digitalmars-d
On 1/5/2016 1:17 AM, Iain Buclaw via Digitalmars-d wrote: Catching from any foreign language that interacts with the same EH interface should be easy. Just bear in mind that each language may put the thrown object proper in a different place. Doing unwinding in D frames when foreign

Re: DMD now does Dwarf style exception handling!

2016-01-05 Thread Walter Bright via Digitalmars-d
On 1/5/2016 12:18 AM, Jonathan M Davis wrote: So, yes. This work is valuable. Whether it's the best use of Walter's time out of all of the things he could be doing for D, I don't know, and that's a highly subjective debate. But I don't think that there's any question that this work is of real

Re: DMD now does Dwarf style exception handling!

2016-01-05 Thread Ola Fosheim Grøstad via Digitalmars-d
On Tuesday, 5 January 2016 at 12:51:11 UTC, welkam wrote: Nope. Objective-C++ has full C++ support. first time hearing about it You can just rename an Objective-C or C++ file to ".mm" and you get an Objetive-C++ file. So if I have some files in Objective-C where I need interop with C++ I

Re: DMD now does Dwarf style exception handling!

2016-01-05 Thread Jason Jeffory via Digitalmars-d
On Tuesday, 5 January 2016 at 01:39:51 UTC, Temtaime wrote: On Sunday, 3 January 2016 at 02:05:38 UTC, Walter Bright wrote: On 1/2/2016 4:17 PM, Jack Stouffer wrote: What is involved in catching C++ exceptions? Was this the hard part of the whole thing? DMD doesn't catch them yet. But C++

Re: DMD now does Dwarf style exception handling!

2016-01-05 Thread Walter Bright via Digitalmars-d
On 1/5/2016 10:45 AM, Ola Fosheim Grøstad wrote: Calling the C function "void takesAnObject(void *theObject);" from Swift: Interfacing with C doesn't mean jack when someone needs to interface with C++. D interfaced seamlessly with C from day 1.

Re: DMD now does Dwarf style exception handling!

2016-01-05 Thread Ola Fosheim Grøstad via Digitalmars-d
On Tuesday, 5 January 2016 at 16:10:38 UTC, Walter Bright wrote: On 1/5/2016 3:21 AM, Ola Fosheim Grøstad wrote: Nope. Objective-C++ has full C++ support. It's the other way around. O-C++ is a C++ compiler that supports O-C extensions. The difference is marginal. C++ on clang support C99

Re: DMD now does Dwarf style exception handling!

2016-01-05 Thread Ola Fosheim Grøstad via Digitalmars-d
An example from http://www.sitepoint.com/using-legacy-c-apis-swift/: Calling the C function "void takesAnObject(void *theObject);" from Swift: var test = 42 withUnsafePointer(, { (ptr: UnsafePointer) -> Void in var voidPtr: UnsafePointer = unsafeBitCast(ptr, UnsafePointer.self)

Re: DMD now does Dwarf style exception handling!

2016-01-05 Thread Ola Fosheim Grøstad via Digitalmars-d
On Tuesday, 5 January 2016 at 18:52:38 UTC, Walter Bright wrote: Interfacing with C doesn't mean jack when someone needs to interface with C++. D interfaced seamlessly with C from day 1. Yes, but if you want ARC or high performance GC you have to pay a price when crossing boundaries.

Re: DMD now does Dwarf style exception handling!

2016-01-05 Thread Ola Fosheim Grøstad via Digitalmars-d
On Tuesday, 5 January 2016 at 15:40:40 UTC, Jacob Carlborg wrote: "Swift on Linux does not depend on the Objective-C runtime nor includes it" I'm guessing that Swift is compatible with Apple's Objective-C runtime, which is not the same as the GNUStep Objective-C runtime. Thanks, that makes

Re: DMD now does Dwarf style exception handling!

2016-01-05 Thread Iain Buclaw via Digitalmars-d
On 5 January 2016 at 17:24, Walter Bright via Digitalmars-d < digitalmars-d@puremagic.com> wrote: > On 1/5/2016 1:17 AM, Iain Buclaw via Digitalmars-d wrote: > >> Catching from any foreign language that interacts with the same EH >> interface >> should be easy. Just bear in mind that each

Re: DMD now does Dwarf style exception handling!

2016-01-05 Thread welkam via Digitalmars-d
People who pay 0$ should not dictate what Walther should be doing. I guess D will have best interoperability with c++ out of all languages.

Re: DMD now does Dwarf style exception handling!

2016-01-05 Thread Ola Fosheim Grøstad via Digitalmars-d
On Tuesday, 5 January 2016 at 11:13:30 UTC, welkam wrote: People who pay 0$ should not dictate what Walther should be doing. I agree. What should be questioned is the viability of the strategy. 1. The core of game engine libraries don't use exceptions... So the exception handling focus is

Re: DMD now does Dwarf style exception handling!

2016-01-05 Thread Jacob Carlborg via Digitalmars-d
On 2016-01-05 17:24, Walter Bright wrote: Doing unwinding in D frames when foreign exceptions are in-flight is easy, because no knowledge of those FEs is required. Catching them, however, requires detailed knowledge of exactly how they work. This is not so easy. Catching C++ exceptions in D

Re: DMD now does Dwarf style exception handling!

2016-01-05 Thread Walter Bright via Digitalmars-d
On 1/5/2016 10:57 AM, Ola Fosheim Grøstad wrote: CoreFoundation provides easy bridging with Objective-C/Swift. CF is an interface to C, not C++, and it uses wrappers and such, not direct APIs. It also has COM-like support - D also supported COM since Day 1. That isn't remotely good enough

Re: DMD now does Dwarf style exception handling!

2016-01-05 Thread Ola Fosheim Grøstad via Digitalmars-d
On Tuesday, 5 January 2016 at 21:33:07 UTC, Walter Bright wrote: On 1/5/2016 10:57 AM, Ola Fosheim Grøstad wrote: CoreFoundation provides easy bridging with Objective-C/Swift. CF is an interface to C, not C++, and it uses wrappers and such, not direct APIs. It also has COM-like support - D

Re: DMD now does Dwarf style exception handling!

2016-01-05 Thread Walter Bright via Digitalmars-d
On 1/5/2016 1:48 PM, Ola Fosheim Grøstad wrote: I think I wasn't clear in what I wrote. At the moment I'm only interested in directly interfacing D to C++, not C (which D already does very well) or ARC (a totally different subject).

Re: DMD now does Dwarf style exception handling!

2016-01-05 Thread Ola Fosheim Grøstad via Digitalmars-d
On Wednesday, 6 January 2016 at 00:08:35 UTC, Walter Bright wrote: On 1/5/2016 1:48 PM, Ola Fosheim Grøstad wrote: I think I wasn't clear in what I wrote. At the moment I'm only interested in directly interfacing D to C++, not C (which D already does very well) or ARC (a totally different

Re: DMD now does Dwarf style exception handling!

2016-01-05 Thread welkam via Digitalmars-d
On Tuesday, 5 January 2016 at 11:21:48 UTC, Ola Fosheim Grøstad wrote: 1. The core of game engine libraries don't use exceptions... So the exception handling focus is misguided. 2. Modern performant C++ libraries use templating through and through... D has not strategy for interfacing with

Re: DMD now does Dwarf style exception handling!

2016-01-04 Thread Dan Olson via Digitalmars-d
Walter Bright writes: > What I've been working on for the last month or so. > > https://github.com/D-Programming-Language/dmd/pull/5324 > > For Linux 64 anyway. Anyone who wants to do PRs to extend it to Linux > 32, OSX and FreeBSD, feel free! Unfortunately, this is

Re: DMD now does Dwarf style exception handling!

2016-01-04 Thread Temtaime via Digitalmars-d
On Sunday, 3 January 2016 at 02:05:38 UTC, Walter Bright wrote: On 1/2/2016 4:17 PM, Jack Stouffer wrote: What is involved in catching C++ exceptions? Was this the hard part of the whole thing? DMD doesn't catch them yet. But C++ on Linux throws them in Dwarf format, so supporting that is

Re: DMD now does Dwarf style exception handling!

2016-01-04 Thread Ilya via Digitalmars-d
On Saturday, 2 January 2016 at 21:16:38 UTC, Walter Bright wrote: What I've been working on for the last month or so. https://github.com/D-Programming-Language/dmd/pull/5324 For Linux 64 anyway. Anyone who wants to do PRs to extend it to Linux 32, OSX and FreeBSD, feel free! Unfortunately,

Re: DMD now does Dwarf style exception handling!

2016-01-04 Thread Walter Bright via Digitalmars-d
On 1/4/2016 4:18 PM, Dan Olson wrote: Very cool. Is it conceivable that DMD, GDC, and LDC might one day share common support code in druntime (personality, etc)? Could be many benefits like a larger test population. Probably not the personality routine, though that won't matter.

DMD now does Dwarf style exception handling!

2016-01-02 Thread Walter Bright via Digitalmars-d
What I've been working on for the last month or so. https://github.com/D-Programming-Language/dmd/pull/5324 For Linux 64 anyway. Anyone who wants to do PRs to extend it to Linux 32, OSX and FreeBSD, feel free! Unfortunately, this is of no help with Win64, which uses its own unique system. DMD

Re: DMD now does Dwarf style exception handling!

2016-01-02 Thread Walter Bright via Digitalmars-d
On 1/2/2016 5:51 PM, Jonathan M Davis wrote: So, we have ELF binaries and DWARF exceptions. Are we going to get something related to orcs or goblins next? ;) Naw, but I am secretly working on the Eye of Sauron.

Re: DMD now does Dwarf style exception handling!

2016-01-02 Thread Jack Stouffer via Digitalmars-d
On Saturday, 2 January 2016 at 21:16:38 UTC, Walter Bright wrote: What I've been working on for the last month or so. https://github.com/D-Programming-Language/dmd/pull/5324 For Linux 64 anyway. Anyone who wants to do PRs to extend it to Linux 32, OSX and FreeBSD, feel free! Unfortunately,

Re: DMD now does Dwarf style exception handling!

2016-01-02 Thread Jonathan M Davis via Digitalmars-d
So, we have ELF binaries and DWARF exceptions. Are we going to get something related to orcs or goblins next? ;) - Jonathan M Davis

Re: DMD now does Dwarf style exception handling!

2016-01-02 Thread Jonathan M Davis via Digitalmars-d
On Sunday, 3 January 2016 at 02:04:40 UTC, Walter Bright wrote: On 1/2/2016 5:51 PM, Jonathan M Davis wrote: So, we have ELF binaries and DWARF exceptions. Are we going to get something related to orcs or goblins next? ;) Naw, but I am secretly working on the Eye of Sauron. LOL. And

Re: DMD now does Dwarf style exception handling!

2016-01-02 Thread Walter Bright via Digitalmars-d
On 1/2/2016 4:17 PM, Jack Stouffer wrote: What is involved in catching C++ exceptions? Was this the hard part of the whole thing? DMD doesn't catch them yet. But C++ on Linux throws them in Dwarf format, so supporting that is the first step.

Re: DMD now does Dwarf style exception handling!

2016-01-02 Thread blm768 via Digitalmars-d
On Sunday, 3 January 2016 at 01:51:35 UTC, Jonathan M Davis wrote: So, we have ELF binaries and DWARF exceptions. Are we going to get something related to orcs or goblins next? ;) - Jonathan M Davis I don't know about that, but with better C++ interop, it might be easier to bind to OGRE.