Jump to page: 1 25  
Page
Thread overview
OpenBSD port of dmd?
Mar 16, 2012
Martin Nowak
Mar 16, 2012
Nick Sabalausky
Mar 16, 2012
Jonathan M Davis
Mar 16, 2012
Walter Bright
Mar 16, 2012
Walter Bright
Mar 16, 2012
Walter Bright
Mar 17, 2012
Daniel Murphy
Mar 17, 2012
Daniel Murphy
Mar 17, 2012
Daniel Murphy
Mar 17, 2012
Nick Sabalausky
Mar 17, 2012
Vladimir Panteleev
Mar 18, 2012
Peter Alexander
Mar 18, 2012
Tove
Mar 18, 2012
Walter Bright
Mar 17, 2012
Daniel Murphy
Mar 17, 2012
Walter Bright
Mar 17, 2012
Alix Pexton
Mar 17, 2012
Sean Kelly
Mar 17, 2012
Sean Kelly
Mar 18, 2012
Alix Pexton
Mar 18, 2012
Sean Kelly
Mar 18, 2012
Walter Bright
Mar 18, 2012
Bernard Helyer
Mar 18, 2012
Sean Kelly
Mar 18, 2012
Bernard Helyer
Mar 18, 2012
Sean Kelly
Mar 17, 2012
Walter Bright
Mar 18, 2012
Peter Alexander
Mar 17, 2012
Martin Nowak
Mar 16, 2012
Paulo Pinto
Mar 16, 2012
Walter Bright
Mar 16, 2012
Johannes Pfau
Mar 16, 2012
Sean Kelly
Mar 17, 2012
Johannes Pfau
Mar 17, 2012
Sean Kelly
Mar 17, 2012
Johannes Pfau
Mar 17, 2012
Martin Nowak
March 16, 2012
Just found this, has anyone tried dmd or friends on OpenBSD?

http://stackoverflow.com/questions/9698581/programming-in-d-for-openbsd


Thanks,

Andrei

March 16, 2012
On Fri, 16 Mar 2012 15:53:45 +0100, Andrei Alexandrescu <SeeWebsiteForEmail@erdani.org> wrote:

> Just found this, has anyone tried dmd or friends on OpenBSD?
>
> http://stackoverflow.com/questions/9698581/programming-in-d-for-openbsd
>
OpenBSD would need some druntime work.
March 16, 2012
Am 16.03.2012 15:53, schrieb Andrei Alexandrescu:
> Just found this, has anyone tried dmd or friends on OpenBSD?
>
> http://stackoverflow.com/questions/9698581/programming-in-d-for-openbsd
>
>
> Thanks,
>
> Andrei
>


It is a bit off-topic, but I have started to look at a possible port to Minix 3.2.0, which now has NetBSD userland.

But currently I am only playing around with the dmd source code.

--
Paulo


March 16, 2012
On 3/16/2012 7:53 AM, Andrei Alexandrescu wrote:
> Just found this, has anyone tried dmd or friends on OpenBSD?
>
> http://stackoverflow.com/questions/9698581/programming-in-d-for-openbsd

There was a start on an OpenBSD port, but it hasn't progressed very far. It shouldn't be hard - if someone wants to pick up the flag on this and run with it, I'd be happy to fold in the changes.
March 16, 2012
"Martin Nowak" <dawg@dawgfoto.de> wrote in message news:op.wa9r9izqsqugbd@localhost...
> On Fri, 16 Mar 2012 15:53:45 +0100, Andrei Alexandrescu <SeeWebsiteForEmail@erdani.org> wrote:
>
>> Just found this, has anyone tried dmd or friends on OpenBSD?
>>
>> http://stackoverflow.com/questions/9698581/programming-in-d-for-openbsd
>>
> OpenBSD would need some druntime work.

Do you have anything in particular in mind?


March 16, 2012
On Friday, March 16, 2012 16:00:47 Nick Sabalausky wrote:
> "Martin Nowak" <dawg@dawgfoto.de> wrote in message news:op.wa9r9izqsqugbd@localhost...
> 
> > On Fri, 16 Mar 2012 15:53:45 +0100, Andrei Alexandrescu
> > 
> > <SeeWebsiteForEmail@erdani.org> wrote:
> >> Just found this, has anyone tried dmd or friends on OpenBSD?
> >> 
> >> http://stackoverflow.com/questions/9698581/programming-in-d-for-openbsd
> > 
> > OpenBSD would need some druntime work.
> 
> Do you have anything in particular in mind?

Probably everything that's not straight Posix would require changes. For instance, every place that has a version(FreeBSD) block would probably need a version(OpenBSD) block. It's probably not all that hard to make the changes, but they'd still need to be done.

The very fact that Walter pushes for the model of

version(A) {}
else version(B) {}
else static assert("Unsupported OS");

means that _any_ new OS requires druntime work, even if it's minimal. That's not necessarily a bad thing, since there's a definite chance that the new OS requires additional changes specific to it anyway, but as long as there is sections of druntime are OS-specific without generic versions provided (which isn't going to change), you can't just use druntime with a new OS without updating druntime.

- Jonathan M Davis
March 16, 2012
Am Fri, 16 Mar 2012 12:08:01 -0700
schrieb Walter Bright <newshound2@digitalmars.com>:

> On 3/16/2012 7:53 AM, Andrei Alexandrescu wrote:
> > Just found this, has anyone tried dmd or friends on OpenBSD?
> >
> > http://stackoverflow.com/questions/9698581/programming-in-d-for-openbsd
> 
> There was a start on an OpenBSD port, but it hasn't progressed very far. It shouldn't be hard - if someone wants to pick up the flag on this and run with it, I'd be happy to fold in the changes.

AFAICS OpenBSD doesn't support TLS (the __thread tls, posix pthread_getspecific works of course). Can D work at all without TLS support?

(We have a similar problem with Android, I know for sure TLS isn't
supported there.)
March 16, 2012
On Mar 16, 2012, at 2:19 PM, Johannes Pfau wrote:

> Am Fri, 16 Mar 2012 12:08:01 -0700
> schrieb Walter Bright <newshound2@digitalmars.com>:
> 
>> On 3/16/2012 7:53 AM, Andrei Alexandrescu wrote:
>>> Just found this, has anyone tried dmd or friends on OpenBSD?
>>> 
>>> http://stackoverflow.com/questions/9698581/programming-in-d-for-openbsd
>> 
>> There was a start on an OpenBSD port, but it hasn't progressed very far. It shouldn't be hard - if someone wants to pick up the flag on this and run with it, I'd be happy to fold in the changes.
> 
> AFAICS OpenBSD doesn't support TLS (the __thread tls, posix pthread_getspecific works of course). Can D work at all without TLS support?
> 
> (We have a similar problem with Android, I know for sure TLS isn't
> supported there.)

OSX pre-Lion doesn't support __thread either, so DMD rolls its own there.  The same functionality could probably be used for OpenBSD.

March 16, 2012
On 3/16/2012 1:38 PM, Jonathan M Davis wrote:
> That's not necessarily a bad thing,

It's very deliberate, and it's *certainly* not a bad thing. No ifs, ands, or buts about it.

Supporting a new OS by assuming that declarations for some other random OS will work is a recipe for unending frustration and disaster. For example, suppose there is a subtle difference in the layout of the FILE* struct. OOPS!

The way the versioning is done it:

1. forces the porter to check that stuff.

2. exposes all the places in the library where there is OS dependent code

There should never, EVER, in the library code be something like:

  version (FreeBSD)
    ... do something weird with FreeBSD ...
  else
    ... do the default ...

If you find any code like this in the library, please file a bugzilla entry for it.

Instead:

  version (FreeBSD)
    ... do something weird with FreeBSD ...
  else
    static assert(0, "OS not supported");


March 16, 2012
On 3/16/12 5:27 PM, Walter Bright wrote:
> There should never, EVER, in the library code be something like:
>
> version (FreeBSD)
> ... do something weird with FreeBSD ...
> else
> ... do the default ...
>
> If you find any code like this in the library, please file a bugzilla
> entry for it.
>
> Instead:
>
> version (FreeBSD)
> ... do something weird with FreeBSD ...
> else
> static assert(0, "OS not supported");

Never say never. There are I/O routines that are specialized for several OSs and fall back to a generic (slower) implementation.

Andrei

« First   ‹ Prev
1 2 3 4 5