March 25, 2012
On Mar 25, 2012 7:34 PM, "Jonathan M Davis" <jmdavisProg@gmx.com> wrote:
>
> On Monday, March 26, 2012 09:55:00 James Miller wrote:
> > On 26 March 2012 09:44, Iain Buclaw <ibuclaw@ubuntu.com> wrote:
> > > A spork of druntime, yes.
> >
> > A spork? I've never heard that before...
>
> http://en.wikipedia.org/wiki/Spork
>
> Not that it has anything to do with software...
>
> - Jonathan M Davis

I like it.  Not separated just a set of patches.


March 26, 2012
On 2012-03-25 15:04:34 +0000, Jacob Carlborg <doob@me.com> said:

> A third option for Objective-C would be to use a fork of DMD that makes it possible to directly interface with Objective-C, just as it's possible with C. I'm not sure of the status of this project but an alpha has been released.

It is not up to date with the latest DMD versions. The project is on hold as I'm working on other things. But it can compile code if you target the Apple's 32-bit Legacy Objective-C runtime.

-- 
Michel Fortin
michel.fortin@michelf.com
http://michelf.com/

March 26, 2012
I am using D for cross platform development. I recently implemented C wrappers for D. It works fine (Mac OS X). I could also create a Python module that consists of both D and C code (the C code is really just the wrapper for the module's functionality that is completely in D). It also works with Lua.

I think the decision to make C logic part of the language was a very very good idea. The dream of every cross platform developer.
March 28, 2012
On Sunday, 25 March 2012 at 16:20:51 UTC, Alex Rønne Petersen wrote:
>
> About ARM support: That's not strictly true. D on ARM should work fine at this point in time if you build druntime/phobos in GDC with -fno-section-anchors (there is even some experimental Android support). But indeed, no iOS support.
>

I'm still new at low level programming topics like ABI's etc, so I'll betray my ignorance. Is the druntime only required for providing an interface between the executable and OS resources like IO, or is it inseparable from the language? For example, if I wrote the shell of an iOS app in Obj-C that handled the interface with the phone software/hardware, could the remaining core be written using D? Or is the language capabilities like GC, slicing, mixins, etc. intimately tied to the runtime or phobes?
March 28, 2012
On Monday, 26 March 2012 at 10:46:39 UTC, Chris W. wrote:
> I am using D for cross platform development. I recently implemented C wrappers for D. It works fine (Mac OS X). I could also create a Python module that consists of both D and C code (the C code is really just the wrapper for the module's functionality that is completely in D). It also works with Lua.
>
> I think the decision to make C logic part of the language was a very very good idea. The dream of every cross platform developer.

Great to hear someone with experience with it. Was there any issues with the code that had to be tweaked depending on the OS? When I was looking at C++, there was implementation defined data type sizes, endieness, implementation defined order of variables in a struct, etc. On that topic, what do I have to consider in D if I want binary compatibility in files saved on different OS's?
March 28, 2012
On 28 March 2012 16:31, Bennie Copeland <mugen.kanosei@gmail.com> wrote:
> On Monday, 26 March 2012 at 10:46:39 UTC, Chris W. wrote:
>>
>> I am using D for cross platform development. I recently implemented C wrappers for D. It works fine (Mac OS X). I could also create a Python module that consists of both D and C code (the C code is really just the wrapper for the module's functionality that is completely in D). It also works with Lua.
>>
>> I think the decision to make C logic part of the language was a very very good idea. The dream of every cross platform developer.
>
>
> Great to hear someone with experience with it. Was there any issues with the code that had to be tweaked depending on the OS? When I was looking at C++, there was implementation defined data type sizes, endieness, implementation defined order of variables in a struct, etc. On that topic, what do I have to consider in D if I want binary compatibility in files saved on different OS's?

Binary compatibility by measure of thumb is no different to binary compatibility in C or C++ when moving executables across different versions of the same platform.


-- 
Iain Buclaw

*(p < e ? p++ : p) = (c & 0x0f) + '0';
March 28, 2012
On 2012-03-28 17:23, Bennie Copeland wrote:

> I'm still new at low level programming topics like ABI's etc, so I'll
> betray my ignorance. Is the druntime only required for providing an
> interface between the executable and OS resources like IO, or is it
> inseparable from the language? For example, if I wrote the shell of an
> iOS app in Obj-C that handled the interface with the phone
> software/hardware, could the remaining core be written using D? Or is
> the language capabilities like GC, slicing, mixins, etc. intimately tied
> to the runtime or phobes?

Druntime is basically inseparable from the language. Among other things it contains the GC, it's used for handling arrays (appending, concatenation, slicing, switch statements and so on), threads, thread local storage (TLS) and a lot of other stuff I can't remember right now.

But I don't see that stopping anyone for writing parts of an app using Objective-C and the other parts using D.

-- 
/Jacob Carlborg
March 28, 2012
"Bennie Copeland" <mugen.kanosei@gmail.com> wrote in message news:mizfgcnxjpbfbclcsmwo@forum.dlang.org...
> On Sunday, 25 March 2012 at 16:20:51 UTC, Alex Rønne Petersen wrote:
>>
>> About ARM support: That's not strictly true. D on ARM should work fine at this point in time if you build druntime/phobos in GDC with -fno-section-anchors (there is even some experimental Android support). But indeed, no iOS support.
>>
>
> I'm still new at low level programming topics like ABI's etc, so I'll betray my ignorance. Is the druntime only required for providing an interface between the executable and OS resources like IO, or is it inseparable from the language? For example, if I wrote the shell of an iOS app in Obj-C that handled the interface with the phone software/hardware, could the remaining core be written using D? Or is the language capabilities like GC, slicing, mixins, etc. intimately tied to the runtime or phobes?

Some basic things are tied into druntme/phobos. The GC is definitely one of them. AIUI, Arrays and AAs have been moving to a druntime-based implementation, and the Object class is implemented there.

Technically, you can use D without druntime/phobos. Hell, druntime itself is implemented in D. And I've even done it myself ages ago ( https://www.semitwist.com/articles/article/view/d-on-gba-nds-progress-thanks-to-oopman ) . But you'd be limited to a relatively small C-like subset of the langauge (which I'd argue *can* still be worthwhile in cases where C is your only other option - like low-power embedded stuff).


March 28, 2012
"Iain Buclaw" <ibuclaw@ubuntu.com> wrote in message news:mailman.1198.1332955673.4860.digitalmars-d@puremagic.com...
> On 28 March 2012 16:31, Bennie Copeland <mugen.kanosei@gmail.com> wrote:
>> On Monday, 26 March 2012 at 10:46:39 UTC, Chris W. wrote:
>>>
>>> I am using D for cross platform development. I recently implemented C wrappers for D. It works fine (Mac OS X). I could also create a Python module that consists of both D and C code (the C code is really just the wrapper for the module's functionality that is completely in D). It also works with Lua.
>>>
>>> I think the decision to make C logic part of the language was a very
>>> very
>>> good idea. The dream of every cross platform developer.
>>
>>
>> Great to hear someone with experience with it. Was there any issues with
>> the
>> code that had to be tweaked depending on the OS? When I was looking at
>> C++,
>> there was implementation defined data type sizes, endieness,
>> implementation
>> defined order of variables in a struct, etc. On that topic, what do I
>> have
>> to consider in D if I want binary compatibility in files saved on
>> different
>> OS's?
>
> Binary compatibility by measure of thumb is no different to binary compatibility in C or C++ when moving executables across different versions of the same platform.
>

D makes it a little easier though with things like "int"/"long"/etc being the same size on all platforms, and "align" for structs. And just generally having less "undefined/implementation-defined" cruft.


March 28, 2012
On Wed, Mar 28, 2012 at 03:13:01PM -0400, Nick Sabalausky wrote: [...]
> Some basic things are tied into druntme/phobos. The GC is definitely one of them. AIUI, Arrays and AAs have been moving to a druntime-based implementation, and the Object class is implemented there.
> 
> Technically, you can use D without druntime/phobos. Hell, druntime
> itself is implemented in D. And I've even done it myself ages ago (
> https://www.semitwist.com/articles/article/view/d-on-gba-nds-progress-thanks-to-oopman
> ) . But you'd be limited to a relatively small C-like subset of the
> langauge (which I'd argue *can* still be worthwhile in cases where C
> is your only other option - like low-power embedded stuff).
[...]

I've been toying with the idea of an AA implementation that doesn't' need the GC... Basically translate it to work with explicit malloc/free instead of the GC. But currently I'm already maxed out fixing my AA replacement for druntime, so I don't think I'll get to that in the near future.

(It's true that they say about the last 10% of a project needing 90% of
the time... I *thought* my AA implementation was close to being ready to
integrate into druntime, but that last 10% is turning into a huge
project in and of itself. (Several compiler bugs later. ;-) (Hey, at
least I'm helping to weed out dmd bugs! (Gah, I'm starting to Lisp,
better stop now!))))


T

-- 
PNP = Plug 'N' Pray