« first day (1136 days earlier)      last day (3823 days later) » 

3:00 AM
@DeadMG how am I supposed to know where it is?
 
the compiler error should tell you.
 
` binary '==' : no operator found which takes a left-hand operand of type 'std::pair<const _Kty,_Ty>' (or there is no acceptable conversion)`
Unless I am mistaken, there isn't really a arrow pointing to where it is.
 
if I open a file.. do I have to open the standard libraries?
 
post the whole error.
 
I'm beginning to hate stacks
 
3:02 AM
also
I did just attempt to compile it and the problematic line is right where it is in any template instantiation error.
 
The C### part?
 
C###?
 
C2678, in this case.
 
Oh.
 
@DeadMG where is that?
 
3:05 AM
 
main?
 
for some reason, MSDN isn't listing the find(iter, iter, pred) overload?
@Pawnguy7 Well, I put everything in main.cpp, for you it's probably some other place, but the real location of the problematic line is right there.
and it's always there in every template instantiation error.
 
Oh.
 
g'night
 
ohh.... find_if.
 
3:07 AM
I have never looked at the direct output before.
 
stupid Standard.
 
So you can... track template errors in this fashion?
 
well, it tells you a lot more than just "C2678"
 
This is true.
Template errors usually take me a while :D
So, what of the standard?
 
ah, it doesn't have a find(iter, iter, pred) overload.
you have to use find_if(iter, iter, pred).
 
3:11 AM
Built, returned path of size 0.
I wonder if I should cache the path.
Though it might be invalidated.
 
it will be if they find paths around enemy snakes.
 
Yes.
 
but you wanna be super careful with that.
 
Especially on the tunnels level.
 
because you can end up in nasty loops.
 
3:13 AM
Like what?
 
well
let's say that two snakes are coming up to an intersection and they both want to cross over to the other side.
now Snake A looks at Snake B and determines that Snake B's most efficient path is through the crossing.
so Snake A decides that this is suicide and turns around.
 
and vice versa?
 
bingo.
 
are there preprocessor directives for spitting out a lib? I included some source files and now all of a sudden my project also produces a lib with the project name which I didn't set up :E
 
@DeadMG I guess human players make the same decision though.
The only time you don't is when you don't react fast enough.
 
3:15 AM
yeah, but they can cope with it a lot better.
 
Or don't consider it, I guess.
 
the AI can just enter into dumb infinite loops
a human player can see that the same scenario will keep coming up.
 
Ah.
 
and what will probably happen is that one will fakeout the other into going too far, then he goes through the crossing.
 
-2
Q: How to UN-HIDE a program?

user3024008I hid Notepad.exe with the following code: HWND hwnd; ShellExecute(hwnd, NULL, "C:\\Windows\\System32\\notepad.exe", NULL, NULL, SW_HIDE); I can no longer open the window as it's hidden (LOL). How can I "un-hide" it? Thanks. EDIT: Fixed HWND hwnd; hwnd = FindWindow(NULL, "Windows Task Manage...

 
3:17 AM
or they both retreat and find alternative paths
 
So, was my attempt at A* somewhat near what it does?
 
seems pretty close.
 
Any idea why they go through walls?
I didn't add walls as neighbors, I thought.
Perhaps that does not do what I intended though.
 
well, you'll just have to set some breakpoints and check to see if you added walls.
 
I could if it ran :D
 
3:20 AM
@DeadMG do you have any idea how just including a source file can make my project generate a lib?
 
Anyway, my level is 60x32.
With this algorithm being in optimal shape, is it... reasonable to be fast?
 
@melak47 Probably some moron left some __declspec(dllexport) in there, and the lib is an import library.
@Pawnguy7 On 60x32, it should be blindingly fast.
 
That is pretty fast :D
I must have done so much wrong :\
 
@DeadMG I didn't find anything like that :/
 
look, what am I, your grandmother?
@Pawnguy7 It's really not that far off. All I really did was a bit of tidying up. Just man up and debug the damn thing.
 
3:23 AM
@DeadMG I am not good at debugging code when I have no idea what it does
 
@melak47 It's really, really not a problem. And it's definitely not my problem.
 
@Pawnguy7 Debugging is an acquired skill, get to it
 
@Pawnguy7 Nobody is. Hence the "man up" part.
 
Should I be learning it first?
 
well you should at least understand the basic concepts of what A* does.
 
3:24 AM
@DeadMG what do you mean it's not the problem?
 
@DeadMG aims for shortest (supposed) distance paths?
 
@melak47 I mean that if your intended output functions as intended, who the fuck cares about spare .libs running around?
and I also mean, stop fucking bothering me with it because I don't give a shit right now, I'm not your mother and I'm not going to debug your project setup for you.
 
@DeadMG it doesn't, I get missing symbols for crap that is in those source files :E
@DeadMG lol ok :p
 
@Pawnguy7 There you go. Now get cracking.
 
Assuming I ever do get this working.
Is different AI difficulties.. plausible somehow?
 
user3010322
3:28 AM
Most interesting thing I've seen done with a fighting game: saltybet.com
 
I was originally thinking of a look-ahead depth value, but I don't think that works here.
 
@Pawnguy7 AI is pretty difficult. Pathfinding is really just the beginning.
 
Damnit I wish i had <chrono> in VS2010 for my assignment
 
Who would have thought stealing code was so hard :\
This is the tunnels level.
 
everyone, ever, who tried it.
 
3:37 AM
It is basically an AI deathtrap.
Might still be after, though.
But at least they will not kill themselves.
@DeadMG I was under the impression people kept doing it because it was easy
 
no, they do it because they don't notice how their hacks don't work.
and also because they come here and bug people like me to fix it for them
 
How do you not notice when it does not work?
 
by being a hideously incompetent moron.
 
Unless we are talking about design.
 
also, oftentimes there are more subtle problems.
 
3:42 AM
Such as?
 
user3010322
@Borgleader Use Timespan instead.
 
memory corruption
poor performance
bad design, especially globals.
 
Is it possible to have corrupt memory and not explode eventually?
 
of course.
 
Is this not undefined behavior?
 
3:45 AM
yep.
 
By that, you mean it is?
 
yes.
 
I wonder if there is a word for those phrases.
Read literally, they don't mean what they.. connotate.
Anyway, I cannot recall a time I had undefined behavior that didn't crash the program.
Or severely mess things up.
 
that's just because a lot of people put a lot of effort into making that happen.
but they can't possibly cover every case.
 
You are speaking of the debug portions of the implementation?
 
3:50 AM
yes- all parts, CPU, OS, runtime.
 
CPU?
 
when you dereference a bad pointer, it's a CPU interrupt.
the OS just catches it and gives it back to you as an access violation.
 
I thought that would be an OS or runtime thing.
As the OS manages the processes.
 
nope.
the OS tells the CPU what physical address each virtual address is at.
but the CPU cries if it can't find it in the table.
 
4:45 AM
@Pawnguy7 It's not uncommon to have writes past the end of an array on the stack go undetected
 
5:03 AM
Rapptz has made a change to the feeds posted into this room
 
I added Eric Niebler's blog to the feeds.
 
posted on November 24, 2013 by Eric Niebler

This post describes some utilities I’ve recently developed for doing concept checking in C++11. These utilities are part of an ongoing project to reimplement ranges, also for C++11, but I think the concept checking utilities are useful and interesting in Continue reading →

 
stupid feeds :|
4 messages moved to bin
 
How ironic. :P
^ Nice article.
 
user3010322
Hm.
 
user3010322
5:08 AM
Is there a way
 
user3010322
to figure out the size of an std::array
 
user3010322
without explicitly specifying it?
 
it.. has a size function
 
It needs to be specified at compile time. Either explicitly in the type, deduction, or constexpr.
 
like every other container
 
user3010322
5:10 AM
Erm
 
user3010322
The context is more like with C arrays, where
 
user3010322
Arf arf[] = { ... }; // figures out size at compile-time
 
user3010322
Wondering if syntactic sugar like that existed for std::array
 
no
 
Something like make_array, there's a question on that.
 
5:10 AM
you are the 500th person to ask though, so congrats
 
user3010322
Meh. This is why library solutions will never beat language support. =/
 
just write make_array and call it a day.
 
user3010322
I guess so.
 
it's a 1-line function really
 
user3010322
Storing the information twice is a bitch, though.
 
user3010322
5:12 AM
Ah, well.
 
huh?
 
56
Q: How to emulate C array initialization "int arr[] = { e1, e2, e3, ... }" behaviour with std::array?

Xeo(Note: This question is about not having to specify the number of elements and still allow nested types to be directly initialized.) This question discusses the uses left for a C array like int arr[20];. On his answer, @James Kanze shows one of the last strongholds of C arrays, it's unique initia...

 
auto arr = make_array<int>(1,2,3,4,5,6); // std::array<int, 6>
 
user3010322
Hm, when put that way the information might not be stored twice.
 
user3010322
Ah well.
 
5:28 AM
No.
 
so much noise.
 
welp, the difference is that this exchange can go away any time I want it to.
 
13 messages moved to bin
 
which it will do soon enough.
 
5:31 AM
you should work on your efficiency next time
 
man SO has a ton o employees
 
6:08 AM
@MarkGarcia it's a big team!
 
And most are on sales.
 
6:32 AM
none of them implementing I dunno, kicking or banning from chat or anyshit like thjat.
 
Chat feels really slow today
 
6:45 AM
deal with it
 
@nightcracker This is one of the fundamental mistakes lots of guys developing a web site make. They think once you've developed a decent web site, most of the hard work is done and it becomes mostly a matter of cashing big checks. In reality, developing the site is just the entry point, and after that it becomes (almost) all about running a business--doing marketing/communication, sales, network admin, all the usual office management stuff, etc.
 
Most of the employees are in communication, sales, and marketing though.
 
@Rapptz Yup--I think that's probably pretty typical. From a business viewpoint, the web site is basically just a vehicle for displaying ads. To make any money (or even just stay in business) you need to sell those ads.
 
still has UB problem ...
 
The company I used to work for did mostly fairly manpower intensive work, so we probably had a larger technical staff (percentage-wise) than almost anybody. Even so, the company broke down as around 50-55% sales, 10-15% marcomm, and around 30-35% technical people (and around half of those were only marginally technical).
I suppose I should add though, that the other side of it was that the basic idea of the company was to do mostly project management, and contract out most of the real technical work.
 
7:01 AM
marcomm?
 
PR/marketing
 
@DeadMG What most marketing/communication people call themselves/their job.
 
I don't get why my wrapper doesn't work :/
 
what are you wrapping, Lua?
 
yeah
I looked it up online and other people have similar code to mine.
Man.
I'm even more confused now.
 
7:17 AM
Money is made by selling stuff ... be that goods, services or labour time
If you hold one piece of meat in one palm and a US$5 note in another, most of the magpies would go for the meat
 
7:45 AM
morning
 
@GamesBrainiac Because it is.
 
FUCK
FUCKING CLANG AND LLVM I HATE YOUR FUCKING GUTS.
 
Whoa.
All these errors were caused by an extra null character in pushing a string.
I don't even get the relevance.
Why would pushing a string with a null character break everything?
 
Lua is explicitly supposed to handle those.
 
well the only change I did was change N to N - 1 and now everything works.
 
7:52 AM
show code
 
too many files.
 
right.
 
I think this might be a good time to make a repository
for diffs and stuff
I'm not sure if I should split this up into .cpp/.hpp
I don't make heavy use of templates and the whole thing is only < 600 LOC
 
Ell
@rapptz have you seen Bartek and kboks thing?
 
Yeah.
 
Ell
7:57 AM
It's pretty kewl
 
Yeah it's pretty neat.
It's incomplete though.
hover over the message and click the arrow on the left and delete the message if you want
 
3 messages moved to bin
 
JBL
8:19 AM
Moaning.
 
@JBL Am doing.
33 mins ago, by DeadMG
FUCKING CLANG AND LLVM I HATE YOUR FUCKING GUTS.
 
user1804599
Hmm.
 
user1804599
I wonder if PHP has a built-in constant function.
 
JBL
@DeadMG So you hate your guts or the compilers ?
(Both I suppose)
 
I got plenty of hate for my guts, but plenty for LLVM and Clang too.
 
8:28 AM
Holy fuck, Star Citizen racked up 2.8M dollars last week
 
@Borgleader that guy has come up with an endless money machine
It's depressing
 
He didn't come up with it, it's called crowdfunding and his project is great, I'm just surprised it's getting this much support
 
why does he need that much money for his game
 
@jalf not for him
 
You are aware that a lot of games can cost up to 60M dollars right?
 
8:31 AM
@Borgleader You are aware games get by with much less right?
 
exactly
 
I know
But I'm just saying it's not out of the ordinary to see these kinds of amounts
 
JBL
Star Citizen will end up being a realistic universe simulation where you can do anything, at this rate...
 
Kinda like Eve Online, I'm down for that
 
I think at this point it's just a cash cow.
Indies get by with a lot less money and their games don't always suck. It's not like adding more money at this point will make the game any better.
Most of the money spent on AAA games is marketing anyway.
 
8:32 AM
Scope isnt the same
Of course they get by with less
 
How is the scope different?
 
The scope of indie games is often smaller than those of say GTA V
 
The source code is different so the C++ scopes are different as well.
 
It's not something bad, its just a fact
 
@Rapptz there is a difference between needing money, and being offered money for a 'good job done'
 
JBL
8:34 AM
Imagine if, for once, that kind of budget isn't spent on marketing, rather on paying devs...
 
morning chaps :D
 
JBL
Good morning.
 
@Borgleader Bad example. About 95% of GTA V's budget went to marketing.
also this tab is taking up 1 GB of RAM :s
 
@Rapptz More like 30%, according to Wiki, GTA V's budget is estimated at 137M, with marketing it goes up to 170M, so 20%
 
where did the 137M go to?
developer wages?
VS licences?
 
8:38 AM
Oh fuck, first price is in US second is in Euros
Media analyst Arvind Bhatia estimated the development budget for the game exceeded US$137 million,[34] and The Scotsman reporter Marty McLaughlin estimated that the combined budget of the development and marketing efforts exceeded £170 million (US$265 million),
so more than 20%
 
JBL
Well, GTA has free marketing thanks to the lawsuits (plus it's an established license).
 
Wiki doesn't say the marketing cost :s
 
@JBL lawyers are expensive though :)
 
@Borgleader If that's true then it's 52% to marketing.
Which is still a lot.
 
Yeah, it's more than usual I think
 
8:41 AM
but we're misreading it here
 
JBL
@StackedCrooked True, though I suspect it doesn't cost that much to Rockstar in the end (I don't think they've lost a case yet...)
 
> Bhatia detailed a "hypothetical profitability model" for GTA V based on an estimated development cost of $137.5 million (representing a team of 250 people working on the project for five years).
he's just hypothesising, I don't know what it's based on but whatever
Still, it's a lot of money that goes into marketing.
 
Well he's paid to "guess" so Ill assume his estimate is relatively close
 
I'm paid to guess things too, doesn't mean I'm close.
 
Oh fucking seriously the guy is an analyst, he probably has access to financial information to base his calculations on
 
8:44 AM
So? It's still an appeal to authority.
I still think it's a lot of money and that's all I left it at.
 
welcome back
 
morning
 
GTA still exists huh
 
there was recently a new one
 
racked up 800M dollars in the first day or so IIRC
 
8:51 AM
ugh, so this library has interface classes with virtual methods up the wazoo, but there's exactly one class implementing each of those interfaces.
 
that's not necessarily a bad thing.
 
I don't really see what's so great about Star Citizen
@melak47 Depend on abstractions
 
JBL
@CatPlusPlus Its promises, and how it shows people can pay a lot for non-yet-existing things.
 
crowdfunding isn't new. It's been around for a couple years so it's already been shown people are willing to pay for non-existent things.
 
I remember buying Fallout 3 in advance ;0
 
JBL
8:56 AM
@Rapptz Yep ! It still baffles me how much money can go into it, based mostly on the reputation of the guy who launched the project (hello Tim Schaffer) than anything.
 
I don't like Monday morning
 
Me neither.
 
@CatPlusPlus why would I want a bunch of base class pointers when I could just be using instances of the proper class ._.
 
5
Q: C++ redeclaration of loop count variable inconsistent behaviour?

user2506124I'm doing C++ in Visual Studio 2010 and found some odd behaviour. To make a long story short, I found that this won't compile: for (int i = 0; i < 10; i++) { int i = 11; } This seems correct, since the variable i is already declared in the for loop header. Now, however if I insert another...

 
I'm half-asleep.
 
8:57 AM
@TonyTheLion I don't like morning ;0
 
Wednesday is my least favourite day though
 
@melak47 Dependency inversion
 
And I'm at work.
@Rapptz Not your lucky day?
 
@StackedCrooked same here
 
What if 11th of November in on a Wednesday?
 
8:58 AM
@StackedCrooked It's in the middle of the work week.
 
Wednesday means I've warmed up to the work week. So it's not too bad.
 
By Wednesday I'm ready for the weekend
 
Each day except friday is the same - it's n days till friday, n > 0
 
Thursday is when I prepare for the weekend.
 

« first day (1136 days earlier)      last day (3823 days later) »