« first day (1499 days earlier)      last day (3441 days later) » 

3:00 AM
@R.MartinhoFernandes :)
For what it's worth, it wears off after three days or so of near-constant playback. Which is actually kind of sad because I don't get all the awesome feels now.
 
@LightnessRacesinOrbit I tend to listen to single-track playlists for weeks on end.
 
@R.MartinhoFernandes Why not?
 
Well, because I'll end up getting that one when it's available in not-Muricah..
 
@R.MartinhoFernandes Because you are inevitably going to buy the already-released editions in the interim?
 
I did on Friday.
It arrives Monday.
 
3:03 AM
heh
COME ON TARS
COME ON TARS
 
Dumb idea to have iced coffee with seafood for lunch
 
dumb kitty is dumb
 
3:25 AM
in Maid Café (メイド喫茶) on The Stack Exchange Network Chat, 15 mins ago, by Frosteeze
http://www.scs.stanford.edu/~dm/home/papers/remove.pdf
 
@Mysticial It gets better though--it was accepted for publication in a (supposedly) peer-reviewed journal: scholarlyoa.com/2014/11/20/…
 
Yeah, someone just told me that in the other room.
 
@Mysticial Time to submit a statistical analysis of "Peer Reviewed Journals that accept obviously-bogus papers".
 
I have a struct for which I want to overload operator>> which essentially boils down to a memcpy. How can I memcpy out of an istream?
 
bye Lightness, I have to leave now.
 
3:32 AM
@Borgleader istream::read (is about as close as it gets).
 
@JerryCoffin thanks
 
@Borgleader One virgin is sufficient thanks for such a minor service.
 
sometimes I wonder it's right for us to play with newbies like cats would do to rats. but most of the times, I feel it's justified
it's like 'there is a new person who seems to be dumb, let's find out whether this newbie is really dumb or just ignorant ~slap~ ~slap~ ~slap~'
 
stream.read(reinterpret_cast<char*>(&header), sizeof(FileHeader)); seems nice enough
 
@Borgleader I have a hard time calling anything that includes a reinterpret_cast "nice", but it works anyway.
 
3:38 AM
@JerryCoffin Usually me too, but in this case, I think it's acceptable.
 
@Borgleader I'd agree with acceptable.
 
Ell
@Borgleader you could std copy
With a streambuf_iterator
 
@Ell You could, but read is almost certainly preferred under the circumstances.
 
i guess, but it makes the expression less easy to read, and IIRC you have to introduce "useless" parentheses on the second one to prevent MVP
 
Ell
@JerryCoffin why is it preferred?
Oh wait
Yeah std copy would require ugly casts too
 
3:45 AM
@Ell ...and is frequently quite a bit slower if the amount of data involved is significant. See Tyler McHenry's answer along with this one: stackoverflow.com/a/2602258/179910
 
Ell
I don't think the flexibility of cppreference can be achieved using generated documentation
 
@Ell I think that depends (to at least some degree) on what you mean by "flexibility" and by "generated documentation". If you mean "machine generated documentation rarely approaches the quality of hand-written documentation" I'd mostly agree though.
 
Ell
Wow 26 seconds vs ~1
That's an inexpected factor of slowdown
@JerryCoffin I mainly mean formatting. But I guess its true for that case too
Unexpected*
I mean that in cppreference pages have arbitrary sections and additional bits specific to particular functions or classes
 
@Ell Ah, fair enough (and, again, I agree).
 
Ell
I've experimented a little with sections in function lists but that's all
I don't think my idea of inline documentation editing is possible with the level of flexibility that cppreference provides because the data still has to fit within what the HTML templates expect at the end of the day
 
4:06 AM
@Ell To get close with machine generated docs, you'd probably have to start with a template that included (roughly) the union of all the possible fields, then have it automatically remove those that were empty.
 
4:17 AM
Hey guys
 
4:27 AM
@Andy Hello.
 
What's worse than trying to parse HTML with regex? Trying to parse HTML with regex in C++:
0
Q: Using C++11's regex class to parse HTML attribute-value pairs

Failed Software DeveloperI'm new to using <regex> and I'm making an HTML parsing program and I want to parse expressions such as "class='class1 class2'" and separate it into a corresponding pair ("class", "class1 class"). So I have the following lines std::string s("class='class1 class2'"); std::regex e("([A-Za-z0-...

 
oh no
 
@Mysticial Was just glancing at that. I have this strange feeling that the pony is going to come again...
 
I'm trying to insert "blank data" in a struct. I tried using anonymous structs to do the job, but im getting a redefinition error on the second one (See NULL entries in the header)
 
so much smash today
I'm actually tired
 
@Borgleader m8 just skip the null byte
it just designates the end of the header
what are you trying to do lol
 
Prophesy fulfilled. Okay, I'll admit that as prophesies go, that was a pretty obvious one.
 
@Rapptz Read KotoR data files
 
good luck
that wiki is fairly informative
is this your first time extracting?
damn I'm tired
I'm gonna just sleep
 
Yes, but while that wiki is informative, it probably isn't exact for what I need because a few games were made related engines
 
4:42 AM
50 reputation points to comment on a new question. Why?
 
:<
 
so theres probably a few discrepencies
 
@edition To reduce spam (and probably to motivate new users to contribute at least a few decent questions and/or answers).
@Rapptz G'night.
 
but comments can always be removed/edited?
 
@edition Comments can only be edited for 5 minutes after posting them.
 
4:45 AM
i guess I need more points
 
@edition Post one answer like @Mysticial's, and you'll have a good start.
 
13701 upvotes!
 
highest upvoted answer on SO (if memory serves)
 
@Borgleader I believe so, yes.
 
Hey guys suppose I had a constructor:

foo:foo (int x = 125.00, int y)
{
X = x;
Y = y;
}

But I wanted to declare an object of the base class like:

foo f = (y_value) //only one argument is specified

How can I go on doing this without creating a second constructor just for y?
 
4:53 AM
You can't. Optional parameters must go on at the end.
 
Can you elaborate on what 'optional parameters' mean?
 
@R.MartinhoFernandes I'm wrong?
 
No. I meant, that question o_O
 
I was asked to have an instantiation with only one parameter and have only one constructor with two arguments, one argument defaulted to a value. (plus the implicit constructor)

Is this possible even? That's why I'm asking
 
5:02 AM
Playing fast and loose with terminology here. Are those the words your assignment use?
 
@BDillan The parameters that have default values (e.g., x=125.00) must be the last parameters--i.e., if you scan through the parameters from left to right, when you get to one that has a default value, every parameter after that in the list must also have a default value.
 
ha I just realized I set an int to a double value. Nice one BDillan
@JerryCoffin I see
 
@BDillan When calling the function, you need to do the same--if you accept the default value for one parameter, you must accept it for every parameter after that in the last as well.
 
If you don't want that behavior, then you need to provide a bunch of overloads for all the combinations you want.
 
You can't do a call like f(1, , 2) to accept the default parameter for the second value, but pass a non-default value for the third.
@Mysticial ...and ensure that they aren't ambiguous.
 
I won't have kids so I don't care.
 
oh
im a moron
5
its not a template
 
6:10 AM
You're allowed to put things in std?
 
> A program may add a template specialization for any standard library template to namespace std only if the declaration depends on a user-defined type and the specialization meets the standard library requirements for the original template and is not explicitly prohibited.
11
A: Is overriding std::to_string for user defined enums proper way to privide to string for user defined enums?

Jonathan WakelyThat's not "overriding" (which applies to virtual functions), and you haven't added a "specialization" (which applies to templates), you've added an overload, which adds a declaration and definition of a new function to namespace std and that's forbidden: 17.6.4.2.1 Namespace std [namespace...

 
6:26 AM
I think anything remotely close to XML syntactically must have its own library and anyone can write it out given the patience
 
 
3 hours later…
9:32 AM
sigh... Little Big Planet makes want to get a PS :S
 
9:55 AM
just think about how much the thing costs and then go play factorio for infinitely cheaper
 
@Puppy well, it's a 3% the price or something like that
 
user1804599
Factor I/O
 
@rightføld :O
 
10:34 AM
hmm
 
user1804599
10:51 AM
lol, a biter on a transporter belt
 
11:05 AM
not really sure if I like factorio
it feels like there's a lot of work w.r.t. designing your factory, but it then takes like, an hour to make that design a reality.
 
user1804599
fail
 
Also Natalia's been sick for the whole night and I went up to sleep at 4 am
 
11:20 AM
@Puppy How about an assert at the end of a sorting function to make sure that the sequence was actually sorted?
 
no.
 
...because?
 
because so what if the guest's data is corrupted, that only justifies killing the guest, not the host.
 
What guest? I'm talking about detecting logic errors in the sorting function.
 
ah, well, you might want to read the whole conversation we had about it
 
11:22 AM
ok
 
but suffice to say, just because the sorting function fails does not mean that the whole program is irrecoverably corrupted.
it only means that anybody depending on the result of the sorting function probably can't continue.
 
Ah, that seems to be a religious issue.
 
which is definitely not the same thing.
 
It probably depends on how well you can isolate "components" from one another at runtime.
 
right; but if you're writing a sort function, how are you going to know how well I did that in my application?
 
11:24 AM
For example, if a pilot wants to see the top 10 of current music, and somehow there is a logic error in the sorting function, then it's probably better to display an incorrectly sorted top 10 than to let the plane crash :)
@Puppy How well you did what?
 
isolated my components.
 
Right, I cannot know that.
Also, the sorting function might be critical for actually flying the plane, who knows.
 
user1804599
If you want to be safe from other components mutating your state (that includes corrupting your memory) the only way to do so is using processes.
 
user1804599
Just like Erlang does, except if you also want to shield from broken C libraries then you need to use OS processes.
 
user1804599
Oh and make it distributed while you're at it; the machine may crash.
 
11:32 AM
oh hey
it's another scisat
guess I really did intend to leave that other scisat randomly orbiting the Sun.
 
@rightføld Erlang = paranoia oriented programming?
 
user1804599
World-wide too. What if the data centre is hit by a large meteor?
 
What if gravity stops working?
 
user1804599
Then scientists would be puzzled for a moment. Then they die so it doesn't matter.
 
user1804599
Point being, the more you isolate the more reliable you can get.
 
11:36 AM
Like, if any one moderator of the Lounge chokes on vomit, there's still plenty other moderators to cover for him!
 
user1804599
Yes. That's because they are isolated; one moderator choking doesn't affect another one's throat.
 
11:50 AM
hmm
my main campaign is still named "Derp Space Program"
 
@FredOverflow Oh god why did you restart this stupid discussion
 
tough to pick a close reason
 
12:15 PM
@JerryCoffin My, my! Hey, hey!
 
"report card"?
'Muricanism?
 
@CatPlusPlus I wasn't aware you apparently already had this discussion :)
 
12:38 PM
Is SO buggy atm?
I want to close a question, but clicking on the close button doesn't open the corresponding window.
 
I can't take it anymore. Any question that has example code containing a system("PAUSE"); line should require that the e-mail address of OP's professor accompany the post.
 
@MarounMaroun everybody know you cannot sort number in Python. — SJuan76 25 secs ago
 
@frasnian lol
 
Really, it's worse than "MIN/MAX" macro questions or "how do I split a string" for the millionth time.
 
@frasnian It's a lot of those, they just cycle
Lately, I've had to tell three people that indices start at 0, though one of them was doing it on purpose
 
12:43 PM
Is Lewis going to take Nik out at the first corner? 15 min to go..
 
user1804599
Nobody cares about system("PAUSE");.
 
user1804599
If OP uses it he's unrecoverably doomed anyway.
 
@chris The other day I mentioned a post that was scary because OP wanted to understand how inheritance worked and the example started class Aircrew : public Person. I was going to stop flying at that point, but the next day I saw a question where the example began class MissileLauncher... I'll just be hanging out in my bunker from now on.
 
@frasnian system("pause"); is just fine for starting debug builds in Visual Studio. I really don't want beginners to mess with the Windows console.
 
@FredOverflow Aren't you the guy that teaches Java
 
12:47 PM
@Columbo I teach lots of stuff.
 
@FredOvert {char ch; std::cin >> ch; }
 
@frasnian Doesn't work if your stream is in an invalid state.
 
@frasnian ... yeah, or just cin.clear(); cin.sync(); cin.get();
 
@FredOverflow You can just put a breakpoint on the exit
 
@CatPlusPlus Do I have to insert a dummy statement for that?
 
12:49 PM
Pausing with system is, always was, and always will be dumb
@FredOverflow No
 
It may be dumb, but it works, and it doesn't require a lot of explanation.
 
I hate when my app works only 85% of the times
 
@CatPlusPlus So I can put a break point on the closing brace?
 
@FredOverflow Use a breakpoint :P
 
12:50 PM
Have you ever witnessed a student trying to kill a program that was paused via breakpoint? It's hilarious :) Not even tasmanager is able to kill the program.
 
@chmod as long as the other 15% pays the bills. Just ask Derek Rose.
 
And of course, all you have to do is click on the tiny blue square. Very intuitive.
 
eh
if you're debugging a program, then you use the debugger's UI.
 
user1804599
Or you know just invoke the fucking program from the command line or use a terminal emulator that doesn't automatically quit.
 
I don't want to debug unless there's a problem discovered at runtime.
 
12:52 PM
there is- it didn't stop in time.
 
@Puppy heh
 
Did Fred just pause the entire chat room? Am I stuck on a breakpoint? WTF.
 
Ugh are there no non-Yesod implementations of OAuth2 for Haskell
 
user1804599
12:59 PM
DUDE
 
fucking crumble and custard
 
@CatPlusPlus What are you doing with Haskell?
 
@Puppy TIL about crumble and custard
 
But I feel like it'll be way more effort and for little to no benefit
 
1:05 PM
Probably.
I'm fascinated by how clean that code is though.
 
Haskell? Where was he on the grid?
 
user1804599
@CatPlusPlus Of course it is.
 
@Jefffrey Nothing special
Also it doesn't do anything, just runs migrations
Monad stacking sucks
 
It really does.
I've always hated transformers.
> I'd give living 9/10, would live again.
lol
 
Maybe Clojure instead
 
1:18 PM
@Ell didn't I say July though?
 
lol
 
I wonder if anyone solved the monad stacking problem.
 
user1804599
1:33 PM
Refining oil is fun.
 
user1804599
@Jefffrey Impurity did.
 
user1804599
You almost never stack monads except for cases where you need to simulate mutable state or do I/O.
 
1:46 PM
> You can implement "continuations" as a monad. This allows you to break people's minds! source
 
Nosebleed again :/
@rightføld Or pretty much any other thing. But yeah, you're right.
 
gotta stop picking it so much robot
 
Not funny.
I'm genuinely freaked out here.
 
Go see a doctor
 
how's your doctor thing going
cause I'm telling you, give it a few years and those guys can be surprisingly helpful
 
user1804599
1:52 PM
lol continuations
 
Does the Robot have iatrophobia?
 
Yes. No. Maybe. OH NOES IT HAS A NAME.
 
@R.MartinhoFernandes oil leak
 
@rightføld Yeah, RWS is a clear example of that.
 
2:22 PM
Right-Wing Shenanigans
 
today I was forced to consume custard and crumble.
it was a tough and gruelling job that had to be done.
for the national good.
 
somebody had to do it
 
Hey there
 
no.
that answer your question?
 
2:33 PM
I would like to setup a CI-homeserver, what s the preferred software? Im currently looking into jenkins, buildbot and go
 
1 min ago, by Puppy
no.
 
rather ask on SO directly?
 
also no.
off-topic.
 
@Serthy please yes
 
it's a question about finding him an off-site resource.
it'll be closed as off-topic in two seconds.
 
2:36 PM
yea, well better than asking in here
 
no its a question on what fits better on c++ for ci
 
which is about finding you an off-site resource.
@TonyTheLion They're both terrible ideas.
 
well, wheres the right place then?
 
programmers.stackexechange
probabaly
 
they will probably not take it either.
I don't know what the right place is.
nor am I going to find it for you.
 
2:39 PM
inb4 there's no right place
some questions aren't meant to be asked :P
 
geez, calm. Somewhere I have to start to ask..
 
try Google.
they make a business out of answering questions.
 
note that you have to specify your actual requirements.
 
I'll give it a try, thanks @milleniumbug & @TonyTheLion
 
2:49 PM
@Serthy Sorry for the rude people here. They can't help being so ignorant.
 
> Rust is a work-in-progress and may do anything it likes up to and including eating your laundry.
aww no nasal demons joke
 
@Puppy Everyone knows nasal demons are too small to eat laundry
Except perhaps for single socks, and there's a lot of competition in that field.
 
lol
 
2:55 PM
get one of these
and then put one of these on your wall
from a list of 19 "funny cases of accidental racism" that has only three or four actual cases of racism
for example, this one's quite amusing:
user image
2
 
I don't see it.
They are grouped by race, is that it?
 
I only see pictures taken in different parts of the world there
 
@StackedCrooked The implication being that blacks are stupid, whites are average/normal, and asians are nerds
You have to be aware of the preconception beforehand in order to "get it", but it's not pulled out of thin air
since those stereotypes already certainly exist out there
 
Essential < Introductory ?
Those labels are confusing.
 
3:09 PM
probably Home Essential and Business Introductory
or "Poor people's essential; rich people's introductory!
 
you guys sure branch out a lot when it comes to this
I still see just 3 pictures taken in 3 different parts of the world
 
I don't see any pictures; lucky me.
oh they were posted by Racism Lights My Orbit over there
 
Lightness Races in Winterfresh
 
hey did you notice that there is no black female?
such anti-feminism (or what was that word)
 
haha
independent black women dont pose for no photos
 
3:16 PM
gun game in CS GO is good fun
now if only I was able to disable the damn chatter, I didn't find any options for this
why must I hear stuff like "good kill" all the time
what does it help me with
 
it's pretty terrible in CS:GO.
in fact, all of the GG variants that I've seen in like, the last 8 years are terrible.
the whole fun of GG was in knifing your enemy and stealing his levels.
 
I was disappointed that they didn't leave the grenades in, but otherwise it looks like normal GG
you can steal levels here too (with the knife)
 
you can, but who will when you just get the new gun right away?
in the original GG, you had to steal levels to get more than 1 per round.
 
you mean you could get 2 guns at once?
you only get a gun per 2 normal kills or 1 knife kill or 1 team leader kill
 
3:18 PM
no, I mean, you didn't get new guns except at round start.
so you could only advance at max 1 per round from killing people with your gun.
 
aah, so you mean it was 1 new gun per kill and 2 new guns per knife kill
now that you mention it, I do remember it working like this in 1.6
 
no, you only got 1 level for killing someone with the knife.
 
then how were you stealing levels?
 
the other person lost 1 level.
 
yup but that happens in GO too
 
3:22 PM
yep, but that's what stealing is, as in, you're taking it from someone else.
 
so if the guy you killed had AWP and you had something at a lower level, stealing his level meant going to the AWP?
 
no, you just stole 1 level.
as in, you gain 1 level, they lose 1 level.
 
I don't understand what's different in GO then
 
because in GO you get a new gun every time you go up a level.
so there's basically no incentive to actually do that.
 
3:24 PM
and because of the continuous respawning deathmatch style, there's no free space to use to sneak up on people and knife them.
 
@Puppy isn't that what also happens here? youtube.com/watch?v=z9LyepbGu7M
maybe we talk about different gun games
 
yeah, that's clearly icky turbo mode
 
user784668
Crystal Palace ♥
 
who's that
 
who supports Crystal Palace any more? it's 2014
 
user784668
3:35 PM
@LightnessRacesinOrbit Today? United and Everton supporters, I think.
 
There's nothing sensational about this article whatsoever.
@Fanael giggle
 
user784668
And I.
 
user784668
For the exact same reason.
 
I only just realised that "to mong out" is offensive to Mongolians.
 
user784668
Everything is offensive to someone. Except Liverpool offense.
 
3:38 PM
#include<studio.h> — Aisha Isah 31 secs ago
this is what she's tried so far
 
user784668
@LightnessRacesinOrbit Hey, that's more code than I wrote this whole week.
 
user1804599
lol studio
 
good lord I need to get a new screen soon. I'm getting burn-in... on an LCD!
 
@rightføld :D
huh, custom closure reasons don't show up in the banner? what's the point of them them -.-
 
user784668
@thecoshman Is your current screen older than @JerryCoffin?
 
user1804599
3:41 PM
user image
5
 
user1804599
They should rename Tetris effect to Factorio effect.
 
@Fanael no, just cheap
 
@rightføld googling factorio turned up this nice track
 
user1804599
3:48 PM
My ears.
 
@StackedCrooked not bad
(same track)
 
@LightnessRacesinOrbit cool
 
hurts the ears a little less
 
user784668
-2
Q: Determine if less than 0 without if statement

ZonnyIs there any way to determine if x is less than 0 without using the if statement? Yes this is indeed a very odd question but I would still like to know.

 
user784668
WTF do they even want
 
3:55 PM
they want to determine if less than 0 without if statement can't you read
 
What's wrong with that - they want to check whether a variable is equal to less than 0?
 
user1804599
With Trees is a great song.
 
So manipulative.
 
user1804599
faaaaaaaaaaaar faaaaaaaaaaaar awaaay
 
oh, it got closed
I was ready to post #define not_an_if if
 
user1804599
3:57 PM
while and break
 
user784668
I'm dumb.
 
user1804599
table[x < 0]()
 
@rightføld nice
 

« first day (1499 days earlier)      last day (3441 days later) »