« first day (514 days earlier)      last day (4428 days later) » 

7:00 PM
lol
 
@jalf Don't pull my quotes out of context, I said fabled to be awesomely fast.
 
@rubenvb Er, I'm not sure which context I'm missing
you said it was fabled to be awesomely fast, and I said that 5-10% wasn't what I'd call awesomely fast
 
@jalf both are unrelated statements. Never mind, this is not important, I agree with you anyways.
 
I still don't get it. But yeah, it's not important
 
Eh?
I managed to confuse people without even being here.
My epic leet trollness is unfathomable!!!!!!!
@TonyTheLion Looks like an overzealous stitch job.
@jalf I don't understand FPS over 60. Hell, at 45 I hardly believe that most people can tell a literal difference, other than bemusing their pathological nature.
 
7:11 PM
@Xaade the FPS measurements aren't perfect, often a small twitch/framedrop goes unnoticed but can make you miss your shot.
 
@rubenvb It can? Become a better shot
30FPS is fine
 
@rubenvb movie theaters only ran at 24fps
 
@MooingDuck without lying, I can tell my 60Hz LCD TV "shudders" when displaying panning shots.
 
The USAF, in testing their pilots for visual response time, used a simple test to see if the pilots could distinguish small changes in light. In their experiment a picture of an aircraft was flashed on a screen in a dark room at 1/220th of a second. Pilots were consistently able to "see" the afterimage as well as identify the aircraft. This simple and specific situation not only proves the ability to percieve 1 image within 1/220 of a second, but the ability to interpret higher FPS.
 
@DeadMG constant 30 is fine, it's the drop from 60 to 30 that sucks.
 
7:14 PM
@Xaade there is no upper limit to human vision
 
@rubenvb Then turn on framerate limiting, i.e. vsync
 
There's a difference between being able to distinguish a frame in a shorter time, than being able to distinguish a lack of transition.
 
@Xaade especially in those circumstances.
 
@DeadMG that would be 60, and it might drop under...
 
@rubenvb You can vsync to every other refresh as well, you know.
 
7:15 PM
@rubenvb Set it to 30?
 
DX9 goes up to every 5 refreshes, I think.
 
@DeadMG not in any standard settings app I've ever seen :(
CCC, or in-game settings
 
@MooingDuck Again, we're talking about processing a frame that captures attention, within 1/220 of a second. That's different from our ability to notice missing frames.
 
@rubenvb Well, that's really the developer's fault then, isn't it?
 
or Nvidia settings for that matter
 
7:16 PM
nothing to do with needing 60FPS at all
 
@Xaade of a bright image in a dark room? You need almost no time. Now try a dark image in a light room. They wouldn't even notice if it was 1/100th of a second.
 
@MooingDuck Besides, there's nothing saying the mind doesn't want to capture the image, and therefore throws out preceding frames.
 
Quantum mechanics of Vision!
delta E delta t >= hbar/2
although the order of numbers is very much not comparable in our current situation...
 
I believe for the sake of motion and believability, the mind doesn't notice anything more than 45 frames per second,
Seeing != processing
 
@Xaade if you're talking about constant visual input (like a video game) of mostly similar brightness, then that sounds about right to me
 
7:22 PM
I just got a new answer on an old question of mine but it looks like he put a lot of effort into it so I thought I'd post it here
1
A: Move assignment operator and `if (this != &rhs)`

CTMacUserFirst, you got the signature of the move-assignment operator wrong. Since moves steal resources from the source object, the source has to be a non-const r-value reference. Class &Class::operator=( Class &&rhs ) { //... return *this; } Note that you still return via a (non-...

 
holy crap there's so many big answers there...
 
@MooingDuck The problem is when reaction time is important. We can react to a single frame, but if the important moment is skipped, while rendering, or a little slow....
 
@CollinHockey I do exactly the same thing with Perl. I read about how useful a language it is, then I go read Programming Perl again and get to the part where arguments are passed to functions in a single array named @_ instead of being named seperately. Then I quit.
 
@SethCarnegie Programmer Perl is just a billion pages of Larry Wall telling us how cute perl is
Programming*
 
7:26 PM
hmmm
does unique_ptr<T> have operator<(const unique_ptr<T>&, T*)?
oh, wait, even if it did, it wouldn't matter, because unordered_set is broken
thanks for that, Standard library
 
@DeadMG yes it does
but you can't see that so it can't help
 
heh
actually, it wouldn't matter anyway cause I'm using the hash container, not the binary search one
but now I have a problem and I don't really know how to solve it
ehh... maybe a vector would be easier, I mean, the thing is only gonna be at most 1k elements of pointers
 
@DeadMG in what way is it broken?
 
@MooingDuck You can't find equivalent types.
 
@DeadMG equivalent types?
 
7:30 PM
not as long as they hash the same?
 
for example, you can't search into a unordered_set<unique_ptr<T>> with a T*
even though they hash the same and compare equal
(if they are equal)
 
is there a data structure that would?
 
@DeadMG ...?
 
Xeo
Yeah, that's a bit of a shame.
 
(in the stl I mean)
 
Xeo
7:31 PM
unordered_map<T*, unique_ptr<T>> would work, tho.
 
@CollinHockey I'd like to know this
 
@Xeo Yes, it would.
@Xaade Well, logically, there's no reason why any hash container couldn't do it.
 
@DeadMG Is the hash table assuring the incoming type matches the type specified.
I mean, in C# all you have to do is write a GetHashCode, and a Compares.
 
@Xaade For the purposes of simply looking up into the table, then logically the only requirements on the key are that hash(K) == hash(T) if K == T
 
Xeo
@Xaade The problem is that the hash containers only allow searching for the key type, aka unique_ptr<T> in this case
 
7:34 PM
@Xeo then key against object. You're still overriding the hash code generation?
 
Xeo
So you'd need to make the raw T* into a unique_ptr<T>
Which would defeat the purpose
And wouldn't make sense, in most cases
Btw, @DeadMG, another idea is having a special deleter.
 
Is stackoverflow the proper place to ask about the relative advantages/disadvantages of languages that give variables a default value vs. languages wherein accessing a variable with no value is an error?
 
@Xeo I made a map that could handle that once, as long as the comparison could accept the type.
 
Xeo
And just comply with the stupidity of having to transform the T* to a unique_ptr<T> and a no-op deleter.
 
better to ask on Programmers, IMO
 
7:35 PM
@Xeo what if he made the hash table take T*.
 
@Seth Sounds maybe more like a programmers topic?
 
@Xaade RAII
 
Ah, so you unblocked me, thanks
 
@Xaade Then I'd be back to malloc and free memory management because unordered_set isn't expressive enough?
 
Xeo
@Xaade But he wants to store unique_ptrs in it
 
7:36 PM
Ok I'll ask on programmers
 
@DeadMG Maybe you just want a map
 
@Xeo don't all the unique_ptrs have to have the same type of deleter?
@CollinHockey I think map has the same problem
 
You'd key off something else, then your unique_ptr<T> would be the value
 
@SethCarnegie I don't understand what you're hoping to get. Anything I think of is a rather obvious remark.
 
Xeo
@CollinHockey Scroll up a bit
 
7:38 PM
@CollinHockey Except the only something else that I could possibly key off would be T*.
 
@Xaade speed vs safety
 
in which case I'd be mapping a pointer to a pointer with an identical value, which is dumb
 
@DeadMG You could create a generic that could contain one or the other, and hash those.
 
eehhhh unordered_map<T*, unique_ptr<T>>.. or something
 
@DeadMG actually, why is the key a unique_ptr?
 
7:39 PM
it's not, it's a set
 
Xeo
struct stupid_hash_deleter{
  bool is_owner = true;
  template<class T>
  void operator()(T* p) const{ if(is_owner) delete p; }
};
using stupid_ptr = unique_ptr<T, stupid_hash_deleter>;
unordered_set<stupid_ptr> bla;
bla.find(stupid_ptr(p, stupid_hash_deleter{false}));
 
@DeadMG oh, woops
 
@MooingDuck That's what I said earlier.... Key is T*, value is unique_ptr<T>
 
Xeo
Something like this
 
Set as a key?
 
7:40 PM
@CatPlusPlus No, it's an unordered_set<unique_ptr<T>>
 
@MooingDuck rather obvious.... and that's only one thing I thought of.
@DeadMG Then use unordered hash.
 
Xeo
@Xaade Read that sentence again
 
@Xeo if he used a hash table, he could key against T*, get all the benefits of RAII for the unique_ptr<T>, and still perform lookups with either.
 
Xeo
@Xaade "unordered hash". I meant you should read your own sentence again :p
10 mins ago, by Xeo
unordered_map<T*, unique_ptr<T>> would work, tho.
And I already suggested that
 
@DeadMG can unique_ptr compare equal? It seems weird...
 
7:42 PM
of course it can
unique_ptr<T> == T* if unique_ptr<T>::get() == T*
 
@Xeo Sorry, C# has ordered dictionary.
 
@DeadMG I meant can two unique_ptrs compare equal? The definition would be obvious if yes, but it seems like a bug elsewhere if it's ever true.
@Xaade map
 
but I'm not comparing them to each other
I'm comparing unique_ptr<T> and T*
 
Since when? AFAIK Dictionary has always been hash-table-based.
 
@DeadMG alright, that makes sense then
 
7:44 PM
1 min ago, by Xeo
10 mins ago, by Xeo
unordered_map<T*, unique_ptr<T>> would work, tho.
 
@Xaade we heard you, that's slow and takes lots of memory
 
actually, I'm probably gonna do it
just not right now as I'm playing Starcraft 2
 
@MooingDuck not sure why slow. And actual memory wouldn't be that much more.
 
@DeadMG: I think you're going to want to go find/make a container that can handle different types
 
Xeo
@DeadMG Do what, the hash map?
 
7:45 PM
@Xeo yeah
 
Xeo
@MooingDuck Meh, not needed. You just need to bend the usage a bit
 
@MooingDuck Make? you kidding? I only have the slightest idea how to make a hash map
 
Xeo
Like I said, you can also play around with the deleter
 
@Xeo that's where I'd go I think.
@DeadMG That's why I put in "find" as well.
 
@DeadMG contain a map that templates against object. Then have your container do the checkwork.
 
7:46 PM
@DeadMG it's just a resizing array with the index being the return value of an hash function
 
Xeo
@SethCarnegie Eh, rather an array of lists
 
Don't forget about collision handling. I could never wrap my head around that.
 
@Xeo that's only if you do chaining on collisions
You could do something else like double hashing, probing, etc.
 
Xeo
Fair point
 
@ScottW did you live?
@ScottW ok. take care with that
 
8:00 PM
Oh my god, reddit is the wrong place to discuss C++
 
You just now figured it out?
 
@ScottW probably a quote taken out of context
 
@ScottW define "true"
he advises against shared_ptr when you don't need shared ownership
 
@jalf #define true 1
 
It has overhead, yes.
It is thread-safe, yes.
 
8:05 PM
and it has a lot of overhead when compared to other smart pointers
 
It does maintain refcount, yes.
Stroustrup doesn't advise against using shared_ptr ever, no.
 
but the overhead is still measured in nanoseconds, so it's generally not a big deal
he advises against using it as a silver bullet faux GC
 
He advises to consider other smart pointers first.
 
don't use it blindly, and prefer stricter ownership semantics where possible
but use shared_ptr when you need shared ownership
 
Because in most cases, unique_ptr is all you need.
(Also that refcounting structure is why you should never create shared_ptr without using make_shared/allocate_shared).
(Which removes indirection overhead and improves locality.)
 
8:08 PM
well, if it's the kind of context in which you find shit, they can keep it
 
@ScottW Like, always?
 
What ptr type do you use if you need to store it in a container like vector, map or set?
 
Either will work.
 
All right! I fixed/hacked Cmake to work with Clang on Windows, now I can build Clang with Clang and also run the tests. Yay for me!
 
I know that smart pointers do reference counting, but what if you wanted the reverse. What if you want to be able to delete an object pointed at, but wanted all other objects holding that reference to see a null pointer afterwards?
 
8:14 PM
Comes down to determining ownership, as usual.
@Xaade You'd need double indirection.
 
a shared_ptr pointing to a pointer to an object.
 
can't you do it within the concept of a smart pointer, without apparent double indirection.
 
wrap a shared_ptr pointing to a pointer to an object?
 
Well, you can encapsulate double indirection inside a smart pointer. But the point is you need double indirection.
Let's call it volatile_ptr.
 
like, have a template. When the template is copied, the internal pointer is copied, but when you try to access the smart pointer, it returns the object like a shared_ptr.
If anyone deletes the pointer, all other copies of the ptr set their internal to null.
I often find myself needing to free a resource, but inform everyone it's been freed, which is annoying.
 
8:19 PM
@Xaade wrapping one shared_ptr with indirection would be more efficient.
only one to set to null on deletion, and free shared-ness.
 
Well, if you want sharedness, you can use weak_ptr.
I thought the point is to not do any refcounting.
 
So basically a type like shared_ptr, but unwraps one layer for you.
The Get, would return the shared_ptr.Get()
 
Well, wait, you'd have to do refcounting anyway.
Otherwise, who'd free the control block.
Well, weak_ptr is your friend.
 
@CatPlusPlus the pointer to the pointer is shared, and it doesn't increase in refcount.
 
weak_ptr::lock() returns shared_ptr, which is nullptr if the object is dead.
And creating weak_ptr doesn't affect the refcount.
And I need to stop saying "Well", dammit.
 
8:23 PM
> So we end up with generation of "programmers" who understand nothing about underlying hardware, assembly or what is really good for performance or size.
 
Basically, shared deleteness.
 
I hate it when they use that bullshit argument.
2
 
std::weak_ptr<int> weak; { auto ptr = std::make_shared<int>(); weak = std::weak_ptr(ptr); assert(weak.lock().get() != nullptr); } assert(weak.lock().get() == nullptr);
 
@EtiennedeMartel Stroustrup made a point to have people understand why not to use linked lists for that very reason, have to understand something about underlying hardware. However, that understanding comes in the form of documentation.
 
@EtiennedeMartel It's healthier to ignore them.
You can't reason, anyway.
It's like shouting to a wall.
 
8:26 PM
I think I'm going to carry a trout around just so that I can slap people with it.
 
And trying to convince it to turn into jelly.
While singing.
 
@EtiennedeMartel what was he saying that about? (the "underlying hardware" thing)
 
And then nailing said jelly to the wall.
 
@EtiennedeMartel How else do you determine.... Don't use linked-list, it's bad for the processor cache.
 
@SethCarnegie Pointers, most likely.
 
8:27 PM
@SethCarnegie That using smart pointers is bad because then people might forget about how stuff runs underneath.
 
@EtiennedeMartel That's stupid
No need to understand implementation just to understand implementation. However, if there's a technical reason why a certain object is not meant for a certain job, it helps to know why.
 
@EtiennedeMartel while I think a good C++ programmer knows how raw pointers work, I don't see how you could even tell which one you were working with without seeing the type declaration
 
Not that assembly is remotely related to the issue.
 
unless you tried to do pointer arithmetic or something
 
Anyway the argument is not about "should we teach raw pointers to students", it's "should professional C++ programmers stop using raw pointers in most cases".
 
8:28 PM
OOH I KNOW POINTERS THEREFORE MY CODE IS FAST.
 
knowing what's happening under the hood is completely orthogonal to whether or not you should use pointers
 
@EtiennedeMartel yes, in most cases
 
Who cares about locality issues, or cache, right?
 
@EtiennedeMartel raw pointers are evil.
Raw Pointer is the new GoTo
 
It's obviously pointers that are important.
 
8:29 PM
Cache-miss the shit out of it.
 
Not that I'd expect these people to actually know what locality is.
 
Got a problem? Add pointers. Now you have two problems.
 
Now you have pointer to a problem.
4
 
A meta-problem.
 
@CatPlusPlus It matters when you choose whether your container guarantees sequential ordering in memory.
 
8:30 PM
@Xaade No, really?
 
No point in assuring a MAP is sequential unless it's small, but a list.... should be sequential. And how would anyone understand that if they didn't have some knowledge of hardware. However, knowing that it is sequential for the purpose of efficiency isn't in the ballpark of understanding its full implementation.
 
List will rarely be sequential.
 
I just came back to say: Lisp
 
@CatPlusPlus I mean when you have data you'll access in a particular order within a small timeframe, you should make sure your data is sequential.
Whatever formal name for container that represents.... array?
 
You know that "No, really" was dripping with sarcasm, right?
 
8:33 PM
@Xaade array has compile-time size, otherwise vector.
 
@CatPlusPlus Yeah, but how does that fit in with.
10 mins ago, by Etienne de Martel
> So we end up with generation of "programmers" who understand nothing about underlying hardware, assembly or what is really good for performance or size.
There's a valid point there....
 
It's from a thread about pointers.
 
But forcing people to use raw pointers to "remember" anything is not a good application of that point.
 
And assembly is completely irrelevant.
 
@Xaade It's the number two argument against teaching Java instead of C++ to beginner programmers (with number one being that Java sucks much more than C++).
 
8:35 PM
Assembly is compiler's job.
Anyway, I should get to work or something.
 
@CatPlusPlus Ok, fine compiler's job. Then we should take away the distinction of guaranteed sequential, and let the compiler decide for us which to use.
As long as that distinction exists, we'll have to be aware of that implementation detail.
 
What, assembly? No, you don't need to know or think about assembly when you're designing your data structures.
It's not related to what bytecode your code happens to compile down to.
 
I don't see guaranteed sequential memory as related to a necessary knowledge of assembly. You can be aware of that fact without knowing registers.
 
You lost me.
Anyway.
 
I think we're agreeing, but the sarcasm is confusing it.
I have no idea what made you bring up assembly.
 
8:41 PM
@Xaade reread the quote you reqouted.
 
@rubenvb Sorry, I was more concerned with "hardware" part and not "assembly".
I guess I wasn't clear.
 
lols
I missed the random one word interject game.... welcome back @JohannesSchaublitb
 
what do you mean "one word interject game " ?
 
@JohannesSchaublitb !
 
8:44 PM
OH GOSH!
 
@JohannesSchaublitb That's two words.... doesn't count.
 
@JohannesSchaublitb I got Cmake to correctly use Clang on Windows, so I'm compiling Clang with Clang and will run the tests soon.
 
@rubenvb ohh nice!
please tell everything when you are done xD
 
lol I'll keep you updated.
 
clang touching his own code must be hawt
 
8:48 PM
damn, ld ran out of memory for a debug link. Ugh.
 
damn bfd crap
 
yes it sucks
i remember the dark ages when I wrote a GCC and binutils backend for that CPU
and i first tried to write a bfd a.out thing. but I failed because all the old crap in it confused me. in the end i did it with ELF.
 
@rubenvb Yo dawg. I heard you like compilers.
 
@EtiennedeMartel sort of... I mostly fight teh building systematiks.
 
8:56 PM
man
why do people start forum games if they don't have the time to play?
 
Life's a bitch, deal with it.
 
@EtiennedeMartel waaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaah!
 
it seems my all-in-one MSYS package on the MinGW-w64 downloads page is missing find.exe. Anyone know what underlying msys package contains that?
 
I want to play Mass Effect 3, but I really need to work on my project. Decisions, decisions...
 
lol
apparently, the ending is horrific
 
8:58 PM
So I heard. But I really enjoy the game so far.
 
9:10 PM
Hi.
 
gah. My coworkers wrap lines at 80 characters. And begin the next line tabbed in 45 characters. So each "line" of actual code takes up 5-6 lines on my screen. That's cause for murder right?
 
YES.
Starting at column 45 definitely qualifies.
 
@RMartinhoFernandes the line it was continued from was only indented 13 spaces too :(
    IFeatureModule feature_module = ESPSystem.getFeatureModuleManager().
                                    getModuleAt(i);
 
@MooingDuck I'd say set fire to his face. Then kill him.
 
@RMartinhoFernandes luckily, most of the time continued lines are only indented 29-34 spaces
 
9:15 PM
@MooingDuck 13? Not 12, or 14, but 13?
 
@EtiennedeMartel yeah
 
Just checked and I have code starting at column 44. I think I have found the threshold.
 
@EtiennedeMartel oh, my counter is off, all those numbers are one less
 
9:16 PM
Oh, you.
 
ctrl+shift+f then "                                            "
 
gah. Markdown +1 point
 
I thought about something.
 
Oh, you mean /^\s\{44\}?
 
9:18 PM
Why not create some sort of shrine and sacrifice people to the God of Markdown?
We could sacrifice people who ask about i++ + ++i.
 
@EtiennedeMartel Won't work.
 
@RMartinhoFernandes We can always try.
 
I mean, the people will get sacrificed, but the God of Markdown won't listen.
 
@RMartinhoFernandes even so, I like the idea of sacrificing people who ask that question
@RMartinhoFernandes yes. Took me a while to figure out what that must mean, but happy to say I deciphered it without googling it! I did google ASCII character 44 though :/
 
Clang is beating MSVC in compile speed... Nice :)
 
9:33 PM
    Object previous_recording = null;
    if (previous_recording != null) {
 
@rubenvb Not surprising, MSVC does multipass parsing
or some deferred magic shit
 
my coworkers are lucky I live three states away
 
@MooingDuck Oh joy.
 
otherwise they couldn’t figure out ambiguous dependent names without typename qualifier
 
hmm, x64 clang makes stuff crash. Let's try x86 tomorrow, might have better luck
 
9:36 PM
@EtiennedeMartel in all cases, this code says (into the telephone) "call for That information is not available."
 
Answering vim questions by repeated application of :help is fun.
 
there's some things you just don't want to learn
I just learned what a "dirty iceberg" is, and I did NOT need to know this!
 
@TonyTheLion Hopefully you'll keep quiet and we won't learn about it too.
@TonyTheLion What a friend you turned out to be...
 
could anyone have a look at my question about buildning for visual studio?
 
9:39 PM
shared libraries
 
@TonyTheLion TO THE GOOGLE!
 
1
Q: Qt Link shared library in Visual Studio 2010

chikubaI'm working on a project where I have to split the project into smaller ones, where one of them will be a shared library. Working in Visual studio 2010 and have both of the projects in the same solution. The project file for the shared lib looks something like this: QT += network QT ...

 
(I always keep Safe search turned off. I live dangerously.)
 
im having serious linking issues and im not too sure how to solve this
 
@EtiennedeMartel oh
:(
 
9:40 PM
or if its even possible in visual studio
 
@RMartinhoFernandes well, just don't google it
 
some ppl from the past sais its not
 
Oh. It's not that bad.
Seriously, Tony, I was expecting more.
 
NOT THAT BAD???
dafuq???
 
@TonyTheLion Yeah, right.
 
9:41 PM
lulz
 
That post is tl;dr.
 
is anyone here good at qt?
 
It's a wall of badly formatted text. :.
 
Qt wrecks my shit faster than a nuclear missile.
 
9:43 PM
@mo
@MooingDuck your comment disapeared
 
@chikuba yes, because I was wrong, and wanted to remove the misinformation.
 
@rubenvb Nice. How big is the difference?
 
all im trying to do is compile a shared lib and use it in another project
 
@jalf did not measure, sorry. It might be hugely biased, I was doing three things at once...
 
So, I commit a file named Pathfinding.h. A few months later, I check to see that a colleague of mine has commited a file named FasterPathfinding.h. How cruel.
 
9:44 PM
which shoudln't be too hard
@CatPlusPlus feel free to format it. i did as good as i could
 
Rewrite it a bit. Make it more to the point, limit the code to the minimal relevant stuff.
 
@rubenvb ah, well still nice :)
so tired of hearing MS say that there's nothing they can do to speed up compile times
although I believe their two chief offenders are writing out debug symbols and the linker
 
@jalf I'm pretty sure that's true, they're just omitting the "except throwing all that crap out and starting over from scratch".
 
@EtiennedeMartel they should commit to Clang.
 
@MooingDuck rewriting the question. wrote it yesterday after a long day at work
 
9:47 PM
Everyone should use and build on Clang...
 
@rubenvb I wish...
 
Politics, politics...
 
@JohannesSchaublitb x64 Clang was a bust: 1000 failed LLVM tests alone. Kind of expected. I'll try x86 when I get the chance.
 
Damn, already 18h.
 
@MooingDuck there
 

« first day (514 days earlier)      last day (4428 days later) »