« first day (888 days earlier)      last day (4055 days later) » 

11:00 PM
Though, personally, I would have chosen better words to express it.
 
sbi
@BartekBanachewicz You could start out by giving those calculations names that say what they mean, rather than requiring the readers of your code to decipher the hidden math in it and find it out on their own.
 
"DESE NUTS, BITCHES."
Also my throat hurts. ;~;
 
sbi
Stop yelling at us.
 
@sbi Whoa. You have a child doctor? We just have physicians. Period. A child doctor only comes into the picture after a physician writes a referrral -> serious cases and long term monitoring only.
 
@sbi :c But it wasn't 'cause I yelled at you guys. That's fun and has no drawbacks. <3
I had to yell at my family 'cause shit hit the fan yesterday.
 
11:01 PM
paediatricians are common here
no referral needed
 
sbi
@sehe If a child is sick, you take it to a "Kinderarzt" here. That's what they are for. They know a lot about the typical kids' diseases, and about the doses of medicines kids can take.
@ThePhD Says you.
 
True, I can only go off of my perspective.
I need to buy myself my own place to live soon, though.
 
@sbi Mmm. We just have the "family" physician for that. I'm not sure what would work better in general. I like the fact that it's one-stop, and the same doctor knows the family members basically for life (unless you move)
 
sbi
@sehe Sounds good, too. Except that the family's granny probably need different ointments than the baby.
@ThePhD Why would that be?
 
@sbi Well, the doctor should be versed in both. And he is, in practice.
 
sbi
11:06 PM
@sehe As I said, I can immediately see the advantages of that setup. The disadvantages, too, though.
 
int Minefield::_inChunk (const int p) {
	if (p >= 0) { // trivial case
		return p % size;
	} else {

		/*
		input:
	    -3    -2    -1     0     1     2
	    -|-----|-----|-----|-----|-----|----
	        0     1     2     0     1     2
		desired result:
		*/

		// move it "one to the left"
		int norm_p = (- p - 1);

		return (size - 1) - ( norm_p % size );
	}
}
it still is fucking nonsense.
 
sbi
@BartekBanachewicz What did you misunderstand about "giving it a proper name"?
 
@sbi giving what a proper name
 
_inChunk doesn't make sense I'm assuming
 
sbi
@BartekBanachewicz What should I draw conclusions from when I see a function called that's named _inChunk? That says exactly nothing about that function is doing.
 
11:08 PM
@sbi Because even though I'm living with my own family and helping out with the situation, individuals are threatening the survivability of the unit as a whole. So it doesn't matter how carefully some of us behave, because a select few individuals are just being absolutely retarded on the whole, and we can't keep covering for them indefinitely...
 
@BartekBanachewicz why does _inChunk take an int and return an int? I feel like _inChunk should take an object and return a bool.
 
Okay, is anybody actively working on libstdc++ <regex>?
 
No, funny enough GCC 4.8 has no <regex> support either.
 
my coworkers just started barking....
 
@sbi It does nothing. :Đ
 
sbi
11:09 PM
@ThePhD Yeah, I can understand that. Still, why would you have to buy your own place? Couldn't you just rent or share a room/apartment/whatever?
 
They also do strange, strange things. Like threaten the lives of the people their living with and do crazy shit, to the point where we do not feel safe with the people we're sleeping in the same house with..... only typing this out now do I realize how ridiculous this is. Christ.
 
int Minefield::_innerChunkCoordFromWorldCoord (const int p) { | @sbi @MooingDuck
 
sbi
@DogPlusPlus That's one damn complicated piece of code doing nothing then.
 
@BartekBanachewicz input ought to be a WorldCoord, and it returns a ChunkCoord. Named convert_to_chunk_coord.
 
@sbi I know, I'm too poor to do either though, which is what makes this whole situation DOUBLE lulz. I do go back to school soon and I can limp along with the housing there (September), and during the Summer I have an internship on the other side of the fucking country, so at least I can get away for a time being.
 
11:11 PM
@MooingDuck precisely
ah
you mean type
 
@BartekBanachewicz yes I mean type.
 
@MooingDuck recommend strongly enforced number types in C++ ITT
boost?
 
I would have moved out or done something different, but one of the people in question stole 2 Grand large from my store of money.
So I'm effectively 100% broke.
 
@ThePhD 2Gs? Wouldn't that classify as a serious theft?
 
@BartekBanachewicz I was thinking just build from scratch, it's pretty straightforward. Boost probably has stuff though.
 
11:12 PM
@BartekBanachewicz UDT?
 
@BartekBanachewicz boost has a strong_typedef macro somewhere
 
@DogPlusPlus Yep.
It is serious theft.
 
@Rapptz That triggered my question … I realise that proper regex support is hard (!!!) but why not simply port Boost.Regex until something better becomes available?
 
@MooingDuck will it keep operators n'stuff?
 
@ThePhD 911, what's your emergency?
 
11:13 PM
The problem is, if I commit this to the police, one of the people I know goes directly to jail, and their life is ruined. Permanently.
 
sbi
_innerChunkCoordFromWorldCoord is a noun. How's that an identifier for a function?
 
@BartekBanachewicz oh, allows implicit conversions from the type: boost.org/doc/libs/1_37_0/boost/strong_typedef.hpp
 
@KonradRudolph They did that with shared_ptr actually. I think they can't do it with Boost.Regex because (TIL from the Robot) it supports PCRE while std::regex doesn't.
 
@sbi it follows the proper hungarian notation, I guess
but yeah it needs more types
 
@ThePhD It's funny because that person doesn't have a problem with ruining or seriously derailing yours.
 
11:14 PM
Hungarian notation? lol
 
Hungarian notation still hasn't died?
 
cc/s 2 c++
 
sbi
@BartekBanachewicz That's for objects, dude! This is a function, and it's doing something, and you'd need a verb to describe something doing something.
 
the PROPER hungarian notation
@sbi I am actually making two classes now. Fuck the integers
 
@DogPlusPlus So I tell myself. But other people involved are convinced that we should offer help before slamming down the judgement hammer.
 
11:15 PM
"Proper" or not, Hungarian notation is shit.
 
@Rapptz no.
 
The only problem with that approach is, what do we do when it reaches the next level of seriously insane stuff...
 
yes
 
sbi
@DogPlusPlus No, it hasn't. But 1) real Hungarian notation is helpful in C, and 2) his has nothing to do with HN.
 
@Rapptz do you even know what real HN is about?
 
11:16 PM
@sbi Correct, which is weird why he brought it up.
 
@Rapptz Hmm. Close enough – the standard supports ECMAScript
 
sbi
@BartekBanachewicz What classes? Are you dumb, boy? This is a function and it has a fucking noun as its name. That's fucking wrong.
 
How do I initialize a struct in a Class constructor list?
 
@sbi I will change the damn function
@HangBot like a class damn
 
I find that decision very weird, to be honest, and 100% wrong. Why support dozens of different dialects of regex? They all do the same anyway
 
sbi
11:17 PM
@BartekBanachewicz No! Change it's fucking name so it tells what it does!
 
It makes the library needlessly more complex
 
I just mean I wam packing it in strongly typed classes
@sbi I have more than one way to convert from one class to another, no?
 
cc/s 10 c++
 
sbi seems rather pissed off today. Grumpy shifted to hostile.
 
Meh. I give up.
 
11:17 PM
Like constructor!
 
@BartekBanachewicz convert is a verb
 
which has no name!
 
sbi
@DogPlusPlus I had one hell of a week. So you just keep it down, boy, or I'm gonna show you how it feels when the grumpy old man is pissed off.
 
@HangBot myclassname(params) : member(value) {}
 
struct InnerChunkCoord {
    int x, y, z;
    ...
    InnerChunkCoord(WorldCoord const& InnerChunkCoord);
 
11:20 PM
Vector3i maybe?
 
@BartekBanachewicz Assuming the original function reflects "correct" behaviour and size is unsigned:
int sanity(const int p)
{
    if (p<0)
        return (p-2) % size;
    else
        return p % size;
}
 
@sbi I know, I read the upper comments. Life tends to be shit sometimes, but you'll always have us. That is far from comforting, I know. :D
 
sbi
@DogPlusPlus At least they are going to pay me a month's salary for this one week.
 
11:21 PM
@sehe oh my god @sehe I owe you a beer
 
@BartekBanachewicz bear*
 
sbi
@sehe Oh boy. Another noun used as the name for a function. You guys are all mad.
 
Seriously, mixedsigned/unsigned modulo is tricky
 
@sehe that's why I tried to make it to positive first
 
11:22 PM
@sbi I didn't name it, because I don't know what it means :) I just translated in somewhat more legible (and less complex) style
 
@sbi Agreed.
Also, I haven't slept for 46 hours. I feel... Dopey.
 
@BartekBanachewicz It's always easier to do that after: it's auto m = i % n; return m<0? m+n : m; in the worst case (signed % signed can still be < 0)
 
@BartekBanachewicz To be frank, the case for p<0 looks odd to me. I suspect it mught be wrong (discontinuity around 0)
 
int: -1	bartek: 6	sanity:6
int: 0	bartek: 0	sanity:0
int: 1	bartek: 1	sanity:1
where's the discontinuity?
the chunks will be properly aligned now
 
11:25 PM
@StackedCrooked What was that song from earlier today... My fucking bitches or something?
 
the sequence [0..size-1] repeats uniformly
 
@BartekBanachewicz Damn. I borked the test. It's not equivalent :) The -2 should depend on size.
 
@sehe what
 
@DogPlusPlus It's a different one, by the same artist.
 
@BartekBanachewicz Try the coliru thing with size = 10, e.g.
 
11:25 PM
@sehe now you see what I am really going through!
 
@StackedCrooked "Artist"
 
@BartekBanachewicz What you're inflicting on yourself, you mean
 
@DogPlusPlus The song this morning was fuckin problems.
 
@sehe I can't allow the world to grown only in one direction :/
 
@BartekBanachewicz one direction sounds fine : forward in time :)
 
11:27 PM
@DogPlusPlus lol, that word is probably not right in English (in Dutch 'artist' is often used to refer to singers)
 
InnerChunkCoord(WorldCoord const& wc) :
	x(_getChunkCoordFromWorldCoord(wc.x)),
	y(_getChunkCoordFromWorldCoord(wc.y)),
	z(_getChunkCoordFromWorldCoord(wc.z))
	{ }
 
How do I restrict users from entering redundant data in C++ program?
 
@HangBot that's too broad
 
@HangBot cut the keyboard cable
2
 
@HangBot I..what
 
sbi
11:28 PM
@HangBot There is no way to prevent users from entering invalid data.
 
@HangBot Kill the user.
 
@sbi don't let them enter data :3
 
You can if you use PHP.
PHP is flexible: you can't enter invalid data
 
every data is valid
we should love every data equally
say stop to data racism
 
Here have some useful data.
 
sbi
11:29 PM
@sehe It's a freaking wireless keyboard!
 
dgspšsdofgew0srfdsojfdsojtrwshtgisdcjgfodsngosdigfpšskdplčgfmsdkgdjfo34po23wj5rk‌​i23523423423l45rkwelrjfoasdjfopaskšdaskda'0ei23qw'4q3314159265358đ
 
sbi
@melak47 There is no way to prevent users from entering data. (Especially invalid data.)
 
@sbi yea they can just stand and shout at you, no?
 
@sbi simply don't take any inputs
 
user142019
11:30 PM
@sbi cut the batteries!
 
@melak47 can't not take power
 
Or jam the frequencies at which it operates.
 
sbi
@melak47 Ctrl^C.
 
reverse the polarity!
@sbi my win32 GUI app is not impressed :p
 
sbi
@Zoidberg Here, users mainly run on fat, proteins and carbohydrates.
 
user142019
11:31 PM
I'm lost.
2
 
sbi
@melak47 Alt-F4
 
user142019
I have an AST and I want to process it further. I want to perform type checks, desugaring and finally code generation but I have no idea on how to do that.
 
Where did the Steve thing go? sbi chased it away?
 
sbi
@Zoidberg Then you can't.
 
@sbi eh, just don't do anything on that event? :p
 
11:32 PM
@Zoidberg Then don't do it.
 
user142019
@DogPlusPlus that won't solve my problem!
 
@Zoidberg Yup, I also found that step very difficult, conceptually, to get started.
 
user142019
@sbi captain obvious.
 
fortunately, though, you can check out my semantic analyzer for tips.
 
sbi
@DogPlusPlus Well, so there is one accomplishment I can be proud of today. :)
 
user142019
11:33 PM
export main;
fn main() { stdout.write("Hello, world!"); }
 
user142019
At least this parses. :)
 
sbi
@Zoidberg If "Obvious" is my name, you should obviously capitalize it!
@Zoidberg The chat has pretty lax syntactic rules, so I am not surprised.
Anyway, I'm drunk and I'm tired. G'night!
 
user142019
Goodbye.
 
@BartekBanachewicz So here's the real fix (now that I understand a little bit of what all the - - 1 + 1 was about): coliru.stacked-crooked.com/…
int sanity(const int p)
{
    if (p<0)
        return (p % size + size) % size;
    else
        return p % size;
}
Note this time it requires size to be signed :)
 
11:37 PM
@BartekBanachewicz It's still cleaner than the ...original
 
@sehe that doesn't look right at all....
 
C++ How do I convert Hex Integer to String?
 
@MooingDuck That's what I said. however, it is what he had
 
@HangBot dude what the hell
 
@sehe isn't (A%B+B)%B always equal to A%B?
 
11:38 PM
And the two steps in (p % size + size) % size can be explained
@MooingDuck .... dude. Really. Try it
 
@HangBot a hex integer is a string
 
@sehe my steps were explained too :P
 
@sehe oh wait, it's that negative nonsense isn't it...
 
It's just it's a fucking negative nonsense
 
@MooingDuck yup
 
11:39 PM
My solution didn't use negative modulo at all
 
@BartekBanachewicz nah. It was magic. The "goal" was "explained", though
 
@sehe if (p < 0) p += size; return p % size;.
no, wait.
 
xD
another one bites the dust.
 
@BartekBanachewicz Leading to a mess of coude. I mean, really: return (p >= 0) ? (p % size) : size - ((- p - 1) % size) - 1;?
 
@sehe look, the (- p -1) is guaranteed to be non-negative
so it's always non-neg % non-neg
seemingly a trivial problem
and look what a fucking mess it is
 
11:40 PM
17 mins ago, by sehe
@BartekBanachewicz It's always easier to do that after: it's auto m = i % n; return m<0? m+n : m; in the worst case (signed % signed can still be < 0)
 
my brain is melting.
 
@BartekBanachewicz Anyways, I can't tell what the heck you are actually doing, since I can't know whether size is (un)signed in your code (I'd guess it'd be unsigned)
 
it is signed now.
 
anyway, the point of it is to assign contiguous sequence obviously
0 1 2 3 0 1 2 3 0 1 2 3
on both sides of 0
 
11:43 PM
@DogPlusPlus: I have a question about your game engine (or others you've worked on). Do they have systems/facilities for "automatically" serializing/deserializing data? (By automatically, I mean you pretty much only have to declare what needs to be saved/loaded without having to write boiler plate code to do said loading/saving in each class)
 
@Borgleader looks like Java Serializable<>
 
I'm looking to make something along those lines in C++ (if possible)
 
@BartekBanachewicz Wokay, then my latest snip will work interchangeably for you
@Borgleader boost serialization
 
I am going to sleep
I have to have clear mind for that
it's just too easy to trip on -1
 
@BartekBanachewicz what are you even doing
what are these numbers for, block indices in a chunk?
 
11:45 PM
@BartekBanachewicz fool proofed the A-B comparison here: coliru.stacked-crooked.com/…
 
@Borgleader Actually, sehe's right. Mine's quite close to boost stuff. Although I've seen plenty of engines that don't give (de)serialization automation a first or second thought and work pretty well.
Also, I'd like to propose.
user image
2
 
@DogPlusPlus Sorry, I'm not into that kind of thing.
 
Looks grumpy enough.
 
@DogPlusPlus Alright I'll look into it ty /cc [wise bear](@sehe)
 
How do I integrate a function in C++?
 
11:48 PM
the compiler integrates the code into the binary for you
 
integrate? like int 2x dx = x^2 ?
 
@DogPlusPlus Who will you be proposing to?
 
@Borgleader ....yes, exactly.
compilers compute the integrals over your source code...
 
@sehe To the bed, most likely. It looks so beautiful right now.
 
Go for it. Don't forget the ring!
 
Xeo
 
Oh gawd. It's here again.
 
user1357851
 
I don't even...
 
user142019
@DeadMG I think I will just traverse the AST and spit out a new AST with type annotations.
 
@sehe that still seems overly complex to me
int sanity(int p)
{
    p %= size;
    if (p<0) //almost there, negatives are backwards
        p = size + p;
    return p;
}
 
11:55 PM
@Zoidberg I skipped that, although I will have to spit out a new AST at some point in the future.
 
int sanity(int p)
{
    return madness();
}
 
@sehe Damn. So much ugly.
 
user1357851
lol sehe: I was going to laugh at your reinterpret_cast
 
user1357851
but you knew better :p
 
How do I output the numbers which the variable is divisable with?
 
11:58 PM
@MooingDuck mmm:
size: 3	i: -100	bartek: 2	sanity:0
test: test.cpp:24: int main(): Assertion `bartek(i, size) == sanity(i, size)' failed.
 
user1357851
@HangBot hey why do you keep on editing other people's questions?
 
@HangBot get the divisor, loop through them and print one each time
 
@Telkitty The same reason you keep coming back here. To annoy people.
 

« first day (888 days earlier)      last day (4055 days later) »