September 21, 2014
On Saturday, 20 September 2014 at 04:28:58 UTC, deadalnix wrote:
> On Friday, 19 September 2014 at 23:47:06 UTC, Max Klyga wrote:
>> Jonathan Blow just recorded a talk about the needs and ideas for a programming language for game developer.
>>
>> https://www.youtube.com/watch?v=TH9VCN6UkyQ
>>
>> This talk mentions D quite a lot of times.
>> D is mentioned as the most probable to be adopted if it were possible for frictionless interaction with existing codebase.
>> An interesting talk if you want to look at language design from game developer perspective.
>
> I haven't finished the talk yet, but already this is kind of upsetting. The claim that he want to create a programming language, but is unable to give concrete examples of any case he makes so far, grossly misrepresent what exists in other languages or flat out declare that he doesn't know.
>

I got similar feeling. If he joined D, there would be more value
than starting all from the ground.

I think D fits well his requirements. He admits it between the
lines when defines D as better C++, but not worth switching
because of not enough gain.

IMHO, D has the best cumulative score across all languages in
main 3 categories (despite tooling):

1. Kernel type (mostly no memory allocations) - the winner here
2. Game type (mostly manual memory management) - the winner here
3. Applications/Scripts (mostly automatic memory management))-
the winner in large scale apps. In terms of small ones, for most
people D places somewhere in 2nd place group because of static
typing (but honestly I prefer writing scripts in statically typed
languages)

After years of codding I think the following topics (pointed in
video) will never be solved entirely in any language
1. Resource handling
2. Error handing

As for the biggest D rival - Rust, despite all syntax choices I
don't accept, here is at least one thing that prevents Rust to be
ready for ver 1.0 in the end of year:

http://doc.rust-lang.org/guide-pointers.html#gc

Gc<T>

"In the future, Rust may have a real garbage collected type, and
so it has not yet been removed for that reason."

In my opinion, as a usual coder, memory model in Rust is not well
defined for now.

Piotrek
September 24, 2014
Le 20/09/2014 04:25, po a écrit :
>   He actually talks about Andre around 40' ;0
>
> As a fellow game dev:
>
> I don't agree with him about RAII, I find it useful
>
> He kind of has a point about exceptions, I'm not big on them
>
>
> I get the impression his C++ knowledge is about the level of C++ with
> classes, ie very low.
>
> He claims using std:: inherently causes slow compilation, my experience
> says otherwise.
>

Maybe on some systems it's almost impossible to use pre-compiled headers?

> He goes on about "freeing free'd memory", this is never something that
> would happen in modern C++, so he is basically proposing an inferior
> language design.
>
>
>   At one point he says you can't see the contents of std::vector in a
> debugger. What? This is trivial and has worked in every version of
> Visual Studio for the last 5+ years.
>

Maybe he don't use VS? I am using QtCreator for Android and Windows, I can tell you I have troubles with std::string,...
I am waiting for llvm and lld for the replacement of gdb under Windows.

>   I do agree the build systems used with C++ are idiotic
>
> IMO, C++'s complexity is largely because of the stupid headers and all
> the mind numbing crap associated with it. That and the lack of any
> reflection.
>
>
>
>
>
>

September 25, 2014
On 9/19/2014 5:52 PM, bearophile wrote:
> The "!" means the memory of this array is owned by the Mesh stuct. So when the
> Mesh instantiation goes out of scope, all the memory it owns gets deallocated.

This stood out for me. Deallocated how? People who write high perf software tend to have multiple allocators for different purposes.

I don't think this feature will work.
September 25, 2014
On 9/21/2014 4:01 AM, Paulo Pinto wrote:
> Sorry, should have taken more coffee.

My excuse is I haven't had my beer yet.
September 25, 2014
On 25/09/14 06:18, Walter Bright wrote:

> This stood out for me. Deallocated how? People who write high perf
> software tend to have multiple allocators for different purposes.
>
> I don't think this feature will work.

He says it's part of the same memory as the enclosing struct. I guess they would need to use the same allocator.

-- 
/Jacob Carlborg
September 25, 2014
Walter Bright:

> This stood out for me. Deallocated how?

Calling free when the struct instance goes out of scope, I presume.


> People who write high perf software tend to have multiple
> allocators for different purposes.

I think that data is used all together, so it's reasonable to allocate it from a single allocator.


> I don't think this feature will work.

I think he's already using this strategy in production code. So I think it works. He's just asking for a language feature that implements this idiom for him in a shorter and cleaner way.

Bye,
bearophile
September 25, 2014
On 9/25/2014 1:47 AM, bearophile wrote:
>> This stood out for me. Deallocated how?
>
> Calling free when the struct instance goes out of scope, I presume.
>
>
>> People who write high perf software tend to have multiple
>> allocators for different purposes.
>
> I think that data is used all together, so it's reasonable to allocate it from a
> single allocator.
>
>
>> I don't think this feature will work.
>
> I think he's already using this strategy in production code. So I think it
> works. He's just asking for a language feature that implements this idiom for
> him in a shorter and cleaner way.

So how do you tell it to call myfree(p) instead of free(p) ?

September 25, 2014
On 9/19/2014 4:47 PM, Max Klyga wrote:
> Jonathan Blow just recorded a talk about the needs and ideas for a programming
> language for game developer.
>
> https://www.youtube.com/watch?v=TH9VCN6UkyQ
>
> This talk mentions D quite a lot of times.
> D is mentioned as the most probable to be adopted if it were possible for
> frictionless interaction with existing codebase.
> An interesting talk if you want to look at language design from game developer
> perspective.


Looks like he reinvented D dynamic arrays at 1:02. Sigh.
September 25, 2014
Walter Bright:

> So how do you tell it to call myfree(p) instead of free(p) ?

I think you can't in the form he has shown. He's far from being a good language designer, after all :-)

Bye,
bearophile
September 25, 2014
On 9/25/2014 2:32 AM, bearophile wrote:
> Walter Bright:
>
>> So how do you tell it to call myfree(p) instead of free(p) ?
>
> I think you can't in the form he has shown. He's far from being a good language
> designer, after all :-)

It's not as easy as it looks :-)