Re: What are the worst parts of D?

2014-10-02 Thread po via Digitalmars-d
But I agree that debuggers can be annoying, reconfiguring them is often more troublesome than just adding some printf() hacks. I find them indispensable when I am really stuck though: duh, I have spent 15 minutes on this, time to fire up the debugger. Hehhe reconfigure a debugger. Lolz.

Re: [Semi OT] Language for Game Development talk

2014-10-01 Thread po via Digitalmars-d
On Wednesday, 1 October 2014 at 14:16:38 UTC, bearophile wrote: Max Klyga: https://www.youtube.com/watch?v=TH9VCN6UkyQ A third talk (from another person) about related matters: https://www.youtube.com/watch?v=rX0ItVEVjHc He doesn't use RTTI, exceptions, multiple inheritance, STL,

Re: [Semi OT] Language for Game Development talk

2014-10-01 Thread po via Digitalmars-d
OOP style and AoS in general does cause cache unfriendly data access. You can separate out your hot and cold data but at that point you're not really programming in an OO style. He doesn't use RTTI, templates, exceptions, etc. for different reasons than cache friendliness. Modern C++ !=

Re: [Semi OT] Language for Game Development talk

2014-10-01 Thread po via Digitalmars-d
On Wednesday, 1 October 2014 at 15:40:59 UTC, currysoup wrote: I certainly believe C++ style and it's community promote the idea of zero overhead abstractions and the kind of OOP style which _does_ cause cache misses. Take a look at the STL. See any OOP? Right cause there isn't any. Boost?

Re: [Semi OT] Language for Game Development talk

2014-10-01 Thread po via Digitalmars-d
Perhaps a (part of) language more fit/helpful/nice for that purpose/use can be invented. Bye, bearophile It isn't as hard as he pretends to write SoA code in C++. In fact it is possible to abstract the underlying data you are operating on, and replace it with vector type Example

Re: [Semi OT] Language for Game Development talk

2014-10-01 Thread po via Digitalmars-d
Take a look at the STL. See any OOP? Right cause there isn't any. Boost? Nope. I see lots of it. How many examples do you want? Well Boost might have some, I haven't looked at every library. I don't know of any OOP in the STL, unless you mean the 1980's stuff like iostreams and the

Re: [Semi OT] Language for Game Development talk

2014-10-01 Thread po via Digitalmars-d
I don't know of any OOP in the STL, unless you mean the 1980's stuff like iostreams and the other shit most people avoid using, but I don't think this is considered part of the STL Any use of a class instance is part of OOP. IOStreams, iterators, strings, containers, ranges, filesytem,

Re: So what exactly is coming with extended C++ support?

2014-09-30 Thread po via Digitalmars-d
All true again, pre-allocation can fix lots of pause issues. And simply not using GC in tight loops. While not the greatest fan of Unity, it proved that GC (on top of of VM) is not a concern for (I argue) most of gamedev. Minecraft was originally written in Java for crying out loud yet it

Re: So what exactly is coming with extended C++ support?

2014-09-30 Thread po via Digitalmars-d
This will most likely change when they get their IL2CPP production ready and start moving code from C++ to C#. Or when Microsoft finishes the ongoing work on .NET Native. -- Paulo I'd not seen IL2CPP before, but from this link:

Re: So what exactly is coming with extended C++ support?

2014-09-30 Thread po via Digitalmars-d
On Tuesday, 30 September 2014 at 14:19:51 UTC, Araq wrote: It doesn't mention anything about moving C++ into C#. Even with IL2CPP, C# has fundamental design trade offs that make it slower than C++(GC is just one of them), so it wouldn't make much sense to port engine code to C# unless they

Re: [Semi OT] Language for Game Development talk

2014-09-28 Thread po via Digitalmars-d
His entire reason for not using C++ lambda, and wanting local functions instead, is faulty His reason: I heard they can perform heap allocation. Reality: No they do not perform heap allocation, that would only happen if you stuffed it into an std::function

Re: [Semi OT] Language for Game Development talk

2014-09-26 Thread po via Digitalmars-d
std::string tends to be more complicated because of the small string optimization. Most debuggers I've used don't handle that correctly out of the box, even if sorting it out really isn't difficult. Almost all game developers use Visual Studio, and VS has supported visualization of all

Re: [Semi OT] Language for Game Development talk

2014-09-26 Thread po via Digitalmars-d
More stupidity from JB: At one point he talks about merging the memory of Mesh's positions indices UV, but he does this manually like a friggin moron;0 The proper way is using an allocator, but I'm guessing JB doesn't grok allocators- cause they be weird templates stuff derp!

Re: [Semi OT] Language for Game Development talk

2014-09-26 Thread po via Digitalmars-d
- RAII makes most sense if you have exceptions. RAII is orthogonal to exceptions, so his claim is nonsense. - He does not want to write new classes to manage resources (not only memory, but shaders etc). I manage all resources using RAII, it did not require me to write a new RAII

Re: [Semi OT] Language for Game Development talk

2014-09-26 Thread po via Digitalmars-d
Just a note: this isn't really true. RAII was initially used to deal with exceptions. If you want fast backtracking and just reset the stack pointer (rather than unwinding) then stack-allocated RAII objects won't work since they will be overwritten. You need to maintain a list of destructors

Re: [Semi OT] Language for Game Development talk

2014-09-26 Thread po via Digitalmars-d
«The technique was developed for exception-safe resource management in C++[3] during 1984–89» http://en.wikipedia.org/wiki/Resource_Acquisition_Is_Initialization It may have been developed for exceptions, that doesn't mean you have to use them together. Alternative error reporting methods

Re: [Semi OT] Language for Game Development talk

2014-09-19 Thread po via Digitalmars-d
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

Re: Escaping the Tyranny of the GC: std.rcstring, first blood

2014-09-16 Thread po via Digitalmars-d
No, and it neeedn't. The article is not that good. In C++, if a thread must increment a reference counter while it's going to zero due to another thread, that's 100% a programming error, not a concurrency error. That's a well known and well studied problem. As an aside, searching the net for

Re: Escaping the Tyranny of the GC: std.rcstring, first blood

2014-09-15 Thread po via Digitalmars-d
I'm not sure about that discussion, but there's good evidence from C++ that refcounting with atomics works. What was the smoking gun? http://www.gotw.ca/gotw/045.htm I don't see how that link answers Andrei's question? He just compares different methods of implementing COW.

Re: Escaping the Tyranny of the GC: std.rcstring, first blood

2014-09-15 Thread po via Digitalmars-d
As I understand the issue it works if you make sure to transfer ownership explicitly before the other thread gains access? Maybe this is more clear: http://www.1024cores.net/home/lock-free-algorithms/object-life-time-management/differential-reference-counting Ah, I think I follow. So in

Re: Getting completely (I mean ENTIRELY) rid off GC

2014-09-14 Thread po via Digitalmars-d
I mean possible lifetime management options are: 1. string 2. string* 3. shared_ptrstring 4. weak_ptrstring 5. unshared_ptrstring (not interlocked; does something like this exist?) This way string is just like any other object. It's C++ after all, the foot must be shot. Exactly, you can

Re: Getting completely (I mean ENTIRELY) rid off GC

2014-09-13 Thread po via Digitalmars-d
Smart pointers are rarely used, most C++ stuff is done by value. Strings too? Two string types are used. -std::string type: by value, has smaller buffer optimization, used at startup/logging, and for any dynamic strings with unbounded possible values -immutable string handles: by value.

Re: [OT] Siemens Space experiment for using Haskell instead of C++ for Mission Control Software

2014-09-13 Thread po via Digitalmars-d
Basically the usual points how real enterprise C++ looks like, where no one cares about Effective C++ and similar practices. Why they were using C++ for that type of software is beyond me, I'd rather use Haskell if latency throughput aren't my main concerns. The paper he referenced in

Re: Getting completely (I mean ENTIRELY) rid off GC

2014-09-13 Thread po via Digitalmars-d
Are you sure? From basic_string.h: _CharT* _M_refcopy() throw() { #ifndef _GLIBCXX_FULLY_DYNAMIC_STRING if (__builtin_expect(this != _S_empty_rep(), false)) #endif __gnu_cxx::__atomic_add_dispatch(this-_M_refcount, 1); return

Re: Stroustrup's slides about c++11 and c++14

2014-09-13 Thread po via Digitalmars-d
Heh, I like how he says static if was proposed by Walter Brown. ;) Is it just me or did it seem like most of the stuff in those slides is already in D? I don't follow C++. Walter Brown is a real person;) The C++ dynarray stuff was appealing to me, but it got delayed, and who knows if

Re: Getting completely (I mean ENTIRELY) rid off GC

2014-09-12 Thread po via Digitalmars-d
programmers who really have this stuff down... how much of your code and your mental energy with C++ is spent on memory ownership rules? Is it really a productive use of your time? Does the program materially benefit from the design required to make it safe, correct, and self-documenting

Re: Some notes on performance

2014-09-02 Thread po via Digitalmars-d
The first link says that Chrome is a *90* meg binary! Gawd damn. Either they write some really bloated code, or modern browsers require way too much shit to function. On Tuesday, 2 September 2014 at 09:27:29 UTC, Joakim wrote: I was googling around for information on ninja, the build system

Re: Automated source translation of C++ to D

2014-08-21 Thread po via Digitalmars-d
Might be pretty hard, C++ has some features D doesn't, not sure how you would emulate them. C++ has these, I don't think D does: move only types r-value references SFINAE ADL Multiple inheritance