May 23, 2013
On 23 May 2013 15:54, Brad Anderson <eco@gnuk.net> wrote:

> On Thursday, 23 May 2013 at 03:56:00 UTC, Nick Sabalausky wrote:
>
>> On Thu, 23 May 2013 02:08:15 +0200
>> "Brad Anderson" <eco@gnuk.net> wrote:
>>
>>> and one of the games featured prominently was Quantum Break by Manu's
>>> very own Remedy Games.  Any chance the system you described in your talk is
>>> being used for Quantum Break, Manu?  XBox One is x86 and I can't think of a
>>> reason you couldn't be using dmd on it.
>>>
>>
>> That would certainly be interesting to hear. Although unless they've secretly had two AAA games in development, I imagine we can make a pretty safe guess.
>>
>
> Looking at their release history it doesn't look like they work on
> multiple titles at the same time (several years between each major title).
>  Quantum Break doesn't come out until 2014 so I think it's a safe bet to
> say they are using D for a game featured prominently during a major console
> announcement. Very cool.
>

It's awesome that Quantum Break is finally announced!
And super awesome that they saw fit to feature it in Microsoft's Xbox One
unveiling conference, right alongside Forza, Halo and Call of Duty
announcements!
That's a big deal! Unveiling of a new console is massive in the games
industry, it's like, an octa-annual event, and generates a lot of hype :)


May 23, 2013
On 23 May 2013 22:56, Max Samukha <maxsamukha@gmail.com> wrote:

> On Friday, 17 May 2013 at 13:28:20 UTC, Andrei Alexandrescu wrote:
>
>> Great talk. Vote up!
>>
>> http://www.reddit.com/r/**programming/comments/1eiku4/** dconf_2013_day_1_talk_5_using_**d_alongside_a_game/<http://www.reddit.com/r/programming/comments/1eiku4/dconf_2013_day_1_talk_5_using_d_alongside_a_game/>
>>
>>
>> Andrei
>>
>
> Nice talk, Manu! You
>
> You have module constructors in mixins. How did you solve the circular imports problem? Banned circular imports?
>

Pretty much.
I anticipate the problem arising, but it hasn't come up.
The codebase is fairly hierarchical it seems...

I'd really rather not do it with module constructors though. There might be other solutions, like module locals executing constructors or something.


May 23, 2013
On Thu, 23 May 2013 23:09:54 +1000
Manu <turkeyman@gmail.com> wrote:

> On 23 May 2013 22:56, Max Samukha <maxsamukha@gmail.com> wrote:
> >
> > You have module constructors in mixins. How did you solve the circular imports problem? Banned circular imports?
> >
> 
> Pretty much.
> I anticipate the problem arising, but it hasn't come up.
> The codebase is fairly hierarchical it seems...
> 
> I'd really rather not do it with module constructors though. There might be other solutions, like module locals executing constructors or something.
> 

I don't know whether there might be a problem with this approach in your particular situation, but I always try to avoid module ctors by using lazy-inited module-level properties:

// From:
Foo foo;
static this {
    foo = ...etc...;
}

---->

// To:
private Foo _foo;
private bool fooInited;
@property Foo foo() {

    if(!fooInited) {
        foo = ...etc...;
        fooInited = true;
    }

    return _foo;
}


A little more boiler-platey, but that be cleaned up with mixins. And then if I need to force init to happen right at start-up, then I can just make sure to "touch" each of the properties at startup.


May 24, 2013
On Thursday, 23 May 2013 at 16:30:28 UTC, Manu wrote:

> Pretty much.
> I anticipate the problem arising, but it hasn't come up.
> The codebase is fairly hierarchical it seems...
>
> I'd really rather not do it with module constructors though. There might be
> other solutions, like module locals executing constructors or something.

I see. Ok.
May 24, 2013
On Thursday, 23 May 2013 at 20:19:28 UTC, Nick Sabalausky wrote:
> On Thu, 23 May 2013 23:09:54 +1000
> Manu <turkeyman@gmail.com> wrote:
>
>> On 23 May 2013 22:56, Max Samukha <maxsamukha@gmail.com> wrote:
>> >
>> > You have module constructors in mixins. How did you solve the
>> > circular imports problem? Banned circular imports?
>> >
>> 
>> Pretty much.
>> I anticipate the problem arising, but it hasn't come up.
>> The codebase is fairly hierarchical it seems...
>> 
>> I'd really rather not do it with module constructors though. There
>> might be other solutions, like module locals executing constructors
>> or something.
>> 
>
> I don't know whether there might be a problem with this approach in
> your particular situation, but I always try to avoid module ctors by
> using lazy-inited module-level properties:
>
> // From:
> Foo foo;
> static this {
>     foo = ...etc...;
> }
>
> ---->
>
> // To:
> private Foo _foo;
> private bool fooInited;
> @property Foo foo() {
>
>     if(!fooInited) {
>         foo = ...etc...;
>         fooInited = true;
>     }
>
>     return _foo;
> }
>
>
> A little more boiler-platey, but that be cleaned up with mixins. And
> then if I need to force init to happen right at start-up, then I can
> just make sure to "touch" each of the properties at startup.

Problems start when the state needs to be thread-shared.
1 2 3
Next ›   Last »