Conversation started Jan 9, 2015 at 16:11.
Jan 9, 2015 16:11
bool utm2ll(
            double  /* in  */  n,
            double  /* in  */  e,
            int     /* in  */  utm_zone,
            double  /* out */ *p_lon,
            double  /* out */ *p_lat);
bool utm2ll(
                 double  /* in  */  e,
                 double  /* in  */  n,
                 int     /* in  */  utm_zone,
                 double  /* out */ *p_lon,
                 double  /* out */ *p_lat)
Which one is it!?
BTW, one of those is in the header, the other is in the cpp
Uh... both code look exactly the same?
@PrivatePansy Order of the parameters
Oh, that
Also, putting comments in the middle of variable declaration is weird
@PrivatePansy Some old C programmer did this.
@PrivatePansy it can be pretty useful when you need to distinguish between the uses of a pointer
Jan 9, 2015 16:14
@Sterno It's like a car crash. I just can't turn away.
It's kinda important to not mix up northings and eastings. Now I don't know if my code that relies on this is working properly, of if I'm allowed to blame something else.
Though if it's an input pointer than you should just make the bloody thing constant
@Wipqozn Are we talking about lifehacks or what? I was just absent from chat for an hour
@Sterno Yes
Jan 9, 2015 16:16
@KevinvanderVelden Well this shouldn't be passing by pointers, it should be passing by reference, but as I said it was written by a C guy a long time ago.
@MBraedley reference is a pointer where you can't change what it's pointing to. Constant means you can't change the thing being pointed at
@KevinvanderVelden Why not at the end of the line like everyone else does?
@Wipqozn Your first mistake is hanging out in Lifehacks chat
@Sterno I know :(
@PrivatePansy reasons, and because C sometimes has syntax like void* (bla*)(const Foo* const);
Jan 9, 2015 16:18
@KevinvanderVelden The paradigm these days is to prefer pass by reference over pass by pointer, that's all I'm saying.
@KevinvanderVelden That makes my head hurt.
Where's the lord of power when you need him
0
Q: Can Karthus' Ult Hit Fizz During Playful Trickster?

Spidermain50I know that Fizz is untargetable during playful trickster, but can Karthus' ult still hit him?

@MBraedley agreed, reference is generally better than pointer, but I'm saying that is a different discussion. For an in variable you generally want to mark it as constant so that you guarantee that you won't change it
@KevinvanderVelden Yes, agreed, although that doesn't matter when passing by value.
Jan 9, 2015 16:22
@PrivatePansy Declare a function pointer to a function returning a void* that takes a constant pointer to a constant Foo, but I syntax-errored something somewhere
@MBraedley true
bool utminv(double lon,
            double lat,
            double *x,
            double *y);

bool utminv(double x,		/* (I) X projection coordinate 			*/
            double y,		/* (I) Y projection coordinate 			*/
            double *lon,	/* (O) Longitude 				*/
            double *lat)	/* (O) Latitude 				*/
WHY ARE YOU DOING THIS TO ME OLD CODE!?
@PrivatePansy Ooh, correct is void* (*bla)(const Foo* const);. The * is before bla, not after
I understand pointers, but I don't have to like them
@MBraedley This is amazing.
Woohoo! I broke cdecl.org !
It gives syntax error on void* (*bla)(const Foo* const); but that is a valid declaration of bar
Jan 9, 2015 16:26
Thank fucking god today is Friday, because I don't think I'd be sober enough to come into work tomorrow with how much I'm going to have to drink tonight after seeing stuff like this.
@MBraedley Can't you just ignore the header? My guess is that the code file is correct - unless the programmer used x for the longitude.
0
Q: how can i search for a specific item with attributes?

Wilmzi want to test if a player has the following item: minecraft:bow 1 0 {display:{Name:Bow I},ench:[{id:48,lvl:1}]} i know this command works with normal items: /testfor @p {Inventory:[{id:"minecraft:stone_sword"}]} but i dont know how to add the attributes or is it possible to search for ...

> BREAM: That's my question about these guys. If we know they were speaking unaccented French and they had ski masks on, do we even know what color they were, what the tone of their skin was? I mean, what if they didn't look like typical bad guys? As we define them when we think about terror groups.
Aaaand now I'm at my old problem of the view being refreshed with the new data on load.
As if the button was clicked before the page loaded completely.
@Lazers how many times do I have to say it, testfor is so useless in application it hurts.
Jan 9, 2015 16:30
Huh, International Earth Rotation Service is an actual organization
Unfortunately its purpose is not to make sure the Earth keeps spinning
@KevinvanderVelden Okay, I don't know what accents have to do with skin tones, but identifying suspects by their skin tone is a thing and I don't think it's particularly racial.
But that's if you already know the skin tone.
The worst exceptions are those thrown by logging statements
I might be grokking this incorrectly.
1
Driving

Proposed Q&A site for car drivers (professional or otherwise) interested in discussing any aspect of driving.

Currently in definition.

@Yuuki this one was in response to someone saying that racial profile isn't effective
Jan 9, 2015 16:32
@NewlyOpenedProposalsforEntertainment i proposed something similar a while back that got shot down because it was too close to automotive. this could maybe work.
@KevinvanderVelden They're essentially saying that you should use someone's skin tone to decide if they're good or bad
That's how I parse it, at least
@KevinvanderVelden Depends on what you mean by "racial profiling". If it means "suspect is Muslim because Muslims are terrorists", then yes that's wrong. If you mean "suspect is white because he's white in this photo or a witness said he's white", then that's more understandable.
Given the backlash, I'm guessing that person intended on the first interpretation?
> Profiling isn't always effective... because you can't always see their skin color.
@Yuuki the "Person is muslim so is likely terrorist" type of racial profiling
@OrigamiRobot yep
@KevinvanderVelden Ah yes, that's patently ridiculous.
Jan 9, 2015 16:35
@Yuuki especially given that the "person is muslim" part is shortcutted to be "person is vaguely brown-ish"
Lo @JoshPetrie
user4704
Hi.
Anyways, back to coding. So now the refresh function that I intended to be on a button click is for some reason executing on page load.
So the viewer is refreshed with the modified data on page load instead of showing the original data first.
@JasonBerkan Yes, it looks like the definition is correct and the declaration is wrong. But the declaration is usually the only thing that you have (or what is shown to you first) so if it's wrong, the likelihood of anything using it being correct is low.
@MBraedley True. If you just had the header and a DLL, you'd be in for a world of hurt.
> And if you can't see their skin color and they don't have accents, how would you know they were bad guys?
Jan 9, 2015 16:39
@OrigamiRobot I dunno, maybe by the fact they're shooting people?
@MBraedley the original coder should have wrapped it in a simple POD struct honestly, would solve so much problems
@Unionhawk Yep, without seeing the full question, I can already guess that using a scoreboard is going to be the solution
@Yuuki They're talking about preventative profiling.
@Yuuki no no, it is vitally important to know the skin color. If they are vaguely brown they are part of a terrorist organisation, if they are white they are lone wolves and everyone should quickly move on
Specifically avoiding profiling is kind of stupid too. Pulling the 83-year old grandma out of line at the airport security to check her for bombs, or the 3 year old obviously-spoiled-upper-class-American-kid is probably not a good use of time (though, yes, they could theoretically be strapping)
But really, I think we can all agree toddlers and infants should be banned from planes anyway.
Jan 9, 2015 16:40
@KevinvanderVelden Maybe. It's a set of utility functions, and declaring PODs for each function gets messy. We already have that problem with other legacy code, where we have a bunch of relatively useless structs. Abstraction upon abstraction that isn't necessary.
@Sterno Best way of catching terrorists AFAIK is selecting people who have studied in London universities
Also, if I want to stop someone from drawing on the wall with crayons, I'll have better luck keeping an eye on the toddlers than on the adults. SOME PROFILING CAN BE OKAY
@MBraedley aah, small utillity functions I get, I thought it was an API with more things like that, it'd be better to say ( XYPosition, LatitudeLongtitude ) vs ( double, double, double, double )
@Sterno Basically, age profiling is OK
Jan 9, 2015 16:44
It's just incredibly hard to do without being a dick
@Sterno My kids: That's not fair! Me: Life ain't fair.
There's a reason that they have looser security requirements for children going through airport security
@JasonBerkan "It's a dictatorship, not a democracy."
"Life isn't fair" and "Suck it up, princess" are probably my two most comment Dad statements.
2
> This year, the eagerly anticipated Adventure Y will finally navigate the dark underground caverns of development and venture out into the Sword Coast. We’ve mentioned before that Adventure Y will be an addition to the Baldur’s Gate line using the Infinity engine, bridging the gap between Baldur’s Gate: Enhanced Edition and Baldur’s Gate II: Enhanced Edition.
Jan 9, 2015 16:46
HOME TIME
Cya chat
If you're going to announce your new game, use the real name instead of "Adventure Y"
@KevinvanderVelden It's all internal code. If I were to rewrite it, I may use a set of stucts like that. We're not really doing that in many other places though, and consistency is also something to strive for.
 
Conversation ended Jan 9, 2015 at 16:46.