« first day (1112 days earlier)      last day (3838 days later) » 

Xeo
12:00 AM
@BartekBanachewicz Oh, you really don't want that. Should I downvote some of your answers so you don't reach it? :)
 
@Xeo I'll just lay down and wait for it to come.
 
then it will get reverted the 2nd day
automatically
 
I'll say good night, too. Thank you all for keeping stack overflow alive with your massive expertise!
I'll check back in tomorrow :}
 
hi again
 
@LucDanton you cant see this but hi
 
Xeo
12:08 AM
Crap. Another choice.
 
@Xeo Same situation as in, say, void foo(T, bar<T>);. If you don't pass in something derived from bar<U> as the second argument, it can still work.
 
Xeo
Hm, foo(T, std::function<void(T)>) doesn't if you pass a lambda or function pointer or whatever
 
Mmmh how come old style SFINAE with bar<T>* and 0 used to work then?
 
Xeo
pointer can always be constructed from 0
type is irrelevant
 
Well and it still does of course.
@Xeo I'm more interested in the process of deduction.
 
Xeo
12:12 AM
Funny thing, {} actually works
guess since it just has "no deduction" instead of "failed deduction"
 
Okay so I thought passing in 0 worked because deduction took place first but that's not how it works then.
 
Xeo
@LucDanton Wait, was the T ever actually a deduced type?
IIRC it was either from enable_if or an explicit template argument
 
@Xeo Oh right. Not necessarily, but it could be.
E.g. constrained constructor template.
 
Xeo
If T is actually deduced, passing in 0 doesn't work, yeah
sorry for the confusion
 
@Xeo works for me
 
Xeo
12:15 AM
?
You mean the explanation or the deduction?
 
alright
I've got some functions and I'm not sure how to classify them.
 
for example, I have a helper function that stitches all the stages together and compiles some files, which I use for basically all of the driving projects like tests, CAPI, CLI, etc.
 
Xeo
@LucDanton Ah. Well, no deduction there through the second parameter
 
Right.
 
12:17 AM
I guess I could argue it's a Driver function.
 
@DeadMG Reasonable enough.
 
Xeo
That's normally called a driver yeah
 
well, here's another example.
I have a mock/empty code generator, which is pretty much used for tests, and it's also used by the Intellisense driver.
so part of me really wants to label it as a testing thing, but I also have a completely non-testing use of it.
 
I guess to some extent, you could argue that providing intellisense support like that is at least partly akin to just live testing.
 
12:22 AM
@DeadMG Do you mean just the generator? I would be fine with a name like 'null code generator' or 'no-op code generator'.
 
@LucDanton Yeah. Right now I named it as a mock generator, but I'm looking to rename that.
but, again, it's only useful from driving projects that don't want to generate code, so I might stick it as something like Wide::Driver::NullCodeGenerator.
 
Xeo
@melak47 Right
 
cool. thanks :)
template <typename T, EnableIf<is_trivial<T>> = 0>
T read(ifstream& stream)
{
    T t;
    stream.read(reinterpret_cast<char*>(&t), sizeof(T));
    return t;
}
does this make me a bad person? :E
 
yes.
very, very bad.
you need to at least static_assert or SFINAE on std::is_pod.
 
oh, I forgot
 
12:34 AM
The actual requirement is trivially copyable (still not fixed I think?).
 
I thought is_trivial would be enough, what's the difference between that and is_pod?
 
POD means you get standard layout type as well.
 
12:49 AM
Hello, guys!
 
Xeo
@Jonathan ah yes, I always forget about noexceptDavid Brown 8 mins ago
Hahahaha /cc @R.MartinhoFernandes
 
@MartinJames, how was that babe?
Evening
 
so...do I want just is_pod, or is_trivial and is_pod?
 
@Jefffrey I just got back from the boozer, so I've lost context, (and some neuron functionality). Maybe I'm slaughtered.
 
Xeo
9 hours ago, by Martin James
I got laid today.
 
1:01 AM
@melak47 is_trivially_copyable.
 
@MartinJames I hope you thought about me during it.
 
TBH, no. I was more worried that I'd run out of lime pickle to put on my curry. Luckily, I had an extra jar in the kitchen cupboard.
 
Xeo
So, Bastion done
 
@MartinJames Hmm. I don't think we are talking about the same thing. Follow the arrow from the last message. :/
Or maybe you are talking by metaphors...
 
I still don't understand why I got 13 stars for ' I got laid today' - I've been married for 19 years.
 
1:06 AM
lol
 
If I have indexed vertices and unindexed texCoords, is it possible to draw them at the same time? or do i have to duplicate the vertices as soon as texcoords are involved?
 
So it was quite the achievement then!
 
@MartinJames I think the problem here is that there are too many childs here
 
@Borgleader Why would you dupe the texcoords?
wait, what the fuck even is indexed texcoords?
why aren't your texcoords in the vertex structure?
 
As an add-on, I won't get laid tonight. Anne is somewhat allergic to chilli, so a chicken jalfrezi, turbocharged with scotch-bonnet chillies, guarantees no sex.
 
1:12 AM
lol
 
@DeadMG S'OK, capsicum beats copulation, anyday :)
 
lol
 
@DeadMG A) I wouldnt dupe the texcoords, B) right now my only mesh is a cube, my vertex data is hardcoded and I started working with only positions in 3d space, now im adding textures. I was wondering if I could draw the vertices (positions) using the indices and withought indices. but it seems i cant
kinda sucks because i'll have to duplicate a lot of data vertex data =/
 
@Borgleader The trick here is that you're supposed to put the texcoords in the vertices.
 
I feel like there's a way to simplify this merge sort algorithm, but I can't quite grasp it.
 
1:20 AM
I know, but I was trying to treat each face individually (texcoord wise), although it seems like a futile attempt now
 
@Borgleader Yeah, that's not how it works at all.
 
ill see about reworking the uv coords to make this work
 
usually, you use a modelling program to generate the texcoords, AFAIK.
it's not the kind of thing you want to be doing manually.
 
This is gonna get closed...
http://stackoverflow.com/questions/19719355/what-should-i-do-after-broken-with-girlfriend
 
62
A: How to loop through a c++ map

DeadMGYou can use an iterator. typedef std::map<std::string, std::map<std::string, std::string>>::iterator it_type; for(it_type iterator = m.begin(); iterator != m.end(); iterator++) { // iterator->first = key // iterator->second = value // Repeat if you also want to iterate through the se...

62 upvotes for such a simple answer.
 
1:24 AM
@DeadMG Yeah well, I wont be. Once I add mesh loading facilities xD
I didn't want to work on that until I could actually see said meshes
OpenGL with glLoadGen headers (not GLEW) and a bit of wrapping on my part is a lot less painful to work with than I expected
 
I love you, MSVC iterator debugging mechanisms
 
@DeadMG Yes, but it is a bit verbose
 
1:41 AM
@DeadMG @Borgleader can you think of any reason to have 4 component normal values for each vertex?
 
@DeadMG i++ instead of ++i?
 
@Rapptz I was never a big believer in that being really important.
 
1:54 AM
Happy Hanukkah.
Or.. whatever it is.
 
It's Halloween.
 
Sigh.
I shall forever give up attempts at humor.
I am like 0/20.
 
Well that looks better than what I had before
 
What does it do?
 
Well my texture coordinates arent fucked up for one, but so far its a spinning/moving cube
 
1:59 AM
Responding to mouse or arrow keys?
 
no, its a sine wave for now
 
No idea what that is.
But hey, congrats.
Way better than I ever did.
 
sin(time) :p
 
The sine wave or sinusoid is a mathematical curve that describes a smooth repetitive oscillation. It is named after the function sine, of which it is the graph. It occurs often in pure and applied mathematics, as well as physics, engineering, signal processing and many other fields. Its most basic form as a function of time (t) is: :y(t) = A \cdot \sin(2 \pi f t + \phi) = A \cdot \sin(\omega t + \phi) where: * A, the amplitude, is the peak deviation of the function from zero. * f, the ordinary frequency, is the number of oscillations (cycles) that occur each second of time. * ω = 2πf...
constant spin + sine wave up and down
 
@Borgleader why is it called Sandbox? :D
 
2:02 AM
That's what I call most of my projects xD
OGLSandbox, PhysxSandbox, ...
 
I think I call my "xxxTest"
This from the person who has four projects named Snake.
So yes.
 
Snakezzz :D
 
Well.
Last time I innovated with "Snake 4"
So now every time I used git, I need to use qoutes.
I remember this old Windows screensaver.
It had a colored cube, which also turned into balloons or something.
 
So I dismounted the motherboard. And I see what happened.
One of the memory lanes melted and I see ash.
3
oh well...
 
:o
 
2:06 AM
Not something I can just solder back.
 
@Mysticial This is why you can't have nice things
 
since it's small and that'll add capacitance.
 
I have this model file I'm trying to decipher...and there's N normal values, same number as the vertices...each is stored as a single uint32_t, and unpacked into 4 floats. why normals with 4 components? what could it mean? :S
 
Xeo
@Mysticial wtf are you doing
 
2:08 AM
I want to meta-star the "I got laid today.". That fact that this is the highest starred message is so funny.
 
@Xeo he fried his sandy bridge mobo by putting in RAM the wrong way around :/
 
Xeo
... wait, seriously?
 
@Xeo Yeah. I destroyed my favorite computer yesterday when I was trying switch its ram with the new AMD machine that I build 2 weeks ago.
 
@StackedCrooked I just followed on from 'I got paid today'.
 
20 hours ago, by melak47
> Breaking news: Bulldozer demolishes Sandy Bridge, 4 RAM sticks in uncertain condition
 
2:09 AM
@StackedCrooked how exactly does one meta-star something?
 
So that AMD machine that was supposed to used as a test workstation, is now my primary machine. So for much eventually giving it to my Uncle.
 
@Mysticial Yeah - that's shagged. New mobo.
 
Xeo
@Mysticial How the fuck did you manage to put it in backwards?
 
@Pawnguy7 I can't unfortunately.
 
@Xeo Extreme violence, I assume.
 
2:10 AM
@Xeo It was dark in the case, and the notch wasn't large enough to prevent the clips from locking.
 
Xeo
@Mysticial Oh gawd
 
And the fact that I wasn't paying as much attention as I should've.
 
Xeo
What kind of RAM slots are those, not doing what they're supposed to do :/
 
@Mysticial You could not feel that something was mechanically wrong?
 
I'm waiting for a response from my parents overseas before I get a new mobo and CPU.
 
Xeo
2:11 AM
Or maybe the RAM had too large a gap
 
what the hell kind of normals are these :E
 
Since I'm close to maxing out my credit card.
 
And I'm not gonna put $600 on my Dad's card without his permission.
 
Xeo
@melak47 Looks normal
 
2:12 AM
hue ._.
 
That reminds me.
 
Xeo
(I'm punning, don't pay attention to me.)
 
Debugging in VS 2013 seems to show strings as... well, something you can read, instead of what they are.
But only half the time. I cannot figure it out.
 
dunno. need more info :p
 
Xeo
std::strings always had a nice visualizer
same for I think all standard containers, iterators, shared_ptr / unique_ptr
 
2:14 AM
yeah
but visualizing non-Standard classes was always terribly shit.
good luck visualing a boost::variant.
and the visualizer of a std::function is pretty awful too.
 
Xeo
ahahaha
 
@DeadMG maybe concepts will help with that.
dont mind me im tired >,>
 
Wow, the thermal paste is pretty dried up.
That explains why it ran so hot.
No more Arctic Silver 5 for me...
 
'Bus fire in southern India leaves 42 dead', bus fire in @Mysticial computer leaves 42 GB dead'. Not sure which is worse.
 
@Borgleader No, it most assuredly won't.
@Mysticial Man, I just bought that shit, and it's like, a month later, and my CPU is back up to 100 degrees.
 
2:18 AM
I was thinking if theres a container concept maybe the visualizer could idk, show the elements using the container "layout"
but idk what im talking about
 
My 64GB workstation is also having increasing CPU temps. I thought it was because it was degrading after all these years.
But they use the same thermal paste.
Fuck that...
When I get the time, I'm gonna fix that.
 
if you find any decent thermal pastes, tell me.
I need one with a longer duration than this AS5 had.
 
will do
Goddamit, I have like 2 tubes of AS5...
They're great for short-term overclocking.
Shit for long term.
 
2:34 AM
I didn't even overclock with mine :(
 
My 64GB workstation that I last put together about 2 years ago has had it's temps increasing lately.
So much so that I had to open the window to keep it cool.
 
did you dust it recently?
 
That's a long term machine. So it needs long lasting paste.
@Borgleader Dusting doesn't fix the thermal paste.
 
no but a case full of dust has shit airflow --> high temps
 
@Borgleader It's not the airflow that's the problem.
The it's an open-case rig.
I have a room fan blowing into it.
 
2:45 AM
oh
 
Do centered highscores make sense?
 
wtf... every single thermal paste says to re-apply every 6-12 months.
seriously?!?!
Not all of us are upgrading every 6 months.
And not all of us want to take apart a machine that's already been built.
 
I sure don't.
 
i've been running some coolermaster based compound for more than a year now.
 
those Intel fan mounts, I can never get them to work for me.
I can never mount the CPU fan correctly.
 
2:52 AM
@xslr One year is not enough. I'm looking for something that will last 5 - 10 years.
I love building machines. But once I build them, I do not want to take them apart - ever.
And this is especially the case for my dual-socket workstation where there's a layer of fans levitating above the motherboard. I hate taking that thing apart.
 
@Mysticial 10 years! With failure rates of about 10% each year even from the best OEMs your half life is about 5 years. The worse are about 20%
 
@Mysticial i wish i could use a machine that long.. they tend to get outdated in 5 years, imo
 
this machine will be 4yo in a couple months.
I'd like to replace it, but that would be way too expensive for me.
 
@xslr My "primary" machine keeps changing about once a year or so. But I keep the old ones around for computational and programming purposes.
 
ah. that makes sense.
 
2:54 AM
@DeadMG buy a Cray
 
@xslr But in particular, my 5 year-old dual-socket rig with 64GB of ram is still my most important machine because it still has the most ram of all my machines.
 
Xeo
@Mysticial ny thermal paste has been on for about 6 years I think
 
Despite the fact that I've been maxing out the ram on every computer I've built since.
 
@Xeo which paste is that?
 
2:56 AM
@Xeo model?
 
Xeo
no clue
was prebuilt
 
oh
Surprisingly, the "paste" that comes with stock heatsinks tend to be very long lasting.
 
@Mysticial Not really surprising at all. If it dies, and the CPU dies of overheat, wouldn't the manufacturer be liable for a replacement?
 
Found it.
 
Xeo
2:57 AM
@Mysticial wasn't stock cooler
 
@DeadMG good point.
 
I added a bool to the function, but didn't update it in the header.
 
so they'll throw on something that works at a basic level, but with like, 99% confidence it will last for the warranty duration.
 
Xeo
got a silent arctic cooler on top of my cpu
 
2:58 AM
Should I make the left edge of these line up?
Or.. each column, that is.
 
no
make the middle edge.
comparing the scores is effort when the leftmost digit is not lined up.
 
Ah.
 
Xeo
leftmost?
 
12345, 1 is the leftmost digit.
 
Xeo
I prefer right-aligned
 
3:00 AM
ah
 
yeah me too
 
almost exactly twelve months since I applied this paste and re-mounted the heatsink.
guess it's time to re-mount and re-apply again.
 
Xeo
@Rapptz I know what it means, was meant as "you serious?"
 
@Xeo it was ambiguous.
 
Xeo
I guess
 
3:00 AM
12:30:40 10/27/12	CPU#0 (Core#6):	52	50	69	0	2806.44
12:30:40 10/27/12	CPU#0 (Core#7):	52	50	69	0	2806.44
Session end:	12:30:41, October 27, 2012
Session start:	14:08:37, October 23, 2013
Time & Date	CPU	Temperature	Low temp.	High temp.	Core load	CPU Speed
14:08:38 10/23/13	CPU#0 (Core#0):	97	97	99	43	2806.42
14:08:38 10/23/13	CPU#0 (Core#1):	104	104	104	39	2806.42
 
Xeo
intonation would've made it unambiguous
 
So my mom got in a car accident today with a police car
and the cop gave her a ticket
isn't that a dick move?
 
wut
 
not if she was committing a relevant traffic offence such as speeding at the time.
 
She's also in the hospital now
She wasn't speeding
to be honest I don't even know what the ticket is for
 
3:02 AM
then I'd go with less of a "dick move" and more of "unwarranted prosecution".
 
Oh shit. Hospital. She okay?
 
Xeo
oh lookie, 4am
 
temporary paralysis and some minor bruises
 
@Mysticial My guess is that if she wasn't going to be OK, he would have led with that instead of the ticket.
 
Xeo
time for some sleep
 
3:03 AM
@Rapptz sorry to hear that
 
Good point.
@Xeo night
 
night.
I only got up a few hours ago :P
 
@DeadMG I actually would have led with the ticket regardless :P
@Xeo night
 
@Rapptz Damn.
now every time you open with something light, I'mma be like, "Is he next going to announce that he's been diagnosed with cancer?".
 
I spent my Halloween in 2 different hospitals.
 
3:04 AM
I would feel sympathy for you, but I don't get Halloween and don't see why it would be worse than spending any other day in hospital(s).
not that I don't feel sympathy for you anyway, but. You get what I mean. I hope.
 
Oh I actually don't care for Halloween, I just found it funny.
 
fair enough.
in which case, I guess I can see the amusement of spending your Halloween in places that people really do find scary, as opposed to fake-scary.
 
I bought candies for the kids, they didn't come (I came home quite late myself last nights)
 
It was kind of odd going to the other hospital and smelling McDonalds of all things.
Usually when I go to a hospital, the smell of fast food is the last thing I imagine.
 
lol
I gotta admit
the current height of my culinary ambitions is a bit of jam on toast.
 
3:09 AM
@DeadMG The only thing I can find that will actually last long term is also permanent: newegg.com/Product/Product.aspx?Item=N82E16835100005
 
DeadMG's CPU temperatures: 72C x4, all cores <5% load.
 
wow
 
yeap.
 
inb4 puppy
 
Nah, just me.
 
3:18 AM
:)
 
> A Safer Alternative: unsafePerformIO
That was unexpected.
 
Was in Warren.
 
@ScottW Ticket on the windshield?
 
I guess we really do live like 10 minutes away.
 
I'm looking the demonyms for Illinois and they aren't that great. Anyway it just occurred to me but we do have a share of Illinoisans here right?
Well I was thinking about you three even though I don't remember why or how long @Mysticial was in Chicago.
As an aside, I know US geography mostly from Railroad Tycoon 2. Yay videogames!
Oh and I wasn't that great at it for the longest time because I kept on moving mostly passengers. You know, because that's what trains do.
 
3:31 AM
alright...most of this model format is read in. Haven't figured out what some parts are yet, though (like the 4 dimensional normal, tangent and binormal values)
 
@melak47 that looks neat
 
except for the sizes of everything being ints :E
 
What does read<string> do?
 
removes boiletplate from istream::read probably
 
Or rather, what does it look for? For termination?
 
3:35 AM
nah, strings are prefixed with length
template<>
string read(ifstream& stream)
{
    int capacity = read7BitEncodedInt(stream);
    if (capacity < 0) throw std::runtime_error("invalid string length");
    if (capacity == 0) return string();
    auto chars = read<char>(stream, capacity);
    return string{ chars.begin(), chars.end() };
}
 
neat.
using namespace std looks weird to me
everything feels naked
 
I just using'ed the couple types :)
 
I find it interesting and neat I can read old news just like this
 
ModelDummy
 
the only problem is....I thought I saw some model files where the order of some of the contents wasn't the same as here - yet the importer I disassembled does only this fixed order o.O
 
3:40 AM
I would use auto though. The type is clearly visible in the read<T> calls.
 
Me too.
 
@StackedCrooked not entirely sure what that is either :D
 
@melak47 why not unsigned?
 
yeah I suppose I could've auto'ed
@DeadMG idk, the C# importer I disassembled read all the sizes as Ints, so I was too scared to change it ;_;
 
First of all, is it a ModelDummy or a DummyModel?
 
3:43 AM
ModelClassAuthoredByDummy?
 
@DeadMG Unsigned is the new evil.
 
@StackedCrooked ModelDummy
 
At least that's what I got from the C++ talks a few months ago.
 
@StackedCrooked whut?
 
@DeadMG lol
 
3:45 AM
@StackedCrooked I think they define the location of some game entities on the model, like computer terminals and other interactive stuff...but there sure is a lot of them
 
@melak47 Bjarne said to only use unsigned if you need the extra bit or if your logic depends on the unsigned wrap-around.
 
@StackedCrooked but why would I be storing indices in signed ints :E
 
Because Bjarne said so!
Dammit, learn to listen.
 
but but std::size_t
 
@Jefffrey That's still shadowing, but ideone's GCC options promote it to an error so I didn't bother re-demonstrating it. — kfsone 47 secs ago
Wat
 
3:49 AM
@melak47 Herb Sutter replied: "We were young back then." (It should have been signed.)
 
@StackedCrooked and operator[] for containers should accept ints as well?
 
I suppose.
 
"hello"[-1] == 'o'
 
but I like my uints ._.
 
me too
 
3:51 AM
However, I use unsigned, because it's an old habit (they used to teach me to use unsigned if it cannot be negative) and because it doesn't lead to compiler warnings when used in combination with stl containers.
 
I still use unsigned if it can't be negative
 
using unsigned in a few places made my board game AI for uni faster
 
faster?
 
plus the extra numbers
 
I think it was because of modulo...or something
@Rapptz moar numbers!
 
3:53 AM
2,147,483,647 vs 4,294,967,295
 
Many years ago sometimes made this mistake: for (unsigned i = 10; i > 0; --i)
Or if (a - b < c), which I now replace with: if (a < b + c)
Those are the classic unsigned integer pitfalls (in my exerpience).
 
and I do none of them :P
 
lots of these uint8_t's were int8_t's before. changing them allowed the compiler to optimize better :)
 
@melak47 That's incredible!
Changing int8_t to uint8_t never did anything for me :(
 
3:57 AM
TIL I can press t on any repo on github and it'll allow me to search a file by its name.
 
@melak47 You should change benchmark the current code. Then change them back to int8_t and benchmark again. It might be that the improvements you perceived were the cumulative result of various changes.
Or maybe you are right.
But I won't believe it.
 
@StackedCrooked I don't see how they're not both equally susceptible to overflow.
 

« first day (1112 days earlier)      last day (3838 days later) »