« first day (1751 days earlier)      last day (3188 days later) » 

11:01 PM
Okay, my understanding is that, if I have a class with dynamically allocated data member, presumably, this class only accepts a specific object, I must define a cpy ctor, dtor and copy ass op.

Why not a base class with the same description above?
 
If one of your members needs special treatment by big three/five, refactor it into another class
or use existing classes like std::vector
 
> I must define a cpy ctor, dtor and copy ass op.
You misunderstood the rule of three.
 
It's all ass ops
 
You don't must anything.
 
C++ is ass
 
11:03 PM
You can just make them unusable.
@hello Use the rule of zero. flamingdangerzone.com/cxx11/rule-of-zero
 
@hello If your class has ownership to deal with, it shouldn't deal with anything else.
 
If I have a list of N integers that I want to put in another list where no duplicates are allowed where N will be ~2000-5000 at most, what container would you use for the unique list? A set? A vector with ordered insertion and lookup (binary search) to check if a value exists? Something else? I want to minimize the time taken to create the unique list.
 
okay, thanks everyone. Really appreciate.
 
Dunno, If I were you I'd just benchmark several alternatives and choose the one
 
11:08 PM
@CatPlusPlus You're just bad.
 
Bad ass
@Prismatic Set is a container for sets
5000 elements is literally nothing and you're already microoptimising like a butt instead of thinking about semantics
 
Or maybe I'm optimizng something thats too slow
 
If that's your bottleneck then lol
 
Profile it then
Also test, test and test
 
Yeah I got a little tired of sticking little timers everywhere so Im just going through a bunch of code and trying to fix shit at a macro level
 
11:13 PM
That's not profiling
We figured out how to automatically instrument code a long time ago
Also optimisation without identification is invalid and a waste of time
 
what's profiling? Looking at cryptic callgrind output? Spending days cutting away at the functions with the biggest instruction counts and seeing virtually no improvement?
 
Analyse first, write code later
 
I'd rather use timers and see what takes the most amount of time, and focus on that
 
Uh instruction counts don't matter
 
Buahahahaha
 
11:15 PM
Profiling reports both cumulative and exclusive times
 
Also it doesn't matter if you have the fastest optimization if your algorithm is bad
 
It's literally automatically wrapping everything in a timer
 
I dont see any time based output with callgrind
 
I don't believe for a second that uniquifying a 5k element list is any kind of bottleneck
Without both a large picture and down-to-instruction view you can't effectively optimise shit
Also the set might benefit from a pool allocator, but it definitely won't benefit from reinventing the wheel
 
> FAILED: g++ -MMD -MF obj/src/lib/semantic/semanticanalyzer.o.d -c -Wall -Wextra -std=c++11 -g `deps/llvm-build/bin/llvm-config --cppflags` -Iinclude -isystemdeps/llvm/include -isystemdeps/llvm-build/include src/lib/semantic/semanticanalyzer.cpp -o obj/src/lib/semantic/semanticanalyzer.o
virtual memory exhausted: Cannot allocate memory
wut...
 
11:21 PM
Don't use 32-bit compilers
 
> borgleader@Holodeck:~$ sudo apt-get install g++-5
not sure how i was supposed to get the 64 bit version
 
What's your uname
Also file $(which g++)
 
`readlink -e g++
 
@CatPlusPlus /usr/bin/g++: symbolic link to `/etc/alternatives/g++'
@Mikhail that gave nothing
 
file -L
 
11:25 PM
/usr/bin/g++: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=cbab457e97e3188e1c9ab42642267f20ca69d901, stripped
 
lol okay then I don't know
It really shouldn't run out of virtual memory
 
maybe build without -g
 
hey is it off topic on SO to ask someone to write me a little bit of code?
 
we wont
 
11:27 PM
@Aequitas Very off-topic
 
It's always off topic, unless it has money offer attached
Everywhere
 
Even then it's off-topic on SO
 
@unordered_meow aite cheers
 
@DonLarynx needs more masonic imagery
 
@Mikhail what is this person's emotional state?
a) bewildered
b) contemplative
c) happy
d) sad
 
11:33 PM
b
 
Actually, if you look at Mr. Stroustrup's eyes, they're wide open. He's bewildered.
 
He has purposely chosen a contemplative posture, but the camera flash has left him bewildered. In the next frame he actually falls off the chair.
 
this-^
 
lawd that's perfect 10/10
 
No sparkle:(
 
11:36 PM
@MartinJames How's your PC
 
@unordered_meow Still bricked. 78C with the flintstone and a desk fan blowing into the case.
 
I hope it'll get better soon
 
@unordered_meow Me too. Building software takes it up to 98C:(
 
@CatPlusPlus Oh, I moved partitions around earlier (i resized my .vdi and needed to expand the partition) forgot to turn swap back on
works now
still, i alloced 4GB of ram to that vm
 
11:57 PM
@MartinJames Reapplied thermal pastie?
 
@MarkGarcia Yeah. Cleaned the old gunge off with vodka first.
 
is this a P4 by any chance?
 
Or AMD.
 

« first day (1751 days earlier)      last day (3188 days later) »